Merge LLVM 11.1.0.
authorpatrick <patrick@openbsd.org>
Wed, 28 Apr 2021 12:49:07 +0000 (12:49 +0000)
committerpatrick <patrick@openbsd.org>
Wed, 28 Apr 2021 12:49:07 +0000 (12:49 +0000)
2887 files changed:
gnu/llvm/clang/.arcconfig [deleted file]
gnu/llvm/clang/docs/AttributeReference.rst [deleted file]
gnu/llvm/clang/docs/ClangCommandLineReference.rst
gnu/llvm/clang/docs/CommandGuide/clang.rst
gnu/llvm/clang/include/clang/AST/FormatString.h
gnu/llvm/clang/include/clang/Basic/CodeGenOptions.def
gnu/llvm/clang/include/clang/Basic/DiagnosticFrontendKinds.td
gnu/llvm/clang/include/clang/Basic/DiagnosticGroups.td
gnu/llvm/clang/include/clang/Basic/DiagnosticSemaKinds.td
gnu/llvm/clang/include/clang/Basic/LangOptions.def
gnu/llvm/clang/include/clang/Basic/TargetInfo.h
gnu/llvm/clang/include/clang/Driver/CC1Options.td [deleted file]
gnu/llvm/clang/include/clang/Driver/CLCompatOptions.td [deleted file]
gnu/llvm/clang/include/clang/Driver/Options.td
gnu/llvm/clang/include/clang/Sema/Sema.h
gnu/llvm/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h [deleted file]
gnu/llvm/clang/include/clang/StaticAnalyzer/Frontend/CheckerRegistration.h [deleted file]
gnu/llvm/clang/lib/AST/FormatString.cpp
gnu/llvm/clang/lib/AST/Interp/Block.cpp [deleted file]
gnu/llvm/clang/lib/AST/Interp/Block.h [deleted file]
gnu/llvm/clang/lib/Basic/TargetInfo.cpp
gnu/llvm/clang/lib/Basic/Targets/Mips.h
gnu/llvm/clang/lib/Basic/Targets/SystemZ.h
gnu/llvm/clang/lib/Basic/Targets/X86.cpp
gnu/llvm/clang/lib/Basic/Targets/X86.h
gnu/llvm/clang/lib/CodeGen/CGCall.cpp
gnu/llvm/clang/lib/CodeGen/TargetInfo.cpp
gnu/llvm/clang/lib/Driver/ToolChains/Arch/X86.cpp
gnu/llvm/clang/lib/Driver/ToolChains/Clang.cpp
gnu/llvm/clang/lib/Driver/ToolChains/Gnu.cpp
gnu/llvm/clang/lib/Driver/ToolChains/OpenBSD.cpp
gnu/llvm/clang/lib/Frontend/CompilerInstance.cpp
gnu/llvm/clang/lib/Frontend/CompilerInvocation.cpp
gnu/llvm/clang/lib/Headers/openmp_wrappers/__clang_openmp_math.h [deleted file]
gnu/llvm/clang/lib/Headers/openmp_wrappers/__clang_openmp_math_declares.h [deleted file]
gnu/llvm/clang/lib/Sema/SemaChecking.cpp
gnu/llvm/clang/lib/Sema/SemaDeclAttr.cpp
gnu/llvm/clang/lib/StaticAnalyzer/Core/SubEngine.cpp [deleted file]
gnu/llvm/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp [deleted file]
gnu/llvm/clang/unittests/AST/Language.cpp [deleted file]
gnu/llvm/clang/unittests/AST/Language.h [deleted file]
gnu/llvm/clang/unittests/AST/OMPStructuredBlockTest.cpp [deleted file]
gnu/llvm/clang/www/comparison.html [deleted file]
gnu/llvm/lld/.arcconfig [deleted file]
gnu/llvm/lld/Common/Threads.cpp [deleted file]
gnu/llvm/lld/ELF/Arch/PPC.cpp
gnu/llvm/lld/ELF/Config.h
gnu/llvm/lld/ELF/Driver.cpp
gnu/llvm/lld/ELF/DriverUtils.cpp
gnu/llvm/lld/ELF/InputSection.cpp
gnu/llvm/lld/ELF/LinkerScript.cpp
gnu/llvm/lld/ELF/Options.td
gnu/llvm/lld/ELF/Relocations.cpp
gnu/llvm/lld/ELF/Symbols.cpp
gnu/llvm/lld/ELF/Symbols.h
gnu/llvm/lld/ELF/SyntheticSections.cpp
gnu/llvm/lld/ELF/Writer.cpp
gnu/llvm/lld/ELF/Writer.h
gnu/llvm/lld/include/lld/Common/Threads.h [deleted file]
gnu/llvm/lld/tools/lld/lld.cpp
gnu/llvm/lldb/.arcconfig [deleted file]
gnu/llvm/lldb/include/lldb/Core/ClangForward.h [deleted file]
gnu/llvm/lldb/include/lldb/Host/TaskPool.h [deleted file]
gnu/llvm/lldb/include/lldb/Host/openbsd/HostInfoOpenBSD.h
gnu/llvm/lldb/include/lldb/Symbol/ClangASTContext.h [deleted file]
gnu/llvm/lldb/include/lldb/Symbol/ClangASTImporter.h [deleted file]
gnu/llvm/lldb/include/lldb/Symbol/ClangASTMetadata.h [deleted file]
gnu/llvm/lldb/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h [deleted file]
gnu/llvm/lldb/include/lldb/Symbol/ClangUtil.h [deleted file]
gnu/llvm/lldb/include/lldb/Symbol/CxxModuleHandler.h [deleted file]
gnu/llvm/lldb/include/lldb/Utility/ArchSpec.h
gnu/llvm/lldb/include/lldb/Utility/SharingPtr.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/.clang-format [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/android/platform/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/android/platform/TestDefaultCacheLineSize.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/android/platform/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/api/check_public_api_headers/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/api/check_public_api_headers/TestPublicAPIHeaders.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/api/check_public_api_headers/main.cpp.template [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/api/command-return-object/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/api/command-return-object/TestSBCommandReturnObject.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/api/command-return-object/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/api/listeners/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/api/listeners/TestListener.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/api/listeners/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/api/log/TestAPILog.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multiple-debuggers/.categories [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multiple-debuggers/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multiple-debuggers/TestMultipleDebuggers.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multiple-debuggers/multi-process-driver.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multiple-debuggers/testprog.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multiple-targets/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multiple-targets/TestMultipleTargets.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multiple-targets/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multithreaded/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multithreaded/TestMultithreaded.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multithreaded/common.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multithreaded/driver.cpp.template [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multithreaded/inferior.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multithreaded/listener_test.cpp.template [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multithreaded/test_breakpoint_callback.cpp.template [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multithreaded/test_listener_event_description.cpp.template [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multithreaded/test_listener_event_process_state.cpp.template [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multithreaded/test_listener_resume.cpp.template [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/breakpoint-it/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/breakpoint-it/TestBreakpointIt.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/breakpoint-it/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/breakpoint-thumb-codesection/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/breakpoint-thumb-codesection/TestBreakpointThumbCodesection.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/breakpoint-thumb-codesection/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/TestEmulations.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-1-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-1-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-10-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-11-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-12-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-2-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-2-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-3-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-3-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-4-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-4-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-5-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-5-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-6-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-6-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-7-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-7-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-8-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-8-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-9-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-bic-1-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-bic-1-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldmia-1-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldmia-1-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldmia-2-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldmia-2-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldmia-3-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldmia-3-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-1-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-1-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-10-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-11-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-12-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-2-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-2-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-3-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-3-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-4-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-4-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-5-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-5-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-6-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-6-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-7-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-7-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-8-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-8-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-9-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldrd-1-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldrd-1-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldrd-2-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldrh-1-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldrsh-1-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldrsh-2-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-1-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-1-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-10-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-11-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-12-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-13-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-14-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-15-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-16-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-17-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-18-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-19-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-2-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-2-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-20-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-21-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-22-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-23-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-24-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-25-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-26-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-27-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-28-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-29-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-3-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-3-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-30-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-31-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-4-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-4-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-5-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-5-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-6-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-6-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-7-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-8-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-9-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-moveq-1-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-movs-1-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-1-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-1-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-2-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-2-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-3-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-3-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-4-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-4-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-pop-1-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-pop-1-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-pop-2-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-pop-2-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-pop-3-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-push-1-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-push-1-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-push-2-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-push-2-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-push-3-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-push-3-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-1-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-1-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-2-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-2-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-3-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-3-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-4-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-4-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-5-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-strb-1-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-strb-2-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-strbt-1-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-strd-1-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-strt-1-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-1-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-1-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-10-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-2-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-2-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-3-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-3-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-4-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-4-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-5-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-5-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-6-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-6-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-8-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-9-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-1-arm.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-1-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-10-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-2-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-3-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-4-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-5-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-6-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-8-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-9-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-vpop-1-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-vpop-2-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-vpop-3-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-vpush-1-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-vpush-2-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-vpush-3-thumb.dat [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/continue/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/continue/TestBenchmarkContinue.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/continue/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/expression/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/expression/TestExpressionCmd.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/expression/TestRepeatedExprs.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/expression/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/frame_variable/TestFrameVariableResponse.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxlist/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxlist/TestBenchmarkLibcxxList.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxlist/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxmap/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxmap/TestBenchmarkLibcxxMap.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxmap/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/startup/TestStartupDelays.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/stepping/TestSteppingSpeed.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/add-dsym/uuid/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/add-dsym/uuid/TestAddDsymCommand.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/add-dsym/uuid/main.cpp.template [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/apropos/basic/TestApropos.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/apropos/with-process/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/apropos/with-process/TestAproposWithProcess.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/apropos/with-process/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/breakpoint/command/list/TestBreakpointCommandList.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/breakpoint/command/list/a.yaml [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/.categories [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/delete/TestCommandDelete.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/history/TestCommandHistory.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/invalid-args/TestInvalidArgsCommand.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/nested_alias/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/nested_alias/TestNestedAlias.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/nested_alias/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/TestCommandScript.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/bug11569.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/callables.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/decorated.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/TestImport.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/bar/bar.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/bar/barutil.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/dummymodule.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/foo/bar/foobar.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/foo/foo.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/foo/foo2.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/rdar-12586188/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/rdar-12586188/TestRdar12586188.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/rdar-12586188/fail12586188.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/rdar-12586188/fail212586188.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/thepackage/TPunitA.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/thepackage/TPunitB.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/thepackage/__init__.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/mysto.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/py_import [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/welcome.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script_alias/TestCommandScriptAlias.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script_alias/tcsacmd.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/source/.lldb [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/source/TestCommandSource.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/source/commands.txt [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/source/my.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/disassemble/basic/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/disassemble/basic/TestDisassembleBreakpoint.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/disassemble/basic/TestFrameDisassemble.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/disassemble/basic/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/.categories [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/anonymous-struct/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/anonymous-struct/TestCallUserAnonTypedef.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/anonymous-struct/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/argument_passing_restrictions/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/argument_passing_restrictions/TestArgumentPassingRestrictions.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/argument_passing_restrictions/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/calculator_mode/TestCalculatorMode.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/TestCallBuiltinFunction.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/TestCallStdStringFunction.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/TestCallStopAndContinue.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/TestCallUserDefinedFunction.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-overridden-method/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-overridden-method/TestCallOverriddenMethod.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-overridden-method/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-restarts/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-restarts/TestCallThatRestarts.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-restarts/lotta-signals.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-throws/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-throws/TestCallThatThrows.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-throws/call-throws.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/cast_int_to_anonymous_enum/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/cast_int_to_anonymous_enum/TestCastIntToAnonymousEnum.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/cast_int_to_anonymous_enum/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/char/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/char/TestExprsChar.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/char/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/class_template_specialization_empty_pack/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/class_template_specialization_empty_pack/TestClassTemplateSpecializationParametersHandling.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/class_template_specialization_empty_pack/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/codegen-crash-typedefdecl-not-in_declcontext/TestCodegenCrashTypedefDeclNotInDeclContext.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/codegen-crash-typedefdecl-not-in_declcontext/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion-crash-incomplete-record/TestCompletionCrashIncompleteRecord.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion-crash-incomplete-record/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion-crash1/TestCompletionCrash1.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion-crash1/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion-in-lambda-and-unnamed-class/TestCompletionInLambdaAndUnnamedClass.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion-in-lambda-and-unnamed-class/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion/.categories [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion/TestExprCompletion.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion/other.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/context-object-objc/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/context-object-objc/TestContextObjectObjc.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/context-object-objc/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/context-object/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/context-object/TestContextObject.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/context-object/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/diagnostics/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/diagnostics/TestExprDiagnostics.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/diagnostics/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/dollar-in-variable/TestDollarInVariable.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/dollar-in-variable/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/dont_allow_jit/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/dont_allow_jit/TestAllowJIT.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/dont_allow_jit/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/entry-bp/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/entry-bp/TestExprEntryBP.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/entry-bp/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/expr-in-syscall/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/expr-in-syscall/TestExpressionInSyscall.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/expr-in-syscall/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/fixits/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/fixits/TestFixIts.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/fixits/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/TestFormatters.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/foosynth.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/formatters.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/function_template_specialization_temp_args/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/function_template_specialization_temp_args/TestFunctionTemplateSpecializationTempArgs.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/function_template_specialization_temp_args/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/ignore-artificial-constructors/TestIgnoreArtificialConstructors.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/ignore-artificial-constructors/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/basic/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/basic/TestImportStdModule.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/basic/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/conflicts/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/conflicts/TestStdModuleWithConflicts.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/conflicts/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-basic/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-basic/TestBasicDeque.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-basic/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-dbg-info-content/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-dbg-info-content/TestDbgInfoContentDeque.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-dbg-info-content/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/TestEmptyStdModule.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/root/usr/include/c++/v1/algorithm [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/root/usr/include/c++/v1/module.modulemap [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/root/usr/include/libc_header.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-basic/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-basic/TestBasicForwardList.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-basic/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-dbg-info-content/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-dbg-info-content/TestDbgInfoContentForwardList.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-dbg-info-content/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-basic/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-basic/TestBasicList.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-basic/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-dbg-info-content/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-dbg-info-content/TestDbgInfoContentList.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-dbg-info-content/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/no-std-module/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/no-std-module/TestMissingStdModule.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/no-std-module/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/queue/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/queue/TestQueue.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/queue/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr-dbg-info-content/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr-dbg-info-content/TestSharedPtrDbgInfoContent.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr-dbg-info-content/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr/TestSharedPtr.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/stack/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/stack/TestStack.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/stack/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/TestStdModuleSysroot.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/algorithm [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/module.modulemap [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/libc_header.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr-dbg-info-content/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr-dbg-info-content/TestUniquePtrDbgInfoContent.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr-dbg-info-content/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr/TestUniquePtr.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-basic/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-basic/TestBasicVector.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-basic/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-bool/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-bool/TestBoolVector.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-bool/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-dbg-info-content/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-dbg-info-content/TestDbgInfoContentVector.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-dbg-info-content/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-of-vectors/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-of-vectors/TestVectorOfVectors.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-of-vectors/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr-dbg-info-content/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr-dbg-info-content/TestDbgInfoContentWeakPtr.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr-dbg-info-content/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr/TestWeakPtr.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import_builtin_fileid/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import_builtin_fileid/TestImportBuiltinFileID.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import_builtin_fileid/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/inline-namespace/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/inline-namespace/TestInlineNamespace.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/inline-namespace/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/invalid-args/TestInvalidArgsExpression.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter-phi-nodes/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter-phi-nodes/TestIRInterpreterPHINodes.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter-phi-nodes/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter/TestIRInterpreter.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/issue_11588/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/issue_11588/Test11588.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/issue_11588/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/issue_11588/s11588.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/macros/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/macros/TestMacros.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/macros/macro1.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/macros/macro2.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/macros/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-completion/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-completion/TestMultilineCompletion.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-completion/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-navigation/TestMultilineNavigation.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_cpp_and_c/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_cpp_and_c/TestNamespaceLocalVarSameNameCppAndC.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_cpp_and_c/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_obj_c/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_obj_c/TestNamespaceLocalVarSameNameObjC.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_obj_c/main.mm [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_obj_c/util.mm [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/no-deadlock/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/no-deadlock/TestExprDoesntBlock.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/no-deadlock/locking.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/options/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/options/TestExprOptions.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/options/foo.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/options/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persist_objc_pointeetype/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persist_objc_pointeetype/TestPersistObjCPointeeType.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persist_objc_pointeetype/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_ptr_update/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_ptr_update/TestPersistentPtrUpdate.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_ptr_update/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_types/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_types/TestNestedPersistentTypes.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_types/TestPersistentTypes.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_types/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_variables/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_variables/TestPersistentVariables.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_variables/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/po_verbosity/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/po_verbosity/TestPoVerbosity.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/po_verbosity/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/pr35310/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/pr35310/TestExprsBug35310.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/pr35310/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/radar_8638051/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/radar_8638051/Test8638051.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/radar_8638051/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9531204/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9531204/TestPrintfAfterUp.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9531204/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9673664/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9673664/TestExprHelpExamples.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9673664/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/rdar42038760/TestScalarURem.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/rdar42038760/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/rdar44436068/Test128BitsInteger.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/rdar44436068/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/regression-access-function-template-in-record/TestRegressionAccessFunctionTemplateInRecord.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/regression-access-function-template-in-record/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/save_jit_objects/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/save_jit_objects/TestSaveJITObjects.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/save_jit_objects/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/scoped_enums/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/scoped_enums/TestScopedEnumType.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/scoped_enums/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/static-initializers/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/static-initializers/TestStaticInitializers.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/static-initializers/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/test/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/test/TestExprs.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/test/TestExprs2.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/test/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/timeout/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/timeout/TestCallWithTimeout.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/timeout/wait-a-while.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/top-level/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/top-level/TestTopLevelExprs.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/top-level/dummy.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/top-level/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/top-level/test.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/two-files/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/two-files/TestObjCTypeQueryFromOtherCompileUnit.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/two-files/foo.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/two-files/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/unicode-in-variable/TestUnicodeInVariable.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/unicode-in-variable/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/unwind_expression/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/unwind_expression/TestUnwindExpression.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/unwind_expression/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/vector_of_enums/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/vector_of_enums/TestVectorOfEnums.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/vector_of_enums/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/TestWeakSymbols.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/dylib.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/dylib.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/module.modulemap [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/xvalue/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/xvalue/TestXValuePrinting.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/xvalue/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/array/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/array/TestArray.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/array/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/bad-reference/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/bad-reference/TestBadReference.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/bad-reference/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/complicated-expression/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/complicated-expression/TestComplicatedExpression.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/complicated-expression/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-argument/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-argument/TestDiagnoseDereferenceArgument.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-argument/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-function-return/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-function-return/TestDiagnoseDereferenceFunctionReturn.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-function-return/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-this/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-this/TestDiagnoseDereferenceThis.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-this/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/inheritance/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/inheritance/TestDiagnoseInheritance.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/inheritance/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/local-variable/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/local-variable/TestLocalVariable.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/local-variable/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/virtual-method-call/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/virtual-method-call/TestDiagnoseDereferenceVirtualMethodCall.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/virtual-method-call/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/language/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/language/TestGuessLanguage.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/language/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/language/other-2.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/language/other.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/language/other.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/language/somefunc.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/recognizer/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/recognizer/TestFrameRecognizer.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/recognizer/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/recognizer/recognizer.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/select/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/select/TestFrameSelect.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/select/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/var-scope/TestFrameVariableScope.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/var-scope/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/var/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/var/TestFrameVar.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/var/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/gui/basic/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/gui/basic/TestGuiBasic.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/gui/basic/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/gui/invalid-args/TestInvalidArgsGui.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/help/TestHelp.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/log/basic/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/log/basic/TestLogging.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/log/basic/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/log/invalid-args/TestInvalidArgsLog.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/platform/basic/TestPlatformCommand.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/platform/basic/TestPlatformPython.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/platform/process/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/platform/process/TestProcessList.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/platform/process/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/attach-resume/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/attach-resume/TestAttachResume.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/attach-resume/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/attach/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/attach/TestProcessAttach.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/attach/attach_denied/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/attach/attach_denied/TestAttachDenied.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/attach/attach_denied/entitlements.plist [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/attach/attach_denied/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/attach/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/TestLaunchWithShellExpand.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/file1.txt [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/file2.txt [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/file3.txt [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/file4.txy [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/file5.tyx [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/foo bar [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch/TestProcessLaunch.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch/input-file.txt [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch/print_cwd.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch/print_env.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/quit/TestQuit.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/TestMPXRegisters.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_bound_violation/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_bound_violation/TestBoundViolation.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_bound_violation/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_offset_intersection/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_offset_intersection/TestMPXOffsetIntersection.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_offset_intersection/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/register_command/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/register_command/TestRegisters.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/register_command/a.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/register_command/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/reproducer/invalid-args/TestInvalidArgsReproducer.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/settings/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/settings/TestSettings.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/settings/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/settings/quoting/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/settings/quoting/TestQuoting.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/settings/quoting/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/source/info/TestSourceInfo.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/source/info/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/source/info/second.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/statistics/basic/TestStats.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/statistics/basic/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/basic/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/basic/TestTargetCommand.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/basic/a.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/basic/b.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/basic/c.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/basic/globals.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/basic/invalid_core_file [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/create-deps/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/create-deps/TestTargetCreateDeps.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/create-deps/a.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/create-deps/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/create-no-such-arch/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/create-no-such-arch/TestNoSuchArch.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/create-no-such-arch/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/dump-symtab-demangle/TestDumpSymtabDemangle.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/dump-symtab-demangle/a.yaml [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/stop-hooks/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/stop-hooks/TestStopHooks.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/stop-hooks/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/version/TestVersion.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/.categories [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchlocation/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchlocation/TestWatchLocation.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchlocation/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchpoint/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchpoint/TestMyFirstWatchpoint.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchpoint/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multi_watchpoint_slots/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multi_watchpoint_slots/TestWatchpointMultipleSlots.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multi_watchpoint_slots/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_hits/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_hits/TestMultipleHits.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_hits/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_threads/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_threads/TestWatchpointMultipleThreads.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_threads/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/step_over_watchpoint/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/step_over_watchpoint/TestStepOverWatchpoint.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/step_over_watchpoint/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/variable_out_of_scope/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/variable_out_of_scope/TestWatchedVarHitWhenInScope.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/variable_out_of_scope/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/TestWatchpointCommands.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/TestWatchpointCommandLLDB.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/TestWatchpointCommandPython.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/watchpoint_command.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/condition/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/condition/TestWatchpointConditionCmd.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/condition/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_disable/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_disable/TestWatchpointDisable.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_disable/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_events/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_events/TestWatchpointEvents.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_events/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_on_vectors/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_on_vectors/TestValueOfVectorVariable.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_on_vectors/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_set_command/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_set_command/TestWatchLocationWithWatchSet.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_set_command/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_size/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_size/TestWatchpointSizes.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_size/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/driver/batch_mode/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/driver/batch_mode/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/abbreviation/.categories [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/abbreviation/TestAbbreviations.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/abbreviation/TestCommonShortSpellings.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/alias/.categories [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/archives/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/archives/README [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/archives/TestBSDArchives.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/archives/a.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/archives/b.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/archives/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/asan/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/asan/TestMemoryHistory.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/asan/TestReportData.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/asan/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/avoids-fd-leak/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/avoids-fd-leak/TestFdLeak.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/avoids-fd-leak/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/backticks/.categories [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/backticks/TestBackticksWithoutATarget.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestAddressBreakpoints.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestBadAddressBreakpoints.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/TestBreakpointAutoContinue.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_by_line_and_column/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_by_line_and_column/TestBreakpointByLineAndColumn.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_by_line_and_column/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestRegexpBreakCommand.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/a.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/b.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/bktptcmd.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/side_effect.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_hit_count/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_hit_count/TestBreakpointHitCount.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_hit_count/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ids/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ids/TestBreakpointIDs.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ids/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ignore_count/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ignore_count/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/TestAvoidBreakpointInDelaySlot.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/TestBreakpointLanguage.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/a.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/b.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_names/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_names/TestBreakpointNames.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_names/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/TestBreakpointOptions.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/foo.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/TestBreakpointSetRestart.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/TestConsecutiveBreakpoints.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp/TestCPPBreakpointLocations.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp_exception/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp_exception/TestCPPExceptionBreakpoint.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp_exception/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/TestDebugBreak.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/dummy_target_breakpoints/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/dummy_target_breakpoints/TestBreakpointsWithNoTargets.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/dummy_target_breakpoints/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/TestBreakpointInGlobalConstructor.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/foo.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/foo.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/hardware_breakpoints/hardware_breakpoint_on_multiple_threads/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/hardware_breakpoints/hardware_breakpoint_on_multiple_threads/TestHWBreakMultiThread.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/hardware_breakpoints/hardware_breakpoint_on_multiple_threads/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/inlined_breakpoints/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/inlined_breakpoints/TestInlinedBreakpoints.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/inlined_breakpoints/basic_type.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/inlined_breakpoints/int.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/TestMoveNearest.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/foo.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/foo.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/objc/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/objc/TestObjCBreakpoints.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/objc/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/TestRequireHWBreakpoints.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/TestScriptedResolver.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/resolver.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/TestBreakpointSerialization.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/resolver.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/side_effect.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/source_regexp/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/source_regexp/TestSourceRegexBreakpoints.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/source_regexp/a.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/source_regexp/a.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/source_regexp/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/completion/.categories [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/completion/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/completion/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/conditional_break/.lldb [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/conditional_break/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/conditional_break/TestConditionalBreak.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/conditional_break/conditional_break.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/conditional_break/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/.categories [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/basic/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/basic/TestDarwinLogBasic.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/basic/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/common/darwin_log_common.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity-chain/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity-chain/TestDarwinLogFilterMatchActivityChain.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity-chain/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity/TestDarwinLogFilterMatchActivity.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/category/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/category/TestDarwinLogFilterMatchCategory.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/category/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/message/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/message/TestDarwinLogFilterMatchMessage.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/message/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/subsystem/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/subsystem/TestDarwinLogFilterMatchSubsystem.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/subsystem/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity-chain/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity-chain/TestDarwinLogFilterRegexActivityChain.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity-chain/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity/TestDarwinLogFilterRegexActivity.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/category/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/category/TestDarwinLogFilterRegexCategory.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/category/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/message/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/message/TestDarwinLogFilterRegexMessage.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/message/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/subsystem/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/subsystem/TestDarwinLogFilterRegexSubsystem.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/subsystem/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/format/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/format/TestDarwinLogMessageFormat.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/format/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/debug/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/debug/TestDarwinLogSourceDebug.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/debug/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/info/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/info/TestDarwinLogSourceInfo.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/info/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/.categories [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/array_typedef/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/array_typedef/TestArrayTypedef.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/array_typedef/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/main.mm [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/compactvectors/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/compactvectors/TestCompactVectors.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/compactvectors/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-advanced/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-advanced/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-caching/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-caching/TestDataFormatterCaching.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-caching/a.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-caching/b.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-categories/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-categories/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-cpp/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-cpp/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-disabling/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-disabling/TestDataFormatterDisabling.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-disabling/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-enum-format/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-enum-format/TestDataFormatterEnumFormat.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-enum-format/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-globals/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-globals/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-named-summaries/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-named-summaries/TestDataFormatterNamedSummaries.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-named-summaries/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/.categories [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/ObjCDataFormatterTestCase.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCCF.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCExpr.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCKVO.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSBundle.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSContainer.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSData.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSDate.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSError.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSURL.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCPlain.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjNSException.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/cmtime/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/cmtime/TestDataFormatterCMTime.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/cmtime/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/TestDataFormatterNSIndexPath.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsstring/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsstring/TestDataFormatterNSString.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsstring/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-proper-plurals/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-proper-plurals/TestFormattersOneIsSingular.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-proper-plurals/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-ptr-to-array/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-ptr-to-array/TestPtrToArrayFormatting.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-ptr-to-array/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-python-synth/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-python-synth/fooSynthProvider.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-python-synth/ftsp.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-python-synth/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-script/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-script/TestDataFormatterScript.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-script/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-smart-array/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-smart-array/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/TestLibCxxAtomic.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/bitset/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/bitset/TestDataFormatterLibcxxBitset.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/bitset/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/forward_list/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/forward_list/TestDataFormatterLibcxxForwardList.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/forward_list/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/TestLibCxxFunction.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/TestInitializerList.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/TestDataFormatterLibccIterator.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/TestDataFormatterLibcxxListLoop.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/TestDataFormatterLibccMultiMap.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/TestDataFormatterLibcxxOptional.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/queue/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/queue/TestDataFormatterLibcxxQueue.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/queue/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/TestDataFormatterLibcxxTuple.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/TestDataFormatterLibcxxVariant.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/TestDataFormatterStdSmartPtr.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/TestDataFormatterStdTuple.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/TestDataFormatterStdUniquePtr.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/invalid/TestDataFormatterInvalidStdUniquePtr.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/invalid/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synth/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synth/TestDataFormatterSynth.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synth/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthtype/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthtype/TestDataFormatterSynthType.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthtype/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthtype/myIntSynthProvider.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/myIntSynthProvider.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/TestDumpDynamic.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/format-propagation/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/format-propagation/TestFormatPropagation.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/format-propagation/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/frameformat_smallstruct/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/frameformat_smallstruct/TestFrameFormatSmallStruct.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/frameformat_smallstruct/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/hexcaps/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/hexcaps/TestDataFormatterHexCaps.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/hexcaps/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/language_category_updates/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/language_category_updates/TestDataFormatterLanguageCategoryUpdates.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/language_category_updates/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsarraysynth/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsarraysynth/TestNSArraySynthetic.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsarraysynth/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsdictionarysynth/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsdictionarysynth/TestNSDictionarySynthetic.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsdictionarysynth/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nssetsynth/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nssetsynth/TestNSSetSynthetic.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nssetsynth/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ostypeformatting/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ostypeformatting/TestFormattersOsType.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ostypeformatting/main.mm [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/parray/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/parray/TestPrintArray.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/parray/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/TestPrintObjectArray.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/main.mm [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ptr_ref_typedef/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ptr_ref_typedef/TestPtrRef2Typedef.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ptr_ref_typedef/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/provider.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/refpointer-recursion/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/refpointer-recursion/TestDataFormatterRefPtrRecursion.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/refpointer-recursion/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/setvaluefromcstring/TestSetValueFromCString.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/setvaluefromcstring/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/stringprinter/TestStringPrinter.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/stringprinter/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/summary-string-onfail/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/summary-string-onfail/Test-rdar-9974002.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/summary-string-onfail/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthcapping/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthcapping/TestSyntheticCapping.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthcapping/fooSynthProvider.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthcapping/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthupdate/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthupdate/TestSyntheticFilterRecompute.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthupdate/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_arg/TestTypeSummaryListArg.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_script/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_script/TestTypeSummaryListScript.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_script/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_script/tslsformatters.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/typedef_array/TestTypedefArray.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/typedef_array/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/user-format-vs-summary/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/user-format-vs-summary/TestUserFormatVsSummary.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/user-format-vs-summary/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/var-in-aggregate-misuse/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/var-in-aggregate-misuse/TestVarInAggregateMisuse.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/var-in-aggregate-misuse/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/varscript_formatting/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/varscript_formatting/TestDataFormatterVarScriptFormatting.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/varscript_formatting/helperfunc.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/varscript_formatting/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/vector-types/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/vector-types/TestVectorTypesFormatting.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/vector-types/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/TestDeadStrip.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/cmds.txt [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/deleted-executable/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/deleted-executable/TestDeletedExecutable.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/deleted-executable/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/dynamic_value_child_count/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/dynamic_value_child_count/TestDynamicValueChildCount.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/dynamic_value_child_count/pass-to-base.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/exec/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/exec/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/exec/secondprog.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/fat_archives/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/fat_archives/TestFatArchives.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/fat_archives/a.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/fat_archives/a.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/fat_archives/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/float-display/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/float-display/TestFloatDisplay.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/float-display/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestArmRegisterDefinition.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteClient.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteLoad.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestJLink6Armv7RegisterDefinition.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestNestedRegDefinitions.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestNoGPacketSupported.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestNoWatchpointSupportInfo.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestPlatformClient.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestRecognizeBreakpoint.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestRegDefinitionInParts.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestRestartBug.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestStopPCs.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestTargetXMLArch.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestThreadSelectionBug.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestWriteMemory.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/a.yaml [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/basic_eh_frame.yaml [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/gdbclientutils.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/operating_system.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/operating_system_2.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/history/TestHistoryRecall.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-assert/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-assert/TestInferiorAssert.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-assert/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-changed/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-changed/TestInferiorChanged.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-changed/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-changed/main2.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashing.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashingStep.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferiorStep.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inline-stepping/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inline-stepping/TestInlineStepping.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inline-stepping/calling.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/TestJITLoaderGDB.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/simple.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/lazy-loading/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/lazy-loading/TestLazyLoading.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/lazy-loading/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/.categories [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/a.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/b.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/c.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/cmds.txt [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/d.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/hidden/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/hidden/d.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/.categories [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/TestLoadUsingPaths.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/hidden/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/hidden/d.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/longjmp/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/longjmp/TestLongjmp.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/longjmp/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory-region/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory-region/TestMemoryRegion.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory-region/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory/cache/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory/cache/TestMemoryCache.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory/cache/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory/find/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory/find/TestMemoryFind.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory/find/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory/read/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory/read/TestMemoryRead.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory/read/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/TestMTCSimple.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/multidebugger_commands/TestMultipleDebuggersCommands.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/multiword-commands/TestMultiWordCommands.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/non-overlapping-index-variable-i/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/non-overlapping-index-variable-i/TestIndexVariable.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/non-overlapping-index-variable-i/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello-freebsd-10.0-x86_64-clang-3.3 [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello-freebsd-10.0-x86_64-gcc-4.7.3 [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello-netbsd-6.1-x86_64-gcc-4.5.3 [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello-ubuntu-14.04-x86_64-clang-3.5pre [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello-ubuntu-14.04-x86_64-gcc-4.8.2 [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello-unknown-kalimba_arch4-kcc-36 [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello-unknown-kalimba_arch5-kcc-39 [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/param_entry_vals/basic_entry_values_x86_64/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/param_entry_vals/basic_entry_values_x86_64/TestBasicEntryValuesX86_64.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/param_entry_vals/basic_entry_values_x86_64/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/plugins/command_plugin/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/plugins/command_plugin/TestPluginCommands.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/plugins/command_plugin/plugin.cpp.template [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/operating_system.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/operating_system2.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/altmain.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/altmain.out [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/fpr_sse.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/gcore/TestGCore.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/gcore/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/gcore/main.mk [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/gcore/make-core.sh [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-i386.out [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-mips64el-gnuabi64.out [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-mips64el-gnuabin32.out [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-mipsel-gnuabio32.out [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-ppc64le.out [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-s390x.out [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-x86_64.out [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/make-core.sh [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/thread_crash/TestLinuxCoreThreads.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/thread_crash/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/thread_crash/main.mk [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/thread_crash/make-core.sh [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/mach-core/TestMachCore.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/mach-core/operating_system.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/mach-core/test.core.yaml [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpUUID.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/arm-linux.yaml [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/arm-macos.yaml [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/arm64-macos.yaml [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/install_breakpad.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/libuuidmatch.yaml [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/libuuidmismatch.yaml [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-partial-uuids-match.yaml [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-partial-uuids-mismatch.yaml [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-same-uuids.yaml [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-uuids-elf-build-id-16.yaml [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-uuids-elf-build-id-20.yaml [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-uuids-elf-build-id-zero.yaml [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-uuids-no-age.yaml [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-uuids-with-age.yaml [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-zero-uuids.yaml [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64 [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64.dmp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64.yaml [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64_not_crashed [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64_not_crashed.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64_not_crashed.dmp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64_null_signal.yaml [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/macos-arm-uuids-no-age.yaml [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/makefile.txt [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/regions-linux-map.yaml [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/relative_module_name.yaml [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/fizzbuzz.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/fizzbuzz.syms [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/fizzbuzz_no_heap.dmp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/1lwp_SIGSEGV.aarch64 [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/1lwp_SIGSEGV.amd64 [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/1lwp_SIGSEGV.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.aarch64 [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.amd64 [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_t2_SIGSEGV.aarch64 [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_t2_SIGSEGV.amd64 [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_t2_SIGSEGV.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/GNUmakefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/TestNetBSDCore.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/wow64_minidump/TestWow64MiniDump.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/wow64_minidump/fizzbuzz.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/wow64_minidump/fizzbuzz_wow64.dmp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/pre_run_dylibs/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/pre_run_dylibs/TestPreRunDylibs.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/pre_run_dylibs/foo.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/pre_run_dylibs/foo.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/pre_run_dylibs/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/process_group/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/process_group/TestChangeProcessGroup.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/process_group/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/process_save_core/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/process_save_core/TestProcessSaveCore.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/process_save_core/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/ptr_refs/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/ptr_refs/TestPtrRefs.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/ptr_refs/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/recursion/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/recursion/TestValueObjectRecursion.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/recursion/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/rerun/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/rerun/TestRerun.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/rerun/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/return-value/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/return-value/call-func.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/set-data/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/set-data/TestSetData.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/set-data/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/show_location/TestShowLocationDwarf5.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/show_location/a.yaml [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/TestSendSignal.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-abrt/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-abrt/TestHandleAbort.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-abrt/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/TestHandleSegv.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/raise/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/raise/TestRaise.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/raise/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/source-map/TestTargetSourceMap.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/source-map/Trivial/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/source-map/a.yaml [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/stats_api/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/stats_api/TestStatisticsAPI.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/stats_api/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/with-debug.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/without-debug.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/Steps.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/TestStepScripted.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq1/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq1/TestAmbiguousTailCallSeq1.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq1/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2/TestAmbiguousTailCallSeq2.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_call_site/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_call_site/TestDisambiguateCallSite.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_call_site/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_paths_to_common_sink/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_paths_to_common_sink/TestDisambiguatePathsToCommonSink.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_paths_to_common_sink/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_tail_call_seq/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_tail_call_seq/TestDisambiguateTailCallSeq.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_tail_call_seq/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/inlining_and_tail_calls/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/inlining_and_tail_calls/TestInliningAndTailCalls.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/inlining_and_tail_calls/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/TestTailCallFrameSBAPI.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_message/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_message/TestArtificialFrameStepOutMessage.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_message/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/TestSteppingOutWithArtificialFrames.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/unambiguous_sequence/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/unambiguous_sequence/TestUnambiguousTailCalls.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/unambiguous_sequence/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/target-new-solib-notifications/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/target-new-solib-notifications/TestModuleLoadedNotifys.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/target-new-solib-notifications/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/target_var/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/target_var/TestTargetVar.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/target_var/globals.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/target_var/globals.ll [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/testid/TestTestId.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/ParallelTask.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/TestBacktraceAll.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_limit/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_limit/TestBacktraceLimit.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_limit/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/break_after_join/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/break_after_join/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentBreakpointDelayBreakpointOneSignal.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentBreakpointOneDelayBreakpointThreads.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentBreakpointsDelayedBreakpointOneWatchpoint.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithBreak.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithSignal.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpoint.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpointBreakpointSignal.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelaySignalBreak.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelaySignalWatch.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelayWatchBreak.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelayedCrashWithBreakpointSignal.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelayedCrashWithBreakpointWatchpoint.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyBreakpoints.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyCrash.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManySignals.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyWatchpoints.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentNWatchNBreak.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalBreak.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalDelayBreak.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalDelayWatch.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalNWatchNBreak.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalWatch.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalWatchBreak.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointThreads.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneDelaySignal.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneSignal.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneWatchpoint.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointThreads.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneBreakpoint.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneDelayBreakpoint.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneSignal.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentWatchBreak.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentWatchBreakDelay.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentWatchpointDelayWatchpointOneBreakpoint.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentWatchpointWithDelayWatchpointThreads.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_during_step/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_during_step/TestCreateDuringStep.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_during_step/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/TestExitDuringStep.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/jump/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/jump/TestThreadJump.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/jump/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/jump/other.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/multi_break/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/multi_break/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/num_threads/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/num_threads/TestNumThreads.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/num_threads/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/state/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/state/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_out/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_out/TestThreadStepOut.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_out/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_until/.categories [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_until/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_until/TestStepUntil.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_until/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/TestThreadExit.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/basic/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/basic/TestTsanBasic.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/basic/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/TestTsanCPPGlobalLocation.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/global_location/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/global_location/TestTsanGlobalLocation.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/global_location/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/multiple/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/multiple/TestTsanMultiple.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/multiple/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/TestTsanThreadLeak.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/TestTsanThreadNumbers.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tty/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tty/TestTerminal.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tty/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/type_completion/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/type_completion/TestTypeCompletion.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/type_completion/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/TestTypeLookup.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/main.mm [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/basic/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/basic/TestUbsanBasic.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/basic/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/user-expression/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/user-expression/TestUbsanUserExpression.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/user-expression/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/ehframe/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/ehframe/TestEhFrameUnwind.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/ehframe/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/module-end/TestNoReturnModuleEnd.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/module-end/a.s [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/module-end/test.out [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/standard/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/standard/TestStandardUnwind.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/standard/hand_written/divmod.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/standard/hand_written/fprintf.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/standard/hand_written/new_delete.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/value_md5_crash/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/value_md5_crash/TestValueMD5Crash.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/value_md5_crash/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/var_path/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/var_path/TestVarPath.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/var_path/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/wrong_commands/.categories [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/wrong_commands/TestWrongCommands.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/iohandler/completion/TestIOHandlerCompletion.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/iohandler/completion/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/iohandler/unicode/TestUnicode.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/README.txt [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/TestExpectedTimeout.py.park [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/TestFail.py.park [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/TestInvalidDecorator.py.park [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/TestRerunFail.py.park [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/TestRerunFileLevelTimeout.py.park [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/TestRerunInline.py.park [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/TestRerunTimeout.py.park [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/TestSignal.py.park [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/TestSignalOutsideTestMethod.py.park [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/TestTimeout.py.park [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/disable.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/enable.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/inline_rerun_inferior.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/rerun_base.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/anonymous/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/anonymous/TestAnonymous.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/anonymous/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/array_types/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/array_types/TestArrayTypes.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/array_types/cmds.txt [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/array_types/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/blocks/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/blocks/TestBlocks.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/blocks/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One.mk [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One/One.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One/One.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One/OneConstant.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/TestConflictingSymbol.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two.mk [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two/Two.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two/Two.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two/TwoConstant.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/TestConstVariables.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/functions.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/enum_types/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/enum_types/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/find_struct_type/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/find_struct_type/TestFindStructTypes.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/find_struct_type/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/forward/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/forward/README.txt [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/forward/TestForwardDeclaration.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/forward/foo.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/forward/foo.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/forward/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/function_types/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/function_types/TestFunctionTypes.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/function_types/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/a.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/cmds.txt [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/inlines/TestRedefinitionsInInlines.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/inlines/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/local_types/TestUseClosestType.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/local_types/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/local_types/other.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/local_variables/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/local_variables/TestLocalVariables.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/local_variables/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/modules/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/modules/TestCModules.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/modules/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/offsetof/TestOffsetof.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/offsetof/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/recurse/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/recurse/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/TestRegisterVariables.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/test.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/set_values/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/set_values/TestSetValues.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/set_values/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/TestSharedLib.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/foo.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/foo.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/foo.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/foo.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/step-target/.categories [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/step-target/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/step-target/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/step_over_no_deadlock/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/step_over_no_deadlock/TestStepOverDoesntBlock.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/step_over_no_deadlock/locking.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/stepping/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/stepping/TestStepAndBreakpoints.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/stepping/TestThreadStepping.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/stepping/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/strings/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/strings/TestCStrings.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/strings/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/struct_types/TestStructTypes.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/struct_types/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/a.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/typedef/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/typedef/Testtypedef.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/typedef/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/unicode/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/unicode/TestUnicodeSymbols.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/unicode/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/unions/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/unions/TestUnionMembers.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/unions/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/vla/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/vla/TestVLA.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/vla/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/TestCPPAccelerator.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/a.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/b.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/c.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/d.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/e.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/f.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/g.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/source.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/auto/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/auto/TestCPPAuto.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/auto/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/bitfields/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/bitfields/TestCppBitfields.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/bitfields/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/bool/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/bool/TestCPPBool.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/bool/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/nested.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/TestBreakpointInMemberFuncWNonPrimitiveParams.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/a.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/a.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/module.modulemap [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/call-function/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/call-function/TestCallCPPFunction.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/call-function/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/chained-calls/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/chained-calls/TestCppChainedCalls.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/chained-calls/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/char1632_t/.categories [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/char1632_t/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/char1632_t/TestChar1632T.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/char1632_t/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/char8_t/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/char8_t/TestCxxChar8_t.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/char8_t/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/class-template-parameter-pack/TestClassTemplateParameterPack.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/class-template-parameter-pack/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/class_static/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/class_static/TestStaticVariables.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/class_static/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypes.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypesDisassembly.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/cmds.txt [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/diamond/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/diamond/TestDiamond.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/diamond/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value-same-basename/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value-same-basename/TestDynamicValueSameBase.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value-same-basename/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestCppValueCast.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestDynamicValue.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/pass-to-base.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/sbvalue-cast.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/TestCPP11EnumTypes.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/exceptions/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/exceptions/exceptions.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/extern_c/TestExternCSymbols.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/extern_c/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/function-template-parameter-pack/TestFunctionTemplateParameterPack.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/function-template-parameter-pack/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/function_refs/TestFunctionRefs.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/function_refs/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/global_operators/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/global_operators/TestCppGlobalOperators.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/global_operators/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/global_variables/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/global_variables/TestCPPGlobalVariables.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/global_variables/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/TestGModules.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/a.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/b.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/memory.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/module.modulemap [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/pch.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/a.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/a.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/length.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/length.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/inlines/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/inlines/TestInlines.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/inlines/inlines.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/inlines/inlines.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/lambdas/TestLambdas.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/lambdas/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/TestWithLimitDebugInfo.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/base.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/base.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/derived.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/derived.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/llvm-style/TestLLVMStyle.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/llvm-style/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/TestMembersAndLocalsWithSameName.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/Inputs/Bar.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/Inputs/Foo.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/Inputs/module.modulemap [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/TestCXXModulesImport.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespaceLookup.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/cmds.txt [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/ns.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/ns.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/ns2.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/ns3.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/TestNamespaceConflicts.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/TestNamespaceDefinitions.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/a.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/b.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/foo.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/nested-class-other-compilation-unit/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/nested-class-other-compilation-unit/TestNestedClassWithParentInAnotherCU.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/nested-class-other-compilation-unit/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/nested-class-other-compilation-unit/other.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/nested-class-other-compilation-unit/shared.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/nsimport/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/nsimport/TestCppNsImport.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/nsimport/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/offsetof/TestOffsetofCpp.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/offsetof/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/operator-overload/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/operator-overload/TestOperatorOverload.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/operator-overload/a.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/operator-overload/b.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/operators/TestCppOperators.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/operators/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/overloaded-functions/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/overloaded-functions/TestOverloadedFunctions.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/overloaded-functions/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/overloaded-functions/static-a.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/overloaded-functions/static-b.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/printf/TestPrintf.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/printf/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/rvalue-references/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/rvalue-references/TestRvalueReferences.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/rvalue-references/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/scope/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/scope/TestCppScope.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/scope/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/signed_types/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/signed_types/TestSignedTypes.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/signed_types/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/static_members/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/static_members/TestCPPStaticMembers.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/static_members/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/static_methods/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/static_methods/TestCPPStaticMethods.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/static_methods/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/std-function-step-into-callable/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/std-function-step-into-callable/TestStdFunctionStepIntoCallable.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/std-function-step-into-callable/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/TestSTL.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/TestStdCXXDisassembly.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/cmds.txt [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/symbols/TestSymbols.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/symbols/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/template-function/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/template-function/TestTemplateFunctions.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/template-function/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/template/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/template/TestTemplateArgs.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/template/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/this/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/this/TestCPPThis.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/this/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/thread_local/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/thread_local/TestThreadLocal.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/thread_local/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/trivial_abi/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/trivial_abi/TestTrivialABI.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/trivial_abi/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/type_lookup/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/type_lookup/TestCppTypeLookup.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/type_lookup/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/TestUnicodeLiterals.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/unique-types/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/unique-types/TestUniqueTypes.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/unique-types/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/unsigned_types/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/unsigned_types/TestUnsignedTypes.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/unsigned_types/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/virtual-overload/TestVirtualOverload.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/virtual-overload/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/virtual/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/virtual/TestVirtual.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/virtual/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/wchar_t/.categories [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/wchar_t/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/wchar_t/TestCxxWCharT.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/wchar_t/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/mixed/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/mixed/TestMixedLanguages.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/mixed/foo.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/mixed/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/.categories [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/TestBitfieldIvars.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/blocks/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/blocks/TestObjCIvarsInBlocks.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/blocks/ivars-in-blocks.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/blocks/ivars-in-blocks.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/blocks/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Foo.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Test.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Test.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestConflictingDefinition.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/Foo.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/TestExt.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/TestExt.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/main.mm [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/Container.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/Container.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/TestForwardDecl.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestConstStrings.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestFoundationDisassembly.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods2.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethodsNSArray.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethodsNSError.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethodsString.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjectDescriptionAPI.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestRuntimeTypes.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestSymbolTable.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/const-strings.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/my-base.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/my-base.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/global_ptrs/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/global_ptrs/TestGlobalObjects.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/global_ptrs/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/InternalDefiner.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/InternalDefiner.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/TestHiddenIvars.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/myclass.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/myclass.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/repro.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/TestClangModulesAppUpdate.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/foo.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/module.modulemap [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/umbrella.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/TestModulesAutoImport.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-cache/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-cache/TestClangModulesCache.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-cache/f.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-cache/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-cache/module.modulemap [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-hash-mismatch/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-hash-mismatch/TestClangModulesHashMismatch.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-hash-mismatch/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-hash-mismatch/other.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/TestIncompleteModules.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/minmax.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/module.map [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/myModule.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/myModule.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/module.map [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/myModule.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/myModule.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/TestClangModulesUpdate.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/first.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/module.modulemap [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/second.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/umbrella.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules/TestObjCModules.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc++/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc++/TestObjCXX.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc++/main.mm [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-checker/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-checker/TestObjCCheckers.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-checker/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-class-method/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-class-method/class.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/.categories [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/dynamic-value.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-foundation-dictionary-empty/TestNSDictionary0.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-foundation-dictionary-empty/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/objc-ivar-offsets.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/objc-ivar-offsets.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/TestIvarProtocols.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/ObjCNewSyntaxTest.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntaxArray.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntaxDictionary.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntaxLiteral.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-optimized/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-optimized/TestObjcOptimized.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-optimized/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-property/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-property/TestObjCProperty.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-property/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/TestRuntimeIvars.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/static.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method/TestObjCStaticMethod.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method/static.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-stepping/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-stepping/TestObjCStepping.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-stepping/stepping-tests.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/test.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/TestObjCStructReturn.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/test.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-super/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-super/TestObjCSuper.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-super/class.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc_direct-methods/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc_direct-methods/TestObjCDirectMethods.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc_direct-methods/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/orderedset/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/orderedset/TestOrderedSet.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/orderedset/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/print-obj/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/print-obj/TestPrintObj.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/print-obj/blocked.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/ptr_refs/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/ptr_refs/TestPtrRefsObjC.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/ptr_refs/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/radar-9691614/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/radar-9691614/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/TestRdar10967107.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/TestRdar11355592.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/TestRdar12408181.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/Bar.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/Bar.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/Foo.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/Foo.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/TestRealDefinition.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/sample/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/sample/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/self/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/self/TestObjCSelf.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/self/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/unicode-string/TestUnicodeString.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/unicode-string/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/variadic_methods/TestVariadicMethods.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/variadic_methods/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/class-name-clash/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/class-name-clash/TestNameClash.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/class-name-clash/main.mm [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/class-name-clash/myobject.mm [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/cxx-bridged-po/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/cxx-bridged-po/TestObjCXXBridgedPO.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/cxx-bridged-po/main.mm [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/hide-runtime-values/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/hide-runtime-values/TestObjCXXHideRuntimeValues.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/hide-runtime-values/main.mm [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/objcxx-ivar-vector/TestIvarVector.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/objcxx-ivar-vector/main.mm [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/sample/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/sample/main.mm [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/add-symbols/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/add-symbols/TestTargetSymbolsAddCommand.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/add-symbols/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/builtin_trap/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/builtin_trap/TestBuiltinTrap.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/builtin_trap/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/mix-dwo-and-regular-objects/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/mix-dwo-and-regular-objects/TestMixedDwarfBinary.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/mix-dwo-and-regular-objects/a.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/mix-dwo-and-regular-objects/b.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/sepdebugsymlink/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/sepdebugsymlink/TestTargetSymbolsSepDebugSymlink.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/sepdebugsymlink/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/thread/create_during_instruction_step/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/thread/create_during_instruction_step/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/lock.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/Inputs/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/Inputs/relative.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/TestDSYMSourcePathRemapping.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/add-dsym/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/add-dsym/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/TestDuplicateMembers.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/a.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/sub1/a.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/TestApp.app/Contents/Info.plist [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/TestApp.app/Contents/MacOS/.empty [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/TestApp.app/Contents/Resources/.empty [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/TestFindAppInBundle.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/TestBundleWithDotInFilename.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/bundle.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/Info.plist [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/MyFramework.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/TestDeepBundle.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/myframework.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/function-starts/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/function-starts/TestFunctionStarts.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/function-starts/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/indirect_symbol/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/indirect_symbol/TestIndirectSymbols.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/indirect_symbol/alias.list [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/indirect_symbol/indirect.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/indirect_symbol/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/indirect_symbol/reexport.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/TestKernVerStrLCNOTE.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/create-empty-corefile.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/load-kext/TestLoadKext.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/load-kext/mykext.yaml [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/macabi/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/macabi/TestMacABImacOSFramework.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/macabi/foo.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/macabi/foo.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/macabi/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/nslog/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/nslog/TestDarwinNSLogOutput.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/nslog/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/order/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/order/TestOrderFile.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/order/cmds.txt [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/order/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/order/order-file [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/queues/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/queues/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/safe-to-func-call/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/safe-to-func-call/TestSafeFuncCalls.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/safe-to-func-call/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/thread-names/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/thread-names/TestInterruptThreadNames.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/thread-names/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/universal/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/universal/TestUniversal.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/universal/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/version_zero/TestGetVersionZeroVersion.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/version_zero/libDylib.dylib.yaml [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/.categories [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/breakpoint/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/breakpoint/TestBreakpointAPI.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/breakpoint/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/class_members/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/class_members/TestSBTypeClassMembers.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/class_members/main.mm [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/debugger/TestDebuggerAPI.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_address.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_block.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpoint.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpointlocation.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpointname.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_broadcaster.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_communication.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_compileunit.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_debugger.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_error.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_event.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_filespec.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_frame.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_function.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instruction.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instructionlist.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_lineentry.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_listener.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_module.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_process.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_process_info.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_section.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_stringlist.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_symbol.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_symbolcontext.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_target.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_thread.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_type.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_value.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_valuelist.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_watchpoint.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassembleRawData.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/event/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/event/TestEvents.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/event/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/exprpath_synthetic/TestExprPathSynthetic.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/exprpath_synthetic/main.mm [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/file_handle/TestFileHandle.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/TestSBFrameFindValue.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/formatters/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/formatters/TestFormattersSBAPI.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/formatters/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/formatters/synth.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/frame/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/TestInlinedFrame.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/inlines.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/inlines.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/frame/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/TestDisasmAPI.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/TestSymbolAPI.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/get-value-32bit-int/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/get-value-32bit-int/TestGetValue32BitInt.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/get-value-32bit-int/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/hello_world/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/hello_world/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/interpreter/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/interpreter/TestCommandInterpreterAPI.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/interpreter/TestRunCommandInterpreterAPI.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/interpreter/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/TestSwigVersion.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/frame/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/frame/TestFrameUtils.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/frame/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestLLDBIterator.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/TestPrintStackTraces.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/module_section/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/module_section/TestModuleAndSection.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/module_section/b.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/module_section/c.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/module_section/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/name_lookup/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/name_lookup/TestNameLookup.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/name_lookup/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/objc_type/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/objc_type/TestObjCType.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/objc_type/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/process/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/process/TestProcessAPI.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/process/io/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/process/io/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/process/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/process/read-mem-cstring/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/process/read-mem-cstring/TestReadMemCString.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/process/read-mem-cstring/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbdata/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbdata/TestSBData.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbdata/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sblaunchinfo/TestSBLaunchInfo.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbstructureddata/TestStructuredDataAPI.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbtype_typeclass/TestSBTypeTypeClass.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbtype_typeclass/main.m [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_const_addrof/TestSBValueConstAddrOf.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_const_addrof/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_persist/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_persist/TestSBValuePersist.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_persist/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/section/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/section/TestSectionAPI.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/section/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/signals/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/signals/TestSignalsAPI.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/signals/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/TestSymbolContext.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/two-files/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/two-files/TestSymbolContextTwoFiles.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/two-files/decls.h [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/two-files/file1.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/two-files/file2.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/target/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/target/TestTargetAPI.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/target/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/thread/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/thread/TestThreadAPI.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/thread/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/thread/main2.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/type/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/type/TestTypeList.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/type/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/change_values/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/change_values/TestChangeValueAPI.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/change_values/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/empty_class/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/empty_class/TestValueAPIEmptyClass.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/empty_class/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/linked_list/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/linked_list/TestValueAPILinkedList.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/linked_list/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value_var_update/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value_var_update/TestValueVarUpdate.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value_var_update/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/.categories [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIter.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/condition/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/condition/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/redo.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/sample_test/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/sample_test/TestSampleInlineTest.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/sample_test/TestSampleTest.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/sample_test/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/sanity/TestModuleCacheSanity.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/source-manager/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/source-manager/TestSourceManager.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/source-manager/hidden/.keep [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/source-manager/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/terminal/TestEditline.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/terminal/TestSTTYBeforeAndAfter.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/test_runner/test/__init__.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/test_runner/test/inferior.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/test_runner/test/test_process_control.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/.clang-format [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteAttach.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteAuxvSupport.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteExitCode.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteExpeditedRegisters.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteHostInfo.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteKill.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteModuleInfo.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteProcessInfo.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteRegisterState.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteSingleStep.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_vCont.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_vContThreads.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/commandline/TestStubReverseConnect.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/commandline/TestStubSetSID.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_a.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_b_quote.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/platform-process-connect/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/platform-process-connect/TestPlatformProcessConnect.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/platform-process-connect/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/register-reading/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/register-reading/TestGdbRemoteGPacket.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/register-reading/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/signal-filtering/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/signal-filtering/TestGdbRemote_QPassSignals.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/signal-filtering/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/test/test_lldbgdbserverutils.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/TestGdbRemoteThreadName.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/.categories [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/TestVSCode_attach.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setExceptionBreakpoints.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setFunctionBreakpoints.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/completions/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/completions/TestVSCode_completions.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/completions/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/TestVSCode_stackTrace.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/main.c [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/step/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/step/TestVSCode_step.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/step/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/TestVSCode_variables.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/AbstractBase.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/HideTestFailures.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/Makefile [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestCharType.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestCharTypeExpr.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestDoubleTypes.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestDoubleTypesExpr.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestFloatTypes.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestFloatTypesExpr.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestIntegerType.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestIntegerTypeExpr.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestLongTypes.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestLongTypesExpr.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestRecursiveTypes.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestShortType.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestShortTypeExpr.py [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/basic_type.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/char.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/double.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/float.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/int.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/long.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/long_long.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/recursive_type_1.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/recursive_type_2.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/recursive_type_main.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/short.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/unsigned_char.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/unsigned_int.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/unsigned_long.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/unsigned_long_long.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test/types/unsigned_short.cpp [deleted file]
gnu/llvm/lldb/packages/Python/lldbsuite/test_event/formatter/xunit.py [deleted file]
gnu/llvm/lldb/scripts/swig_bot_lib/__init__.py [deleted file]
gnu/llvm/lldb/source/Core/FormatEntity.cpp
gnu/llvm/lldb/source/Host/common/SocketAddress.cpp
gnu/llvm/lldb/source/Host/common/TaskPool.cpp [deleted file]
gnu/llvm/lldb/source/Host/linux/ProcessLauncherLinux.cpp [deleted file]
gnu/llvm/lldb/source/Host/netbsd/Host.cpp [deleted file]
gnu/llvm/lldb/source/Host/openbsd/Host.cpp
gnu/llvm/lldb/source/Host/openbsd/HostInfoOpenBSD.cpp
gnu/llvm/lldb/source/Host/posix/DomainSocket.cpp
gnu/llvm/lldb/source/Host/posix/PipePosix.cpp
gnu/llvm/lldb/source/Initialization/CMakeLists.txt
gnu/llvm/lldb/source/Initialization/SystemInitializerCommon.cpp
gnu/llvm/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/MacOSX-arm/CMakeLists.txt [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.h [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/MacOSX-arm64/CMakeLists.txt [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/MacOSX-i386/CMakeLists.txt [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-arc/ABISysV_arc.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-arc/ABISysV_arc.h [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-arc/CMakeLists.txt [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.h [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-arm/CMakeLists.txt [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.h [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-arm64/CMakeLists.txt [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.h [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-hexagon/CMakeLists.txt [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.h [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-i386/CMakeLists.txt [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.h [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-mips/CMakeLists.txt [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.h [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-mips64/CMakeLists.txt [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-ppc/CMakeLists.txt [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-ppc64/CMakeLists.txt [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.h [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-s390x/CMakeLists.txt [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/SysV-x86_64/CMakeLists.txt [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/Windows-x86_64/ABIWindows_x86_64.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/Windows-x86_64/ABIWindows_x86_64.h [deleted file]
gnu/llvm/lldb/source/Plugins/ABI/Windows-x86_64/CMakeLists.txt [deleted file]
gnu/llvm/lldb/source/Plugins/Disassembler/llvm/CMakeLists.txt [deleted file]
gnu/llvm/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h [deleted file]
gnu/llvm/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
gnu/llvm/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
gnu/llvm/lldb/source/Plugins/InstrumentationRuntime/ASan/ASanRuntime.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/InstrumentationRuntime/ASan/ASanRuntime.h [deleted file]
gnu/llvm/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.h [deleted file]
gnu/llvm/lldb/source/Plugins/InstrumentationRuntime/TSan/TSanRuntime.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/InstrumentationRuntime/TSan/TSanRuntime.h [deleted file]
gnu/llvm/lldb/source/Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.h [deleted file]
gnu/llvm/lldb/source/Plugins/LanguageRuntime/Go/CMakeLists.txt [deleted file]
gnu/llvm/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
gnu/llvm/lldb/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.cpp
gnu/llvm/lldb/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.h
gnu/llvm/lldb/source/Plugins/Process/CMakeLists.txt
gnu/llvm/lldb/source/Plugins/Process/Darwin/CFBundle.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/Process/Darwin/CFBundle.h [deleted file]
gnu/llvm/lldb/source/Plugins/Process/Darwin/CFString.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/Process/Darwin/CFString.h [deleted file]
gnu/llvm/lldb/source/Plugins/Process/Darwin/CFUtils.h [deleted file]
gnu/llvm/lldb/source/Plugins/Process/Darwin/DarwinProcessLauncher.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/Process/Darwin/DarwinProcessLauncher.h [deleted file]
gnu/llvm/lldb/source/Plugins/Process/Darwin/LaunchFlavor.h [deleted file]
gnu/llvm/lldb/source/Plugins/Process/Darwin/MachException.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/Process/Darwin/MachException.h [deleted file]
gnu/llvm/lldb/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/Process/Darwin/NativeProcessDarwin.h [deleted file]
gnu/llvm/lldb/source/Plugins/Process/Darwin/NativeThreadDarwin.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/Process/Darwin/NativeThreadDarwin.h [deleted file]
gnu/llvm/lldb/source/Plugins/Process/Darwin/NativeThreadListDarwin.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/Process/Darwin/NativeThreadListDarwin.h [deleted file]
gnu/llvm/lldb/source/Plugins/Process/OpenBSD/CMakeLists.txt
gnu/llvm/lldb/source/Plugins/Process/OpenBSD/NativeProcessOpenBSD.cpp
gnu/llvm/lldb/source/Plugins/Process/Utility/CMakeLists.txt
gnu/llvm/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.h [deleted file]
gnu/llvm/lldb/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.h [deleted file]
gnu/llvm/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/Process/Utility/UnwindLLDB.h [deleted file]
gnu/llvm/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.h [deleted file]
gnu/llvm/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
gnu/llvm/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwoDwp.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwoDwp.h [deleted file]
gnu/llvm/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.cpp [deleted file]
gnu/llvm/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.h [deleted file]
gnu/llvm/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp
gnu/llvm/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.h
gnu/llvm/lldb/source/Symbol/ClangASTContext.cpp [deleted file]
gnu/llvm/lldb/source/Symbol/ClangASTImporter.cpp [deleted file]
gnu/llvm/lldb/source/Symbol/ClangASTMetadata.cpp [deleted file]
gnu/llvm/lldb/source/Symbol/ClangExternalASTSourceCallbacks.cpp [deleted file]
gnu/llvm/lldb/source/Symbol/ClangUtil.cpp [deleted file]
gnu/llvm/lldb/source/Symbol/CxxModuleHandler.cpp [deleted file]
gnu/llvm/lldb/source/Target/UnixSignals.cpp
gnu/llvm/lldb/source/Utility/ArchSpec.cpp
gnu/llvm/lldb/source/Utility/SharingPtr.cpp [deleted file]
gnu/llvm/lldb/tools/debugserver/source/MacOSX/ppc/DNBArchImpl.cpp [deleted file]
gnu/llvm/lldb/tools/debugserver/source/MacOSX/ppc/DNBArchImpl.h [deleted file]
gnu/llvm/lldb/tools/lldb-mi/lldb-mi.exports [deleted file]
gnu/llvm/lldb/tools/lldb-server/CMakeLists.txt
gnu/llvm/lldb/tools/lldb-server/lldb-gdbserver.cpp
gnu/llvm/lldb/unittests/Host/TaskPoolTest.cpp [deleted file]
gnu/llvm/lldb/unittests/Symbol/TestClangASTContext.cpp [deleted file]
gnu/llvm/lldb/unittests/UnwindAssembly/ARM64/TestArm64InstEmulation.cpp
gnu/llvm/lldb/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp
gnu/llvm/llvm/.arcconfig [deleted file]
gnu/llvm/llvm/examples/LLJITExamples/CMakeLists.txt [deleted file]
gnu/llvm/llvm/examples/LLJITExamples/ExampleModules.h [deleted file]
gnu/llvm/llvm/examples/LLJITExamples/LLJITDumpObjects/CMakeLists.txt [deleted file]
gnu/llvm/llvm/examples/LLJITExamples/LLJITDumpObjects/LLJITDumpObjects.cpp [deleted file]
gnu/llvm/llvm/examples/LLJITExamples/LLJITWithCustomObjectLinkingLayer/CMakeLists.txt [deleted file]
gnu/llvm/llvm/examples/LLJITExamples/LLJITWithCustomObjectLinkingLayer/LLJITWithCustomObjectLinkingLayer.cpp [deleted file]
gnu/llvm/llvm/examples/LLJITExamples/LLJITWithObjectCache/CMakeLists.txt [deleted file]
gnu/llvm/llvm/examples/LLJITExamples/LLJITWithObjectCache/LLJITWithObjectCache.cpp [deleted file]
gnu/llvm/llvm/include/llvm/Analysis/OrderedBasicBlock.h [deleted file]
gnu/llvm/llvm/include/llvm/Analysis/OrderedInstructions.h [deleted file]
gnu/llvm/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h [deleted file]
gnu/llvm/llvm/include/llvm/BinaryFormat/Dwarf.def
gnu/llvm/llvm/include/llvm/CodeGen/AsmPrinter.h
gnu/llvm/llvm/include/llvm/CodeGen/CommandFlags.inc [deleted file]
gnu/llvm/llvm/include/llvm/CodeGen/GlobalISel/Types.h [deleted file]
gnu/llvm/llvm/include/llvm/CodeGen/MachineFrameInfo.h
gnu/llvm/llvm/include/llvm/CodeGen/Passes.h
gnu/llvm/llvm/include/llvm/CodeGen/TargetFrameLowering.h
gnu/llvm/llvm/include/llvm/IR/CFGDiff.h [deleted file]
gnu/llvm/llvm/include/llvm/IR/CallSite.h [deleted file]
gnu/llvm/llvm/include/llvm/IR/RemarkStreamer.h [deleted file]
gnu/llvm/llvm/include/llvm/InitializePasses.h
gnu/llvm/llvm/include/llvm/MC/MCTargetOptionsCommandFlags.inc [deleted file]
gnu/llvm/llvm/include/llvm/Support/StringPool.h [deleted file]
gnu/llvm/llvm/lib/Analysis/OrderedBasicBlock.cpp [deleted file]
gnu/llvm/llvm/lib/Analysis/OrderedInstructions.cpp [deleted file]
gnu/llvm/llvm/lib/Analysis/ScalarEvolutionExpander.cpp [deleted file]
gnu/llvm/llvm/lib/CodeGen/AntiDepBreaker.h [deleted file]
gnu/llvm/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
gnu/llvm/llvm/lib/CodeGen/CMakeLists.txt
gnu/llvm/llvm/lib/CodeGen/PrologEpilogInserter.cpp
gnu/llvm/llvm/lib/CodeGen/SafeStackColoring.cpp [deleted file]
gnu/llvm/llvm/lib/CodeGen/SafeStackColoring.h [deleted file]
gnu/llvm/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
gnu/llvm/llvm/lib/CodeGen/Spiller.h [deleted file]
gnu/llvm/llvm/lib/CodeGen/TargetPassConfig.cpp
gnu/llvm/llvm/lib/Frontend/OpenMP/OMPConstants.cpp [deleted file]
gnu/llvm/llvm/lib/IR/AttributesCompatFunc.td [deleted file]
gnu/llvm/llvm/lib/IR/RemarkStreamer.cpp [deleted file]
gnu/llvm/llvm/lib/MC/MCAsmInfoELF.cpp
gnu/llvm/llvm/lib/MC/MCELFStreamer.cpp
gnu/llvm/llvm/lib/MC/MCParser/AsmParser.cpp
gnu/llvm/llvm/lib/Support/StringPool.cpp [deleted file]
gnu/llvm/llvm/lib/Support/Unix/Process.inc
gnu/llvm/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
gnu/llvm/llvm/lib/Target/AArch64/AArch64CallLowering.cpp [deleted file]
gnu/llvm/llvm/lib/Target/AArch64/AArch64CallLowering.h [deleted file]
gnu/llvm/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
gnu/llvm/llvm/lib/Target/AArch64/AArch64FrameLowering.h
gnu/llvm/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
gnu/llvm/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
gnu/llvm/llvm/lib/Target/AArch64/AArch64InstrInfo.td
gnu/llvm/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp [deleted file]
gnu/llvm/llvm/lib/Target/AArch64/AArch64LegalizerInfo.cpp [deleted file]
gnu/llvm/llvm/lib/Target/AArch64/AArch64LegalizerInfo.h [deleted file]
gnu/llvm/llvm/lib/Target/AArch64/AArch64PreLegalizerCombiner.cpp [deleted file]
gnu/llvm/llvm/lib/Target/AArch64/AArch64RegisterBankInfo.cpp [deleted file]
gnu/llvm/llvm/lib/Target/AArch64/AArch64RegisterBankInfo.h [deleted file]
gnu/llvm/llvm/lib/Target/AArch64/AArch64Subtarget.h
gnu/llvm/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
gnu/llvm/llvm/lib/Target/AArch64/CMakeLists.txt
gnu/llvm/llvm/lib/Target/AMDGPU/AMDGPURegisterInfo.cpp [deleted file]
gnu/llvm/llvm/lib/Target/AMDGPU/AMDGPURegisterInfo.h [deleted file]
gnu/llvm/llvm/lib/Target/AMDGPU/AMDGPURegisterInfo.td [deleted file]
gnu/llvm/llvm/lib/Target/AMDGPU/VIInstructions.td [deleted file]
gnu/llvm/llvm/lib/Target/Hexagon/HexagonInstrFormatsV5.td [deleted file]
gnu/llvm/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
gnu/llvm/llvm/lib/Target/Mips/CMakeLists.txt
gnu/llvm/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
gnu/llvm/llvm/lib/Target/Mips/MipsFrameLowering.cpp
gnu/llvm/llvm/lib/Target/Mips/MipsFrameLowering.h
gnu/llvm/llvm/lib/Target/Mips/MipsISelLowering.cpp
gnu/llvm/llvm/lib/Target/Mips/MipsInstrInfo.td
gnu/llvm/llvm/lib/Target/Mips/MipsTargetMachine.cpp
gnu/llvm/llvm/lib/Target/PowerPC/CMakeLists.txt
gnu/llvm/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp [deleted file]
gnu/llvm/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
gnu/llvm/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
gnu/llvm/llvm/lib/Target/PowerPC/PPCFrameLowering.h
gnu/llvm/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
gnu/llvm/llvm/lib/Target/PowerPC/PPCInstrInfo.td
gnu/llvm/llvm/lib/Target/PowerPC/PPCSubtarget.h
gnu/llvm/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
gnu/llvm/llvm/lib/Target/Sparc/SparcISelLowering.cpp
gnu/llvm/llvm/lib/Target/Sparc/SparcInstr64Bit.td
gnu/llvm/llvm/lib/Target/Sparc/SparcInstrInfo.td
gnu/llvm/llvm/lib/Target/VE/InstPrinter/CMakeLists.txt [deleted file]
gnu/llvm/llvm/lib/Target/VE/InstPrinter/LLVMBuild.txt [deleted file]
gnu/llvm/llvm/lib/Target/VE/InstPrinter/VEInstPrinter.cpp [deleted file]
gnu/llvm/llvm/lib/Target/VE/InstPrinter/VEInstPrinter.h [deleted file]
gnu/llvm/llvm/lib/Target/WebAssembly/WebAssemblyCallIndirectFixup.cpp [deleted file]
gnu/llvm/llvm/lib/Target/X86/CMakeLists.txt
gnu/llvm/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
gnu/llvm/llvm/lib/Target/X86/Utils/CMakeLists.txt [deleted file]
gnu/llvm/llvm/lib/Target/X86/Utils/LLVMBuild.txt [deleted file]
gnu/llvm/llvm/lib/Target/X86/Utils/X86ShuffleDecode.cpp [deleted file]
gnu/llvm/llvm/lib/Target/X86/Utils/X86ShuffleDecode.h [deleted file]
gnu/llvm/llvm/lib/Target/X86/X86.h
gnu/llvm/llvm/lib/Target/X86/X86.td
gnu/llvm/llvm/lib/Target/X86/X86AsmPrinter.h
gnu/llvm/llvm/lib/Target/X86/X86FrameLowering.cpp
gnu/llvm/llvm/lib/Target/X86/X86FrameLowering.h
gnu/llvm/llvm/lib/Target/X86/X86InstrCompiler.td
gnu/llvm/llvm/lib/Target/X86/X86MCInstLower.cpp
gnu/llvm/llvm/lib/Target/X86/X86MachineFunctionInfo.h
gnu/llvm/llvm/lib/Target/X86/X86RegisterInfo.td
gnu/llvm/llvm/lib/Target/X86/X86Subtarget.h
gnu/llvm/llvm/lib/Target/X86/X86TargetMachine.cpp
gnu/llvm/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
gnu/llvm/llvm/lib/Transforms/Scalar/SCCP.cpp
gnu/llvm/llvm/tools/dsymutil/DwarfStreamer.cpp [deleted file]
gnu/llvm/llvm/tools/dsymutil/DwarfStreamer.h [deleted file]
gnu/llvm/llvm/tools/llvm-config/llvm-config.cpp
gnu/llvm/llvm/tools/llvm-exegesis/lib/Latency.cpp [deleted file]
gnu/llvm/llvm/tools/llvm-exegesis/lib/Latency.h [deleted file]
gnu/llvm/llvm/tools/llvm-exegesis/lib/Uops.cpp [deleted file]
gnu/llvm/llvm/tools/llvm-exegesis/lib/Uops.h [deleted file]
gnu/llvm/llvm/unittests/ADT/MakeUniqueTest.cpp [deleted file]
gnu/llvm/llvm/unittests/Analysis/OrderedBasicBlockTest.cpp [deleted file]
gnu/llvm/llvm/unittests/Analysis/OrderedInstructionsTest.cpp [deleted file]
gnu/llvm/llvm/unittests/IR/WaymarkTest.cpp [deleted file]
gnu/llvm/llvm/unittests/Support/StringPool.cpp [deleted file]
gnu/llvm/llvm/utils/GetRepositoryPath [deleted file]
gnu/llvm/llvm/utils/git-svn/git-llvm [deleted file]
gnu/llvm/llvm/utils/git-svn/git-svnrevert [deleted file]
gnu/llvm/llvm/utils/git-svn/git-svnup [deleted file]
gnu/llvm/llvm/utils/gn/secondary/llvm/lib/Target/X86/Utils/BUILD.gn [deleted file]
gnu/llvm/llvm/utils/lit/tests/Inputs/shtest-format/argv0.txt [deleted file]
gnu/llvm/llvm/utils/release/merge-git.sh [deleted file]
gnu/llvm/llvm/utils/release/merge.sh [deleted file]
gnu/llvm/llvm/utils/release/tag.sh [deleted file]
gnu/llvm/llvm/utils/vscode/tablegen/.vscode/launch.json [deleted file]
gnu/llvm/llvm/utils/vscode/tablegen/CHANGELOG.md [deleted file]
gnu/llvm/llvm/utils/vscode/tablegen/README.md [deleted file]
gnu/llvm/llvm/utils/vscode/tablegen/language-configuration.json [deleted file]
gnu/llvm/llvm/utils/vscode/tablegen/package.json [deleted file]
gnu/llvm/llvm/utils/vscode/tablegen/syntaxes/TableGen.tmLanguage [deleted file]
gnu/llvm/llvm/utils/vscode/tablegen/vsc-extension-quickstart.md [deleted file]

diff --git a/gnu/llvm/clang/.arcconfig b/gnu/llvm/clang/.arcconfig
deleted file mode 100644 (file)
index b258e7a..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-{
-  "repository.callsign" : "C",
-  "conduit_uri" : "https://reviews.llvm.org/"
-}
diff --git a/gnu/llvm/clang/docs/AttributeReference.rst b/gnu/llvm/clang/docs/AttributeReference.rst
deleted file mode 100644 (file)
index 273bbb1..0000000
+++ /dev/null
@@ -1,6187 +0,0 @@
-..
-  -------------------------------------------------------------------
-  NOTE: This file is automatically generated by running clang-tblgen
-  -gen-attr-docs. Do not edit this file by hand!!
-  -------------------------------------------------------------------
-
-===================
-Attributes in Clang
-===================
-.. contents::
-   :local:
-
-.. |br| raw:: html
-
-  <br/>
-
-Introduction
-============
-
-This page lists the attributes currently supported by Clang.
-
-Function Attributes
-===================
-
-
-#pragma omp declare simd
-------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "","","","","","``omp declare simd``",""
-
-The `declare simd` construct can be applied to a function to enable the creation
-of one or more versions that can process multiple arguments using SIMD
-instructions from a single invocation in a SIMD loop. The `declare simd`
-directive is a declarative directive. There may be multiple `declare simd`
-directives for a function. The use of a `declare simd` construct on a function
-enables the creation of SIMD versions of the associated function that can be
-used to process multiple arguments from a single invocation from a SIMD loop
-concurrently.
-The syntax of the `declare simd` construct is as follows:
-
-  .. code-block:: none
-
-    #pragma omp declare simd [clause[[,] clause] ...] new-line
-    [#pragma omp declare simd [clause[[,] clause] ...] new-line]
-    [...]
-    function definition or declaration
-
-where clause is one of the following:
-
-  .. code-block:: none
-
-    simdlen(length)
-    linear(argument-list[:constant-linear-step])
-    aligned(argument-list[:alignment])
-    uniform(argument-list)
-    inbranch
-    notinbranch
-
-
-#pragma omp declare target
---------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "","","","","","``omp declare target``",""
-
-The `declare target` directive specifies that variables and functions are mapped
-to a device for OpenMP offload mechanism.
-
-The syntax of the declare target directive is as follows:
-
-  .. code-block:: c
-
-    #pragma omp declare target new-line
-    declarations-definition-seq
-    #pragma omp end declare target new-line
-
-or
-
-  .. code-block:: c
-
-    #pragma omp declare target (extended-list) new-line
-
-or
-
-  .. code-block:: c
-
-    #pragma omp declare target clause[ [,] clause ... ] new-line
-
-where clause is one of the following:
-
-
-  .. code-block:: c
-
-     to(extended-list)
-     link(list)
-     device_type(host | nohost | any)
-
-
-#pragma omp declare variant
----------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "","","","","","``omp declare variant``",""
-
-The `declare variant` directive declares a specialized variant of a base
- function and specifies the context in which that specialized variant is used.
- The declare variant directive is a declarative directive.
-The syntax of the `declare variant` construct is as follows:
-
-  .. code-block:: none
-
-    #pragma omp declare variant(variant-func-id) clause new-line
-    [#pragma omp declare variant(variant-func-id) clause new-line]
-    [...]
-    function definition or declaration
-
-where clause is one of the following:
-
-  .. code-block:: none
-
-    match(context-selector-specification)
-
-and where `variant-func-id` is the name of a function variant that is either a
- base language identifier or, for C++, a template-id.
-
-
-_Noreturn
----------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "","","","","``_Noreturn``","",""
-
-A function declared as ``_Noreturn`` shall not return to its caller. The
-compiler will generate a diagnostic for a function declared as ``_Noreturn``
-that appears to be capable of returning to its caller. Despite being a type
-specifier, the ``_Noreturn`` attribute cannot be specified on a function
-pointer type.
-
-
-abi_tag
--------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``abi_tag``","``gnu::abi_tag``","","","","","Yes"
-
-The ``abi_tag`` attribute can be applied to a function, variable, class or
-inline namespace declaration to modify the mangled name of the entity. It gives
-the ability to distinguish between different versions of the same entity but
-with different ABI versions supported. For example, a newer version of a class
-could have a different set of data members and thus have a different size. Using
-the ``abi_tag`` attribute, it is possible to have different mangled names for
-a global variable of the class type. Therefore, the old code could keep using
-the old manged name and the new code will use the new mangled name with tags.
-
-
-acquire_capability, acquire_shared_capability
----------------------------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``acquire_capability`` |br| ``acquire_shared_capability`` |br| ``exclusive_lock_function`` |br| ``shared_lock_function``","``clang::acquire_capability`` |br| ``clang::acquire_shared_capability``","","","","",""
-
-Marks a function as acquiring a capability.
-
-
-alloc_align
------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``alloc_align``","``gnu::alloc_align``","","","","",""
-
-Use ``__attribute__((alloc_align(<alignment>))`` on a function
-declaration to specify that the return value of the function (which must be a
-pointer type) is at least as aligned as the value of the indicated parameter. The
-parameter is given by its index in the list of formal parameters; the first
-parameter has index 1 unless the function is a C++ non-static member function,
-in which case the first parameter has index 2 to account for the implicit ``this``
-parameter.
-
-.. code-block:: c++
-
-  // The returned pointer has the alignment specified by the first parameter.
-  void *a(size_t align) __attribute__((alloc_align(1)));
-
-  // The returned pointer has the alignment specified by the second parameter.
-  void *b(void *v, size_t align) __attribute__((alloc_align(2)));
-
-  // The returned pointer has the alignment specified by the second visible
-  // parameter, however it must be adjusted for the implicit 'this' parameter.
-  void *Foo::b(void *v, size_t align) __attribute__((alloc_align(3)));
-
-Note that this attribute merely informs the compiler that a function always
-returns a sufficiently aligned pointer. It does not cause the compiler to
-emit code to enforce that alignment.  The behavior is undefined if the returned
-poitner is not sufficiently aligned.
-
-
-alloc_size
-----------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``alloc_size``","``gnu::alloc_size``","","","","","Yes"
-
-The ``alloc_size`` attribute can be placed on functions that return pointers in
-order to hint to the compiler how many bytes of memory will be available at the
-returned pointer. ``alloc_size`` takes one or two arguments.
-
-- ``alloc_size(N)`` implies that argument number N equals the number of
-  available bytes at the returned pointer.
-- ``alloc_size(N, M)`` implies that the product of argument number N and
-  argument number M equals the number of available bytes at the returned
-  pointer.
-
-Argument numbers are 1-based.
-
-An example of how to use ``alloc_size``
-
-.. code-block:: c
-
-  void *my_malloc(int a) __attribute__((alloc_size(1)));
-  void *my_calloc(int a, int b) __attribute__((alloc_size(1, 2)));
-
-  int main() {
-    void *const p = my_malloc(100);
-    assert(__builtin_object_size(p, 0) == 100);
-    void *const a = my_calloc(20, 5);
-    assert(__builtin_object_size(a, 0) == 100);
-  }
-
-.. Note:: This attribute works differently in clang than it does in GCC.
-  Specifically, clang will only trace ``const`` pointers (as above); we give up
-  on pointers that are not marked as ``const``. In the vast majority of cases,
-  this is unimportant, because LLVM has support for the ``alloc_size``
-  attribute. However, this may cause mildly unintuitive behavior when used with
-  other attributes, such as ``enable_if``.
-
-
-allocator
----------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "","","","``allocator``","","",""
-
-The ``__declspec(allocator)`` attribute is applied to functions that allocate
-memory, such as operator new in C++. When CodeView debug information is emitted
-(enabled by ``clang -gcodeview`` or ``clang-cl /Z7``), Clang will attempt to
-record the code offset of heap allocation call sites in the debug info. It will
-also record the type being allocated using some local heuristics. The Visual
-Studio debugger uses this information to `profile memory usage`_.
-
-.. _profile memory usage: https://docs.microsoft.com/en-us/visualstudio/profiling/memory-usage
-
-This attribute does not affect optimizations in any way, unlike GCC's
-``__attribute__((malloc))``.
-
-
-artificial
-----------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``artificial``","``gnu::artificial``","","","","",""
-
-The ``artificial`` attribute can be applied to an inline function. If such a
-function is inlined, the attribute indicates that debuggers should associate
-the resulting instructions with the call site, rather than with the
-corresponding line within the inlined callee.
-
-
-assert_capability, assert_shared_capability
--------------------------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``assert_capability`` |br| ``assert_shared_capability``","``clang::assert_capability`` |br| ``clang::assert_shared_capability``","","","","",""
-
-Marks a function that dynamically tests whether a capability is held, and halts
-the program if it is not held.
-
-
-assume_aligned
---------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``assume_aligned``","``gnu::assume_aligned``","","","","","Yes"
-
-Use ``__attribute__((assume_aligned(<alignment>[,<offset>]))`` on a function
-declaration to specify that the return value of the function (which must be a
-pointer type) has the specified offset, in bytes, from an address with the
-specified alignment. The offset is taken to be zero if omitted.
-
-.. code-block:: c++
-
-  // The returned pointer value has 32-byte alignment.
-  void *a() __attribute__((assume_aligned (32)));
-
-  // The returned pointer value is 4 bytes greater than an address having
-  // 32-byte alignment.
-  void *b() __attribute__((assume_aligned (32, 4)));
-
-Note that this attribute provides information to the compiler regarding a
-condition that the code already ensures is true. It does not cause the compiler
-to enforce the provided alignment assumption.
-
-
-availability
-------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``availability``","``clang::availability``","``clang::availability``","","","","Yes"
-
-The ``availability`` attribute can be placed on declarations to describe the
-lifecycle of that declaration relative to operating system versions.  Consider
-the function declaration for a hypothetical function ``f``:
-
-.. code-block:: c++
-
-  void f(void) __attribute__((availability(macos,introduced=10.4,deprecated=10.6,obsoleted=10.7)));
-
-The availability attribute states that ``f`` was introduced in macOS 10.4,
-deprecated in macOS 10.6, and obsoleted in macOS 10.7.  This information
-is used by Clang to determine when it is safe to use ``f``: for example, if
-Clang is instructed to compile code for macOS 10.5, a call to ``f()``
-succeeds.  If Clang is instructed to compile code for macOS 10.6, the call
-succeeds but Clang emits a warning specifying that the function is deprecated.
-Finally, if Clang is instructed to compile code for macOS 10.7, the call
-fails because ``f()`` is no longer available.
-
-The availability attribute is a comma-separated list starting with the
-platform name and then including clauses specifying important milestones in the
-declaration's lifetime (in any order) along with additional information.  Those
-clauses can be:
-
-introduced=\ *version*
-  The first version in which this declaration was introduced.
-
-deprecated=\ *version*
-  The first version in which this declaration was deprecated, meaning that
-  users should migrate away from this API.
-
-obsoleted=\ *version*
-  The first version in which this declaration was obsoleted, meaning that it
-  was removed completely and can no longer be used.
-
-unavailable
-  This declaration is never available on this platform.
-
-message=\ *string-literal*
-  Additional message text that Clang will provide when emitting a warning or
-  error about use of a deprecated or obsoleted declaration.  Useful to direct
-  users to replacement APIs.
-
-replacement=\ *string-literal*
-  Additional message text that Clang will use to provide Fix-It when emitting
-  a warning about use of a deprecated declaration. The Fix-It will replace
-  the deprecated declaration with the new declaration specified.
-
-Multiple availability attributes can be placed on a declaration, which may
-correspond to different platforms. For most platforms, the availability
-attribute with the platform corresponding to the target platform will be used;
-any others will be ignored. However, the availability for ``watchOS`` and
-``tvOS`` can be implicitly inferred from an ``iOS`` availability attribute.
-Any explicit availability attributes for those platforms are still prefered over
-the implicitly inferred availability attributes. If no availability attribute
-specifies availability for the current target platform, the availability
-attributes are ignored. Supported platforms are:
-
-``ios``
-  Apple's iOS operating system.  The minimum deployment target is specified by
-  the ``-mios-version-min=*version*`` or ``-miphoneos-version-min=*version*``
-  command-line arguments.
-
-``macos``
-  Apple's macOS operating system.  The minimum deployment target is
-  specified by the ``-mmacosx-version-min=*version*`` command-line argument.
-  ``macosx`` is supported for backward-compatibility reasons, but it is
-  deprecated.
-
-``tvos``
-  Apple's tvOS operating system.  The minimum deployment target is specified by
-  the ``-mtvos-version-min=*version*`` command-line argument.
-
-``watchos``
-  Apple's watchOS operating system.  The minimum deployment target is specified by
-  the ``-mwatchos-version-min=*version*`` command-line argument.
-
-A declaration can typically be used even when deploying back to a platform
-version prior to when the declaration was introduced.  When this happens, the
-declaration is `weakly linked
-<https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html>`_,
-as if the ``weak_import`` attribute were added to the declaration.  A
-weakly-linked declaration may or may not be present a run-time, and a program
-can determine whether the declaration is present by checking whether the
-address of that declaration is non-NULL.
-
-The flag ``strict`` disallows using API when deploying back to a
-platform version prior to when the declaration was introduced.  An
-attempt to use such API before its introduction causes a hard error.
-Weakly-linking is almost always a better API choice, since it allows
-users to query availability at runtime.
-
-If there are multiple declarations of the same entity, the availability
-attributes must either match on a per-platform basis or later
-declarations must not have availability attributes for that
-platform. For example:
-
-.. code-block:: c
-
-  void g(void) __attribute__((availability(macos,introduced=10.4)));
-  void g(void) __attribute__((availability(macos,introduced=10.4))); // okay, matches
-  void g(void) __attribute__((availability(ios,introduced=4.0))); // okay, adds a new platform
-  void g(void); // okay, inherits both macos and ios availability from above.
-  void g(void) __attribute__((availability(macos,introduced=10.5))); // error: mismatch
-
-When one method overrides another, the overriding method can be more widely available than the overridden method, e.g.,:
-
-.. code-block:: objc
-
-  @interface A
-  - (id)method __attribute__((availability(macos,introduced=10.4)));
-  - (id)method2 __attribute__((availability(macos,introduced=10.4)));
-  @end
-
-  @interface B : A
-  - (id)method __attribute__((availability(macos,introduced=10.3))); // okay: method moved into base class later
-  - (id)method __attribute__((availability(macos,introduced=10.5))); // error: this method was available via the base class in 10.4
-  @end
-
-Starting with the macOS 10.12 SDK, the ``API_AVAILABLE`` macro from
-``<os/availability.h>`` can simplify the spelling:
-
-.. code-block:: objc
-
-  @interface A
-  - (id)method API_AVAILABLE(macos(10.11)));
-  - (id)otherMethod API_AVAILABLE(macos(10.11), ios(11.0));
-  @end
-
-Availability attributes can also be applied using a ``#pragma clang attribute``.
-Any explicit availability attribute whose platform corresponds to the target
-platform is applied to a declaration regardless of the availability attributes
-specified in the pragma. For example, in the code below,
-``hasExplicitAvailabilityAttribute`` will use the ``macOS`` availability
-attribute that is specified with the declaration, whereas
-``getsThePragmaAvailabilityAttribute`` will use the ``macOS`` availability
-attribute that is applied by the pragma.
-
-.. code-block:: c
-
-  #pragma clang attribute push (__attribute__((availability(macOS, introduced=10.12))), apply_to=function)
-  void getsThePragmaAvailabilityAttribute(void);
-  void hasExplicitAvailabilityAttribute(void) __attribute__((availability(macos,introduced=10.4)));
-  #pragma clang attribute pop
-
-For platforms like ``watchOS`` and ``tvOS``, whose availability attributes can
-be implicitly inferred from an ``iOS`` availability attribute, the logic is
-slightly more complex. The explicit and the pragma-applied availability
-attributes whose platform corresponds to the target platform are applied as
-described in the previous paragraph. However, the implicitly inferred attributes
-are applied to a declaration only when there is no explicit or pragma-applied
-availability attribute whose platform corresponds to the target platform. For
-example, the function below will receive the ``tvOS`` availability from the
-pragma rather than using the inferred ``iOS`` availability from the declaration:
-
-.. code-block:: c
-
-  #pragma clang attribute push (__attribute__((availability(tvOS, introduced=12.0))), apply_to=function)
-  void getsThePragmaTVOSAvailabilityAttribute(void) __attribute__((availability(iOS,introduced=11.0)));
-  #pragma clang attribute pop
-
-The compiler is also able to apply implicly inferred attributes from a pragma
-as well. For example, when targeting ``tvOS``, the function below will receive
-a ``tvOS`` availability attribute that is implicitly inferred from the ``iOS``
-availability attribute applied by the pragma:
-
-.. code-block:: c
-
-  #pragma clang attribute push (__attribute__((availability(iOS, introduced=12.0))), apply_to=function)
-  void infersTVOSAvailabilityFromPragma(void);
-  #pragma clang attribute pop
-
-The implicit attributes that are inferred from explicitly specified attributes
-whose platform corresponds to the target platform are applied to the declaration
-even if there is an availability attribute that can be inferred from a pragma.
-For example, the function below will receive the ``tvOS, introduced=11.0``
-availability that is inferred from the attribute on the declaration rather than
-inferring availability from the pragma:
-
-.. code-block:: c
-
-  #pragma clang attribute push (__attribute__((availability(iOS, unavailable))), apply_to=function)
-  void infersTVOSAvailabilityFromAttributeNextToDeclaration(void)
-    __attribute__((availability(iOS,introduced=11.0)));
-  #pragma clang attribute pop
-
-Also see the documentation for `@available
-<http://clang.llvm.org/docs/LanguageExtensions.html#objective-c-available>`_
-
-
-callback
---------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``callback``","``clang::callback``","``clang::callback``","","","","Yes"
-
-The ``callback`` attribute specifies that the annotated function may invoke the
-specified callback zero or more times. The callback, as well as the passed
-arguments, are identified by their parameter name or position (starting with
-1!) in the annotated function. The first position in the attribute identifies
-the callback callee, the following positions declare describe its arguments.
-The callback callee is required to be callable with the number, and order, of
-the specified arguments. The index `0`, or the identifier `this`, is used to
-represent an implicit "this" pointer in class methods. If there is no implicit
-"this" pointer it shall not be referenced. The index '-1', or the name "__",
-represents an unknown callback callee argument. This can be a value which is
-not present in the declared parameter list, or one that is, but is potentially
-inspected, captured, or modified. Parameter names and indices can be mixed in
-the callback attribute.
-
-The ``callback`` attribute, which is directly translated to ``callback``
-metadata <http://llvm.org/docs/LangRef.html#callback-metadata>, make the
-connection between the call to the annotated function and the callback callee.
-This can enable interprocedural optimizations which were otherwise impossible.
-If a function parameter is mentioned in the ``callback`` attribute, through its
-position, it is undefined if that parameter is used for anything other than the
-actual callback. Inspected, captured, or modified parameters shall not be
-listed in the ``callback`` metadata.
-
-Example encodings for the callback performed by `pthread_create` are shown
-below. The explicit attribute annotation indicates that the third parameter
-(`start_routine`) is called zero or more times by the `pthread_create` function,
-and that the fourth parameter (`arg`) is passed along. Note that the callback
-behavior of `pthread_create` is automatically recognized by Clang. In addition,
-the declarations of `__kmpc_fork_teams` and `__kmpc_fork_call`, generated for
-`#pragma omp target teams` and `#pragma omp parallel`, respectively, are also
-automatically recognized as broker functions. Further functions might be added
-in the future.
-
-  .. code-block:: c
-
-    __attribute__((callback (start_routine, arg)))
-    int pthread_create(pthread_t *thread, const pthread_attr_t *attr,
-                       void *(*start_routine) (void *), void *arg);
-
-    __attribute__((callback (3, 4)))
-    int pthread_create(pthread_t *thread, const pthread_attr_t *attr,
-                       void *(*start_routine) (void *), void *arg);
-
-
-carries_dependency
-------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``carries_dependency``","``carries_dependency``","","","","","Yes"
-
-The ``carries_dependency`` attribute specifies dependency propagation into and
-out of functions.
-
-When specified on a function or Objective-C method, the ``carries_dependency``
-attribute means that the return value carries a dependency out of the function,
-so that the implementation need not constrain ordering upon return from that
-function. Implementations of the function and its caller may choose to preserve
-dependencies instead of emitting memory ordering instructions such as fences.
-
-Note, this attribute does not change the meaning of the program, but may result
-in generation of more efficient code.
-
-
-cf_consumed
------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``cf_consumed``","``clang::cf_consumed``","``clang::cf_consumed``","","","","Yes"
-
-The behavior of a function with respect to reference counting for Foundation
-(Objective-C), CoreFoundation (C) and OSObject (C++) is determined by a naming
-convention (e.g. functions starting with "get" are assumed to return at
-``+0``).
-
-It can be overriden using a family of the following attributes.  In
-Objective-C, the annotation ``__attribute__((ns_returns_retained))`` applied to
-a function communicates that the object is returned at ``+1``, and the caller
-is responsible for freeing it.
-Similiarly, the annotation ``__attribute__((ns_returns_not_retained))``
-specifies that the object is returned at ``+0`` and the ownership remains with
-the callee.
-The annotation ``__attribute__((ns_consumes_self))`` specifies that
-the Objective-C method call consumes the reference to ``self``, e.g. by
-attaching it to a supplied parameter.
-Additionally, parameters can have an annotation
-``__attribute__((ns_consumed))``, which specifies that passing an owned object
-as that parameter effectively transfers the ownership, and the caller is no
-longer responsible for it.
-These attributes affect code generation when interacting with ARC code, and
-they are used by the Clang Static Analyzer.
-
-In C programs using CoreFoundation, a similar set of attributes:
-``__attribute__((cf_returns_not_retained))``,
-``__attribute__((cf_returns_retained))`` and ``__attribute__((cf_consumed))``
-have the same respective semantics when applied to CoreFoundation objects.
-These attributes affect code generation when interacting with ARC code, and
-they are used by the Clang Static Analyzer.
-
-Finally, in C++ interacting with XNU kernel (objects inheriting from OSObject),
-the same attribute family is present:
-``__attribute__((os_returns_not_retained))``,
-``__attribute__((os_returns_retained))`` and ``__attribute__((os_consumed))``,
-with the same respective semantics.
-Similar to ``__attribute__((ns_consumes_self))``,
-``__attribute__((os_consumes_this))`` specifies that the method call consumes
-the reference to "this" (e.g., when attaching it to a different object supplied
-as a parameter).
-Out parameters (parameters the function is meant to write into,
-either via pointers-to-pointers or references-to-pointers)
-may be annotated with ``__attribute__((os_returns_retained))``
-or ``__attribute__((os_returns_not_retained))`` which specifies that the object
-written into the out parameter should (or respectively should not) be released
-after use.
-Since often out parameters may or may not be written depending on the exit
-code of the function,
-annotations ``__attribute__((os_returns_retained_on_zero))``
-and ``__attribute__((os_returns_retained_on_non_zero))`` specify that
-an out parameter at ``+1`` is written if and only if the function returns a zero
-(respectively non-zero) error code.
-Observe that return-code-dependent out parameter annotations are only
-available for retained out parameters, as non-retained object do not have to be
-released by the callee.
-These attributes are only used by the Clang Static Analyzer.
-
-The family of attributes ``X_returns_X_retained`` can be added to functions,
-C++ methods, and Objective-C methods and properties.
-Attributes ``X_consumed`` can be added to parameters of methods, functions,
-and Objective-C methods.
-
-
-cf_returns_not_retained
------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``cf_returns_not_retained``","``clang::cf_returns_not_retained``","``clang::cf_returns_not_retained``","","","",""
-
-The behavior of a function with respect to reference counting for Foundation
-(Objective-C), CoreFoundation (C) and OSObject (C++) is determined by a naming
-convention (e.g. functions starting with "get" are assumed to return at
-``+0``).
-
-It can be overriden using a family of the following attributes.  In
-Objective-C, the annotation ``__attribute__((ns_returns_retained))`` applied to
-a function communicates that the object is returned at ``+1``, and the caller
-is responsible for freeing it.
-Similiarly, the annotation ``__attribute__((ns_returns_not_retained))``
-specifies that the object is returned at ``+0`` and the ownership remains with
-the callee.
-The annotation ``__attribute__((ns_consumes_self))`` specifies that
-the Objective-C method call consumes the reference to ``self``, e.g. by
-attaching it to a supplied parameter.
-Additionally, parameters can have an annotation
-``__attribute__((ns_consumed))``, which specifies that passing an owned object
-as that parameter effectively transfers the ownership, and the caller is no
-longer responsible for it.
-These attributes affect code generation when interacting with ARC code, and
-they are used by the Clang Static Analyzer.
-
-In C programs using CoreFoundation, a similar set of attributes:
-``__attribute__((cf_returns_not_retained))``,
-``__attribute__((cf_returns_retained))`` and ``__attribute__((cf_consumed))``
-have the same respective semantics when applied to CoreFoundation objects.
-These attributes affect code generation when interacting with ARC code, and
-they are used by the Clang Static Analyzer.
-
-Finally, in C++ interacting with XNU kernel (objects inheriting from OSObject),
-the same attribute family is present:
-``__attribute__((os_returns_not_retained))``,
-``__attribute__((os_returns_retained))`` and ``__attribute__((os_consumed))``,
-with the same respective semantics.
-Similar to ``__attribute__((ns_consumes_self))``,
-``__attribute__((os_consumes_this))`` specifies that the method call consumes
-the reference to "this" (e.g., when attaching it to a different object supplied
-as a parameter).
-Out parameters (parameters the function is meant to write into,
-either via pointers-to-pointers or references-to-pointers)
-may be annotated with ``__attribute__((os_returns_retained))``
-or ``__attribute__((os_returns_not_retained))`` which specifies that the object
-written into the out parameter should (or respectively should not) be released
-after use.
-Since often out parameters may or may not be written depending on the exit
-code of the function,
-annotations ``__attribute__((os_returns_retained_on_zero))``
-and ``__attribute__((os_returns_retained_on_non_zero))`` specify that
-an out parameter at ``+1`` is written if and only if the function returns a zero
-(respectively non-zero) error code.
-Observe that return-code-dependent out parameter annotations are only
-available for retained out parameters, as non-retained object do not have to be
-released by the callee.
-These attributes are only used by the Clang Static Analyzer.
-
-The family of attributes ``X_returns_X_retained`` can be added to functions,
-C++ methods, and Objective-C methods and properties.
-Attributes ``X_consumed`` can be added to parameters of methods, functions,
-and Objective-C methods.
-
-
-cf_returns_retained
--------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``cf_returns_retained``","``clang::cf_returns_retained``","``clang::cf_returns_retained``","","","",""
-
-The behavior of a function with respect to reference counting for Foundation
-(Objective-C), CoreFoundation (C) and OSObject (C++) is determined by a naming
-convention (e.g. functions starting with "get" are assumed to return at
-``+0``).
-
-It can be overriden using a family of the following attributes.  In
-Objective-C, the annotation ``__attribute__((ns_returns_retained))`` applied to
-a function communicates that the object is returned at ``+1``, and the caller
-is responsible for freeing it.
-Similiarly, the annotation ``__attribute__((ns_returns_not_retained))``
-specifies that the object is returned at ``+0`` and the ownership remains with
-the callee.
-The annotation ``__attribute__((ns_consumes_self))`` specifies that
-the Objective-C method call consumes the reference to ``self``, e.g. by
-attaching it to a supplied parameter.
-Additionally, parameters can have an annotation
-``__attribute__((ns_consumed))``, which specifies that passing an owned object
-as that parameter effectively transfers the ownership, and the caller is no
-longer responsible for it.
-These attributes affect code generation when interacting with ARC code, and
-they are used by the Clang Static Analyzer.
-
-In C programs using CoreFoundation, a similar set of attributes:
-``__attribute__((cf_returns_not_retained))``,
-``__attribute__((cf_returns_retained))`` and ``__attribute__((cf_consumed))``
-have the same respective semantics when applied to CoreFoundation objects.
-These attributes affect code generation when interacting with ARC code, and
-they are used by the Clang Static Analyzer.
-
-Finally, in C++ interacting with XNU kernel (objects inheriting from OSObject),
-the same attribute family is present:
-``__attribute__((os_returns_not_retained))``,
-``__attribute__((os_returns_retained))`` and ``__attribute__((os_consumed))``,
-with the same respective semantics.
-Similar to ``__attribute__((ns_consumes_self))``,
-``__attribute__((os_consumes_this))`` specifies that the method call consumes
-the reference to "this" (e.g., when attaching it to a different object supplied
-as a parameter).
-Out parameters (parameters the function is meant to write into,
-either via pointers-to-pointers or references-to-pointers)
-may be annotated with ``__attribute__((os_returns_retained))``
-or ``__attribute__((os_returns_not_retained))`` which specifies that the object
-written into the out parameter should (or respectively should not) be released
-after use.
-Since often out parameters may or may not be written depending on the exit
-code of the function,
-annotations ``__attribute__((os_returns_retained_on_zero))``
-and ``__attribute__((os_returns_retained_on_non_zero))`` specify that
-an out parameter at ``+1`` is written if and only if the function returns a zero
-(respectively non-zero) error code.
-Observe that return-code-dependent out parameter annotations are only
-available for retained out parameters, as non-retained object do not have to be
-released by the callee.
-These attributes are only used by the Clang Static Analyzer.
-
-The family of attributes ``X_returns_X_retained`` can be added to functions,
-C++ methods, and Objective-C methods and properties.
-Attributes ``X_consumed`` can be added to parameters of methods, functions,
-and Objective-C methods.
-
-
-cfi_canonical_jump_table
-------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``cfi_canonical_jump_table``","``clang::cfi_canonical_jump_table``","``clang::cfi_canonical_jump_table``","","","","Yes"
-
-.. _langext-cfi_canonical_jump_table:
-
-Use ``__attribute__((cfi_canonical_jump_table))`` on a function declaration to
-make the function's CFI jump table canonical. See :ref:`the CFI documentation
-<cfi-canonical-jump-tables>` for more details.
-
-
-clang_arm_mve_alias
--------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``__clang_arm_mve_alias``","``clang::__clang_arm_mve_alias``","``clang::__clang_arm_mve_alias``","","","","Yes"
-
-This attribute is used in the implementation of the ACLE intrinsics
-for the Arm MVE instruction set. It allows the intrinsic functions to
-be declared using the names defined in ACLE, and still be recognized
-as clang builtins equivalent to the underlying name. For example,
-``arm_mve.h`` declares the function ``vaddq_u32`` with
-``__attribute__((__clang_arm_mve_alias(__builtin_arm_mve_vaddq_u32)))``,
-and similarly, one of the type-overloaded declarations of ``vaddq``
-will have the same attribute. This ensures that both functions are
-recognized as that clang builtin, and in the latter case, the choice
-of which builtin to identify the function as can be deferred until
-after overload resolution.
-
-This attribute can only be used to set up the aliases for the MVE
-intrinsic functions; it is intended for use only inside ``arm_mve.h``,
-and is not a general mechanism for declaring arbitrary aliases for
-clang builtin functions.
-
-
-code_seg
---------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "","","","``code_seg``","","",""
-
-The ``__declspec(code_seg)`` attribute enables the placement of code into separate
-named segments that can be paged or locked in memory individually. This attribute
-is used to control the placement of instantiated templates and compiler-generated
-code. See the documentation for `__declspec(code_seg)`_ on MSDN.
-
-.. _`__declspec(code_seg)`: http://msdn.microsoft.com/en-us/library/dn636922.aspx
-
-
-convergent
-----------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``convergent``","``clang::convergent``","``clang::convergent``","","","","Yes"
-
-The ``convergent`` attribute can be placed on a function declaration. It is
-translated into the LLVM ``convergent`` attribute, which indicates that the call
-instructions of a function with this attribute cannot be made control-dependent
-on any additional values.
-
-In languages designed for SPMD/SIMT programming model, e.g. OpenCL or CUDA,
-the call instructions of a function with this attribute must be executed by
-all work items or threads in a work group or sub group.
-
-This attribute is different from ``noduplicate`` because it allows duplicating
-function calls if it can be proved that the duplicated function calls are
-not made control-dependent on any additional values, e.g., unrolling a loop
-executed by all work items.
-
-Sample usage:
-.. code-block:: c
-
-  void convfunc(void) __attribute__((convergent));
-  // Setting it as a C++11 attribute is also valid in a C++ program.
-  // void convfunc(void) [[clang::convergent]];
-
-
-cpu_dispatch
-------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``cpu_dispatch``","``clang::cpu_dispatch``","``clang::cpu_dispatch``","``cpu_dispatch``","","","Yes"
-
-The ``cpu_specific`` and ``cpu_dispatch`` attributes are used to define and
-resolve multiversioned functions. This form of multiversioning provides a
-mechanism for declaring versions across translation units and manually
-specifying the resolved function list. A specified CPU defines a set of minimum
-features that are required for the function to be called. The result of this is
-that future processors execute the most restrictive version of the function the
-new processor can execute.
-
-Function versions are defined with ``cpu_specific``, which takes one or more CPU
-names as a parameter. For example:
-
-.. code-block:: c
-
-  // Declares and defines the ivybridge version of single_cpu.
-  __attribute__((cpu_specific(ivybridge)))
-  void single_cpu(void){}
-
-  // Declares and defines the atom version of single_cpu.
-  __attribute__((cpu_specific(atom)))
-  void single_cpu(void){}
-
-  // Declares and defines both the ivybridge and atom version of multi_cpu.
-  __attribute__((cpu_specific(ivybridge, atom)))
-  void multi_cpu(void){}
-
-A dispatching (or resolving) function can be declared anywhere in a project's
-source code with ``cpu_dispatch``. This attribute takes one or more CPU names
-as a parameter (like ``cpu_specific``). Functions marked with ``cpu_dispatch``
-are not expected to be defined, only declared. If such a marked function has a
-definition, any side effects of the function are ignored; trivial function
-bodies are permissible for ICC compatibility.
-
-.. code-block:: c
-
-  // Creates a resolver for single_cpu above.
-  __attribute__((cpu_dispatch(ivybridge, atom)))
-  void single_cpu(void){}
-
-  // Creates a resolver for multi_cpu, but adds a 3rd version defined in another
-  // translation unit.
-  __attribute__((cpu_dispatch(ivybridge, atom, sandybridge)))
-  void multi_cpu(void){}
-
-Note that it is possible to have a resolving function that dispatches based on
-more or fewer options than are present in the program. Specifying fewer will
-result in the omitted options not being considered during resolution. Specifying
-a version for resolution that isn't defined in the program will result in a
-linking failure.
-
-It is also possible to specify a CPU name of ``generic`` which will be resolved
-if the executing processor doesn't satisfy the features required in the CPU
-name. The behavior of a program executing on a processor that doesn't satisfy
-any option of a multiversioned function is undefined.
-
-
-cpu_specific
-------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``cpu_specific``","``clang::cpu_specific``","``clang::cpu_specific``","``cpu_specific``","","","Yes"
-
-The ``cpu_specific`` and ``cpu_dispatch`` attributes are used to define and
-resolve multiversioned functions. This form of multiversioning provides a
-mechanism for declaring versions across translation units and manually
-specifying the resolved function list. A specified CPU defines a set of minimum
-features that are required for the function to be called. The result of this is
-that future processors execute the most restrictive version of the function the
-new processor can execute.
-
-Function versions are defined with ``cpu_specific``, which takes one or more CPU
-names as a parameter. For example:
-
-.. code-block:: c
-
-  // Declares and defines the ivybridge version of single_cpu.
-  __attribute__((cpu_specific(ivybridge)))
-  void single_cpu(void){}
-
-  // Declares and defines the atom version of single_cpu.
-  __attribute__((cpu_specific(atom)))
-  void single_cpu(void){}
-
-  // Declares and defines both the ivybridge and atom version of multi_cpu.
-  __attribute__((cpu_specific(ivybridge, atom)))
-  void multi_cpu(void){}
-
-A dispatching (or resolving) function can be declared anywhere in a project's
-source code with ``cpu_dispatch``. This attribute takes one or more CPU names
-as a parameter (like ``cpu_specific``). Functions marked with ``cpu_dispatch``
-are not expected to be defined, only declared. If such a marked function has a
-definition, any side effects of the function are ignored; trivial function
-bodies are permissible for ICC compatibility.
-
-.. code-block:: c
-
-  // Creates a resolver for single_cpu above.
-  __attribute__((cpu_dispatch(ivybridge, atom)))
-  void single_cpu(void){}
-
-  // Creates a resolver for multi_cpu, but adds a 3rd version defined in another
-  // translation unit.
-  __attribute__((cpu_dispatch(ivybridge, atom, sandybridge)))
-  void multi_cpu(void){}
-
-Note that it is possible to have a resolving function that dispatches based on
-more or fewer options than are present in the program. Specifying fewer will
-result in the omitted options not being considered during resolution. Specifying
-a version for resolution that isn't defined in the program will result in a
-linking failure.
-
-It is also possible to specify a CPU name of ``generic`` which will be resolved
-if the executing processor doesn't satisfy the features required in the CPU
-name. The behavior of a program executing on a processor that doesn't satisfy
-any option of a multiversioned function is undefined.
-
-
-diagnose_if
------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``diagnose_if``","","","","","",""
-
-The ``diagnose_if`` attribute can be placed on function declarations to emit
-warnings or errors at compile-time if calls to the attributed function meet
-certain user-defined criteria. For example:
-
-.. code-block:: c
-
-  int abs(int a)
-    __attribute__((diagnose_if(a >= 0, "Redundant abs call", "warning")));
-  int must_abs(int a)
-    __attribute__((diagnose_if(a >= 0, "Redundant abs call", "error")));
-
-  int val = abs(1); // warning: Redundant abs call
-  int val2 = must_abs(1); // error: Redundant abs call
-  int val3 = abs(val);
-  int val4 = must_abs(val); // Because run-time checks are not emitted for
-                            // diagnose_if attributes, this executes without
-                            // issue.
-
-
-``diagnose_if`` is closely related to ``enable_if``, with a few key differences:
-
-* Overload resolution is not aware of ``diagnose_if`` attributes: they're
-  considered only after we select the best candidate from a given candidate set.
-* Function declarations that differ only in their ``diagnose_if`` attributes are
-  considered to be redeclarations of the same function (not overloads).
-* If the condition provided to ``diagnose_if`` cannot be evaluated, no
-  diagnostic will be emitted.
-
-Otherwise, ``diagnose_if`` is essentially the logical negation of ``enable_if``.
-
-As a result of bullet number two, ``diagnose_if`` attributes will stack on the
-same function. For example:
-
-.. code-block:: c
-
-  int foo() __attribute__((diagnose_if(1, "diag1", "warning")));
-  int foo() __attribute__((diagnose_if(1, "diag2", "warning")));
-
-  int bar = foo(); // warning: diag1
-                   // warning: diag2
-  int (*fooptr)(void) = foo; // warning: diag1
-                             // warning: diag2
-
-  constexpr int supportsAPILevel(int N) { return N < 5; }
-  int baz(int a)
-    __attribute__((diagnose_if(!supportsAPILevel(10),
-                               "Upgrade to API level 10 to use baz", "error")));
-  int baz(int a)
-    __attribute__((diagnose_if(!a, "0 is not recommended.", "warning")));
-
-  int (*bazptr)(int) = baz; // error: Upgrade to API level 10 to use baz
-  int v = baz(0); // error: Upgrade to API level 10 to use baz
-
-Query for this feature with ``__has_attribute(diagnose_if)``.
-
-
-disable_tail_calls
-------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``disable_tail_calls``","``clang::disable_tail_calls``","``clang::disable_tail_calls``","","","","Yes"
-
-The ``disable_tail_calls`` attribute instructs the backend to not perform tail call optimization inside the marked function.
-
-For example:
-
-  .. code-block:: c
-
-    int callee(int);
-
-    int foo(int a) __attribute__((disable_tail_calls)) {
-      return callee(a); // This call is not tail-call optimized.
-    }
-
-Marking virtual functions as ``disable_tail_calls`` is legal.
-
-  .. code-block:: c++
-
-    int callee(int);
-
-    class Base {
-    public:
-      [[clang::disable_tail_calls]] virtual int foo1() {
-        return callee(); // This call is not tail-call optimized.
-      }
-    };
-
-    class Derived1 : public Base {
-    public:
-      int foo1() override {
-        return callee(); // This call is tail-call optimized.
-      }
-    };
-
-
-enable_if
----------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``enable_if``","","","","","","Yes"
-
-.. Note:: Some features of this attribute are experimental. The meaning of
-  multiple enable_if attributes on a single declaration is subject to change in
-  a future version of clang. Also, the ABI is not standardized and the name
-  mangling may change in future versions. To avoid that, use asm labels.
-
-The ``enable_if`` attribute can be placed on function declarations to control
-which overload is selected based on the values of the function's arguments.
-When combined with the ``overloadable`` attribute, this feature is also
-available in C.
-
-.. code-block:: c++
-
-  int isdigit(int c);
-  int isdigit(int c) __attribute__((enable_if(c <= -1 || c > 255, "chosen when 'c' is out of range"))) __attribute__((unavailable("'c' must have the value of an unsigned char or EOF")));
-
-  void foo(char c) {
-    isdigit(c);
-    isdigit(10);
-    isdigit(-10);  // results in a compile-time error.
-  }
-
-The enable_if attribute takes two arguments, the first is an expression written
-in terms of the function parameters, the second is a string explaining why this
-overload candidate could not be selected to be displayed in diagnostics. The
-expression is part of the function signature for the purposes of determining
-whether it is a redeclaration (following the rules used when determining
-whether a C++ template specialization is ODR-equivalent), but is not part of
-the type.
-
-The enable_if expression is evaluated as if it were the body of a
-bool-returning constexpr function declared with the arguments of the function
-it is being applied to, then called with the parameters at the call site. If the
-result is false or could not be determined through constant expression
-evaluation, then this overload will not be chosen and the provided string may
-be used in a diagnostic if the compile fails as a result.
-
-Because the enable_if expression is an unevaluated context, there are no global
-state changes, nor the ability to pass information from the enable_if
-expression to the function body. For example, suppose we want calls to
-strnlen(strbuf, maxlen) to resolve to strnlen_chk(strbuf, maxlen, size of
-strbuf) only if the size of strbuf can be determined:
-
-.. code-block:: c++
-
-  __attribute__((always_inline))
-  static inline size_t strnlen(const char *s, size_t maxlen)
-    __attribute__((overloadable))
-    __attribute__((enable_if(__builtin_object_size(s, 0) != -1))),
-                             "chosen when the buffer size is known but 'maxlen' is not")))
-  {
-    return strnlen_chk(s, maxlen, __builtin_object_size(s, 0));
-  }
-
-Multiple enable_if attributes may be applied to a single declaration. In this
-case, the enable_if expressions are evaluated from left to right in the
-following manner. First, the candidates whose enable_if expressions evaluate to
-false or cannot be evaluated are discarded. If the remaining candidates do not
-share ODR-equivalent enable_if expressions, the overload resolution is
-ambiguous. Otherwise, enable_if overload resolution continues with the next
-enable_if attribute on the candidates that have not been discarded and have
-remaining enable_if attributes. In this way, we pick the most specific
-overload out of a number of viable overloads using enable_if.
-
-.. code-block:: c++
-
-  void f() __attribute__((enable_if(true, "")));  // #1
-  void f() __attribute__((enable_if(true, ""))) __attribute__((enable_if(true, "")));  // #2
-
-  void g(int i, int j) __attribute__((enable_if(i, "")));  // #1
-  void g(int i, int j) __attribute__((enable_if(j, ""))) __attribute__((enable_if(true)));  // #2
-
-In this example, a call to f() is always resolved to #2, as the first enable_if
-expression is ODR-equivalent for both declarations, but #1 does not have another
-enable_if expression to continue evaluating, so the next round of evaluation has
-only a single candidate. In a call to g(1, 1), the call is ambiguous even though
-#2 has more enable_if attributes, because the first enable_if expressions are
-not ODR-equivalent.
-
-Query for this feature with ``__has_attribute(enable_if)``.
-
-Note that functions with one or more ``enable_if`` attributes may not have
-their address taken, unless all of the conditions specified by said
-``enable_if`` are constants that evaluate to ``true``. For example:
-
-.. code-block:: c
-
-  const int TrueConstant = 1;
-  const int FalseConstant = 0;
-  int f(int a) __attribute__((enable_if(a > 0, "")));
-  int g(int a) __attribute__((enable_if(a == 0 || a != 0, "")));
-  int h(int a) __attribute__((enable_if(1, "")));
-  int i(int a) __attribute__((enable_if(TrueConstant, "")));
-  int j(int a) __attribute__((enable_if(FalseConstant, "")));
-
-  void fn() {
-    int (*ptr)(int);
-    ptr = &f; // error: 'a > 0' is not always true
-    ptr = &g; // error: 'a == 0 || a != 0' is not a truthy constant
-    ptr = &h; // OK: 1 is a truthy constant
-    ptr = &i; // OK: 'TrueConstant' is a truthy constant
-    ptr = &j; // error: 'FalseConstant' is a constant, but not truthy
-  }
-
-Because ``enable_if`` evaluation happens during overload resolution,
-``enable_if`` may give unintuitive results when used with templates, depending
-on when overloads are resolved. In the example below, clang will emit a
-diagnostic about no viable overloads for ``foo`` in ``bar``, but not in ``baz``:
-
-.. code-block:: c++
-
-  double foo(int i) __attribute__((enable_if(i > 0, "")));
-  void *foo(int i) __attribute__((enable_if(i <= 0, "")));
-  template <int I>
-  auto bar() { return foo(I); }
-
-  template <typename T>
-  auto baz() { return foo(T::number); }
-
-  struct WithNumber { constexpr static int number = 1; };
-  void callThem() {
-    bar<sizeof(WithNumber)>();
-    baz<WithNumber>();
-  }
-
-This is because, in ``bar``, ``foo`` is resolved prior to template
-instantiation, so the value for ``I`` isn't known (thus, both ``enable_if``
-conditions for ``foo`` fail). However, in ``baz``, ``foo`` is resolved during
-template instantiation, so the value for ``T::number`` is known.
-
-
-exclude_from_explicit_instantiation
------------------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``exclude_from_explicit_instantiation``","``clang::exclude_from_explicit_instantiation``","``clang::exclude_from_explicit_instantiation``","","","","Yes"
-
-The ``exclude_from_explicit_instantiation`` attribute opts-out a member of a
-class template from being part of explicit template instantiations of that
-class template. This means that an explicit instantiation will not instantiate
-members of the class template marked with the attribute, but also that code
-where an extern template declaration of the enclosing class template is visible
-will not take for granted that an external instantiation of the class template
-would provide those members (which would otherwise be a link error, since the
-explicit instantiation won't provide those members). For example, let's say we
-don't want the ``data()`` method to be part of libc++'s ABI. To make sure it
-is not exported from the dylib, we give it hidden visibility:
-
-  .. code-block:: c++
-
-    // in <string>
-    template <class CharT>
-    class basic_string {
-    public:
-      __attribute__((__visibility__("hidden")))
-      const value_type* data() const noexcept { ... }
-    };
-
-    template class basic_string<char>;
-
-Since an explicit template instantiation declaration for ``basic_string<char>``
-is provided, the compiler is free to assume that ``basic_string<char>::data()``
-will be provided by another translation unit, and it is free to produce an
-external call to this function. However, since ``data()`` has hidden visibility
-and the explicit template instantiation is provided in a shared library (as
-opposed to simply another translation unit), ``basic_string<char>::data()``
-won't be found and a link error will ensue. This happens because the compiler
-assumes that ``basic_string<char>::data()`` is part of the explicit template
-instantiation declaration, when it really isn't. To tell the compiler that
-``data()`` is not part of the explicit template instantiation declaration, the
-``exclude_from_explicit_instantiation`` attribute can be used:
-
-  .. code-block:: c++
-
-    // in <string>
-    template <class CharT>
-    class basic_string {
-    public:
-      __attribute__((__visibility__("hidden")))
-      __attribute__((exclude_from_explicit_instantiation))
-      const value_type* data() const noexcept { ... }
-    };
-
-    template class basic_string<char>;
-
-Now, the compiler won't assume that ``basic_string<char>::data()`` is provided
-externally despite there being an explicit template instantiation declaration:
-the compiler will implicitly instantiate ``basic_string<char>::data()`` in the
-TUs where it is used.
-
-This attribute can be used on static and non-static member functions of class
-templates, static data members of class templates and member classes of class
-templates.
-
-
-export_name
------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``export_name``","``clang::export_name``","``clang::export_name``","","","","Yes"
-
-Clang supports the ``__attribute__((export_name(<name>)))``
-attribute for the WebAssembly target. This attribute may be attached to a
-function declaration, where it modifies how the symbol is to be exported
-from the linked WebAssembly.
-
-WebAssembly functions are exported via string name. By default when a symbol
-is exported, the export name for C/C++ symbols are the same as their C/C++
-symbol names. This attribute can be used to override the default behavior, and
-request a specific string name be used instead.
-
-
-flatten
--------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``flatten``","``gnu::flatten``","","","","","Yes"
-
-The ``flatten`` attribute causes calls within the attributed function to
-be inlined unless it is impossible to do so, for example if the body of the
-callee is unavailable or if the callee has the ``noinline`` attribute.
-
-
-force_align_arg_pointer
------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``force_align_arg_pointer``","``gnu::force_align_arg_pointer``","","","","",""
-
-Use this attribute to force stack alignment.
-
-Legacy x86 code uses 4-byte stack alignment. Newer aligned SSE instructions
-(like 'movaps') that work with the stack require operands to be 16-byte aligned.
-This attribute realigns the stack in the function prologue to make sure the
-stack can be used with SSE instructions.
-
-Note that the x86_64 ABI forces 16-byte stack alignment at the call site.
-Because of this, 'force_align_arg_pointer' is not needed on x86_64, except in
-rare cases where the caller does not align the stack properly (e.g. flow
-jumps from i386 arch code).
-
-  .. code-block:: c
-
-    __attribute__ ((force_align_arg_pointer))
-    void f () {
-      ...
-    }
-
-
-format
-------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``format``","``gnu::format``","","","","",""
-
-Clang supports the ``format`` attribute, which indicates that the function
-accepts a ``printf`` or ``scanf``-like format string and corresponding
-arguments or a ``va_list`` that contains these arguments.
-
-Please see `GCC documentation about format attribute
-<http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html>`_ to find details
-about attribute syntax.
-
-Clang implements two kinds of checks with this attribute.
-
-#. Clang checks that the function with the ``format`` attribute is called with
-   a format string that uses format specifiers that are allowed, and that
-   arguments match the format string.  This is the ``-Wformat`` warning, it is
-   on by default.
-
-#. Clang checks that the format string argument is a literal string.  This is
-   the ``-Wformat-nonliteral`` warning, it is off by default.
-
-   Clang implements this mostly the same way as GCC, but there is a difference
-   for functions that accept a ``va_list`` argument (for example, ``vprintf``).
-   GCC does not emit ``-Wformat-nonliteral`` warning for calls to such
-   functions.  Clang does not warn if the format string comes from a function
-   parameter, where the function is annotated with a compatible attribute,
-   otherwise it warns.  For example:
-
-   .. code-block:: c
-
-     __attribute__((__format__ (__scanf__, 1, 3)))
-     void foo(const char* s, char *buf, ...) {
-       va_list ap;
-       va_start(ap, buf);
-
-       vprintf(s, ap); // warning: format string is not a string literal
-     }
-
-   In this case we warn because ``s`` contains a format string for a
-   ``scanf``-like function, but it is passed to a ``printf``-like function.
-
-   If the attribute is removed, clang still warns, because the format string is
-   not a string literal.
-
-   Another example:
-
-   .. code-block:: c
-
-     __attribute__((__format__ (__printf__, 1, 3)))
-     void foo(const char* s, char *buf, ...) {
-       va_list ap;
-       va_start(ap, buf);
-
-       vprintf(s, ap); // warning
-     }
-
-   In this case Clang does not warn because the format string ``s`` and
-   the corresponding arguments are annotated.  If the arguments are
-   incorrect, the caller of ``foo`` will receive a warning.
-
-
-gnu_inline
-----------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``gnu_inline``","``gnu::gnu_inline``","","","","","Yes"
-
-The ``gnu_inline`` changes the meaning of ``extern inline`` to use GNU inline
-semantics, meaning:
-
-* If any declaration that is declared ``inline`` is not declared ``extern``,
-  then the ``inline`` keyword is just a hint. In particular, an out-of-line
-  definition is still emitted for a function with external linkage, even if all
-  call sites are inlined, unlike in C99 and C++ inline semantics.
-
-* If all declarations that are declared ``inline`` are also declared
-  ``extern``, then the function body is present only for inlining and no
-  out-of-line version is emitted.
-
-Some important consequences: ``static inline`` emits an out-of-line
-version if needed, a plain ``inline`` definition emits an out-of-line version
-always, and an ``extern inline`` definition (in a header) followed by a
-(non-``extern``) ``inline`` declaration in a source file emits an out-of-line
-version of the function in that source file but provides the function body for
-inlining to all includers of the header.
-
-Either ``__GNUC_GNU_INLINE__`` (GNU inline semantics) or
-``__GNUC_STDC_INLINE__`` (C99 semantics) will be defined (they are mutually
-exclusive). If ``__GNUC_STDC_INLINE__`` is defined, then the ``gnu_inline``
-function attribute can be used to get GNU inline semantics on a per function
-basis. If ``__GNUC_GNU_INLINE__`` is defined, then the translation unit is
-already being compiled with GNU inline semantics as the implied default. It is
-unspecified which macro is defined in a C++ compilation.
-
-GNU inline semantics are the default behavior with ``-std=gnu89``,
-``-std=c89``, ``-std=c94``, or ``-fgnu89-inline``.
-
-
-guard
------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "","","","``guard``","","",""
-
-Code can indicate CFG checks are not wanted with the ``__declspec(guard(nocf))``
-attribute. This directs the compiler to not insert any CFG checks for the entire
-function. This approach is typically used only sparingly in specific situations 
-where the programmer has manually inserted "CFG-equivalent" protection. The 
-programmer knows that they are calling through some read-only function table 
-whose address is obtained through read-only memory references and for which the 
-index is masked to the function table limit. This approach may also be applied 
-to small wrapper functions that are not inlined and that do nothing more than 
-make a call through a function pointer. Since incorrect usage of this directive 
-can compromise the security of CFG, the programmer must be very careful using 
-the directive. Typically, this usage is limited to very small functions that 
-only call one function.
-
-`Control Flow Guard documentation <https://docs.microsoft.com/en-us/windows/win32/secbp/pe-metadata>`
-
-
-ifunc
------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``ifunc``","``gnu::ifunc``","","","","","Yes"
-
-``__attribute__((ifunc("resolver")))`` is used to mark that the address of a declaration should be resolved at runtime by calling a resolver function.
-
-The symbol name of the resolver function is given in quotes.  A function with this name (after mangling) must be defined in the current translation unit; it may be ``static``.  The resolver function should return a pointer.
-
-The ``ifunc`` attribute may only be used on a function declaration.  A function declaration with an ``ifunc`` attribute is considered to be a definition of the declared entity.  The entity must not have weak linkage; for example, in C++, it cannot be applied to a declaration if a definition at that location would be considered inline.
-
-Not all targets support this attribute. ELF target support depends on both the linker and runtime linker, and is available in at least lld 4.0 and later, binutils 2.20.1 and later, glibc v2.11.1 and later, and FreeBSD 9.1 and later. Non-ELF targets currently do not support this attribute.
-
-
-import_module
--------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``import_module``","``clang::import_module``","``clang::import_module``","","","","Yes"
-
-Clang supports the ``__attribute__((import_module(<module_name>)))``
-attribute for the WebAssembly target. This attribute may be attached to a
-function declaration, where it modifies how the symbol is to be imported
-within the WebAssembly linking environment.
-
-WebAssembly imports use a two-level namespace scheme, consisting of a module
-name, which typically identifies a module from which to import, and a field
-name, which typically identifies a field from that module to import. By
-default, module names for C/C++ symbols are assigned automatically by the
-linker. This attribute can be used to override the default behavior, and
-request a specific module name be used instead.
-
-
-import_name
------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``import_name``","``clang::import_name``","``clang::import_name``","","","","Yes"
-
-Clang supports the ``__attribute__((import_name(<name>)))``
-attribute for the WebAssembly target. This attribute may be attached to a
-function declaration, where it modifies how the symbol is to be imported
-within the WebAssembly linking environment.
-
-WebAssembly imports use a two-level namespace scheme, consisting of a module
-name, which typically identifies a module from which to import, and a field
-name, which typically identifies a field from that module to import. By
-default, field names for C/C++ symbols are the same as their C/C++ symbol
-names. This attribute can be used to override the default behavior, and
-request a specific field name be used instead.
-
-
-internal_linkage
-----------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``internal_linkage``","``clang::internal_linkage``","``clang::internal_linkage``","","","","Yes"
-
-The ``internal_linkage`` attribute changes the linkage type of the declaration to internal.
-This is similar to C-style ``static``, but can be used on classes and class methods. When applied to a class definition,
-this attribute affects all methods and static data members of that class.
-This can be used to contain the ABI of a C++ library by excluding unwanted class methods from the export tables.
-
-
-interrupt (ARM)
----------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``interrupt``","``gnu::interrupt``","","","","",""
-
-Clang supports the GNU style ``__attribute__((interrupt("TYPE")))`` attribute on
-ARM targets. This attribute may be attached to a function definition and
-instructs the backend to generate appropriate function entry/exit code so that
-it can be used directly as an interrupt service routine.
-
-The parameter passed to the interrupt attribute is optional, but if
-provided it must be a string literal with one of the following values: "IRQ",
-"FIQ", "SWI", "ABORT", "UNDEF".
-
-The semantics are as follows:
-
-- If the function is AAPCS, Clang instructs the backend to realign the stack to
-  8 bytes on entry. This is a general requirement of the AAPCS at public
-  interfaces, but may not hold when an exception is taken. Doing this allows
-  other AAPCS functions to be called.
-- If the CPU is M-class this is all that needs to be done since the architecture
-  itself is designed in such a way that functions obeying the normal AAPCS ABI
-  constraints are valid exception handlers.
-- If the CPU is not M-class, the prologue and epilogue are modified to save all
-  non-banked registers that are used, so that upon return the user-mode state
-  will not be corrupted. Note that to avoid unnecessary overhead, only
-  general-purpose (integer) registers are saved in this way. If VFP operations
-  are needed, that state must be saved manually.
-
-  Specifically, interrupt kinds other than "FIQ" will save all core registers
-  except "lr" and "sp". "FIQ" interrupts will save r0-r7.
-- If the CPU is not M-class, the return instruction is changed to one of the
-  canonical sequences permitted by the architecture for exception return. Where
-  possible the function itself will make the necessary "lr" adjustments so that
-  the "preferred return address" is selected.
-
-  Unfortunately the compiler is unable to make this guarantee for an "UNDEF"
-  handler, where the offset from "lr" to the preferred return address depends on
-  the execution state of the code which generated the exception. In this case
-  a sequence equivalent to "movs pc, lr" will be used.
-
-
-interrupt (AVR)
----------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``interrupt``","``gnu::interrupt``","","","","","Yes"
-
-Clang supports the GNU style ``__attribute__((interrupt))`` attribute on
-AVR targets. This attribute may be attached to a function definition and instructs
-the backend to generate appropriate function entry/exit code so that it can be used
-directly as an interrupt service routine.
-
-On the AVR, the hardware globally disables interrupts when an interrupt is executed.
-The first instruction of an interrupt handler declared with this attribute is a SEI
-instruction to re-enable interrupts. See also the signal attribute that
-does not insert a SEI instruction.
-
-
-interrupt (MIPS)
-----------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``interrupt``","``gnu::interrupt``","","","","","Yes"
-
-Clang supports the GNU style ``__attribute__((interrupt("ARGUMENT")))`` attribute on
-MIPS targets. This attribute may be attached to a function definition and instructs
-the backend to generate appropriate function entry/exit code so that it can be used
-directly as an interrupt service routine.
-
-By default, the compiler will produce a function prologue and epilogue suitable for
-an interrupt service routine that handles an External Interrupt Controller (eic)
-generated interrupt. This behaviour can be explicitly requested with the "eic"
-argument.
-
-Otherwise, for use with vectored interrupt mode, the argument passed should be
-of the form "vector=LEVEL" where LEVEL is one of the following values:
-"sw0", "sw1", "hw0", "hw1", "hw2", "hw3", "hw4", "hw5". The compiler will
-then set the interrupt mask to the corresponding level which will mask all
-interrupts up to and including the argument.
-
-The semantics are as follows:
-
-- The prologue is modified so that the Exception Program Counter (EPC) and
-  Status coprocessor registers are saved to the stack. The interrupt mask is
-  set so that the function can only be interrupted by a higher priority
-  interrupt. The epilogue will restore the previous values of EPC and Status.
-
-- The prologue and epilogue are modified to save and restore all non-kernel
-  registers as necessary.
-
-- The FPU is disabled in the prologue, as the floating pointer registers are not
-  spilled to the stack.
-
-- The function return sequence is changed to use an exception return instruction.
-
-- The parameter sets the interrupt mask for the function corresponding to the
-  interrupt level specified. If no mask is specified the interrupt mask
-  defaults to "eic".
-
-
-interrupt (RISCV)
------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``interrupt``","``gnu::interrupt``","","","","","Yes"
-
-Clang supports the GNU style ``__attribute__((interrupt))`` attribute on RISCV
-targets. This attribute may be attached to a function definition and instructs
-the backend to generate appropriate function entry/exit code so that it can be
-used directly as an interrupt service routine.
-
-Permissible values for this parameter are ``user``, ``supervisor``,
-and ``machine``. If there is no parameter, then it defaults to machine.
-
-Repeated interrupt attribute on the same declaration will cause a warning
-to be emitted. In case of repeated declarations, the last one prevails.
-
-Refer to:
-https://gcc.gnu.org/onlinedocs/gcc/RISC-V-Function-Attributes.html
-https://riscv.org/specifications/privileged-isa/
-The RISC-V Instruction Set Manual Volume II: Privileged Architecture
-Version 1.10.
-
-
-kernel
-------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``kernel``","","","","","","Yes"
-
-``__attribute__((kernel))`` is used to mark a ``kernel`` function in
-RenderScript.
-
-In RenderScript, ``kernel`` functions are used to express data-parallel
-computations.  The RenderScript runtime efficiently parallelizes ``kernel``
-functions to run on computational resources such as multi-core CPUs and GPUs.
-See the RenderScript_ documentation for more information.
-
-.. _RenderScript: https://developer.android.com/guide/topics/renderscript/compute.html
-
-
-lifetimebound
--------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``lifetimebound``","``clang::lifetimebound``","","","","",""
-
-The ``lifetimebound`` attribute indicates that a resource owned by
-a function parameter or implicit object parameter
-is retained by the return value of the annotated function
-(or, for a parameter of a constructor, in the value of the constructed object).
-It is only supported in C++.
-
-This attribute provides an experimental implementation of the facility
-described in the C++ committee paper `P0936R0 <http://wg21.link/p0936r0>`_,
-and is subject to change as the design of the corresponding functionality
-changes.
-
-
-long_call, far
---------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``long_call`` |br| ``far``","``gnu::long_call`` |br| ``gnu::far``","","","","","Yes"
-
-Clang supports the ``__attribute__((long_call))``, ``__attribute__((far))``,
-and ``__attribute__((near))`` attributes on MIPS targets. These attributes may
-only be added to function declarations and change the code generated
-by the compiler when directly calling the function. The ``near`` attribute
-allows calls to the function to be made using the ``jal`` instruction, which
-requires the function to be located in the same naturally aligned 256MB
-segment as the caller.  The ``long_call`` and ``far`` attributes are synonyms
-and require the use of a different call sequence that works regardless
-of the distance between the functions.
-
-These attributes have no effect for position-independent code.
-
-These attributes take priority over command line switches such
-as ``-mlong-calls`` and ``-mno-long-calls``.
-
-
-micromips
----------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``micromips``","``gnu::micromips``","","","","","Yes"
-
-Clang supports the GNU style ``__attribute__((micromips))`` and
-``__attribute__((nomicromips))`` attributes on MIPS targets. These attributes
-may be attached to a function definition and instructs the backend to generate
-or not to generate microMIPS code for that function.
-
-These attributes override the `-mmicromips` and `-mno-micromips` options
-on the command line.
-
-
-mig_server_routine
-------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``mig_server_routine``","``clang::mig_server_routine``","``clang::mig_server_routine``","","","","Yes"
-
-The Mach Interface Generator release-on-success convention dictates
-functions that follow it to only release arguments passed to them when they
-return "success" (a ``kern_return_t`` error code that indicates that
-no errors have occured). Otherwise the release is performed by the MIG client
-that called the function. The annotation ``__attribute__((mig_server_routine))``
-is applied in order to specify which functions are expected to follow the
-convention. This allows the Static Analyzer to find bugs caused by violations of
-that convention. The attribute would normally appear on the forward declaration
-of the actual server routine in the MIG server header, but it may also be
-added to arbitrary functions that need to follow the same convention - for
-example, a user can add them to auxiliary functions called by the server routine
-that have their return value of type ``kern_return_t`` unconditionally returned
-from the routine. The attribute can be applied to C++ methods, and in this case
-it will be automatically applied to overrides if the method is virtual. The
-attribute can also be written using C++11 syntax: ``[[mig::server_routine]]``.
-
-
-min_vector_width
-----------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``min_vector_width``","``clang::min_vector_width``","``clang::min_vector_width``","","","","Yes"
-
-Clang supports the ``__attribute__((min_vector_width(width)))`` attribute. This
-attribute may be attached to a function and informs the backend that this
-function desires vectors of at least this width to be generated. Target-specific
-maximum vector widths still apply. This means even if you ask for something
-larger than the target supports, you will only get what the target supports.
-This attribute is meant to be a hint to control target heuristics that may
-generate narrower vectors than what the target hardware supports.
-
-This is currently used by the X86 target to allow some CPUs that support 512-bit
-vectors to be limited to using 256-bit vectors to avoid frequency penalties.
-This is currently enabled with the ``-prefer-vector-width=256`` command line
-option. The ``min_vector_width`` attribute can be used to prevent the backend
-from trying to split vector operations to match the ``prefer-vector-width``. All
-X86 vector intrinsics from x86intrin.h already set this attribute. Additionally,
-use of any of the X86-specific vector builtins will implicitly set this
-attribute on the calling function. The intent is that explicitly writing vector
-code using the X86 intrinsics will prevent ``prefer-vector-width`` from
-affecting the code.
-
-
-no_builtin
-----------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``no_builtin``","``clang::no_builtin``","``clang::no_builtin``","","","","Yes"
-
-.. Note:: This attribute is not yet fully implemented, it is validated but has
-no effect on the generated code.
-
-The ``__attribute__((no_builtin))`` is similar to the ``-fno-builtin`` flag
-except it is specific to the body of a function. The attribute may also be
-applied to a virtual function but has no effect on the behavior of overriding
-functions in a derived class.
-
-It accepts one or more strings corresponding to the specific names of the
-builtins to disable (e.g. "memcpy", "memset").
-If the attribute is used without parameters it will disable all buitins at
-once.
-
-.. code-block:: c++
-
-  // The compiler is not allowed to add any builtin to foo's body.
-  void foo(char* data, size_t count) __attribute__((no_builtin)) {
-    // The compiler is not allowed to convert the loop into
-    // `__builtin_memset(data, 0xFE, count);`.
-    for (size_t i = 0; i < count; ++i)
-      data[i] = 0xFE;
-  }
-
-  // The compiler is not allowed to add the `memcpy` builtin to bar's body.
-  void bar(char* data, size_t count) __attribute__((no_builtin("memcpy"))) {
-    // The compiler is allowed to convert the loop into
-    // `__builtin_memset(data, 0xFE, count);` but cannot generate any
-    // `__builtin_memcpy`
-    for (size_t i = 0; i < count; ++i)
-      data[i] = 0xFE;
-  }
-
-
-no_caller_saved_registers
--------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``no_caller_saved_registers``","``gnu::no_caller_saved_registers``","","","","",""
-
-Use this attribute to indicate that the specified function has no
-caller-saved registers. That is, all registers are callee-saved except for
-registers used for passing parameters to the function or returning parameters
-from the function.
-The compiler saves and restores any modified registers that were not used for
-passing or returning arguments to the function.
-
-The user can call functions specified with the 'no_caller_saved_registers'
-attribute from an interrupt handler without saving and restoring all
-call-clobbered registers.
-
-Note that 'no_caller_saved_registers' attribute is not a calling convention.
-In fact, it only overrides the decision of which registers should be saved by
-the caller, but not how the parameters are passed from the caller to the callee.
-
-For example:
-
-  .. code-block:: c
-
-    __attribute__ ((no_caller_saved_registers, fastcall))
-    void f (int arg1, int arg2) {
-      ...
-    }
-
-  In this case parameters 'arg1' and 'arg2' will be passed in registers.
-  In this case, on 32-bit x86 targets, the function 'f' will use ECX and EDX as
-  register parameters. However, it will not assume any scratch registers and
-  should save and restore any modified registers except for ECX and EDX.
-
-
-no_sanitize
------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``no_sanitize``","``clang::no_sanitize``","``clang::no_sanitize``","","","","Yes"
-
-Use the ``no_sanitize`` attribute on a function or a global variable
-declaration to specify that a particular instrumentation or set of
-instrumentations should not be applied. The attribute takes a list of
-string literals, which have the same meaning as values accepted by the
-``-fno-sanitize=`` flag. For example,
-``__attribute__((no_sanitize("address", "thread")))`` specifies that
-AddressSanitizer and ThreadSanitizer should not be applied to the
-function or variable.
-
-See :ref:`Controlling Code Generation <controlling-code-generation>` for a
-full list of supported sanitizer flags.
-
-
-no_sanitize_address, no_address_safety_analysis
------------------------------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``no_address_safety_analysis`` |br| ``no_sanitize_address`` |br| ``no_sanitize_thread`` |br| ``no_sanitize_memory``","``gnu::no_address_safety_analysis`` |br| ``gnu::no_sanitize_address`` |br| ``gnu::no_sanitize_thread`` |br| ``clang::no_sanitize_memory``","``clang::no_sanitize_memory``","","","","Yes"
-
-.. _langext-address_sanitizer:
-
-Use ``__attribute__((no_sanitize_address))`` on a function or a global
-variable declaration to specify that address safety instrumentation
-(e.g. AddressSanitizer) should not be applied.
-
-
-no_sanitize_memory
-------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``no_address_safety_analysis`` |br| ``no_sanitize_address`` |br| ``no_sanitize_thread`` |br| ``no_sanitize_memory``","``gnu::no_address_safety_analysis`` |br| ``gnu::no_sanitize_address`` |br| ``gnu::no_sanitize_thread`` |br| ``clang::no_sanitize_memory``","``clang::no_sanitize_memory``","","","","Yes"
-
-.. _langext-memory_sanitizer:
-
-Use ``__attribute__((no_sanitize_memory))`` on a function declaration to
-specify that checks for uninitialized memory should not be inserted
-(e.g. by MemorySanitizer). The function may still be instrumented by the tool
-to avoid false positives in other places.
-
-
-no_sanitize_thread
-------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``no_address_safety_analysis`` |br| ``no_sanitize_address`` |br| ``no_sanitize_thread`` |br| ``no_sanitize_memory``","``gnu::no_address_safety_analysis`` |br| ``gnu::no_sanitize_address`` |br| ``gnu::no_sanitize_thread`` |br| ``clang::no_sanitize_memory``","``clang::no_sanitize_memory``","","","","Yes"
-
-.. _langext-thread_sanitizer:
-
-Use ``__attribute__((no_sanitize_thread))`` on a function declaration to
-specify that checks for data races on plain (non-atomic) memory accesses should
-not be inserted by ThreadSanitizer. The function is still instrumented by the
-tool to avoid false positives and provide meaningful stack traces.
-
-
-no_speculative_load_hardening
------------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``no_speculative_load_hardening``","``clang::no_speculative_load_hardening``","``clang::no_speculative_load_hardening``","","","","Yes"
-
-This attribute can be applied to a function declaration in order to indicate
-  that `Speculative Load Hardening <https://llvm.org/docs/SpeculativeLoadHardening.html>`_
-  is *not* needed for the function body. This can also be applied to a method
-  in Objective C. This attribute will take precedence over the command line flag in
-  the case where `-mspeculative-load-hardening <https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-mspeculative-load-hardening>`_ is specified.
-
-  Warning: This attribute may not prevent Speculative Load Hardening from being
-  enabled for a function which inlines a function that has the
-  'speculative_load_hardening' attribute. This is intended to provide a
-  maximally conservative model where the code that is marked with the
-  'speculative_load_hardening' attribute will always (even when inlined)
-  be hardened. A user of this attribute may want to mark functions called by
-  a function they do not want to be hardened with the 'noinline' attribute.
-
-  For example:
-
-  .. code-block:: c
-
-    __attribute__((speculative_load_hardening))
-    int foo(int i) {
-      return i;
-    }
-
-    // Note: bar() may still have speculative load hardening enabled if
-    // foo() is inlined into bar(). Mark foo() with __attribute__((noinline))
-    // to avoid this situation.
-    __attribute__((no_speculative_load_hardening))
-    int bar(int i) {
-      return foo(i);
-    }
-
-
-no_split_stack
---------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``no_split_stack``","``gnu::no_split_stack``","","","","","Yes"
-
-The ``no_split_stack`` attribute disables the emission of the split stack
-preamble for a particular function. It has no effect if ``-fsplit-stack``
-is not specified.
-
-
-no_stack_protector
-------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``no_stack_protector``","``clang::no_stack_protector``","``clang::no_stack_protector``","","","","Yes"
-
-Clang supports the ``__attribute__((no_stack_protector))`` attribute which disables
-the stack protector on the specified function. This attribute is useful for
-selectively disabling the stack protector on some functions when building with
-``-fstack-protector`` compiler option.
-
-For example, it disables the stack protector for the function ``foo`` but function
-``bar`` will still be built with the stack protector with the ``-fstack-protector``
-option.
-
-.. code-block:: c
-
-    int __attribute__((no_stack_protector))
-    foo (int x); // stack protection will be disabled for foo.
-
-    int bar(int y); // bar can be built with the stack protector.
-
-
-noalias
--------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "","","","``noalias``","","",""
-
-The ``noalias`` attribute indicates that the only memory accesses inside
-function are loads and stores from objects pointed to by its pointer-typed
-arguments, with arbitrary offsets.
-
-
-nocf_check
-----------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``nocf_check``","``gnu::nocf_check``","","","","","Yes"
-
-Jump Oriented Programming attacks rely on tampering with addresses used by
-indirect call / jmp, e.g. redirect control-flow to non-programmer
-intended bytes in the binary.
-X86 Supports Indirect Branch Tracking (IBT) as part of Control-Flow
-Enforcement Technology (CET). IBT instruments ENDBR instructions used to
-specify valid targets of indirect call / jmp.
-The ``nocf_check`` attribute has two roles:
-1. Appertains to a function - do not add ENDBR instruction at the beginning of
-the function.
-2. Appertains to a function pointer - do not track the target function of this
-pointer (by adding nocf_check prefix to the indirect-call instruction).
-
-
-nodiscard, warn_unused_result
------------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``warn_unused_result``","``nodiscard`` |br| ``clang::warn_unused_result`` |br| ``gnu::warn_unused_result``","``nodiscard``","","","","Yes"
-
-Clang supports the ability to diagnose when the results of a function call
-expression are discarded under suspicious circumstances. A diagnostic is
-generated when a function or its return type is marked with ``[[nodiscard]]``
-(or ``__attribute__((warn_unused_result))``) and the function call appears as a
-potentially-evaluated discarded-value expression that is not explicitly cast to
-`void`.
-
-A string literal may optionally be provided to the attribute, which will be
-reproduced in any resulting diagnostics. Redeclarations using different forms
-of the attribute (with or without the string literal or with different string
-literal contents) are allowed. If there are redeclarations of the entity with
-differing string literals, it is unspecified which one will be used by Clang
-in any resulting diagnostics.
-
-.. code-block: c++
-  struct [[nodiscard]] error_info { /*...*/ };
-  error_info enable_missile_safety_mode();
-
-  void launch_missiles();
-  void test_missiles() {
-    enable_missile_safety_mode(); // diagnoses
-    launch_missiles();
-  }
-  error_info &foo();
-  void f() { foo(); } // Does not diagnose, error_info is a reference.
-
-Additionally, discarded temporaries resulting from a call to a constructor
-marked with ``[[nodiscard]]`` or a constructor of a type marked
-``[[nodiscard]]`` will also diagnose. This also applies to type conversions that
-use the annotated ``[[nodiscard]]`` constructor or result in an annotated type.
-
-.. code-block: c++
-  struct [[nodiscard]] marked_type {/*..*/ };
-  struct marked_ctor {
-    [[nodiscard]] marked_ctor();
-    marked_ctor(int);
-  };
-
-  struct S {
-    operator marked_type() const;
-    [[nodiscard]] operator int() const;
-  };
-
-  void usages() {
-    marked_type(); // diagnoses.
-    marked_ctor(); // diagnoses.
-    marked_ctor(3); // Does not diagnose, int constructor isn't marked nodiscard.
-
-    S s;
-    static_cast<marked_type>(s); // diagnoses
-    (int)s; // diagnoses
-  }
-
-
-noduplicate
------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``noduplicate``","``clang::noduplicate``","``clang::noduplicate``","","","","Yes"
-
-The ``noduplicate`` attribute can be placed on function declarations to control
-whether function calls to this function can be duplicated or not as a result of
-optimizations. This is required for the implementation of functions with
-certain special requirements, like the OpenCL "barrier" function, that might
-need to be run concurrently by all the threads that are executing in lockstep
-on the hardware. For example this attribute applied on the function
-"nodupfunc" in the code below avoids that:
-
-.. code-block:: c
-
-  void nodupfunc() __attribute__((noduplicate));
-  // Setting it as a C++11 attribute is also valid
-  // void nodupfunc() [[clang::noduplicate]];
-  void foo();
-  void bar();
-
-  nodupfunc();
-  if (a > n) {
-    foo();
-  } else {
-    bar();
-  }
-
-gets possibly modified by some optimizations into code similar to this:
-
-.. code-block:: c
-
-  if (a > n) {
-    nodupfunc();
-    foo();
-  } else {
-    nodupfunc();
-    bar();
-  }
-
-where the call to "nodupfunc" is duplicated and sunk into the two branches
-of the condition.
-
-
-nomicromips
------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``nomicromips``","``gnu::nomicromips``","","","","","Yes"
-
-Clang supports the GNU style ``__attribute__((micromips))`` and
-``__attribute__((nomicromips))`` attributes on MIPS targets. These attributes
-may be attached to a function definition and instructs the backend to generate
-or not to generate microMIPS code for that function.
-
-These attributes override the `-mmicromips` and `-mno-micromips` options
-on the command line.
-
-
-noreturn
---------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "","``noreturn``","","","","","Yes"
-
-A function declared as ``[[noreturn]]`` shall not return to its caller. The
-compiler will generate a diagnostic for a function declared as ``[[noreturn]]``
-that appears to be capable of returning to its caller.
-
-
-not_tail_called
----------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``not_tail_called``","``clang::not_tail_called``","``clang::not_tail_called``","","","","Yes"
-
-The ``not_tail_called`` attribute prevents tail-call optimization on statically bound calls. It has no effect on indirect calls. Virtual functions, objective-c methods, and functions marked as ``always_inline`` cannot be marked as ``not_tail_called``.
-
-For example, it prevents tail-call optimization in the following case:
-
-  .. code-block:: c
-
-    int __attribute__((not_tail_called)) foo1(int);
-
-    int foo2(int a) {
-      return foo1(a); // No tail-call optimization on direct calls.
-    }
-
-However, it doesn't prevent tail-call optimization in this case:
-
-  .. code-block:: c
-
-    int __attribute__((not_tail_called)) foo1(int);
-
-    int foo2(int a) {
-      int (*fn)(int) = &foo1;
-
-      // not_tail_called has no effect on an indirect call even if the call can be
-      // resolved at compile time.
-      return (*fn)(a);
-    }
-
-Marking virtual functions as ``not_tail_called`` is an error:
-
-  .. code-block:: c++
-
-    class Base {
-    public:
-      // not_tail_called on a virtual function is an error.
-      [[clang::not_tail_called]] virtual int foo1();
-
-      virtual int foo2();
-
-      // Non-virtual functions can be marked ``not_tail_called``.
-      [[clang::not_tail_called]] int foo3();
-    };
-
-    class Derived1 : public Base {
-    public:
-      int foo1() override;
-
-      // not_tail_called on a virtual function is an error.
-      [[clang::not_tail_called]] int foo2() override;
-    };
-
-
-nothrow
--------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``nothrow``","``gnu::nothrow``","","``nothrow``","","","Yes"
-
-Clang supports the GNU style ``__attribute__((nothrow))`` and Microsoft style
-``__declspec(nothrow)`` attribute as an equivalent of `noexcept` on function
-declarations. This attribute informs the compiler that the annotated function
-does not throw an exception. This prevents exception-unwinding. This attribute
-is particularly useful on functions in the C Standard Library that are
-guaranteed to not throw an exception.
-
-
-ns_consumed
------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``ns_consumed``","``clang::ns_consumed``","``clang::ns_consumed``","","","","Yes"
-
-The behavior of a function with respect to reference counting for Foundation
-(Objective-C), CoreFoundation (C) and OSObject (C++) is determined by a naming
-convention (e.g. functions starting with "get" are assumed to return at
-``+0``).
-
-It can be overriden using a family of the following attributes.  In
-Objective-C, the annotation ``__attribute__((ns_returns_retained))`` applied to
-a function communicates that the object is returned at ``+1``, and the caller
-is responsible for freeing it.
-Similiarly, the annotation ``__attribute__((ns_returns_not_retained))``
-specifies that the object is returned at ``+0`` and the ownership remains with
-the callee.
-The annotation ``__attribute__((ns_consumes_self))`` specifies that
-the Objective-C method call consumes the reference to ``self``, e.g. by
-attaching it to a supplied parameter.
-Additionally, parameters can have an annotation
-``__attribute__((ns_consumed))``, which specifies that passing an owned object
-as that parameter effectively transfers the ownership, and the caller is no
-longer responsible for it.
-These attributes affect code generation when interacting with ARC code, and
-they are used by the Clang Static Analyzer.
-
-In C programs using CoreFoundation, a similar set of attributes:
-``__attribute__((cf_returns_not_retained))``,
-``__attribute__((cf_returns_retained))`` and ``__attribute__((cf_consumed))``
-have the same respective semantics when applied to CoreFoundation objects.
-These attributes affect code generation when interacting with ARC code, and
-they are used by the Clang Static Analyzer.
-
-Finally, in C++ interacting with XNU kernel (objects inheriting from OSObject),
-the same attribute family is present:
-``__attribute__((os_returns_not_retained))``,
-``__attribute__((os_returns_retained))`` and ``__attribute__((os_consumed))``,
-with the same respective semantics.
-Similar to ``__attribute__((ns_consumes_self))``,
-``__attribute__((os_consumes_this))`` specifies that the method call consumes
-the reference to "this" (e.g., when attaching it to a different object supplied
-as a parameter).
-Out parameters (parameters the function is meant to write into,
-either via pointers-to-pointers or references-to-pointers)
-may be annotated with ``__attribute__((os_returns_retained))``
-or ``__attribute__((os_returns_not_retained))`` which specifies that the object
-written into the out parameter should (or respectively should not) be released
-after use.
-Since often out parameters may or may not be written depending on the exit
-code of the function,
-annotations ``__attribute__((os_returns_retained_on_zero))``
-and ``__attribute__((os_returns_retained_on_non_zero))`` specify that
-an out parameter at ``+1`` is written if and only if the function returns a zero
-(respectively non-zero) error code.
-Observe that return-code-dependent out parameter annotations are only
-available for retained out parameters, as non-retained object do not have to be
-released by the callee.
-These attributes are only used by the Clang Static Analyzer.
-
-The family of attributes ``X_returns_X_retained`` can be added to functions,
-C++ methods, and Objective-C methods and properties.
-Attributes ``X_consumed`` can be added to parameters of methods, functions,
-and Objective-C methods.
-
-
-ns_consumes_self
-----------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``ns_consumes_self``","``clang::ns_consumes_self``","``clang::ns_consumes_self``","","","","Yes"
-
-The behavior of a function with respect to reference counting for Foundation
-(Objective-C), CoreFoundation (C) and OSObject (C++) is determined by a naming
-convention (e.g. functions starting with "get" are assumed to return at
-``+0``).
-
-It can be overriden using a family of the following attributes.  In
-Objective-C, the annotation ``__attribute__((ns_returns_retained))`` applied to
-a function communicates that the object is returned at ``+1``, and the caller
-is responsible for freeing it.
-Similiarly, the annotation ``__attribute__((ns_returns_not_retained))``
-specifies that the object is returned at ``+0`` and the ownership remains with
-the callee.
-The annotation ``__attribute__((ns_consumes_self))`` specifies that
-the Objective-C method call consumes the reference to ``self``, e.g. by
-attaching it to a supplied parameter.
-Additionally, parameters can have an annotation
-``__attribute__((ns_consumed))``, which specifies that passing an owned object
-as that parameter effectively transfers the ownership, and the caller is no
-longer responsible for it.
-These attributes affect code generation when interacting with ARC code, and
-they are used by the Clang Static Analyzer.
-
-In C programs using CoreFoundation, a similar set of attributes:
-``__attribute__((cf_returns_not_retained))``,
-``__attribute__((cf_returns_retained))`` and ``__attribute__((cf_consumed))``
-have the same respective semantics when applied to CoreFoundation objects.
-These attributes affect code generation when interacting with ARC code, and
-they are used by the Clang Static Analyzer.
-
-Finally, in C++ interacting with XNU kernel (objects inheriting from OSObject),
-the same attribute family is present:
-``__attribute__((os_returns_not_retained))``,
-``__attribute__((os_returns_retained))`` and ``__attribute__((os_consumed))``,
-with the same respective semantics.
-Similar to ``__attribute__((ns_consumes_self))``,
-``__attribute__((os_consumes_this))`` specifies that the method call consumes
-the reference to "this" (e.g., when attaching it to a different object supplied
-as a parameter).
-Out parameters (parameters the function is meant to write into,
-either via pointers-to-pointers or references-to-pointers)
-may be annotated with ``__attribute__((os_returns_retained))``
-or ``__attribute__((os_returns_not_retained))`` which specifies that the object
-written into the out parameter should (or respectively should not) be released
-after use.
-Since often out parameters may or may not be written depending on the exit
-code of the function,
-annotations ``__attribute__((os_returns_retained_on_zero))``
-and ``__attribute__((os_returns_retained_on_non_zero))`` specify that
-an out parameter at ``+1`` is written if and only if the function returns a zero
-(respectively non-zero) error code.
-Observe that return-code-dependent out parameter annotations are only
-available for retained out parameters, as non-retained object do not have to be
-released by the callee.
-These attributes are only used by the Clang Static Analyzer.
-
-The family of attributes ``X_returns_X_retained`` can be added to functions,
-C++ methods, and Objective-C methods and properties.
-Attributes ``X_consumed`` can be added to parameters of methods, functions,
-and Objective-C methods.
-
-
-ns_returns_autoreleased
------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``ns_returns_autoreleased``","``clang::ns_returns_autoreleased``","``clang::ns_returns_autoreleased``","","","",""
-
-The behavior of a function with respect to reference counting for Foundation
-(Objective-C), CoreFoundation (C) and OSObject (C++) is determined by a naming
-convention (e.g. functions starting with "get" are assumed to return at
-``+0``).
-
-It can be overriden using a family of the following attributes.  In
-Objective-C, the annotation ``__attribute__((ns_returns_retained))`` applied to
-a function communicates that the object is returned at ``+1``, and the caller
-is responsible for freeing it.
-Similiarly, the annotation ``__attribute__((ns_returns_not_retained))``
-specifies that the object is returned at ``+0`` and the ownership remains with
-the callee.
-The annotation ``__attribute__((ns_consumes_self))`` specifies that
-the Objective-C method call consumes the reference to ``self``, e.g. by
-attaching it to a supplied parameter.
-Additionally, parameters can have an annotation
-``__attribute__((ns_consumed))``, which specifies that passing an owned object
-as that parameter effectively transfers the ownership, and the caller is no
-longer responsible for it.
-These attributes affect code generation when interacting with ARC code, and
-they are used by the Clang Static Analyzer.
-
-In C programs using CoreFoundation, a similar set of attributes:
-``__attribute__((cf_returns_not_retained))``,
-``__attribute__((cf_returns_retained))`` and ``__attribute__((cf_consumed))``
-have the same respective semantics when applied to CoreFoundation objects.
-These attributes affect code generation when interacting with ARC code, and
-they are used by the Clang Static Analyzer.
-
-Finally, in C++ interacting with XNU kernel (objects inheriting from OSObject),
-the same attribute family is present:
-``__attribute__((os_returns_not_retained))``,
-``__attribute__((os_returns_retained))`` and ``__attribute__((os_consumed))``,
-with the same respective semantics.
-Similar to ``__attribute__((ns_consumes_self))``,
-``__attribute__((os_consumes_this))`` specifies that the method call consumes
-the reference to "this" (e.g., when attaching it to a different object supplied
-as a parameter).
-Out parameters (parameters the function is meant to write into,
-either via pointers-to-pointers or references-to-pointers)
-may be annotated with ``__attribute__((os_returns_retained))``
-or ``__attribute__((os_returns_not_retained))`` which specifies that the object
-written into the out parameter should (or respectively should not) be released
-after use.
-Since often out parameters may or may not be written depending on the exit
-code of the function,
-annotations ``__attribute__((os_returns_retained_on_zero))``
-and ``__attribute__((os_returns_retained_on_non_zero))`` specify that
-an out parameter at ``+1`` is written if and only if the function returns a zero
-(respectively non-zero) error code.
-Observe that return-code-dependent out parameter annotations are only
-available for retained out parameters, as non-retained object do not have to be
-released by the callee.
-These attributes are only used by the Clang Static Analyzer.
-
-The family of attributes ``X_returns_X_retained`` can be added to functions,
-C++ methods, and Objective-C methods and properties.
-Attributes ``X_consumed`` can be added to parameters of methods, functions,
-and Objective-C methods.
-
-
-ns_returns_not_retained
------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``ns_returns_not_retained``","``clang::ns_returns_not_retained``","``clang::ns_returns_not_retained``","","","",""
-
-The behavior of a function with respect to reference counting for Foundation
-(Objective-C), CoreFoundation (C) and OSObject (C++) is determined by a naming
-convention (e.g. functions starting with "get" are assumed to return at
-``+0``).
-
-It can be overriden using a family of the following attributes.  In
-Objective-C, the annotation ``__attribute__((ns_returns_retained))`` applied to
-a function communicates that the object is returned at ``+1``, and the caller
-is responsible for freeing it.
-Similiarly, the annotation ``__attribute__((ns_returns_not_retained))``
-specifies that the object is returned at ``+0`` and the ownership remains with
-the callee.
-The annotation ``__attribute__((ns_consumes_self))`` specifies that
-the Objective-C method call consumes the reference to ``self``, e.g. by
-attaching it to a supplied parameter.
-Additionally, parameters can have an annotation
-``__attribute__((ns_consumed))``, which specifies that passing an owned object
-as that parameter effectively transfers the ownership, and the caller is no
-longer responsible for it.
-These attributes affect code generation when interacting with ARC code, and
-they are used by the Clang Static Analyzer.
-
-In C programs using CoreFoundation, a similar set of attributes:
-``__attribute__((cf_returns_not_retained))``,
-``__attribute__((cf_returns_retained))`` and ``__attribute__((cf_consumed))``
-have the same respective semantics when applied to CoreFoundation objects.
-These attributes affect code generation when interacting with ARC code, and
-they are used by the Clang Static Analyzer.
-
-Finally, in C++ interacting with XNU kernel (objects inheriting from OSObject),
-the same attribute family is present:
-``__attribute__((os_returns_not_retained))``,
-``__attribute__((os_returns_retained))`` and ``__attribute__((os_consumed))``,
-with the same respective semantics.
-Similar to ``__attribute__((ns_consumes_self))``,
-``__attribute__((os_consumes_this))`` specifies that the method call consumes
-the reference to "this" (e.g., when attaching it to a different object supplied
-as a parameter).
-Out parameters (parameters the function is meant to write into,
-either via pointers-to-pointers or references-to-pointers)
-may be annotated with ``__attribute__((os_returns_retained))``
-or ``__attribute__((os_returns_not_retained))`` which specifies that the object
-written into the out parameter should (or respectively should not) be released
-after use.
-Since often out parameters may or may not be written depending on the exit
-code of the function,
-annotations ``__attribute__((os_returns_retained_on_zero))``
-and ``__attribute__((os_returns_retained_on_non_zero))`` specify that
-an out parameter at ``+1`` is written if and only if the function returns a zero
-(respectively non-zero) error code.
-Observe that return-code-dependent out parameter annotations are only
-available for retained out parameters, as non-retained object do not have to be
-released by the callee.
-These attributes are only used by the Clang Static Analyzer.
-
-The family of attributes ``X_returns_X_retained`` can be added to functions,
-C++ methods, and Objective-C methods and properties.
-Attributes ``X_consumed`` can be added to parameters of methods, functions,
-and Objective-C methods.
-
-
-ns_returns_retained
--------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``ns_returns_retained``","``clang::ns_returns_retained``","``clang::ns_returns_retained``","","","",""
-
-The behavior of a function with respect to reference counting for Foundation
-(Objective-C), CoreFoundation (C) and OSObject (C++) is determined by a naming
-convention (e.g. functions starting with "get" are assumed to return at
-``+0``).
-
-It can be overriden using a family of the following attributes.  In
-Objective-C, the annotation ``__attribute__((ns_returns_retained))`` applied to
-a function communicates that the object is returned at ``+1``, and the caller
-is responsible for freeing it.
-Similiarly, the annotation ``__attribute__((ns_returns_not_retained))``
-specifies that the object is returned at ``+0`` and the ownership remains with
-the callee.
-The annotation ``__attribute__((ns_consumes_self))`` specifies that
-the Objective-C method call consumes the reference to ``self``, e.g. by
-attaching it to a supplied parameter.
-Additionally, parameters can have an annotation
-``__attribute__((ns_consumed))``, which specifies that passing an owned object
-as that parameter effectively transfers the ownership, and the caller is no
-longer responsible for it.
-These attributes affect code generation when interacting with ARC code, and
-they are used by the Clang Static Analyzer.
-
-In C programs using CoreFoundation, a similar set of attributes:
-``__attribute__((cf_returns_not_retained))``,
-``__attribute__((cf_returns_retained))`` and ``__attribute__((cf_consumed))``
-have the same respective semantics when applied to CoreFoundation objects.
-These attributes affect code generation when interacting with ARC code, and
-they are used by the Clang Static Analyzer.
-
-Finally, in C++ interacting with XNU kernel (objects inheriting from OSObject),
-the same attribute family is present:
-``__attribute__((os_returns_not_retained))``,
-``__attribute__((os_returns_retained))`` and ``__attribute__((os_consumed))``,
-with the same respective semantics.
-Similar to ``__attribute__((ns_consumes_self))``,
-``__attribute__((os_consumes_this))`` specifies that the method call consumes
-the reference to "this" (e.g., when attaching it to a different object supplied
-as a parameter).
-Out parameters (parameters the function is meant to write into,
-either via pointers-to-pointers or references-to-pointers)
-may be annotated with ``__attribute__((os_returns_retained))``
-or ``__attribute__((os_returns_not_retained))`` which specifies that the object
-written into the out parameter should (or respectively should not) be released
-after use.
-Since often out parameters may or may not be written depending on the exit
-code of the function,
-annotations ``__attribute__((os_returns_retained_on_zero))``
-and ``__attribute__((os_returns_retained_on_non_zero))`` specify that
-an out parameter at ``+1`` is written if and only if the function returns a zero
-(respectively non-zero) error code.
-Observe that return-code-dependent out parameter annotations are only
-available for retained out parameters, as non-retained object do not have to be
-released by the callee.
-These attributes are only used by the Clang Static Analyzer.
-
-The family of attributes ``X_returns_X_retained`` can be added to functions,
-C++ methods, and Objective-C methods and properties.
-Attributes ``X_consumed`` can be added to parameters of methods, functions,
-and Objective-C methods.
-
-
-objc_method_family
-------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``objc_method_family``","``clang::objc_method_family``","``clang::objc_method_family``","","","","Yes"
-
-Many methods in Objective-C have conventional meanings determined by their
-selectors. It is sometimes useful to be able to mark a method as having a
-particular conventional meaning despite not having the right selector, or as
-not having the conventional meaning that its selector would suggest. For these
-use cases, we provide an attribute to specifically describe the "method family"
-that a method belongs to.
-
-**Usage**: ``__attribute__((objc_method_family(X)))``, where ``X`` is one of
-``none``, ``alloc``, ``copy``, ``init``, ``mutableCopy``, or ``new``.  This
-attribute can only be placed at the end of a method declaration:
-
-.. code-block:: objc
-
-  - (NSString *)initMyStringValue __attribute__((objc_method_family(none)));
-
-Users who do not wish to change the conventional meaning of a method, and who
-merely want to document its non-standard retain and release semantics, should
-use the retaining behavior attributes (``ns_returns_retained``,
-``ns_returns_not_retained``, etc).
-
-Query for this feature with ``__has_attribute(objc_method_family)``.
-
-
-objc_requires_super
--------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``objc_requires_super``","``clang::objc_requires_super``","``clang::objc_requires_super``","","","","Yes"
-
-Some Objective-C classes allow a subclass to override a particular method in a
-parent class but expect that the overriding method also calls the overridden
-method in the parent class. For these cases, we provide an attribute to
-designate that a method requires a "call to ``super``" in the overriding
-method in the subclass.
-
-**Usage**: ``__attribute__((objc_requires_super))``.  This attribute can only
-be placed at the end of a method declaration:
-
-.. code-block:: objc
-
-  - (void)foo __attribute__((objc_requires_super));
-
-This attribute can only be applied the method declarations within a class, and
-not a protocol.  Currently this attribute does not enforce any placement of
-where the call occurs in the overriding method (such as in the case of
-``-dealloc`` where the call must appear at the end).  It checks only that it
-exists.
-
-Note that on both OS X and iOS that the Foundation framework provides a
-convenience macro ``NS_REQUIRES_SUPER`` that provides syntactic sugar for this
-attribute:
-
-.. code-block:: objc
-
-  - (void)foo NS_REQUIRES_SUPER;
-
-This macro is conditionally defined depending on the compiler's support for
-this attribute.  If the compiler does not support the attribute the macro
-expands to nothing.
-
-Operationally, when a method has this annotation the compiler will warn if the
-implementation of an override in a subclass does not call super.  For example:
-
-.. code-block:: objc
-
-   warning: method possibly missing a [super AnnotMeth] call
-   - (void) AnnotMeth{};
-                      ^
-
-
-optnone
--------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``optnone``","``clang::optnone``","``clang::optnone``","","","","Yes"
-
-The ``optnone`` attribute suppresses essentially all optimizations
-on a function or method, regardless of the optimization level applied to
-the compilation unit as a whole.  This is particularly useful when you
-need to debug a particular function, but it is infeasible to build the
-entire application without optimization.  Avoiding optimization on the
-specified function can improve the quality of the debugging information
-for that function.
-
-This attribute is incompatible with the ``always_inline`` and ``minsize``
-attributes.
-
-
-os_consumed
------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``os_consumed``","``clang::os_consumed``","``clang::os_consumed``","","","","Yes"
-
-The behavior of a function with respect to reference counting for Foundation
-(Objective-C), CoreFoundation (C) and OSObject (C++) is determined by a naming
-convention (e.g. functions starting with "get" are assumed to return at
-``+0``).
-
-It can be overriden using a family of the following attributes.  In
-Objective-C, the annotation ``__attribute__((ns_returns_retained))`` applied to
-a function communicates that the object is returned at ``+1``, and the caller
-is responsible for freeing it.
-Similiarly, the annotation ``__attribute__((ns_returns_not_retained))``
-specifies that the object is returned at ``+0`` and the ownership remains with
-the callee.
-The annotation ``__attribute__((ns_consumes_self))`` specifies that
-the Objective-C method call consumes the reference to ``self``, e.g. by
-attaching it to a supplied parameter.
-Additionally, parameters can have an annotation
-``__attribute__((ns_consumed))``, which specifies that passing an owned object
-as that parameter effectively transfers the ownership, and the caller is no
-longer responsible for it.
-These attributes affect code generation when interacting with ARC code, and
-they are used by the Clang Static Analyzer.
-
-In C programs using CoreFoundation, a similar set of attributes:
-``__attribute__((cf_returns_not_retained))``,
-``__attribute__((cf_returns_retained))`` and ``__attribute__((cf_consumed))``
-have the same respective semantics when applied to CoreFoundation objects.
-These attributes affect code generation when interacting with ARC code, and
-they are used by the Clang Static Analyzer.
-
-Finally, in C++ interacting with XNU kernel (objects inheriting from OSObject),
-the same attribute family is present:
-``__attribute__((os_returns_not_retained))``,
-``__attribute__((os_returns_retained))`` and ``__attribute__((os_consumed))``,
-with the same respective semantics.
-Similar to ``__attribute__((ns_consumes_self))``,
-``__attribute__((os_consumes_this))`` specifies that the method call consumes
-the reference to "this" (e.g., when attaching it to a different object supplied
-as a parameter).
-Out parameters (parameters the function is meant to write into,
-either via pointers-to-pointers or references-to-pointers)
-may be annotated with ``__attribute__((os_returns_retained))``
-or ``__attribute__((os_returns_not_retained))`` which specifies that the object
-written into the out parameter should (or respectively should not) be released
-after use.
-Since often out parameters may or may not be written depending on the exit
-code of the function,
-annotations ``__attribute__((os_returns_retained_on_zero))``
-and ``__attribute__((os_returns_retained_on_non_zero))`` specify that
-an out parameter at ``+1`` is written if and only if the function returns a zero
-(respectively non-zero) error code.
-Observe that return-code-dependent out parameter annotations are only
-available for retained out parameters, as non-retained object do not have to be
-released by the callee.
-These attributes are only used by the Clang Static Analyzer.
-
-The family of attributes ``X_returns_X_retained`` can be added to functions,
-C++ methods, and Objective-C methods and properties.
-Attributes ``X_consumed`` can be added to parameters of methods, functions,
-and Objective-C methods.
-
-
-os_consumes_this
-----------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``os_consumes_this``","``clang::os_consumes_this``","``clang::os_consumes_this``","","","",""
-
-The behavior of a function with respect to reference counting for Foundation
-(Objective-C), CoreFoundation (C) and OSObject (C++) is determined by a naming
-convention (e.g. functions starting with "get" are assumed to return at
-``+0``).
-
-It can be overriden using a family of the following attributes.  In
-Objective-C, the annotation ``__attribute__((ns_returns_retained))`` applied to
-a function communicates that the object is returned at ``+1``, and the caller
-is responsible for freeing it.
-Similiarly, the annotation ``__attribute__((ns_returns_not_retained))``
-specifies that the object is returned at ``+0`` and the ownership remains with
-the callee.
-The annotation ``__attribute__((ns_consumes_self))`` specifies that
-the Objective-C method call consumes the reference to ``self``, e.g. by
-attaching it to a supplied parameter.
-Additionally, parameters can have an annotation
-``__attribute__((ns_consumed))``, which specifies that passing an owned object
-as that parameter effectively transfers the ownership, and the caller is no
-longer responsible for it.
-These attributes affect code generation when interacting with ARC code, and
-they are used by the Clang Static Analyzer.
-
-In C programs using CoreFoundation, a similar set of attributes:
-``__attribute__((cf_returns_not_retained))``,
-``__attribute__((cf_returns_retained))`` and ``__attribute__((cf_consumed))``
-have the same respective semantics when applied to CoreFoundation objects.
-These attributes affect code generation when interacting with ARC code, and
-they are used by the Clang Static Analyzer.
-
-Finally, in C++ interacting with XNU kernel (objects inheriting from OSObject),
-the same attribute family is present:
-``__attribute__((os_returns_not_retained))``,
-``__attribute__((os_returns_retained))`` and ``__attribute__((os_consumed))``,
-with the same respective semantics.
-Similar to ``__attribute__((ns_consumes_self))``,
-``__attribute__((os_consumes_this))`` specifies that the method call consumes
-the reference to "this" (e.g., when attaching it to a different object supplied
-as a parameter).
-Out parameters (parameters the function is meant to write into,
-either via pointers-to-pointers or references-to-pointers)
-may be annotated with ``__attribute__((os_returns_retained))``
-or ``__attribute__((os_returns_not_retained))`` which specifies that the object
-written into the out parameter should (or respectively should not) be released
-after use.
-Since often out parameters may or may not be written depending on the exit
-code of the function,
-annotations ``__attribute__((os_returns_retained_on_zero))``
-and ``__attribute__((os_returns_retained_on_non_zero))`` specify that
-an out parameter at ``+1`` is written if and only if the function returns a zero
-(respectively non-zero) error code.
-Observe that return-code-dependent out parameter annotations are only
-available for retained out parameters, as non-retained object do not have to be
-released by the callee.
-These attributes are only used by the Clang Static Analyzer.
-
-The family of attributes ``X_returns_X_retained`` can be added to functions,
-C++ methods, and Objective-C methods and properties.
-Attributes ``X_consumed`` can be added to parameters of methods, functions,
-and Objective-C methods.
-
-
-os_returns_not_retained
------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``os_returns_not_retained``","``clang::os_returns_not_retained``","``clang::os_returns_not_retained``","","","","Yes"
-
-The behavior of a function with respect to reference counting for Foundation
-(Objective-C), CoreFoundation (C) and OSObject (C++) is determined by a naming
-convention (e.g. functions starting with "get" are assumed to return at
-``+0``).
-
-It can be overriden using a family of the following attributes.  In
-Objective-C, the annotation ``__attribute__((ns_returns_retained))`` applied to
-a function communicates that the object is returned at ``+1``, and the caller
-is responsible for freeing it.
-Similiarly, the annotation ``__attribute__((ns_returns_not_retained))``
-specifies that the object is returned at ``+0`` and the ownership remains with
-the callee.
-The annotation ``__attribute__((ns_consumes_self))`` specifies that
-the Objective-C method call consumes the reference to ``self``, e.g. by
-attaching it to a supplied parameter.
-Additionally, parameters can have an annotation
-``__attribute__((ns_consumed))``, which specifies that passing an owned object
-as that parameter effectively transfers the ownership, and the caller is no
-longer responsible for it.
-These attributes affect code generation when interacting with ARC code, and
-they are used by the Clang Static Analyzer.
-
-In C programs using CoreFoundation, a similar set of attributes:
-``__attribute__((cf_returns_not_retained))``,
-``__attribute__((cf_returns_retained))`` and ``__attribute__((cf_consumed))``
-have the same respective semantics when applied to CoreFoundation objects.
-These attributes affect code generation when interacting with ARC code, and
-they are used by the Clang Static Analyzer.
-
-Finally, in C++ interacting with XNU kernel (objects inheriting from OSObject),
-the same attribute family is present:
-``__attribute__((os_returns_not_retained))``,
-``__attribute__((os_returns_retained))`` and ``__attribute__((os_consumed))``,
-with the same respective semantics.
-Similar to ``__attribute__((ns_consumes_self))``,
-``__attribute__((os_consumes_this))`` specifies that the method call consumes
-the reference to "this" (e.g., when attaching it to a different object supplied
-as a parameter).
-Out parameters (parameters the function is meant to write into,
-either via pointers-to-pointers or references-to-pointers)
-may be annotated with ``__attribute__((os_returns_retained))``
-or ``__attribute__((os_returns_not_retained))`` which specifies that the object
-written into the out parameter should (or respectively should not) be released
-after use.
-Since often out parameters may or may not be written depending on the exit
-code of the function,
-annotations ``__attribute__((os_returns_retained_on_zero))``
-and ``__attribute__((os_returns_retained_on_non_zero))`` specify that
-an out parameter at ``+1`` is written if and only if the function returns a zero
-(respectively non-zero) error code.
-Observe that return-code-dependent out parameter annotations are only
-available for retained out parameters, as non-retained object do not have to be
-released by the callee.
-These attributes are only used by the Clang Static Analyzer.
-
-The family of attributes ``X_returns_X_retained`` can be added to functions,
-C++ methods, and Objective-C methods and properties.
-Attributes ``X_consumed`` can be added to parameters of methods, functions,
-and Objective-C methods.
-
-
-os_returns_retained
--------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``os_returns_retained``","``clang::os_returns_retained``","``clang::os_returns_retained``","","","","Yes"
-
-The behavior of a function with respect to reference counting for Foundation
-(Objective-C), CoreFoundation (C) and OSObject (C++) is determined by a naming
-convention (e.g. functions starting with "get" are assumed to return at
-``+0``).
-
-It can be overriden using a family of the following attributes.  In
-Objective-C, the annotation ``__attribute__((ns_returns_retained))`` applied to
-a function communicates that the object is returned at ``+1``, and the caller
-is responsible for freeing it.
-Similiarly, the annotation ``__attribute__((ns_returns_not_retained))``
-specifies that the object is returned at ``+0`` and the ownership remains with
-the callee.
-The annotation ``__attribute__((ns_consumes_self))`` specifies that
-the Objective-C method call consumes the reference to ``self``, e.g. by
-attaching it to a supplied parameter.
-Additionally, parameters can have an annotation
-``__attribute__((ns_consumed))``, which specifies that passing an owned object
-as that parameter effectively transfers the ownership, and the caller is no
-longer responsible for it.
-These attributes affect code generation when interacting with ARC code, and
-they are used by the Clang Static Analyzer.
-
-In C programs using CoreFoundation, a similar set of attributes:
-``__attribute__((cf_returns_not_retained))``,
-``__attribute__((cf_returns_retained))`` and ``__attribute__((cf_consumed))``
-have the same respective semantics when applied to CoreFoundation objects.
-These attributes affect code generation when interacting with ARC code, and
-they are used by the Clang Static Analyzer.
-
-Finally, in C++ interacting with XNU kernel (objects inheriting from OSObject),
-the same attribute family is present:
-``__attribute__((os_returns_not_retained))``,
-``__attribute__((os_returns_retained))`` and ``__attribute__((os_consumed))``,
-with the same respective semantics.
-Similar to ``__attribute__((ns_consumes_self))``,
-``__attribute__((os_consumes_this))`` specifies that the method call consumes
-the reference to "this" (e.g., when attaching it to a different object supplied
-as a parameter).
-Out parameters (parameters the function is meant to write into,
-either via pointers-to-pointers or references-to-pointers)
-may be annotated with ``__attribute__((os_returns_retained))``
-or ``__attribute__((os_returns_not_retained))`` which specifies that the object
-written into the out parameter should (or respectively should not) be released
-after use.
-Since often out parameters may or may not be written depending on the exit
-code of the function,
-annotations ``__attribute__((os_returns_retained_on_zero))``
-and ``__attribute__((os_returns_retained_on_non_zero))`` specify that
-an out parameter at ``+1`` is written if and only if the function returns a zero
-(respectively non-zero) error code.
-Observe that return-code-dependent out parameter annotations are only
-available for retained out parameters, as non-retained object do not have to be
-released by the callee.
-These attributes are only used by the Clang Static Analyzer.
-
-The family of attributes ``X_returns_X_retained`` can be added to functions,
-C++ methods, and Objective-C methods and properties.
-Attributes ``X_consumed`` can be added to parameters of methods, functions,
-and Objective-C methods.
-
-
-os_returns_retained_on_non_zero
--------------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``os_returns_retained_on_non_zero``","``clang::os_returns_retained_on_non_zero``","``clang::os_returns_retained_on_non_zero``","","","","Yes"
-
-The behavior of a function with respect to reference counting for Foundation
-(Objective-C), CoreFoundation (C) and OSObject (C++) is determined by a naming
-convention (e.g. functions starting with "get" are assumed to return at
-``+0``).
-
-It can be overriden using a family of the following attributes.  In
-Objective-C, the annotation ``__attribute__((ns_returns_retained))`` applied to
-a function communicates that the object is returned at ``+1``, and the caller
-is responsible for freeing it.
-Similiarly, the annotation ``__attribute__((ns_returns_not_retained))``
-specifies that the object is returned at ``+0`` and the ownership remains with
-the callee.
-The annotation ``__attribute__((ns_consumes_self))`` specifies that
-the Objective-C method call consumes the reference to ``self``, e.g. by
-attaching it to a supplied parameter.
-Additionally, parameters can have an annotation
-``__attribute__((ns_consumed))``, which specifies that passing an owned object
-as that parameter effectively transfers the ownership, and the caller is no
-longer responsible for it.
-These attributes affect code generation when interacting with ARC code, and
-they are used by the Clang Static Analyzer.
-
-In C programs using CoreFoundation, a similar set of attributes:
-``__attribute__((cf_returns_not_retained))``,
-``__attribute__((cf_returns_retained))`` and ``__attribute__((cf_consumed))``
-have the same respective semantics when applied to CoreFoundation objects.
-These attributes affect code generation when interacting with ARC code, and
-they are used by the Clang Static Analyzer.
-
-Finally, in C++ interacting with XNU kernel (objects inheriting from OSObject),
-the same attribute family is present:
-``__attribute__((os_returns_not_retained))``,
-``__attribute__((os_returns_retained))`` and ``__attribute__((os_consumed))``,
-with the same respective semantics.
-Similar to ``__attribute__((ns_consumes_self))``,
-``__attribute__((os_consumes_this))`` specifies that the method call consumes
-the reference to "this" (e.g., when attaching it to a different object supplied
-as a parameter).
-Out parameters (parameters the function is meant to write into,
-either via pointers-to-pointers or references-to-pointers)
-may be annotated with ``__attribute__((os_returns_retained))``
-or ``__attribute__((os_returns_not_retained))`` which specifies that the object
-written into the out parameter should (or respectively should not) be released
-after use.
-Since often out parameters may or may not be written depending on the exit
-code of the function,
-annotations ``__attribute__((os_returns_retained_on_zero))``
-and ``__attribute__((os_returns_retained_on_non_zero))`` specify that
-an out parameter at ``+1`` is written if and only if the function returns a zero
-(respectively non-zero) error code.
-Observe that return-code-dependent out parameter annotations are only
-available for retained out parameters, as non-retained object do not have to be
-released by the callee.
-These attributes are only used by the Clang Static Analyzer.
-
-The family of attributes ``X_returns_X_retained`` can be added to functions,
-C++ methods, and Objective-C methods and properties.
-Attributes ``X_consumed`` can be added to parameters of methods, functions,
-and Objective-C methods.
-
-
-os_returns_retained_on_zero
----------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``os_returns_retained_on_zero``","``clang::os_returns_retained_on_zero``","``clang::os_returns_retained_on_zero``","","","","Yes"
-
-The behavior of a function with respect to reference counting for Foundation
-(Objective-C), CoreFoundation (C) and OSObject (C++) is determined by a naming
-convention (e.g. functions starting with "get" are assumed to return at
-``+0``).
-
-It can be overriden using a family of the following attributes.  In
-Objective-C, the annotation ``__attribute__((ns_returns_retained))`` applied to
-a function communicates that the object is returned at ``+1``, and the caller
-is responsible for freeing it.
-Similiarly, the annotation ``__attribute__((ns_returns_not_retained))``
-specifies that the object is returned at ``+0`` and the ownership remains with
-the callee.
-The annotation ``__attribute__((ns_consumes_self))`` specifies that
-the Objective-C method call consumes the reference to ``self``, e.g. by
-attaching it to a supplied parameter.
-Additionally, parameters can have an annotation
-``__attribute__((ns_consumed))``, which specifies that passing an owned object
-as that parameter effectively transfers the ownership, and the caller is no
-longer responsible for it.
-These attributes affect code generation when interacting with ARC code, and
-they are used by the Clang Static Analyzer.
-
-In C programs using CoreFoundation, a similar set of attributes:
-``__attribute__((cf_returns_not_retained))``,
-``__attribute__((cf_returns_retained))`` and ``__attribute__((cf_consumed))``
-have the same respective semantics when applied to CoreFoundation objects.
-These attributes affect code generation when interacting with ARC code, and
-they are used by the Clang Static Analyzer.
-
-Finally, in C++ interacting with XNU kernel (objects inheriting from OSObject),
-the same attribute family is present:
-``__attribute__((os_returns_not_retained))``,
-``__attribute__((os_returns_retained))`` and ``__attribute__((os_consumed))``,
-with the same respective semantics.
-Similar to ``__attribute__((ns_consumes_self))``,
-``__attribute__((os_consumes_this))`` specifies that the method call consumes
-the reference to "this" (e.g., when attaching it to a different object supplied
-as a parameter).
-Out parameters (parameters the function is meant to write into,
-either via pointers-to-pointers or references-to-pointers)
-may be annotated with ``__attribute__((os_returns_retained))``
-or ``__attribute__((os_returns_not_retained))`` which specifies that the object
-written into the out parameter should (or respectively should not) be released
-after use.
-Since often out parameters may or may not be written depending on the exit
-code of the function,
-annotations ``__attribute__((os_returns_retained_on_zero))``
-and ``__attribute__((os_returns_retained_on_non_zero))`` specify that
-an out parameter at ``+1`` is written if and only if the function returns a zero
-(respectively non-zero) error code.
-Observe that return-code-dependent out parameter annotations are only
-available for retained out parameters, as non-retained object do not have to be
-released by the callee.
-These attributes are only used by the Clang Static Analyzer.
-
-The family of attributes ``X_returns_X_retained`` can be added to functions,
-C++ methods, and Objective-C methods and properties.
-Attributes ``X_consumed`` can be added to parameters of methods, functions,
-and Objective-C methods.
-
-
-overloadable
-------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``overloadable``","``clang::overloadable``","``clang::overloadable``","","","","Yes"
-
-Clang provides support for C++ function overloading in C.  Function overloading
-in C is introduced using the ``overloadable`` attribute.  For example, one
-might provide several overloaded versions of a ``tgsin`` function that invokes
-the appropriate standard function computing the sine of a value with ``float``,
-``double``, or ``long double`` precision:
-
-.. code-block:: c
-
-  #include <math.h>
-  float __attribute__((overloadable)) tgsin(float x) { return sinf(x); }
-  double __attribute__((overloadable)) tgsin(double x) { return sin(x); }
-  long double __attribute__((overloadable)) tgsin(long double x) { return sinl(x); }
-
-Given these declarations, one can call ``tgsin`` with a ``float`` value to
-receive a ``float`` result, with a ``double`` to receive a ``double`` result,
-etc.  Function overloading in C follows the rules of C++ function overloading
-to pick the best overload given the call arguments, with a few C-specific
-semantics:
-
-* Conversion from ``float`` or ``double`` to ``long double`` is ranked as a
-  floating-point promotion (per C99) rather than as a floating-point conversion
-  (as in C++).
-
-* A conversion from a pointer of type ``T*`` to a pointer of type ``U*`` is
-  considered a pointer conversion (with conversion rank) if ``T`` and ``U`` are
-  compatible types.
-
-* A conversion from type ``T`` to a value of type ``U`` is permitted if ``T``
-  and ``U`` are compatible types.  This conversion is given "conversion" rank.
-
-* If no viable candidates are otherwise available, we allow a conversion from a
-  pointer of type ``T*`` to a pointer of type ``U*``, where ``T`` and ``U`` are
-  incompatible. This conversion is ranked below all other types of conversions.
-  Please note: ``U`` lacking qualifiers that are present on ``T`` is sufficient
-  for ``T`` and ``U`` to be incompatible.
-
-The declaration of ``overloadable`` functions is restricted to function
-declarations and definitions.  If a function is marked with the ``overloadable``
-attribute, then all declarations and definitions of functions with that name,
-except for at most one (see the note below about unmarked overloads), must have
-the ``overloadable`` attribute.  In addition, redeclarations of a function with
-the ``overloadable`` attribute must have the ``overloadable`` attribute, and
-redeclarations of a function without the ``overloadable`` attribute must *not*
-have the ``overloadable`` attribute. e.g.,
-
-.. code-block:: c
-
-  int f(int) __attribute__((overloadable));
-  float f(float); // error: declaration of "f" must have the "overloadable" attribute
-  int f(int); // error: redeclaration of "f" must have the "overloadable" attribute
-
-  int g(int) __attribute__((overloadable));
-  int g(int) { } // error: redeclaration of "g" must also have the "overloadable" attribute
-
-  int h(int);
-  int h(int) __attribute__((overloadable)); // error: declaration of "h" must not
-                                            // have the "overloadable" attribute
-
-Functions marked ``overloadable`` must have prototypes.  Therefore, the
-following code is ill-formed:
-
-.. code-block:: c
-
-  int h() __attribute__((overloadable)); // error: h does not have a prototype
-
-However, ``overloadable`` functions are allowed to use a ellipsis even if there
-are no named parameters (as is permitted in C++).  This feature is particularly
-useful when combined with the ``unavailable`` attribute:
-
-.. code-block:: c++
-
-  void honeypot(...) __attribute__((overloadable, unavailable)); // calling me is an error
-
-Functions declared with the ``overloadable`` attribute have their names mangled
-according to the same rules as C++ function names.  For example, the three
-``tgsin`` functions in our motivating example get the mangled names
-``_Z5tgsinf``, ``_Z5tgsind``, and ``_Z5tgsine``, respectively.  There are two
-caveats to this use of name mangling:
-
-* Future versions of Clang may change the name mangling of functions overloaded
-  in C, so you should not depend on an specific mangling.  To be completely
-  safe, we strongly urge the use of ``static inline`` with ``overloadable``
-  functions.
-
-* The ``overloadable`` attribute has almost no meaning when used in C++,
-  because names will already be mangled and functions are already overloadable.
-  However, when an ``overloadable`` function occurs within an ``extern "C"``
-  linkage specification, it's name *will* be mangled in the same way as it
-  would in C.
-
-For the purpose of backwards compatibility, at most one function with the same
-name as other ``overloadable`` functions may omit the ``overloadable``
-attribute. In this case, the function without the ``overloadable`` attribute
-will not have its name mangled.
-
-For example:
-
-.. code-block:: c
-
-  // Notes with mangled names assume Itanium mangling.
-  int f(int);
-  int f(double) __attribute__((overloadable));
-  void foo() {
-    f(5); // Emits a call to f (not _Z1fi, as it would with an overload that
-          // was marked with overloadable).
-    f(1.0); // Emits a call to _Z1fd.
-  }
-
-Support for unmarked overloads is not present in some versions of clang. You may
-query for it using ``__has_extension(overloadable_unmarked)``.
-
-Query for this attribute with ``__has_attribute(overloadable)``.
-
-
-patchable_function_entry
-------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``patchable_function_entry``","``gnu::patchable_function_entry``","","","","","Yes"
-
-``__attribute__((patchable_function_entry(N,M)))`` is used to generate M NOPs
-before the function entry and N-M NOPs after the function entry. This attribute
-takes precedence over the command line option ``-fpatchable-function-entry=N,M``.
-``M`` defaults to 0 if omitted.
-
-
-preserve_access_index
----------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``preserve_access_index``","``clang::preserve_access_index``","``clang::preserve_access_index``","","","","Yes"
-
-Clang supports the ``__attribute__((preserve_access_index))``
-attribute for the BPF target. This attribute may be attached to a
-struct or union declaration, where if -g is specified, it enables
-preserving struct or union member access debuginfo indicies of this
-struct or union, similar to clang ``__builtin_preserve_acceess_index()``.
-
-
-reinitializes
--------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``reinitializes``","``clang::reinitializes``","","","","",""
-
-The ``reinitializes`` attribute can be applied to a non-static, non-const C++
-member function to indicate that this member function reinitializes the entire
-object to a known state, independent of the previous state of the object.
-
-This attribute can be interpreted by static analyzers that warn about uses of an
-object that has been left in an indeterminate state by a move operation. If a
-member function marked with the ``reinitializes`` attribute is called on a
-moved-from object, the analyzer can conclude that the object is no longer in an
-indeterminate state.
-
-A typical example where this attribute would be used is on functions that clear
-a container class:
-
-.. code-block:: c++
-
-  template <class T>
-  class Container {
-  public:
-    ...
-    [[clang::reinitializes]] void Clear();
-    ...
-  };
-
-
-release_capability, release_shared_capability
----------------------------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``release_capability`` |br| ``release_shared_capability`` |br| ``release_generic_capability`` |br| ``unlock_function``","``clang::release_capability`` |br| ``clang::release_shared_capability`` |br| ``clang::release_generic_capability`` |br| ``clang::unlock_function``","","","","",""
-
-Marks a function as releasing a capability.
-
-
-short_call, near
-----------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``short_call`` |br| ``near``","``gnu::short_call`` |br| ``gnu::near``","","","","","Yes"
-
-Clang supports the ``__attribute__((long_call))``, ``__attribute__((far))``,
-``__attribute__((short__call))``, and ``__attribute__((near))`` attributes
-on MIPS targets. These attributes may only be added to function declarations
-and change the code generated by the compiler when directly calling
-the function. The ``short_call`` and ``near`` attributes are synonyms and
-allow calls to the function to be made using the ``jal`` instruction, which
-requires the function to be located in the same naturally aligned 256MB segment
-as the caller.  The ``long_call`` and ``far`` attributes are synonyms and
-require the use of a different call sequence that works regardless
-of the distance between the functions.
-
-These attributes have no effect for position-independent code.
-
-These attributes take priority over command line switches such
-as ``-mlong-calls`` and ``-mno-long-calls``.
-
-
-signal
-------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``signal``","``gnu::signal``","","","","","Yes"
-
-Clang supports the GNU style ``__attribute__((signal))`` attribute on
-AVR targets. This attribute may be attached to a function definition and instructs
-the backend to generate appropriate function entry/exit code so that it can be used
-directly as an interrupt service routine.
-
-Interrupt handler functions defined with the signal attribute do not re-enable interrupts.
-
-
-speculative_load_hardening
---------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``speculative_load_hardening``","``clang::speculative_load_hardening``","``clang::speculative_load_hardening``","","","","Yes"
-
-This attribute can be applied to a function declaration in order to indicate
-  that `Speculative Load Hardening <https://llvm.org/docs/SpeculativeLoadHardening.html>`_
-  should be enabled for the function body. This can also be applied to a method
-  in Objective C. This attribute will take precedence over the command line flag in
-  the case where `-mno-speculative-load-hardening <https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-mspeculative-load-hardening>`_ is specified.
-
-  Speculative Load Hardening is a best-effort mitigation against
-  information leak attacks that make use of control flow
-  miss-speculation - specifically miss-speculation of whether a branch
-  is taken or not. Typically vulnerabilities enabling such attacks are
-  classified as "Spectre variant #1". Notably, this does not attempt to
-  mitigate against miss-speculation of branch target, classified as
-  "Spectre variant #2" vulnerabilities.
-
-  When inlining, the attribute is sticky. Inlining a function that
-  carries this attribute will cause the caller to gain the
-  attribute. This is intended to provide a maximally conservative model
-  where the code in a function annotated with this attribute will always
-  (even after inlining) end up hardened.
-
-
-sycl_kernel
------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``sycl_kernel``","``clang::sycl_kernel``","``clang::sycl_kernel``","","","",""
-
-The ``sycl_kernel`` attribute specifies that a function template will be used
-to outline device code and to generate an OpenCL kernel.
-Here is a code example of the SYCL program, which demonstrates the compiler's
-outlining job:
-.. code-block:: c++
-
-  int foo(int x) { return ++x; }
-
-  using namespace cl::sycl;
-  queue Q;
-  buffer<int, 1> a(range<1>{1024});
-  Q.submit([&](handler& cgh) {
-    auto A = a.get_access<access::mode::write>(cgh);
-    cgh.parallel_for<init_a>(range<1>{1024}, [=](id<1> index) {
-      A[index] = index[0] + foo(42);
-    });
-  }
-
-A C++ function object passed to the ``parallel_for`` is called a "SYCL kernel".
-A SYCL kernel defines the entry point to the "device part" of the code. The
-compiler will emit all symbols accessible from a "kernel". In this code
-example, the compiler will emit "foo" function.  More details about the
-compilation of functions for the device part can be found in the SYCL 1.2.1
-specification Section 6.4.
-To show to the compiler entry point to the "device part" of the code, the SYCL
-runtime can use the ``sycl_kernel`` attribute in the following way:
-.. code-block:: c++
-namespace cl {
-namespace sycl {
-class handler {
-  template <typename KernelName, typename KernelType/*, ...*/>
-  __attribute__((sycl_kernel)) void sycl_kernel_function(KernelType KernelFuncObj) {
-    // ...
-    KernelFuncObj();
-  }
-
-  template <typename KernelName, typename KernelType, int Dims>
-  void parallel_for(range<Dims> NumWorkItems, KernelType KernelFunc) {
-#ifdef __SYCL_DEVICE_ONLY__
-    sycl_kernel_function<KernelName, KernelType, Dims>(KernelFunc);
-#else
-    // Host implementation
-#endif
-  }
-};
-} // namespace sycl
-} // namespace cl
-
-The compiler will also generate an OpenCL kernel using the function marked with
-the ``sycl_kernel`` attribute.
-Here is the list of SYCL device compiler expectations with regard to the
-function marked with the ``sycl_kernel`` attribute:
-
-- The function must be a template with at least two type template parameters.
-  The compiler generates an OpenCL kernel and uses the first template parameter
-  as a unique name for the generated OpenCL kernel. The host application uses
-  this unique name to invoke the OpenCL kernel generated for the SYCL kernel
-  specialized by this name and second template parameter ``KernelType`` (which
-  might be an unnamed function object type).
-- The function must have at least one parameter. The first parameter is
-  required to be a function object type (named or unnamed i.e. lambda). The
-  compiler uses function object type fields to generate OpenCL kernel
-  parameters.
-- The function must return void. The compiler reuses the body of marked functions to
-  generate the OpenCL kernel body, and the OpenCL kernel must return `void`.
-
-The SYCL kernel in the previous code sample meets these expectations.
-
-
-target
-------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``target``","``gnu::target``","","","","","Yes"
-
-Clang supports the GNU style ``__attribute__((target("OPTIONS")))`` attribute.
-This attribute may be attached to a function definition and instructs
-the backend to use different code generation options than were passed on the
-command line.
-
-The current set of options correspond to the existing "subtarget features" for
-the target with or without a "-mno-" in front corresponding to the absence
-of the feature, as well as ``arch="CPU"`` which will change the default "CPU"
-for the function.
-
-For AArch64, the attribute also allows the "branch-protection=<args>" option,
-where the permissible arguments and their effect on code generation are the same
-as for the command-line option ``-mbranch-protection``.
-
-Example "subtarget features" from the x86 backend include: "mmx", "sse", "sse4.2",
-"avx", "xop" and largely correspond to the machine specific options handled by
-the front end.
-
-Additionally, this attribute supports function multiversioning for ELF based
-x86/x86-64 targets, which can be used to create multiple implementations of the
-same function that will be resolved at runtime based on the priority of their
-``target`` attribute strings. A function is considered a multiversioned function
-if either two declarations of the function have different ``target`` attribute
-strings, or if it has a ``target`` attribute string of ``default``.  For
-example:
-
-  .. code-block:: c++
-
-    __attribute__((target("arch=atom")))
-    void foo() {} // will be called on 'atom' processors.
-    __attribute__((target("default")))
-    void foo() {} // will be called on any other processors.
-
-All multiversioned functions must contain a ``default`` (fallback)
-implementation, otherwise usages of the function are considered invalid.
-Additionally, a function may not become multiversioned after its first use.
-
-
-try_acquire_capability, try_acquire_shared_capability
------------------------------------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``try_acquire_capability`` |br| ``try_acquire_shared_capability``","``clang::try_acquire_capability`` |br| ``clang::try_acquire_shared_capability``","","","","",""
-
-Marks a function that attempts to acquire a capability. This function may fail to
-actually acquire the capability; they accept a Boolean value determining
-whether acquiring the capability means success (true), or failing to acquire
-the capability means success (false).
-
-
-xray_always_instrument, xray_never_instrument, xray_log_args
-------------------------------------------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``xray_always_instrument`` |br| ``xray_never_instrument``","``clang::xray_always_instrument`` |br| ``clang::xray_never_instrument``","``clang::xray_always_instrument`` |br| ``clang::xray_never_instrument``","","","","Yes"
-
-``__attribute__((xray_always_instrument))`` or ``[[clang::xray_always_instrument]]`` is used to mark member functions (in C++), methods (in Objective C), and free functions (in C, C++, and Objective C) to be instrumented with XRay. This will cause the function to always have space at the beginning and exit points to allow for runtime patching.
-
-Conversely, ``__attribute__((xray_never_instrument))`` or ``[[clang::xray_never_instrument]]`` will inhibit the insertion of these instrumentation points.
-
-If a function has neither of these attributes, they become subject to the XRay heuristics used to determine whether a function should be instrumented or otherwise.
-
-``__attribute__((xray_log_args(N)))`` or ``[[clang::xray_log_args(N)]]`` is used to preserve N function arguments for the logging function.  Currently, only N==1 is supported.
-
-
-xray_always_instrument, xray_never_instrument, xray_log_args
-------------------------------------------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``xray_log_args``","``clang::xray_log_args``","``clang::xray_log_args``","","","","Yes"
-
-``__attribute__((xray_always_instrument))`` or ``[[clang::xray_always_instrument]]`` is used to mark member functions (in C++), methods (in Objective C), and free functions (in C, C++, and Objective C) to be instrumented with XRay. This will cause the function to always have space at the beginning and exit points to allow for runtime patching.
-
-Conversely, ``__attribute__((xray_never_instrument))`` or ``[[clang::xray_never_instrument]]`` will inhibit the insertion of these instrumentation points.
-
-If a function has neither of these attributes, they become subject to the XRay heuristics used to determine whether a function should be instrumented or otherwise.
-
-``__attribute__((xray_log_args(N)))`` or ``[[clang::xray_log_args(N)]]`` is used to preserve N function arguments for the logging function.  Currently, only N==1 is supported.
-
-
-Variable Attributes
-===================
-
-
-always_destroy
---------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``always_destroy``","``clang::always_destroy``","","","","","Yes"
-
-The ``always_destroy`` attribute specifies that a variable with static or thread
-storage duration should have its exit-time destructor run. This attribute is the
-default unless clang was invoked with -fno-c++-static-destructors.
-
-
-dllexport
----------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``dllexport``","``gnu::dllexport``","","``dllexport``","","","Yes"
-
-The ``__declspec(dllexport)`` attribute declares a variable, function, or
-Objective-C interface to be exported from the module.  It is available under the
-``-fdeclspec`` flag for compatibility with various compilers.  The primary use
-is for COFF object files which explicitly specify what interfaces are available
-for external use.  See the dllexport_ documentation on MSDN for more
-information.
-
-.. _dllexport: https://msdn.microsoft.com/en-us/library/3y1sfaz2.aspx
-
-
-dllimport
----------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``dllimport``","``gnu::dllimport``","","``dllimport``","","","Yes"
-
-The ``__declspec(dllimport)`` attribute declares a variable, function, or
-Objective-C interface to be imported from an external module.  It is available
-under the ``-fdeclspec`` flag for compatibility with various compilers.  The
-primary use is for COFF object files which explicitly specify what interfaces
-are imported from external modules.  See the dllimport_ documentation on MSDN
-for more information.
-
-.. _dllimport: https://msdn.microsoft.com/en-us/library/3y1sfaz2.aspx
-
-
-init_seg
---------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "","","","","","``init_seg``",""
-
-The attribute applied by ``pragma init_seg()`` controls the section into
-which global initialization function pointers are emitted.  It is only
-available with ``-fms-extensions``.  Typically, this function pointer is
-emitted into ``.CRT$XCU`` on Windows.  The user can change the order of
-initialization by using a different section name with the same
-``.CRT$XC`` prefix and a suffix that sorts lexicographically before or
-after the standard ``.CRT$XCU`` sections.  See the init_seg_
-documentation on MSDN for more information.
-
-.. _init_seg: http://msdn.microsoft.com/en-us/library/7977wcck(v=vs.110).aspx
-
-
-maybe_unused, unused
---------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``unused``","``maybe_unused`` |br| ``gnu::unused``","``maybe_unused``","","","",""
-
-When passing the ``-Wunused`` flag to Clang, entities that are unused by the
-program may be diagnosed. The ``[[maybe_unused]]`` (or
-``__attribute__((unused))``) attribute can be used to silence such diagnostics
-when the entity cannot be removed. For instance, a local variable may exist
-solely for use in an ``assert()`` statement, which makes the local variable
-unused when ``NDEBUG`` is defined.
-
-The attribute may be applied to the declaration of a class, a typedef, a
-variable, a function or method, a function parameter, an enumeration, an
-enumerator, a non-static data member, or a label.
-
-.. code-block: c++
-  #include <cassert>
-
-  [[maybe_unused]] void f([[maybe_unused]] bool thing1,
-                          [[maybe_unused]] bool thing2) {
-    [[maybe_unused]] bool b = thing1 && thing2;
-    assert(b);
-  }
-
-
-no_destroy
-----------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``no_destroy``","``clang::no_destroy``","","","","","Yes"
-
-The ``no_destroy`` attribute specifies that a variable with static or thread
-storage duration shouldn't have its exit-time destructor run. Annotating every
-static and thread duration variable with this attribute is equivalent to
-invoking clang with -fno-c++-static-destructors.
-
-If a variable is declared with this attribute, clang doesn't access check or
-generate the type's destructor. If you have a type that you only want to be
-annotated with ``no_destroy``, you can therefore declare the destructor private:
-
-.. code-block:: c++
-
-  struct only_no_destroy {
-    only_no_destroy();
-  private:
-    ~only_no_destroy();
-  };
-
-  [[clang::no_destroy]] only_no_destroy global; // fine!
-
-Note that destructors are still required for subobjects of aggregates annotated
-with this attribute. This is because previously constructed subobjects need to
-be destroyed if an exception gets thrown before the initialization of the
-complete object is complete. For instance:
-
-.. code-block::c++
-
-  void f() {
-    try {
-      [[clang::no_destroy]]
-      static only_no_destroy array[10]; // error, only_no_destroy has a private destructor.
-    } catch (...) {
-      // Handle the error
-    }
-  }
-
-Here, if the construction of `array[9]` fails with an exception, `array[0..8]`
-will be destroyed, so the element's destructor needs to be accessible.
-
-
-nodebug
--------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``nodebug``","``gnu::nodebug``","","","","","Yes"
-
-The ``nodebug`` attribute allows you to suppress debugging information for a
-function or method, or for a variable that is not a parameter or a non-static
-data member.
-
-
-noescape
---------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``noescape``","``clang::noescape``","``clang::noescape``","","","","Yes"
-
-``noescape`` placed on a function parameter of a pointer type is used to inform
-the compiler that the pointer cannot escape: that is, no reference to the object
-the pointer points to that is derived from the parameter value will survive
-after the function returns. Users are responsible for making sure parameters
-annotated with ``noescape`` do not actuallly escape.
-
-For example:
-
-.. code-block:: c
-
-  int *gp;
-
-  void nonescapingFunc(__attribute__((noescape)) int *p) {
-    *p += 100; // OK.
-  }
-
-  void escapingFunc(__attribute__((noescape)) int *p) {
-    gp = p; // Not OK.
-  }
-
-Additionally, when the parameter is a `block pointer
-<https://clang.llvm.org/docs/BlockLanguageSpec.html>`, the same restriction
-applies to copies of the block. For example:
-
-.. code-block:: c
-
-  typedef void (^BlockTy)();
-  BlockTy g0, g1;
-
-  void nonescapingFunc(__attribute__((noescape)) BlockTy block) {
-    block(); // OK.
-  }
-
-  void escapingFunc(__attribute__((noescape)) BlockTy block) {
-    g0 = block; // Not OK.
-    g1 = Block_copy(block); // Not OK either.
-  }
-
-
-nosvm
------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``nosvm``","","","","","","Yes"
-
-OpenCL 2.0 supports the optional ``__attribute__((nosvm))`` qualifier for
-pointer variable. It informs the compiler that the pointer does not refer
-to a shared virtual memory region. See OpenCL v2.0 s6.7.2 for details.
-
-Since it is not widely used and has been removed from OpenCL 2.1, it is ignored
-by Clang.
-
-
-objc_externally_retained
-------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``objc_externally_retained``","``clang::objc_externally_retained``","``clang::objc_externally_retained``","","","","Yes"
-
-The ``objc_externally_retained`` attribute can be applied to strong local
-variables, functions, methods, or blocks to opt into
-`externally-retained semantics
-<https://clang.llvm.org/docs/AutomaticReferenceCounting.html#externally-retained-variables>`_.
-
-When applied to the definition of a function, method, or block, every parameter
-of the function with implicit strong retainable object pointer type is
-considered externally-retained, and becomes ``const``. By explicitly annotating
-a parameter with ``__strong``, you can opt back into the default
-non-externally-retained behaviour for that parameter. For instance,
-``first_param`` is externally-retained below, but not ``second_param``:
-
-.. code-block:: objc
-
-  __attribute__((objc_externally_retained))
-  void f(NSArray *first_param, __strong NSArray *second_param) {
-    // ...
-  }
-
-Likewise, when applied to a strong local variable, that variable becomes
-``const`` and is considered externally-retained.
-
-When compiled without ``-fobjc-arc``, this attribute is ignored.
-
-
-pass_object_size, pass_dynamic_object_size
-------------------------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``pass_object_size`` |br| ``pass_dynamic_object_size``","``clang::pass_object_size`` |br| ``clang::pass_dynamic_object_size``","``clang::pass_object_size`` |br| ``clang::pass_dynamic_object_size``","","","","Yes"
-
-.. Note:: The mangling of functions with parameters that are annotated with
-  ``pass_object_size`` is subject to change. You can get around this by
-  using ``__asm__("foo")`` to explicitly name your functions, thus preserving
-  your ABI; also, non-overloadable C functions with ``pass_object_size`` are
-  not mangled.
-
-The ``pass_object_size(Type)`` attribute can be placed on function parameters to
-instruct clang to call ``__builtin_object_size(param, Type)`` at each callsite
-of said function, and implicitly pass the result of this call in as an invisible
-argument of type ``size_t`` directly after the parameter annotated with
-``pass_object_size``. Clang will also replace any calls to
-``__builtin_object_size(param, Type)`` in the function by said implicit
-parameter.
-
-Example usage:
-
-.. code-block:: c
-
-  int bzero1(char *const p __attribute__((pass_object_size(0))))
-      __attribute__((noinline)) {
-    int i = 0;
-    for (/**/; i < (int)__builtin_object_size(p, 0); ++i) {
-      p[i] = 0;
-    }
-    return i;
-  }
-
-  int main() {
-    char chars[100];
-    int n = bzero1(&chars[0]);
-    assert(n == sizeof(chars));
-    return 0;
-  }
-
-If successfully evaluating ``__builtin_object_size(param, Type)`` at the
-callsite is not possible, then the "failed" value is passed in. So, using the
-definition of ``bzero1`` from above, the following code would exit cleanly:
-
-.. code-block:: c
-
-  int main2(int argc, char *argv[]) {
-    int n = bzero1(argv);
-    assert(n == -1);
-    return 0;
-  }
-
-``pass_object_size`` plays a part in overload resolution. If two overload
-candidates are otherwise equally good, then the overload with one or more
-parameters with ``pass_object_size`` is preferred. This implies that the choice
-between two identical overloads both with ``pass_object_size`` on one or more
-parameters will always be ambiguous; for this reason, having two such overloads
-is illegal. For example:
-
-.. code-block:: c++
-
-  #define PS(N) __attribute__((pass_object_size(N)))
-  // OK
-  void Foo(char *a, char *b); // Overload A
-  // OK -- overload A has no parameters with pass_object_size.
-  void Foo(char *a PS(0), char *b PS(0)); // Overload B
-  // Error -- Same signature (sans pass_object_size) as overload B, and both
-  // overloads have one or more parameters with the pass_object_size attribute.
-  void Foo(void *a PS(0), void *b);
-
-  // OK
-  void Bar(void *a PS(0)); // Overload C
-  // OK
-  void Bar(char *c PS(1)); // Overload D
-
-  void main() {
-    char known[10], *unknown;
-    Foo(unknown, unknown); // Calls overload B
-    Foo(known, unknown); // Calls overload B
-    Foo(unknown, known); // Calls overload B
-    Foo(known, known); // Calls overload B
-
-    Bar(known); // Calls overload D
-    Bar(unknown); // Calls overload D
-  }
-
-Currently, ``pass_object_size`` is a bit restricted in terms of its usage:
-
-* Only one use of ``pass_object_size`` is allowed per parameter.
-
-* It is an error to take the address of a function with ``pass_object_size`` on
-  any of its parameters. If you wish to do this, you can create an overload
-  without ``pass_object_size`` on any parameters.
-
-* It is an error to apply the ``pass_object_size`` attribute to parameters that
-  are not pointers. Additionally, any parameter that ``pass_object_size`` is
-  applied to must be marked ``const`` at its function's definition.
-
-Clang also supports the ``pass_dynamic_object_size`` attribute, which behaves
-identically to ``pass_object_size``, but evaluates a call to
-``__builtin_dynamic_object_size`` at the callee instead of
-``__builtin_object_size``. ``__builtin_dynamic_object_size`` provides some extra
-runtime checks when the object size can't be determined at compile-time. You can
-read more about ``__builtin_dynamic_object_size`` `here
-<https://clang.llvm.org/docs/LanguageExtensions.html#evaluating-object-size-dynamically>`_.
-
-
-require_constant_initialization, constinit (C++20)
---------------------------------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``require_constant_initialization``","``clang::require_constant_initialization``","","","``constinit``","","Yes"
-
-This attribute specifies that the variable to which it is attached is intended
-to have a `constant initializer <http://en.cppreference.com/w/cpp/language/constant_initialization>`_
-according to the rules of [basic.start.static]. The variable is required to
-have static or thread storage duration. If the initialization of the variable
-is not a constant initializer an error will be produced. This attribute may
-only be used in C++; the ``constinit`` spelling is only accepted in C++20
-onwards.
-
-Note that in C++03 strict constant expression checking is not done. Instead
-the attribute reports if Clang can emit the variable as a constant, even if it's
-not technically a 'constant initializer'. This behavior is non-portable.
-
-Static storage duration variables with constant initializers avoid hard-to-find
-bugs caused by the indeterminate order of dynamic initialization. They can also
-be safely used during dynamic initialization across translation units.
-
-This attribute acts as a compile time assertion that the requirements
-for constant initialization have been met. Since these requirements change
-between dialects and have subtle pitfalls it's important to fail fast instead
-of silently falling back on dynamic initialization.
-
-The first use of the attribute on a variable must be part of, or precede, the
-initializing declaration of the variable. C++20 requires the ``constinit``
-spelling of the attribute to be present on the initializing declaration if it
-is used anywhere. The other spellings can be specified on a forward declaration
-and omitted on a later initializing declaration.
-
-.. code-block:: c++
-
-  // -std=c++14
-  #define SAFE_STATIC [[clang::require_constant_initialization]]
-  struct T {
-    constexpr T(int) {}
-    ~T(); // non-trivial
-  };
-  SAFE_STATIC T x = {42}; // Initialization OK. Doesn't check destructor.
-  SAFE_STATIC T y = 42; // error: variable does not have a constant initializer
-  // copy initialization is not a constant expression on a non-literal type.
-
-
-section, __declspec(allocate)
------------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``section``","``gnu::section``","","``allocate``","","","Yes"
-
-The ``section`` attribute allows you to specify a specific section a
-global variable or function should be in after translation.
-
-
-swift_context
--------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``swift_context``","``clang::swift_context``","``clang::swift_context``","","","","Yes"
-
-The ``swift_context`` attribute marks a parameter of a ``swiftcall``
-function as having the special context-parameter ABI treatment.
-
-This treatment generally passes the context value in a special register
-which is normally callee-preserved.
-
-A ``swift_context`` parameter must either be the last parameter or must be
-followed by a ``swift_error_result`` parameter (which itself must always be
-the last parameter).
-
-A context parameter must have pointer or reference type.
-
-
-swift_error_result
-------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``swift_error_result``","``clang::swift_error_result``","``clang::swift_error_result``","","","","Yes"
-
-The ``swift_error_result`` attribute marks a parameter of a ``swiftcall``
-function as having the special error-result ABI treatment.
-
-This treatment generally passes the underlying error value in and out of
-the function through a special register which is normally callee-preserved.
-This is modeled in C by pretending that the register is addressable memory:
-
-- The caller appears to pass the address of a variable of pointer type.
-  The current value of this variable is copied into the register before
-  the call; if the call returns normally, the value is copied back into the
-  variable.
-
-- The callee appears to receive the address of a variable.  This address
-  is actually a hidden location in its own stack, initialized with the
-  value of the register upon entry.  When the function returns normally,
-  the value in that hidden location is written back to the register.
-
-A ``swift_error_result`` parameter must be the last parameter, and it must be
-preceded by a ``swift_context`` parameter.
-
-A ``swift_error_result`` parameter must have type ``T**`` or ``T*&`` for some
-type T.  Note that no qualifiers are permitted on the intermediate level.
-
-It is undefined behavior if the caller does not pass a pointer or
-reference to a valid object.
-
-The standard convention is that the error value itself (that is, the
-value stored in the apparent argument) will be null upon function entry,
-but this is not enforced by the ABI.
-
-
-swift_indirect_result
----------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``swift_indirect_result``","``clang::swift_indirect_result``","``clang::swift_indirect_result``","","","","Yes"
-
-The ``swift_indirect_result`` attribute marks a parameter of a ``swiftcall``
-function as having the special indirect-result ABI treatment.
-
-This treatment gives the parameter the target's normal indirect-result
-ABI treatment, which may involve passing it differently from an ordinary
-parameter.  However, only the first indirect result will receive this
-treatment.  Furthermore, low-level lowering may decide that a direct result
-must be returned indirectly; if so, this will take priority over the
-``swift_indirect_result`` parameters.
-
-A ``swift_indirect_result`` parameter must either be the first parameter or
-follow another ``swift_indirect_result`` parameter.
-
-A ``swift_indirect_result`` parameter must have type ``T*`` or ``T&`` for
-some object type ``T``.  If ``T`` is a complete type at the point of
-definition of a function, it is undefined behavior if the argument
-value does not point to storage of adequate size and alignment for a
-value of type ``T``.
-
-Making indirect results explicit in the signature allows C functions to
-directly construct objects into them without relying on language
-optimizations like C++'s named return value optimization (NRVO).
-
-
-swiftcall
----------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``swiftcall``","``clang::swiftcall``","``clang::swiftcall``","","","",""
-
-The ``swiftcall`` attribute indicates that a function should be called
-using the Swift calling convention for a function or function pointer.
-
-The lowering for the Swift calling convention, as described by the Swift
-ABI documentation, occurs in multiple phases.  The first, "high-level"
-phase breaks down the formal parameters and results into innately direct
-and indirect components, adds implicit paraameters for the generic
-signature, and assigns the context and error ABI treatments to parameters
-where applicable.  The second phase breaks down the direct parameters
-and results from the first phase and assigns them to registers or the
-stack.  The ``swiftcall`` convention only handles this second phase of
-lowering; the C function type must accurately reflect the results
-of the first phase, as follows:
-
-- Results classified as indirect by high-level lowering should be
-  represented as parameters with the ``swift_indirect_result`` attribute.
-
-- Results classified as direct by high-level lowering should be represented
-  as follows:
-
-  - First, remove any empty direct results.
-
-  - If there are no direct results, the C result type should be ``void``.
-
-  - If there is one direct result, the C result type should be a type with
-    the exact layout of that result type.
-
-  - If there are a multiple direct results, the C result type should be
-    a struct type with the exact layout of a tuple of those results.
-
-- Parameters classified as indirect by high-level lowering should be
-  represented as parameters of pointer type.
-
-- Parameters classified as direct by high-level lowering should be
-  omitted if they are empty types; otherwise, they should be represented
-  as a parameter type with a layout exactly matching the layout of the
-  Swift parameter type.
-
-- The context parameter, if present, should be represented as a trailing
-  parameter with the ``swift_context`` attribute.
-
-- The error result parameter, if present, should be represented as a
-  trailing parameter (always following a context parameter) with the
-  ``swift_error_result`` attribute.
-
-``swiftcall`` does not support variadic arguments or unprototyped functions.
-
-The parameter ABI treatment attributes are aspects of the function type.
-A function type which which applies an ABI treatment attribute to a
-parameter is a different type from an otherwise-identical function type
-that does not.  A single parameter may not have multiple ABI treatment
-attributes.
-
-Support for this feature is target-dependent, although it should be
-supported on every target that Swift supports.  Query for this support
-with ``__has_attribute(swiftcall)``.  This implies support for the
-``swift_context``, ``swift_error_result``, and ``swift_indirect_result``
-attributes.
-
-
-thread
-------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "","","","``thread``","","",""
-
-The ``__declspec(thread)`` attribute declares a variable with thread local
-storage.  It is available under the ``-fms-extensions`` flag for MSVC
-compatibility.  See the documentation for `__declspec(thread)`_ on MSDN.
-
-.. _`__declspec(thread)`: http://msdn.microsoft.com/en-us/library/9w1sdazb.aspx
-
-In Clang, ``__declspec(thread)`` is generally equivalent in functionality to the
-GNU ``__thread`` keyword.  The variable must not have a destructor and must have
-a constant initializer, if any.  The attribute only applies to variables
-declared with static storage duration, such as globals, class static data
-members, and static locals.
-
-
-tls_model
----------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``tls_model``","``gnu::tls_model``","","","","","Yes"
-
-The ``tls_model`` attribute allows you to specify which thread-local storage
-model to use. It accepts the following strings:
-
-* global-dynamic
-* local-dynamic
-* initial-exec
-* local-exec
-
-TLS models are mutually exclusive.
-
-
-uninitialized
--------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``uninitialized``","``clang::uninitialized``","","","","",""
-
-The command-line parameter ``-ftrivial-auto-var-init=*`` can be used to
-initialize trivial automatic stack variables. By default, trivial automatic
-stack variables are uninitialized. This attribute is used to override the
-command-line parameter, forcing variables to remain uninitialized. It has no
-semantic meaning in that using uninitialized values is undefined behavior,
-it rather documents the programmer's intent.
-
-
-Field Attributes
-================
-
-
-no_unique_address
------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "","``no_unique_address``","","","","",""
-
-The ``no_unique_address`` attribute allows tail padding in a non-static data
-member to overlap other members of the enclosing class (and in the special
-case when the type is empty, permits it to fully overlap other members).
-The field is laid out as if a base class were encountered at the corresponding
-point within the class (except that it does not share a vptr with the enclosing
-object).
-
-Example usage:
-
-.. code-block:: c++
-
-  template<typename T, typename Alloc> struct my_vector {
-    T *p;
-    [[no_unique_address]] Alloc alloc;
-    // ...
-  };
-  static_assert(sizeof(my_vector<int, std::allocator<int>>) == sizeof(int*));
-
-``[[no_unique_address]]`` is a standard C++20 attribute. Clang supports its use
-in C++11 onwards.
-
-
-Type Attributes
-===============
-
-
-__ptr32
--------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "","","","","``__ptr32``","",""
-
-The ``__ptr32`` qualifier represents a native pointer on a 32-bit system. On a
-64-bit system, a pointer with ``__ptr32`` is extended to a 64-bit pointer. The
-``__sptr`` and ``__uptr`` qualifiers can be used to specify whether the pointer
-is sign extended or zero extended. This qualifier is enabled under
-``-fms-extensions``.
-
-
-__ptr64
--------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "","","","","``__ptr64``","",""
-
-The ``__ptr64`` qualifier represents a native pointer on a 64-bit system. On a
-32-bit system, a ``__ptr64`` pointer is truncated to a 32-bit pointer. This
-qualifier is enabled under ``-fms-extensions``.
-
-
-__sptr
-------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "","","","","``__sptr``","",""
-
-The ``__sptr`` qualifier specifies that a 32-bit pointer should be sign
-extended when converted to a 64-bit pointer.
-
-
-__uptr
-------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "","","","","``__uptr``","",""
-
-The ``__uptr`` qualifier specifies that a 32-bit pointer should be zero
-extended when converted to a 64-bit pointer.
-
-
-align_value
------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``align_value``","","","","","","Yes"
-
-The align_value attribute can be added to the typedef of a pointer type or the
-declaration of a variable of pointer or reference type. It specifies that the
-pointer will point to, or the reference will bind to, only objects with at
-least the provided alignment. This alignment value must be some positive power
-of 2.
-
-   .. code-block:: c
-
-     typedef double * aligned_double_ptr __attribute__((align_value(64)));
-     void foo(double & x  __attribute__((align_value(128)),
-              aligned_double_ptr y) { ... }
-
-If the pointer value does not have the specified alignment at runtime, the
-behavior of the program is undefined.
-
-
-hip_pinned_shadow
------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``hip_pinned_shadow``","","","``__hip_pinned_shadow__``","","","Yes"
-
-The GNU style attribute __attribute__((hip_pinned_shadow)) or MSVC style attribute
-__declspec(hip_pinned_shadow) can be added to the definition of a global variable
-to indicate it is a HIP pinned shadow variable. A HIP pinned shadow variable can
-be accessed on both device side and host side. It has external linkage and is
-not initialized on device side. It has internal linkage and is initialized by
-the initializer on host side.
-
-
-noderef
--------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``noderef``","``clang::noderef``","``clang::noderef``","","","",""
-
-The ``noderef`` attribute causes clang to diagnose dereferences of annotated pointer types.
-This is ideally used with pointers that point to special memory which cannot be read
-from or written to, but allowing for the pointer to be used in pointer arithmetic.
-The following are examples of valid expressions where dereferences are diagnosed:
-
-.. code-block:: c
-
-  int __attribute__((noderef)) *p;
-  int x = *p;  // warning
-
-  int __attribute__((noderef)) **p2;
-  x = **p2;  // warning
-
-  int * __attribute__((noderef)) *p3;
-  p = *p3;  // warning
-
-  struct S {
-    int a;
-  };
-  struct S __attribute__((noderef)) *s;
-  x = s->a;    // warning
-  x = (*s).a;  // warning
-
-Not all dereferences may diagnose a warning if the value directed by the pointer may not be
-accessed. The following are examples of valid expressions where may not be diagnosed:
-
-.. code-block:: c
-
-  int *q;
-  int __attribute__((noderef)) *p;
-  q = &*p;
-  q = *&p;
-
-  struct S {
-    int a;
-  };
-  struct S __attribute__((noderef)) *s;
-  p = &s->a;
-  p = &(*s).a;
-
-``noderef`` is currently only supported for pointers and arrays and not usable for
-references or Objective-C object pointers.
-
-.. code-block: c++
-
-  int x = 2;
-  int __attribute__((noderef)) &y = x;  // warning: 'noderef' can only be used on an array or pointer type
-
-.. code-block: objc
-
-  id __attribute__((noderef)) obj = [NSObject new]; // warning: 'noderef' can only be used on an array or pointer type
-
-
-objc_class_stub
----------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``objc_class_stub``","``clang::objc_class_stub``","``clang::objc_class_stub``","","","","Yes"
-
-This attribute specifies that the Objective-C class to which it applies is
-instantiated at runtime.
-
-Unlike ``__attribute__((objc_runtime_visible))``, a class having this attribute
-still has a "class stub" that is visible to the linker. This allows categories
-to be defined. Static message sends with the class as a receiver use a special
-access pattern to ensure the class is lazily instantiated from the class stub.
-
-Classes annotated with this attribute cannot be subclassed and cannot have
-implementations defined for them. This attribute is intended for use in
-Swift-generated headers for classes defined in Swift.
-
-Adding or removing this attribute to a class is an ABI-breaking change.
-
-
-Statement Attributes
-====================
-
-
-#pragma clang loop
-------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "","","","","","``clang loop`` |br| ``unroll`` |br| ``nounroll`` |br| ``unroll_and_jam`` |br| ``nounroll_and_jam``",""
-
-The ``#pragma clang loop`` directive allows loop optimization hints to be
-specified for the subsequent loop. The directive allows pipelining to be
-disabled, or vectorization, vector predication, interleaving, and unrolling to
-be enabled or disabled. Vector width, vector predication, interleave count,
-unrolling count, and the initiation interval for pipelining can be explicitly
-specified. See `language extensions
-<http://clang.llvm.org/docs/LanguageExtensions.html#extensions-for-loop-hint-optimizations>`_
-for details.
-
-
-#pragma unroll, #pragma nounroll
---------------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "","","","","","``clang loop`` |br| ``unroll`` |br| ``nounroll`` |br| ``unroll_and_jam`` |br| ``nounroll_and_jam``",""
-
-Loop unrolling optimization hints can be specified with ``#pragma unroll`` and
-``#pragma nounroll``. The pragma is placed immediately before a for, while,
-do-while, or c++11 range-based for loop.
-
-Specifying ``#pragma unroll`` without a parameter directs the loop unroller to
-attempt to fully unroll the loop if the trip count is known at compile time and
-attempt to partially unroll the loop if the trip count is not known at compile
-time:
-
-.. code-block:: c++
-
-  #pragma unroll
-  for (...) {
-    ...
-  }
-
-Specifying the optional parameter, ``#pragma unroll _value_``, directs the
-unroller to unroll the loop ``_value_`` times.  The parameter may optionally be
-enclosed in parentheses:
-
-.. code-block:: c++
-
-  #pragma unroll 16
-  for (...) {
-    ...
-  }
-
-  #pragma unroll(16)
-  for (...) {
-    ...
-  }
-
-Specifying ``#pragma nounroll`` indicates that the loop should not be unrolled:
-
-.. code-block:: c++
-
-  #pragma nounroll
-  for (...) {
-    ...
-  }
-
-``#pragma unroll`` and ``#pragma unroll _value_`` have identical semantics to
-``#pragma clang loop unroll(full)`` and
-``#pragma clang loop unroll_count(_value_)`` respectively. ``#pragma nounroll``
-is equivalent to ``#pragma clang loop unroll(disable)``.  See
-`language extensions
-<http://clang.llvm.org/docs/LanguageExtensions.html#extensions-for-loop-hint-optimizations>`_
-for further details including limitations of the unroll hints.
-
-
-__read_only, __write_only, __read_write (read_only, write_only, read_write)
----------------------------------------------------------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "","","","","``__read_only`` |br| ``read_only`` |br| ``__write_only`` |br| ``write_only`` |br| ``__read_write`` |br| ``read_write``","",""
-
-The access qualifiers must be used with image object arguments or pipe arguments
-to declare if they are being read or written by a kernel or function.
-
-The read_only/__read_only, write_only/__write_only and read_write/__read_write
-names are reserved for use as access qualifiers and shall not be used otherwise.
-
-.. code-block:: c
-
-  kernel void
-  foo (read_only image2d_t imageA,
-       write_only image2d_t imageB) {
-    ...
-  }
-
-In the above example imageA is a read-only 2D image object, and imageB is a
-write-only 2D image object.
-
-The read_write (or __read_write) qualifier can not be used with pipe.
-
-More details can be found in the OpenCL C language Spec v2.0, Section 6.6.
-
-
-fallthrough
------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``fallthrough``","``fallthrough`` |br| ``clang::fallthrough`` |br| ``gnu::fallthrough``","``fallthrough``","","","",""
-
-The ``fallthrough`` (or ``clang::fallthrough``) attribute is used
-to annotate intentional fall-through
-between switch labels.  It can only be applied to a null statement placed at a
-point of execution between any statement and the next switch label.  It is
-common to mark these places with a specific comment, but this attribute is
-meant to replace comments with a more strict annotation, which can be checked
-by the compiler.  This attribute doesn't change semantics of the code and can
-be used wherever an intended fall-through occurs.  It is designed to mimic
-control-flow statements like ``break;``, so it can be placed in most places
-where ``break;`` can, but only if there are no statements on the execution path
-between it and the next switch label.
-
-By default, Clang does not warn on unannotated fallthrough from one ``switch``
-case to another. Diagnostics on fallthrough without a corresponding annotation
-can be enabled with the ``-Wimplicit-fallthrough`` argument.
-
-Here is an example:
-
-.. code-block:: c++
-
-  // compile with -Wimplicit-fallthrough
-  switch (n) {
-  case 22:
-  case 33:  // no warning: no statements between case labels
-    f();
-  case 44:  // warning: unannotated fall-through
-    g();
-    [[clang::fallthrough]];
-  case 55:  // no warning
-    if (x) {
-      h();
-      break;
-    }
-    else {
-      i();
-      [[clang::fallthrough]];
-    }
-  case 66:  // no warning
-    p();
-    [[clang::fallthrough]]; // warning: fallthrough annotation does not
-                            //          directly precede case label
-    q();
-  case 77:  // warning: unannotated fall-through
-    r();
-  }
-
-
-intel_reqd_sub_group_size
--------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``intel_reqd_sub_group_size``","","","","","","Yes"
-
-The optional attribute intel_reqd_sub_group_size can be used to indicate that
-the kernel must be compiled and executed with the specified subgroup size. When
-this attribute is present, get_max_sub_group_size() is guaranteed to return the
-specified integer value. This is important for the correctness of many subgroup
-algorithms, and in some cases may be used by the compiler to generate more optimal
-code. See `cl_intel_required_subgroup_size
-<https://www.khronos.org/registry/OpenCL/extensions/intel/cl_intel_required_subgroup_size.txt>`
-for details.
-
-
-opencl_unroll_hint
-------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``opencl_unroll_hint``","","","","","",""
-
-The opencl_unroll_hint attribute qualifier can be used to specify that a loop
-(for, while and do loops) can be unrolled. This attribute qualifier can be
-used to specify full unrolling or partial unrolling by a specified amount.
-This is a compiler hint and the compiler may ignore this directive. See
-`OpenCL v2.0 <https://www.khronos.org/registry/cl/specs/opencl-2.0.pdf>`_
-s6.11.5 for details.
-
-
-suppress
---------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "","``gsl::suppress``","","","","",""
-
-The ``[[gsl::suppress]]`` attribute suppresses specific
-clang-tidy diagnostics for rules of the `C++ Core Guidelines`_ in a portable
-way. The attribute can be attached to declarations, statements, and at
-namespace scope.
-
-.. code-block:: c++
-
-  [[gsl::suppress("Rh-public")]]
-  void f_() {
-    int *p;
-    [[gsl::suppress("type")]] {
-      p = reinterpret_cast<int*>(7);
-    }
-  }
-  namespace N {
-    [[clang::suppress("type", "bounds")]];
-    ...
-  }
-
-.. _`C++ Core Guidelines`: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#inforce-enforcement
-
-
-Declaration Attributes
-======================
-
-
-Owner
------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "","``gsl::Owner``","","","","","Yes"
-
-.. Note:: This attribute is experimental and its effect on analysis is subject to change in
-  a future version of clang.
-
-The attribute ``[[gsl::Owner(T)]]`` applies to structs and classes that own an
-object of type ``T``:
-
-.. code-block:: c++
-
-  class [[gsl::Owner(int)]] IntOwner {
-  private:
-    int value;
-  public:
-    int *getInt() { return &value; }
-  };
-
-The argument ``T`` is optional and is ignored.
-This attribute may be used by analysis tools and has no effect on code
-generation. A ``void`` argument means that the class can own any type.
-
-See Pointer_ for an example.
-
-
-Pointer
--------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "","``gsl::Pointer``","","","","","Yes"
-
-.. Note:: This attribute is experimental and its effect on analysis is subject to change in
-  a future version of clang.
-
-The attribute ``[[gsl::Pointer(T)]]`` applies to structs and classes that behave
-like pointers to an object of type ``T``:
-
-.. code-block:: c++
-
-  class [[gsl::Pointer(int)]] IntPointer {
-  private:
-    int *valuePointer;
-  public:
-    int *getInt() { return &valuePointer; }
-  };
-
-The argument ``T`` is optional and is ignored.
-This attribute may be used by analysis tools and has no effect on code
-generation. A ``void`` argument means that the pointer can point to any type.
-
-Example:
-When constructing an instance of a class annotated like this (a Pointer) from
-an instance of a class annotated with ``[[gsl::Owner]]`` (an Owner),
-then the analysis will consider the Pointer to point inside the Owner.
-When the Owner's lifetime ends, it will consider the Pointer to be dangling.
-
-.. code-block:: c++
-
-  int f() {
-    IntPointer P;
-    if (true) {
-      IntOwner O(7);
-      P = IntPointer(O); // P "points into" O
-    } // P is dangling
-    return P.get(); // error: Using a dangling Pointer.
-  }
-
-
-__single_inhertiance, __multiple_inheritance, __virtual_inheritance
--------------------------------------------------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "","","","","``__single_inheritance`` |br| ``__multiple_inheritance`` |br| ``__virtual_inheritance`` |br| ``__unspecified_inheritance``","",""
-
-This collection of keywords is enabled under ``-fms-extensions`` and controls
-the pointer-to-member representation used on ``*-*-win32`` targets.
-
-The ``*-*-win32`` targets utilize a pointer-to-member representation which
-varies in size and alignment depending on the definition of the underlying
-class.
-
-However, this is problematic when a forward declaration is only available and
-no definition has been made yet.  In such cases, Clang is forced to utilize the
-most general representation that is available to it.
-
-These keywords make it possible to use a pointer-to-member representation other
-than the most general one regardless of whether or not the definition will ever
-be present in the current translation unit.
-
-This family of keywords belong between the ``class-key`` and ``class-name``:
-
-.. code-block:: c++
-
-  struct __single_inheritance S;
-  int S::*i;
-  struct S {};
-
-This keyword can be applied to class templates but only has an effect when used
-on full specializations:
-
-.. code-block:: c++
-
-  template <typename T, typename U> struct __single_inheritance A; // warning: inheritance model ignored on primary template
-  template <typename T> struct __multiple_inheritance A<T, T>; // warning: inheritance model ignored on partial specialization
-  template <> struct __single_inheritance A<int, float>;
-
-Note that choosing an inheritance model less general than strictly necessary is
-an error:
-
-.. code-block:: c++
-
-  struct __multiple_inheritance S; // error: inheritance model does not match definition
-  int S::*i;
-  struct S {};
-
-
-asm
----
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "","","","","``asm`` |br| ``__asm__``","",""
-
-This attribute can be used on a function or variable to specify its symbol name.
-
-On some targets, all C symbols are prefixed by default with a single character, typically ``_``.  This was done historically to distinguish them from symbols used by other languages.  (This prefix is also added to the standard Itanium C++ ABI prefix on "mangled" symbol names, so that e.g. on such targets the true symbol name for a C++ variable declared as ``int cppvar;`` would be ``__Z6cppvar``; note the two underscores.)  This prefix is *not* added to the symbol names specified by the ``asm`` attribute; programmers wishing to match a C symbol name must compensate for this.
-
-For example, consider the following C code:
-
-.. code-block:: c
-
-  int var1 asm("altvar") = 1;  // "altvar" in symbol table.
-  int var2 = 1; // "_var2" in symbol table.
-
-  void func1(void) asm("altfunc");
-  void func1(void) {} // "altfunc" in symbol table.
-  void func2(void) {} // "_func2" in symbol table.
-
-Clang's implementation of this attribute is compatible with GCC's, `documented here <https://gcc.gnu.org/onlinedocs/gcc/Asm-Labels.html>`_.
-
-While it is possible to use this attribute to name a special symbol used internally by the compiler, such as an LLVM intrinsic, this is neither recommended nor supported and may cause the compiler to crash or miscompile.  Users who wish to gain access to intrinsic behavior are strongly encouraged to request new builtin functions.
-
-
-deprecated
-----------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``deprecated``","``gnu::deprecated`` |br| ``deprecated``","``deprecated``","``deprecated``","","",""
-
-The ``deprecated`` attribute can be applied to a function, a variable, or a
-type. This is useful when identifying functions, variables, or types that are
-expected to be removed in a future version of a program.
-
-Consider the function declaration for a hypothetical function ``f``:
-
-.. code-block:: c++
-
-  void f(void) __attribute__((deprecated("message", "replacement")));
-
-When spelled as `__attribute__((deprecated))`, the deprecated attribute can have
-two optional string arguments. The first one is the message to display when
-emitting the warning; the second one enables the compiler to provide a Fix-It
-to replace the deprecated name with a new name. Otherwise, when spelled as
-`[[gnu::deprecated]] or [[deprecated]]`, the attribute can have one optional
-string argument which is the message to display when emitting the warning.
-
-
-empty_bases
------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "","","","``empty_bases``","","",""
-
-The empty_bases attribute permits the compiler to utilize the
-empty-base-optimization more frequently.
-This attribute only applies to struct, class, and union types.
-It is only supported when using the Microsoft C++ ABI.
-
-
-enum_extensibility
-------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``enum_extensibility``","``clang::enum_extensibility``","``clang::enum_extensibility``","","","","Yes"
-
-Attribute ``enum_extensibility`` is used to distinguish between enum definitions
-that are extensible and those that are not. The attribute can take either
-``closed`` or ``open`` as an argument. ``closed`` indicates a variable of the
-enum type takes a value that corresponds to one of the enumerators listed in the
-enum definition or, when the enum is annotated with ``flag_enum``, a value that
-can be constructed using values corresponding to the enumerators. ``open``
-indicates a variable of the enum type can take any values allowed by the
-standard and instructs clang to be more lenient when issuing warnings.
-
-.. code-block:: c
-
-  enum __attribute__((enum_extensibility(closed))) ClosedEnum {
-    A0, A1
-  };
-
-  enum __attribute__((enum_extensibility(open))) OpenEnum {
-    B0, B1
-  };
-
-  enum __attribute__((enum_extensibility(closed),flag_enum)) ClosedFlagEnum {
-    C0 = 1 << 0, C1 = 1 << 1
-  };
-
-  enum __attribute__((enum_extensibility(open),flag_enum)) OpenFlagEnum {
-    D0 = 1 << 0, D1 = 1 << 1
-  };
-
-  void foo1() {
-    enum ClosedEnum ce;
-    enum OpenEnum oe;
-    enum ClosedFlagEnum cfe;
-    enum OpenFlagEnum ofe;
-
-    ce = A1;           // no warnings
-    ce = 100;          // warning issued
-    oe = B1;           // no warnings
-    oe = 100;          // no warnings
-    cfe = C0 | C1;     // no warnings
-    cfe = C0 | C1 | 4; // warning issued
-    ofe = D0 | D1;     // no warnings
-    ofe = D0 | D1 | 4; // no warnings
-  }
-
-
-external_source_symbol
-----------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``external_source_symbol``","``clang::external_source_symbol``","``clang::external_source_symbol``","","","","Yes"
-
-The ``external_source_symbol`` attribute specifies that a declaration originates
-from an external source and describes the nature of that source.
-
-The fact that Clang is capable of recognizing declarations that were defined
-externally can be used to provide better tooling support for mixed-language
-projects or projects that rely on auto-generated code. For instance, an IDE that
-uses Clang and that supports mixed-language projects can use this attribute to
-provide a correct 'jump-to-definition' feature. For a concrete example,
-consider a protocol that's defined in a Swift file:
-
-.. code-block:: swift
-
-  @objc public protocol SwiftProtocol {
-    func method()
-  }
-
-This protocol can be used from Objective-C code by including a header file that
-was generated by the Swift compiler. The declarations in that header can use
-the ``external_source_symbol`` attribute to make Clang aware of the fact
-that ``SwiftProtocol`` actually originates from a Swift module:
-
-.. code-block:: objc
-
-  __attribute__((external_source_symbol(language="Swift",defined_in="module")))
-  @protocol SwiftProtocol
-  @required
-  - (void) method;
-  @end
-
-Consequently, when 'jump-to-definition' is performed at a location that
-references ``SwiftProtocol``, the IDE can jump to the original definition in
-the Swift source file rather than jumping to the Objective-C declaration in the
-auto-generated header file.
-
-The ``external_source_symbol`` attribute is a comma-separated list that includes
-clauses that describe the origin and the nature of the particular declaration.
-Those clauses can be:
-
-language=\ *string-literal*
-  The name of the source language in which this declaration was defined.
-
-defined_in=\ *string-literal*
-  The name of the source container in which the declaration was defined. The
-  exact definition of source container is language-specific, e.g. Swift's
-  source containers are modules, so ``defined_in`` should specify the Swift
-  module name.
-
-generated_declaration
-  This declaration was automatically generated by some tool.
-
-The clauses can be specified in any order. The clauses that are listed above are
-all optional, but the attribute has to have at least one clause.
-
-
-flag_enum
----------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``flag_enum``","``clang::flag_enum``","``clang::flag_enum``","","","","Yes"
-
-This attribute can be added to an enumerator to signal to the compiler that it
-is intended to be used as a flag type. This will cause the compiler to assume
-that the range of the type includes all of the values that you can get by
-manipulating bits of the enumerator when issuing warnings.
-
-
-layout_version
---------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "","","","``layout_version``","","",""
-
-The layout_version attribute requests that the compiler utilize the class
-layout rules of a particular compiler version.
-This attribute only applies to struct, class, and union types.
-It is only supported when using the Microsoft C++ ABI.
-
-
-lto_visibility_public
----------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``lto_visibility_public``","``clang::lto_visibility_public``","``clang::lto_visibility_public``","","","","Yes"
-
-See :doc:`LTOVisibility`.
-
-
-novtable
---------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "","","","``novtable``","","",""
-
-This attribute can be added to a class declaration or definition to signal to
-the compiler that constructors and destructors will not reference the virtual
-function table. It is only supported when using the Microsoft C++ ABI.
-
-
-objc_boxable
-------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``objc_boxable``","``clang::objc_boxable``","``clang::objc_boxable``","","","","Yes"
-
-Structs and unions marked with the ``objc_boxable`` attribute can be used
-with the Objective-C boxed expression syntax, ``@(...)``.
-
-**Usage**: ``__attribute__((objc_boxable))``. This attribute
-can only be placed on a declaration of a trivially-copyable struct or union:
-
-.. code-block:: objc
-
-  struct __attribute__((objc_boxable)) some_struct {
-    int i;
-  };
-  union __attribute__((objc_boxable)) some_union {
-    int i;
-    float f;
-  };
-  typedef struct __attribute__((objc_boxable)) _some_struct some_struct;
-
-  // ...
-
-  some_struct ss;
-  NSValue *boxed = @(ss);
-
-
-objc_direct
------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``objc_direct``","``clang::objc_direct``","``clang::objc_direct``","","","","Yes"
-
-The ``objc_direct`` attribute can be used to mark an Objective-C method as
-being *direct*.  A direct method is treated statically like an ordinary method,
-but dynamically it behaves more like a C function.  This lowers some of the costs
-associated with the method but also sacrifices some of the ordinary capabilities
-of Objective-C methods.
-
-A message send of a direct method calls the implementation directly, as if it
-were a C function, rather than using ordinary Objective-C method dispatch. This
-is substantially faster and potentially allows the implementation to be inlined,
-but it also means the method cannot be overridden in subclasses or replaced
-dynamically, as ordinary Objective-C methods can.
-
-Furthermore, a direct method is not listed in the class's method lists. This
-substantially reduces the code-size overhead of the method but also means it
-cannot be called dynamically using ordinary Objective-C method dispatch at all;
-in particular, this means that it cannot override a superclass method or satisfy
-a protocol requirement.
-
-Because a direct method cannot be overridden, it is an error to perform
-a ``super`` message send of one.
-
-Although a message send of a direct method causes the method to be called
-directly as if it were a C function, it still obeys Objective-C semantics in other
-ways:
-
-- If the receiver is ``nil``, the message send does nothing and returns the zero value
-  for the return type.
-
-- A message send of a direct class method will cause the class to be initialized,
-  including calling the ``+initialize`` method if present.
-
-- The implicit ``_cmd`` parameter containing the method's selector is still defined.
- In order to minimize code-size costs, the implementation will not emit a reference
- to the selector if the parameter is unused within the method.
-
-Symbols for direct method implementations are implicitly given hidden
-visibility, meaning that they can only be called within the same linkage unit.
-
-It is an error to do any of the following:
-
-- declare a direct method in a protocol,
-- declare an override of a direct method with a method in a subclass,
-- declare an override of a non-direct method with a direct method in a subclass,
-- declare a method with different directness in different class interfaces, or
-- implement a non-direct method (as declared in any class interface) with a direct method.
-
-If any of these rules would be violated if every method defined in an
-``@implementation`` within a single linkage unit were declared in an
-appropriate class interface, the program is ill-formed with no diagnostic
-required.  If a violation of this rule is not diagnosed, behavior remains
-well-defined; this paragraph is simply reserving the right to diagnose such
-conflicts in the future, not to treat them as undefined behavior.
-
-Additionally, Clang will warn about any ``@selector`` expression that
-names a selector that is only known to be used for direct methods.
-
-For the purpose of these rules, a "class interface" includes a class's primary
-``@interface`` block, its class extensions, its categories, its declared protocols,
-and all the class interfaces of its superclasses.
-
-An Objective-C property can be declared with the ``direct`` property
-attribute.  If a direct property declaration causes an implicit declaration of
-a getter or setter method (that is, if the given method is not explicitly
-declared elsewhere), the method is declared to be direct.
-
-Some programmers may wish to make many methods direct at once.  In order
-to simplify this, the ``objc_direct_members`` attribute is provided; see its
-documentation for more information.
-
-
-objc_direct_members
--------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``objc_direct_members``","``clang::objc_direct_members``","``clang::objc_direct_members``","","","","Yes"
-
-The ``objc_direct_members`` attribute can be placed on an  Objective-C
-``@interface`` or ``@implementation`` to mark that methods declared
-therein should be considered direct by default.  See the documentation
-for ``objc_direct`` for more information about direct methods.
-
-When ``objc_direct_members`` is placed on an ``@interface`` block, every
-method in the block is considered to be declared as direct.  This includes any
-implicit method declarations introduced by property declarations.  If the method
-redeclares a non-direct method, the declaration is ill-formed, exactly as if the
-method was annotated with the ``objc_direct`` attribute.  ``objc_direct_members``
-cannot be placed on the primary interface of a class, only on category or class
-extension interfaces.
-
-When ``objc_direct_members`` is placed on an ``@implementation`` block,
-methods defined in the block are considered to be declared as direct unless
-they have been previously declared as non-direct in any interface of the class.
-This includes the implicit method definitions introduced by synthesized
-properties, including auto-synthesized properties.
-
-
-objc_nonlazy_class
-------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``objc_nonlazy_class``","``clang::objc_nonlazy_class``","``clang::objc_nonlazy_class``","","","","Yes"
-
-This attribute can be added to an Objective-C ``@interface`` or
-``@implementation`` declaration to add the class to the list of non-lazily
-initialized classes. A non-lazy class will be initialized eagerly when the
-Objective-C runtime is loaded. This is required for certain system classes which
-have instances allocated in non-standard ways, such as the classes for blocks
-and constant strings. Adding this attribute is essentially equivalent to
-providing a trivial `+load` method but avoids the (fairly small) load-time
-overheads associated with defining and calling such a method.
-
-
-objc_runtime_name
------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``objc_runtime_name``","``clang::objc_runtime_name``","``clang::objc_runtime_name``","","","","Yes"
-
-By default, the Objective-C interface or protocol identifier is used
-in the metadata name for that object. The `objc_runtime_name`
-attribute allows annotated interfaces or protocols to use the
-specified string argument in the object's metadata name instead of the
-default name.
-
-**Usage**: ``__attribute__((objc_runtime_name("MyLocalName")))``.  This attribute
-can only be placed before an @protocol or @interface declaration:
-
-.. code-block:: objc
-
-  __attribute__((objc_runtime_name("MyLocalName")))
-  @interface Message
-  @end
-
-
-objc_runtime_visible
---------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``objc_runtime_visible``","``clang::objc_runtime_visible``","``clang::objc_runtime_visible``","","","","Yes"
-
-This attribute specifies that the Objective-C class to which it applies is
-visible to the Objective-C runtime but not to the linker. Classes annotated
-with this attribute cannot be subclassed and cannot have categories defined for
-them.
-
-
-objc_subclassing_restricted
----------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``objc_subclassing_restricted``","``clang::objc_subclassing_restricted``","``clang::objc_subclassing_restricted``","","","","Yes"
-
-This attribute can be added to an Objective-C ``@interface`` declaration to
-ensure that this class cannot be subclassed.
-
-
-selectany
----------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``selectany``","``gnu::selectany``","","``selectany``","","",""
-
-This attribute appertains to a global symbol, causing it to have a weak
-definition (
-`linkonce <https://llvm.org/docs/LangRef.html#linkage-types>`_
-), allowing the linker to select any definition.
-
-For more information see
-`gcc documentation <https://gcc.gnu.org/onlinedocs/gcc-7.2.0/gcc/Microsoft-Windows-Variable-Attributes.html>`_
-or `msvc documentation <https://docs.microsoft.com/pl-pl/cpp/cpp/selectany>`_.
-
-
-transparent_union
------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``transparent_union``","``gnu::transparent_union``","","","","",""
-
-This attribute can be applied to a union to change the behaviour of calls to
-functions that have an argument with a transparent union type. The compiler
-behaviour is changed in the following manner:
-
-- A value whose type is any member of the transparent union can be passed as an
-  argument without the need to cast that value.
-
-- The argument is passed to the function using the calling convention of the
-  first member of the transparent union. Consequently, all the members of the
-  transparent union should have the same calling convention as its first member.
-
-Transparent unions are not supported in C++.
-
-
-trivial_abi
------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``trivial_abi``","``clang::trivial_abi``","","","","","Yes"
-
-The ``trivial_abi`` attribute can be applied to a C++ class, struct, or union.
-It instructs the compiler to pass and return the type using the C ABI for the
-underlying type when the type would otherwise be considered non-trivial for the
-purpose of calls.
-A class annotated with `trivial_abi` can have non-trivial destructors or copy/move constructors without automatically becoming non-trivial for the purposes of calls. For example:
-
-  .. code-block:: c++
-
-    // A is trivial for the purposes of calls because `trivial_abi` makes the
-    // user-provided special functions trivial.
-    struct __attribute__((trivial_abi)) A {
-      ~A();
-      A(const A &);
-      A(A &&);
-      int x;
-    };
-
-    // B's destructor and copy/move constructor are considered trivial for the
-    // purpose of calls because A is trivial.
-    struct B {
-      A a;
-    };
-
-If a type is trivial for the purposes of calls, has a non-trivial destructor,
-and is passed as an argument by value, the convention is that the callee will
-destroy the object before returning.
-
-Attribute ``trivial_abi`` has no effect in the following cases:
-
-- The class directly declares a virtual base or virtual methods.
-- The class has a base class that is non-trivial for the purposes of calls.
-- The class has a non-static data member whose type is non-trivial for the purposes of calls, which includes:
-
-  - classes that are non-trivial for the purposes of calls
-  - __weak-qualified types in Objective-C++
-  - arrays of any of the above
-
-
-AMD GPU Attributes
-==================
-
-
-amdgpu_flat_work_group_size
----------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``amdgpu_flat_work_group_size``","``clang::amdgpu_flat_work_group_size``","","","","","Yes"
-
-The flat work-group size is the number of work-items in the work-group size
-specified when the kernel is dispatched. It is the product of the sizes of the
-x, y, and z dimension of the work-group.
-
-Clang supports the
-``__attribute__((amdgpu_flat_work_group_size(<min>, <max>)))`` attribute for the
-AMDGPU target. This attribute may be attached to a kernel function definition
-and is an optimization hint.
-
-``<min>`` parameter specifies the minimum flat work-group size, and ``<max>``
-parameter specifies the maximum flat work-group size (must be greater than
-``<min>``) to which all dispatches of the kernel will conform. Passing ``0, 0``
-as ``<min>, <max>`` implies the default behavior (``128, 256``).
-
-If specified, the AMDGPU target backend might be able to produce better machine
-code for barriers and perform scratch promotion by estimating available group
-segment size.
-
-An error will be given if:
-  - Specified values violate subtarget specifications;
-  - Specified values are not compatible with values provided through other
-    attributes.
-
-
-amdgpu_num_sgpr
----------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``amdgpu_num_sgpr``","``clang::amdgpu_num_sgpr``","","","","","Yes"
-
-Clang supports the ``__attribute__((amdgpu_num_sgpr(<num_sgpr>)))`` and
-``__attribute__((amdgpu_num_vgpr(<num_vgpr>)))`` attributes for the AMDGPU
-target. These attributes may be attached to a kernel function definition and are
-an optimization hint.
-
-If these attributes are specified, then the AMDGPU target backend will attempt
-to limit the number of SGPRs and/or VGPRs used to the specified value(s). The
-number of used SGPRs and/or VGPRs may further be rounded up to satisfy the
-allocation requirements or constraints of the subtarget. Passing ``0`` as
-``num_sgpr`` and/or ``num_vgpr`` implies the default behavior (no limits).
-
-These attributes can be used to test the AMDGPU target backend. It is
-recommended that the ``amdgpu_waves_per_eu`` attribute be used to control
-resources such as SGPRs and VGPRs since it is aware of the limits for different
-subtargets.
-
-An error will be given if:
-  - Specified values violate subtarget specifications;
-  - Specified values are not compatible with values provided through other
-    attributes;
-  - The AMDGPU target backend is unable to create machine code that can meet the
-    request.
-
-
-amdgpu_num_vgpr
----------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``amdgpu_num_vgpr``","``clang::amdgpu_num_vgpr``","","","","","Yes"
-
-Clang supports the ``__attribute__((amdgpu_num_sgpr(<num_sgpr>)))`` and
-``__attribute__((amdgpu_num_vgpr(<num_vgpr>)))`` attributes for the AMDGPU
-target. These attributes may be attached to a kernel function definition and are
-an optimization hint.
-
-If these attributes are specified, then the AMDGPU target backend will attempt
-to limit the number of SGPRs and/or VGPRs used to the specified value(s). The
-number of used SGPRs and/or VGPRs may further be rounded up to satisfy the
-allocation requirements or constraints of the subtarget. Passing ``0`` as
-``num_sgpr`` and/or ``num_vgpr`` implies the default behavior (no limits).
-
-These attributes can be used to test the AMDGPU target backend. It is
-recommended that the ``amdgpu_waves_per_eu`` attribute be used to control
-resources such as SGPRs and VGPRs since it is aware of the limits for different
-subtargets.
-
-An error will be given if:
-  - Specified values violate subtarget specifications;
-  - Specified values are not compatible with values provided through other
-    attributes;
-  - The AMDGPU target backend is unable to create machine code that can meet the
-    request.
-
-
-amdgpu_waves_per_eu
--------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``amdgpu_waves_per_eu``","``clang::amdgpu_waves_per_eu``","","","","","Yes"
-
-A compute unit (CU) is responsible for executing the wavefronts of a work-group.
-It is composed of one or more execution units (EU), which are responsible for
-executing the wavefronts. An EU can have enough resources to maintain the state
-of more than one executing wavefront. This allows an EU to hide latency by
-switching between wavefronts in a similar way to symmetric multithreading on a
-CPU. In order to allow the state for multiple wavefronts to fit on an EU, the
-resources used by a single wavefront have to be limited. For example, the number
-of SGPRs and VGPRs. Limiting such resources can allow greater latency hiding,
-but can result in having to spill some register state to memory.
-
-Clang supports the ``__attribute__((amdgpu_waves_per_eu(<min>[, <max>])))``
-attribute for the AMDGPU target. This attribute may be attached to a kernel
-function definition and is an optimization hint.
-
-``<min>`` parameter specifies the requested minimum number of waves per EU, and
-*optional* ``<max>`` parameter specifies the requested maximum number of waves
-per EU (must be greater than ``<min>`` if specified). If ``<max>`` is omitted,
-then there is no restriction on the maximum number of waves per EU other than
-the one dictated by the hardware for which the kernel is compiled. Passing
-``0, 0`` as ``<min>, <max>`` implies the default behavior (no limits).
-
-If specified, this attribute allows an advanced developer to tune the number of
-wavefronts that are capable of fitting within the resources of an EU. The AMDGPU
-target backend can use this information to limit resources, such as number of
-SGPRs, number of VGPRs, size of available group and private memory segments, in
-such a way that guarantees that at least ``<min>`` wavefronts and at most
-``<max>`` wavefronts are able to fit within the resources of an EU. Requesting
-more wavefronts can hide memory latency but limits available registers which
-can result in spilling. Requesting fewer wavefronts can help reduce cache
-thrashing, but can reduce memory latency hiding.
-
-This attribute controls the machine code generated by the AMDGPU target backend
-to ensure it is capable of meeting the requested values. However, when the
-kernel is executed, there may be other reasons that prevent meeting the request,
-for example, there may be wavefronts from other kernels executing on the EU.
-
-An error will be given if:
-  - Specified values violate subtarget specifications;
-  - Specified values are not compatible with values provided through other
-    attributes;
-  - The AMDGPU target backend is unable to create machine code that can meet the
-    request.
-
-
-Calling Conventions
-===================
-Clang supports several different calling conventions, depending on the target
-platform and architecture. The calling convention used for a function determines
-how parameters are passed, how results are returned to the caller, and other
-low-level details of calling a function.
-
-aarch64_vector_pcs
-------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``aarch64_vector_pcs``","``clang::aarch64_vector_pcs``","``clang::aarch64_vector_pcs``","","","",""
-
-On AArch64 targets, this attribute changes the calling convention of a
-function to preserve additional floating-point and Advanced SIMD registers
-relative to the default calling convention used for AArch64.
-
-This means it is more efficient to call such functions from code that performs
-extensive floating-point and vector calculations, because fewer live SIMD and FP
-registers need to be saved. This property makes it well-suited for e.g.
-floating-point or vector math library functions, which are typically leaf
-functions that require a small number of registers.
-
-However, using this attribute also means that it is more expensive to call
-a function that adheres to the default calling convention from within such
-a function. Therefore, it is recommended that this attribute is only used
-for leaf functions.
-
-For more information, see the documentation for `aarch64_vector_pcs`_ on
-the Arm Developer website.
-
-.. _`aarch64_vector_pcs`: https://developer.arm.com/products/software-development-tools/hpc/arm-compiler-for-hpc/vector-function-abi
-
-
-fastcall
---------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``fastcall``","``gnu::fastcall``","","","``__fastcall`` |br| ``_fastcall``","",""
-
-On 32-bit x86 targets, this attribute changes the calling convention of a
-function to use ECX and EDX as register parameters and clear parameters off of
-the stack on return. This convention does not support variadic calls or
-unprototyped functions in C, and has no effect on x86_64 targets. This calling
-convention is supported primarily for compatibility with existing code. Users
-seeking register parameters should use the ``regparm`` attribute, which does
-not require callee-cleanup.  See the documentation for `__fastcall`_ on MSDN.
-
-.. _`__fastcall`: http://msdn.microsoft.com/en-us/library/6xa169sk.aspx
-
-
-ms_abi
-------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``ms_abi``","``gnu::ms_abi``","","","","",""
-
-On non-Windows x86_64 targets, this attribute changes the calling convention of
-a function to match the default convention used on Windows x86_64. This
-attribute has no effect on Windows targets or non-x86_64 targets.
-
-
-pcs
----
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``pcs``","``gnu::pcs``","","","","",""
-
-On ARM targets, this attribute can be used to select calling conventions
-similar to ``stdcall`` on x86. Valid parameter values are "aapcs" and
-"aapcs-vfp".
-
-
-preserve_all
-------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``preserve_all``","``clang::preserve_all``","``clang::preserve_all``","","","",""
-
-On X86-64 and AArch64 targets, this attribute changes the calling convention of
-a function. The ``preserve_all`` calling convention attempts to make the code
-in the caller even less intrusive than the ``preserve_most`` calling convention.
-This calling convention also behaves identical to the ``C`` calling convention
-on how arguments and return values are passed, but it uses a different set of
-caller/callee-saved registers. This removes the burden of saving and
-recovering a large register set before and after the call in the caller. If
-the arguments are passed in callee-saved registers, then they will be
-preserved by the callee across the call. This doesn't apply for values
-returned in callee-saved registers.
-
-- On X86-64 the callee preserves all general purpose registers, except for
-  R11. R11 can be used as a scratch register. Furthermore it also preserves
-  all floating-point registers (XMMs/YMMs).
-
-The idea behind this convention is to support calls to runtime functions
-that don't need to call out to any other functions.
-
-This calling convention, like the ``preserve_most`` calling convention, will be
-used by a future version of the Objective-C runtime and should be considered
-experimental at this time.
-
-
-preserve_most
--------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``preserve_most``","``clang::preserve_most``","``clang::preserve_most``","","","",""
-
-On X86-64 and AArch64 targets, this attribute changes the calling convention of
-a function. The ``preserve_most`` calling convention attempts to make the code
-in the caller as unintrusive as possible. This convention behaves identically
-to the ``C`` calling convention on how arguments and return values are passed,
-but it uses a different set of caller/callee-saved registers. This alleviates
-the burden of saving and recovering a large register set before and after the
-call in the caller. If the arguments are passed in callee-saved registers,
-then they will be preserved by the callee across the call. This doesn't
-apply for values returned in callee-saved registers.
-
-- On X86-64 the callee preserves all general purpose registers, except for
-  R11. R11 can be used as a scratch register. Floating-point registers
-  (XMMs/YMMs) are not preserved and need to be saved by the caller.
-
-The idea behind this convention is to support calls to runtime functions
-that have a hot path and a cold path. The hot path is usually a small piece
-of code that doesn't use many registers. The cold path might need to call out to
-another function and therefore only needs to preserve the caller-saved
-registers, which haven't already been saved by the caller. The
-`preserve_most` calling convention is very similar to the ``cold`` calling
-convention in terms of caller/callee-saved registers, but they are used for
-different types of function calls. ``coldcc`` is for function calls that are
-rarely executed, whereas `preserve_most` function calls are intended to be
-on the hot path and definitely executed a lot. Furthermore ``preserve_most``
-doesn't prevent the inliner from inlining the function call.
-
-This calling convention will be used by a future version of the Objective-C
-runtime and should therefore still be considered experimental at this time.
-Although this convention was created to optimize certain runtime calls to
-the Objective-C runtime, it is not limited to this runtime and might be used
-by other runtimes in the future too. The current implementation only
-supports X86-64 and AArch64, but the intention is to support more architectures
-in the future.
-
-
-regcall
--------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``regcall``","``gnu::regcall``","","","``__regcall``","",""
-
-On x86 targets, this attribute changes the calling convention to
-`__regcall`_ convention. This convention aims to pass as many arguments
-as possible in registers. It also tries to utilize registers for the
-return value whenever it is possible.
-
-.. _`__regcall`: https://software.intel.com/en-us/node/693069
-
-
-regparm
--------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``regparm``","``gnu::regparm``","","","","",""
-
-On 32-bit x86 targets, the regparm attribute causes the compiler to pass
-the first three integer parameters in EAX, EDX, and ECX instead of on the
-stack. This attribute has no effect on variadic functions, and all parameters
-are passed via the stack as normal.
-
-
-stdcall
--------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``stdcall``","``gnu::stdcall``","","","``__stdcall`` |br| ``_stdcall``","",""
-
-On 32-bit x86 targets, this attribute changes the calling convention of a
-function to clear parameters off of the stack on return. This convention does
-not support variadic calls or unprototyped functions in C, and has no effect on
-x86_64 targets. This calling convention is used widely by the Windows API and
-COM applications.  See the documentation for `__stdcall`_ on MSDN.
-
-.. _`__stdcall`: http://msdn.microsoft.com/en-us/library/zxk0tw93.aspx
-
-
-thiscall
---------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``thiscall``","``gnu::thiscall``","","","``__thiscall`` |br| ``_thiscall``","",""
-
-On 32-bit x86 targets, this attribute changes the calling convention of a
-function to use ECX for the first parameter (typically the implicit ``this``
-parameter of C++ methods) and clear parameters off of the stack on return. This
-convention does not support variadic calls or unprototyped functions in C, and
-has no effect on x86_64 targets. See the documentation for `__thiscall`_ on
-MSDN.
-
-.. _`__thiscall`: http://msdn.microsoft.com/en-us/library/ek8tkfbw.aspx
-
-
-vectorcall
-----------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``vectorcall``","``clang::vectorcall``","``clang::vectorcall``","","``__vectorcall`` |br| ``_vectorcall``","",""
-
-On 32-bit x86 *and* x86_64 targets, this attribute changes the calling
-convention of a function to pass vector parameters in SSE registers.
-
-On 32-bit x86 targets, this calling convention is similar to ``__fastcall``.
-The first two integer parameters are passed in ECX and EDX. Subsequent integer
-parameters are passed in memory, and callee clears the stack.  On x86_64
-targets, the callee does *not* clear the stack, and integer parameters are
-passed in RCX, RDX, R8, and R9 as is done for the default Windows x64 calling
-convention.
-
-On both 32-bit x86 and x86_64 targets, vector and floating point arguments are
-passed in XMM0-XMM5. Homogeneous vector aggregates of up to four elements are
-passed in sequential SSE registers if enough are available. If AVX is enabled,
-256 bit vectors are passed in YMM0-YMM5. Any vector or aggregate type that
-cannot be passed in registers for any reason is passed by reference, which
-allows the caller to align the parameter memory.
-
-See the documentation for `__vectorcall`_ on MSDN for more details.
-
-.. _`__vectorcall`: http://msdn.microsoft.com/en-us/library/dn375768.aspx
-
-
-Consumed Annotation Checking
-============================
-Clang supports additional attributes for checking basic resource management
-properties, specifically for unique objects that have a single owning reference.
-The following attributes are currently supported, although **the implementation
-for these annotations is currently in development and are subject to change.**
-
-callable_when
--------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``callable_when``","``clang::callable_when``","","","","","Yes"
-
-Use ``__attribute__((callable_when(...)))`` to indicate what states a method
-may be called in.  Valid states are unconsumed, consumed, or unknown.  Each
-argument to this attribute must be a quoted string.  E.g.:
-
-``__attribute__((callable_when("unconsumed", "unknown")))``
-
-
-consumable
-----------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``consumable``","``clang::consumable``","","","","","Yes"
-
-Each ``class`` that uses any of the typestate annotations must first be marked
-using the ``consumable`` attribute.  Failure to do so will result in a warning.
-
-This attribute accepts a single parameter that must be one of the following:
-``unknown``, ``consumed``, or ``unconsumed``.
-
-
-param_typestate
----------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``param_typestate``","``clang::param_typestate``","","","","","Yes"
-
-This attribute specifies expectations about function parameters.  Calls to an
-function with annotated parameters will issue a warning if the corresponding
-argument isn't in the expected state.  The attribute is also used to set the
-initial state of the parameter when analyzing the function's body.
-
-
-return_typestate
-----------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``return_typestate``","``clang::return_typestate``","","","","","Yes"
-
-The ``return_typestate`` attribute can be applied to functions or parameters.
-When applied to a function the attribute specifies the state of the returned
-value.  The function's body is checked to ensure that it always returns a value
-in the specified state.  On the caller side, values returned by the annotated
-function are initialized to the given state.
-
-When applied to a function parameter it modifies the state of an argument after
-a call to the function returns.  The function's body is checked to ensure that
-the parameter is in the expected state before returning.
-
-
-set_typestate
--------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``set_typestate``","``clang::set_typestate``","","","","","Yes"
-
-Annotate methods that transition an object into a new state with
-``__attribute__((set_typestate(new_state)))``.  The new state must be
-unconsumed, consumed, or unknown.
-
-
-test_typestate
---------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``test_typestate``","``clang::test_typestate``","","","","","Yes"
-
-Use ``__attribute__((test_typestate(tested_state)))`` to indicate that a method
-returns true if the object is in the specified state..
-
-
-Type Safety Checking
-====================
-Clang supports additional attributes to enable checking type safety properties
-that can't be enforced by the C type system. To see warnings produced by these
-checks, ensure that -Wtype-safety is enabled. Use cases include:
-
-* MPI library implementations, where these attributes enable checking that
-  the buffer type matches the passed ``MPI_Datatype``;
-* for HDF5 library there is a similar use case to MPI;
-* checking types of variadic functions' arguments for functions like
-  ``fcntl()`` and ``ioctl()``.
-
-You can detect support for these attributes with ``__has_attribute()``.  For
-example:
-
-.. code-block:: c++
-
-  #if defined(__has_attribute)
-  #  if __has_attribute(argument_with_type_tag) && \
-        __has_attribute(pointer_with_type_tag) && \
-        __has_attribute(type_tag_for_datatype)
-  #    define ATTR_MPI_PWT(buffer_idx, type_idx) __attribute__((pointer_with_type_tag(mpi,buffer_idx,type_idx)))
-  /* ... other macros ...  */
-  #  endif
-  #endif
-
-  #if !defined(ATTR_MPI_PWT)
-  # define ATTR_MPI_PWT(buffer_idx, type_idx)
-  #endif
-
-  int MPI_Send(void *buf, int count, MPI_Datatype datatype /*, other args omitted */)
-      ATTR_MPI_PWT(1,3);
-
-argument_with_type_tag
-----------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``argument_with_type_tag`` |br| ``pointer_with_type_tag``","``clang::argument_with_type_tag`` |br| ``clang::pointer_with_type_tag``","``clang::argument_with_type_tag`` |br| ``clang::pointer_with_type_tag``","","","",""
-
-Use ``__attribute__((argument_with_type_tag(arg_kind, arg_idx,
-type_tag_idx)))`` on a function declaration to specify that the function
-accepts a type tag that determines the type of some other argument.
-
-This attribute is primarily useful for checking arguments of variadic functions
-(``pointer_with_type_tag`` can be used in most non-variadic cases).
-
-In the attribute prototype above:
-  * ``arg_kind`` is an identifier that should be used when annotating all
-    applicable type tags.
-  * ``arg_idx`` provides the position of a function argument. The expected type of
-    this function argument will be determined by the function argument specified
-    by ``type_tag_idx``. In the code example below, "3" means that the type of the
-    function's third argument will be determined by ``type_tag_idx``.
-  * ``type_tag_idx`` provides the position of a function argument. This function
-    argument will be a type tag. The type tag will determine the expected type of
-    the argument specified by ``arg_idx``. In the code example below, "2" means
-    that the type tag associated with the function's second argument should agree
-    with the type of the argument specified by ``arg_idx``.
-
-For example:
-
-.. code-block:: c++
-
-  int fcntl(int fd, int cmd, ...)
-      __attribute__(( argument_with_type_tag(fcntl,3,2) ));
-  // The function's second argument will be a type tag; this type tag will
-  // determine the expected type of the function's third argument.
-
-
-pointer_with_type_tag
----------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``argument_with_type_tag`` |br| ``pointer_with_type_tag``","``clang::argument_with_type_tag`` |br| ``clang::pointer_with_type_tag``","``clang::argument_with_type_tag`` |br| ``clang::pointer_with_type_tag``","","","",""
-
-Use ``__attribute__((pointer_with_type_tag(ptr_kind, ptr_idx, type_tag_idx)))``
-on a function declaration to specify that the function accepts a type tag that
-determines the pointee type of some other pointer argument.
-
-In the attribute prototype above:
-  * ``ptr_kind`` is an identifier that should be used when annotating all
-    applicable type tags.
-  * ``ptr_idx`` provides the position of a function argument; this function
-    argument will have a pointer type. The expected pointee type of this pointer
-    type will be determined by the function argument specified by
-    ``type_tag_idx``. In the code example below, "1" means that the pointee type
-    of the function's first argument will be determined by ``type_tag_idx``.
-  * ``type_tag_idx`` provides the position of a function argument; this function
-    argument will be a type tag. The type tag will determine the expected pointee
-    type of the pointer argument specified by ``ptr_idx``. In the code example
-    below, "3" means that the type tag associated with the function's third
-    argument should agree with the pointee type of the pointer argument specified
-    by ``ptr_idx``.
-
-For example:
-
-.. code-block:: c++
-
-  typedef int MPI_Datatype;
-  int MPI_Send(void *buf, int count, MPI_Datatype datatype /*, other args omitted */)
-      __attribute__(( pointer_with_type_tag(mpi,1,3) ));
-  // The function's 3rd argument will be a type tag; this type tag will
-  // determine the expected pointee type of the function's 1st argument.
-
-
-type_tag_for_datatype
----------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``type_tag_for_datatype``","``clang::type_tag_for_datatype``","``clang::type_tag_for_datatype``","","","",""
-
-When declaring a variable, use
-``__attribute__((type_tag_for_datatype(kind, type)))`` to create a type tag that
-is tied to the ``type`` argument given to the attribute.
-
-In the attribute prototype above:
-  * ``kind`` is an identifier that should be used when annotating all applicable
-    type tags.
-  * ``type`` indicates the name of the type.
-
-Clang supports annotating type tags of two forms.
-
-  * **Type tag that is a reference to a declared identifier.**
-    Use ``__attribute__((type_tag_for_datatype(kind, type)))`` when declaring that
-    identifier:
-
-    .. code-block:: c++
-
-      typedef int MPI_Datatype;
-      extern struct mpi_datatype mpi_datatype_int
-          __attribute__(( type_tag_for_datatype(mpi,int) ));
-      #define MPI_INT ((MPI_Datatype) &mpi_datatype_int)
-      // &mpi_datatype_int is a type tag. It is tied to type "int".
-
-  * **Type tag that is an integral literal.**
-    Declare a ``static const`` variable with an initializer value and attach
-    ``__attribute__((type_tag_for_datatype(kind, type)))`` on that declaration:
-
-    .. code-block:: c++
-
-      typedef int MPI_Datatype;
-      static const MPI_Datatype mpi_datatype_int
-          __attribute__(( type_tag_for_datatype(mpi,int) )) = 42;
-      #define MPI_INT ((MPI_Datatype) 42)
-      // The number 42 is a type tag. It is tied to type "int".
-
-
-The ``type_tag_for_datatype`` attribute also accepts an optional third argument
-that determines how the type of the function argument specified by either
-``arg_idx`` or ``ptr_idx`` is compared against the type associated with the type
-tag. (Recall that for the ``argument_with_type_tag`` attribute, the type of the
-function argument specified by ``arg_idx`` is compared against the type
-associated with the type tag. Also recall that for the ``pointer_with_type_tag``
-attribute, the pointee type of the function argument specified by ``ptr_idx`` is
-compared against the type associated with the type tag.) There are two supported
-values for this optional third argument:
-
-  * ``layout_compatible`` will cause types to be compared according to
-    layout-compatibility rules (In C++11 [class.mem] p 17, 18, see the
-    layout-compatibility rules for two standard-layout struct types and for two
-    standard-layout union types). This is useful when creating a type tag
-    associated with a struct or union type. For example:
-
-    .. code-block:: c++
-
-      /* In mpi.h */
-      typedef int MPI_Datatype;
-      struct internal_mpi_double_int { double d; int i; };
-      extern struct mpi_datatype mpi_datatype_double_int
-          __attribute__(( type_tag_for_datatype(mpi,
-                          struct internal_mpi_double_int, layout_compatible) ));
-
-      #define MPI_DOUBLE_INT ((MPI_Datatype) &mpi_datatype_double_int)
-
-      int MPI_Send(void *buf, int count, MPI_Datatype datatype, ...)
-          __attribute__(( pointer_with_type_tag(mpi,1,3) ));
-
-      /* In user code */
-      struct my_pair { double a; int b; };
-      struct my_pair *buffer;
-      MPI_Send(buffer, 1, MPI_DOUBLE_INT /*, ...  */); // no warning because the
-                                                       // layout of my_pair is
-                                                       // compatible with that of
-                                                       // internal_mpi_double_int
-
-      struct my_int_pair { int a; int b; }
-      struct my_int_pair *buffer2;
-      MPI_Send(buffer2, 1, MPI_DOUBLE_INT /*, ...  */); // warning because the
-                                                        // layout of my_int_pair
-                                                        // does not match that of
-                                                        // internal_mpi_double_int
-
-  * ``must_be_null`` specifies that the function argument specified by either
-    ``arg_idx`` (for the ``argument_with_type_tag`` attribute) or ``ptr_idx`` (for
-    the ``pointer_with_type_tag`` attribute) should be a null pointer constant.
-    The second argument to the ``type_tag_for_datatype`` attribute is ignored. For
-    example:
-
-    .. code-block:: c++
-
-      /* In mpi.h */
-      typedef int MPI_Datatype;
-      extern struct mpi_datatype mpi_datatype_null
-          __attribute__(( type_tag_for_datatype(mpi, void, must_be_null) ));
-
-      #define MPI_DATATYPE_NULL ((MPI_Datatype) &mpi_datatype_null)
-      int MPI_Send(void *buf, int count, MPI_Datatype datatype, ...)
-          __attribute__(( pointer_with_type_tag(mpi,1,3) ));
-
-      /* In user code */
-      struct my_pair { double a; int b; };
-      struct my_pair *buffer;
-      MPI_Send(buffer, 1, MPI_DATATYPE_NULL /*, ...  */); // warning: MPI_DATATYPE_NULL
-                                                          // was specified but buffer
-                                                          // is not a null pointer
-
-
-OpenCL Address Spaces
-=====================
-The address space qualifier may be used to specify the region of memory that is
-used to allocate the object. OpenCL supports the following address spaces:
-__generic(generic), __global(global), __local(local), __private(private),
-__constant(constant).
-
-  .. code-block:: c
-
-    __constant int c = ...;
-
-    __generic int* foo(global int* g) {
-      __local int* l;
-      private int p;
-      ...
-      return l;
-    }
-
-More details can be found in the OpenCL C language Spec v2.0, Section 6.5.
-
-__constant, constant, [[clang::opencl_constant]]
-------------------------------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``opencl_constant``","``clang::opencl_constant``","``clang::opencl_constant``","","``__constant`` |br| ``constant``","",""
-
-The constant address space attribute signals that an object is located in
-a constant (non-modifiable) memory region. It is available to all work items.
-Any type can be annotated with the constant address space attribute. Objects
-with the constant address space qualifier can be declared in any scope and must
-have an initializer.
-
-
-__generic, generic, [[clang::opencl_generic]]
----------------------------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``opencl_generic``","``clang::opencl_generic``","``clang::opencl_generic``","","``__generic`` |br| ``generic``","",""
-
-The generic address space attribute is only available with OpenCL v2.0 and later.
-It can be used with pointer types. Variables in global and local scope and
-function parameters in non-kernel functions can have the generic address space
-type attribute. It is intended to be a placeholder for any other address space
-except for '__constant' in OpenCL code which can be used with multiple address
-spaces.
-
-
-__global, global, [[clang::opencl_global]]
-------------------------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``opencl_global``","``clang::opencl_global``","``clang::opencl_global``","","``__global`` |br| ``global``","",""
-
-The global address space attribute specifies that an object is allocated in
-global memory, which is accessible by all work items. The content stored in this
-memory area persists between kernel executions. Pointer types to the global
-address space are allowed as function parameters or local variables. Starting
-with OpenCL v2.0, the global address space can be used with global (program
-scope) variables and static local variable as well.
-
-
-__local, local, [[clang::opencl_local]]
----------------------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``opencl_local``","``clang::opencl_local``","``clang::opencl_local``","","``__local`` |br| ``local``","",""
-
-The local address space specifies that an object is allocated in the local (work
-group) memory area, which is accessible to all work items in the same work
-group. The content stored in this memory region is not accessible after
-the kernel execution ends. In a kernel function scope, any variable can be in
-the local address space. In other scopes, only pointer types to the local address
-space are allowed. Local address space variables cannot have an initializer.
-
-
-__private, private, [[clang::opencl_private]]
----------------------------------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``opencl_private``","``clang::opencl_private``","``clang::opencl_private``","","``__private`` |br| ``private``","",""
-
-The private address space specifies that an object is allocated in the private
-(work item) memory. Other work items cannot access the same memory area and its
-content is destroyed after work item execution ends. Local variables can be
-declared in the private address space. Function arguments are always in the
-private address space. Kernel function arguments of a pointer or an array type
-cannot point to the private address space.
-
-
-Nullability Attributes
-======================
-Whether a particular pointer may be "null" is an important concern when working with pointers in the C family of languages. The various nullability attributes indicate whether a particular pointer can be null or not, which makes APIs more expressive and can help static analysis tools identify bugs involving null pointers. Clang supports several kinds of nullability attributes: the ``nonnull`` and ``returns_nonnull`` attributes indicate which function or method parameters and result types can never be null, while nullability type qualifiers indicate which pointer types can be null (``_Nullable``) or cannot be null (``_Nonnull``).
-
-The nullability (type) qualifiers express whether a value of a given pointer type can be null (the ``_Nullable`` qualifier), doesn't have a defined meaning for null (the ``_Nonnull`` qualifier), or for which the purpose of null is unclear (the ``_Null_unspecified`` qualifier). Because nullability qualifiers are expressed within the type system, they are more general than the ``nonnull`` and ``returns_nonnull`` attributes, allowing one to express (for example) a nullable pointer to an array of nonnull pointers. Nullability qualifiers are written to the right of the pointer to which they apply. For example:
-
-  .. code-block:: c
-
-    // No meaningful result when 'ptr' is null (here, it happens to be undefined behavior).
-    int fetch(int * _Nonnull ptr) { return *ptr; }
-
-    // 'ptr' may be null.
-    int fetch_or_zero(int * _Nullable ptr) {
-      return ptr ? *ptr : 0;
-    }
-
-    // A nullable pointer to non-null pointers to const characters.
-    const char *join_strings(const char * _Nonnull * _Nullable strings, unsigned n);
-
-In Objective-C, there is an alternate spelling for the nullability qualifiers that can be used in Objective-C methods and properties using context-sensitive, non-underscored keywords. For example:
-
-  .. code-block:: objective-c
-
-    @interface NSView : NSResponder
-      - (nullable NSView *)ancestorSharedWithView:(nonnull NSView *)aView;
-      @property (assign, nullable) NSView *superview;
-      @property (readonly, nonnull) NSArray *subviews;
-    @end
-
-_Nonnull
---------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "","","","","``_Nonnull``","",""
-
-The ``_Nonnull`` nullability qualifier indicates that null is not a meaningful value for a value of the ``_Nonnull`` pointer type. For example, given a declaration such as:
-
-  .. code-block:: c
-
-    int fetch(int * _Nonnull ptr);
-
-a caller of ``fetch`` should not provide a null value, and the compiler will produce a warning if it sees a literal null value passed to ``fetch``. Note that, unlike the declaration attribute ``nonnull``, the presence of ``_Nonnull`` does not imply that passing null is undefined behavior: ``fetch`` is free to consider null undefined behavior or (perhaps for backward-compatibility reasons) defensively handle null.
-
-
-_Null_unspecified
------------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "","","","","``_Null_unspecified``","",""
-
-The ``_Null_unspecified`` nullability qualifier indicates that neither the ``_Nonnull`` nor ``_Nullable`` qualifiers make sense for a particular pointer type. It is used primarily to indicate that the role of null with specific pointers in a nullability-annotated header is unclear, e.g., due to overly-complex implementations or historical factors with a long-lived API.
-
-
-_Nullable
----------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "","","","","``_Nullable``","",""
-
-The ``_Nullable`` nullability qualifier indicates that a value of the ``_Nullable`` pointer type can be null. For example, given:
-
-  .. code-block:: c
-
-    int fetch_or_zero(int * _Nullable ptr);
-
-a caller of ``fetch_or_zero`` can provide null.
-
-
-nonnull
--------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``nonnull``","``gnu::nonnull``","","","","",""
-
-The ``nonnull`` attribute indicates that some function parameters must not be null, and can be used in several different ways. It's original usage (`from GCC <https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common-Function-Attributes>`_) is as a function (or Objective-C method) attribute that specifies which parameters of the function are nonnull in a comma-separated list. For example:
-
-  .. code-block:: c
-
-    extern void * my_memcpy (void *dest, const void *src, size_t len)
-                    __attribute__((nonnull (1, 2)));
-
-Here, the ``nonnull`` attribute indicates that parameters 1 and 2
-cannot have a null value. Omitting the parenthesized list of parameter indices means that all parameters of pointer type cannot be null:
-
-  .. code-block:: c
-
-    extern void * my_memcpy (void *dest, const void *src, size_t len)
-                    __attribute__((nonnull));
-
-Clang also allows the ``nonnull`` attribute to be placed directly on a function (or Objective-C method) parameter, eliminating the need to specify the parameter index ahead of type. For example:
-
-  .. code-block:: c
-
-    extern void * my_memcpy (void *dest __attribute__((nonnull)),
-                             const void *src __attribute__((nonnull)), size_t len);
-
-Note that the ``nonnull`` attribute indicates that passing null to a non-null parameter is undefined behavior, which the optimizer may take advantage of to, e.g., remove null checks. The ``_Nonnull`` type qualifier indicates that a pointer cannot be null in a more general manner (because it is part of the type system) and does not imply undefined behavior, making it more widely applicable.
-
-
-returns_nonnull
----------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``returns_nonnull``","``gnu::returns_nonnull``","","","","","Yes"
-
-The ``returns_nonnull`` attribute indicates that a particular function (or Objective-C method) always returns a non-null pointer. For example, a particular system ``malloc`` might be defined to terminate a process when memory is not available rather than returning a null pointer:
-
-  .. code-block:: c
-
-    extern void * malloc (size_t size) __attribute__((returns_nonnull));
-
-The ``returns_nonnull`` attribute implies that returning a null pointer is undefined behavior, which the optimizer may take advantage of. The ``_Nonnull`` type qualifier indicates that a pointer cannot be null in a more general manner (because it is part of the type system) and does not imply undefined behavior, making it more widely applicable
-
-
-Handle Attributes
-=================
-Handles are a way to identify resources like files, sockets, and processes.
-They are more opaque than pointers and widely used in system programming. They
-have similar risks such as never releasing a resource associated with a handle,
-attempting to use a handle that was already released, or trying to release a
-handle twice. Using the annotations below it is possible to make the ownership
-of the handles clear: whose responsibility is to release them. They can also
-aid static analysis tools to find bugs.
-
-acquire_handle
---------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``acquire_handle``","``clang::acquire_handle``","``clang::acquire_handle``","","","","Yes"
-
-If this annotation is on a function or a function type it is assumed to return
-a new handle. In case this annotation is on an output parameter,
-the function is assumed to fill the corresponding argument with a new
-handle.
-
-.. code-block:: c++
-
-  // Output arguments from Zircon.
-  zx_status_t zx_socket_create(uint32_t options,
-                               zx_handle_t __attribute__((acquire_handle)) * out0,
-                               zx_handle_t* out1 [[clang::acquire_handle]]);
-
-
-  // Returned handle.
-  [[clang::acquire_handle]] int open(const char *path, int oflag, ... );
-  int open(const char *path, int oflag, ... ) __attribute__((acquire_handle));
-
-
-release_handle
---------------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``release_handle``","``clang::release_handle``","``clang::release_handle``","","","","Yes"
-
-If a function parameter is annotated with `release_handle` it is assumed to
-close the handle. It is also assumed to require an open handle to work with.
-
-.. code-block:: c++
-
-  zx_status_t zx_handle_close(zx_handle_t handle [[clang::release_handle]]);
-
-
-use_handle
-----------
-.. csv-table:: Supported Syntaxes
-   :header: "GNU", "C++11", "C2x", "``__declspec``", "Keyword", "``#pragma``", "``#pragma clang attribute``"
-
-   "``use_handle``","``clang::use_handle``","``clang::use_handle``","","","","Yes"
-
-A function taking a handle by value might close the handle. If a function
-parameter is annotated with `use_handle` it is assumed to not to change
-the state of the handle. It is also assumed to require an open handle to work with.
-
-.. code-block:: c++
-
-  zx_status_t zx_port_wait(zx_handle_t handle [[clang::use_handle]],
-                           zx_time_t deadline,
-                           zx_port_packet_t* packet);
-
-
index c59412b..1613c8e 100644 (file)
@@ -56,6 +56,18 @@ Pass the comma separated arguments in <arg> to the assembler
 
 .. option:: -Xarch\_<arg1> <arg2>
 
+.. program:: clang1
+.. option:: -Xarch\_device <arg>
+.. program:: clang
+
+Pass <arg> to the CUDA/HIP device compilation
+
+.. program:: clang2
+.. option:: -Xarch\_host <arg>
+.. program:: clang
+
+Pass <arg> to the CUDA/HIP host compilation
+
 .. option:: -Xcuda-fatbinary <arg>
 
 Pass <arg> to fatbinary invocation
@@ -142,10 +154,6 @@ Compile CUDA code for both host and device (default).  Has no effect on non-CUDA
 
 Compile CUDA code for device only
 
-.. option:: --cuda-gpu-arch=<arg>, --no-cuda-gpu-arch=<arg>
-
-CUDA GPU architecture (e.g. sm\_35).  May be specified more than once.
-
 .. option:: --cuda-host-only
 
 Compile CUDA code for host only.  Has no effect on non-CUDA compilations.
@@ -200,36 +208,16 @@ Trivial automatic variable initialization to zero is only here for benchmarks, i
 
 .. option:: -faligned-new=<arg>
 
-.. option:: -fcuda-approx-transcendentals, -fno-cuda-approx-transcendentals
-
-Use approximate transcendental functions
-
 .. option:: -fcuda-flush-denormals-to-zero, -fno-cuda-flush-denormals-to-zero
 
 Flush denormal floating point values to zero in CUDA device mode.
 
-.. option:: -fcuda-short-ptr, -fno-cuda-short-ptr
-
-Use 32-bit pointers for accessing const/local/shared address spaces.
-
 .. option:: -ffixed-r19
 
 Reserve register r19 (Hexagon only)
 
-.. option:: -fgpu-allow-device-init, -fno-gpu-allow-device-init
-
-Allow device side init function in HIP
-
-.. option:: -fgpu-rdc, -fcuda-rdc, -fno-gpu-rdc
-
-Generate relocatable device code, also known as separate compilation mode.
-
 .. option:: -fheinous-gnu-extensions
 
-.. option:: -fhip-new-launch-api, -fno-hip-new-launch-api
-
-Use new kernel launching API for HIP.
-
 .. option:: -flat\_namespace
 
 .. option:: -fopenmp-targets=<arg1>,<arg2>...
@@ -256,6 +244,10 @@ Add -rpath with architecture-specific resource directory to the linker flags
 
 Path to system blacklist file for sanitizers
 
+.. option:: -fsystem-module
+
+Build this module as a system module. Only used with -emit-module
+
 .. option:: --gcc-toolchain=<arg>, -gcc-toolchain <arg>
 
 Use the gcc toolchain at the given directory
@@ -288,6 +280,10 @@ Display help for hidden options
 
 Link clang-offload-bundler bundles for HIP
 
+.. option:: -ibuiltininc
+
+Enable builtin #include directories even when -nostdinc is used before or after -ibuiltininc. Using -nobuiltininc after the option disables it
+
 .. option:: -image\_base <arg>
 
 .. option:: -index-header-map
@@ -356,12 +352,12 @@ Don't error out if the detected version of the CUDA install is too low for the r
 
 Disable builtin #include directories
 
-.. option:: -nocudainc
-
 .. option:: -nodefaultlibs
 
 .. option:: -nofixprebinding
 
+.. option:: -nogpuinc, -nocudainc
+
 .. option:: -nogpulib, -nocudalib
 
 Do not link device library for CUDA/HIP device compilation
@@ -466,6 +462,10 @@ Only modify files with a filename contained in the provided directory path
 
 .. option:: -object
 
+.. option:: --offload-arch=<arg>, --cuda-gpu-arch=<arg>, --no-offload-arch=<arg>
+
+CUDA/HIP offloading device architecture (e.g. sm\_35, gfx906).  May be specified more than once.
+
 .. option:: -p, --profile
 
 .. option:: -pagezero\_size<arg>
@@ -526,6 +526,10 @@ Print the paths used for finding libraries and programs
 
 Print the normalized target triple
 
+.. option:: -print-targets, --print-targets
+
+Print the registered targets
+
 .. option:: -private\_bundle
 
 .. option:: -pthread, -no-pthread
@@ -810,10 +814,6 @@ Print source range spans in numeric form
 
 Discard value names in LLVM IR
 
-.. option:: -fexperimental-isel, -fno-experimental-isel
-
-Enables the experimental global instruction selector
-
 .. option:: -fexperimental-new-pass-manager, -fno-experimental-new-pass-manager
 
 Enables an experimental new pass manager in LLVM.
@@ -826,6 +826,10 @@ Enables the use of non-default rounding modes and non-default exception handling
 
 Use separate accesses for consecutive bitfield runs with legal widths and alignments.
 
+.. option:: -fglobal-isel, -fexperimental-isel, -fno-global-isel
+
+Enables the global instruction selector
+
 .. option:: -finline-functions, -fno-inline-functions
 
 Inline suitable functions
@@ -882,6 +886,14 @@ Enable control flow integrity (CFI) checks for cross-DSO calls.
 
 Generalize pointers in CFI indirect call type signature checks
 
+.. option:: -fsanitize-coverage-allowlist=<arg>
+
+Restrict sanitizer coverage instrumentation exclusively to modules and functions that match the provided special case list, except the blocked ones
+
+.. option:: -fsanitize-coverage-blocklist=<arg>
+
+Disable sanitizer coverage instrumentation for modules and functions that match the provided special case list, even the allowed ones
+
 .. option:: -fsanitize-coverage=<arg1>,<arg2>..., -fno-sanitize-coverage=<arg1>,<arg2>...
 
 Specify the type of coverage instrumentation for Sanitizers
@@ -910,11 +922,7 @@ Enable use-after-destroy detection in MemorySanitizer
 
 .. option:: -fsanitize-minimal-runtime, -fno-sanitize-minimal-runtime
 
-.. option:: -fsanitize-recover, -fno-sanitize-recover
-
-.. program:: clang1
-.. option:: -fsanitize-recover=<arg1>,<arg2>..., -fno-sanitize-recover=<arg1>,<arg2>...
-.. program:: clang
+.. option:: -fsanitize-recover=<arg1>,<arg2>..., -fno-sanitize-recover=<arg1>,<arg2>..., -fsanitize-recover (equivalent to -fsanitize-recover=all)
 
 Enable recovery for specified sanitizers
 
@@ -934,7 +942,7 @@ Enable function entry/exit instrumentation in ThreadSanitizer (default)
 
 Enable memory access instrumentation in ThreadSanitizer (default)
 
-.. option:: -fsanitize-trap=<arg1>,<arg2>..., -fno-sanitize-trap=<arg1>,<arg2>...
+.. option:: -fsanitize-trap=<arg1>,<arg2>..., -fno-sanitize-trap=<arg1>,<arg2>..., -fsanitize-trap (equivalent to -fsanitize-trap=all), -fsanitize-undefined-trap-on-error (equivalent to -fsanitize-trap=undefined)
 
 Enable trapping for specified sanitizers
 
@@ -942,8 +950,6 @@ Enable trapping for specified sanitizers
 
 Strip (or keep only, if negative) a given number of path components when emitting check metadata.
 
-.. option:: -fsanitize-undefined-trap-on-error, -fno-sanitize-undefined-trap-on-error
-
 .. option:: -fsanitize=<check>,<arg2>..., -fno-sanitize=<arg1>,<arg2>...
 
 Turn on runtime checks for various forms of undefined or suspicious behavior. See user manual for available checks
@@ -1140,6 +1146,10 @@ Path to libomptarget-nvptx libraries
 
 Path to ptxas (used for compiling CUDA code)
 
+.. option:: --rocm-path=<arg>
+
+ROCm installation path, used for finding and automatically linking required bitcode libraries.
+
 .. program:: clang1
 .. option:: -stdlib++-isystem<directory>
 .. program:: clang
@@ -1263,8 +1273,6 @@ Target-independent compilation options
 
 .. option:: -fPIE, -fno-PIE
 
-.. option:: -faccess-control, -fno-access-control
-
 .. option:: -faddrsig, -fno-addrsig
 
 Emit an address-significance table
@@ -1327,6 +1335,10 @@ Restrict code to those available for App Extensions
 
 .. option:: -fautolink, -fno-autolink
 
+.. option:: -fbasic-block-sections=<arg>
+
+Generate labels for each basic block or place each basic block or a subset of basic blocks in its own section.
+
 .. option:: -fblocks, -fno-blocks
 
 Enable the 'blocks' language feature
@@ -1347,8 +1359,6 @@ Load the clang builtins module map file.
 
 .. option:: -fc++-static-destructors, -fno-c++-static-destructors
 
-Enable C++ static destructor registration (the default)
-
 .. option:: -fcaret-diagnostics, -fno-caret-diagnostics
 
 .. option:: -fcf-protection=<arg>, -fcf-protection (equivalent to -fcf-protection=full)
@@ -1365,10 +1375,12 @@ Enable C++ builtin type char8\_t
 
 .. option:: -fcolor-diagnostics, -fno-color-diagnostics
 
-Use colors in diagnostics
+Enable colors in diagnostics
 
 .. option:: -fcommon, -fno-common
 
+Place uninitialized global variables in a common block
+
 .. option:: -fcompile-resource=<arg>, --resource <arg>, --resource=<arg>
 
 .. option:: -fconstant-cfstrings, -fno-constant-cfstrings
@@ -1405,6 +1417,14 @@ Generate instrumented code to collect context sensitive execution counts into de
 
 Generate instrumented code to collect context sensitive execution counts into <directory>/default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
 
+.. option:: -fcuda-approx-transcendentals, -fno-cuda-approx-transcendentals
+
+Use approximate transcendental functions
+
+.. option:: -fcuda-short-ptr, -fno-cuda-short-ptr
+
+Use 32-bit pointers for accessing const/local/shared address spaces
+
 .. option:: -fcxx-exceptions, -fno-cxx-exceptions
 
 Enable C++ exceptions
@@ -1413,7 +1433,7 @@ Enable C++ exceptions
 
 .. option:: -fdata-sections, -fno-data-sections
 
-Place each data in its own section (ELF Only)
+Place each data in its own section
 
 .. option:: -fdebug-compilation-dir <arg>, -fdebug-compilation-dir=<arg>
 
@@ -1425,7 +1445,7 @@ Default DWARF version to use, if a -g option caused DWARF debug info to be produ
 
 .. option:: -fdebug-info-for-profiling, -fno-debug-info-for-profiling
 
-Emit extra debug info to make sample profile more accurate.
+Emit extra debug info to make sample profile more accurate
 
 .. option:: -fdebug-macro, -fno-debug-macro
 
@@ -1441,7 +1461,7 @@ remap file source paths in debug info
 
 .. option:: -fdebug-ranges-base-address, -fno-debug-ranges-base-address
 
-Use DWARF base address selection entries in debug\_ranges
+Use DWARF base address selection entries in .debug\_ranges
 
 .. option:: -fdebug-types-section, -fno-debug-types-section
 
@@ -1453,7 +1473,7 @@ Parse templated function definitions at the end of the translation unit
 
 .. option:: -fdelete-null-pointer-checks, -fno-delete-null-pointer-checks
 
-Treat usage of null pointers as undefined behavior.
+Treat usage of null pointers as undefined behavior (default)
 
 .. option:: -fdenormal-fp-math=<arg>
 
@@ -1521,6 +1541,10 @@ Emit all declarations, even if unused
 
 Use emutls functions to access thread\_local variables
 
+.. option:: -fenable-matrix
+
+Enable matrix data type and related builtin functions
+
 .. option:: -fencoding=<arg>, --encoding <arg>, --encoding=<arg>
 
 .. option:: -ferror-limit=<arg>
@@ -1537,6 +1561,10 @@ Enable support for exception handling
 
 Enable the experimental new constant interpreter
 
+.. option:: -fexperimental-relative-c++-abi-vtables, -fno-experimental-relative-c++-abi-vtables
+
+Use the experimental C++ class ABI for classes with virtual tables
+
 .. option:: -fextdirs=<arg>, --extdirs <arg>, --extdirs=<arg>
 
 .. option:: -ffast-math, -fno-fast-math
@@ -1585,7 +1613,7 @@ Assert that the compilation takes place in a freestanding environment
 
 .. option:: -ffunction-sections, -fno-function-sections
 
-Place each function in its own section (ELF Only)
+Place each function in its own section
 
 .. option:: -fgnu-inline-asm, -fno-gnu-inline-asm
 
@@ -1605,12 +1633,28 @@ Use the gnu89 inline semantics
 
 Sets various macros to claim compatibility with the given GCC version (default is 4.2.1)
 
+.. option:: -fgpu-allow-device-init, -fno-gpu-allow-device-init
+
+Allow device side init function in HIP
+
+.. option:: -fgpu-rdc, -fcuda-rdc, -fno-gpu-rdc
+
+Generate relocatable device code, also known as separate compilation mode
+
+.. option:: -fhip-new-launch-api, -fno-hip-new-launch-api
+
+Use new kernel launching API for HIP
+
 .. option:: -fhonor-infinities, -fhonor-infinites, -fno-honor-infinities
 
 .. option:: -fhonor-nans, -fno-honor-nans
 
 .. option:: -fhosted
 
+.. option:: -fignore-exceptions
+
+Enable support for ignoring exception handling constructs
+
 .. option:: -fimplicit-module-maps, -fmodule-maps, -fno-implicit-module-maps
 
 Implicitly search the file system for module map files.
@@ -1641,9 +1685,11 @@ Run cc1 in-process
 
 .. option:: -fjump-tables, -fno-jump-tables
 
-.. option:: -fkeep-static-consts
+Use jump tables for lowering switches
 
-Keep static const variables even if unused
+.. option:: -fkeep-static-consts, -fno-keep-static-consts
+
+Keep static const variables if unused
 
 .. option:: -flax-vector-conversions=<arg>, -flax-vector-conversions (equivalent to -flax-vector-conversions=integer), -fno-lax-vector-conversions (equivalent to -flax-vector-conversions=none)
 
@@ -1671,6 +1717,10 @@ Set LTO mode to either 'full' or 'thin'
 
 Require math functions to indicate errors by setting errno
 
+.. option:: -fmax-tokens=<arg>
+
+Max total number of preprocessed tokens for -Wmax-tokens.
+
 .. option:: -fmax-type-align=<arg>
 
 Specify the maximum alignment to enforce on pointers lacking an explicit alignment
@@ -1681,6 +1731,8 @@ Allow merging of constants
 
 .. option:: -fmessage-length=<arg>
 
+Format message diagnostics so that they fit within N columns
+
 .. option:: -fmodule-file-deps, -fno-module-file-deps
 
 .. option:: -fmodule-map-file=<file>
@@ -1751,6 +1803,8 @@ Specifies the largest alignment guaranteed by '::operator new(size\_t)'
 
 .. option:: -fnext-runtime
 
+.. option:: -fno-access-control, -fno-no-access-control
+
 .. option:: -fno-builtin-<arg>
 
 Disable implicit builtin knowledge of a specific function
@@ -1765,18 +1819,12 @@ Do not elide types when printing diagnostics
 
 Do not treat C++ operator name keywords as synonyms for operators
 
-.. option:: -fno-rtti-data
-
-Control emission of RTTI data
-
 .. option:: -fno-strict-modules-decluse
 
 .. option:: -fno-temp-file
 
 Directly create compilation output files. This may lead to incorrect incremental builds if the compiler crashes
 
-.. option:: -fno-virtual-function\_elimination
-
 .. option:: -fno-working-directory
 
 .. option:: -fno\_modules-validate-input-files-content
@@ -1785,6 +1833,10 @@ Directly create compilation output files. This may lead to incorrect incremental
 .. option:: -fno\_pch-validate-input-files-content
 .. program:: clang
 
+.. option:: -fnostack-clash-protection
+
+Disable stack clash protection
+
 .. option:: -fnoxray-link-deps
 
 .. option:: -fobjc-abi-version=<arg>
@@ -1893,8 +1945,6 @@ Validate PCH input files based on content if mtime differs
 
 .. option:: -fplt, -fno-plt
 
-Use the PLT to make function calls
-
 .. option:: -fplugin=<dsopath>
 
 Load the named plugin (dynamic shared object)
@@ -2000,12 +2050,18 @@ Turn on loop reroller
 
 .. option:: -fropi, -fno-ropi
 
+Generate read-only position independent code (ARM only)
+
 .. option:: -frounding-math, -fno-rounding-math
 
 .. option:: -frtti, -fno-rtti
 
+.. option:: -frtti-data, -fno-rtti-data
+
 .. option:: -frwpi, -fno-rwpi
 
+Generate read-write position independent code (ARM only)
+
 .. option:: -fsave-optimization-record, -fno-save-optimization-record
 
 Generate a YAML optimization record file
@@ -2020,6 +2076,8 @@ Generate an optimization record file in a specific format
 
 Use SEH style exceptions
 
+.. option:: -fsemantic-interposition, -fno-semantic-interposition
+
 .. option:: -fshort-enums, -fno-short-enums
 
 Allocate to an enum type only as many bytes as it needs for the declared range of possible values
@@ -2042,6 +2100,8 @@ Which overload candidates to show when overload resolution fails: best\|all; def
 
 .. option:: -fsigned-char, -fno-signed-char, --signed-char
 
+char is signed
+
 .. option:: -fsigned-zeros, -fno-signed-zeros
 
 .. option:: -fsized-deallocation, -fno-sized-deallocation
@@ -2066,10 +2126,14 @@ Provide minimal debug info in the object/executable to facilitate online symboli
 
 .. option:: -fsplit-lto-unit, -fno-split-lto-unit
 
-Enables splitting of the LTO unit.
+Enables splitting of the LTO unit
 
 .. option:: -fsplit-stack
 
+.. option:: -fstack-clash-protection
+
+Enable stack clash protection
+
 .. option:: -fstack-protector, -fno-stack-protector
 
 Enable stack protectors for some functions vulnerable to stack smashing. This uses a loose heuristic which considers functions vulnerable if they contain a char (or 8bit integer) array or constant sized calls to alloca, which are of greater size than ssp-buffer-size (default: 8 bytes). All variable sized calls to alloca are considered vulnerable
@@ -2104,8 +2168,6 @@ Assume that overflowing float-to-int casts are undefined (default)
 
 .. option:: -fstrict-return, -fno-strict-return
 
-Always treat control flow paths that fall off the end of a non-void function as unreachable
-
 .. option:: -fstrict-vtable-pointers, -fno-strict-vtable-pointers
 
 Enable optimizations based on the strict rules for overwriting polymorphic C++ objects
@@ -2122,7 +2184,7 @@ Enable optimizations based on the strict rules for overwriting polymorphic C++ o
 
 .. option:: -ftemplate-depth=<arg>
 
-.. option:: -ftest-coverage
+.. option:: -ftest-coverage, -fno-test-coverage
 
 .. option:: -fthin-link-bitcode=<arg>
 
@@ -2171,13 +2233,23 @@ Specify the function to be called on overflow
 
 Process trigraph sequences
 
+.. option:: -ftrivial-auto-var-init-stop-after=<arg>
+
+Stop initializing trivial automatic stack variables after the specified number of instances
+
 .. option:: -ftrivial-auto-var-init=<arg>
 
 Initialize trivial automatic stack variables: uninitialized (default) \| pattern
 
-.. option:: -funique-section-names, -fno-unique-section-names
+.. option:: -funique-basic-block-section-names, -fno-unique-basic-block-section-names
+
+Use unique names for basic block sections (ELF Only)
 
-Use unique names for text and data sections (ELF Only)
+.. option:: -funique-internal-linkage-names, -fno-unique-internal-linkage-names
+
+Uniqueify Internal Linkage Symbol Names by appending the MD5 hash of the module path
+
+.. option:: -funique-section-names, -fno-unique-section-names
 
 .. option:: -funit-at-a-time, -fno-unit-at-a-time
 
@@ -2197,12 +2269,12 @@ Turn on loop unroller
 
 .. option:: -fuse-init-array, -fno-use-init-array
 
-Use .init\_array instead of .ctors
-
 .. option:: -fuse-ld=<arg>
 
 .. option:: -fuse-line-directives, -fno-use-line-directives
 
+Use #line in preprocessed output
+
 .. option:: -fvalidate-ast-input-files-content
 
 Compute and store the hash of input files used to build an AST. Files with mismatching mtime's are considered valid if both contents is identical
@@ -2217,7 +2289,9 @@ Enable the loop vectorization passes
 
 .. option:: -fverbose-asm, -dA, -fno-verbose-asm
 
-.. option:: -fvirtual-function-elimination
+Generate verbose assembly output
+
+.. option:: -fvirtual-function-elimination, -fno-virtual-function-elimination
 
 Enables dead virtual function elimination optimization. Requires -flto=full
 
@@ -2255,11 +2329,11 @@ Store string literals as writable data
 
 .. option:: -fxray-always-emit-customevents, -fno-xray-always-emit-customevents
 
-Determine whether to always emit \_\_xray\_customevent(...) calls even if the function it appears in is not always instrumented.
+Always emit \_\_xray\_customevent(...) calls even if the containing function is not always instrumented
 
 .. option:: -fxray-always-emit-typedevents, -fno-xray-always-emit-typedevents
 
-Determine whether to always emit \_\_xray\_typedevent(...) calls even if the function it appears in is not always instrumented.
+Always emit \_\_xray\_typedevent(...) calls even if the containing function is not always instrumented
 
 .. option:: -fxray-always-instrument=<arg>
 
@@ -2269,6 +2343,12 @@ DEPRECATED: Filename defining the whitelist for imbuing the 'always instrument'
 
 Filename defining the list of functions/types for imbuing XRay attributes.
 
+.. option:: -fxray-function-index, -fno-xray-function-index
+
+.. option:: -fxray-ignore-loops, -fno-xray-ignore-loops
+
+Don't instrument functions with loops unless they also meet the minimum function size
+
 .. option:: -fxray-instruction-threshold<arg>
 
 .. program:: clang1
@@ -2283,7 +2363,7 @@ Generate XRay instrumentation sleds on function entry and exit
 
 .. option:: -fxray-instrumentation-bundle=<arg>
 
-Select which XRay instrumentation points to emit. Options: all, none, function, custom. Default is 'all'.
+Select which XRay instrumentation points to emit. Options: all, none, function-entry, function-exit, function, custom. Default is 'all'.  'function' includes both 'function-entry' and 'function-exit'.
 
 .. option:: -fxray-link-deps
 
@@ -2361,135 +2441,145 @@ OpenCL only. Defines that the global work-size be a multiple of the work-group s
 
 OpenCL only. Allow unsafe floating-point optimizations.  Also implies -cl-no-signed-zeros and -cl-mad-enable.
 
+SYCL flags
+----------
+.. option:: -fsycl, -fno-sycl
+
+Enable SYCL kernels compilation for device
+
+.. option:: -sycl-std=<arg>
+
+SYCL language standard to compile for.
+
 Target-dependent compilation options
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.. option:: -G<size>, -G=<arg>, -msmall-data-threshold=<arg>
+.. option:: -G<size>, -G=<arg>, -msmall-data-limit=<arg>, -msmall-data-threshold=<arg>
 
 Put objects of at most <size> bytes into small data section (MIPS / Hexagon)
 
 .. option:: -ffixed-x1
 
-Reserve the 1 register (AArch64/RISC-V only)
+Reserve the x1 register (AArch64/RISC-V only)
 
 .. option:: -ffixed-x10
 
-Reserve the 10 register (AArch64/RISC-V only)
+Reserve the x10 register (AArch64/RISC-V only)
 
 .. option:: -ffixed-x11
 
-Reserve the 11 register (AArch64/RISC-V only)
+Reserve the x11 register (AArch64/RISC-V only)
 
 .. option:: -ffixed-x12
 
-Reserve the 12 register (AArch64/RISC-V only)
+Reserve the x12 register (AArch64/RISC-V only)
 
 .. option:: -ffixed-x13
 
-Reserve the 13 register (AArch64/RISC-V only)
+Reserve the x13 register (AArch64/RISC-V only)
 
 .. option:: -ffixed-x14
 
-Reserve the 14 register (AArch64/RISC-V only)
+Reserve the x14 register (AArch64/RISC-V only)
 
 .. option:: -ffixed-x15
 
-Reserve the 15 register (AArch64/RISC-V only)
+Reserve the x15 register (AArch64/RISC-V only)
 
 .. option:: -ffixed-x16
 
-Reserve the 16 register (AArch64/RISC-V only)
+Reserve the x16 register (AArch64/RISC-V only)
 
 .. option:: -ffixed-x17
 
-Reserve the 17 register (AArch64/RISC-V only)
+Reserve the x17 register (AArch64/RISC-V only)
 
 .. option:: -ffixed-x18
 
-Reserve the 18 register (AArch64/RISC-V only)
+Reserve the x18 register (AArch64/RISC-V only)
 
 .. option:: -ffixed-x19
 
-Reserve the 19 register (AArch64/RISC-V only)
+Reserve the x19 register (AArch64/RISC-V only)
 
 .. option:: -ffixed-x2
 
-Reserve the 2 register (AArch64/RISC-V only)
+Reserve the x2 register (AArch64/RISC-V only)
 
 .. option:: -ffixed-x20
 
-Reserve the 20 register (AArch64/RISC-V only)
+Reserve the x20 register (AArch64/RISC-V only)
 
 .. option:: -ffixed-x21
 
-Reserve the 21 register (AArch64/RISC-V only)
+Reserve the x21 register (AArch64/RISC-V only)
 
 .. option:: -ffixed-x22
 
-Reserve the 22 register (AArch64/RISC-V only)
+Reserve the x22 register (AArch64/RISC-V only)
 
 .. option:: -ffixed-x23
 
-Reserve the 23 register (AArch64/RISC-V only)
+Reserve the x23 register (AArch64/RISC-V only)
 
 .. option:: -ffixed-x24
 
-Reserve the 24 register (AArch64/RISC-V only)
+Reserve the x24 register (AArch64/RISC-V only)
 
 .. option:: -ffixed-x25
 
-Reserve the 25 register (AArch64/RISC-V only)
+Reserve the x25 register (AArch64/RISC-V only)
 
 .. option:: -ffixed-x26
 
-Reserve the 26 register (AArch64/RISC-V only)
+Reserve the x26 register (AArch64/RISC-V only)
 
 .. option:: -ffixed-x27
 
-Reserve the 27 register (AArch64/RISC-V only)
+Reserve the x27 register (AArch64/RISC-V only)
 
 .. option:: -ffixed-x28
 
-Reserve the 28 register (AArch64/RISC-V only)
+Reserve the x28 register (AArch64/RISC-V only)
 
 .. option:: -ffixed-x29
 
-Reserve the 29 register (AArch64/RISC-V only)
+Reserve the x29 register (AArch64/RISC-V only)
 
 .. option:: -ffixed-x3
 
-Reserve the 3 register (AArch64/RISC-V only)
+Reserve the x3 register (AArch64/RISC-V only)
 
 .. option:: -ffixed-x30
 
-Reserve the 30 register (AArch64/RISC-V only)
+Reserve the x30 register (AArch64/RISC-V only)
 
 .. option:: -ffixed-x31
 
-Reserve the 31 register (AArch64/RISC-V only)
+Reserve the x31 register (AArch64/RISC-V only)
 
 .. option:: -ffixed-x4
 
-Reserve the 4 register (AArch64/RISC-V only)
+Reserve the x4 register (AArch64/RISC-V only)
 
 .. option:: -ffixed-x5
 
-Reserve the 5 register (AArch64/RISC-V only)
+Reserve the x5 register (AArch64/RISC-V only)
 
 .. option:: -ffixed-x6
 
-Reserve the 6 register (AArch64/RISC-V only)
+Reserve the x6 register (AArch64/RISC-V only)
 
 .. option:: -ffixed-x7
 
-Reserve the 7 register (AArch64/RISC-V only)
+Reserve the x7 register (AArch64/RISC-V only)
 
 .. option:: -ffixed-x8
 
-Reserve the 8 register (AArch64/RISC-V only)
+Reserve the x8 register (AArch64/RISC-V only)
 
 .. option:: -ffixed-x9
 
-Reserve the 9 register (AArch64/RISC-V only)
+Reserve the x9 register (AArch64/RISC-V only)
 
 .. option:: -m16
 
@@ -2499,12 +2589,18 @@ Reserve the 9 register (AArch64/RISC-V only)
 
 .. option:: -mabi=<arg>
 
+.. option:: -maix-struct-return
+
+Return all structs in memory (PPC32 only)
+
 .. option:: -malign-branch-boundary=<arg>
 
-.. option:: -malign-branch-prefix-size=<arg>
+Specify the boundary's size to align branches
 
 .. option:: -malign-branch=<arg1>,<arg2>...
 
+Specify types of branches to align
+
 .. option:: -malign-double
 
 Align doubles to two words in structs (x86 only)
@@ -2519,12 +2615,14 @@ Link stack frames through backchain on System Z
 
 .. option:: -mbranches-within-32B-boundaries
 
+Align selected branches (fused, jcc, jmp) within 32-byte boundary
+
 .. option:: -mcmodel=<arg>, -mcmodel=medany (equivalent to -mcmodel=medium), -mcmodel=medlow (equivalent to -mcmodel=small)
 
 .. option:: -mconsole<arg>
 
 .. program:: clang1
-.. option:: -mcpu=<arg>, -mv5 (equivalent to -mcpu=hexagonv5), -mv55 (equivalent to -mcpu=hexagonv55), -mv60 (equivalent to -mcpu=hexagonv60), -mv62 (equivalent to -mcpu=hexagonv62), -mv65 (equivalent to -mcpu=hexagonv65), -mv66 (equivalent to -mcpu=hexagonv66)
+.. option:: -mcpu=<arg>, -mv5 (equivalent to -mcpu=hexagonv5), -mv55 (equivalent to -mcpu=hexagonv55), -mv60 (equivalent to -mcpu=hexagonv60), -mv62 (equivalent to -mcpu=hexagonv62), -mv65 (equivalent to -mcpu=hexagonv65), -mv66 (equivalent to -mcpu=hexagonv66), -mv67 (equivalent to -mcpu=hexagonv67), -mv67t (equivalent to -mcpu=hexagonv67t)
 .. program:: clang
 
 .. option:: -mcrc, -mno-crc
@@ -2535,12 +2633,20 @@ Allow use of CRC instructions (ARM/Mips only)
 
 .. option:: -mdll<arg>
 
+.. option:: -mdouble=<arg>
+
+Force double to be 32 bits or 64 bits
+
 .. option:: -mdynamic-no-pic<arg>
 
 .. option:: -meabi <arg>
 
 Set EABI type, e.g. 4, 5 or gnu (default depends on triple)
 
+.. option:: -menable-experimental-extensions
+
+Enable use of experimental RISC-V extensions.
+
 .. option:: -mfentry
 
 Insert calls to fentry at function entry (x86/SystemZ only)
@@ -2585,6 +2691,10 @@ Generate branches with extended addressability, usually via indirect jumps.
 
 Enable only control-flow mitigations for Load Value Injection (LVI)
 
+.. option:: -mlvi-hardening, -mno-lvi-hardening
+
+Enable all mitigations for Load Value Injection (LVI)
+
 .. option:: -mmacosx-version-min=<arg>, -mmacos-version-min=<arg>
 
 Set Mac OS X deployment target
@@ -2609,6 +2719,10 @@ Omit frame pointer setup for leaf functions
 
 Use packed stack layout (SystemZ only).
 
+.. option:: -mpad-max-prefix-size=<arg>
+
+Specify maximum number of prefixes to use for padding
+
 .. option:: -mpie-copy-relocations, -mno-pie-copy-relocations
 
 Use copy relocations support for PIE builds
@@ -2645,6 +2759,10 @@ Generate a \_\_mcount\_loc section entry for each \_\_fentry\_\_ call.
 
 Make StdCall calling convention the default
 
+.. option:: -mseses, -mno-seses
+
+Enable speculative execution side effect suppression (SESES). Includes LVI control flow integrity mitigations
+
 .. option:: -msign-return-address=<arg>
 
 Select return address signing scope
@@ -2671,6 +2789,10 @@ Set the stack probe size
 
 Force realign the stack at entry to every function
 
+.. option:: -msvr4-struct-return
+
+Return small structs in registers (PPC32 only)
+
 .. option:: -mthread-model <arg>
 
 The thread model to use, e.g. posix, single (posix by default)
@@ -2691,6 +2813,8 @@ Specify bit size of immediate TLS offsets (AArch64 ELF only): 12 (for 4KB) \| 24
 .. option:: -mtune=<arg>
 .. program:: clang
 
+Accepted for compatibility with GCC. Currently has no effect.
+
 .. option:: -mtvos-version-min=<arg>, -mappletvos-version-min=<arg>
 
 .. option:: -municode<arg>
@@ -2775,6 +2899,10 @@ Enable XNACK (AMDGPU only)
 
 ARM
 ---
+.. option:: -fAAPCSBitfieldLoad
+
+Follows the AAPCS standard that all volatile bit-field write generates at least one load. (ARM only).
+
 .. option:: -ffixed-r9
 
 Reserve the r9 register (ARM only)
@@ -2949,8 +3077,12 @@ PowerPC
 
 .. option:: -mmfocrf, -mmfcrf, -mno-mfocrf
 
+.. option:: -mpcrel, -mno-pcrel
+
 .. option:: -mpopcntd, -mno-popcntd
 
+.. option:: -mpower10-vector, -mno-power10-vector
+
 .. option:: -mpower8-vector, -mno-power8-vector
 
 .. option:: -mpower9-vector, -mno-power9-vector
@@ -2987,6 +3119,12 @@ WebAssembly
 
 .. option:: -munimplemented-simd128, -mno-unimplemented-simd128
 
+WebAssembly Driver
+------------------
+.. option:: -mexec-model=<arg>
+
+Execution model (WebAssembly only)
+
 X86
 ---
 .. option:: -m3dnow, -mno-3dnow
@@ -2997,6 +3135,12 @@ X86
 
 .. option:: -maes, -mno-aes
 
+.. option:: -mamx-bf16, -mno-amx-bf16
+
+.. option:: -mamx-int8, -mno-amx-int8
+
+.. option:: -mamx-tile, -mno-amx-tile
+
 .. option:: -mavx, -mno-avx
 
 .. option:: -mavx2, -mno-avx2
@@ -3101,6 +3245,8 @@ X86
 
 .. option:: -msahf, -mno-sahf
 
+.. option:: -mserialize, -mno-serialize
+
 .. option:: -msgx, -mno-sgx
 
 .. option:: -msha, -mno-sha
@@ -3125,6 +3271,8 @@ X86
 
 .. option:: -mtbm, -mno-tbm
 
+.. option:: -mtsxldtrk, -mno-tsxldtrk
+
 .. option:: -mvaes, -mno-vaes
 
 .. option:: -mvpclmulqdq, -mno-vpclmulqdq
@@ -3178,7 +3326,7 @@ Optimization level
 
 Flags controlling how much optimization should be performed.
 
-.. option:: -O<arg>, -O (equivalent to -O2), --optimize, --optimize=<arg>
+.. option:: -O<arg>, -O (equivalent to -O1), --optimize, --optimize=<arg>
 
 .. option:: -Ofast<arg>
 
@@ -3489,7 +3637,7 @@ Pass <arg> to the linker
 
 .. option:: --hip-device-lib-path=<arg>
 
-HIP device library path
+HIP device library path. Alternative to rocm-path.
 
 .. option:: --hip-device-lib=<arg>
 
index 2dfeafd..f7f2032 100644 (file)
@@ -1,5 +1,5 @@
-clang - the Clang C, C++, and Objective-C compiler
-==================================================
+clang, clang++, clang-cpp - the Clang C, C++, and Objective-C compiler
+======================================================================
 
 SYNOPSIS
 --------
@@ -663,4 +663,4 @@ output of the compiler, along with information to reproduce.
 SEE ALSO
 --------
 
-:manpage:`as(1)`, :manpage:`ld(1)`
+:manpage:`as(1)`, :manpage:`clang-local(1)`, :manpage:`ld(1)`
index 8c94445..231ff6a 100644 (file)
@@ -227,8 +227,10 @@ public:
 
   bool isIntArg() const { return (kind >= IntArgBeg && kind <= IntArgEnd) ||
     kind == FreeBSDrArg || kind == FreeBSDyArg; }
-  bool isUIntArg() const { return kind >= UIntArgBeg && kind <= UIntArgEnd; }
-  bool isAnyIntArg() const { return kind >= IntArgBeg && kind <= UIntArgEnd; }
+  bool isUIntArg() const { return (kind >= UIntArgBeg && kind <= UIntArgEnd) ||
+    kind == FreeBSDbArg; }
+  bool isAnyIntArg() const { return (kind >= IntArgBeg && kind <= UIntArgEnd) ||
+    kind == FreeBSDbArg; }
   bool isDoubleArg() const {
     return kind >= DoubleArgBeg && kind <= DoubleArgEnd;
   }
index 776ad61..4c87488 100644 (file)
@@ -39,15 +39,15 @@ CODEGENOPT(ObjCAutoRefCountExceptions , 1, 0) ///< Whether ARC should be EH-safe
 CODEGENOPT(Backchain         , 1, 0) ///< -mbackchain
 CODEGENOPT(ControlFlowGuardNoChecks  , 1, 0) ///< -cfguard-no-checks
 CODEGENOPT(ControlFlowGuard  , 1, 0) ///< -cfguard
-CODEGENOPT(CoverageExtraChecksum, 1, 0) ///< Whether we need a second checksum for functions in GCNO files.
-CODEGENOPT(CoverageNoFunctionNamesInData, 1, 0) ///< Do not include function names in GCDA files.
-CODEGENOPT(CoverageExitBlockBeforeBody, 1, 0) ///< Whether to emit the exit block before the body blocks in GCNO files.
 CODEGENOPT(CXAAtExit         , 1, 1) ///< Use __cxa_atexit for calling destructors.
 CODEGENOPT(RegisterGlobalDtorsWithAtExit, 1, 1) ///< Use atexit or __cxa_atexit to register global destructors.
 CODEGENOPT(CXXCtorDtorAliases, 1, 0) ///< Emit complete ctors/dtors as linker
                                      ///< aliases to base ctors when possible.
 CODEGENOPT(DataSections      , 1, 0) ///< Set when -fdata-sections is enabled.
 CODEGENOPT(UniqueSectionNames, 1, 1) ///< Set for -funique-section-names.
+CODEGENOPT(UniqueBasicBlockSectionNames, 1, 1) ///< Set for -funique-basic-block-section-names,
+                                               ///< Produce unique section names with
+                                               ///< basic block sections.
 ENUM_CODEGENOPT(FramePointer, FramePointerKind, 2, FramePointerKind::None) /// frame-pointer: all,non-leaf,none
 
 CODEGENOPT(DisableFree       , 1, 0) ///< Don't free memory.
@@ -65,7 +65,8 @@ CODEGENOPT(ExperimentalNewPassManager, 1, 0) ///< Enables the new, experimental
 CODEGENOPT(DebugPassManager, 1, 0) ///< Prints debug information for the new
                                    ///< pass manager.
 CODEGENOPT(DisableRedZone    , 1, 0) ///< Set when -mno-red-zone is enabled.
-CODEGENOPT(EnableDebugEntryValues, 1, 0) ///< Emit call site parameter dbg info
+CODEGENOPT(EmitCallSiteInfo, 1, 0) ///< Emit call site info only in the case of
+                                   ///< '-g' + 'O>0' level.
 CODEGENOPT(IndirectTlsSegRefs, 1, 0) ///< Set when -mno-tls-direct-seg-refs
                                      ///< is specified.
 CODEGENOPT(DisableTailCalls  , 1, 0) ///< Do not emit tail calls.
@@ -108,6 +109,13 @@ CODEGENOPT(XRayAlwaysEmitCustomEvents , 1, 0)
 ///< Set when -fxray-always-emit-typedevents is enabled.
 CODEGENOPT(XRayAlwaysEmitTypedEvents , 1, 0)
 
+///< Set when -fxray-ignore-loops is enabled.
+CODEGENOPT(XRayIgnoreLoops , 1, 0)
+
+///< Set with -fno-xray-function-index to omit the index section.
+CODEGENOPT(XRayOmitFunctionIndex , 1, 0)
+
+
 ///< Set the minimum number of instructions in a function to determine selective
 ///< XRay instrumentation.
 VALUE_CODEGENOPT(XRayInstructionThreshold , 32, 200)
@@ -148,16 +156,11 @@ CODEGENOPT(NoWarn            , 1, 0) ///< Set when -Wa,--no-warn is enabled.
 CODEGENOPT(EnableSegmentedStacks , 1, 0) ///< Set when -fsplit-stack is enabled.
 CODEGENOPT(NoInlineLineTables, 1, 0) ///< Whether debug info should contain
                                      ///< inline line tables.
+CODEGENOPT(StackClashProtector, 1, 0) ///< Set when -fstack-clash-protection is enabled.
 CODEGENOPT(NoImplicitFloat   , 1, 0) ///< Set when -mno-implicit-float is enabled.
-CODEGENOPT(NoInfsFPMath      , 1, 0) ///< Assume FP arguments, results not +-Inf.
-CODEGENOPT(NoSignedZeros     , 1, 0) ///< Allow ignoring the signedness of FP zero
 CODEGENOPT(NullPointerIsValid , 1, 0) ///< Assume Null pointer deference is defined.
-CODEGENOPT(Reassociate       , 1, 0) ///< Allow reassociation of FP math ops
-CODEGENOPT(ReciprocalMath    , 1, 0) ///< Allow FP divisions to be reassociated.
-CODEGENOPT(NoTrappingMath    , 1, 0) ///< Set when -fno-trapping-math is enabled.
-CODEGENOPT(NoNaNsFPMath      , 1, 0) ///< Assume FP arguments, results not NaN.
-CODEGENOPT(FlushDenorm       , 1, 0) ///< Allow FP denorm numbers to be flushed to zero
 CODEGENOPT(CorrectlyRoundedDivSqrt, 1, 0) ///< -cl-fp32-correctly-rounded-divide-sqrt
+CODEGENOPT(UniqueInternalLinkageNames, 1, 0) ///< Internal Linkage symbols get unique names.
 
 /// When false, this attempts to generate code as if the result of an
 /// overflowing conversion matches the overflowing behavior of a target's native
@@ -229,6 +232,7 @@ CODEGENOPT(SanitizeCoverageTracePC, 1, 0) ///< Enable PC tracing
 CODEGENOPT(SanitizeCoverageTracePCGuard, 1, 0) ///< Enable PC tracing with guard
                                                ///< in sanitizer coverage.
 CODEGENOPT(SanitizeCoverageInline8bitCounters, 1, 0) ///< Use inline 8bit counters.
+CODEGENOPT(SanitizeCoverageInlineBoolFlag, 1, 0) ///< Use inline bool flag.
 CODEGENOPT(SanitizeCoveragePCTable, 1, 0) ///< Create a PC Table.
 CODEGENOPT(SanitizeCoverageNoPrune, 1, 0) ///< Disable coverage pruning.
 CODEGENOPT(SanitizeCoverageStackDepth, 1, 0) ///< Enable max stack depth tracing
@@ -246,7 +250,6 @@ VALUE_CODEGENOPT(TimeTraceGranularity, 32, 500) ///< Minimum time granularity (i
 CODEGENOPT(UnrollLoops       , 1, 0) ///< Control whether loops are unrolled.
 CODEGENOPT(RerollLoops       , 1, 0) ///< Control whether loops are rerolled.
 CODEGENOPT(NoUseJumpTables   , 1, 0) ///< Set when -fno-jump-tables is enabled.
-CODEGENOPT(UnsafeFPMath      , 1, 0) ///< Allow unsafe floating point optzns.
 CODEGENOPT(UnwindTables      , 1, 0) ///< Emit unwind tables.
 CODEGENOPT(VectorizeLoop     , 1, 0) ///< Run loop vectorizer.
 CODEGENOPT(VectorizeSLP      , 1, 0) ///< Run SLP vectorizer.
@@ -303,6 +306,9 @@ CODEGENOPT(LTOVisibilityPublicStd, 1, 0)
 /// or 0 if unspecified.
 VALUE_CODEGENOPT(NumRegisterParameters, 32, 0)
 
+/// The threshold to put data into small data section.
+VALUE_CODEGENOPT(SmallDataLimit, 32, 0)
+
 /// The lower bound for a buffer to be considered for stack protection.
 VALUE_CODEGENOPT(SSPBufferSize, 32, 0)
 
@@ -383,14 +389,12 @@ CODEGENOPT(ForceEmitVTables, 1, 0)
 /// Whether to emit an address-significance table into the object file.
 CODEGENOPT(Addrsig, 1, 0)
 
-ENUM_CODEGENOPT(SignReturnAddress, SignReturnAddressScope, 2, SignReturnAddressScope::None)
-ENUM_CODEGENOPT(SignReturnAddressKey, SignReturnAddressKeyValue, 1, SignReturnAddressKeyValue::AKey)
-CODEGENOPT(BranchTargetEnforcement, 1, 0)
-
 /// Whether to emit unused static constants.
 CODEGENOPT(KeepStaticConsts, 1, 0)
 
+/// Whether to not follow the AAPCS that enforce at least one read before storing to a volatile bitfield
+CODEGENOPT(ForceAAPCSBitfieldLoad, 1, 0)
+
 #undef CODEGENOPT
 #undef ENUM_CODEGENOPT
 #undef VALUE_CODEGENOPT
-
index e46069a..b202d2a 100644 (file)
@@ -67,6 +67,7 @@ def note_fe_backend_invalid_loc : Note<"could "
   "not determine the original source location for %0:%1:%2">, BackendInfo;
 
 def err_fe_backend_unsupported : Error<"%0">, BackendInfo;
+def warn_fe_backend_unsupported : Warning<"%0">, BackendInfo;
 
 def err_fe_invalid_code_complete_file : Error<
     "cannot locate code-completion file %0">, DefaultFatal;
@@ -115,12 +116,18 @@ def warn_fe_concepts_ts_flag : Warning<
   "-fconcepts-ts is deprecated - use '-std=c++20' for Concepts support">,
   InGroup<Deprecated>;
 
+def err_fe_unable_to_load_basic_block_sections_file : Error<
+    "unable to load basic block sections function list: '%0'">;
+
 def warn_fe_serialized_diag_merge_failure : Warning<
     "unable to merge a subprocess's serialized diagnostics">,
     InGroup<SerializedDiagnostics>;
 def warn_fe_serialized_diag_failure : Warning<
     "unable to open file %0 for serializing diagnostics (%1)">,
     InGroup<SerializedDiagnostics>;
+def warn_fe_serialized_diag_failure_during_finalisation : Warning<
+    "Received warning after diagnostic serialization teardown was underway: %0">,
+    InGroup<SerializedDiagnostics>;
 
 def err_verify_missing_line : Error<
     "missing or invalid line number following '@' in expected %0">;
@@ -242,6 +249,12 @@ def err_function_needs_feature : Error<
   "always_inline function %1 requires target feature '%2', but would "
   "be inlined into function %0 that is compiled without support for '%2'">;
 
+def warn_avx_calling_convention
+    : Warning<"AVX vector %select{return|argument}0 of type %1 without '%2' "
+              "enabled changes the ABI">,
+      InGroup<DiagGroup<"psabi">>;
+def err_avx_calling_convention : Error<warn_avx_calling_convention.Text>;
+
 def err_alias_to_undefined : Error<
   "%select{alias|ifunc}0 must point to a defined "
   "%select{variable or |}1function">;
index e4233c8..1e829be 100644 (file)
@@ -60,6 +60,7 @@ def UndefinedBoolConversion : DiagGroup<"undefined-bool-conversion">;
 def BoolConversion : DiagGroup<"bool-conversion", [PointerBoolConversion,
                                                    UndefinedBoolConversion]>;
 def IntConversion : DiagGroup<"int-conversion">;
+def ClassConversion: DiagGroup<"class-conversion">;
 def DeprecatedEnumCompareConditional :
   DiagGroup<"deprecated-enum-compare-conditional">;
 def EnumCompareConditional : DiagGroup<"enum-compare-conditional",
@@ -85,7 +86,9 @@ def ObjCSignedCharBoolImplicitIntConversion :
   DiagGroup<"objc-signed-char-bool-implicit-int-conversion">;
 def ImplicitIntConversion : DiagGroup<"implicit-int-conversion",
                                      [ObjCSignedCharBoolImplicitIntConversion]>;
-def ImplicitIntFloatConversion : DiagGroup<"implicit-int-float-conversion">;
+def ImplicitConstIntFloatConversion : DiagGroup<"implicit-const-int-float-conversion">;
+def ImplicitIntFloatConversion : DiagGroup<"implicit-int-float-conversion",
+ [ImplicitConstIntFloatConversion]>;
 def ObjCSignedCharBoolImplicitFloatConversion :
   DiagGroup<"objc-signed-char-bool-implicit-float-conversion">;
 def ImplicitFloatConversion : DiagGroup<"implicit-float-conversion",
@@ -99,6 +102,7 @@ def FloatConversion :
   DiagGroup<"float-conversion", [FloatOverflowConversion,
                                  FloatZeroConversion]>;
 
+def FrameAddress : DiagGroup<"frame-address">;
 def DoublePromotion : DiagGroup<"double-promotion">;
 def EnumTooLarge : DiagGroup<"enum-too-large">;
 def UnsupportedNan : DiagGroup<"unsupported-nan">;
@@ -193,6 +197,7 @@ def CXX20Designator : DiagGroup<"c++20-designator">;
 // designators (including the warning controlled by -Wc++20-designator).
 def C99Designator : DiagGroup<"c99-designator", [CXX20Designator]>;
 def GNUDesignator : DiagGroup<"gnu-designator">;
+def DtorName : DiagGroup<"dtor-name">;
 
 def DynamicExceptionSpec
     : DiagGroup<"dynamic-exception-spec", [DeprecatedDynamicExceptionSpec]>;
@@ -275,9 +280,12 @@ def CXX98CompatPedantic : DiagGroup<"c++98-compat-pedantic",
 
 def CXX11Narrowing : DiagGroup<"c++11-narrowing">;
 
-def CXX11WarnOverrideDestructor :
+def CXX11WarnInconsistentOverrideDestructor :
   DiagGroup<"inconsistent-missing-destructor-override">;
-def CXX11WarnOverrideMethod : DiagGroup<"inconsistent-missing-override">;
+def CXX11WarnInconsistentOverrideMethod :
+  DiagGroup<"inconsistent-missing-override">;
+def CXX11WarnSuggestOverrideDestructor : DiagGroup<"suggest-destructor-override">;
+def CXX11WarnSuggestOverride : DiagGroup<"suggest-override">;
 
 // Original name of this warning in Clang
 def : DiagGroup<"c++0x-narrowing", [CXX11Narrowing]>;
@@ -347,6 +355,7 @@ def Dangling : DiagGroup<"dangling", [DanglingField,
                                       DanglingGsl,
                                       ReturnStackAddress]>;
 def DistributedObjectModifiers : DiagGroup<"distributed-object-modifiers">;
+def ExcessInitializers : DiagGroup<"excess-initializers">;
 def ExpansionToDefined : DiagGroup<"expansion-to-defined">;
 def FlagEnum : DiagGroup<"flag-enum">;
 def IncrementBool : DiagGroup<"increment-bool", [DeprecatedIncrementBool]>;
@@ -377,6 +386,8 @@ def IncompleteModule : DiagGroup<"incomplete-module",
 def PrivateModule : DiagGroup<"private-module">;
 
 def CXX11InlineNamespace : DiagGroup<"c++11-inline-namespace">;
+def InlineNamespaceReopenedNoninline
+    : DiagGroup<"inline-namespace-reopened-noninline">;
 def InvalidNoreturn : DiagGroup<"invalid-noreturn">;
 def InvalidSourceEncoding : DiagGroup<"invalid-source-encoding">;
 def KNRPromotedParameter : DiagGroup<"knr-promoted-parameter">;
@@ -620,8 +631,10 @@ def Unicode  : DiagGroup<"unicode">;
 def UninitializedMaybe : DiagGroup<"conditional-uninitialized">;
 def UninitializedSometimes : DiagGroup<"sometimes-uninitialized">;
 def UninitializedStaticSelfInit : DiagGroup<"static-self-init">;
+def UninitializedConstReference : DiagGroup<"uninitialized-const-reference">;
 def Uninitialized  : DiagGroup<"uninitialized", [UninitializedSometimes,
-                                                 UninitializedStaticSelfInit]>;
+                                                 UninitializedStaticSelfInit,
+                                                 UninitializedConstReference]>;
 def IgnoredPragmaIntrinsic : DiagGroup<"ignored-pragma-intrinsic">;
 // #pragma optimize is often used to avoid to work around MSVC codegen bugs or
 // to disable inlining. It's not completely clear what alternative to suggest
@@ -838,6 +851,13 @@ def IncompatibleExceptionSpec : DiagGroup<"incompatible-exception-spec">;
 def IntToVoidPointerCast : DiagGroup<"int-to-void-pointer-cast">;
 def IntToPointerCast : DiagGroup<"int-to-pointer-cast",
                                  [IntToVoidPointerCast]>;
+def VoidPointerToEnumCast : DiagGroup<"void-pointer-to-enum-cast">;
+def VoidPointerToIntCast : DiagGroup<"void-pointer-to-int-cast",
+                                     [VoidPointerToEnumCast]>;
+def PointerToEnumCast : DiagGroup<"pointer-to-enum-cast",
+                                  [VoidPointerToEnumCast]>;
+def PointerToIntCast : DiagGroup<"pointer-to-int-cast",
+                                 [PointerToEnumCast, VoidPointerToIntCast]>;
 
 def Move : DiagGroup<"move", [
     PessimizingMove,
@@ -865,6 +885,7 @@ def Most : DiagGroup<"most", [
     DeleteNonVirtualDtor,
     Format,
     ForLoopAnalysis,
+    FrameAddress,
     Implicit,
     InfiniteRecursion,
     IntInBoolContext,
@@ -976,6 +997,9 @@ def C11 : DiagGroup<"c11-extensions">;
 // A warning group for warnings about using C99 features as extensions.
 def C99 : DiagGroup<"c99-extensions", [C99Designator]>;
 
+// A warning group for warnings about using C2x features as extensions.
+def C2x : DiagGroup<"c2x-extensions">;
+
 // A warning group for warnings about GCC extensions.
 def GNU : DiagGroup<"gnu", [GNUAlignofExpression, GNUAnonymousStruct,
                             GNUAutoType,
@@ -1079,11 +1103,15 @@ def ObjCSignedCharBool : DiagGroup<"objc-signed-char-bool",
    ObjCBoolConstantConversion,
    TautologicalObjCBoolCompare]>;
 
+def ObjCPotentiallyDirectSelector : DiagGroup<"potentially-direct-selector">;
+def ObjCStrictPotentiallyDirectSelector :
+  DiagGroup<"strict-potentially-direct-selector",
+            [ObjCPotentiallyDirectSelector]>;
+
 // Inline ASM warnings.
 def ASMOperandWidths : DiagGroup<"asm-operand-widths">;
-def ASMIgnoredQualifier : DiagGroup<"asm-ignored-qualifier">;
 def ASM : DiagGroup<"asm", [
-    ASMOperandWidths, ASMIgnoredQualifier
+    ASMOperandWidths
   ]>;
 
 // OpenMP warnings.
@@ -1146,8 +1174,8 @@ def UnknownArgument : DiagGroup<"unknown-argument">;
 // compiling OpenCL C/C++ but which is not compatible with the SPIR spec.
 def SpirCompat : DiagGroup<"spir-compat">;
 
-// Warning for the experimental-isel options.
-def ExperimentalISel : DiagGroup<"experimental-isel">;
+// Warning for the GlobalISel options.
+def GlobalISel : DiagGroup<"global-isel">;
 
 // A warning group specifically for warnings related to function
 // multiversioning.
@@ -1161,3 +1189,37 @@ def CrossTU : DiagGroup<"ctu">;
 def CTADMaybeUnsupported : DiagGroup<"ctad-maybe-unsupported">;
 
 def FortifySource : DiagGroup<"fortify-source">;
+
+def MaxTokens : DiagGroup<"max-tokens"> {
+  code Documentation = [{
+The warning is issued if the number of pre-processor tokens exceeds
+the token limit, which can be set in three ways:
+
+1. As a limit at a specific point in a file, using the ``clang max_tokens_here``
+   pragma:
+
+   .. code-block: c++
+      #pragma clang max_tokens_here 1234
+
+2. As a per-translation unit limit, using the ``-fmax-tokens=`` command-line
+   flag:
+
+   .. code-block: console
+      clang -c a.cpp -fmax-tokens=1234
+
+3. As a per-translation unit limit using the ``clang max_tokens_total`` pragma,
+   which works like and overrides the ``-fmax-tokens=`` flag:
+
+   .. code-block: c++
+      #pragma clang max_tokens_total 1234
+
+These limits can be helpful in limiting code growth through included files.
+
+Setting a token limit of zero means no limit.
+
+Note that the warning is disabled by default, so -Wmax-tokens must be used
+in addition with the pragmas or -fmax-tokens flag to get any warnings.
+}];
+}
+
+def WebAssemblyExceptionSpec : DiagGroup<"wasm-exception-spec">;
index 941f2ca..cd23dd3 100644 (file)
@@ -6440,7 +6440,7 @@ def warn_pointer_indirection_from_incompatible_type : Warning<
   InGroup<UndefinedReinterpretCast>, DefaultIgnore;
 def warn_taking_address_of_packed_member : Warning<
   "taking address of packed member %0 of class or structure %q1 may result in an unaligned pointer value">,
-  InGroup<DiagGroup<"address-of-packed-member">>;
+  InGroup<DiagGroup<"address-of-packed-member">>, DefaultIgnore;
 
 def err_objc_object_assignment : Error<
   "cannot assign to class object (%0 invalid)">;
@@ -7607,7 +7607,7 @@ def ext_typecheck_convert_incompatible_pointer_sign : ExtWarn<
   "sending to parameter of different type}0,1"
   "|%diff{casting $ to type $|casting between types}0,1}2"
   " converts between pointers to integer types with different sign">,
-  InGroup<DiagGroup<"pointer-sign">>;
+  InGroup<DiagGroup<"pointer-sign">>, DefaultIgnore;
 def err_typecheck_convert_incompatible_pointer_sign : Error<
   "%select{%diff{assigning to $ from $|assigning to different types}0,1"
   "|%diff{passing $ to parameter of type $|"
index 42f7593..70f68d6 100644 (file)
@@ -91,7 +91,7 @@ LANGOPT(CPlusPlus         , 1, 0, "C++")
 LANGOPT(CPlusPlus11       , 1, 0, "C++11")
 LANGOPT(CPlusPlus14       , 1, 0, "C++14")
 LANGOPT(CPlusPlus17       , 1, 0, "C++17")
-LANGOPT(CPlusPlus2a       , 1, 0, "C++2a")
+LANGOPT(CPlusPlus20       , 1, 0, "C++20")
 LANGOPT(ObjC              , 1, 0, "Objective-C")
 BENIGN_LANGOPT(ObjCDefaultSynthProperties , 1, 0,
                "Objective-C auto-synthesized properties")
@@ -132,6 +132,7 @@ LANGOPT(DWARFExceptions   , 1, 0, "dwarf exception handling")
 LANGOPT(SjLjExceptions    , 1, 0, "setjmp-longjump exception handling")
 LANGOPT(SEHExceptions     , 1, 0, "SEH .xdata exception handling")
 LANGOPT(WasmExceptions    , 1, 0, "WebAssembly exception handling")
+LANGOPT(IgnoreExceptions  , 1, 0, "ignore exceptions")
 LANGOPT(ExternCNoUnwind   , 1, 0, "Assume extern C functions don't unwind")
 LANGOPT(TraditionalCPP    , 1, 0, "traditional CPP emulation")
 LANGOPT(RTTI              , 1, 1, "run-time type information")
@@ -147,6 +148,9 @@ LANGOPT(RelaxedTemplateTemplateArgs, 1, 0, "C++17 relaxed matching of template t
 
 LANGOPT(DoubleSquareBracketAttributes, 1, 0, "'[[]]' attributes extension for all language standard modes")
 
+COMPATIBLE_LANGOPT(RecoveryAST, 1, 0, "Preserve expressions in AST when encountering errors")
+COMPATIBLE_LANGOPT(RecoveryASTType, 1, 0, "Preserve the type in recovery expressions")
+
 BENIGN_LANGOPT(ThreadsafeStatics , 1, 1, "thread-safe static initializers")
 LANGOPT(POSIXThreads      , 1, 0, "POSIX thread support")
 LANGOPT(Blocks            , 1, 0, "blocks extension to C")
@@ -161,6 +165,7 @@ BENIGN_ENUM_LANGOPT(CompilingModule, CompilingModuleKind, 2, CMK_None,
 BENIGN_LANGOPT(CompilingPCH, 1, 0, "building a pch")
 BENIGN_LANGOPT(BuildingPCHWithObjectFile, 1, 0, "building a pch which has a corresponding object file")
 BENIGN_LANGOPT(CacheGeneratedPCH, 1, 0, "cache generated PCH files in memory")
+BENIGN_LANGOPT(PCHInstantiateTemplates, 1, 0, "instantiate templates while building a PCH")
 COMPATIBLE_LANGOPT(ModulesDeclUse    , 1, 0, "require declaration of module uses")
 BENIGN_LANGOPT(ModulesSearchAll  , 1, 1, "searching even non-imported modules to find unresolved references")
 COMPATIBLE_LANGOPT(ModulesStrictDeclUse, 1, 0, "requiring declaration of module uses and all headers to be in modules")
@@ -175,6 +180,7 @@ VALUE_LANGOPT(PackStruct  , 32, 0,
 VALUE_LANGOPT(MaxTypeAlign  , 32, 0,
               "default maximum alignment for types")
 VALUE_LANGOPT(AlignDouble            , 1, 0, "Controls if doubles should be aligned to 8 bytes (x86 only)")
+VALUE_LANGOPT(DoubleSize            , 32, 0, "width of double")
 VALUE_LANGOPT(LongDoubleSize        , 32, 0, "width of long double")
 LANGOPT(PPCIEEELongDouble            , 1, 0, "use IEEE 754 quadruple-precision for long double")
 COMPATIBLE_VALUE_LANGOPT(PICLevel    , 2, 0, "__PIC__ level")
@@ -187,6 +193,12 @@ COMPATIBLE_LANGOPT(Deprecated        , 1, 0, "__DEPRECATED predefined macro")
 COMPATIBLE_LANGOPT(FastMath          , 1, 0, "fast FP math optimizations, and __FAST_MATH__ predefined macro")
 COMPATIBLE_LANGOPT(FiniteMathOnly    , 1, 0, "__FINITE_MATH_ONLY__ predefined macro")
 COMPATIBLE_LANGOPT(UnsafeFPMath      , 1, 0, "Unsafe Floating Point Math")
+BENIGN_LANGOPT(AllowFPReassoc    , 1, 0, "Permit Floating Point reassociation")
+BENIGN_LANGOPT(NoHonorNaNs       , 1, 0, "Permit Floating Point optimization without regard to NaN")
+BENIGN_LANGOPT(NoHonorInfs       , 1, 0, "Permit Floating Point optimization without regard to infinities")
+BENIGN_LANGOPT(NoSignedZero      , 1, 0, "Permit Floating Point optimization without regard to signed zeros")
+BENIGN_LANGOPT(AllowRecip        , 1, 0, "Permit Floating Point reciprocal")
+BENIGN_LANGOPT(ApproxFunc        , 1, 0, "Permit Floating Point approximation")
 
 BENIGN_LANGOPT(ObjCGCBitmapPrint , 1, 0, "printing of GC's bitmap layout for __weak/__strong ivars")
 
@@ -219,6 +231,7 @@ LANGOPT(OpenMPCUDANumSMs  , 32, 0, "Number of SMs for CUDA devices.")
 LANGOPT(OpenMPCUDABlocksPerSM  , 32, 0, "Number of blocks per SM for CUDA devices.")
 LANGOPT(OpenMPCUDAReductionBufNum , 32, 1024, "Number of the reduction records in the intermediate reduction buffer used for the teams reductions.")
 LANGOPT(OpenMPOptimisticCollapse  , 1, 0, "Use at most 32 bits to represent the collapsed loop nest counter.")
+LANGOPT(OpenMPCUDATargetParallel, 1, 0, "Support parallel execution of target region on Cuda-based devices.")
 LANGOPT(RenderScript      , 1, 0, "RenderScript")
 
 LANGOPT(CUDAIsDevice      , 1, 0, "compiling for CUDA device")
@@ -227,9 +240,11 @@ LANGOPT(CUDAHostDeviceConstexpr, 1, 1, "treating unattributed constexpr function
 LANGOPT(CUDADeviceApproxTranscendentals, 1, 0, "using approximate transcendental functions")
 LANGOPT(GPURelocatableDeviceCode, 1, 0, "generate relocatable device code")
 LANGOPT(GPUAllowDeviceInit, 1, 0, "allowing device side global init functions for HIP")
-LANGOPT(GPUMaxThreadsPerBlock, 32, 256, "default max threads per block for kernel launch bounds for HIP")
+LANGOPT(GPUMaxThreadsPerBlock, 32, 1024, "default max threads per block for kernel launch bounds for HIP")
 
+LANGOPT(SYCL              , 1, 0, "SYCL")
 LANGOPT(SYCLIsDevice      , 1, 0, "Generate code for SYCL device")
+LANGOPT(SYCLVersion       , 32, 0, "Version of the SYCL standard used")
 
 LANGOPT(HIPUseNewLaunchAPI, 1, 0, "Use new kernel launching API for HIP")
 
@@ -237,7 +252,7 @@ LANGOPT(SizedDeallocation , 1, 0, "sized deallocation")
 LANGOPT(AlignedAllocation , 1, 0, "aligned allocation")
 LANGOPT(AlignedAllocationUnavailable, 1, 0, "aligned allocation functions are unavailable")
 LANGOPT(NewAlignOverride  , 32, 0, "maximum alignment guaranteed by '::operator new(size_t)'")
-LANGOPT(ConceptSatisfactionCaching , 1, 1, "enable satisfaction caching for C++2a Concepts")
+LANGOPT(ConceptSatisfactionCaching , 1, 1, "enable satisfaction caching for C++20 Concepts")
 BENIGN_LANGOPT(ModulesCodegen , 1, 0, "Modules code generation")
 BENIGN_LANGOPT(ModulesDebugInfo , 1, 0, "Modules debug info")
 BENIGN_LANGOPT(ElideConstructors , 1, 1, "C++ copy constructor elision")
@@ -256,16 +271,19 @@ BENIGN_LANGOPT(SpellChecking , 1, 1, "spell-checking")
 LANGOPT(SinglePrecisionConstants , 1, 0, "treating double-precision floating point constants as single precision constants")
 LANGOPT(FastRelaxedMath , 1, 0, "OpenCL fast relaxed math")
 /// FP_CONTRACT mode (on/off/fast).
-ENUM_LANGOPT(DefaultFPContractMode, FPContractModeKind, 2, FPC_Off, "FP contraction type")
+BENIGN_ENUM_LANGOPT(DefaultFPContractMode, FPModeKind, 2, FPM_Off, "FP contraction type")
 COMPATIBLE_LANGOPT(ExpStrictFP, 1, false, "Enable experimental strict floating point")
-ENUM_LANGOPT(FPRoundingMode, FPRoundingModeKind, 3, FPR_ToNearest, "FP Rounding Mode type")
-ENUM_LANGOPT(FPExceptionMode, FPExceptionModeKind, 2, FPE_Ignore, "FP Exception Behavior Mode type")
+BENIGN_ENUM_LANGOPT(FPRoundingMode, RoundingMode, 3, RoundingMode::NearestTiesToEven, "FP Rounding Mode type")
+BENIGN_ENUM_LANGOPT(FPExceptionMode, FPExceptionModeKind, 2, FPE_Ignore, "FP Exception Behavior Mode type")
 LANGOPT(NoBitFieldTypeAlign , 1, 0, "bit-field type alignment")
 LANGOPT(HexagonQdsp6Compat , 1, 0, "hexagon-qdsp6 backward compatibility")
 LANGOPT(ObjCAutoRefCount , 1, 0, "Objective-C automated reference counting")
 LANGOPT(ObjCWeakRuntime     , 1, 0, "__weak support in the ARC runtime")
 LANGOPT(ObjCWeak            , 1, 0, "Objective-C __weak in ARC and MRC files")
 LANGOPT(ObjCSubscriptingLegacyRuntime         , 1, 0, "Subscripting support in legacy ObjectiveC runtime")
+BENIGN_LANGOPT(CompatibilityQualifiedIdBlockParamTypeChecking, 1, 0,
+               "compatibility mode for type checking block parameters "
+               "involving qualified id types")
 LANGOPT(CFProtectionBranch , 1, 0, "Control-Flow Branch Protection enabled")
 LANGOPT(FakeAddressSpaceMap , 1, 0, "OpenCL fake address space map")
 ENUM_LANGOPT(AddressSpaceMapMangling , AddrSpaceMapMangling, 2, ASMM_Target, "OpenCL address space map mangling mode")
@@ -285,10 +303,14 @@ ENUM_LANGOPT(TypeVisibilityMode, Visibility, 3, DefaultVisibility,
              "default visibility for types [-ftype-visibility]")
 LANGOPT(SetVisibilityForExternDecls, 1, 0,
         "apply global symbol visibility to external declarations without an explicit visibility")
+BENIGN_LANGOPT(SemanticInterposition        , 1, 0, "semantic interposition")
+BENIGN_LANGOPT(ExplicitNoSemanticInterposition, 1, 0, "explicitly no semantic interposition")
 ENUM_LANGOPT(StackProtector, StackProtectorMode, 2, SSPOff,
              "stack protector mode")
 ENUM_LANGOPT(TrivialAutoVarInit, TrivialAutoVarInitKind, 2, TrivialAutoVarInitKind::Uninitialized,
              "trivial automatic variable initialization")
+VALUE_LANGOPT(TrivialAutoVarInitStopAfter, 32, 0,
+             "stop trivial automatic variable initialization after the specified number of instances. Must be greater than 0.")
 ENUM_LANGOPT(SignedOverflowBehavior, SignedOverflowBehaviorTy, 2, SOB_Undefined,
              "signed integer overflow handling")
 
@@ -345,6 +367,21 @@ LANGOPT(PaddingOnUnsignedFixedPoint, 1, 0,
 
 LANGOPT(RegisterStaticDestructors, 1, 1, "Register C++ static destructors")
 
+LANGOPT(MatrixTypes, 1, 0, "Enable or disable the builtin matrix type")
+
+COMPATIBLE_VALUE_LANGOPT(MaxTokens, 32, 0, "Max number of tokens per TU or 0")
+
+ENUM_LANGOPT(SignReturnAddressScope, SignReturnAddressScopeKind, 2, SignReturnAddressScopeKind::None,
+             "Scope of return address signing")
+ENUM_LANGOPT(SignReturnAddressKey, SignReturnAddressKeyKind, 1, SignReturnAddressKeyKind::AKey,
+             "Key used for return address signing")
+LANGOPT(BranchTargetEnforcement, 1, 0, "Branch-target enforcement enabled")
+
+LANGOPT(SpeculativeLoadHardening, 1, 0, "Speculative load hardening enabled")
+
+LANGOPT(RelativeCXXABIVTables, 1, 0,
+        "Use an ABI-incompatible v-table layout that uses relative references")
+
 #undef LANGOPT
 #undef COMPATIBLE_LANGOPT
 #undef BENIGN_LANGOPT
index 6a6804a..2ee3b16 100644 (file)
@@ -15,8 +15,9 @@
 #define LLVM_CLANG_BASIC_TARGETINFO_H
 
 #include "clang/Basic/AddressSpaces.h"
-#include "clang/Basic/LLVM.h"
 #include "clang/Basic/CodeGenOptions.h"
+#include "clang/Basic/LLVM.h"
+#include "clang/Basic/LangOptions.h"
 #include "clang/Basic/Specifiers.h"
 #include "clang/Basic/TargetCXXABI.h"
 #include "clang/Basic/TargetOptions.h"
@@ -29,6 +30,7 @@
 #include "llvm/ADT/StringMap.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/Triple.h"
+#include "llvm/Frontend/OpenMP/OMPGridValues.h"
 #include "llvm/Support/DataTypes.h"
 #include "llvm/Support/VersionTuple.h"
 #include <cassert>
@@ -59,6 +61,7 @@ struct TransferrableTargetInfo {
   unsigned char BoolWidth, BoolAlign;
   unsigned char IntWidth, IntAlign;
   unsigned char HalfWidth, HalfAlign;
+  unsigned char BFloat16Width, BFloat16Align;
   unsigned char FloatWidth, FloatAlign;
   unsigned char DoubleWidth, DoubleAlign;
   unsigned char LongDoubleWidth, LongDoubleAlign, Float128Align;
@@ -100,8 +103,8 @@ struct TransferrableTargetInfo {
   unsigned short MaxVectorAlign;
   unsigned short MaxTLSAlign;
 
-  const llvm::fltSemantics *HalfFormat, *FloatFormat, *DoubleFormat,
-    *LongDoubleFormat, *Float128Format;
+  const llvm::fltSemantics *HalfFormat, *BFloat16Format, *FloatFormat,
+    *DoubleFormat, *LongDoubleFormat, *Float128Format;
 
   ///===---- Target Data Type Query Methods -------------------------------===//
   enum IntType {
@@ -159,6 +162,18 @@ protected:
   unsigned ZeroLengthBitfieldBoundary;
 };
 
+/// OpenCL type kinds.
+enum OpenCLTypeKind : uint8_t {
+  OCLTK_Default,
+  OCLTK_ClkEvent,
+  OCLTK_Event,
+  OCLTK_Image,
+  OCLTK_Pipe,
+  OCLTK_Queue,
+  OCLTK_ReserveID,
+  OCLTK_Sampler,
+};
+
 /// Exposes information about the current target.
 ///
 class TargetInfo : public virtual TransferrableTargetInfo,
@@ -176,6 +191,7 @@ protected:
                          // LLVM IR type.
   bool HasFloat128;
   bool HasFloat16;
+  bool HasBFloat16;
   bool HasStrictFP;
 
   unsigned char MaxAtomicPromoteWidth, MaxAtomicInlineWidth;
@@ -185,6 +201,9 @@ protected:
   unsigned char RegParmMax, SSERegParmMax;
   TargetCXXABI TheCXXABI;
   const LangASMap *AddrSpaceMap;
+  const unsigned *GridValues =
+      nullptr; // Array of target-specific GPU grid values that must be
+               // consistent between host RTL (plugin), device RTL, and clang.
 
   mutable StringRef PlatformName;
   mutable VersionTuple PlatformMinVersion;
@@ -199,6 +218,10 @@ protected:
 
   unsigned HasAArch64SVETypes : 1;
 
+  unsigned ARMCDECoprocMask : 8;
+
+  unsigned MaxOpenCLWorkGroupSize;
+
   // TargetInfo Constructor.  Default initializes all fields.
   TargetInfo(const llvm::Triple &T);
 
@@ -260,7 +283,14 @@ public:
     //     void *__overflow_arg_area;
     //     void *__reg_save_area;
     //   } va_list[1];
-    SystemZBuiltinVaList
+    SystemZBuiltinVaList,
+
+    // typedef struct __va_list_tag {
+    //    void *__current_saved_reg_area_pointer;
+    //    void *__saved_reg_area_end_pointer;
+    //    void *__overflow_area_pointer;
+    //} va_list;
+    HexagonBuiltinVaList
   };
 
 protected:
@@ -346,8 +376,13 @@ public:
   virtual IntType getLeastIntTypeByWidth(unsigned BitWidth,
                                          bool IsSigned) const;
 
-  /// Return floating point type with specified width.
-  RealType getRealTypeByWidth(unsigned BitWidth) const;
+  /// Return floating point type with specified width. On PPC, there are
+  /// three possible types for 128-bit floating point: "PPC double-double",
+  /// IEEE 754R quad precision, and "long double" (which under the covers
+  /// is represented as one of those two). At this time, there is no support
+  /// for an explicit "PPC double-double" type (i.e. __ibm128) so we only
+  /// need to differentiate between "long double" and IEEE quad precision.
+  RealType getRealTypeByWidth(unsigned BitWidth, bool ExplicitIEEE) const;
 
   /// Return the alignment (in bits) of the specified integer type enum.
   ///
@@ -525,6 +560,12 @@ public:
     return (getPointerWidth(0) >= 64) || getTargetOpts().ForceEnableInt128;
   } // FIXME
 
+  /// Determine whether the _ExtInt type is supported on this target. This
+  /// limitation is put into place for ABI reasons.
+  virtual bool hasExtIntType() const {
+    return false;
+  }
+
   /// Determine whether _Float16 is supported on this target.
   virtual bool hasLegalHalfType() const { return HasLegalHalfType; }
 
@@ -534,6 +575,9 @@ public:
   /// Determine whether the _Float16 type is supported on this target.
   virtual bool hasFloat16Type() const { return HasFloat16; }
 
+  /// Determine whether the _BFloat16 type is supported on this target.
+  virtual bool hasBFloat16Type() const { return HasBFloat16; }
+
   /// Determine whether constrained floating point is supported on this target.
   virtual bool hasStrictFP() const { return HasStrictFP; }
 
@@ -585,6 +629,11 @@ public:
   unsigned getFloatAlign() const { return FloatAlign; }
   const llvm::fltSemantics &getFloatFormat() const { return *FloatFormat; }
 
+  /// getBFloat16Width/Align/Format - Return the size/align/format of '__bf16'.
+  unsigned getBFloat16Width() const { return BFloat16Width; }
+  unsigned getBFloat16Align() const { return BFloat16Align; }
+  const llvm::fltSemantics &getBFloat16Format() const { return *BFloat16Format; }
+
   /// getDoubleWidth/Align/Format - Return the size/align/format of 'double'.
   unsigned getDoubleWidth() const { return DoubleWidth; }
   unsigned getDoubleAlign() const { return DoubleAlign; }
@@ -612,6 +661,11 @@ public:
   /// Return the mangled code of __float128.
   virtual const char *getFloat128Mangling() const { return "g"; }
 
+  /// Return the mangled code of bfloat.
+  virtual const char *getBFloat16Mangling() const {
+    llvm_unreachable("bfloat not implemented on this target");
+  }
+
   /// Return the value for the C99 FLT_EVAL_METHOD macro.
   virtual unsigned getFloatEvalMethod() const { return 0; }
 
@@ -646,6 +700,8 @@ public:
   /// types for the given target.
   unsigned getSimdDefaultAlign() const { return SimdDefaultAlign; }
 
+  unsigned getMaxOpenCLWorkGroupSize() const { return MaxOpenCLWorkGroupSize; }
+
   /// Return the alignment (in bits) of the thrown exception object. This is
   /// only meaningful for targets that allocate C++ exceptions in a system
   /// runtime, such as those using the Itanium C++ ABI.
@@ -800,6 +856,10 @@ public:
   /// available on this target.
   bool hasAArch64SVETypes() const { return HasAArch64SVETypes; }
 
+  /// For ARM targets returns a mask defining which coprocessors are configured
+  /// as Custom Datapath.
+  uint32_t getARMCDECoprocMask() const { return ARMCDECoprocMask; }
+
   /// Returns whether the passed in string is a valid clobber in an
   /// inline asm statement.
   ///
@@ -820,6 +880,8 @@ public:
   StringRef getNormalizedGCCRegisterName(StringRef Name,
                                          bool ReturnCanonical = false) const;
 
+  virtual bool isSPRegName(StringRef) const { return false; }
+
   /// Extracts a register from the passed constraint (if it is a
   /// single-register constraint) and the asm label expression related to a
   /// variable in the input or output list of an inline asm statement.
@@ -1111,10 +1173,10 @@ public:
   }
 
   struct BranchProtectionInfo {
-    CodeGenOptions::SignReturnAddressScope SignReturnAddr =
-        CodeGenOptions::SignReturnAddressScope::None;
-    CodeGenOptions::SignReturnAddressKeyValue SignKey =
-        CodeGenOptions::SignReturnAddressKeyValue::AKey;
+    LangOptions::SignReturnAddressScopeKind SignReturnAddr =
+        LangOptions::SignReturnAddressScopeKind::None;
+    LangOptions::SignReturnAddressKeyKind SignKey =
+        LangOptions::SignReturnAddressKeyKind::AKey;
     bool BranchTargetEnforcement = false;
   };
 
@@ -1190,6 +1252,10 @@ public:
         "cpu_specific Multiversioning not implemented on this target");
   }
 
+  // Get the cache line size of a given cpu. This method switches over
+  // the given cpu and returns "None" if the CPU is not found.
+  virtual Optional<unsigned> getCPUCacheLineSize() const { return None; }
+
   // Returns maximal number of args passed in registers.
   unsigned getRegParmMax() const {
     assert(RegParmMax < 7 && "RegParmMax value is larger than AST can handle");
@@ -1264,6 +1330,12 @@ public:
     return LangAS::Default;
   }
 
+  /// Return a target-specific GPU grid value based on the GVIDX enum \p gv
+  unsigned getGridValue(llvm::omp::GVIDX gv) const {
+    assert(GridValues != nullptr && "GridValues not initialized");
+    return GridValues[gv];
+  }
+
   /// Retrieve the name of the platform as it is used in the
   /// availability attribute.
   StringRef getPlatformName() const { return PlatformName; }
@@ -1349,17 +1421,6 @@ public:
       return getTargetOpts().SupportedOpenCLOptions;
   }
 
-  enum OpenCLTypeKind {
-    OCLTK_Default,
-    OCLTK_ClkEvent,
-    OCLTK_Event,
-    OCLTK_Image,
-    OCLTK_Pipe,
-    OCLTK_Queue,
-    OCLTK_ReserveID,
-    OCLTK_Sampler,
-  };
-
   /// Get address space for OpenCL type.
   virtual LangAS getOpenCLTypeAddrSpace(OpenCLTypeKind TK) const;
 
diff --git a/gnu/llvm/clang/include/clang/Driver/CC1Options.td b/gnu/llvm/clang/include/clang/Driver/CC1Options.td
deleted file mode 100644 (file)
index 275a338..0000000
+++ /dev/null
@@ -1,933 +0,0 @@
-//===--- CC1Options.td - Options for clang -cc1 ---------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-//  This file defines the options accepted by clang -cc1 and clang -cc1as.
-//
-//===----------------------------------------------------------------------===//
-
-let Flags = [CC1Option, NoDriverOption] in {
-
-//===----------------------------------------------------------------------===//
-// Target Options
-//===----------------------------------------------------------------------===//
-
-let Flags = [CC1Option, CC1AsOption, NoDriverOption] in {
-
-def target_cpu : Separate<["-"], "target-cpu">,
-  HelpText<"Target a specific cpu type">;
-def target_feature : Separate<["-"], "target-feature">,
-  HelpText<"Target specific attributes">;
-def triple : Separate<["-"], "triple">,
-  HelpText<"Specify target triple (e.g. i686-apple-darwin9)">;
-def target_abi : Separate<["-"], "target-abi">,
-  HelpText<"Target a particular ABI type">;
-def target_sdk_version_EQ : Joined<["-"], "target-sdk-version=">,
-  HelpText<"The version of target SDK used for compilation">;
-
-}
-
-def target_linker_version : Separate<["-"], "target-linker-version">,
-  HelpText<"Target linker version">;
-def triple_EQ : Joined<["-"], "triple=">, Alias<triple>;
-def mfpmath : Separate<["-"], "mfpmath">,
-  HelpText<"Which unit to use for fp math">;
-
-def fpadding_on_unsigned_fixed_point : Flag<["-"], "fpadding-on-unsigned-fixed-point">,
-  HelpText<"Force each unsigned fixed point type to have an extra bit of padding to align their scales with those of signed fixed point types">;
-def fno_padding_on_unsigned_fixed_point : Flag<["-"], "fno-padding-on-unsigned-fixed-point">;
-
-//===----------------------------------------------------------------------===//
-// Analyzer Options
-//===----------------------------------------------------------------------===//
-
-def analysis_UnoptimizedCFG : Flag<["-"], "unoptimized-cfg">,
-  HelpText<"Generate unoptimized CFGs for all analyses">;
-def analysis_CFGAddImplicitDtors : Flag<["-"], "cfg-add-implicit-dtors">,
-  HelpText<"Add C++ implicit destructors to CFGs for all analyses">;
-
-def analyzer_store : Separate<["-"], "analyzer-store">,
-  HelpText<"Source Code Analysis - Abstract Memory Store Models">;
-def analyzer_store_EQ : Joined<["-"], "analyzer-store=">, Alias<analyzer_store>;
-
-def analyzer_constraints : Separate<["-"], "analyzer-constraints">,
-  HelpText<"Source Code Analysis - Symbolic Constraint Engines">;
-def analyzer_constraints_EQ : Joined<["-"], "analyzer-constraints=">,
-  Alias<analyzer_constraints>;
-
-def analyzer_output : Separate<["-"], "analyzer-output">,
-  HelpText<"Source Code Analysis - Output Options">;
-def analyzer_output_EQ : Joined<["-"], "analyzer-output=">,
-  Alias<analyzer_output>;
-
-def analyzer_purge : Separate<["-"], "analyzer-purge">,
-  HelpText<"Source Code Analysis - Dead Symbol Removal Frequency">;
-def analyzer_purge_EQ : Joined<["-"], "analyzer-purge=">, Alias<analyzer_purge>;
-
-def analyzer_opt_analyze_headers : Flag<["-"], "analyzer-opt-analyze-headers">,
-  HelpText<"Force the static analyzer to analyze functions defined in header files">;
-def analyzer_opt_analyze_nested_blocks : Flag<["-"], "analyzer-opt-analyze-nested-blocks">,
-  HelpText<"Analyze the definitions of blocks in addition to functions">;
-def analyzer_display_progress : Flag<["-"], "analyzer-display-progress">,
-  HelpText<"Emit verbose output about the analyzer's progress">;
-def analyze_function : Separate<["-"], "analyze-function">,
-  HelpText<"Run analysis on specific function (for C++ include parameters in name)">;
-def analyze_function_EQ : Joined<["-"], "analyze-function=">, Alias<analyze_function>;
-def trim_egraph : Flag<["-"], "trim-egraph">,
-  HelpText<"Only show error-related paths in the analysis graph">;
-def analyzer_viz_egraph_graphviz : Flag<["-"], "analyzer-viz-egraph-graphviz">,
-  HelpText<"Display exploded graph using GraphViz">;
-def analyzer_dump_egraph : Separate<["-"], "analyzer-dump-egraph">,
-  HelpText<"Dump exploded graph to the specified file">;
-def analyzer_dump_egraph_EQ : Joined<["-"], "analyzer-dump-egraph=">, Alias<analyzer_dump_egraph>;
-
-def analyzer_inline_max_stack_depth : Separate<["-"], "analyzer-inline-max-stack-depth">,
-  HelpText<"Bound on stack depth while inlining (4 by default)">;
-def analyzer_inline_max_stack_depth_EQ : Joined<["-"], "analyzer-inline-max-stack-depth=">,
-  Alias<analyzer_inline_max_stack_depth>;
-
-def analyzer_inlining_mode : Separate<["-"], "analyzer-inlining-mode">,
-  HelpText<"Specify the function selection heuristic used during inlining">;
-def analyzer_inlining_mode_EQ : Joined<["-"], "analyzer-inlining-mode=">, Alias<analyzer_inlining_mode>;
-
-def analyzer_disable_retry_exhausted : Flag<["-"], "analyzer-disable-retry-exhausted">,
-  HelpText<"Do not re-analyze paths leading to exhausted nodes with a different strategy (may decrease code coverage)">;
-
-def analyzer_max_loop : Separate<["-"], "analyzer-max-loop">,
-  HelpText<"The maximum number of times the analyzer will go through a loop">;
-def analyzer_stats : Flag<["-"], "analyzer-stats">,
-  HelpText<"Print internal analyzer statistics.">;
-
-def analyzer_checker : Separate<["-"], "analyzer-checker">,
-  HelpText<"Choose analyzer checkers to enable">,
-  ValuesCode<[{
-    const char *Values =
-    #define GET_CHECKERS
-    #define CHECKER(FULLNAME, CLASS, HT, DOC_URI, IS_HIDDEN)  FULLNAME ","
-    #include "clang/StaticAnalyzer/Checkers/Checkers.inc"
-    #undef GET_CHECKERS
-    #define GET_PACKAGES
-    #define PACKAGE(FULLNAME)  FULLNAME ","
-    #include "clang/StaticAnalyzer/Checkers/Checkers.inc"
-    #undef GET_PACKAGES
-    ;
-  }]>;
-def analyzer_checker_EQ : Joined<["-"], "analyzer-checker=">,
-  Alias<analyzer_checker>;
-
-def analyzer_disable_checker : Separate<["-"], "analyzer-disable-checker">,
-  HelpText<"Choose analyzer checkers to disable">;
-def analyzer_disable_checker_EQ : Joined<["-"], "analyzer-disable-checker=">,
-  Alias<analyzer_disable_checker>;
-
-def analyzer_disable_all_checks : Flag<["-"], "analyzer-disable-all-checks">,
-  HelpText<"Disable all static analyzer checks">;
-
-def analyzer_checker_help : Flag<["-"], "analyzer-checker-help">,
-  HelpText<"Display the list of analyzer checkers that are available">;
-
-def analyzer_checker_help_alpha : Flag<["-"], "analyzer-checker-help-alpha">,
-  HelpText<"Display the list of in development analyzer checkers. These "
-           "are NOT considered safe, they are unstable and will emit incorrect "
-           "reports. Enable ONLY FOR DEVELOPMENT purposes">;
-
-def analyzer_checker_help_developer : Flag<["-"], "analyzer-checker-help-developer">,
-  HelpText<"Display the list of developer-only checkers such as modeling "
-           "and debug checkers">;
-
-def analyzer_config_help : Flag<["-"], "analyzer-config-help">,
-  HelpText<"Display the list of -analyzer-config options. These are meant for "
-           "development purposes only!">;
-
-def analyzer_list_enabled_checkers : Flag<["-"], "analyzer-list-enabled-checkers">,
-  HelpText<"Display the list of enabled analyzer checkers">;
-
-def analyzer_config : Separate<["-"], "analyzer-config">,
-  HelpText<"Choose analyzer options to enable">;
-
-def analyzer_checker_option_help : Flag<["-"], "analyzer-checker-option-help">,
-  HelpText<"Display the list of checker and package options">;
-
-def analyzer_checker_option_help_alpha : Flag<["-"], "analyzer-checker-option-help-alpha">,
-  HelpText<"Display the list of in development checker and package options. "
-           "These are NOT considered safe, they are unstable and will emit "
-           "incorrect reports. Enable ONLY FOR DEVELOPMENT purposes">;
-
-def analyzer_checker_option_help_developer : Flag<["-"], "analyzer-checker-option-help-developer">,
-  HelpText<"Display the list of checker and package options meant for "
-           "development purposes only">;
-
-def analyzer_config_compatibility_mode : Separate<["-"], "analyzer-config-compatibility-mode">,
-  HelpText<"Don't emit errors on invalid analyzer-config inputs">;
-
-def analyzer_config_compatibility_mode_EQ : Joined<["-"], "analyzer-config-compatibility-mode=">,
-  Alias<analyzer_config_compatibility_mode>;
-
-def analyzer_werror : Flag<["-"], "analyzer-werror">,
-  HelpText<"Emit analyzer results as errors rather than warnings">;
-
-//===----------------------------------------------------------------------===//
-// Migrator Options
-//===----------------------------------------------------------------------===//
-def migrator_no_nsalloc_error : Flag<["-"], "no-ns-alloc-error">,
-  HelpText<"Do not error on use of NSAllocateCollectable/NSReallocateCollectable">;
-
-def migrator_no_finalize_removal : Flag<["-"], "no-finalize-removal">,
-  HelpText<"Do not remove finalize method in gc mode">;
-
-//===----------------------------------------------------------------------===//
-// CodeGen Options
-//===----------------------------------------------------------------------===//
-
-let Flags = [CC1Option, CC1AsOption, NoDriverOption] in {
-def debug_info_kind_EQ : Joined<["-"], "debug-info-kind=">;
-def debug_info_macro : Flag<["-"], "debug-info-macro">,
-  HelpText<"Emit macro debug information">;
-def default_function_attr : Separate<["-"], "default-function-attr">,
-  HelpText<"Apply given attribute to all functions">;
-def dwarf_version_EQ : Joined<["-"], "dwarf-version=">;
-def debugger_tuning_EQ : Joined<["-"], "debugger-tuning=">;
-def dwarf_debug_flags : Separate<["-"], "dwarf-debug-flags">,
-  HelpText<"The string to embed in the Dwarf debug flags record.">;
-def record_command_line : Separate<["-"], "record-command-line">,
-  HelpText<"The string to embed in the .LLVM.command.line section.">;
-def compress_debug_sections : Flag<["-", "--"], "compress-debug-sections">,
-    HelpText<"DWARF debug sections compression">;
-def compress_debug_sections_EQ : Joined<["-", "--"], "compress-debug-sections=">,
-    HelpText<"DWARF debug sections compression type">;
-def mno_exec_stack : Flag<["-"], "mnoexecstack">,
-  HelpText<"Mark the file as not needing an executable stack">;
-def massembler_no_warn : Flag<["-"], "massembler-no-warn">,
-  HelpText<"Make assembler not emit warnings">;
-def massembler_fatal_warnings : Flag<["-"], "massembler-fatal-warnings">,
-  HelpText<"Make assembler warnings fatal">;
-def mrelax_relocations : Flag<["--"], "mrelax-relocations">,
-    HelpText<"Use relaxable elf relocations">;
-def msave_temp_labels : Flag<["-"], "msave-temp-labels">,
-  HelpText<"Save temporary labels in the symbol table. "
-           "Note this may change .s semantics and shouldn't generally be used "
-           "on compiler-generated code.">;
-def mrelocation_model : Separate<["-"], "mrelocation-model">,
-  HelpText<"The relocation model to use">, Values<"static,pic,ropi,rwpi,ropi-rwpi,dynamic-no-pic">;
-def fno_math_builtin : Flag<["-"], "fno-math-builtin">,
-  HelpText<"Disable implicit builtin knowledge of math functions">;
-}
-
-def disable_llvm_verifier : Flag<["-"], "disable-llvm-verifier">,
-  HelpText<"Don't run the LLVM IR verifier pass">;
-def disable_llvm_passes : Flag<["-"], "disable-llvm-passes">,
-  HelpText<"Use together with -emit-llvm to get pristine LLVM IR from the "
-           "frontend by not running any LLVM passes at all">;
-def disable_llvm_optzns : Flag<["-"], "disable-llvm-optzns">,
-  Alias<disable_llvm_passes>;
-def disable_lifetimemarkers : Flag<["-"], "disable-lifetime-markers">,
-  HelpText<"Disable lifetime-markers emission even when optimizations are "
-           "enabled">;
-def disable_O0_optnone : Flag<["-"], "disable-O0-optnone">,
-  HelpText<"Disable adding the optnone attribute to functions at O0">;
-def disable_red_zone : Flag<["-"], "disable-red-zone">,
-  HelpText<"Do not emit code that uses the red zone.">;
-def dwarf_column_info : Flag<["-"], "dwarf-column-info">,
-  HelpText<"Turn on column location information.">;
-def dwarf_ext_refs : Flag<["-"], "dwarf-ext-refs">,
-  HelpText<"Generate debug info with external references to clang modules"
-           " or precompiled headers">;
-def dwarf_explicit_import : Flag<["-"], "dwarf-explicit-import">,
-  HelpText<"Generate explicit import from anonymous namespace to containing"
-           " scope">;
-def debug_forward_template_params : Flag<["-"], "debug-forward-template-params">,
-  HelpText<"Emit complete descriptions of template parameters in forward"
-           " declarations">;
-def fforbid_guard_variables : Flag<["-"], "fforbid-guard-variables">,
-  HelpText<"Emit an error if a C++ static local initializer would need a guard variable">;
-def no_implicit_float : Flag<["-"], "no-implicit-float">,
-  HelpText<"Don't generate implicit floating point instructions">;
-def fdump_vtable_layouts : Flag<["-"], "fdump-vtable-layouts">,
-  HelpText<"Dump the layouts of all vtables that will be emitted in a translation unit">;
-def fmerge_functions : Flag<["-"], "fmerge-functions">,
-  HelpText<"Permit merging of identical functions when optimizing.">;
-def femit_coverage_notes : Flag<["-"], "femit-coverage-notes">,
-  HelpText<"Emit a gcov coverage notes file when compiling.">;
-def femit_coverage_data: Flag<["-"], "femit-coverage-data">,
-  HelpText<"Instrument the program to emit gcov coverage data when run.">;
-def coverage_data_file : Separate<["-"], "coverage-data-file">,
-  HelpText<"Emit coverage data to this filename.">;
-def coverage_data_file_EQ : Joined<["-"], "coverage-data-file=">,
-  Alias<coverage_data_file>;
-def coverage_notes_file : Separate<["-"], "coverage-notes-file">,
-  HelpText<"Emit coverage notes to this filename.">;
-def coverage_notes_file_EQ : Joined<["-"], "coverage-notes-file=">,
-  Alias<coverage_notes_file>;
-def coverage_cfg_checksum : Flag<["-"], "coverage-cfg-checksum">,
-  HelpText<"Emit CFG checksum for functions in .gcno files.">;
-def coverage_no_function_names_in_data : Flag<["-"], "coverage-no-function-names-in-data">,
-  HelpText<"Emit function names in .gcda files.">;
-def coverage_exit_block_before_body : Flag<["-"], "coverage-exit-block-before-body">,
-  HelpText<"Emit the exit block before the body blocks in .gcno files.">;
-def coverage_version_EQ : Joined<["-"], "coverage-version=">,
-  HelpText<"Four-byte version string for gcov files.">;
-def test_coverage : Flag<["-"], "test-coverage">,
-  HelpText<"Do not generate coverage files or remove coverage changes from IR">;
-def dump_coverage_mapping : Flag<["-"], "dump-coverage-mapping">,
-  HelpText<"Dump the coverage mapping records, for testing">;
-def fuse_register_sized_bitfield_access: Flag<["-"], "fuse-register-sized-bitfield-access">,
-  HelpText<"Use register sized accesses to bit-fields, when possible.">;
-def relaxed_aliasing : Flag<["-"], "relaxed-aliasing">,
-  HelpText<"Turn off Type Based Alias Analysis">;
-def no_struct_path_tbaa : Flag<["-"], "no-struct-path-tbaa">,
-  HelpText<"Turn off struct-path aware Type Based Alias Analysis">;
-def new_struct_path_tbaa : Flag<["-"], "new-struct-path-tbaa">,
-  HelpText<"Enable enhanced struct-path aware Type Based Alias Analysis">;
-def masm_verbose : Flag<["-"], "masm-verbose">,
-  HelpText<"Generate verbose assembly output">;
-def mcode_model : Separate<["-"], "mcode-model">,
-  HelpText<"The code model to use">, Values<"tiny,small,kernel,medium,large">;
-def mdebug_pass : Separate<["-"], "mdebug-pass">,
-  HelpText<"Enable additional debug output">;
-def mframe_pointer_EQ : Joined<["-"], "mframe-pointer=">,
-  HelpText<"Specify which frame pointers to retain (all, non-leaf, none).">, Values<"all,non-leaf,none">;
-def mdisable_tail_calls : Flag<["-"], "mdisable-tail-calls">,
-  HelpText<"Disable tail call optimization, keeping the call stack accurate">;
-def menable_no_infinities : Flag<["-"], "menable-no-infs">,
-  HelpText<"Allow optimization to assume there are no infinities.">;
-def menable_no_nans : Flag<["-"], "menable-no-nans">,
-  HelpText<"Allow optimization to assume there are no NaNs.">;
-def menable_unsafe_fp_math : Flag<["-"], "menable-unsafe-fp-math">,
-  HelpText<"Allow unsafe floating-point math optimizations which may decrease "
-           "precision">;
-def mreassociate : Flag<["-"], "mreassociate">,
-  HelpText<"Allow reassociation transformations for floating-point instructions">;
-def mabi_EQ_ieeelongdouble : Flag<["-"], "mabi=ieeelongdouble">,
-  HelpText<"Use IEEE 754 quadruple-precision for long double">;
-def mfloat_abi : Separate<["-"], "mfloat-abi">,
-  HelpText<"The float ABI to use">;
-def mtp : Separate<["-"], "mtp">,
-  HelpText<"Mode for reading thread pointer">;
-def mlimit_float_precision : Separate<["-"], "mlimit-float-precision">,
-  HelpText<"Limit float precision to the given value">;
-def split_stacks : Flag<["-"], "split-stacks">,
-  HelpText<"Try to use a split stack if possible.">;
-def mno_zero_initialized_in_bss : Flag<["-"], "mno-zero-initialized-in-bss">,
-  HelpText<"Do not put zero initialized data in the BSS">;
-def mregparm : Separate<["-"], "mregparm">,
-  HelpText<"Limit the number of registers available for integer arguments">;
-def munwind_tables : Flag<["-"], "munwind-tables">,
-  HelpText<"Generate unwinding tables for all functions">;
-def mconstructor_aliases : Flag<["-"], "mconstructor-aliases">,
-  HelpText<"Emit complete constructors and destructors as aliases when possible">;
-def mlink_bitcode_file : Separate<["-"], "mlink-bitcode-file">,
-  HelpText<"Link the given bitcode file before performing optimizations.">;
-def mlink_builtin_bitcode : Separate<["-"], "mlink-builtin-bitcode">,
-  HelpText<"Link and internalize needed symbols from the given bitcode file "
-           "before performing optimizations.">;
-def mlink_cuda_bitcode : Separate<["-"], "mlink-cuda-bitcode">,
-  Alias<mlink_builtin_bitcode>;
-def vectorize_loops : Flag<["-"], "vectorize-loops">,
-  HelpText<"Run the Loop vectorization passes">;
-def vectorize_slp : Flag<["-"], "vectorize-slp">,
-  HelpText<"Run the SLP vectorization passes">;
-def dependent_lib : Joined<["--"], "dependent-lib=">,
-  HelpText<"Add dependent library">;
-def linker_option : Joined<["--"], "linker-option=">,
-  HelpText<"Add linker option">;
-def fsanitize_coverage_type : Joined<["-"], "fsanitize-coverage-type=">,
-                              HelpText<"Sanitizer coverage type">;
-def fsanitize_coverage_indirect_calls
-    : Flag<["-"], "fsanitize-coverage-indirect-calls">,
-      HelpText<"Enable sanitizer coverage for indirect calls">;
-def fsanitize_coverage_trace_bb
-    : Flag<["-"], "fsanitize-coverage-trace-bb">,
-      HelpText<"Enable basic block tracing in sanitizer coverage">;
-def fsanitize_coverage_trace_cmp
-    : Flag<["-"], "fsanitize-coverage-trace-cmp">,
-      HelpText<"Enable cmp instruction tracing in sanitizer coverage">;
-def fsanitize_coverage_trace_div
-    : Flag<["-"], "fsanitize-coverage-trace-div">,
-      HelpText<"Enable div instruction tracing in sanitizer coverage">;
-def fsanitize_coverage_trace_gep
-    : Flag<["-"], "fsanitize-coverage-trace-gep">,
-      HelpText<"Enable gep instruction tracing in sanitizer coverage">;
-def fsanitize_coverage_8bit_counters
-    : Flag<["-"], "fsanitize-coverage-8bit-counters">,
-      HelpText<"Enable frequency counters in sanitizer coverage">;
-def fsanitize_coverage_inline_8bit_counters
-    : Flag<["-"], "fsanitize-coverage-inline-8bit-counters">,
-      HelpText<"Enable inline 8-bit counters in sanitizer coverage">;
-def fsanitize_coverage_pc_table
-    : Flag<["-"], "fsanitize-coverage-pc-table">,
-      HelpText<"Create a table of coverage-instrumented PCs">;
-def fsanitize_coverage_trace_pc
-    : Flag<["-"], "fsanitize-coverage-trace-pc">,
-      HelpText<"Enable PC tracing in sanitizer coverage">;
-def fsanitize_coverage_trace_pc_guard
-    : Flag<["-"], "fsanitize-coverage-trace-pc-guard">,
-      HelpText<"Enable PC tracing with guard in sanitizer coverage">;
-def fsanitize_coverage_no_prune
-    : Flag<["-"], "fsanitize-coverage-no-prune">,
-      HelpText<"Disable coverage pruning (i.e. instrument all blocks/edges)">;
-def fsanitize_coverage_stack_depth
-    : Flag<["-"], "fsanitize-coverage-stack-depth">,
-      HelpText<"Enable max stack depth tracing">;
-def fpatchable_function_entry_offset_EQ
-    : Joined<["-"], "fpatchable-function-entry-offset=">, MetaVarName<"<M>">,
-      HelpText<"Generate M NOPs before function entry">;
-def fprofile_instrument_EQ : Joined<["-"], "fprofile-instrument=">,
-    HelpText<"Enable PGO instrumentation. The accepted value is clang, llvm, "
-             "or none">, Values<"none,clang,llvm">;
-def fprofile_instrument_path_EQ : Joined<["-"], "fprofile-instrument-path=">,
-    HelpText<"Generate instrumented code to collect execution counts into "
-             "<file> (overridden by LLVM_PROFILE_FILE env var)">;
-def fprofile_instrument_use_path_EQ :
-    Joined<["-"], "fprofile-instrument-use-path=">,
-    HelpText<"Specify the profile path in PGO use compilation">;
-def flto_visibility_public_std:
-    Flag<["-"], "flto-visibility-public-std">,
-    HelpText<"Use public LTO visibility for classes in std and stdext namespaces">;
-def flto_unit: Flag<["-"], "flto-unit">,
-    HelpText<"Emit IR to support LTO unit features (CFI, whole program vtable opt)">;
-def fno_lto_unit: Flag<["-"], "fno-lto-unit">;
-def femit_debug_entry_values : Flag<["-"], "femit-debug-entry-values">,
-    HelpText<"Enables debug info about call site parameter's entry values">;
-def fdebug_pass_manager : Flag<["-"], "fdebug-pass-manager">,
-    HelpText<"Prints debug information for the new pass manager">;
-def fno_debug_pass_manager : Flag<["-"], "fno-debug-pass-manager">,
-    HelpText<"Disables debug printing for the new pass manager">;
-// The driver option takes the key as a parameter to the -msign-return-address=
-// and -mbranch-protection= options, but CC1 has a separate option so we
-// don't have to parse the parameter twice.
-def msign_return_address_key_EQ : Joined<["-"], "msign-return-address-key=">,
-    Values<"a_key,b_key">;
-def mbranch_target_enforce : Flag<["-"], "mbranch-target-enforce">;
-def fno_dllexport_inlines : Flag<["-"], "fno-dllexport-inlines">;
-def cfguard_no_checks : Flag<["-"], "cfguard-no-checks">,
-    HelpText<"Emit Windows Control Flow Guard tables only (no checks)">;
-def cfguard : Flag<["-"], "cfguard">,
-    HelpText<"Emit Windows Control Flow Guard tables and checks">;
-
-//===----------------------------------------------------------------------===//
-// Dependency Output Options
-//===----------------------------------------------------------------------===//
-
-def sys_header_deps : Flag<["-"], "sys-header-deps">,
-  HelpText<"Include system headers in dependency output">;
-def module_file_deps : Flag<["-"], "module-file-deps">,
-  HelpText<"Include module files in dependency output">;
-def header_include_file : Separate<["-"], "header-include-file">,
-  HelpText<"Filename (or -) to write header include output to">;
-def show_includes : Flag<["--"], "show-includes">,
-  HelpText<"Print cl.exe style /showIncludes to stdout">;
-
-//===----------------------------------------------------------------------===//
-// Diagnostic Options
-//===----------------------------------------------------------------------===//
-
-def diagnostic_log_file : Separate<["-"], "diagnostic-log-file">,
-  HelpText<"Filename (or -) to log diagnostics to">;
-def diagnostic_serialized_file : Separate<["-"], "serialize-diagnostic-file">,
-  MetaVarName<"<filename>">,
-  HelpText<"File for serializing diagnostics in a binary format">;
-
-def fdiagnostics_format : Separate<["-"], "fdiagnostics-format">,
-  HelpText<"Change diagnostic formatting to match IDE and command line tools">, Values<"clang,msvc,msvc-fallback,vi">;
-def fdiagnostics_show_category : Separate<["-"], "fdiagnostics-show-category">,
-  HelpText<"Print diagnostic category">, Values<"none,id,name">;
-def fno_diagnostics_use_presumed_location : Flag<["-"], "fno-diagnostics-use-presumed-location">,
-  HelpText<"Ignore #line directives when displaying diagnostic locations">;
-def ftabstop : Separate<["-"], "ftabstop">, MetaVarName<"<N>">,
-  HelpText<"Set the tab stop distance.">;
-def ferror_limit : Separate<["-"], "ferror-limit">, MetaVarName<"<N>">,
-  HelpText<"Set the maximum number of errors to emit before stopping (0 = no limit).">;
-def fmacro_backtrace_limit : Separate<["-"], "fmacro-backtrace-limit">, MetaVarName<"<N>">,
-  HelpText<"Set the maximum number of entries to print in a macro expansion backtrace (0 = no limit).">;
-def ftemplate_backtrace_limit : Separate<["-"], "ftemplate-backtrace-limit">, MetaVarName<"<N>">,
-  HelpText<"Set the maximum number of entries to print in a template instantiation backtrace (0 = no limit).">;
-def fconstexpr_backtrace_limit : Separate<["-"], "fconstexpr-backtrace-limit">, MetaVarName<"<N>">,
-  HelpText<"Set the maximum number of entries to print in a constexpr evaluation backtrace (0 = no limit).">;
-def fspell_checking_limit : Separate<["-"], "fspell-checking-limit">, MetaVarName<"<N>">,
-  HelpText<"Set the maximum number of times to perform spell checking on unrecognized identifiers (0 = no limit).">;
-def fcaret_diagnostics_max_lines :
-  Separate<["-"], "fcaret-diagnostics-max-lines">, MetaVarName<"<N>">,
-  HelpText<"Set the maximum number of source lines to show in a caret diagnostic">;
-def fmessage_length : Separate<["-"], "fmessage-length">, MetaVarName<"<N>">,
-  HelpText<"Format message diagnostics so that they fit within N columns or fewer, when possible.">;
-def verify_EQ : CommaJoined<["-"], "verify=">,
-  MetaVarName<"<prefixes>">,
-  HelpText<"Verify diagnostic output using comment directives that start with"
-           " prefixes in the comma-separated sequence <prefixes>">;
-def verify : Flag<["-"], "verify">,
-  HelpText<"Equivalent to -verify=expected">;
-def verify_ignore_unexpected : Flag<["-"], "verify-ignore-unexpected">,
-  HelpText<"Ignore unexpected diagnostic messages">;
-def verify_ignore_unexpected_EQ : CommaJoined<["-"], "verify-ignore-unexpected=">,
-  HelpText<"Ignore unexpected diagnostic messages">;
-def Wno_rewrite_macros : Flag<["-"], "Wno-rewrite-macros">,
-  HelpText<"Silence ObjC rewriting warnings">;
-
-//===----------------------------------------------------------------------===//
-// Frontend Options
-//===----------------------------------------------------------------------===//
-
-// This isn't normally used, it is just here so we can parse a
-// CompilerInvocation out of a driver-derived argument vector.
-def cc1 : Flag<["-"], "cc1">;
-def cc1as : Flag<["-"], "cc1as">;
-
-def ast_merge : Separate<["-"], "ast-merge">,
-  MetaVarName<"<ast file>">,
-  HelpText<"Merge the given AST file into the translation unit being compiled.">;
-def aux_triple : Separate<["-"], "aux-triple">,
-  HelpText<"Auxiliary target triple.">;
-def code_completion_at : Separate<["-"], "code-completion-at">,
-  MetaVarName<"<file>:<line>:<column>">,
-  HelpText<"Dump code-completion information at a location">;
-def remap_file : Separate<["-"], "remap-file">,
-  MetaVarName<"<from>;<to>">,
-  HelpText<"Replace the contents of the <from> file with the contents of the <to> file">;
-def code_completion_at_EQ : Joined<["-"], "code-completion-at=">,
-  Alias<code_completion_at>;
-def code_completion_macros : Flag<["-"], "code-completion-macros">,
-  HelpText<"Include macros in code-completion results">;
-def code_completion_patterns : Flag<["-"], "code-completion-patterns">,
-  HelpText<"Include code patterns in code-completion results">;
-def no_code_completion_globals : Flag<["-"], "no-code-completion-globals">,
-  HelpText<"Do not include global declarations in code-completion results.">;
-def no_code_completion_ns_level_decls : Flag<["-"], "no-code-completion-ns-level-decls">,
-  HelpText<"Do not include declarations inside namespaces (incl. global namespace) in the code-completion results.">;
-def code_completion_brief_comments : Flag<["-"], "code-completion-brief-comments">,
-  HelpText<"Include brief documentation comments in code-completion results.">;
-def code_completion_with_fixits : Flag<["-"], "code-completion-with-fixits">,
-  HelpText<"Include code completion results which require small fix-its.">;
-def disable_free : Flag<["-"], "disable-free">,
-  HelpText<"Disable freeing of memory on exit">;
-def discard_value_names : Flag<["-"], "discard-value-names">,
-  HelpText<"Discard value names in LLVM IR">;
-def load : Separate<["-"], "load">, MetaVarName<"<dsopath>">,
-  HelpText<"Load the named plugin (dynamic shared object)">;
-def plugin : Separate<["-"], "plugin">, MetaVarName<"<name>">,
-  HelpText<"Use the named plugin action instead of the default action (use \"help\" to list available options)">;
-def plugin_arg : JoinedAndSeparate<["-"], "plugin-arg-">,
-    MetaVarName<"<name> <arg>">,
-    HelpText<"Pass <arg> to plugin <name>">;
-def add_plugin : Separate<["-"], "add-plugin">, MetaVarName<"<name>">,
-  HelpText<"Use the named plugin action in addition to the default action">;
-def ast_dump_filter : Separate<["-"], "ast-dump-filter">,
-  MetaVarName<"<dump_filter>">,
-  HelpText<"Use with -ast-dump or -ast-print to dump/print only AST declaration"
-           " nodes having a certain substring in a qualified name. Use"
-           " -ast-list to list all filterable declaration node names.">;
-def fno_modules_global_index : Flag<["-"], "fno-modules-global-index">,
-  HelpText<"Do not automatically generate or update the global module index">;
-def fno_modules_error_recovery : Flag<["-"], "fno-modules-error-recovery">,
-  HelpText<"Do not automatically import modules for error recovery">;
-def fmodule_map_file_home_is_cwd : Flag<["-"], "fmodule-map-file-home-is-cwd">,
-  HelpText<"Use the current working directory as the home directory of "
-           "module maps specified by -fmodule-map-file=<FILE>">;
-def fmodule_feature : Separate<["-"], "fmodule-feature">,
-  MetaVarName<"<feature>">,
-  HelpText<"Enable <feature> in module map requires declarations">;
-def fmodules_embed_file_EQ : Joined<["-"], "fmodules-embed-file=">,
-  MetaVarName<"<file>">,
-  HelpText<"Embed the contents of the specified file into the module file "
-           "being compiled.">;
-def fmodules_embed_all_files : Joined<["-"], "fmodules-embed-all-files">,
-  HelpText<"Embed the contents of all files read by this compilation into "
-           "the produced module file.">;
-def fmodules_local_submodule_visibility :
-  Flag<["-"], "fmodules-local-submodule-visibility">,
-  HelpText<"Enforce name visibility rules across submodules of the same "
-           "top-level module.">;
-def fmodules_codegen :
-  Flag<["-"], "fmodules-codegen">,
-  HelpText<"Generate code for uses of this module that assumes an explicit "
-           "object file will be built for the module">;
-def fmodules_debuginfo :
-  Flag<["-"], "fmodules-debuginfo">,
-  HelpText<"Generate debug info for types in an object file built from this "
-           "module and do not generate them elsewhere">;
-def fmodule_format_EQ : Joined<["-"], "fmodule-format=">,
-  HelpText<"Select the container format for clang modules and PCH. "
-           "Supported options are 'raw' and 'obj'.">;
-def ftest_module_file_extension_EQ :
-  Joined<["-"], "ftest-module-file-extension=">,
-  HelpText<"introduce a module file extension for testing purposes. "
-           "The argument is parsed as blockname:major:minor:hashed:user info">;
-def fconcepts_ts : Flag<["-"], "fconcepts-ts">,
-  HelpText<"Enable C++ Extensions for Concepts. (deprecated - use -std=c++2a)">;
-def fno_concept_satisfaction_caching : Flag<["-"],
-                                            "fno-concept-satisfaction-caching">,
-  HelpText<"Disable satisfaction caching for C++2a Concepts.">;
-
-let Group = Action_Group in {
-
-def Eonly : Flag<["-"], "Eonly">,
-  HelpText<"Just run preprocessor, no output (for timings)">;
-def dump_raw_tokens : Flag<["-"], "dump-raw-tokens">,
-  HelpText<"Lex file in raw mode and dump raw tokens">;
-def analyze : Flag<["-"], "analyze">,
-  HelpText<"Run static analysis engine">;
-def dump_tokens : Flag<["-"], "dump-tokens">,
-  HelpText<"Run preprocessor, dump internal rep of tokens">;
-def init_only : Flag<["-"], "init-only">,
-  HelpText<"Only execute frontend initialization">;
-def fixit : Flag<["-"], "fixit">,
-  HelpText<"Apply fix-it advice to the input source">;
-def fixit_EQ : Joined<["-"], "fixit=">,
-  HelpText<"Apply fix-it advice creating a file with the given suffix">;
-def print_preamble : Flag<["-"], "print-preamble">,
-  HelpText<"Print the \"preamble\" of a file, which is a candidate for implicit"
-           " precompiled headers.">;
-def emit_html : Flag<["-"], "emit-html">,
-  HelpText<"Output input source as HTML">;
-def ast_print : Flag<["-"], "ast-print">,
-  HelpText<"Build ASTs and then pretty-print them">;
-def ast_list : Flag<["-"], "ast-list">,
-  HelpText<"Build ASTs and print the list of declaration node qualified names">;
-def ast_dump : Flag<["-"], "ast-dump">,
-  HelpText<"Build ASTs and then debug dump them">;
-def ast_dump_EQ : Joined<["-"], "ast-dump=">,
-  HelpText<"Build ASTs and then debug dump them in the specified format. "
-           "Supported formats include: default, json">;
-def ast_dump_all : Flag<["-"], "ast-dump-all">,
-  HelpText<"Build ASTs and then debug dump them, forcing deserialization">;
-def ast_dump_all_EQ : Joined<["-"], "ast-dump-all=">,
-  HelpText<"Build ASTs and then debug dump them in the specified format, "
-           "forcing deserialization. Supported formats include: default, json">;
-def templight_dump : Flag<["-"], "templight-dump">,
-  HelpText<"Dump templight information to stdout">;
-def ast_dump_lookups : Flag<["-"], "ast-dump-lookups">,
-  HelpText<"Build ASTs and then debug dump their name lookup tables">;
-def ast_view : Flag<["-"], "ast-view">,
-  HelpText<"Build ASTs and view them with GraphViz">;
-def emit_module : Flag<["-"], "emit-module">,
-  HelpText<"Generate pre-compiled module file from a module map">;
-def emit_module_interface : Flag<["-"], "emit-module-interface">,
-  HelpText<"Generate pre-compiled module file from a C++ module interface">;
-def emit_header_module : Flag<["-"], "emit-header-module">,
-  HelpText<"Generate pre-compiled module file from a set of header files">;
-def emit_pch : Flag<["-"], "emit-pch">,
-  HelpText<"Generate pre-compiled header file">;
-def emit_llvm_bc : Flag<["-"], "emit-llvm-bc">,
-  HelpText<"Build ASTs then convert to LLVM, emit .bc file">;
-def emit_llvm_only : Flag<["-"], "emit-llvm-only">,
-  HelpText<"Build ASTs and convert to LLVM, discarding output">;
-def emit_codegen_only : Flag<["-"], "emit-codegen-only">,
-  HelpText<"Generate machine code, but discard output">;
-def emit_obj : Flag<["-"], "emit-obj">,
-  HelpText<"Emit native object files">;
-def rewrite_test : Flag<["-"], "rewrite-test">,
-  HelpText<"Rewriter playground">;
-def rewrite_macros : Flag<["-"], "rewrite-macros">,
-  HelpText<"Expand macros without full preprocessing">;
-def migrate : Flag<["-"], "migrate">,
-  HelpText<"Migrate source code">;
-def compiler_options_dump : Flag<["-"], "compiler-options-dump">,
-  HelpText<"Dump the compiler configuration options">;
-def print_dependency_directives_minimized_source : Flag<["-"],
-  "print-dependency-directives-minimized-source">,
-  HelpText<"Print the output of the dependency directives source minimizer">;
-}
-
-def emit_llvm_uselists : Flag<["-"], "emit-llvm-uselists">,
-  HelpText<"Preserve order of LLVM use-lists when serializing">;
-def no_emit_llvm_uselists : Flag<["-"], "no-emit-llvm-uselists">,
-  HelpText<"Don't preserve order of LLVM use-lists when serializing">;
-
-def mt_migrate_directory : Separate<["-"], "mt-migrate-directory">,
-  HelpText<"Directory for temporary files produced during ARC or ObjC migration">;
-def arcmt_check : Flag<["-"], "arcmt-check">,
-  HelpText<"Check for ARC migration issues that need manual handling">;
-def arcmt_modify : Flag<["-"], "arcmt-modify">,
-  HelpText<"Apply modifications to files to conform to ARC">;
-def arcmt_migrate : Flag<["-"], "arcmt-migrate">,
-  HelpText<"Apply modifications and produces temporary files that conform to ARC">;
-
-def opt_record_file : Separate<["-"], "opt-record-file">,
-  HelpText<"File name to use for YAML optimization record output">;
-def opt_record_passes : Separate<["-"], "opt-record-passes">,
-  HelpText<"Only record remark information for passes whose names match the given regular expression">;
-def opt_record_format : Separate<["-"], "opt-record-format">,
-  HelpText<"The format used for serializing remarks (default: YAML)">;
-
-def print_stats : Flag<["-"], "print-stats">,
-  HelpText<"Print performance metrics and statistics">;
-def stats_file : Joined<["-"], "stats-file=">,
-  HelpText<"Filename to write statistics to">;
-def fdump_record_layouts : Flag<["-"], "fdump-record-layouts">,
-  HelpText<"Dump record layout information">;
-def fdump_record_layouts_simple : Flag<["-"], "fdump-record-layouts-simple">,
-  HelpText<"Dump record layout information in a simple form used for testing">;
-def fix_what_you_can : Flag<["-"], "fix-what-you-can">,
-  HelpText<"Apply fix-it advice even in the presence of unfixable errors">;
-def fix_only_warnings : Flag<["-"], "fix-only-warnings">,
-  HelpText<"Apply fix-it advice only for warnings, not errors">;
-def fixit_recompile : Flag<["-"], "fixit-recompile">,
-  HelpText<"Apply fix-it changes and recompile">;
-def fixit_to_temp : Flag<["-"], "fixit-to-temporary">,
-  HelpText<"Apply fix-it changes to temporary files">;
-
-def foverride_record_layout_EQ : Joined<["-"], "foverride-record-layout=">,
-  HelpText<"Override record layouts with those in the given file">;
-def pch_through_header_EQ : Joined<["-"], "pch-through-header=">,
-  HelpText<"Stop PCH generation after including this file.  When using a PCH, "
-           "skip tokens until after this file is included.">;
-def pch_through_hdrstop_create : Flag<["-"], "pch-through-hdrstop-create">,
-  HelpText<"When creating a PCH, stop PCH generation after #pragma hdrstop.">;
-def pch_through_hdrstop_use : Flag<["-"], "pch-through-hdrstop-use">,
-  HelpText<"When using a PCH, skip tokens until after a #pragma hdrstop.">;
-def fno_pch_timestamp : Flag<["-"], "fno-pch-timestamp">,
-  HelpText<"Disable inclusion of timestamp in precompiled headers">;
-def building_pch_with_obj : Flag<["-"], "building-pch-with-obj">,
-  HelpText<"This compilation is part of building a PCH with corresponding object file.">;
-
-def aligned_alloc_unavailable : Flag<["-"], "faligned-alloc-unavailable">,
-  HelpText<"Aligned allocation/deallocation functions are unavailable">;
-
-//===----------------------------------------------------------------------===//
-// Language Options
-//===----------------------------------------------------------------------===//
-
-let Flags = [CC1Option, CC1AsOption, NoDriverOption] in {
-
-def version : Flag<["-"], "version">,
-  HelpText<"Print the compiler version">;
-def main_file_name : Separate<["-"], "main-file-name">,
-  HelpText<"Main file name to use for debug info and source if missing">;
-def split_dwarf_output : Separate<["-"], "split-dwarf-output">,
-  HelpText<"File name to use for split dwarf debug info output">;
-
-}
-
-def fblocks_runtime_optional : Flag<["-"], "fblocks-runtime-optional">,
-  HelpText<"Weakly link in the blocks runtime">;
-def fexternc_nounwind : Flag<["-"], "fexternc-nounwind">,
-  HelpText<"Assume all functions with C linkage do not unwind">;
-def split_dwarf_file : Separate<["-"], "split-dwarf-file">,
-  HelpText<"Name of the split dwarf debug info file to encode in the object file">;
-def fno_wchar : Flag<["-"], "fno-wchar">,
-  HelpText<"Disable C++ builtin type wchar_t">;
-def fconstant_string_class : Separate<["-"], "fconstant-string-class">,
-  MetaVarName<"<class name>">,
-  HelpText<"Specify the class to use for constant Objective-C string objects.">;
-def fobjc_arc_cxxlib_EQ : Joined<["-"], "fobjc-arc-cxxlib=">,
-  HelpText<"Objective-C++ Automatic Reference Counting standard library kind">, Values<"libc++,libstdc++,none">;
-def fobjc_runtime_has_weak : Flag<["-"], "fobjc-runtime-has-weak">,
-  HelpText<"The target Objective-C runtime supports ARC weak operations">;
-def fobjc_dispatch_method_EQ : Joined<["-"], "fobjc-dispatch-method=">,
-  HelpText<"Objective-C dispatch method to use">, Values<"legacy,non-legacy,mixed">;
-def disable_objc_default_synthesize_properties : Flag<["-"], "disable-objc-default-synthesize-properties">,
-  HelpText<"disable the default synthesis of Objective-C properties">;
-def fencode_extended_block_signature : Flag<["-"], "fencode-extended-block-signature">,
-  HelpText<"enable extended encoding of block type signature">;
-def function_alignment : Separate<["-"], "function-alignment">,
-    HelpText<"default alignment for functions">;
-def pic_level : Separate<["-"], "pic-level">,
-  HelpText<"Value for __PIC__">;
-def pic_is_pie : Flag<["-"], "pic-is-pie">,
-  HelpText<"File is for a position independent executable">;
-def fno_validate_pch : Flag<["-"], "fno-validate-pch">,
-  HelpText<"Disable validation of precompiled headers">;
-def fallow_pch_with_errors : Flag<["-"], "fallow-pch-with-compiler-errors">,
-  HelpText<"Accept a PCH file that was created with compiler errors">;
-def dump_deserialized_pch_decls : Flag<["-"], "dump-deserialized-decls">,
-  HelpText<"Dump declarations that are deserialized from PCH, for testing">;
-def error_on_deserialized_pch_decl : Separate<["-"], "error-on-deserialized-decl">,
-  HelpText<"Emit error if a specific declaration is deserialized from PCH, for testing">;
-def error_on_deserialized_pch_decl_EQ : Joined<["-"], "error-on-deserialized-decl=">,
-  Alias<error_on_deserialized_pch_decl>;
-def static_define : Flag<["-"], "static-define">,
-  HelpText<"Should __STATIC__ be defined">;
-def stack_protector : Separate<["-"], "stack-protector">,
-  HelpText<"Enable stack protectors">;
-def stack_protector_buffer_size : Separate<["-"], "stack-protector-buffer-size">,
-  HelpText<"Lower bound for a buffer to be considered for stack protection">;
-def ret_protector : Flag<["-"], "ret-protector">,
-  HelpText<"Enable Return Protectors">;
-def fvisibility : Separate<["-"], "fvisibility">,
-  HelpText<"Default type and symbol visibility">;
-def ftype_visibility : Separate<["-"], "ftype-visibility">,
-  HelpText<"Default type visibility">;
-def fapply_global_visibility_to_externs : Flag<["-"], "fapply-global-visibility-to-externs">,
-  HelpText<"Apply global symbol visibility to external declarations without an explicit visibility">;
-def ftemplate_depth : Separate<["-"], "ftemplate-depth">,
-  HelpText<"Maximum depth of recursive template instantiation">;
-def foperator_arrow_depth : Separate<["-"], "foperator-arrow-depth">,
-  HelpText<"Maximum number of 'operator->'s to call for a member access">;
-def fconstexpr_depth : Separate<["-"], "fconstexpr-depth">,
-  HelpText<"Maximum depth of recursive constexpr function calls">;
-def fconstexpr_steps : Separate<["-"], "fconstexpr-steps">,
-  HelpText<"Maximum number of steps in constexpr function evaluation">;
-def fbracket_depth : Separate<["-"], "fbracket-depth">,
-  HelpText<"Maximum nesting level for parentheses, brackets, and braces">;
-def fconst_strings : Flag<["-"], "fconst-strings">,
-  HelpText<"Use a const qualified type for string literals in C and ObjC">;
-def fno_const_strings : Flag<["-"], "fno-const-strings">,
-  HelpText<"Don't use a const qualified type for string literals in C and ObjC">;
-def fno_bitfield_type_align : Flag<["-"], "fno-bitfield-type-align">,
-  HelpText<"Ignore bit-field types when aligning structures">;
-def ffake_address_space_map : Flag<["-"], "ffake-address-space-map">,
-  HelpText<"Use a fake address space map; OpenCL testing purposes only">;
-def faddress_space_map_mangling_EQ : Joined<["-"], "faddress-space-map-mangling=">, MetaVarName<"<yes|no|target>">,
-  HelpText<"Set the mode for address space map based mangling; OpenCL testing purposes only">;
-def funknown_anytype : Flag<["-"], "funknown-anytype">,
-  HelpText<"Enable parser support for the __unknown_anytype type; for testing purposes only">;
-def fdebugger_support : Flag<["-"], "fdebugger-support">,
-  HelpText<"Enable special debugger support behavior">;
-def fdebugger_cast_result_to_id : Flag<["-"], "fdebugger-cast-result-to-id">,
-  HelpText<"Enable casting unknown expression results to id">;
-def fdebugger_objc_literal : Flag<["-"], "fdebugger-objc-literal">,
-  HelpText<"Enable special debugger support for Objective-C subscripting and literals">;
-def fdeprecated_macro : Flag<["-"], "fdeprecated-macro">,
-  HelpText<"Defines the __DEPRECATED macro">;
-def fno_deprecated_macro : Flag<["-"], "fno-deprecated-macro">,
-  HelpText<"Undefines the __DEPRECATED macro">;
-def fobjc_subscripting_legacy_runtime : Flag<["-"], "fobjc-subscripting-legacy-runtime">,
-  HelpText<"Allow Objective-C array and dictionary subscripting in legacy runtime">;
-def vtordisp_mode_EQ : Joined<["-"], "vtordisp-mode=">,
-  HelpText<"Control vtordisp placement on win32 targets">;
-def fnative_half_type: Flag<["-"], "fnative-half-type">,
-  HelpText<"Use the native half type for __fp16 instead of promoting to float">;
-def fnative_half_arguments_and_returns : Flag<["-"], "fnative-half-arguments-and-returns">,
-  HelpText<"Use the native __fp16 type for arguments and returns (and skip ABI-specific lowering)">;
-def fallow_half_arguments_and_returns : Flag<["-"], "fallow-half-arguments-and-returns">,
-  HelpText<"Allow function arguments and returns of type half">;
-def fdefault_calling_conv_EQ : Joined<["-"], "fdefault-calling-conv=">,
-  HelpText<"Set default calling convention">, Values<"cdecl,fastcall,stdcall,vectorcall,regcall">;
-def finclude_default_header : Flag<["-"], "finclude-default-header">,
-  HelpText<"Include default header file for OpenCL">;
-def fdeclare_opencl_builtins : Flag<["-"], "fdeclare-opencl-builtins">,
-  HelpText<"Add OpenCL builtin function declarations (experimental)">;
-def fpreserve_vec3_type : Flag<["-"], "fpreserve-vec3-type">,
-  HelpText<"Preserve 3-component vector type">;
-def fwchar_type_EQ : Joined<["-"], "fwchar-type=">,
-  HelpText<"Select underlying type for wchar_t">, Values<"char,short,int">;
-def fsigned_wchar : Flag<["-"], "fsigned-wchar">,
-  HelpText<"Use a signed type for wchar_t">;
-def fno_signed_wchar : Flag<["-"], "fno-signed-wchar">,
-  HelpText<"Use an unsigned type for wchar_t">;
-
-// FIXME: Remove these entirely once functionality/tests have been excised.
-def fobjc_gc_only : Flag<["-"], "fobjc-gc-only">, Group<f_Group>,
-  HelpText<"Use GC exclusively for Objective-C related memory management">;
-def fobjc_gc : Flag<["-"], "fobjc-gc">, Group<f_Group>,
-  HelpText<"Enable Objective-C garbage collection">;
-
-//===----------------------------------------------------------------------===//
-// Header Search Options
-//===----------------------------------------------------------------------===//
-
-def nostdsysteminc : Flag<["-"], "nostdsysteminc">,
-  HelpText<"Disable standard system #include directories">;
-def fdisable_module_hash : Flag<["-"], "fdisable-module-hash">,
-  HelpText<"Disable the module hash">;
-def fmodules_hash_content : Flag<["-"], "fmodules-hash-content">,
-  HelpText<"Enable hashing the content of a module file">;
-def fmodules_strict_context_hash : Flag<["-"], "fmodules-strict-context-hash">,
-  HelpText<"Enable hashing of all compiler options that could impact the "
-           "semantics of a module in an implicit build">;
-def c_isystem : JoinedOrSeparate<["-"], "c-isystem">, MetaVarName<"<directory>">,
-  HelpText<"Add directory to the C SYSTEM include search path">;
-def objc_isystem : JoinedOrSeparate<["-"], "objc-isystem">,
-  MetaVarName<"<directory>">,
-  HelpText<"Add directory to the ObjC SYSTEM include search path">;
-def objcxx_isystem : JoinedOrSeparate<["-"], "objcxx-isystem">,
-  MetaVarName<"<directory>">,
-  HelpText<"Add directory to the ObjC++ SYSTEM include search path">;
-def internal_isystem : JoinedOrSeparate<["-"], "internal-isystem">,
-  MetaVarName<"<directory>">,
-  HelpText<"Add directory to the internal system include search path; these "
-           "are assumed to not be user-provided and are used to model system "
-           "and standard headers' paths.">;
-def internal_externc_isystem : JoinedOrSeparate<["-"], "internal-externc-isystem">,
-  MetaVarName<"<directory>">,
-  HelpText<"Add directory to the internal system include search path with "
-           "implicit extern \"C\" semantics; these are assumed to not be "
-           "user-provided and are used to model system and standard headers' "
-           "paths.">;
-
-//===----------------------------------------------------------------------===//
-// Preprocessor Options
-//===----------------------------------------------------------------------===//
-
-def chain_include : Separate<["-"], "chain-include">, MetaVarName<"<file>">,
-  HelpText<"Include and chain a header file after turning it into PCH">;
-def preamble_bytes_EQ : Joined<["-"], "preamble-bytes=">,
-  HelpText<"Assume that the precompiled header is a precompiled preamble "
-           "covering the first N bytes of the main file">;
-def detailed_preprocessing_record : Flag<["-"], "detailed-preprocessing-record">,
-  HelpText<"include a detailed record of preprocessing actions">;
-def setup_static_analyzer : Flag<["-"], "setup-static-analyzer">,
-  HelpText<"Set up preprocessor for static analyzer (done automatically when static analyzer is run).">;
-def disable_pragma_debug_crash : Flag<["-"], "disable-pragma-debug-crash">,
-  HelpText<"Disable any #pragma clang __debug that can lead to crashing behavior. This is meant for testing.">;
-
-//===----------------------------------------------------------------------===//
-// OpenCL Options
-//===----------------------------------------------------------------------===//
-
-def cl_ext_EQ : CommaJoined<["-"], "cl-ext=">,
-  HelpText<"OpenCL only. Enable or disable OpenCL extensions. The argument is a comma-separated sequence of one or more extension names, each prefixed by '+' or '-'.">;
-
-//===----------------------------------------------------------------------===//
-// CUDA Options
-//===----------------------------------------------------------------------===//
-
-def fcuda_is_device : Flag<["-"], "fcuda-is-device">,
-  HelpText<"Generate code for CUDA device">;
-def fcuda_include_gpubinary : Separate<["-"], "fcuda-include-gpubinary">,
-  HelpText<"Incorporate CUDA device-side binary into host object file.">;
-def fcuda_allow_variadic_functions : Flag<["-"], "fcuda-allow-variadic-functions">,
-  HelpText<"Allow variadic functions in CUDA device code.">;
-def fno_cuda_host_device_constexpr : Flag<["-"], "fno-cuda-host-device-constexpr">,
-  HelpText<"Don't treat unattributed constexpr functions as __host__ __device__.">;
-
-//===----------------------------------------------------------------------===//
-// OpenMP Options
-//===----------------------------------------------------------------------===//
-
-def fopenmp_is_device : Flag<["-"], "fopenmp-is-device">,
-  HelpText<"Generate code only for an OpenMP target device.">;
-def fopenmp_host_ir_file_path : Separate<["-"], "fopenmp-host-ir-file-path">,
-  HelpText<"Path to the IR file produced by the frontend for the host.">;
-
-//===----------------------------------------------------------------------===//
-// SYCL Options
-//===----------------------------------------------------------------------===//
-
-def fsycl_is_device : Flag<["-"], "fsycl-is-device">,
-  HelpText<"Generate code for SYCL device.">;
-
-} // let Flags = [CC1Option]
-
-//===----------------------------------------------------------------------===//
-// cc1as-only Options
-//===----------------------------------------------------------------------===//
-
-let Flags = [CC1AsOption, NoDriverOption] in {
-
-// Language Options
-def n : Flag<["-"], "n">,
-  HelpText<"Don't automatically start assembly file with a text section">;
-
-// Frontend Options
-def filetype : Separate<["-"], "filetype">,
-    HelpText<"Specify the output file type ('asm', 'null', or 'obj')">;
-
-// Transliterate Options
-def output_asm_variant : Separate<["-"], "output-asm-variant">,
-    HelpText<"Select the asm variant index to use for output">;
-def show_encoding : Flag<["-"], "show-encoding">,
-    HelpText<"Show instruction encoding information in transliterate mode">;
-def show_inst : Flag<["-"], "show-inst">,
-    HelpText<"Show internal instruction representation in transliterate mode">;
-
-// Assemble Options
-def dwarf_debug_producer : Separate<["-"], "dwarf-debug-producer">,
-  HelpText<"The string to embed in the Dwarf debug AT_producer record.">;
-
-def defsym : Separate<["-"], "defsym">,
-  HelpText<"Define a value for a symbol">;
-} // let Flags = [CC1AsOption]
diff --git a/gnu/llvm/clang/include/clang/Driver/CLCompatOptions.td b/gnu/llvm/clang/include/clang/Driver/CLCompatOptions.td
deleted file mode 100644 (file)
index 50d4622..0000000
+++ /dev/null
@@ -1,466 +0,0 @@
-//===--- CLCompatOptions.td - Options for clang-cl ------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-//  This file defines the options accepted by clang-cl.
-//
-//===----------------------------------------------------------------------===//
-
-def cl_Group : OptionGroup<"<clang-cl options>">, Flags<[CLOption]>,
-  HelpText<"CL.EXE COMPATIBILITY OPTIONS">;
-
-def cl_compile_Group : OptionGroup<"<clang-cl compile-only options>">,
-  Group<cl_Group>;
-
-def cl_ignored_Group : OptionGroup<"<clang-cl ignored options>">,
-  Group<cl_Group>;
-
-class CLFlag<string name> : Option<["/", "-"], name, KIND_FLAG>,
-  Group<cl_Group>, Flags<[CLOption, DriverOption]>;
-
-class CLCompileFlag<string name> : Option<["/", "-"], name, KIND_FLAG>,
-  Group<cl_compile_Group>, Flags<[CLOption, DriverOption]>;
-
-class CLIgnoredFlag<string name> : Option<["/", "-"], name, KIND_FLAG>,
-  Group<cl_ignored_Group>, Flags<[CLOption, DriverOption]>;
-
-class CLJoined<string name> : Option<["/", "-"], name, KIND_JOINED>,
-  Group<cl_Group>, Flags<[CLOption, DriverOption]>;
-
-class CLCompileJoined<string name> : Option<["/", "-"], name, KIND_JOINED>,
-  Group<cl_compile_Group>, Flags<[CLOption, DriverOption]>;
-
-class CLIgnoredJoined<string name> : Option<["/", "-"], name, KIND_JOINED>,
-  Group<cl_ignored_Group>, Flags<[CLOption, DriverOption, HelpHidden]>;
-
-class CLJoinedOrSeparate<string name> : Option<["/", "-"], name,
-  KIND_JOINED_OR_SEPARATE>, Group<cl_Group>, Flags<[CLOption, DriverOption]>;
-
-class CLCompileJoinedOrSeparate<string name> : Option<["/", "-"], name,
-  KIND_JOINED_OR_SEPARATE>, Group<cl_compile_Group>,
-  Flags<[CLOption, DriverOption]>;
-
-class CLRemainingArgsJoined<string name> : Option<["/", "-"], name,
-  KIND_REMAINING_ARGS_JOINED>, Group<cl_Group>, Flags<[CLOption, DriverOption]>;
-
-// Aliases:
-// (We don't put any of these in cl_compile_Group as the options they alias are
-// already in the right group.)
-
-def _SLASH_Brepro : CLFlag<"Brepro">,
-  HelpText<"Do not write current time into COFF output (breaks link.exe /incremental)">,
-  Alias<mno_incremental_linker_compatible>;
-def _SLASH_Brepro_ : CLFlag<"Brepro-">,
-  HelpText<"Write current time into COFF output (default)">,
-  Alias<mincremental_linker_compatible>;
-def _SLASH_C : CLFlag<"C">,
-  HelpText<"Do not discard comments when preprocessing">, Alias<C>;
-def _SLASH_c : CLFlag<"c">, HelpText<"Compile only">, Alias<c>;
-def _SLASH_d1PP : CLFlag<"d1PP">,
-  HelpText<"Retain macro definitions in /E mode">, Alias<dD>;
-def _SLASH_d1reportAllClassLayout : CLFlag<"d1reportAllClassLayout">,
-  HelpText<"Dump record layout information">,
-  Alias<Xclang>, AliasArgs<["-fdump-record-layouts"]>;
-def _SLASH_diagnostics_caret : CLFlag<"diagnostics:caret">,
-  HelpText<"Enable caret and column diagnostics (default)">;
-def _SLASH_diagnostics_column : CLFlag<"diagnostics:column">,
-  HelpText<"Disable caret diagnostics but keep column info">;
-def _SLASH_diagnostics_classic : CLFlag<"diagnostics:classic">,
-  HelpText<"Disable column and caret diagnostics">;
-def _SLASH_D : CLJoinedOrSeparate<"D">, HelpText<"Define macro">,
-  MetaVarName<"<macro[=value]>">, Alias<D>;
-def _SLASH_E : CLFlag<"E">, HelpText<"Preprocess to stdout">, Alias<E>;
-def _SLASH_fp_except : CLFlag<"fp:except">, HelpText<"">, Alias<ftrapping_math>;
-def _SLASH_fp_except_ : CLFlag<"fp:except-">,
-  HelpText<"">, Alias<fno_trapping_math>;
-def _SLASH_fp_fast : CLFlag<"fp:fast">, HelpText<"">, Alias<ffast_math>;
-def _SLASH_fp_precise : CLFlag<"fp:precise">,
-  HelpText<"">, Alias<fno_fast_math>;
-def _SLASH_fp_strict : CLFlag<"fp:strict">, HelpText<"">, Alias<fno_fast_math>;
-def _SLASH_GA : CLFlag<"GA">, Alias<ftlsmodel_EQ>, AliasArgs<["local-exec"]>,
-  HelpText<"Assume thread-local variables are defined in the executable">;
-def _SLASH_GR : CLFlag<"GR">, HelpText<"Emit RTTI data (default)">;
-def _SLASH_GR_ : CLFlag<"GR-">, HelpText<"Do not emit RTTI data">;
-def _SLASH_GF : CLIgnoredFlag<"GF">,
-  HelpText<"Enable string pooling (default)">;
-def _SLASH_GF_ : CLFlag<"GF-">, HelpText<"Disable string pooling">,
-  Alias<fwritable_strings>;
-def _SLASH_GS : CLFlag<"GS">,
-  HelpText<"Enable buffer security check (default)">;
-def _SLASH_GS_ : CLFlag<"GS-">, HelpText<"Disable buffer security check">;
-def : CLFlag<"Gs">, HelpText<"Use stack probes (default)">,
-  Alias<mstack_probe_size>, AliasArgs<["4096"]>;
-def _SLASH_Gs : CLJoined<"Gs">,
-  HelpText<"Set stack probe size (default 4096)">, Alias<mstack_probe_size>;
-def _SLASH_Gy : CLFlag<"Gy">, HelpText<"Put each function in its own section">,
-  Alias<ffunction_sections>;
-def _SLASH_Gy_ : CLFlag<"Gy-">,
-  HelpText<"Do not put each function in its own section (default)">,
-  Alias<fno_function_sections>;
-def _SLASH_Gw : CLFlag<"Gw">, HelpText<"Put each data item in its own section">,
-  Alias<fdata_sections>;
-def _SLASH_Gw_ : CLFlag<"Gw-">,
-  HelpText<"Do not put each data item in its own section (default)">,
-  Alias<fno_data_sections>;
-def _SLASH_help : CLFlag<"help">, Alias<help>,
-  HelpText<"Display available options">;
-def _SLASH_HELP : CLFlag<"HELP">, Alias<help>;
-def _SLASH_I : CLJoinedOrSeparate<"I">,
-  HelpText<"Add directory to include search path">, MetaVarName<"<dir>">,
-  Alias<I>;
-def _SLASH_J : CLFlag<"J">, HelpText<"Make char type unsigned">,
-  Alias<funsigned_char>;
-
-// The _SLASH_O option handles all the /O flags, but we also provide separate
-// aliased options to provide separate help messages.
-def _SLASH_O : CLJoined<"O">,
-  HelpText<"Set multiple /O flags at once; e.g. '/O2y-' for '/O2 /Oy-'">,
-  MetaVarName<"<flags>">;
-def : CLFlag<"O1">, Alias<_SLASH_O>, AliasArgs<["1"]>,
-  HelpText<"Optimize for size  (like /Og     /Os /Oy /Ob2 /GF /Gy)">;
-def : CLFlag<"O2">, Alias<_SLASH_O>, AliasArgs<["2"]>,
-  HelpText<"Optimize for speed (like /Og /Oi /Ot /Oy /Ob2 /GF /Gy)">;
-def : CLFlag<"Ob0">, Alias<_SLASH_O>, AliasArgs<["b0"]>,
-  HelpText<"Disable function inlining">;
-def : CLFlag<"Ob1">, Alias<_SLASH_O>, AliasArgs<["b1"]>,
-  HelpText<"Only inline functions explicitly or implicitly marked inline">;
-def : CLFlag<"Ob2">, Alias<_SLASH_O>, AliasArgs<["b2"]>,
-  HelpText<"Inline functions as deemed beneficial by the compiler">;
-def : CLFlag<"Od">, Alias<_SLASH_O>, AliasArgs<["d"]>,
-  HelpText<"Disable optimization">;
-def : CLFlag<"Og">, Alias<_SLASH_O>, AliasArgs<["g"]>,
-  HelpText<"No effect">;
-def : CLFlag<"Oi">, Alias<_SLASH_O>, AliasArgs<["i"]>,
-  HelpText<"Enable use of builtin functions">;
-def : CLFlag<"Oi-">, Alias<_SLASH_O>, AliasArgs<["i-"]>,
-  HelpText<"Disable use of builtin functions">;
-def : CLFlag<"Os">, Alias<_SLASH_O>, AliasArgs<["s"]>,
-  HelpText<"Optimize for size">;
-def : CLFlag<"Ot">, Alias<_SLASH_O>, AliasArgs<["t"]>,
-  HelpText<"Optimize for speed">;
-def : CLFlag<"Ox">, Alias<_SLASH_O>, AliasArgs<["x"]>,
-  HelpText<"Deprecated (like /Og /Oi /Ot /Oy /Ob2); use /O2">;
-def : CLFlag<"Oy">, Alias<_SLASH_O>, AliasArgs<["y"]>,
-  HelpText<"Enable frame pointer omission (x86 only)">;
-def : CLFlag<"Oy-">, Alias<_SLASH_O>, AliasArgs<["y-"]>,
-  HelpText<"Disable frame pointer omission (x86 only, default)">;
-
-def _SLASH_QUESTION : CLFlag<"?">, Alias<help>,
-  HelpText<"Display available options">;
-def _SLASH_Qvec : CLFlag<"Qvec">,
-  HelpText<"Enable the loop vectorization passes">, Alias<fvectorize>;
-def _SLASH_Qvec_ : CLFlag<"Qvec-">,
-  HelpText<"Disable the loop vectorization passes">, Alias<fno_vectorize>;
-def _SLASH_showIncludes : CLFlag<"showIncludes">,
-  HelpText<"Print info about included files to stderr">,
-  Alias<show_includes>;
-def _SLASH_showFilenames : CLFlag<"showFilenames">,
-  HelpText<"Print the name of each compiled file">;
-def _SLASH_showFilenames_ : CLFlag<"showFilenames-">,
-  HelpText<"Do not print the name of each compiled file (default)">;
-def _SLASH_source_charset : CLCompileJoined<"source-charset:">,
-  HelpText<"Set source encoding, supports only UTF-8">,
-  Alias<finput_charset_EQ>;
-def _SLASH_execution_charset : CLCompileJoined<"execution-charset:">,
-  HelpText<"Set runtime encoding, supports only UTF-8">,
-  Alias<fexec_charset_EQ>;
-def _SLASH_std : CLCompileJoined<"std:">,
-  HelpText<"Set C++ version (c++14,c++17,c++latest)">;
-def _SLASH_U : CLJoinedOrSeparate<"U">, HelpText<"Undefine macro">,
-  MetaVarName<"<macro>">, Alias<U>;
-def _SLASH_validate_charset : CLFlag<"validate-charset">,
-  Alias<W_Joined>, AliasArgs<["invalid-source-encoding"]>;
-def _SLASH_validate_charset_ : CLFlag<"validate-charset-">,
-  Alias<W_Joined>, AliasArgs<["no-invalid-source-encoding"]>;
-def _SLASH_W0 : CLFlag<"W0">, HelpText<"Disable all warnings">, Alias<w>;
-def _SLASH_W1 : CLFlag<"W1">, HelpText<"Enable -Wall">, Alias<Wall>;
-def _SLASH_W2 : CLFlag<"W2">, HelpText<"Enable -Wall">, Alias<Wall>;
-def _SLASH_W3 : CLFlag<"W3">, HelpText<"Enable -Wall">, Alias<Wall>;
-def _SLASH_W4 : CLFlag<"W4">, HelpText<"Enable -Wall and -Wextra">, Alias<WCL4>;
-def _SLASH_Wall : CLFlag<"Wall">, HelpText<"Enable -Weverything">,
-  Alias<W_Joined>, AliasArgs<["everything"]>;
-def _SLASH_WX : CLFlag<"WX">, HelpText<"Treat warnings as errors">,
-  Alias<W_Joined>, AliasArgs<["error"]>;
-def _SLASH_WX_ : CLFlag<"WX-">,
-  HelpText<"Do not treat warnings as errors (default)">,
-  Alias<W_Joined>, AliasArgs<["no-error"]>;
-def _SLASH_w_flag : CLFlag<"w">, HelpText<"Disable all warnings">, Alias<w>;
-def _SLASH_wd4005 : CLFlag<"wd4005">, Alias<W_Joined>,
-  AliasArgs<["no-macro-redefined"]>;
-def _SLASH_wd4018 : CLFlag<"wd4018">, Alias<W_Joined>,
-  AliasArgs<["no-sign-compare"]>;
-def _SLASH_wd4100 : CLFlag<"wd4100">, Alias<W_Joined>,
-  AliasArgs<["no-unused-parameter"]>;
-def _SLASH_wd4910 : CLFlag<"wd4910">, Alias<W_Joined>,
-  AliasArgs<["no-dllexport-explicit-instantiation-decl"]>;
-def _SLASH_wd4996 : CLFlag<"wd4996">, Alias<W_Joined>,
-  AliasArgs<["no-deprecated-declarations"]>;
-def _SLASH_vd : CLJoined<"vd">, HelpText<"Control vtordisp placement">,
-  Alias<vtordisp_mode_EQ>;
-def _SLASH_X : CLFlag<"X">,
-  HelpText<"Do not add %INCLUDE% to include search path">, Alias<nostdlibinc>;
-def _SLASH_Zc_sizedDealloc : CLFlag<"Zc:sizedDealloc">,
-  HelpText<"Enable C++14 sized global deallocation functions">,
-  Alias<fsized_deallocation>;
-def _SLASH_Zc_sizedDealloc_ : CLFlag<"Zc:sizedDealloc-">,
-  HelpText<"Disable C++14 sized global deallocation functions">,
-  Alias<fno_sized_deallocation>;
-def _SLASH_Zc_alignedNew : CLFlag<"Zc:alignedNew">,
-  HelpText<"Enable C++17 aligned allocation functions">,
-  Alias<faligned_allocation>;
-def _SLASH_Zc_alignedNew_ : CLFlag<"Zc:alignedNew-">,
-  HelpText<"Disable C++17 aligned allocation functions">,
-  Alias<fno_aligned_allocation>;
-def _SLASH_Zc_char8_t : CLFlag<"Zc:char8_t">,
-  HelpText<"Enable char8_t from C++2a">,
-  Alias<fchar8__t>;
-def _SLASH_Zc_char8_t_ : CLFlag<"Zc:char8_t-">,
-  HelpText<"Disable char8_t from c++2a">,
-  Alias<fno_char8__t>;
-def _SLASH_Zc_strictStrings : CLFlag<"Zc:strictStrings">,
-  HelpText<"Treat string literals as const">, Alias<W_Joined>,
-  AliasArgs<["error=c++11-compat-deprecated-writable-strings"]>;
-def _SLASH_Zc_threadSafeInit : CLFlag<"Zc:threadSafeInit">,
-  HelpText<"Enable thread-safe initialization of static variables">,
-  Alias<fthreadsafe_statics>;
-def _SLASH_Zc_threadSafeInit_ : CLFlag<"Zc:threadSafeInit-">,
-  HelpText<"Disable thread-safe initialization of static variables">,
-  Alias<fno_threadsafe_statics>;
-def _SLASH_Zc_trigraphs : CLFlag<"Zc:trigraphs">,
-  HelpText<"Enable trigraphs">, Alias<ftrigraphs>;
-def _SLASH_Zc_trigraphs_off : CLFlag<"Zc:trigraphs-">,
-  HelpText<"Disable trigraphs (default)">, Alias<fno_trigraphs>;
-def _SLASH_Zc_twoPhase : CLFlag<"Zc:twoPhase">,
-  HelpText<"Enable two-phase name lookup in templates">,
-  Alias<fno_delayed_template_parsing>;
-def _SLASH_Zc_twoPhase_ : CLFlag<"Zc:twoPhase-">,
-  HelpText<"Disable two-phase name lookup in templates (default)">,
-  Alias<fdelayed_template_parsing>;
-def _SLASH_Z7 : CLFlag<"Z7">,
-  HelpText<"Enable CodeView debug information in object files">;
-def _SLASH_Zd : CLFlag<"Zd">,
-  HelpText<"Emit debug line number tables only">;
-def _SLASH_Zi : CLFlag<"Zi">, Alias<_SLASH_Z7>,
-  HelpText<"Like /Z7">;
-def _SLASH_Zp : CLJoined<"Zp">,
-  HelpText<"Set default maximum struct packing alignment">,
-  Alias<fpack_struct_EQ>;
-def _SLASH_Zp_flag : CLFlag<"Zp">,
-  HelpText<"Set default maximum struct packing alignment to 1">,
-  Alias<fpack_struct_EQ>, AliasArgs<["1"]>;
-def _SLASH_Zs : CLFlag<"Zs">, HelpText<"Syntax-check only">,
-  Alias<fsyntax_only>;
-def _SLASH_openmp_ : CLFlag<"openmp-">,
-  HelpText<"Disable OpenMP support">, Alias<fno_openmp>;
-def _SLASH_openmp : CLFlag<"openmp">, HelpText<"Enable OpenMP support">,
-  Alias<fopenmp>;
-def _SLASH_openmp_experimental : CLFlag<"openmp:experimental">,
-  HelpText<"Enable OpenMP support with experimental SIMD support">,
-  Alias<fopenmp>;
-
-// Non-aliases:
-
-def _SLASH_arch : CLCompileJoined<"arch:">,
-  HelpText<"Set architecture for code generation">;
-
-def _SLASH_M_Group : OptionGroup<"</M group>">, Group<cl_compile_Group>;
-def _SLASH_volatile_Group : OptionGroup<"</volatile group>">,
-  Group<cl_compile_Group>;
-
-def _SLASH_EH : CLJoined<"EH">, HelpText<"Set exception handling model">;
-def _SLASH_EP : CLFlag<"EP">,
-  HelpText<"Disable linemarker output and preprocess to stdout">;
-def _SLASH_FA : CLFlag<"FA">,
-  HelpText<"Output assembly code file during compilation">;
-def _SLASH_Fa : CLJoined<"Fa">,
-  HelpText<"Set assembly output file name (with /FA)">,
-  MetaVarName<"<file or dir/>">;
-def _SLASH_fallback : CLCompileFlag<"fallback">,
-  HelpText<"Fall back to cl.exe if clang-cl fails to compile">;
-def _SLASH_FI : CLJoinedOrSeparate<"FI">,
-  HelpText<"Include file before parsing">, Alias<include_>;
-def _SLASH_Fe : CLJoined<"Fe">,
-  HelpText<"Set output executable file name">,
-  MetaVarName<"<file or dir/>">;
-def _SLASH_Fi : CLCompileJoined<"Fi">,
-  HelpText<"Set preprocess output file name (with /P)">,
-  MetaVarName<"<file>">;
-def _SLASH_Fo : CLCompileJoined<"Fo">,
-  HelpText<"Set output object file (with /c)">,
-  MetaVarName<"<file or dir/>">;
-def _SLASH_guard : CLJoined<"guard:">,
-  HelpText<"Enable Control Flow Guard with /guard:cf, or only the table with /guard:cf,nochecks">;
-def _SLASH_GX : CLFlag<"GX">,
-  HelpText<"Deprecated; use /EHsc">;
-def _SLASH_GX_ : CLFlag<"GX-">,
-  HelpText<"Deprecated (like not passing /EH)">;
-def _SLASH_imsvc : CLJoinedOrSeparate<"imsvc">,
-  HelpText<"Add <dir> to system include search path, as if in %INCLUDE%">,
-  MetaVarName<"<dir>">;
-def _SLASH_LD : CLFlag<"LD">, HelpText<"Create DLL">;
-def _SLASH_LDd : CLFlag<"LDd">, HelpText<"Create debug DLL">;
-def _SLASH_link : CLRemainingArgsJoined<"link">,
-  HelpText<"Forward options to the linker">, MetaVarName<"<options>">;
-def _SLASH_MD : Option<["/", "-"], "MD", KIND_FLAG>, Group<_SLASH_M_Group>,
-  Flags<[CLOption, DriverOption]>, HelpText<"Use DLL run-time">;
-def _SLASH_MDd : Option<["/", "-"], "MDd", KIND_FLAG>, Group<_SLASH_M_Group>,
-  Flags<[CLOption, DriverOption]>, HelpText<"Use DLL debug run-time">;
-def _SLASH_MT : Option<["/", "-"], "MT", KIND_FLAG>, Group<_SLASH_M_Group>,
-  Flags<[CLOption, DriverOption]>, HelpText<"Use static run-time">;
-def _SLASH_MTd : Option<["/", "-"], "MTd", KIND_FLAG>, Group<_SLASH_M_Group>,
-  Flags<[CLOption, DriverOption]>, HelpText<"Use static debug run-time">;
-def _SLASH_o : CLJoinedOrSeparate<"o">,
-  HelpText<"Deprecated (set output file name); use /Fe or /Fe">,
-  MetaVarName<"<file or dir/>">;
-def _SLASH_P : CLFlag<"P">, HelpText<"Preprocess to file">;
-def _SLASH_Tc : CLCompileJoinedOrSeparate<"Tc">,
-  HelpText<"Treat <file> as C source file">, MetaVarName<"<file>">;
-def _SLASH_TC : CLCompileFlag<"TC">, HelpText<"Treat all source files as C">;
-def _SLASH_Tp : CLCompileJoinedOrSeparate<"Tp">,
-  HelpText<"Treat <file> as C++ source file">, MetaVarName<"<file>">;
-def _SLASH_TP : CLCompileFlag<"TP">, HelpText<"Treat all source files as C++">;
-def _SLASH_volatile_iso : Option<["/", "-"], "volatile:iso", KIND_FLAG>,
-  Group<_SLASH_volatile_Group>, Flags<[CLOption, DriverOption]>,
-  HelpText<"Volatile loads and stores have standard semantics">;
-def _SLASH_vmb : CLFlag<"vmb">,
-  HelpText<"Use a best-case representation method for member pointers">;
-def _SLASH_vmg : CLFlag<"vmg">,
-  HelpText<"Use a most-general representation for member pointers">;
-def _SLASH_vms : CLFlag<"vms">,
-  HelpText<"Set the default most-general representation to single inheritance">;
-def _SLASH_vmm : CLFlag<"vmm">,
-  HelpText<"Set the default most-general representation to "
-           "multiple inheritance">;
-def _SLASH_vmv : CLFlag<"vmv">,
-  HelpText<"Set the default most-general representation to "
-           "virtual inheritance">;
-def _SLASH_volatile_ms  : Option<["/", "-"], "volatile:ms", KIND_FLAG>,
-  Group<_SLASH_volatile_Group>, Flags<[CLOption, DriverOption]>,
-  HelpText<"Volatile loads and stores have acquire and release semantics">;
-def _SLASH_clang : CLJoined<"clang:">,
-  HelpText<"Pass <arg> to the clang driver">, MetaVarName<"<arg>">;
-def _SLASH_Zl : CLFlag<"Zl">,
-  HelpText<"Do not let object file auto-link default libraries">;
-
-def _SLASH_Yc : CLJoined<"Yc">,
-  HelpText<"Generate a pch file for all code up to and including <filename>">,
-  MetaVarName<"<filename>">;
-def _SLASH_Yu : CLJoined<"Yu">,
-  HelpText<"Load a pch file and use it instead of all code up to "
-           "and including <filename>">,
-  MetaVarName<"<filename>">;
-def _SLASH_Y_ : CLFlag<"Y-">,
-  HelpText<"Disable precompiled headers, overrides /Yc and /Yu">;
-def _SLASH_Zc_dllexportInlines : CLFlag<"Zc:dllexportInlines">,
-  HelpText<"dllexport/dllimport inline member functions of dllexport/import classes (default)">;
-def _SLASH_Zc_dllexportInlines_ : CLFlag<"Zc:dllexportInlines-">,
-  HelpText<"Do not dllexport/dllimport inline member functions of dllexport/import classes">;
-def _SLASH_Fp : CLJoined<"Fp">,
-  HelpText<"Set pch file name (with /Yc and /Yu)">, MetaVarName<"<file>">;
-
-def _SLASH_Gd : CLFlag<"Gd">,
-  HelpText<"Set __cdecl as a default calling convention">;
-def _SLASH_Gr : CLFlag<"Gr">,
-  HelpText<"Set __fastcall as a default calling convention">;
-def _SLASH_Gz : CLFlag<"Gz">,
-  HelpText<"Set __stdcall as a default calling convention">;
-def _SLASH_Gv : CLFlag<"Gv">,
-  HelpText<"Set __vectorcall as a default calling convention">;
-def _SLASH_Gregcall : CLFlag<"Gregcall">,
-  HelpText<"Set __regcall as a default calling convention">;
-
-// Ignored:
-
-def _SLASH_analyze_ : CLIgnoredFlag<"analyze-">;
-def _SLASH_bigobj : CLIgnoredFlag<"bigobj">;
-def _SLASH_cgthreads : CLIgnoredJoined<"cgthreads">;
-def _SLASH_d2FastFail : CLIgnoredFlag<"d2FastFail">;
-def _SLASH_d2Zi_PLUS : CLIgnoredFlag<"d2Zi+">;
-def _SLASH_errorReport : CLIgnoredJoined<"errorReport">;
-def _SLASH_FC : CLIgnoredFlag<"FC">;
-def _SLASH_Fd : CLIgnoredJoined<"Fd">;
-def _SLASH_FS : CLIgnoredFlag<"FS">;
-def _SLASH_JMC : CLIgnoredFlag<"JMC">;
-def _SLASH_kernel_ : CLIgnoredFlag<"kernel-">;
-def _SLASH_nologo : CLIgnoredFlag<"nologo">;
-def _SLASH_permissive_ : CLIgnoredFlag<"permissive-">;
-def _SLASH_RTC : CLIgnoredJoined<"RTC">;
-def _SLASH_sdl : CLIgnoredFlag<"sdl">;
-def _SLASH_sdl_ : CLIgnoredFlag<"sdl-">;
-def _SLASH_utf8 : CLIgnoredFlag<"utf-8">,
-  HelpText<"Set source and runtime encoding to UTF-8 (default)">;
-def _SLASH_w : CLIgnoredJoined<"w">;
-def _SLASH_Zc___cplusplus : CLIgnoredFlag<"Zc:__cplusplus">;
-def _SLASH_Zc_auto : CLIgnoredFlag<"Zc:auto">;
-def _SLASH_Zc_forScope : CLIgnoredFlag<"Zc:forScope">;
-def _SLASH_Zc_inline : CLIgnoredFlag<"Zc:inline">;
-def _SLASH_Zc_rvalueCast : CLIgnoredFlag<"Zc:rvalueCast">;
-def _SLASH_Zc_ternary : CLIgnoredFlag<"Zc:ternary">;
-def _SLASH_Zc_wchar_t : CLIgnoredFlag<"Zc:wchar_t">;
-def _SLASH_ZH_MD5 : CLIgnoredFlag<"ZH:MD5">;
-def _SLASH_ZH_SHA1 : CLIgnoredFlag<"ZH:SHA1">;
-def _SLASH_ZH_SHA_256 : CLIgnoredFlag<"ZH:SHA_256">;
-def _SLASH_Zm : CLIgnoredJoined<"Zm">;
-def _SLASH_Zo : CLIgnoredFlag<"Zo">;
-def _SLASH_Zo_ : CLIgnoredFlag<"Zo-">;
-
-
-// Unsupported:
-
-def _SLASH_await : CLFlag<"await">;
-def _SLASH_constexpr : CLJoined<"constexpr:">;
-def _SLASH_AI : CLJoinedOrSeparate<"AI">;
-def _SLASH_Bt : CLFlag<"Bt">;
-def _SLASH_Bt_plus : CLFlag<"Bt+">;
-def _SLASH_clr : CLJoined<"clr">;
-def _SLASH_d2 : CLJoined<"d2">;
-def _SLASH_doc : CLJoined<"doc">;
-def _SLASH_FA_joined : CLJoined<"FA">;
-def _SLASH_favor : CLJoined<"favor">;
-def _SLASH_F : CLJoinedOrSeparate<"F">;
-def _SLASH_Fm : CLJoined<"Fm">;
-def _SLASH_Fr : CLJoined<"Fr">;
-def _SLASH_FR : CLJoined<"FR">;
-def _SLASH_FU : CLJoinedOrSeparate<"FU">;
-def _SLASH_Fx : CLFlag<"Fx">;
-def _SLASH_G1 : CLFlag<"G1">;
-def _SLASH_G2 : CLFlag<"G2">;
-def _SLASH_Ge : CLFlag<"Ge">;
-def _SLASH_Gh : CLFlag<"Gh">;
-def _SLASH_GH : CLFlag<"GH">;
-def _SLASH_GL : CLFlag<"GL">;
-def _SLASH_GL_ : CLFlag<"GL-">;
-def _SLASH_Gm : CLFlag<"Gm">;
-def _SLASH_Gm_ : CLFlag<"Gm-">;
-def _SLASH_GT : CLFlag<"GT">;
-def _SLASH_GZ : CLFlag<"GZ">;
-def _SLASH_H : CLFlag<"H">;
-def _SLASH_homeparams : CLFlag<"homeparams">;
-def _SLASH_hotpatch : CLFlag<"hotpatch">;
-def _SLASH_kernel : CLFlag<"kernel">;
-def _SLASH_LN : CLFlag<"LN">;
-def _SLASH_MP : CLJoined<"MP">;
-def _SLASH_Qfast_transcendentals : CLFlag<"Qfast_transcendentals">;
-def _SLASH_QIfist : CLFlag<"QIfist">;
-def _SLASH_Qimprecise_fwaits : CLFlag<"Qimprecise_fwaits">;
-def _SLASH_Qpar : CLFlag<"Qpar">;
-def _SLASH_Qpar_report : CLJoined<"Qpar-report">;
-def _SLASH_Qsafe_fp_loads : CLFlag<"Qsafe_fp_loads">;
-def _SLASH_Qspectre : CLFlag<"Qspectre">;
-def _SLASH_Qvec_report : CLJoined<"Qvec-report">;
-def _SLASH_u : CLFlag<"u">;
-def _SLASH_V : CLFlag<"V">;
-def _SLASH_WL : CLFlag<"WL">;
-def _SLASH_Wp64 : CLFlag<"Wp64">;
-def _SLASH_Yd : CLFlag<"Yd">;
-def _SLASH_Yl : CLJoined<"Yl">;
-def _SLASH_Za : CLFlag<"Za">;
-def _SLASH_Zc : CLJoined<"Zc:">;
-def _SLASH_Ze : CLFlag<"Ze">;
-def _SLASH_Zg : CLFlag<"Zg">;
-def _SLASH_ZI : CLFlag<"ZI">;
-def _SLASH_ZW : CLJoined<"ZW">;
index a370a52..356cfb0 100644 (file)
@@ -124,6 +124,9 @@ def pedantic_Group : OptionGroup<"<pedantic group>">, Group<f_Group>,
 def opencl_Group : OptionGroup<"<opencl group>">, Group<f_Group>,
                    DocName<"OpenCL flags">;
 
+def sycl_Group : OptionGroup<"<SYCL group>">, Group<f_Group>,
+                 DocName<"SYCL flags">;
+
 def m_Group : OptionGroup<"<m group>">, Group<CompileOnly_Group>,
               DocName<"Target-dependent compilation options">;
 
@@ -148,6 +151,10 @@ def m_ppc_Features_Group : OptionGroup<"<ppc features group>">,
                            Group<m_Group>, DocName<"PowerPC">;
 def m_wasm_Features_Group : OptionGroup<"<wasm features group>">,
                             Group<m_Group>, DocName<"WebAssembly">;
+// The features added by this group will not be added to target features.
+// These are explicitly handled.
+def m_wasm_Features_Driver_Group : OptionGroup<"<wasm driver features group>">,
+                                   Group<m_Group>, DocName<"WebAssembly Driver">;
 def m_x86_Features_Group : OptionGroup<"<x86 features group>">,
                            Group<m_Group>, Flags<[CoreOption]>, DocName<"X86">;
 def m_riscv_Features_Group : OptionGroup<"<riscv features group>">,
@@ -219,6 +226,27 @@ def mno_mpx : Flag<["-"], "mno-mpx">, Group<clang_ignored_legacy_options_Group>;
 def clang_ignored_gcc_optimization_f_Group : OptionGroup<
   "<clang_ignored_gcc_optimization_f_Group>">, Group<f_Group>, Flags<[Ignored]>;
 
+// A boolean option which is opt-in in CC1. The positive option exists in CC1 and
+// Args.hasArg(OPT_ffoo) is used to check that the flag is enabled.
+// This is useful if the option is usually disabled.
+multiclass OptInFFlag<string name, string pos_prefix, string neg_prefix="",
+                      string help="", list<OptionFlag> flags=[]> {
+  def f#NAME : Flag<["-"], "f"#name>, Flags<!listconcat([CC1Option], flags)>,
+               Group<f_Group>, HelpText<!strconcat(pos_prefix, help)>;
+  def fno_#NAME : Flag<["-"], "fno-"#name>, Flags<flags>,
+               Group<f_Group>, HelpText<!strconcat(neg_prefix, help)>;
+}
+
+// A boolean option which is opt-out in CC1. The negative option exists in CC1 and
+// Args.hasArg(OPT_fno_foo) is used to check that the flag is disabled.
+multiclass OptOutFFlag<string name, string pos_prefix, string neg_prefix,
+                       string help="", list<OptionFlag> flags=[]> {
+  def f#NAME : Flag<["-"], "f"#name>, Flags<flags>,
+               Group<f_Group>, HelpText<!strconcat(pos_prefix, help)>;
+  def fno_#NAME : Flag<["-"], "fno-"#name>, Flags<!listconcat([CC1Option], flags)>,
+               Group<f_Group>, HelpText<!strconcat(neg_prefix, help)>;
+}
+
 /////////
 // Options
 
@@ -397,7 +425,7 @@ def ObjCXX : Flag<["-"], "ObjC++">, Flags<[DriverOption]>,
 def ObjC : Flag<["-"], "ObjC">, Flags<[DriverOption]>,
   HelpText<"Treat source input files as Objective-C inputs">;
 def O : Joined<["-"], "O">, Group<O_Group>, Flags<[CC1Option]>;
-def O_flag : Flag<["-"], "O">, Flags<[CC1Option]>, Alias<O>, AliasArgs<["2"]>;
+def O_flag : Flag<["-"], "O">, Flags<[CC1Option]>, Alias<O>, AliasArgs<["1"]>;
 def Ofast : Joined<["-"], "Ofast">, Group<O_Group>, Flags<[CC1Option]>;
 def P : Flag<["-"], "P">, Flags<[CC1Option]>, Group<Preprocessor_Group>,
   HelpText<"Disable linemarker output in -E mode">;
@@ -455,6 +483,9 @@ def Wnonportable_cfstrings : Joined<["-"], "Wnonportable-cfstrings">, Group<W_Gr
 def Wp_COMMA : CommaJoined<["-"], "Wp,">,
   HelpText<"Pass the comma separated arguments in <arg> to the preprocessor">,
   MetaVarName<"<arg>">, Group<Preprocessor_Group>;
+def Wundef_prefix_EQ : CommaJoined<["-"], "Wundef-prefix=">, Group<W_value_Group>,
+  Flags<[CC1Option, CoreOption, HelpHidden]>, MetaVarName<"<arg>">,
+  HelpText<"Enable warnings for undefined macros with a prefix in the comma separated list <arg>">;
 def Wwrite_strings : Flag<["-"], "Wwrite-strings">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>;
 def Wno_write_strings : Flag<["-"], "Wno-write-strings">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>;
 def W_Joined : Joined<["-"], "W">, Group<W_Group>, Flags<[CC1Option, CoreOption]>,
@@ -463,6 +494,10 @@ def Xanalyzer : Separate<["-"], "Xanalyzer">,
   HelpText<"Pass <arg> to the static analyzer">, MetaVarName<"<arg>">,
   Group<StaticAnalyzer_Group>;
 def Xarch__ : JoinedAndSeparate<["-"], "Xarch_">, Flags<[DriverOption]>;
+def Xarch_host : Separate<["-"], "Xarch_host">, Flags<[DriverOption]>,
+  HelpText<"Pass <arg> to the CUDA/HIP host compilation">, MetaVarName<"<arg>">;
+def Xarch_device : Separate<["-"], "Xarch_device">, Flags<[DriverOption]>,
+  HelpText<"Pass <arg> to the CUDA/HIP device compilation">, MetaVarName<"<arg>">;
 def Xassembler : Separate<["-"], "Xassembler">,
   HelpText<"Pass <arg> to the assembler">, MetaVarName<"<arg>">,
   Group<CompileOnly_Group>;
@@ -523,7 +558,7 @@ def cl_no_signed_zeros : Flag<["-"], "cl-no-signed-zeros">, Group<opencl_Group>,
   HelpText<"OpenCL only. Allow use of less precise no signed zeros computations in the generated binary.">;
 def cl_std_EQ : Joined<["-"], "cl-std=">, Group<opencl_Group>, Flags<[CC1Option]>,
   HelpText<"OpenCL language standard to compile for.">, Values<"cl,CL,cl1.1,CL1.1,cl1.2,CL1.2,cl2.0,CL2.0,clc++,CLC++">;
-def cl_denorms_are_zero : Flag<["-"], "cl-denorms-are-zero">, Group<opencl_Group>, Flags<[CC1Option]>,
+def cl_denorms_are_zero : Flag<["-"], "cl-denorms-are-zero">, Group<opencl_Group>,
   HelpText<"OpenCL only. Allow denormals to be flushed to zero.">;
 def cl_fp32_correctly_rounded_divide_sqrt : Flag<["-"], "cl-fp32-correctly-rounded-divide-sqrt">, Group<opencl_Group>, Flags<[CC1Option]>,
   HelpText<"OpenCL only. Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded.">;
@@ -549,6 +584,9 @@ def c : Flag<["-"], "c">, Flags<[DriverOption]>, Group<Action_Group>,
 def fconvergent_functions : Flag<["-"], "fconvergent-functions">, Group<f_Group>, Flags<[CC1Option]>,
   HelpText<"Assume functions may be convergent">;
 
+def gpu_use_aux_triple_only : Flag<["--"], "gpu-use-aux-triple-only">,
+  InternalDriverOpt, HelpText<"Prepare '-aux-triple' only without populating "
+                              "'-aux-target-cpu' and '-aux-target-feature'.">;
 def cuda_device_only : Flag<["--"], "cuda-device-only">,
   HelpText<"Compile CUDA code for device only">;
 def cuda_host_only : Flag<["--"], "cuda-host-only">,
@@ -561,13 +599,19 @@ def cuda_include_ptx_EQ : Joined<["--"], "cuda-include-ptx=">, Flags<[DriverOpti
   HelpText<"Include PTX for the following GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.">;
 def no_cuda_include_ptx_EQ : Joined<["--"], "no-cuda-include-ptx=">, Flags<[DriverOption]>,
   HelpText<"Do not include PTX for the following GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.">;
+def offload_arch_EQ : Joined<["--"], "offload-arch=">, Flags<[DriverOption]>,
+  HelpText<"CUDA/HIP offloading device architecture (e.g. sm_35, gfx906).  May be specified more than once.">;
 def cuda_gpu_arch_EQ : Joined<["--"], "cuda-gpu-arch=">, Flags<[DriverOption]>,
-  HelpText<"CUDA GPU architecture (e.g. sm_35).  May be specified more than once.">;
+  Alias<offload_arch_EQ>;
 def hip_link : Flag<["--"], "hip-link">,
   HelpText<"Link clang-offload-bundler bundles for HIP">;
-def no_cuda_gpu_arch_EQ : Joined<["--"], "no-cuda-gpu-arch=">, Flags<[DriverOption]>,
-  HelpText<"Remove GPU architecture (e.g. sm_35) from the list of GPUs to compile for. "
+def no_offload_arch_EQ : Joined<["--"], "no-offload-arch=">, Flags<[DriverOption]>,
+  HelpText<"Remove CUDA/HIP offloading device architecture (e.g. sm_35, gfx906) from the list of devices to compile for. "
            "'all' resets the list to its default value.">;
+def emit_static_lib : Flag<["--"], "emit-static-lib">,
+  HelpText<"Enable linker job to emit a static library.">;
+def no_cuda_gpu_arch_EQ : Joined<["--"], "no-cuda-gpu-arch=">, Flags<[DriverOption]>,
+  Alias<no_offload_arch_EQ>;
 def cuda_noopt_device_debug : Flag<["--"], "cuda-noopt-device-debug">,
   HelpText<"Enable device-side debug info generation. Disables ptxas optimizations.">;
 def no_cuda_version_check : Flag<["--"], "no-cuda-version-check">,
@@ -581,31 +625,31 @@ def cuda_path_ignore_env : Flag<["--"], "cuda-path-ignore-env">, Group<i_Group>,
 def ptxas_path_EQ : Joined<["--"], "ptxas-path=">, Group<i_Group>,
   HelpText<"Path to ptxas (used for compiling CUDA code)">;
 def fcuda_flush_denormals_to_zero : Flag<["-"], "fcuda-flush-denormals-to-zero">,
-  Flags<[CC1Option]>, HelpText<"Flush denormal floating point values to zero in CUDA device mode.">;
+  HelpText<"Flush denormal floating point values to zero in CUDA device mode.">;
 def fno_cuda_flush_denormals_to_zero : Flag<["-"], "fno-cuda-flush-denormals-to-zero">;
-def fcuda_approx_transcendentals : Flag<["-"], "fcuda-approx-transcendentals">,
-  Flags<[CC1Option]>, HelpText<"Use approximate transcendental functions">;
-def fno_cuda_approx_transcendentals : Flag<["-"], "fno-cuda-approx-transcendentals">;
-def fgpu_rdc : Flag<["-"], "fgpu-rdc">, Flags<[CC1Option]>,
-  HelpText<"Generate relocatable device code, also known as separate compilation mode.">;
-def fno_gpu_rdc : Flag<["-"], "fno-gpu-rdc">;
+defm cuda_approx_transcendentals : OptInFFlag<"cuda-approx-transcendentals", "Use", "Don't use",
+  " approximate transcendental functions">;
+defm gpu_rdc : OptInFFlag<"gpu-rdc",
+  "Generate relocatable device code, also known as separate compilation mode", "", "">;
 def : Flag<["-"], "fcuda-rdc">, Alias<fgpu_rdc>;
 def : Flag<["-"], "fno-cuda-rdc">, Alias<fno_gpu_rdc>;
-def fcuda_short_ptr : Flag<["-"], "fcuda-short-ptr">, Flags<[CC1Option]>,
-  HelpText<"Use 32-bit pointers for accessing const/local/shared address spaces.">;
-def fno_cuda_short_ptr : Flag<["-"], "fno-cuda-short-ptr">;
-def hip_device_lib_path_EQ : Joined<["--"], "hip-device-lib-path=">, Group<Link_Group>,
-  HelpText<"HIP device library path">;
+defm cuda_short_ptr : OptInFFlag<"cuda-short-ptr",
+  "Use 32-bit pointers for accessing const/local/shared address spaces">;
+def rocm_path_EQ : Joined<["--"], "rocm-path=">, Group<i_Group>,
+  HelpText<"ROCm installation path, used for finding and automatically linking required bitcode libraries.">;
+def rocm_device_lib_path_EQ : Joined<["--"], "rocm-device-lib-path=">, Group<Link_Group>,
+  HelpText<"ROCm device library path. Alternative to rocm-path.">;
+def : Joined<["--"], "hip-device-lib-path=">, Alias<rocm_device_lib_path_EQ>;
 def hip_device_lib_EQ : Joined<["--"], "hip-device-lib=">, Group<Link_Group>,
   HelpText<"HIP device library">;
+def hip_version_EQ : Joined<["--"], "hip-version=">,
+  HelpText<"HIP version in the format of major.minor.patch">;
 def fhip_dump_offload_linker_script : Flag<["-"], "fhip-dump-offload-linker-script">,
   Group<f_Group>, Flags<[NoArgumentUnused, HelpHidden]>;
-def fhip_new_launch_api : Flag<["-"], "fhip-new-launch-api">,
-  Flags<[CC1Option]>, HelpText<"Use new kernel launching API for HIP.">;
-def fno_hip_new_launch_api : Flag<["-"], "fno-hip-new-launch-api">;
-def fgpu_allow_device_init : Flag<["-"], "fgpu-allow-device-init">,
-  Flags<[CC1Option]>, HelpText<"Allow device side init function in HIP">;
-def fno_gpu_allow_device_init : Flag<["-"], "fno-gpu-allow-device-init">;
+defm hip_new_launch_api : OptInFFlag<"hip-new-launch-api",
+  "Use", "Don't use", " new kernel launching API for HIP">;
+defm gpu_allow_device_init : OptInFFlag<"gpu-allow-device-init",
+  "Allow", "Don't allow", " device side init function in HIP">;
 def gpu_max_threads_per_block_EQ : Joined<["--"], "gpu-max-threads-per-block=">,
   Flags<[CC1Option]>,
   HelpText<"Default max threads per block for kernel launch bounds for HIP">;
@@ -646,14 +690,17 @@ def emit_merged_ifs : Flag<["-"], "emit-merged-ifs">,
 def interface_stub_version_EQ : JoinedOrSeparate<["-"], "interface-stub-version=">, Flags<[CC1Option]>;
 def exported__symbols__list : Separate<["-"], "exported_symbols_list">;
 def e : JoinedOrSeparate<["-"], "e">, Group<Link_Group>;
+def fmax_tokens_EQ : Joined<["-"], "fmax-tokens=">, Group<f_Group>, Flags<[CC1Option]>,
+  HelpText<"Max total number of preprocessed tokens for -Wmax-tokens.">;
 def fPIC : Flag<["-"], "fPIC">, Group<f_Group>;
 def fno_PIC : Flag<["-"], "fno-PIC">, Group<f_Group>;
 def fPIE : Flag<["-"], "fPIE">, Group<f_Group>;
 def fno_PIE : Flag<["-"], "fno-PIE">, Group<f_Group>;
-def faccess_control : Flag<["-"], "faccess-control">, Group<f_Group>;
+defm access_control : OptOutFFlag<"no-access-control", "", "Disable C++ access control">;
 def falign_functions : Flag<["-"], "falign-functions">, Group<f_Group>;
 def falign_functions_EQ : Joined<["-"], "falign-functions=">, Group<f_Group>;
 def fno_align_functions: Flag<["-"], "fno-align-functions">, Group<f_Group>;
+defm allow_editor_placeholders : OptInFFlag<"allow-editor-placeholders", "Treat editor placeholders as valid source code">;
 def fallow_unsupported : Flag<["-"], "fallow-unsupported">, Group<f_Group>;
 def fapple_kext : Flag<["-"], "fapple-kext">, Group<f_Group>, Flags<[CC1Option]>,
   HelpText<"Use Apple's kernel extensions ABI">;
@@ -666,8 +713,7 @@ def static_libsan : Flag<["-"], "static-libsan">,
 def : Flag<["-"], "shared-libasan">, Alias<shared_libsan>;
 def fasm : Flag<["-"], "fasm">, Group<f_Group>;
 
-def fasm_blocks : Flag<["-"], "fasm-blocks">, Group<f_Group>, Flags<[CC1Option]>;
-def fno_asm_blocks : Flag<["-"], "fno-asm-blocks">, Group<f_Group>;
+defm asm_blocks : OptInFFlag<"asm-blocks", "">;
 
 def fassume_sane_operator_new : Flag<["-"], "fassume-sane-operator-new">, Group<f_Group>;
 def fastcp : Flag<["-"], "fastcp">, Group<f_Group>;
@@ -682,17 +728,10 @@ def fno_double_square_bracket_attributes : Flag<[ "-" ], "fno-double-square-brac
   Group<f_Group>, Flags<[DriverOption, CC1Option]>,
   HelpText<"Disable '[[]]' attributes in all C and C++ language modes">;
 
-def fautolink : Flag <["-"], "fautolink">, Group<f_Group>;
-def fno_autolink : Flag <["-"], "fno-autolink">, Group<f_Group>,
-  Flags<[DriverOption, CC1Option]>,
-  HelpText<"Disable generation of linker directives for automatic library linking">;
+defm autolink : OptOutFFlag<"autolink", "", "Disable generation of linker directives for automatic library linking">;
 
 // C++ Coroutines TS
-def fcoroutines_ts : Flag <["-"], "fcoroutines-ts">, Group<f_Group>,
-  Flags<[DriverOption, CC1Option]>,
-  HelpText<"Enable support for the C++ Coroutines TS">;
-def fno_coroutines_ts : Flag <["-"], "fno-coroutines-ts">, Group<f_Group>,
-  Flags<[DriverOption]>;
+defm coroutines_ts : OptInFFlag<"coroutines-ts", "Enable support for the C++ Coroutines TS">;
 
 def fembed_bitcode_EQ : Joined<["-"], "fembed-bitcode=">,
     Group<f_Group>, Flags<[DriverOption, CC1Option, CC1AsOption]>, MetaVarName<"<option>">,
@@ -703,10 +742,7 @@ def fembed_bitcode : Flag<["-"], "fembed-bitcode">, Group<f_Group>,
 def fembed_bitcode_marker : Flag<["-"], "fembed-bitcode-marker">,
   Alias<fembed_bitcode_EQ>, AliasArgs<["marker"]>,
   HelpText<"Embed placeholder LLVM IR data as a marker">;
-def fgnu_inline_asm : Flag<["-"], "fgnu-inline-asm">, Group<f_Group>, Flags<[DriverOption]>;
-def fno_gnu_inline_asm : Flag<["-"], "fno-gnu-inline-asm">, Group<f_Group>,
-  Flags<[DriverOption, CC1Option]>,
-  HelpText<"Disable GNU style inline asm">;
+defm gnu_inline_asm : OptOutFFlag<"gnu-inline-asm", "", "Disable GNU style inline asm">;
 
 def fprofile_sample_use : Flag<["-"], "fprofile-sample-use">, Group<f_Group>,
     Flags<[CoreOption]>;
@@ -740,12 +776,8 @@ def fdebug_compilation_dir : Separate<["-"], "fdebug-compilation-dir">,
 def fdebug_compilation_dir_EQ : Joined<["-"], "fdebug-compilation-dir=">,
     Group<f_Group>, Flags<[CC1Option, CC1AsOption, CoreOption]>,
     Alias<fdebug_compilation_dir>;
-def fdebug_info_for_profiling : Flag<["-"], "fdebug-info-for-profiling">,
-    Group<f_Group>, Flags<[CC1Option]>,
-    HelpText<"Emit extra debug info to make sample profile more accurate.">;
-def fno_debug_info_for_profiling : Flag<["-"], "fno-debug-info-for-profiling">,
-    Group<f_Group>, Flags<[DriverOption]>,
-    HelpText<"Do not emit extra debug info for sample profiler.">;
+defm debug_info_for_profiling : OptInFFlag<"debug-info-for-profiling",
+  "Emit extra debug info to make sample profile more accurate">;
 def fprofile_instr_generate : Flag<["-"], "fprofile-instr-generate">,
     Group<f_Group>, Flags<[CoreOption]>,
     HelpText<"Generate instrumented code to collect execution counts into default.profraw file (overridden by '=' form of option or LLVM_PROFILE_FILE env var)">;
@@ -762,12 +794,9 @@ def fprofile_remapping_file_EQ : Joined<["-"], "fprofile-remapping-file=">,
     HelpText<"Use the remappings described in <file> to match the profile data against names in the program">;
 def fprofile_remapping_file : Separate<["-"], "fprofile-remapping-file">,
     Group<f_Group>, Flags<[CoreOption]>, Alias<fprofile_remapping_file_EQ>;
-def fcoverage_mapping : Flag<["-"], "fcoverage-mapping">,
-    Group<f_Group>, Flags<[CC1Option, CoreOption]>,
-    HelpText<"Generate coverage mapping to enable code coverage analysis">;
-def fno_coverage_mapping : Flag<["-"], "fno-coverage-mapping">,
-    Group<f_Group>, Flags<[DriverOption, CoreOption]>,
-    HelpText<"Disable code coverage analysis">;
+defm coverage_mapping : OptInFFlag<"coverage-mapping",
+  "Generate coverage mapping to enable code coverage analysis", "Disable code coverage analysis", "",
+  [CoreOption]>;
 def fprofile_generate : Flag<["-"], "fprofile-generate">,
     Group<f_Group>, Flags<[CoreOption]>,
     HelpText<"Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM_PROFILE_FILE env var)">;
@@ -806,30 +835,26 @@ def forder_file_instrumentation : Flag<["-"], "forder-file-instrumentation">,
     Group<f_Group>, Flags<[CC1Option, CoreOption]>,
     HelpText<"Generate instrumented code to collect order file into default.profraw file (overridden by '=' form of option or LLVM_PROFILE_FILE env var)">;
 
-def faddrsig : Flag<["-"], "faddrsig">, Group<f_Group>, Flags<[CoreOption, CC1Option]>,
-  HelpText<"Emit an address-significance table">;
-def fno_addrsig : Flag<["-"], "fno-addrsig">, Group<f_Group>, Flags<[CoreOption]>,
-  HelpText<"Don't emit an address-significance table">;
-def fblocks : Flag<["-"], "fblocks">, Group<f_Group>, Flags<[CoreOption, CC1Option]>,
-  HelpText<"Enable the 'blocks' language feature">;
+defm addrsig : OptInFFlag<"addrsig", "Emit", "Don't emit", " an address-significance table", [CoreOption]>;
+defm blocks : OptInFFlag<"blocks", "Enable the 'blocks' language feature", "", "", [CoreOption]>;
 def fbootclasspath_EQ : Joined<["-"], "fbootclasspath=">, Group<f_Group>;
 def fborland_extensions : Flag<["-"], "fborland-extensions">, Group<f_Group>, Flags<[CC1Option]>,
   HelpText<"Accept non-standard constructs supported by the Borland compiler">;
 def fbuiltin : Flag<["-"], "fbuiltin">, Group<f_Group>, Flags<[CoreOption]>;
 def fbuiltin_module_map : Flag <["-"], "fbuiltin-module-map">, Group<f_Group>,
   Flags<[DriverOption]>, HelpText<"Load the clang builtins module map file.">;
-def fcaret_diagnostics : Flag<["-"], "fcaret-diagnostics">, Group<f_Group>;
+defm caret_diagnostics : OptOutFFlag<"caret-diagnostics", "", "">;
 def fclang_abi_compat_EQ : Joined<["-"], "fclang-abi-compat=">, Group<f_clang_Group>,
   Flags<[CC1Option]>, MetaVarName<"<version>">, Values<"<major>.<minor>,latest">,
   HelpText<"Attempt to match the ABI of Clang <version>">;
 def fclasspath_EQ : Joined<["-"], "fclasspath=">, Group<f_Group>;
-def fcolor_diagnostics : Flag<["-"], "fcolor-diagnostics">, Group<f_Group>,
-  Flags<[CoreOption, CC1Option]>, HelpText<"Use colors in diagnostics">;
+defm color_diagnostics : OptInFFlag<"color-diagnostics", "Enable", "Disable", " colors in diagnostics", [CoreOption]>;
 def fdiagnostics_color : Flag<["-"], "fdiagnostics-color">, Group<f_Group>,
   Flags<[CoreOption, DriverOption]>;
 def fdiagnostics_color_EQ : Joined<["-"], "fdiagnostics-color=">, Group<f_Group>;
 def fansi_escape_codes : Flag<["-"], "fansi-escape-codes">, Group<f_Group>,
-  Flags<[CoreOption, CC1Option]>, HelpText<"Use ANSI escape codes for diagnostics">;
+  Flags<[CoreOption, CC1Option]>, HelpText<"Use ANSI escape codes for diagnostics">,
+  MarshallingInfoFlag<"DiagnosticOpts->UseANSIEscapeCodes", "false">;
 def fcomment_block_commands : CommaJoined<["-"], "fcomment-block-commands=">, Group<f_clang_Group>, Flags<[CC1Option]>,
   HelpText<"Treat each comma separated argument in <arg> as a documentation comment block command">,
   MetaVarName<"<arg>">;
@@ -863,8 +888,7 @@ def fno_crash_diagnostics : Flag<["-"], "fno-crash-diagnostics">, Group<f_clang_
   HelpText<"Disable auto-generation of preprocessed source files and a script for reproduction during a clang crash">;
 def fcrash_diagnostics_dir : Joined<["-"], "fcrash-diagnostics-dir=">, Group<f_clang_Group>, Flags<[NoArgumentUnused, CoreOption]>;
 def fcreate_profile : Flag<["-"], "fcreate-profile">, Group<f_Group>;
-def fcxx_exceptions: Flag<["-"], "fcxx-exceptions">, Group<f_Group>,
-  HelpText<"Enable C++ exceptions">, Flags<[CC1Option]>;
+defm cxx_exceptions: OptInFFlag<"cxx-exceptions", "Enable C++ exceptions">;
 def fcxx_modules : Flag <["-"], "fcxx-modules">, Group<f_Group>,
   Flags<[DriverOption]>;
 def fdebug_pass_arguments : Flag<["-"], "fdebug-pass-arguments">, Group<f_Group>;
@@ -883,9 +907,9 @@ def fdiagnostics_hotness_threshold_EQ : Joined<["-"], "fdiagnostics-hotness-thre
     Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<number>">,
     HelpText<"Prevent optimization remarks from being output if they do not have at least this profile count">;
 def fdiagnostics_show_option : Flag<["-"], "fdiagnostics-show-option">, Group<f_Group>,
-    Flags<[CC1Option]>, HelpText<"Print option name with mappable diagnostics">;
+    HelpText<"Print option name with mappable diagnostics">;
 def fdiagnostics_show_note_include_stack : Flag<["-"], "fdiagnostics-show-note-include-stack">,
-    Group<f_Group>,  Flags<[CC1Option]>, HelpText<"Display include stacks for diagnostic notes">;
+    Group<f_Group>, Flags<[CC1Option]>, HelpText<"Display include stacks for diagnostic notes">;
 def fdiagnostics_format_EQ : Joined<["-"], "fdiagnostics-format=">, Group<f_clang_Group>;
 def fdiagnostics_show_category_EQ : Joined<["-"], "fdiagnostics-show-category=">, Group<f_clang_Group>;
 def fdiagnostics_show_template_tree : Flag<["-"], "fdiagnostics-show-template-tree">,
@@ -901,8 +925,7 @@ def fdollars_in_identifiers : Flag<["-"], "fdollars-in-identifiers">, Group<f_Gr
   HelpText<"Allow '$' in identifiers">, Flags<[CC1Option]>;
 def fdwarf2_cfi_asm : Flag<["-"], "fdwarf2-cfi-asm">, Group<clang_ignored_f_Group>;
 def fno_dwarf2_cfi_asm : Flag<["-"], "fno-dwarf2-cfi-asm">, Group<clang_ignored_f_Group>;
-def fdwarf_directory_asm : Flag<["-"], "fdwarf-directory-asm">, Group<f_Group>;
-def fno_dwarf_directory_asm : Flag<["-"], "fno-dwarf-directory-asm">, Group<f_Group>, Flags<[CC1Option]>;
+defm dwarf_directory_asm : OptOutFFlag<"dwarf-directory-asm", "", "">;
 def felide_constructors : Flag<["-"], "felide-constructors">, Group<f_Group>;
 def fno_elide_type : Flag<["-"], "fno-elide-type">, Group<f_Group>,
     Flags<[CC1Option]>,
@@ -915,8 +938,7 @@ def femulated_tls : Flag<["-"], "femulated-tls">, Group<f_Group>, Flags<[CC1Opti
 def fno_emulated_tls : Flag<["-"], "fno-emulated-tls">, Group<f_Group>, Flags<[CC1Option]>;
 def fencoding_EQ : Joined<["-"], "fencoding=">, Group<f_Group>;
 def ferror_limit_EQ : Joined<["-"], "ferror-limit=">, Group<f_Group>, Flags<[CoreOption]>;
-def fexceptions : Flag<["-"], "fexceptions">, Group<f_Group>, Flags<[CC1Option]>,
-  HelpText<"Enable support for exception handling">;
+defm exceptions : OptInFFlag<"exceptions", "Enable", "Disable", " support for exception handling">;
 def fdwarf_exceptions : Flag<["-"], "fdwarf-exceptions">, Group<f_Group>,
   Flags<[CC1Option]>, HelpText<"Use DWARF style exceptions">;
 def fsjlj_exceptions : Flag<["-"], "fsjlj-exceptions">, Group<f_Group>,
@@ -925,6 +947,8 @@ def fseh_exceptions : Flag<["-"], "fseh-exceptions">, Group<f_Group>,
   Flags<[CC1Option]>, HelpText<"Use SEH style exceptions">;
 def fwasm_exceptions : Flag<["-"], "fwasm-exceptions">, Group<f_Group>,
   Flags<[CC1Option]>, HelpText<"Use WebAssembly style exceptions">;
+def fignore_exceptions : Flag<["-"], "fignore-exceptions">, Group<f_Group>, Flags<[CC1Option]>,
+  HelpText<"Enable support for ignoring exception handling constructs">;
 def fexcess_precision_EQ : Joined<["-"], "fexcess-precision=">,
     Group<clang_ignored_gcc_optimization_f_Group>;
 def : Flag<["-"], "fexpensive-optimizations">, Group<clang_ignored_gcc_optimization_f_Group>;
@@ -940,37 +964,17 @@ def ffp_model_EQ : Joined<["-"], "ffp-model=">, Group<f_Group>, Flags<[DriverOpt
   HelpText<"Controls the semantics of floating-point calculations.">;
 def ffp_exception_behavior_EQ : Joined<["-"], "ffp-exception-behavior=">, Group<f_Group>, Flags<[CC1Option]>,
   HelpText<"Specifies the exception behavior of floating-point operations.">;
-def ffast_math : Flag<["-"], "ffast-math">, Group<f_Group>, Flags<[CC1Option]>,
-  HelpText<"Allow aggressive, lossy floating-point optimizations">;
-def fno_fast_math : Flag<["-"], "fno-fast-math">, Group<f_Group>;
-def fmath_errno : Flag<["-"], "fmath-errno">, Group<f_Group>, Flags<[CC1Option]>,
-  HelpText<"Require math functions to indicate errors by setting errno">;
-def fno_math_errno : Flag<["-"], "fno-math-errno">, Group<f_Group>;
+defm fast_math : OptInFFlag<"fast-math", "Allow aggressive, lossy floating-point optimizations">;
+defm math_errno : OptInFFlag<"math-errno", "Require math functions to indicate errors by setting errno">;
 def fbracket_depth_EQ : Joined<["-"], "fbracket-depth=">, Group<f_Group>, Flags<[CoreOption]>;
 def fsignaling_math : Flag<["-"], "fsignaling-math">, Group<f_Group>;
 def fno_signaling_math : Flag<["-"], "fno-signaling-math">, Group<f_Group>;
-def fjump_tables : Flag<["-"], "fjump-tables">, Group<f_Group>;
-def fno_jump_tables : Flag<["-"], "fno-jump-tables">, Group<f_Group>, Flags<[CC1Option]>,
-  HelpText<"Do not use jump tables for lowering switches">;
-def fforce_enable_int128 : Flag<["-"], "fforce-enable-int128">,
-  Group<f_Group>, Flags<[CC1Option]>,
-  HelpText<"Enable support for int128_t type">;
-def fno_force_enable_int128 : Flag<["-"], "fno-force-enable-int128">,
-  Group<f_Group>, Flags<[CC1Option]>,
-  HelpText<"Disable support for int128_t type">;
-def fkeep_static_consts : Flag<["-"], "fkeep-static-consts">, Group<f_Group>, Flags<[CC1Option]>,
-  HelpText<"Keep static const variables even if unused">;
-def ffixed_point : Flag<["-"], "ffixed-point">, Group<f_Group>,
-                   Flags<[CC1Option]>, HelpText<"Enable fixed point types">;
-def fno_fixed_point : Flag<["-"], "fno-fixed-point">, Group<f_Group>,
-                      HelpText<"Disable fixed point types">;
-def fcxx_static_destructors : Flag<["-"], "fc++-static-destructors">,
-  Group<f_Group>,
-  HelpText<"Enable C++ static destructor registration (the default)">;
-def fno_cxx_static_destructors : Flag<["-"], "fno-c++-static-destructors">,
-  Group<f_Group>,
-  Flags<[CC1Option]>,
-  HelpText<"Disable C++ static destructor registration">;
+defm jump_tables : OptOutFFlag<"jump-tables", "Use", "Do not use", " jump tables for lowering switches">;
+defm force_enable_int128 : OptInFFlag<"force-enable-int128", "Enable", "Disable", " support for int128_t type">;
+defm keep_static_consts : OptInFFlag<"keep-static-consts", "Keep", "Don't keep", " static const variables if unused", [DriverOption]>;
+defm fixed_point : OptInFFlag<"fixed-point", "Enable", "Disable", " fixed point types">;
+defm cxx_static_destructors : OptOutFFlag<"c++-static-destructors", "",
+  "Disable C++ static destructor registration">;
 def fsymbol_partition_EQ : Joined<["-"], "fsymbol-partition=">, Group<f_Group>,
   Flags<[CC1Option]>;
 
@@ -1001,7 +1005,19 @@ def fno_sanitize_coverage
     : CommaJoined<["-"], "fno-sanitize-coverage=">,
       Group<f_clang_Group>, Flags<[CoreOption, DriverOption]>,
       HelpText<"Disable specified features of coverage instrumentation for "
-               "Sanitizers">, Values<"func,bb,edge,indirect-calls,trace-bb,trace-cmp,trace-div,trace-gep,8bit-counters,trace-pc,trace-pc-guard,no-prune,inline-8bit-counters">;
+               "Sanitizers">, Values<"func,bb,edge,indirect-calls,trace-bb,trace-cmp,trace-div,trace-gep,8bit-counters,trace-pc,trace-pc-guard,no-prune,inline-8bit-counters,inline-bool-flag">;
+def fsanitize_coverage_allowlist : Joined<["-"], "fsanitize-coverage-allowlist=">,
+    Group<f_clang_Group>, Flags<[CoreOption, DriverOption]>,
+    HelpText<"Restrict sanitizer coverage instrumentation exclusively to modules and functions that match the provided special case list, except the blocked ones">;
+def : Joined<["-"], "fsanitize-coverage-whitelist=">,
+  Group<f_clang_Group>, Flags<[CoreOption, HelpHidden]>, Alias<fsanitize_coverage_allowlist>,
+  HelpText<"Deprecated, use -fsanitize-coverage-allowlist= instead">;
+def fsanitize_coverage_blocklist : Joined<["-"], "fsanitize-coverage-blocklist=">,
+    Group<f_clang_Group>, Flags<[CoreOption, DriverOption]>,
+    HelpText<"Disable sanitizer coverage instrumentation for modules and functions that match the provided special case list, even the allowed ones">;
+def : Joined<["-"], "fsanitize-coverage-blacklist=">,
+  Group<f_clang_Group>, Flags<[CoreOption, HelpHidden]>, Alias<fsanitize_coverage_blocklist>,
+  HelpText<"Deprecated, use -fsanitize-coverage-blocklist= instead">;
 def fsanitize_memory_track_origins_EQ : Joined<["-"], "fsanitize-memory-track-origins=">,
                                         Group<f_clang_Group>,
                                         HelpText<"Enable origins tracking in MemorySanitizer">;
@@ -1057,27 +1073,35 @@ def fsanitize_hwaddress_abi_EQ
     : Joined<["-"], "fsanitize-hwaddress-abi=">,
       Group<f_clang_Group>,
       HelpText<"Select the HWAddressSanitizer ABI to target (interceptor or platform, default interceptor). This option is currently unused.">;
-def fsanitize_recover : Flag<["-"], "fsanitize-recover">, Group<f_clang_Group>;
-def fno_sanitize_recover : Flag<["-"], "fno-sanitize-recover">,
-                           Flags<[CoreOption, DriverOption]>,
-                           Group<f_clang_Group>;
 def fsanitize_recover_EQ : CommaJoined<["-"], "fsanitize-recover=">,
                            Group<f_clang_Group>,
                            HelpText<"Enable recovery for specified sanitizers">;
-def fno_sanitize_recover_EQ
-    : CommaJoined<["-"], "fno-sanitize-recover=">,
-      Group<f_clang_Group>,
-      Flags<[CoreOption, DriverOption]>,
-      HelpText<"Disable recovery for specified sanitizers">;
+def fno_sanitize_recover_EQ : CommaJoined<["-"], "fno-sanitize-recover=">,
+                              Group<f_clang_Group>, Flags<[CoreOption, DriverOption]>,
+                              HelpText<"Disable recovery for specified sanitizers">;
+def fsanitize_recover : Flag<["-"], "fsanitize-recover">, Group<f_clang_Group>,
+                        Alias<fsanitize_recover_EQ>, AliasArgs<["all"]>;
+def fno_sanitize_recover : Flag<["-"], "fno-sanitize-recover">,
+                           Flags<[CoreOption, DriverOption]>, Group<f_clang_Group>,
+                           Alias<fno_sanitize_recover_EQ>, AliasArgs<["all"]>;
 def fsanitize_trap_EQ : CommaJoined<["-"], "fsanitize-trap=">, Group<f_clang_Group>,
                         HelpText<"Enable trapping for specified sanitizers">;
 def fno_sanitize_trap_EQ : CommaJoined<["-"], "fno-sanitize-trap=">, Group<f_clang_Group>,
                            Flags<[CoreOption, DriverOption]>,
                            HelpText<"Disable trapping for specified sanitizers">;
-def fsanitize_undefined_trap_on_error : Flag<["-"], "fsanitize-undefined-trap-on-error">,
-                                        Group<f_clang_Group>;
-def fno_sanitize_undefined_trap_on_error : Flag<["-"], "fno-sanitize-undefined-trap-on-error">,
-                                           Group<f_clang_Group>;
+def fsanitize_trap : Flag<["-"], "fsanitize-trap">, Group<f_clang_Group>,
+                     Alias<fsanitize_trap_EQ>, AliasArgs<["all"]>,
+                     HelpText<"Enable trapping for all sanitizers">;
+def fno_sanitize_trap : Flag<["-"], "fno-sanitize-trap">, Group<f_clang_Group>,
+                        Alias<fno_sanitize_trap_EQ>, AliasArgs<["all"]>,
+                        Flags<[CoreOption, DriverOption]>,
+                        HelpText<"Disable trapping for all sanitizers">;
+def fsanitize_undefined_trap_on_error
+    : Flag<["-"], "fsanitize-undefined-trap-on-error">, Group<f_clang_Group>,
+      Alias<fsanitize_trap_EQ>, AliasArgs<["undefined"]>;
+def fno_sanitize_undefined_trap_on_error
+    : Flag<["-"], "fno-sanitize-undefined-trap-on-error">, Group<f_clang_Group>,
+      Alias<fno_sanitize_trap_EQ>, AliasArgs<["undefined"]>;
 def fsanitize_minimal_runtime : Flag<["-"], "fsanitize-minimal-runtime">,
                                         Group<f_clang_Group>;
 def fno_sanitize_minimal_runtime : Flag<["-"], "fno-sanitize-minimal-runtime">,
@@ -1174,30 +1198,19 @@ def ffp_contract : Joined<["-"], "ffp-contract=">, Group<f_Group>,
   " | on (according to FP_CONTRACT pragma) | off (never fuse). Default"
   " is 'fast' for CUDA/HIP and 'on' otherwise.">, Values<"fast,on,off">;
 
-def fstrict_float_cast_overflow : Flag<["-"],
-  "fstrict-float-cast-overflow">, Group<f_Group>, Flags<[CC1Option]>,
-  HelpText<"Assume that overflowing float-to-int casts are undefined (default)">;
-def fno_strict_float_cast_overflow : Flag<["-"],
-  "fno-strict-float-cast-overflow">, Group<f_Group>, Flags<[CC1Option]>,
-  HelpText<"Relax language rules and try to match the behavior of the target's native float-to-int conversion instructions">;
+defm strict_float_cast_overflow : OptOutFFlag<"strict-float-cast-overflow",
+  "Assume that overflowing float-to-int casts are undefined (default)",
+  "Relax language rules and try to match the behavior of the target's native float-to-int conversion instructions">;
 
 def ffor_scope : Flag<["-"], "ffor-scope">, Group<f_Group>;
 def fno_for_scope : Flag<["-"], "fno-for-scope">, Group<f_Group>;
 
-def frewrite_includes : Flag<["-"], "frewrite-includes">, Group<f_Group>,
-  Flags<[CC1Option]>;
-def fno_rewrite_includes : Flag<["-"], "fno-rewrite-includes">, Group<f_Group>;
-
-def frewrite_imports : Flag<["-"], "frewrite-imports">, Group<f_Group>,
-  Flags<[CC1Option]>;
-def fno_rewrite_imports : Flag<["-"], "fno-rewrite-imports">, Group<f_Group>;
+defm rewrite_imports : OptInFFlag<"rewrite-imports", "">;
+defm rewrite_includes : OptInFFlag<"rewrite-includes", "">;
 
-def fdelete_null_pointer_checks : Flag<["-"],
-  "fdelete-null-pointer-checks">, Group<f_Group>,
-  HelpText<"Treat usage of null pointers as undefined behavior.">;
-def fno_delete_null_pointer_checks : Flag<["-"],
-  "fno-delete-null-pointer-checks">, Group<f_Group>, Flags<[CC1Option]>,
-  HelpText<"Do not treat usage of null pointers as undefined behavior.">;
+defm delete_null_pointer_checks : OptOutFFlag<"delete-null-pointer-checks",
+  "Treat usage of null pointers as undefined behavior (default)",
+  "Do not treat usage of null pointers as undefined behavior">;
 
 def frewrite_map_file : Separate<["-"], "frewrite-map-file">,
                         Group<f_Group>,
@@ -1206,9 +1219,7 @@ def frewrite_map_file_EQ : Joined<["-"], "frewrite-map-file=">,
                            Group<f_Group>,
                            Flags<[DriverOption]>;
 
-def fuse_line_directives : Flag<["-"], "fuse-line-directives">, Group<f_Group>,
-  Flags<[CC1Option]>;
-def fno_use_line_directives : Flag<["-"], "fno-use-line-directives">, Group<f_Group>;
+defm use_line_directives : OptInFFlag<"use-line-directives", "Use #line in preprocessed output">;
 
 def ffreestanding : Flag<["-"], "ffreestanding">, Group<f_Group>, Flags<[CC1Option]>,
   HelpText<"Assert that the compilation takes place in a freestanding environment">;
@@ -1217,9 +1228,7 @@ def fgnuc_version_EQ : Joined<["-"], "fgnuc-version=">, Group<f_Group>,
   Flags<[CC1Option, CoreOption]>;
 def fgnu_keywords : Flag<["-"], "fgnu-keywords">, Group<f_Group>, Flags<[CC1Option]>,
   HelpText<"Allow GNU-extension keywords regardless of language standard">;
-def fgnu89_inline : Flag<["-"], "fgnu89-inline">, Group<f_Group>, Flags<[CC1Option]>,
-  HelpText<"Use the gnu89 inline semantics">;
-def fno_gnu89_inline : Flag<["-"], "fno-gnu89-inline">, Group<f_Group>;
+defm gnu89_inline : OptInFFlag<"gnu89-inline", "Use the gnu89 inline semantics">;
 def fgnu_runtime : Flag<["-"], "fgnu-runtime">, Group<f_Group>,
   HelpText<"Generate output compatible with the standard GNU Objective-C runtime">;
 def fheinous_gnu_extensions : Flag<["-"], "fheinous-gnu-extensions">, Flags<[CC1Option]>;
@@ -1231,8 +1240,10 @@ def finline_functions : Flag<["-"], "finline-functions">, Group<f_clang_Group>,
 def finline_hint_functions: Flag<["-"], "finline-hint-functions">, Group<f_clang_Group>, Flags<[CC1Option]>,
   HelpText<"Inline functions which are (explicitly or implicitly) marked inline">;
 def finline : Flag<["-"], "finline">, Group<clang_ignored_f_Group>;
+def fglobal_isel : Flag<["-"], "fglobal-isel">, Group<f_clang_Group>, 
+  HelpText<"Enables the global instruction selector">;
 def fexperimental_isel : Flag<["-"], "fexperimental-isel">, Group<f_clang_Group>,
-  HelpText<"Enables the experimental global instruction selector">;
+  Alias<fglobal_isel>;
 def fexperimental_new_pass_manager : Flag<["-"], "fexperimental-new-pass-manager">,
   Group<f_clang_Group>, Flags<[CC1Option]>,
   HelpText<"Enables an experimental new pass manager in LLVM.">;
@@ -1253,11 +1264,7 @@ def fcf_protection : Flag<["-"], "fcf-protection">, Group<f_Group>, Flags<[CoreO
   Alias<fcf_protection_EQ>, AliasArgs<["full"]>,
   HelpText<"Enable cf-protection in 'full' mode">;
 
-def fxray_instrument : Flag<["-"], "fxray-instrument">, Group<f_Group>,
-  Flags<[CC1Option]>,
-  HelpText<"Generate XRay instrumentation sleds on function entry and exit">;
-def fnoxray_instrument : Flag<["-"], "fno-xray-instrument">, Group<f_Group>,
-  Flags<[CC1Option]>;
+defm xray_instrument : OptInFFlag<"xray-instrument", "Generate XRay instrumentation sleds on function entry and exit">;
 
 def fxray_instruction_threshold_EQ :
   JoinedOrSeparate<["-"], "fxray-instruction-threshold=">,
@@ -1284,17 +1291,16 @@ def fxray_modes :
   Group<f_Group>, Flags<[CC1Option]>,
   HelpText<"List of modes to link in by default into XRay instrumented binaries.">;
 
-def fxray_always_emit_customevents : Flag<["-"], "fxray-always-emit-customevents">, Group<f_Group>,
-  Flags<[CC1Option]>,
-  HelpText<"Determine whether to always emit __xray_customevent(...) calls even if the function it appears in is not always instrumented.">;
-def fnoxray_always_emit_customevents : Flag<["-"], "fno-xray-always-emit-customevents">, Group<f_Group>,
-  Flags<[CC1Option]>;
+defm xray_always_emit_customevents : OptInFFlag<"xray-always-emit-customevents",
+  "Always emit __xray_customevent(...) calls even if the containing function is not always instrumented">;
 
-def fxray_always_emit_typedevents : Flag<["-"], "fxray-always-emit-typedevents">, Group<f_Group>,
-  Flags<[CC1Option]>,
-  HelpText<"Determine whether to always emit __xray_typedevent(...) calls even if the function it appears in is not always instrumented.">;
-def fnoxray_always_emit_typedevents : Flag<["-"], "fno-xray-always-emit-typedevents">, Group<f_Group>,
-  Flags<[CC1Option]>;
+defm xray_always_emit_typedevents : OptInFFlag<"xray-always-emit-typedevents",
+  "Always emit __xray_typedevent(...) calls even if the containing function is not always instrumented">;
+
+defm xray_ignore_loops : OptInFFlag<"xray-ignore-loops",
+  "Don't instrument functions with loops unless they also meet the minimum function size">;
+defm xray_function_index : OptOutFFlag<"xray-function-index", "",
+  "Omit function index section at the expense of single-function patching performance">;
 
 def fxray_link_deps : Flag<["-"], "fxray-link-deps">, Group<f_Group>,
   Flags<[CC1Option]>,
@@ -1305,7 +1311,7 @@ def fnoxray_link_deps : Flag<["-"], "fnoxray-link-deps">, Group<f_Group>,
 def fxray_instrumentation_bundle :
   JoinedOrSeparate<["-"], "fxray-instrumentation-bundle=">,
   Group<f_Group>, Flags<[CC1Option]>,
-  HelpText<"Select which XRay instrumentation points to emit. Options: all, none, function, custom. Default is 'all'.">;
+  HelpText<"Select which XRay instrumentation points to emit. Options: all, none, function-entry, function-exit, function, custom. Default is 'all'.  'function' includes both 'function-entry' and 'function-exit'.">;
 
 def ffine_grained_bitfield_accesses : Flag<["-"],
   "ffine-grained-bitfield-accesses">, Group<f_clang_Group>, Flags<[CC1Option]>,
@@ -1314,6 +1320,13 @@ def fno_fine_grained_bitfield_accesses : Flag<["-"],
   "fno-fine-grained-bitfield-accesses">, Group<f_clang_Group>, Flags<[CC1Option]>,
   HelpText<"Use large-integer access for consecutive bitfield runs.">;
 
+def fexperimental_relative_cxx_abi_vtables : Flag<["-"], "fexperimental-relative-c++-abi-vtables">,
+  Group<f_Group>, Flags<[CC1Option]>,
+  HelpText<"Use the experimental C++ class ABI for classes with virtual tables">;
+def fno_experimental_relative_cxx_abi_vtables : Flag<["-"], "fno-experimental-relative-c++-abi-vtables">,
+  Group<f_Group>, Flags<[CC1Option]>,
+  HelpText<"Do not use the experimental C++ class ABI for classes with virtual tables">;
+
 def flat__namespace : Flag<["-"], "flat_namespace">;
 def flax_vector_conversions_EQ : Joined<["-"], "flax-vector-conversions=">, Group<f_Group>,
   HelpText<"Enable implicit vector bit-casts">, Values<"none,integer,all">, Flags<[CC1Option]>;
@@ -1343,7 +1356,8 @@ def fmacro_backtrace_limit_EQ : Joined<["-"], "fmacro-backtrace-limit=">,
                                 Group<f_Group>, Flags<[DriverOption, CoreOption]>;
 def fmerge_all_constants : Flag<["-"], "fmerge-all-constants">, Group<f_Group>,
   Flags<[CC1Option, CoreOption]>, HelpText<"Allow merging of constants">;
-def fmessage_length_EQ : Joined<["-"], "fmessage-length=">, Group<f_Group>;
+def fmessage_length_EQ : Joined<["-"], "fmessage-length=">, Group<f_Group>, Flags<[CC1Option]>,
+  HelpText<"Format message diagnostics so that they fit within N columns">;
 def fms_extensions : Flag<["-"], "fms-extensions">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,
   HelpText<"Accept some non-standard constructs supported by the Microsoft compiler">;
 def fms_compatibility : Flag<["-"], "fms-compatibility">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,
@@ -1419,6 +1433,17 @@ def fpch_validate_input_files_content:
 def fno_pch_validate_input_files_content:
   Flag <["-"], "fno_pch-validate-input-files-content">,
   Group<f_Group>, Flags<[DriverOption]>;
+def fpch_instantiate_templates:
+  Flag <["-"], "fpch-instantiate-templates">,
+  Group<f_Group>, Flags<[CC1Option, CoreOption]>,
+  HelpText<"Instantiate templates already while building a PCH">;
+def fno_pch_instantiate_templates:
+  Flag <["-"], "fno-pch-instantiate-templates">,
+  Group<f_Group>, Flags<[CC1Option, CoreOption]>;
+defm pch_codegen: OptInFFlag<"pch-codegen", "Generate ", "Do not generate ",
+  "code for uses of this PCH that assumes an explicit object file will be built for the PCH">;
+defm pch_debuginfo: OptInFFlag<"pch-debuginfo", "Generate ", "Do not generate ",
+  "debug info for types in an object file built from this PCH and do not generate them elsewhere">;
 
 def fmodules : Flag <["-"], "fmodules">, Group<f_Group>,
   Flags<[DriverOption, CC1Option]>,
@@ -1435,6 +1460,8 @@ def fmodule_name_EQ : Joined<["-"], "fmodule-name=">, Group<f_Group>,
 def fmodule_name : Separate<["-"], "fmodule-name">, Alias<fmodule_name_EQ>;
 def fmodule_implementation_of : Separate<["-"], "fmodule-implementation-of">,
   Flags<[CC1Option]>, Alias<fmodule_name_EQ>;
+def fsystem_module : Flag<["-"], "fsystem-module">, Flags<[CC1Option]>,
+  HelpText<"Build this module as a system module. Only used with -emit-module">;
 def fmodule_map_file : Joined<["-"], "fmodule-map-file=">,
   Group<f_Group>, Flags<[DriverOption,CC1Option]>, MetaVarName<"<file>">,
   HelpText<"Load this module map file">;
@@ -1460,24 +1487,17 @@ def fmudflapth : Flag<["-"], "fmudflapth">, Group<f_Group>;
 def fmudflap : Flag<["-"], "fmudflap">, Group<f_Group>;
 def fnested_functions : Flag<["-"], "fnested-functions">, Group<f_Group>;
 def fnext_runtime : Flag<["-"], "fnext-runtime">, Group<f_Group>;
-def fno_access_control : Flag<["-"], "fno-access-control">, Group<f_Group>, Flags<[CC1Option]>,
-  HelpText<"Disable C++ access control">;
 def fno_apple_pragma_pack : Flag<["-"], "fno-apple-pragma-pack">, Group<f_Group>;
 def fno_asm : Flag<["-"], "fno-asm">, Group<f_Group>;
 def fno_asynchronous_unwind_tables : Flag<["-"], "fno-asynchronous-unwind-tables">, Group<f_Group>;
 def fno_assume_sane_operator_new : Flag<["-"], "fno-assume-sane-operator-new">, Group<f_Group>,
   HelpText<"Don't assume that C++'s global operator new can't alias any pointer">,
   Flags<[CC1Option]>;
-def fno_blocks : Flag<["-"], "fno-blocks">, Group<f_Group>, Flags<[CoreOption]>;
 def fno_borland_extensions : Flag<["-"], "fno-borland-extensions">, Group<f_Group>;
 def fno_builtin : Flag<["-"], "fno-builtin">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,
   HelpText<"Disable implicit builtin knowledge of functions">;
 def fno_builtin_ : Joined<["-"], "fno-builtin-">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,
   HelpText<"Disable implicit builtin knowledge of a specific function">;
-def fno_caret_diagnostics : Flag<["-"], "fno-caret-diagnostics">, Group<f_Group>,
- Flags<[CC1Option]>;
-def fno_color_diagnostics : Flag<["-"], "fno-color-diagnostics">, Group<f_Group>,
-  Flags<[CoreOption, CC1Option]>;
 def fno_diagnostics_color : Flag<["-"], "fno-diagnostics-color">, Group<f_Group>,
   Flags<[CoreOption, DriverOption]>;
 def fno_common : Flag<["-"], "fno-common">, Group<f_Group>, Flags<[CC1Option]>,
@@ -1485,13 +1505,12 @@ def fno_common : Flag<["-"], "fno-common">, Group<f_Group>, Flags<[CC1Option]>,
 def fno_constant_cfstrings : Flag<["-"], "fno-constant-cfstrings">, Group<f_Group>,
   Flags<[CC1Option]>,
   HelpText<"Disable creation of CodeFoundation-type constant strings">;
-def fno_cxx_exceptions: Flag<["-"], "fno-cxx-exceptions">, Group<f_Group>;
 def fno_cxx_modules : Flag <["-"], "fno-cxx-modules">, Group<f_Group>,
   Flags<[DriverOption]>;
 def fno_diagnostics_fixit_info : Flag<["-"], "fno-diagnostics-fixit-info">, Group<f_Group>,
   Flags<[CC1Option]>, HelpText<"Do not include fixit information in diagnostics">;
 def fno_diagnostics_show_hotness : Flag<["-"], "fno-diagnostics-show-hotness">, Group<f_Group>;
-def fno_diagnostics_show_option : Flag<["-"], "fno-diagnostics-show-option">, Group<f_Group>;
+def fno_diagnostics_show_option : Flag<["-"], "fno-diagnostics-show-option">, Group<f_Group>, Flags<[CC1Option]>;
 def fno_diagnostics_show_note_include_stack : Flag<["-"], "fno-diagnostics-show-note-include-stack">,
     Flags<[CC1Option]>, Group<f_Group>;
 def fdigraphs : Flag<["-"], "fdigraphs">, Group<f_Group>, Flags<[CC1Option]>,
@@ -1505,12 +1524,13 @@ def fno_dollars_in_identifiers : Flag<["-"], "fno-dollars-in-identifiers">, Grou
 def fno_elide_constructors : Flag<["-"], "fno-elide-constructors">, Group<f_Group>,
   HelpText<"Disable C++ copy constructor elision">, Flags<[CC1Option]>;
 def fno_eliminate_unused_debug_symbols : Flag<["-"], "fno-eliminate-unused-debug-symbols">, Group<f_Group>;
-def fno_exceptions : Flag<["-"], "fno-exceptions">, Group<f_Group>;
 def fno_gnu_keywords : Flag<["-"], "fno-gnu-keywords">, Group<f_Group>, Flags<[CC1Option]>;
 def fno_inline_functions : Flag<["-"], "fno-inline-functions">, Group<f_clang_Group>, Flags<[CC1Option]>;
 def fno_inline : Flag<["-"], "fno-inline">, Group<f_clang_Group>, Flags<[CC1Option]>;
+def fno_global_isel : Flag<["-"], "fno-global-isel">, Group<f_clang_Group>,
+  HelpText<"Disables the global instruction selector">;
 def fno_experimental_isel : Flag<["-"], "fno-experimental-isel">, Group<f_clang_Group>,
-  HelpText<"Disables the experimental global instruction selector">;
+  Alias<fno_global_isel>;
 def fno_experimental_new_pass_manager : Flag<["-"], "fno-experimental-new-pass-manager">,
   Group<f_clang_Group>, Flags<[CC1Option]>,
   HelpText<"Disables an experimental new pass manager in LLVM.">;
@@ -1550,13 +1570,7 @@ def fno_operator_names : Flag<["-"], "fno-operator-names">, Group<f_Group>,
   HelpText<"Do not treat C++ operator name keywords as synonyms for operators">,
   Flags<[CC1Option]>;
 def fno_pascal_strings : Flag<["-"], "fno-pascal-strings">, Group<f_Group>;
-def fno_rtti : Flag<["-"], "fno-rtti">, Group<f_Group>, Flags<[CC1Option]>,
-  HelpText<"Disable generation of rtti information">;
-def fno_rtti_data : Flag<["-"], "fno-rtti-data">, Group<f_Group>, Flags<[CC1Option]>,
-  HelpText<"Control emission of RTTI data">;
 def fno_short_enums : Flag<["-"], "fno-short-enums">, Group<f_Group>;
-def fno_show_column : Flag<["-"], "fno-show-column">, Group<f_Group>, Flags<[CC1Option]>,
-  HelpText<"Do not include column number on diagnostics">;
 def fno_show_source_location : Flag<["-"], "fno-show-source-location">, Group<f_Group>,
   Flags<[CC1Option]>, HelpText<"Do not include source location information with diagnostics">;
 def fdiagnostics_absolute_paths : Flag<["-"], "fdiagnostics-absolute-paths">, Group<f_Group>,
@@ -1582,14 +1596,11 @@ def fno_use_cxa_atexit : Flag<["-"], "fno-use-cxa-atexit">, Group<f_Group>, Flag
   HelpText<"Don't use __cxa_atexit for calling destructors">;
 def fno_register_global_dtors_with_atexit : Flag<["-"], "fno-register-global-dtors-with-atexit">, Group<f_Group>,
   HelpText<"Don't use atexit or __cxa_atexit to register global destructors">;
-def fno_use_init_array : Flag<["-"], "fno-use-init-array">, Group<f_Group>, Flags<[CC1Option]>,
-  HelpText<"Don't use .init_array instead of .ctors">;
 def fno_unit_at_a_time : Flag<["-"], "fno-unit-at-a-time">, Group<f_Group>;
 def fno_unwind_tables : Flag<["-"], "fno-unwind-tables">, Group<f_Group>;
-def fno_verbose_asm : Flag<["-"], "fno-verbose-asm">, Group<f_Group>;
+def fno_verbose_asm : Flag<["-"], "fno-verbose-asm">, Group<f_Group>, Flags<[CC1Option]>;
 def fno_working_directory : Flag<["-"], "fno-working-directory">, Group<f_Group>;
 def fno_wrapv : Flag<["-"], "fno-wrapv">, Group<f_Group>;
-def fno_zero_initialized_in_bss : Flag<["-"], "fno-zero-initialized-in-bss">, Group<f_Group>;
 def fobjc_arc : Flag<["-"], "fobjc-arc">, Group<f_Group>, Flags<[CC1Option]>,
   HelpText<"Synthesize retain and release calls for Objective-C pointers">;
 def fno_objc_arc : Flag<["-"], "fno-objc-arc">, Group<f_Group>;
@@ -1690,6 +1701,12 @@ def fopenmp_optimistic_collapse : Flag<["-"], "fopenmp-optimistic-collapse">, Gr
   Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
 def fno_openmp_optimistic_collapse : Flag<["-"], "fno-openmp-optimistic-collapse">, Group<f_Group>,
   Flags<[NoArgumentUnused, HelpHidden]>;
+def fopenmp_cuda_parallel_target_regions : Flag<["-"], "fopenmp-cuda-parallel-target-regions">, Group<f_Group>,
+  Flags<[CC1Option, NoArgumentUnused, HelpHidden]>,
+  HelpText<"Support parallel execution of target regions on Cuda-based devices.">;
+def fno_openmp_cuda_parallel_target_regions : Flag<["-"], "fno-openmp-cuda-parallel-target-regions">, Group<f_Group>,
+  Flags<[NoArgumentUnused, HelpHidden]>,
+  HelpText<"Support only serial execution of target regions on Cuda-based devices.">;
 def static_openmp: Flag<["-"], "static-openmp">,
   HelpText<"Use the static host OpenMP runtime while linking.">;
 def fno_optimize_sibling_calls : Flag<["-"], "fno-optimize-sibling-calls">, Group<f_Group>;
@@ -1719,29 +1736,25 @@ def fpic : Flag<["-"], "fpic">, Group<f_Group>;
 def fno_pic : Flag<["-"], "fno-pic">, Group<f_Group>;
 def fpie : Flag<["-"], "fpie">, Group<f_Group>;
 def fno_pie : Flag<["-"], "fno-pie">, Group<f_Group>;
-def fplt : Flag<["-"], "fplt">, Group<f_Group>, Flags<[CC1Option]>,
-  HelpText<"Use the PLT to make function calls">;
-def fno_plt : Flag<["-"], "fno-plt">, Group<f_Group>, Flags<[CC1Option]>,
-  HelpText<"Do not use the PLT to make function calls">;
-def fropi : Flag<["-"], "fropi">, Group<f_Group>, Flags<[CC1Option]>;
-def fno_ropi : Flag<["-"], "fno-ropi">, Group<f_Group>;
-def frwpi : Flag<["-"], "frwpi">, Group<f_Group>, Flags<[CC1Option]>;
-def fno_rwpi : Flag<["-"], "fno-rwpi">, Group<f_Group>;
+defm plt : OptOutFFlag<"plt", "",
+  "Use GOT indirection instead of PLT to make external function calls (x86 only)">;
+defm ropi : OptInFFlag<"ropi", "Generate read-only position independent code (ARM only)">;
+defm rwpi : OptInFFlag<"rwpi", "Generate read-write position independent code (ARM only)">;
 def fplugin_EQ : Joined<["-"], "fplugin=">, Group<f_Group>, Flags<[DriverOption]>, MetaVarName<"<dsopath>">,
   HelpText<"Load the named plugin (dynamic shared object)">;
 def fpass_plugin_EQ : Joined<["-"], "fpass-plugin=">,
   Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<dsopath>">,
   HelpText<"Load pass plugin from a dynamic shared object file (only with new pass manager).">;
-def fpreserve_as_comments : Flag<["-"], "fpreserve-as-comments">, Group<f_Group>;
-def fno_preserve_as_comments : Flag<["-"], "fno-preserve-as-comments">, Group<f_Group>, Flags<[CC1Option]>,
-  HelpText<"Do not preserve comments in inline assembly">;
+defm preserve_as_comments : OptOutFFlag<"preserve-as-comments", "",
+  "Do not preserve comments in inline assembly">;
 def fprofile_arcs : Flag<["-"], "fprofile-arcs">, Group<f_Group>;
 def fno_profile_arcs : Flag<["-"], "fno-profile-arcs">, Group<f_Group>;
 def framework : Separate<["-"], "framework">, Flags<[LinkerInput]>;
 def frandom_seed_EQ : Joined<["-"], "frandom-seed=">, Group<clang_ignored_f_Group>;
 def freg_struct_return : Flag<["-"], "freg-struct-return">, Group<f_Group>, Flags<[CC1Option]>,
   HelpText<"Override the default ABI to return small structs in registers">;
-def frtti : Flag<["-"], "frtti">, Group<f_Group>;
+defm rtti : OptOutFFlag<"rtti", "", "Disable generation of rtti information">;
+defm rtti_data : OptOutFFlag<"rtti-data", "", "Disable generation of RTTI data">;
 def : Flag<["-"], "fsched-interblock">, Group<clang_ignored_f_Group>;
 def fshort_enums : Flag<["-"], "fshort-enums">, Group<f_Group>, Flags<[CC1Option]>,
   HelpText<"Allocate to an enum type only as many bytes as it needs for the declared range of possible values">;
@@ -1756,17 +1769,19 @@ def fno_short_wchar : Flag<["-"], "fno-short-wchar">, Group<f_Group>,
 def fshow_overloads_EQ : Joined<["-"], "fshow-overloads=">, Group<f_Group>, Flags<[CC1Option]>,
   HelpText<"Which overload candidates to show when overload resolution fails: "
            "best|all; defaults to all">, Values<"best,all">;
-def fshow_column : Flag<["-"], "fshow-column">, Group<f_Group>, Flags<[CC1Option]>;
+defm show_column : OptOutFFlag<"show-column", "", "Do not include column number on diagnostics">;
 def fshow_source_location : Flag<["-"], "fshow-source-location">, Group<f_Group>;
 def fspell_checking : Flag<["-"], "fspell-checking">, Group<f_Group>;
 def fspell_checking_limit_EQ : Joined<["-"], "fspell-checking-limit=">, Group<f_Group>;
 def fsigned_bitfields : Flag<["-"], "fsigned-bitfields">, Group<f_Group>;
-def fsigned_char : Flag<["-"], "fsigned-char">, Group<f_Group>;
-def fno_signed_char : Flag<["-"], "fno-signed-char">, Group<f_Group>,
-    Flags<[CC1Option]>, HelpText<"Char is unsigned">;
+defm signed_char : OptOutFFlag<"signed-char", "char is signed", "char is unsigned">;
 def fsplit_stack : Flag<["-"], "fsplit-stack">, Group<f_Group>;
 def fstack_protector_all : Flag<["-"], "fstack-protector-all">, Group<f_Group>,
   HelpText<"Enable stack protectors for all functions">;
+def fstack_clash_protection : Flag<["-"], "fstack-clash-protection">, Group<f_Group>, Flags<[CC1Option]>,
+  HelpText<"Enable stack clash protection">;
+def fno_stack_clash_protection : Flag<["-"], "fno-stack-clash-protection">, Group<f_Group>,
+  HelpText<"Disable stack clash protection">;
 def fstack_protector_strong : Flag<["-"], "fstack-protector-strong">, Group<f_Group>,
   HelpText<"Enable stack protectors for some functions vulnerable to stack smashing. "
            "Compared to -fstack-protector, this uses a stronger heuristic "
@@ -1784,14 +1799,18 @@ def ftrivial_auto_var_init : Joined<["-"], "ftrivial-auto-var-init=">, Group<f_G
 def enable_trivial_var_init_zero : Flag<["-"], "enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang">,
   Flags<[CC1Option, CoreOption]>,
   HelpText<"Trivial automatic variable initialization to zero is only here for benchmarks, it'll eventually be removed, and I'm OK with that because I'm only using it to benchmark">;
-def fno_ret_protector : Flag<["-"], "fno-ret-protector">, Group<f_Group>,
+def ret_protector : Flag<["-"], "ret-protector">, Flags<[CC1Option]>,
+  HelpText<"Enable Return Protectors">;
+def fno_ret_protector : Flag<["-"], "fno-ret-protector">, Group<f_Group>, Flags<[CoreOption]>,
   HelpText<"Disable return protector">;
-def fret_protector : Flag<["-"], "fret-protector">, Group<f_Group>,
+def fret_protector : Flag<["-"], "fret-protector">, Group<f_Group>, Flags<[CoreOption]>,
   HelpText<"Enable return protector">;
-def fno_fixup_gadgets : Flag<["-"], "fno-fixup-gadgets">, Group<f_Group>,
+def fno_fixup_gadgets : Flag<["-"], "fno-fixup-gadgets">, Group<f_Group>, Flags<[CoreOption]>,
   HelpText<"Disable FixupGadgets pass (x86 only)">;
-def ffixup_gadgets : Flag<["-"], "ffixup-gadgets">, Group<f_Group>,
+def ffixup_gadgets : Flag<["-"], "ffixup-gadgets">, Group<f_Group>, Flags<[CoreOption]>,
   HelpText<"Replace ROP friendly instructions with safe alternatives (x86 only)">;
+def ftrivial_auto_var_init_stop_after : Joined<["-"], "ftrivial-auto-var-init-stop-after=">, Group<f_Group>,
+  Flags<[CC1Option, CoreOption]>, HelpText<"Stop initializing trivial automatic stack variables after the specified number of instances">;
 def fstandalone_debug : Flag<["-"], "fstandalone-debug">, Group<f_Group>, Flags<[CoreOption]>,
   HelpText<"Emit full debug info for all types used by the program">;
 def fno_standalone_debug : Flag<["-"], "fno-standalone-debug">, Group<f_Group>, Flags<[CoreOption]>,
@@ -1839,6 +1858,7 @@ def foptimization_record_passes_EQ : Joined<["-"], "foptimization-record-passes=
   MetaVarName<"<regex>">;
 
 def ftest_coverage : Flag<["-"], "ftest-coverage">, Group<f_Group>;
+def fno_test_coverage : Flag<["-"], "fno-test-coverage">, Group<f_Group>;
 def fvectorize : Flag<["-"], "fvectorize">, Group<f_Group>,
   HelpText<"Enable the loop vectorization passes">;
 def fno_vectorize : Flag<["-"], "fno-vectorize">, Group<f_Group>;
@@ -1887,10 +1907,7 @@ def funroll_loops : Flag<["-"], "funroll-loops">, Group<f_Group>,
   HelpText<"Turn on loop unroller">, Flags<[CC1Option]>;
 def fno_unroll_loops : Flag<["-"], "fno-unroll-loops">, Group<f_Group>,
   HelpText<"Turn off loop unroller">, Flags<[CC1Option]>;
-def freroll_loops : Flag<["-"], "freroll-loops">, Group<f_Group>,
-  HelpText<"Turn on loop reroller">, Flags<[CC1Option]>;
-def fno_reroll_loops : Flag<["-"], "fno-reroll-loops">, Group<f_Group>,
-  HelpText<"Turn off loop reroller">;
+defm reroll_loops : OptInFFlag<"reroll-loops", "Turn on loop reroller">;
 def ftrigraphs : Flag<["-"], "ftrigraphs">, Group<f_Group>,
   HelpText<"Process trigraph sequences">, Flags<[CC1Option]>;
 def fno_trigraphs : Flag<["-"], "fno-trigraphs">, Group<f_Group>,
@@ -1902,10 +1919,10 @@ def funwind_tables : Flag<["-"], "funwind-tables">, Group<f_Group>;
 def fuse_cxa_atexit : Flag<["-"], "fuse-cxa-atexit">, Group<f_Group>;
 def fregister_global_dtors_with_atexit : Flag<["-"], "fregister-global-dtors-with-atexit">, Group<f_Group>, Flags<[CC1Option]>,
   HelpText<"Use atexit or __cxa_atexit to register global destructors">;
-def fuse_init_array : Flag<["-"], "fuse-init-array">, Group<f_Group>, Flags<[CC1Option]>,
-  HelpText<"Use .init_array instead of .ctors">;
+defm use_init_array : OptOutFFlag<"use-init-array", "", "Use .ctors/.dtors instead of .init_array/.fini_array">;
 def fno_var_tracking : Flag<["-"], "fno-var-tracking">, Group<clang_ignored_f_Group>;
-def fverbose_asm : Flag<["-"], "fverbose-asm">, Group<f_Group>;
+def fverbose_asm : Flag<["-"], "fverbose-asm">, Group<f_Group>,
+  HelpText<"Generate verbose assembly output">;
 def dA : Flag<["-"], "dA">, Alias<fverbose_asm>;
 def fvisibility_EQ : Joined<["-"], "fvisibility=">, Group<f_Group>,
   HelpText<"Set the default symbol visibility for all global declarations">, Values<"hidden,default">;
@@ -1917,76 +1934,51 @@ def fvisibility_ms_compat : Flag<["-"], "fvisibility-ms-compat">, Group<f_Group>
            "variables 'hidden' visibility by default">;
 def fvisibility_global_new_delete_hidden : Flag<["-"], "fvisibility-global-new-delete-hidden">, Group<f_Group>,
   HelpText<"Give global C++ operator new and delete declarations hidden visibility">, Flags<[CC1Option]>;
-def fwhole_program_vtables : Flag<["-"], "fwhole-program-vtables">, Group<f_Group>,
-  Flags<[CoreOption, CC1Option]>,
-  HelpText<"Enables whole-program vtable optimization. Requires -flto">;
-def fno_whole_program_vtables : Flag<["-"], "fno-whole-program-vtables">, Group<f_Group>,
-  Flags<[CoreOption]>;
-def fsplit_lto_unit : Flag<["-"], "fsplit-lto-unit">, Group<f_Group>,
-  Flags<[CoreOption, CC1Option]>,
-  HelpText<"Enables splitting of the LTO unit.">;
-def fno_split_lto_unit : Flag<["-"], "fno-split-lto-unit">, Group<f_Group>,
-  Flags<[CoreOption]>;
-def fforce_emit_vtables : Flag<["-"], "fforce-emit-vtables">, Group<f_Group>,
-    Flags<[CC1Option]>,
-    HelpText<"Emits more virtual tables to improve devirtualization">;
-def fno_force_emit_vtables : Flag<["-"], "fno-force-emit-vtables">, Group<f_Group>,
-  Flags<[CoreOption]>;
-
-def fvirtual_function_elimination : Flag<["-"], "fvirtual-function-elimination">, Group<f_Group>,
-  Flags<[CoreOption, CC1Option]>,
-  HelpText<"Enables dead virtual function elimination optimization. Requires -flto=full">;
-def fno_virtual_function_elimination : Flag<["-"], "fno-virtual-function_elimination">, Group<f_Group>,
-  Flags<[CoreOption]>;
+defm whole_program_vtables : OptInFFlag<"whole-program-vtables",
+  "Enables whole-program vtable optimization. Requires -flto", "", "", [CoreOption]>;
+defm split_lto_unit : OptInFFlag<"split-lto-unit",
+  "Enables splitting of the LTO unit", "", "", [CoreOption]>;
+defm force_emit_vtables : OptInFFlag<"force-emit-vtables",
+  "Emits more virtual tables to improve devirtualization", "", "", [CoreOption]>;
+defm virtual_function_elimination : OptInFFlag<"virtual-function-elimination",
+  "Enables dead virtual function elimination optimization. Requires -flto=full", "", "", [CoreOption]>;
 
 def fwrapv : Flag<["-"], "fwrapv">, Group<f_Group>, Flags<[CC1Option]>,
   HelpText<"Treat signed integer overflow as two's complement">;
 def fwritable_strings : Flag<["-"], "fwritable-strings">, Group<f_Group>, Flags<[CC1Option]>,
   HelpText<"Store string literals as writable data">;
-def fzero_initialized_in_bss : Flag<["-"], "fzero-initialized-in-bss">, Group<f_Group>;
-def ffunction_sections : Flag<["-"], "ffunction-sections">, Group<f_Group>,
-  Flags<[CC1Option]>,
-  HelpText<"Place each function in its own section (ELF Only)">;
-def fno_function_sections : Flag<["-"], "fno-function-sections">,
-  Group<f_Group>, Flags<[CC1Option]>;
-def fdata_sections : Flag <["-"], "fdata-sections">, Group<f_Group>,
- Flags<[CC1Option]>, HelpText<"Place each data in its own section (ELF Only)">;
-def fno_data_sections : Flag <["-"], "fno-data-sections">, Group<f_Group>,
-  Flags<[CC1Option]>;
-def fstack_size_section : Flag<["-"], "fstack-size-section">, Group<f_Group>, Flags<[CC1Option]>,
-  HelpText<"Emit section containing metadata on function stack sizes">;
-def fno_stack_size_section : Flag<["-"], "fno-stack-size-section">, Group<f_Group>, Flags<[CC1Option]>,
-  HelpText<"Don't emit section containing metadata on function stack sizes">;
-
-def funique_section_names : Flag <["-"], "funique-section-names">,
-  Group<f_Group>, Flags<[CC1Option]>,
-  HelpText<"Use unique names for text and data sections (ELF Only)">;
-def fno_unique_section_names : Flag <["-"], "fno-unique-section-names">,
-  Group<f_Group>, Flags<[CC1Option]>;
-
-def fstrict_return : Flag<["-"], "fstrict-return">, Group<f_Group>,
-  Flags<[CC1Option]>,
-  HelpText<"Always treat control flow paths that fall off the end of a "
-           "non-void function as unreachable">;
-def fno_strict_return : Flag<["-"], "fno-strict-return">, Group<f_Group>,
-  Flags<[CC1Option]>;
+defm zero_initialized_in_bss : OptOutFFlag<"zero-initialized-in-bss", "", "Don't place zero initialized data in BSS">;
+defm function_sections : OptInFFlag<"function-sections", "Place each function in its own section">;
+def fbasic_block_sections_EQ : Joined<["-"], "fbasic-block-sections=">, Group<f_Group>,
+  Flags<[CC1Option, CC1AsOption]>,
+  HelpText<"Place each function's basic blocks in unique sections (ELF Only) : all | labels | none | list=<file>">,
+  DocBrief<[{Generate labels for each basic block or place each basic block or a subset of basic blocks in its own section.}]>,
+  Values<"all,labels,none,list=">;
+defm data_sections : OptInFFlag<"data-sections", "Place each data in its own section">;
+defm stack_size_section : OptInFFlag<"stack-size-section", "Emit section containing metadata on function stack sizes">;
+
+defm unique_basic_block_section_names : OptInFFlag<"unique-basic-block-section-names",
+ "Use unique names for basic block sections (ELF Only)">;
+defm unique_internal_linkage_names : OptInFFlag<"unique-internal-linkage-names",
+ "Uniqueify Internal Linkage Symbol Names by appending the MD5 hash of the module path">;
+defm unique_section_names : OptOutFFlag<"unique-section-names",
+  "", "Don't use unique names for text and data sections">;
+
+defm strict_return : OptOutFFlag<"strict-return", "",
+  "Don't treat control flow paths that fall off the end of a non-void function as unreachable">;
+
+def fenable_matrix : Flag<["-"], "fenable-matrix">, Group<f_Group>,
+    Flags<[CC1Option]>,
+    HelpText<"Enable matrix data type and related builtin functions">;
 
-def fallow_editor_placeholders : Flag<["-"], "fallow-editor-placeholders">,
-  Group<f_Group>, Flags<[CC1Option]>,
-  HelpText<"Treat editor placeholders as valid source code">;
-def fno_allow_editor_placeholders : Flag<["-"],
-  "fno-allow-editor-placeholders">, Group<f_Group>;
 
 def fdebug_types_section: Flag <["-"], "fdebug-types-section">, Group<f_Group>,
-  Flags<[CC1Option]>, HelpText<"Place debug types in their own section (ELF Only)">;
-def fno_debug_types_section: Flag<["-"], "fno-debug-types-section">, Group<f_Group>,
-  Flags<[CC1Option]>;
-def fdebug_ranges_base_address: Flag <["-"], "fdebug-ranges-base-address">, Group<f_Group>,
-  Flags<[CC1Option]>, HelpText<"Use DWARF base address selection entries in debug_ranges">;
-def fno_debug_ranges_base_address: Flag <["-"], "fno-debug-ranges-base-address">, Group<f_Group>,
-  Flags<[CC1Option]>;
+  HelpText<"Place debug types in their own section (ELF Only)">;
+def fno_debug_types_section: Flag<["-"], "fno-debug-types-section">, Group<f_Group>;
+defm debug_ranges_base_address : OptInFFlag<"debug-ranges-base-address",
+  "Use DWARF base address selection entries in .debug_ranges">;
 def fsplit_dwarf_inlining: Flag <["-"], "fsplit-dwarf-inlining">, Group<f_Group>,
-  Flags<[CC1Option]>, HelpText<"Provide minimal debug info in the object/executable to facilitate online symbolication/stack traces in the absence of .dwo/.dwp files when using Split DWARF">;
+  HelpText<"Provide minimal debug info in the object/executable to facilitate online symbolication/stack traces in the absence of .dwo/.dwp files when using Split DWARF">;
 def fno_split_dwarf_inlining: Flag<["-"], "fno-split-dwarf-inlining">, Group<f_Group>,
   Flags<[CC1Option]>;
 def fdebug_default_version: Joined<["-"], "fdebug-default-version=">, Group<f_Group>,
@@ -1996,15 +1988,12 @@ def fdebug_prefix_map_EQ
     Flags<[CC1Option,CC1AsOption]>,
     HelpText<"remap file source paths in debug info">;
 def ffile_prefix_map_EQ
-  : Joined<["-"], "ffile-prefix-map=">, Group<f_Group>, Flags<[CC1Option]>,
+  : Joined<["-"], "ffile-prefix-map=">, Group<f_Group>,
     HelpText<"remap file source paths in debug info and predefined preprocessor macros">;
 def fmacro_prefix_map_EQ
   : Joined<["-"], "fmacro-prefix-map=">, Group<Preprocessor_Group>, Flags<[CC1Option]>,
     HelpText<"remap file source paths in predefined preprocessor macros">;
-def fforce_dwarf_frame : Flag<["-"], "fforce-dwarf-frame">, Group<f_Group>, Flags<[CC1Option]>,
-    HelpText<"Always emit a debug frame section">;
-def fno_force_dwarf_frame : Flag<["-"], "fno-force-dwarf-frame">, Group<f_Group>, Flags<[CC1Option]>,
-    HelpText<"Don't always emit a debug frame section">;
+defm force_dwarf_frame : OptInFFlag<"force-dwarf-frame", "Always emit a debug frame section">;
 def g_Flag : Flag<["-"], "g">, Group<g_Group>,
   HelpText<"Generate source-level debug information">;
 def gline_tables_only : Flag<["-"], "gline-tables-only">, Group<gN_Group>,
@@ -2063,15 +2052,15 @@ def : Flag<["-"], "gno-record-gcc-switches">, Alias<gno_record_command_line>;
 def gstrict_dwarf : Flag<["-"], "gstrict-dwarf">, Group<g_flags_Group>;
 def gno_strict_dwarf : Flag<["-"], "gno-strict-dwarf">, Group<g_flags_Group>;
 def gcolumn_info : Flag<["-"], "gcolumn-info">, Group<g_flags_Group>, Flags<[CoreOption]>;
-def gno_column_info : Flag<["-"], "gno-column-info">, Group<g_flags_Group>, Flags<[CoreOption]>;
+def gno_column_info : Flag<["-"], "gno-column-info">, Group<g_flags_Group>, Flags<[CoreOption, CC1Option]>;
 def gsplit_dwarf : Flag<["-"], "gsplit-dwarf">, Group<g_flags_Group>;
 def gsplit_dwarf_EQ : Joined<["-"], "gsplit-dwarf=">, Group<g_flags_Group>,
   HelpText<"Set DWARF fission mode to either 'split' or 'single'">,
   Values<"split,single">;
 def ggnu_pubnames : Flag<["-"], "ggnu-pubnames">, Group<g_flags_Group>, Flags<[CC1Option]>;
-def gno_gnu_pubnames : Flag<["-"], "gno-gnu-pubnames">, Group<g_flags_Group>, Flags<[CC1Option]>;
+def gno_gnu_pubnames : Flag<["-"], "gno-gnu-pubnames">, Group<g_flags_Group>;
 def gpubnames : Flag<["-"], "gpubnames">, Group<g_flags_Group>, Flags<[CC1Option]>;
-def gno_pubnames : Flag<["-"], "gno-pubnames">, Group<g_flags_Group>, Flags<[CC1Option]>;
+def gno_pubnames : Flag<["-"], "gno-pubnames">, Group<g_flags_Group>;
 def gdwarf_aranges : Flag<["-"], "gdwarf-aranges">, Group<g_flags_Group>;
 def gmodules : Flag <["-"], "gmodules">, Group<gN_Group>,
   HelpText<"Generate debug info with external references to clang modules"
@@ -2088,6 +2077,10 @@ def gno_embed_source : Flag<["-"], "gno-embed-source">, Group<g_flags_Group>,
 def headerpad__max__install__names : Joined<["-"], "headerpad_max_install_names">;
 def help : Flag<["-", "--"], "help">, Flags<[CC1Option,CC1AsOption]>,
   HelpText<"Display available options">;
+def ibuiltininc : Flag<["-"], "ibuiltininc">,
+  HelpText<"Enable builtin #include directories even when -nostdinc is used "
+           "before or after -ibuiltininc. "
+           "Using -nobuiltininc after the option disables it">;
 def index_header_map : Flag<["-"], "index-header-map">, Flags<[CC1Option]>,
   HelpText<"Make the next included directory (-I or -F) an indexer header map">;
 def idirafter : JoinedOrSeparate<["-"], "idirafter">, Group<clang_i_Group>, Flags<[CC1Option]>,
@@ -2158,13 +2151,19 @@ def mno_iamcu : Flag<["-"], "mno-iamcu">, Group<m_Group>, Flags<[DriverOption, C
 def malign_functions_EQ : Joined<["-"], "malign-functions=">, Group<clang_ignored_m_Group>;
 def malign_loops_EQ : Joined<["-"], "malign-loops=">, Group<clang_ignored_m_Group>;
 def malign_jumps_EQ : Joined<["-"], "malign-jumps=">, Group<clang_ignored_m_Group>;
-def malign_branch_EQ : CommaJoined<["-"], "malign-branch=">, Group<m_Group>;
-def malign_branch_boundary_EQ : Joined<["-"], "malign-branch-boundary=">, Group<m_Group>;
-def malign_branch_prefix_size_EQ : Joined<["-"], "malign-branch-prefix-size=">, Group<m_Group>;
-def mbranches_within_32B_boundaries : Flag<["-"], "mbranches-within-32B-boundaries">, Flags<[DriverOption]>, Group<m_Group>;
+def malign_branch_EQ : CommaJoined<["-"], "malign-branch=">, Group<m_Group>, Flags<[DriverOption]>,
+  HelpText<"Specify types of branches to align">;
+def malign_branch_boundary_EQ : Joined<["-"], "malign-branch-boundary=">, Group<m_Group>, Flags<[DriverOption]>,
+  HelpText<"Specify the boundary's size to align branches">;
+def mpad_max_prefix_size_EQ : Joined<["-"], "mpad-max-prefix-size=">, Group<m_Group>, Flags<[DriverOption]>,
+  HelpText<"Specify maximum number of prefixes to use for padding">;
+def mbranches_within_32B_boundaries : Flag<["-"], "mbranches-within-32B-boundaries">, Flags<[DriverOption]>, Group<m_Group>,
+  HelpText<"Align selected branches (fused, jcc, jmp) within 32-byte boundary">;
 def mfancy_math_387 : Flag<["-"], "mfancy-math-387">, Group<clang_ignored_m_Group>;
 def mlong_calls : Flag<["-"], "mlong-calls">, Group<m_Group>,
   HelpText<"Generate branches with extended addressability, usually via indirect jumps.">;
+def mdouble_EQ : Joined<["-"], "mdouble=">, Group<m_Group>, Values<"32,64">, Flags<[CC1Option]>,
+  HelpText<"Force double to be 32 bits or 64 bits">;
 def LongDouble_Group : OptionGroup<"<LongDouble group>">, Group<m_Group>,
   DocName<"Long double flags">,
   DocBrief<[{Selects the long double implementation}]>;
@@ -2193,7 +2192,7 @@ def mwatchos_simulator_version_min_EQ : Joined<["-"], "mwatchos-simulator-versio
 def mwatchsimulator_version_min_EQ : Joined<["-"], "mwatchsimulator-version-min=">, Alias<mwatchos_simulator_version_min_EQ>;
 def march_EQ : Joined<["-"], "march=">, Group<m_Group>, Flags<[CoreOption]>;
 def masm_EQ : Joined<["-"], "masm=">, Group<m_Group>, Flags<[DriverOption]>;
-def mcmodel_EQ : Joined<["-"], "mcmodel=">, Group<m_Group>;
+def mcmodel_EQ : Joined<["-"], "mcmodel=">, Group<m_Group>, Flags<[CC1Option]>;
 def mtls_size_EQ : Joined<["-"], "mtls-size=">, Group<m_Group>, Flags<[DriverOption, CC1Option]>,
   HelpText<"Specify bit size of immediate TLS offsets (AArch64 ELF only): "
            "12 (for 4KB) | 24 (for 16MB, default) | 32 (for 4GB) | 48 (for 256TB, needs -mcmodel=large)">;
@@ -2287,11 +2286,19 @@ def mlvi_cfi : Flag<["-"], "mlvi-cfi">, Group<m_Group>, Flags<[CoreOption,Driver
   HelpText<"Enable only control-flow mitigations for Load Value Injection (LVI)">;
 def mno_lvi_cfi : Flag<["-"], "mno-lvi-cfi">, Group<m_Group>, Flags<[CoreOption,DriverOption]>,
   HelpText<"Disable control-flow mitigations for Load Value Injection (LVI)">;
+def m_seses : Flag<["-"], "mseses">, Group<m_Group>, Flags<[CoreOption, DriverOption]>,
+  HelpText<"Enable speculative execution side effect suppression (SESES). "
+    "Includes LVI control flow integrity mitigations">;
+def mno_seses : Flag<["-"], "mno-seses">, Group<m_Group>, Flags<[CoreOption, DriverOption]>,
+  HelpText<"Disable speculative execution side effect suppression (SESES)">;
 
 def mrelax : Flag<["-"], "mrelax">, Group<m_riscv_Features_Group>,
   HelpText<"Enable linker relaxation">;
 def mno_relax : Flag<["-"], "mno-relax">, Group<m_riscv_Features_Group>,
   HelpText<"Disable linker relaxation">;
+def msmall_data_limit_EQ : Joined<["-"], "msmall-data-limit=">, Group<m_Group>,
+  Alias<G>,
+  HelpText<"Put global and static data smaller than the limit into a special section">;
 def msave_restore : Flag<["-"], "msave-restore">, Group<m_riscv_Features_Group>,
   HelpText<"Enable using library calls for save and restore">;
 def mno_save_restore : Flag<["-"], "mno-save-restore">, Group<m_riscv_Features_Group>,
@@ -2302,6 +2309,8 @@ def mcmodel_EQ_medlow : Flag<["-"], "mcmodel=medlow">, Group<m_riscv_Features_Gr
 def mcmodel_EQ_medany : Flag<["-"], "mcmodel=medany">, Group<m_riscv_Features_Group>,
   Flags<[CC1Option]>, Alias<mcmodel_EQ>, AliasArgs<["medium"]>,
   HelpText<"Equivalent to -mcmodel=medium, compatible with RISC-V gcc.">;
+def menable_experimental_extensions : Flag<["-"], "menable-experimental-extensions">, Group<m_Group>,
+  HelpText<"Enable use of experimental RISC-V extensions.">;
 
 def munaligned_access : Flag<["-"], "munaligned-access">, Group<m_arm_Features_Group>,
   HelpText<"Allow memory accesses to be unaligned (AArch32/AArch64 only)">;
@@ -2328,6 +2337,9 @@ def mno_neg_immediates: Flag<["-"], "mno-neg-immediates">, Group<m_arm_Features_
 def mcmse : Flag<["-"], "mcmse">, Group<m_arm_Features_Group>,
   Flags<[DriverOption,CC1Option]>,
   HelpText<"Allow use of CMSE (Armv8-M Security Extensions)">;
+def ForceAAPCSBitfieldLoad : Flag<["-"], "fAAPCSBitfieldLoad">, Group<m_arm_Features_Group>,
+  Flags<[DriverOption,CC1Option]>,
+  HelpText<"Follows the AAPCS standard that all volatile bit-field write generates at least one load. (ARM only).">;
 
 def mgeneral_regs_only : Flag<["-"], "mgeneral-regs-only">, Group<m_aarch64_Features_Group>,
   HelpText<"Generate code which only uses the general purpose registers (AArch64 only)">;
@@ -2339,7 +2351,7 @@ def mno_fix_cortex_a53_835769 : Flag<["-"], "mno-fix-cortex-a53-835769">,
   HelpText<"Don't workaround Cortex-A53 erratum 835769 (AArch64 only)">;
 foreach i = {1-31} in
   def ffixed_x#i : Flag<["-"], "ffixed-x"#i>, Group<m_Group>,
-    HelpText<"Reserve the "#i#" register (AArch64/RISC-V only)">;
+    HelpText<"Reserve the x"#i#" register (AArch64/RISC-V only)">;
 
 foreach i = {8-15,18} in
   def fcall_saved_x#i : Flag<["-"], "fcall-saved-x"#i>, Group<m_aarch64_Features_Group>,
@@ -2351,6 +2363,9 @@ def msign_return_address_EQ : Joined<["-"], "msign-return-address=">,
 def mbranch_protection_EQ : Joined<["-"], "mbranch-protection=">,
   HelpText<"Enforce targets of indirect branches and function returns">;
 
+def mharden_sls_EQ : Joined<["-"], "mharden-sls=">,
+  HelpText<"Select straight-line speculation hardening scope">;
+
 def msimd128 : Flag<["-"], "msimd128">, Group<m_wasm_Features_Group>;
 def munimplemented_simd128 : Flag<["-"], "munimplemented-simd128">, Group<m_wasm_Features_Group>;
 def mno_unimplemented_simd128 : Flag<["-"], "mno-unimplemented-simd128">, Group<m_wasm_Features_Group>;
@@ -2373,6 +2388,9 @@ def mtail_call : Flag<["-"], "mtail-call">, Group<m_wasm_Features_Group>;
 def mno_tail_call : Flag<["-"], "mno-tail-call">, Group<m_wasm_Features_Group>;
 def mreference_types : Flag<["-"], "mreference-types">, Group<m_wasm_Features_Group>;
 def mno_reference_types : Flag<["-"], "mno-reference-types">, Group<m_wasm_Features_Group>;
+def mexec_model_EQ : Joined<["-"], "mexec-model=">, Group<m_wasm_Features_Driver_Group>,
+                     Values<"command,reactor">,
+                     HelpText<"Execution model (WebAssembly only)">;
 
 def mamdgpu_debugger_abi : Joined<["-"], "mamdgpu-debugger-abi=">,
   Flags<[HelpHidden]>,
@@ -2407,6 +2425,8 @@ def faltivec : Flag<["-"], "faltivec">, Group<f_Group>, Flags<[DriverOption]>;
 def fno_altivec : Flag<["-"], "fno-altivec">, Group<f_Group>, Flags<[DriverOption]>;
 def maltivec : Flag<["-"], "maltivec">, Group<m_ppc_Features_Group>;
 def mno_altivec : Flag<["-"], "mno-altivec">, Group<m_ppc_Features_Group>;
+def mpcrel: Flag<["-"], "mpcrel">, Group<m_ppc_Features_Group>;
+def mno_pcrel: Flag<["-"], "mno-pcrel">, Group<m_ppc_Features_Group>;
 def mspe : Flag<["-"], "mspe">, Group<m_ppc_Features_Group>;
 def mno_spe : Flag<["-"], "mno-spe">, Group<m_ppc_Features_Group>;
 def mvsx : Flag<["-"], "mvsx">, Group<m_ppc_Features_Group>;
@@ -2420,6 +2440,10 @@ def mpower9_vector : Flag<["-"], "mpower9-vector">,
     Group<m_ppc_Features_Group>;
 def mno_power9_vector : Flag<["-"], "mno-power9-vector">,
     Group<m_ppc_Features_Group>;
+def mpower10_vector : Flag<["-"], "mpower10-vector">,
+    Group<m_ppc_Features_Group>;
+def mno_power10_vector : Flag<["-"], "mno-power10-vector">,
+    Group<m_ppc_Features_Group>;
 def mpower8_crypto : Flag<["-"], "mcrypto">,
     Group<m_ppc_Features_Group>;
 def mnopower8_crypto : Flag<["-"], "mno-crypto">,
@@ -2469,10 +2493,7 @@ def msvr4_struct_return : Flag<["-"], "msvr4-struct-return">,
 def mvx : Flag<["-"], "mvx">, Group<m_Group>;
 def mno_vx : Flag<["-"], "mno-vx">, Group<m_Group>;
 
-def fzvector : Flag<["-"], "fzvector">, Group<f_Group>, Flags<[CC1Option]>,
-  HelpText<"Enable System z vector language extension">;
-def fno_zvector : Flag<["-"], "fno-zvector">, Group<f_Group>,
-  Flags<[CC1Option]>;
+defm zvector : OptInFFlag<"zvector", "Enable System z vector language extension">;
 def mzvector : Flag<["-"], "mzvector">, Alias<fzvector>;
 def mno_zvector : Flag<["-"], "mno-zvector">, Alias<fno_zvector>;
 
@@ -2675,7 +2696,8 @@ def muclibc : Flag<["-"], "muclibc">, Group<m_libc_Group>, Flags<[HelpHidden]>;
 def module_file_info : Flag<["-"], "module-file-info">, Flags<[DriverOption,CC1Option]>, Group<Action_Group>,
   HelpText<"Provide information about a particular module file">;
 def mthumb : Flag<["-"], "mthumb">, Group<m_Group>;
-def mtune_EQ : Joined<["-"], "mtune=">, Group<m_Group>;
+def mtune_EQ : Joined<["-"], "mtune=">, Group<m_Group>,
+  HelpText<"Accepted for compatibility with GCC. Currently has no effect.">;
 def multi__module : Flag<["-"], "multi_module">;
 def multiply__defined__unused : Separate<["-"], "multiply_defined_unused">;
 def multiply__defined : Separate<["-"], "multiply_defined">;
@@ -2688,7 +2710,8 @@ def no_pedantic : Flag<["-", "--"], "no-pedantic">, Group<pedantic_Group>;
 def no__dead__strip__inits__and__terms : Flag<["-"], "no_dead_strip_inits_and_terms">;
 def nobuiltininc : Flag<["-"], "nobuiltininc">, Flags<[CC1Option, CoreOption]>,
   HelpText<"Disable builtin #include directories">;
-def nocudainc : Flag<["-"], "nocudainc">;
+def nogpuinc : Flag<["-"], "nogpuinc">;
+def : Flag<["-"], "nocudainc">, Alias<nogpuinc>;
 def nogpulib : Flag<["-"], "nogpulib">,
   HelpText<"Do not link device library for CUDA/HIP device compilation">;
 def : Flag<["-"], "nocudalib">, Alias<nogpulib>;
@@ -2742,6 +2765,8 @@ def print_resource_dir : Flag<["-", "--"], "print-resource-dir">,
   HelpText<"Print the resource directory pathname">;
 def print_search_dirs : Flag<["-", "--"], "print-search-dirs">,
   HelpText<"Print the paths used for finding libraries and programs">;
+def print_targets : Flag<["-", "--"], "print-targets">,
+  HelpText<"Print the registered targets">;
 def private__bundle : Flag<["-"], "private_bundle">;
 def pthreads : Flag<["-"], "pthreads">;
 def pthread : Flag<["-"], "pthread">, Flags<[CC1Option]>,
@@ -2878,11 +2903,7 @@ def x : JoinedOrSeparate<["-"], "x">, Flags<[DriverOption,CC1Option]>,
   MetaVarName<"<language>">;
 def y : Joined<["-"], "y">;
 
-def fintegrated_as : Flag<["-"], "fintegrated-as">, Flags<[DriverOption]>,
-                     Group<f_Group>, HelpText<"Enable the integrated assembler">;
-def fno_integrated_as : Flag<["-"], "fno-integrated-as">,
-                        Flags<[CC1Option, DriverOption]>, Group<f_Group>,
-                        HelpText<"Disable the integrated assembler">;
+defm integrated_as : OptOutFFlag<"integrated-as", "Enable the integrated assembler", "Disable the integrated assembler">;
 
 def fintegrated_cc1 : Flag<["-"], "fintegrated-cc1">,
                       Flags<[CoreOption, DriverOption]>, Group<f_Group>,
@@ -3027,6 +3048,10 @@ def mv65 : Flag<["-"], "mv65">, Group<m_hexagon_Features_Group>,
   Alias<mcpu_EQ>, AliasArgs<["hexagonv65"]>;
 def mv66 : Flag<["-"], "mv66">, Group<m_hexagon_Features_Group>,
   Alias<mcpu_EQ>, AliasArgs<["hexagonv66"]>;
+def mv67 : Flag<["-"], "mv67">, Group<m_hexagon_Features_Group>,
+  Alias<mcpu_EQ>, AliasArgs<["hexagonv67"]>;
+def mv67t : Flag<["-"], "mv67t">, Group<m_hexagon_Features_Group>,
+  Alias<mcpu_EQ>, AliasArgs<["hexagonv67t"]>;
 def mhexagon_hvx : Flag<["-"], "mhvx">, Group<m_hexagon_Features_HVX_Group>,
   HelpText<"Enable Hexagon Vector eXtensions">;
 def mhexagon_hvx_EQ : Joined<["-"], "mhvx=">,
@@ -3069,6 +3094,12 @@ def m3dnow : Flag<["-"], "m3dnow">, Group<m_x86_Features_Group>;
 def mno_3dnow : Flag<["-"], "mno-3dnow">, Group<m_x86_Features_Group>;
 def m3dnowa : Flag<["-"], "m3dnowa">, Group<m_x86_Features_Group>;
 def mno_3dnowa : Flag<["-"], "mno-3dnowa">, Group<m_x86_Features_Group>;
+def mamx_bf16 : Flag<["-"], "mamx-bf16">, Group<m_x86_Features_Group>;
+def mno_amx_bf16 : Flag<["-"], "mno-amx-bf16">, Group<m_x86_Features_Group>;
+def mtamx_int8 : Flag<["-"], "mamx-int8">, Group<m_x86_Features_Group>;
+def mno_amx_int8 : Flag<["-"], "mno-amx-int8">, Group<m_x86_Features_Group>;
+def mamx_tile : Flag<["-"], "mamx-tile">, Group<m_x86_Features_Group>;
+def mno_amx_tile : Flag<["-"], "mno-amx-tile">, Group<m_x86_Features_Group>;
 def msse : Flag<["-"], "msse">, Group<m_x86_Features_Group>;
 def mno_sse : Flag<["-"], "mno-sse">, Group<m_x86_Features_Group>;
 def msse2 : Flag<["-"], "msse2">, Group<m_x86_Features_Group>;
@@ -3194,12 +3225,16 @@ def mrdseed : Flag<["-"], "mrdseed">, Group<m_x86_Features_Group>;
 def mno_rdseed : Flag<["-"], "mno-rdseed">, Group<m_x86_Features_Group>;
 def msahf : Flag<["-"], "msahf">, Group<m_x86_Features_Group>;
 def mno_sahf : Flag<["-"], "mno-sahf">, Group<m_x86_Features_Group>;
+def mserialize : Flag<["-"], "mserialize">, Group<m_x86_Features_Group>;
+def mno_serialize : Flag<["-"], "mno-serialize">, Group<m_x86_Features_Group>;
 def msgx : Flag<["-"], "msgx">, Group<m_x86_Features_Group>;
 def mno_sgx : Flag<["-"], "mno-sgx">, Group<m_x86_Features_Group>;
 def msha : Flag<["-"], "msha">, Group<m_x86_Features_Group>;
 def mno_sha : Flag<["-"], "mno-sha">, Group<m_x86_Features_Group>;
 def mtbm : Flag<["-"], "mtbm">, Group<m_x86_Features_Group>;
 def mno_tbm : Flag<["-"], "mno-tbm">, Group<m_x86_Features_Group>;
+def mtsxldtrk : Flag<["-"], "mtsxldtrk">, Group<m_x86_Features_Group>;
+def mno_tsxldtrk : Flag<["-"], "mno-tsxldtrk">, Group<m_x86_Features_Group>;
 def mvaes : Flag<["-"], "mvaes">, Group<m_x86_Features_Group>;
 def mno_vaes : Flag<["-"], "mno-vaes">, Group<m_x86_Features_Group>;
 def mvpclmulqdq : Flag<["-"], "mvpclmulqdq">, Group<m_x86_Features_Group>;
@@ -3246,11 +3281,9 @@ def Z_reserved_lib_cckext : Flag<["-"], "Z-reserved-lib-cckext">,
     Flags<[LinkerInput, NoArgumentUnused, Unsupported]>, Group<reserved_lib_Group>;
 
 // Ignored options
-// FIXME: multiclasess produce suffixes, not prefixes. This is fine for now
-// since it is only used in ignored options.
 multiclass BooleanFFlag<string name> {
-  def _f : Flag<["-"], "f"#name>;
-  def _fno : Flag<["-"], "fno-"#name>;
+  def f#NAME : Flag<["-"], "f"#name>;
+  def fno_#NAME : Flag<["-"], "fno-"#name>;
 }
 
 defm : BooleanFFlag<"keep-inline-functions">, Group<clang_ignored_gcc_optimization_f_Group>;
@@ -3300,7 +3333,8 @@ defm inline_small_functions : BooleanFFlag<"inline-small-functions">,
 defm ipa_cp : BooleanFFlag<"ipa-cp">,
     Group<clang_ignored_gcc_optimization_f_Group>;
 defm ivopts : BooleanFFlag<"ivopts">, Group<clang_ignored_gcc_optimization_f_Group>;
-def : Flag<["-"], "fno-semantic-interposition">, Group<clang_ignored_f_Group>;
+def fsemantic_interposition : Flag<["-"], "fsemantic-interposition">, Group<f_Group>, Flags<[CC1Option]>;
+def fno_semantic_interposition: Flag<["-"], "fno-semantic-interposition">, Group<f_Group>, Flags<[CC1Option]>;
 defm non_call_exceptions : BooleanFFlag<"non-call-exceptions">, Group<clang_ignored_f_Group>;
 defm peel_loops : BooleanFFlag<"peel-loops">, Group<clang_ignored_gcc_optimization_f_Group>;
 defm permissive : BooleanFFlag<"permissive">, Group<clang_ignored_f_Group>;
@@ -3327,9 +3361,6 @@ defm strength_reduce :
 defm tls_model : BooleanFFlag<"tls-model">, Group<clang_ignored_f_Group>;
 defm tracer : BooleanFFlag<"tracer">, Group<clang_ignored_gcc_optimization_f_Group>;
 defm tree_dce : BooleanFFlag<"tree-dce">, Group<clang_ignored_gcc_optimization_f_Group>;
-defm tree_loop_im : BooleanFFlag<"tree_loop_im">,  Group<clang_ignored_gcc_optimization_f_Group>;
-defm tree_loop_ivcanon : BooleanFFlag<"tree_loop_ivcanon">,  Group<clang_ignored_gcc_optimization_f_Group>;
-defm tree_loop_linear : BooleanFFlag<"tree_loop_linear">,  Group<clang_ignored_gcc_optimization_f_Group>;
 defm tree_salias : BooleanFFlag<"tree-salias">, Group<clang_ignored_f_Group>;
 defm tree_ter : BooleanFFlag<"tree-ter">, Group<clang_ignored_gcc_optimization_f_Group>;
 defm tree_vectorizer_verbose : BooleanFFlag<"tree-vectorizer-verbose">, Group<clang_ignored_f_Group>;
@@ -3421,7 +3452,1413 @@ defm stack_arrays : BooleanFFlag<"stack-arrays">, Group<gfortran_Group>;
 defm underscoring : BooleanFFlag<"underscoring">, Group<gfortran_Group>;
 defm whole_file : BooleanFFlag<"whole-file">, Group<gfortran_Group>;
 
+// C++ SYCL options
+def fsycl : Flag<["-"], "fsycl">, Group<sycl_Group>, Flags<[CC1Option, CoreOption]>,
+  HelpText<"Enable SYCL kernels compilation for device">;
+def fno_sycl : Flag<["-"], "fno-sycl">, Group<sycl_Group>, Flags<[CoreOption]>,
+  HelpText<"Disable SYCL kernels compilation for device">;
+def sycl_std_EQ : Joined<["-"], "sycl-std=">, Group<sycl_Group>, Flags<[CC1Option, NoArgumentUnused, CoreOption]>,
+  HelpText<"SYCL language standard to compile for.">, Values<"2017, 121, 1.2.1, sycl-1.2.1">;
+
+//===----------------------------------------------------------------------===//
+// CC1 Options
+//===----------------------------------------------------------------------===//
+
+let Flags = [CC1Option, NoDriverOption] in {
+
+//===----------------------------------------------------------------------===//
+// Target Options
+//===----------------------------------------------------------------------===//
+
+let Flags = [CC1Option, CC1AsOption, NoDriverOption] in {
+
+def target_cpu : Separate<["-"], "target-cpu">,
+  HelpText<"Target a specific cpu type">;
+def target_feature : Separate<["-"], "target-feature">,
+  HelpText<"Target specific attributes">;
+def triple : Separate<["-"], "triple">,
+  HelpText<"Specify target triple (e.g. i686-apple-darwin9)">,
+  MarshallingInfoString<"TargetOpts->Triple", "llvm::Triple::normalize(llvm::sys::getDefaultTargetTriple())", "std::string">,
+  AlwaysEmit, Normalizer<"normalizeTriple">, DenormalizeString;
+def target_abi : Separate<["-"], "target-abi">,
+  HelpText<"Target a particular ABI type">;
+def target_sdk_version_EQ : Joined<["-"], "target-sdk-version=">,
+  HelpText<"The version of target SDK used for compilation">;
+
+}
+
+def target_linker_version : Separate<["-"], "target-linker-version">,
+  HelpText<"Target linker version">;
+def triple_EQ : Joined<["-"], "triple=">, Alias<triple>;
+def mfpmath : Separate<["-"], "mfpmath">,
+  HelpText<"Which unit to use for fp math">;
+
+def fpadding_on_unsigned_fixed_point : Flag<["-"], "fpadding-on-unsigned-fixed-point">,
+  HelpText<"Force each unsigned fixed point type to have an extra bit of padding to align their scales with those of signed fixed point types">;
+def fno_padding_on_unsigned_fixed_point : Flag<["-"], "fno-padding-on-unsigned-fixed-point">;
+
+//===----------------------------------------------------------------------===//
+// Analyzer Options
+//===----------------------------------------------------------------------===//
+
+def analysis_UnoptimizedCFG : Flag<["-"], "unoptimized-cfg">,
+  HelpText<"Generate unoptimized CFGs for all analyses">;
+def analysis_CFGAddImplicitDtors : Flag<["-"], "cfg-add-implicit-dtors">,
+  HelpText<"Add C++ implicit destructors to CFGs for all analyses">;
+
+def analyzer_store : Separate<["-"], "analyzer-store">,
+  HelpText<"Source Code Analysis - Abstract Memory Store Models">;
+def analyzer_store_EQ : Joined<["-"], "analyzer-store=">, Alias<analyzer_store>;
+
+def analyzer_constraints : Separate<["-"], "analyzer-constraints">,
+  HelpText<"Source Code Analysis - Symbolic Constraint Engines">;
+def analyzer_constraints_EQ : Joined<["-"], "analyzer-constraints=">,
+  Alias<analyzer_constraints>;
+
+def analyzer_output : Separate<["-"], "analyzer-output">,
+  HelpText<"Source Code Analysis - Output Options">;
+def analyzer_output_EQ : Joined<["-"], "analyzer-output=">,
+  Alias<analyzer_output>;
+
+def analyzer_purge : Separate<["-"], "analyzer-purge">,
+  HelpText<"Source Code Analysis - Dead Symbol Removal Frequency">;
+def analyzer_purge_EQ : Joined<["-"], "analyzer-purge=">, Alias<analyzer_purge>;
+
+def analyzer_opt_analyze_headers : Flag<["-"], "analyzer-opt-analyze-headers">,
+  HelpText<"Force the static analyzer to analyze functions defined in header files">;
+def analyzer_opt_analyze_nested_blocks : Flag<["-"], "analyzer-opt-analyze-nested-blocks">,
+  HelpText<"Analyze the definitions of blocks in addition to functions">;
+def analyzer_display_progress : Flag<["-"], "analyzer-display-progress">,
+  HelpText<"Emit verbose output about the analyzer's progress">;
+def analyze_function : Separate<["-"], "analyze-function">,
+  HelpText<"Run analysis on specific function (for C++ include parameters in name)">;
+def analyze_function_EQ : Joined<["-"], "analyze-function=">, Alias<analyze_function>;
+def trim_egraph : Flag<["-"], "trim-egraph">,
+  HelpText<"Only show error-related paths in the analysis graph">;
+def analyzer_viz_egraph_graphviz : Flag<["-"], "analyzer-viz-egraph-graphviz">,
+  HelpText<"Display exploded graph using GraphViz">;
+def analyzer_dump_egraph : Separate<["-"], "analyzer-dump-egraph">,
+  HelpText<"Dump exploded graph to the specified file">;
+def analyzer_dump_egraph_EQ : Joined<["-"], "analyzer-dump-egraph=">, Alias<analyzer_dump_egraph>;
+
+def analyzer_inline_max_stack_depth : Separate<["-"], "analyzer-inline-max-stack-depth">,
+  HelpText<"Bound on stack depth while inlining (4 by default)">;
+def analyzer_inline_max_stack_depth_EQ : Joined<["-"], "analyzer-inline-max-stack-depth=">,
+  Alias<analyzer_inline_max_stack_depth>;
+
+def analyzer_inlining_mode : Separate<["-"], "analyzer-inlining-mode">,
+  HelpText<"Specify the function selection heuristic used during inlining">;
+def analyzer_inlining_mode_EQ : Joined<["-"], "analyzer-inlining-mode=">, Alias<analyzer_inlining_mode>;
+
+def analyzer_disable_retry_exhausted : Flag<["-"], "analyzer-disable-retry-exhausted">,
+  HelpText<"Do not re-analyze paths leading to exhausted nodes with a different strategy (may decrease code coverage)">;
+
+def analyzer_max_loop : Separate<["-"], "analyzer-max-loop">,
+  HelpText<"The maximum number of times the analyzer will go through a loop">;
+def analyzer_stats : Flag<["-"], "analyzer-stats">,
+  HelpText<"Print internal analyzer statistics.">;
+
+def analyzer_checker : Separate<["-"], "analyzer-checker">,
+  HelpText<"Choose analyzer checkers to enable">,
+  ValuesCode<[{
+    const char *Values =
+    #define GET_CHECKERS
+    #define CHECKER(FULLNAME, CLASS, HT, DOC_URI, IS_HIDDEN)  FULLNAME ","
+    #include "clang/StaticAnalyzer/Checkers/Checkers.inc"
+    #undef GET_CHECKERS
+    #define GET_PACKAGES
+    #define PACKAGE(FULLNAME)  FULLNAME ","
+    #include "clang/StaticAnalyzer/Checkers/Checkers.inc"
+    #undef GET_PACKAGES
+    ;
+  }]>;
+def analyzer_checker_EQ : Joined<["-"], "analyzer-checker=">,
+  Alias<analyzer_checker>;
+
+def analyzer_disable_checker : Separate<["-"], "analyzer-disable-checker">,
+  HelpText<"Choose analyzer checkers to disable">;
+def analyzer_disable_checker_EQ : Joined<["-"], "analyzer-disable-checker=">,
+  Alias<analyzer_disable_checker>;
+
+def analyzer_disable_all_checks : Flag<["-"], "analyzer-disable-all-checks">,
+  HelpText<"Disable all static analyzer checks">;
+
+def analyzer_checker_help : Flag<["-"], "analyzer-checker-help">,
+  HelpText<"Display the list of analyzer checkers that are available">;
+
+def analyzer_checker_help_alpha : Flag<["-"], "analyzer-checker-help-alpha">,
+  HelpText<"Display the list of in development analyzer checkers. These "
+           "are NOT considered safe, they are unstable and will emit incorrect "
+           "reports. Enable ONLY FOR DEVELOPMENT purposes">;
+
+def analyzer_checker_help_developer : Flag<["-"], "analyzer-checker-help-developer">,
+  HelpText<"Display the list of developer-only checkers such as modeling "
+           "and debug checkers">;
+
+def analyzer_config_help : Flag<["-"], "analyzer-config-help">,
+  HelpText<"Display the list of -analyzer-config options. These are meant for "
+           "development purposes only!">;
+
+def analyzer_list_enabled_checkers : Flag<["-"], "analyzer-list-enabled-checkers">,
+  HelpText<"Display the list of enabled analyzer checkers">;
 
-include "CC1Options.td"
+def analyzer_config : Separate<["-"], "analyzer-config">,
+  HelpText<"Choose analyzer options to enable">;
 
-include "CLCompatOptions.td"
+def analyzer_checker_option_help : Flag<["-"], "analyzer-checker-option-help">,
+  HelpText<"Display the list of checker and package options">;
+
+def analyzer_checker_option_help_alpha : Flag<["-"], "analyzer-checker-option-help-alpha">,
+  HelpText<"Display the list of in development checker and package options. "
+           "These are NOT considered safe, they are unstable and will emit "
+           "incorrect reports. Enable ONLY FOR DEVELOPMENT purposes">;
+
+def analyzer_checker_option_help_developer : Flag<["-"], "analyzer-checker-option-help-developer">,
+  HelpText<"Display the list of checker and package options meant for "
+           "development purposes only">;
+
+def analyzer_config_compatibility_mode : Separate<["-"], "analyzer-config-compatibility-mode">,
+  HelpText<"Don't emit errors on invalid analyzer-config inputs">;
+
+def analyzer_config_compatibility_mode_EQ : Joined<["-"], "analyzer-config-compatibility-mode=">,
+  Alias<analyzer_config_compatibility_mode>;
+
+def analyzer_werror : Flag<["-"], "analyzer-werror">,
+  HelpText<"Emit analyzer results as errors rather than warnings">;
+
+//===----------------------------------------------------------------------===//
+// Migrator Options
+//===----------------------------------------------------------------------===//
+def migrator_no_nsalloc_error : Flag<["-"], "no-ns-alloc-error">,
+  HelpText<"Do not error on use of NSAllocateCollectable/NSReallocateCollectable">;
+
+def migrator_no_finalize_removal : Flag<["-"], "no-finalize-removal">,
+  HelpText<"Do not remove finalize method in gc mode">;
+
+//===----------------------------------------------------------------------===//
+// CodeGen Options
+//===----------------------------------------------------------------------===//
+
+let Flags = [CC1Option, CC1AsOption, NoDriverOption] in {
+def debug_info_kind_EQ : Joined<["-"], "debug-info-kind=">;
+def debug_info_macro : Flag<["-"], "debug-info-macro">,
+  HelpText<"Emit macro debug information">;
+def default_function_attr : Separate<["-"], "default-function-attr">,
+  HelpText<"Apply given attribute to all functions">;
+def dwarf_version_EQ : Joined<["-"], "dwarf-version=">;
+def debugger_tuning_EQ : Joined<["-"], "debugger-tuning=">;
+def dwarf_debug_flags : Separate<["-"], "dwarf-debug-flags">,
+  HelpText<"The string to embed in the Dwarf debug flags record.">;
+def record_command_line : Separate<["-"], "record-command-line">,
+  HelpText<"The string to embed in the .LLVM.command.line section.">;
+def compress_debug_sections : Flag<["-", "--"], "compress-debug-sections">,
+    HelpText<"DWARF debug sections compression">;
+def compress_debug_sections_EQ : Joined<["-", "--"], "compress-debug-sections=">,
+    HelpText<"DWARF debug sections compression type">;
+def mno_exec_stack : Flag<["-"], "mnoexecstack">,
+  HelpText<"Mark the file as not needing an executable stack">;
+def massembler_no_warn : Flag<["-"], "massembler-no-warn">,
+  HelpText<"Make assembler not emit warnings">;
+def massembler_fatal_warnings : Flag<["-"], "massembler-fatal-warnings">,
+  HelpText<"Make assembler warnings fatal">;
+def mrelax_relocations : Flag<["--"], "mrelax-relocations">,
+    HelpText<"Use relaxable elf relocations">;
+def msave_temp_labels : Flag<["-"], "msave-temp-labels">,
+  HelpText<"Save temporary labels in the symbol table. "
+           "Note this may change .s semantics and shouldn't generally be used "
+           "on compiler-generated code.">;
+def mrelocation_model : Separate<["-"], "mrelocation-model">,
+  HelpText<"The relocation model to use">, Values<"static,pic,ropi,rwpi,ropi-rwpi,dynamic-no-pic">,
+  NormalizedValuesScope<"llvm::Reloc">,
+  NormalizedValues<["Static", "PIC_", "ROPI", "RWPI", "ROPI_RWPI", "DynamicNoPIC"]>,
+  MarshallingInfoString<"CodeGenOpts.RelocationModel", "PIC_", "Model">,
+  AutoNormalizeEnum;
+def fno_math_builtin : Flag<["-"], "fno-math-builtin">,
+  HelpText<"Disable implicit builtin knowledge of math functions">;
+}
+
+def disable_llvm_verifier : Flag<["-"], "disable-llvm-verifier">,
+  HelpText<"Don't run the LLVM IR verifier pass">;
+def disable_llvm_passes : Flag<["-"], "disable-llvm-passes">,
+  HelpText<"Use together with -emit-llvm to get pristine LLVM IR from the "
+           "frontend by not running any LLVM passes at all">;
+def disable_llvm_optzns : Flag<["-"], "disable-llvm-optzns">,
+  Alias<disable_llvm_passes>;
+def disable_lifetimemarkers : Flag<["-"], "disable-lifetime-markers">,
+  HelpText<"Disable lifetime-markers emission even when optimizations are "
+           "enabled">;
+def disable_O0_optnone : Flag<["-"], "disable-O0-optnone">,
+  HelpText<"Disable adding the optnone attribute to functions at O0">;
+def disable_red_zone : Flag<["-"], "disable-red-zone">,
+  HelpText<"Do not emit code that uses the red zone.">;
+def dwarf_ext_refs : Flag<["-"], "dwarf-ext-refs">,
+  HelpText<"Generate debug info with external references to clang modules"
+           " or precompiled headers">;
+def dwarf_explicit_import : Flag<["-"], "dwarf-explicit-import">,
+  HelpText<"Generate explicit import from anonymous namespace to containing"
+           " scope">;
+def debug_forward_template_params : Flag<["-"], "debug-forward-template-params">,
+  HelpText<"Emit complete descriptions of template parameters in forward"
+           " declarations">;
+def fforbid_guard_variables : Flag<["-"], "fforbid-guard-variables">,
+  HelpText<"Emit an error if a C++ static local initializer would need a guard variable">;
+def no_implicit_float : Flag<["-"], "no-implicit-float">,
+  HelpText<"Don't generate implicit floating point instructions">;
+def fdump_vtable_layouts : Flag<["-"], "fdump-vtable-layouts">,
+  HelpText<"Dump the layouts of all vtables that will be emitted in a translation unit">;
+def fmerge_functions : Flag<["-"], "fmerge-functions">,
+  HelpText<"Permit merging of identical functions when optimizing.">;
+def femit_coverage_notes : Flag<["-"], "femit-coverage-notes">,
+  HelpText<"Emit a gcov coverage notes file when compiling.">;
+def femit_coverage_data: Flag<["-"], "femit-coverage-data">,
+  HelpText<"Instrument the program to emit gcov coverage data when run.">;
+def coverage_data_file : Separate<["-"], "coverage-data-file">,
+  HelpText<"Emit coverage data to this filename.">;
+def coverage_data_file_EQ : Joined<["-"], "coverage-data-file=">,
+  Alias<coverage_data_file>;
+def coverage_notes_file : Separate<["-"], "coverage-notes-file">,
+  HelpText<"Emit coverage notes to this filename.">;
+def coverage_notes_file_EQ : Joined<["-"], "coverage-notes-file=">,
+  Alias<coverage_notes_file>;
+def coverage_version_EQ : Joined<["-"], "coverage-version=">,
+  HelpText<"Four-byte version string for gcov files.">;
+def test_coverage : Flag<["-"], "test-coverage">,
+  HelpText<"Do not generate coverage files or remove coverage changes from IR">;
+def dump_coverage_mapping : Flag<["-"], "dump-coverage-mapping">,
+  HelpText<"Dump the coverage mapping records, for testing">;
+def fuse_register_sized_bitfield_access: Flag<["-"], "fuse-register-sized-bitfield-access">,
+  HelpText<"Use register sized accesses to bit-fields, when possible.">;
+def relaxed_aliasing : Flag<["-"], "relaxed-aliasing">,
+  HelpText<"Turn off Type Based Alias Analysis">;
+def no_struct_path_tbaa : Flag<["-"], "no-struct-path-tbaa">,
+  HelpText<"Turn off struct-path aware Type Based Alias Analysis">;
+def new_struct_path_tbaa : Flag<["-"], "new-struct-path-tbaa">,
+  HelpText<"Enable enhanced struct-path aware Type Based Alias Analysis">;
+def mdebug_pass : Separate<["-"], "mdebug-pass">,
+  HelpText<"Enable additional debug output">;
+def mframe_pointer_EQ : Joined<["-"], "mframe-pointer=">,
+  HelpText<"Specify which frame pointers to retain (all, non-leaf, none).">, Values<"all,non-leaf,none">;
+def mdisable_tail_calls : Flag<["-"], "mdisable-tail-calls">,
+  HelpText<"Disable tail call optimization, keeping the call stack accurate">;
+def menable_no_infinities : Flag<["-"], "menable-no-infs">,
+  HelpText<"Allow optimization to assume there are no infinities.">;
+def menable_no_nans : Flag<["-"], "menable-no-nans">,
+  HelpText<"Allow optimization to assume there are no NaNs.">;
+def menable_unsafe_fp_math : Flag<["-"], "menable-unsafe-fp-math">,
+  HelpText<"Allow unsafe floating-point math optimizations which may decrease "
+           "precision">;
+def mreassociate : Flag<["-"], "mreassociate">,
+  HelpText<"Allow reassociation transformations for floating-point instructions">;
+def mabi_EQ_ieeelongdouble : Flag<["-"], "mabi=ieeelongdouble">,
+  HelpText<"Use IEEE 754 quadruple-precision for long double">;
+def mfloat_abi : Separate<["-"], "mfloat-abi">,
+  HelpText<"The float ABI to use">;
+def mtp : Separate<["-"], "mtp">,
+  HelpText<"Mode for reading thread pointer">;
+def mlimit_float_precision : Separate<["-"], "mlimit-float-precision">,
+  HelpText<"Limit float precision to the given value">;
+def split_stacks : Flag<["-"], "split-stacks">,
+  HelpText<"Try to use a split stack if possible.">;
+def mregparm : Separate<["-"], "mregparm">,
+  HelpText<"Limit the number of registers available for integer arguments">;
+def msmall_data_limit : Separate<["-"], "msmall-data-limit">,
+  HelpText<"Put global and static data smaller than the limit into a special section">;
+def munwind_tables : Flag<["-"], "munwind-tables">,
+  HelpText<"Generate unwinding tables for all functions">;
+def mconstructor_aliases : Flag<["-"], "mconstructor-aliases">,
+  HelpText<"Emit complete constructors and destructors as aliases when possible">;
+def mlink_bitcode_file : Separate<["-"], "mlink-bitcode-file">,
+  HelpText<"Link the given bitcode file before performing optimizations.">;
+def mlink_builtin_bitcode : Separate<["-"], "mlink-builtin-bitcode">,
+  HelpText<"Link and internalize needed symbols from the given bitcode file "
+           "before performing optimizations.">;
+def mlink_cuda_bitcode : Separate<["-"], "mlink-cuda-bitcode">,
+  Alias<mlink_builtin_bitcode>;
+def vectorize_loops : Flag<["-"], "vectorize-loops">,
+  HelpText<"Run the Loop vectorization passes">;
+def vectorize_slp : Flag<["-"], "vectorize-slp">,
+  HelpText<"Run the SLP vectorization passes">;
+def dependent_lib : Joined<["--"], "dependent-lib=">,
+  HelpText<"Add dependent library">;
+def linker_option : Joined<["--"], "linker-option=">,
+  HelpText<"Add linker option">;
+def fsanitize_coverage_type : Joined<["-"], "fsanitize-coverage-type=">,
+                              HelpText<"Sanitizer coverage type">;
+def fsanitize_coverage_indirect_calls
+    : Flag<["-"], "fsanitize-coverage-indirect-calls">,
+      HelpText<"Enable sanitizer coverage for indirect calls">;
+def fsanitize_coverage_trace_bb
+    : Flag<["-"], "fsanitize-coverage-trace-bb">,
+      HelpText<"Enable basic block tracing in sanitizer coverage">;
+def fsanitize_coverage_trace_cmp
+    : Flag<["-"], "fsanitize-coverage-trace-cmp">,
+      HelpText<"Enable cmp instruction tracing in sanitizer coverage">;
+def fsanitize_coverage_trace_div
+    : Flag<["-"], "fsanitize-coverage-trace-div">,
+      HelpText<"Enable div instruction tracing in sanitizer coverage">;
+def fsanitize_coverage_trace_gep
+    : Flag<["-"], "fsanitize-coverage-trace-gep">,
+      HelpText<"Enable gep instruction tracing in sanitizer coverage">;
+def fsanitize_coverage_8bit_counters
+    : Flag<["-"], "fsanitize-coverage-8bit-counters">,
+      HelpText<"Enable frequency counters in sanitizer coverage">;
+def fsanitize_coverage_inline_8bit_counters
+    : Flag<["-"], "fsanitize-coverage-inline-8bit-counters">,
+      HelpText<"Enable inline 8-bit counters in sanitizer coverage">;
+def fsanitize_coverage_inline_bool_flag
+    : Flag<["-"], "fsanitize-coverage-inline-bool-flag">,
+      HelpText<"Enable inline bool flag in sanitizer coverage">;
+def fsanitize_coverage_pc_table
+    : Flag<["-"], "fsanitize-coverage-pc-table">,
+      HelpText<"Create a table of coverage-instrumented PCs">;
+def fsanitize_coverage_trace_pc
+    : Flag<["-"], "fsanitize-coverage-trace-pc">,
+      HelpText<"Enable PC tracing in sanitizer coverage">;
+def fsanitize_coverage_trace_pc_guard
+    : Flag<["-"], "fsanitize-coverage-trace-pc-guard">,
+      HelpText<"Enable PC tracing with guard in sanitizer coverage">;
+def fsanitize_coverage_no_prune
+    : Flag<["-"], "fsanitize-coverage-no-prune">,
+      HelpText<"Disable coverage pruning (i.e. instrument all blocks/edges)">;
+def fsanitize_coverage_stack_depth
+    : Flag<["-"], "fsanitize-coverage-stack-depth">,
+      HelpText<"Enable max stack depth tracing">;
+def fpatchable_function_entry_offset_EQ
+    : Joined<["-"], "fpatchable-function-entry-offset=">, MetaVarName<"<M>">,
+      HelpText<"Generate M NOPs before function entry">;
+def fprofile_instrument_EQ : Joined<["-"], "fprofile-instrument=">,
+    HelpText<"Enable PGO instrumentation. The accepted value is clang, llvm, "
+             "or none">, Values<"none,clang,llvm">;
+def fprofile_instrument_path_EQ : Joined<["-"], "fprofile-instrument-path=">,
+    HelpText<"Generate instrumented code to collect execution counts into "
+             "<file> (overridden by LLVM_PROFILE_FILE env var)">;
+def fprofile_instrument_use_path_EQ :
+    Joined<["-"], "fprofile-instrument-use-path=">,
+    HelpText<"Specify the profile path in PGO use compilation">;
+def flto_visibility_public_std:
+    Flag<["-"], "flto-visibility-public-std">,
+    HelpText<"Use public LTO visibility for classes in std and stdext namespaces">;
+def flto_unit: Flag<["-"], "flto-unit">,
+    HelpText<"Emit IR to support LTO unit features (CFI, whole program vtable opt)">;
+def fno_lto_unit: Flag<["-"], "fno-lto-unit">;
+def fdebug_pass_manager : Flag<["-"], "fdebug-pass-manager">,
+    HelpText<"Prints debug information for the new pass manager">;
+def fno_debug_pass_manager : Flag<["-"], "fno-debug-pass-manager">,
+    HelpText<"Disables debug printing for the new pass manager">;
+// The driver option takes the key as a parameter to the -msign-return-address=
+// and -mbranch-protection= options, but CC1 has a separate option so we
+// don't have to parse the parameter twice.
+def msign_return_address_key_EQ : Joined<["-"], "msign-return-address-key=">,
+    Values<"a_key,b_key">;
+def mbranch_target_enforce : Flag<["-"], "mbranch-target-enforce">;
+def fno_dllexport_inlines : Flag<["-"], "fno-dllexport-inlines">;
+def cfguard_no_checks : Flag<["-"], "cfguard-no-checks">,
+    HelpText<"Emit Windows Control Flow Guard tables only (no checks)">;
+def cfguard : Flag<["-"], "cfguard">,
+    HelpText<"Emit Windows Control Flow Guard tables and checks">;
+
+def fdenormal_fp_math_f32_EQ : Joined<["-"], "fdenormal-fp-math-f32=">,
+   Group<f_Group>;
+
+//===----------------------------------------------------------------------===//
+// Dependency Output Options
+//===----------------------------------------------------------------------===//
+
+def sys_header_deps : Flag<["-"], "sys-header-deps">,
+  HelpText<"Include system headers in dependency output">;
+def module_file_deps : Flag<["-"], "module-file-deps">,
+  HelpText<"Include module files in dependency output">;
+def header_include_file : Separate<["-"], "header-include-file">,
+  HelpText<"Filename (or -) to write header include output to">;
+def show_includes : Flag<["--"], "show-includes">,
+  HelpText<"Print cl.exe style /showIncludes to stdout">;
+
+//===----------------------------------------------------------------------===//
+// Diagnostic Options
+//===----------------------------------------------------------------------===//
+
+def diagnostic_log_file : Separate<["-"], "diagnostic-log-file">,
+  HelpText<"Filename (or -) to log diagnostics to">;
+def diagnostic_serialized_file : Separate<["-"], "serialize-diagnostic-file">,
+  MetaVarName<"<filename>">,
+  HelpText<"File for serializing diagnostics in a binary format">;
+
+def fdiagnostics_format : Separate<["-"], "fdiagnostics-format">,
+  HelpText<"Change diagnostic formatting to match IDE and command line tools">, Values<"clang,msvc,msvc-fallback,vi">;
+def fdiagnostics_show_category : Separate<["-"], "fdiagnostics-show-category">,
+  HelpText<"Print diagnostic category">, Values<"none,id,name">;
+def fno_diagnostics_use_presumed_location : Flag<["-"], "fno-diagnostics-use-presumed-location">,
+  HelpText<"Ignore #line directives when displaying diagnostic locations">;
+def ftabstop : Separate<["-"], "ftabstop">, MetaVarName<"<N>">,
+  HelpText<"Set the tab stop distance.">;
+def ferror_limit : Separate<["-"], "ferror-limit">, MetaVarName<"<N>">,
+  HelpText<"Set the maximum number of errors to emit before stopping (0 = no limit).">;
+def fmacro_backtrace_limit : Separate<["-"], "fmacro-backtrace-limit">, MetaVarName<"<N>">,
+  HelpText<"Set the maximum number of entries to print in a macro expansion backtrace (0 = no limit).">;
+def ftemplate_backtrace_limit : Separate<["-"], "ftemplate-backtrace-limit">, MetaVarName<"<N>">,
+  HelpText<"Set the maximum number of entries to print in a template instantiation backtrace (0 = no limit).">;
+def fconstexpr_backtrace_limit : Separate<["-"], "fconstexpr-backtrace-limit">, MetaVarName<"<N>">,
+  HelpText<"Set the maximum number of entries to print in a constexpr evaluation backtrace (0 = no limit).">;
+def fspell_checking_limit : Separate<["-"], "fspell-checking-limit">, MetaVarName<"<N>">,
+  HelpText<"Set the maximum number of times to perform spell checking on unrecognized identifiers (0 = no limit).">;
+def fcaret_diagnostics_max_lines :
+  Separate<["-"], "fcaret-diagnostics-max-lines">, MetaVarName<"<N>">,
+  HelpText<"Set the maximum number of source lines to show in a caret diagnostic">;
+def verify_EQ : CommaJoined<["-"], "verify=">,
+  MetaVarName<"<prefixes>">,
+  HelpText<"Verify diagnostic output using comment directives that start with"
+           " prefixes in the comma-separated sequence <prefixes>">;
+def verify : Flag<["-"], "verify">,
+  HelpText<"Equivalent to -verify=expected">;
+def verify_ignore_unexpected : Flag<["-"], "verify-ignore-unexpected">,
+  HelpText<"Ignore unexpected diagnostic messages">;
+def verify_ignore_unexpected_EQ : CommaJoined<["-"], "verify-ignore-unexpected=">,
+  HelpText<"Ignore unexpected diagnostic messages">;
+def Wno_rewrite_macros : Flag<["-"], "Wno-rewrite-macros">,
+  HelpText<"Silence ObjC rewriting warnings">;
+
+//===----------------------------------------------------------------------===//
+// Frontend Options
+//===----------------------------------------------------------------------===//
+
+// This isn't normally used, it is just here so we can parse a
+// CompilerInvocation out of a driver-derived argument vector.
+def cc1 : Flag<["-"], "cc1">;
+def cc1as : Flag<["-"], "cc1as">;
+
+def ast_merge : Separate<["-"], "ast-merge">,
+  MetaVarName<"<ast file>">,
+  HelpText<"Merge the given AST file into the translation unit being compiled.">;
+def aux_target_cpu : Separate<["-"], "aux-target-cpu">,
+  HelpText<"Target a specific auxiliary cpu type">;
+def aux_target_feature : Separate<["-"], "aux-target-feature">,
+  HelpText<"Target specific auxiliary attributes">;
+def aux_triple : Separate<["-"], "aux-triple">,
+  HelpText<"Auxiliary target triple.">;
+def code_completion_at : Separate<["-"], "code-completion-at">,
+  MetaVarName<"<file>:<line>:<column>">,
+  HelpText<"Dump code-completion information at a location">;
+def remap_file : Separate<["-"], "remap-file">,
+  MetaVarName<"<from>;<to>">,
+  HelpText<"Replace the contents of the <from> file with the contents of the <to> file">;
+def code_completion_at_EQ : Joined<["-"], "code-completion-at=">,
+  Alias<code_completion_at>;
+def code_completion_macros : Flag<["-"], "code-completion-macros">,
+  HelpText<"Include macros in code-completion results">;
+def code_completion_patterns : Flag<["-"], "code-completion-patterns">,
+  HelpText<"Include code patterns in code-completion results">;
+def no_code_completion_globals : Flag<["-"], "no-code-completion-globals">,
+  HelpText<"Do not include global declarations in code-completion results.">;
+def no_code_completion_ns_level_decls : Flag<["-"], "no-code-completion-ns-level-decls">,
+  HelpText<"Do not include declarations inside namespaces (incl. global namespace) in the code-completion results.">;
+def code_completion_brief_comments : Flag<["-"], "code-completion-brief-comments">,
+  HelpText<"Include brief documentation comments in code-completion results.">;
+def code_completion_with_fixits : Flag<["-"], "code-completion-with-fixits">,
+  HelpText<"Include code completion results which require small fix-its.">;
+def disable_free : Flag<["-"], "disable-free">,
+  HelpText<"Disable freeing of memory on exit">;
+def discard_value_names : Flag<["-"], "discard-value-names">,
+  HelpText<"Discard value names in LLVM IR">;
+def load : Separate<["-"], "load">, MetaVarName<"<dsopath>">,
+  HelpText<"Load the named plugin (dynamic shared object)">;
+def plugin : Separate<["-"], "plugin">, MetaVarName<"<name>">,
+  HelpText<"Use the named plugin action instead of the default action (use \"help\" to list available options)">;
+def plugin_arg : JoinedAndSeparate<["-"], "plugin-arg-">,
+    MetaVarName<"<name> <arg>">,
+    HelpText<"Pass <arg> to plugin <name>">;
+def add_plugin : Separate<["-"], "add-plugin">, MetaVarName<"<name>">,
+  HelpText<"Use the named plugin action in addition to the default action">;
+def ast_dump_filter : Separate<["-"], "ast-dump-filter">,
+  MetaVarName<"<dump_filter>">,
+  HelpText<"Use with -ast-dump or -ast-print to dump/print only AST declaration"
+           " nodes having a certain substring in a qualified name. Use"
+           " -ast-list to list all filterable declaration node names.">;
+def fno_modules_global_index : Flag<["-"], "fno-modules-global-index">,
+  HelpText<"Do not automatically generate or update the global module index">;
+def fno_modules_error_recovery : Flag<["-"], "fno-modules-error-recovery">,
+  HelpText<"Do not automatically import modules for error recovery">;
+def fmodule_map_file_home_is_cwd : Flag<["-"], "fmodule-map-file-home-is-cwd">,
+  HelpText<"Use the current working directory as the home directory of "
+           "module maps specified by -fmodule-map-file=<FILE>">;
+def fmodule_feature : Separate<["-"], "fmodule-feature">,
+  MetaVarName<"<feature>">,
+  HelpText<"Enable <feature> in module map requires declarations">;
+def fmodules_embed_file_EQ : Joined<["-"], "fmodules-embed-file=">,
+  MetaVarName<"<file>">,
+  HelpText<"Embed the contents of the specified file into the module file "
+           "being compiled.">;
+def fmodules_embed_all_files : Joined<["-"], "fmodules-embed-all-files">,
+  HelpText<"Embed the contents of all files read by this compilation into "
+           "the produced module file.">;
+def fmodules_local_submodule_visibility :
+  Flag<["-"], "fmodules-local-submodule-visibility">,
+  HelpText<"Enforce name visibility rules across submodules of the same "
+           "top-level module.">;
+def fmodules_codegen :
+  Flag<["-"], "fmodules-codegen">,
+  HelpText<"Generate code for uses of this module that assumes an explicit "
+           "object file will be built for the module">;
+def fmodules_debuginfo :
+  Flag<["-"], "fmodules-debuginfo">,
+  HelpText<"Generate debug info for types in an object file built from this "
+           "module and do not generate them elsewhere">;
+def fmodule_format_EQ : Joined<["-"], "fmodule-format=">,
+  HelpText<"Select the container format for clang modules and PCH. "
+           "Supported options are 'raw' and 'obj'.">;
+def ftest_module_file_extension_EQ :
+  Joined<["-"], "ftest-module-file-extension=">,
+  HelpText<"introduce a module file extension for testing purposes. "
+           "The argument is parsed as blockname:major:minor:hashed:user info">;
+def fconcepts_ts : Flag<["-"], "fconcepts-ts">,
+  HelpText<"Enable C++ Extensions for Concepts. (deprecated - use -std=c++2a)">;
+def fno_concept_satisfaction_caching : Flag<["-"],
+                                            "fno-concept-satisfaction-caching">,
+  HelpText<"Disable satisfaction caching for C++2a Concepts.">;
+
+def frecovery_ast : Flag<["-"], "frecovery-ast">,
+  HelpText<"Preserve expressions in AST rather than dropping them when "
+           "encountering semantic errors">;
+def fno_recovery_ast : Flag<["-"], "fno-recovery-ast">;
+def frecovery_ast_type : Flag<["-"], "frecovery-ast-type">,
+  HelpText<"Preserve the type for recovery expressions when possible "
+          "(experimental)">;
+def fno_recovery_ast_type : Flag<["-"], "fno-recovery-ast-type">;
+
+let Group = Action_Group in {
+
+def Eonly : Flag<["-"], "Eonly">,
+  HelpText<"Just run preprocessor, no output (for timings)">;
+def dump_raw_tokens : Flag<["-"], "dump-raw-tokens">,
+  HelpText<"Lex file in raw mode and dump raw tokens">;
+def analyze : Flag<["-"], "analyze">,
+  HelpText<"Run static analysis engine">;
+def dump_tokens : Flag<["-"], "dump-tokens">,
+  HelpText<"Run preprocessor, dump internal rep of tokens">;
+def init_only : Flag<["-"], "init-only">,
+  HelpText<"Only execute frontend initialization">;
+def fixit : Flag<["-"], "fixit">,
+  HelpText<"Apply fix-it advice to the input source">;
+def fixit_EQ : Joined<["-"], "fixit=">,
+  HelpText<"Apply fix-it advice creating a file with the given suffix">;
+def print_preamble : Flag<["-"], "print-preamble">,
+  HelpText<"Print the \"preamble\" of a file, which is a candidate for implicit"
+           " precompiled headers.">;
+def emit_html : Flag<["-"], "emit-html">,
+  HelpText<"Output input source as HTML">;
+def ast_print : Flag<["-"], "ast-print">,
+  HelpText<"Build ASTs and then pretty-print them">;
+def ast_list : Flag<["-"], "ast-list">,
+  HelpText<"Build ASTs and print the list of declaration node qualified names">;
+def ast_dump : Flag<["-"], "ast-dump">,
+  HelpText<"Build ASTs and then debug dump them">;
+def ast_dump_EQ : Joined<["-"], "ast-dump=">,
+  HelpText<"Build ASTs and then debug dump them in the specified format. "
+           "Supported formats include: default, json">;
+def ast_dump_all : Flag<["-"], "ast-dump-all">,
+  HelpText<"Build ASTs and then debug dump them, forcing deserialization">;
+def ast_dump_all_EQ : Joined<["-"], "ast-dump-all=">,
+  HelpText<"Build ASTs and then debug dump them in the specified format, "
+           "forcing deserialization. Supported formats include: default, json">;
+def ast_dump_decl_types : Flag<["-"], "ast-dump-decl-types">,
+  HelpText<"Include declaration types in AST dumps">;
+def templight_dump : Flag<["-"], "templight-dump">,
+  HelpText<"Dump templight information to stdout">;
+def ast_dump_lookups : Flag<["-"], "ast-dump-lookups">,
+  HelpText<"Build ASTs and then debug dump their name lookup tables">;
+def ast_view : Flag<["-"], "ast-view">,
+  HelpText<"Build ASTs and view them with GraphViz">;
+def emit_module : Flag<["-"], "emit-module">,
+  HelpText<"Generate pre-compiled module file from a module map">;
+def emit_module_interface : Flag<["-"], "emit-module-interface">,
+  HelpText<"Generate pre-compiled module file from a C++ module interface">;
+def emit_header_module : Flag<["-"], "emit-header-module">,
+  HelpText<"Generate pre-compiled module file from a set of header files">;
+def emit_pch : Flag<["-"], "emit-pch">,
+  HelpText<"Generate pre-compiled header file">;
+def emit_llvm_bc : Flag<["-"], "emit-llvm-bc">,
+  HelpText<"Build ASTs then convert to LLVM, emit .bc file">;
+def emit_llvm_only : Flag<["-"], "emit-llvm-only">,
+  HelpText<"Build ASTs and convert to LLVM, discarding output">;
+def emit_codegen_only : Flag<["-"], "emit-codegen-only">,
+  HelpText<"Generate machine code, but discard output">;
+def emit_obj : Flag<["-"], "emit-obj">,
+  HelpText<"Emit native object files">;
+def rewrite_test : Flag<["-"], "rewrite-test">,
+  HelpText<"Rewriter playground">;
+def rewrite_macros : Flag<["-"], "rewrite-macros">,
+  HelpText<"Expand macros without full preprocessing">;
+def migrate : Flag<["-"], "migrate">,
+  HelpText<"Migrate source code">;
+def compiler_options_dump : Flag<["-"], "compiler-options-dump">,
+  HelpText<"Dump the compiler configuration options">;
+def print_dependency_directives_minimized_source : Flag<["-"],
+  "print-dependency-directives-minimized-source">,
+  HelpText<"Print the output of the dependency directives source minimizer">;
+}
+
+def emit_llvm_uselists : Flag<["-"], "emit-llvm-uselists">,
+  HelpText<"Preserve order of LLVM use-lists when serializing">;
+def no_emit_llvm_uselists : Flag<["-"], "no-emit-llvm-uselists">,
+  HelpText<"Don't preserve order of LLVM use-lists when serializing">;
+
+def mt_migrate_directory : Separate<["-"], "mt-migrate-directory">,
+  HelpText<"Directory for temporary files produced during ARC or ObjC migration">;
+def arcmt_check : Flag<["-"], "arcmt-check">,
+  HelpText<"Check for ARC migration issues that need manual handling">;
+def arcmt_modify : Flag<["-"], "arcmt-modify">,
+  HelpText<"Apply modifications to files to conform to ARC">;
+def arcmt_migrate : Flag<["-"], "arcmt-migrate">,
+  HelpText<"Apply modifications and produces temporary files that conform to ARC">;
+
+def opt_record_file : Separate<["-"], "opt-record-file">,
+  HelpText<"File name to use for YAML optimization record output">;
+def opt_record_passes : Separate<["-"], "opt-record-passes">,
+  HelpText<"Only record remark information for passes whose names match the given regular expression">;
+def opt_record_format : Separate<["-"], "opt-record-format">,
+  HelpText<"The format used for serializing remarks (default: YAML)">;
+
+def print_stats : Flag<["-"], "print-stats">,
+  HelpText<"Print performance metrics and statistics">;
+def stats_file : Joined<["-"], "stats-file=">,
+  HelpText<"Filename to write statistics to">;
+def fdump_record_layouts : Flag<["-"], "fdump-record-layouts">,
+  HelpText<"Dump record layout information">;
+def fdump_record_layouts_simple : Flag<["-"], "fdump-record-layouts-simple">,
+  HelpText<"Dump record layout information in a simple form used for testing">;
+def fix_what_you_can : Flag<["-"], "fix-what-you-can">,
+  HelpText<"Apply fix-it advice even in the presence of unfixable errors">;
+def fix_only_warnings : Flag<["-"], "fix-only-warnings">,
+  HelpText<"Apply fix-it advice only for warnings, not errors">;
+def fixit_recompile : Flag<["-"], "fixit-recompile">,
+  HelpText<"Apply fix-it changes and recompile">;
+def fixit_to_temp : Flag<["-"], "fixit-to-temporary">,
+  HelpText<"Apply fix-it changes to temporary files">;
+
+def foverride_record_layout_EQ : Joined<["-"], "foverride-record-layout=">,
+  HelpText<"Override record layouts with those in the given file">;
+def pch_through_header_EQ : Joined<["-"], "pch-through-header=">,
+  HelpText<"Stop PCH generation after including this file.  When using a PCH, "
+           "skip tokens until after this file is included.">;
+def pch_through_hdrstop_create : Flag<["-"], "pch-through-hdrstop-create">,
+  HelpText<"When creating a PCH, stop PCH generation after #pragma hdrstop.">;
+def pch_through_hdrstop_use : Flag<["-"], "pch-through-hdrstop-use">,
+  HelpText<"When using a PCH, skip tokens until after a #pragma hdrstop.">;
+def fno_pch_timestamp : Flag<["-"], "fno-pch-timestamp">,
+  HelpText<"Disable inclusion of timestamp in precompiled headers">;
+def building_pch_with_obj : Flag<["-"], "building-pch-with-obj">,
+  HelpText<"This compilation is part of building a PCH with corresponding object file.">;
+
+def aligned_alloc_unavailable : Flag<["-"], "faligned-alloc-unavailable">,
+  HelpText<"Aligned allocation/deallocation functions are unavailable">;
+
+//===----------------------------------------------------------------------===//
+// Language Options
+//===----------------------------------------------------------------------===//
+
+let Flags = [CC1Option, CC1AsOption, NoDriverOption] in {
+
+def version : Flag<["-"], "version">,
+  HelpText<"Print the compiler version">;
+def main_file_name : Separate<["-"], "main-file-name">,
+  HelpText<"Main file name to use for debug info and source if missing">;
+def split_dwarf_output : Separate<["-"], "split-dwarf-output">,
+  HelpText<"File name to use for split dwarf debug info output">;
+
+}
+
+def fblocks_runtime_optional : Flag<["-"], "fblocks-runtime-optional">,
+  HelpText<"Weakly link in the blocks runtime">;
+def fexternc_nounwind : Flag<["-"], "fexternc-nounwind">,
+  HelpText<"Assume all functions with C linkage do not unwind">;
+def split_dwarf_file : Separate<["-"], "split-dwarf-file">,
+  HelpText<"Name of the split dwarf debug info file to encode in the object file">;
+def fno_wchar : Flag<["-"], "fno-wchar">,
+  HelpText<"Disable C++ builtin type wchar_t">;
+def fconstant_string_class : Separate<["-"], "fconstant-string-class">,
+  MetaVarName<"<class name>">,
+  HelpText<"Specify the class to use for constant Objective-C string objects.">;
+def fobjc_arc_cxxlib_EQ : Joined<["-"], "fobjc-arc-cxxlib=">,
+  HelpText<"Objective-C++ Automatic Reference Counting standard library kind">, Values<"libc++,libstdc++,none">;
+def fobjc_runtime_has_weak : Flag<["-"], "fobjc-runtime-has-weak">,
+  HelpText<"The target Objective-C runtime supports ARC weak operations">;
+def fobjc_dispatch_method_EQ : Joined<["-"], "fobjc-dispatch-method=">,
+  HelpText<"Objective-C dispatch method to use">, Values<"legacy,non-legacy,mixed">;
+def disable_objc_default_synthesize_properties : Flag<["-"], "disable-objc-default-synthesize-properties">,
+  HelpText<"disable the default synthesis of Objective-C properties">;
+def fencode_extended_block_signature : Flag<["-"], "fencode-extended-block-signature">,
+  HelpText<"enable extended encoding of block type signature">;
+def function_alignment : Separate<["-"], "function-alignment">,
+    HelpText<"default alignment for functions">;
+def pic_level : Separate<["-"], "pic-level">,
+  HelpText<"Value for __PIC__">;
+def pic_is_pie : Flag<["-"], "pic-is-pie">,
+  HelpText<"File is for a position independent executable">;
+def fno_validate_pch : Flag<["-"], "fno-validate-pch">,
+  HelpText<"Disable validation of precompiled headers">;
+def fallow_pch_with_errors : Flag<["-"], "fallow-pch-with-compiler-errors">,
+  HelpText<"Accept a PCH file that was created with compiler errors">;
+def dump_deserialized_pch_decls : Flag<["-"], "dump-deserialized-decls">,
+  HelpText<"Dump declarations that are deserialized from PCH, for testing">;
+def error_on_deserialized_pch_decl : Separate<["-"], "error-on-deserialized-decl">,
+  HelpText<"Emit error if a specific declaration is deserialized from PCH, for testing">;
+def error_on_deserialized_pch_decl_EQ : Joined<["-"], "error-on-deserialized-decl=">,
+  Alias<error_on_deserialized_pch_decl>;
+def static_define : Flag<["-"], "static-define">,
+  HelpText<"Should __STATIC__ be defined">;
+def stack_protector : Separate<["-"], "stack-protector">,
+  HelpText<"Enable stack protectors">;
+def stack_protector_buffer_size : Separate<["-"], "stack-protector-buffer-size">,
+  HelpText<"Lower bound for a buffer to be considered for stack protection">;
+def fvisibility : Separate<["-"], "fvisibility">,
+  HelpText<"Default type and symbol visibility">;
+def ftype_visibility : Separate<["-"], "ftype-visibility">,
+  HelpText<"Default type visibility">;
+def fapply_global_visibility_to_externs : Flag<["-"], "fapply-global-visibility-to-externs">,
+  HelpText<"Apply global symbol visibility to external declarations without an explicit visibility">;
+def ftemplate_depth : Separate<["-"], "ftemplate-depth">,
+  HelpText<"Maximum depth of recursive template instantiation">;
+def foperator_arrow_depth : Separate<["-"], "foperator-arrow-depth">,
+  HelpText<"Maximum number of 'operator->'s to call for a member access">;
+def fconstexpr_depth : Separate<["-"], "fconstexpr-depth">,
+  HelpText<"Maximum depth of recursive constexpr function calls">;
+def fconstexpr_steps : Separate<["-"], "fconstexpr-steps">,
+  HelpText<"Maximum number of steps in constexpr function evaluation">;
+def fbracket_depth : Separate<["-"], "fbracket-depth">,
+  HelpText<"Maximum nesting level for parentheses, brackets, and braces">;
+def fconst_strings : Flag<["-"], "fconst-strings">,
+  HelpText<"Use a const qualified type for string literals in C and ObjC">;
+def fno_const_strings : Flag<["-"], "fno-const-strings">,
+  HelpText<"Don't use a const qualified type for string literals in C and ObjC">;
+def fno_bitfield_type_align : Flag<["-"], "fno-bitfield-type-align">,
+  HelpText<"Ignore bit-field types when aligning structures">;
+def ffake_address_space_map : Flag<["-"], "ffake-address-space-map">,
+  HelpText<"Use a fake address space map; OpenCL testing purposes only">;
+def faddress_space_map_mangling_EQ : Joined<["-"], "faddress-space-map-mangling=">, MetaVarName<"<yes|no|target>">,
+  HelpText<"Set the mode for address space map based mangling; OpenCL testing purposes only">;
+def funknown_anytype : Flag<["-"], "funknown-anytype">,
+  HelpText<"Enable parser support for the __unknown_anytype type; for testing purposes only">;
+def fdebugger_support : Flag<["-"], "fdebugger-support">,
+  HelpText<"Enable special debugger support behavior">;
+def fdebugger_cast_result_to_id : Flag<["-"], "fdebugger-cast-result-to-id">,
+  HelpText<"Enable casting unknown expression results to id">;
+def fdebugger_objc_literal : Flag<["-"], "fdebugger-objc-literal">,
+  HelpText<"Enable special debugger support for Objective-C subscripting and literals">;
+def fdeprecated_macro : Flag<["-"], "fdeprecated-macro">,
+  HelpText<"Defines the __DEPRECATED macro">;
+def fno_deprecated_macro : Flag<["-"], "fno-deprecated-macro">,
+  HelpText<"Undefines the __DEPRECATED macro">;
+def fobjc_subscripting_legacy_runtime : Flag<["-"], "fobjc-subscripting-legacy-runtime">,
+  HelpText<"Allow Objective-C array and dictionary subscripting in legacy runtime">;
+def vtordisp_mode_EQ : Joined<["-"], "vtordisp-mode=">,
+  HelpText<"Control vtordisp placement on win32 targets">;
+def fnative_half_type: Flag<["-"], "fnative-half-type">,
+  HelpText<"Use the native half type for __fp16 instead of promoting to float">;
+def fnative_half_arguments_and_returns : Flag<["-"], "fnative-half-arguments-and-returns">,
+  HelpText<"Use the native __fp16 type for arguments and returns (and skip ABI-specific lowering)">;
+def fallow_half_arguments_and_returns : Flag<["-"], "fallow-half-arguments-and-returns">,
+  HelpText<"Allow function arguments and returns of type half">;
+def fdefault_calling_conv_EQ : Joined<["-"], "fdefault-calling-conv=">,
+  HelpText<"Set default calling convention">, Values<"cdecl,fastcall,stdcall,vectorcall,regcall">;
+def finclude_default_header : Flag<["-"], "finclude-default-header">,
+  HelpText<"Include default header file for OpenCL">;
+def fdeclare_opencl_builtins : Flag<["-"], "fdeclare-opencl-builtins">,
+  HelpText<"Add OpenCL builtin function declarations (experimental)">;
+def fpreserve_vec3_type : Flag<["-"], "fpreserve-vec3-type">,
+  HelpText<"Preserve 3-component vector type">;
+def fwchar_type_EQ : Joined<["-"], "fwchar-type=">,
+  HelpText<"Select underlying type for wchar_t">, Values<"char,short,int">;
+def fsigned_wchar : Flag<["-"], "fsigned-wchar">,
+  HelpText<"Use a signed type for wchar_t">;
+def fno_signed_wchar : Flag<["-"], "fno-signed-wchar">,
+  HelpText<"Use an unsigned type for wchar_t">;
+def fcompatibility_qualified_id_block_param_type_checking : Flag<["-"], "fcompatibility-qualified-id-block-type-checking">,
+  HelpText<"Allow using blocks with parameters of more specific type than "
+           "the type system guarantees when a parameter is qualified id">;
+
+// FIXME: Remove these entirely once functionality/tests have been excised.
+def fobjc_gc_only : Flag<["-"], "fobjc-gc-only">, Group<f_Group>,
+  HelpText<"Use GC exclusively for Objective-C related memory management">;
+def fobjc_gc : Flag<["-"], "fobjc-gc">, Group<f_Group>,
+  HelpText<"Enable Objective-C garbage collection">;
+
+//===----------------------------------------------------------------------===//
+// Header Search Options
+//===----------------------------------------------------------------------===//
+
+def nostdsysteminc : Flag<["-"], "nostdsysteminc">,
+  HelpText<"Disable standard system #include directories">;
+def fdisable_module_hash : Flag<["-"], "fdisable-module-hash">,
+  HelpText<"Disable the module hash">;
+def fmodules_hash_content : Flag<["-"], "fmodules-hash-content">,
+  HelpText<"Enable hashing the content of a module file">;
+def fmodules_strict_context_hash : Flag<["-"], "fmodules-strict-context-hash">,
+  HelpText<"Enable hashing of all compiler options that could impact the "
+           "semantics of a module in an implicit build">,
+  MarshallingInfoFlag<"HeaderSearchOpts->ModulesStrictContextHash", "false">;
+def c_isystem : JoinedOrSeparate<["-"], "c-isystem">, MetaVarName<"<directory>">,
+  HelpText<"Add directory to the C SYSTEM include search path">;
+def objc_isystem : JoinedOrSeparate<["-"], "objc-isystem">,
+  MetaVarName<"<directory>">,
+  HelpText<"Add directory to the ObjC SYSTEM include search path">;
+def objcxx_isystem : JoinedOrSeparate<["-"], "objcxx-isystem">,
+  MetaVarName<"<directory>">,
+  HelpText<"Add directory to the ObjC++ SYSTEM include search path">;
+def internal_isystem : JoinedOrSeparate<["-"], "internal-isystem">,
+  MetaVarName<"<directory>">,
+  HelpText<"Add directory to the internal system include search path; these "
+           "are assumed to not be user-provided and are used to model system "
+           "and standard headers' paths.">;
+def internal_externc_isystem : JoinedOrSeparate<["-"], "internal-externc-isystem">,
+  MetaVarName<"<directory>">,
+  HelpText<"Add directory to the internal system include search path with "
+           "implicit extern \"C\" semantics; these are assumed to not be "
+           "user-provided and are used to model system and standard headers' "
+           "paths.">;
+
+//===----------------------------------------------------------------------===//
+// Preprocessor Options
+//===----------------------------------------------------------------------===//
+
+def chain_include : Separate<["-"], "chain-include">, MetaVarName<"<file>">,
+  HelpText<"Include and chain a header file after turning it into PCH">;
+def preamble_bytes_EQ : Joined<["-"], "preamble-bytes=">,
+  HelpText<"Assume that the precompiled header is a precompiled preamble "
+           "covering the first N bytes of the main file">;
+def detailed_preprocessing_record : Flag<["-"], "detailed-preprocessing-record">,
+  HelpText<"include a detailed record of preprocessing actions">;
+def setup_static_analyzer : Flag<["-"], "setup-static-analyzer">,
+  HelpText<"Set up preprocessor for static analyzer (done automatically when static analyzer is run).">;
+def disable_pragma_debug_crash : Flag<["-"], "disable-pragma-debug-crash">,
+  HelpText<"Disable any #pragma clang __debug that can lead to crashing behavior. This is meant for testing.">;
+
+//===----------------------------------------------------------------------===//
+// OpenCL Options
+//===----------------------------------------------------------------------===//
+
+def cl_ext_EQ : CommaJoined<["-"], "cl-ext=">,
+  HelpText<"OpenCL only. Enable or disable OpenCL extensions. The argument is a comma-separated sequence of one or more extension names, each prefixed by '+' or '-'.">;
+
+//===----------------------------------------------------------------------===//
+// CUDA Options
+//===----------------------------------------------------------------------===//
+
+def fcuda_is_device : Flag<["-"], "fcuda-is-device">,
+  HelpText<"Generate code for CUDA device">;
+def fcuda_include_gpubinary : Separate<["-"], "fcuda-include-gpubinary">,
+  HelpText<"Incorporate CUDA device-side binary into host object file.">;
+def fcuda_allow_variadic_functions : Flag<["-"], "fcuda-allow-variadic-functions">,
+  HelpText<"Allow variadic functions in CUDA device code.">;
+def fno_cuda_host_device_constexpr : Flag<["-"], "fno-cuda-host-device-constexpr">,
+  HelpText<"Don't treat unattributed constexpr functions as __host__ __device__.">;
+
+//===----------------------------------------------------------------------===//
+// OpenMP Options
+//===----------------------------------------------------------------------===//
+
+def fopenmp_is_device : Flag<["-"], "fopenmp-is-device">,
+  HelpText<"Generate code only for an OpenMP target device.">;
+def fopenmp_host_ir_file_path : Separate<["-"], "fopenmp-host-ir-file-path">,
+  HelpText<"Path to the IR file produced by the frontend for the host.">;
+
+//===----------------------------------------------------------------------===//
+// SYCL Options
+//===----------------------------------------------------------------------===//
+
+def fsycl_is_device : Flag<["-"], "fsycl-is-device">,
+  HelpText<"Generate code for SYCL device.">;
+
+} // let Flags = [CC1Option]
+
+//===----------------------------------------------------------------------===//
+// cc1as-only Options
+//===----------------------------------------------------------------------===//
+
+let Flags = [CC1AsOption, NoDriverOption] in {
+
+// Language Options
+def n : Flag<["-"], "n">,
+  HelpText<"Don't automatically start assembly file with a text section">;
+
+// Frontend Options
+def filetype : Separate<["-"], "filetype">,
+    HelpText<"Specify the output file type ('asm', 'null', or 'obj')">;
+
+// Transliterate Options
+def output_asm_variant : Separate<["-"], "output-asm-variant">,
+    HelpText<"Select the asm variant index to use for output">;
+def show_encoding : Flag<["-"], "show-encoding">,
+    HelpText<"Show instruction encoding information in transliterate mode">;
+def show_inst : Flag<["-"], "show-inst">,
+    HelpText<"Show internal instruction representation in transliterate mode">;
+
+// Assemble Options
+def dwarf_debug_producer : Separate<["-"], "dwarf-debug-producer">,
+  HelpText<"The string to embed in the Dwarf debug AT_producer record.">;
+
+def defsym : Separate<["-"], "defsym">,
+  HelpText<"Define a value for a symbol">;
+
+} // let Flags = [CC1AsOption]
+
+//===----------------------------------------------------------------------===//
+// clang-cl Options
+//===----------------------------------------------------------------------===//
+
+def cl_Group : OptionGroup<"<clang-cl options>">, Flags<[CLOption]>,
+  HelpText<"CL.EXE COMPATIBILITY OPTIONS">;
+
+def cl_compile_Group : OptionGroup<"<clang-cl compile-only options>">,
+  Group<cl_Group>;
+
+def cl_ignored_Group : OptionGroup<"<clang-cl ignored options>">,
+  Group<cl_Group>;
+
+class CLFlag<string name> : Option<["/", "-"], name, KIND_FLAG>,
+  Group<cl_Group>, Flags<[CLOption, DriverOption]>;
+
+class CLCompileFlag<string name> : Option<["/", "-"], name, KIND_FLAG>,
+  Group<cl_compile_Group>, Flags<[CLOption, DriverOption]>;
+
+class CLIgnoredFlag<string name> : Option<["/", "-"], name, KIND_FLAG>,
+  Group<cl_ignored_Group>, Flags<[CLOption, DriverOption]>;
+
+class CLJoined<string name> : Option<["/", "-"], name, KIND_JOINED>,
+  Group<cl_Group>, Flags<[CLOption, DriverOption]>;
+
+class CLCompileJoined<string name> : Option<["/", "-"], name, KIND_JOINED>,
+  Group<cl_compile_Group>, Flags<[CLOption, DriverOption]>;
+
+class CLIgnoredJoined<string name> : Option<["/", "-"], name, KIND_JOINED>,
+  Group<cl_ignored_Group>, Flags<[CLOption, DriverOption, HelpHidden]>;
+
+class CLJoinedOrSeparate<string name> : Option<["/", "-"], name,
+  KIND_JOINED_OR_SEPARATE>, Group<cl_Group>, Flags<[CLOption, DriverOption]>;
+
+class CLCompileJoinedOrSeparate<string name> : Option<["/", "-"], name,
+  KIND_JOINED_OR_SEPARATE>, Group<cl_compile_Group>,
+  Flags<[CLOption, DriverOption]>;
+
+class CLRemainingArgsJoined<string name> : Option<["/", "-"], name,
+  KIND_REMAINING_ARGS_JOINED>, Group<cl_Group>, Flags<[CLOption, DriverOption]>;
+
+// Aliases:
+// (We don't put any of these in cl_compile_Group as the options they alias are
+// already in the right group.)
+
+def _SLASH_Brepro : CLFlag<"Brepro">,
+  HelpText<"Do not write current time into COFF output (breaks link.exe /incremental)">,
+  Alias<mno_incremental_linker_compatible>;
+def _SLASH_Brepro_ : CLFlag<"Brepro-">,
+  HelpText<"Write current time into COFF output (default)">,
+  Alias<mincremental_linker_compatible>;
+def _SLASH_C : CLFlag<"C">,
+  HelpText<"Do not discard comments when preprocessing">, Alias<C>;
+def _SLASH_c : CLFlag<"c">, HelpText<"Compile only">, Alias<c>;
+def _SLASH_d1PP : CLFlag<"d1PP">,
+  HelpText<"Retain macro definitions in /E mode">, Alias<dD>;
+def _SLASH_d1reportAllClassLayout : CLFlag<"d1reportAllClassLayout">,
+  HelpText<"Dump record layout information">,
+  Alias<Xclang>, AliasArgs<["-fdump-record-layouts"]>;
+def _SLASH_diagnostics_caret : CLFlag<"diagnostics:caret">,
+  HelpText<"Enable caret and column diagnostics (default)">;
+def _SLASH_diagnostics_column : CLFlag<"diagnostics:column">,
+  HelpText<"Disable caret diagnostics but keep column info">;
+def _SLASH_diagnostics_classic : CLFlag<"diagnostics:classic">,
+  HelpText<"Disable column and caret diagnostics">;
+def _SLASH_D : CLJoinedOrSeparate<"D">, HelpText<"Define macro">,
+  MetaVarName<"<macro[=value]>">, Alias<D>;
+def _SLASH_E : CLFlag<"E">, HelpText<"Preprocess to stdout">, Alias<E>;
+def _SLASH_fp_except : CLFlag<"fp:except">, HelpText<"">, Alias<ftrapping_math>;
+def _SLASH_fp_except_ : CLFlag<"fp:except-">,
+  HelpText<"">, Alias<fno_trapping_math>;
+def _SLASH_fp_fast : CLFlag<"fp:fast">, HelpText<"">, Alias<ffast_math>;
+def _SLASH_fp_precise : CLFlag<"fp:precise">,
+  HelpText<"">, Alias<fno_fast_math>;
+def _SLASH_fp_strict : CLFlag<"fp:strict">, HelpText<"">, Alias<fno_fast_math>;
+def _SLASH_GA : CLFlag<"GA">, Alias<ftlsmodel_EQ>, AliasArgs<["local-exec"]>,
+  HelpText<"Assume thread-local variables are defined in the executable">;
+def _SLASH_GR : CLFlag<"GR">, HelpText<"Emit RTTI data (default)">;
+def _SLASH_GR_ : CLFlag<"GR-">, HelpText<"Do not emit RTTI data">;
+def _SLASH_GF : CLIgnoredFlag<"GF">,
+  HelpText<"Enable string pooling (default)">;
+def _SLASH_GF_ : CLFlag<"GF-">, HelpText<"Disable string pooling">,
+  Alias<fwritable_strings>;
+def _SLASH_GS : CLFlag<"GS">,
+  HelpText<"Enable buffer security check (default)">;
+def _SLASH_GS_ : CLFlag<"GS-">, HelpText<"Disable buffer security check">;
+def : CLFlag<"Gs">, HelpText<"Use stack probes (default)">,
+  Alias<mstack_probe_size>, AliasArgs<["4096"]>;
+def _SLASH_Gs : CLJoined<"Gs">,
+  HelpText<"Set stack probe size (default 4096)">, Alias<mstack_probe_size>;
+def _SLASH_Gy : CLFlag<"Gy">, HelpText<"Put each function in its own section">,
+  Alias<ffunction_sections>;
+def _SLASH_Gy_ : CLFlag<"Gy-">,
+  HelpText<"Do not put each function in its own section (default)">,
+  Alias<fno_function_sections>;
+def _SLASH_Gw : CLFlag<"Gw">, HelpText<"Put each data item in its own section">,
+  Alias<fdata_sections>;
+def _SLASH_Gw_ : CLFlag<"Gw-">,
+  HelpText<"Do not put each data item in its own section (default)">,
+  Alias<fno_data_sections>;
+def _SLASH_help : CLFlag<"help">, Alias<help>,
+  HelpText<"Display available options">;
+def _SLASH_HELP : CLFlag<"HELP">, Alias<help>;
+def _SLASH_I : CLJoinedOrSeparate<"I">,
+  HelpText<"Add directory to include search path">, MetaVarName<"<dir>">,
+  Alias<I>;
+def _SLASH_J : CLFlag<"J">, HelpText<"Make char type unsigned">,
+  Alias<funsigned_char>;
+
+// The _SLASH_O option handles all the /O flags, but we also provide separate
+// aliased options to provide separate help messages.
+def _SLASH_O : CLJoined<"O">,
+  HelpText<"Set multiple /O flags at once; e.g. '/O2y-' for '/O2 /Oy-'">,
+  MetaVarName<"<flags>">;
+def : CLFlag<"O1">, Alias<_SLASH_O>, AliasArgs<["1"]>,
+  HelpText<"Optimize for size  (like /Og     /Os /Oy /Ob2 /GF /Gy)">;
+def : CLFlag<"O2">, Alias<_SLASH_O>, AliasArgs<["2"]>,
+  HelpText<"Optimize for speed (like /Og /Oi /Ot /Oy /Ob2 /GF /Gy)">;
+def : CLFlag<"Ob0">, Alias<_SLASH_O>, AliasArgs<["b0"]>,
+  HelpText<"Disable function inlining">;
+def : CLFlag<"Ob1">, Alias<_SLASH_O>, AliasArgs<["b1"]>,
+  HelpText<"Only inline functions explicitly or implicitly marked inline">;
+def : CLFlag<"Ob2">, Alias<_SLASH_O>, AliasArgs<["b2"]>,
+  HelpText<"Inline functions as deemed beneficial by the compiler">;
+def : CLFlag<"Od">, Alias<_SLASH_O>, AliasArgs<["d"]>,
+  HelpText<"Disable optimization">;
+def : CLFlag<"Og">, Alias<_SLASH_O>, AliasArgs<["g"]>,
+  HelpText<"No effect">;
+def : CLFlag<"Oi">, Alias<_SLASH_O>, AliasArgs<["i"]>,
+  HelpText<"Enable use of builtin functions">;
+def : CLFlag<"Oi-">, Alias<_SLASH_O>, AliasArgs<["i-"]>,
+  HelpText<"Disable use of builtin functions">;
+def : CLFlag<"Os">, Alias<_SLASH_O>, AliasArgs<["s"]>,
+  HelpText<"Optimize for size">;
+def : CLFlag<"Ot">, Alias<_SLASH_O>, AliasArgs<["t"]>,
+  HelpText<"Optimize for speed">;
+def : CLFlag<"Ox">, Alias<_SLASH_O>, AliasArgs<["x"]>,
+  HelpText<"Deprecated (like /Og /Oi /Ot /Oy /Ob2); use /O2">;
+def : CLFlag<"Oy">, Alias<_SLASH_O>, AliasArgs<["y"]>,
+  HelpText<"Enable frame pointer omission (x86 only)">;
+def : CLFlag<"Oy-">, Alias<_SLASH_O>, AliasArgs<["y-"]>,
+  HelpText<"Disable frame pointer omission (x86 only, default)">;
+
+def _SLASH_QUESTION : CLFlag<"?">, Alias<help>,
+  HelpText<"Display available options">;
+def _SLASH_Qvec : CLFlag<"Qvec">,
+  HelpText<"Enable the loop vectorization passes">, Alias<fvectorize>;
+def _SLASH_Qvec_ : CLFlag<"Qvec-">,
+  HelpText<"Disable the loop vectorization passes">, Alias<fno_vectorize>;
+def _SLASH_showIncludes : CLFlag<"showIncludes">,
+  HelpText<"Print info about included files to stderr">;
+def _SLASH_showIncludes_user : CLFlag<"showIncludes:user">,
+  HelpText<"Like /showIncludes but omit system headers">;
+def _SLASH_showFilenames : CLFlag<"showFilenames">,
+  HelpText<"Print the name of each compiled file">;
+def _SLASH_showFilenames_ : CLFlag<"showFilenames-">,
+  HelpText<"Do not print the name of each compiled file (default)">;
+def _SLASH_source_charset : CLCompileJoined<"source-charset:">,
+  HelpText<"Set source encoding, supports only UTF-8">,
+  Alias<finput_charset_EQ>;
+def _SLASH_execution_charset : CLCompileJoined<"execution-charset:">,
+  HelpText<"Set runtime encoding, supports only UTF-8">,
+  Alias<fexec_charset_EQ>;
+def _SLASH_std : CLCompileJoined<"std:">,
+  HelpText<"Set C++ version (c++14,c++17,c++latest)">;
+def _SLASH_U : CLJoinedOrSeparate<"U">, HelpText<"Undefine macro">,
+  MetaVarName<"<macro>">, Alias<U>;
+def _SLASH_validate_charset : CLFlag<"validate-charset">,
+  Alias<W_Joined>, AliasArgs<["invalid-source-encoding"]>;
+def _SLASH_validate_charset_ : CLFlag<"validate-charset-">,
+  Alias<W_Joined>, AliasArgs<["no-invalid-source-encoding"]>;
+def _SLASH_W0 : CLFlag<"W0">, HelpText<"Disable all warnings">, Alias<w>;
+def _SLASH_W1 : CLFlag<"W1">, HelpText<"Enable -Wall">, Alias<Wall>;
+def _SLASH_W2 : CLFlag<"W2">, HelpText<"Enable -Wall">, Alias<Wall>;
+def _SLASH_W3 : CLFlag<"W3">, HelpText<"Enable -Wall">, Alias<Wall>;
+def _SLASH_W4 : CLFlag<"W4">, HelpText<"Enable -Wall and -Wextra">, Alias<WCL4>;
+def _SLASH_Wall : CLFlag<"Wall">, HelpText<"Enable -Weverything">,
+  Alias<W_Joined>, AliasArgs<["everything"]>;
+def _SLASH_WX : CLFlag<"WX">, HelpText<"Treat warnings as errors">,
+  Alias<W_Joined>, AliasArgs<["error"]>;
+def _SLASH_WX_ : CLFlag<"WX-">,
+  HelpText<"Do not treat warnings as errors (default)">,
+  Alias<W_Joined>, AliasArgs<["no-error"]>;
+def _SLASH_w_flag : CLFlag<"w">, HelpText<"Disable all warnings">, Alias<w>;
+def _SLASH_wd4005 : CLFlag<"wd4005">, Alias<W_Joined>,
+  AliasArgs<["no-macro-redefined"]>;
+def _SLASH_wd4018 : CLFlag<"wd4018">, Alias<W_Joined>,
+  AliasArgs<["no-sign-compare"]>;
+def _SLASH_wd4100 : CLFlag<"wd4100">, Alias<W_Joined>,
+  AliasArgs<["no-unused-parameter"]>;
+def _SLASH_wd4910 : CLFlag<"wd4910">, Alias<W_Joined>,
+  AliasArgs<["no-dllexport-explicit-instantiation-decl"]>;
+def _SLASH_wd4996 : CLFlag<"wd4996">, Alias<W_Joined>,
+  AliasArgs<["no-deprecated-declarations"]>;
+def _SLASH_vd : CLJoined<"vd">, HelpText<"Control vtordisp placement">,
+  Alias<vtordisp_mode_EQ>;
+def _SLASH_X : CLFlag<"X">,
+  HelpText<"Do not add %INCLUDE% to include search path">, Alias<nostdlibinc>;
+def _SLASH_Zc_sizedDealloc : CLFlag<"Zc:sizedDealloc">,
+  HelpText<"Enable C++14 sized global deallocation functions">,
+  Alias<fsized_deallocation>;
+def _SLASH_Zc_sizedDealloc_ : CLFlag<"Zc:sizedDealloc-">,
+  HelpText<"Disable C++14 sized global deallocation functions">,
+  Alias<fno_sized_deallocation>;
+def _SLASH_Zc_alignedNew : CLFlag<"Zc:alignedNew">,
+  HelpText<"Enable C++17 aligned allocation functions">,
+  Alias<faligned_allocation>;
+def _SLASH_Zc_alignedNew_ : CLFlag<"Zc:alignedNew-">,
+  HelpText<"Disable C++17 aligned allocation functions">,
+  Alias<fno_aligned_allocation>;
+def _SLASH_Zc_char8_t : CLFlag<"Zc:char8_t">,
+  HelpText<"Enable char8_t from C++2a">,
+  Alias<fchar8__t>;
+def _SLASH_Zc_char8_t_ : CLFlag<"Zc:char8_t-">,
+  HelpText<"Disable char8_t from c++2a">,
+  Alias<fno_char8__t>;
+def _SLASH_Zc_strictStrings : CLFlag<"Zc:strictStrings">,
+  HelpText<"Treat string literals as const">, Alias<W_Joined>,
+  AliasArgs<["error=c++11-compat-deprecated-writable-strings"]>;
+def _SLASH_Zc_threadSafeInit : CLFlag<"Zc:threadSafeInit">,
+  HelpText<"Enable thread-safe initialization of static variables">,
+  Alias<fthreadsafe_statics>;
+def _SLASH_Zc_threadSafeInit_ : CLFlag<"Zc:threadSafeInit-">,
+  HelpText<"Disable thread-safe initialization of static variables">,
+  Alias<fno_threadsafe_statics>;
+def _SLASH_Zc_trigraphs : CLFlag<"Zc:trigraphs">,
+  HelpText<"Enable trigraphs">, Alias<ftrigraphs>;
+def _SLASH_Zc_trigraphs_off : CLFlag<"Zc:trigraphs-">,
+  HelpText<"Disable trigraphs (default)">, Alias<fno_trigraphs>;
+def _SLASH_Zc_twoPhase : CLFlag<"Zc:twoPhase">,
+  HelpText<"Enable two-phase name lookup in templates">,
+  Alias<fno_delayed_template_parsing>;
+def _SLASH_Zc_twoPhase_ : CLFlag<"Zc:twoPhase-">,
+  HelpText<"Disable two-phase name lookup in templates (default)">,
+  Alias<fdelayed_template_parsing>;
+def _SLASH_Z7 : CLFlag<"Z7">,
+  HelpText<"Enable CodeView debug information in object files">;
+def _SLASH_Zd : CLFlag<"Zd">,
+  HelpText<"Emit debug line number tables only">;
+def _SLASH_Zi : CLFlag<"Zi">, Alias<_SLASH_Z7>,
+  HelpText<"Like /Z7">;
+def _SLASH_Zp : CLJoined<"Zp">,
+  HelpText<"Set default maximum struct packing alignment">,
+  Alias<fpack_struct_EQ>;
+def _SLASH_Zp_flag : CLFlag<"Zp">,
+  HelpText<"Set default maximum struct packing alignment to 1">,
+  Alias<fpack_struct_EQ>, AliasArgs<["1"]>;
+def _SLASH_Zs : CLFlag<"Zs">, HelpText<"Syntax-check only">,
+  Alias<fsyntax_only>;
+def _SLASH_openmp_ : CLFlag<"openmp-">,
+  HelpText<"Disable OpenMP support">, Alias<fno_openmp>;
+def _SLASH_openmp : CLFlag<"openmp">, HelpText<"Enable OpenMP support">,
+  Alias<fopenmp>;
+def _SLASH_openmp_experimental : CLFlag<"openmp:experimental">,
+  HelpText<"Enable OpenMP support with experimental SIMD support">,
+  Alias<fopenmp>;
+
+// Non-aliases:
+
+def _SLASH_arch : CLCompileJoined<"arch:">,
+  HelpText<"Set architecture for code generation">;
+
+def _SLASH_M_Group : OptionGroup<"</M group>">, Group<cl_compile_Group>;
+def _SLASH_volatile_Group : OptionGroup<"</volatile group>">,
+  Group<cl_compile_Group>;
+
+def _SLASH_EH : CLJoined<"EH">, HelpText<"Set exception handling model">;
+def _SLASH_EP : CLFlag<"EP">,
+  HelpText<"Disable linemarker output and preprocess to stdout">;
+def _SLASH_FA : CLFlag<"FA">,
+  HelpText<"Output assembly code file during compilation">;
+def _SLASH_Fa : CLJoined<"Fa">,
+  HelpText<"Set assembly output file name (with /FA)">,
+  MetaVarName<"<file or dir/>">;
+def _SLASH_fallback : CLCompileFlag<"fallback">,
+  HelpText<"Fall back to cl.exe if clang-cl fails to compile">;
+def _SLASH_FI : CLJoinedOrSeparate<"FI">,
+  HelpText<"Include file before parsing">, Alias<include_>;
+def _SLASH_Fe : CLJoined<"Fe">,
+  HelpText<"Set output executable file name">,
+  MetaVarName<"<file or dir/>">;
+def _SLASH_Fi : CLCompileJoined<"Fi">,
+  HelpText<"Set preprocess output file name (with /P)">,
+  MetaVarName<"<file>">;
+def _SLASH_Fo : CLCompileJoined<"Fo">,
+  HelpText<"Set output object file (with /c)">,
+  MetaVarName<"<file or dir/>">;
+def _SLASH_guard : CLJoined<"guard:">,
+  HelpText<"Enable Control Flow Guard with /guard:cf, or only the table with /guard:cf,nochecks">;
+def _SLASH_GX : CLFlag<"GX">,
+  HelpText<"Deprecated; use /EHsc">;
+def _SLASH_GX_ : CLFlag<"GX-">,
+  HelpText<"Deprecated (like not passing /EH)">;
+def _SLASH_imsvc : CLJoinedOrSeparate<"imsvc">,
+  HelpText<"Add <dir> to system include search path, as if in %INCLUDE%">,
+  MetaVarName<"<dir>">;
+def _SLASH_LD : CLFlag<"LD">, HelpText<"Create DLL">;
+def _SLASH_LDd : CLFlag<"LDd">, HelpText<"Create debug DLL">;
+def _SLASH_link : CLRemainingArgsJoined<"link">,
+  HelpText<"Forward options to the linker">, MetaVarName<"<options>">;
+def _SLASH_MD : Option<["/", "-"], "MD", KIND_FLAG>, Group<_SLASH_M_Group>,
+  Flags<[CLOption, DriverOption]>, HelpText<"Use DLL run-time">;
+def _SLASH_MDd : Option<["/", "-"], "MDd", KIND_FLAG>, Group<_SLASH_M_Group>,
+  Flags<[CLOption, DriverOption]>, HelpText<"Use DLL debug run-time">;
+def _SLASH_MT : Option<["/", "-"], "MT", KIND_FLAG>, Group<_SLASH_M_Group>,
+  Flags<[CLOption, DriverOption]>, HelpText<"Use static run-time">;
+def _SLASH_MTd : Option<["/", "-"], "MTd", KIND_FLAG>, Group<_SLASH_M_Group>,
+  Flags<[CLOption, DriverOption]>, HelpText<"Use static debug run-time">;
+def _SLASH_o : CLJoinedOrSeparate<"o">,
+  HelpText<"Deprecated (set output file name); use /Fe or /Fe">,
+  MetaVarName<"<file or dir/>">;
+def _SLASH_P : CLFlag<"P">, HelpText<"Preprocess to file">;
+def _SLASH_Tc : CLCompileJoinedOrSeparate<"Tc">,
+  HelpText<"Treat <file> as C source file">, MetaVarName<"<file>">;
+def _SLASH_TC : CLCompileFlag<"TC">, HelpText<"Treat all source files as C">;
+def _SLASH_Tp : CLCompileJoinedOrSeparate<"Tp">,
+  HelpText<"Treat <file> as C++ source file">, MetaVarName<"<file>">;
+def _SLASH_TP : CLCompileFlag<"TP">, HelpText<"Treat all source files as C++">;
+def _SLASH_volatile_iso : Option<["/", "-"], "volatile:iso", KIND_FLAG>,
+  Group<_SLASH_volatile_Group>, Flags<[CLOption, DriverOption]>,
+  HelpText<"Volatile loads and stores have standard semantics">;
+def _SLASH_vmb : CLFlag<"vmb">,
+  HelpText<"Use a best-case representation method for member pointers">;
+def _SLASH_vmg : CLFlag<"vmg">,
+  HelpText<"Use a most-general representation for member pointers">;
+def _SLASH_vms : CLFlag<"vms">,
+  HelpText<"Set the default most-general representation to single inheritance">;
+def _SLASH_vmm : CLFlag<"vmm">,
+  HelpText<"Set the default most-general representation to "
+           "multiple inheritance">;
+def _SLASH_vmv : CLFlag<"vmv">,
+  HelpText<"Set the default most-general representation to "
+           "virtual inheritance">;
+def _SLASH_volatile_ms  : Option<["/", "-"], "volatile:ms", KIND_FLAG>,
+  Group<_SLASH_volatile_Group>, Flags<[CLOption, DriverOption]>,
+  HelpText<"Volatile loads and stores have acquire and release semantics">;
+def _SLASH_clang : CLJoined<"clang:">,
+  HelpText<"Pass <arg> to the clang driver">, MetaVarName<"<arg>">;
+def _SLASH_Zl : CLFlag<"Zl">,
+  HelpText<"Do not let object file auto-link default libraries">;
+
+def _SLASH_Yc : CLJoined<"Yc">,
+  HelpText<"Generate a pch file for all code up to and including <filename>">,
+  MetaVarName<"<filename>">;
+def _SLASH_Yu : CLJoined<"Yu">,
+  HelpText<"Load a pch file and use it instead of all code up to "
+           "and including <filename>">,
+  MetaVarName<"<filename>">;
+def _SLASH_Y_ : CLFlag<"Y-">,
+  HelpText<"Disable precompiled headers, overrides /Yc and /Yu">;
+def _SLASH_Zc_dllexportInlines : CLFlag<"Zc:dllexportInlines">,
+  HelpText<"dllexport/dllimport inline member functions of dllexport/import classes (default)">;
+def _SLASH_Zc_dllexportInlines_ : CLFlag<"Zc:dllexportInlines-">,
+  HelpText<"Do not dllexport/dllimport inline member functions of dllexport/import classes">;
+def _SLASH_Fp : CLJoined<"Fp">,
+  HelpText<"Set pch file name (with /Yc and /Yu)">, MetaVarName<"<file>">;
+
+def _SLASH_Gd : CLFlag<"Gd">,
+  HelpText<"Set __cdecl as a default calling convention">;
+def _SLASH_Gr : CLFlag<"Gr">,
+  HelpText<"Set __fastcall as a default calling convention">;
+def _SLASH_Gz : CLFlag<"Gz">,
+  HelpText<"Set __stdcall as a default calling convention">;
+def _SLASH_Gv : CLFlag<"Gv">,
+  HelpText<"Set __vectorcall as a default calling convention">;
+def _SLASH_Gregcall : CLFlag<"Gregcall">,
+  HelpText<"Set __regcall as a default calling convention">;
+
+// Ignored:
+
+def _SLASH_analyze_ : CLIgnoredFlag<"analyze-">;
+def _SLASH_bigobj : CLIgnoredFlag<"bigobj">;
+def _SLASH_cgthreads : CLIgnoredJoined<"cgthreads">;
+def _SLASH_d2FastFail : CLIgnoredFlag<"d2FastFail">;
+def _SLASH_d2Zi_PLUS : CLIgnoredFlag<"d2Zi+">;
+def _SLASH_errorReport : CLIgnoredJoined<"errorReport">;
+def _SLASH_FC : CLIgnoredFlag<"FC">;
+def _SLASH_Fd : CLIgnoredJoined<"Fd">;
+def _SLASH_FS : CLIgnoredFlag<"FS">;
+def _SLASH_JMC : CLIgnoredFlag<"JMC">;
+def _SLASH_kernel_ : CLIgnoredFlag<"kernel-">;
+def _SLASH_nologo : CLIgnoredFlag<"nologo">;
+def _SLASH_permissive_ : CLIgnoredFlag<"permissive-">;
+def _SLASH_RTC : CLIgnoredJoined<"RTC">;
+def _SLASH_sdl : CLIgnoredFlag<"sdl">;
+def _SLASH_sdl_ : CLIgnoredFlag<"sdl-">;
+def _SLASH_utf8 : CLIgnoredFlag<"utf-8">,
+  HelpText<"Set source and runtime encoding to UTF-8 (default)">;
+def _SLASH_w : CLIgnoredJoined<"w">;
+def _SLASH_Zc___cplusplus : CLIgnoredFlag<"Zc:__cplusplus">;
+def _SLASH_Zc_auto : CLIgnoredFlag<"Zc:auto">;
+def _SLASH_Zc_forScope : CLIgnoredFlag<"Zc:forScope">;
+def _SLASH_Zc_inline : CLIgnoredFlag<"Zc:inline">;
+def _SLASH_Zc_rvalueCast : CLIgnoredFlag<"Zc:rvalueCast">;
+def _SLASH_Zc_ternary : CLIgnoredFlag<"Zc:ternary">;
+def _SLASH_Zc_wchar_t : CLIgnoredFlag<"Zc:wchar_t">;
+def _SLASH_ZH_MD5 : CLIgnoredFlag<"ZH:MD5">;
+def _SLASH_ZH_SHA1 : CLIgnoredFlag<"ZH:SHA1">;
+def _SLASH_ZH_SHA_256 : CLIgnoredFlag<"ZH:SHA_256">;
+def _SLASH_Zm : CLIgnoredJoined<"Zm">;
+def _SLASH_Zo : CLIgnoredFlag<"Zo">;
+def _SLASH_Zo_ : CLIgnoredFlag<"Zo-">;
+
+
+// Unsupported:
+
+def _SLASH_await : CLFlag<"await">;
+def _SLASH_constexpr : CLJoined<"constexpr:">;
+def _SLASH_AI : CLJoinedOrSeparate<"AI">;
+def _SLASH_Bt : CLFlag<"Bt">;
+def _SLASH_Bt_plus : CLFlag<"Bt+">;
+def _SLASH_clr : CLJoined<"clr">;
+def _SLASH_d2 : CLJoined<"d2">;
+def _SLASH_doc : CLJoined<"doc">;
+def _SLASH_FA_joined : CLJoined<"FA">;
+def _SLASH_favor : CLJoined<"favor">;
+def _SLASH_F : CLJoinedOrSeparate<"F">;
+def _SLASH_Fm : CLJoined<"Fm">;
+def _SLASH_Fr : CLJoined<"Fr">;
+def _SLASH_FR : CLJoined<"FR">;
+def _SLASH_FU : CLJoinedOrSeparate<"FU">;
+def _SLASH_Fx : CLFlag<"Fx">;
+def _SLASH_G1 : CLFlag<"G1">;
+def _SLASH_G2 : CLFlag<"G2">;
+def _SLASH_Ge : CLFlag<"Ge">;
+def _SLASH_Gh : CLFlag<"Gh">;
+def _SLASH_GH : CLFlag<"GH">;
+def _SLASH_GL : CLFlag<"GL">;
+def _SLASH_GL_ : CLFlag<"GL-">;
+def _SLASH_Gm : CLFlag<"Gm">;
+def _SLASH_Gm_ : CLFlag<"Gm-">;
+def _SLASH_GT : CLFlag<"GT">;
+def _SLASH_GZ : CLFlag<"GZ">;
+def _SLASH_H : CLFlag<"H">;
+def _SLASH_homeparams : CLFlag<"homeparams">;
+def _SLASH_hotpatch : CLFlag<"hotpatch">;
+def _SLASH_kernel : CLFlag<"kernel">;
+def _SLASH_LN : CLFlag<"LN">;
+def _SLASH_MP : CLJoined<"MP">;
+def _SLASH_Qfast_transcendentals : CLFlag<"Qfast_transcendentals">;
+def _SLASH_QIfist : CLFlag<"QIfist">;
+def _SLASH_QIntel_jcc_erratum : CLFlag<"QIntel-jcc-erratum">;
+def _SLASH_Qimprecise_fwaits : CLFlag<"Qimprecise_fwaits">;
+def _SLASH_Qpar : CLFlag<"Qpar">;
+def _SLASH_Qpar_report : CLJoined<"Qpar-report">;
+def _SLASH_Qsafe_fp_loads : CLFlag<"Qsafe_fp_loads">;
+def _SLASH_Qspectre : CLFlag<"Qspectre">;
+def _SLASH_Qspectre_load : CLFlag<"Qspectre-load">;
+def _SLASH_Qspectre_load_cf : CLFlag<"Qspectre-load-cf">;
+def _SLASH_Qvec_report : CLJoined<"Qvec-report">;
+def _SLASH_u : CLFlag<"u">;
+def _SLASH_V : CLFlag<"V">;
+def _SLASH_WL : CLFlag<"WL">;
+def _SLASH_Wp64 : CLFlag<"Wp64">;
+def _SLASH_Yd : CLFlag<"Yd">;
+def _SLASH_Yl : CLJoined<"Yl">;
+def _SLASH_Za : CLFlag<"Za">;
+def _SLASH_Zc : CLJoined<"Zc:">;
+def _SLASH_Ze : CLFlag<"Ze">;
+def _SLASH_Zg : CLFlag<"Zg">;
+def _SLASH_ZI : CLFlag<"ZI">;
+def _SLASH_ZW : CLJoined<"ZW">;
index 16a7084..9339496 100644 (file)
@@ -12226,6 +12226,7 @@ public:
     FST_FreeBSDKPrintf,
     FST_OSTrace,
     FST_OSLog,
+    FST_Syslog,
     FST_Unknown
   };
   static FormatStringType GetFormatStringType(const FormatAttr *Format);
diff --git a/gnu/llvm/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h b/gnu/llvm/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h
deleted file mode 100644 (file)
index a7f3c28..0000000
+++ /dev/null
@@ -1,178 +0,0 @@
-//== SubEngine.h - Interface of the subengine of CoreEngine --------*- C++ -*-//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines the interface of a subengine of the CoreEngine.
-//
-//===----------------------------------------------------------------------===//
-#ifndef LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_SUBENGINE_H
-#define LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_SUBENGINE_H
-
-#include "clang/Analysis/ProgramPoint.h"
-#include "clang/StaticAnalyzer/Core/PathSensitive/SVals.h"
-#include "clang/StaticAnalyzer/Core/PathSensitive/Store.h"
-#include "clang/StaticAnalyzer/Core/CheckerManager.h"
-
-namespace clang {
-
-class CFGBlock;
-class CFGElement;
-class LocationContext;
-class Stmt;
-
-namespace cross_tu {
-class CrossTranslationUnitContext;
-}
-
-namespace ento {
-
-struct NodeBuilderContext;
-class AnalysisManager;
-class ExplodedNodeSet;
-class ExplodedNode;
-class ProgramState;
-class ProgramStateManager;
-class BlockCounter;
-class BranchNodeBuilder;
-class IndirectGotoNodeBuilder;
-class SwitchNodeBuilder;
-class EndOfFunctionNodeBuilder;
-class NodeBuilderWithSinks;
-class MemRegion;
-
-class SubEngine {
-  virtual void anchor();
-public:
-  virtual ~SubEngine() {}
-
-  virtual ProgramStateRef getInitialState(const LocationContext *InitLoc) = 0;
-
-  virtual AnalysisManager &getAnalysisManager() = 0;
-
-  virtual cross_tu::CrossTranslationUnitContext *
-  getCrossTranslationUnitContext() = 0;
-
-  virtual ProgramStateManager &getStateManager() = 0;
-
-  /// Called by CoreEngine. Used to generate new successor
-  /// nodes by processing the 'effects' of a block-level statement.
-  virtual void processCFGElement(const CFGElement E, ExplodedNode* Pred,
-                                 unsigned StmtIdx, NodeBuilderContext *Ctx)=0;
-
-  /// Called by CoreEngine when it starts processing a CFGBlock.  The
-  /// SubEngine is expected to populate dstNodes with new nodes representing
-  /// updated analysis state, or generate no nodes at all if it doesn't.
-  virtual void processCFGBlockEntrance(const BlockEdge &L,
-                                       NodeBuilderWithSinks &nodeBuilder,
-                                       ExplodedNode *Pred) = 0;
-
-  /// Called by CoreEngine.  Used to generate successor
-  ///  nodes by processing the 'effects' of a branch condition.
-  virtual void processBranch(const Stmt *Condition,
-                             NodeBuilderContext& BuilderCtx,
-                             ExplodedNode *Pred,
-                             ExplodedNodeSet &Dst,
-                             const CFGBlock *DstT,
-                             const CFGBlock *DstF) = 0;
-
-  /// Called by CoreEngine.
-  /// Used to generate successor nodes for temporary destructors depending
-  /// on whether the corresponding constructor was visited.
-  virtual void processCleanupTemporaryBranch(const CXXBindTemporaryExpr *BTE,
-                                             NodeBuilderContext &BldCtx,
-                                             ExplodedNode *Pred,
-                                             ExplodedNodeSet &Dst,
-                                             const CFGBlock *DstT,
-                                             const CFGBlock *DstF) = 0;
-
-  /// Called by CoreEngine.  Used to processing branching behavior
-  /// at static initializers.
-  virtual void processStaticInitializer(const DeclStmt *DS,
-                                        NodeBuilderContext& BuilderCtx,
-                                        ExplodedNode *Pred,
-                                        ExplodedNodeSet &Dst,
-                                        const CFGBlock *DstT,
-                                        const CFGBlock *DstF) = 0;
-
-  /// Called by CoreEngine.  Used to generate successor
-  /// nodes by processing the 'effects' of a computed goto jump.
-  virtual void processIndirectGoto(IndirectGotoNodeBuilder& builder) = 0;
-
-  /// Called by CoreEngine.  Used to generate successor
-  /// nodes by processing the 'effects' of a switch statement.
-  virtual void processSwitch(SwitchNodeBuilder& builder) = 0;
-
-  /// Called by CoreEngine.  Used to notify checkers that processing a
-  /// function has begun. Called for both inlined and and top-level functions.
-  virtual void processBeginOfFunction(NodeBuilderContext &BC,
-                                      ExplodedNode *Pred,
-                                      ExplodedNodeSet &Dst,
-                                      const BlockEdge &L) = 0;
-
-  /// Called by CoreEngine.  Used to notify checkers that processing a
-  /// function has ended. Called for both inlined and and top-level functions.
-  virtual void processEndOfFunction(NodeBuilderContext& BC,
-                                    ExplodedNode *Pred,
-                                    const ReturnStmt *RS = nullptr) = 0;
-
-  // Generate the entry node of the callee.
-  virtual void processCallEnter(NodeBuilderContext& BC, CallEnter CE,
-                                ExplodedNode *Pred) = 0;
-
-  // Generate the first post callsite node.
-  virtual void processCallExit(ExplodedNode *Pred) = 0;
-
-  /// Called by ConstraintManager. Used to call checker-specific
-  /// logic for handling assumptions on symbolic values.
-  virtual ProgramStateRef processAssume(ProgramStateRef state,
-                                       SVal cond, bool assumption) = 0;
-
-  /// processRegionChanges - Called by ProgramStateManager whenever a change is
-  /// made to the store. Used to update checkers that track region values.
-  virtual ProgramStateRef
-  processRegionChanges(ProgramStateRef state,
-                       const InvalidatedSymbols *invalidated,
-                       ArrayRef<const MemRegion *> ExplicitRegions,
-                       ArrayRef<const MemRegion *> Regions,
-                       const LocationContext *LCtx,
-                       const CallEvent *Call) = 0;
-
-
-  inline ProgramStateRef
-  processRegionChange(ProgramStateRef state,
-                      const MemRegion* MR,
-                      const LocationContext *LCtx) {
-    return processRegionChanges(state, nullptr, MR, MR, LCtx, nullptr);
-  }
-
-  virtual ProgramStateRef processPointerEscapedOnBind(
-      ProgramStateRef State, ArrayRef<std::pair<SVal, SVal>> LocAndVals,
-      const LocationContext *LCtx, PointerEscapeKind Kind,
-      const CallEvent *Call) = 0;
-
-  virtual ProgramStateRef
-  notifyCheckersOfPointerEscape(ProgramStateRef State,
-                           const InvalidatedSymbols *Invalidated,
-                           ArrayRef<const MemRegion *> ExplicitRegions,
-                           const CallEvent *Call,
-                           RegionAndSymbolInvalidationTraits &HTraits) = 0;
-
-  /// printJson - Called by ProgramStateManager to print checker-specific data.
-  virtual void printJson(raw_ostream &Out, ProgramStateRef State,
-                         const LocationContext *LCtx, const char *NL,
-                         unsigned int Space, bool IsDot) const = 0;
-
-  /// Called by CoreEngine when the analysis worklist is either empty or the
-  //  maximum number of analysis steps have been reached.
-  virtual void processEndWorklist() = 0;
-};
-
-} // end GR namespace
-
-} // end clang namespace
-
-#endif
diff --git a/gnu/llvm/clang/include/clang/StaticAnalyzer/Frontend/CheckerRegistration.h b/gnu/llvm/clang/include/clang/StaticAnalyzer/Frontend/CheckerRegistration.h
deleted file mode 100644 (file)
index 52a5344..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-//===-- CheckerRegistration.h - Checker Registration Function ---*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_STATICANALYZER_FRONTEND_CHECKERREGISTRATION_H
-#define LLVM_CLANG_STATICANALYZER_FRONTEND_CHECKERREGISTRATION_H
-
-#include "clang/AST/ASTContext.h"
-#include "clang/Basic/LLVM.h"
-#include <functional>
-#include <memory>
-#include <string>
-
-namespace clang {
-  class AnalyzerOptions;
-  class LangOptions;
-  class DiagnosticsEngine;
-
-namespace ento {
-  class CheckerManager;
-  class CheckerRegistry;
-
-  std::unique_ptr<CheckerManager> createCheckerManager(
-      ASTContext &context,
-      AnalyzerOptions &opts,
-      ArrayRef<std::string> plugins,
-      ArrayRef<std::function<void(CheckerRegistry &)>> checkerRegistrationFns,
-      DiagnosticsEngine &diags);
-
-} // end ento namespace
-
-} // end namespace clang
-
-#endif
index 83b9521..6c85304 100644 (file)
@@ -759,6 +759,10 @@ bool FormatSpecifier::hasValidLengthModifier(const TargetInfo &Target,
         case ConversionSpecifier::XArg:
         case ConversionSpecifier::nArg:
           return true;
+        case ConversionSpecifier::FreeBSDbArg:
+          return Target.getTriple().isOSFreeBSD() ||
+                 Target.getTriple().isPS4() ||
+                 Target.getTriple().isOSOpenBSD();
         case ConversionSpecifier::FreeBSDrArg:
         case ConversionSpecifier::FreeBSDyArg:
           return Target.getTriple().isOSFreeBSD() || Target.getTriple().isPS4();
@@ -794,6 +798,10 @@ bool FormatSpecifier::hasValidLengthModifier(const TargetInfo &Target,
         case ConversionSpecifier::ScanListArg:
         case ConversionSpecifier::ZArg:
           return true;
+        case ConversionSpecifier::FreeBSDbArg:
+          return Target.getTriple().isOSFreeBSD() ||
+                 Target.getTriple().isPS4() ||
+                 Target.getTriple().isOSOpenBSD();
         case ConversionSpecifier::FreeBSDrArg:
         case ConversionSpecifier::FreeBSDyArg:
           return Target.getTriple().isOSFreeBSD() || Target.getTriple().isPS4();
@@ -953,6 +961,7 @@ bool FormatSpecifier::hasStandardLengthConversionCombination() const {
         case ConversionSpecifier::uArg:
         case ConversionSpecifier::xArg:
         case ConversionSpecifier::XArg:
+        case ConversionSpecifier::FreeBSDbArg:
           return false;
         default:
           return true;
diff --git a/gnu/llvm/clang/lib/AST/Interp/Block.cpp b/gnu/llvm/clang/lib/AST/Interp/Block.cpp
deleted file mode 100644 (file)
index 5fc93eb..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-//===--- Block.cpp - Allocated blocks for the interpreter -------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// Defines the classes describing allocated blocks.
-//
-//===----------------------------------------------------------------------===//
-
-#include "Block.h"
-#include "Pointer.h"
-
-using namespace clang;
-using namespace clang::interp;
-
-
-
-void Block::addPointer(Pointer *P) {
-  if (IsStatic)
-    return;
-  if (Pointers)
-    Pointers->Prev = P;
-  P->Next = Pointers;
-  P->Prev = nullptr;
-  Pointers = P;
-}
-
-void Block::removePointer(Pointer *P) {
-  if (IsStatic)
-    return;
-  if (Pointers == P)
-    Pointers = P->Next;
-  if (P->Prev)
-    P->Prev->Next = P->Next;
-  if (P->Next)
-    P->Next->Prev = P->Prev;
-}
-
-void Block::cleanup() {
-  if (Pointers == nullptr && IsDead)
-    (reinterpret_cast<DeadBlock *>(this + 1) - 1)->free();
-}
-
-void Block::movePointer(Pointer *From, Pointer *To) {
-  if (IsStatic)
-    return;
-  To->Prev = From->Prev;
-  if (To->Prev)
-    To->Prev->Next = To;
-  To->Next = From->Next;
-  if (To->Next)
-    To->Next->Prev = To;
-  if (Pointers == From)
-    Pointers = To;
-
-  From->Prev = nullptr;
-  From->Next = nullptr;
-}
-
-DeadBlock::DeadBlock(DeadBlock *&Root, Block *Blk)
-    : Root(Root), B(Blk->Desc, Blk->IsStatic, Blk->IsExtern, /*isDead=*/true) {
-  // Add the block to the chain of dead blocks.
-  if (Root)
-    Root->Prev = this;
-
-  Next = Root;
-  Prev = nullptr;
-  Root = this;
-
-  // Transfer pointers.
-  B.Pointers = Blk->Pointers;
-  for (Pointer *P = Blk->Pointers; P; P = P->Next)
-    P->Pointee = &B;
-}
-
-void DeadBlock::free() {
-  if (Prev)
-    Prev->Next = Next;
-  if (Next)
-    Next->Prev = Prev;
-  if (Root == this)
-    Root = Next;
-  ::free(this);
-}
diff --git a/gnu/llvm/clang/lib/AST/Interp/Block.h b/gnu/llvm/clang/lib/AST/Interp/Block.h
deleted file mode 100644 (file)
index 97fb9a3..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-//===--- Block.h - Allocated blocks for the interpreter ---------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// Defines the classes describing allocated blocks.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_AST_INTERP_BLOCK_H
-#define LLVM_CLANG_AST_INTERP_BLOCK_H
-
-#include "Descriptor.h"
-#include "clang/AST/Decl.h"
-#include "clang/AST/DeclCXX.h"
-#include "clang/AST/Expr.h"
-#include "clang/AST/ComparisonCategories.h"
-#include "llvm/ADT/PointerUnion.h"
-#include "llvm/Support/raw_ostream.h"
-
-namespace clang {
-namespace interp {
-class Block;
-class DeadBlock;
-class Context;
-class InterpState;
-class Pointer;
-class Function;
-enum PrimType : unsigned;
-
-/// A memory block, either on the stack or in the heap.
-///
-/// The storage described by the block immediately follows it in memory.
-class Block {
-public:
-  // Creates a new block.
-  Block(const llvm::Optional<unsigned> &DeclID, Descriptor *Desc,
-        bool IsStatic = false, bool IsExtern = false)
-      : DeclID(DeclID), IsStatic(IsStatic), IsExtern(IsExtern), Desc(Desc) {}
-
-  Block(Descriptor *Desc, bool IsStatic = false, bool IsExtern = false)
-      : DeclID((unsigned)-1), IsStatic(IsStatic), IsExtern(IsExtern),
-        Desc(Desc) {}
-
-  /// Returns the block's descriptor.
-  Descriptor *getDescriptor() const { return Desc; }
-  /// Checks if the block has any live pointers.
-  bool hasPointers() const { return Pointers; }
-  /// Checks if the block is extern.
-  bool isExtern() const { return IsExtern; }
-  /// Checks if the block has static storage duration.
-  bool isStatic() const { return IsStatic; }
-  /// Checks if the block is temporary.
-  bool isTemporary() const { return Desc->IsTemporary; }
-  /// Returns the size of the block.
-  InterpSize getSize() const { return Desc->getAllocSize(); }
-  /// Returns the declaration ID.
-  llvm::Optional<unsigned> getDeclID() const { return DeclID; }
-
-  /// Returns a pointer to the stored data.
-  char *data() { return reinterpret_cast<char *>(this + 1); }
-
-  /// Returns a view over the data.
-  template <typename T>
-  T &deref() { return *reinterpret_cast<T *>(data()); }
-
-  /// Invokes the constructor.
-  void invokeCtor() {
-    std::memset(data(), 0, getSize());
-    if (Desc->CtorFn)
-      Desc->CtorFn(this, data(), Desc->IsConst, Desc->IsMutable,
-                   /*isActive=*/true, Desc);
-  }
-
-protected:
-  friend class Pointer;
-  friend class DeadBlock;
-  friend class InterpState;
-
-  Block(Descriptor *Desc, bool IsExtern, bool IsStatic, bool IsDead)
-    : IsStatic(IsStatic), IsExtern(IsExtern), IsDead(true), Desc(Desc) {}
-
-  // Deletes a dead block at the end of its lifetime.
-  void cleanup();
-
-  // Pointer chain management.
-  void addPointer(Pointer *P);
-  void removePointer(Pointer *P);
-  void movePointer(Pointer *From, Pointer *To);
-
-  /// Start of the chain of pointers.
-  Pointer *Pointers = nullptr;
-  /// Unique identifier of the declaration.
-  llvm::Optional<unsigned> DeclID;
-  /// Flag indicating if the block has static storage duration.
-  bool IsStatic = false;
-  /// Flag indicating if the block is an extern.
-  bool IsExtern = false;
-  /// Flag indicating if the pointer is dead.
-  bool IsDead = false;
-  /// Pointer to the stack slot descriptor.
-  Descriptor *Desc;
-};
-
-/// Descriptor for a dead block.
-///
-/// Dead blocks are chained in a double-linked list to deallocate them
-/// whenever pointers become dead.
-class DeadBlock {
-public:
-  /// Copies the block.
-  DeadBlock(DeadBlock *&Root, Block *Blk);
-
-  /// Returns a pointer to the stored data.
-  char *data() { return B.data(); }
-
-private:
-  friend class Block;
-  friend class InterpState;
-
-  void free();
-
-  /// Root pointer of the list.
-  DeadBlock *&Root;
-  /// Previous block in the list.
-  DeadBlock *Prev;
-  /// Next block in the list.
-  DeadBlock *Next;
-
-  /// Actual block storing data and tracking pointers.
-  Block B;
-};
-
-} // namespace interp
-} // namespace clang
-
-#endif
index cf933c8..eccdc21 100644 (file)
@@ -36,6 +36,7 @@ TargetInfo::TargetInfo(const llvm::Triple &T) : TargetOpts(), Triple(T) {
   HasLegalHalfType = false;
   HasFloat128 = false;
   HasFloat16 = false;
+  HasBFloat16 = false;
   HasStrictFP = false;
   PointerWidth = PointerAlign = 32;
   BoolWidth = BoolAlign = 8;
@@ -114,6 +115,7 @@ TargetInfo::TargetInfo(const llvm::Triple &T) : TargetOpts(), Triple(T) {
   HasBuiltinMSVaList = false;
   IsRenderScriptTarget = false;
   HasAArch64SVETypes = false;
+  ARMCDECoprocMask = 0;
 
   // Default to no types using fpret.
   RealTypeUsesObjCFPRet = 0;
@@ -133,6 +135,8 @@ TargetInfo::TargetInfo(const llvm::Triple &T) : TargetOpts(), Triple(T) {
   // Default to an unknown platform name.
   PlatformName = "unknown";
   PlatformMinVersion = VersionTuple();
+
+  MaxOpenCLWorkGroupSize = 1024;
 }
 
 // Out of line virtual dtor for TargetInfo.
@@ -263,7 +267,8 @@ TargetInfo::IntType TargetInfo::getLeastIntTypeByWidth(unsigned BitWidth,
   return NoInt;
 }
 
-TargetInfo::RealType TargetInfo::getRealTypeByWidth(unsigned BitWidth) const {
+TargetInfo::RealType TargetInfo::getRealTypeByWidth(unsigned BitWidth,
+                                                    bool ExplicitIEEE) const {
   if (getFloatWidth() == BitWidth)
     return Float;
   if (getDoubleWidth() == BitWidth)
@@ -275,6 +280,10 @@ TargetInfo::RealType TargetInfo::getRealTypeByWidth(unsigned BitWidth) const {
       return LongDouble;
     break;
   case 128:
+    // The caller explicitly asked for an IEEE compliant type but we still
+    // have to check if the target supports it.
+    if (ExplicitIEEE)
+      return hasFloat128Type() ? Float128 : NoFloat;
     if (&getLongDoubleFormat() == &llvm::APFloat::PPCDoubleDouble() ||
         &getLongDoubleFormat() == &llvm::APFloat::IEEEquad())
       return LongDouble;
@@ -380,6 +389,20 @@ void TargetInfo::adjust(LangOptions &Opts) {
     LongDoubleFormat = &llvm::APFloat::IEEEquad();
   }
 
+  if (Opts.DoubleSize) {
+    if (Opts.DoubleSize == 32) {
+      DoubleWidth = 32;
+      LongDoubleWidth = 32;
+      DoubleFormat = &llvm::APFloat::IEEEsingle();
+      LongDoubleFormat = &llvm::APFloat::IEEEsingle();
+    } else if (Opts.DoubleSize == 64) {
+      DoubleWidth = 64;
+      LongDoubleWidth = 64;
+      DoubleFormat = &llvm::APFloat::IEEEdouble();
+      LongDoubleFormat = &llvm::APFloat::IEEEdouble();
+    }
+  }
+
   if (Opts.LongDoubleSize) {
     if (Opts.LongDoubleSize == DoubleWidth) {
       LongDoubleWidth = DoubleWidth;
index b475c03..2389f55 100644 (file)
@@ -239,6 +239,7 @@ public:
     case 'y': // Equivalent to "r", backward compatibility only.
     case 'f': // floating-point registers.
     case 'c': // $25 for indirect jumps
+    case 'h': // hi register
     case 'l': // lo register
     case 'x': // hilo register pair
       Info.setAllowsRegister();
index f86cdc0..d7869e3 100644 (file)
@@ -29,11 +29,12 @@ class LLVM_LIBRARY_VISIBILITY SystemZTargetInfo : public TargetInfo {
   int ISARevision;
   bool HasTransactionalExecution;
   bool HasVector;
+  bool SoftFloat;
 
 public:
   SystemZTargetInfo(const llvm::Triple &Triple, const TargetOptions &)
       : TargetInfo(Triple), CPU("z10"), ISARevision(8),
-        HasTransactionalExecution(false), HasVector(false) {
+        HasTransactionalExecution(false), HasVector(false), SoftFloat(false) {
     IntMaxType = SignedLong;
     Int64Type = SignedLong;
     TLSSupported = true;
@@ -64,6 +65,10 @@ public:
 
   ArrayRef<TargetInfo::AddlRegName> getGCCAddlRegNames() const override;
 
+  bool isSPRegName(StringRef RegName) const override {
+    return RegName.equals("r15");
+  }
+
   bool validateAsmConstraint(const char *&Name,
                              TargetInfo::ConstraintInfo &info) const override;
 
@@ -110,12 +115,17 @@ public:
                             DiagnosticsEngine &Diags) override {
     HasTransactionalExecution = false;
     HasVector = false;
+    SoftFloat = false;
     for (const auto &Feature : Features) {
       if (Feature == "+transactional-execution")
         HasTransactionalExecution = true;
       else if (Feature == "+vector")
         HasVector = true;
+      else if (Feature == "+soft-float")
+        SoftFloat = true;
     }
+    HasVector &= !SoftFloat;
+
     // If we use the vector ABI, vector types are 64-bit aligned.
     if (HasVector) {
       MaxVectorAlign = 64;
@@ -145,6 +155,8 @@ public:
   }
 
   const char *getLongDoubleMangling() const override { return "g"; }
+
+  bool hasExtIntType() const override { return true; }
 };
 } // namespace targets
 } // namespace clang
index 543f232..59d9696 100644 (file)
@@ -296,6 +296,8 @@ bool X86TargetInfo::handleTargetFeatures(std::vector<std::string> &Features,
       HasPTWRITE = true;
     } else if (Feature == "+invpcid") {
       HasINVPCID = true;
+    } else if (Feature == "+save-args") {
+      HasSaveArgs = true;
     } else if (Feature == "+enqcmd") {
       HasENQCMD = true;
     } else if (Feature == "+amx-bf16") {
@@ -930,6 +932,7 @@ bool X86TargetInfo::hasFeature(StringRef Feature) const {
       .Case("movbe", HasMOVBE)
       .Case("movdiri", HasMOVDIRI)
       .Case("movdir64b", HasMOVDIR64B)
+      .Case("save-args", HasSaveArgs)
       .Case("mwaitx", HasMWAITX)
       .Case("pclmul", HasPCLMUL)
       .Case("pconfig", HasPCONFIG)
index 4c04f0b..bdbeea4 100644 (file)
@@ -18,6 +18,7 @@
 #include "clang/Basic/TargetOptions.h"
 #include "llvm/ADT/Triple.h"
 #include "llvm/Support/Compiler.h"
+#include "llvm/Support/X86TargetParser.h"
 
 namespace clang {
 namespace targets {
@@ -125,21 +126,14 @@ class LLVM_LIBRARY_VISIBILITY X86TargetInfo : public TargetInfo {
   bool HasINVPCID = false;
   bool HasSaveArgs = false;
   bool HasENQCMD = false;
+  bool HasAMXTILE = false;
+  bool HasAMXINT8 = false;
+  bool HasAMXBF16 = false;
+  bool HasSERIALIZE = false;
+  bool HasTSXLDTRK = false;
 
 protected:
-  /// Enumeration of all of the X86 CPUs supported by Clang.
-  ///
-  /// Each enumeration represents a particular CPU supported by Clang. These
-  /// loosely correspond to the options passed to '-march' or '-mtune' flags.
-  enum CPUKind {
-    CK_Generic,
-#define PROC(ENUM, STRING, IS64BIT) CK_##ENUM,
-#include "clang/Basic/X86Target.def"
-  } CPU = CK_Generic;
-
-  bool checkCPUKind(CPUKind Kind) const;
-
-  CPUKind getCPUKind(StringRef CPU) const;
+  llvm::X86::CPUKind CPU = llvm::X86::CK_None;
 
   enum FPMathKind { FP_Default, FP_SSE, FP_387 } FPMath = FP_Default;
 
@@ -168,6 +162,10 @@ public:
 
   ArrayRef<TargetInfo::AddlRegName> getGCCAddlRegNames() const override;
 
+  bool isSPRegName(StringRef RegName) const override {
+    return RegName.equals("esp") || RegName.equals("rsp");
+  }
+
   bool validateCpuSupports(StringRef Name) const override;
 
   bool validateCpuIs(StringRef Name) const override;
@@ -180,6 +178,8 @@ public:
       StringRef Name,
       llvm::SmallVectorImpl<StringRef> &Features) const override;
 
+  Optional<unsigned> getCPUCacheLineSize() const override;
+
   bool validateAsmConstraint(const char *&Name,
                              TargetInfo::ConstraintInfo &info) const override;
 
@@ -264,24 +264,8 @@ public:
   void getTargetDefines(const LangOptions &Opts,
                         MacroBuilder &Builder) const override;
 
-  static void setSSELevel(llvm::StringMap<bool> &Features, X86SSEEnum Level,
-                          bool Enabled);
-
-  static void setMMXLevel(llvm::StringMap<bool> &Features, MMX3DNowEnum Level,
-                          bool Enabled);
-
-  static void setXOPLevel(llvm::StringMap<bool> &Features, XOPEnum Level,
-                          bool Enabled);
-
   void setFeatureEnabled(llvm::StringMap<bool> &Features, StringRef Name,
-                         bool Enabled) const override {
-    setFeatureEnabledImpl(Features, Name, Enabled);
-  }
-
-  // This exists purely to cut down on the number of virtual calls in
-  // initFeatureMap which calls this repeatedly.
-  static void setFeatureEnabledImpl(llvm::StringMap<bool> &Features,
-                                    StringRef Name, bool Enabled);
+                         bool Enabled) const final;
 
   bool
   initFeatureMap(llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags,
@@ -290,7 +274,7 @@ public:
 
   bool isValidFeatureName(StringRef Name) const override;
 
-  bool hasFeature(StringRef Feature) const override;
+  bool hasFeature(StringRef Feature) const final;
 
   bool handleTargetFeatures(std::vector<std::string> &Features,
                             DiagnosticsEngine &Diags) override;
@@ -307,13 +291,16 @@ public:
   }
 
   bool isValidCPUName(StringRef Name) const override {
-    return checkCPUKind(getCPUKind(Name));
+    bool Only64Bit = getTriple().getArch() != llvm::Triple::x86;
+    return llvm::X86::parseArchX86(Name, Only64Bit) != llvm::X86::CK_None;
   }
 
   void fillValidCPUList(SmallVectorImpl<StringRef> &Values) const override;
 
   bool setCPU(const std::string &Name) override {
-    return checkCPUKind(CPU = getCPUKind(Name));
+    bool Only64Bit = getTriple().getArch() != llvm::Triple::x86;
+    CPU = llvm::X86::parseArchX86(Name, Only64Bit);
+    return CPU != llvm::X86::CK_None;
   }
 
   unsigned multiVersionSortPriority(StringRef Name) const override;
@@ -429,6 +416,8 @@ public:
   }
 
   ArrayRef<Builtin::Info> getTargetBuiltins() const override;
+
+  bool hasExtIntType() const override { return true; }
 };
 
 class LLVM_LIBRARY_VISIBILITY NetBSDI386TargetInfo
@@ -731,6 +720,8 @@ public:
   }
 
   ArrayRef<Builtin::Info> getTargetBuiltins() const override;
+
+  bool hasExtIntType() const override { return true; }
 };
 
 // x86-64 Windows target
index e8235c7..c8f1f00 100644 (file)
@@ -2068,6 +2068,9 @@ void CodeGenModule::ConstructAttributeList(
     // CPU/feature overrides.  addDefaultFunctionDefinitionAttributes
     // handles these separately to set them based on the global defaults.
     GetCPUAndFeaturesAttributes(CalleeInfo.getCalleeDecl(), FuncAttrs);
+
+    if (CodeGenOpts.ReturnProtector)
+      FuncAttrs.addAttribute("ret-protector");
   }
 
   // Collect attributes from arguments and return values.
index 5f138dc..83c5b8a 100644 (file)
@@ -20,6 +20,7 @@
 #include "clang/AST/Attr.h"
 #include "clang/AST/RecordLayout.h"
 #include "clang/Basic/CodeGenOptions.h"
+#include "clang/Basic/DiagnosticFrontend.h"
 #include "clang/CodeGen/CGFunctionInfo.h"
 #include "clang/CodeGen/SwiftCallingConv.h"
 #include "llvm/ADT/SmallBitVector.h"
@@ -28,6 +29,7 @@
 #include "llvm/ADT/Triple.h"
 #include "llvm/ADT/Twine.h"
 #include "llvm/IR/DataLayout.h"
+#include "llvm/IR/IntrinsicsNVPTX.h"
 #include "llvm/IR/Type.h"
 #include "llvm/Support/raw_ostream.h"
 #include <algorithm> // std::sort
@@ -96,6 +98,17 @@ Address ABIInfo::EmitMSVAArg(CodeGenFunction &CGF, Address VAListAddr,
   return Address::invalid();
 }
 
+bool ABIInfo::isPromotableIntegerTypeForABI(QualType Ty) const {
+  if (Ty->isPromotableIntegerType())
+    return true;
+
+  if (const auto *EIT = Ty->getAs<ExtIntType>())
+    if (EIT->getNumBits() < getContext().getTypeSize(getContext().IntTy))
+      return true;
+
+  return false;
+}
+
 ABIInfo::~ABIInfo() {}
 
 /// Does the given lowering require more than the given number of
@@ -384,7 +397,7 @@ static Address emitMergePHI(CodeGenFunction &CGF,
   return Address(PHI, Align);
 }
 
-TargetCodeGenInfo::~TargetCodeGenInfo() { delete Info; }
+TargetCodeGenInfo::~TargetCodeGenInfo() = default;
 
 // If someone can figure out a general rule for this, that would be great.
 // It's probably just doomed to be platform-dependent, though.
@@ -486,11 +499,15 @@ static bool isEmptyField(ASTContext &Context, const FieldDecl *FD,
 
   // Constant arrays of empty records count as empty, strip them off.
   // Constant arrays of zero length always count as empty.
+  bool WasArray = false;
   if (AllowArrays)
     while (const ConstantArrayType *AT = Context.getAsConstantArrayType(FT)) {
       if (AT->getSize() == 0)
         return true;
       FT = AT->getElementType();
+      // The [[no_unique_address]] special case below does not apply to
+      // arrays of C++ empty records, so we need to remember this fact.
+      WasArray = true;
     }
 
   const RecordType *RT = FT->getAs<RecordType>();
@@ -501,7 +518,14 @@ static bool isEmptyField(ASTContext &Context, const FieldDecl *FD,
   //
   // FIXME: We should use a predicate for whether this behavior is true in the
   // current ABI.
-  if (isa<CXXRecordDecl>(RT->getDecl()))
+  //
+  // The exception to the above rule are fields marked with the
+  // [[no_unique_address]] attribute (since C++20).  Those do count as empty
+  // according to the Itanium ABI.  The exception applies only to records,
+  // not arrays of records, so we must also check whether we stripped off an
+  // array type above.
+  if (isa<CXXRecordDecl>(RT->getDecl()) &&
+      (WasArray || !FD->hasAttr<NoUniqueAddressAttr>()))
     return false;
 
   return isEmptyRecord(Context, FT, AllowArrays);
@@ -681,7 +705,7 @@ public:
 class DefaultTargetCodeGenInfo : public TargetCodeGenInfo {
 public:
   DefaultTargetCodeGenInfo(CodeGen::CodeGenTypes &CGT)
-    : TargetCodeGenInfo(new DefaultABIInfo(CGT)) {}
+      : TargetCodeGenInfo(std::make_unique<DefaultABIInfo>(CGT)) {}
 };
 
 ABIArgInfo DefaultABIInfo::classifyArgumentType(QualType Ty) const {
@@ -700,8 +724,16 @@ ABIArgInfo DefaultABIInfo::classifyArgumentType(QualType Ty) const {
   if (const EnumType *EnumTy = Ty->getAs<EnumType>())
     Ty = EnumTy->getDecl()->getIntegerType();
 
-  return (Ty->isPromotableIntegerType() ? ABIArgInfo::getExtend(Ty)
-                                        : ABIArgInfo::getDirect());
+  ASTContext &Context = getContext();
+  if (const auto *EIT = Ty->getAs<ExtIntType>())
+    if (EIT->getNumBits() >
+        Context.getTypeSize(Context.getTargetInfo().hasInt128Type()
+                                ? Context.Int128Ty
+                                : Context.LongLongTy))
+      return getNaturalAlignIndirect(Ty);
+
+  return (isPromotableIntegerTypeForABI(Ty) ? ABIArgInfo::getExtend(Ty)
+                                            : ABIArgInfo::getDirect());
 }
 
 ABIArgInfo DefaultABIInfo::classifyReturnType(QualType RetTy) const {
@@ -715,8 +747,15 @@ ABIArgInfo DefaultABIInfo::classifyReturnType(QualType RetTy) const {
   if (const EnumType *EnumTy = RetTy->getAs<EnumType>())
     RetTy = EnumTy->getDecl()->getIntegerType();
 
-  return (RetTy->isPromotableIntegerType() ? ABIArgInfo::getExtend(RetTy)
-                                           : ABIArgInfo::getDirect());
+  if (const auto *EIT = RetTy->getAs<ExtIntType>())
+    if (EIT->getNumBits() >
+        getContext().getTypeSize(getContext().getTargetInfo().hasInt128Type()
+                                     ? getContext().Int128Ty
+                                     : getContext().LongLongTy))
+      return getNaturalAlignIndirect(RetTy);
+
+  return (isPromotableIntegerTypeForABI(RetTy) ? ABIArgInfo::getExtend(RetTy)
+                                               : ABIArgInfo::getDirect());
 }
 
 //===----------------------------------------------------------------------===//
@@ -726,11 +765,19 @@ ABIArgInfo DefaultABIInfo::classifyReturnType(QualType RetTy) const {
 //===----------------------------------------------------------------------===//
 
 class WebAssemblyABIInfo final : public SwiftABIInfo {
+public:
+  enum ABIKind {
+    MVP = 0,
+    ExperimentalMV = 1,
+  };
+
+private:
   DefaultABIInfo defaultInfo;
+  ABIKind Kind;
 
 public:
-  explicit WebAssemblyABIInfo(CodeGen::CodeGenTypes &CGT)
-      : SwiftABIInfo(CGT), defaultInfo(CGT) {}
+  explicit WebAssemblyABIInfo(CodeGen::CodeGenTypes &CGT, ABIKind Kind)
+      : SwiftABIInfo(CGT), defaultInfo(CGT), Kind(Kind) {}
 
 private:
   ABIArgInfo classifyReturnType(QualType RetTy) const;
@@ -761,8 +808,9 @@ private:
 
 class WebAssemblyTargetCodeGenInfo final : public TargetCodeGenInfo {
 public:
-  explicit WebAssemblyTargetCodeGenInfo(CodeGen::CodeGenTypes &CGT)
-      : TargetCodeGenInfo(new WebAssemblyABIInfo(CGT)) {}
+  explicit WebAssemblyTargetCodeGenInfo(CodeGen::CodeGenTypes &CGT,
+                                        WebAssemblyABIInfo::ABIKind K)
+      : TargetCodeGenInfo(std::make_unique<WebAssemblyABIInfo>(CGT, K)) {}
 
   void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
                            CodeGen::CodeGenModule &CGM) const override {
@@ -813,6 +861,20 @@ ABIArgInfo WebAssemblyABIInfo::classifyArgumentType(QualType Ty) const {
     // though watch out for things like bitfields.
     if (const Type *SeltTy = isSingleElementStruct(Ty, getContext()))
       return ABIArgInfo::getDirect(CGT.ConvertType(QualType(SeltTy, 0)));
+    // For the experimental multivalue ABI, fully expand all other aggregates
+    if (Kind == ABIKind::ExperimentalMV) {
+      const RecordType *RT = Ty->getAs<RecordType>();
+      assert(RT);
+      bool HasBitField = false;
+      for (auto *Field : RT->getDecl()->fields()) {
+        if (Field->isBitField()) {
+          HasBitField = true;
+          break;
+        }
+      }
+      if (!HasBitField)
+        return ABIArgInfo::getExpand();
+    }
   }
 
   // Otherwise just do the default thing.
@@ -832,6 +894,9 @@ ABIArgInfo WebAssemblyABIInfo::classifyReturnType(QualType RetTy) const {
       // ABIArgInfo::getDirect().
       if (const Type *SeltTy = isSingleElementStruct(RetTy, getContext()))
         return ABIArgInfo::getDirect(CGT.ConvertType(QualType(SeltTy, 0)));
+      // For the experimental multivalue ABI, return all other aggregates
+      if (Kind == ABIKind::ExperimentalMV)
+        return ABIArgInfo::getDirect();
     }
   }
 
@@ -871,8 +936,8 @@ class PNaClABIInfo : public ABIInfo {
 
 class PNaClTargetCodeGenInfo : public TargetCodeGenInfo {
  public:
-  PNaClTargetCodeGenInfo(CodeGen::CodeGenTypes &CGT)
-    : TargetCodeGenInfo(new PNaClABIInfo(CGT)) {}
+   PNaClTargetCodeGenInfo(CodeGen::CodeGenTypes &CGT)
+       : TargetCodeGenInfo(std::make_unique<PNaClABIInfo>(CGT)) {}
 };
 
 void PNaClABIInfo::computeInfo(CGFunctionInfo &FI) const {
@@ -906,10 +971,15 @@ ABIArgInfo PNaClABIInfo::classifyArgumentType(QualType Ty) const {
   } else if (Ty->isFloatingType()) {
     // Floating-point types don't go inreg.
     return ABIArgInfo::getDirect();
+  } else if (const auto *EIT = Ty->getAs<ExtIntType>()) {
+    // Treat extended integers as integers if <=64, otherwise pass indirectly.
+    if (EIT->getNumBits() > 64)
+      return getNaturalAlignIndirect(Ty);
+    return ABIArgInfo::getDirect();
   }
 
-  return (Ty->isPromotableIntegerType() ? ABIArgInfo::getExtend(Ty)
-                                        : ABIArgInfo::getDirect());
+  return (isPromotableIntegerTypeForABI(Ty) ? ABIArgInfo::getExtend(Ty)
+                                            : ABIArgInfo::getDirect());
 }
 
 ABIArgInfo PNaClABIInfo::classifyReturnType(QualType RetTy) const {
@@ -920,12 +990,19 @@ ABIArgInfo PNaClABIInfo::classifyReturnType(QualType RetTy) const {
   if (isAggregateTypeForABI(RetTy))
     return getNaturalAlignIndirect(RetTy);
 
+  // Treat extended integers as integers if <=64, otherwise pass indirectly.
+  if (const auto *EIT = RetTy->getAs<ExtIntType>()) {
+    if (EIT->getNumBits() > 64)
+      return getNaturalAlignIndirect(RetTy);
+    return ABIArgInfo::getDirect();
+  }
+
   // Treat an enum type as its underlying type.
   if (const EnumType *EnumTy = RetTy->getAs<EnumType>())
     RetTy = EnumTy->getDecl()->getIntegerType();
 
-  return (RetTy->isPromotableIntegerType() ? ABIArgInfo::getExtend(RetTy)
-                                           : ABIArgInfo::getDirect());
+  return (isPromotableIntegerTypeForABI(RetTy) ? ABIArgInfo::getExtend(RetTy)
+                                               : ABIArgInfo::getDirect());
 }
 
 /// IsX86_MMXType - Return true if this is an MMX type.
@@ -943,7 +1020,8 @@ static llvm::Type* X86AdjustInlineAsmType(CodeGen::CodeGenFunction &CGF,
                      .Cases("y", "&y", "^Ym", true)
                      .Default(false);
   if (IsMMXCons && Ty->isVectorTy()) {
-    if (cast<llvm::VectorType>(Ty)->getBitWidth() != 64) {
+    if (cast<llvm::VectorType>(Ty)->getPrimitiveSizeInBits().getFixedSize() !=
+        64) {
       // Invalid MMX constraint
       return nullptr;
     }
@@ -1112,7 +1190,7 @@ public:
   X86_32TargetCodeGenInfo(CodeGen::CodeGenTypes &CGT, bool DarwinVectorABI,
                           bool RetSmallStructInRegABI, bool Win32StructABI,
                           unsigned NumRegisterParameters, bool SoftFloatABI)
-      : TargetCodeGenInfo(new X86_32ABIInfo(
+      : TargetCodeGenInfo(std::make_unique<X86_32ABIInfo>(
             CGT, DarwinVectorABI, RetSmallStructInRegABI, Win32StructABI,
             NumRegisterParameters, SoftFloatABI)) {}
 
@@ -1412,8 +1490,8 @@ ABIArgInfo X86_32ABIInfo::classifyReturnType(QualType RetTy,
       // registers and we need to make sure to pick a type the LLVM
       // backend will like.
       if (Size == 128)
-        return ABIArgInfo::getDirect(llvm::VectorType::get(
-                  llvm::Type::getInt64Ty(getVMContext()), 2));
+        return ABIArgInfo::getDirect(llvm::FixedVectorType::get(
+            llvm::Type::getInt64Ty(getVMContext()), 2));
 
       // Always return in register if it fits in a general purpose
       // register, or if it is 64 bits and has a single element.
@@ -1470,15 +1548,19 @@ ABIArgInfo X86_32ABIInfo::classifyReturnType(QualType RetTy,
   if (const EnumType *EnumTy = RetTy->getAs<EnumType>())
     RetTy = EnumTy->getDecl()->getIntegerType();
 
-  return (RetTy->isPromotableIntegerType() ? ABIArgInfo::getExtend(RetTy)
-                                           : ABIArgInfo::getDirect());
+  if (const auto *EIT = RetTy->getAs<ExtIntType>())
+    if (EIT->getNumBits() > 64)
+      return getIndirectReturnResult(RetTy, State);
+
+  return (isPromotableIntegerTypeForABI(RetTy) ? ABIArgInfo::getExtend(RetTy)
+                                               : ABIArgInfo::getDirect());
 }
 
-static bool isSSEVectorType(ASTContext &Context, QualType Ty) {
+static bool isSIMDVectorType(ASTContext &Context, QualType Ty) {
   return Ty->getAs<VectorType>() && Context.getTypeSize(Ty) == 128;
 }
 
-static bool isRecordWithSSEVectorType(ASTContext &Context, QualType Ty) {
+static bool isRecordWithSIMDVectorType(ASTContext &Context, QualType Ty) {
   const RecordType *RT = Ty->getAs<RecordType>();
   if (!RT)
     return 0;
@@ -1487,16 +1569,16 @@ static bool isRecordWithSSEVectorType(ASTContext &Context, QualType Ty) {
   // If this is a C++ record, check the bases first.
   if (const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD))
     for (const auto &I : CXXRD->bases())
-      if (!isRecordWithSSEVectorType(Context, I.getType()))
+      if (!isRecordWithSIMDVectorType(Context, I.getType()))
         return false;
 
   for (const auto *i : RD->fields()) {
     QualType FT = i->getType();
 
-    if (isSSEVectorType(Context, FT))
+    if (isSIMDVectorType(Context, FT))
       return true;
 
-    if (isRecordWithSSEVectorType(Context, FT))
+    if (isRecordWithSIMDVectorType(Context, FT))
       return true;
   }
 
@@ -1517,8 +1599,8 @@ unsigned X86_32ABIInfo::getTypeStackAlignInBytes(QualType Ty,
   }
 
   // Otherwise, if the type contains an SSE vector type, the alignment is 16.
-  if (Align >= 16 && (isSSEVectorType(getContext(), Ty) ||
-                      isRecordWithSSEVectorType(getContext(), Ty)))
+  if (Align >= 16 && (isSIMDVectorType(getContext(), Ty) ||
+                      isRecordWithSIMDVectorType(getContext(), Ty)))
     return 16;
 
   return MinABIStackAlignInBytes;
@@ -1661,7 +1743,7 @@ void X86_32ABIInfo::runVectorCallFirstPass(CGFunctionInfo &FI, CCState &State) c
         isHomogeneousAggregate(Ty, Base, NumElts)) {
       if (State.FreeSSERegs >= NumElts) {
         State.FreeSSERegs -= NumElts;
-        Args[I].info = ABIArgInfo::getDirect();
+        Args[I].info = ABIArgInfo::getDirectInReg();
         State.IsPreassigned.set(I);
       }
     }
@@ -1676,6 +1758,7 @@ ABIArgInfo X86_32ABIInfo::classifyArgumentType(QualType Ty,
   bool IsVectorCall = State.CC == llvm::CallingConv::X86_VectorCall;
 
   Ty = useFirstFieldIfTransparentUnion(Ty);
+  TypeInfo TI = getContext().getTypeInfo(Ty);
 
   // Check with the C++ ABI first.
   const RecordType *RT = Ty->getAs<RecordType>();
@@ -1725,7 +1808,7 @@ ABIArgInfo X86_32ABIInfo::classifyArgumentType(QualType Ty,
     bool NeedsPadding = false;
     bool InReg;
     if (shouldAggregateUseDirect(Ty, State, InReg, NeedsPadding)) {
-      unsigned SizeInRegs = (getContext().getTypeSize(Ty) + 31) / 32;
+      unsigned SizeInRegs = (TI.Width + 31) / 32;
       SmallVector<llvm::Type*, 3> Elements(SizeInRegs, Int32);
       llvm::Type *Result = llvm::StructType::get(LLVMContext, Elements);
       if (InReg)
@@ -1735,14 +1818,19 @@ ABIArgInfo X86_32ABIInfo::classifyArgumentType(QualType Ty,
     }
     llvm::IntegerType *PaddingType = NeedsPadding ? Int32 : nullptr;
 
+    // Pass over-aligned aggregates on Windows indirectly. This behavior was
+    // added in MSVC 2015.
+    if (IsWin32StructABI && TI.AlignIsRequired && TI.Align > 32)
+      return getIndirectResult(Ty, /*ByVal=*/false, State);
+
     // Expand small (<= 128-bit) record types when we know that the stack layout
     // of those arguments will match the struct. This is important because the
     // LLVM backend isn't smart enough to remove byval, which inhibits many
     // optimizations.
     // Don't do this for the MCU if there are still free integer registers
     // (see X86_64 ABI for full explanation).
-    if (getContext().getTypeSize(Ty) <= 4 * 32 &&
-        (!IsMCUABI || State.FreeRegs == 0) && canExpandIndirectArgument(Ty))
+    if (TI.Width <= 4 * 32 && (!IsMCUABI || State.FreeRegs == 0) &&
+        canExpandIndirectArgument(Ty))
       return ABIArgInfo::getExpandWithPadding(
           IsFastCall || IsVectorCall || IsRegCall, PaddingType);
 
@@ -1750,14 +1838,24 @@ ABIArgInfo X86_32ABIInfo::classifyArgumentType(QualType Ty,
   }
 
   if (const VectorType *VT = Ty->getAs<VectorType>()) {
+    // On Windows, vectors are passed directly if registers are available, or
+    // indirectly if not. This avoids the need to align argument memory. Pass
+    // user-defined vector types larger than 512 bits indirectly for simplicity.
+    if (IsWin32StructABI) {
+      if (TI.Width <= 512 && State.FreeSSERegs > 0) {
+        --State.FreeSSERegs;
+        return ABIArgInfo::getDirectInReg();
+      }
+      return getIndirectResult(Ty, /*ByVal=*/false, State);
+    }
+
     // On Darwin, some vectors are passed in memory, we handle this by passing
     // it as an i8/i16/i32/i64.
     if (IsDarwinVectorABI) {
-      uint64_t Size = getContext().getTypeSize(Ty);
-      if ((Size == 8 || Size == 16 || Size == 32) ||
-          (Size == 64 && VT->getNumElements() == 1))
-        return ABIArgInfo::getDirect(llvm::IntegerType::get(getVMContext(),
-                                                            Size));
+      if ((TI.Width == 8 || TI.Width == 16 || TI.Width == 32) ||
+          (TI.Width == 64 && VT->getNumElements() == 1))
+        return ABIArgInfo::getDirect(
+            llvm::IntegerType::get(getVMContext(), TI.Width));
     }
 
     if (IsX86_MMXType(CGT.ConvertType(Ty)))
@@ -1772,12 +1870,21 @@ ABIArgInfo X86_32ABIInfo::classifyArgumentType(QualType Ty,
 
   bool InReg = shouldPrimitiveUseInReg(Ty, State);
 
-  if (Ty->isPromotableIntegerType()) {
+  if (isPromotableIntegerTypeForABI(Ty)) {
     if (InReg)
       return ABIArgInfo::getExtendInReg(Ty);
     return ABIArgInfo::getExtend(Ty);
   }
 
+  if (const auto * EIT = Ty->getAs<ExtIntType>()) {
+    if (EIT->getNumBits() <= 64) {
+      if (InReg)
+        return ABIArgInfo::getDirectInReg();
+      return ABIArgInfo::getDirect();
+    }
+    return getIndirectResult(Ty, /*ByVal=*/false, State);
+  }
+
   if (InReg)
     return ABIArgInfo::getDirectInReg();
   return ABIArgInfo::getDirect();
@@ -1787,9 +1894,10 @@ void X86_32ABIInfo::computeInfo(CGFunctionInfo &FI) const {
   CCState State(FI);
   if (IsMCUABI)
     State.FreeRegs = 3;
-  else if (State.CC == llvm::CallingConv::X86_FastCall)
+  else if (State.CC == llvm::CallingConv::X86_FastCall) {
     State.FreeRegs = 2;
-  else if (State.CC == llvm::CallingConv::X86_VectorCall) {
+    State.FreeSSERegs = 3;
+  } else if (State.CC == llvm::CallingConv::X86_VectorCall) {
     State.FreeRegs = 2;
     State.FreeSSERegs = 6;
   } else if (FI.getHasRegParm())
@@ -1797,6 +1905,11 @@ void X86_32ABIInfo::computeInfo(CGFunctionInfo &FI) const {
   else if (State.CC == llvm::CallingConv::X86_RegCall) {
     State.FreeRegs = 5;
     State.FreeSSERegs = 8;
+  } else if (IsWin32StructABI) {
+    // Since MSVC 2015, the first three SSE vectors have been passed in
+    // registers. The rest are passed indirectly.
+    State.FreeRegs = DefaultNumRegisterParameters;
+    State.FreeSSERegs = 3;
   } else
     State.FreeRegs = DefaultNumRegisterParameters;
 
@@ -1843,16 +1956,25 @@ X86_32ABIInfo::addFieldToArgStruct(SmallVector<llvm::Type *, 6> &FrameFields,
                                    CharUnits &StackOffset, ABIArgInfo &Info,
                                    QualType Type) const {
   // Arguments are always 4-byte-aligned.
-  CharUnits FieldAlign = CharUnits::fromQuantity(4);
+  CharUnits WordSize = CharUnits::fromQuantity(4);
+  assert(StackOffset.isMultipleOf(WordSize) && "unaligned inalloca struct");
 
-  assert(StackOffset.isMultipleOf(FieldAlign) && "unaligned inalloca struct");
-  Info = ABIArgInfo::getInAlloca(FrameFields.size());
-  FrameFields.push_back(CGT.ConvertTypeForMem(Type));
-  StackOffset += getContext().getTypeSizeInChars(Type);
+  // sret pointers and indirect things will require an extra pointer
+  // indirection, unless they are byval. Most things are byval, and will not
+  // require this indirection.
+  bool IsIndirect = false;
+  if (Info.isIndirect() && !Info.getIndirectByVal())
+    IsIndirect = true;
+  Info = ABIArgInfo::getInAlloca(FrameFields.size(), IsIndirect);
+  llvm::Type *LLTy = CGT.ConvertTypeForMem(Type);
+  if (IsIndirect)
+    LLTy = LLTy->getPointerTo(0);
+  FrameFields.push_back(LLTy);
+  StackOffset += IsIndirect ? WordSize : getContext().getTypeSizeInChars(Type);
 
   // Insert padding bytes to respect alignment.
   CharUnits FieldEnd = StackOffset;
-  StackOffset = FieldEnd.alignTo(FieldAlign);
+  StackOffset = FieldEnd.alignTo(WordSize);
   if (StackOffset != FieldEnd) {
     CharUnits NumBytes = StackOffset - FieldEnd;
     llvm::Type *Ty = llvm::Type::getInt8Ty(getVMContext());
@@ -1866,16 +1988,12 @@ static bool isArgInAlloca(const ABIArgInfo &Info) {
   switch (Info.getKind()) {
   case ABIArgInfo::InAlloca:
     return true;
-  case ABIArgInfo::Indirect:
-    assert(Info.getIndirectByVal());
-    return true;
   case ABIArgInfo::Ignore:
     return false;
+  case ABIArgInfo::Indirect:
   case ABIArgInfo::Direct:
   case ABIArgInfo::Extend:
-    if (Info.getInReg())
-      return false;
-    return true;
+    return !Info.getInReg();
   case ABIArgInfo::Expand:
   case ABIArgInfo::CoerceAndExpand:
     // These are aggregate types which are never passed in registers when
@@ -1909,8 +2027,7 @@ void X86_32ABIInfo::rewriteWithInAlloca(CGFunctionInfo &FI) const {
 
   // Put the sret parameter into the inalloca struct if it's in memory.
   if (Ret.isIndirect() && !Ret.getInReg()) {
-    CanQualType PtrTy = getContext().getPointerType(FI.getReturnType());
-    addFieldToArgStruct(FrameFields, StackOffset, Ret, PtrTy);
+    addFieldToArgStruct(FrameFields, StackOffset, Ret, FI.getReturnType());
     // On Windows, the hidden sret parameter is always returned in eax.
     Ret.setInAllocaSRet(IsWin32StructABI);
   }
@@ -2207,7 +2324,7 @@ public:
     if (info.isDirect()) {
       llvm::Type *ty = info.getCoerceToType();
       if (llvm::VectorType *vectorTy = dyn_cast_or_null<llvm::VectorType>(ty))
-        return (vectorTy->getBitWidth() > 128);
+        return vectorTy->getPrimitiveSizeInBits().getFixedSize() > 128;
     }
     return false;
   }
@@ -2280,7 +2397,7 @@ private:
 class X86_64TargetCodeGenInfo : public TargetCodeGenInfo {
 public:
   X86_64TargetCodeGenInfo(CodeGen::CodeGenTypes &CGT, X86AVXABILevel AVXLevel)
-      : TargetCodeGenInfo(new X86_64ABIInfo(CGT, AVXLevel)) {}
+      : TargetCodeGenInfo(std::make_unique<X86_64ABIInfo>(CGT, AVXLevel)) {}
 
   const X86_64ABIInfo &getABIInfo() const {
     return static_cast<const X86_64ABIInfo&>(TargetCodeGenInfo::getABIInfo());
@@ -2361,8 +2478,110 @@ public:
       }
     }
   }
+
+  void checkFunctionCallABI(CodeGenModule &CGM, SourceLocation CallLoc,
+                            const FunctionDecl *Caller,
+                            const FunctionDecl *Callee,
+                            const CallArgList &Args) const override;
 };
 
+static void initFeatureMaps(const ASTContext &Ctx,
+                            llvm::StringMap<bool> &CallerMap,
+                            const FunctionDecl *Caller,
+                            llvm::StringMap<bool> &CalleeMap,
+                            const FunctionDecl *Callee) {
+  if (CalleeMap.empty() && CallerMap.empty()) {
+    // The caller is potentially nullptr in the case where the call isn't in a
+    // function.  In this case, the getFunctionFeatureMap ensures we just get
+    // the TU level setting (since it cannot be modified by 'target'..
+    Ctx.getFunctionFeatureMap(CallerMap, Caller);
+    Ctx.getFunctionFeatureMap(CalleeMap, Callee);
+  }
+}
+
+static bool checkAVXParamFeature(DiagnosticsEngine &Diag,
+                                 SourceLocation CallLoc,
+                                 const llvm::StringMap<bool> &CallerMap,
+                                 const llvm::StringMap<bool> &CalleeMap,
+                                 QualType Ty, StringRef Feature,
+                                 bool IsArgument) {
+  bool CallerHasFeat = CallerMap.lookup(Feature);
+  bool CalleeHasFeat = CalleeMap.lookup(Feature);
+  if (!CallerHasFeat && !CalleeHasFeat)
+    return Diag.Report(CallLoc, diag::warn_avx_calling_convention)
+           << IsArgument << Ty << Feature;
+
+  // Mixing calling conventions here is very clearly an error.
+  if (!CallerHasFeat || !CalleeHasFeat)
+    return Diag.Report(CallLoc, diag::err_avx_calling_convention)
+           << IsArgument << Ty << Feature;
+
+  // Else, both caller and callee have the required feature, so there is no need
+  // to diagnose.
+  return false;
+}
+
+static bool checkAVXParam(DiagnosticsEngine &Diag, ASTContext &Ctx,
+                          SourceLocation CallLoc,
+                          const llvm::StringMap<bool> &CallerMap,
+                          const llvm::StringMap<bool> &CalleeMap, QualType Ty,
+                          bool IsArgument) {
+  uint64_t Size = Ctx.getTypeSize(Ty);
+  if (Size > 256)
+    return checkAVXParamFeature(Diag, CallLoc, CallerMap, CalleeMap, Ty,
+                                "avx512f", IsArgument);
+
+  if (Size > 128)
+    return checkAVXParamFeature(Diag, CallLoc, CallerMap, CalleeMap, Ty, "avx",
+                                IsArgument);
+
+  return false;
+}
+
+void X86_64TargetCodeGenInfo::checkFunctionCallABI(
+    CodeGenModule &CGM, SourceLocation CallLoc, const FunctionDecl *Caller,
+    const FunctionDecl *Callee, const CallArgList &Args) const {
+  llvm::StringMap<bool> CallerMap;
+  llvm::StringMap<bool> CalleeMap;
+  unsigned ArgIndex = 0;
+
+  // We need to loop through the actual call arguments rather than the the
+  // function's parameters, in case this variadic.
+  for (const CallArg &Arg : Args) {
+    // The "avx" feature changes how vectors >128 in size are passed. "avx512f"
+    // additionally changes how vectors >256 in size are passed. Like GCC, we
+    // warn when a function is called with an argument where this will change.
+    // Unlike GCC, we also error when it is an obvious ABI mismatch, that is,
+    // the caller and callee features are mismatched.
+    // Unfortunately, we cannot do this diagnostic in SEMA, since the callee can
+    // change its ABI with attribute-target after this call.
+    if (Arg.getType()->isVectorType() &&
+        CGM.getContext().getTypeSize(Arg.getType()) > 128) {
+      initFeatureMaps(CGM.getContext(), CallerMap, Caller, CalleeMap, Callee);
+      QualType Ty = Arg.getType();
+      // The CallArg seems to have desugared the type already, so for clearer
+      // diagnostics, replace it with the type in the FunctionDecl if possible.
+      if (ArgIndex < Callee->getNumParams())
+        Ty = Callee->getParamDecl(ArgIndex)->getType();
+
+      if (checkAVXParam(CGM.getDiags(), CGM.getContext(), CallLoc, CallerMap,
+                        CalleeMap, Ty, /*IsArgument*/ true))
+        return;
+    }
+    ++ArgIndex;
+  }
+
+  // Check return always, as we don't have a good way of knowing in codegen
+  // whether this value is used, tail-called, etc.
+  if (Callee->getReturnType()->isVectorType() &&
+      CGM.getContext().getTypeSize(Callee->getReturnType()) > 128) {
+    initFeatureMaps(CGM.getContext(), CallerMap, Caller, CalleeMap, Callee);
+    checkAVXParam(CGM.getDiags(), CGM.getContext(), CallLoc, CallerMap,
+                  CalleeMap, Callee->getReturnType(),
+                  /*IsArgument*/ false);
+  }
+}
+
 static std::string qualifyWindowsLibrary(llvm::StringRef Lib) {
   // If the argument does not end in .lib, automatically add the suffix.
   // If the argument contains a space, enclose it in quotes.
@@ -2424,7 +2643,7 @@ class WinX86_64TargetCodeGenInfo : public TargetCodeGenInfo {
 public:
   WinX86_64TargetCodeGenInfo(CodeGen::CodeGenTypes &CGT,
                              X86AVXABILevel AVXLevel)
-      : TargetCodeGenInfo(new WinX86_64ABIInfo(CGT, AVXLevel)) {}
+      : TargetCodeGenInfo(std::make_unique<WinX86_64ABIInfo>(CGT, AVXLevel)) {}
 
   void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
                            CodeGen::CodeGenModule &CGM) const override;
@@ -2731,6 +2950,15 @@ void X86_64ABIInfo::classify(QualType Ty, uint64_t OffsetBase,
     return;
   }
 
+  if (const auto *EITy = Ty->getAs<ExtIntType>()) {
+    if (EITy->getNumBits() <= 64)
+      Current = Integer;
+    else if (EITy->getNumBits() <= 128)
+      Lo = Hi = Integer;
+    // Larger values need to get passed in memory.
+    return;
+  }
+
   if (const ConstantArrayType *AT = getContext().getAsConstantArrayType(Ty)) {
     // Arrays are treated like structures.
 
@@ -2905,8 +3133,11 @@ ABIArgInfo X86_64ABIInfo::getIndirectReturnResult(QualType Ty) const {
     if (const EnumType *EnumTy = Ty->getAs<EnumType>())
       Ty = EnumTy->getDecl()->getIntegerType();
 
-    return (Ty->isPromotableIntegerType() ? ABIArgInfo::getExtend(Ty)
-                                          : ABIArgInfo::getDirect());
+    if (Ty->isExtIntType())
+      return getNaturalAlignIndirect(Ty);
+
+    return (isPromotableIntegerTypeForABI(Ty) ? ABIArgInfo::getExtend(Ty)
+                                              : ABIArgInfo::getDirect());
   }
 
   return getNaturalAlignIndirect(Ty);
@@ -2938,13 +3169,14 @@ ABIArgInfo X86_64ABIInfo::getIndirectResult(QualType Ty,
   // the argument in the free register. This does not seem to happen currently,
   // but this code would be much safer if we could mark the argument with
   // 'onstack'. See PR12193.
-  if (!isAggregateTypeForABI(Ty) && !IsIllegalVectorType(Ty)) {
+  if (!isAggregateTypeForABI(Ty) && !IsIllegalVectorType(Ty) &&
+      !Ty->isExtIntType()) {
     // Treat an enum type as its underlying type.
     if (const EnumType *EnumTy = Ty->getAs<EnumType>())
       Ty = EnumTy->getDecl()->getIntegerType();
 
-    return (Ty->isPromotableIntegerType() ? ABIArgInfo::getExtend(Ty)
-                                          : ABIArgInfo::getDirect());
+    return (isPromotableIntegerTypeForABI(Ty) ? ABIArgInfo::getExtend(Ty)
+                                              : ABIArgInfo::getDirect());
   }
 
   if (CGCXXABI::RecordArgABI RAA = getRecordArgABI(Ty, getCXXABI()))
@@ -3001,11 +3233,11 @@ llvm::Type *X86_64ABIInfo::GetByteVectorType(QualType Ty) const {
     // Don't pass vXi128 vectors in their native type, the backend can't
     // legalize them.
     if (passInt128VectorsInMem() &&
-        IRType->getVectorElementType()->isIntegerTy(128)) {
+        cast<llvm::VectorType>(IRType)->getElementType()->isIntegerTy(128)) {
       // Use a vXi64 vector.
       uint64_t Size = getContext().getTypeSize(Ty);
-      return llvm::VectorType::get(llvm::Type::getInt64Ty(getVMContext()),
-                                   Size / 64);
+      return llvm::FixedVectorType::get(llvm::Type::getInt64Ty(getVMContext()),
+                                        Size / 64);
     }
 
     return IRType;
@@ -3020,8 +3252,8 @@ llvm::Type *X86_64ABIInfo::GetByteVectorType(QualType Ty) const {
 
 
   // Return a LLVM IR vector type based on the size of 'Ty'.
-  return llvm::VectorType::get(llvm::Type::getDoubleTy(getVMContext()),
-                               Size / 64);
+  return llvm::FixedVectorType::get(llvm::Type::getDoubleTy(getVMContext()),
+                                    Size / 64);
 }
 
 /// BitsContainNoUserData - Return true if the specified [start,end) bit range
@@ -3155,7 +3387,8 @@ GetSSETypeAtOffset(llvm::Type *IRType, unsigned IROffset,
   // case.
   if (ContainsFloatAtOffset(IRType, IROffset, getDataLayout()) &&
       ContainsFloatAtOffset(IRType, IROffset+4, getDataLayout()))
-    return llvm::VectorType::get(llvm::Type::getFloatTy(getVMContext()), 2);
+    return llvm::FixedVectorType::get(llvm::Type::getFloatTy(getVMContext()),
+                                      2);
 
   return llvm::Type::getDoubleTy(getVMContext());
 }
@@ -3326,7 +3559,7 @@ classifyReturnType(QualType RetTy) const {
         RetTy = EnumTy->getDecl()->getIntegerType();
 
       if (RetTy->isIntegralOrEnumerationType() &&
-          RetTy->isPromotableIntegerType())
+          isPromotableIntegerTypeForABI(RetTy))
         return ABIArgInfo::getExtend(RetTy);
     }
     break;
@@ -3471,7 +3704,7 @@ ABIArgInfo X86_64ABIInfo::classifyArgumentType(
         Ty = EnumTy->getDecl()->getIntegerType();
 
       if (Ty->isIntegralOrEnumerationType() &&
-          Ty->isPromotableIntegerType())
+          isPromotableIntegerTypeForABI(Ty))
         return ABIArgInfo::getExtend(Ty);
     }
 
@@ -3627,14 +3860,15 @@ void X86_64ABIInfo::computeInfo(CGFunctionInfo &FI) const {
       } else {
         FI.getReturnInfo() = getIndirectReturnResult(FI.getReturnType());
       }
-    } else if (IsRegCall && FI.getReturnType()->getAs<ComplexType>()) {
+    } else if (IsRegCall && FI.getReturnType()->getAs<ComplexType>() &&
+               getContext().getCanonicalType(FI.getReturnType()
+                                                 ->getAs<ComplexType>()
+                                                 ->getElementType()) ==
+                   getContext().LongDoubleTy)
       // Complex Long Double Type is passed in Memory when Regcall
       // calling convention is used.
-      const ComplexType *CT = FI.getReturnType()->getAs<ComplexType>();
-      if (getContext().getCanonicalType(CT->getElementType()) ==
-          getContext().LongDoubleTy)
-        FI.getReturnInfo() = getIndirectReturnResult(FI.getReturnType());
-    } else
+      FI.getReturnInfo() = getIndirectReturnResult(FI.getReturnType());
+    else
       FI.getReturnInfo() = classifyReturnType(FI.getReturnType());
   }
 
@@ -4021,14 +4255,25 @@ ABIArgInfo WinX86_64ABIInfo::classify(QualType Ty, unsigned &FreeSSERegs,
 
       // Mingw64 GCC returns i128 in XMM0. Coerce to v2i64 to handle that.
       // Clang matches them for compatibility.
-      return ABIArgInfo::getDirect(
-          llvm::VectorType::get(llvm::Type::getInt64Ty(getVMContext()), 2));
+      return ABIArgInfo::getDirect(llvm::FixedVectorType::get(
+          llvm::Type::getInt64Ty(getVMContext()), 2));
 
     default:
       break;
     }
   }
 
+  if (Ty->isExtIntType()) {
+    // MS x64 ABI requirement: "Any argument that doesn't fit in 8 bytes, or is
+    // not 1, 2, 4, or 8 bytes, must be passed by reference."
+    // However, non-power-of-two _ExtInts will be passed as 1,2,4 or 8 bytes
+    // anyway as long is it fits in them, so we don't have to check the power of
+    // 2.
+    if (Width <= 64)
+      return ABIArgInfo::getDirect();
+    return ABIArgInfo::getIndirect(Align, /*ByVal=*/false);
+  }
+
   return ABIArgInfo::getDirect();
 }
 
@@ -4118,6 +4363,224 @@ Address WinX86_64ABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr,
                           /*allowHigherAlign*/ false);
 }
 
+static bool PPC_initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF,
+                                        llvm::Value *Address, bool Is64Bit,
+                                        bool IsAIX) {
+  // This is calculated from the LLVM and GCC tables and verified
+  // against gcc output.  AFAIK all PPC ABIs use the same encoding.
+
+  CodeGen::CGBuilderTy &Builder = CGF.Builder;
+
+  llvm::IntegerType *i8 = CGF.Int8Ty;
+  llvm::Value *Four8 = llvm::ConstantInt::get(i8, 4);
+  llvm::Value *Eight8 = llvm::ConstantInt::get(i8, 8);
+  llvm::Value *Sixteen8 = llvm::ConstantInt::get(i8, 16);
+
+  // 0-31: r0-31, the 4-byte or 8-byte general-purpose registers
+  AssignToArrayRange(Builder, Address, Is64Bit ? Eight8 : Four8, 0, 31);
+
+  // 32-63: fp0-31, the 8-byte floating-point registers
+  AssignToArrayRange(Builder, Address, Eight8, 32, 63);
+
+  // 64-67 are various 4-byte or 8-byte special-purpose registers:
+  // 64: mq
+  // 65: lr
+  // 66: ctr
+  // 67: ap
+  AssignToArrayRange(Builder, Address, Is64Bit ? Eight8 : Four8, 64, 67);
+
+  // 68-76 are various 4-byte special-purpose registers:
+  // 68-75 cr0-7
+  // 76: xer
+  AssignToArrayRange(Builder, Address, Four8, 68, 76);
+
+  // 77-108: v0-31, the 16-byte vector registers
+  AssignToArrayRange(Builder, Address, Sixteen8, 77, 108);
+
+  // 109: vrsave
+  // 110: vscr
+  AssignToArrayRange(Builder, Address, Is64Bit ? Eight8 : Four8, 109, 110);
+
+  // AIX does not utilize the rest of the registers.
+  if (IsAIX)
+    return false;
+
+  // 111: spe_acc
+  // 112: spefscr
+  // 113: sfp
+  AssignToArrayRange(Builder, Address, Is64Bit ? Eight8 : Four8, 111, 113);
+
+  if (!Is64Bit)
+    return false;
+
+  // TODO: Need to verify if these registers are used on 64 bit AIX with Power8
+  // or above CPU.
+  // 64-bit only registers:
+  // 114: tfhar
+  // 115: tfiar
+  // 116: texasr
+  AssignToArrayRange(Builder, Address, Eight8, 114, 116);
+
+  return false;
+}
+
+// AIX
+namespace {
+/// AIXABIInfo - The AIX XCOFF ABI information.
+class AIXABIInfo : public ABIInfo {
+  const bool Is64Bit;
+  const unsigned PtrByteSize;
+  CharUnits getParamTypeAlignment(QualType Ty) const;
+
+public:
+  AIXABIInfo(CodeGen::CodeGenTypes &CGT, bool Is64Bit)
+      : ABIInfo(CGT), Is64Bit(Is64Bit), PtrByteSize(Is64Bit ? 8 : 4) {}
+
+  bool isPromotableTypeForABI(QualType Ty) const;
+
+  ABIArgInfo classifyReturnType(QualType RetTy) const;
+  ABIArgInfo classifyArgumentType(QualType Ty) const;
+
+  void computeInfo(CGFunctionInfo &FI) const override {
+    if (!getCXXABI().classifyReturnType(FI))
+      FI.getReturnInfo() = classifyReturnType(FI.getReturnType());
+
+    for (auto &I : FI.arguments())
+      I.info = classifyArgumentType(I.type);
+  }
+
+  Address EmitVAArg(CodeGenFunction &CGF, Address VAListAddr,
+                    QualType Ty) const override;
+};
+
+class AIXTargetCodeGenInfo : public TargetCodeGenInfo {
+  const bool Is64Bit;
+
+public:
+  AIXTargetCodeGenInfo(CodeGen::CodeGenTypes &CGT, bool Is64Bit)
+      : TargetCodeGenInfo(std::make_unique<AIXABIInfo>(CGT, Is64Bit)),
+        Is64Bit(Is64Bit) {}
+  int getDwarfEHStackPointer(CodeGen::CodeGenModule &M) const override {
+    return 1; // r1 is the dedicated stack pointer
+  }
+
+  bool initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF,
+                               llvm::Value *Address) const override;
+};
+} // namespace
+
+// Return true if the ABI requires Ty to be passed sign- or zero-
+// extended to 32/64 bits.
+bool AIXABIInfo::isPromotableTypeForABI(QualType Ty) const {
+  // Treat an enum type as its underlying type.
+  if (const EnumType *EnumTy = Ty->getAs<EnumType>())
+    Ty = EnumTy->getDecl()->getIntegerType();
+
+  // Promotable integer types are required to be promoted by the ABI.
+  if (Ty->isPromotableIntegerType())
+    return true;
+
+  if (!Is64Bit)
+    return false;
+
+  // For 64 bit mode, in addition to the usual promotable integer types, we also
+  // need to extend all 32-bit types, since the ABI requires promotion to 64
+  // bits.
+  if (const BuiltinType *BT = Ty->getAs<BuiltinType>())
+    switch (BT->getKind()) {
+    case BuiltinType::Int:
+    case BuiltinType::UInt:
+      return true;
+    default:
+      break;
+    }
+
+  return false;
+}
+
+ABIArgInfo AIXABIInfo::classifyReturnType(QualType RetTy) const {
+  if (RetTy->isAnyComplexType())
+    llvm::report_fatal_error("complex type is not supported on AIX yet");
+
+  if (RetTy->isVectorType())
+    llvm::report_fatal_error("vector type is not supported on AIX yet");
+
+  if (RetTy->isVoidType())
+    return ABIArgInfo::getIgnore();
+
+  // TODO:  Evaluate if AIX power alignment rule would have an impact on the
+  // alignment here.
+  if (isAggregateTypeForABI(RetTy))
+    return getNaturalAlignIndirect(RetTy);
+
+  return (isPromotableTypeForABI(RetTy) ? ABIArgInfo::getExtend(RetTy)
+                                        : ABIArgInfo::getDirect());
+}
+
+ABIArgInfo AIXABIInfo::classifyArgumentType(QualType Ty) const {
+  Ty = useFirstFieldIfTransparentUnion(Ty);
+
+  if (Ty->isAnyComplexType())
+    llvm::report_fatal_error("complex type is not supported on AIX yet");
+
+  if (Ty->isVectorType())
+    llvm::report_fatal_error("vector type is not supported on AIX yet");
+
+  // TODO:  Evaluate if AIX power alignment rule would have an impact on the
+  // alignment here.
+  if (isAggregateTypeForABI(Ty)) {
+    // Records with non-trivial destructors/copy-constructors should not be
+    // passed by value.
+    if (CGCXXABI::RecordArgABI RAA = getRecordArgABI(Ty, getCXXABI()))
+      return getNaturalAlignIndirect(Ty, RAA == CGCXXABI::RAA_DirectInMemory);
+
+    CharUnits CCAlign = getParamTypeAlignment(Ty);
+    CharUnits TyAlign = getContext().getTypeAlignInChars(Ty);
+
+    return ABIArgInfo::getIndirect(CCAlign, /*ByVal*/ true,
+                                   /*Realign*/ TyAlign > CCAlign);
+  }
+
+  return (isPromotableTypeForABI(Ty) ? ABIArgInfo::getExtend(Ty)
+                                     : ABIArgInfo::getDirect());
+}
+
+CharUnits AIXABIInfo::getParamTypeAlignment(QualType Ty) const {
+  if (Ty->isAnyComplexType())
+    llvm::report_fatal_error("complex type is not supported on AIX yet");
+
+  if (Ty->isVectorType())
+    llvm::report_fatal_error("vector type is not supported on AIX yet");
+
+  // If the structure contains a vector type, the alignment is 16.
+  if (isRecordWithSIMDVectorType(getContext(), Ty))
+    return CharUnits::fromQuantity(16);
+
+  return CharUnits::fromQuantity(PtrByteSize);
+}
+
+Address AIXABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr,
+                              QualType Ty) const {
+  if (Ty->isAnyComplexType())
+    llvm::report_fatal_error("complex type is not supported on AIX yet");
+
+  if (Ty->isVectorType())
+    llvm::report_fatal_error("vector type is not supported on AIX yet");
+
+  auto TypeInfo = getContext().getTypeInfoInChars(Ty);
+  TypeInfo.second = getParamTypeAlignment(Ty);
+
+  CharUnits SlotSize = CharUnits::fromQuantity(PtrByteSize);
+
+  return emitVoidPtrVAArg(CGF, VAListAddr, Ty, /*Indirect*/ false, TypeInfo,
+                          SlotSize, /*AllowHigher*/ true);
+}
+
+bool AIXTargetCodeGenInfo::initDwarfEHRegSizeTable(
+    CodeGen::CodeGenFunction &CGF, llvm::Value *Address) const {
+  return PPC_initDwarfEHRegSizeTable(CGF, Address, Is64Bit, /*IsAIX*/ true);
+}
+
 // PowerPC-32
 namespace {
 /// PPC32_SVR4_ABIInfo - The 32-bit PowerPC ELF (SVR4) ABI information.
@@ -4150,8 +4613,8 @@ class PPC32TargetCodeGenInfo : public TargetCodeGenInfo {
 public:
   PPC32TargetCodeGenInfo(CodeGenTypes &CGT, bool SoftFloatABI,
                          bool RetSmallStructInRegABI)
-      : TargetCodeGenInfo(new PPC32_SVR4_ABIInfo(CGT, SoftFloatABI,
-                                                 RetSmallStructInRegABI)) {}
+      : TargetCodeGenInfo(std::make_unique<PPC32_SVR4_ABIInfo>(
+            CGT, SoftFloatABI, RetSmallStructInRegABI)) {}
 
   static bool isStructReturnInRegABI(const llvm::Triple &Triple,
                                      const CodeGenOptions &Opts);
@@ -4167,7 +4630,7 @@ public:
 }
 
 CharUnits PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const {
-  // Complex types are passed just like their elements
+  // Complex types are passed just like their elements.
   if (const ComplexType *CTy = Ty->getAs<ComplexType>())
     Ty = CTy->getElementType();
 
@@ -4394,42 +4857,8 @@ bool PPC32TargetCodeGenInfo::isStructReturnInRegABI(
 bool
 PPC32TargetCodeGenInfo::initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF,
                                                 llvm::Value *Address) const {
-  // This is calculated from the LLVM and GCC tables and verified
-  // against gcc output.  AFAIK all ABIs use the same encoding.
-
-  CodeGen::CGBuilderTy &Builder = CGF.Builder;
-
-  llvm::IntegerType *i8 = CGF.Int8Ty;
-  llvm::Value *Four8 = llvm::ConstantInt::get(i8, 4);
-  llvm::Value *Eight8 = llvm::ConstantInt::get(i8, 8);
-  llvm::Value *Sixteen8 = llvm::ConstantInt::get(i8, 16);
-
-  // 0-31: r0-31, the 4-byte general-purpose registers
-  AssignToArrayRange(Builder, Address, Four8, 0, 31);
-
-  // 32-63: fp0-31, the 8-byte floating-point registers
-  AssignToArrayRange(Builder, Address, Eight8, 32, 63);
-
-  // 64-76 are various 4-byte special-purpose registers:
-  // 64: mq
-  // 65: lr
-  // 66: ctr
-  // 67: ap
-  // 68-75 cr0-7
-  // 76: xer
-  AssignToArrayRange(Builder, Address, Four8, 64, 76);
-
-  // 77-108: v0-31, the 16-byte vector registers
-  AssignToArrayRange(Builder, Address, Sixteen8, 77, 108);
-
-  // 109: vrsave
-  // 110: vscr
-  // 111: spe_acc
-  // 112: spefscr
-  // 113: sfp
-  AssignToArrayRange(Builder, Address, Four8, 109, 113);
-
-  return false;
+  return PPC_initDwarfEHRegSizeTable(CGF, Address, /*Is64Bit*/ false,
+                                     /*IsAIX*/ false);
 }
 
 // PowerPC-64
@@ -4540,8 +4969,8 @@ public:
   PPC64_SVR4_TargetCodeGenInfo(CodeGenTypes &CGT,
                                PPC64_SVR4_ABIInfo::ABIKind Kind, bool HasQPX,
                                bool SoftFloatABI)
-      : TargetCodeGenInfo(new PPC64_SVR4_ABIInfo(CGT, Kind, HasQPX,
-                                                 SoftFloatABI)) {}
+      : TargetCodeGenInfo(std::make_unique<PPC64_SVR4_ABIInfo>(
+            CGT, Kind, HasQPX, SoftFloatABI)) {}
 
   int getDwarfEHStackPointer(CodeGen::CodeGenModule &M) const override {
     // This is recovered from gcc output.
@@ -4576,7 +5005,7 @@ PPC64_SVR4_ABIInfo::isPromotableTypeForABI(QualType Ty) const {
     Ty = EnumTy->getDecl()->getIntegerType();
 
   // Promotable integer types are required to be promoted by the ABI.
-  if (Ty->isPromotableIntegerType())
+  if (isPromotableIntegerTypeForABI(Ty))
     return true;
 
   // In addition to the usual promotable integer types, we also need to
@@ -4590,6 +5019,10 @@ PPC64_SVR4_ABIInfo::isPromotableTypeForABI(QualType Ty) const {
       break;
     }
 
+  if (const auto *EIT = Ty->getAs<ExtIntType>())
+    if (EIT->getNumBits() < 64)
+      return true;
+
   return false;
 }
 
@@ -4807,6 +5240,10 @@ PPC64_SVR4_ABIInfo::classifyArgumentType(QualType Ty) const {
     }
   }
 
+  if (const auto *EIT = Ty->getAs<ExtIntType>())
+    if (EIT->getNumBits() > 128)
+      return getNaturalAlignIndirect(Ty, /*ByVal=*/true);
+
   if (isAggregateTypeForABI(Ty)) {
     if (CGCXXABI::RecordArgABI RAA = getRecordArgABI(Ty, getCXXABI()))
       return getNaturalAlignIndirect(Ty, RAA == CGCXXABI::RAA_DirectInMemory);
@@ -4879,6 +5316,10 @@ PPC64_SVR4_ABIInfo::classifyReturnType(QualType RetTy) const {
     }
   }
 
+  if (const auto *EIT = RetTy->getAs<ExtIntType>())
+    if (EIT->getNumBits() > 128)
+      return getNaturalAlignIndirect(RetTy, /*ByVal=*/false);
+
   if (isAggregateTypeForABI(RetTy)) {
     // ELFv2 homogeneous aggregates are returned as array types.
     const Type *Base = nullptr;
@@ -4959,71 +5400,24 @@ Address PPC64_SVR4_ABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr,
     }
   }
 
-  // Otherwise, just use the general rule.
-  return emitVoidPtrVAArg(CGF, VAListAddr, Ty, /*Indirect*/ false,
-                          TypeInfo, SlotSize, /*AllowHigher*/ true);
-}
-
-static bool
-PPC64_initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF,
-                              llvm::Value *Address) {
-  // This is calculated from the LLVM and GCC tables and verified
-  // against gcc output.  AFAIK all ABIs use the same encoding.
-
-  CodeGen::CGBuilderTy &Builder = CGF.Builder;
-
-  llvm::IntegerType *i8 = CGF.Int8Ty;
-  llvm::Value *Four8 = llvm::ConstantInt::get(i8, 4);
-  llvm::Value *Eight8 = llvm::ConstantInt::get(i8, 8);
-  llvm::Value *Sixteen8 = llvm::ConstantInt::get(i8, 16);
-
-  // 0-31: r0-31, the 8-byte general-purpose registers
-  AssignToArrayRange(Builder, Address, Eight8, 0, 31);
-
-  // 32-63: fp0-31, the 8-byte floating-point registers
-  AssignToArrayRange(Builder, Address, Eight8, 32, 63);
-
-  // 64-67 are various 8-byte special-purpose registers:
-  // 64: mq
-  // 65: lr
-  // 66: ctr
-  // 67: ap
-  AssignToArrayRange(Builder, Address, Eight8, 64, 67);
-
-  // 68-76 are various 4-byte special-purpose registers:
-  // 68-75 cr0-7
-  // 76: xer
-  AssignToArrayRange(Builder, Address, Four8, 68, 76);
-
-  // 77-108: v0-31, the 16-byte vector registers
-  AssignToArrayRange(Builder, Address, Sixteen8, 77, 108);
-
-  // 109: vrsave
-  // 110: vscr
-  // 111: spe_acc
-  // 112: spefscr
-  // 113: sfp
-  // 114: tfhar
-  // 115: tfiar
-  // 116: texasr
-  AssignToArrayRange(Builder, Address, Eight8, 109, 116);
-
-  return false;
+  // Otherwise, just use the general rule.
+  return emitVoidPtrVAArg(CGF, VAListAddr, Ty, /*Indirect*/ false,
+                          TypeInfo, SlotSize, /*AllowHigher*/ true);
 }
 
 bool
 PPC64_SVR4_TargetCodeGenInfo::initDwarfEHRegSizeTable(
   CodeGen::CodeGenFunction &CGF,
   llvm::Value *Address) const {
-
-  return PPC64_initDwarfEHRegSizeTable(CGF, Address);
+  return PPC_initDwarfEHRegSizeTable(CGF, Address, /*Is64Bit*/ true,
+                                     /*IsAIX*/ false);
 }
 
 bool
 PPC64TargetCodeGenInfo::initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF,
                                                 llvm::Value *Address) const {
-
-  return PPC64_initDwarfEHRegSizeTable(CGF, Address);
+  return PPC_initDwarfEHRegSizeTable(CGF, Address, /*Is64Bit*/ true,
+                                     /*IsAIX*/ false);
 }
 
 //===----------------------------------------------------------------------===//
@@ -5076,6 +5470,11 @@ private:
 
   Address EmitVAArg(CodeGenFunction &CGF, Address VAListAddr,
                     QualType Ty) const override {
+    llvm::Type *BaseTy = CGF.ConvertType(Ty);
+    if (isa<llvm::ScalableVectorType>(BaseTy))
+      llvm::report_fatal_error("Passing SVE types to variadic functions is "
+                               "currently not supported");
+
     return Kind == Win64 ? EmitMSVAArg(CGF, VAListAddr, Ty)
                          : isDarwinPCS() ? EmitDarwinVAArg(VAListAddr, Ty, CGF)
                                          : EmitAAPCSVAArg(VAListAddr, Ty, CGF);
@@ -5094,12 +5493,16 @@ private:
 
   bool isLegalVectorTypeForSwift(CharUnits totalSize, llvm::Type *eltTy,
                                  unsigned elts) const override;
+
+  bool allowBFloatArgsAndRet() const override {
+    return getTarget().hasBFloat16Type();
+  }
 };
 
 class AArch64TargetCodeGenInfo : public TargetCodeGenInfo {
 public:
   AArch64TargetCodeGenInfo(CodeGenTypes &CGT, AArch64ABIInfo::ABIKind Kind)
-      : TargetCodeGenInfo(new AArch64ABIInfo(CGT, Kind)) {}
+      : TargetCodeGenInfo(std::make_unique<AArch64ABIInfo>(CGT, Kind)) {}
 
   StringRef getARCRetainAutoreleasedReturnValueMarker() const override {
     return "mov\tfp, fp\t\t// marker for objc_retainAutoreleaseReturnValue";
@@ -5117,9 +5520,11 @@ public:
     if (!FD)
       return;
 
-    CodeGenOptions::SignReturnAddressScope Scope = CGM.getCodeGenOpts().getSignReturnAddress();
-    CodeGenOptions::SignReturnAddressKeyValue Key = CGM.getCodeGenOpts().getSignReturnAddressKey();
-    bool BranchTargetEnforcement = CGM.getCodeGenOpts().BranchTargetEnforcement;
+    LangOptions::SignReturnAddressScopeKind Scope =
+        CGM.getLangOpts().getSignReturnAddressScope();
+    LangOptions::SignReturnAddressKeyKind Key =
+        CGM.getLangOpts().getSignReturnAddressKey();
+    bool BranchTargetEnforcement = CGM.getLangOpts().BranchTargetEnforcement;
     if (const auto *TA = FD->getAttr<TargetAttr>()) {
       ParsedTargetAttr Attr = TA->parse();
       if (!Attr.BranchProtection.empty()) {
@@ -5135,14 +5540,14 @@ public:
     }
 
     auto *Fn = cast<llvm::Function>(GV);
-    if (Scope != CodeGenOptions::SignReturnAddressScope::None) {
+    if (Scope != LangOptions::SignReturnAddressScopeKind::None) {
       Fn->addFnAttr("sign-return-address",
-                    Scope == CodeGenOptions::SignReturnAddressScope::All
+                    Scope == LangOptions::SignReturnAddressScopeKind::All
                         ? "all"
                         : "non-leaf");
 
       Fn->addFnAttr("sign-return-address-key",
-                    Key == CodeGenOptions::SignReturnAddressKeyValue::AKey
+                    Key == LangOptions::SignReturnAddressKeyKind::AKey
                         ? "a_key"
                         : "b_key");
     }
@@ -5196,13 +5601,13 @@ ABIArgInfo AArch64ABIInfo::classifyArgumentType(QualType Ty) const {
       return ABIArgInfo::getDirect(ResType);
     }
     if (Size == 64) {
-      llvm::Type *ResType =
-          llvm::VectorType::get(llvm::Type::getInt32Ty(getVMContext()), 2);
+      auto *ResType =
+          llvm::FixedVectorType::get(llvm::Type::getInt32Ty(getVMContext()), 2);
       return ABIArgInfo::getDirect(ResType);
     }
     if (Size == 128) {
-      llvm::Type *ResType =
-          llvm::VectorType::get(llvm::Type::getInt32Ty(getVMContext()), 4);
+      auto *ResType =
+          llvm::FixedVectorType::get(llvm::Type::getInt32Ty(getVMContext()), 4);
       return ABIArgInfo::getDirect(ResType);
     }
     return getNaturalAlignIndirect(Ty, /*ByVal=*/false);
@@ -5213,7 +5618,11 @@ ABIArgInfo AArch64ABIInfo::classifyArgumentType(QualType Ty) const {
     if (const EnumType *EnumTy = Ty->getAs<EnumType>())
       Ty = EnumTy->getDecl()->getIntegerType();
 
-    return (Ty->isPromotableIntegerType() && isDarwinPCS()
+    if (const auto *EIT = Ty->getAs<ExtIntType>())
+      if (EIT->getNumBits() > 128)
+        return getNaturalAlignIndirect(Ty);
+
+    return (isPromotableIntegerTypeForABI(Ty) && isDarwinPCS()
                 ? ABIArgInfo::getExtend(Ty)
                 : ABIArgInfo::getDirect());
   }
@@ -5290,7 +5699,11 @@ ABIArgInfo AArch64ABIInfo::classifyReturnType(QualType RetTy,
     if (const EnumType *EnumTy = RetTy->getAs<EnumType>())
       RetTy = EnumTy->getDecl()->getIntegerType();
 
-    return (RetTy->isPromotableIntegerType() && isDarwinPCS()
+    if (const auto *EIT = RetTy->getAs<ExtIntType>())
+      if (EIT->getNumBits() > 128)
+        return getNaturalAlignIndirect(RetTy);
+
+    return (isPromotableIntegerTypeForABI(RetTy) && isDarwinPCS()
                 ? ABIArgInfo::getExtend(RetTy)
                 : ABIArgInfo::getDirect());
   }
@@ -5689,11 +6102,14 @@ public:
 
 private:
   ABIKind Kind;
+  bool IsFloatABISoftFP;
 
 public:
   ARMABIInfo(CodeGenTypes &CGT, ABIKind _Kind)
       : SwiftABIInfo(CGT), Kind(_Kind) {
     setCCs();
+    IsFloatABISoftFP = CGT.getCodeGenOpts().FloatABI == "softfp" ||
+        CGT.getCodeGenOpts().FloatABI == ""; // default
   }
 
   bool isEABI() const {
@@ -5724,6 +6140,10 @@ public:
 
   ABIKind getABIKind() const { return Kind; }
 
+  bool allowBFloatArgsAndRet() const override {
+    return !IsFloatABISoftFP && getTarget().hasBFloat16Type();
+  }
+
 private:
   ABIArgInfo classifyReturnType(QualType RetTy, bool isVariadic,
                                 unsigned functionCallConv) const;
@@ -5764,7 +6184,7 @@ private:
 class ARMTargetCodeGenInfo : public TargetCodeGenInfo {
 public:
   ARMTargetCodeGenInfo(CodeGenTypes &CGT, ARMABIInfo::ABIKind K)
-    :TargetCodeGenInfo(new ARMABIInfo(CGT, K)) {}
+      : TargetCodeGenInfo(std::make_unique<ARMABIInfo>(CGT, K)) {}
 
   const ARMABIInfo &getABIInfo() const {
     return static_cast<const ARMABIInfo&>(TargetCodeGenInfo::getABIInfo());
@@ -5919,7 +6339,7 @@ ABIArgInfo ARMABIInfo::coerceIllegalVector(QualType Ty) const {
     return ABIArgInfo::getDirect(ResType);
   }
   if (Size == 64 || Size == 128) {
-    llvm::Type *ResType = llvm::VectorType::get(
+    auto *ResType = llvm::FixedVectorType::get(
         llvm::Type::getInt32Ty(getVMContext()), Size / 32);
     return ABIArgInfo::getDirect(ResType);
   }
@@ -5935,7 +6355,7 @@ ABIArgInfo ARMABIInfo::classifyHomogeneousAggregate(QualType Ty,
     // FP16 vectors should be converted to integer vectors
     if (!getTarget().hasLegalHalfType() && containsAnyFP16Vectors(Ty)) {
       uint64_t Size = getContext().getTypeSize(VT);
-      llvm::Type *NewVecTy = llvm::VectorType::get(
+      auto *NewVecTy = llvm::FixedVectorType::get(
           llvm::Type::getInt32Ty(getVMContext()), Size / 32);
       llvm::Type *Ty = llvm::ArrayType::get(NewVecTy, Members);
       return ABIArgInfo::getDirect(Ty, 0, nullptr, false);
@@ -5963,25 +6383,18 @@ ABIArgInfo ARMABIInfo::classifyArgumentType(QualType Ty, bool isVariadic,
   if (isIllegalVectorType(Ty))
     return coerceIllegalVector(Ty);
 
-  // _Float16 and __fp16 get passed as if it were an int or float, but with
-  // the top 16 bits unspecified. This is not done for OpenCL as it handles the
-  // half type natively, and does not need to interwork with AAPCS code.
-  if ((Ty->isFloat16Type() || Ty->isHalfType()) &&
-      !getContext().getLangOpts().NativeHalfArgsAndReturns) {
-    llvm::Type *ResType = IsAAPCS_VFP ?
-      llvm::Type::getFloatTy(getVMContext()) :
-      llvm::Type::getInt32Ty(getVMContext());
-    return ABIArgInfo::getDirect(ResType);
-  }
-
   if (!isAggregateTypeForABI(Ty)) {
     // Treat an enum type as its underlying type.
     if (const EnumType *EnumTy = Ty->getAs<EnumType>()) {
       Ty = EnumTy->getDecl()->getIntegerType();
     }
 
-    return (Ty->isPromotableIntegerType() ? ABIArgInfo::getExtend(Ty)
-                                          : ABIArgInfo::getDirect());
+    if (const auto *EIT = Ty->getAs<ExtIntType>())
+      if (EIT->getNumBits() > 64)
+        return getNaturalAlignIndirect(Ty, /*ByVal=*/true);
+
+    return (isPromotableIntegerTypeForABI(Ty) ? ABIArgInfo::getExtend(Ty)
+                                              : ABIArgInfo::getDirect());
   }
 
   if (CGCXXABI::RecordArgABI RAA = getRecordArgABI(Ty, getCXXABI())) {
@@ -6163,31 +6576,27 @@ ABIArgInfo ARMABIInfo::classifyReturnType(QualType RetTy, bool isVariadic,
     // Large vector types should be returned via memory.
     if (getContext().getTypeSize(RetTy) > 128)
       return getNaturalAlignIndirect(RetTy);
-    // FP16 vectors should be converted to integer vectors
-    if (!getTarget().hasLegalHalfType() &&
+    // TODO: FP16/BF16 vectors should be converted to integer vectors
+    // This check is similar  to isIllegalVectorType - refactor?
+    if ((!getTarget().hasLegalHalfType() &&
         (VT->getElementType()->isFloat16Type() ||
-         VT->getElementType()->isHalfType()))
+         VT->getElementType()->isHalfType())) ||
+        (IsFloatABISoftFP &&
+         VT->getElementType()->isBFloat16Type()))
       return coerceIllegalVector(RetTy);
   }
 
-  // _Float16 and __fp16 get returned as if it were an int or float, but with
-  // the top 16 bits unspecified. This is not done for OpenCL as it handles the
-  // half type natively, and does not need to interwork with AAPCS code.
-  if ((RetTy->isFloat16Type() || RetTy->isHalfType()) &&
-      !getContext().getLangOpts().NativeHalfArgsAndReturns) {
-    llvm::Type *ResType = IsAAPCS_VFP ?
-      llvm::Type::getFloatTy(getVMContext()) :
-      llvm::Type::getInt32Ty(getVMContext());
-    return ABIArgInfo::getDirect(ResType);
-  }
-
   if (!isAggregateTypeForABI(RetTy)) {
     // Treat an enum type as its underlying type.
     if (const EnumType *EnumTy = RetTy->getAs<EnumType>())
       RetTy = EnumTy->getDecl()->getIntegerType();
 
-    return RetTy->isPromotableIntegerType() ? ABIArgInfo::getExtend(RetTy)
-                                            : ABIArgInfo::getDirect();
+    if (const auto *EIT = RetTy->getAs<ExtIntType>())
+      if (EIT->getNumBits() > 64)
+        return getNaturalAlignIndirect(RetTy, /*ByVal=*/false);
+
+    return isPromotableIntegerTypeForABI(RetTy) ? ABIArgInfo::getExtend(RetTy)
+                                                : ABIArgInfo::getDirect();
   }
 
   // Are we following APCS?
@@ -6263,12 +6672,17 @@ ABIArgInfo ARMABIInfo::classifyReturnType(QualType RetTy, bool isVariadic,
 /// isIllegalVector - check whether Ty is an illegal vector type.
 bool ARMABIInfo::isIllegalVectorType(QualType Ty) const {
   if (const VectorType *VT = Ty->getAs<VectorType> ()) {
-    // On targets that don't support FP16, FP16 is expanded into float, and we
-    // don't want the ABI to depend on whether or not FP16 is supported in
-    // hardware. Thus return false to coerce FP16 vectors into integer vectors.
-    if (!getTarget().hasLegalHalfType() &&
+    // On targets that don't support half, fp16 or bfloat, they are expanded
+    // into float, and we don't want the ABI to depend on whether or not they
+    // are supported in hardware. Thus return false to coerce vectors of these
+    // types into integer vectors.
+    // We do not depend on hasLegalHalfType for bfloat as it is a
+    // separate IR type.
+    if ((!getTarget().hasLegalHalfType() &&
         (VT->getElementType()->isFloat16Type() ||
-         VT->getElementType()->isHalfType()))
+         VT->getElementType()->isHalfType())) ||
+        (IsFloatABISoftFP &&
+         VT->getElementType()->isBFloat16Type()))
       return true;
     if (isAndroid()) {
       // Android shipped using Clang 3.1, which supported a slightly different
@@ -6320,6 +6734,7 @@ bool ARMABIInfo::containsAnyFP16Vectors(QualType Ty) const {
   } else {
     if (const VectorType *VT = Ty->getAs<VectorType>())
       return (VT->getElementType()->isFloat16Type() ||
+              VT->getElementType()->isBFloat16Type() ||
               VT->getElementType()->isHalfType());
     return false;
   }
@@ -6425,9 +6840,14 @@ Address ARMABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr,
 
 namespace {
 
+class NVPTXTargetCodeGenInfo;
+
 class NVPTXABIInfo : public ABIInfo {
+  NVPTXTargetCodeGenInfo &CGInfo;
+
 public:
-  NVPTXABIInfo(CodeGenTypes &CGT) : ABIInfo(CGT) {}
+  NVPTXABIInfo(CodeGenTypes &CGT, NVPTXTargetCodeGenInfo &Info)
+      : ABIInfo(CGT), CGInfo(Info) {}
 
   ABIArgInfo classifyReturnType(QualType RetTy) const;
   ABIArgInfo classifyArgumentType(QualType Ty) const;
@@ -6435,36 +6855,87 @@ public:
   void computeInfo(CGFunctionInfo &FI) const override;
   Address EmitVAArg(CodeGenFunction &CGF, Address VAListAddr,
                     QualType Ty) const override;
+  bool isUnsupportedType(QualType T) const;
+  ABIArgInfo coerceToIntArrayWithLimit(QualType Ty, unsigned MaxSize) const;
 };
 
 class NVPTXTargetCodeGenInfo : public TargetCodeGenInfo {
 public:
   NVPTXTargetCodeGenInfo(CodeGenTypes &CGT)
-    : TargetCodeGenInfo(new NVPTXABIInfo(CGT)) {}
+      : TargetCodeGenInfo(std::make_unique<NVPTXABIInfo>(CGT, *this)) {}
 
   void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
                            CodeGen::CodeGenModule &M) const override;
   bool shouldEmitStaticExternCAliases() const override;
 
+  llvm::Type *getCUDADeviceBuiltinSurfaceDeviceType() const override {
+    // On the device side, surface reference is represented as an object handle
+    // in 64-bit integer.
+    return llvm::Type::getInt64Ty(getABIInfo().getVMContext());
+  }
+
+  llvm::Type *getCUDADeviceBuiltinTextureDeviceType() const override {
+    // On the device side, texture reference is represented as an object handle
+    // in 64-bit integer.
+    return llvm::Type::getInt64Ty(getABIInfo().getVMContext());
+  }
+
+  bool emitCUDADeviceBuiltinSurfaceDeviceCopy(CodeGenFunction &CGF, LValue Dst,
+                                              LValue Src) const override {
+    emitBuiltinSurfTexDeviceCopy(CGF, Dst, Src);
+    return true;
+  }
+
+  bool emitCUDADeviceBuiltinTextureDeviceCopy(CodeGenFunction &CGF, LValue Dst,
+                                              LValue Src) const override {
+    emitBuiltinSurfTexDeviceCopy(CGF, Dst, Src);
+    return true;
+  }
+
 private:
-  // Adds a NamedMDNode with F, Name, and Operand as operands, and adds the
+  // Adds a NamedMDNode with GV, Name, and Operand as operands, and adds the
   // resulting MDNode to the nvvm.annotations MDNode.
-  static void addNVVMMetadata(llvm::Function *F, StringRef Name, int Operand);
+  static void addNVVMMetadata(llvm::GlobalValue *GV, StringRef Name,
+                              int Operand);
+
+  static void emitBuiltinSurfTexDeviceCopy(CodeGenFunction &CGF, LValue Dst,
+                                           LValue Src) {
+    llvm::Value *Handle = nullptr;
+    llvm::Constant *C =
+        llvm::dyn_cast<llvm::Constant>(Src.getAddress(CGF).getPointer());
+    // Lookup `addrspacecast` through the constant pointer if any.
+    if (auto *ASC = llvm::dyn_cast_or_null<llvm::AddrSpaceCastOperator>(C))
+      C = llvm::cast<llvm::Constant>(ASC->getPointerOperand());
+    if (auto *GV = llvm::dyn_cast_or_null<llvm::GlobalVariable>(C)) {
+      // Load the handle from the specific global variable using
+      // `nvvm.texsurf.handle.internal` intrinsic.
+      Handle = CGF.EmitRuntimeCall(
+          CGF.CGM.getIntrinsic(llvm::Intrinsic::nvvm_texsurf_handle_internal,
+                               {GV->getType()}),
+          {GV}, "texsurf_handle");
+    } else
+      Handle = CGF.EmitLoadOfScalar(Src, SourceLocation());
+    CGF.EmitStoreOfScalar(Handle, Dst);
+  }
 };
 
 /// Checks if the type is unsupported directly by the current target.
-static bool isUnsupportedType(ASTContext &Context, QualType T) {
+bool NVPTXABIInfo::isUnsupportedType(QualType T) const {
+  ASTContext &Context = getContext();
   if (!Context.getTargetInfo().hasFloat16Type() && T->isFloat16Type())
     return true;
   if (!Context.getTargetInfo().hasFloat128Type() &&
       (T->isFloat128Type() ||
        (T->isRealFloatingType() && Context.getTypeSize(T) == 128)))
     return true;
+  if (const auto *EIT = T->getAs<ExtIntType>())
+    return EIT->getNumBits() >
+           (Context.getTargetInfo().hasInt128Type() ? 128U : 64U);
   if (!Context.getTargetInfo().hasInt128Type() && T->isIntegerType() &&
-      Context.getTypeSize(T) > 64)
+      Context.getTypeSize(T) > 64U)
     return true;
   if (const auto *AT = T->getAsArrayTypeUnsafe())
-    return isUnsupportedType(Context, AT->getElementType());
+    return isUnsupportedType(AT->getElementType());
   const auto *RT = T->getAs<RecordType>();
   if (!RT)
     return false;
@@ -6473,24 +6944,23 @@ static bool isUnsupportedType(ASTContext &Context, QualType T) {
   // If this is a C++ record, check the bases first.
   if (const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD))
     for (const CXXBaseSpecifier &I : CXXRD->bases())
-      if (isUnsupportedType(Context, I.getType()))
+      if (isUnsupportedType(I.getType()))
         return true;
 
   for (const FieldDecl *I : RD->fields())
-    if (isUnsupportedType(Context, I->getType()))
+    if (isUnsupportedType(I->getType()))
       return true;
   return false;
 }
 
 /// Coerce the given type into an array with maximum allowed size of elements.
-static ABIArgInfo coerceToIntArrayWithLimit(QualType Ty, ASTContext &Context,
-                                            llvm::LLVMContext &LLVMContext,
-                                            unsigned MaxSize) {
+ABIArgInfo NVPTXABIInfo::coerceToIntArrayWithLimit(QualType Ty,
+                                                   unsigned MaxSize) const {
   // Alignment and Size are measured in bits.
-  const uint64_t Size = Context.getTypeSize(Ty);
-  const uint64_t Alignment = Context.getTypeAlign(Ty);
+  const uint64_t Size = getContext().getTypeSize(Ty);
+  const uint64_t Alignment = getContext().getTypeAlign(Ty);
   const unsigned Div = std::min<unsigned>(MaxSize, Alignment);
-  llvm::Type *IntType = llvm::Type::getIntNTy(LLVMContext, Div);
+  llvm::Type *IntType = llvm::Type::getIntNTy(getVMContext(), Div);
   const uint64_t NumElements = (Size + Div - 1) / Div;
   return ABIArgInfo::getDirect(llvm::ArrayType::get(IntType, NumElements));
 }
@@ -6500,9 +6970,8 @@ ABIArgInfo NVPTXABIInfo::classifyReturnType(QualType RetTy) const {
     return ABIArgInfo::getIgnore();
 
   if (getContext().getLangOpts().OpenMP &&
-      getContext().getLangOpts().OpenMPIsDevice &&
-      isUnsupportedType(getContext(), RetTy))
-    return coerceToIntArrayWithLimit(RetTy, getContext(), getVMContext(), 64);
+      getContext().getLangOpts().OpenMPIsDevice && isUnsupportedType(RetTy))
+    return coerceToIntArrayWithLimit(RetTy, 64);
 
   // note: this is different from default ABI
   if (!RetTy->isScalarType())
@@ -6512,8 +6981,8 @@ ABIArgInfo NVPTXABIInfo::classifyReturnType(QualType RetTy) const {
   if (const EnumType *EnumTy = RetTy->getAs<EnumType>())
     RetTy = EnumTy->getDecl()->getIntegerType();
 
-  return (RetTy->isPromotableIntegerType() ? ABIArgInfo::getExtend(RetTy)
-                                           : ABIArgInfo::getDirect());
+  return (isPromotableIntegerTypeForABI(RetTy) ? ABIArgInfo::getExtend(RetTy)
+                                               : ABIArgInfo::getDirect());
 }
 
 ABIArgInfo NVPTXABIInfo::classifyArgumentType(QualType Ty) const {
@@ -6522,11 +6991,29 @@ ABIArgInfo NVPTXABIInfo::classifyArgumentType(QualType Ty) const {
     Ty = EnumTy->getDecl()->getIntegerType();
 
   // Return aggregates type as indirect by value
-  if (isAggregateTypeForABI(Ty))
+  if (isAggregateTypeForABI(Ty)) {
+    // Under CUDA device compilation, tex/surf builtin types are replaced with
+    // object types and passed directly.
+    if (getContext().getLangOpts().CUDAIsDevice) {
+      if (Ty->isCUDADeviceBuiltinSurfaceType())
+        return ABIArgInfo::getDirect(
+            CGInfo.getCUDADeviceBuiltinSurfaceDeviceType());
+      if (Ty->isCUDADeviceBuiltinTextureType())
+        return ABIArgInfo::getDirect(
+            CGInfo.getCUDADeviceBuiltinTextureDeviceType());
+    }
     return getNaturalAlignIndirect(Ty, /* byval */ true);
+  }
 
-  return (Ty->isPromotableIntegerType() ? ABIArgInfo::getExtend(Ty)
-                                        : ABIArgInfo::getDirect());
+  if (const auto *EIT = Ty->getAs<ExtIntType>()) {
+    if ((EIT->getNumBits() > 128) ||
+        (!getContext().getTargetInfo().hasInt128Type() &&
+         EIT->getNumBits() > 64))
+      return getNaturalAlignIndirect(Ty, /* byval */ true);
+  }
+
+  return (isPromotableIntegerTypeForABI(Ty) ? ABIArgInfo::getExtend(Ty)
+                                            : ABIArgInfo::getDirect());
 }
 
 void NVPTXABIInfo::computeInfo(CGFunctionInfo &FI) const {
@@ -6551,6 +7038,17 @@ void NVPTXTargetCodeGenInfo::setTargetAttributes(
     const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const {
   if (GV->isDeclaration())
     return;
+  const VarDecl *VD = dyn_cast_or_null<VarDecl>(D);
+  if (VD) {
+    if (M.getLangOpts().CUDA) {
+      if (VD->getType()->isCUDADeviceBuiltinSurfaceType())
+        addNVVMMetadata(GV, "surface", 1);
+      else if (VD->getType()->isCUDADeviceBuiltinTextureType())
+        addNVVMMetadata(GV, "texture", 1);
+      return;
+    }
+  }
+
   const FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(D);
   if (!FD) return;
 
@@ -6599,16 +7097,16 @@ void NVPTXTargetCodeGenInfo::setTargetAttributes(
   }
 }
 
-void NVPTXTargetCodeGenInfo::addNVVMMetadata(llvm::Function *F, StringRef Name,
-                                             int Operand) {
-  llvm::Module *M = F->getParent();
+void NVPTXTargetCodeGenInfo::addNVVMMetadata(llvm::GlobalValue *GV,
+                                             StringRef Name, int Operand) {
+  llvm::Module *M = GV->getParent();
   llvm::LLVMContext &Ctx = M->getContext();
 
   // Get "nvvm.annotations" metadata node
   llvm::NamedMDNode *MD = M->getOrInsertNamedMetadata("nvvm.annotations");
 
   llvm::Metadata *MDVals[] = {
-      llvm::ConstantAsMetadata::get(F), llvm::MDString::get(Ctx, Name),
+      llvm::ConstantAsMetadata::get(GV), llvm::MDString::get(Ctx, Name),
       llvm::ConstantAsMetadata::get(
           llvm::ConstantInt::get(llvm::Type::getInt32Ty(Ctx), Operand))};
   // Append metadata to nvvm.annotations
@@ -6628,12 +7126,13 @@ namespace {
 
 class SystemZABIInfo : public SwiftABIInfo {
   bool HasVector;
+  bool IsSoftFloatABI;
 
 public:
-  SystemZABIInfo(CodeGenTypes &CGT, bool HV)
-    : SwiftABIInfo(CGT), HasVector(HV) {}
+  SystemZABIInfo(CodeGenTypes &CGT, bool HV, bool SF)
+    : SwiftABIInfo(CGT), HasVector(HV), IsSoftFloatABI(SF) {}
 
-  bool isPromotableIntegerType(QualType Ty) const;
+  bool isPromotableIntegerTypeForABI(QualType Ty) const;
   bool isCompoundType(QualType Ty) const;
   bool isVectorArgumentType(QualType Ty) const;
   bool isFPArgumentType(QualType Ty) const;
@@ -6663,21 +7162,26 @@ public:
 
 class SystemZTargetCodeGenInfo : public TargetCodeGenInfo {
 public:
-  SystemZTargetCodeGenInfo(CodeGenTypes &CGT, bool HasVector)
-    : TargetCodeGenInfo(new SystemZABIInfo(CGT, HasVector)) {}
+  SystemZTargetCodeGenInfo(CodeGenTypes &CGT, bool HasVector, bool SoftFloatABI)
+      : TargetCodeGenInfo(
+            std::make_unique<SystemZABIInfo>(CGT, HasVector, SoftFloatABI)) {}
 };
 
 }
 
-bool SystemZABIInfo::isPromotableIntegerType(QualType Ty) const {
+bool SystemZABIInfo::isPromotableIntegerTypeForABI(QualType Ty) const {
   // Treat an enum type as its underlying type.
   if (const EnumType *EnumTy = Ty->getAs<EnumType>())
     Ty = EnumTy->getDecl()->getIntegerType();
 
   // Promotable integer types are required to be promoted by the ABI.
-  if (Ty->isPromotableIntegerType())
+  if (ABIInfo::isPromotableIntegerTypeForABI(Ty))
     return true;
 
+  if (const auto *EIT = Ty->getAs<ExtIntType>())
+    if (EIT->getNumBits() < 64)
+      return true;
+
   // 32-bit values must also be promoted.
   if (const BuiltinType *BT = Ty->getAs<BuiltinType>())
     switch (BT->getKind()) {
@@ -6703,6 +7207,9 @@ bool SystemZABIInfo::isVectorArgumentType(QualType Ty) const {
 }
 
 bool SystemZABIInfo::isFPArgumentType(QualType Ty) const {
+  if (IsSoftFloatABI)
+    return false;
+
   if (const BuiltinType *BT = Ty->getAs<BuiltinType>())
     switch (BT->getKind()) {
     case BuiltinType::Float:
@@ -6716,7 +7223,9 @@ bool SystemZABIInfo::isFPArgumentType(QualType Ty) const {
 }
 
 QualType SystemZABIInfo::GetSingleElementType(QualType Ty) const {
-  if (const RecordType *RT = Ty->getAsStructureType()) {
+  const RecordType *RT = Ty->getAs<RecordType>();
+
+  if (RT && RT->isStructureOrClassType()) {
     const RecordDecl *RD = RT->getDecl();
     QualType Found;
 
@@ -6742,6 +7251,10 @@ QualType SystemZABIInfo::GetSingleElementType(QualType Ty) const {
       if (getContext().getLangOpts().CPlusPlus &&
           FD->isZeroLengthBitField(getContext()))
         continue;
+      // Like isSingleElementStruct(), ignore C++20 empty data members.
+      if (FD->hasAttr<NoUniqueAddressAttr>() &&
+          isEmptyRecord(getContext(), FD->getType(), true))
+        continue;
 
       // Unlike isSingleElementStruct(), arrays do not count.
       // Nested structures still do though.
@@ -6788,7 +7301,7 @@ Address SystemZABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr,
   } else {
     if (AI.getCoerceToType())
       ArgTy = AI.getCoerceToType();
-    InFPRs = ArgTy->isFloatTy() || ArgTy->isDoubleTy();
+    InFPRs = (!IsSoftFloatABI && (ArgTy->isFloatTy() || ArgTy->isDoubleTy()));
     IsVector = ArgTy->isVectorTy();
     UnpaddedSize = TyInfo.first;
     DirectAlign = TyInfo.second;
@@ -6921,8 +7434,8 @@ ABIArgInfo SystemZABIInfo::classifyReturnType(QualType RetTy) const {
     return ABIArgInfo::getDirect();
   if (isCompoundType(RetTy) || getContext().getTypeSize(RetTy) > 64)
     return getNaturalAlignIndirect(RetTy);
-  return (isPromotableIntegerType(RetTy) ? ABIArgInfo::getExtend(RetTy)
-                                         : ABIArgInfo::getDirect());
+  return (isPromotableIntegerTypeForABI(RetTy) ? ABIArgInfo::getExtend(RetTy)
+                                               : ABIArgInfo::getDirect());
 }
 
 ABIArgInfo SystemZABIInfo::classifyArgumentType(QualType Ty) const {
@@ -6931,7 +7444,7 @@ ABIArgInfo SystemZABIInfo::classifyArgumentType(QualType Ty) const {
     return getNaturalAlignIndirect(Ty, RAA == CGCXXABI::RAA_DirectInMemory);
 
   // Integers and enums are extended to full register width.
-  if (isPromotableIntegerType(Ty))
+  if (isPromotableIntegerTypeForABI(Ty))
     return ABIArgInfo::getExtend(Ty);
 
   // Handle vector types and vector-like structure types.  Note that
@@ -6981,10 +7494,49 @@ ABIArgInfo SystemZABIInfo::classifyArgumentType(QualType Ty) const {
 
 namespace {
 
+class MSP430ABIInfo : public DefaultABIInfo {
+  static ABIArgInfo complexArgInfo() {
+    ABIArgInfo Info = ABIArgInfo::getDirect();
+    Info.setCanBeFlattened(false);
+    return Info;
+  }
+
+public:
+  MSP430ABIInfo(CodeGenTypes &CGT) : DefaultABIInfo(CGT) {}
+
+  ABIArgInfo classifyReturnType(QualType RetTy) const {
+    if (RetTy->isAnyComplexType())
+      return complexArgInfo();
+
+    return DefaultABIInfo::classifyReturnType(RetTy);
+  }
+
+  ABIArgInfo classifyArgumentType(QualType RetTy) const {
+    if (RetTy->isAnyComplexType())
+      return complexArgInfo();
+
+    return DefaultABIInfo::classifyArgumentType(RetTy);
+  }
+
+  // Just copy the original implementations because
+  // DefaultABIInfo::classify{Return,Argument}Type() are not virtual
+  void computeInfo(CGFunctionInfo &FI) const override {
+    if (!getCXXABI().classifyReturnType(FI))
+      FI.getReturnInfo() = classifyReturnType(FI.getReturnType());
+    for (auto &I : FI.arguments())
+      I.info = classifyArgumentType(I.type);
+  }
+
+  Address EmitVAArg(CodeGenFunction &CGF, Address VAListAddr,
+                    QualType Ty) const override {
+    return EmitVAArgInstr(CGF, VAListAddr, Ty, classifyArgumentType(Ty));
+  }
+};
+
 class MSP430TargetCodeGenInfo : public TargetCodeGenInfo {
 public:
   MSP430TargetCodeGenInfo(CodeGenTypes &CGT)
-    : TargetCodeGenInfo(new DefaultABIInfo(CGT)) {}
+      : TargetCodeGenInfo(std::make_unique<MSP430ABIInfo>(CGT)) {}
   void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
                            CodeGen::CodeGenModule &M) const override;
 };
@@ -7043,8 +7595,8 @@ class MIPSTargetCodeGenInfo : public TargetCodeGenInfo {
   unsigned SizeOfUnwindException;
 public:
   MIPSTargetCodeGenInfo(CodeGenTypes &CGT, bool IsO32)
-    : TargetCodeGenInfo(new MipsABIInfo(CGT, IsO32)),
-      SizeOfUnwindException(IsO32 ? 24 : 32) {}
+      : TargetCodeGenInfo(std::make_unique<MipsABIInfo>(CGT, IsO32)),
+        SizeOfUnwindException(IsO32 ? 24 : 32) {}
 
   int getDwarfEHStackPointer(CodeGen::CodeGenModule &CGM) const override {
     return 29;
@@ -7226,6 +7778,13 @@ MipsABIInfo::classifyArgumentType(QualType Ty, uint64_t &Offset) const {
   if (const EnumType *EnumTy = Ty->getAs<EnumType>())
     Ty = EnumTy->getDecl()->getIntegerType();
 
+  // Make sure we pass indirectly things that are too large.
+  if (const auto *EIT = Ty->getAs<ExtIntType>())
+    if (EIT->getNumBits() > 128 ||
+        (EIT->getNumBits() > 64 &&
+         !getContext().getTargetInfo().hasInt128Type()))
+      return getNaturalAlignIndirect(Ty);
+
   // All integral types are promoted to the GPR width.
   if (Ty->isIntegralOrEnumerationType())
     return extendType(Ty);
@@ -7310,7 +7869,14 @@ ABIArgInfo MipsABIInfo::classifyReturnType(QualType RetTy) const {
   if (const EnumType *EnumTy = RetTy->getAs<EnumType>())
     RetTy = EnumTy->getDecl()->getIntegerType();
 
-  if (RetTy->isPromotableIntegerType())
+  // Make sure we pass indirectly things that are too large.
+  if (const auto *EIT = RetTy->getAs<ExtIntType>())
+    if (EIT->getNumBits() > 128 ||
+        (EIT->getNumBits() > 64 &&
+         !getContext().getTargetInfo().hasInt128Type()))
+      return getNaturalAlignIndirect(RetTy);
+
+  if (isPromotableIntegerTypeForABI(RetTy))
     return ABIArgInfo::getExtend(RetTy);
 
   if ((RetTy->isUnsignedIntegerOrEnumerationType() ||
@@ -7429,7 +7995,7 @@ namespace {
 class AVRTargetCodeGenInfo : public TargetCodeGenInfo {
 public:
   AVRTargetCodeGenInfo(CodeGenTypes &CGT)
-    : TargetCodeGenInfo(new DefaultABIInfo(CGT)) { }
+      : TargetCodeGenInfo(std::make_unique<DefaultABIInfo>(CGT)) {}
 
   void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
                            CodeGen::CodeGenModule &CGM) const override {
@@ -7518,50 +8084,97 @@ void TCETargetCodeGenInfo::setTargetAttributes(
 
 namespace {
 
-class HexagonABIInfo : public ABIInfo {
-
-
+class HexagonABIInfo : public DefaultABIInfo {
 public:
-  HexagonABIInfo(CodeGenTypes &CGT) : ABIInfo(CGT) {}
+  HexagonABIInfo(CodeGenTypes &CGT) : DefaultABIInfo(CGT) {}
 
 private:
-
   ABIArgInfo classifyReturnType(QualType RetTy) const;
   ABIArgInfo classifyArgumentType(QualType RetTy) const;
+  ABIArgInfo classifyArgumentType(QualType RetTy, unsigned *RegsLeft) const;
 
   void computeInfo(CGFunctionInfo &FI) const override;
 
   Address EmitVAArg(CodeGenFunction &CGF, Address VAListAddr,
                     QualType Ty) const override;
+  Address EmitVAArgFromMemory(CodeGenFunction &CFG, Address VAListAddr,
+                              QualType Ty) const;
+  Address EmitVAArgForHexagon(CodeGenFunction &CFG, Address VAListAddr,
+                              QualType Ty) const;
+  Address EmitVAArgForHexagonLinux(CodeGenFunction &CFG, Address VAListAddr,
+                                   QualType Ty) const;
 };
 
 class HexagonTargetCodeGenInfo : public TargetCodeGenInfo {
 public:
   HexagonTargetCodeGenInfo(CodeGenTypes &CGT)
-    :TargetCodeGenInfo(new HexagonABIInfo(CGT)) {}
+      : TargetCodeGenInfo(std::make_unique<HexagonABIInfo>(CGT)) {}
 
   int getDwarfEHStackPointer(CodeGen::CodeGenModule &M) const override {
     return 29;
   }
+
+  void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
+                           CodeGen::CodeGenModule &GCM) const override {
+    if (GV->isDeclaration())
+      return;
+    const FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(D);
+    if (!FD)
+      return;
+  }
 };
 
-}
+} // namespace
 
 void HexagonABIInfo::computeInfo(CGFunctionInfo &FI) const {
+  unsigned RegsLeft = 6;
   if (!getCXXABI().classifyReturnType(FI))
     FI.getReturnInfo() = classifyReturnType(FI.getReturnType());
   for (auto &I : FI.arguments())
-    I.info = classifyArgumentType(I.type);
+    I.info = classifyArgumentType(I.type, &RegsLeft);
+}
+
+static bool HexagonAdjustRegsLeft(uint64_t Size, unsigned *RegsLeft) {
+  assert(Size <= 64 && "Not expecting to pass arguments larger than 64 bits"
+                       " through registers");
+
+  if (*RegsLeft == 0)
+    return false;
+
+  if (Size <= 32) {
+    (*RegsLeft)--;
+    return true;
+  }
+
+  if (2 <= (*RegsLeft & (~1U))) {
+    *RegsLeft = (*RegsLeft & (~1U)) - 2;
+    return true;
+  }
+
+  // Next available register was r5 but candidate was greater than 32-bits so it
+  // has to go on the stack. However we still consume r5
+  if (*RegsLeft == 1)
+    *RegsLeft = 0;
+
+  return false;
 }
 
-ABIArgInfo HexagonABIInfo::classifyArgumentType(QualType Ty) const {
+ABIArgInfo HexagonABIInfo::classifyArgumentType(QualType Ty,
+                                                unsigned *RegsLeft) const {
   if (!isAggregateTypeForABI(Ty)) {
     // Treat an enum type as its underlying type.
     if (const EnumType *EnumTy = Ty->getAs<EnumType>())
       Ty = EnumTy->getDecl()->getIntegerType();
 
-    return (Ty->isPromotableIntegerType() ? ABIArgInfo::getExtend(Ty)
-                                          : ABIArgInfo::getDirect());
+    uint64_t Size = getContext().getTypeSize(Ty);
+    if (Size <= 64)
+      HexagonAdjustRegsLeft(Size, RegsLeft);
+
+    if (Size > 64 && Ty->isExtIntType())
+      return getNaturalAlignIndirect(Ty, /*ByVal=*/true);
+
+    return isPromotableIntegerTypeForABI(Ty) ? ABIArgInfo::getExtend(Ty)
+                                             : ABIArgInfo::getDirect();
   }
 
   if (CGCXXABI::RecordArgABI RAA = getRecordArgABI(Ty, getCXXABI()))
@@ -7572,63 +8185,304 @@ ABIArgInfo HexagonABIInfo::classifyArgumentType(QualType Ty) const {
     return ABIArgInfo::getIgnore();
 
   uint64_t Size = getContext().getTypeSize(Ty);
+  unsigned Align = getContext().getTypeAlign(Ty);
+
   if (Size > 64)
     return getNaturalAlignIndirect(Ty, /*ByVal=*/true);
+
+  if (HexagonAdjustRegsLeft(Size, RegsLeft))
+    Align = Size <= 32 ? 32 : 64;
+  if (Size <= Align) {
     // Pass in the smallest viable integer type.
-  else if (Size > 32)
-      return ABIArgInfo::getDirect(llvm::Type::getInt64Ty(getVMContext()));
-  else if (Size > 16)
-      return ABIArgInfo::getDirect(llvm::Type::getInt32Ty(getVMContext()));
-  else if (Size > 8)
-      return ABIArgInfo::getDirect(llvm::Type::getInt16Ty(getVMContext()));
-  else
-      return ABIArgInfo::getDirect(llvm::Type::getInt8Ty(getVMContext()));
+    if (!llvm::isPowerOf2_64(Size))
+      Size = llvm::NextPowerOf2(Size);
+    return ABIArgInfo::getDirect(llvm::Type::getIntNTy(getVMContext(), Size));
+  }
+  return DefaultABIInfo::classifyArgumentType(Ty);
 }
 
 ABIArgInfo HexagonABIInfo::classifyReturnType(QualType RetTy) const {
   if (RetTy->isVoidType())
     return ABIArgInfo::getIgnore();
 
-  // Large vector types should be returned via memory.
-  if (RetTy->isVectorType() && getContext().getTypeSize(RetTy) > 64)
-    return getNaturalAlignIndirect(RetTy);
+  const TargetInfo &T = CGT.getTarget();
+  uint64_t Size = getContext().getTypeSize(RetTy);
+
+  if (RetTy->getAs<VectorType>()) {
+    // HVX vectors are returned in vector registers or register pairs.
+    if (T.hasFeature("hvx")) {
+      assert(T.hasFeature("hvx-length64b") || T.hasFeature("hvx-length128b"));
+      uint64_t VecSize = T.hasFeature("hvx-length64b") ? 64*8 : 128*8;
+      if (Size == VecSize || Size == 2*VecSize)
+        return ABIArgInfo::getDirectInReg();
+    }
+    // Large vector types should be returned via memory.
+    if (Size > 64)
+      return getNaturalAlignIndirect(RetTy);
+  }
 
   if (!isAggregateTypeForABI(RetTy)) {
     // Treat an enum type as its underlying type.
     if (const EnumType *EnumTy = RetTy->getAs<EnumType>())
       RetTy = EnumTy->getDecl()->getIntegerType();
 
-    return (RetTy->isPromotableIntegerType() ? ABIArgInfo::getExtend(RetTy)
-                                             : ABIArgInfo::getDirect());
+    if (Size > 64 && RetTy->isExtIntType())
+      return getNaturalAlignIndirect(RetTy, /*ByVal=*/false);
+
+    return isPromotableIntegerTypeForABI(RetTy) ? ABIArgInfo::getExtend(RetTy)
+                                                : ABIArgInfo::getDirect();
   }
 
   if (isEmptyRecord(getContext(), RetTy, true))
     return ABIArgInfo::getIgnore();
 
-  // Aggregates <= 8 bytes are returned in r0; other aggregates
+  // Aggregates <= 8 bytes are returned in registers, other aggregates
   // are returned indirectly.
-  uint64_t Size = getContext().getTypeSize(RetTy);
   if (Size <= 64) {
     // Return in the smallest viable integer type.
-    if (Size <= 8)
-      return ABIArgInfo::getDirect(llvm::Type::getInt8Ty(getVMContext()));
-    if (Size <= 16)
-      return ABIArgInfo::getDirect(llvm::Type::getInt16Ty(getVMContext()));
-    if (Size <= 32)
-      return ABIArgInfo::getDirect(llvm::Type::getInt32Ty(getVMContext()));
-    return ABIArgInfo::getDirect(llvm::Type::getInt64Ty(getVMContext()));
+    if (!llvm::isPowerOf2_64(Size))
+      Size = llvm::NextPowerOf2(Size);
+    return ABIArgInfo::getDirect(llvm::Type::getIntNTy(getVMContext(), Size));
   }
-
   return getNaturalAlignIndirect(RetTy, /*ByVal=*/true);
 }
 
+Address HexagonABIInfo::EmitVAArgFromMemory(CodeGenFunction &CGF,
+                                            Address VAListAddr,
+                                            QualType Ty) const {
+  // Load the overflow area pointer.
+  Address __overflow_area_pointer_p =
+      CGF.Builder.CreateStructGEP(VAListAddr, 2, "__overflow_area_pointer_p");
+  llvm::Value *__overflow_area_pointer = CGF.Builder.CreateLoad(
+      __overflow_area_pointer_p, "__overflow_area_pointer");
+
+  uint64_t Align = CGF.getContext().getTypeAlign(Ty) / 8;
+  if (Align > 4) {
+    // Alignment should be a power of 2.
+    assert((Align & (Align - 1)) == 0 && "Alignment is not power of 2!");
+
+    // overflow_arg_area = (overflow_arg_area + align - 1) & -align;
+    llvm::Value *Offset = llvm::ConstantInt::get(CGF.Int64Ty, Align - 1);
+
+    // Add offset to the current pointer to access the argument.
+    __overflow_area_pointer =
+        CGF.Builder.CreateGEP(__overflow_area_pointer, Offset);
+    llvm::Value *AsInt =
+        CGF.Builder.CreatePtrToInt(__overflow_area_pointer, CGF.Int32Ty);
+
+    // Create a mask which should be "AND"ed
+    // with (overflow_arg_area + align - 1)
+    llvm::Value *Mask = llvm::ConstantInt::get(CGF.Int32Ty, -(int)Align);
+    __overflow_area_pointer = CGF.Builder.CreateIntToPtr(
+        CGF.Builder.CreateAnd(AsInt, Mask), __overflow_area_pointer->getType(),
+        "__overflow_area_pointer.align");
+  }
+
+  // Get the type of the argument from memory and bitcast
+  // overflow area pointer to the argument type.
+  llvm::Type *PTy = CGF.ConvertTypeForMem(Ty);
+  Address AddrTyped = CGF.Builder.CreateBitCast(
+      Address(__overflow_area_pointer, CharUnits::fromQuantity(Align)),
+      llvm::PointerType::getUnqual(PTy));
+
+  // Round up to the minimum stack alignment for varargs which is 4 bytes.
+  uint64_t Offset = llvm::alignTo(CGF.getContext().getTypeSize(Ty) / 8, 4);
+
+  __overflow_area_pointer = CGF.Builder.CreateGEP(
+      __overflow_area_pointer, llvm::ConstantInt::get(CGF.Int32Ty, Offset),
+      "__overflow_area_pointer.next");
+  CGF.Builder.CreateStore(__overflow_area_pointer, __overflow_area_pointer_p);
+
+  return AddrTyped;
+}
+
+Address HexagonABIInfo::EmitVAArgForHexagon(CodeGenFunction &CGF,
+                                            Address VAListAddr,
+                                            QualType Ty) const {
+  // FIXME: Need to handle alignment
+  llvm::Type *BP = CGF.Int8PtrTy;
+  llvm::Type *BPP = CGF.Int8PtrPtrTy;
+  CGBuilderTy &Builder = CGF.Builder;
+  Address VAListAddrAsBPP = Builder.CreateBitCast(VAListAddr, BPP, "ap");
+  llvm::Value *Addr = Builder.CreateLoad(VAListAddrAsBPP, "ap.cur");
+  // Handle address alignment for type alignment > 32 bits
+  uint64_t TyAlign = CGF.getContext().getTypeAlign(Ty) / 8;
+  if (TyAlign > 4) {
+    assert((TyAlign & (TyAlign - 1)) == 0 && "Alignment is not power of 2!");
+    llvm::Value *AddrAsInt = Builder.CreatePtrToInt(Addr, CGF.Int32Ty);
+    AddrAsInt = Builder.CreateAdd(AddrAsInt, Builder.getInt32(TyAlign - 1));
+    AddrAsInt = Builder.CreateAnd(AddrAsInt, Builder.getInt32(~(TyAlign - 1)));
+    Addr = Builder.CreateIntToPtr(AddrAsInt, BP);
+  }
+  llvm::Type *PTy = llvm::PointerType::getUnqual(CGF.ConvertType(Ty));
+  Address AddrTyped = Builder.CreateBitCast(
+      Address(Addr, CharUnits::fromQuantity(TyAlign)), PTy);
+
+  uint64_t Offset = llvm::alignTo(CGF.getContext().getTypeSize(Ty) / 8, 4);
+  llvm::Value *NextAddr = Builder.CreateGEP(
+      Addr, llvm::ConstantInt::get(CGF.Int32Ty, Offset), "ap.next");
+  Builder.CreateStore(NextAddr, VAListAddrAsBPP);
+
+  return AddrTyped;
+}
+
+Address HexagonABIInfo::EmitVAArgForHexagonLinux(CodeGenFunction &CGF,
+                                                 Address VAListAddr,
+                                                 QualType Ty) const {
+  int ArgSize = CGF.getContext().getTypeSize(Ty) / 8;
+
+  if (ArgSize > 8)
+    return EmitVAArgFromMemory(CGF, VAListAddr, Ty);
+
+  // Here we have check if the argument is in register area or
+  // in overflow area.
+  // If the saved register area pointer + argsize rounded up to alignment >
+  // saved register area end pointer, argument is in overflow area.
+  unsigned RegsLeft = 6;
+  Ty = CGF.getContext().getCanonicalType(Ty);
+  (void)classifyArgumentType(Ty, &RegsLeft);
+
+  llvm::BasicBlock *MaybeRegBlock = CGF.createBasicBlock("vaarg.maybe_reg");
+  llvm::BasicBlock *InRegBlock = CGF.createBasicBlock("vaarg.in_reg");
+  llvm::BasicBlock *OnStackBlock = CGF.createBasicBlock("vaarg.on_stack");
+  llvm::BasicBlock *ContBlock = CGF.createBasicBlock("vaarg.end");
+
+  // Get rounded size of the argument.GCC does not allow vararg of
+  // size < 4 bytes. We follow the same logic here.
+  ArgSize = (CGF.getContext().getTypeSize(Ty) <= 32) ? 4 : 8;
+  int ArgAlign = (CGF.getContext().getTypeSize(Ty) <= 32) ? 4 : 8;
+
+  // Argument may be in saved register area
+  CGF.EmitBlock(MaybeRegBlock);
+
+  // Load the current saved register area pointer.
+  Address __current_saved_reg_area_pointer_p = CGF.Builder.CreateStructGEP(
+      VAListAddr, 0, "__current_saved_reg_area_pointer_p");
+  llvm::Value *__current_saved_reg_area_pointer = CGF.Builder.CreateLoad(
+      __current_saved_reg_area_pointer_p, "__current_saved_reg_area_pointer");
+
+  // Load the saved register area end pointer.
+  Address __saved_reg_area_end_pointer_p = CGF.Builder.CreateStructGEP(
+      VAListAddr, 1, "__saved_reg_area_end_pointer_p");
+  llvm::Value *__saved_reg_area_end_pointer = CGF.Builder.CreateLoad(
+      __saved_reg_area_end_pointer_p, "__saved_reg_area_end_pointer");
+
+  // If the size of argument is > 4 bytes, check if the stack
+  // location is aligned to 8 bytes
+  if (ArgAlign > 4) {
+
+    llvm::Value *__current_saved_reg_area_pointer_int =
+        CGF.Builder.CreatePtrToInt(__current_saved_reg_area_pointer,
+                                   CGF.Int32Ty);
+
+    __current_saved_reg_area_pointer_int = CGF.Builder.CreateAdd(
+        __current_saved_reg_area_pointer_int,
+        llvm::ConstantInt::get(CGF.Int32Ty, (ArgAlign - 1)),
+        "align_current_saved_reg_area_pointer");
+
+    __current_saved_reg_area_pointer_int =
+        CGF.Builder.CreateAnd(__current_saved_reg_area_pointer_int,
+                              llvm::ConstantInt::get(CGF.Int32Ty, -ArgAlign),
+                              "align_current_saved_reg_area_pointer");
+
+    __current_saved_reg_area_pointer =
+        CGF.Builder.CreateIntToPtr(__current_saved_reg_area_pointer_int,
+                                   __current_saved_reg_area_pointer->getType(),
+                                   "align_current_saved_reg_area_pointer");
+  }
+
+  llvm::Value *__new_saved_reg_area_pointer =
+      CGF.Builder.CreateGEP(__current_saved_reg_area_pointer,
+                            llvm::ConstantInt::get(CGF.Int32Ty, ArgSize),
+                            "__new_saved_reg_area_pointer");
+
+  llvm::Value *UsingStack = 0;
+  UsingStack = CGF.Builder.CreateICmpSGT(__new_saved_reg_area_pointer,
+                                         __saved_reg_area_end_pointer);
+
+  CGF.Builder.CreateCondBr(UsingStack, OnStackBlock, InRegBlock);
+
+  // Argument in saved register area
+  // Implement the block where argument is in register saved area
+  CGF.EmitBlock(InRegBlock);
+
+  llvm::Type *PTy = CGF.ConvertType(Ty);
+  llvm::Value *__saved_reg_area_p = CGF.Builder.CreateBitCast(
+      __current_saved_reg_area_pointer, llvm::PointerType::getUnqual(PTy));
+
+  CGF.Builder.CreateStore(__new_saved_reg_area_pointer,
+                          __current_saved_reg_area_pointer_p);
+
+  CGF.EmitBranch(ContBlock);
+
+  // Argument in overflow area
+  // Implement the block where the argument is in overflow area.
+  CGF.EmitBlock(OnStackBlock);
+
+  // Load the overflow area pointer
+  Address __overflow_area_pointer_p =
+      CGF.Builder.CreateStructGEP(VAListAddr, 2, "__overflow_area_pointer_p");
+  llvm::Value *__overflow_area_pointer = CGF.Builder.CreateLoad(
+      __overflow_area_pointer_p, "__overflow_area_pointer");
+
+  // Align the overflow area pointer according to the alignment of the argument
+  if (ArgAlign > 4) {
+    llvm::Value *__overflow_area_pointer_int =
+        CGF.Builder.CreatePtrToInt(__overflow_area_pointer, CGF.Int32Ty);
+
+    __overflow_area_pointer_int =
+        CGF.Builder.CreateAdd(__overflow_area_pointer_int,
+                              llvm::ConstantInt::get(CGF.Int32Ty, ArgAlign - 1),
+                              "align_overflow_area_pointer");
+
+    __overflow_area_pointer_int =
+        CGF.Builder.CreateAnd(__overflow_area_pointer_int,
+                              llvm::ConstantInt::get(CGF.Int32Ty, -ArgAlign),
+                              "align_overflow_area_pointer");
+
+    __overflow_area_pointer = CGF.Builder.CreateIntToPtr(
+        __overflow_area_pointer_int, __overflow_area_pointer->getType(),
+        "align_overflow_area_pointer");
+  }
+
+  // Get the pointer for next argument in overflow area and store it
+  // to overflow area pointer.
+  llvm::Value *__new_overflow_area_pointer = CGF.Builder.CreateGEP(
+      __overflow_area_pointer, llvm::ConstantInt::get(CGF.Int32Ty, ArgSize),
+      "__overflow_area_pointer.next");
+
+  CGF.Builder.CreateStore(__new_overflow_area_pointer,
+                          __overflow_area_pointer_p);
+
+  CGF.Builder.CreateStore(__new_overflow_area_pointer,
+                          __current_saved_reg_area_pointer_p);
+
+  // Bitcast the overflow area pointer to the type of argument.
+  llvm::Type *OverflowPTy = CGF.ConvertTypeForMem(Ty);
+  llvm::Value *__overflow_area_p = CGF.Builder.CreateBitCast(
+      __overflow_area_pointer, llvm::PointerType::getUnqual(OverflowPTy));
+
+  CGF.EmitBranch(ContBlock);
+
+  // Get the correct pointer to load the variable argument
+  // Implement the ContBlock
+  CGF.EmitBlock(ContBlock);
+
+  llvm::Type *MemPTy = llvm::PointerType::getUnqual(CGF.ConvertTypeForMem(Ty));
+  llvm::PHINode *ArgAddr = CGF.Builder.CreatePHI(MemPTy, 2, "vaarg.addr");
+  ArgAddr->addIncoming(__saved_reg_area_p, InRegBlock);
+  ArgAddr->addIncoming(__overflow_area_p, OnStackBlock);
+
+  return Address(ArgAddr, CharUnits::fromQuantity(ArgAlign));
+}
+
 Address HexagonABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr,
                                   QualType Ty) const {
-  // FIXME: Someone needs to audit that this handle alignment correctly.
-  return emitVoidPtrVAArg(CGF, VAListAddr, Ty, /*indirect*/ false,
-                          getContext().getTypeInfoInChars(Ty),
-                          CharUnits::fromQuantity(4),
-                          /*AllowHigherAlign*/ true);
+
+  if (getTarget().getTriple().isMusl())
+    return EmitVAArgForHexagonLinux(CGF, VAListAddr, Ty);
+
+  return EmitVAArgForHexagon(CGF, VAListAddr, Ty);
 }
 
 //===----------------------------------------------------------------------===//
@@ -7739,7 +8593,13 @@ ABIArgInfo LanaiABIInfo::classifyArgumentType(QualType Ty,
     Ty = EnumTy->getDecl()->getIntegerType();
 
   bool InReg = shouldUseInReg(Ty, State);
-  if (Ty->isPromotableIntegerType()) {
+
+  // Don't pass >64 bit integers in registers.
+  if (const auto *EIT = Ty->getAs<ExtIntType>())
+    if (EIT->getNumBits() > 64)
+      return getIndirectResult(Ty, /*ByVal=*/true, State);
+
+  if (isPromotableIntegerTypeForABI(Ty)) {
     if (InReg)
       return ABIArgInfo::getDirectInReg();
     return ABIArgInfo::getExtend(Ty);
@@ -7753,7 +8613,7 @@ namespace {
 class LanaiTargetCodeGenInfo : public TargetCodeGenInfo {
 public:
   LanaiTargetCodeGenInfo(CodeGen::CodeGenTypes &CGT)
-      : TargetCodeGenInfo(new LanaiABIInfo(CGT)) {}
+      : TargetCodeGenInfo(std::make_unique<LanaiABIInfo>(CGT)) {}
 };
 }
 
@@ -7793,7 +8653,7 @@ private:
             EltTys, (STy->getName() + ".coerce").str(), STy->isPacked());
       return llvm::StructType::get(getVMContext(), EltTys, STy->isPacked());
     }
-    // Arrary types.
+    // Array types.
     if (auto ATy = dyn_cast<llvm::ArrayType>(Ty)) {
       auto T = ATy->getElementType();
       auto NT = coerceKernelArgumentType(T, FromAS, ToAS);
@@ -8021,7 +8881,7 @@ ABIArgInfo AMDGPUABIInfo::classifyArgumentType(QualType Ty,
 class AMDGPUTargetCodeGenInfo : public TargetCodeGenInfo {
 public:
   AMDGPUTargetCodeGenInfo(CodeGenTypes &CGT)
-    : TargetCodeGenInfo(new AMDGPUABIInfo(CGT)) {}
+      : TargetCodeGenInfo(std::make_unique<AMDGPUABIInfo>(CGT)) {}
   void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
                            CodeGen::CodeGenModule &M) const override;
   unsigned getOpenCLKernelCallingConv() const override;
@@ -8057,23 +8917,13 @@ static bool requiresAMDGPUProtectedVisibility(const Decl *D,
          (isa<FunctionDecl>(D) && D->hasAttr<CUDAGlobalAttr>()) ||
          (isa<VarDecl>(D) &&
           (D->hasAttr<CUDADeviceAttr>() || D->hasAttr<CUDAConstantAttr>() ||
-           D->hasAttr<HIPPinnedShadowAttr>()));
-}
-
-static bool requiresAMDGPUDefaultVisibility(const Decl *D,
-                                            llvm::GlobalValue *GV) {
-  if (GV->getVisibility() != llvm::GlobalValue::HiddenVisibility)
-    return false;
-
-  return isa<VarDecl>(D) && D->hasAttr<HIPPinnedShadowAttr>();
+           cast<VarDecl>(D)->getType()->isCUDADeviceBuiltinSurfaceType() ||
+           cast<VarDecl>(D)->getType()->isCUDADeviceBuiltinTextureType()));
 }
 
 void AMDGPUTargetCodeGenInfo::setTargetAttributes(
     const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const {
-  if (requiresAMDGPUDefaultVisibility(D, GV)) {
-    GV->setVisibility(llvm::GlobalValue::DefaultVisibility);
-    GV->setDSOLocal(false);
-  } else if (requiresAMDGPUProtectedVisibility(D, GV)) {
+  if (requiresAMDGPUProtectedVisibility(D, GV)) {
     GV->setVisibility(llvm::GlobalValue::ProtectedVisibility);
     GV->setDSOLocal(true);
   }
@@ -8098,6 +8948,10 @@ void AMDGPUTargetCodeGenInfo::setTargetAttributes(
       (M.getTriple().getOS() == llvm::Triple::AMDHSA))
     F->addFnAttr("amdgpu-implicitarg-num-bytes", "56");
 
+  if (IsHIPKernel)
+    F->addFnAttr("uniform-work-group-size", "true");
+
+
   const auto *FlatWGS = FD->getAttr<AMDGPUFlatWorkGroupSizeAttr>();
   if (ReqdWGS || FlatWGS) {
     unsigned Min = 0;
@@ -8122,9 +8976,13 @@ void AMDGPUTargetCodeGenInfo::setTargetAttributes(
       assert(Max == 0 && "Max must be zero");
   } else if (IsOpenCLKernel || IsHIPKernel) {
     // By default, restrict the maximum size to a value specified by
-    // --gpu-max-threads-per-block=n or its default value.
+    // --gpu-max-threads-per-block=n or its default value for HIP.
+    const unsigned OpenCLDefaultMaxWorkGroupSize = 256;
+    const unsigned DefaultMaxWorkGroupSize =
+        IsOpenCLKernel ? OpenCLDefaultMaxWorkGroupSize
+                       : M.getLangOpts().GPUMaxThreadsPerBlock;
     std::string AttrVal =
-        std::string("1,") + llvm::utostr(M.getLangOpts().GPUMaxThreadsPerBlock);
+        std::string("1,") + llvm::utostr(DefaultMaxWorkGroupSize);
     F->addFnAttr("amdgpu-flat-work-group-size", AttrVal);
   }
 
@@ -8286,7 +9144,7 @@ namespace {
 class SparcV8TargetCodeGenInfo : public TargetCodeGenInfo {
 public:
   SparcV8TargetCodeGenInfo(CodeGenTypes &CGT)
-    : TargetCodeGenInfo(new SparcV8ABIInfo(CGT)) {}
+      : TargetCodeGenInfo(std::make_unique<SparcV8ABIInfo>(CGT)) {}
 };
 } // end anonymous namespace
 
@@ -8455,6 +9313,10 @@ SparcV9ABIInfo::classifyType(QualType Ty, unsigned SizeLimit) const {
   if (Size < 64 && Ty->isIntegerType())
     return ABIArgInfo::getExtend(Ty);
 
+  if (const auto *EIT = Ty->getAs<ExtIntType>())
+    if (EIT->getNumBits() < 64)
+      return ABIArgInfo::getExtend(Ty);
+
   // Other non-aggregates go in registers.
   if (!isAggregateTypeForABI(Ty))
     return ABIArgInfo::getDirect();
@@ -8548,7 +9410,7 @@ namespace {
 class SparcV9TargetCodeGenInfo : public TargetCodeGenInfo {
 public:
   SparcV9TargetCodeGenInfo(CodeGenTypes &CGT)
-    : TargetCodeGenInfo(new SparcV9ABIInfo(CGT)) {}
+      : TargetCodeGenInfo(std::make_unique<SparcV9ABIInfo>(CGT)) {}
 
   int getDwarfEHStackPointer(CodeGen::CodeGenModule &M) const override {
     return 14;
@@ -8641,7 +9503,7 @@ private:
 class ARCTargetCodeGenInfo : public TargetCodeGenInfo {
 public:
   ARCTargetCodeGenInfo(CodeGenTypes &CGT)
-      : TargetCodeGenInfo(new ARCABIInfo(CGT)) {}
+      : TargetCodeGenInfo(std::make_unique<ARCABIInfo>(CGT)) {}
 };
 
 
@@ -8704,11 +9566,15 @@ ABIArgInfo ARCABIInfo::classifyArgumentType(QualType Ty,
         ABIArgInfo::getDirect(Result, 0, nullptr, false);
   }
 
-  return Ty->isPromotableIntegerType() ?
-      (FreeRegs >= SizeInRegs ? ABIArgInfo::getExtendInReg(Ty) :
-                                ABIArgInfo::getExtend(Ty)) :
-      (FreeRegs >= SizeInRegs ? ABIArgInfo::getDirectInReg() :
-                                ABIArgInfo::getDirect());
+  if (const auto *EIT = Ty->getAs<ExtIntType>())
+    if (EIT->getNumBits() > 64)
+      return getIndirectByValue(Ty);
+
+  return isPromotableIntegerTypeForABI(Ty)
+             ? (FreeRegs >= SizeInRegs ? ABIArgInfo::getExtendInReg(Ty)
+                                       : ABIArgInfo::getExtend(Ty))
+             : (FreeRegs >= SizeInRegs ? ABIArgInfo::getDirectInReg()
+                                       : ABIArgInfo::getDirect());
 }
 
 ABIArgInfo ARCABIInfo::classifyReturnType(QualType RetTy) const {
@@ -8832,11 +9698,15 @@ public:
 
 class XCoreTargetCodeGenInfo : public TargetCodeGenInfo {
   mutable TypeStringCache TSC;
+  void emitTargetMD(const Decl *D, llvm::GlobalValue *GV,
+                    const CodeGen::CodeGenModule &M) const;
+
 public:
   XCoreTargetCodeGenInfo(CodeGenTypes &CGT)
-    :TargetCodeGenInfo(new XCoreABIInfo(CGT)) {}
-  void emitTargetMD(const Decl *D, llvm::GlobalValue *GV,
-                    CodeGen::CodeGenModule &M) const override;
+      : TargetCodeGenInfo(std::make_unique<XCoreABIInfo>(CGT)) {}
+  void emitTargetMetadata(CodeGen::CodeGenModule &CGM,
+                          const llvm::MapVector<GlobalDecl, StringRef>
+                              &MangledDeclNames) const override;
 };
 
 } // End anonymous namespace.
@@ -8997,11 +9867,13 @@ StringRef TypeStringCache::lookupStr(const IdentifierInfo *ID) {
 /// The output is tested by test/CodeGen/xcore-stringtype.c.
 ///
 static bool getTypeString(SmallStringEnc &Enc, const Decl *D,
-                          CodeGen::CodeGenModule &CGM, TypeStringCache &TSC);
+                          const CodeGen::CodeGenModule &CGM,
+                          TypeStringCache &TSC);
 
 /// XCore uses emitTargetMD to emit TypeString metadata for global symbols.
-void XCoreTargetCodeGenInfo::emitTargetMD(const Decl *D, llvm::GlobalValue *GV,
-                                          CodeGen::CodeGenModule &CGM) const {
+void XCoreTargetCodeGenInfo::emitTargetMD(
+    const Decl *D, llvm::GlobalValue *GV,
+    const CodeGen::CodeGenModule &CGM) const {
   SmallStringEnc Enc;
   if (getTypeString(Enc, D, CGM, TSC)) {
     llvm::LLVMContext &Ctx = CGM.getModule().getContext();
@@ -9013,6 +9885,21 @@ void XCoreTargetCodeGenInfo::emitTargetMD(const Decl *D, llvm::GlobalValue *GV,
   }
 }
 
+void XCoreTargetCodeGenInfo::emitTargetMetadata(
+    CodeGen::CodeGenModule &CGM,
+    const llvm::MapVector<GlobalDecl, StringRef> &MangledDeclNames) const {
+  // Warning, new MangledDeclNames may be appended within this loop.
+  // We rely on MapVector insertions adding new elements to the end
+  // of the container.
+  for (unsigned I = 0; I != MangledDeclNames.size(); ++I) {
+    auto Val = *(MangledDeclNames.begin() + I);
+    llvm::GlobalValue *GV = CGM.GetGlobalValue(Val.second);
+    if (GV) {
+      const Decl *D = Val.first.getDecl()->getMostRecentDecl();
+      emitTargetMD(D, GV, CGM);
+    }
+  }
+}
 //===----------------------------------------------------------------------===//
 // SPIR ABI Implementation
 //===----------------------------------------------------------------------===//
@@ -9021,7 +9908,7 @@ namespace {
 class SPIRTargetCodeGenInfo : public TargetCodeGenInfo {
 public:
   SPIRTargetCodeGenInfo(CodeGen::CodeGenTypes &CGT)
-    : TargetCodeGenInfo(new DefaultABIInfo(CGT)) {}
+      : TargetCodeGenInfo(std::make_unique<DefaultABIInfo>(CGT)) {}
   unsigned getOpenCLKernelCallingConv() const override;
 };
 
@@ -9346,7 +10233,8 @@ static bool appendType(SmallStringEnc &Enc, QualType QType,
 }
 
 static bool getTypeString(SmallStringEnc &Enc, const Decl *D,
-                          CodeGen::CodeGenModule &CGM, TypeStringCache &TSC) {
+                          const CodeGen::CodeGenModule &CGM,
+                          TypeStringCache &TSC) {
   if (!D)
     return false;
 
@@ -9506,7 +10394,6 @@ bool RISCVABIInfo::detectFPCCEligibleStructHelper(QualType Ty, CharUnits CurOff,
       return false;
     Field1Ty = CGT.ConvertType(EltTy);
     Field1Off = CurOff;
-    assert(CurOff.isZero() && "Unexpected offset for first field");
     Field2Ty = Field1Ty;
     Field2Off = Field1Off + getContext().getTypeSizeInChars(EltTy);
     return true;
@@ -9601,7 +10488,7 @@ bool RISCVABIInfo::detectFPCCEligibleStruct(QualType Ty, llvm::Type *&Field1Ty,
     NeededArgFPRs++;
   else if (Field2Ty)
     NeededArgGPRs++;
-  return IsCandidate;
+  return true;
 }
 
 // Call getCoerceAndExpand for the two-element flattened struct described by
@@ -9627,15 +10514,15 @@ ABIArgInfo RISCVABIInfo::coerceAndExpandFPCCEligibleStruct(
 
   CharUnits Field2Align =
       CharUnits::fromQuantity(getDataLayout().getABITypeAlignment(Field2Ty));
-  CharUnits Field1Size =
+  CharUnits Field1End = Field1Off +
       CharUnits::fromQuantity(getDataLayout().getTypeStoreSize(Field1Ty));
-  CharUnits Field2OffNoPadNoPack = Field1Size.alignTo(Field2Align);
+  CharUnits Field2OffNoPadNoPack = Field1End.alignTo(Field2Align);
 
   CharUnits Padding = CharUnits::Zero();
   if (Field2Off > Field2OffNoPadNoPack)
     Padding = Field2Off - Field2OffNoPadNoPack;
-  else if (Field2Off != Field2Align && Field2Off > Field1Size)
-    Padding = Field2Off - Field1Size;
+  else if (Field2Off != Field2Align && Field2Off > Field1End)
+    Padding = Field2Off - Field1End;
 
   bool IsPacked = !Field2Off.isMultipleOf(Field2Align);
 
@@ -9740,6 +10627,15 @@ ABIArgInfo RISCVABIInfo::classifyArgumentType(QualType Ty, bool IsFixed,
       return extendType(Ty);
     }
 
+    if (const auto *EIT = Ty->getAs<ExtIntType>()) {
+      if (EIT->getNumBits() < XLen && !MustUseStack)
+        return extendType(Ty);
+      if (EIT->getNumBits() > 128 ||
+          (!getContext().getTargetInfo().hasInt128Type() &&
+           EIT->getNumBits() > 64))
+        return getNaturalAlignIndirect(Ty, /*ByVal=*/false);
+    }
+
     return ABIArgInfo::getDirect();
   }
 
@@ -9811,7 +10707,7 @@ class RISCVTargetCodeGenInfo : public TargetCodeGenInfo {
 public:
   RISCVTargetCodeGenInfo(CodeGen::CodeGenTypes &CGT, unsigned XLen,
                          unsigned FLen)
-      : TargetCodeGenInfo(new RISCVABIInfo(CGT, XLen, FLen)) {}
+      : TargetCodeGenInfo(std::make_unique<RISCVABIInfo>(CGT, XLen, FLen)) {}
 
   void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
                            CodeGen::CodeGenModule &CGM) const override {
@@ -9836,6 +10732,56 @@ public:
 };
 } // namespace
 
+//===----------------------------------------------------------------------===//
+// VE ABI Implementation.
+//
+namespace {
+class VEABIInfo : public DefaultABIInfo {
+public:
+  VEABIInfo(CodeGenTypes &CGT) : DefaultABIInfo(CGT) {}
+
+private:
+  ABIArgInfo classifyReturnType(QualType RetTy) const;
+  ABIArgInfo classifyArgumentType(QualType RetTy) const;
+  void computeInfo(CGFunctionInfo &FI) const override;
+};
+} // end anonymous namespace
+
+ABIArgInfo VEABIInfo::classifyReturnType(QualType Ty) const {
+  if (Ty->isAnyComplexType()) {
+    return ABIArgInfo::getDirect();
+  }
+  return DefaultABIInfo::classifyReturnType(Ty);
+}
+
+ABIArgInfo VEABIInfo::classifyArgumentType(QualType Ty) const {
+  if (Ty->isAnyComplexType()) {
+    return ABIArgInfo::getDirect();
+  }
+  return DefaultABIInfo::classifyArgumentType(Ty);
+}
+
+void VEABIInfo::computeInfo(CGFunctionInfo &FI) const {
+
+  FI.getReturnInfo() = classifyReturnType(FI.getReturnType());
+  for (auto &Arg : FI.arguments())
+    Arg.info = classifyArgumentType(Arg.type);
+}
+
+namespace {
+class VETargetCodeGenInfo : public TargetCodeGenInfo {
+public:
+  VETargetCodeGenInfo(CodeGenTypes &CGT)
+      : TargetCodeGenInfo(std::make_unique<VEABIInfo>(CGT)) {}
+  // VE ABI requires the arguments of variadic and prototype-less functions
+  // are passed in both registers and memory.
+  bool isNoProtoCallVariadic(const CallArgList &args,
+                             const FunctionNoProtoType *fnType) const override {
+    return true;
+  }
+};
+} // end anonymous namespace
+
 //===----------------------------------------------------------------------===//
 // Driver code
 //===----------------------------------------------------------------------===//
@@ -9888,8 +10834,12 @@ const TargetCodeGenInfo &CodeGenModule::getTargetCodeGenInfo() {
   }
 
   case llvm::Triple::wasm32:
-  case llvm::Triple::wasm64:
-    return SetCGInfo(new WebAssemblyTargetCodeGenInfo(Types));
+  case llvm::Triple::wasm64: {
+    WebAssemblyABIInfo::ABIKind Kind = WebAssemblyABIInfo::MVP;
+    if (getTarget().getABI() == "experimental-mv")
+      Kind = WebAssemblyABIInfo::ExperimentalMV;
+    return SetCGInfo(new WebAssemblyTargetCodeGenInfo(Types, Kind));
+  }
 
   case llvm::Triple::arm:
   case llvm::Triple::armeb:
@@ -9917,14 +10867,20 @@ const TargetCodeGenInfo &CodeGenModule::getTargetCodeGenInfo() {
   }
 
   case llvm::Triple::ppc: {
+    if (Triple.isOSAIX())
+      return SetCGInfo(new AIXTargetCodeGenInfo(Types, /*Is64Bit*/ false));
+
+    bool IsSoftFloat =
+        CodeGenOpts.FloatABI == "soft" || getTarget().hasFeature("spe");
     bool RetSmallStructInRegABI =
         PPC32TargetCodeGenInfo::isStructReturnInRegABI(Triple, CodeGenOpts);
     return SetCGInfo(
-        new PPC32TargetCodeGenInfo(Types, CodeGenOpts.FloatABI == "soft" ||
-                                   getTarget().hasFeature("spe"),
-                                   RetSmallStructInRegABI));
+        new PPC32TargetCodeGenInfo(Types, IsSoftFloat, RetSmallStructInRegABI));
   }
   case llvm::Triple::ppc64:
+    if (Triple.isOSAIX())
+      return SetCGInfo(new AIXTargetCodeGenInfo(Types, /*Is64Bit*/ true));
+
     if (Triple.isOSBinFormatELF()) {
       PPC64_SVR4_ABIInfo::ABIKind Kind = PPC64_SVR4_ABIInfo::ELFv1;
       if (getTarget().getABI() == "elfv2")
@@ -9934,8 +10890,8 @@ const TargetCodeGenInfo &CodeGenModule::getTargetCodeGenInfo() {
 
       return SetCGInfo(new PPC64_SVR4_TargetCodeGenInfo(Types, Kind, HasQPX,
                                                         IsSoftFloat));
-    } else
-      return SetCGInfo(new PPC64TargetCodeGenInfo(Types));
+    }
+    return SetCGInfo(new PPC64TargetCodeGenInfo(Types));
   case llvm::Triple::ppc64le: {
     assert(Triple.isOSBinFormatELF() && "PPC64 LE non-ELF not supported!");
     PPC64_SVR4_ABIInfo::ABIKind Kind = PPC64_SVR4_ABIInfo::ELFv2;
@@ -9968,8 +10924,9 @@ const TargetCodeGenInfo &CodeGenModule::getTargetCodeGenInfo() {
   }
 
   case llvm::Triple::systemz: {
-    bool HasVector = getTarget().getABI() == "vector";
-    return SetCGInfo(new SystemZTargetCodeGenInfo(Types, HasVector));
+    bool SoftFloat = CodeGenOpts.FloatABI == "soft";
+    bool HasVector = !SoftFloat && getTarget().getABI() == "vector";
+    return SetCGInfo(new SystemZTargetCodeGenInfo(Types, HasVector, SoftFloat));
   }
 
   case llvm::Triple::tce:
@@ -10027,6 +10984,8 @@ const TargetCodeGenInfo &CodeGenModule::getTargetCodeGenInfo() {
   case llvm::Triple::spir:
   case llvm::Triple::spir64:
     return SetCGInfo(new SPIRTargetCodeGenInfo(Types));
+  case llvm::Triple::ve:
+    return SetCGInfo(new VETargetCodeGenInfo(Types));
   }
 }
 
@@ -10110,9 +11069,9 @@ llvm::Function *AMDGPUTargetCodeGenInfo::createEnqueuedBlockKernel(
   auto IP = CGF.Builder.saveIP();
   auto *BB = llvm::BasicBlock::Create(C, "entry", F);
   Builder.SetInsertPoint(BB);
-  unsigned BlockAlign = CGF.CGM.getDataLayout().getPrefTypeAlignment(BlockTy);
+  const auto BlockAlign = CGF.CGM.getDataLayout().getPrefTypeAlign(BlockTy);
   auto *BlockPtr = Builder.CreateAlloca(BlockTy, nullptr);
-  BlockPtr->setAlignment(llvm::MaybeAlign(BlockAlign));
+  BlockPtr->setAlignment(BlockAlign);
   Builder.CreateAlignedStore(F->arg_begin(), BlockPtr, BlockAlign);
   auto *Cast = Builder.CreatePointerCast(BlockPtr, InvokeFT->getParamType(0));
   llvm::SmallVector<llvm::Value *, 2> Args;
index 2dc4ec3..f482f99 100644 (file)
@@ -31,7 +31,7 @@ const char *x86::getX86TargetCPU(const ArgList &Args,
     //
     // FIXME: We should also incorporate the detected target features for use
     // with -native.
-    std::string CPU = llvm::sys::getHostCPUName();
+    std::string CPU = std::string(llvm::sys::getHostCPUName());
     if (!CPU.empty() && CPU != "generic")
       return Args.MakeArgString(CPU);
   }
@@ -93,12 +93,13 @@ const char *x86::getX86TargetCPU(const ArgList &Args,
     return "x86-64";
 
   switch (Triple.getOS()) {
-  case llvm::Triple::FreeBSD:
   case llvm::Triple::NetBSD:
     return "i486";
   case llvm::Triple::Haiku:
   case llvm::Triple::OpenBSD:
     return "i586";
+  case llvm::Triple::FreeBSD:
+    return "i686";
   default:
     // Fallback to p4.
     return "pentium4";
@@ -190,6 +191,24 @@ void x86::getX86TargetFeatures(const Driver &D, const llvm::Triple &Triple,
     LVIOpt = options::OPT_mlvi_cfi;
   }
 
+  if (Args.hasFlag(options::OPT_m_seses, options::OPT_mno_seses, false)) {
+    if (LVIOpt == options::OPT_mlvi_hardening)
+      D.Diag(diag::err_drv_argument_not_allowed_with)
+          << D.getOpts().getOptionName(options::OPT_mlvi_hardening)
+          << D.getOpts().getOptionName(options::OPT_m_seses);
+
+    if (SpectreOpt != clang::driver::options::ID::OPT_INVALID)
+      D.Diag(diag::err_drv_argument_not_allowed_with)
+          << D.getOpts().getOptionName(SpectreOpt)
+          << D.getOpts().getOptionName(options::OPT_m_seses);
+
+    Features.push_back("+seses");
+    if (!Args.hasArg(options::OPT_mno_lvi_cfi)) {
+      Features.push_back("+lvi-cfi");
+      LVIOpt = options::OPT_mlvi_cfi;
+    }
+  }
+
   if (SpectreOpt != clang::driver::options::ID::OPT_INVALID &&
       LVIOpt != clang::driver::options::ID::OPT_INVALID) {
     D.Diag(diag::err_drv_argument_not_allowed_with)
index 6990048..34ea557 100644 (file)
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "Clang.h"
+#include "AMDGPU.h"
 #include "Arch/AArch64.h"
 #include "Arch/ARM.h"
 #include "Arch/Mips.h"
 #include "Arch/RISCV.h"
 #include "Arch/Sparc.h"
 #include "Arch/SystemZ.h"
+#include "Arch/VE.h"
 #include "Arch/X86.h"
-#include "AMDGPU.h"
 #include "CommonArgs.h"
 #include "Hexagon.h"
-#include "MSP430.h"
 #include "InputInfo.h"
+#include "MSP430.h"
 #include "PS4CPU.h"
 #include "clang/Basic/CharInfo.h"
 #include "clang/Basic/CodeGenOptions.h"
@@ -35,6 +36,7 @@
 #include "llvm/Config/llvm-config.h"
 #include "llvm/Option/ArgList.h"
 #include "llvm/Support/CodeGen.h"
+#include "llvm/Support/Compiler.h"
 #include "llvm/Support/Compression.h"
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/Path.h"
@@ -307,10 +309,9 @@ static void getWebAssemblyTargetFeatures(const ArgList &Args,
   handleTargetFeaturesGroup(Args, Features, options::OPT_m_wasm_Features_Group);
 }
 
-static void getTargetFeatures(const ToolChain &TC, const llvm::Triple &Triple,
+static void getTargetFeatures(const Driver &D, const llvm::Triple &Triple,
                               const ArgList &Args, ArgStringList &CmdArgs,
-                              bool ForAS) {
-  const Driver &D = TC.getDriver();
+                              bool ForAS, bool IsAux = false) {
   std::vector<StringRef> Features;
   switch (Triple.getArch()) {
   default:
@@ -326,7 +327,7 @@ static void getTargetFeatures(const ToolChain &TC, const llvm::Triple &Triple,
   case llvm::Triple::armeb:
   case llvm::Triple::thumb:
   case llvm::Triple::thumbeb:
-    arm::getARMTargetFeatures(TC, Triple, Args, CmdArgs, Features, ForAS);
+    arm::getARMTargetFeatures(D, Triple, Args, CmdArgs, Features, ForAS);
     break;
 
   case llvm::Triple::ppc:
@@ -339,7 +340,7 @@ static void getTargetFeatures(const ToolChain &TC, const llvm::Triple &Triple,
     riscv::getRISCVTargetFeatures(D, Triple, Args, Features);
     break;
   case llvm::Triple::systemz:
-    systemz::getSystemZTargetFeatures(Args, Features);
+    systemz::getSystemZTargetFeatures(D, Args, Features);
     break;
   case llvm::Triple::aarch64:
   case llvm::Triple::aarch64_32:
@@ -368,27 +369,14 @@ static void getTargetFeatures(const ToolChain &TC, const llvm::Triple &Triple,
     break;
   case llvm::Triple::msp430:
     msp430::getMSP430TargetFeatures(D, Args, Features);
+    break;
+  case llvm::Triple::ve:
+    ve::getVETargetFeatures(D, Args, Features);
   }
 
-  // Find the last of each feature.
-  llvm::StringMap<unsigned> LastOpt;
-  for (unsigned I = 0, N = Features.size(); I < N; ++I) {
-    StringRef Name = Features[I];
-    assert(Name[0] == '-' || Name[0] == '+');
-    LastOpt[Name.drop_front(1)] = I;
-  }
-
-  for (unsigned I = 0, N = Features.size(); I < N; ++I) {
-    // If this feature was overridden, ignore it.
-    StringRef Name = Features[I];
-    llvm::StringMap<unsigned>::iterator LastI = LastOpt.find(Name.drop_front(1));
-    assert(LastI != LastOpt.end());
-    unsigned Last = LastI->second;
-    if (Last != I)
-      continue;
-
-    CmdArgs.push_back("-target-feature");
-    CmdArgs.push_back(Name.data());
+  for (auto Feature : unifyTargetFeatures(Features)) {
+    CmdArgs.push_back(IsAux ? "-aux-target-feature" : "-target-feature");
+    CmdArgs.push_back(Feature.data());
   }
 }
 
@@ -464,6 +452,11 @@ static void addExceptionArgs(const ArgList &Args, types::ID InputType,
     }
   }
 
+  // OPT_fignore_exceptions means exception could still be thrown,
+  // but no clean up or catch would happen in current module.
+  // So we do not set EH to false.
+  Args.AddLastArg(CmdArgs, options::OPT_fignore_exceptions);
+
   if (EH)
     CmdArgs.push_back("-fexceptions");
 }
@@ -522,7 +515,7 @@ static bool mustUseNonLeafFramePointerForTarget(const llvm::Triple &Triple) {
 
 static bool useFramePointerForTargetByDefault(const ArgList &Args,
                                               const llvm::Triple &Triple) {
-  if (Args.hasArg(options::OPT_pg))
+  if (Args.hasArg(options::OPT_pg) && !Args.hasArg(options::OPT_mfentry))
     return true;
 
   switch (Triple.getArch()) {
@@ -553,6 +546,13 @@ static bool useFramePointerForTargetByDefault(const ArgList &Args,
       Triple.isOSHurd()) {
     switch (Triple.getArch()) {
     // Don't use a frame pointer on linux if optimizing for certain targets.
+    case llvm::Triple::arm:
+    case llvm::Triple::armeb:
+    case llvm::Triple::thumb:
+    case llvm::Triple::thumbeb:
+      if (Triple.isAndroid())
+        return true;
+      LLVM_FALLTHROUGH;
     case llvm::Triple::mips64:
     case llvm::Triple::mips64el:
     case llvm::Triple::mips:
@@ -721,38 +721,6 @@ static void addDashXForInput(const ArgList &Args, const InputInfo &Input,
   }
 }
 
-static void appendUserToPath(SmallVectorImpl<char> &Result) {
-#ifdef LLVM_ON_UNIX
-  const char *Username = getenv("LOGNAME");
-#else
-  const char *Username = getenv("USERNAME");
-#endif
-  if (Username) {
-    // Validate that LoginName can be used in a path, and get its length.
-    size_t Len = 0;
-    for (const char *P = Username; *P; ++P, ++Len) {
-      if (!clang::isAlphanumeric(*P) && *P != '_') {
-        Username = nullptr;
-        break;
-      }
-    }
-
-    if (Username && Len > 0) {
-      Result.append(Username, Username + Len);
-      return;
-    }
-  }
-
-// Fallback to user id.
-#ifdef LLVM_ON_UNIX
-  std::string UID = llvm::utostr(getuid());
-#else
-  // FIXME: Windows seems to have an 'SID' that might work.
-  std::string UID = "9999";
-#endif
-  Result.append(UID.begin(), UID.end());
-}
-
 static void addPGOAndCoverageFlags(const ToolChain &TC, Compilation &C,
                                    const Driver &D, const InputInfo &Output,
                                    const ArgList &Args,
@@ -808,8 +776,8 @@ static void addPGOAndCoverageFlags(const ToolChain &TC, Compilation &C,
     CmdArgs.push_back("-fprofile-instrument=clang");
     if (TC.getTriple().isWindowsMSVCEnvironment()) {
       // Add dependent lib for clang_rt.profile
-      CmdArgs.push_back(Args.MakeArgString("--dependent-lib=" +
-                                           TC.getCompilerRT(Args, "profile")));
+      CmdArgs.push_back(Args.MakeArgString(
+          "--dependent-lib=" + TC.getCompilerRTBasename(Args, "profile")));
     }
   }
 
@@ -826,8 +794,9 @@ static void addPGOAndCoverageFlags(const ToolChain &TC, Compilation &C,
   }
   if (PGOGenArg) {
     if (TC.getTriple().isWindowsMSVCEnvironment()) {
-      CmdArgs.push_back(Args.MakeArgString("--dependent-lib=" +
-                                           TC.getCompilerRT(Args, "profile")));
+      // Add dependent lib for clang_rt.profile
+      CmdArgs.push_back(Args.MakeArgString(
+          "--dependent-lib=" + TC.getCompilerRTBasename(Args, "profile")));
     }
     if (PGOGenArg->getOption().matches(
             PGOGenerateArg ? options::OPT_fprofile_generate_EQ
@@ -856,11 +825,10 @@ static void addPGOAndCoverageFlags(const ToolChain &TC, Compilation &C,
     }
   }
 
-  bool EmitCovNotes = Args.hasArg(options::OPT_ftest_coverage) ||
+  bool EmitCovNotes = Args.hasFlag(options::OPT_ftest_coverage,
+                                   options::OPT_fno_test_coverage, false) ||
                       Args.hasArg(options::OPT_coverage);
-  bool EmitCovData = Args.hasFlag(options::OPT_fprofile_arcs,
-                                  options::OPT_fno_profile_arcs, false) ||
-                     Args.hasArg(options::OPT_coverage);
+  bool EmitCovData = TC.needsGCovInstrumentation(Args);
   if (EmitCovNotes)
     CmdArgs.push_back("-femit-coverage-notes");
   if (EmitCovData)
@@ -1190,12 +1158,14 @@ void Clang::AddPreprocessingOptions(Compilation &C, const JobAction &JA,
   Args.AddLastArg(CmdArgs, options::OPT_MP);
   Args.AddLastArg(CmdArgs, options::OPT_MV);
 
-  // Add offload include arguments specific for CUDA.  This must happen before
-  // we -I or -include anything else, because we must pick up the CUDA headers
-  // from the particular CUDA installation, rather than from e.g.
-  // /usr/local/include.
+  // Add offload include arguments specific for CUDA/HIP.  This must happen
+  // before we -I or -include anything else, because we must pick up the
+  // CUDA/HIP headers from the particular CUDA/ROCm installation, rather than
+  // from e.g. /usr/local/include.
   if (JA.isOffloading(Action::OFK_Cuda))
     getToolChain().AddCudaIncludeArgs(Args, CmdArgs);
+  if (JA.isOffloading(Action::OFK_HIP))
+    getToolChain().AddHIPIncludeArgs(Args, CmdArgs);
 
   // If we are offloading to a target via OpenMP we need to include the
   // openmp_wrappers folder which contains alternative system headers.
@@ -1212,7 +1182,7 @@ void Clang::AddPreprocessingOptions(Compilation &C, const JobAction &JA,
     }
 
     CmdArgs.push_back("-include");
-    CmdArgs.push_back("__clang_openmp_math_declares.h");
+    CmdArgs.push_back("__clang_openmp_device_functions.h");
   }
 
   // Add -i* options, and automatically translate to
@@ -1227,6 +1197,11 @@ void Clang::AddPreprocessingOptions(Compilation &C, const JobAction &JA,
     if (YcArg && JA.getKind() >= Action::PrecompileJobClass &&
         JA.getKind() <= Action::AssembleJobClass) {
       CmdArgs.push_back(Args.MakeArgString("-building-pch-with-obj"));
+      // -fpch-instantiate-templates is the default when creating
+      // precomp using /Yc
+      if (Args.hasFlag(options::OPT_fpch_instantiate_templates,
+                       options::OPT_fno_pch_instantiate_templates, true))
+        CmdArgs.push_back(Args.MakeArgString("-fpch-instantiate-templates"));
     }
     if (YcArg || YuArg) {
       StringRef ThroughHeader = YcArg ? YcArg->getValue() : YuArg->getValue();
@@ -1580,7 +1555,7 @@ void Clang::RenderTargetOptions(const llvm::Triple &EffectiveTriple,
   const ToolChain &TC = getToolChain();
 
   // Add the target features
-  getTargetFeatures(TC, EffectiveTriple, Args, CmdArgs, false);
+  getTargetFeatures(TC.getDriver(), EffectiveTriple, Args, CmdArgs, false);
 
   // Add target specific flags.
   switch (TC.getArch()) {
@@ -1648,6 +1623,10 @@ void Clang::RenderTargetOptions(const llvm::Triple &EffectiveTriple,
   case llvm::Triple::wasm64:
     AddWebAssemblyTargetArgs(Args, CmdArgs);
     break;
+
+  case llvm::Triple::ve:
+    AddVETargetArgs(Args, CmdArgs);
+    break;
   }
 }
 
@@ -1904,7 +1883,6 @@ void Clang::AddPPCTargetArgs(const ArgList &Args,
         ABIName = "elfv1-qpx";
         break;
       }
-
       if ((T.isOSFreeBSD() && T.getOSMajorVersion() >= 13) ||
           T.isOSOpenBSD() || T.isMusl())
         ABIName = "elfv2";
@@ -1957,6 +1935,36 @@ void Clang::AddPPCTargetArgs(const ArgList &Args,
   }
 }
 
+static void SetRISCVSmallDataLimit(const ToolChain &TC, const ArgList &Args,
+                                   ArgStringList &CmdArgs) {
+  const Driver &D = TC.getDriver();
+  const llvm::Triple &Triple = TC.getTriple();
+  // Default small data limitation is eight.
+  const char *SmallDataLimit = "8";
+  // Get small data limitation.
+  if (Args.getLastArg(options::OPT_shared, options::OPT_fpic,
+                      options::OPT_fPIC)) {
+    // Not support linker relaxation for PIC.
+    SmallDataLimit = "0";
+    if (Args.hasArg(options::OPT_G)) {
+      D.Diag(diag::warn_drv_unsupported_sdata);
+    }
+  } else if (Args.getLastArgValue(options::OPT_mcmodel_EQ)
+                 .equals_lower("large") &&
+             (Triple.getArch() == llvm::Triple::riscv64)) {
+    // Not support linker relaxation for RV64 with large code model.
+    SmallDataLimit = "0";
+    if (Args.hasArg(options::OPT_G)) {
+      D.Diag(diag::warn_drv_unsupported_sdata);
+    }
+  } else if (Arg *A = Args.getLastArg(options::OPT_G)) {
+    SmallDataLimit = A->getValue();
+  }
+  // Forward the -msmall-data-limit= option.
+  CmdArgs.push_back("-msmall-data-limit");
+  CmdArgs.push_back(SmallDataLimit);
+}
+
 void Clang::AddRISCVTargetArgs(const ArgList &Args,
                                ArgStringList &CmdArgs) const {
   const llvm::Triple &Triple = getToolChain().getTriple();
@@ -1964,6 +1972,8 @@ void Clang::AddRISCVTargetArgs(const ArgList &Args,
 
   CmdArgs.push_back("-target-abi");
   CmdArgs.push_back(ABIName.data());
+
+  SetRISCVSmallDataLimit(getToolChain(), Args, CmdArgs);
 }
 
 void Clang::AddSparcTargetArgs(const ArgList &Args,
@@ -1990,70 +2000,30 @@ void Clang::AddSystemZTargetArgs(const ArgList &Args,
                                    options::OPT_mno_backchain, false);
   bool HasPackedStack = Args.hasFlag(options::OPT_mpacked_stack,
                                      options::OPT_mno_packed_stack, false);
-  if (HasBackchain && HasPackedStack) {
+  systemz::FloatABI FloatABI =
+      systemz::getSystemZFloatABI(getToolChain().getDriver(), Args);
+  bool HasSoftFloat = (FloatABI == systemz::FloatABI::Soft);
+  if (HasBackchain && HasPackedStack && !HasSoftFloat) {
     const Driver &D = getToolChain().getDriver();
     D.Diag(diag::err_drv_unsupported_opt)
-      << Args.getLastArg(options::OPT_mpacked_stack)->getAsString(Args) +
-      " " + Args.getLastArg(options::OPT_mbackchain)->getAsString(Args);
+      << "-mpacked-stack -mbackchain -mhard-float";
   }
   if (HasBackchain)
     CmdArgs.push_back("-mbackchain");
   if (HasPackedStack)
     CmdArgs.push_back("-mpacked-stack");
-}
-
-static void addX86AlignBranchArgs(const Driver &D, const ArgList &Args,
-                                  ArgStringList &CmdArgs) {
-  if (Args.hasArg(options::OPT_mbranches_within_32B_boundaries)) {
-    CmdArgs.push_back("-mllvm");
-    CmdArgs.push_back("-x86-branches-within-32B-boundaries");
-  }
-  if (const Arg *A = Args.getLastArg(options::OPT_malign_branch_boundary_EQ)) {
-    StringRef Value = A->getValue();
-    unsigned Boundary;
-    if (Value.getAsInteger(10, Boundary) || Boundary < 16 ||
-        !llvm::isPowerOf2_64(Boundary)) {
-      D.Diag(diag::err_drv_invalid_argument_to_option)
-          << Value << A->getOption().getName();
-    } else {
-      CmdArgs.push_back("-mllvm");
-      CmdArgs.push_back(
-          Args.MakeArgString("-x86-align-branch-boundary=" + Twine(Boundary)));
-    }
-  }
-  if (const Arg *A = Args.getLastArg(options::OPT_malign_branch_EQ)) {
-    std::string AlignBranch;
-    for (StringRef T : A->getValues()) {
-      if (T != "fused" && T != "jcc" && T != "jmp" && T != "call" &&
-          T != "ret" && T != "indirect")
-        D.Diag(diag::err_drv_invalid_malign_branch_EQ)
-            << T << "fused, jcc, jmp, call, ret, indirect";
-      if (!AlignBranch.empty())
-        AlignBranch += '+';
-      AlignBranch += T;
-    }
-    CmdArgs.push_back("-mllvm");
-    CmdArgs.push_back(Args.MakeArgString("-x86-align-branch=" + AlignBranch));
-  }
-  if (const Arg *A =
-          Args.getLastArg(options::OPT_malign_branch_prefix_size_EQ)) {
-    StringRef Value = A->getValue();
-    unsigned PrefixSize;
-    if (Value.getAsInteger(10, PrefixSize) || PrefixSize > 5) {
-      D.Diag(diag::err_drv_invalid_argument_to_option)
-          << Value << A->getOption().getName();
-    } else {
-      CmdArgs.push_back("-mllvm");
-      CmdArgs.push_back(Args.MakeArgString("-x86-align-branch-prefix-size=" +
-                                           Twine(PrefixSize)));
-    }
+  if (HasSoftFloat) {
+    // Floating point operations and argument passing are soft.
+    CmdArgs.push_back("-msoft-float");
+    CmdArgs.push_back("-mfloat-abi");
+    CmdArgs.push_back("soft");
   }
 }
 
 void Clang::AddX86TargetArgs(const ArgList &Args,
                              ArgStringList &CmdArgs) const {
   const Driver &D = getToolChain().getDriver();
-  addX86AlignBranchArgs(D, Args, CmdArgs);
+  addX86AlignBranchArgs(D, Args, CmdArgs, /*IsLTO=*/false);
 
   if (!Args.hasFlag(options::OPT_mred_zone, options::OPT_mno_red_zone, true) ||
       Args.hasArg(options::OPT_mkernel) ||
@@ -2154,6 +2124,12 @@ void Clang::AddWebAssemblyTargetArgs(const ArgList &Args,
   }
 }
 
+void Clang::AddVETargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const {
+  // Floating point operations and argument passing are hard.
+  CmdArgs.push_back("-mfloat-abi");
+  CmdArgs.push_back("hard");
+}
+
 void Clang::DumpCompilationDatabase(Compilation &C, StringRef Filename,
                                     StringRef Target, const InputInfo &Output,
                                     const InputInfo &Input, const ArgList &Args) const {
@@ -2472,7 +2448,8 @@ static void CollectArgsForIntegratedAssembler(Compilation &C,
 
 static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D,
                                        bool OFastEnabled, const ArgList &Args,
-                                       ArgStringList &CmdArgs) {
+                                       ArgStringList &CmdArgs,
+                                       const JobAction &JA) {
   // Handle various floating point optimization flags, mapping them to the
   // appropriate LLVM code generation flags. This is complicated by several
   // "umbrella" flags, so we do this by stepping through the flags incrementally
@@ -2494,10 +2471,17 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D,
   StringRef FPModel = "";
   // -ffp-exception-behavior options: strict, maytrap, ignore
   StringRef FPExceptionBehavior = "";
-  StringRef DenormalFPMath = "";
+  const llvm::DenormalMode DefaultDenormalFPMath =
+      TC.getDefaultDenormalModeForType(Args, JA);
+  const llvm::DenormalMode DefaultDenormalFP32Math =
+      TC.getDefaultDenormalModeForType(Args, JA, &llvm::APFloat::IEEEsingle());
+
+  llvm::DenormalMode DenormalFPMath = DefaultDenormalFPMath;
+  llvm::DenormalMode DenormalFP32Math = DefaultDenormalFP32Math;
   StringRef FPContract = "";
   bool StrictFPModel = false;
 
+
   if (const Arg *A = Args.getLastArg(options::OPT_flimited_precision_EQ)) {
     CmdArgs.push_back("-mlimit-float-precision");
     CmdArgs.push_back(A->getValue());
@@ -2519,8 +2503,13 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D,
       ReciprocalMath = false;
       SignedZeros = true;
       // -fno_fast_math restores default denormal and fpcontract handling
-      DenormalFPMath = "";
       FPContract = "";
+      DenormalFPMath = llvm::DenormalMode::getIEEE();
+
+      // FIXME: The target may have picked a non-IEEE default mode here based on
+      // -cl-denorms-are-zero. Should the target consider -fp-model interaction?
+      DenormalFP32Math = llvm::DenormalMode::getIEEE();
+
       StringRef Val = A->getValue();
       if (OFastEnabled && !Val.equals("fast")) {
           // Only -ffp-model=fast is compatible with OFast, ignore.
@@ -2554,6 +2543,7 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D,
         optID = options::OPT_frounding_math;
         FPExceptionBehavior = "strict";
         FPModel = Val;
+        FPContract = "off";
         TrappingMath = true;
       } else
         D.Diag(diag::err_drv_unsupported_option_argument)
@@ -2613,7 +2603,19 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D,
       break;
 
     case options::OPT_fdenormal_fp_math_EQ:
-      DenormalFPMath = A->getValue();
+      DenormalFPMath = llvm::parseDenormalFPAttribute(A->getValue());
+      if (!DenormalFPMath.isValid()) {
+        D.Diag(diag::err_drv_invalid_value)
+            << A->getAsString(Args) << A->getValue();
+      }
+      break;
+
+    case options::OPT_fdenormal_fp_math_f32_EQ:
+      DenormalFP32Math = llvm::parseDenormalFPAttribute(A->getValue());
+      if (!DenormalFP32Math.isValid()) {
+        D.Diag(diag::err_drv_invalid_value)
+            << A->getAsString(Args) << A->getValue();
+      }
       break;
 
     // Validate and pass through -ffp-contract option.
@@ -2682,8 +2684,10 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D,
       SignedZeros = true;
       TrappingMath = true;
       FPExceptionBehavior = "strict";
-      // -fno_unsafe_math_optimizations restores default denormal handling
-      DenormalFPMath = "";
+
+      // The target may have opted to flush by default, so force IEEE.
+      DenormalFPMath = llvm::DenormalMode::getIEEE();
+      DenormalFP32Math = llvm::DenormalMode::getIEEE();
       break;
 
     case options::OPT_Ofast:
@@ -2716,7 +2720,8 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D,
       TrappingMath = false;
       RoundingFPMath = false;
       // -fno_fast_math restores default denormal and fpcontract handling
-      DenormalFPMath = "";
+      DenormalFPMath = DefaultDenormalFPMath;
+      DenormalFP32Math = llvm::DenormalMode::getIEEE();
       FPContract = "";
       break;
     }
@@ -2726,7 +2731,9 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D,
       if (HonorINFs && HonorNaNs &&
         !AssociativeMath && !ReciprocalMath &&
         SignedZeros && TrappingMath && RoundingFPMath &&
-        DenormalFPMath.empty() && FPContract.empty())
+        (FPContract.equals("off") || FPContract.empty()) &&
+        DenormalFPMath == llvm::DenormalMode::getIEEE() &&
+        DenormalFP32Math == llvm::DenormalMode::getIEEE())
         // OK: Current Arg doesn't conflict with -ffp-model=strict
         ;
       else {
@@ -2772,9 +2779,21 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D,
   } else if (TrappingMathPresent)
     CmdArgs.push_back("-fno-trapping-math");
 
-  if (!DenormalFPMath.empty())
-    CmdArgs.push_back(
-        Args.MakeArgString("-fdenormal-fp-math=" + DenormalFPMath));
+  // The default is IEEE.
+  if (DenormalFPMath != llvm::DenormalMode::getIEEE()) {
+    llvm::SmallString<64> DenormFlag;
+    llvm::raw_svector_ostream ArgStr(DenormFlag);
+    ArgStr << "-fdenormal-fp-math=" << DenormalFPMath;
+    CmdArgs.push_back(Args.MakeArgString(ArgStr.str()));
+  }
+
+  // Add f32 specific denormal mode flag if it's different.
+  if (DenormalFP32Math != DenormalFPMath) {
+    llvm::SmallString<64> DenormFlag;
+    llvm::raw_svector_ostream ArgStr(DenormFlag);
+    ArgStr << "-fdenormal-fp-math-f32=" << DenormalFP32Math;
+    CmdArgs.push_back(Args.MakeArgString(ArgStr.str()));
+  }
 
   if (!FPContract.empty())
     CmdArgs.push_back(Args.MakeArgString("-ffp-contract=" + FPContract));
@@ -2949,6 +2968,22 @@ static void RenderSSPOptions(const ToolChain &TC, const ArgList &Args,
   }
 }
 
+static void RenderSCPOptions(const ToolChain &TC, const ArgList &Args,
+                             ArgStringList &CmdArgs) {
+  const llvm::Triple &EffectiveTriple = TC.getEffectiveTriple();
+
+  if (!EffectiveTriple.isOSLinux())
+    return;
+
+  if (!EffectiveTriple.isX86() && !EffectiveTriple.isSystemZ() &&
+      !EffectiveTriple.isPPC64())
+    return;
+
+  if (Args.hasFlag(options::OPT_fstack_clash_protection,
+                   options::OPT_fno_stack_clash_protection, false))
+    CmdArgs.push_back("-fstack-clash-protection");
+}
+
 static void RenderTrivialAutoVarInitOptions(const Driver &D,
                                             const ToolChain &TC,
                                             const ArgList &Args,
@@ -2991,9 +3026,26 @@ static void RenderTrivialAutoVarInitOptions(const Driver &D,
     CmdArgs.push_back(
         Args.MakeArgString("-ftrivial-auto-var-init=" + TrivialAutoVarInit));
   }
+
+  if (Arg *A =
+          Args.getLastArg(options::OPT_ftrivial_auto_var_init_stop_after)) {
+    if (!Args.hasArg(options::OPT_ftrivial_auto_var_init) ||
+        StringRef(
+            Args.getLastArg(options::OPT_ftrivial_auto_var_init)->getValue()) ==
+            "uninitialized")
+      D.Diag(diag::err_drv_trivial_auto_var_init_stop_after_missing_dependency);
+    A->claim();
+    StringRef Val = A->getValue();
+    if (std::stoi(Val.str()) <= 0)
+      D.Diag(diag::err_drv_trivial_auto_var_init_stop_after_invalid_value);
+    CmdArgs.push_back(
+        Args.MakeArgString("-ftrivial-auto-var-init-stop-after=" + Val));
+  }
 }
 
 static void RenderOpenCLOptions(const ArgList &Args, ArgStringList &CmdArgs) {
+  // cl-denorms-are-zero is not forwarded. It is translated into a generic flag
+  // for denormal flushing handling based on the target.
   const unsigned ForwardedArguments[] = {
       options::OPT_cl_opt_disable,
       options::OPT_cl_strict_aliasing,
@@ -3004,7 +3056,6 @@ static void RenderOpenCLOptions(const ArgList &Args, ArgStringList &CmdArgs) {
       options::OPT_cl_fast_relaxed_math,
       options::OPT_cl_mad_enable,
       options::OPT_cl_no_signed_zeros,
-      options::OPT_cl_denorms_are_zero,
       options::OPT_cl_fp32_correctly_rounded_divide_sqrt,
       options::OPT_cl_uniform_work_group_size
   };
@@ -3128,11 +3179,13 @@ static void RenderBuiltinOptions(const ToolChain &TC, const llvm::Triple &T,
     CmdArgs.push_back("-fno-math-builtin");
 }
 
-void Driver::getDefaultModuleCachePath(SmallVectorImpl<char> &Result) {
-  llvm::sys::path::system_temp_directory(/*erasedOnReboot=*/false, Result);
-  llvm::sys::path::append(Result, "org.llvm.clang.");
-  appendUserToPath(Result);
-  llvm::sys::path::append(Result, "ModuleCache");
+bool Driver::getDefaultModuleCachePath(SmallVectorImpl<char> &Result) {
+  if (llvm::sys::path::cache_directory(Result)) {
+    llvm::sys::path::append(Result, "clang");
+    llvm::sys::path::append(Result, "ModuleCache");
+    return true;
+  }
+  return false;
 }
 
 static void RenderModulesOptions(Compilation &C, const Driver &D,
@@ -3189,6 +3242,7 @@ static void RenderModulesOptions(Compilation &C, const Driver &D,
     if (Arg *A = Args.getLastArg(options::OPT_fmodules_cache_path))
       Path = A->getValue();
 
+    bool HasPath = true;
     if (C.isForDiagnostics()) {
       // When generating crash reports, we want to emit the modules along with
       // the reproduction sources, so we ignore any provided module path.
@@ -3197,12 +3251,16 @@ static void RenderModulesOptions(Compilation &C, const Driver &D,
       llvm::sys::path::append(Path, "modules");
     } else if (Path.empty()) {
       // No module path was provided: use the default.
-      Driver::getDefaultModuleCachePath(Path);
+      HasPath = Driver::getDefaultModuleCachePath(Path);
     }
 
-    const char Arg[] = "-fmodules-cache-path=";
-    Path.insert(Path.begin(), Arg, Arg + strlen(Arg));
-    CmdArgs.push_back(Args.MakeArgString(Path));
+    // `HasPath` will only be false if getDefaultModuleCachePath() fails.
+    // That being said, that failure is unlikely and not caching is harmless.
+    if (HasPath) {
+      const char Arg[] = "-fmodules-cache-path=";
+      Path.insert(Path.begin(), Arg, Arg + strlen(Arg));
+      CmdArgs.push_back(Args.MakeArgString(Path));
+    }
   }
 
   if (HaveModules) {
@@ -3461,9 +3519,9 @@ static void RenderDiagnosticsOptions(const Driver &D, const ArgList &Args,
     CmdArgs.push_back("-fno-diagnostics-fixit-info");
 
   // Enable -fdiagnostics-show-option by default.
-  if (Args.hasFlag(options::OPT_fdiagnostics_show_option,
-                   options::OPT_fno_diagnostics_show_option))
-    CmdArgs.push_back("-fdiagnostics-show-option");
+  if (!Args.hasFlag(options::OPT_fdiagnostics_show_option,
+                    options::OPT_fno_diagnostics_show_option, true))
+    CmdArgs.push_back("-fno-diagnostics-show-option");
 
   if (const Arg *A =
           Args.getLastArg(options::OPT_fdiagnostics_show_category_EQ)) {
@@ -3566,8 +3624,7 @@ static DwarfFissionKind getDebugFissionKind(const Driver &D,
 
 static void RenderDebugOptions(const ToolChain &TC, const Driver &D,
                                const llvm::Triple &T, const ArgList &Args,
-                               bool EmitCodeView, bool IsWindowsMSVC,
-                               ArgStringList &CmdArgs,
+                               bool EmitCodeView, ArgStringList &CmdArgs,
                                codegenoptions::DebugInfoKind &DebugInfoKind,
                                DwarfFissionKind &DwarfFission) {
   if (Args.hasFlag(options::OPT_fdebug_info_for_profiling,
@@ -3700,10 +3757,9 @@ static void RenderDebugOptions(const ToolChain &TC, const Driver &D,
   // not to include any column info.
   if (const Arg *A = Args.getLastArg(options::OPT_gcolumn_info))
     (void)checkDebugInfoOption(A, Args, D, TC);
-  if (Args.hasFlag(options::OPT_gcolumn_info, options::OPT_gno_column_info,
-                   /*Default=*/!EmitCodeView &&
-                       DebuggerTuning != llvm::DebuggerKind::SCE))
-    CmdArgs.push_back("-dwarf-column-info");
+  if (!Args.hasFlag(options::OPT_gcolumn_info, options::OPT_gno_column_info,
+                    !EmitCodeView && DebuggerTuning != llvm::DebuggerKind::SCE))
+    CmdArgs.push_back("-gno-column-info");
 
   // FIXME: Move backend command line options to the module.
   // If -gline-tables-only or -gline-directives-only is the last option it wins.
@@ -3904,7 +3960,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
     }
   }
 
-  const llvm::Triple *AuxTriple = IsCuda ? TC.getAuxTriple() : nullptr;
+  const llvm::Triple *AuxTriple =
+      (IsCuda || IsHIP) ? TC.getAuxTriple() : nullptr;
   bool IsWindowsMSVC = RawTriple.isWindowsMSVCEnvironment();
   bool IsIAMCU = RawTriple.isOSIAMCU();
 
@@ -3969,6 +4026,18 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
     CmdArgs.push_back(Args.MakeArgString(NormalizedTriple));
   }
 
+  if (Args.hasFlag(options::OPT_fsycl, options::OPT_fno_sycl, false)) {
+    CmdArgs.push_back("-fsycl");
+    CmdArgs.push_back("-fsycl-is-device");
+
+    if (Arg *A = Args.getLastArg(options::OPT_sycl_std_EQ)) {
+      A->render(Args, CmdArgs);
+    } else {
+      // Ensure the default version in SYCL mode is 1.2.1 (aka 2017)
+      CmdArgs.push_back("-sycl-std=2017");
+    }
+  }
+
   if (IsOpenMPDevice) {
     // We have to pass the triple of the host if compiling for an OpenMP device.
     std::string NormalizedTriple =
@@ -3982,9 +4051,10 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
   if (Triple.isOSWindows() && (Triple.getArch() == llvm::Triple::arm ||
                                Triple.getArch() == llvm::Triple::thumb)) {
     unsigned Offset = Triple.getArch() == llvm::Triple::arm ? 4 : 6;
-    unsigned Version;
-    Triple.getArchName().substr(Offset).getAsInteger(10, Version);
-    if (Version < 7)
+    unsigned Version = 0;
+    bool Failure =
+        Triple.getArchName().substr(Offset).consumeInteger(10, Version);
+    if (Failure || Version < 7)
       D.Diag(diag::err_target_unsupported_arch) << Triple.getArchName()
                                                 << TripleStr;
   }
@@ -4075,7 +4145,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
       StringRef ArgStr =
           Args.hasArg(options::OPT_interface_stub_version_EQ)
               ? Args.getLastArgValue(options::OPT_interface_stub_version_EQ)
-              : "experimental-ifs-v1";
+              : "experimental-ifs-v2";
       CmdArgs.push_back("-emit-interface-stubs");
       CmdArgs.push_back(
           Args.MakeArgString(Twine("-interface-stub-version=") + ArgStr.str()));
@@ -4145,8 +4215,13 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
         options::OPT_fno_function_sections,
         options::OPT_fdata_sections,
         options::OPT_fno_data_sections,
+        options::OPT_fbasic_block_sections_EQ,
+        options::OPT_funique_internal_linkage_names,
+        options::OPT_fno_unique_internal_linkage_names,
         options::OPT_funique_section_names,
         options::OPT_fno_unique_section_names,
+        options::OPT_funique_basic_block_section_names,
+        options::OPT_fno_unique_basic_block_section_names,
         options::OPT_mrestrict_it,
         options::OPT_mno_restrict_it,
         options::OPT_mstackrealign,
@@ -4187,7 +4262,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
       CmdArgs.push_back("-mdisable-tail-calls");
 
     RenderFloatingPointOptions(TC, D, isOptimizationLevelFast(Args), Args,
-                               CmdArgs);
+                               CmdArgs, JA);
 
     // Render ABI arguments
     switch (TC.getArch()) {
@@ -4232,8 +4307,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
         II.getInputArg().renderAsInput(Args, CmdArgs);
     }
 
-    C.addCommand(std::make_unique<Command>(JA, *this, D.getClangProgramPath(),
-                                            CmdArgs, Inputs));
+    C.addCommand(
+        std::make_unique<Command>(JA, *this, ResponseFileSupport::AtFileUTF8(),
+                                  D.getClangProgramPath(), CmdArgs, Inputs));
     return;
   }
 
@@ -4321,14 +4397,24 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
   bool IsPIE;
   std::tie(RelocationModel, PICLevel, IsPIE) = ParsePICArgs(TC, Args);
 
-  const char *RMName = RelocationModelName(RelocationModel);
+  bool IsROPI = RelocationModel == llvm::Reloc::ROPI ||
+                RelocationModel == llvm::Reloc::ROPI_RWPI;
+  bool IsRWPI = RelocationModel == llvm::Reloc::RWPI ||
+                RelocationModel == llvm::Reloc::ROPI_RWPI;
+
+  if (Args.hasArg(options::OPT_mcmse) &&
+      !Args.hasArg(options::OPT_fallow_unsupported)) {
+    if (IsROPI)
+      D.Diag(diag::err_cmse_pi_are_incompatible) << IsROPI;
+    if (IsRWPI)
+      D.Diag(diag::err_cmse_pi_are_incompatible) << !IsRWPI;
+  }
 
-  if ((RelocationModel == llvm::Reloc::ROPI ||
-       RelocationModel == llvm::Reloc::ROPI_RWPI) &&
-      types::isCXX(Input.getType()) &&
+  if (IsROPI && types::isCXX(Input.getType()) &&
       !Args.hasArg(options::OPT_fallow_unsupported))
     D.Diag(diag::err_drv_ropi_incompatible_with_cxx);
 
+  const char *RMName = RelocationModelName(RelocationModel);
   if (RMName) {
     CmdArgs.push_back("-mrelocation-model");
     CmdArgs.push_back(RMName);
@@ -4352,15 +4438,27 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
     CmdArgs.push_back(A->getValue());
   }
 
-  CmdArgs.push_back("-mthread-model");
-  if (Arg *A = Args.getLastArg(options::OPT_mthread_model)) {
-    if (!TC.isThreadModelSupported(A->getValue()))
-      D.Diag(diag::err_drv_invalid_thread_model_for_target)
-          << A->getValue() << A->getAsString(Args);
-    CmdArgs.push_back(A->getValue());
+  // The default is -fno-semantic-interposition. We render it just because we
+  // require explicit -fno-semantic-interposition to infer dso_local.
+  if (Arg *A = Args.getLastArg(options::OPT_fsemantic_interposition,
+                               options::OPT_fno_semantic_interposition))
+    if (RelocationModel != llvm::Reloc::Static && !IsPIE)
+      A->render(Args, CmdArgs);
+
+  {
+    std::string Model;
+    if (Arg *A = Args.getLastArg(options::OPT_mthread_model)) {
+      if (!TC.isThreadModelSupported(A->getValue()))
+        D.Diag(diag::err_drv_invalid_thread_model_for_target)
+            << A->getValue() << A->getAsString(Args);
+      Model = A->getValue();
+    } else
+      Model = TC.getThreadModel();
+    if (Model != "posix") {
+      CmdArgs.push_back("-mthread-model");
+      CmdArgs.push_back(Args.MakeArgString(Model));
+    }
   }
-  else
-    CmdArgs.push_back(Args.MakeArgString(TC.getThreadModel()));
 
   Args.AddLastArg(CmdArgs, options::OPT_fveclib);
 
@@ -4442,6 +4540,13 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
   if (Args.hasFlag(options::OPT_mrtd, options::OPT_mno_rtd, false))
     CmdArgs.push_back("-fdefault-calling-conv=stdcall");
 
+  if (Args.hasArg(options::OPT_fenable_matrix)) {
+    // enable-matrix is needed by both the LangOpts and by LLVM.
+    CmdArgs.push_back("-fenable-matrix");
+    CmdArgs.push_back("-mllvm");
+    CmdArgs.push_back("-enable-matrix");
+  }
+
   CodeGenOptions::FramePointerKind FPKeepKind =
                   getFramePointerKind(Args, RawTriple);
   const char *FPKeepKindStr = nullptr;
@@ -4460,8 +4565,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
   CmdArgs.push_back(FPKeepKindStr);
 
   if (!Args.hasFlag(options::OPT_fzero_initialized_in_bss,
-                    options::OPT_fno_zero_initialized_in_bss))
-    CmdArgs.push_back("-mno-zero-initialized-in-bss");
+                    options::OPT_fno_zero_initialized_in_bss, true))
+    CmdArgs.push_back("-fno-zero-initialized-in-bss");
 
   bool OFastEnabled = isOptimizationLevelFast(Args);
   // If -Ofast is the optimization level, then -fstrict-aliasing should be
@@ -4511,7 +4616,15 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
   if (Args.hasArg(options::OPT_fsplit_stack))
     CmdArgs.push_back("-split-stacks");
 
-  RenderFloatingPointOptions(TC, D, OFastEnabled, Args, CmdArgs);
+  RenderFloatingPointOptions(TC, D, OFastEnabled, Args, CmdArgs, JA);
+
+  if (Arg *A = Args.getLastArg(options::OPT_mdouble_EQ)) {
+    if (TC.getArch() == llvm::Triple::avr)
+      A->render(Args, CmdArgs);
+    else
+      D.Diag(diag::err_drv_unsupported_opt_for_target)
+          << A->getAsString(Args) << TripleStr;
+  }
 
   if (Arg *A = Args.getLastArg(options::OPT_LongDouble_Group)) {
     if (TC.getTriple().isX86())
@@ -4527,9 +4640,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
   // Decide whether to use verbose asm. Verbose assembly is the default on
   // toolchains which have the integrated assembler on by default.
   bool IsIntegratedAssemblerDefault = TC.IsIntegratedAssemblerDefault();
-  if (Args.hasFlag(options::OPT_fverbose_asm, options::OPT_fno_verbose_asm,
-                   IsIntegratedAssemblerDefault))
-    CmdArgs.push_back("-masm-verbose");
+  if (!Args.hasFlag(options::OPT_fverbose_asm, options::OPT_fno_verbose_asm,
+                    IsIntegratedAssemblerDefault))
+    CmdArgs.push_back("-fno-verbose-asm");
 
   if (!TC.useIntegratedAs())
     CmdArgs.push_back("-no-integrated-as");
@@ -4545,8 +4658,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
 
   // Enable -mconstructor-aliases except on darwin, where we have to work around
   // a linker bug (see <rdar://problem/7651567>), and CUDA device code, where
-  // aliases aren't supported.
-  if (!RawTriple.isOSDarwin() && !RawTriple.isNVPTX())
+  // aliases aren't supported. Similarly, aliases aren't yet supported for AIX.
+  if (!RawTriple.isOSDarwin() && !RawTriple.isNVPTX() && !RawTriple.isOSAIX())
     CmdArgs.push_back("-mconstructor-aliases");
 
   // Darwin's kernel doesn't support guard variables; just die if we
@@ -4555,7 +4668,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
     CmdArgs.push_back("-fforbid-guard-variables");
 
   if (Args.hasFlag(options::OPT_mms_bitfields, options::OPT_mno_ms_bitfields,
-                   false)) {
+                   Triple.isWindowsGNUEnvironment())) {
     CmdArgs.push_back("-mms-bitfields");
   }
 
@@ -4591,14 +4704,36 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
                    AsynchronousUnwindTables))
     CmdArgs.push_back("-munwind-tables");
 
+  // Prepare `-aux-target-cpu` and `-aux-target-feature` unless
+  // `--gpu-use-aux-triple-only` is specified.
+  if (!Args.getLastArg(options::OPT_gpu_use_aux_triple_only) &&
+      ((IsCuda && JA.isDeviceOffloading(Action::OFK_Cuda)) ||
+       (IsHIP && JA.isDeviceOffloading(Action::OFK_HIP)))) {
+    const ArgList &HostArgs =
+        C.getArgsForToolChain(nullptr, StringRef(), Action::OFK_None);
+    std::string HostCPU =
+        getCPUName(HostArgs, *TC.getAuxTriple(), /*FromAs*/ false);
+    if (!HostCPU.empty()) {
+      CmdArgs.push_back("-aux-target-cpu");
+      CmdArgs.push_back(Args.MakeArgString(HostCPU));
+    }
+    getTargetFeatures(D, *TC.getAuxTriple(), HostArgs, CmdArgs,
+                      /*ForAS*/ false, /*IsAux*/ true);
+  }
+
   TC.addClangTargetOptions(Args, CmdArgs, JA.getOffloadingDeviceKind());
 
   // FIXME: Handle -mtune=.
   (void)Args.hasArg(options::OPT_mtune_EQ);
 
   if (Arg *A = Args.getLastArg(options::OPT_mcmodel_EQ)) {
-    CmdArgs.push_back("-mcode-model");
-    CmdArgs.push_back(A->getValue());
+    StringRef CM = A->getValue();
+    if (CM == "small" || CM == "kernel" || CM == "medium" || CM == "large" ||
+        CM == "tiny")
+      A->render(Args, CmdArgs);
+    else
+      D.Diag(diag::err_drv_invalid_argument_to_option)
+          << CM << A->getOption().getName();
   }
 
   if (Arg *A = Args.getLastArg(options::OPT_mtls_size_EQ)) {
@@ -4633,8 +4768,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
     AddClangCLArgs(Args, InputType, CmdArgs, &DebugInfoKind, &EmitCodeView);
 
   DwarfFissionKind DwarfFission;
-  RenderDebugOptions(TC, D, RawTriple, Args, EmitCodeView, IsWindowsMSVC,
-                     CmdArgs, DebugInfoKind, DwarfFission);
+  RenderDebugOptions(TC, D, RawTriple, Args, EmitCodeView, CmdArgs,
+                     DebugInfoKind, DwarfFission);
 
   // Add the split debug info name to the command lines here so we
   // can propagate it to the backend.
@@ -4680,11 +4815,17 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
   }
 
   Args.AddAllArgs(CmdArgs, options::OPT_v);
-  Args.AddLastArg(CmdArgs, options::OPT_H);
+
+  if (Args.getLastArg(options::OPT_H)) {
+    CmdArgs.push_back("-H");
+    CmdArgs.push_back("-sys-header-deps");
+  }
+
   if (D.CCPrintHeaders && !D.CCGenDiagnostics) {
     CmdArgs.push_back("-header-include-file");
     CmdArgs.push_back(D.CCPrintHeadersFilename ? D.CCPrintHeadersFilename
                                                : "-");
+    CmdArgs.push_back("-sys-header-deps");
   }
   Args.AddLastArg(CmdArgs, options::OPT_P);
   Args.AddLastArg(CmdArgs, options::OPT_print_ivar_layout);
@@ -4707,6 +4848,16 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
     CmdArgs.push_back("-ffunction-sections");
   }
 
+  if (Arg *A = Args.getLastArg(options::OPT_fbasic_block_sections_EQ)) {
+    StringRef Val = A->getValue();
+    if (Val != "all" && Val != "labels" && Val != "none" &&
+        !(Val.startswith("list=") && llvm::sys::fs::exists(Val.substr(5))))
+      D.Diag(diag::err_drv_invalid_value)
+          << A->getAsString(Args) << A->getValue();
+    else
+      A->render(Args, CmdArgs);
+  }
+
   if (Args.hasFlag(options::OPT_fdata_sections, options::OPT_fno_data_sections,
                    UseSeparateSections)) {
     CmdArgs.push_back("-fdata-sections");
@@ -4716,14 +4867,22 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
                     options::OPT_fno_unique_section_names, true))
     CmdArgs.push_back("-fno-unique-section-names");
 
+  if (Args.hasFlag(options::OPT_funique_internal_linkage_names,
+                   options::OPT_fno_unique_internal_linkage_names, false))
+    CmdArgs.push_back("-funique-internal-linkage-names");
+
+  if (Args.hasFlag(options::OPT_funique_basic_block_section_names,
+                   options::OPT_fno_unique_basic_block_section_names, false))
+    CmdArgs.push_back("-funique-basic-block-section-names");
+
   Args.AddLastArg(CmdArgs, options::OPT_finstrument_functions,
                   options::OPT_finstrument_functions_after_inlining,
                   options::OPT_finstrument_function_entry_bare);
 
-  // NVPTX doesn't support PGO or coverage. There's no runtime support for
-  // sampling, overhead of call arc collection is way too high and there's no
-  // way to collect the output.
-  if (!Triple.isNVPTX())
+  // NVPTX/AMDGCN doesn't support PGO or coverage. There's no runtime support
+  // for sampling, overhead of call arc collection is way too high and there's
+  // no way to collect the output.
+  if (!Triple.isNVPTX() && !Triple.isAMDGCN())
     addPGOAndCoverageFlags(TC, C, D, Output, Args, CmdArgs);
 
   Args.AddLastArg(CmdArgs, options::OPT_fclang_abi_compat_EQ);
@@ -4842,6 +5001,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
 
     Args.AddLastArg(CmdArgs, options::OPT_ftrigraphs,
                     options::OPT_fno_trigraphs);
+
+    // HIP headers has minimum C++ standard requirements. Therefore set the
+    // default language standard.
+    if (IsHIP)
+      CmdArgs.push_back(IsWindowsMSVC ? "-std=c++14" : "-std=c++11");
   }
 
   // GCC's behavior for -Wwrite-strings is a bit strange:
@@ -4985,15 +5149,20 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
   }
 
   // Pass -fmessage-length=.
-  CmdArgs.push_back("-fmessage-length");
+  unsigned MessageLength = 0;
   if (Arg *A = Args.getLastArg(options::OPT_fmessage_length_EQ)) {
-    CmdArgs.push_back(A->getValue());
+    StringRef V(A->getValue());
+    if (V.getAsInteger(0, MessageLength))
+      D.Diag(diag::err_drv_invalid_argument_to_option)
+          << V << A->getOption().getName();
   } else {
     // If -fmessage-length=N was not specified, determine whether this is a
     // terminal and, if so, implicitly define -fmessage-length appropriately.
-    unsigned N = llvm::sys::Process::StandardErrColumns();
-    CmdArgs.push_back(Args.MakeArgString(Twine(N)));
+    MessageLength = llvm::sys::Process::StandardErrColumns();
   }
+  if (MessageLength != 0)
+    CmdArgs.push_back(
+        Args.MakeArgString("-fmessage-length=" + Twine(MessageLength)));
 
   // -fvisibility= and -fvisibility-ms-compat are of a piece.
   if (const Arg *A = Args.getLastArg(options::OPT_fvisibility_EQ,
@@ -5022,7 +5191,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
   Args.AddLastArg(CmdArgs, options::OPT_fno_operator_names);
   Args.AddLastArg(CmdArgs, options::OPT_femulated_tls,
                   options::OPT_fno_emulated_tls);
-  Args.AddLastArg(CmdArgs, options::OPT_fkeep_static_consts);
 
   // AltiVec-like language extensions aren't relevant for assembling.
   if (!isa<PreprocessJobAction>(JA) || Output.getType() != types::TY_PP_Asm)
@@ -5068,6 +5236,13 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
                        options::OPT_fno_openmp_cuda_mode, /*Default=*/false))
         CmdArgs.push_back("-fopenmp-cuda-mode");
 
+      // When in OpenMP offloading mode with NVPTX target, forward
+      // cuda-parallel-target-regions flag
+      if (Args.hasFlag(options::OPT_fopenmp_cuda_parallel_target_regions,
+                       options::OPT_fno_openmp_cuda_parallel_target_regions,
+                       /*Default=*/true))
+        CmdArgs.push_back("-fopenmp-cuda-parallel-target-regions");
+
       // When in OpenMP offloading mode with NVPTX target, check if full runtime
       // is required.
       if (Args.hasFlag(options::OPT_fopenmp_cuda_force_full_runtime,
@@ -5189,10 +5364,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
 
   Args.AddLastArg(CmdArgs, options::OPT_pthread);
 
-  if (Args.hasFlag(options::OPT_mspeculative_load_hardening, options::OPT_mno_speculative_load_hardening,
-                   false))
+  if (Args.hasFlag(options::OPT_mspeculative_load_hardening,
+                   options::OPT_mno_speculative_load_hardening, false))
     CmdArgs.push_back(Args.MakeArgString("-mspeculative-load-hardening"));
 
+  RenderSCPOptions(TC, Args, CmdArgs);
   RenderTrivialAutoVarInitOptions(D, TC, Args, CmdArgs);
 
   // -ret-protector
@@ -5224,7 +5400,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
         options::OPT__param); // ssp-buffer-size
   } else {
     // If we're not using retguard, then do the usual stack protector
-    RenderSSPOptions(getToolChain(), Args, CmdArgs, KernelOrKext);
+    RenderSSPOptions(TC, Args, CmdArgs, KernelOrKext);
   }
 
   // -fixup-gadgets
@@ -5280,8 +5456,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
   // Forward -cl options to -cc1
   RenderOpenCLOptions(Args, CmdArgs);
 
-  if (Args.hasFlag(options::OPT_fhip_new_launch_api,
-                   options::OPT_fno_hip_new_launch_api, false))
+  if (IsHIP && Args.hasFlag(options::OPT_fhip_new_launch_api,
+                            options::OPT_fno_hip_new_launch_api, true))
     CmdArgs.push_back("-fhip-new-launch-api");
 
   if (Arg *A = Args.getLastArg(options::OPT_fcf_protection_EQ)) {
@@ -5365,7 +5541,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
   // -fuse-cxa-atexit is default.
   if (!Args.hasFlag(
           options::OPT_fuse_cxa_atexit, options::OPT_fno_use_cxa_atexit,
-          !RawTriple.isOSWindows() &&
+          !RawTriple.isOSAIX() && !RawTriple.isOSWindows() &&
               TC.getArch() != llvm::Triple::xcore &&
               ((RawTriple.getVendor() != llvm::Triple::MipsTechnologies) ||
                RawTriple.hasEnvironment())) ||
@@ -5377,16 +5553,16 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
                    RawTriple.isOSDarwin() && !KernelOrKext))
     CmdArgs.push_back("-fregister-global-dtors-with-atexit");
 
-  // -fms-extensions=0 is default.
-  if (Args.hasFlag(options::OPT_fms_extensions, options::OPT_fno_ms_extensions,
-                   IsWindowsMSVC))
-    CmdArgs.push_back("-fms-extensions");
-
   // -fno-use-line-directives is default.
   if (Args.hasFlag(options::OPT_fuse_line_directives,
                    options::OPT_fno_use_line_directives, false))
     CmdArgs.push_back("-fuse-line-directives");
 
+  // -fms-extensions=0 is default.
+  if (Args.hasFlag(options::OPT_fms_extensions, options::OPT_fno_ms_extensions,
+                   IsWindowsMSVC))
+    CmdArgs.push_back("-fms-extensions");
+
   // -fms-compatibility=0 is default.
   bool IsMSVCCompat = Args.hasFlag(
       options::OPT_fms_compatibility, options::OPT_fno_ms_compatibility,
@@ -5500,11 +5676,20 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
   if (Args.hasFlag(options::OPT_fpch_validate_input_files_content,
                    options::OPT_fno_pch_validate_input_files_content, false))
     CmdArgs.push_back("-fvalidate-ast-input-files-content");
+  if (Args.hasFlag(options::OPT_fpch_instantiate_templates,
+                   options::OPT_fno_pch_instantiate_templates, false))
+    CmdArgs.push_back("-fpch-instantiate-templates");
+  if (Args.hasFlag(options::OPT_fpch_codegen, options::OPT_fno_pch_codegen,
+                   false))
+    CmdArgs.push_back("-fmodules-codegen");
+  if (Args.hasFlag(options::OPT_fpch_debuginfo, options::OPT_fno_pch_debuginfo,
+                   false))
+    CmdArgs.push_back("-fmodules-debuginfo");
 
   Args.AddLastArg(CmdArgs, options::OPT_fexperimental_new_pass_manager,
                   options::OPT_fno_experimental_new_pass_manager);
 
-  ObjCRuntime Runtime = AddObjCRuntimeArgs(Args, CmdArgs, rewriteKind);
+  ObjCRuntime Runtime = AddObjCRuntimeArgs(Args, Inputs, CmdArgs, rewriteKind);
   RenderObjCOptions(TC, D, RawTriple, Args, Runtime, rewriteKind != RK_None,
                     Input, CmdArgs);
 
@@ -5756,6 +5941,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
   Args.AddLastArg(CmdArgs, options::OPT_dM);
   Args.AddLastArg(CmdArgs, options::OPT_dD);
 
+  Args.AddLastArg(CmdArgs, options::OPT_fmax_tokens_EQ);
+
   // Handle serialized diagnostics.
   if (Arg *A = Args.getLastArg(options::OPT__serialize_diags)) {
     CmdArgs.push_back("-serialize-diagnostic-file");
@@ -5825,7 +6012,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
   // FIXME: -fembed-bitcode -save-temps will save optimized bitcode instead of
   // pristine IR generated by the frontend. Ideally, a new compile action should
   // be added so both IR can be captured.
-  if (C.getDriver().isSaveTempsEnabled() &&
+  if ((C.getDriver().isSaveTempsEnabled() ||
+       JA.isHostOffloading(Action::OFK_OpenMP)) &&
       !(C.getDriver().embedBitcodeInObject() && !C.getDriver().isUsingLTO()) &&
       isa<CompileJobAction>(JA))
     CmdArgs.push_back("-disable-llvm-passes");
@@ -5855,7 +6043,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
       Arg->render(Args, OriginalArgs);
 
     SmallString<256> Flags;
-    Flags += Exec;
+    EscapeSpacesAndBackslashes(Exec, Flags);
     for (const char *OriginalArg : OriginalArgs) {
       SmallString<128> EscapedArg;
       EscapeSpacesAndBackslashes(OriginalArg, EscapedArg);
@@ -5967,10 +6155,10 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
   if (SplitLTOUnit)
     CmdArgs.push_back("-fsplit-lto-unit");
 
-  if (Arg *A = Args.getLastArg(options::OPT_fexperimental_isel,
-                               options::OPT_fno_experimental_isel)) {
+  if (Arg *A = Args.getLastArg(options::OPT_fglobal_isel,
+                               options::OPT_fno_global_isel)) {
     CmdArgs.push_back("-mllvm");
-    if (A->getOption().matches(options::OPT_fexperimental_isel)) {
+    if (A->getOption().matches(options::OPT_fglobal_isel)) {
       CmdArgs.push_back("-global-isel=1");
 
       // GISel is on by default on AArch64 -O0, so don't bother adding
@@ -5989,9 +6177,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
         CmdArgs.push_back("-global-isel-abort=2");
 
         if (!IsArchSupported)
-          D.Diag(diag::warn_drv_experimental_isel_incomplete) << Triple.getArchName();
+          D.Diag(diag::warn_drv_global_isel_incomplete) << Triple.getArchName();
         else
-          D.Diag(diag::warn_drv_experimental_isel_incomplete_opt);
+          D.Diag(diag::warn_drv_global_isel_incomplete_opt);
       }
     } else {
       CmdArgs.push_back("-global-isel=0");
@@ -6015,6 +6203,10 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
       CmdArgs.push_back("-fforce-enable-int128");
   }
 
+  if (Args.hasFlag(options::OPT_fkeep_static_consts,
+                   options::OPT_fno_keep_static_consts, false))
+    CmdArgs.push_back("-fkeep-static-consts");
+
   if (Args.hasFlag(options::OPT_fcomplete_member_pointers,
                    options::OPT_fno_complete_member_pointers, false))
     CmdArgs.push_back("-fcomplete-member-pointers");
@@ -6026,11 +6218,12 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
   if (Arg *A = Args.getLastArg(options::OPT_moutline,
                                options::OPT_mno_outline)) {
     if (A->getOption().matches(options::OPT_moutline)) {
-      // We only support -moutline in AArch64 right now. If we're not compiling
-      // for AArch64, emit a warning and ignore the flag. Otherwise, add the
-      // proper mllvm flags.
-      if (Triple.getArch() != llvm::Triple::aarch64 &&
-          Triple.getArch() != llvm::Triple::aarch64_32) {
+      // We only support -moutline in AArch64 and ARM targets right now. If
+      // we're not compiling for these, emit a warning and ignore the flag.
+      // Otherwise, add the proper mllvm flags.
+      if (!(Triple.isARM() || Triple.isThumb() ||
+            Triple.getArch() == llvm::Triple::aarch64 ||
+            Triple.getArch() == llvm::Triple::aarch64_32)) {
         D.Diag(diag::warn_drv_moutline_unsupported_opt) << Triple.getArchName();
       } else {
         CmdArgs.push_back("-mllvm");
@@ -6102,19 +6295,21 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
     auto CLCommand =
         getCLFallback()->GetCommand(C, JA, Output, Inputs, Args, LinkingOutput);
     C.addCommand(std::make_unique<FallbackCommand>(
-        JA, *this, Exec, CmdArgs, Inputs, std::move(CLCommand)));
+        JA, *this, ResponseFileSupport::AtFileUTF8(), Exec, CmdArgs, Inputs,
+        std::move(CLCommand)));
   } else if (Args.hasArg(options::OPT__SLASH_fallback) &&
              isa<PrecompileJobAction>(JA)) {
     // In /fallback builds, run the main compilation even if the pch generation
     // fails, so that the main compilation's fallback to cl.exe runs.
-    C.addCommand(std::make_unique<ForceSuccessCommand>(JA, *this, Exec,
-                                                        CmdArgs, Inputs));
+    C.addCommand(std::make_unique<ForceSuccessCommand>(
+        JA, *this, ResponseFileSupport::AtFileUTF8(), Exec, CmdArgs, Inputs));
   } else if (D.CC1Main && !D.CCGenDiagnostics) {
     // Invoke the CC1 directly in this process
-    C.addCommand(
-        std::make_unique<CC1Command>(JA, *this, Exec, CmdArgs, Inputs));
+    C.addCommand(std::make_unique<CC1Command>(
+        JA, *this, ResponseFileSupport::AtFileUTF8(), Exec, CmdArgs, Inputs));
   } else {
-    C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+    C.addCommand(std::make_unique<Command>(
+        JA, *this, ResponseFileSupport::AtFileUTF8(), Exec, CmdArgs, Inputs));
   }
 
   // Make the compile command echo its inputs for /showFilenames.
@@ -6125,7 +6320,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
   }
 
   if (Arg *A = Args.getLastArg(options::OPT_pg))
-    if (FPKeepKind == CodeGenOptions::FramePointerKind::None)
+    if (FPKeepKind == CodeGenOptions::FramePointerKind::None &&
+        !Args.hasArg(options::OPT_mfentry))
       D.Diag(diag::err_drv_argument_not_allowed_with) << "-fomit-frame-pointer"
                                                       << A->getAsString(Args);
 
@@ -6148,7 +6344,7 @@ Clang::Clang(const ToolChain &TC)
     // CAUTION! The first constructor argument ("clang") is not arbitrary,
     // as it is for other tools. Some operations on a Tool actually test
     // whether that tool is Clang based on the Tool's Name as a string.
-    : Tool("clang", "clang frontend", TC, RF_Full) {}
+    : Tool("clang", "clang frontend", TC) {}
 
 Clang::~Clang() {}
 
@@ -6156,6 +6352,7 @@ Clang::~Clang() {}
 ///
 /// Returns true if the runtime is non-fragile.
 ObjCRuntime Clang::AddObjCRuntimeArgs(const ArgList &args,
+                                      const InputInfoList &inputs,
                                       ArgStringList &cmdArgs,
                                       RewriteKind rewriteKind) const {
   // Look for the controlling runtime option.
@@ -6279,8 +6476,11 @@ ObjCRuntime Clang::AddObjCRuntimeArgs(const ArgList &args,
       runtime = ObjCRuntime(ObjCRuntime::GCC, VersionTuple());
   }
 
-  cmdArgs.push_back(
-      args.MakeArgString("-fobjc-runtime=" + runtime.getAsString()));
+  if (llvm::any_of(inputs, [](const InputInfo &input) {
+        return types::isObjC(input.getType());
+      }))
+    cmdArgs.push_back(
+        args.MakeArgString("-fobjc-runtime=" + runtime.getAsString()));
   return runtime;
 }
 
@@ -6350,6 +6550,7 @@ void Clang::AddClangCLArgs(const ArgList &Args, types::ID InputType,
                            codegenoptions::DebugInfoKind *DebugInfoKind,
                            bool *EmitCodeView) const {
   unsigned RTOptionID = options::OPT__SLASH_MT;
+  bool isNVPTX = getToolChain().getTriple().isNVPTX();
 
   if (Args.hasArg(options::OPT__SLASH_LDd))
     // The /LDd option implies /MTd. The dependent lib part can be overridden,
@@ -6402,7 +6603,13 @@ void Clang::AddClangCLArgs(const ArgList &Args, types::ID InputType,
     CmdArgs.push_back("--dependent-lib=oldnames");
   }
 
-  Args.AddLastArg(CmdArgs, options::OPT_show_includes);
+  if (Arg *ShowIncludes =
+          Args.getLastArg(options::OPT__SLASH_showIncludes,
+                          options::OPT__SLASH_showIncludes_user)) {
+    CmdArgs.push_back("--show-includes");
+    if (ShowIncludes->getOption().matches(options::OPT__SLASH_showIncludes))
+      CmdArgs.push_back("-sys-header-deps");
+  }
 
   // This controls whether or not we emit RTTI data for polymorphic types.
   if (Args.hasFlag(options::OPT__SLASH_GR_, options::OPT__SLASH_GR,
@@ -6411,8 +6618,8 @@ void Clang::AddClangCLArgs(const ArgList &Args, types::ID InputType,
 
   // This controls whether or not we emit stack-protector instrumentation.
   // In MSVC, Buffer Security Check (/GS) is on by default.
-  if (Args.hasFlag(options::OPT__SLASH_GS, options::OPT__SLASH_GS_,
-                   /*Default=*/true)) {
+  if (!isNVPTX && Args.hasFlag(options::OPT__SLASH_GS, options::OPT__SLASH_GS_,
+                               /*Default=*/true)) {
     CmdArgs.push_back("-stack-protector");
     CmdArgs.push_back(Args.MakeArgString(Twine(LangOptions::SSPStrong)));
   }
@@ -6432,7 +6639,7 @@ void Clang::AddClangCLArgs(const ArgList &Args, types::ID InputType,
 
   const Driver &D = getToolChain().getDriver();
   EHFlags EH = parseClangCLEHFlags(D, Args);
-  if (EH.Synch || EH.Asynch) {
+  if (!isNVPTX && (EH.Synch || EH.Asynch)) {
     if (types::isCXX(InputType))
       CmdArgs.push_back("-fcxx-exceptions");
     CmdArgs.push_back("-fexceptions");
@@ -6501,7 +6708,7 @@ void Clang::AddClangCLArgs(const ArgList &Args, types::ID InputType,
                           options::OPT__SLASH_Gregcall)) {
     unsigned DCCOptId = CCArg->getOption().getID();
     const char *DCCFlag = nullptr;
-    bool ArchSupported = true;
+    bool ArchSupported = !isNVPTX;
     llvm::Triple::ArchType Arch = getToolChain().getArch();
     switch (DCCOptId) {
     case options::OPT__SLASH_Gd:
@@ -6607,7 +6814,8 @@ void ClangAs::AddMIPSTargetArgs(const ArgList &Args,
 
 void ClangAs::AddX86TargetArgs(const ArgList &Args,
                                ArgStringList &CmdArgs) const {
-  addX86AlignBranchArgs(getToolChain().getDriver(), Args, CmdArgs);
+  addX86AlignBranchArgs(getToolChain().getDriver(), Args, CmdArgs,
+                        /*IsLTO=*/false);
 
   if (Arg *A = Args.getLastArg(options::OPT_masm_EQ)) {
     StringRef Value = A->getValue();
@@ -6677,7 +6885,7 @@ void ClangAs::ConstructJob(Compilation &C, const JobAction &JA,
   }
 
   // Add the target features
-  getTargetFeatures(getToolChain(), Triple, Args, CmdArgs, true);
+  getTargetFeatures(D, Triple, Args, CmdArgs, true);
 
   // Ignore explicit -force_cpusubtype_ALL option.
   (void)Args.hasArg(options::OPT_force__cpusubtype__ALL);
@@ -6762,7 +6970,7 @@ void ClangAs::ConstructJob(Compilation &C, const JobAction &JA,
 
     SmallString<256> Flags;
     const char *Exec = getToolChain().getDriver().getClangProgramPath();
-    Flags += Exec;
+    EscapeSpacesAndBackslashes(Exec, Flags);
     for (const char *OriginalArg : OriginalArgs) {
       SmallString<128> EscapedArg;
       EscapeSpacesAndBackslashes(OriginalArg, EscapedArg);
@@ -6839,7 +7047,8 @@ void ClangAs::ConstructJob(Compilation &C, const JobAction &JA,
   CmdArgs.push_back(Input.getFilename());
 
   const char *Exec = getToolChain().getDriver().getClangProgramPath();
-  C.addCommand(std::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+  C.addCommand(std::make_unique<Command>(
+      JA, *this, ResponseFileSupport::AtFileUTF8(), Exec, CmdArgs, Inputs));
 }
 
 // Begin OffloadBundler
@@ -6923,7 +7132,7 @@ void OffloadBundler::ConstructJob(Compilation &C, const JobAction &JA,
 
   // All the inputs are encoded as commands.
   C.addCommand(std::make_unique<Command>(
-      JA, *this,
+      JA, *this, ResponseFileSupport::None(),
       TCArgs.MakeArgString(getToolChain().GetProgramPath(getShortName())),
       CmdArgs, None));
 }
@@ -6989,7 +7198,7 @@ void OffloadBundler::ConstructJobMultipleOutputs(
 
   // All the inputs are encoded as commands.
   C.addCommand(std::make_unique<Command>(
-      JA, *this,
+      JA, *this, ResponseFileSupport::None(),
       TCArgs.MakeArgString(getToolChain().GetProgramPath(getShortName())),
       CmdArgs, None));
 }
@@ -7019,7 +7228,7 @@ void OffloadWrapper::ConstructJob(Compilation &C, const JobAction &JA,
   }
 
   C.addCommand(std::make_unique<Command>(
-      JA, *this,
+      JA, *this, ResponseFileSupport::None(),
       Args.MakeArgString(getToolChain().GetProgramPath(getShortName())),
       CmdArgs, Inputs));
 }
index c8a7fce..151eda7 100644 (file)
@@ -2711,7 +2711,7 @@ bool Generic_GCC::IsIntegratedAssemblerDefault() const {
   case llvm::Triple::sparc:
   case llvm::Triple::sparcel:
   case llvm::Triple::sparcv9:
-    if (getTriple().isOSFreeBSD() || getTriple().isOSOpenBSD() ||
+    if (getTriple().isOSFreeBSD() ||
         getTriple().isOSSolaris())
       return true;
     return false;
index 5ca2fa0..5333cec 100644 (file)
@@ -294,6 +294,7 @@ void OpenBSD::AddCXXStdlibLibArgs(const ArgList &Args,
 
   CmdArgs.push_back(Profiling ? "-lc++_p" : "-lc++");
   CmdArgs.push_back(Profiling ? "-lc++abi_p" : "-lc++abi");
+  CmdArgs.push_back(Profiling ? "-lpthread_p" : "-lpthread");
 }
 
 std::string OpenBSD::getCompilerRT(const ArgList &Args,
index c9a65bc..4613ed8 100644 (file)
@@ -97,6 +97,10 @@ void CompilerInstance::setVerboseOutputStream(std::unique_ptr<raw_ostream> Value
 void CompilerInstance::setTarget(TargetInfo *Value) { Target = Value; }
 void CompilerInstance::setAuxTarget(TargetInfo *Value) { AuxTarget = Value; }
 
+llvm::vfs::FileSystem &CompilerInstance::getVirtualFileSystem() const {
+  return getFileManager().getVirtualFileSystem();
+}
+
 void CompilerInstance::setFileManager(FileManager *Value) {
   FileMgr = Value;
 }
@@ -138,7 +142,7 @@ std::unique_ptr<Sema> CompilerInstance::takeSema() {
 IntrusiveRefCntPtr<ASTReader> CompilerInstance::getASTReader() const {
   return TheASTReader;
 }
-void CompilerInstance::setModuleManager(IntrusiveRefCntPtr<ASTReader> Reader) {
+void CompilerInstance::setASTReader(IntrusiveRefCntPtr<ASTReader> Reader) {
   assert(ModuleCache.get() == &Reader->getModuleManager().getModuleCache() &&
          "Expected ASTReader to use the same PCM cache");
   TheASTReader = std::move(Reader);
@@ -379,7 +383,7 @@ static void InitializeFileRemapping(DiagnosticsEngine &Diags,
 void CompilerInstance::createPreprocessor(TranslationUnitKind TUKind) {
   const PreprocessorOptions &PPOpts = getPreprocessorOpts();
 
-  // The module manager holds a reference to the old preprocessor (if any).
+  // The AST reader holds a reference to the old preprocessor (if any).
   TheASTReader.reset();
 
   // Create the Preprocessor.
@@ -474,7 +478,7 @@ std::string CompilerInstance::getSpecificModuleCachePath() {
   if (!SpecificModuleCache.empty() && !getHeaderSearchOpts().DisableModuleHash)
     llvm::sys::path::append(SpecificModuleCache,
                             getInvocation().getModuleHash());
-  return SpecificModuleCache.str();
+  return std::string(SpecificModuleCache.str());
 }
 
 // ASTContext
@@ -713,13 +717,13 @@ std::unique_ptr<llvm::raw_pwrite_stream> CompilerInstance::createOutputFile(
 
   std::string OutFile, TempFile;
   if (!OutputPath.empty()) {
-    OutFile = OutputPath;
+    OutFile = std::string(OutputPath);
   } else if (InFile == "-") {
     OutFile = "-";
   } else if (!Extension.empty()) {
     SmallString<128> Path(InFile);
     llvm::sys::path::replace_extension(Path, Extension);
-    OutFile = Path.str();
+    OutFile = std::string(Path.str());
   } else {
     OutFile = "-";
   }
@@ -774,7 +778,7 @@ std::unique_ptr<llvm::raw_pwrite_stream> CompilerInstance::createOutputFile(
 
     if (!EC) {
       OS.reset(new llvm::raw_fd_ostream(fd, /*shouldClose=*/true));
-      OSFile = TempFile = TempPath.str();
+      OSFile = TempFile = std::string(TempPath.str());
     }
     // If we failed to create the temporary, fallback to writing to the file
     // directly. This handles the corner case where we cannot write to the
@@ -811,17 +815,15 @@ std::unique_ptr<llvm::raw_pwrite_stream> CompilerInstance::createOutputFile(
 // Initialization Utilities
 
 bool CompilerInstance::InitializeSourceManager(const FrontendInputFile &Input){
-  return InitializeSourceManager(
-      Input, getDiagnostics(), getFileManager(), getSourceManager(),
-      hasPreprocessor() ? &getPreprocessor().getHeaderSearchInfo() : nullptr,
-      getDependencyOutputOpts(), getFrontendOpts());
+  return InitializeSourceManager(Input, getDiagnostics(), getFileManager(),
+                                 getSourceManager());
 }
 
 // static
-bool CompilerInstance::InitializeSourceManager(
-    const FrontendInputFile &Input, DiagnosticsEngine &Diags,
-    FileManager &FileMgr, SourceManager &SourceMgr, HeaderSearch *HS,
-    DependencyOutputOptions &DepOpts, const FrontendOptions &Opts) {
+bool CompilerInstance::InitializeSourceManager(const FrontendInputFile &Input,
+                                               DiagnosticsEngine &Diags,
+                                               FileManager &FileMgr,
+                                               SourceManager &SourceMgr) {
   SrcMgr::CharacteristicKind Kind =
       Input.getKind().getFormat() == InputKind::ModuleMap
           ? Input.isSystem() ? SrcMgr::C_System_ModuleMap
@@ -923,15 +925,19 @@ bool CompilerInstance::ExecuteAction(FrontendAction &Act) {
       !getFrontendOpts().AuxTriple.empty()) {
     auto TO = std::make_shared<TargetOptions>();
     TO->Triple = llvm::Triple::normalize(getFrontendOpts().AuxTriple);
+    if (getFrontendOpts().AuxTargetCPU)
+      TO->CPU = getFrontendOpts().AuxTargetCPU.getValue();
+    if (getFrontendOpts().AuxTargetFeatures)
+      TO->FeaturesAsWritten = getFrontendOpts().AuxTargetFeatures.getValue();
     TO->HostTriple = getTarget().getTriple().str();
     setAuxTarget(TargetInfo::CreateTargetInfo(getDiagnostics(), TO));
   }
 
   if (!getTarget().hasStrictFP() && !getLangOpts().ExpStrictFP) {
     if (getLangOpts().getFPRoundingMode() !=
-        LangOptions::FPR_ToNearest) {
+        llvm::RoundingMode::NearestTiesToEven) {
       getDiagnostics().Report(diag::warn_fe_backend_unsupported_fp_rounding);
-      getLangOpts().setFPRoundingMode(LangOptions::FPR_ToNearest);
+      getLangOpts().setFPRoundingMode(llvm::RoundingMode::NearestTiesToEven);
     }
     if (getLangOpts().getFPExceptionMode() != LangOptions::FPE_Ignore) {
       getDiagnostics().Report(diag::warn_fe_backend_unsupported_fp_exceptions);
@@ -1086,7 +1092,7 @@ compileModuleImpl(CompilerInstance &ImportingInstance, SourceLocation ImportLoc,
       ImportingInstance.getInvocation().getLangOpts()->ModuleName;
 
   // Note the name of the module we're building.
-  Invocation->getLangOpts()->CurrentModule = ModuleName;
+  Invocation->getLangOpts()->CurrentModule = std::string(ModuleName);
 
   // Make sure that the failed-module structure has been allocated in
   // the importing instance, and propagate the pointer to the newly-created
@@ -1106,7 +1112,7 @@ compileModuleImpl(CompilerInstance &ImportingInstance, SourceLocation ImportLoc,
   FrontendOpts.DisableFree = false;
   FrontendOpts.GenerateGlobalModuleIndex = false;
   FrontendOpts.BuildingImplicitModule = true;
-  FrontendOpts.OriginalModuleMap = OriginalModuleMapFile;
+  FrontendOpts.OriginalModuleMap = std::string(OriginalModuleMapFile);
   // Force implicitly-built modules to hash the content of the module file.
   HSOpts.ModulesHashContent = true;
   FrontendOpts.Inputs = {Input};
@@ -1581,7 +1587,7 @@ bool CompilerInstance::loadModuleFile(StringRef FileName) {
           Stack.push_back(M);
           while (!Stack.empty()) {
             Module *Current = Stack.pop_back_val();
-            if (Current->IsMissingRequirement) continue;
+            if (Current->IsUnimportable) continue;
             Current->IsAvailable = true;
             Stack.insert(Stack.end(),
                          Current->submodule_begin(), Current->submodule_end());
@@ -1643,10 +1649,10 @@ enum ModuleSource {
 
 /// Select a source for loading the named module and compute the filename to
 /// load it from.
-static ModuleSource
-selectModuleSource(Module *M, StringRef ModuleName, std::string &ModuleFilename,
-                   const std::map<std::string, std::string> &BuiltModules,
-                   HeaderSearch &HS) {
+static ModuleSource selectModuleSource(
+    Module *M, StringRef ModuleName, std::string &ModuleFilename,
+    const std::map<std::string, std::string, std::less<>> &BuiltModules,
+    HeaderSearch &HS) {
   assert(ModuleFilename.empty() && "Already has a module source?");
 
   // Check to see if the module has been built as part of this compilation
@@ -2090,7 +2096,7 @@ void CompilerInstance::createModuleFromSource(SourceLocation ImportLoc,
   // Build the module, inheriting any modules that we've built locally.
   if (compileModuleImpl(*this, ImportLoc, ModuleName, Input, StringRef(),
                         ModuleFileName, PreBuildStep, PostBuildStep)) {
-    BuiltModules[ModuleName] = ModuleFileName.str();
+    BuiltModules[std::string(ModuleName)] = std::string(ModuleFileName.str());
     llvm::sys::RemoveFileOnSignal(ModuleFileName);
   }
 }
index f479067..3201ee8 100644 (file)
 #include "clang/Lex/HeaderSearchOptions.h"
 #include "clang/Lex/PreprocessorOptions.h"
 #include "clang/Sema/CodeCompleteOptions.h"
+#include "clang/Serialization/ASTBitCodes.h"
 #include "clang/Serialization/ModuleFileExtension.h"
 #include "clang/StaticAnalyzer/Core/AnalyzerOptions.h"
 #include "llvm/ADT/APInt.h"
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/CachedHashString.h"
+#include "llvm/ADT/FloatingPointMode.h"
 #include "llvm/ADT/Hashing.h"
 #include "llvm/ADT/None.h"
 #include "llvm/ADT/Optional.h"
@@ -115,6 +117,62 @@ CompilerInvocationBase::CompilerInvocationBase(const CompilerInvocationBase &X)
 
 CompilerInvocationBase::~CompilerInvocationBase() = default;
 
+//===----------------------------------------------------------------------===//
+// Normalizers
+//===----------------------------------------------------------------------===//
+
+#define SIMPLE_ENUM_VALUE_TABLE
+#include "clang/Driver/Options.inc"
+#undef SIMPLE_ENUM_VALUE_TABLE
+
+static llvm::Optional<unsigned> normalizeSimpleEnum(OptSpecifier Opt,
+                                                    unsigned TableIndex,
+                                                    const ArgList &Args,
+                                                    DiagnosticsEngine &Diags) {
+  assert(TableIndex < SimpleEnumValueTablesSize);
+  const SimpleEnumValueTable &Table = SimpleEnumValueTables[TableIndex];
+
+  auto *Arg = Args.getLastArg(Opt);
+  if (!Arg)
+    return None;
+
+  StringRef ArgValue = Arg->getValue();
+  for (int I = 0, E = Table.Size; I != E; ++I)
+    if (ArgValue == Table.Table[I].Name)
+      return Table.Table[I].Value;
+
+  Diags.Report(diag::err_drv_invalid_value)
+      << Arg->getAsString(Args) << ArgValue;
+  return None;
+}
+
+static const char *denormalizeSimpleEnum(CompilerInvocation::StringAllocator SA,
+                                         unsigned TableIndex, unsigned Value) {
+  assert(TableIndex < SimpleEnumValueTablesSize);
+  const SimpleEnumValueTable &Table = SimpleEnumValueTables[TableIndex];
+  for (int I = 0, E = Table.Size; I != E; ++I)
+    if (Value == Table.Table[I].Value)
+      return Table.Table[I].Name;
+
+  llvm_unreachable("The simple enum value was not correctly defined in "
+                   "the tablegen option description");
+}
+
+static const char *denormalizeString(CompilerInvocation::StringAllocator SA,
+                                     unsigned TableIndex,
+                                     const std::string &Value) {
+  return SA(Value);
+}
+
+static Optional<std::string> normalizeTriple(OptSpecifier Opt, int TableIndex,
+                                             const ArgList &Args,
+                                             DiagnosticsEngine &Diags) {
+  auto *Arg = Args.getLastArg(Opt);
+  if (!Arg)
+    return None;
+  return llvm::Triple::normalize(Arg->getValue());
+}
+
 //===----------------------------------------------------------------------===//
 // Deserialization (from args)
 //===----------------------------------------------------------------------===//
@@ -135,7 +193,7 @@ static unsigned getOptimizationLevel(ArgList &Args, InputKind IK,
     assert(A->getOption().matches(options::OPT_O));
 
     StringRef S(A->getValue());
-    if (S == "s" || S == "z" || S.empty())
+    if (S == "s" || S == "z")
       return llvm::CodeGenOpt::Default;
 
     if (S == "g")
@@ -170,10 +228,12 @@ static void addDiagnosticArgs(ArgList &Args, OptSpecifier Group,
     if (A->getOption().getKind() == Option::FlagClass) {
       // The argument is a pure flag (such as OPT_Wall or OPT_Wdeprecated). Add
       // its name (minus the "W" or "R" at the beginning) to the warning list.
-      Diagnostics.push_back(A->getOption().getName().drop_front(1));
+      Diagnostics.push_back(
+          std::string(A->getOption().getName().drop_front(1)));
     } else if (A->getOption().matches(GroupWithValue)) {
       // This is -Wfoo= or -Rfoo=, where foo is the name of the diagnostic group.
-      Diagnostics.push_back(A->getOption().getName().drop_front(1).rtrim("=-"));
+      Diagnostics.push_back(
+          std::string(A->getOption().getName().drop_front(1).rtrim("=-")));
     } else {
       // Otherwise, add its value (for OPT_W_Joined and similar).
       for (const auto *Arg : A->getValues())
@@ -307,14 +367,16 @@ static bool ParseAnalyzerArgs(AnalyzerOptions &Opts, ArgList &Args,
 
   Opts.visualizeExplodedGraphWithGraphViz =
     Args.hasArg(OPT_analyzer_viz_egraph_graphviz);
-  Opts.DumpExplodedGraphTo = Args.getLastArgValue(OPT_analyzer_dump_egraph);
+  Opts.DumpExplodedGraphTo =
+      std::string(Args.getLastArgValue(OPT_analyzer_dump_egraph));
   Opts.NoRetryExhausted = Args.hasArg(OPT_analyzer_disable_retry_exhausted);
   Opts.AnalyzerWerror = Args.hasArg(OPT_analyzer_werror);
   Opts.AnalyzeAll = Args.hasArg(OPT_analyzer_opt_analyze_headers);
   Opts.AnalyzerDisplayProgress = Args.hasArg(OPT_analyzer_display_progress);
   Opts.AnalyzeNestedBlocks =
     Args.hasArg(OPT_analyzer_opt_analyze_nested_blocks);
-  Opts.AnalyzeSpecificFunction = Args.getLastArgValue(OPT_analyze_function);
+  Opts.AnalyzeSpecificFunction =
+      std::string(Args.getLastArgValue(OPT_analyze_function));
   Opts.UnoptimizedCFG = Args.hasArg(OPT_analysis_UnoptimizedCFG);
   Opts.TrimGraph = Args.hasArg(OPT_trim_egraph);
   Opts.maxBlockVisitOnPath =
@@ -335,7 +397,8 @@ static bool ParseAnalyzerArgs(AnalyzerOptions &Opts, ArgList &Args,
     SmallVector<StringRef, 16> CheckersAndPackages;
     CheckerAndPackageList.split(CheckersAndPackages, ",");
     for (const StringRef &CheckerOrPackage : CheckersAndPackages)
-      Opts.CheckersAndPackages.emplace_back(CheckerOrPackage, IsEnabled);
+      Opts.CheckersAndPackages.emplace_back(std::string(CheckerOrPackage),
+                                            IsEnabled);
   }
 
   // Go through the analyzer configuration options.
@@ -372,7 +435,7 @@ static bool ParseAnalyzerArgs(AnalyzerOptions &Opts, ArgList &Args,
       }
 
       A->claim();
-      Opts.Config[key] = val;
+      Opts.Config[key] = std::string(val);
     }
   }
 
@@ -394,7 +457,7 @@ static bool ParseAnalyzerArgs(AnalyzerOptions &Opts, ArgList &Args,
 
 static StringRef getStringOption(AnalyzerOptions::ConfigTable &Config,
                                  StringRef OptionName, StringRef DefaultVal) {
-  return Config.insert({OptionName, DefaultVal}).first->second;
+  return Config.insert({OptionName, std::string(DefaultVal)}).first->second;
 }
 
 static void initOption(AnalyzerOptions::ConfigTable &Config,
@@ -521,36 +584,6 @@ static void ParseCommentArgs(CommentOptions &Opts, ArgList &Args) {
   Opts.ParseAllComments = Args.hasArg(OPT_fparse_all_comments);
 }
 
-static StringRef getCodeModel(ArgList &Args, DiagnosticsEngine &Diags) {
-  if (Arg *A = Args.getLastArg(OPT_mcode_model)) {
-    StringRef Value = A->getValue();
-    if (Value == "small" || Value == "kernel" || Value == "medium" ||
-        Value == "large" || Value == "tiny")
-      return Value;
-    Diags.Report(diag::err_drv_invalid_value) << A->getAsString(Args) << Value;
-  }
-  return "default";
-}
-
-static llvm::Reloc::Model getRelocModel(ArgList &Args,
-                                        DiagnosticsEngine &Diags) {
-  if (Arg *A = Args.getLastArg(OPT_mrelocation_model)) {
-    StringRef Value = A->getValue();
-    auto RM = llvm::StringSwitch<llvm::Optional<llvm::Reloc::Model>>(Value)
-                  .Case("static", llvm::Reloc::Static)
-                  .Case("pic", llvm::Reloc::PIC_)
-                  .Case("ropi", llvm::Reloc::ROPI)
-                  .Case("rwpi", llvm::Reloc::RWPI)
-                  .Case("ropi-rwpi", llvm::Reloc::ROPI_RWPI)
-                  .Case("dynamic-no-pic", llvm::Reloc::DynamicNoPIC)
-                  .Default(None);
-    if (RM.hasValue())
-      return *RM;
-    Diags.Report(diag::err_drv_invalid_value) << A->getAsString(Args) << Value;
-  }
-  return llvm::Reloc::PIC_;
-}
-
 /// Create a new Regex instance out of the string value in \p RpassArg.
 /// It returns a pointer to the newly generated Regex instance.
 static std::shared_ptr<llvm::Regex>
@@ -754,7 +787,7 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
       Opts.setDebuggerTuning(static_cast<llvm::DebuggerKind>(Val));
   }
   Opts.DwarfVersion = getLastArgIntValue(Args, OPT_dwarf_version_EQ, 0, Diags);
-  Opts.DebugColumnInfo = Args.hasArg(OPT_dwarf_column_info);
+  Opts.DebugColumnInfo = !Args.hasArg(OPT_gno_column_info);
   Opts.EmitCodeView = Args.hasArg(OPT_gcodeview);
   Opts.CodeViewGHash = Args.hasArg(OPT_gcodeview_ghash);
   Opts.MacroDebugInfo = Args.hasArg(OPT_debug_info_macro);
@@ -762,19 +795,21 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
   Opts.VirtualFunctionElimination =
       Args.hasArg(OPT_fvirtual_function_elimination);
   Opts.LTOVisibilityPublicStd = Args.hasArg(OPT_flto_visibility_public_std);
-  Opts.SplitDwarfFile = Args.getLastArgValue(OPT_split_dwarf_file);
-  Opts.SplitDwarfOutput = Args.getLastArgValue(OPT_split_dwarf_output);
+  Opts.SplitDwarfFile = std::string(Args.getLastArgValue(OPT_split_dwarf_file));
+  Opts.SplitDwarfOutput =
+      std::string(Args.getLastArgValue(OPT_split_dwarf_output));
   Opts.SplitDwarfInlining = !Args.hasArg(OPT_fno_split_dwarf_inlining);
   Opts.DebugTypeExtRefs = Args.hasArg(OPT_dwarf_ext_refs);
   Opts.DebugExplicitImport = Args.hasArg(OPT_dwarf_explicit_import);
   Opts.DebugFwdTemplateParams = Args.hasArg(OPT_debug_forward_template_params);
   Opts.EmbedSource = Args.hasArg(OPT_gembed_source);
+  Opts.ForceDwarfFrameSection = Args.hasArg(OPT_fforce_dwarf_frame);
 
-  Opts.ForceDwarfFrameSection =
-      Args.hasFlag(OPT_fforce_dwarf_frame, OPT_fno_force_dwarf_frame, false);
-
-  for (const auto &Arg : Args.getAllArgValues(OPT_fdebug_prefix_map_EQ))
-    Opts.DebugPrefixMap.insert(StringRef(Arg).split('='));
+  for (const auto &Arg : Args.getAllArgValues(OPT_fdebug_prefix_map_EQ)) {
+    auto Split = StringRef(Arg).split('=');
+    Opts.DebugPrefixMap.insert(
+        {std::string(Split.first), std::string(Split.second)});
+  }
 
   if (const Arg *A =
           Args.getLastArg(OPT_emit_llvm_uselists, OPT_no_emit_llvm_uselists))
@@ -785,12 +820,13 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
 
   const llvm::Triple::ArchType DebugEntryValueArchs[] = {
       llvm::Triple::x86, llvm::Triple::x86_64, llvm::Triple::aarch64,
-      llvm::Triple::arm, llvm::Triple::armeb};
+      llvm::Triple::arm, llvm::Triple::armeb, llvm::Triple::mips,
+      llvm::Triple::mipsel, llvm::Triple::mips64, llvm::Triple::mips64el};
 
   llvm::Triple T(TargetOpts.Triple);
   if (Opts.OptimizationLevel > 0 && Opts.hasReducedDebugInfo() &&
       llvm::is_contained(DebugEntryValueArchs, T.getArch()))
-    Opts.EnableDebugEntryValues = Args.hasArg(OPT_femit_debug_entry_values);
+    Opts.EmitCallSiteInfo = true;
 
   Opts.DisableO0ImplyOptNone = Args.hasArg(OPT_disable_O0_optnone);
   Opts.DisableRedZone = Args.hasArg(OPT_disable_red_zone);
@@ -805,8 +841,10 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
   Opts.FineGrainedBitfieldAccesses =
       Args.hasFlag(OPT_ffine_grained_bitfield_accesses,
                    OPT_fno_fine_grained_bitfield_accesses, false);
-  Opts.DwarfDebugFlags = Args.getLastArgValue(OPT_dwarf_debug_flags);
-  Opts.RecordCommandLine = Args.getLastArgValue(OPT_record_command_line);
+  Opts.DwarfDebugFlags =
+      std::string(Args.getLastArgValue(OPT_dwarf_debug_flags));
+  Opts.RecordCommandLine =
+      std::string(Args.getLastArgValue(OPT_record_command_line));
   Opts.MergeAllConstants = Args.hasArg(OPT_fmerge_all_constants);
   Opts.NoCommon = !Args.hasArg(OPT_fcommon);
   Opts.NoInlineLineTables = Args.hasArg(OPT_gno_inline_line_tables);
@@ -823,7 +861,8 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
 
   Opts.DisableIntegratedAS = Args.hasArg(OPT_fno_integrated_as);
   Opts.Autolink = !Args.hasArg(OPT_fno_autolink);
-  Opts.SampleProfileFile = Args.getLastArgValue(OPT_fprofile_sample_use_EQ);
+  Opts.SampleProfileFile =
+      std::string(Args.getLastArgValue(OPT_fprofile_sample_use_EQ));
   Opts.DebugInfoForProfiling = Args.hasFlag(
       OPT_fdebug_info_for_profiling, OPT_fno_debug_info_for_profiling, false);
   Opts.DebugNameTable = static_cast<unsigned>(
@@ -836,13 +875,13 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
 
   setPGOInstrumentor(Opts, Args, Diags);
   Opts.InstrProfileOutput =
-      Args.getLastArgValue(OPT_fprofile_instrument_path_EQ);
+      std::string(Args.getLastArgValue(OPT_fprofile_instrument_path_EQ));
   Opts.ProfileInstrumentUsePath =
-      Args.getLastArgValue(OPT_fprofile_instrument_use_path_EQ);
+      std::string(Args.getLastArgValue(OPT_fprofile_instrument_use_path_EQ));
   if (!Opts.ProfileInstrumentUsePath.empty())
     setPGOUseInstrumentor(Opts, Opts.ProfileInstrumentUsePath);
   Opts.ProfileRemappingFile =
-      Args.getLastArgValue(OPT_fprofile_remapping_file_EQ);
+      std::string(Args.getLastArgValue(OPT_fprofile_remapping_file_EQ));
   if (!Opts.ProfileRemappingFile.empty() && !Opts.ExperimentalNewPassManager) {
     Diags.Report(diag::err_drv_argument_only_allowed_with)
       << Args.getLastArg(OPT_fprofile_remapping_file_EQ)->getAsString(Args)
@@ -852,7 +891,7 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
   Opts.CoverageMapping =
       Args.hasFlag(OPT_fcoverage_mapping, OPT_fno_coverage_mapping, false);
   Opts.DumpCoverageMapping = Args.hasArg(OPT_dump_coverage_mapping);
-  Opts.AsmVerbose = Args.hasArg(OPT_masm_verbose);
+  Opts.AsmVerbose = !Args.hasArg(OPT_fno_verbose_asm);
   Opts.PreserveAsmComments = !Args.hasArg(OPT_fno_preserve_as_comments);
   Opts.AssumeSaneOperatorNew = !Args.hasArg(OPT_fno_assume_sane_operator_new);
   Opts.ObjCAutoRefCountExceptions = Args.hasArg(OPT_fobjc_arc_exceptions);
@@ -861,7 +900,7 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
       Args.hasArg(OPT_fregister_global_dtors_with_atexit);
   Opts.CXXCtorDtorAliases = Args.hasArg(OPT_mconstructor_aliases);
   Opts.CodeModel = TargetOpts.CodeModel;
-  Opts.DebugPass = Args.getLastArgValue(OPT_mdebug_pass);
+  Opts.DebugPass = std::string(Args.getLastArgValue(OPT_mdebug_pass));
 
   // Handle -mframe-pointer option.
   if (Arg *A = Args.getLastArg(OPT_mframe_pointer_EQ)) {
@@ -883,49 +922,30 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
       Opts.setFramePointer(FP);
   }
 
-  // -pg may override -mframe-pointer
-  // TODO: This should be merged into getFramePointerKind in Clang.cpp.
-  if (Args.hasArg(OPT_pg))
-    Opts.setFramePointer(CodeGenOptions::FramePointerKind::All);
-
   Opts.DisableFree = Args.hasArg(OPT_disable_free);
   Opts.DiscardValueNames = Args.hasArg(OPT_discard_value_names);
   Opts.DisableTailCalls = Args.hasArg(OPT_mdisable_tail_calls);
   Opts.NoEscapingBlockTailCalls =
       Args.hasArg(OPT_fno_escaping_block_tail_calls);
-  Opts.FloatABI = Args.getLastArgValue(OPT_mfloat_abi);
+  Opts.FloatABI = std::string(Args.getLastArgValue(OPT_mfloat_abi));
   Opts.LessPreciseFPMAD = Args.hasArg(OPT_cl_mad_enable) ||
                           Args.hasArg(OPT_cl_unsafe_math_optimizations) ||
                           Args.hasArg(OPT_cl_fast_relaxed_math);
-  Opts.LimitFloatPrecision = Args.getLastArgValue(OPT_mlimit_float_precision);
-  Opts.NoInfsFPMath = (Args.hasArg(OPT_menable_no_infinities) ||
-                       Args.hasArg(OPT_cl_finite_math_only) ||
-                       Args.hasArg(OPT_cl_fast_relaxed_math));
-  Opts.NoNaNsFPMath = (Args.hasArg(OPT_menable_no_nans) ||
-                       Args.hasArg(OPT_cl_unsafe_math_optimizations) ||
-                       Args.hasArg(OPT_cl_finite_math_only) ||
-                       Args.hasArg(OPT_cl_fast_relaxed_math));
-  Opts.NoSignedZeros = (Args.hasArg(OPT_fno_signed_zeros) ||
-                        Args.hasArg(OPT_cl_no_signed_zeros) ||
-                        Args.hasArg(OPT_cl_unsafe_math_optimizations) ||
-                        Args.hasArg(OPT_cl_fast_relaxed_math));
-  Opts.Reassociate = Args.hasArg(OPT_mreassociate);
-  Opts.FlushDenorm = Args.hasArg(OPT_cl_denorms_are_zero) ||
-                     (Args.hasArg(OPT_fcuda_is_device) &&
-                      Args.hasArg(OPT_fcuda_flush_denormals_to_zero));
+  Opts.LimitFloatPrecision =
+      std::string(Args.getLastArgValue(OPT_mlimit_float_precision));
   Opts.CorrectlyRoundedDivSqrt =
       Args.hasArg(OPT_cl_fp32_correctly_rounded_divide_sqrt);
   Opts.UniformWGSize =
       Args.hasArg(OPT_cl_uniform_work_group_size);
   Opts.Reciprocals = Args.getAllArgValues(OPT_mrecip_EQ);
-  Opts.ReciprocalMath = Args.hasArg(OPT_freciprocal_math);
-  Opts.NoTrappingMath = Args.hasArg(OPT_fno_trapping_math);
   Opts.StrictFloatCastOverflow =
       !Args.hasArg(OPT_fno_strict_float_cast_overflow);
 
-  Opts.NoZeroInitializedInBSS = Args.hasArg(OPT_mno_zero_initialized_in_bss);
+  Opts.NoZeroInitializedInBSS = Args.hasArg(OPT_fno_zero_initialized_in_bss);
   Opts.NumRegisterParameters = getLastArgIntValue(Args, OPT_mregparm, 0, Diags);
   Opts.NoExecStack = Args.hasArg(OPT_mno_exec_stack);
+  Opts.SmallDataLimit =
+      getLastArgIntValue(Args, OPT_msmall_data_limit, 0, Diags);
   Opts.FatalWarnings = Args.hasArg(OPT_massembler_fatal_warnings);
   Opts.NoWarn = Args.hasArg(OPT_massembler_no_warn);
   Opts.EnableSegmentedStacks = Args.hasArg(OPT_split_stacks);
@@ -942,27 +962,31 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
   Opts.StrictReturn = !Args.hasArg(OPT_fno_strict_return);
   Opts.StrictVTablePointers = Args.hasArg(OPT_fstrict_vtable_pointers);
   Opts.ForceEmitVTables = Args.hasArg(OPT_fforce_emit_vtables);
-  Opts.UnsafeFPMath = Args.hasArg(OPT_menable_unsafe_fp_math) ||
-                      Args.hasArg(OPT_cl_unsafe_math_optimizations) ||
-                      Args.hasArg(OPT_cl_fast_relaxed_math);
   Opts.UnwindTables = Args.hasArg(OPT_munwind_tables);
-  Opts.RelocationModel = getRelocModel(Args, Diags);
-  Opts.ThreadModel = Args.getLastArgValue(OPT_mthread_model, "posix");
+  Opts.ThreadModel =
+      std::string(Args.getLastArgValue(OPT_mthread_model, "posix"));
   if (Opts.ThreadModel != "posix" && Opts.ThreadModel != "single")
     Diags.Report(diag::err_drv_invalid_value)
         << Args.getLastArg(OPT_mthread_model)->getAsString(Args)
         << Opts.ThreadModel;
-  Opts.TrapFuncName = Args.getLastArgValue(OPT_ftrap_function_EQ);
+  Opts.TrapFuncName = std::string(Args.getLastArgValue(OPT_ftrap_function_EQ));
   Opts.UseInitArray = !Args.hasArg(OPT_fno_use_init_array);
 
-  Opts.FunctionSections = Args.hasFlag(OPT_ffunction_sections,
-                                       OPT_fno_function_sections, false);
-  Opts.DataSections = Args.hasFlag(OPT_fdata_sections,
-                                   OPT_fno_data_sections, false);
-  Opts.StackSizeSection =
-      Args.hasFlag(OPT_fstack_size_section, OPT_fno_stack_size_section, false);
-  Opts.UniqueSectionNames = Args.hasFlag(OPT_funique_section_names,
-                                         OPT_fno_unique_section_names, true);
+  Opts.BBSections =
+      std::string(Args.getLastArgValue(OPT_fbasic_block_sections_EQ, "none"));
+
+  // Basic Block Sections implies Function Sections.
+  Opts.FunctionSections =
+      Args.hasArg(OPT_ffunction_sections) ||
+      (Opts.BBSections != "none" && Opts.BBSections != "labels");
+
+  Opts.DataSections = Args.hasArg(OPT_fdata_sections);
+  Opts.StackSizeSection = Args.hasArg(OPT_fstack_size_section);
+  Opts.UniqueSectionNames = !Args.hasArg(OPT_fno_unique_section_names);
+  Opts.UniqueBasicBlockSectionNames =
+      Args.hasArg(OPT_funique_basic_block_section_names);
+  Opts.UniqueInternalLinkageNames =
+      Args.hasArg(OPT_funique_internal_linkage_names);
 
   Opts.MergeFunctions = Args.hasArg(OPT_fmerge_functions);
 
@@ -987,7 +1011,8 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
     if (IK.getLanguage() != Language::LLVM_IR)
       Diags.Report(diag::err_drv_argument_only_allowed_with)
           << A->getAsString(Args) << "-x ir";
-    Opts.ThinLTOIndexFile = Args.getLastArgValue(OPT_fthinlto_index_EQ);
+    Opts.ThinLTOIndexFile =
+        std::string(Args.getLastArgValue(OPT_fthinlto_index_EQ));
   }
   if (Arg *A = Args.getLastArg(OPT_save_temps_EQ))
     Opts.SaveTempsFilePrefix =
@@ -995,16 +1020,18 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
             .Case("obj", FrontendOpts.OutputFile)
             .Default(llvm::sys::path::filename(FrontendOpts.OutputFile).str());
 
-  Opts.ThinLinkBitcodeFile = Args.getLastArgValue(OPT_fthin_link_bitcode_EQ);
+  Opts.ThinLinkBitcodeFile =
+      std::string(Args.getLastArgValue(OPT_fthin_link_bitcode_EQ));
 
   Opts.MSVolatile = Args.hasArg(OPT_fms_volatile);
 
   Opts.VectorizeLoop = Args.hasArg(OPT_vectorize_loops);
   Opts.VectorizeSLP = Args.hasArg(OPT_vectorize_slp);
 
-  Opts.PreferVectorWidth = Args.getLastArgValue(OPT_mprefer_vector_width_EQ);
+  Opts.PreferVectorWidth =
+      std::string(Args.getLastArgValue(OPT_mprefer_vector_width_EQ));
 
-  Opts.MainFileName = Args.getLastArgValue(OPT_main_file_name);
+  Opts.MainFileName = std::string(Args.getLastArgValue(OPT_main_file_name));
   Opts.VerifyModule = !Args.hasArg(OPT_disable_llvm_verifier);
 
   Opts.ControlFlowGuardNoChecks = Args.hasArg(OPT_cfguard_no_checks);
@@ -1014,17 +1041,14 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
   Opts.EmitGcovArcs = Args.hasArg(OPT_femit_coverage_data);
   Opts.EmitGcovNotes = Args.hasArg(OPT_femit_coverage_notes);
   if (Opts.EmitGcovArcs || Opts.EmitGcovNotes) {
-    Opts.CoverageDataFile = Args.getLastArgValue(OPT_coverage_data_file);
-    Opts.CoverageNotesFile = Args.getLastArgValue(OPT_coverage_notes_file);
-    Opts.CoverageExtraChecksum = Args.hasArg(OPT_coverage_cfg_checksum);
-    Opts.CoverageNoFunctionNamesInData =
-        Args.hasArg(OPT_coverage_no_function_names_in_data);
+    Opts.CoverageDataFile =
+        std::string(Args.getLastArgValue(OPT_coverage_data_file));
+    Opts.CoverageNotesFile =
+        std::string(Args.getLastArgValue(OPT_coverage_notes_file));
     Opts.ProfileFilterFiles =
-        Args.getLastArgValue(OPT_fprofile_filter_files_EQ);
+        std::string(Args.getLastArgValue(OPT_fprofile_filter_files_EQ));
     Opts.ProfileExcludeFiles =
-        Args.getLastArgValue(OPT_fprofile_exclude_files_EQ);
-    Opts.CoverageExitBlockBeforeBody =
-        Args.hasArg(OPT_coverage_exit_block_before_body);
+        std::string(Args.getLastArgValue(OPT_fprofile_exclude_files_EQ));
     if (Args.hasArg(OPT_coverage_version_EQ)) {
       StringRef CoverageVersion = Args.getLastArgValue(OPT_coverage_version_EQ);
       if (CoverageVersion.size() != 4) {
@@ -1062,8 +1086,7 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
           A->getOption().getID() == options::OPT_INPUT ||
           A->getOption().getID() == options::OPT_x ||
           A->getOption().getID() == options::OPT_fembed_bitcode ||
-          (A->getOption().getGroup().isValid() &&
-           A->getOption().getGroup().getID() == options::OPT_W_Group))
+          A->getOption().matches(options::OPT_W_Group))
         continue;
       ArgStringList ASL;
       A->render(Args, ASL);
@@ -1091,6 +1114,8 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
       Args.hasArg(OPT_fxray_always_emit_typedevents);
   Opts.XRayInstructionThreshold =
       getLastArgIntValue(Args, OPT_fxray_instruction_threshold_EQ, 200, Diags);
+  Opts.XRayIgnoreLoops = Args.hasArg(OPT_fxray_ignore_loops);
+  Opts.XRayOmitFunctionIndex = Args.hasArg(OPT_fno_xray_function_index);
 
   auto XRayInstrBundles =
       Args.getAllArgValues(OPT_fxray_instrumentation_bundle);
@@ -1143,7 +1168,8 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
   }
 
   Opts.RelaxELFRelocations = Args.hasArg(OPT_mrelax_relocations);
-  Opts.DebugCompilationDir = Args.getLastArgValue(OPT_fdebug_compilation_dir);
+  Opts.DebugCompilationDir =
+      std::string(Args.getLastArgValue(OPT_fdebug_compilation_dir));
   for (auto *A :
        Args.filtered(OPT_mlink_bitcode_file, OPT_mlink_builtin_bitcode)) {
     CodeGenOptions::BitcodeFileToLink F;
@@ -1173,9 +1199,15 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
   Opts.SanitizeCoverageNoPrune = Args.hasArg(OPT_fsanitize_coverage_no_prune);
   Opts.SanitizeCoverageInline8bitCounters =
       Args.hasArg(OPT_fsanitize_coverage_inline_8bit_counters);
+  Opts.SanitizeCoverageInlineBoolFlag =
+      Args.hasArg(OPT_fsanitize_coverage_inline_bool_flag);
   Opts.SanitizeCoveragePCTable = Args.hasArg(OPT_fsanitize_coverage_pc_table);
   Opts.SanitizeCoverageStackDepth =
       Args.hasArg(OPT_fsanitize_coverage_stack_depth);
+  Opts.SanitizeCoverageAllowlistFiles =
+      Args.getAllArgValues(OPT_fsanitize_coverage_allowlist);
+  Opts.SanitizeCoverageBlocklistFiles =
+      Args.getAllArgValues(OPT_fsanitize_coverage_blocklist);
   Opts.SanitizeMemoryTrackOrigins =
       getLastArgIntValue(Args, OPT_fsanitize_memory_track_origins_EQ, 0, Diags);
   Opts.SanitizeMemoryUseAfterDtor =
@@ -1229,6 +1261,8 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
 
   Opts.NoStackArgProbe = Args.hasArg(OPT_mno_stack_arg_probe);
 
+  Opts.StackClashProtector = Args.hasArg(OPT_fstack_clash_protection);
+
   if (Arg *A = Args.getLastArg(OPT_fobjc_dispatch_method_EQ)) {
     StringRef Name = A->getValue();
     unsigned Method = llvm::StringSwitch<unsigned>(Name)
@@ -1277,7 +1311,14 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
   if (Arg *A = Args.getLastArg(OPT_fdenormal_fp_math_EQ)) {
     StringRef Val = A->getValue();
     Opts.FPDenormalMode = llvm::parseDenormalFPAttribute(Val);
-    if (Opts.FPDenormalMode == llvm::DenormalMode::Invalid)
+    if (!Opts.FPDenormalMode.isValid())
+      Diags.Report(diag::err_drv_invalid_value) << A->getAsString(Args) << Val;
+  }
+
+  if (Arg *A = Args.getLastArg(OPT_fdenormal_fp_math_f32_EQ)) {
+    StringRef Val = A->getValue();
+    Opts.FP32DenormalMode = llvm::parseDenormalFPAttribute(Val);
+    if (!Opts.FP32DenormalMode.isValid())
       Diags.Report(diag::err_drv_invalid_value) << A->getAsString(Args) << Val;
   }
 
@@ -1286,6 +1327,12 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
   if (Arg *A =
           Args.getLastArg(OPT_fpcc_struct_return, OPT_freg_struct_return,
                           OPT_maix_struct_return, OPT_msvr4_struct_return)) {
+    // TODO: We might want to consider enabling these options on AIX in the
+    // future.
+    if (T.isOSAIX())
+      Diags.Report(diag::err_drv_unsupported_opt_for_target)
+          << A->getSpelling() << T.str();
+
     const Option &O = A->getOption();
     if (O.matches(OPT_fpcc_struct_return) ||
         O.matches(OPT_maix_struct_return)) {
@@ -1301,7 +1348,7 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
   Opts.LinkerOptions = Args.getAllArgValues(OPT_linker_option);
   bool NeedLocTracking = false;
 
-  Opts.OptRecordFile = Args.getLastArgValue(OPT_opt_record_file);
+  Opts.OptRecordFile = std::string(Args.getLastArgValue(OPT_opt_record_file));
   if (!Opts.OptRecordFile.empty())
     NeedLocTracking = true;
 
@@ -1374,7 +1421,7 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
                       Opts.SanitizeTrap);
 
   Opts.CudaGpuBinaryFileName =
-      Args.getLastArgValue(OPT_fcuda_include_gpubinary);
+      std::string(Args.getLastArgValue(OPT_fcuda_include_gpubinary));
 
   Opts.Backchain = Args.hasArg(OPT_mbackchain);
 
@@ -1385,38 +1432,6 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
 
   Opts.Addrsig = Args.hasArg(OPT_faddrsig);
 
-  if (Arg *A = Args.getLastArg(OPT_msign_return_address_EQ)) {
-    StringRef SignScope = A->getValue();
-
-    if (SignScope.equals_lower("none"))
-      Opts.setSignReturnAddress(CodeGenOptions::SignReturnAddressScope::None);
-    else if (SignScope.equals_lower("all"))
-      Opts.setSignReturnAddress(CodeGenOptions::SignReturnAddressScope::All);
-    else if (SignScope.equals_lower("non-leaf"))
-      Opts.setSignReturnAddress(
-          CodeGenOptions::SignReturnAddressScope::NonLeaf);
-    else
-      Diags.Report(diag::err_drv_invalid_value)
-          << A->getAsString(Args) << SignScope;
-
-    if (Arg *A = Args.getLastArg(OPT_msign_return_address_key_EQ)) {
-      StringRef SignKey = A->getValue();
-      if (!SignScope.empty() && !SignKey.empty()) {
-        if (SignKey.equals_lower("a_key"))
-          Opts.setSignReturnAddressKey(
-              CodeGenOptions::SignReturnAddressKeyValue::AKey);
-        else if (SignKey.equals_lower("b_key"))
-          Opts.setSignReturnAddressKey(
-              CodeGenOptions::SignReturnAddressKeyValue::BKey);
-        else
-          Diags.Report(diag::err_drv_invalid_value)
-              << A->getAsString(Args) << SignKey;
-      }
-    }
-  }
-
-  Opts.BranchTargetEnforcement = Args.hasArg(OPT_mbranch_target_enforce);
-
   Opts.KeepStaticConsts = Args.hasArg(OPT_fkeep_static_consts);
 
   Opts.SpeculativeLoadHardening = Args.hasArg(OPT_mspeculative_load_hardening);
@@ -1425,20 +1440,23 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
 
   Opts.PassPlugins = Args.getAllArgValues(OPT_fpass_plugin_EQ);
 
-  Opts.SymbolPartition = Args.getLastArgValue(OPT_fsymbol_partition_EQ);
+  Opts.SymbolPartition =
+      std::string(Args.getLastArgValue(OPT_fsymbol_partition_EQ));
 
+  Opts.ForceAAPCSBitfieldLoad = Args.hasArg(OPT_ForceAAPCSBitfieldLoad);
   return Success;
 }
 
 static void ParseDependencyOutputArgs(DependencyOutputOptions &Opts,
                                       ArgList &Args) {
-  Opts.OutputFile = Args.getLastArgValue(OPT_dependency_file);
+  Opts.OutputFile = std::string(Args.getLastArgValue(OPT_dependency_file));
   Opts.Targets = Args.getAllArgValues(OPT_MT);
   Opts.IncludeSystemHeaders = Args.hasArg(OPT_sys_header_deps);
   Opts.IncludeModuleFiles = Args.hasArg(OPT_module_file_deps);
   Opts.UsePhonyTargets = Args.hasArg(OPT_MP);
   Opts.ShowHeaderIncludes = Args.hasArg(OPT_H);
-  Opts.HeaderIncludeOutputFile = Args.getLastArgValue(OPT_header_include_file);
+  Opts.HeaderIncludeOutputFile =
+      std::string(Args.getLastArgValue(OPT_header_include_file));
   Opts.AddMissingHeaderDeps = Args.hasArg(OPT_MG);
   if (Args.hasArg(OPT_show_includes)) {
     // Writing both /showIncludes and preprocessor output to stdout
@@ -1451,9 +1469,9 @@ static void ParseDependencyOutputArgs(DependencyOutputOptions &Opts,
   } else {
     Opts.ShowIncludesDest = ShowIncludesDestination::None;
   }
-  Opts.DOTOutputFile = Args.getLastArgValue(OPT_dependency_dot);
+  Opts.DOTOutputFile = std::string(Args.getLastArgValue(OPT_dependency_dot));
   Opts.ModuleDependencyOutputDir =
-      Args.getLastArgValue(OPT_module_dependency_dir);
+      std::string(Args.getLastArgValue(OPT_module_dependency_dir));
   if (Args.hasArg(OPT_MV))
     Opts.OutputFormat = DependencyOutputFormat::NMake;
   // Add sanitizer blacklists as extra dependencies.
@@ -1463,13 +1481,13 @@ static void ParseDependencyOutputArgs(DependencyOutputOptions &Opts,
     for (const auto *A : Args.filtered(OPT_fsanitize_blacklist)) {
       StringRef Val = A->getValue();
       if (Val.find('=') == StringRef::npos)
-        Opts.ExtraDeps.push_back(Val);
+        Opts.ExtraDeps.push_back(std::string(Val));
     }
     if (Opts.IncludeSystemHeaders) {
       for (const auto *A : Args.filtered(OPT_fsanitize_system_blacklist)) {
         StringRef Val = A->getValue();
         if (Val.find('=') == StringRef::npos)
-          Opts.ExtraDeps.push_back(Val);
+          Opts.ExtraDeps.push_back(std::string(Val));
       }
     }
   }
@@ -1483,7 +1501,7 @@ static void ParseDependencyOutputArgs(DependencyOutputOptions &Opts,
   for (const auto *A : Args.filtered(OPT_fmodule_file)) {
     StringRef Val = A->getValue();
     if (Val.find('=') == StringRef::npos)
-      Opts.ExtraDeps.push_back(Val);
+      Opts.ExtraDeps.push_back(std::string(Val));
   }
 }
 
@@ -1542,10 +1560,11 @@ static bool checkVerifyPrefixes(const std::vector<std::string> &VerifyPrefixes,
 
 bool clang::ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,
                                 DiagnosticsEngine *Diags,
-                                bool DefaultDiagColor, bool DefaultShowOpt) {
+                                bool DefaultDiagColor) {
   bool Success = true;
 
-  Opts.DiagnosticLogFile = Args.getLastArgValue(OPT_diagnostic_log_file);
+  Opts.DiagnosticLogFile =
+      std::string(Args.getLastArgValue(OPT_diagnostic_log_file));
   if (Arg *A =
           Args.getLastArg(OPT_diagnostic_serialized_file, OPT__serialize_diags))
     Opts.DiagnosticSerializationFile = A->getValue();
@@ -1555,17 +1574,11 @@ bool clang::ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,
   Opts.PedanticErrors = Args.hasArg(OPT_pedantic_errors);
   Opts.ShowCarets = !Args.hasArg(OPT_fno_caret_diagnostics);
   Opts.ShowColors = parseShowColorsArgs(Args, DefaultDiagColor);
-  Opts.ShowColumn = Args.hasFlag(OPT_fshow_column,
-                                 OPT_fno_show_column,
-                                 /*Default=*/true);
+  Opts.ShowColumn = !Args.hasArg(OPT_fno_show_column);
   Opts.ShowFixits = !Args.hasArg(OPT_fno_diagnostics_fixit_info);
   Opts.ShowLocation = !Args.hasArg(OPT_fno_show_source_location);
   Opts.AbsolutePath = Args.hasArg(OPT_fdiagnostics_absolute_paths);
-  Opts.ShowOptionNames =
-      Args.hasFlag(OPT_fdiagnostics_show_option,
-                   OPT_fno_diagnostics_show_option, DefaultShowOpt);
-
-  llvm::sys::Process::UseANSIEscapeCodes(Args.hasArg(OPT_fansi_escape_codes));
+  Opts.ShowOptionNames = !Args.hasArg(OPT_fno_diagnostics_show_option);
 
   // Default behavior is to not to show note include stacks.
   Opts.ShowNoteIncludeStack = false;
@@ -1671,7 +1684,11 @@ bool clang::ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,
       Diags->Report(diag::warn_ignoring_ftabstop_value)
       << Opts.TabStop << DiagnosticOptions::DefaultTabStop;
   }
-  Opts.MessageLength = getLastArgIntValue(Args, OPT_fmessage_length, 0, Diags);
+  Opts.MessageLength =
+      getLastArgIntValue(Args, OPT_fmessage_length_EQ, 0, Diags);
+
+  Opts.UndefPrefixes = Args.getAllArgValues(OPT_Wundef_prefix_EQ);
+
   addDiagnosticArgs(Args, OPT_W_Group, OPT_W_value_Group, Opts.Warnings);
   addDiagnosticArgs(Args, OPT_R_Group, OPT_R_value_Group, Opts.Remarks);
 
@@ -1679,7 +1696,7 @@ bool clang::ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,
 }
 
 static void ParseFileSystemArgs(FileSystemOptions &Opts, ArgList &Args) {
-  Opts.WorkingDir = Args.getLastArgValue(OPT_working_directory);
+  Opts.WorkingDir = std::string(Args.getLastArgValue(OPT_working_directory));
 }
 
 /// Parse the argument to the -ftest-module-file-extension
@@ -1697,12 +1714,12 @@ static bool parseTestModuleFileExtensionArg(StringRef Arg,
   if (Args.size() < 5)
     return true;
 
-  BlockName = Args[0];
+  BlockName = std::string(Args[0]);
   if (Args[1].getAsInteger(10, MajorVersion)) return true;
   if (Args[2].getAsInteger(10, MinorVersion)) return true;
   if (Args[3].getAsInteger(2, Hashed)) return true;
   if (Args.size() > 4)
-    UserInfo = Args[4];
+    UserInfo = std::string(Args[4]);
   return false;
 }
 
@@ -1735,6 +1752,7 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
     case OPT_ast_dump:
     case OPT_ast_dump_all:
     case OPT_ast_dump_lookups:
+    case OPT_ast_dump_decl_types:
       Opts.ProgramAction = frontend::ASTDump; break;
     case OPT_ast_print:
       Opts.ProgramAction = frontend::ASTPrint; break;
@@ -1777,25 +1795,26 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
       StringRef ArgStr =
           Args.hasArg(OPT_interface_stub_version_EQ)
               ? Args.getLastArgValue(OPT_interface_stub_version_EQ)
-              : "experimental-ifs-v1";
+              : "experimental-ifs-v2";
       if (ArgStr == "experimental-yaml-elf-v1" ||
+          ArgStr == "experimental-ifs-v1" ||
           ArgStr == "experimental-tapi-elf-v1") {
         std::string ErrorMessage =
             "Invalid interface stub format: " + ArgStr.str() +
             " is deprecated.";
         Diags.Report(diag::err_drv_invalid_value)
             << "Must specify a valid interface stub format type, ie: "
-               "-interface-stub-version=experimental-ifs-v1"
+               "-interface-stub-version=experimental-ifs-v2"
             << ErrorMessage;
-      } else if (ArgStr != "experimental-ifs-v1") {
+      } else if (!ArgStr.startswith("experimental-ifs-")) {
         std::string ErrorMessage =
             "Invalid interface stub format: " + ArgStr.str() + ".";
         Diags.Report(diag::err_drv_invalid_value)
             << "Must specify a valid interface stub format type, ie: "
-               "-interface-stub-version=experimental-ifs-v1"
+               "-interface-stub-version=experimental-ifs-v2"
             << ErrorMessage;
       } else {
-        Opts.ProgramAction = frontend::GenerateInterfaceIfsExpV1;
+        Opts.ProgramAction = frontend::GenerateInterfaceStubs;
       }
       break;
     }
@@ -1870,7 +1889,7 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
   }
   Opts.DisableFree = Args.hasArg(OPT_disable_free);
 
-  Opts.OutputFile = Args.getLastArgValue(OPT_o);
+  Opts.OutputFile = std::string(Args.getLastArgValue(OPT_o));
   Opts.Plugins = Args.getAllArgValues(OPT_load);
   Opts.RelocatablePCH = Args.hasArg(OPT_relocatable_pch);
   Opts.ShowHelp = Args.hasArg(OPT_help);
@@ -1889,8 +1908,9 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
   Opts.FixToTemporaries = Args.hasArg(OPT_fixit_to_temp);
   Opts.ASTDumpDecls = Args.hasArg(OPT_ast_dump, OPT_ast_dump_EQ);
   Opts.ASTDumpAll = Args.hasArg(OPT_ast_dump_all, OPT_ast_dump_all_EQ);
-  Opts.ASTDumpFilter = Args.getLastArgValue(OPT_ast_dump_filter);
+  Opts.ASTDumpFilter = std::string(Args.getLastArgValue(OPT_ast_dump_filter));
   Opts.ASTDumpLookups = Args.hasArg(OPT_ast_dump_lookups);
+  Opts.ASTDumpDeclTypes = Args.hasArg(OPT_ast_dump_decl_types);
   Opts.UseGlobalModuleIndex = !Args.hasArg(OPT_fno_modules_global_index);
   Opts.GenerateGlobalModuleIndex = Opts.UseGlobalModuleIndex;
   Opts.ModuleMapFiles = Args.getAllArgValues(OPT_fmodule_map_file);
@@ -1898,12 +1918,17 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
   for (const auto *A : Args.filtered(OPT_fmodule_file)) {
     StringRef Val = A->getValue();
     if (Val.find('=') == StringRef::npos)
-      Opts.ModuleFiles.push_back(Val);
+      Opts.ModuleFiles.push_back(std::string(Val));
   }
   Opts.ModulesEmbedFiles = Args.getAllArgValues(OPT_fmodules_embed_file_EQ);
   Opts.ModulesEmbedAllFiles = Args.hasArg(OPT_fmodules_embed_all_files);
   Opts.IncludeTimestamps = !Args.hasArg(OPT_fno_pch_timestamp);
   Opts.UseTemporary = !Args.hasArg(OPT_fno_temp_file);
+  Opts.IsSystemModule = Args.hasArg(OPT_fsystem_module);
+
+  if (Opts.ProgramAction != frontend::GenerateModule && Opts.IsSystemModule)
+    Diags.Report(diag::err_drv_argument_only_allowed_with) << "-fsystem-module"
+                                                           << "-emit-module";
 
   Opts.CodeCompleteOpts.IncludeMacros
     = Args.hasArg(OPT_code_completion_macros);
@@ -1918,10 +1943,14 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
   Opts.CodeCompleteOpts.IncludeFixIts
     = Args.hasArg(OPT_code_completion_with_fixits);
 
-  Opts.OverrideRecordLayoutsFile
-    = Args.getLastArgValue(OPT_foverride_record_layout_EQ);
-  Opts.AuxTriple = Args.getLastArgValue(OPT_aux_triple);
-  Opts.StatsFile = Args.getLastArgValue(OPT_stats_file);
+  Opts.OverrideRecordLayoutsFile =
+      std::string(Args.getLastArgValue(OPT_foverride_record_layout_EQ));
+  Opts.AuxTriple = std::string(Args.getLastArgValue(OPT_aux_triple));
+  if (Args.hasArg(OPT_aux_target_cpu))
+    Opts.AuxTargetCPU = std::string(Args.getLastArgValue(OPT_aux_target_cpu));
+  if (Args.hasArg(OPT_aux_target_feature))
+    Opts.AuxTargetFeatures = Args.getAllArgValues(OPT_aux_target_feature);
+  Opts.StatsFile = std::string(Args.getLastArgValue(OPT_stats_file));
 
   if (const Arg *A = Args.getLastArg(OPT_arcmt_check,
                                      OPT_arcmt_modify,
@@ -1940,9 +1969,10 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
       break;
     }
   }
-  Opts.MTMigrateDir = Args.getLastArgValue(OPT_mt_migrate_directory);
-  Opts.ARCMTMigrateReportOut
-    = Args.getLastArgValue(OPT_arcmt_migrate_report_output);
+  Opts.MTMigrateDir =
+      std::string(Args.getLastArgValue(OPT_mt_migrate_directory));
+  Opts.ARCMTMigrateReportOut =
+      std::string(Args.getLastArgValue(OPT_arcmt_migrate_report_output));
   Opts.ARCMTMigrateEmitARCErrors
     = Args.hasArg(OPT_arcmt_migrate_emit_arc_errors);
 
@@ -1977,7 +2007,8 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
   if (Args.hasArg(OPT_objcmt_migrate_all))
     Opts.ObjCMTAction |= FrontendOptions::ObjCMT_MigrateDecls;
 
-  Opts.ObjCMTWhiteListPath = Args.getLastArgValue(OPT_objcmt_whitelist_dir_path);
+  Opts.ObjCMTWhiteListPath =
+      std::string(Args.getLastArgValue(OPT_objcmt_whitelist_dir_path));
 
   if (Opts.ARCMTAction != FrontendOptions::ARCMT_None &&
       Opts.ObjCMTAction != FrontendOptions::ObjCMT_None) {
@@ -1993,8 +2024,9 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
     // FIXME: Supporting '<lang>-header-cpp-output' would be useful.
     bool Preprocessed = XValue.consume_back("-cpp-output");
     bool ModuleMap = XValue.consume_back("-module-map");
-    IsHeaderFile =
-        !Preprocessed && !ModuleMap && XValue.consume_back("-header");
+    IsHeaderFile = !Preprocessed && !ModuleMap &&
+                   XValue != "precompiled-header" &&
+                   XValue.consume_back("-header");
 
     // Principal languages.
     DashX = llvm::StringSwitch<InputKind>(XValue)
@@ -2021,7 +2053,7 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
       DashX = llvm::StringSwitch<InputKind>(XValue)
                   .Case("cpp-output", InputKind(Language::C).getPreprocessed())
                   .Case("assembler-with-cpp", Language::Asm)
-                  .Cases("ast", "pcm",
+                  .Cases("ast", "pcm", "precompiled-header",
                          InputKind(Language::Unknown, InputKind::Precompiled))
                   .Case("ir", Language::LLVM_IR)
                   .Default(Language::Unknown);
@@ -2054,12 +2086,16 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
         DashX = IK;
     }
 
+    bool IsSystem = false;
+
     // The -emit-module action implicitly takes a module map.
     if (Opts.ProgramAction == frontend::GenerateModule &&
-        IK.getFormat() == InputKind::Source)
+        IK.getFormat() == InputKind::Source) {
       IK = IK.withFormat(InputKind::ModuleMap);
+      IsSystem = Opts.IsSystemModule;
+    }
 
-    Opts.Inputs.emplace_back(std::move(Inputs[i]), IK);
+    Opts.Inputs.emplace_back(std::move(Inputs[i]), IK, IsSystem);
   }
 
   return DashX;
@@ -2074,14 +2110,14 @@ std::string CompilerInvocation::GetResourcesPath(const char *Argv0,
 
 static void ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args,
                                   const std::string &WorkingDir) {
-  Opts.Sysroot = Args.getLastArgValue(OPT_isysroot, "/");
+  Opts.Sysroot = std::string(Args.getLastArgValue(OPT_isysroot, "/"));
   Opts.Verbose = Args.hasArg(OPT_v);
   Opts.UseBuiltinIncludes = !Args.hasArg(OPT_nobuiltininc);
   Opts.UseStandardSystemIncludes = !Args.hasArg(OPT_nostdsysteminc);
   Opts.UseStandardCXXIncludes = !Args.hasArg(OPT_nostdincxx);
   if (const Arg *A = Args.getLastArg(OPT_stdlib_EQ))
     Opts.UseLibcxx = (strcmp(A->getValue(), "libc++") == 0);
-  Opts.ResourceDir = Args.getLastArgValue(OPT_resource_dir);
+  Opts.ResourceDir = std::string(Args.getLastArgValue(OPT_resource_dir));
 
   // Canonicalize -fmodules-cache-path before storing it.
   SmallString<128> P(Args.getLastArgValue(OPT_fmodules_cache_path));
@@ -2092,20 +2128,23 @@ static void ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args,
       llvm::sys::fs::make_absolute(WorkingDir, P);
   }
   llvm::sys::path::remove_dots(P);
-  Opts.ModuleCachePath = P.str();
+  Opts.ModuleCachePath = std::string(P.str());
 
-  Opts.ModuleUserBuildPath = Args.getLastArgValue(OPT_fmodules_user_build_path);
+  Opts.ModuleUserBuildPath =
+      std::string(Args.getLastArgValue(OPT_fmodules_user_build_path));
   // Only the -fmodule-file=<name>=<file> form.
   for (const auto *A : Args.filtered(OPT_fmodule_file)) {
     StringRef Val = A->getValue();
-    if (Val.find('=') != StringRef::npos)
-      Opts.PrebuiltModuleFiles.insert(Val.split('='));
+    if (Val.find('=') != StringRef::npos){
+      auto Split = Val.split('=');
+      Opts.PrebuiltModuleFiles.insert(
+          {std::string(Split.first), std::string(Split.second)});
+    }
   }
   for (const auto *A : Args.filtered(OPT_fprebuilt_module_path))
     Opts.AddPrebuiltModulePath(A->getValue());
   Opts.DisableModuleHash = Args.hasArg(OPT_fdisable_module_hash);
   Opts.ModulesHashContent = Args.hasArg(OPT_fmodules_hash_content);
-  Opts.ModulesStrictContextHash = Args.hasArg(OPT_fmodules_strict_context_hash);
   Opts.ModulesValidateDiagnosticOptions =
       !Args.hasArg(OPT_fmodules_disable_diagnostic_validation);
   Opts.ImplicitModuleMaps = Args.hasArg(OPT_fimplicit_module_maps);
@@ -2152,7 +2191,7 @@ static void ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args,
       SmallString<32> Buffer;
       llvm::sys::path::append(Buffer, Opts.Sysroot,
                               llvm::StringRef(A->getValue()).substr(1));
-      Path = Buffer.str();
+      Path = std::string(Buffer.str());
     }
 
     Opts.AddPath(Path, Group, IsFramework,
@@ -2252,7 +2291,7 @@ void CompilerInvocation::setLangDefaults(LangOptions &Opts, InputKind IK,
       if (T.isPS4())
         LangStd = LangStandard::lang_gnu99;
       else
-        LangStd = LangStandard::lang_gnu11;
+        LangStd = LangStandard::lang_gnu17;
 #endif
       break;
     case Language::ObjC:
@@ -2289,7 +2328,7 @@ void CompilerInvocation::setLangDefaults(LangOptions &Opts, InputKind IK,
   Opts.CPlusPlus11 = Std.isCPlusPlus11();
   Opts.CPlusPlus14 = Std.isCPlusPlus14();
   Opts.CPlusPlus17 = Std.isCPlusPlus17();
-  Opts.CPlusPlus2a = Std.isCPlusPlus2a();
+  Opts.CPlusPlus20 = Std.isCPlusPlus20();
   Opts.Digraphs = Std.hasDigraphs();
   Opts.GNUMode = Std.isGNUMode();
   Opts.GNUInline = !Opts.C99 && !Opts.CPlusPlus;
@@ -2315,7 +2354,7 @@ void CompilerInvocation::setLangDefaults(LangOptions &Opts, InputKind IK,
     Opts.AltiVec = 0;
     Opts.ZVector = 0;
     Opts.setLaxVectorConversions(LangOptions::LaxVectorConversionKind::None);
-    Opts.setDefaultFPContractMode(LangOptions::FPC_On);
+    Opts.setDefaultFPContractMode(LangOptions::FPM_On);
     Opts.NativeHalfType = 1;
     Opts.NativeHalfArgsAndReturns = 1;
     Opts.OpenCLCPlusPlus = Opts.CPlusPlus;
@@ -2335,7 +2374,7 @@ void CompilerInvocation::setLangDefaults(LangOptions &Opts, InputKind IK,
   Opts.CUDA = IK.getLanguage() == Language::CUDA || Opts.HIP;
   if (Opts.CUDA)
     // Set default FP_CONTRACT to FAST.
-    Opts.setDefaultFPContractMode(LangOptions::FPC_Fast);
+    Opts.setDefaultFPContractMode(LangOptions::FPM_Fast);
 
   Opts.RenderScript = IK.getLanguage() == Language::RenderScript;
   if (Opts.RenderScript) {
@@ -2524,6 +2563,24 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
       LangStd = OpenCLLangStd;
   }
 
+  Opts.SYCL = Args.hasArg(options::OPT_fsycl);
+  Opts.SYCLIsDevice = Opts.SYCL && Args.hasArg(options::OPT_fsycl_is_device);
+  if (Opts.SYCL) {
+    // -sycl-std applies to any SYCL source, not only those containing kernels,
+    // but also those using the SYCL API
+    if (const Arg *A = Args.getLastArg(OPT_sycl_std_EQ)) {
+      Opts.SYCLVersion = llvm::StringSwitch<unsigned>(A->getValue())
+                             .Cases("2017", "1.2.1", "121", "sycl-1.2.1", 2017)
+                             .Default(0U);
+
+      if (Opts.SYCLVersion == 0U) {
+        // User has passed an invalid value to the flag, this is an error
+        Diags.Report(diag::err_drv_invalid_value)
+            << A->getAsString(Args) << A->getValue();
+      }
+    }
+  }
+
   Opts.IncludeDefaultHeader = Args.hasArg(OPT_finclude_default_header);
   Opts.DeclareOpenCLBuiltins = Args.hasArg(OPT_fdeclare_opencl_builtins);
 
@@ -2710,7 +2767,7 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
     Opts.setSignedOverflowBehavior(LangOptions::SOB_Trapping);
     // Set the handler, if one is specified.
     Opts.OverflowHandler =
-        Args.getLastArgValue(OPT_ftrapv_handler);
+        std::string(Args.getLastArgValue(OPT_ftrapv_handler));
   }
   else if (Args.hasArg(OPT_fwrapv))
     Opts.setSignedOverflowBehavior(LangOptions::SOB_Defined);
@@ -2761,6 +2818,7 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
   if (Args.hasArg(OPT_fno_threadsafe_statics))
     Opts.ThreadsafeStatics = 0;
   Opts.Exceptions = Args.hasArg(OPT_fexceptions);
+  Opts.IgnoreExceptions = Args.hasArg(OPT_fignore_exceptions);
   Opts.ObjCExceptions = Args.hasArg(OPT_fobjc_exceptions);
   Opts.CXXExceptions = Args.hasArg(OPT_fcxx_exceptions);
 
@@ -2799,7 +2857,7 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
   Opts.Blocks = Args.hasArg(OPT_fblocks) || (Opts.OpenCL
     && Opts.OpenCLVersion == 200);
   Opts.BlocksRuntimeOptional = Args.hasArg(OPT_fblocks_runtime_optional);
-  Opts.Coroutines = Opts.CPlusPlus2a || Args.hasArg(OPT_fcoroutines_ts);
+  Opts.Coroutines = Opts.CPlusPlus20 || Args.hasArg(OPT_fcoroutines_ts);
 
   Opts.ConvergentFunctions = Opts.OpenCL || (Opts.CUDA && Opts.CUDAIsDevice) ||
     Args.hasArg(OPT_fconvergent_functions);
@@ -2809,7 +2867,7 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
                    OPT_fno_double_square_bracket_attributes,
                    Opts.DoubleSquareBracketAttributes);
 
-  Opts.CPlusPlusModules = Opts.CPlusPlus2a;
+  Opts.CPlusPlusModules = Opts.CPlusPlus20;
   Opts.ModulesTS = Args.hasArg(OPT_fmodules_ts);
   Opts.Modules =
       Args.hasArg(OPT_fmodules) || Opts.ModulesTS || Opts.CPlusPlusModules;
@@ -2830,7 +2888,7 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
   Opts.ImplicitModules = !Args.hasArg(OPT_fno_implicit_modules);
   Opts.CharIsSigned = Opts.OpenCL || !Args.hasArg(OPT_fno_signed_char);
   Opts.WChar = Opts.CPlusPlus && !Args.hasArg(OPT_fno_wchar);
-  Opts.Char8 = Args.hasFlag(OPT_fchar8__t, OPT_fno_char8__t, Opts.CPlusPlus2a);
+  Opts.Char8 = Args.hasFlag(OPT_fchar8__t, OPT_fno_char8__t, Opts.CPlusPlus20);
   if (const Arg *A = Args.getLastArg(OPT_fwchar_type_EQ)) {
     Opts.WCharSize = llvm::StringSwitch<unsigned>(A->getValue())
                          .Case("char", 1)
@@ -2867,6 +2925,11 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
       !Args.hasArg(OPT_fno_concept_satisfaction_caching);
   if (Args.hasArg(OPT_fconcepts_ts))
     Diags.Report(diag::warn_fe_concepts_ts_flag);
+  // Recovery AST still heavily relies on dependent-type machinery.
+  Opts.RecoveryAST =
+      Args.hasFlag(OPT_frecovery_ast, OPT_fno_recovery_ast, Opts.CPlusPlus);
+  Opts.RecoveryASTType =
+      Args.hasFlag(OPT_frecovery_ast_type, OPT_fno_recovery_ast_type, false);
   Opts.HeinousExtensions = Args.hasArg(OPT_fheinous_gnu_extensions);
   Opts.AccessControl = !Args.hasArg(OPT_fno_access_control);
   Opts.ElideConstructors = !Args.hasArg(OPT_fno_elide_constructors);
@@ -2887,7 +2950,7 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
       getLastArgIntValue(Args, OPT_Wlarge_by_value_copy_EQ, 0, Diags);
   Opts.MSBitfields = Args.hasArg(OPT_mms_bitfields);
   Opts.ObjCConstantStringClass =
-    Args.getLastArgValue(OPT_fconstant_string_class);
+      std::string(Args.getLastArgValue(OPT_fconstant_string_class));
   Opts.ObjCDefaultSynthProperties =
     !Args.hasArg(OPT_disable_objc_default_synthesize_properties);
   Opts.EncodeExtendedBlockSig =
@@ -2896,6 +2959,7 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
   Opts.PackStruct = getLastArgIntValue(Args, OPT_fpack_struct_EQ, 0, Diags);
   Opts.MaxTypeAlign = getLastArgIntValue(Args, OPT_fmax_type_align_EQ, 0, Diags);
   Opts.AlignDouble = Args.hasArg(OPT_malign_double);
+  Opts.DoubleSize = getLastArgIntValue(Args, OPT_mdouble_EQ, 0, Diags);
   Opts.LongDoubleSize = Args.hasArg(OPT_mlong_double_128)
                             ? 128
                             : Args.hasArg(OPT_mlong_double_64) ? 64 : 0;
@@ -2913,6 +2977,8 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
   Opts.NoBitFieldTypeAlign = Args.hasArg(OPT_fno_bitfield_type_align);
   Opts.SinglePrecisionConstants = Args.hasArg(OPT_cl_single_precision_constant);
   Opts.FastRelaxedMath = Args.hasArg(OPT_cl_fast_relaxed_math);
+  if (Opts.FastRelaxedMath)
+    Opts.setDefaultFPContractMode(LangOptions::FPM_Fast);
   Opts.HexagonQdsp6Compat = Args.hasArg(OPT_mqdsp6_compat);
   Opts.FakeAddressSpaceMap = Args.hasArg(OPT_ffake_address_space_map);
   Opts.ParseUnknownAnytype = Args.hasArg(OPT_funknown_anytype);
@@ -2920,7 +2986,7 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
   Opts.DebuggerCastResultToId = Args.hasArg(OPT_fdebugger_cast_result_to_id);
   Opts.DebuggerObjCLiteral = Args.hasArg(OPT_fdebugger_objc_literal);
   Opts.ApplePragmaPack = Args.hasArg(OPT_fapple_pragma_pack);
-  Opts.ModuleName = Args.getLastArgValue(OPT_fmodule_name_EQ);
+  Opts.ModuleName = std::string(Args.getLastArgValue(OPT_fmodule_name_EQ));
   Opts.CurrentModule = Opts.ModuleName;
   Opts.AppExt = Args.hasArg(OPT_fapplication_extension);
   Opts.ModuleFeatures = Args.getAllArgValues(OPT_fmodule_feature);
@@ -3015,6 +3081,11 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
       Opts.setDefaultCallingConv(DefaultCC);
   }
 
+  Opts.SemanticInterposition = Args.hasArg(OPT_fsemantic_interposition);
+  // An explicit -fno-semantic-interposition infers dso_local.
+  Opts.ExplicitNoSemanticInterposition =
+      Args.hasArg(OPT_fno_semantic_interposition);
+
   // -mrtd option
   if (Arg *A = Args.getLastArg(OPT_mrtd)) {
     if (Opts.getDefaultCallingConv() != LangOptions::DCC_None)
@@ -3030,8 +3101,8 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
     }
   }
 
-  // Check if -fopenmp is specified and set default version to 4.5.
-  Opts.OpenMP = Args.hasArg(options::OPT_fopenmp) ? 45 : 0;
+  // Check if -fopenmp is specified and set default version to 5.0.
+  Opts.OpenMP = Args.hasArg(options::OPT_fopenmp) ? 50 : 0;
   // Check if -fopenmp-simd is specified.
   bool IsSimdSpecified =
       Args.hasFlag(options::OPT_fopenmp_simd, options::OPT_fno_openmp_simd,
@@ -3049,10 +3120,8 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
   if (Opts.OpenMP || Opts.OpenMPSimd) {
     if (int Version = getLastArgIntValue(
             Args, OPT_fopenmp_version_EQ,
-            (IsSimdSpecified || IsTargetSpecified) ? 45 : Opts.OpenMP, Diags))
+            (IsSimdSpecified || IsTargetSpecified) ? 50 : Opts.OpenMP, Diags))
       Opts.OpenMP = Version;
-    else if (IsSimdSpecified || IsTargetSpecified)
-      Opts.OpenMP = 45;
     // Provide diagnostic when a given target is not expected to be an OpenMP
     // device or host.
     if (!Opts.OpenMPIsDevice) {
@@ -3071,7 +3140,8 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
 
   // Set the flag to prevent the implementation from emitting device exception
   // handling code for those requiring so.
-  if ((Opts.OpenMPIsDevice && T.isNVPTX()) || Opts.OpenCLCPlusPlus) {
+  if ((Opts.OpenMPIsDevice && (T.isNVPTX() || T.isAMDGCN())) ||
+      Opts.OpenCLCPlusPlus) {
     Opts.Exceptions = 0;
     Opts.CXXExceptions = 0;
   }
@@ -3105,6 +3175,7 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
             TT.getArch() == llvm::Triple::ppc64le ||
             TT.getArch() == llvm::Triple::nvptx ||
             TT.getArch() == llvm::Triple::nvptx64 ||
+            TT.getArch() == llvm::Triple::amdgcn ||
             TT.getArch() == llvm::Triple::x86 ||
             TT.getArch() == llvm::Triple::x86_64))
         Diags.Report(diag::err_drv_invalid_omp_target) << A->getValue(i);
@@ -3122,15 +3193,19 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
           << Opts.OMPHostIRFile;
   }
 
-  Opts.SYCLIsDevice = Args.hasArg(options::OPT_fsycl_is_device);
-
-  // Set CUDA mode for OpenMP target NVPTX if specified in options
-  Opts.OpenMPCUDAMode = Opts.OpenMPIsDevice && T.isNVPTX() &&
+  // Set CUDA mode for OpenMP target NVPTX/AMDGCN if specified in options
+  Opts.OpenMPCUDAMode = Opts.OpenMPIsDevice && (T.isNVPTX() || T.isAMDGCN()) &&
                         Args.hasArg(options::OPT_fopenmp_cuda_mode);
 
-  // Set CUDA mode for OpenMP target NVPTX if specified in options
+  // Set CUDA support for parallel execution of target regions for OpenMP target
+  // NVPTX/AMDGCN if specified in options.
+  Opts.OpenMPCUDATargetParallel =
+      Opts.OpenMPIsDevice && (T.isNVPTX() || T.isAMDGCN()) &&
+      Args.hasArg(options::OPT_fopenmp_cuda_parallel_target_regions);
+
+  // Set CUDA mode for OpenMP target NVPTX/AMDGCN if specified in options
   Opts.OpenMPCUDAForceFullRuntime =
-      Opts.OpenMPIsDevice && T.isNVPTX() &&
+      Opts.OpenMPIsDevice && (T.isNVPTX() || T.isAMDGCN()) &&
       Args.hasArg(options::OPT_fopenmp_cuda_force_full_runtime);
 
   // Record whether the __DEPRECATED define was requested.
@@ -3154,23 +3229,55 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
     if (InlineArg->getOption().matches(options::OPT_fno_inline))
       Opts.NoInlineDefine = true;
 
-  Opts.FastMath = Args.hasArg(OPT_ffast_math) ||
-      Args.hasArg(OPT_cl_fast_relaxed_math);
+  Opts.FastMath =
+      Args.hasArg(OPT_ffast_math) || Args.hasArg(OPT_cl_fast_relaxed_math);
   Opts.FiniteMathOnly = Args.hasArg(OPT_ffinite_math_only) ||
-      Args.hasArg(OPT_cl_finite_math_only) ||
-      Args.hasArg(OPT_cl_fast_relaxed_math);
+                        Args.hasArg(OPT_ffast_math) ||
+                        Args.hasArg(OPT_cl_finite_math_only) ||
+                        Args.hasArg(OPT_cl_fast_relaxed_math);
   Opts.UnsafeFPMath = Args.hasArg(OPT_menable_unsafe_fp_math) ||
+                      Args.hasArg(OPT_ffast_math) ||
+                      Args.hasArg(OPT_cl_unsafe_math_optimizations) ||
+                      Args.hasArg(OPT_cl_fast_relaxed_math);
+  Opts.AllowFPReassoc = Args.hasArg(OPT_mreassociate) ||
+                        Args.hasArg(OPT_menable_unsafe_fp_math) ||
+                        Args.hasArg(OPT_ffast_math) ||
+                        Args.hasArg(OPT_cl_unsafe_math_optimizations) ||
+                        Args.hasArg(OPT_cl_fast_relaxed_math);
+  Opts.NoHonorNaNs =
+      Args.hasArg(OPT_menable_no_nans) || Args.hasArg(OPT_ffinite_math_only) ||
+      Args.hasArg(OPT_ffast_math) || Args.hasArg(OPT_cl_finite_math_only) ||
+      Args.hasArg(OPT_cl_fast_relaxed_math);
+  Opts.NoHonorInfs = Args.hasArg(OPT_menable_no_infinities) ||
+                     Args.hasArg(OPT_ffinite_math_only) ||
+                     Args.hasArg(OPT_ffast_math) ||
+                     Args.hasArg(OPT_cl_finite_math_only) ||
+                     Args.hasArg(OPT_cl_fast_relaxed_math);
+  Opts.NoSignedZero = Args.hasArg(OPT_fno_signed_zeros) ||
+                      Args.hasArg(OPT_menable_unsafe_fp_math) ||
+                      Args.hasArg(OPT_ffast_math) ||
+                      Args.hasArg(OPT_cl_no_signed_zeros) ||
                       Args.hasArg(OPT_cl_unsafe_math_optimizations) ||
                       Args.hasArg(OPT_cl_fast_relaxed_math);
+  Opts.AllowRecip = Args.hasArg(OPT_freciprocal_math) ||
+                    Args.hasArg(OPT_menable_unsafe_fp_math) ||
+                    Args.hasArg(OPT_ffast_math) ||
+                    Args.hasArg(OPT_cl_unsafe_math_optimizations) ||
+                    Args.hasArg(OPT_cl_fast_relaxed_math);
+  // Currently there's no clang option to enable this individually
+  Opts.ApproxFunc = Args.hasArg(OPT_menable_unsafe_fp_math) ||
+                    Args.hasArg(OPT_ffast_math) ||
+                    Args.hasArg(OPT_cl_unsafe_math_optimizations) ||
+                    Args.hasArg(OPT_cl_fast_relaxed_math);
 
   if (Arg *A = Args.getLastArg(OPT_ffp_contract)) {
     StringRef Val = A->getValue();
     if (Val == "fast")
-      Opts.setDefaultFPContractMode(LangOptions::FPC_Fast);
+      Opts.setDefaultFPContractMode(LangOptions::FPM_Fast);
     else if (Val == "on")
-      Opts.setDefaultFPContractMode(LangOptions::FPC_On);
+      Opts.setDefaultFPContractMode(LangOptions::FPM_On);
     else if (Val == "off")
-      Opts.setDefaultFPContractMode(LangOptions::FPC_Off);
+      Opts.setDefaultFPContractMode(LangOptions::FPM_Off);
     else
       Diags.Report(diag::err_drv_invalid_value) << A->getAsString(Args) << Val;
   }
@@ -3178,9 +3285,9 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
   if (Args.hasArg(OPT_fexperimental_strict_floating_point))
     Opts.ExpStrictFP = true;
 
-  LangOptions::FPRoundingModeKind FPRM = LangOptions::FPR_ToNearest;
+  auto FPRM = llvm::RoundingMode::NearestTiesToEven;
   if (Args.hasArg(OPT_frounding_math)) {
-    FPRM = LangOptions::FPR_Dynamic;
+    FPRM = llvm::RoundingMode::Dynamic;
   }
   Opts.setFPRoundingMode(FPRM);
 
@@ -3234,6 +3341,11 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
       Diags.Report(diag::err_drv_invalid_value) << A->getAsString(Args) << Val;
   }
 
+  if (Arg *A = Args.getLastArg(OPT_ftrivial_auto_var_init_stop_after)) {
+    int Val = std::stoi(A->getValue());
+    Opts.TrivialAutoVarInitStopAfter = Val;
+  }
+
   // Parse -fsanitize= arguments.
   parseSanitizerKinds("-fsanitize=", Args.getAllArgValues(OPT_fsanitize_EQ),
                       Diags, Opts.Sanitize);
@@ -3248,18 +3360,11 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
                                       systemBlacklists.end());
 
   // -fxray-instrument
-  Opts.XRayInstrument =
-      Args.hasFlag(OPT_fxray_instrument, OPT_fnoxray_instrument, false);
-
-  // -fxray-always-emit-customevents
+  Opts.XRayInstrument = Args.hasArg(OPT_fxray_instrument);
   Opts.XRayAlwaysEmitCustomEvents =
-      Args.hasFlag(OPT_fxray_always_emit_customevents,
-                   OPT_fnoxray_always_emit_customevents, false);
-
-  // -fxray-always-emit-typedevents
+      Args.hasArg(OPT_fxray_always_emit_customevents);
   Opts.XRayAlwaysEmitTypedEvents =
-      Args.hasFlag(OPT_fxray_always_emit_typedevents,
-                   OPT_fnoxray_always_emit_customevents, false);
+      Args.hasArg(OPT_fxray_always_emit_typedevents);
 
   // -fxray-{always,never}-instrument= filenames.
   Opts.XRayAlwaysInstrumentFiles =
@@ -3311,6 +3416,54 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
 
   Opts.CompleteMemberPointers = Args.hasArg(OPT_fcomplete_member_pointers);
   Opts.BuildingPCHWithObjectFile = Args.hasArg(OPT_building_pch_with_obj);
+  Opts.PCHInstantiateTemplates = Args.hasArg(OPT_fpch_instantiate_templates);
+
+  Opts.MatrixTypes = Args.hasArg(OPT_fenable_matrix);
+
+  Opts.MaxTokens = getLastArgIntValue(Args, OPT_fmax_tokens_EQ, 0, Diags);
+
+  if (Arg *A = Args.getLastArg(OPT_msign_return_address_EQ)) {
+    StringRef SignScope = A->getValue();
+
+    if (SignScope.equals_lower("none"))
+      Opts.setSignReturnAddressScope(
+          LangOptions::SignReturnAddressScopeKind::None);
+    else if (SignScope.equals_lower("all"))
+      Opts.setSignReturnAddressScope(
+          LangOptions::SignReturnAddressScopeKind::All);
+    else if (SignScope.equals_lower("non-leaf"))
+      Opts.setSignReturnAddressScope(
+          LangOptions::SignReturnAddressScopeKind::NonLeaf);
+    else
+      Diags.Report(diag::err_drv_invalid_value)
+          << A->getAsString(Args) << SignScope;
+
+    if (Arg *A = Args.getLastArg(OPT_msign_return_address_key_EQ)) {
+      StringRef SignKey = A->getValue();
+      if (!SignScope.empty() && !SignKey.empty()) {
+        if (SignKey.equals_lower("a_key"))
+          Opts.setSignReturnAddressKey(
+              LangOptions::SignReturnAddressKeyKind::AKey);
+        else if (SignKey.equals_lower("b_key"))
+          Opts.setSignReturnAddressKey(
+              LangOptions::SignReturnAddressKeyKind::BKey);
+        else
+          Diags.Report(diag::err_drv_invalid_value)
+              << A->getAsString(Args) << SignKey;
+      }
+    }
+  }
+
+  Opts.BranchTargetEnforcement = Args.hasArg(OPT_mbranch_target_enforce);
+  Opts.SpeculativeLoadHardening = Args.hasArg(OPT_mspeculative_load_hardening);
+
+  Opts.CompatibilityQualifiedIdBlockParamTypeChecking =
+      Args.hasArg(OPT_fcompatibility_qualified_id_block_param_type_checking);
+
+  Opts.RelativeCXXABIVTables =
+      Args.hasFlag(OPT_fexperimental_relative_cxx_abi_vtables,
+                   OPT_fno_experimental_relative_cxx_abi_vtables,
+                   /*default=*/false);
 }
 
 static bool isStrictlyPreprocessorAction(frontend::ActionKind Action) {
@@ -3331,7 +3484,7 @@ static bool isStrictlyPreprocessorAction(frontend::ActionKind Action) {
   case frontend::GenerateModuleInterface:
   case frontend::GenerateHeaderModule:
   case frontend::GeneratePCH:
-  case frontend::GenerateInterfaceIfsExpV1:
+  case frontend::GenerateInterfaceStubs:
   case frontend::ParseSyntaxOnly:
   case frontend::ModuleFileInfo:
   case frontend::VerifyPCH:
@@ -3360,11 +3513,12 @@ static bool isStrictlyPreprocessorAction(frontend::ActionKind Action) {
 static void ParsePreprocessorArgs(PreprocessorOptions &Opts, ArgList &Args,
                                   DiagnosticsEngine &Diags,
                                   frontend::ActionKind Action) {
-  Opts.ImplicitPCHInclude = Args.getLastArgValue(OPT_include_pch);
+  Opts.ImplicitPCHInclude = std::string(Args.getLastArgValue(OPT_include_pch));
   Opts.PCHWithHdrStop = Args.hasArg(OPT_pch_through_hdrstop_create) ||
                         Args.hasArg(OPT_pch_through_hdrstop_use);
   Opts.PCHWithHdrStopCreate = Args.hasArg(OPT_pch_through_hdrstop_create);
-  Opts.PCHThroughHeader = Args.getLastArgValue(OPT_pch_through_header_EQ);
+  Opts.PCHThroughHeader =
+      std::string(Args.getLastArgValue(OPT_pch_through_header_EQ));
   Opts.UsePredefines = !Args.hasArg(OPT_undef);
   Opts.DetailedRecord = Args.hasArg(OPT_detailed_preprocessing_record);
   Opts.DisablePCHValidation = Args.hasArg(OPT_fno_validate_pch);
@@ -3374,8 +3528,11 @@ static void ParsePreprocessorArgs(PreprocessorOptions &Opts, ArgList &Args,
   for (const auto *A : Args.filtered(OPT_error_on_deserialized_pch_decl))
     Opts.DeserializedPCHDeclsToErrorOn.insert(A->getValue());
 
-  for (const auto &A : Args.getAllArgValues(OPT_fmacro_prefix_map_EQ))
-    Opts.MacroPrefixMap.insert(StringRef(A).split('='));
+  for (const auto &A : Args.getAllArgValues(OPT_fmacro_prefix_map_EQ)) {
+    auto Split = StringRef(A).split('=');
+    Opts.MacroPrefixMap.insert(
+        {std::string(Split.first), std::string(Split.second)});
+  }
 
   if (const Arg *A = Args.getLastArg(OPT_preamble_bytes_EQ)) {
     StringRef Value(A->getValue());
@@ -3475,8 +3632,8 @@ static void ParsePreprocessorOutputArgs(PreprocessorOutputOptions &Opts,
 
 static void ParseTargetArgs(TargetOptions &Opts, ArgList &Args,
                             DiagnosticsEngine &Diags) {
-  Opts.CodeModel = getCodeModel(Args, Diags);
-  Opts.ABI = Args.getLastArgValue(OPT_target_abi);
+  Opts.CodeModel = std::string(Args.getLastArgValue(OPT_mcmodel_EQ, "default"));
+  Opts.ABI = std::string(Args.getLastArgValue(OPT_target_abi));
   if (Arg *A = Args.getLastArg(OPT_meabi)) {
     StringRef Value = A->getValue();
     llvm::EABI EABIVersion = llvm::StringSwitch<llvm::EABI>(Value)
@@ -3491,15 +3648,11 @@ static void ParseTargetArgs(TargetOptions &Opts, ArgList &Args,
     else
       Opts.EABIVersion = EABIVersion;
   }
-  Opts.CPU = Args.getLastArgValue(OPT_target_cpu);
-  Opts.FPMath = Args.getLastArgValue(OPT_mfpmath);
+  Opts.CPU = std::string(Args.getLastArgValue(OPT_target_cpu));
+  Opts.FPMath = std::string(Args.getLastArgValue(OPT_mfpmath));
   Opts.FeaturesAsWritten = Args.getAllArgValues(OPT_target_feature);
-  Opts.LinkerVersion = Args.getLastArgValue(OPT_target_linker_version);
-  Opts.Triple = Args.getLastArgValue(OPT_triple);
-  // Use the default target triple if unspecified.
-  if (Opts.Triple.empty())
-    Opts.Triple = llvm::sys::getDefaultTargetTriple();
-  Opts.Triple = llvm::Triple::normalize(Opts.Triple);
+  Opts.LinkerVersion =
+      std::string(Args.getLastArgValue(OPT_target_linker_version));
   Opts.OpenCLExtensionsAsWritten = Args.getAllArgValues(OPT_cl_ext_EQ);
   Opts.ForceEnableInt128 = Args.hasArg(OPT_fforce_enable_int128);
   Opts.NVPTXUseShortPointers = Args.hasFlag(
@@ -3514,9 +3667,35 @@ static void ParseTargetArgs(TargetOptions &Opts, ArgList &Args,
   }
 }
 
+bool CompilerInvocation::parseSimpleArgs(const ArgList &Args,
+                                         DiagnosticsEngine &Diags) {
+#define OPTION_WITH_MARSHALLING_FLAG(PREFIX_TYPE, NAME, ID, KIND, GROUP,       \
+                                     ALIAS, ALIASARGS, FLAGS, PARAM, HELPTEXT, \
+                                     METAVAR, VALUES, SPELLING, ALWAYS_EMIT,   \
+                                     KEYPATH, DEFAULT_VALUE, IS_POSITIVE)      \
+  this->KEYPATH = Args.hasArg(OPT_##ID) && IS_POSITIVE;
+
+#define OPTION_WITH_MARSHALLING_STRING(                                        \
+    PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM,        \
+    HELPTEXT, METAVAR, VALUES, SPELLING, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE,  \
+    TYPE, NORMALIZER, DENORMALIZER, TABLE_INDEX)                               \
+  {                                                                            \
+    if (auto MaybeValue = NORMALIZER(OPT_##ID, TABLE_INDEX, Args, Diags))      \
+      this->KEYPATH = static_cast<TYPE>(*MaybeValue);                          \
+    else                                                                       \
+      this->KEYPATH = DEFAULT_VALUE;                                           \
+  }
+
+#include "clang/Driver/Options.inc"
+#undef OPTION_WITH_MARSHALLING_STRING
+#undef OPTION_WITH_MARSHALLING_FLAG
+  return true;
+}
+
 bool CompilerInvocation::CreateFromArgs(CompilerInvocation &Res,
                                         ArrayRef<const char *> CommandLineArgs,
-                                        DiagnosticsEngine &Diags) {
+                                        DiagnosticsEngine &Diags,
+                                        const char *Argv0) {
   bool Success = true;
 
   // Parse the arguments.
@@ -3546,6 +3725,11 @@ bool CompilerInvocation::CreateFromArgs(CompilerInvocation &Res,
     Success = false;
   }
 
+  Success &= Res.parseSimpleArgs(Args, Diags);
+
+  llvm::sys::Process::UseANSIEscapeCodes(
+      Res.DiagnosticOpts->UseANSIEscapeCodes);
+
   Success &= ParseAnalyzerArgs(*Res.getAnalyzerOpts(), Args, Diags);
   Success &= ParseMigratorArgs(Res.getMigratorOpts(), Args);
   ParseDependencyOutputArgs(Res.getDependencyOutputOpts(), Args);
@@ -3554,9 +3738,8 @@ bool CompilerInvocation::CreateFromArgs(CompilerInvocation &Res,
     Diags.Report(diag::err_fe_dependency_file_requires_MT);
     Success = false;
   }
-  Success &=
-      ParseDiagnosticArgs(Res.getDiagnosticOpts(), Args, &Diags,
-                          false /*DefaultDiagColor*/, false /*DefaultShowOpt*/);
+  Success &= ParseDiagnosticArgs(Res.getDiagnosticOpts(), Args, &Diags,
+                                 /*DefaultDiagColor=*/false);
   ParseCommentArgs(LangOpts.CommentOpts, Args);
   ParseFileSystemArgs(Res.getFileSystemOpts(), Args);
   // FIXME: We shouldn't have to pass the DashX option around here
@@ -3637,6 +3820,11 @@ bool CompilerInvocation::CreateFromArgs(CompilerInvocation &Res,
     Res.getCodeGenOpts().FineGrainedBitfieldAccesses = false;
     Diags.Report(diag::warn_drv_fine_grained_bitfield_accesses_ignored);
   }
+
+  // Store the command-line for using in the CodeView backend.
+  Res.getCodeGenOpts().Argv0 = Argv0;
+  Res.getCodeGenOpts().CommandLineArgs = CommandLineArgs;
+
   return Success;
 }
 
@@ -3653,6 +3841,11 @@ std::string CompilerInvocation::getModuleHash() const {
   // CityHash, but this will do for now.
   hash_code code = hash_value(getClangFullRepositoryVersion());
 
+  // Also include the serialization version, in case LLVM_APPEND_VC_REV is off
+  // and getClangFullRepositoryVersion() doesn't include git revision.
+  code = hash_combine(code, serialization::VERSION_MAJOR,
+                      serialization::VERSION_MINOR);
+
   // Extend the signature with the language options
 #define LANGOPT(Name, Bits, Default, Description) \
    code = hash_combine(code, LangOpts->Name);
@@ -3665,6 +3858,10 @@ std::string CompilerInvocation::getModuleHash() const {
   for (StringRef Feature : LangOpts->ModuleFeatures)
     code = hash_combine(code, Feature);
 
+  code = hash_combine(code, LangOpts->ObjCRuntime);
+  const auto &BCN = LangOpts->CommentOpts.BlockCommandNames;
+  code = hash_combine(code, hash_combine_range(BCN.begin(), BCN.end()));
+
   // Extend the signature with the target options.
   code = hash_combine(code, TargetOpts->Triple, TargetOpts->CPU,
                       TargetOpts->ABI);
@@ -3744,6 +3941,33 @@ std::string CompilerInvocation::getModuleHash() const {
   return llvm::APInt(64, code).toString(36, /*Signed=*/false);
 }
 
+void CompilerInvocation::generateCC1CommandLine(
+    SmallVectorImpl<const char *> &Args, StringAllocator SA) const {
+#define OPTION_WITH_MARSHALLING_FLAG(PREFIX_TYPE, NAME, ID, KIND, GROUP,       \
+                                     ALIAS, ALIASARGS, FLAGS, PARAM, HELPTEXT, \
+                                     METAVAR, VALUES, SPELLING, ALWAYS_EMIT,   \
+                                     KEYPATH, DEFAULT_VALUE, IS_POSITIVE)      \
+  if ((FLAGS) & options::CC1Option &&                                            \
+      (ALWAYS_EMIT || this->KEYPATH != DEFAULT_VALUE))                         \
+    Args.push_back(SPELLING);
+
+#define OPTION_WITH_MARSHALLING_STRING(                                        \
+    PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM,        \
+    HELPTEXT, METAVAR, VALUES, SPELLING, ALWAYS_EMIT, KEYPATH, DEFAULT_VALUE,  \
+    NORMALIZER_RET_TY, NORMALIZER, DENORMALIZER, TABLE_INDEX)                  \
+  if (((FLAGS) & options::CC1Option) &&                                          \
+      (ALWAYS_EMIT || this->KEYPATH != DEFAULT_VALUE)) {                       \
+    if (Option::KIND##Class == Option::SeparateClass) {                        \
+      Args.push_back(SPELLING);                                                \
+      Args.push_back(DENORMALIZER(SA, TABLE_INDEX, this->KEYPATH));            \
+    }                                                                          \
+  }
+
+#include "clang/Driver/Options.inc"
+#undef OPTION_WITH_MARSHALLING_STRING
+#undef OPTION_WITH_MARSHALLING_FLAG
+}
+
 namespace clang {
 
 IntrusiveRefCntPtr<llvm::vfs::FileSystem>
diff --git a/gnu/llvm/clang/lib/Headers/openmp_wrappers/__clang_openmp_math.h b/gnu/llvm/clang/lib/Headers/openmp_wrappers/__clang_openmp_math.h
deleted file mode 100644 (file)
index 5d7ce9a..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*===---- __clang_openmp_math.h - OpenMP target math support ---------------===
- *
- * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
- * See https://llvm.org/LICENSE.txt for license information.
- * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- *
- *===-----------------------------------------------------------------------===
- */
-
-#if defined(__NVPTX__) && defined(_OPENMP)
-/// TODO:
-/// We are currently reusing the functionality of the Clang-CUDA code path
-/// as an alternative to the host declarations provided by math.h and cmath.
-/// This is suboptimal.
-///
-/// We should instead declare the device functions in a similar way, e.g.,
-/// through OpenMP 5.0 variants, and afterwards populate the module with the
-/// host declarations by unconditionally including the host math.h or cmath,
-/// respectively. This is actually what the Clang-CUDA code path does, using
-/// __device__ instead of variants to avoid redeclarations and get the desired
-/// overload resolution.
-
-#define __CUDA__
-
-#if defined(__cplusplus)
-  #include <__clang_cuda_cmath.h>
-#endif
-
-#undef __CUDA__
-
-/// Magic macro for stopping the math.h/cmath host header from being included.
-#define __CLANG_NO_HOST_MATH__
-
-#endif
-
diff --git a/gnu/llvm/clang/lib/Headers/openmp_wrappers/__clang_openmp_math_declares.h b/gnu/llvm/clang/lib/Headers/openmp_wrappers/__clang_openmp_math_declares.h
deleted file mode 100644 (file)
index a422c98..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*===---- __clang_openmp_math_declares.h - OpenMP math declares ------------===
- *
- * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
- * See https://llvm.org/LICENSE.txt for license information.
- * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- *
- *===-----------------------------------------------------------------------===
- */
-
-#ifndef __CLANG_OPENMP_MATH_DECLARES_H__
-#define __CLANG_OPENMP_MATH_DECLARES_H__
-
-#ifndef _OPENMP
-#error "This file is for OpenMP compilation only."
-#endif
-
-#if defined(__NVPTX__) && defined(_OPENMP)
-
-#define __CUDA__
-
-#if defined(__cplusplus)
-  #include <__clang_cuda_math_forward_declares.h>
-#endif
-
-/// Include declarations for libdevice functions.
-#include <__clang_cuda_libdevice_declares.h>
-/// Provide definitions for these functions.
-#include <__clang_cuda_device_functions.h>
-
-#undef __CUDA__
-
-#endif
-#endif
index 1bf04d9..82a7e6b 100644 (file)
@@ -7095,7 +7095,7 @@ checkFormatStringExpr(Sema &S, const Expr *E, ArrayRef<const Expr *> Args,
 Sema::FormatStringType Sema::GetFormatStringType(const FormatAttr *Format) {
   return llvm::StringSwitch<FormatStringType>(Format->getType()->getName())
       .Case("scanf", FST_Scanf)
-      .Cases("printf", "printf0", FST_Printf)
+      .Cases("printf", "printf0", "syslog", FST_Printf)
       .Cases("NSString", "CFString", FST_NSString)
       .Case("strftime", FST_Strftime)
       .Case("strfmon", FST_Strfmon)
@@ -7192,6 +7192,7 @@ bool Sema::CheckFormatArguments(ArrayRef<const Expr *> Args,
     case FST_Kprintf:
     case FST_FreeBSDKPrintf:
     case FST_Printf:
+    case FST_Syslog:
       Diag(FormatLoc, diag::note_format_security_fixit)
         << FixItHint::CreateInsertion(FormatLoc, "\"%s\", ");
       break;
@@ -8017,18 +8018,33 @@ CheckPrintfHandler::HandlePrintfSpecifier(const analyze_printf::PrintfSpecifier
     // Claim the second argument.
     CoveredArgs.set(argIndex + 1);
 
-    // Type check the first argument (int for %b, pointer for %D)
     const Expr *Ex = getDataArg(argIndex);
-    const analyze_printf::ArgType &AT =
-      (CS.getKind() == ConversionSpecifier::FreeBSDbArg) ?
-        ArgType(S.Context.IntTy) : ArgType::CPointerTy;
-    if (AT.isValid() && !AT.matchesType(S.Context, Ex->getType()))
-      EmitFormatDiagnostic(
+    if (CS.getKind() == ConversionSpecifier::FreeBSDDArg) {
+      // Type check the first argument (pointer for %D)
+      const analyze_printf::ArgType &AT = ArgType::CPointerTy;
+      if (AT.isValid() && !AT.matchesType(S.Context, Ex->getType()))
+        EmitFormatDiagnostic(
           S.PDiag(diag::warn_format_conversion_argument_type_mismatch)
-              << AT.getRepresentativeTypeName(S.Context) << Ex->getType()
-              << false << Ex->getSourceRange(),
-          Ex->getBeginLoc(), /*IsStringLocation*/ false,
+          << AT.getRepresentativeTypeName(S.Context) << Ex->getType()
+          << false << Ex->getSourceRange(),
+          Ex->getBeginLoc(), /*IsStringLocation*/false,
           getSpecifierRange(startSpecifier, specifierLen));
+    } else {
+      // Check the length modifier for %b
+      if (!FS.hasValidLengthModifier(S.getASTContext().getTargetInfo(),
+                                     S.getLangOpts()))
+        HandleInvalidLengthModifier(FS, CS, startSpecifier, specifierLen,
+                                    diag::warn_format_nonsensical_length);
+      else if (!FS.hasStandardLengthModifier())
+        HandleNonStandardLengthModifier(FS, startSpecifier, specifierLen);
+      else if (!FS.hasStandardLengthConversionCombination())
+        HandleInvalidLengthModifier(FS, CS, startSpecifier, specifierLen,
+                                    diag::warn_format_non_standard_conversion_spec);
+
+      // Type check the first argument of %b
+      if (!checkFormatExpr(FS, startSpecifier, specifierLen, Ex))
+        return false;
+    }
 
     // Type check the second argument (char * for both %b and %D)
     Ex = getDataArg(argIndex + 1);
@@ -8810,8 +8826,9 @@ static void CheckFormatString(Sema &S, const FormatStringLiteral *FExpr,
   }
 
   if (Type == Sema::FST_Printf || Type == Sema::FST_NSString ||
-      Type == Sema::FST_FreeBSDKPrintf || Type == Sema::FST_OSLog ||
-      Type == Sema::FST_OSTrace) {
+      Type == Sema::FST_Kprintf || Type == Sema::FST_FreeBSDKPrintf ||
+      Type == Sema::FST_OSLog || Type == Sema::FST_OSTrace ||
+      Type == Sema::FST_Syslog) {
     CheckPrintfHandler H(
         S, FExpr, OrigFormatExpr, Type, firstDataArg, numDataArgs,
         (Type == Sema::FST_NSString || Type == Sema::FST_OSTrace), Str,
@@ -8821,7 +8838,7 @@ static void CheckFormatString(Sema &S, const FormatStringLiteral *FExpr,
     if (!analyze_format_string::ParsePrintfString(H, Str, Str + StrLen,
                                                   S.getLangOpts(),
                                                   S.Context.getTargetInfo(),
-                                            Type == Sema::FST_FreeBSDKPrintf))
+                Type == Sema::FST_Kprintf || Type == Sema::FST_FreeBSDKPrintf))
       H.DoneProcessing();
   } else if (Type == Sema::FST_Scanf) {
     CheckScanfHandler H(S, FExpr, OrigFormatExpr, Type, firstDataArg,
index a9a2a19..81ff9ae 100644 (file)
@@ -3267,6 +3267,7 @@ static FormatAttrKind getFormatAttrKind(StringRef Format) {
       .Case("freebsd_kprintf", SupportedFormat) // FreeBSD.
       .Case("os_trace", SupportedFormat)
       .Case("os_log", SupportedFormat)
+      .Case("syslog", SupportedFormat)
 
       .Cases("gcc_diag", "gcc_cdiag", "gcc_cxxdiag", "gcc_tdiag", IgnoredFormat)
       .Default(InvalidFormat);
diff --git a/gnu/llvm/clang/lib/StaticAnalyzer/Core/SubEngine.cpp b/gnu/llvm/clang/lib/StaticAnalyzer/Core/SubEngine.cpp
deleted file mode 100644 (file)
index d7ddd9c..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-//== SubEngine.cpp - Interface of the subengine of CoreEngine ------*- C++ -*-//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h"
-
-using namespace clang::ento;
-
-void SubEngine::anchor() { }
diff --git a/gnu/llvm/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp b/gnu/llvm/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
deleted file mode 100644 (file)
index f4f06e3..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-//===--- CheckerRegistration.cpp - Registration for the Analyzer Checkers -===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// Defines the registration function for the analyzer checkers.
-//
-//===----------------------------------------------------------------------===//
-
-#include "clang/StaticAnalyzer/Frontend/CheckerRegistration.h"
-#include "clang/Basic/Diagnostic.h"
-#include "clang/Frontend/FrontendDiagnostic.h"
-#include "clang/StaticAnalyzer/Core/AnalyzerOptions.h"
-#include "clang/StaticAnalyzer/Core/CheckerManager.h"
-#include "clang/StaticAnalyzer/Frontend/CheckerRegistry.h"
-#include "clang/StaticAnalyzer/Frontend/FrontendActions.h"
-#include "llvm/ADT/SmallVector.h"
-#include "llvm/Support/raw_ostream.h"
-#include <memory>
-
-using namespace clang;
-using namespace ento;
-
-std::unique_ptr<CheckerManager> ento::createCheckerManager(
-    ASTContext &context,
-    AnalyzerOptions &opts,
-    ArrayRef<std::string> plugins,
-    ArrayRef<std::function<void(CheckerRegistry &)>> checkerRegistrationFns,
-    DiagnosticsEngine &diags) {
-  auto checkerMgr = std::make_unique<CheckerManager>(context, opts);
-
-  CheckerRegistry allCheckers(plugins, diags, opts, context.getLangOpts(),
-                              checkerRegistrationFns);
-
-  allCheckers.initializeManager(*checkerMgr);
-  allCheckers.validateCheckerOptions();
-  checkerMgr->finishedCheckerRegistration();
-
-  return checkerMgr;
-}
-
-void ento::printCheckerHelp(raw_ostream &out, ArrayRef<std::string> plugins,
-                            AnalyzerOptions &anopts,
-                            DiagnosticsEngine &diags,
-                            const LangOptions &langOpts) {
-  out << "OVERVIEW: Clang Static Analyzer Checkers List\n\n";
-  out << "USAGE: -analyzer-checker <CHECKER or PACKAGE,...>\n\n";
-
-  CheckerRegistry(plugins, diags, anopts, langOpts)
-      .printCheckerWithDescList(out);
-}
-
-void ento::printEnabledCheckerList(raw_ostream &out,
-                                   ArrayRef<std::string> plugins,
-                                   AnalyzerOptions &anopts,
-                                   DiagnosticsEngine &diags,
-                                   const LangOptions &langOpts) {
-  out << "OVERVIEW: Clang Static Analyzer Enabled Checkers List\n\n";
-
-  CheckerRegistry(plugins, diags, anopts, langOpts)
-      .printEnabledCheckerList(out);
-}
-
-void ento::printCheckerConfigList(raw_ostream &OS,
-                                  ArrayRef<std::string> plugins,
-                                  AnalyzerOptions &opts,
-                                  DiagnosticsEngine &diags,
-                                  const LangOptions &LangOpts) {
-  CheckerRegistry(plugins, diags, opts, LangOpts)
-      .printCheckerOptionList(OS);
-}
-
-void ento::printAnalyzerConfigList(raw_ostream &out) {
-  // FIXME: This message sounds scary, should be scary, but incorrectly states
-  // that all configs are super dangerous. In reality, many of them should be
-  // accessible to the user. We should create a user-facing subset of config
-  // options under a different frontend flag.
-  out << R"(
-OVERVIEW: Clang Static Analyzer -analyzer-config Option List
-
-The following list of configurations are meant for development purposes only, as
-some of the variables they define are set to result in the most optimal
-analysis. Setting them to other values may drastically change how the analyzer
-behaves, and may even result in instabilities, crashes!
-
-USAGE: -analyzer-config <OPTION1=VALUE,OPTION2=VALUE,...>
-       -analyzer-config OPTION1=VALUE, -analyzer-config OPTION2=VALUE, ...
-OPTIONS:
-)";
-
-  using OptionAndDescriptionTy = std::pair<StringRef, std::string>;
-  OptionAndDescriptionTy PrintableOptions[] = {
-#define ANALYZER_OPTION(TYPE, NAME, CMDFLAG, DESC, DEFAULT_VAL)                \
-    {                                                                          \
-      CMDFLAG,                                                                 \
-      llvm::Twine(llvm::Twine() + "(" +                                        \
-                  (StringRef(#TYPE) == "StringRef" ? "string" : #TYPE ) +      \
-                  ") " DESC                                                    \
-                  " (default: " #DEFAULT_VAL ")").str()                        \
-    },
-
-#define ANALYZER_OPTION_DEPENDS_ON_USER_MODE(TYPE, NAME, CMDFLAG, DESC,        \
-                                             SHALLOW_VAL, DEEP_VAL)            \
-    {                                                                          \
-      CMDFLAG,                                                                 \
-      llvm::Twine(llvm::Twine() + "(" +                                        \
-                  (StringRef(#TYPE) == "StringRef" ? "string" : #TYPE ) +      \
-                  ") " DESC                                                    \
-                  " (default: " #SHALLOW_VAL " in shallow mode, " #DEEP_VAL    \
-                  " in deep mode)").str()                                      \
-    },
-#include "clang/StaticAnalyzer/Core/AnalyzerOptions.def"
-#undef ANALYZER_OPTION
-#undef ANALYZER_OPTION_DEPENDS_ON_USER_MODE
-  };
-
-  llvm::sort(PrintableOptions, [](const OptionAndDescriptionTy &LHS,
-                                  const OptionAndDescriptionTy &RHS) {
-    return LHS.first < RHS.first;
-  });
-
-  for (const auto &Pair : PrintableOptions) {
-    AnalyzerOptions::printFormattedEntry(out, Pair, /*InitialPad*/ 2,
-                                         /*EntryWidth*/ 30,
-                                         /*MinLineWidth*/ 70);
-    out << "\n\n";
-  }
-}
diff --git a/gnu/llvm/clang/unittests/AST/Language.cpp b/gnu/llvm/clang/unittests/AST/Language.cpp
deleted file mode 100644 (file)
index eeb3303..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-//===------ unittest/AST/Language.cpp - AST unit test support -------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-//  This file defines language options for AST unittests.
-//
-//===----------------------------------------------------------------------===//
-
-#include "Language.h"
-
-namespace clang {
-namespace ast_matchers {
-
-ArgVector getBasicRunOptionsForLanguage(Language Lang) {
-  ArgVector BasicArgs;
-  // Test with basic arguments.
-  switch (Lang) {
-  case Lang_C:
-    BasicArgs = {"-x", "c", "-std=c99"};
-    break;
-  case Lang_C89:
-    BasicArgs = {"-x", "c", "-std=c89"};
-    break;
-  case Lang_CXX:
-    BasicArgs = {"-std=c++98", "-frtti"};
-    break;
-  case Lang_CXX11:
-    BasicArgs = {"-std=c++11", "-frtti"};
-    break;
-  case Lang_CXX14:
-    BasicArgs = {"-std=c++14", "-frtti"};
-    break;
-  case Lang_CXX17:
-    BasicArgs = {"-std=c++17", "-frtti"};
-    break;
-  case Lang_CXX2a:
-    BasicArgs = {"-std=c++2a", "-frtti"};
-    break;
-  case Lang_OBJCXX:
-    BasicArgs = {"-x", "objective-c++", "-frtti"};
-    break;
-  case Lang_OpenCL:
-    llvm_unreachable("Not implemented yet!");
-  }
-  return BasicArgs;
-}
-
-} // end namespace ast_matchers
-} // end namespace clang
diff --git a/gnu/llvm/clang/unittests/AST/Language.h b/gnu/llvm/clang/unittests/AST/Language.h
deleted file mode 100644 (file)
index 6ba40be..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-//===------ unittest/AST/Language.h - AST unit test support ---------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-//  This file defines language options for AST unittests.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_UNITTESTS_AST_LANGUAGE_H
-#define LLVM_CLANG_UNITTESTS_AST_LANGUAGE_H
-
-#include "llvm/Support/ErrorHandling.h"
-#include <vector>
-#include <string>
-
-namespace clang {
-namespace ast_matchers {
-
-typedef std::vector<std::string> ArgVector;
-
-enum Language {
-    Lang_C,
-    Lang_C89,
-    Lang_CXX,
-    Lang_CXX11,
-    Lang_CXX14,
-    Lang_CXX17,
-    Lang_CXX2a,
-    Lang_OpenCL,
-    Lang_OBJCXX
-};
-
-ArgVector getBasicRunOptionsForLanguage(Language Lang);
-
-} // end namespace ast_matchers
-} // end namespace clang
-
-#endif
diff --git a/gnu/llvm/clang/unittests/AST/OMPStructuredBlockTest.cpp b/gnu/llvm/clang/unittests/AST/OMPStructuredBlockTest.cpp
deleted file mode 100644 (file)
index f4a3fad..0000000
+++ /dev/null
@@ -1,540 +0,0 @@
-//===- unittests/AST/OMPStructuredBlockTest.cpp ---------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// Fine-grained tests for IsOMPStructuredBlock bit of Stmt.
-//
-//===----------------------------------------------------------------------===//
-
-#include "ASTPrint.h"
-#include "clang/AST/ASTContext.h"
-#include "clang/AST/StmtOpenMP.h"
-#include "clang/ASTMatchers/ASTMatchFinder.h"
-#include "clang/ASTMatchers/ASTMatchers.h"
-#include "clang/Tooling/Tooling.h"
-#include "llvm/ADT/SmallString.h"
-#include "gmock/gmock.h"
-#include "gtest/gtest.h"
-
-using namespace clang;
-using namespace ast_matchers;
-using namespace tooling;
-
-namespace {
-
-const ast_matchers::internal::VariadicDynCastAllOfMatcher<
-    OMPExecutableDirective, OMPTargetDirective>
-    ompTargetDirective;
-
-StatementMatcher OMPInnermostStructuredBlockMatcher() {
-  return stmt(isOMPStructuredBlock(),
-              unless(hasDescendant(stmt(isOMPStructuredBlock()))))
-      .bind("id");
-}
-
-StatementMatcher OMPStandaloneDirectiveMatcher() {
-  return stmt(ompExecutableDirective(isStandaloneDirective())).bind("id");
-}
-
-template <typename T>
-::testing::AssertionResult
-PrintedOMPStmtMatches(StringRef Code, const T &NodeMatch,
-                      StringRef ExpectedPrinted,
-                      PolicyAdjusterType PolicyAdjuster = None) {
-  std::vector<std::string> Args = {
-      "-fopenmp=libomp",
-  };
-  return PrintedStmtMatches(Code, Args, NodeMatch, ExpectedPrinted,
-                            PolicyAdjuster);
-}
-
-static testing::AssertionResult NoMatches(StringRef Code,
-                                          const StatementMatcher &StmtMatch) {
-  PrintMatch Printer((PolicyAdjusterType()));
-  MatchFinder Finder;
-  Finder.addMatcher(StmtMatch, &Printer);
-  std::unique_ptr<FrontendActionFactory> Factory(
-      newFrontendActionFactory(&Finder));
-  if (!runToolOnCode(Factory->create(), Code))
-    return testing::AssertionFailure()
-           << "Parsing error in \"" << Code.str() << "\"";
-  if (Printer.getNumFoundStmts() == 0)
-    return testing::AssertionSuccess();
-  return testing::AssertionFailure()
-         << "Matcher should match only zero statements (found "
-         << Printer.getNumFoundStmts() << ")";
-}
-
-} // unnamed namespace
-
-TEST(OMPStructuredBlock, TestAtomic) {
-  const char *Source =
-      R"(
-void test(int i) {
-#pragma omp atomic
-++i;
-})";
-  ASSERT_TRUE(PrintedOMPStmtMatches(
-      Source, OMPInnermostStructuredBlockMatcher(), "++i"));
-}
-
-TEST(OMPStructuredBlock, TestBarrier) {
-  const char *Source =
-      R"(
-void test() {
-#pragma omp barrier
-})";
-  ASSERT_TRUE(PrintedOMPStmtMatches(Source, OMPStandaloneDirectiveMatcher(),
-                                    "#pragma omp barrier\n"));
-  ASSERT_TRUE(NoMatches(Source, OMPInnermostStructuredBlockMatcher()));
-}
-
-TEST(OMPStructuredBlock, TestCancel) {
-  const char *Source =
-      R"(
-void test() {
-#pragma omp parallel
-{
-    #pragma omp cancel parallel
-}
-})";
-  const char *Expected = R"({
-    #pragma omp cancel parallel
-}
-)";
-  ASSERT_TRUE(PrintedOMPStmtMatches(
-      Source, OMPInnermostStructuredBlockMatcher(), Expected));
-  ASSERT_TRUE(PrintedOMPStmtMatches(Source, OMPStandaloneDirectiveMatcher(),
-                                    "#pragma omp cancel parallel\n"));
-}
-
-TEST(OMPStructuredBlock, TestCancellationPoint) {
-  const char *Source =
-      R"(
-void test() {
-#pragma omp parallel
-{
-    #pragma omp cancellation point parallel
-}
-})";
-  const char *Expected = R"({
-    #pragma omp cancellation point parallel
-}
-)";
-  ASSERT_TRUE(PrintedOMPStmtMatches(
-      Source, OMPInnermostStructuredBlockMatcher(), Expected));
-  ASSERT_TRUE(
-      PrintedOMPStmtMatches(Source, OMPStandaloneDirectiveMatcher(),
-                            "#pragma omp cancellation point parallel\n"));
-}
-
-TEST(OMPStructuredBlock, TestCritical) {
-  const char *Source =
-      R"(
-void test() {
-#pragma omp critical
-;
-})";
-  ASSERT_TRUE(PrintedOMPStmtMatches(
-      Source, OMPInnermostStructuredBlockMatcher(), ";\n"));
-}
-
-//----------------------------------------------------------------------------//
-// Loop tests
-//----------------------------------------------------------------------------//
-
-class OMPStructuredBlockLoop : public ::testing::TestWithParam<const char *> {};
-
-TEST_P(OMPStructuredBlockLoop, TestDirective0) {
-  const std::string Source =
-      R"(
-void test(int x) {
-#pragma omp )" +
-      std::string(GetParam()) + R"(
-for (int i = 0; i < x; i++)
-;
-})";
-  ASSERT_TRUE(PrintedOMPStmtMatches(
-      Source, OMPInnermostStructuredBlockMatcher(), ";\n"));
-}
-
-TEST_P(OMPStructuredBlockLoop, TestDirective1) {
-  const std::string Source =
-      R"(
-void test(int x, int y) {
-#pragma omp )" +
-      std::string(GetParam()) + R"(
-for (int i = 0; i < x; i++)
-for (int i = 0; i < y; i++)
-;
-})";
-  ASSERT_TRUE(PrintedOMPStmtMatches(Source,
-                                    OMPInnermostStructuredBlockMatcher(),
-                                    "for (int i = 0; i < y; i++)\n    ;\n"));
-}
-
-TEST_P(OMPStructuredBlockLoop, TestDirectiveCollapse1) {
-  const std::string Source =
-      R"(
-void test(int x, int y) {
-#pragma omp )" +
-      std::string(GetParam()) + R"( collapse(1)
-for (int i = 0; i < x; i++)
-for (int i = 0; i < y; i++)
-;
-})";
-  ASSERT_TRUE(PrintedOMPStmtMatches(Source,
-                                    OMPInnermostStructuredBlockMatcher(),
-                                    "for (int i = 0; i < y; i++)\n    ;\n"));
-}
-
-TEST_P(OMPStructuredBlockLoop, TestDirectiveCollapse2) {
-  const std::string Source =
-      R"(
-void test(int x, int y) {
-#pragma omp )" +
-      std::string(GetParam()) + R"( collapse(2)
-for (int i = 0; i < x; i++)
-for (int i = 0; i < y; i++)
-;
-})";
-  ASSERT_TRUE(PrintedOMPStmtMatches(
-      Source, OMPInnermostStructuredBlockMatcher(), ";\n"));
-}
-
-TEST_P(OMPStructuredBlockLoop, TestDirectiveCollapse22) {
-  const std::string Source =
-      R"(
-void test(int x, int y, int z) {
-#pragma omp )" +
-      std::string(GetParam()) + R"( collapse(2)
-for (int i = 0; i < x; i++)
-for (int i = 0; i < y; i++)
-for (int i = 0; i < z; i++)
-;
-})";
-  ASSERT_TRUE(PrintedOMPStmtMatches(Source,
-                                    OMPInnermostStructuredBlockMatcher(),
-                                    "for (int i = 0; i < z; i++)\n    ;\n"));
-}
-
-INSTANTIATE_TEST_CASE_P(
-    OMPStructuredBlockLoopDirectives, OMPStructuredBlockLoop,
-    ::testing::Values("simd", "for", "for simd", "parallel for",
-                      "parallel for simd", "target parallel for", "taskloop",
-                      "taskloop simd", "distribute", "distribute parallel for",
-                      "distribute parallel for simd", "distribute simd",
-                      "target parallel for simd", "target simd",
-                      "target\n#pragma omp teams distribute",
-                      "target\n#pragma omp teams distribute simd",
-                      "target\n#pragma omp teams distribute parallel for simd",
-                      "target\n#pragma omp teams distribute parallel for",
-                      "target teams distribute",
-                      "target teams distribute parallel for",
-                      "target teams distribute parallel for simd",
-                      "target teams distribute simd"), );
-
-//----------------------------------------------------------------------------//
-// End Loop tests
-//----------------------------------------------------------------------------//
-
-TEST(OMPStructuredBlock, TestFlush) {
-  const char *Source =
-      R"(
-void test() {
-#pragma omp flush
-})";
-  ASSERT_TRUE(PrintedOMPStmtMatches(Source, OMPStandaloneDirectiveMatcher(),
-                                    "#pragma omp flush\n"));
-  ASSERT_TRUE(NoMatches(Source, OMPInnermostStructuredBlockMatcher()));
-}
-
-TEST(OMPStructuredBlock, TestMaster) {
-  const char *Source =
-      R"(
-void test() {
-#pragma omp master
-;
-})";
-  ASSERT_TRUE(PrintedOMPStmtMatches(
-      Source, OMPInnermostStructuredBlockMatcher(), ";\n"));
-}
-
-TEST(OMPStructuredBlock, TestOrdered0) {
-  const char *Source =
-      R"(
-void test() {
-#pragma omp ordered
-;
-})";
-  ASSERT_TRUE(PrintedOMPStmtMatches(
-      Source, OMPInnermostStructuredBlockMatcher(), ";\n"));
-}
-
-TEST(OMPStructuredBlock, TestOrdered1) {
-  const char *Source =
-      R"(
-void test(int x) {
-#pragma omp for ordered
-for (int i = 0; i < x; i++)
-;
-})";
-  ASSERT_TRUE(PrintedOMPStmtMatches(
-      Source, OMPInnermostStructuredBlockMatcher(), ";\n"));
-}
-
-TEST(OMPStructuredBlock, TestOrdered2) {
-  const char *Source =
-      R"(
-void test(int x) {
-#pragma omp for ordered(1)
-for (int i = 0; i < x; i++) {
-#pragma omp ordered depend(source)
-}
-})";
-  ASSERT_TRUE(
-      PrintedOMPStmtMatches(Source, OMPInnermostStructuredBlockMatcher(),
-                            "{\n    #pragma omp ordered depend(source)\n}\n"));
-  ASSERT_TRUE(PrintedOMPStmtMatches(Source, OMPStandaloneDirectiveMatcher(),
-                                    "#pragma omp ordered depend(source)\n"));
-}
-
-TEST(OMPStructuredBlock, DISABLED_TestParallelMaster0XFAIL) {
-  const char *Source =
-      R"(
-void test() {
-#pragma omp parallel master
-;
-})";
-  ASSERT_TRUE(PrintedOMPStmtMatches(
-      Source, OMPInnermostStructuredBlockMatcher(), ";\n"));
-}
-
-TEST(OMPStructuredBlock, DISABLED_TestParallelMaster1XFAIL) {
-  const char *Source =
-      R"(
-void test() {
-#pragma omp parallel master
-{ ; }
-})";
-  ASSERT_TRUE(PrintedOMPStmtMatches(
-      Source, OMPInnermostStructuredBlockMatcher(), "{\n    ;\n}\n"));
-}
-
-TEST(OMPStructuredBlock, TestParallelSections) {
-  const char *Source =
-      R"(
-void test() {
-#pragma omp parallel sections
-{ ; }
-})";
-  ASSERT_TRUE(PrintedOMPStmtMatches(
-      Source, OMPInnermostStructuredBlockMatcher(), "{\n    ;\n}\n"));
-}
-
-TEST(OMPStructuredBlock, TestParallelDirective) {
-  const char *Source =
-      R"(
-void test() {
-#pragma omp parallel
-;
-})";
-  ASSERT_TRUE(PrintedOMPStmtMatches(
-      Source, OMPInnermostStructuredBlockMatcher(), ";\n"));
-}
-
-const ast_matchers::internal::VariadicDynCastAllOfMatcher<
-    OMPExecutableDirective, OMPSectionsDirective>
-    ompSectionsDirective;
-
-const ast_matchers::internal::VariadicDynCastAllOfMatcher<
-    OMPExecutableDirective, OMPSectionDirective>
-    ompSectionDirective;
-
-StatementMatcher OMPSectionsDirectiveMatcher() {
-  return stmt(
-             isOMPStructuredBlock(),
-             hasAncestor(ompExecutableDirective(ompSectionsDirective())),
-             unless(hasAncestor(ompExecutableDirective(ompSectionDirective()))))
-      .bind("id");
-}
-
-TEST(OMPStructuredBlock, TestSectionDirective) {
-  const char *Source =
-      R"(
-void test() {
-#pragma omp sections
-{
-#pragma omp section
-;
-}
-})";
-  ASSERT_TRUE(PrintedOMPStmtMatches(Source, OMPSectionsDirectiveMatcher(),
-                                    "{\n"
-                                    "    #pragma omp section\n"
-                                    "        ;\n"
-                                    "}\n"));
-  ASSERT_TRUE(PrintedOMPStmtMatches(
-      Source, OMPInnermostStructuredBlockMatcher(), ";\n"));
-}
-
-TEST(OMPStructuredBlock, TestSections) {
-  const char *Source =
-      R"(
-void test() {
-#pragma omp sections
-{ ; }
-})";
-  ASSERT_TRUE(PrintedOMPStmtMatches(
-      Source, OMPInnermostStructuredBlockMatcher(), "{\n    ;\n}\n"));
-}
-
-TEST(OMPStructuredBlock, TestSingleDirective) {
-  const char *Source =
-      R"(
-void test() {
-#pragma omp single
-;
-})";
-  ASSERT_TRUE(PrintedOMPStmtMatches(
-      Source, OMPInnermostStructuredBlockMatcher(), ";\n"));
-}
-
-TEST(OMPStructuredBlock, TesTargetDataDirective) {
-  const char *Source =
-      R"(
-void test(int x) {
-#pragma omp target data map(x)
-;
-})";
-  ASSERT_TRUE(PrintedOMPStmtMatches(
-      Source, OMPInnermostStructuredBlockMatcher(), ";\n"));
-}
-
-TEST(OMPStructuredBlock, TesTargetEnterDataDirective) {
-  const char *Source =
-      R"(
-void test(int x) {
-#pragma omp target enter data map(to : x)
-})";
-  ASSERT_TRUE(
-      PrintedOMPStmtMatches(Source, OMPStandaloneDirectiveMatcher(),
-                            "#pragma omp target enter data map(to: x)\n"));
-  ASSERT_TRUE(NoMatches(Source, OMPInnermostStructuredBlockMatcher()));
-}
-
-TEST(OMPStructuredBlock, TesTargetExitDataDirective) {
-  const char *Source =
-      R"(
-void test(int x) {
-#pragma omp target exit data map(from : x)
-})";
-  ASSERT_TRUE(
-      PrintedOMPStmtMatches(Source, OMPStandaloneDirectiveMatcher(),
-                            "#pragma omp target exit data map(from: x)\n"));
-  ASSERT_TRUE(NoMatches(Source, OMPInnermostStructuredBlockMatcher()));
-}
-
-TEST(OMPStructuredBlock, TestTargetParallelDirective) {
-  const char *Source =
-      R"(
-void test() {
-#pragma omp target parallel
-;
-})";
-  ASSERT_TRUE(PrintedOMPStmtMatches(
-      Source, OMPInnermostStructuredBlockMatcher(), ";\n"));
-}
-
-TEST(OMPStructuredBlock, TestTargetTeams) {
-  const char *Source =
-      R"(
-void test() {
-#pragma omp target teams
-;
-})";
-  ASSERT_TRUE(PrintedOMPStmtMatches(
-      Source, OMPInnermostStructuredBlockMatcher(), ";\n"));
-}
-
-TEST(OMPStructuredBlock, TestTargetUpdateDirective) {
-  const char *Source =
-      R"(
-void test(int x) {
-#pragma omp target update to(x)
-})";
-  ASSERT_TRUE(PrintedOMPStmtMatches(Source, OMPStandaloneDirectiveMatcher(),
-                                    "#pragma omp target update to(x)\n"));
-  ASSERT_TRUE(NoMatches(Source, OMPInnermostStructuredBlockMatcher()));
-}
-
-TEST(OMPStructuredBlock, TestTarget) {
-  const char *Source =
-      R"(
-void test() {
-#pragma omp target
-;
-})";
-  ASSERT_TRUE(PrintedOMPStmtMatches(
-      Source, OMPInnermostStructuredBlockMatcher(), ";\n"));
-}
-
-TEST(OMPStructuredBlock, TestTask) {
-  const char *Source =
-      R"(
-void test() {
-#pragma omp task
-;
-})";
-  ASSERT_TRUE(PrintedOMPStmtMatches(
-      Source, OMPInnermostStructuredBlockMatcher(), ";\n"));
-}
-
-TEST(OMPStructuredBlock, TestTaskgroup) {
-  const char *Source =
-      R"(
-void test() {
-#pragma omp taskgroup
-;
-})";
-  ASSERT_TRUE(PrintedOMPStmtMatches(
-      Source, OMPInnermostStructuredBlockMatcher(), ";\n"));
-}
-
-TEST(OMPStructuredBlock, TestTaskwaitDirective) {
-  const char *Source =
-      R"(
-void test() {
-#pragma omp taskwait
-})";
-  ASSERT_TRUE(PrintedOMPStmtMatches(Source, OMPStandaloneDirectiveMatcher(),
-                                    "#pragma omp taskwait\n"));
-  ASSERT_TRUE(NoMatches(Source, OMPInnermostStructuredBlockMatcher()));
-}
-
-TEST(OMPStructuredBlock, TestTaskyieldDirective) {
-  const char *Source =
-      R"(
-void test() {
-#pragma omp taskyield
-})";
-  ASSERT_TRUE(PrintedOMPStmtMatches(Source, OMPStandaloneDirectiveMatcher(),
-                                    "#pragma omp taskyield\n"));
-  ASSERT_TRUE(NoMatches(Source, OMPInnermostStructuredBlockMatcher()));
-}
-
-TEST(OMPStructuredBlock, TestTeams) {
-  const char *Source =
-      R"(
-void test() {
-#pragma omp target
-#pragma omp teams
-;
-})";
-  ASSERT_TRUE(PrintedOMPStmtMatches(
-      Source, OMPInnermostStructuredBlockMatcher(), ";\n"));
-}
diff --git a/gnu/llvm/clang/www/comparison.html b/gnu/llvm/clang/www/comparison.html
deleted file mode 100755 (executable)
index 876179c..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
-          "http://www.w3.org/TR/html4/strict.dtd">
-<!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ -->
-<html>
-<head>
-  <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-  <title>Comparing Clang to other open source compilers</title>
-  <link type="text/css" rel="stylesheet" href="menu.css">
-  <link type="text/css" rel="stylesheet" href="content.css">
-</head>
-<body>
-  <!--#include virtual="menu.html.incl"-->
-  <div id="content">
-    <h1>Clang vs Other Open Source Compilers</h1>
-
-    <p>Building an entirely new compiler front-end is a big task, and it isn't
-       always clear to people why we decided to do this.  Here we compare Clang
-       and its goals to other open source compiler front-ends that are
-       available.  We restrict the discussion to very specific objective points
-       to avoid controversy where possible.  Also, software is infinitely
-       mutable, so we don't talk about little details that can be fixed with
-       a reasonable amount of effort: we'll talk about issues that are
-       difficult to fix for architectural or political reasons.</p>
-
-    <p>The goal of this list is to describe how differences in goals lead to
-       different strengths and weaknesses, not to make some compiler look bad.
-       This will hopefully help you to evaluate whether using Clang is a good
-       idea for your personal goals.  Because we don't know specifically what
-       <em>you</em> want to do, we describe the features of these compilers in
-       terms of <em>our</em> goals: if you are only interested in static
-       analysis, you may not care that something lacks codegen support, for
-       example.</p>
-
-    <p>Please email <a href="get_involved.html">cfe-dev</a> if you think we should add another compiler to this
-       list or if you think some characterization is unfair here.</p>
-
-    <ul>
-    <li><a href="#gcc">Clang vs GCC</a> (GNU Compiler Collection)</li>
-    <li><a href="#elsa">Clang vs Elsa</a> (Elkhound-based C++ Parser)</li>
-    <li><a href="#pcc">Clang vs PCC</a> (Portable C Compiler)</li>
-    </ul>
-
-
-    <!--=====================================================================-->
-    <h2><a name="gcc">Clang vs GCC (GNU Compiler Collection)</a></h2>
-    <!--=====================================================================-->
-
-    <p>Pro's of GCC vs Clang:</p>
-
-    <ul>
-    <li>GCC supports languages that Clang does not aim to, such as Java, Ada,
-        FORTRAN, Go, etc.</li>
-    <li>GCC supports more targets than LLVM.</li>
-    <li>GCC supports many language extensions, some of which are not implemented
-    by Clang. For instance, in C mode, GCC supports
-    <a href="https://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html">nested
-    functions</a> and has an
-    <a href="https://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html">extension
-    allowing VLAs in structs</a>.
-    </ul>
-
-    <p>Pro's of Clang vs GCC:</p>
-
-    <ul>
-    <li>The Clang ASTs and design are intended to be <a
-        href="features.html#simplecode">easily understandable</a> by
-        anyone who is familiar with the languages involved and who has a basic
-        understanding of how a compiler works.  GCC has a very old codebase
-        which presents a steep learning curve to new developers.</li>
-    <li>Clang is designed as an API from its inception, allowing it to be reused
-        by source analysis tools, refactoring, IDEs (etc) as well as for code
-        generation.  GCC is built as a monolithic static compiler, which makes
-        it extremely difficult to use as an API and integrate into other tools.
-        Further, its historic design and <a
-        href="https://gcc.gnu.org/ml/gcc/2007-11/msg00460.html">current</a>
-        <a href="https://gcc.gnu.org/ml/gcc/2004-12/msg00888.html">policy</a>
-        makes it difficult to decouple the front-end from the rest of the
-        compiler. </li>
-    <li>Various GCC design decisions make it very difficult to reuse: its build
-        system is difficult to modify, you can't link multiple targets into one
-        binary, you can't link multiple front-ends into one binary, it uses a
-        custom garbage collector, uses global variables extensively, is not
-        reentrant or multi-threadable, etc.  Clang has none of these problems.
-        </li>
-    <li>Clang does not implicitly simplify code as it parses it like GCC does.
-        Doing so causes many problems for source analysis tools: as one simple
-        example, if you write "x-x" in your source code, the GCC AST will
-        contain "0", with no mention of 'x'.  This is extremely bad for a
-        refactoring tool that wants to rename 'x'.</li>
-    <li>Clang can serialize its AST out to disk and read it back into another
-        program, which is useful for whole program analysis.  GCC does not have
-        this.  GCC's PCH mechanism (which is just a dump of the compiler
-        memory image) is related, but is architecturally only
-        able to read the dump back into the exact same executable as the one
-        that produced it (it is not a structured format).</li>
-    <li>Clang is <a href="features.html#performance">much faster and uses far
-        less memory</a> than GCC.</li>
-    <li>Clang has been designed from the start to provide extremely clear and
-        concise diagnostics (error and warning messages), and includes support
-        for <a href="diagnostics.html">expressive diagnostics</a>.
-        Modern versions of GCC have made significant advances in this area,
-        incorporating various Clang features such as preserving typedefs in
-        diagnostics and showing macro expansions, but GCC is still catching
-        up.</li>
-    <li>GCC is licensed under the GPL license. <a href="features.html#license">
-        Clang uses a BSD license,</a> which allows it to be embedded in
-        software that is not GPL-licensed.</li>
-    <li>Clang inherits a number of features from its use of LLVM as a backend,
-        including support for a bytecode representation for intermediate code,
-        pluggable optimizers, link-time optimization support, Just-In-Time
-        compilation, ability to link in multiple code generators, etc.</li>
-    <li><a href="compatibility.html#cxx">Clang's support for C++</a> is more
-        compliant than GCC's in many ways.</li>
-    <li>Clang supports
-        <a href="https://clang.llvm.org/docs/LanguageExtensions.html">many language
-        extensions</a>, some of which are not implemented by GCC. For instance,
-        Clang provides attributes for checking thread safety and extended vector
-        types.</li>
-    </ul>
-
-    <!--=====================================================================-->
-    <h2><a name="elsa">Clang vs Elsa (Elkhound-based C++ Parser)</a></h2>
-    <!--=====================================================================-->
-
-    <p>Pro's of Elsa vs Clang:</p>
-
-    <ul>
-    <li>Elsa's parser and AST is designed to be easily extensible by adding
-        grammar rules.  Clang has a very simple and easily hackable parser,
-        but requires you to write C++ code to do it.</li>
-    </ul>
-
-    <p>Pro's of Clang vs Elsa:</p>
-
-    <ul>
-    <li>Clang's C and C++ support is far more mature and practically useful than
-        Elsa's, and includes many C++'11 features.</li>
-    <li>The Elsa community is extremely small and major development work seems
-        to have ceased in 2005. Work continued to be used by other small
-        projects (e.g. Oink), but Oink is apparently dead now too.  Clang has a
-        vibrant community including developers that
-        are paid to work on it full time.  In practice this means that you can
-        file bugs against Clang and they will often be fixed for you.  If you
-        use Elsa, you are (mostly) on your own for bug fixes and feature
-        enhancements.</li>
-    <li>Elsa is not built as a stack of reusable libraries like Clang is.  It is
-        very difficult to use part of Elsa without the whole front-end.  For
-        example, you cannot use Elsa to parse C/ObjC code without building an
-        AST.  You can do this in Clang and it is much faster than building an
-        AST.</li>
-    <li>Elsa does not have an integrated preprocessor, which makes it extremely
-        difficult to accurately map from a source location in the AST back to
-        its original position before preprocessing.  Like GCC, it does not keep
-        track of macro expansions.</li>
-    <li>Elsa is even slower and uses more memory than GCC, which itself requires
-        far more space and time than Clang.</li>
-    <li>Elsa only does partial semantic analysis.  It is intended to work on
-        code that is already validated by GCC, so it does not do many semantic
-        checks required by the languages it implements.</li>
-    <li>Elsa does not support Objective-C.</li>
-    <li>Elsa does not support native code generation.</li>
-    </ul>
-
-
-    <!--=====================================================================-->
-    <h2><a name="pcc">Clang vs PCC (Portable C Compiler)</a></h2>
-    <!--=====================================================================-->
-
-    <p>Pro's of PCC vs Clang:</p>
-
-    <ul>
-    <li>The PCC source base is very small and builds quickly with just a C
-        compiler.</li>
-    </ul>
-
-    <p>Pro's of Clang vs PCC:</p>
-
-    <ul>
-    <li>PCC dates from the 1970's and has been dormant for most of that time.
-        The Clang and LLVM communities are very active.</li>
-    <li>PCC doesn't support Objective-C or C++ and doesn't aim to support
-        C++.</li>
-    <li>PCC's code generation is very limited compared to LLVM.  It produces very
-        inefficient code and does not support many important targets.</li>
-    <li>Like Elsa, PCC's does not have an integrated preprocessor, making it
-        extremely difficult to use it for source analysis tools.</li>
-    </ul>
-  </div>
-</body>
-</html>
diff --git a/gnu/llvm/lld/.arcconfig b/gnu/llvm/lld/.arcconfig
deleted file mode 100644 (file)
index c8a8e07..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-{
-  "repository.callsign" : "LLD",
-  "conduit_uri" : "https://reviews.llvm.org/"
-}
diff --git a/gnu/llvm/lld/Common/Threads.cpp b/gnu/llvm/lld/Common/Threads.cpp
deleted file mode 100644 (file)
index af04972..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-//===- Threads.cpp --------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "lld/Common/Threads.h"
-
-bool lld::threadsEnabled = true;
index 4b95912..9032931 100644 (file)
@@ -17,9 +17,8 @@
 using namespace llvm;
 using namespace llvm::support::endian;
 using namespace llvm::ELF;
-
-namespace lld {
-namespace elf {
+using namespace lld;
+using namespace lld::elf;
 
 namespace {
 class PPC final : public TargetInfo {
@@ -44,14 +43,19 @@ public:
                   int64_t a) const override;
   uint32_t getThunkSectionSpacing() const override;
   bool inBranchRange(RelType type, uint64_t src, uint64_t dst) const override;
-  void relocateOne(uint8_t *loc, RelType type, uint64_t val) const override;
+  void relocate(uint8_t *loc, const Relocation &rel,
+                uint64_t val) const override;
   RelExpr adjustRelaxExpr(RelType type, const uint8_t *data,
                           RelExpr expr) const override;
   int getTlsGdRelaxSkip(RelType type) const override;
-  void relaxTlsGdToIe(uint8_t *loc, RelType type, uint64_t val) const override;
-  void relaxTlsGdToLe(uint8_t *loc, RelType type, uint64_t val) const override;
-  void relaxTlsLdToLe(uint8_t *loc, RelType type, uint64_t val) const override;
-  void relaxTlsIeToLe(uint8_t *loc, RelType type, uint64_t val) const override;
+  void relaxTlsGdToIe(uint8_t *loc, const Relocation &rel,
+                      uint64_t val) const override;
+  void relaxTlsGdToLe(uint8_t *loc, const Relocation &rel,
+                      uint64_t val) const override;
+  void relaxTlsLdToLe(uint8_t *loc, const Relocation &rel,
+                      uint64_t val) const override;
+  void relaxTlsIeToLe(uint8_t *loc, const Relocation &rel,
+                      uint64_t val) const override;
 };
 } // namespace
 
@@ -66,17 +70,16 @@ static void writeFromHalf16(uint8_t *loc, uint32_t insn) {
   write32(config->isLE ? loc : loc - 2, insn);
 }
 
-void writePPC32GlinkSection(uint8_t *buf, size_t numEntries) {
+void elf::writePPC32GlinkSection(uint8_t *buf, size_t numEntries) {
   // Create canonical PLT entries for non-PIE code. Compilers don't generate
   // non-GOT-non-PLT relocations referencing external functions for -fpie/-fPIE.
   uint32_t glink = in.plt->getVA(); // VA of .glink
   if (!config->isPic) {
-    for (const Symbol *sym : in.plt->entries)
-      if (sym->needsPltAddr) {
-        writePPC32PltCallStub(buf, sym->getGotPltVA(), nullptr, 0);
-        buf += 16;
-        glink += 16;
-      }
+    for (const Symbol *sym : cast<PPC32GlinkSection>(in.plt)->canonical_plts) {
+      writePPC32PltCallStub(buf, sym->getGotPltVA(), nullptr, 0);
+      buf += 16;
+      glink += 16;
+    }
   }
 
   // On PPC Secure PLT ABI, bl foo@plt jumps to a call stub, which loads an
@@ -290,12 +293,12 @@ static std::pair<RelType, uint64_t> fromDTPREL(RelType type, uint64_t val) {
   }
 }
 
-void PPC::relocateOne(uint8_t *loc, RelType type, uint64_t val) const {
+void PPC::relocate(uint8_t *loc, const Relocation &rel, uint64_t val) const {
   RelType newType;
-  std::tie(newType, val) = fromDTPREL(type, val);
+  std::tie(newType, val) = fromDTPREL(rel.type, val);
   switch (newType) {
   case R_PPC_ADDR16:
-    checkIntUInt(loc, val, 16, type);
+    checkIntUInt(loc, val, 16, rel);
     write16(loc, val);
     break;
   case R_PPC_GOT16:
@@ -303,7 +306,7 @@ void PPC::relocateOne(uint8_t *loc, RelType type, uint64_t val) const {
   case R_PPC_GOT_TLSLD16:
   case R_PPC_GOT_TPREL16:
   case R_PPC_TPREL16:
-    checkInt(loc, val, 16, type);
+    checkInt(loc, val, 16, rel);
     write16(loc, val);
     break;
   case R_PPC_ADDR16_HA:
@@ -339,8 +342,8 @@ void PPC::relocateOne(uint8_t *loc, RelType type, uint64_t val) const {
     break;
   case R_PPC_REL14: {
     uint32_t mask = 0x0000FFFC;
-    checkInt(loc, val, 16, type);
-    checkAlignment(loc, val, 4, type);
+    checkInt(loc, val, 16, rel);
+    checkAlignment(loc, val, 4, rel);
     write32(loc, (read32(loc) & ~mask) | (val & mask));
     break;
   }
@@ -349,8 +352,8 @@ void PPC::relocateOne(uint8_t *loc, RelType type, uint64_t val) const {
   case R_PPC_LOCAL24PC:
   case R_PPC_PLTREL24: {
     uint32_t mask = 0x03FFFFFC;
-    checkInt(loc, val, 26, type);
-    checkAlignment(loc, val, 4, type);
+    checkInt(loc, val, 26, rel);
+    checkAlignment(loc, val, 4, rel);
     write32(loc, (read32(loc) & ~mask) | (val & mask));
     break;
   }
@@ -382,13 +385,14 @@ int PPC::getTlsGdRelaxSkip(RelType type) const {
   return 1;
 }
 
-void PPC::relaxTlsGdToIe(uint8_t *loc, RelType type, uint64_t val) const {
-  switch (type) {
+void PPC::relaxTlsGdToIe(uint8_t *loc, const Relocation &rel,
+                         uint64_t val) const {
+  switch (rel.type) {
   case R_PPC_GOT_TLSGD16: {
     // addi rT, rA, x@got@tlsgd --> lwz rT, x@got@tprel(rA)
     uint32_t insn = readFromHalf16(loc);
     writeFromHalf16(loc, 0x80000000 | (insn & 0x03ff0000));
-    relocateOne(loc, R_PPC_GOT_TPREL16, val);
+    relocateNoSym(loc, R_PPC_GOT_TPREL16, val);
     break;
   }
   case R_PPC_TLSGD:
@@ -400,8 +404,9 @@ void PPC::relaxTlsGdToIe(uint8_t *loc, RelType type, uint64_t val) const {
   }
 }
 
-void PPC::relaxTlsGdToLe(uint8_t *loc, RelType type, uint64_t val) const {
-  switch (type) {
+void PPC::relaxTlsGdToLe(uint8_t *loc, const Relocation &rel,
+                         uint64_t val) const {
+  switch (rel.type) {
   case R_PPC_GOT_TLSGD16:
     // addi r3, r31, x@got@tlsgd --> addis r3, r2, x@tprel@ha
     writeFromHalf16(loc, 0x3c620000 | ha(val));
@@ -415,8 +420,9 @@ void PPC::relaxTlsGdToLe(uint8_t *loc, RelType type, uint64_t val) const {
   }
 }
 
-void PPC::relaxTlsLdToLe(uint8_t *loc, RelType type, uint64_t val) const {
-  switch (type) {
+void PPC::relaxTlsLdToLe(uint8_t *loc, const Relocation &rel,
+                         uint64_t val) const {
+  switch (rel.type) {
   case R_PPC_GOT_TLSLD16:
     // addi r3, rA, x@got@tlsgd --> addis r3, r2, 0
     writeFromHalf16(loc, 0x3c620000);
@@ -431,15 +437,16 @@ void PPC::relaxTlsLdToLe(uint8_t *loc, RelType type, uint64_t val) const {
   case R_PPC_DTPREL16_HA:
   case R_PPC_DTPREL16_HI:
   case R_PPC_DTPREL16_LO:
-    relocateOne(loc, type, val);
+    relocate(loc, rel, val);
     break;
   default:
     llvm_unreachable("unsupported relocation for TLS LD to LE relaxation");
   }
 }
 
-void PPC::relaxTlsIeToLe(uint8_t *loc, RelType type, uint64_t val) const {
-  switch (type) {
+void PPC::relaxTlsIeToLe(uint8_t *loc, const Relocation &rel,
+                         uint64_t val) const {
+  switch (rel.type) {
   case R_PPC_GOT_TPREL16: {
     // lwz rT, x@got@tprel(rA) --> addis rT, r2, x@tprel@ha
     uint32_t rt = readFromHalf16(loc) & 0x03e00000;
@@ -462,10 +469,7 @@ void PPC::relaxTlsIeToLe(uint8_t *loc, RelType type, uint64_t val) const {
   }
 }
 
-TargetInfo *getPPCTargetInfo() {
+TargetInfo *elf::getPPCTargetInfo() {
   static PPC target;
   return &target;
 }
-
-} // namespace elf
-} // namespace lld
index e74a4a0..941dc24 100644 (file)
@@ -249,8 +249,13 @@ struct Configuration {
   ELFKind ekind = ELFNoneKind;
   uint16_t emachine = llvm::ELF::EM_NONE;
   llvm::Optional<uint64_t> imageBase;
+  // commonPageSize and maxPageSize are influenced by nmagic or omagic
+  // so may be set to 1 if either of those options is given.
   uint64_t commonPageSize;
   uint64_t maxPageSize;
+  // textAlignPageSize is the target max page size for the purpose
+  // of aligning text sections, which may be unaligned if given nmagic
+  uint64_t textAlignPageSize;
   uint64_t mipsGotSize;
   uint64_t zStackSize;
   unsigned ltoPartitions;
index 4637a3b..dc06998 100644 (file)
@@ -439,7 +439,8 @@ static bool isKnownZFlag(StringRef s) {
          s == "nocombreloc" || s == "nocopyreloc" || s == "nodefaultlib" ||
          s == "nodelete" || s == "nodlopen" || s == "noexecstack" ||
          s == "nognustack" || s == "nokeep-text-section-prefix" ||
-         s == "norelro" || s == "noseparate-code" || s == "notext" ||
+         s == "norelro" || s == "noretpolineplt" ||
+         s == "noseparate-code" || s == "notext" ||
          s == "now" || s == "origin" || s == "pac-plt" || s == "rel" ||
          s == "rela" || s == "relro" || s == "retpolineplt" ||
          s == "rodynamic" || s == "shstk" || s == "text" || s == "undefs" ||
@@ -948,7 +949,8 @@ static void readConfigs(opt::InputArgList &args) {
   config->ignoreDataAddressEquality =
       args.hasArg(OPT_ignore_data_address_equality);
   config->ignoreFunctionAddressEquality =
-      args.hasArg(OPT_ignore_function_address_equality);
+      args.hasFlag(OPT_ignore_function_address_equality,
+      OPT_no_ignore_function_address_equality, true);
   config->init = args.getLastArgValue(OPT_init, "_init");
   config->ltoAAPipeline = args.getLastArgValue(OPT_lto_aa_pipeline);
   config->ltoCSProfileGenerate = args.hasArg(OPT_lto_cs_profile_generate);
@@ -986,7 +988,12 @@ static void readConfigs(opt::InputArgList &args) {
   config->optimize = args::getInteger(args, OPT_O, 1);
   config->orphanHandling = getOrphanHandling(args);
   config->outputFile = args.getLastArgValue(OPT_o);
+#ifdef __OpenBSD__
+  config->pie = args.hasFlag(OPT_pie, OPT_no_pie,
+      !args.hasArg(OPT_shared) && !args.hasArg(OPT_relocatable));
+#else
   config->pie = args.hasFlag(OPT_pie, OPT_no_pie, false);
+#endif
   config->printIcfSections =
       args.hasFlag(OPT_print_icf_sections, OPT_no_print_icf_sections, false);
   config->printGcSections =
@@ -1061,7 +1068,11 @@ static void readConfigs(opt::InputArgList &args) {
   config->zOrigin = hasZOption(args, "origin");
   config->zPacPlt = hasZOption(args, "pac-plt");
   config->zRelro = getZFlag(args, "relro", "norelro", true);
-  config->zRetpolineplt = hasZOption(args, "retpolineplt");
+#ifndef __OpenBSD__
+  config->zRetpolineplt = getZFlag(args, "retpolineplt", "noretpolineplt", false);
+#else
+  config->zRetpolineplt = getZFlag(args, "retpolineplt", "noretpolineplt", true);
+#endif
   config->zRodynamic = hasZOption(args, "rodynamic");
   config->zSeparate = getZSeparate(args);
   config->zShstk = hasZOption(args, "shstk");
@@ -1421,7 +1432,7 @@ void LinkerDriver::inferMachineType() {
 }
 
 // Parse -z max-page-size=<value>. The default value is defined by
-// each target.
+// each target. Is set to 1 if given nmagic or omagic.
 static uint64_t getMaxPageSize(opt::InputArgList &args) {
   uint64_t val = args::getZOptionValue(args, OPT_z, "max-page-size",
                                        target->defaultMaxPageSize);
@@ -1436,7 +1447,7 @@ static uint64_t getMaxPageSize(opt::InputArgList &args) {
 }
 
 // Parse -z common-page-size=<value>. The default value is defined by
-// each target.
+// each target. Is set to 1 if given nmagic or omagic.
 static uint64_t getCommonPageSize(opt::InputArgList &args) {
   uint64_t val = args::getZOptionValue(args, OPT_z, "common-page-size",
                                        target->defaultCommonPageSize);
@@ -1453,6 +1464,16 @@ static uint64_t getCommonPageSize(opt::InputArgList &args) {
   return val;
 }
 
+// Parse -z max-page-size=<value>. The default value is defined by
+// each target.
+static uint64_t getRealMaxPageSize(opt::InputArgList &args) {
+  uint64_t val = args::getZOptionValue(args, OPT_z, "max-page-size",
+                                       target->defaultMaxPageSize);
+  if (!isPowerOf2_64(val))
+    error("max-page-size: value isn't a power of 2");
+  return val;
+}
+
 // Parses -image-base option.
 static Optional<uint64_t> getImageBase(opt::InputArgList &args) {
   // Because we are using "Config->maxPageSize" here, this function has to be
@@ -2088,6 +2109,11 @@ template <class ELFT> void LinkerDriver::link(opt::InputArgList &args) {
   // optimizations such as DATA_SEGMENT_ALIGN in linker scripts. LLD's use of it
   // is limited to writing trap instructions on the last executable segment.
   config->commonPageSize = getCommonPageSize(args);
+  // textAlignPageSize is the alignment page size to use when aligning PT_LOAD
+  // sections. This is the same as maxPageSize except under -omagic, where data
+  // sections are non-aligned (maxPageSize set to 1) but text sections are aligned
+  // to the target page size.
+  config->textAlignPageSize = config->omagic ? getRealMaxPageSize(args) : config->maxPageSize;
 
   config->imageBase = getImageBase(args);
 
index e33b07c..c9b00c6 100644 (file)
@@ -227,9 +227,36 @@ Optional<std::string> elf::findFromSearchPaths(StringRef path) {
 // search paths.
 Optional<std::string> elf::searchLibraryBaseName(StringRef name) {
   for (StringRef dir : config->searchPaths) {
-    if (!config->isStatic)
+    if (!config->isStatic) {
       if (Optional<std::string> s = findFile(dir, "lib" + name + ".so"))
         return s;
+
+      // Handle OpenBSD-style maj/min shlib scheme
+      llvm::SmallString<128> Scratch;
+      const StringRef LibName = ("lib" + name + ".so.").toStringRef(Scratch);
+      int MaxMaj = -1, MaxMin = -1;
+      std::error_code EC;
+      for (fs::directory_iterator LI(dir, EC), LE;
+          LI != LE; LI = LI.increment(EC)) {
+        StringRef FilePath = LI->path();
+        StringRef FileName = path::filename(FilePath);
+        if (!(FileName.startswith(LibName)))
+          continue;
+        std::pair<StringRef, StringRef> MajMin =
+          FileName.substr(LibName.size()).split('.');
+        int Maj, Min;
+        if (MajMin.first.getAsInteger(10, Maj) || Maj < 0)
+          continue;
+        if (MajMin.second.getAsInteger(10, Min) || Min < 0)
+          continue;
+        if (Maj > MaxMaj)
+          MaxMaj = Maj, MaxMin = Min;
+        if (MaxMaj == Maj && Min > MaxMin)
+          MaxMin = Min;
+      }
+      if (MaxMaj >= 0)
+        return findFile(dir, LibName + Twine(MaxMaj) + "." + Twine(MaxMin));
+    }
     if (Optional<std::string> s = findFile(dir, "lib" + name + ".a"))
       return s;
   }
index 8613e0d..a6c97a3 100644 (file)
@@ -36,16 +36,17 @@ using namespace llvm::object;
 using namespace llvm::support;
 using namespace llvm::support::endian;
 using namespace llvm::sys;
+using namespace lld;
+using namespace lld::elf;
+
+std::vector<InputSectionBase *> elf::inputSections;
+DenseSet<std::pair<const Symbol *, uint64_t>> elf::ppc64noTocRelax;
 
-namespace lld {
 // Returns a string to construct an error message.
-std::string toString(const elf::InputSectionBase *sec) {
+std::string lld::toString(const InputSectionBase *sec) {
   return (toString(sec->file) + ":(" + sec->name + ")").str();
 }
 
-namespace elf {
-std::vector<InputSectionBase *> inputSections;
-
 template <class ELFT>
 static ArrayRef<uint8_t> getSectionContents(ObjFile<ELFT> &file,
                                             const typename ELFT::Shdr &hdr) {
@@ -138,7 +139,7 @@ size_t InputSectionBase::getSize() const {
     return s->getSize();
   if (uncompressedSize >= 0)
     return uncompressedSize;
-  return rawData.size();
+  return rawData.size() - bytesDropped;
 }
 
 void InputSectionBase::uncompress() const {
@@ -307,7 +308,7 @@ std::string InputSectionBase::getLocation(uint64_t offset) {
 
   // File->sourceFile contains STT_FILE symbol that contains a
   // source file name. If it's missing, we use an object file name.
-  std::string srcFile = getFile<ELFT>()->sourceFile;
+  std::string srcFile = std::string(getFile<ELFT>()->sourceFile);
   if (srcFile.empty())
     srcFile = toString(file);
 
@@ -338,7 +339,7 @@ std::string InputSectionBase::getSrcMsg(const Symbol &sym, uint64_t offset) {
 //
 //   path/to/foo.o:(function bar) in archive path/to/bar.a
 std::string InputSectionBase::getObjMsg(uint64_t off) {
-  std::string filename = file->getName();
+  std::string filename = std::string(file->getName());
 
   std::string archive;
   if (!file->archiveName.empty())
@@ -465,7 +466,7 @@ void InputSection::copyRelocations(uint8_t *buf, ArrayRef<RelTy> rels) {
       if (!RelTy::IsRela)
         addend = target->getImplicitAddend(bufLoc, type);
 
-      if (config->emachine == EM_MIPS && config->relocatable &&
+      if (config->emachine == EM_MIPS &&
           target->getRelExpr(type, sym, bufLoc) == R_MIPS_GOTREL) {
         // Some MIPS relocations depend on "gp" value. By default,
         // this value has 0x7ff0 offset from a .got section. But
@@ -526,9 +527,14 @@ static uint32_t getARMUndefinedRelativeWeakVA(RelType type, uint32_t a,
   case R_ARM_MOVW_PREL_NC:
   case R_ARM_MOVT_PREL:
   case R_ARM_REL32:
+  case R_ARM_THM_ALU_PREL_11_0:
   case R_ARM_THM_MOVW_PREL_NC:
   case R_ARM_THM_MOVT_PREL:
+  case R_ARM_THM_PC12:
     return p + a;
+  // p + a is unrepresentable as negative immediates can't be encoded.
+  case R_ARM_THM_PC8:
+    return p;
   }
   llvm_unreachable("ARM pc-relative relocation expected\n");
 }
@@ -550,6 +556,7 @@ static uint64_t getAArch64UndefinedRelativeWeakVA(uint64_t type, uint64_t a,
   case R_AARCH64_PREL64:
   case R_AARCH64_ADR_PREL_LO21:
   case R_AARCH64_LD_PREL_LO19:
+  case R_AARCH64_PLT32:
     return p + a;
   }
   llvm_unreachable("AArch64 pc-relative relocation expected\n");
@@ -645,6 +652,7 @@ static int64_t getTlsTpOffset(const Symbol &s) {
 
     // Variant 2.
   case EM_HEXAGON:
+  case EM_SPARCV9:
   case EM_386:
   case EM_X86_64:
     return s.getVA(0) - tls->p_memsz -
@@ -654,8 +662,9 @@ static int64_t getTlsTpOffset(const Symbol &s) {
   }
 }
 
-static uint64_t getRelocTargetVA(const InputFile *file, RelType type, int64_t a,
-                                 uint64_t p, const Symbol &sym, RelExpr expr) {
+uint64_t InputSectionBase::getRelocTargetVA(const InputFile *file, RelType type,
+                                            int64_t a, uint64_t p,
+                                            const Symbol &sym, RelExpr expr) {
   switch (expr) {
   case R_ABS:
   case R_DTPREL:
@@ -703,7 +712,7 @@ static uint64_t getRelocTargetVA(const InputFile *file, RelType type, int64_t a,
     // ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/mipsabi.pdf
     // microMIPS variants of these relocations use slightly different
     // expressions: AHL + GP - P + 3 for %lo() and AHL + GP - P - 1 for %hi()
-    // to correctly handle less-sugnificant bit of the microMIPS symbol.
+    // to correctly handle less-significant bit of the microMIPS symbol.
     uint64_t v = in.mipsGot->getGp(file) + a - p;
     if (type == R_MIPS_LO16 || type == R_MICROMIPS_LO16)
       v += 4;
@@ -740,8 +749,12 @@ static uint64_t getRelocTargetVA(const InputFile *file, RelType type, int64_t a,
                               *hiRel->sym, hiRel->expr);
     return 0;
   }
-  case R_PC: {
+  case R_PC:
+  case R_ARM_PCA: {
     uint64_t dest;
+    if (expr == R_ARM_PCA)
+      // Some PC relative ARM (Thumb) relocations align down the place.
+      p = p & 0xfffffffc;
     if (sym.isUndefWeak()) {
       // On ARM and AArch64 a branch to an undefined weak resolves to the
       // next instruction, otherwise the place.
@@ -796,7 +809,7 @@ static uint64_t getRelocTargetVA(const InputFile *file, RelType type, int64_t a,
     // --noinhibit-exec, even a non-weak undefined reference may reach here.
     // Just return A, which matches R_ABS, and the behavior of some dynamic
     // loaders.
-    if (sym.isUndefined())
+    if (sym.isUndefined() || sym.isLazy())
       return a;
     return getTlsTpOffset(sym) + a;
   case R_RELAX_TLS_GD_TO_LE_NEG:
@@ -840,6 +853,16 @@ static uint64_t getRelocTargetVA(const InputFile *file, RelType type, int64_t a,
 template <class ELFT, class RelTy>
 void InputSection::relocateNonAlloc(uint8_t *buf, ArrayRef<RelTy> rels) {
   const unsigned bits = sizeof(typename ELFT::uint) * 8;
+  const bool isDebug = isDebugSection(*this);
+  const bool isDebugLocOrRanges =
+      isDebug && (name == ".debug_loc" || name == ".debug_ranges");
+  const bool isDebugLine = isDebug && name == ".debug_line";
+  Optional<uint64_t> tombstone;
+  for (const auto &patAndValue : llvm::reverse(config->deadRelocInNonAlloc))
+    if (patAndValue.first.match(this->name)) {
+      tombstone = patAndValue.second;
+      break;
+    }
 
   for (const RelTy &rel : rels) {
     RelType type = rel.getType(config->isMips64EL);
@@ -862,11 +885,17 @@ void InputSection::relocateNonAlloc(uint8_t *buf, ArrayRef<RelTy> rels) {
     if (expr == R_NONE)
       continue;
 
+    if (expr == R_SIZE) {
+      target->relocateNoSym(bufLoc, type,
+                            SignExtend64<bits>(sym.getSize() + addend));
+      continue;
+    }
+
     if (expr != R_ABS && expr != R_DTPREL && expr != R_RISCV_ADD) {
       std::string msg = getLocation<ELFT>(offset) +
                         ": has non-ABS relocation " + toString(type) +
                         " against symbol '" + toString(sym) + "'";
-      if (expr != R_PC) {
+      if (expr != R_PC && expr != R_ARM_PCA) {
         error(msg);
         return;
       }
@@ -879,15 +908,52 @@ void InputSection::relocateNonAlloc(uint8_t *buf, ArrayRef<RelTy> rels) {
       // address 0. For bug-compatibilty, we accept them with warnings. We
       // know Steel Bank Common Lisp as of 2018 have this bug.
       warn(msg);
-      target->relocateOne(bufLoc, type,
-                          SignExtend64<bits>(sym.getVA(addend - offset)));
+      target->relocateNoSym(bufLoc, type,
+                            SignExtend64<bits>(sym.getVA(addend - offset)));
       continue;
     }
 
-    if (sym.isTls() && !Out::tlsPhdr)
-      target->relocateOne(bufLoc, type, 0);
-    else
-      target->relocateOne(bufLoc, type, SignExtend64<bits>(sym.getVA(addend)));
+    if (tombstone ||
+        (isDebug && (type == target->symbolicRel || expr == R_DTPREL))) {
+      // Resolve relocations in .debug_* referencing (discarded symbols or ICF
+      // folded section symbols) to a tombstone value. Resolving to addend is
+      // unsatisfactory because the result address range may collide with a
+      // valid range of low address, or leave multiple CUs claiming ownership of
+      // the same range of code, which may confuse consumers.
+      //
+      // To address the problems, we use -1 as a tombstone value for most
+      // .debug_* sections. We have to ignore the addend because we don't want
+      // to resolve an address attribute (which may have a non-zero addend) to
+      // -1+addend (wrap around to a low address).
+      //
+      // R_DTPREL type relocations represent an offset into the dynamic thread
+      // vector. The computed value is st_value plus a non-negative offset.
+      // Negative values are invalid, so -1 can be used as the tombstone value.
+      //
+      // If the referenced symbol is discarded (made Undefined), or the
+      // section defining the referenced symbol is garbage collected,
+      // sym.getOutputSection() is nullptr. `ds->section->repl != ds->section`
+      // catches the ICF folded case. However, resolving a relocation in
+      // .debug_line to -1 would stop debugger users from setting breakpoints on
+      // the folded-in function, so exclude .debug_line.
+      //
+      // For pre-DWARF-v5 .debug_loc and .debug_ranges, -1 is a reserved value
+      // (base address selection entry), use 1 (which is used by GNU ld for
+      // .debug_ranges).
+      //
+      // TODO To reduce disruption, we use 0 instead of -1 as the tombstone
+      // value. Enable -1 in a future release.
+      auto *ds = dyn_cast<Defined>(&sym);
+      if (!sym.getOutputSection() ||
+          (ds && ds->section->repl != ds->section && !isDebugLine)) {
+        // If -z dead-reloc-in-nonalloc= is specified, respect it.
+        const uint64_t value = tombstone ? SignExtend64<bits>(*tombstone)
+                                         : (isDebugLocOrRanges ? 1 : 0);
+        target->relocateNoSym(bufLoc, type, value);
+        continue;
+      }
+    }
+    target->relocateNoSym(bufLoc, type, SignExtend64<bits>(sym.getVA(addend)));
   }
 }
 
@@ -904,7 +970,7 @@ static void relocateNonAllocForRelocatable(InputSection *sec, uint8_t *buf) {
     assert(rel.expr == R_ABS);
     uint8_t *bufLoc = buf + rel.offset + sec->outSecOff;
     uint64_t targetVA = SignExtend64(rel.sym->getVA(rel.addend), bits);
-    target->relocateOne(bufLoc, rel.type, targetVA);
+    target->relocate(bufLoc, rel, targetVA);
   }
 }
 
@@ -932,6 +998,8 @@ void InputSectionBase::relocateAlloc(uint8_t *buf, uint8_t *bufEnd) {
   const unsigned bits = config->wordsize * 8;
 
   for (const Relocation &rel : relocations) {
+    if (rel.expr == R_NONE)
+      continue;
     uint64_t offset = rel.offset;
     if (auto *sec = dyn_cast<InputSection>(this))
       offset += sec->outSecOff;
@@ -947,29 +1015,35 @@ void InputSectionBase::relocateAlloc(uint8_t *buf, uint8_t *bufEnd) {
     switch (expr) {
     case R_RELAX_GOT_PC:
     case R_RELAX_GOT_PC_NOPIC:
-      target->relaxGot(bufLoc, type, targetVA);
+      target->relaxGot(bufLoc, rel, targetVA);
       break;
     case R_PPC64_RELAX_TOC:
-      if (!tryRelaxPPC64TocIndirection(type, rel, bufLoc))
-        target->relocateOne(bufLoc, type, targetVA);
+      // rel.sym refers to the STT_SECTION symbol associated to the .toc input
+      // section. If an R_PPC64_TOC16_LO (.toc + addend) references the TOC
+      // entry, there may be R_PPC64_TOC16_HA not paired with
+      // R_PPC64_TOC16_LO_DS. Don't relax. This loses some relaxation
+      // opportunities but is safe.
+      if (ppc64noTocRelax.count({rel.sym, rel.addend}) ||
+          !tryRelaxPPC64TocIndirection(rel, bufLoc))
+        target->relocate(bufLoc, rel, targetVA);
       break;
     case R_RELAX_TLS_IE_TO_LE:
-      target->relaxTlsIeToLe(bufLoc, type, targetVA);
+      target->relaxTlsIeToLe(bufLoc, rel, targetVA);
       break;
     case R_RELAX_TLS_LD_TO_LE:
     case R_RELAX_TLS_LD_TO_LE_ABS:
-      target->relaxTlsLdToLe(bufLoc, type, targetVA);
+      target->relaxTlsLdToLe(bufLoc, rel, targetVA);
       break;
     case R_RELAX_TLS_GD_TO_LE:
     case R_RELAX_TLS_GD_TO_LE_NEG:
-      target->relaxTlsGdToLe(bufLoc, type, targetVA);
+      target->relaxTlsGdToLe(bufLoc, rel, targetVA);
       break;
     case R_AARCH64_RELAX_TLS_GD_TO_IE_PAGE_PC:
     case R_RELAX_TLS_GD_TO_IE:
     case R_RELAX_TLS_GD_TO_IE_ABS:
     case R_RELAX_TLS_GD_TO_IE_GOT_OFF:
     case R_RELAX_TLS_GD_TO_IE_GOTPLT:
-      target->relaxTlsGdToIe(bufLoc, type, targetVA);
+      target->relaxTlsGdToIe(bufLoc, rel, targetVA);
       break;
     case R_PPC64_CALL:
       // If this is a call to __tls_get_addr, it may be part of a TLS
@@ -994,13 +1068,25 @@ void InputSectionBase::relocateAlloc(uint8_t *buf, uint8_t *bufEnd) {
         }
         write32(bufLoc + 4, 0xe8410018); // ld %r2, 24(%r1)
       }
-      target->relocateOne(bufLoc, type, targetVA);
+      target->relocate(bufLoc, rel, targetVA);
       break;
     default:
-      target->relocateOne(bufLoc, type, targetVA);
+      target->relocate(bufLoc, rel, targetVA);
       break;
     }
   }
+
+  // Apply jumpInstrMods.  jumpInstrMods are created when the opcode of
+  // a jmp insn must be modified to shrink the jmp insn or to flip the jmp
+  // insn.  This is primarily used to relax and optimize jumps created with
+  // basic block sections.
+  if (auto *sec = dyn_cast<InputSection>(this)) {
+    for (const JumpInstrMod &jumpMod : jumpInstrMods) {
+      uint64_t offset = jumpMod.offset + sec->outSecOff;
+      uint8_t *bufLoc = buf + offset;
+      target->applyJumpInstrMod(bufLoc, jumpMod.original, jumpMod.size);
+    }
+  }
 }
 
 // For each function-defining prologue, find any calls to __morestack,
@@ -1098,7 +1184,7 @@ void InputSectionBase::adjustSplitStackFunctionPrologues(uint8_t *buf,
                                                    end, f->stOther))
         continue;
       if (!getFile<ELFT>()->someNoSplitStack)
-        error(toString(this) + ": " + f->getName() +
+        error(lld::toString(this) + ": " + f->getName() +
               " (with -fsplit-stack) calls " + rel.sym->getName() +
               " (without -fsplit-stack), but couldn't adjust its prologue");
     }
@@ -1361,6 +1447,3 @@ template void EhInputSection::split<ELF32LE>();
 template void EhInputSection::split<ELF32BE>();
 template void EhInputSection::split<ELF64LE>();
 template void EhInputSection::split<ELF64BE>();
-
-} // namespace elf
-} // namespace lld
index 7314b27..032cd4b 100644 (file)
@@ -873,7 +873,6 @@ void LinkerScript::assignOffsets(OutputSection *sec) {
     expandMemoryRegion(ctx->memRegion, dot - ctx->memRegion->curPos,
                        ctx->memRegion->name, sec->name);
 
-  switchTo(sec);
 
   // ctx->lmaOffset is LMA minus VMA. If LMA is explicitly specified via AT() or
   // AT>, recompute ctx->lmaOffset; otherwise, if both previous/current LMA
@@ -888,6 +887,8 @@ void LinkerScript::assignOffsets(OutputSection *sec) {
   else if (!sameMemRegion || !prevLMARegionIsDefault)
     ctx->lmaOffset = 0;
 
+  switchTo(sec);
+
   // Propagate ctx->lmaOffset to the first "non-header" section.
   if (PhdrEntry *l = ctx->outSec->ptLoad)
     if (sec == findFirstSection(l))
index c3c1309..470e92a 100644 (file)
@@ -232,8 +232,9 @@ def icf_safe: F<"icf=safe">, HelpText<"Enable safe identical code folding">;
 
 def icf_none: F<"icf=none">, HelpText<"Disable identical code folding (default)">;
 
-def ignore_function_address_equality: F<"ignore-function-address-equality">,
-  HelpText<"lld can break the address equality of functions">;
+defm ignore_function_address_equality: B<"ignore-function-address-equality",
+  "lld can break the address equality of functions",
+  "lld cannot break the address equality of functions">;
 
 def ignore_data_address_equality: F<"ignore-data-address-equality">,
   HelpText<"lld can break the address equality of data">;
@@ -489,6 +490,7 @@ def: Separate<["-"], "F">, Alias<filter>, HelpText<"Alias for --filter">;
 def: Separate<["-"], "b">, Alias<format>, HelpText<"Alias for --format">;
 def: JoinedOrSeparate<["-"], "l">, Alias<library>, HelpText<"Alias for --library">;
 def: JoinedOrSeparate<["-"], "L">, Alias<library_path>, HelpText<"Alias for --library-path">;
+def: F<"nopie">, Alias<no_pie>, HelpText<"Alias for --no-pie">;
 def: F<"no-pic-executable">, Alias<no_pie>, HelpText<"Alias for --no-pie">;
 def: Flag<["-"], "n">, Alias<nmagic>, HelpText<"Alias for --nmagic">;
 def: Flag<["-"], "N">, Alias<omagic>, HelpText<"Alias for --omagic">;
index 8d3cdba..751ded3 100644 (file)
@@ -62,9 +62,9 @@ using namespace llvm;
 using namespace llvm::ELF;
 using namespace llvm::object;
 using namespace llvm::support::endian;
+using namespace lld;
+using namespace lld::elf;
 
-namespace lld {
-namespace elf {
 static Optional<std::string> getLinkerScriptLocation(const Symbol &sym) {
   for (BaseCommand *base : script->sectionCommands)
     if (auto *cmd = dyn_cast<SymbolAssignment>(base))
@@ -73,6 +73,15 @@ static Optional<std::string> getLinkerScriptLocation(const Symbol &sym) {
   return None;
 }
 
+static std::string getDefinedLocation(const Symbol &sym) {
+  std::string msg = "\n>>> defined in ";
+  if (sym.file)
+    msg += toString(sym.file);
+  else if (Optional<std::string> loc = getLinkerScriptLocation(sym))
+    msg += *loc;
+  return msg;
+}
+
 // Construct a message in the following format.
 //
 // >>> defined in /home/alice/src/foo.o
@@ -80,19 +89,30 @@ static Optional<std::string> getLinkerScriptLocation(const Symbol &sym) {
 // >>>               /home/alice/src/bar.o:(.text+0x1)
 static std::string getLocation(InputSectionBase &s, const Symbol &sym,
                                uint64_t off) {
-  std::string msg = "\n>>> defined in ";
-  if (sym.file)
-    msg += toString(sym.file);
-  else if (Optional<std::string> loc = getLinkerScriptLocation(sym))
-    msg += *loc;
-
-  msg += "\n>>> referenced by ";
+  std::string msg = getDefinedLocation(sym) + "\n>>> referenced by ";
   std::string src = s.getSrcMsg(sym, off);
   if (!src.empty())
     msg += src + "\n>>>               ";
   return msg + s.getObjMsg(off);
 }
 
+void elf::reportRangeError(uint8_t *loc, const Relocation &rel, const Twine &v,
+                           int64_t min, uint64_t max) {
+  ErrorPlace errPlace = getErrorPlace(loc);
+  std::string hint;
+  if (rel.sym && !rel.sym->isLocal())
+    hint = "; references " + lld::toString(*rel.sym) +
+           getDefinedLocation(*rel.sym);
+
+  if (errPlace.isec && errPlace.isec->name.startswith(".debug"))
+    hint += "; consider recompiling with -fdebug-types-section to reduce size "
+            "of debug sections";
+
+  errorOrWarn(errPlace.loc + "relocation " + lld::toString(rel.type) +
+              " out of range: " + v.str() + " is not in [" + Twine(min).str() +
+              ", " + Twine(max).str() + "]" + hint);
+}
+
 namespace {
 // Build a bitmask with one bit set for each RelExpr.
 //
@@ -177,9 +197,9 @@ handleTlsRelocation(RelType type, Symbol &sym, InputSectionBase &c,
     return 1;
   }
 
-  bool canRelax = config->emachine != EM_ARM &&
-                  config->emachine != EM_HEXAGON &&
-                  config->emachine != EM_RISCV;
+  bool toExecRelax = !config->shared && config->emachine != EM_ARM &&
+                     config->emachine != EM_HEXAGON &&
+                     config->emachine != EM_RISCV;
 
   // If we are producing an executable and the symbol is non-preemptable, it
   // must be defined and the code sequence can be relaxed to use Local-Exec.
@@ -197,7 +217,7 @@ handleTlsRelocation(RelType type, Symbol &sym, InputSectionBase &c,
   if (oneof<R_TLSLD_GOT, R_TLSLD_GOTPLT, R_TLSLD_PC, R_TLSLD_HINT>(
           expr)) {
     // Local-Dynamic relocs can be relaxed to Local-Exec.
-    if (canRelax && !config->shared) {
+    if (toExecRelax) {
       c.relocations.push_back(
           {target->adjustRelaxExpr(type, nullptr, R_RELAX_TLS_LD_TO_LE), type,
            offset, addend, &sym});
@@ -218,7 +238,7 @@ handleTlsRelocation(RelType type, Symbol &sym, InputSectionBase &c,
   }
 
   // Local-Dynamic relocs can be relaxed to Local-Exec.
-  if (expr == R_DTPREL && !config->shared) {
+  if (expr == R_DTPREL && toExecRelax) {
     c.relocations.push_back(
         {target->adjustRelaxExpr(type, nullptr, R_RELAX_TLS_LD_TO_LE), type,
          offset, addend, &sym});
@@ -240,7 +260,7 @@ handleTlsRelocation(RelType type, Symbol &sym, InputSectionBase &c,
 
   if (oneof<R_AARCH64_TLSDESC_PAGE, R_TLSDESC, R_TLSDESC_CALL, R_TLSDESC_PC,
             R_TLSGD_GOT, R_TLSGD_GOTPLT, R_TLSGD_PC>(expr)) {
-    if (!canRelax || config->shared) {
+    if (!toExecRelax) {
       if (in.got->addDynTlsEntry(sym)) {
         uint64_t off = in.got->getGlobalDynOffset(sym);
 
@@ -288,7 +308,7 @@ handleTlsRelocation(RelType type, Symbol &sym, InputSectionBase &c,
   // defined.
   if (oneof<R_GOT, R_GOTPLT, R_GOT_PC, R_AARCH64_GOT_PAGE_PC, R_GOT_OFF,
             R_TLSIE_HINT>(expr) &&
-      canRelax && isLocalInExecutable) {
+      toExecRelax && isLocalInExecutable) {
     c.relocations.push_back({R_RELAX_TLS_IE_TO_LE, type, offset, addend, &sym});
     return 1;
   }
@@ -761,7 +781,7 @@ static const Symbol *getAlternativeSpelling(const Undefined &sym,
       break;
 
     // Substitute name[i].
-    newName = name;
+    newName = std::string(name);
     for (char c = '0'; c <= 'z'; ++c) {
       newName[i] = c;
       if (const Symbol *s = suggest(newName))
@@ -850,7 +870,7 @@ static void reportUndefinedSymbol(const UndefinedDiag &undef,
   if (msg.empty())
     msg = "undefined " + visibility() + "symbol: " + toString(sym);
 
-  const size_t maxUndefReferences = 10;
+  const size_t maxUndefReferences = 3;
   size_t i = 0;
   for (UndefinedDiag::Loc l : undef.locs) {
     if (i >= maxUndefReferences)
@@ -881,8 +901,9 @@ static void reportUndefinedSymbol(const UndefinedDiag &undef,
   }
 
   if (sym.getName().startswith("_ZTV"))
-    msg += "\nthe vtable symbol may be undefined because the class is missing "
-           "its key function (see https://lld.llvm.org/missingkeyfunction)";
+    msg +=
+        "\n>>> the vtable symbol may be undefined because the class is missing "
+        "its key function (see https://lld.llvm.org/missingkeyfunction)";
 
   if (undef.isWarning)
     warn(msg);
@@ -890,7 +911,7 @@ static void reportUndefinedSymbol(const UndefinedDiag &undef,
     error(msg);
 }
 
-template <class ELFT> void reportUndefinedSymbols() {
+template <class ELFT> void elf::reportUndefinedSymbols() {
   // Find the first "undefined symbol" diagnostic for each diagnostic, and
   // collect all "referenced from" lines at the first diagnostic.
   DenseMap<Symbol *, UndefinedDiag *> firstRef;
@@ -1210,6 +1231,7 @@ static void processRelocAux(InputSectionBase &sec, RelExpr expr, RelType type,
           // PPC32 canonical PLT entries are at the beginning of .glink
           cast<Defined>(sym).value = in.plt->headerSize;
           in.plt->headerSize += 16;
+          cast<PPC32GlinkSection>(in.plt)->canonical_plts.push_back(&sym);
         }
       }
       sym.needsPltAddr = true;
@@ -1272,17 +1294,6 @@ static void scanReloc(InputSectionBase &sec, OffsetGetter &getOffset, RelTy *&i,
   if (expr == R_NONE)
     return;
 
-  // We can separate the small code model relocations into 2 categories:
-  // 1) Those that access the compiler generated .toc sections.
-  // 2) Those that access the linker allocated got entries.
-  // lld allocates got entries to symbols on demand. Since we don't try to sort
-  // the got entries in any way, we don't have to track which objects have
-  // got-based small code model relocs. The .toc sections get placed after the
-  // end of the linker allocated .got section and we do sort those so sections
-  // addressed with small code model relocations come first.
-  if (config->emachine == EM_PPC64 && isPPC64SmallCodeModelTocReloc(type))
-    sec.file->ppc64SmallCodeModelTocRelocs = true;
-
   if (sym.isGnuIFunc() && !config->zText && config->warnIfuncTextrel) {
     warn("using ifunc symbols when text relocations are allowed may produce "
          "a binary that will segfault, if the object file is linked with "
@@ -1296,6 +1307,25 @@ static void scanReloc(InputSectionBase &sec, OffsetGetter &getOffset, RelTy *&i,
   // Read an addend.
   int64_t addend = computeAddend<ELFT>(rel, end, sec, expr, sym.isLocal());
 
+  if (config->emachine == EM_PPC64) {
+    // We can separate the small code model relocations into 2 categories:
+    // 1) Those that access the compiler generated .toc sections.
+    // 2) Those that access the linker allocated got entries.
+    // lld allocates got entries to symbols on demand. Since we don't try to
+    // sort the got entries in any way, we don't have to track which objects
+    // have got-based small code model relocs. The .toc sections get placed
+    // after the end of the linker allocated .got section and we do sort those
+    // so sections addressed with small code model relocations come first.
+    if (isPPC64SmallCodeModelTocReloc(type))
+      sec.file->ppc64SmallCodeModelTocRelocs = true;
+
+    // Record the TOC entry (.toc + addend) as not relaxable. See the comment in
+    // InputSectionBase::relocateAlloc().
+    if (type == R_PPC64_TOC16_LO && sym.isSection() && isa<Defined>(sym) &&
+        cast<Defined>(sym).section->name == ".toc")
+      ppc64noTocRelax.insert({&sym, addend});
+  }
+
   // Relax relocations.
   //
   // If we know that a PLT entry will be resolved within the same ELF module, we
@@ -1312,6 +1342,12 @@ static void scanReloc(InputSectionBase &sec, OffsetGetter &getOffset, RelTy *&i,
       // stub type. It should be ignored if optimized to R_PC.
       if (config->emachine == EM_PPC && expr == R_PPC32_PLTREL)
         addend &= ~0x8000;
+      // R_HEX_GD_PLT_B22_PCREL (call a@GDPLT) is transformed into
+      // call __tls_get_addr even if the symbol is non-preemptible.
+      if (!(config->emachine == EM_HEXAGON &&
+           (type == R_HEX_GD_PLT_B22_PCREL ||
+            type == R_HEX_GD_PLT_B22_PCREL_X ||
+            type == R_HEX_GD_PLT_B32_PCREL_X)))
       expr = fromPlt(expr);
     }
   }
@@ -1478,7 +1514,7 @@ static void scanRelocs(InputSectionBase &sec, ArrayRef<RelTy> rels) {
                       });
 }
 
-template <class ELFT> void scanRelocations(InputSectionBase &s) {
+template <class ELFT> void elf::scanRelocations(InputSectionBase &s) {
   if (s.areRelocsRela)
     scanRelocs<ELFT>(s, s.relas<ELFT>());
   else
@@ -1959,14 +1995,49 @@ bool ThunkCreator::createThunks(ArrayRef<OutputSection *> outputSections) {
   return addressesChanged;
 }
 
-template void scanRelocations<ELF32LE>(InputSectionBase &);
-template void scanRelocations<ELF32BE>(InputSectionBase &);
-template void scanRelocations<ELF64LE>(InputSectionBase &);
-template void scanRelocations<ELF64BE>(InputSectionBase &);
-template void reportUndefinedSymbols<ELF32LE>();
-template void reportUndefinedSymbols<ELF32BE>();
-template void reportUndefinedSymbols<ELF64LE>();
-template void reportUndefinedSymbols<ELF64BE>();
-
-} // namespace elf
-} // namespace lld
+// The following aid in the conversion of call x@GDPLT to call __tls_get_addr
+// hexagonNeedsTLSSymbol scans for relocations would require a call to
+// __tls_get_addr.
+// hexagonTLSSymbolUpdate rebinds the relocation to __tls_get_addr.
+bool elf::hexagonNeedsTLSSymbol(ArrayRef<OutputSection *> outputSections) {
+  bool needTlsSymbol = false;
+  forEachInputSectionDescription(
+      outputSections, [&](OutputSection *os, InputSectionDescription *isd) {
+        for (InputSection *isec : isd->sections)
+          for (Relocation &rel : isec->relocations)
+            if (rel.sym->type == llvm::ELF::STT_TLS && rel.expr == R_PLT_PC) {
+              needTlsSymbol = true;
+              return;
+            }
+      });
+  return needTlsSymbol;
+}
+
+void elf::hexagonTLSSymbolUpdate(ArrayRef<OutputSection *> outputSections) {
+  Symbol *sym = symtab->find("__tls_get_addr");
+  if (!sym)
+    return;
+  bool needEntry = true;
+  forEachInputSectionDescription(
+      outputSections, [&](OutputSection *os, InputSectionDescription *isd) {
+        for (InputSection *isec : isd->sections)
+          for (Relocation &rel : isec->relocations)
+            if (rel.sym->type == llvm::ELF::STT_TLS && rel.expr == R_PLT_PC) {
+              if (needEntry) {
+                addPltEntry(in.plt, in.gotPlt, in.relaPlt, target->pltRel,
+                            *sym);
+                needEntry = false;
+              }
+              rel.sym = sym;
+            }
+      });
+}
+
+template void elf::scanRelocations<ELF32LE>(InputSectionBase &);
+template void elf::scanRelocations<ELF32BE>(InputSectionBase &);
+template void elf::scanRelocations<ELF64LE>(InputSectionBase &);
+template void elf::scanRelocations<ELF64BE>(InputSectionBase &);
+template void elf::reportUndefinedSymbols<ELF32LE>();
+template void elf::reportUndefinedSymbols<ELF32BE>();
+template void elf::reportUndefinedSymbols<ELF64LE>();
+template void elf::reportUndefinedSymbols<ELF64BE>();
index 8f2f554..8371b3a 100644 (file)
@@ -50,6 +50,7 @@ std::string lld::toELFString(const Archive::Symbol &b) {
 }
 
 Defined *ElfSym::bss;
+Defined *ElfSym::data;
 Defined *ElfSym::etext1;
 Defined *ElfSym::etext2;
 Defined *ElfSym::edata1;
index b69d263..097b96a 100644 (file)
@@ -425,6 +425,9 @@ struct ElfSym {
   // __bss_start
   static Defined *bss;
 
+  // __data_start
+  static Defined *data;
+
   // etext and _etext
   static Defined *etext1;
   static Defined *etext2;
index e28eeeb..7f8bc16 100644 (file)
 #include "Symbols.h"
 #include "Target.h"
 #include "Writer.h"
+#include "lld/Common/DWARF.h"
 #include "lld/Common/ErrorHandler.h"
 #include "lld/Common/Memory.h"
 #include "lld/Common/Strings.h"
-#include "lld/Common/Threads.h"
 #include "lld/Common/Version.h"
 #include "llvm/ADT/SetOperations.h"
+#include "llvm/ADT/SetVector.h"
 #include "llvm/ADT/StringExtras.h"
 #include "llvm/BinaryFormat/Dwarf.h"
 #include "llvm/DebugInfo/DWARF/DWARFDebugPubTable.h"
@@ -36,6 +37,8 @@
 #include "llvm/Support/Endian.h"
 #include "llvm/Support/LEB128.h"
 #include "llvm/Support/MD5.h"
+#include "llvm/Support/Parallel.h"
+#include "llvm/Support/TimeProfiler.h"
 #include <cstdlib>
 #include <thread>
 
@@ -44,13 +47,13 @@ using namespace llvm::dwarf;
 using namespace llvm::ELF;
 using namespace llvm::object;
 using namespace llvm::support;
+using namespace lld;
+using namespace lld::elf;
 
 using llvm::support::endian::read32le;
 using llvm::support::endian::write32le;
 using llvm::support::endian::write64le;
 
-namespace lld {
-namespace elf {
 constexpr size_t MergeNoTailSection::numShards;
 
 static uint64_t readUint(uint8_t *buf) {
@@ -81,7 +84,7 @@ static ArrayRef<uint8_t> getVersion() {
 // With this feature, you can identify LLD-generated binaries easily
 // by "readelf --string-dump .comment <file>".
 // The returned object is a mergeable string section.
-MergeInputSection *createCommentSection() {
+MergeInputSection *elf::createCommentSection() {
   return make<MergeInputSection>(SHF_MERGE | SHF_STRINGS, SHT_PROGBITS, 1,
                                  getVersion(), ".comment");
 }
@@ -137,7 +140,7 @@ MipsAbiFlagsSection<ELFT> *MipsAbiFlagsSection<ELFT>::create() {
     flags.ases |= s->ases;
     flags.flags1 |= s->flags1;
     flags.flags2 |= s->flags2;
-    flags.fp_abi = getMipsFpAbiFlag(flags.fp_abi, s->fp_abi, filename);
+    flags.fp_abi = elf::getMipsFpAbiFlag(flags.fp_abi, s->fp_abi, filename);
   };
 
   if (create)
@@ -251,7 +254,7 @@ MipsReginfoSection<ELFT> *MipsReginfoSection<ELFT>::create() {
   return make<MipsReginfoSection<ELFT>>(reginfo);
 }
 
-InputSection *createInterpSection() {
+InputSection *elf::createInterpSection() {
   // StringSaver guarantees that the returned string ends with '\0'.
   StringRef s = saver.save(config->dynamicLinker);
   ArrayRef<uint8_t> contents = {(const uint8_t *)s.data(), s.size() + 1};
@@ -260,8 +263,8 @@ InputSection *createInterpSection() {
                             ".interp");
 }
 
-Defined *addSyntheticLocal(StringRef name, uint8_t type, uint64_t value,
-                           uint64_t size, InputSectionBase &section) {
+Defined *elf::addSyntheticLocal(StringRef name, uint8_t type, uint64_t value,
+                                uint64_t size, InputSectionBase &section) {
   auto *s = make<Defined>(section.file, name, STB_LOCAL, STV_DEFAULT, type,
                           value, size, &section);
   if (in.symTab)
@@ -1275,7 +1278,7 @@ static uint64_t addPltRelSz() {
 
 // Add remaining entries to complete .dynamic contents.
 template <class ELFT> void DynamicSection<ELFT>::finalizeContents() {
-  Partition &part = getPartition();
+  elf::Partition &part = getPartition();
   bool isMain = part.name.empty();
 
   for (StringRef s : config->filterList)
@@ -1317,6 +1320,8 @@ template <class ELFT> void DynamicSection<ELFT>::finalizeContents() {
     dtFlags1 |= DF_1_NODELETE;
   if (config->zNodlopen)
     dtFlags1 |= DF_1_NOOPEN;
+  if (config->pie)
+    dtFlags1 |= DF_1_PIE;
   if (config->zNow) {
     dtFlags |= DF_BIND_NOW;
     dtFlags1 |= DF_1_NOW;
@@ -1402,7 +1407,7 @@ template <class ELFT> void DynamicSection<ELFT>::finalizeContents() {
   if (config->emachine == EM_AARCH64) {
     if (config->andFeatures & GNU_PROPERTY_AARCH64_FEATURE_1_BTI)
       addInt(DT_AARCH64_BTI_PLT, 0);
-    if (config->andFeatures & GNU_PROPERTY_AARCH64_FEATURE_1_PAC)
+    if (config->zPacPlt)
       addInt(DT_AARCH64_PAC_PLT, 0);
   }
 
@@ -2151,7 +2156,7 @@ template <class ELFT> void SymbolTableSection<ELFT>::writeTo(uint8_t *buf) {
       eSym->st_size = sym->getSize();
 
     // st_value is usually an address of a symbol, but that has a
-    // special meaining for uninstantiated common symbols (this can
+    // special meaning for uninstantiated common symbols (this can
     // occur if -r is given).
     if (BssSection *commonSec = getCommonSec(ent.sym))
       eSym->st_value = commonSec->alignment;
@@ -2178,7 +2183,7 @@ template <class ELFT> void SymbolTableSection<ELFT>::writeTo(uint8_t *buf) {
         // We already set the less-significant bit for symbols
         // marked by the `STO_MIPS_MICROMIPS` flag and for microMIPS PLT
         // records. That allows us to distinguish such symbols in
-        // the `MIPS<ELFT>::relocateOne()` routine. Now we should
+        // the `MIPS<ELFT>::relocate()` routine. Now we should
         // clear that bit for non-dynamic symbol table, so tools
         // like `objdump` will be able to deal with a correct
         // symbol position.
@@ -2250,7 +2255,7 @@ size_t SymtabShndxSection::getSize() const {
 // DSOs. That means resolving all dynamic symbols takes O(m)*O(n)
 // where m is the number of DSOs and n is the number of dynamic
 // symbols. For modern large programs, both m and n are large.  So
-// making each step faster by using hash tables substiantially
+// making each step faster by using hash tables substantially
 // improves time to load programs.
 //
 // (Note that this is not the only way to design the shared library.
@@ -2448,12 +2453,9 @@ PltSection::PltSection()
     : SyntheticSection(SHF_ALLOC | SHF_EXECINSTR, SHT_PROGBITS, 16, ".plt"),
       headerSize(target->pltHeaderSize) {
   // On PowerPC, this section contains lazy symbol resolvers.
-  if (config->emachine == EM_PPC || config->emachine == EM_PPC64) {
+  if (config->emachine == EM_PPC64) {
     name = ".glink";
     alignment = 4;
-    // PLTresolve is at the end.
-    if (config->emachine == EM_PPC)
-      footerSize = 64;
   }
 
   // On x86 when IBT is enabled, this section contains the second PLT (lazy
@@ -2469,11 +2471,6 @@ PltSection::PltSection()
 }
 
 void PltSection::writeTo(uint8_t *buf) {
-  if (config->emachine == EM_PPC) {
-    writePPC32GlinkSection(buf, entries.size());
-    return;
-  }
-
   // At beginning of PLT, we have code to call the dynamic
   // linker to resolve dynsyms at runtime. Write such code.
   target->writePltHeader(buf);
@@ -2491,7 +2488,7 @@ void PltSection::addEntry(Symbol &sym) {
 }
 
 size_t PltSection::getSize() const {
-  return headerSize + entries.size() * target->pltEntrySize + footerSize;
+  return headerSize + entries.size() * target->pltEntrySize;
 }
 
 bool PltSection::isNeeded() const {
@@ -2545,6 +2542,19 @@ void IpltSection::addSymbols() {
   }
 }
 
+PPC32GlinkSection::PPC32GlinkSection() {
+  name = ".glink";
+  alignment = 4;
+}
+
+void PPC32GlinkSection::writeTo(uint8_t *buf) {
+  writePPC32GlinkSection(buf, entries.size());
+}
+
+size_t PPC32GlinkSection::getSize() const {
+  return headerSize + entries.size() * target->pltEntrySize + footerSize;
+}
+
 // This is an x86-only extra PLT section and used only when a security
 // enhancement feature called CET is enabled. In this comment, I'll explain what
 // the feature is and why we have two PLT sections if CET is enabled.
@@ -2646,15 +2656,6 @@ void GdbIndexSection::initOutputSize() {
   }
 }
 
-static std::vector<InputSection *> getDebugInfoSections() {
-  std::vector<InputSection *> ret;
-  for (InputSectionBase *s : inputSections)
-    if (InputSection *isec = dyn_cast<InputSection>(s))
-      if (isec->name == ".debug_info")
-        ret.push_back(isec);
-  return ret;
-}
-
 static std::vector<GdbIndexSection::CuEntry> readCuList(DWARFContext &dwarf) {
   std::vector<GdbIndexSection::CuEntry> ret;
   for (std::unique_ptr<DWARFUnit> &cu : dwarf.compile_units())
@@ -2669,12 +2670,12 @@ readAddressAreas(DWARFContext &dwarf, InputSection *sec) {
   uint32_t cuIdx = 0;
   for (std::unique_ptr<DWARFUnit> &cu : dwarf.compile_units()) {
     if (Error e = cu->tryExtractDIEsIfNeeded(false)) {
-      error(toString(sec) + ": " + toString(std::move(e)));
+      warn(toString(sec) + ": " + toString(std::move(e)));
       return {};
     }
     Expected<DWARFAddressRangesVector> ranges = cu->collectAddressRanges();
     if (!ranges) {
-      error(toString(sec) + ": " + toString(ranges.takeError()));
+      warn(toString(sec) + ": " + toString(ranges.takeError()));
       return {};
     }
 
@@ -2682,15 +2683,11 @@ readAddressAreas(DWARFContext &dwarf, InputSection *sec) {
     for (DWARFAddressRange &r : *ranges) {
       if (r.SectionIndex == -1ULL)
         continue;
-      InputSectionBase *s = sections[r.SectionIndex];
-      if (!s || s == &InputSection::discarded || !s->isLive())
-        continue;
       // Range list with zero size has no effect.
-      if (r.LowPC == r.HighPC)
-        continue;
-      auto *isec = cast<InputSection>(s);
-      uint64_t offset = isec->getOffsetInFile();
-      ret.push_back({isec, r.LowPC - offset, r.HighPC - offset, cuIdx});
+      InputSectionBase *s = sections[r.SectionIndex];
+      if (s && s != &InputSection::discarded && s->isLive())
+        if (r.LowPC != r.HighPC)
+          ret.push_back({cast<InputSection>(s), r.LowPC, r.HighPC, cuIdx});
     }
     ++cuIdx;
   }
@@ -2702,12 +2699,16 @@ template <class ELFT>
 static std::vector<GdbIndexSection::NameAttrEntry>
 readPubNamesAndTypes(const LLDDwarfObj<ELFT> &obj,
                      const std::vector<GdbIndexSection::CuEntry> &cus) {
-  const DWARFSection &pubNames = obj.getGnuPubnamesSection();
-  const DWARFSection &pubTypes = obj.getGnuPubtypesSection();
+  const LLDDWARFSection &pubNames = obj.getGnuPubnamesSection();
+  const LLDDWARFSection &pubTypes = obj.getGnuPubtypesSection();
 
   std::vector<GdbIndexSection::NameAttrEntry> ret;
-  for (const DWARFSection *pub : {&pubNames, &pubTypes}) {
-    DWARFDebugPubTable table(obj, *pub, config->isLE, true);
+  for (const LLDDWARFSection *pub : {&pubNames, &pubTypes}) {
+    DWARFDataExtractor data(obj, *pub, config->isLE, config->wordsize);
+    DWARFDebugPubTable table;
+    table.extract(data, /*GnuStyle=*/true, [&](Error e) {
+      warn(toString(pub->sec) + ": " + toString(std::move(e)));
+    });
     for (const DWARFDebugPubTable::Set &set : table.getData()) {
       // The value written into the constant pool is kind << 24 | cuIndex. As we
       // don't know how many compilation units precede this object to compute
@@ -2745,11 +2746,11 @@ createSymbols(ArrayRef<std::vector<GdbIndexSection::NameAttrEntry>> nameAttrs,
   // The number of symbols we will handle in this function is of the order
   // of millions for very large executables, so we use multi-threading to
   // speed it up.
-  size_t numShards = 32;
-  size_t concurrency = 1;
-  if (threadsEnabled)
-    concurrency =
-        std::min<size_t>(PowerOf2Floor(hardware_concurrency()), numShards);
+  constexpr size_t numShards = 32;
+  size_t concurrency = PowerOf2Floor(
+      std::min<size_t>(hardware_concurrency(parallel::strategy.ThreadsRequested)
+                           .compute_thread_count(),
+                       numShards));
 
   // A sharded map to uniquify symbols by name.
   std::vector<DenseMap<CachedHashStringRef, size_t>> map(numShards);
@@ -2808,28 +2809,40 @@ createSymbols(ArrayRef<std::vector<GdbIndexSection::NameAttrEntry>> nameAttrs,
 
 // Returns a newly-created .gdb_index section.
 template <class ELFT> GdbIndexSection *GdbIndexSection::create() {
-  std::vector<InputSection *> sections = getDebugInfoSections();
-
-  // .debug_gnu_pub{names,types} are useless in executables.
-  // They are present in input object files solely for creating
-  // a .gdb_index. So we can remove them from the output.
-  for (InputSectionBase *s : inputSections)
+  // Collect InputFiles with .debug_info. See the comment in
+  // LLDDwarfObj<ELFT>::LLDDwarfObj. If we do lightweight parsing in the future,
+  // note that isec->data() may uncompress the full content, which should be
+  // parallelized.
+  SetVector<InputFile *> files;
+  for (InputSectionBase *s : inputSections) {
+    InputSection *isec = dyn_cast<InputSection>(s);
+    if (!isec)
+      continue;
+    // .debug_gnu_pub{names,types} are useless in executables.
+    // They are present in input object files solely for creating
+    // a .gdb_index. So we can remove them from the output.
     if (s->name == ".debug_gnu_pubnames" || s->name == ".debug_gnu_pubtypes")
       s->markDead();
+    else if (isec->name == ".debug_info")
+      files.insert(isec->file);
+  }
 
-  std::vector<GdbChunk> chunks(sections.size());
-  std::vector<std::vector<NameAttrEntry>> nameAttrs(sections.size());
+  std::vector<GdbChunk> chunks(files.size());
+  std::vector<std::vector<NameAttrEntry>> nameAttrs(files.size());
 
-  parallelForEachN(0, sections.size(), [&](size_t i) {
-    ObjFile<ELFT> *file = sections[i]->getFile<ELFT>();
+  parallelForEachN(0, files.size(), [&](size_t i) {
+    // To keep memory usage low, we don't want to keep cached DWARFContext, so
+    // avoid getDwarf() here.
+    ObjFile<ELFT> *file = cast<ObjFile<ELFT>>(files[i]);
     DWARFContext dwarf(std::make_unique<LLDDwarfObj<ELFT>>(file));
+    auto &dobj = static_cast<const LLDDwarfObj<ELFT> &>(dwarf.getDWARFObj());
 
-    chunks[i].sec = sections[i];
+    // If the are multiple compile units .debug_info (very rare ld -r --unique),
+    // this only picks the last one. Other address ranges are lost.
+    chunks[i].sec = dobj.getInfoSection();
     chunks[i].compilationUnits = readCuList(dwarf);
-    chunks[i].addressAreas = readAddressAreas(dwarf, sections[i]);
-    nameAttrs[i] = readPubNamesAndTypes<ELFT>(
-        static_cast<const LLDDwarfObj<ELFT> &>(dwarf.getDWARFObj()),
-        chunks[i].compilationUnits);
+    chunks[i].addressAreas = readAddressAreas(dwarf, chunks[i].sec);
+    nameAttrs[i] = readPubNamesAndTypes<ELFT>(dobj, chunks[i].compilationUnits);
   });
 
   auto *ret = make<GdbIndexSection>();
@@ -3046,7 +3059,7 @@ bool VersionTableSection::isNeeded() const {
          (getPartition().verDef || getPartition().verNeed->isNeeded());
 }
 
-void addVerneed(Symbol *ss) {
+void elf::addVerneed(Symbol *ss) {
   auto &file = cast<SharedFile>(*ss->file);
   if (ss->verdefIndex == VER_NDX_GLOBAL) {
     ss->versionId = VER_NDX_GLOBAL;
@@ -3190,10 +3203,10 @@ void MergeNoTailSection::finalizeContents() {
 
   // Concurrency level. Must be a power of 2 to avoid expensive modulo
   // operations in the following tight loop.
-  size_t concurrency = 1;
-  if (threadsEnabled)
-    concurrency =
-        std::min<size_t>(PowerOf2Floor(hardware_concurrency()), numShards);
+  size_t concurrency = PowerOf2Floor(
+      std::min<size_t>(hardware_concurrency(parallel::strategy.ThreadsRequested)
+                           .compute_thread_count(),
+                       numShards));
 
   // Add section pieces to the builders.
   parallelForEachN(0, concurrency, [&](size_t threadId) {
@@ -3229,16 +3242,17 @@ void MergeNoTailSection::finalizeContents() {
   });
 }
 
-MergeSyntheticSection *createMergeSynthetic(StringRef name, uint32_t type,
-                                            uint64_t flags,
-                                            uint32_t alignment) {
+MergeSyntheticSection *elf::createMergeSynthetic(StringRef name, uint32_t type,
+                                                 uint64_t flags,
+                                                 uint32_t alignment) {
   bool shouldTailMerge = (flags & SHF_STRINGS) && config->optimize >= 2;
   if (shouldTailMerge)
     return make<MergeTailSection>(name, type, flags, alignment);
   return make<MergeNoTailSection>(name, type, flags, alignment);
 }
 
-template <class ELFT> void splitSections() {
+template <class ELFT> void elf::splitSections() {
+  llvm::TimeTraceScope timeScope("Split sections");
   // splitIntoPieces needs to be called on each MergeInputSection
   // before calling finalizeContents().
   parallelForEach(inputSections, [](InputSectionBase *sec) {
@@ -3259,7 +3273,7 @@ ARMExidxSyntheticSection::ARMExidxSyntheticSection()
 
 static InputSection *findExidxSection(InputSection *isec) {
   for (InputSection *d : isec->dependentSections)
-    if (d->type == SHT_ARM_EXIDX)
+    if (d->type == SHT_ARM_EXIDX && d->isLive())
       return d;
   return nullptr;
 }
@@ -3272,8 +3286,13 @@ static bool isValidExidxSectionDep(InputSection *isec) {
 bool ARMExidxSyntheticSection::addSection(InputSection *isec) {
   if (isec->type == SHT_ARM_EXIDX) {
     if (InputSection *dep = isec->getLinkOrderDep())
-      if (isValidExidxSectionDep(dep))
+      if (isValidExidxSectionDep(dep)) {
         exidxSections.push_back(isec);
+        // Every exidxSection is 8 bytes, we need an estimate of
+        // size before assignAddresses can be called. Final size
+        // will only be known after finalize is called.
+        size += 8;
+      }
     return true;
   }
 
@@ -3354,19 +3373,30 @@ void ARMExidxSyntheticSection::finalizeContents() {
   // ICF may remove executable InputSections and their dependent .ARM.exidx
   // section that we recorded earlier.
   auto isDiscarded = [](const InputSection *isec) { return !isec->isLive(); };
-  llvm::erase_if(executableSections, isDiscarded);
   llvm::erase_if(exidxSections, isDiscarded);
+  // We need to remove discarded InputSections and InputSections without
+  // .ARM.exidx sections that if we generated the .ARM.exidx it would be out
+  // of range.
+  auto isDiscardedOrOutOfRange = [this](InputSection *isec) {
+    if (!isec->isLive())
+      return true;
+    if (findExidxSection(isec))
+      return false;
+    int64_t off = static_cast<int64_t>(isec->getVA() - getVA());
+    return off != llvm::SignExtend64(off, 31);
+  };
+  llvm::erase_if(executableSections, isDiscardedOrOutOfRange);
 
   // Sort the executable sections that may or may not have associated
   // .ARM.exidx sections by order of ascending address. This requires the
-  // relative positions of InputSections to be known.
+  // relative positions of InputSections and OutputSections to be known.
   auto compareByFilePosition = [](const InputSection *a,
                                   const InputSection *b) {
     OutputSection *aOut = a->getParent();
     OutputSection *bOut = b->getParent();
 
     if (aOut != bOut)
-      return aOut->sectionIndex < bOut->sectionIndex;
+      return aOut->addr < bOut->addr;
     return a->outSecOff < b->outSecOff;
   };
   llvm::stable_sort(executableSections, compareByFilePosition);
@@ -3433,7 +3463,7 @@ void ARMExidxSyntheticSection::writeTo(uint8_t *buf) {
       memcpy(buf + offset, cantUnwindData, sizeof(cantUnwindData));
       uint64_t s = isec->getVA();
       uint64_t p = getVA() + offset;
-      target->relocateOne(buf + offset, R_ARM_PREL31, s - p);
+      target->relocateNoSym(buf + offset, R_ARM_PREL31, s - p);
       offset += 8;
     }
   }
@@ -3441,7 +3471,7 @@ void ARMExidxSyntheticSection::writeTo(uint8_t *buf) {
   memcpy(buf + offset, cantUnwindData, sizeof(cantUnwindData));
   uint64_t s = sentinel->getVA(sentinel->getSize());
   uint64_t p = getVA() + offset;
-  target->relocateOne(buf + offset, R_ARM_PREL31, s - p);
+  target->relocateNoSym(buf + offset, R_ARM_PREL31, s - p);
   assert(size == offset + 8);
 }
 
@@ -3607,7 +3637,7 @@ static uint8_t getAbiVersion() {
   return 0;
 }
 
-template <typename ELFT> void writeEhdr(uint8_t *buf, Partition &part) {
+template <typename ELFT> void elf::writeEhdr(uint8_t *buf, Partition &part) {
   // For executable segments, the trap instructions are written before writing
   // the header. Setting Elf header bytes to zero ensures that any unused bytes
   // in header are zero-cleared, instead of having trap instructions.
@@ -3633,7 +3663,7 @@ template <typename ELFT> void writeEhdr(uint8_t *buf, Partition &part) {
   }
 }
 
-template <typename ELFT> void writePhdrs(uint8_t *buf, Partition &part) {
+template <typename ELFT> void elf::writePhdrs(uint8_t *buf, Partition &part) {
   // Write the program header table.
   auto *hBuf = reinterpret_cast<typename ELFT::Phdr *>(buf);
   for (PhdrEntry *p : part.phdrs) {
@@ -3708,85 +3738,82 @@ void PartitionIndexSection::writeTo(uint8_t *buf) {
   }
 }
 
-InStruct in;
+InStruct elf::in;
 
-std::vector<Partition> partitions;
-Partition *mainPart;
+std::vector<Partition> elf::partitions;
+Partition *elf::mainPart;
 
 template GdbIndexSection *GdbIndexSection::create<ELF32LE>();
 template GdbIndexSection *GdbIndexSection::create<ELF32BE>();
 template GdbIndexSection *GdbIndexSection::create<ELF64LE>();
 template GdbIndexSection *GdbIndexSection::create<ELF64BE>();
 
-template void splitSections<ELF32LE>();
-template void splitSections<ELF32BE>();
-template void splitSections<ELF64LE>();
-template void splitSections<ELF64BE>();
-
-template class MipsAbiFlagsSection<ELF32LE>;
-template class MipsAbiFlagsSection<ELF32BE>;
-template class MipsAbiFlagsSection<ELF64LE>;
-template class MipsAbiFlagsSection<ELF64BE>;
-
-template class MipsOptionsSection<ELF32LE>;
-template class MipsOptionsSection<ELF32BE>;
-template class MipsOptionsSection<ELF64LE>;
-template class MipsOptionsSection<ELF64BE>;
-
-template class MipsReginfoSection<ELF32LE>;
-template class MipsReginfoSection<ELF32BE>;
-template class MipsReginfoSection<ELF64LE>;
-template class MipsReginfoSection<ELF64BE>;
-
-template class DynamicSection<ELF32LE>;
-template class DynamicSection<ELF32BE>;
-template class DynamicSection<ELF64LE>;
-template class DynamicSection<ELF64BE>;
-
-template class RelocationSection<ELF32LE>;
-template class RelocationSection<ELF32BE>;
-template class RelocationSection<ELF64LE>;
-template class RelocationSection<ELF64BE>;
-
-template class AndroidPackedRelocationSection<ELF32LE>;
-template class AndroidPackedRelocationSection<ELF32BE>;
-template class AndroidPackedRelocationSection<ELF64LE>;
-template class AndroidPackedRelocationSection<ELF64BE>;
-
-template class RelrSection<ELF32LE>;
-template class RelrSection<ELF32BE>;
-template class RelrSection<ELF64LE>;
-template class RelrSection<ELF64BE>;
-
-template class SymbolTableSection<ELF32LE>;
-template class SymbolTableSection<ELF32BE>;
-template class SymbolTableSection<ELF64LE>;
-template class SymbolTableSection<ELF64BE>;
-
-template class VersionNeedSection<ELF32LE>;
-template class VersionNeedSection<ELF32BE>;
-template class VersionNeedSection<ELF64LE>;
-template class VersionNeedSection<ELF64BE>;
-
-template void writeEhdr<ELF32LE>(uint8_t *Buf, Partition &Part);
-template void writeEhdr<ELF32BE>(uint8_t *Buf, Partition &Part);
-template void writeEhdr<ELF64LE>(uint8_t *Buf, Partition &Part);
-template void writeEhdr<ELF64BE>(uint8_t *Buf, Partition &Part);
-
-template void writePhdrs<ELF32LE>(uint8_t *Buf, Partition &Part);
-template void writePhdrs<ELF32BE>(uint8_t *Buf, Partition &Part);
-template void writePhdrs<ELF64LE>(uint8_t *Buf, Partition &Part);
-template void writePhdrs<ELF64BE>(uint8_t *Buf, Partition &Part);
-
-template class PartitionElfHeaderSection<ELF32LE>;
-template class PartitionElfHeaderSection<ELF32BE>;
-template class PartitionElfHeaderSection<ELF64LE>;
-template class PartitionElfHeaderSection<ELF64BE>;
-
-template class PartitionProgramHeadersSection<ELF32LE>;
-template class PartitionProgramHeadersSection<ELF32BE>;
-template class PartitionProgramHeadersSection<ELF64LE>;
-template class PartitionProgramHeadersSection<ELF64BE>;
-
-} // namespace elf
-} // namespace lld
+template void elf::splitSections<ELF32LE>();
+template void elf::splitSections<ELF32BE>();
+template void elf::splitSections<ELF64LE>();
+template void elf::splitSections<ELF64BE>();
+
+template class elf::MipsAbiFlagsSection<ELF32LE>;
+template class elf::MipsAbiFlagsSection<ELF32BE>;
+template class elf::MipsAbiFlagsSection<ELF64LE>;
+template class elf::MipsAbiFlagsSection<ELF64BE>;
+
+template class elf::MipsOptionsSection<ELF32LE>;
+template class elf::MipsOptionsSection<ELF32BE>;
+template class elf::MipsOptionsSection<ELF64LE>;
+template class elf::MipsOptionsSection<ELF64BE>;
+
+template class elf::MipsReginfoSection<ELF32LE>;
+template class elf::MipsReginfoSection<ELF32BE>;
+template class elf::MipsReginfoSection<ELF64LE>;
+template class elf::MipsReginfoSection<ELF64BE>;
+
+template class elf::DynamicSection<ELF32LE>;
+template class elf::DynamicSection<ELF32BE>;
+template class elf::DynamicSection<ELF64LE>;
+template class elf::DynamicSection<ELF64BE>;
+
+template class elf::RelocationSection<ELF32LE>;
+template class elf::RelocationSection<ELF32BE>;
+template class elf::RelocationSection<ELF64LE>;
+template class elf::RelocationSection<ELF64BE>;
+
+template class elf::AndroidPackedRelocationSection<ELF32LE>;
+template class elf::AndroidPackedRelocationSection<ELF32BE>;
+template class elf::AndroidPackedRelocationSection<ELF64LE>;
+template class elf::AndroidPackedRelocationSection<ELF64BE>;
+
+template class elf::RelrSection<ELF32LE>;
+template class elf::RelrSection<ELF32BE>;
+template class elf::RelrSection<ELF64LE>;
+template class elf::RelrSection<ELF64BE>;
+
+template class elf::SymbolTableSection<ELF32LE>;
+template class elf::SymbolTableSection<ELF32BE>;
+template class elf::SymbolTableSection<ELF64LE>;
+template class elf::SymbolTableSection<ELF64BE>;
+
+template class elf::VersionNeedSection<ELF32LE>;
+template class elf::VersionNeedSection<ELF32BE>;
+template class elf::VersionNeedSection<ELF64LE>;
+template class elf::VersionNeedSection<ELF64BE>;
+
+template void elf::writeEhdr<ELF32LE>(uint8_t *Buf, Partition &Part);
+template void elf::writeEhdr<ELF32BE>(uint8_t *Buf, Partition &Part);
+template void elf::writeEhdr<ELF64LE>(uint8_t *Buf, Partition &Part);
+template void elf::writeEhdr<ELF64BE>(uint8_t *Buf, Partition &Part);
+
+template void elf::writePhdrs<ELF32LE>(uint8_t *Buf, Partition &Part);
+template void elf::writePhdrs<ELF32BE>(uint8_t *Buf, Partition &Part);
+template void elf::writePhdrs<ELF64LE>(uint8_t *Buf, Partition &Part);
+template void elf::writePhdrs<ELF64BE>(uint8_t *Buf, Partition &Part);
+
+template class elf::PartitionElfHeaderSection<ELF32LE>;
+template class elf::PartitionElfHeaderSection<ELF32BE>;
+template class elf::PartitionElfHeaderSection<ELF64LE>;
+template class elf::PartitionElfHeaderSection<ELF64BE>;
+
+template class elf::PartitionProgramHeadersSection<ELF32LE>;
+template class elf::PartitionProgramHeadersSection<ELF32BE>;
+template class elf::PartitionProgramHeadersSection<ELF64LE>;
+template class elf::PartitionProgramHeadersSection<ELF64BE>;
index b9fd03b..c271294 100644 (file)
@@ -140,7 +140,8 @@ StringRef elf::getOutputSectionName(const InputSectionBase *s) {
   for (StringRef v :
        {".text.", ".rodata.", ".data.rel.ro.", ".data.", ".bss.rel.ro.",
         ".bss.", ".init_array.", ".fini_array.", ".ctors.", ".dtors.", ".tbss.",
-        ".gcc_except_table.", ".tdata.", ".ARM.exidx.", ".ARM.extab."})
+        ".gcc_except_table.", ".tdata.", ".ARM.exidx.", ".ARM.extab.",
+        ".openbsd.randomdata."})
     if (isSectionPrefix(v, s->name))
       return v.drop_back();
 
@@ -319,6 +320,7 @@ void elf::addReservedSymbols() {
   };
 
   ElfSym::bss = add("__bss_start", 0);
+  ElfSym::data = add("__data_start", 0);
   ElfSym::end1 = add("end", -1);
   ElfSym::end2 = add("_end", -1);
   ElfSym::etext1 = add("etext", -1);
@@ -870,7 +872,11 @@ static bool isRelroSection(const OutputSection *sec) {
   // However, if "-z now" is given, the lazy symbol resolution is
   // disabled, which enables us to put it into RELRO.
   if (sec == in.gotPlt->getParent())
+#ifndef __OpenBSD__
     return config->zNow;
+#else
+    return true;       /* kbind(2) means we can always put these in RELRO */
+#endif
 
   // .dynamic section contains data for the dynamic linker, and
   // there's no need to write to it at runtime, so it's better to put
@@ -1180,6 +1186,9 @@ template <class ELFT> void Writer<ELFT>::setReservedSymbolSections() {
   if (ElfSym::bss)
     ElfSym::bss->section = findSection(".bss");
 
+  if (ElfSym::data)
+    ElfSym::data->section = findSection(".data");
+
   // Setup MIPS _gp_disp/__gnu_local_gp symbols which should
   // be equal to the _gp symbol's value.
   if (ElfSym::mipsGp) {
@@ -2500,6 +2509,31 @@ template <class ELFT> void Writer<ELFT>::fixSectionAlignments() {
     }
   };
 
+#ifdef __OpenBSD__
+  // On i386, produce binaries that are compatible with our W^X implementation
+  if (config->emachine == EM_386) {
+    auto NXAlign = [](OutputSection *Cmd) {
+      if (Cmd && !Cmd->addrExpr)
+        Cmd->addrExpr = [=] {
+          return alignTo(script->getDot(), 0x20000000);
+        };
+    };
+
+    for (Partition &part : partitions) {
+      PhdrEntry *firstRW = nullptr;
+      for (PhdrEntry *P : part.phdrs) {
+        if (P->p_type == PT_LOAD && (P->p_flags & PF_W)) {
+          firstRW = P;
+          break;
+        }
+      }
+
+      if (firstRW)
+        NXAlign(firstRW->firstSec);
+    }
+  }
+#endif
+
   for (Partition &part : partitions) {
     prev = nullptr;
     for (const PhdrEntry *p : part.phdrs)
index 3698544..c2d96ad 100644 (file)
@@ -30,7 +30,7 @@ template <class ELFT> void writeResult();
 // placed in it.
 struct PhdrEntry {
   PhdrEntry(unsigned type, unsigned flags)
-      : p_align(type == llvm::ELF::PT_LOAD ? config->maxPageSize : 0),
+      : p_align(type == llvm::ELF::PT_LOAD ? config->textAlignPageSize : 0),
         p_type(type), p_flags(flags) {}
   void add(OutputSection *sec);
 
diff --git a/gnu/llvm/lld/include/lld/Common/Threads.h b/gnu/llvm/lld/include/lld/Common/Threads.h
deleted file mode 100644 (file)
index 7834130..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-//===- Threads.h ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// LLD supports threads to distribute workloads to multiple cores. Using
-// multicore is most effective when more than one core are idle. At the
-// last step of a build, it is often the case that a linker is the only
-// active process on a computer. So, we are naturally interested in using
-// threads wisely to reduce latency to deliver results to users.
-//
-// That said, we don't want to do "too clever" things using threads.
-// Complex multi-threaded algorithms are sometimes extremely hard to
-// reason about and can easily mess up the entire design.
-//
-// Fortunately, when a linker links large programs (when the link time is
-// most critical), it spends most of the time to work on massive number of
-// small pieces of data of the same kind, and there are opportunities for
-// large parallelism there. Here are examples:
-//
-//  - We have hundreds of thousands of input sections that need to be
-//    copied to a result file at the last step of link. Once we fix a file
-//    layout, each section can be copied to its destination and its
-//    relocations can be applied independently.
-//
-//  - We have tens of millions of small strings when constructing a
-//    mergeable string section.
-//
-// For the cases such as the former, we can just use parallelForEach
-// instead of std::for_each (or a plain for loop). Because tasks are
-// completely independent from each other, we can run them in parallel
-// without any coordination between them. That's very easy to understand
-// and reason about.
-//
-// For the cases such as the latter, we can use parallel algorithms to
-// deal with massive data. We have to write code for a tailored algorithm
-// for each problem, but the complexity of multi-threading is isolated in
-// a single pass and doesn't affect the linker's overall design.
-//
-// The above approach seems to be working fairly well. As an example, when
-// linking Chromium (output size 1.6 GB), using 4 cores reduces latency to
-// 75% compared to single core (from 12.66 seconds to 9.55 seconds) on my
-// Ivy Bridge Xeon 2.8 GHz machine. Using 40 cores reduces it to 63% (from
-// 12.66 seconds to 7.95 seconds). Because of the Amdahl's law, the
-// speedup is not linear, but as you add more cores, it gets faster.
-//
-// On a final note, if you are trying to optimize, keep the axiom "don't
-// guess, measure!" in mind. Some important passes of the linker are not
-// that slow. For example, resolving all symbols is not a very heavy pass,
-// although it would be very hard to parallelize it. You want to first
-// identify a slow pass and then optimize it.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLD_COMMON_THREADS_H
-#define LLD_COMMON_THREADS_H
-
-#include "llvm/Support/Parallel.h"
-#include <functional>
-
-namespace lld {
-
-extern bool threadsEnabled;
-
-template <typename R, class FuncTy> void parallelForEach(R &&range, FuncTy fn) {
-  if (threadsEnabled)
-    for_each(llvm::parallel::par, std::begin(range), std::end(range), fn);
-  else
-    for_each(llvm::parallel::seq, std::begin(range), std::end(range), fn);
-}
-
-inline void parallelForEachN(size_t begin, size_t end,
-                             llvm::function_ref<void(size_t)> fn) {
-  if (threadsEnabled)
-    for_each_n(llvm::parallel::par, begin, end, fn);
-  else
-    for_each_n(llvm::parallel::seq, begin, end, fn);
-}
-
-template <typename R, class FuncTy> void parallelSort(R &&range, FuncTy fn) {
-  if (threadsEnabled)
-    sort(llvm::parallel::par, std::begin(range), std::end(range), fn);
-  else
-    sort(llvm::parallel::seq, std::begin(range), std::end(range), fn);
-}
-
-} // namespace lld
-
-#endif
index 8a8f8d0..4b3d54d 100644 (file)
@@ -67,6 +67,7 @@ static Flavor getFlavor(StringRef s) {
       .Default(Invalid);
 }
 
+#ifndef __OpenBSD__
 static cl::TokenizerCallback getDefaultQuotingStyle() {
   if (Triple(sys::getProcessTriple()).getOS() == Triple::Win32)
     return cl::TokenizeWindowsCommandLine;
@@ -94,6 +95,7 @@ static bool isPETarget(std::vector<const char *> &v) {
   }
   return false;
 }
+#endif
 
 static Flavor parseProgname(StringRef progname) {
   // Use GNU driver for "ld" by default.
@@ -144,9 +146,12 @@ int main(int argc, const char **argv) {
   std::vector<const char *> args(argv, argv + argc);
   switch (parseFlavor(args)) {
   case Gnu:
+#ifndef __OpenBSD__
     if (isPETarget(args))
       return !mingw::link(args, canExitEarly(), llvm::outs(), llvm::errs());
+#endif
     return !elf::link(args, canExitEarly(), llvm::outs(), llvm::errs());
+#ifndef __OpenBSD__
   case WinLink:
     return !coff::link(args, canExitEarly(), llvm::outs(), llvm::errs());
   case Darwin:
@@ -155,6 +160,7 @@ int main(int argc, const char **argv) {
     return !macho::link(args, canExitEarly(), llvm::outs(), llvm::errs());
   case Wasm:
     return !wasm::link(args, canExitEarly(), llvm::outs(), llvm::errs());
+#endif
   default:
     die("lld is a generic driver.\n"
         "Invoke ld.lld (Unix), ld64.lld (macOS), lld-link (Windows), wasm-ld"
diff --git a/gnu/llvm/lldb/.arcconfig b/gnu/llvm/lldb/.arcconfig
deleted file mode 100644 (file)
index e8fa2aa..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-{
-  "project_id" : "lldb",
-  "conduit_uri" : "https://reviews.llvm.org/"
-}
diff --git a/gnu/llvm/lldb/include/lldb/Core/ClangForward.h b/gnu/llvm/lldb/include/lldb/Core/ClangForward.h
deleted file mode 100644 (file)
index 0bc3314..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-//===-- ClangForward.h ------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_ClangForward_h_
-#define liblldb_ClangForward_h_
-
-
-#if defined(__cplusplus)
-
-namespace clang {
-namespace Builtin {
-class Context;
-}
-
-class ASTConsumer;
-class ASTContext;
-class ASTRecordLayout;
-class AddrLabelExpr;
-class AnalyzerOptions;
-class BinaryOperator;
-class ClassTemplateDecl;
-class ClassTemplateSpecializationDecl;
-class CodeGenOptions;
-class CodeGenerator;
-class CompilerInstance;
-class CompoundStmt;
-class CXXBaseSpecifier;
-class CXXBoolLiteralExpr;
-class CXXFunctionalCastExpr;
-class CXXMethodDecl;
-class CXXNamedCastExpr;
-class CXXRecordDecl;
-class CXXThisExpr;
-class CharacterLiteral;
-class CompoundAssignOperator;
-class Decl;
-class DeclarationName;
-class DeclaratorDecl;
-class DeclContext;
-class DeclRefExpr;
-class DeclStmt;
-class DependencyOutputOptions;
-class Diagnostic;
-class DiagnosticConsumer;
-class DiagnosticsEngine;
-class DiagnosticOptions;
-class EnumDecl;
-class EnumConstantDecl;
-class Expr;
-class ExternalASTSource;
-class ExtVectorElementExpr;
-class FieldDecl;
-class FileManager;
-class FileSystemOptions;
-class FloatingLiteral;
-class FrontendOptions;
-class FunctionDecl;
-class FunctionTemplateDecl;
-class FunctionTemplateSpecializationInfo;
-class GotoStmt;
-class HeaderSearchOptions;
-class IdentifierInfo;
-class IdentifierTable;
-class IntegerLiteral;
-class LabelStmt;
-class LangOptions;
-class MacroDirective;
-class MemberExpr;
-class Module;
-class NamedDecl;
-class NamespaceDecl;
-class NonTypeTemplateParmDecl;
-class ObjCEncodeExpr;
-class ObjCImplicitSetterGetterRefExpr;
-class ObjCInterfaceDecl;
-class ObjCIvarDecl;
-class ObjCIvarRefExpr;
-class ObjCMessageExpr;
-class ObjCMethodDecl;
-class ObjCPropertyRefExpr;
-class ObjCProtocolDecl;
-class ObjCProtocolExpr;
-class ObjCSelectorExpr;
-class ObjCSuperExpr;
-class ParenExpr;
-class ParmVarDecl;
-class PredefinedExpr;
-class PreprocessorOptions;
-class PreprocessorOutputOptions;
-class QualType;
-class QualifiedNameType;
-class RecordDecl;
-class SelectorTable;
-class SizeOfAlignOfExpr;
-class SourceLocation;
-class SourceManager;
-class Stmt;
-class StmtIteratorBase;
-class StringLiteral;
-class TagDecl;
-class TargetInfo;
-class TargetOptions;
-class TemplateArgument;
-class TemplateDecl;
-class TemplateParameterList;
-class TemplateTemplateParmDecl;
-class TemplateTypeParmDecl;
-class TextDiagnosticBuffer;
-class TranslationUnitDecl;
-class Type;
-class TypeDecl;
-class TypedefDecl;
-class TypesCompatibleExpr;
-class UnaryOperator;
-class ValueDecl;
-class VarDecl;
-struct PrintingPolicy;
-}
-
-namespace llvm {
-class APInt;
-class APSInt;
-class LLVMContext;
-class ExecutionEngine;
-}
-
-#endif // #if defined(__cplusplus)
-#endif // liblldb_ClangForward_h_
diff --git a/gnu/llvm/lldb/include/lldb/Host/TaskPool.h b/gnu/llvm/lldb/include/lldb/Host/TaskPool.h
deleted file mode 100644 (file)
index 49805ce..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-//===--------------------- TaskPool.h ---------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef utility_TaskPool_h_
-#define utility_TaskPool_h_
-
-#include "llvm/ADT/STLExtras.h"
-#include <functional>
-#include <future>
-#include <list>
-#include <memory>
-#include <mutex>
-#include <type_traits>
-
-namespace lldb_private {
-
-// Global TaskPool class for running tasks in parallel on a set of worker
-// thread created the first time the task pool is used. The TaskPool provide no
-// guarantee about the order the task will be run and about what tasks will run
-// in parallel. None of the task added to the task pool should block on
-// something (mutex, future, condition variable) what will be set only by the
-// completion of an other task on the task pool as they may run on the same
-// thread sequentally.
-class TaskPool {
-public:
-  // Add a new task to the task pool and return a std::future belonging to the
-  // newly created task. The caller of this function has to wait on the future
-  // for this task to complete.
-  template <typename F, typename... Args>
-  static std::future<typename std::result_of<F(Args...)>::type>
-  AddTask(F &&f, Args &&... args);
-
-  // Run all of the specified tasks on the task pool and wait until all of them
-  // are finished before returning. This method is intended to be used for
-  // small number tasks where listing them as function arguments is acceptable.
-  // For running large number of tasks you should use AddTask for each task and
-  // then call wait() on each returned future.
-  template <typename... T> static void RunTasks(T &&... tasks);
-
-private:
-  TaskPool() = delete;
-
-  template <typename... T> struct RunTaskImpl;
-
-  static void AddTaskImpl(std::function<void()> &&task_fn);
-};
-
-template <typename F, typename... Args>
-std::future<typename std::result_of<F(Args...)>::type>
-TaskPool::AddTask(F &&f, Args &&... args) {
-  auto task_sp = std::make_shared<
-      std::packaged_task<typename std::result_of<F(Args...)>::type()>>(
-      std::bind(std::forward<F>(f), std::forward<Args>(args)...));
-
-  AddTaskImpl([task_sp]() { (*task_sp)(); });
-
-  return task_sp->get_future();
-}
-
-template <typename... T> void TaskPool::RunTasks(T &&... tasks) {
-  RunTaskImpl<T...>::Run(std::forward<T>(tasks)...);
-}
-
-template <typename Head, typename... Tail>
-struct TaskPool::RunTaskImpl<Head, Tail...> {
-  static void Run(Head &&h, Tail &&... t) {
-    auto f = AddTask(std::forward<Head>(h));
-    RunTaskImpl<Tail...>::Run(std::forward<Tail>(t)...);
-    f.wait();
-  }
-};
-
-template <> struct TaskPool::RunTaskImpl<> {
-  static void Run() {}
-};
-
-// Run 'func' on every value from begin .. end-1.  Each worker will grab
-// 'batch_size' numbers at a time to work on, so for very fast functions, batch
-// should be large enough to avoid too much cache line contention.
-void TaskMapOverInt(size_t begin, size_t end,
-                    const llvm::function_ref<void(size_t)> &func);
-
-unsigned GetHardwareConcurrencyHint();
-
-} // namespace lldb_private
-
-#endif // #ifndef utility_TaskPool_h_
index 7ec1d5f..3661578 100644 (file)
 namespace lldb_private {
 
 class HostInfoOpenBSD : public HostInfoPosix {
+  friend class HostInfoBase;
+
 public:
   static llvm::VersionTuple GetOSVersion();
   static bool GetOSBuildString(std::string &s);
   static bool GetOSKernelDescription(std::string &s);
   static FileSpec GetProgramFileSpec();
+
+protected:
+  static bool ComputeSupportExeDirectory(FileSpec &file_spec);
 };
 }
 
diff --git a/gnu/llvm/lldb/include/lldb/Symbol/ClangASTContext.h b/gnu/llvm/lldb/include/lldb/Symbol/ClangASTContext.h
deleted file mode 100644 (file)
index 338417b..0000000
+++ /dev/null
@@ -1,1006 +0,0 @@
-//===-- ClangASTContext.h ---------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_ClangASTContext_h_
-#define liblldb_ClangASTContext_h_
-
-#include <stdint.h>
-
-#include <functional>
-#include <initializer_list>
-#include <map>
-#include <memory>
-#include <set>
-#include <string>
-#include <utility>
-#include <vector>
-
-#include "clang/AST/ASTContext.h"
-#include "clang/AST/TemplateBase.h"
-#include "llvm/ADT/APSInt.h"
-#include "llvm/ADT/SmallVector.h"
-
-#include "lldb/Core/ClangForward.h"
-#include "lldb/Expression/ExpressionVariable.h"
-#include "lldb/Symbol/CompilerType.h"
-#include "lldb/Symbol/TypeSystem.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Utility/ConstString.h"
-#include "lldb/Utility/Log.h"
-#include "lldb/Utility/Logging.h"
-#include "lldb/lldb-enumerations.h"
-
-class DWARFASTParserClang;
-class PDBASTParser;
-
-namespace lldb_private {
-
-class Declaration;
-
-class ClangASTContext : public TypeSystem {
-  // LLVM RTTI support
-  static char ID;
-
-public:
-  typedef void (*CompleteTagDeclCallback)(void *baton, clang::TagDecl *);
-  typedef void (*CompleteObjCInterfaceDeclCallback)(void *baton,
-                                                    clang::ObjCInterfaceDecl *);
-
-  // llvm casting support
-  bool isA(const void *ClassID) const override { return ClassID == &ID; }
-  static bool classof(const TypeSystem *ts) { return ts->isA(&ID); }
-
-  /// Constructs a ClangASTContext with an ASTContext using the given triple.
-  ///
-  /// \param triple The llvm::Triple used for the ASTContext. The triple defines
-  ///               certain characteristics of the ASTContext and its types
-  ///               (e.g., whether certain primitive types exist or what their
-  ///               signedness is).
-  explicit ClangASTContext(llvm::Triple triple);
-
-  /// Constructs a ClangASTContext that uses an existing ASTContext internally.
-  /// Useful when having an existing ASTContext created by Clang.
-  ///
-  /// \param existing_ctxt An existing ASTContext.
-  explicit ClangASTContext(clang::ASTContext &existing_ctxt);
-
-  ~ClangASTContext() override;
-
-  void Finalize() override;
-
-  // PluginInterface functions
-  ConstString GetPluginName() override;
-
-  uint32_t GetPluginVersion() override;
-
-  static ConstString GetPluginNameStatic();
-
-  static lldb::TypeSystemSP CreateInstance(lldb::LanguageType language,
-                                           Module *module, Target *target);
-
-  static LanguageSet GetSupportedLanguagesForTypes();
-  static LanguageSet GetSupportedLanguagesForExpressions();
-
-  static void Initialize();
-
-  static void Terminate();
-
-  static ClangASTContext *GetASTContext(clang::ASTContext *ast_ctx);
-
-  static ClangASTContext *GetScratch(Target &target,
-                                     bool create_on_demand = true) {
-    auto type_system_or_err = target.GetScratchTypeSystemForLanguage(
-        lldb::eLanguageTypeC, create_on_demand);
-    if (auto err = type_system_or_err.takeError()) {
-      LLDB_LOG_ERROR(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_TARGET),
-                     std::move(err), "Couldn't get scratch ClangASTContext");
-      return nullptr;
-    }
-    return llvm::dyn_cast<ClangASTContext>(&type_system_or_err.get());
-  }
-
-  clang::ASTContext &getASTContext();
-
-  clang::MangleContext *getMangleContext();
-
-  std::shared_ptr<clang::TargetOptions> &getTargetOptions();
-
-  clang::TargetInfo *getTargetInfo();
-
-  void setSema(clang::Sema *s);
-  clang::Sema *getSema() { return m_sema; }
-
-  const char *GetTargetTriple();
-
-  void SetExternalSource(
-      llvm::IntrusiveRefCntPtr<clang::ExternalASTSource> &ast_source_up);
-
-  bool GetCompleteDecl(clang::Decl *decl) {
-    return ClangASTContext::GetCompleteDecl(&getASTContext(), decl);
-  }
-
-  static void DumpDeclHiearchy(clang::Decl *decl);
-
-  static void DumpDeclContextHiearchy(clang::DeclContext *decl_ctx);
-
-  static bool DeclsAreEquivalent(clang::Decl *lhs_decl, clang::Decl *rhs_decl);
-
-  static bool GetCompleteDecl(clang::ASTContext *ast, clang::Decl *decl);
-
-  void SetMetadataAsUserID(const clang::Decl *decl, lldb::user_id_t user_id);
-  void SetMetadataAsUserID(const clang::Type *type, lldb::user_id_t user_id);
-
-  void SetMetadata(const clang::Decl *object, ClangASTMetadata &meta_data);
-
-  void SetMetadata(const clang::Type *object, ClangASTMetadata &meta_data);
-  ClangASTMetadata *GetMetadata(const clang::Decl *object);
-  ClangASTMetadata *GetMetadata(const clang::Type *object);
-
-  // Basic Types
-  CompilerType GetBuiltinTypeForEncodingAndBitSize(lldb::Encoding encoding,
-                                                   size_t bit_size) override;
-
-  CompilerType GetBasicType(lldb::BasicType type);
-
-  static lldb::BasicType GetBasicTypeEnumeration(ConstString name);
-
-  CompilerType
-  GetBuiltinTypeForDWARFEncodingAndBitSize(llvm::StringRef type_name,
-                                           uint32_t dw_ate, uint32_t bit_size);
-
-  CompilerType GetCStringType(bool is_const);
-
-  static clang::DeclContext *GetDeclContextForType(clang::QualType type);
-
-  static clang::DeclContext *GetDeclContextForType(const CompilerType &type);
-
-  uint32_t GetPointerByteSize() override;
-
-  clang::TranslationUnitDecl *GetTranslationUnitDecl() {
-    return getASTContext().getTranslationUnitDecl();
-  }
-
-  static bool AreTypesSame(CompilerType type1, CompilerType type2,
-                           bool ignore_qualifiers = false);
-
-  /// Creates a CompilerType form the given QualType with the current
-  /// ClangASTContext instance as the CompilerType's typesystem.
-  /// \param qt The QualType for a type that belongs to the ASTContext of this
-  ///           ClangASTContext.
-  /// \return The CompilerType representing the given QualType. If the
-  ///         QualType's type pointer is a nullptr then the function returns an
-  ///         invalid CompilerType.
-  CompilerType GetType(clang::QualType qt) {
-    if (qt.getTypePtrOrNull() == nullptr)
-      return CompilerType();
-    // Check that the type actually belongs to this ClangASTContext.
-    assert(qt->getAsTagDecl() == nullptr ||
-           &qt->getAsTagDecl()->getASTContext() == &getASTContext());
-    return CompilerType(this, qt.getAsOpaquePtr());
-  }
-
-  CompilerType GetTypeForDecl(clang::NamedDecl *decl);
-
-  CompilerType GetTypeForDecl(clang::TagDecl *decl);
-
-  CompilerType GetTypeForDecl(clang::ObjCInterfaceDecl *objc_decl);
-
-  template <typename RecordDeclType>
-  CompilerType
-  GetTypeForIdentifier(ConstString type_name,
-                       clang::DeclContext *decl_context = nullptr) {
-    CompilerType compiler_type;
-
-    if (type_name.GetLength()) {
-      clang::ASTContext &ast = getASTContext();
-      if (!decl_context)
-        decl_context = ast.getTranslationUnitDecl();
-
-      clang::IdentifierInfo &myIdent = ast.Idents.get(type_name.GetCString());
-      clang::DeclarationName myName =
-          ast.DeclarationNames.getIdentifier(&myIdent);
-
-      clang::DeclContext::lookup_result result = decl_context->lookup(myName);
-
-      if (!result.empty()) {
-        clang::NamedDecl *named_decl = result[0];
-        if (const RecordDeclType *record_decl =
-                llvm::dyn_cast<RecordDeclType>(named_decl))
-          compiler_type.SetCompilerType(
-              this, clang::QualType(record_decl->getTypeForDecl(), 0)
-                        .getAsOpaquePtr());
-      }
-    }
-
-    return compiler_type;
-  }
-
-  CompilerType CreateStructForIdentifier(
-      ConstString type_name,
-      const std::initializer_list<std::pair<const char *, CompilerType>>
-          &type_fields,
-      bool packed = false);
-
-  CompilerType GetOrCreateStructForIdentifier(
-      ConstString type_name,
-      const std::initializer_list<std::pair<const char *, CompilerType>>
-          &type_fields,
-      bool packed = false);
-
-  static bool IsOperator(llvm::StringRef name,
-                         clang::OverloadedOperatorKind &op_kind);
-
-  // Structure, Unions, Classes
-
-  static clang::AccessSpecifier
-  ConvertAccessTypeToAccessSpecifier(lldb::AccessType access);
-
-  static clang::AccessSpecifier
-  UnifyAccessSpecifiers(clang::AccessSpecifier lhs, clang::AccessSpecifier rhs);
-
-  static uint32_t GetNumBaseClasses(const clang::CXXRecordDecl *cxx_record_decl,
-                                    bool omit_empty_base_classes);
-
-  CompilerType CreateRecordType(clang::DeclContext *decl_ctx,
-                                lldb::AccessType access_type,
-                                llvm::StringRef name, int kind,
-                                lldb::LanguageType language,
-                                ClangASTMetadata *metadata = nullptr,
-                                bool exports_symbols = false);
-
-  class TemplateParameterInfos {
-  public:
-    bool IsValid() const {
-      if (args.empty())
-        return false;
-      return args.size() == names.size() &&
-        ((bool)pack_name == (bool)packed_args) &&
-        (!packed_args || !packed_args->packed_args);
-    }
-
-    llvm::SmallVector<const char *, 2> names;
-    llvm::SmallVector<clang::TemplateArgument, 2> args;
-    
-    const char * pack_name = nullptr;
-    std::unique_ptr<TemplateParameterInfos> packed_args;
-  };
-
-  clang::FunctionTemplateDecl *
-  CreateFunctionTemplateDecl(clang::DeclContext *decl_ctx,
-                             clang::FunctionDecl *func_decl, const char *name,
-                             const TemplateParameterInfos &infos);
-
-  void CreateFunctionTemplateSpecializationInfo(
-      clang::FunctionDecl *func_decl, clang::FunctionTemplateDecl *Template,
-      const TemplateParameterInfos &infos);
-
-  clang::ClassTemplateDecl *
-  CreateClassTemplateDecl(clang::DeclContext *decl_ctx,
-                          lldb::AccessType access_type, const char *class_name,
-                          int kind, const TemplateParameterInfos &infos);
-
-  clang::TemplateTemplateParmDecl *
-  CreateTemplateTemplateParmDecl(const char *template_name);
-
-  clang::ClassTemplateSpecializationDecl *CreateClassTemplateSpecializationDecl(
-      clang::DeclContext *decl_ctx,
-      clang::ClassTemplateDecl *class_template_decl, int kind,
-      const TemplateParameterInfos &infos);
-
-  CompilerType
-  CreateClassTemplateSpecializationType(clang::ClassTemplateSpecializationDecl *
-                                            class_template_specialization_decl);
-
-  static clang::DeclContext *
-  GetAsDeclContext(clang::FunctionDecl *function_decl);
-
-  static bool CheckOverloadedOperatorKindParameterCount(
-      bool is_method, clang::OverloadedOperatorKind op_kind,
-      uint32_t num_params);
-
-  bool FieldIsBitfield(clang::FieldDecl *field, uint32_t &bitfield_bit_size);
-
-  static bool RecordHasFields(const clang::RecordDecl *record_decl);
-
-  CompilerType CreateObjCClass(llvm::StringRef name,
-                               clang::DeclContext *decl_ctx, bool isForwardDecl,
-                               bool isInternal,
-                               ClangASTMetadata *metadata = nullptr);
-
-  bool SetTagTypeKind(clang::QualType type, int kind) const;
-
-  bool SetDefaultAccessForRecordFields(clang::RecordDecl *record_decl,
-                                       int default_accessibility,
-                                       int *assigned_accessibilities,
-                                       size_t num_assigned_accessibilities);
-
-  // Returns a mask containing bits from the ClangASTContext::eTypeXXX
-  // enumerations
-
-  // Namespace Declarations
-
-  clang::NamespaceDecl *
-  GetUniqueNamespaceDeclaration(const char *name, clang::DeclContext *decl_ctx,
-                                bool is_inline = false);
-
-  // Function Types
-
-  clang::FunctionDecl *
-  CreateFunctionDeclaration(clang::DeclContext *decl_ctx, const char *name,
-                            const CompilerType &function_Type, int storage,
-                            bool is_inline);
-
-  CompilerType CreateFunctionType(const CompilerType &result_type,
-                                  const CompilerType *args, unsigned num_args,
-                                  bool is_variadic, unsigned type_quals,
-                                  clang::CallingConv cc);
-
-  CompilerType CreateFunctionType(const CompilerType &result_type,
-                                  const CompilerType *args, unsigned num_args,
-                                  bool is_variadic, unsigned type_quals) {
-    return CreateFunctionType(result_type, args, num_args, is_variadic,
-                              type_quals, clang::CC_C);
-  }
-
-  clang::ParmVarDecl *CreateParameterDeclaration(clang::DeclContext *decl_ctx,
-                                                 const char *name,
-                                                 const CompilerType &param_type,
-                                                 int storage,
-                                                 bool add_decl=false);
-
-  void SetFunctionParameters(clang::FunctionDecl *function_decl,
-                             clang::ParmVarDecl **params, unsigned num_params);
-
-  CompilerType CreateBlockPointerType(const CompilerType &function_type);
-
-  // Array Types
-
-  CompilerType CreateArrayType(const CompilerType &element_type,
-                               size_t element_count, bool is_vector);
-
-  // Enumeration Types
-  CompilerType CreateEnumerationType(const char *name,
-                                     clang::DeclContext *decl_ctx,
-                                     const Declaration &decl,
-                                     const CompilerType &integer_qual_type,
-                                     bool is_scoped);
-
-  // Integer type functions
-
-  CompilerType GetIntTypeFromBitSize(size_t bit_size, bool is_signed);
-
-  CompilerType GetPointerSizedIntType(bool is_signed);
-
-  // Floating point functions
-
-  static CompilerType GetFloatTypeFromBitSize(clang::ASTContext *ast,
-                                              size_t bit_size);
-
-  // TypeSystem methods
-  DWARFASTParser *GetDWARFParser() override;
-  PDBASTParser *GetPDBParser() override;
-
-  // ClangASTContext callbacks for external source lookups.
-  void CompleteTagDecl(clang::TagDecl *);
-
-  void CompleteObjCInterfaceDecl(clang::ObjCInterfaceDecl *);
-
-  bool LayoutRecordType(
-      const clang::RecordDecl *record_decl, uint64_t &size, uint64_t &alignment,
-      llvm::DenseMap<const clang::FieldDecl *, uint64_t> &field_offsets,
-      llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits>
-          &base_offsets,
-      llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits>
-          &vbase_offsets);
-
-  // CompilerDecl override functions
-  ConstString DeclGetName(void *opaque_decl) override;
-
-  ConstString DeclGetMangledName(void *opaque_decl) override;
-
-  CompilerDeclContext DeclGetDeclContext(void *opaque_decl) override;
-
-  CompilerType DeclGetFunctionReturnType(void *opaque_decl) override;
-
-  size_t DeclGetFunctionNumArguments(void *opaque_decl) override;
-
-  CompilerType DeclGetFunctionArgumentType(void *opaque_decl,
-                                           size_t arg_idx) override;
-
-  CompilerType GetTypeForDecl(void *opaque_decl) override;
-
-  // CompilerDeclContext override functions
-
-  /// Creates a CompilerDeclContext from the given DeclContext
-  /// with the current ClangASTContext instance as its typesystem.
-  /// The DeclContext has to come from the ASTContext of this
-  /// ClangASTContext.
-  CompilerDeclContext CreateDeclContext(clang::DeclContext *ctx);
-
-  std::vector<CompilerDecl>
-  DeclContextFindDeclByName(void *opaque_decl_ctx, ConstString name,
-                            const bool ignore_using_decls) override;
-
-  ConstString DeclContextGetName(void *opaque_decl_ctx) override;
-
-  ConstString DeclContextGetScopeQualifiedName(void *opaque_decl_ctx) override;
-
-  bool DeclContextIsClassMethod(void *opaque_decl_ctx,
-                                lldb::LanguageType *language_ptr,
-                                bool *is_instance_method_ptr,
-                                ConstString *language_object_name_ptr) override;
-
-  bool DeclContextIsContainedInLookup(void *opaque_decl_ctx,
-                                      void *other_opaque_decl_ctx) override;
-
-  // Clang specific clang::DeclContext functions
-
-  static clang::DeclContext *
-  DeclContextGetAsDeclContext(const CompilerDeclContext &dc);
-
-  static clang::ObjCMethodDecl *
-  DeclContextGetAsObjCMethodDecl(const CompilerDeclContext &dc);
-
-  static clang::CXXMethodDecl *
-  DeclContextGetAsCXXMethodDecl(const CompilerDeclContext &dc);
-
-  static clang::FunctionDecl *
-  DeclContextGetAsFunctionDecl(const CompilerDeclContext &dc);
-
-  static clang::NamespaceDecl *
-  DeclContextGetAsNamespaceDecl(const CompilerDeclContext &dc);
-
-  static ClangASTMetadata *DeclContextGetMetaData(const CompilerDeclContext &dc,
-                                                  const clang::Decl *object);
-
-  static clang::ASTContext *
-  DeclContextGetClangASTContext(const CompilerDeclContext &dc);
-
-  // Tests
-
-  bool IsArrayType(lldb::opaque_compiler_type_t type,
-                   CompilerType *element_type, uint64_t *size,
-                   bool *is_incomplete) override;
-
-  bool IsVectorType(lldb::opaque_compiler_type_t type,
-                    CompilerType *element_type, uint64_t *size) override;
-
-  bool IsAggregateType(lldb::opaque_compiler_type_t type) override;
-
-  bool IsAnonymousType(lldb::opaque_compiler_type_t type) override;
-
-  bool IsBeingDefined(lldb::opaque_compiler_type_t type) override;
-
-  bool IsCharType(lldb::opaque_compiler_type_t type) override;
-
-  bool IsCompleteType(lldb::opaque_compiler_type_t type) override;
-
-  bool IsConst(lldb::opaque_compiler_type_t type) override;
-
-  bool IsCStringType(lldb::opaque_compiler_type_t type,
-                     uint32_t &length) override;
-
-  static bool IsCXXClassType(const CompilerType &type);
-
-  bool IsDefined(lldb::opaque_compiler_type_t type) override;
-
-  bool IsFloatingPointType(lldb::opaque_compiler_type_t type, uint32_t &count,
-                           bool &is_complex) override;
-
-  bool IsFunctionType(lldb::opaque_compiler_type_t type,
-                      bool *is_variadic_ptr) override;
-
-  uint32_t IsHomogeneousAggregate(lldb::opaque_compiler_type_t type,
-                                  CompilerType *base_type_ptr) override;
-
-  size_t
-  GetNumberOfFunctionArguments(lldb::opaque_compiler_type_t type) override;
-
-  CompilerType GetFunctionArgumentAtIndex(lldb::opaque_compiler_type_t type,
-                                          const size_t index) override;
-
-  bool IsFunctionPointerType(lldb::opaque_compiler_type_t type) override;
-
-  bool IsBlockPointerType(lldb::opaque_compiler_type_t type,
-                          CompilerType *function_pointer_type_ptr) override;
-
-  bool IsIntegerType(lldb::opaque_compiler_type_t type,
-                     bool &is_signed) override;
-
-  bool IsEnumerationType(lldb::opaque_compiler_type_t type,
-                         bool &is_signed) override;
-
-  static bool IsObjCClassType(const CompilerType &type);
-
-  static bool IsObjCClassTypeAndHasIVars(const CompilerType &type,
-                                         bool check_superclass);
-
-  static bool IsObjCObjectOrInterfaceType(const CompilerType &type);
-
-  static bool IsObjCObjectPointerType(const CompilerType &type,
-                                      CompilerType *target_type = nullptr);
-
-  bool IsPolymorphicClass(lldb::opaque_compiler_type_t type) override;
-
-  static bool IsClassType(lldb::opaque_compiler_type_t type);
-
-  static bool IsEnumType(lldb::opaque_compiler_type_t type);
-
-  bool IsPossibleDynamicType(lldb::opaque_compiler_type_t type,
-                             CompilerType *target_type, // Can pass nullptr
-                             bool check_cplusplus, bool check_objc) override;
-
-  bool IsRuntimeGeneratedType(lldb::opaque_compiler_type_t type) override;
-
-  bool IsPointerType(lldb::opaque_compiler_type_t type,
-                     CompilerType *pointee_type) override;
-
-  bool IsPointerOrReferenceType(lldb::opaque_compiler_type_t type,
-                                CompilerType *pointee_type) override;
-
-  bool IsReferenceType(lldb::opaque_compiler_type_t type,
-                       CompilerType *pointee_type, bool *is_rvalue) override;
-
-  bool IsScalarType(lldb::opaque_compiler_type_t type) override;
-
-  bool IsTypedefType(lldb::opaque_compiler_type_t type) override;
-
-  bool IsVoidType(lldb::opaque_compiler_type_t type) override;
-
-  bool CanPassInRegisters(const CompilerType &type) override;
-
-  bool SupportsLanguage(lldb::LanguageType language) override;
-
-  static llvm::Optional<std::string> GetCXXClassName(const CompilerType &type);
-
-  // Type Completion
-
-  bool GetCompleteType(lldb::opaque_compiler_type_t type) override;
-
-  // Accessors
-
-  ConstString GetTypeName(lldb::opaque_compiler_type_t type) override;
-
-  uint32_t GetTypeInfo(lldb::opaque_compiler_type_t type,
-                       CompilerType *pointee_or_element_compiler_type) override;
-
-  lldb::LanguageType
-  GetMinimumLanguage(lldb::opaque_compiler_type_t type) override;
-
-  lldb::TypeClass GetTypeClass(lldb::opaque_compiler_type_t type) override;
-
-  unsigned GetTypeQualifiers(lldb::opaque_compiler_type_t type) override;
-
-  // Creating related types
-
-  // Using the current type, create a new typedef to that type using
-  // "typedef_name" as the name and "decl_ctx" as the decl context.
-  static CompilerType
-  CreateTypedefType(const CompilerType &type, const char *typedef_name,
-                    const CompilerDeclContext &compiler_decl_ctx);
-
-  CompilerType GetArrayElementType(lldb::opaque_compiler_type_t type,
-                                   uint64_t *stride) override;
-
-  CompilerType GetArrayType(lldb::opaque_compiler_type_t type,
-                            uint64_t size) override;
-
-  CompilerType GetCanonicalType(lldb::opaque_compiler_type_t type) override;
-
-  CompilerType
-  GetFullyUnqualifiedType(lldb::opaque_compiler_type_t type) override;
-
-  // Returns -1 if this isn't a function of if the function doesn't have a
-  // prototype Returns a value >= 0 if there is a prototype.
-  int GetFunctionArgumentCount(lldb::opaque_compiler_type_t type) override;
-
-  CompilerType GetFunctionArgumentTypeAtIndex(lldb::opaque_compiler_type_t type,
-                                              size_t idx) override;
-
-  CompilerType
-  GetFunctionReturnType(lldb::opaque_compiler_type_t type) override;
-
-  size_t GetNumMemberFunctions(lldb::opaque_compiler_type_t type) override;
-
-  TypeMemberFunctionImpl
-  GetMemberFunctionAtIndex(lldb::opaque_compiler_type_t type,
-                           size_t idx) override;
-
-  CompilerType GetNonReferenceType(lldb::opaque_compiler_type_t type) override;
-
-  CompilerType GetPointeeType(lldb::opaque_compiler_type_t type) override;
-
-  CompilerType GetPointerType(lldb::opaque_compiler_type_t type) override;
-
-  CompilerType
-  GetLValueReferenceType(lldb::opaque_compiler_type_t type) override;
-
-  CompilerType
-  GetRValueReferenceType(lldb::opaque_compiler_type_t type) override;
-
-  CompilerType GetAtomicType(lldb::opaque_compiler_type_t type) override;
-
-  CompilerType AddConstModifier(lldb::opaque_compiler_type_t type) override;
-
-  CompilerType AddVolatileModifier(lldb::opaque_compiler_type_t type) override;
-
-  CompilerType AddRestrictModifier(lldb::opaque_compiler_type_t type) override;
-
-  CompilerType CreateTypedef(lldb::opaque_compiler_type_t type,
-                             const char *name,
-                             const CompilerDeclContext &decl_ctx) override;
-
-  // If the current object represents a typedef type, get the underlying type
-  CompilerType GetTypedefedType(lldb::opaque_compiler_type_t type) override;
-
-  // Create related types using the current type's AST
-  CompilerType GetBasicTypeFromAST(lldb::BasicType basic_type) override;
-
-  // Exploring the type
-
-  const llvm::fltSemantics &GetFloatTypeSemantics(size_t byte_size) override;
-
-  llvm::Optional<uint64_t> GetByteSize(lldb::opaque_compiler_type_t type,
-                       ExecutionContextScope *exe_scope) {
-    if (llvm::Optional<uint64_t> bit_size = GetBitSize(type, exe_scope))
-      return (*bit_size + 7) / 8;
-    return llvm::None;
-  }
-
-  llvm::Optional<uint64_t>
-  GetBitSize(lldb::opaque_compiler_type_t type,
-             ExecutionContextScope *exe_scope) override;
-
-  lldb::Encoding GetEncoding(lldb::opaque_compiler_type_t type,
-                             uint64_t &count) override;
-
-  lldb::Format GetFormat(lldb::opaque_compiler_type_t type) override;
-
-  llvm::Optional<size_t>
-  GetTypeBitAlign(lldb::opaque_compiler_type_t type,
-                  ExecutionContextScope *exe_scope) override;
-
-  uint32_t GetNumChildren(lldb::opaque_compiler_type_t type,
-                          bool omit_empty_base_classes,
-                          const ExecutionContext *exe_ctx) override;
-
-  CompilerType GetBuiltinTypeByName(ConstString name) override;
-
-  lldb::BasicType
-  GetBasicTypeEnumeration(lldb::opaque_compiler_type_t type) override;
-
-  static lldb::BasicType
-  GetBasicTypeEnumeration(lldb::opaque_compiler_type_t type,
-                          ConstString name);
-
-  void ForEachEnumerator(
-      lldb::opaque_compiler_type_t type,
-      std::function<bool(const CompilerType &integer_type,
-                         ConstString name,
-                         const llvm::APSInt &value)> const &callback) override;
-
-  uint32_t GetNumFields(lldb::opaque_compiler_type_t type) override;
-
-  CompilerType GetFieldAtIndex(lldb::opaque_compiler_type_t type, size_t idx,
-                               std::string &name, uint64_t *bit_offset_ptr,
-                               uint32_t *bitfield_bit_size_ptr,
-                               bool *is_bitfield_ptr) override;
-
-  uint32_t GetNumDirectBaseClasses(lldb::opaque_compiler_type_t type) override;
-
-  uint32_t GetNumVirtualBaseClasses(lldb::opaque_compiler_type_t type) override;
-
-  CompilerType GetDirectBaseClassAtIndex(lldb::opaque_compiler_type_t type,
-                                         size_t idx,
-                                         uint32_t *bit_offset_ptr) override;
-
-  CompilerType GetVirtualBaseClassAtIndex(lldb::opaque_compiler_type_t type,
-                                          size_t idx,
-                                          uint32_t *bit_offset_ptr) override;
-
-  static uint32_t GetNumPointeeChildren(clang::QualType type);
-
-  CompilerType GetChildCompilerTypeAtIndex(
-      lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx, size_t idx,
-      bool transparent_pointers, bool omit_empty_base_classes,
-      bool ignore_array_bounds, std::string &child_name,
-      uint32_t &child_byte_size, int32_t &child_byte_offset,
-      uint32_t &child_bitfield_bit_size, uint32_t &child_bitfield_bit_offset,
-      bool &child_is_base_class, bool &child_is_deref_of_parent,
-      ValueObject *valobj, uint64_t &language_flags) override;
-
-  // Lookup a child given a name. This function will match base class names and
-  // member member names in "clang_type" only, not descendants.
-  uint32_t GetIndexOfChildWithName(lldb::opaque_compiler_type_t type,
-                                   const char *name,
-                                   bool omit_empty_base_classes) override;
-
-  // Lookup a child member given a name. This function will match member names
-  // only and will descend into "clang_type" children in search for the first
-  // member in this class, or any base class that matches "name".
-  // TODO: Return all matches for a given name by returning a
-  // vector<vector<uint32_t>>
-  // so we catch all names that match a given child name, not just the first.
-  size_t
-  GetIndexOfChildMemberWithName(lldb::opaque_compiler_type_t type,
-                                const char *name, bool omit_empty_base_classes,
-                                std::vector<uint32_t> &child_indexes) override;
-
-  size_t GetNumTemplateArguments(lldb::opaque_compiler_type_t type) override;
-
-  lldb::TemplateArgumentKind
-  GetTemplateArgumentKind(lldb::opaque_compiler_type_t type,
-                          size_t idx) override;
-  CompilerType GetTypeTemplateArgument(lldb::opaque_compiler_type_t type,
-                                       size_t idx) override;
-  llvm::Optional<CompilerType::IntegralTemplateArgument>
-  GetIntegralTemplateArgument(lldb::opaque_compiler_type_t type,
-                              size_t idx) override;
-
-  CompilerType GetTypeForFormatters(void *type) override;
-
-#define LLDB_INVALID_DECL_LEVEL UINT32_MAX
-  // LLDB_INVALID_DECL_LEVEL is returned by CountDeclLevels if child_decl_ctx
-  // could not be found in decl_ctx.
-  uint32_t CountDeclLevels(clang::DeclContext *frame_decl_ctx,
-                           clang::DeclContext *child_decl_ctx,
-                           ConstString *child_name = nullptr,
-                           CompilerType *child_type = nullptr);
-
-  // Modifying RecordType
-  static clang::FieldDecl *AddFieldToRecordType(const CompilerType &type,
-                                                llvm::StringRef name,
-                                                const CompilerType &field_type,
-                                                lldb::AccessType access,
-                                                uint32_t bitfield_bit_size);
-
-  static void BuildIndirectFields(const CompilerType &type);
-
-  static void SetIsPacked(const CompilerType &type);
-
-  static clang::VarDecl *AddVariableToRecordType(const CompilerType &type,
-                                                 llvm::StringRef name,
-                                                 const CompilerType &var_type,
-                                                 lldb::AccessType access);
-
-  clang::CXXMethodDecl *AddMethodToCXXRecordType(
-      lldb::opaque_compiler_type_t type, llvm::StringRef name,
-      const char *mangled_name, const CompilerType &method_type,
-      lldb::AccessType access, bool is_virtual, bool is_static, bool is_inline,
-      bool is_explicit, bool is_attr_used, bool is_artificial);
-
-  void AddMethodOverridesForCXXRecordType(lldb::opaque_compiler_type_t type);
-
-  // C++ Base Classes
-  std::unique_ptr<clang::CXXBaseSpecifier>
-  CreateBaseClassSpecifier(lldb::opaque_compiler_type_t type,
-                           lldb::AccessType access, bool is_virtual,
-                           bool base_of_class);
-
-  bool TransferBaseClasses(
-      lldb::opaque_compiler_type_t type,
-      std::vector<std::unique_ptr<clang::CXXBaseSpecifier>> bases);
-
-  static bool SetObjCSuperClass(const CompilerType &type,
-                                const CompilerType &superclass_compiler_type);
-
-  static bool AddObjCClassProperty(const CompilerType &type,
-                                   const char *property_name,
-                                   const CompilerType &property_compiler_type,
-                                   clang::ObjCIvarDecl *ivar_decl,
-                                   const char *property_setter_name,
-                                   const char *property_getter_name,
-                                   uint32_t property_attributes,
-                                   ClangASTMetadata *metadata);
-
-  static clang::ObjCMethodDecl *AddMethodToObjCObjectType(
-      const CompilerType &type,
-      const char *name, // the full symbol name as seen in the symbol table
-                        // (lldb::opaque_compiler_type_t type, "-[NString
-                        // stringWithCString:]")
-      const CompilerType &method_compiler_type, lldb::AccessType access,
-      bool is_artificial, bool is_variadic, bool is_objc_direct_call);
-
-  static bool SetHasExternalStorage(lldb::opaque_compiler_type_t type,
-                                    bool has_extern);
-
-  // Tag Declarations
-  static bool StartTagDeclarationDefinition(const CompilerType &type);
-
-  static bool CompleteTagDeclarationDefinition(const CompilerType &type);
-
-  // Modifying Enumeration types
-  clang::EnumConstantDecl *AddEnumerationValueToEnumerationType(
-      const CompilerType &enum_type, const Declaration &decl, const char *name,
-      int64_t enum_value, uint32_t enum_value_bit_size);
-  clang::EnumConstantDecl *AddEnumerationValueToEnumerationType(
-      const CompilerType &enum_type, const Declaration &decl, const char *name,
-      const llvm::APSInt &value);
-
-  CompilerType GetEnumerationIntegerType(lldb::opaque_compiler_type_t type);
-
-  // Pointers & References
-
-  // Call this function using the class type when you want to make a member
-  // pointer type to pointee_type.
-  static CompilerType CreateMemberPointerType(const CompilerType &type,
-                                              const CompilerType &pointee_type);
-
-  // Dumping types
-#ifndef NDEBUG
-  /// Convenience LLVM-style dump method for use in the debugger only.
-  /// In contrast to the other \p Dump() methods this directly invokes
-  /// \p clang::QualType::dump().
-  LLVM_DUMP_METHOD void dump(lldb::opaque_compiler_type_t type) const override;
-#endif
-
-  void Dump(Stream &s);
-
-  /// Dump clang AST types from the symbol file.
-  ///
-  /// \param[in] s
-  ///       A stream to send the dumped AST node(s) to
-  /// \param[in] symbol_name
-  ///       The name of the symbol to dump, if it is empty dump all the symbols
-  void DumpFromSymbolFile(Stream &s, llvm::StringRef symbol_name);
-
-  void DumpValue(lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx,
-                 Stream *s, lldb::Format format, const DataExtractor &data,
-                 lldb::offset_t data_offset, size_t data_byte_size,
-                 uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset,
-                 bool show_types, bool show_summary, bool verbose,
-                 uint32_t depth) override;
-
-  bool DumpTypeValue(lldb::opaque_compiler_type_t type, Stream *s,
-                     lldb::Format format, const DataExtractor &data,
-                     lldb::offset_t data_offset, size_t data_byte_size,
-                     uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset,
-                     ExecutionContextScope *exe_scope) override;
-
-  void DumpSummary(lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx,
-                   Stream *s, const DataExtractor &data,
-                   lldb::offset_t data_offset, size_t data_byte_size) override;
-
-  void DumpTypeDescription(
-      lldb::opaque_compiler_type_t type) override; // Dump to stdout
-
-  void DumpTypeDescription(lldb::opaque_compiler_type_t type,
-                           Stream *s) override;
-
-  static void DumpTypeName(const CompilerType &type);
-
-  static clang::EnumDecl *GetAsEnumDecl(const CompilerType &type);
-
-  static clang::RecordDecl *GetAsRecordDecl(const CompilerType &type);
-
-  static clang::TagDecl *GetAsTagDecl(const CompilerType &type);
-
-  static clang::TypedefNameDecl *GetAsTypedefDecl(const CompilerType &type);
-
-  static clang::CXXRecordDecl *
-  GetAsCXXRecordDecl(lldb::opaque_compiler_type_t type);
-
-  static clang::ObjCInterfaceDecl *
-  GetAsObjCInterfaceDecl(const CompilerType &type);
-
-  clang::ClassTemplateDecl *ParseClassTemplateDecl(
-      clang::DeclContext *decl_ctx, lldb::AccessType access_type,
-      const char *parent_name, int tag_decl_kind,
-      const ClangASTContext::TemplateParameterInfos &template_param_infos);
-
-  clang::BlockDecl *CreateBlockDeclaration(clang::DeclContext *ctx);
-
-  clang::UsingDirectiveDecl *
-  CreateUsingDirectiveDeclaration(clang::DeclContext *decl_ctx,
-                                  clang::NamespaceDecl *ns_decl);
-
-  clang::UsingDecl *CreateUsingDeclaration(clang::DeclContext *current_decl_ctx,
-                                           clang::NamedDecl *target);
-
-  clang::VarDecl *CreateVariableDeclaration(clang::DeclContext *decl_context,
-                                            const char *name,
-                                            clang::QualType type);
-
-  static lldb::opaque_compiler_type_t
-  GetOpaqueCompilerType(clang::ASTContext *ast, lldb::BasicType basic_type);
-
-  static clang::QualType GetQualType(lldb::opaque_compiler_type_t type) {
-    if (type)
-      return clang::QualType::getFromOpaquePtr(type);
-    return clang::QualType();
-  }
-
-  static clang::QualType
-  GetCanonicalQualType(lldb::opaque_compiler_type_t type) {
-    if (type)
-      return clang::QualType::getFromOpaquePtr(type).getCanonicalType();
-    return clang::QualType();
-  }
-
-  clang::DeclarationName
-  GetDeclarationName(const char *name, const CompilerType &function_clang_type);
-
-private:
-  const clang::ClassTemplateSpecializationDecl *
-  GetAsTemplateSpecialization(lldb::opaque_compiler_type_t type);
-
-  // Classes that inherit from ClangASTContext can see and modify these
-  std::string m_target_triple;
-  std::unique_ptr<clang::ASTContext> m_ast_up;
-  std::unique_ptr<clang::LangOptions> m_language_options_up;
-  std::unique_ptr<clang::FileManager> m_file_manager_up;
-  std::unique_ptr<clang::SourceManager> m_source_manager_up;
-  std::unique_ptr<clang::DiagnosticsEngine> m_diagnostics_engine_up;
-  std::unique_ptr<clang::DiagnosticConsumer> m_diagnostic_consumer_up;
-  std::shared_ptr<clang::TargetOptions> m_target_options_rp;
-  std::unique_ptr<clang::TargetInfo> m_target_info_up;
-  std::unique_ptr<clang::IdentifierTable> m_identifier_table_up;
-  std::unique_ptr<clang::SelectorTable> m_selector_table_up;
-  std::unique_ptr<clang::Builtin::Context> m_builtins_up;
-  std::unique_ptr<DWARFASTParserClang> m_dwarf_ast_parser_up;
-  std::unique_ptr<PDBASTParser> m_pdb_ast_parser_up;
-  std::unique_ptr<clang::MangleContext> m_mangle_ctx_up;
-  uint32_t m_pointer_byte_size = 0;
-  bool m_ast_owned = false;
-
-  typedef llvm::DenseMap<const clang::Decl *, ClangASTMetadata> DeclMetadataMap;
-  /// Maps Decls to their associated ClangASTMetadata.
-  DeclMetadataMap m_decl_metadata;
-
-  typedef llvm::DenseMap<const clang::Type *, ClangASTMetadata> TypeMetadataMap;
-  /// Maps Types to their associated ClangASTMetadata.
-  TypeMetadataMap m_type_metadata;
-
-  /// The sema associated that is currently used to build this ASTContext.
-  /// May be null if we are already done parsing this ASTContext or the
-  /// ASTContext wasn't created by parsing source code.
-  clang::Sema *m_sema = nullptr;
-
-  // For ClangASTContext only
-  ClangASTContext(const ClangASTContext &);
-  const ClangASTContext &operator=(const ClangASTContext &);
-  /// Creates the internal ASTContext.
-  void CreateASTContext();
-  void SetTargetTriple(llvm::StringRef target_triple);
-};
-
-class ClangASTContextForExpressions : public ClangASTContext {
-public:
-  ClangASTContextForExpressions(Target &target, llvm::Triple triple);
-
-  ~ClangASTContextForExpressions() override = default;
-
-  void Finalize() override;
-
-  UserExpression *
-  GetUserExpression(llvm::StringRef expr, llvm::StringRef prefix,
-                    lldb::LanguageType language,
-                    Expression::ResultType desired_type,
-                    const EvaluateExpressionOptions &options,
-                    ValueObject *ctx_obj) override;
-
-  FunctionCaller *GetFunctionCaller(const CompilerType &return_type,
-                                    const Address &function_address,
-                                    const ValueList &arg_value_list,
-                                    const char *name) override;
-
-  UtilityFunction *GetUtilityFunction(const char *text,
-                                      const char *name) override;
-
-  PersistentExpressionState *GetPersistentExpressionState() override;
-private:
-  lldb::TargetWP m_target_wp;
-  std::unique_ptr<PersistentExpressionState>
-      m_persistent_variables; // These are the persistent variables associated
-                              // with this process for the expression parser
-  std::unique_ptr<ClangASTSource> m_scratch_ast_source_up;
-};
-
-} // namespace lldb_private
-
-#endif // liblldb_ClangASTContext_h_
diff --git a/gnu/llvm/lldb/include/lldb/Symbol/ClangASTImporter.h b/gnu/llvm/lldb/include/lldb/Symbol/ClangASTImporter.h
deleted file mode 100644 (file)
index faec3a7..0000000
+++ /dev/null
@@ -1,328 +0,0 @@
-//===-- ClangASTImporter.h --------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_ClangASTImporter_h_
-#define liblldb_ClangASTImporter_h_
-
-#include <map>
-#include <memory>
-#include <set>
-#include <vector>
-
-#include "clang/AST/ASTImporter.h"
-#include "clang/AST/CharUnits.h"
-#include "clang/AST/Decl.h"
-#include "clang/AST/DeclCXX.h"
-#include "clang/Basic/FileManager.h"
-#include "clang/Basic/FileSystemOptions.h"
-
-#include "lldb/Host/FileSystem.h"
-#include "lldb/Symbol/CompilerDeclContext.h"
-#include "lldb/Symbol/CxxModuleHandler.h"
-#include "lldb/lldb-types.h"
-
-#include "llvm/ADT/DenseMap.h"
-
-namespace lldb_private {
-
-class ClangASTImporter {
-public:
-  struct LayoutInfo {
-    LayoutInfo()
-        : bit_size(0), alignment(0), field_offsets(), base_offsets(),
-          vbase_offsets() {}
-    uint64_t bit_size;
-    uint64_t alignment;
-    llvm::DenseMap<const clang::FieldDecl *, uint64_t> field_offsets;
-    llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits> base_offsets;
-    llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits>
-        vbase_offsets;
-  };
-
-  ClangASTImporter()
-      : m_file_manager(clang::FileSystemOptions(),
-                       FileSystem::Instance().GetVirtualFileSystem()) {}
-
-  CompilerType CopyType(ClangASTContext &dst, const CompilerType &src_type);
-
-  clang::Decl *CopyDecl(clang::ASTContext *dst_ctx, clang::Decl *decl);
-
-  CompilerType DeportType(ClangASTContext &dst, const CompilerType &src_type);
-
-  clang::Decl *DeportDecl(clang::ASTContext *dst_ctx, clang::Decl *decl);
-
-  /// Sets the layout for the given RecordDecl. The layout will later be
-  /// used by Clang's during code generation. Not calling this function for
-  /// a RecordDecl will cause that Clang's codegen tries to layout the
-  /// record by itself.
-  ///
-  /// \param decl The RecordDecl to set the layout for.
-  /// \param layout The layout for the record.
-  void SetRecordLayout(clang::RecordDecl *decl, const LayoutInfo &layout);
-
-  bool LayoutRecordType(
-      const clang::RecordDecl *record_decl, uint64_t &bit_size,
-      uint64_t &alignment,
-      llvm::DenseMap<const clang::FieldDecl *, uint64_t> &field_offsets,
-      llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits>
-          &base_offsets,
-      llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits>
-          &vbase_offsets);
-
-  bool CanImport(const CompilerType &type);
-
-  bool Import(const CompilerType &type);
-
-  bool CompleteType(const CompilerType &compiler_type);
-
-  void CompleteDecl(clang::Decl *decl);
-
-  bool CompleteTagDecl(clang::TagDecl *decl);
-
-  bool CompleteTagDeclWithOrigin(clang::TagDecl *decl, clang::TagDecl *origin);
-
-  bool CompleteObjCInterfaceDecl(clang::ObjCInterfaceDecl *interface_decl);
-
-  bool CompleteAndFetchChildren(clang::QualType type);
-
-  bool RequireCompleteType(clang::QualType type);
-
-  void SetDeclOrigin(const clang::Decl *decl, clang::Decl *original_decl);
-
-  ClangASTMetadata *GetDeclMetadata(const clang::Decl *decl);
-
-  //
-  // Namespace maps
-  //
-
-  typedef std::vector<std::pair<lldb::ModuleSP, CompilerDeclContext>>
-      NamespaceMap;
-  typedef std::shared_ptr<NamespaceMap> NamespaceMapSP;
-
-  void RegisterNamespaceMap(const clang::NamespaceDecl *decl,
-                            NamespaceMapSP &namespace_map);
-
-  NamespaceMapSP GetNamespaceMap(const clang::NamespaceDecl *decl);
-
-  void BuildNamespaceMap(const clang::NamespaceDecl *decl);
-
-  //
-  // Completers for maps
-  //
-
-  class MapCompleter {
-  public:
-    virtual ~MapCompleter();
-
-    virtual void CompleteNamespaceMap(NamespaceMapSP &namespace_map,
-                                      ConstString name,
-                                      NamespaceMapSP &parent_map) const = 0;
-  };
-
-  void InstallMapCompleter(clang::ASTContext *dst_ctx,
-                           MapCompleter &completer) {
-    ASTContextMetadataSP context_md;
-    ContextMetadataMap::iterator context_md_iter = m_metadata_map.find(dst_ctx);
-
-    if (context_md_iter == m_metadata_map.end()) {
-      context_md = ASTContextMetadataSP(new ASTContextMetadata(dst_ctx));
-      m_metadata_map[dst_ctx] = context_md;
-    } else {
-      context_md = context_md_iter->second;
-    }
-
-    context_md->m_map_completer = &completer;
-  }
-
-  void ForgetDestination(clang::ASTContext *dst_ctx);
-  void ForgetSource(clang::ASTContext *dst_ctx, clang::ASTContext *src_ctx);
-
-public:
-  struct DeclOrigin {
-    DeclOrigin() : ctx(nullptr), decl(nullptr) {}
-
-    DeclOrigin(clang::ASTContext *_ctx, clang::Decl *_decl)
-        : ctx(_ctx), decl(_decl) {}
-
-    DeclOrigin(const DeclOrigin &rhs) {
-      ctx = rhs.ctx;
-      decl = rhs.decl;
-    }
-
-    void operator=(const DeclOrigin &rhs) {
-      ctx = rhs.ctx;
-      decl = rhs.decl;
-    }
-
-    bool Valid() { return (ctx != nullptr || decl != nullptr); }
-
-    clang::ASTContext *ctx;
-    clang::Decl *decl;
-  };
-
-  typedef llvm::DenseMap<const clang::Decl *, DeclOrigin> OriginMap;
-
-  /// Listener interface used by the ASTImporterDelegate to inform other code
-  /// about decls that have been imported the first time.
-  struct NewDeclListener {
-    virtual ~NewDeclListener() = default;
-    /// A decl has been imported for the first time.
-    virtual void NewDeclImported(clang::Decl *from, clang::Decl *to) = 0;
-  };
-
-  /// ASTImporter that intercepts and records the import process of the
-  /// underlying ASTImporter.
-  ///
-  /// This class updates the map from declarations to their original
-  /// declarations and can record declarations that have been imported in a
-  /// certain interval.
-  ///
-  /// When intercepting a declaration import, the ASTImporterDelegate uses the
-  /// CxxModuleHandler to replace any missing or malformed declarations with
-  /// their counterpart from a C++ module.
-  struct ASTImporterDelegate : public clang::ASTImporter {
-    ASTImporterDelegate(ClangASTImporter &master, clang::ASTContext *target_ctx,
-                        clang::ASTContext *source_ctx)
-        : clang::ASTImporter(*target_ctx, master.m_file_manager, *source_ctx,
-                             master.m_file_manager, true /*minimal*/),
-          m_master(master), m_source_ctx(source_ctx) {
-      setODRHandling(clang::ASTImporter::ODRHandlingType::Liberal);
-    }
-
-    /// Scope guard that attaches a CxxModuleHandler to an ASTImporterDelegate
-    /// and deattaches it at the end of the scope. Supports being used multiple
-    /// times on the same ASTImporterDelegate instance in nested scopes.
-    class CxxModuleScope {
-      /// The handler we attach to the ASTImporterDelegate.
-      CxxModuleHandler m_handler;
-      /// The ASTImporterDelegate we are supposed to attach the handler to.
-      ASTImporterDelegate &m_delegate;
-      /// True iff we attached the handler to the ASTImporterDelegate.
-      bool m_valid = false;
-
-    public:
-      CxxModuleScope(ASTImporterDelegate &delegate, clang::ASTContext *dst_ctx)
-          : m_delegate(delegate) {
-        // If the delegate doesn't have a CxxModuleHandler yet, create one
-        // and attach it.
-        if (!delegate.m_std_handler) {
-          m_handler = CxxModuleHandler(delegate, dst_ctx);
-          m_valid = true;
-          delegate.m_std_handler = &m_handler;
-        }
-      }
-      ~CxxModuleScope() {
-        if (m_valid) {
-          // Make sure no one messed with the handler we placed.
-          assert(m_delegate.m_std_handler == &m_handler);
-          m_delegate.m_std_handler = nullptr;
-        }
-      }
-    };
-
-    void ImportDefinitionTo(clang::Decl *to, clang::Decl *from);
-
-    void Imported(clang::Decl *from, clang::Decl *to) override;
-
-    clang::Decl *GetOriginalDecl(clang::Decl *To) override;
-
-    void SetImportListener(NewDeclListener *listener) {
-      assert(m_new_decl_listener == nullptr && "Already attached a listener?");
-      m_new_decl_listener = listener;
-    }
-    void RemoveImportListener() { m_new_decl_listener = nullptr; }
-
-  protected:
-    llvm::Expected<clang::Decl *> ImportImpl(clang::Decl *From) override;
-
-  private:
-    /// Decls we should ignore when mapping decls back to their original
-    /// ASTContext. Used by the CxxModuleHandler to mark declarations that
-    /// were created from the 'std' C++ module to prevent that the Importer
-    /// tries to sync them with the broken equivalent in the debug info AST.
-    llvm::SmallPtrSet<clang::Decl *, 16> m_decls_to_ignore;
-    ClangASTImporter &m_master;
-    clang::ASTContext *m_source_ctx;
-    CxxModuleHandler *m_std_handler = nullptr;
-    /// The currently attached listener.
-    NewDeclListener *m_new_decl_listener = nullptr;
-  };
-
-  typedef std::shared_ptr<ASTImporterDelegate> ImporterDelegateSP;
-  typedef llvm::DenseMap<clang::ASTContext *, ImporterDelegateSP> DelegateMap;
-  typedef llvm::DenseMap<const clang::NamespaceDecl *, NamespaceMapSP>
-      NamespaceMetaMap;
-
-  struct ASTContextMetadata {
-    ASTContextMetadata(clang::ASTContext *dst_ctx)
-        : m_dst_ctx(dst_ctx), m_delegates(), m_origins(), m_namespace_maps(),
-          m_map_completer(nullptr) {}
-
-    clang::ASTContext *m_dst_ctx;
-    DelegateMap m_delegates;
-    OriginMap m_origins;
-
-    NamespaceMetaMap m_namespace_maps;
-    MapCompleter *m_map_completer;
-  };
-
-  typedef std::shared_ptr<ASTContextMetadata> ASTContextMetadataSP;
-  typedef llvm::DenseMap<const clang::ASTContext *, ASTContextMetadataSP>
-      ContextMetadataMap;
-
-  ContextMetadataMap m_metadata_map;
-
-  ASTContextMetadataSP GetContextMetadata(clang::ASTContext *dst_ctx) {
-    ContextMetadataMap::iterator context_md_iter = m_metadata_map.find(dst_ctx);
-
-    if (context_md_iter == m_metadata_map.end()) {
-      ASTContextMetadataSP context_md =
-          ASTContextMetadataSP(new ASTContextMetadata(dst_ctx));
-      m_metadata_map[dst_ctx] = context_md;
-      return context_md;
-    }
-    return context_md_iter->second;
-  }
-
-  ASTContextMetadataSP MaybeGetContextMetadata(clang::ASTContext *dst_ctx) {
-    ContextMetadataMap::iterator context_md_iter = m_metadata_map.find(dst_ctx);
-
-    if (context_md_iter != m_metadata_map.end())
-      return context_md_iter->second;
-    return ASTContextMetadataSP();
-  }
-
-  ImporterDelegateSP GetDelegate(clang::ASTContext *dst_ctx,
-                                 clang::ASTContext *src_ctx) {
-    ASTContextMetadataSP context_md = GetContextMetadata(dst_ctx);
-
-    DelegateMap &delegates = context_md->m_delegates;
-    DelegateMap::iterator delegate_iter = delegates.find(src_ctx);
-
-    if (delegate_iter == delegates.end()) {
-      ImporterDelegateSP delegate =
-          ImporterDelegateSP(new ASTImporterDelegate(*this, dst_ctx, src_ctx));
-      delegates[src_ctx] = delegate;
-      return delegate;
-    }
-    return delegate_iter->second;
-  }
-
-public:
-  DeclOrigin GetDeclOrigin(const clang::Decl *decl);
-
-  clang::FileManager m_file_manager;
-  typedef llvm::DenseMap<const clang::RecordDecl *, LayoutInfo>
-      RecordDeclToLayoutMap;
-
-  RecordDeclToLayoutMap m_record_decl_to_layout_map;
-};
-
-} // namespace lldb_private
-
-#endif // liblldb_ClangASTImporter_h_
diff --git a/gnu/llvm/lldb/include/lldb/Symbol/ClangASTMetadata.h b/gnu/llvm/lldb/include/lldb/Symbol/ClangASTMetadata.h
deleted file mode 100644 (file)
index fdf4388..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-//===-- ClangASTMetadata.h --------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_ClangASTMetadata_h
-#define liblldb_ClangASTMetadata_h
-
-#include "lldb/Core/dwarf.h"
-#include "lldb/lldb-defines.h"
-#include "lldb/lldb-enumerations.h"
-
-namespace lldb_private {
-
-class ClangASTMetadata {
-public:
-  ClangASTMetadata()
-      : m_user_id(0), m_union_is_user_id(false), m_union_is_isa_ptr(false),
-        m_has_object_ptr(false), m_is_self(false), m_is_dynamic_cxx(true) {}
-
-  bool GetIsDynamicCXXType() const { return m_is_dynamic_cxx; }
-
-  void SetIsDynamicCXXType(bool b) { m_is_dynamic_cxx = b; }
-
-  void SetUserID(lldb::user_id_t user_id) {
-    m_user_id = user_id;
-    m_union_is_user_id = true;
-    m_union_is_isa_ptr = false;
-  }
-
-  lldb::user_id_t GetUserID() const {
-    if (m_union_is_user_id)
-      return m_user_id;
-    else
-      return LLDB_INVALID_UID;
-  }
-
-  void SetISAPtr(uint64_t isa_ptr) {
-    m_isa_ptr = isa_ptr;
-    m_union_is_user_id = false;
-    m_union_is_isa_ptr = true;
-  }
-
-  uint64_t GetISAPtr() const {
-    if (m_union_is_isa_ptr)
-      return m_isa_ptr;
-    else
-      return 0;
-  }
-
-  void SetObjectPtrName(const char *name) {
-    m_has_object_ptr = true;
-    if (strcmp(name, "self") == 0)
-      m_is_self = true;
-    else if (strcmp(name, "this") == 0)
-      m_is_self = false;
-    else
-      m_has_object_ptr = false;
-  }
-
-  lldb::LanguageType GetObjectPtrLanguage() const {
-    if (m_has_object_ptr) {
-      if (m_is_self)
-        return lldb::eLanguageTypeObjC;
-      else
-        return lldb::eLanguageTypeC_plus_plus;
-    }
-    return lldb::eLanguageTypeUnknown;
-  }
-
-  const char *GetObjectPtrName() const {
-    if (m_has_object_ptr) {
-      if (m_is_self)
-        return "self";
-      else
-        return "this";
-    } else
-      return nullptr;
-  }
-
-  bool HasObjectPtr() const { return m_has_object_ptr; }
-
-  void Dump(Stream *s);
-
-private:
-  union {
-    lldb::user_id_t m_user_id;
-    uint64_t m_isa_ptr;
-  };
-
-  bool m_union_is_user_id : 1, m_union_is_isa_ptr : 1, m_has_object_ptr : 1,
-      m_is_self : 1, m_is_dynamic_cxx : 1;
-};
-
-} // namespace lldb_private
-
-#endif // liblldb_ClangASTMetadata_h
diff --git a/gnu/llvm/lldb/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h b/gnu/llvm/lldb/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h
deleted file mode 100644 (file)
index 290ecc9..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-//===-- ClangExternalASTSourceCallbacks.h -----------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_ClangExternalASTSourceCallbacks_h_
-#define liblldb_ClangExternalASTSourceCallbacks_h_
-
-#include "lldb/Symbol/ClangASTContext.h"
-#include "clang/AST/ExternalASTSource.h"
-
-namespace lldb_private {
-
-class ClangASTContext;
-
-class ClangExternalASTSourceCallbacks : public clang::ExternalASTSource {
-public:
-  ClangExternalASTSourceCallbacks(ClangASTContext &ast) : m_ast(ast) {}
-
-  void FindExternalLexicalDecls(
-      const clang::DeclContext *DC,
-      llvm::function_ref<bool(clang::Decl::Kind)> IsKindWeWant,
-      llvm::SmallVectorImpl<clang::Decl *> &Result) override;
-
-  void CompleteType(clang::TagDecl *tag_decl) override;
-
-  void CompleteType(clang::ObjCInterfaceDecl *objc_decl) override;
-
-  bool layoutRecordType(
-      const clang::RecordDecl *Record, uint64_t &Size, uint64_t &Alignment,
-      llvm::DenseMap<const clang::FieldDecl *, uint64_t> &FieldOffsets,
-      llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits>
-          &BaseOffsets,
-      llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits>
-          &VirtualBaseOffsets) override;
-
-private:
-  ClangASTContext &m_ast;
-};
-
-} // namespace lldb_private
-
-#endif // liblldb_ClangExternalASTSourceCallbacks_h_
diff --git a/gnu/llvm/lldb/include/lldb/Symbol/ClangUtil.h b/gnu/llvm/lldb/include/lldb/Symbol/ClangUtil.h
deleted file mode 100644 (file)
index 5ffbce3..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-//===-- ClangUtil.h ---------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-// A collection of helper methods and data structures for manipulating clang
-// types and decls.
-//===----------------------------------------------------------------------===//
-
-#ifndef LLDB_SYMBOL_CLANGUTIL_H
-#define LLDB_SYMBOL_CLANGUTIL_H
-
-#include "clang/AST/DeclBase.h"
-#include "clang/AST/Type.h"
-
-#include "lldb/Symbol/CompilerType.h"
-
-namespace clang {
-class TagDecl;
-}
-
-namespace lldb_private {
-struct ClangUtil {
-  static bool IsClangType(const CompilerType &ct);
-
-  static clang::QualType GetQualType(const CompilerType &ct);
-
-  static clang::QualType GetCanonicalQualType(const CompilerType &ct);
-
-  static CompilerType RemoveFastQualifiers(const CompilerType &ct);
-
-  static clang::TagDecl *GetAsTagDecl(const CompilerType &type);
-
-  /// Returns a textual representation of the given Decl's AST. Does not
-  /// deserialize any child nodes.
-  static std::string DumpDecl(const clang::Decl *d);
-  /// Returns a textual representation of the given type.
-  static std::string ToString(const clang::Type *t);
-  /// Returns a textual representation of the given CompilerType (assuming
-  /// its underlying type is a Clang type).
-  static std::string ToString(const CompilerType &c);
-};
-}
-
-#endif
diff --git a/gnu/llvm/lldb/include/lldb/Symbol/CxxModuleHandler.h b/gnu/llvm/lldb/include/lldb/Symbol/CxxModuleHandler.h
deleted file mode 100644 (file)
index f4aef36..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-//===-- CxxModuleHandler.h --------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_CxxModuleHandler_h_
-#define liblldb_CxxModuleHandler_h_
-
-#include "clang/AST/ASTImporter.h"
-#include "clang/Sema/Sema.h"
-#include "llvm/ADT/StringSet.h"
-
-namespace lldb_private {
-
-/// Handles importing decls into an ASTContext with an attached C++ module.
-///
-/// This class searches a C++ module (which must be attached to the target
-/// ASTContext) for an equivalent decl to the one that should be imported.
-/// If the decl that is found in the module is a suitable replacement
-/// for the decl that should be imported, the module decl will be treated as
-/// the result of the import process.
-///
-/// If the Decl that should be imported is a template specialization
-/// that doesn't exist yet in the target ASTContext (e.g. `std::vector<int>`),
-/// then this class tries to create the template specialization in the target
-/// ASTContext. This is only possible if the CxxModuleHandler can determine
-/// that instantiating this template is safe to do, e.g. because the target
-/// decl is a container class from the STL.
-class CxxModuleHandler {
-  /// The ASTImporter that should be used to import any Decls which aren't
-  /// directly handled by this class itself.
-  clang::ASTImporter *m_importer = nullptr;
-
-  /// The Sema instance of the target ASTContext.
-  clang::Sema *m_sema = nullptr;
-
-  /// List of template names this class currently supports. These are the
-  /// template names inside the 'std' namespace such as 'vector' or 'list'.
-  llvm::StringSet<> m_supported_templates;
-
-  /// Tries to manually instantiate the given foreign template in the target
-  /// context (designated by m_sema).
-  llvm::Optional<clang::Decl *> tryInstantiateStdTemplate(clang::Decl *d);
-
-public:
-  CxxModuleHandler() = default;
-  CxxModuleHandler(clang::ASTImporter &importer, clang::ASTContext *target);
-
-  /// Attempts to import the given decl into the target ASTContext by
-  /// deserializing it from the 'std' module. This function returns a Decl if a
-  /// Decl has been deserialized from the 'std' module. Otherwise this function
-  /// returns nothing.
-  llvm::Optional<clang::Decl *> Import(clang::Decl *d);
-
-  /// Returns true iff this instance is capable of importing any declarations
-  /// in the target ASTContext.
-  bool isValid() const { return m_sema != nullptr; }
-};
-
-} // namespace lldb_private
-
-#endif // liblldb_CxxModuleHandler_h_
index 5466e57..5fcd704 100644 (file)
@@ -180,6 +180,7 @@ public:
 
     eCore_x86_64_x86_64,
     eCore_x86_64_x86_64h, // Haswell enabled x86_64
+    eCore_x86_64_amd64,
     eCore_hexagon_generic,
     eCore_hexagon_hexagonv4,
     eCore_hexagon_hexagonv5,
diff --git a/gnu/llvm/lldb/include/lldb/Utility/SharingPtr.h b/gnu/llvm/lldb/include/lldb/Utility/SharingPtr.h
deleted file mode 100644 (file)
index e4ab3d2..0000000
+++ /dev/null
@@ -1,609 +0,0 @@
-//===---------------------SharingPtr.h --------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef utility_SharingPtr_h_
-#define utility_SharingPtr_h_
-
-#include <memory>
-
-// Microsoft Visual C++ currently does not enable std::atomic to work in CLR
-// mode - as such we need to "hack around it" for MSVC++ builds only using
-// Windows specific intrinsics instead of the C++11 atomic support
-#ifdef _MSC_VER
-#include <intrin.h>
-#else
-#include <atomic>
-#endif
-
-#include <stddef.h>
-
-
-//#define ENABLE_SP_LOGGING 1 // DON'T CHECK THIS LINE IN UNLESS COMMENTED OUT
-#if defined(ENABLE_SP_LOGGING)
-
-extern "C" void track_sp(void *sp_this, void *ptr, long count);
-
-#endif
-
-namespace lldb_private {
-
-namespace imp {
-
-class shared_count {
-  shared_count(const shared_count &) = delete;
-  shared_count &operator=(const shared_count &) = delete;
-
-public:
-  explicit shared_count(long refs = 0) : shared_owners_(refs) {}
-
-  void add_shared();
-  void release_shared();
-  long use_count() const { return shared_owners_ + 1; }
-
-protected:
-#ifdef _MSC_VER
-  long shared_owners_;
-#else
-  std::atomic<long> shared_owners_;
-#endif
-  virtual ~shared_count();
-
-private:
-  virtual void on_zero_shared() = 0;
-};
-
-template <class T> class shared_ptr_pointer : public shared_count {
-  T data_;
-
-public:
-  shared_ptr_pointer(T p) : data_(p) {}
-
-private:
-  void on_zero_shared() override;
-
-  shared_ptr_pointer(const shared_ptr_pointer &) = delete;
-  shared_ptr_pointer &operator=(const shared_ptr_pointer &) = delete;
-};
-
-template <class T> void shared_ptr_pointer<T>::on_zero_shared() {
-  delete data_;
-}
-
-template <class T> class shared_ptr_emplace : public shared_count {
-  T data_;
-
-public:
-  shared_ptr_emplace() : data_() {}
-
-  template <class A0> shared_ptr_emplace(A0 &a0) : data_(a0) {}
-
-  template <class A0, class A1>
-  shared_ptr_emplace(A0 &a0, A1 &a1) : data_(a0, a1) {}
-
-  template <class A0, class A1, class A2>
-  shared_ptr_emplace(A0 &a0, A1 &a1, A2 &a2) : data_(a0, a1, a2) {}
-
-  template <class A0, class A1, class A2, class A3>
-  shared_ptr_emplace(A0 &a0, A1 &a1, A2 &a2, A3 &a3) : data_(a0, a1, a2, a3) {}
-
-  template <class A0, class A1, class A2, class A3, class A4>
-  shared_ptr_emplace(A0 &a0, A1 &a1, A2 &a2, A3 &a3, A4 &a4)
-      : data_(a0, a1, a2, a3, a4) {}
-
-private:
-  void on_zero_shared() override;
-
-public:
-  T *get() { return &data_; }
-};
-
-template <class T> void shared_ptr_emplace<T>::on_zero_shared() {}
-
-} // namespace imp
-
-template <class T> class SharingPtr {
-public:
-  typedef T element_type;
-
-private:
-  element_type *ptr_;
-  imp::shared_count *cntrl_;
-
-  struct nat {
-    int for_bool_;
-  };
-
-public:
-  SharingPtr();
-  SharingPtr(std::nullptr_t);
-  template <class Y> explicit SharingPtr(Y *p);
-  template <class Y> explicit SharingPtr(Y *p, imp::shared_count *ctrl_block);
-  template <class Y> SharingPtr(const SharingPtr<Y> &r, element_type *p);
-  SharingPtr(const SharingPtr &r);
-  template <class Y> SharingPtr(const SharingPtr<Y> &r);
-
-  ~SharingPtr();
-
-  SharingPtr &operator=(const SharingPtr &r);
-  template <class Y> SharingPtr &operator=(const SharingPtr<Y> &r);
-
-  void swap(SharingPtr &r);
-  void reset();
-  template <class Y> void reset(Y *p);
-  void reset(std::nullptr_t);
-
-  element_type *get() const { return ptr_; }
-  element_type &operator*() const { return *ptr_; }
-  element_type *operator->() const { return ptr_; }
-  long use_count() const { return cntrl_ ? cntrl_->use_count() : 0; }
-  bool unique() const { return use_count() == 1; }
-  bool empty() const { return cntrl_ == nullptr; }
-  operator nat *() const { return (nat *)get(); }
-
-  static SharingPtr<T> make_shared();
-
-  template <class A0> static SharingPtr<T> make_shared(A0 &);
-
-  template <class A0, class A1> static SharingPtr<T> make_shared(A0 &, A1 &);
-
-  template <class A0, class A1, class A2>
-  static SharingPtr<T> make_shared(A0 &, A1 &, A2 &);
-
-  template <class A0, class A1, class A2, class A3>
-  static SharingPtr<T> make_shared(A0 &, A1 &, A2 &, A3 &);
-
-  template <class A0, class A1, class A2, class A3, class A4>
-  static SharingPtr<T> make_shared(A0 &, A1 &, A2 &, A3 &, A4 &);
-
-private:
-  template <class U> friend class SharingPtr;
-};
-
-template <class T>
-inline SharingPtr<T>::SharingPtr() : ptr_(nullptr), cntrl_(nullptr) {}
-
-template <class T>
-inline SharingPtr<T>::SharingPtr(std::nullptr_t)
-    : ptr_(nullptr), cntrl_(nullptr) {}
-
-template <class T>
-template <class Y>
-SharingPtr<T>::SharingPtr(Y *p) : ptr_(p), cntrl_(nullptr) {
-  std::unique_ptr<Y> hold(p);
-  typedef imp::shared_ptr_pointer<Y *> _CntrlBlk;
-  cntrl_ = new _CntrlBlk(p);
-  hold.release();
-}
-
-template <class T>
-template <class Y>
-SharingPtr<T>::SharingPtr(Y *p, imp::shared_count *cntrl_block)
-    : ptr_(p), cntrl_(cntrl_block) {}
-
-template <class T>
-template <class Y>
-inline SharingPtr<T>::SharingPtr(const SharingPtr<Y> &r, element_type *p)
-    : ptr_(p), cntrl_(r.cntrl_) {
-  if (cntrl_)
-    cntrl_->add_shared();
-}
-
-template <class T>
-inline SharingPtr<T>::SharingPtr(const SharingPtr &r)
-    : ptr_(r.ptr_), cntrl_(r.cntrl_) {
-  if (cntrl_)
-    cntrl_->add_shared();
-}
-
-template <class T>
-template <class Y>
-inline SharingPtr<T>::SharingPtr(const SharingPtr<Y> &r)
-    : ptr_(r.ptr_), cntrl_(r.cntrl_) {
-  if (cntrl_)
-    cntrl_->add_shared();
-}
-
-template <class T> SharingPtr<T>::~SharingPtr() {
-  if (cntrl_)
-    cntrl_->release_shared();
-}
-
-template <class T>
-inline SharingPtr<T> &SharingPtr<T>::operator=(const SharingPtr &r) {
-  SharingPtr(r).swap(*this);
-  return *this;
-}
-
-template <class T>
-template <class Y>
-inline SharingPtr<T> &SharingPtr<T>::operator=(const SharingPtr<Y> &r) {
-  SharingPtr(r).swap(*this);
-  return *this;
-}
-
-template <class T> inline void SharingPtr<T>::swap(SharingPtr &r) {
-  std::swap(ptr_, r.ptr_);
-  std::swap(cntrl_, r.cntrl_);
-}
-
-template <class T> inline void SharingPtr<T>::reset() {
-  SharingPtr().swap(*this);
-}
-
-template <class T> inline void SharingPtr<T>::reset(std::nullptr_t p) {
-  reset();
-}
-
-template <class T> template <class Y> inline void SharingPtr<T>::reset(Y *p) {
-  SharingPtr(p).swap(*this);
-}
-
-template <class T> SharingPtr<T> SharingPtr<T>::make_shared() {
-  typedef imp::shared_ptr_emplace<T> CntrlBlk;
-  SharingPtr<T> r;
-  r.cntrl_ = new CntrlBlk();
-  r.ptr_ = static_cast<CntrlBlk *>(r.cntrl_)->get();
-  return r;
-}
-
-template <class T>
-template <class A0>
-SharingPtr<T> SharingPtr<T>::make_shared(A0 &a0) {
-  typedef imp::shared_ptr_emplace<T> CntrlBlk;
-  SharingPtr<T> r;
-  r.cntrl_ = new CntrlBlk(a0);
-  r.ptr_ = static_cast<CntrlBlk *>(r.cntrl_)->get();
-  return r;
-}
-
-template <class T>
-template <class A0, class A1>
-SharingPtr<T> SharingPtr<T>::make_shared(A0 &a0, A1 &a1) {
-  typedef imp::shared_ptr_emplace<T> CntrlBlk;
-  SharingPtr<T> r;
-  r.cntrl_ = new CntrlBlk(a0, a1);
-  r.ptr_ = static_cast<CntrlBlk *>(r.cntrl_)->get();
-  return r;
-}
-
-template <class T>
-template <class A0, class A1, class A2>
-SharingPtr<T> SharingPtr<T>::make_shared(A0 &a0, A1 &a1, A2 &a2) {
-  typedef imp::shared_ptr_emplace<T> CntrlBlk;
-  SharingPtr<T> r;
-  r.cntrl_ = new CntrlBlk(a0, a1, a2);
-  r.ptr_ = static_cast<CntrlBlk *>(r.cntrl_)->get();
-  return r;
-}
-
-template <class T>
-template <class A0, class A1, class A2, class A3>
-SharingPtr<T> SharingPtr<T>::make_shared(A0 &a0, A1 &a1, A2 &a2, A3 &a3) {
-  typedef imp::shared_ptr_emplace<T> CntrlBlk;
-  SharingPtr<T> r;
-  r.cntrl_ = new CntrlBlk(a0, a1, a2, a3);
-  r.ptr_ = static_cast<CntrlBlk *>(r.cntrl_)->get();
-  return r;
-}
-
-template <class T>
-template <class A0, class A1, class A2, class A3, class A4>
-SharingPtr<T> SharingPtr<T>::make_shared(A0 &a0, A1 &a1, A2 &a2, A3 &a3,
-                                         A4 &a4) {
-  typedef imp::shared_ptr_emplace<T> CntrlBlk;
-  SharingPtr<T> r;
-  r.cntrl_ = new CntrlBlk(a0, a1, a2, a3, a4);
-  r.ptr_ = static_cast<CntrlBlk *>(r.cntrl_)->get();
-  return r;
-}
-
-template <class T> inline SharingPtr<T> make_shared() {
-  return SharingPtr<T>::make_shared();
-}
-
-template <class T, class A0> inline SharingPtr<T> make_shared(A0 &a0) {
-  return SharingPtr<T>::make_shared(a0);
-}
-
-template <class T, class A0, class A1>
-inline SharingPtr<T> make_shared(A0 &a0, A1 &a1) {
-  return SharingPtr<T>::make_shared(a0, a1);
-}
-
-template <class T, class A0, class A1, class A2>
-inline SharingPtr<T> make_shared(A0 &a0, A1 &a1, A2 &a2) {
-  return SharingPtr<T>::make_shared(a0, a1, a2);
-}
-
-template <class T, class A0, class A1, class A2, class A3>
-inline SharingPtr<T> make_shared(A0 &a0, A1 &a1, A2 &a2, A3 &a3) {
-  return SharingPtr<T>::make_shared(a0, a1, a2, a3);
-}
-
-template <class T, class A0, class A1, class A2, class A3, class A4>
-inline SharingPtr<T> make_shared(A0 &a0, A1 &a1, A2 &a2, A3 &a3, A4 &a4) {
-  return SharingPtr<T>::make_shared(a0, a1, a2, a3, a4);
-}
-
-template <class T, class U>
-inline bool operator==(const SharingPtr<T> &__x, const SharingPtr<U> &__y) {
-  return __x.get() == __y.get();
-}
-
-template <class T, class U>
-inline bool operator!=(const SharingPtr<T> &__x, const SharingPtr<U> &__y) {
-  return !(__x == __y);
-}
-
-template <class T, class U>
-inline bool operator<(const SharingPtr<T> &__x, const SharingPtr<U> &__y) {
-  return __x.get() < __y.get();
-}
-
-template <class T> inline void swap(SharingPtr<T> &__x, SharingPtr<T> &__y) {
-  __x.swap(__y);
-}
-
-template <class T, class U>
-inline SharingPtr<T> static_pointer_cast(const SharingPtr<U> &r) {
-  return SharingPtr<T>(r, static_cast<T *>(r.get()));
-}
-
-template <class T, class U>
-SharingPtr<T> const_pointer_cast(const SharingPtr<U> &r) {
-  return SharingPtr<T>(r, const_cast<T *>(r.get()));
-}
-
-template <class T> class LoggingSharingPtr : public SharingPtr<T> {
-  typedef SharingPtr<T> base;
-
-public:
-  typedef void (*Callback)(void *, const LoggingSharingPtr &, bool action);
-  // action:  false means increment just happened
-  //          true  means decrement is about to happen
-
-  LoggingSharingPtr() : cb_(0), baton_(nullptr) {}
-
-  LoggingSharingPtr(Callback cb, void *baton) : cb_(cb), baton_(baton) {
-    if (cb_)
-      cb_(baton_, *this, false);
-  }
-
-  template <class Y>
-  LoggingSharingPtr(Y *p) : base(p), cb_(0), baton_(nullptr) {}
-
-  template <class Y>
-  LoggingSharingPtr(Y *p, Callback cb, void *baton)
-      : base(p), cb_(cb), baton_(baton) {
-    if (cb_)
-      cb_(baton_, *this, false);
-  }
-
-  ~LoggingSharingPtr() {
-    if (cb_)
-      cb_(baton_, *this, true);
-  }
-
-  LoggingSharingPtr(const LoggingSharingPtr &p)
-      : base(p), cb_(p.cb_), baton_(p.baton_) {
-    if (cb_)
-      cb_(baton_, *this, false);
-  }
-
-  LoggingSharingPtr &operator=(const LoggingSharingPtr &p) {
-    if (cb_)
-      cb_(baton_, *this, true);
-    base::operator=(p);
-    cb_ = p.cb_;
-    baton_ = p.baton_;
-    if (cb_)
-      cb_(baton_, *this, false);
-    return *this;
-  }
-
-  void reset() {
-    if (cb_)
-      cb_(baton_, *this, true);
-    base::reset();
-  }
-
-  template <class Y> void reset(Y *p) {
-    if (cb_)
-      cb_(baton_, *this, true);
-    base::reset(p);
-    if (cb_)
-      cb_(baton_, *this, false);
-  }
-
-  void SetCallback(Callback cb, void *baton) {
-    cb_ = cb;
-    baton_ = baton;
-  }
-
-  void ClearCallback() {
-    cb_ = 0;
-    baton_ = 0;
-  }
-
-private:
-  Callback cb_;
-  void *baton_;
-};
-
-template <class T> class IntrusiveSharingPtr;
-
-template <class T> class ReferenceCountedBase {
-public:
-  explicit ReferenceCountedBase() : shared_owners_(-1) {}
-
-  void add_shared();
-
-  void release_shared();
-
-  long use_count() const { return shared_owners_ + 1; }
-
-protected:
-  long shared_owners_;
-
-  friend class IntrusiveSharingPtr<T>;
-
-private:
-  ReferenceCountedBase(const ReferenceCountedBase &) = delete;
-  ReferenceCountedBase &operator=(const ReferenceCountedBase &) = delete;
-};
-
-template <class T> void lldb_private::ReferenceCountedBase<T>::add_shared() {
-#ifdef _MSC_VER
-  _InterlockedIncrement(&shared_owners_);
-#else
-  ++shared_owners_;
-#endif
-}
-
-template <class T>
-void lldb_private::ReferenceCountedBase<T>::release_shared() {
-#ifdef _MSC_VER
-  if (_InterlockedDecrement(&shared_owners_) == -1)
-#else
-  if (--shared_owners_ == -1)
-#endif
-    delete static_cast<T *>(this);
-}
-
-template <class T>
-class ReferenceCountedBaseVirtual : public imp::shared_count {
-public:
-  explicit ReferenceCountedBaseVirtual() : imp::shared_count(-1) {}
-
-  ~ReferenceCountedBaseVirtual() override = default;
-
-  void on_zero_shared() override;
-};
-
-template <class T> void ReferenceCountedBaseVirtual<T>::on_zero_shared() {}
-
-template <typename T> class IntrusiveSharingPtr {
-public:
-  typedef T element_type;
-
-  explicit IntrusiveSharingPtr() : ptr_(0) {}
-
-  explicit IntrusiveSharingPtr(T *ptr) : ptr_(ptr) { add_shared(); }
-
-  IntrusiveSharingPtr(const IntrusiveSharingPtr &rhs) : ptr_(rhs.ptr_) {
-    add_shared();
-  }
-
-  template <class X>
-  IntrusiveSharingPtr(const IntrusiveSharingPtr<X> &rhs) : ptr_(rhs.get()) {
-    add_shared();
-  }
-
-  IntrusiveSharingPtr &operator=(const IntrusiveSharingPtr &rhs) {
-    reset(rhs.get());
-    return *this;
-  }
-
-  template <class X>
-  IntrusiveSharingPtr &operator=(const IntrusiveSharingPtr<X> &rhs) {
-    reset(rhs.get());
-    return *this;
-  }
-
-  IntrusiveSharingPtr &operator=(T *ptr) {
-    reset(ptr);
-    return *this;
-  }
-
-  ~IntrusiveSharingPtr() {
-    release_shared();
-    ptr_ = nullptr;
-  }
-
-  T &operator*() const { return *ptr_; }
-
-  T *operator->() const { return ptr_; }
-
-  T *get() const { return ptr_; }
-
-  explicit operator bool() const { return ptr_ != 0; }
-
-  void swap(IntrusiveSharingPtr &rhs) {
-    std::swap(ptr_, rhs.ptr_);
-#if defined(ENABLE_SP_LOGGING)
-    track_sp(this, ptr_, use_count());
-    track_sp(&rhs, rhs.ptr_, rhs.use_count());
-#endif
-  }
-
-  void reset(T *ptr = nullptr) { IntrusiveSharingPtr(ptr).swap(*this); }
-
-  long use_count() const {
-    if (ptr_)
-      return ptr_->use_count();
-    return 0;
-  }
-
-  bool unique() const { return use_count() == 1; }
-
-private:
-  element_type *ptr_;
-
-  void add_shared() {
-    if (ptr_) {
-      ptr_->add_shared();
-#if defined(ENABLE_SP_LOGGING)
-      track_sp(this, ptr_, ptr_->use_count());
-#endif
-    }
-  }
-  void release_shared() {
-    if (ptr_) {
-#if defined(ENABLE_SP_LOGGING)
-      track_sp(this, nullptr, ptr_->use_count() - 1);
-#endif
-      ptr_->release_shared();
-    }
-  }
-};
-
-template <class T, class U>
-inline bool operator==(const IntrusiveSharingPtr<T> &lhs,
-                       const IntrusiveSharingPtr<U> &rhs) {
-  return lhs.get() == rhs.get();
-}
-
-template <class T, class U>
-inline bool operator!=(const IntrusiveSharingPtr<T> &lhs,
-                       const IntrusiveSharingPtr<U> &rhs) {
-  return lhs.get() != rhs.get();
-}
-
-template <class T, class U>
-inline bool operator==(const IntrusiveSharingPtr<T> &lhs, U *rhs) {
-  return lhs.get() == rhs;
-}
-
-template <class T, class U>
-inline bool operator!=(const IntrusiveSharingPtr<T> &lhs, U *rhs) {
-  return lhs.get() != rhs;
-}
-
-template <class T, class U>
-inline bool operator==(T *lhs, const IntrusiveSharingPtr<U> &rhs) {
-  return lhs == rhs.get();
-}
-
-template <class T, class U>
-inline bool operator!=(T *lhs, const IntrusiveSharingPtr<U> &rhs) {
-  return lhs != rhs.get();
-}
-
-} // namespace lldb_private
-
-#endif // utility_SharingPtr_h_
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/.clang-format b/gnu/llvm/lldb/packages/Python/lldbsuite/.clang-format
deleted file mode 100644 (file)
index 7de7a51..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-DisableFormat: true
-
-# Disabling formatting doesn't implicitly disable include sorting
-SortIncludes: false
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/android/platform/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/android/platform/Makefile
deleted file mode 100644 (file)
index 3d0b98f..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-CXX_SOURCES := main.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/android/platform/TestDefaultCacheLineSize.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/android/platform/TestDefaultCacheLineSize.py
deleted file mode 100644 (file)
index 0a5475c..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-"""
-Verify the default cache line size for android targets
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class DefaultCacheLineSizeTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessTargetAndroid
-    def test_cache_line_size(self):
-        self.build(dictionary=self.getBuildFlags())
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target and target.IsValid(), "Target is valid")
-
-        breakpoint = target.BreakpointCreateByName("main")
-        self.assertTrue(
-            breakpoint and breakpoint.IsValid(),
-            "Breakpoint is valid")
-
-        # Run the program.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process and process.IsValid(), PROCESS_IS_VALID)
-        self.assertEqual(
-            process.GetState(),
-            lldb.eStateStopped,
-            PROCESS_STOPPED)
-
-        # check the setting value
-        self.expect(
-            "settings show target.process.memory-cache-line-size",
-            patterns=[" = 2048"])
-
-        # Run to completion.
-        process.Continue()
-        self.assertEqual(process.GetState(), lldb.eStateExited, PROCESS_EXITED)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/android/platform/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/android/platform/main.cpp
deleted file mode 100644 (file)
index e8f3fa6..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-int main ()
-{
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/check_public_api_headers/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/check_public_api_headers/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/check_public_api_headers/TestPublicAPIHeaders.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/check_public_api_headers/TestPublicAPIHeaders.py
deleted file mode 100644 (file)
index 6f95cd7..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-"""Test the integrity of the lldb public api directory containing SB*.h headers.
-
-There should be nothing unwanted there and a simpe main.cpp which includes SB*.h
-should compile and link with the LLDB framework."""
-
-from __future__ import print_function
-
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class SBDirCheckerCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        TestBase.setUp(self)
-        self.source = 'main.cpp'
-        self.generateSource(self.source)
-
-    @skipIfNoSBHeaders
-    def test_sb_api_directory(self):
-        """Test the SB API directory and make sure there's no unwanted stuff."""
-
-        # Only proceed if this is an Apple OS, "x86_64", and local platform.
-        if not (self.platformIsDarwin() and self.getArchitecture() == "x86_64"):
-            self.skipTest("This test is only for LLDB.framework built 64-bit")
-        if self.getArchitecture() == "i386":
-            self.skipTest(
-                "LLDB is 64-bit and cannot be linked to 32-bit test program.")
-
-        exe_name = self.getBuildArtifact("a.out")
-        self.buildDriver(self.source, exe_name)
-        self.sanity_check_executable(exe_name)
-
-    def sanity_check_executable(self, exe_name):
-        """Sanity check executable compiled from the auto-generated program."""
-        exe_name = self.getBuildArtifact("a.out")
-        exe = self.getBuildArtifact(exe_name)
-        self.runCmd("file %s" % exe, CURRENT_EXECUTABLE_SET)
-
-        # This test uses a generated source file, so it's in the build directory.
-        self.line_to_break = line_number(
-            self.getBuildArtifact(self.source), '// Set breakpoint here.')
-
-        env_cmd = "settings set target.env-vars %s=%s" % (
-            self.dylibPath, self.getLLDBLibraryEnvVal())
-        if self.TraceOn():
-            print("Set environment to: ", env_cmd)
-        self.runCmd(env_cmd)
-        self.addTearDownHook(
-            lambda: self.dbg.HandleCommand(
-                "settings remove target.env-vars %s" %
-                self.dylibPath))
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, self.source, self.line_to_break, num_expected_locations=-1)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        self.runCmd('frame variable')
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/check_public_api_headers/main.cpp.template b/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/check_public_api_headers/main.cpp.template
deleted file mode 100644 (file)
index 7fced85..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <stdio.h>
-%include_SB_APIs%
-
-using namespace lldb;
-int
-main(int argc, char const *argv[])
-{
-    SBDebugger::Initialize();
-    SBDebugger dbg = SBDebugger::Create();
-
-    printf("Hello SBDebugger %llu\n", dbg.GetID()); // Set breakpoint here.
-
-    SBDebugger::Terminate();
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/command-return-object/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/command-return-object/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/command-return-object/TestSBCommandReturnObject.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/command-return-object/TestSBCommandReturnObject.py
deleted file mode 100644 (file)
index c7aa2ec..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-"""Test the lldb public C++ api for returning SBCommandReturnObject."""
-
-from __future__ import print_function
-
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestSBCommandReturnObject(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @skipIfNoSBHeaders
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr43570")
-    def test_sb_command_return_object(self):
-        env = {self.dylibPath: self.getLLDBLibraryEnvVal()}
-
-        self.driver_exe = self.getBuildArtifact("command-return-object")
-        self.buildDriver('main.cpp', self.driver_exe)
-        self.addTearDownHook(lambda: os.remove(self.driver_exe))
-        self.signBinary(self.driver_exe)
-
-        if self.TraceOn():
-            print("Running test %s" % self.driver_exe)
-            check_call([self.driver_exe, self.driver_exe], env=env)
-        else:
-            with open(os.devnull, 'w') as fnull:
-                check_call([self.driver_exe, self.driver_exe],
-                           env=env, stdout=fnull, stderr=fnull)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/command-return-object/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/command-return-object/main.cpp
deleted file mode 100644 (file)
index c1d4d24..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#include "lldb/API/SBCommandInterpreter.h"
-#include "lldb/API/SBCommandReturnObject.h"
-#include "lldb/API/SBDebugger.h"
-
-using namespace lldb;
-
-static SBCommandReturnObject subcommand(SBDebugger &dbg, const char *cmd) {
-  SBCommandReturnObject Result;
-  dbg.GetCommandInterpreter().HandleCommand(cmd, Result);
-  return Result;
-}
-
-class CommandCrasher : public SBCommandPluginInterface {
-public:
-  bool DoExecute(SBDebugger dbg, char **command,
-                 SBCommandReturnObject &result) {
-    // Test assignment from a different SBCommandReturnObject instance.
-    result = subcommand(dbg, "help");
-    // Test also whether self-assignment is handled correctly.
-    result = result;
-    return result.Succeeded();
-  }
-};
-
-int main() {
-  SBDebugger::Initialize();
-  SBDebugger dbg = SBDebugger::Create(false /*source_init_files*/);
-  SBCommandInterpreter interp = dbg.GetCommandInterpreter();
-  static CommandCrasher crasher;
-  interp.AddCommand("crasher", &crasher, nullptr /*help*/);
-  SBCommandReturnObject Result;
-  dbg.GetCommandInterpreter().HandleCommand("crasher", Result);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/listeners/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/listeners/Makefile
deleted file mode 100644 (file)
index 692ba17..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/listeners/TestListener.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/listeners/TestListener.py
deleted file mode 100644 (file)
index 480041b..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-"""
-Test that we can listen to modules loaded events.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-import six
-
-
-class ListenToModuleLoadedEvents (TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_receiving_breakpoint_added(self):
-        """Test that we get breakpoint added events, waiting on event classes on the debugger"""
-        self.build()
-
-        my_listener = lldb.SBListener("test_listener")
-
-        my_listener.StartListeningForEventClass(
-            self.dbg,
-            lldb.SBTarget.GetBroadcasterClassName(),
-            lldb.SBTarget.eBroadcastBitBreakpointChanged)
-
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-
-        bkpt = target.BreakpointCreateByName("main")
-
-        event = lldb.SBEvent()
-        my_listener.WaitForEvent(1, event)
-
-        self.assertTrue(event.IsValid(), "Got a valid event.")
-        self.assertTrue(
-            lldb.SBBreakpoint.EventIsBreakpointEvent(event),
-            "It is a breakpoint event.")
-        self.assertTrue(lldb.SBBreakpoint.GetBreakpointEventTypeFromEvent(
-            event) == lldb.eBreakpointEventTypeAdded, "It is a breakpoint added event.")
-        self.assertTrue(
-            bkpt == lldb.SBBreakpoint.GetBreakpointFromEvent(event),
-            "It is our breakpoint.")
-
-        # Now make sure if we stop listening for events we don't get them:
-
-        my_listener.StopListeningForEventClass(
-            self.dbg,
-            lldb.SBTarget.GetBroadcasterClassName(),
-            lldb.SBTarget.eBroadcastBitBreakpointChanged)
-        my_listener.StopListeningForEvents(
-            target.GetBroadcaster(),
-            lldb.SBTarget.eBroadcastBitBreakpointChanged)
-
-        bkpt2 = target.BreakpointCreateByName("main")
-        my_listener.WaitForEvent(1, event)
-        self.assertTrue(
-            not event.IsValid(),
-            "We don't get events we aren't listening to.")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/listeners/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/listeners/main.c
deleted file mode 100644 (file)
index f930e51..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <stdio.h>
-
-int
-main()
-{
-    printf ("Hello there.\n");
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/log/TestAPILog.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/log/TestAPILog.py
deleted file mode 100644 (file)
index c0ffa2c..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-"""
-Test API logging.
-"""
-
-import re
-
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbtest import *
-
-
-class APILogTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_api_log(self):
-        """Test API logging"""
-        logfile = os.path.join(self.getBuildDir(), "api-log.txt")
-
-        def cleanup():
-            if os.path.exists(logfile):
-                os.unlink(logfile)
-
-        self.addTearDownHook(cleanup)
-        self.expect("log enable lldb api -f {}".format(logfile))
-
-        self.dbg.SetDefaultArchitecture(None)
-        self.dbg.GetScriptingLanguage(None)
-        target = self.dbg.CreateTarget(None)
-
-        print(logfile)
-        with open(logfile, 'r') as f:
-            log = f.read()
-
-        # Find the SBDebugger's address.
-        debugger_addr = re.findall(
-            r"lldb::SBDebugger::GetScriptingLanguage\([^)]*\) \(0x([0-9a-fA-F]+),",
-            log)
-
-        # Make sure we've found a match.
-        self.assertTrue(debugger_addr, log)
-
-        # Make sure the GetScriptingLanguage matches.
-        self.assertTrue(re.search(r'lldb::SBDebugger::GetScriptingLanguage\([^)]*\) \(0x{}, ""\)'.format(
-            debugger_addr[0]), log), log)
-
-        # Make sure the address matches.
-        self.assertTrue(re.search(r'lldb::SBDebugger::CreateTarget\([^)]*\) \(0x{}, ""\)'.format(
-            debugger_addr[0]), log), log)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multiple-debuggers/.categories b/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multiple-debuggers/.categories
deleted file mode 100644 (file)
index 6e70196..0000000
+++ /dev/null
@@ -1 +0,0 @@
-stresstest
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multiple-debuggers/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multiple-debuggers/Makefile
deleted file mode 100644 (file)
index f40386a..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-MAKE_DSYM := NO
-
-ENABLE_THREADS := YES
-CXX_SOURCES := multi-process-driver.cpp testprog.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multiple-debuggers/TestMultipleDebuggers.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multiple-debuggers/TestMultipleDebuggers.py
deleted file mode 100644 (file)
index 1447bbd..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-"""Test the lldb public C++ api when doing multiple debug sessions simultaneously."""
-
-from __future__ import print_function
-
-
-import os
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestMultipleSimultaneousDebuggers(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # This test case fails non-deterministically.
-    @skipIfNoSBHeaders
-    @expectedFailureAll(bugnumber="llvm.org/pr20282")
-    def test_multiple_debuggers(self):
-        env = {self.dylibPath: self.getLLDBLibraryEnvVal()}
-
-        self.driver_exe = self.getBuildArtifact("multi-process-driver")
-        self.buildDriver('multi-process-driver.cpp', self.driver_exe)
-        self.addTearDownHook(lambda: os.remove(self.driver_exe))
-        self.signBinary(self.driver_exe)
-
-        self.inferior_exe = self.getBuildArtifact("testprog")
-        self.buildDriver('testprog.cpp', self.inferior_exe)
-        self.addTearDownHook(lambda: os.remove(self.inferior_exe))
-
-# check_call will raise a CalledProcessError if multi-process-driver doesn't return
-# exit code 0 to indicate success.  We can let this exception go - the test harness
-# will recognize it as a test failure.
-
-        if self.TraceOn():
-            print("Running test %s" % self.driver_exe)
-            check_call([self.driver_exe, self.inferior_exe], env=env)
-        else:
-            with open(os.devnull, 'w') as fnull:
-                check_call([self.driver_exe, self.inferior_exe],
-                           env=env, stdout=fnull, stderr=fnull)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multiple-debuggers/multi-process-driver.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multiple-debuggers/multi-process-driver.cpp
deleted file mode 100644 (file)
index 15170a3..0000000
+++ /dev/null
@@ -1,287 +0,0 @@
-
-// This program creates NUMBER_OF_SIMULTANEOUS_DEBUG_SESSIONS of pthreads, 
-// creates an lldb Debugger on each thread, creates targets, inserts two
-// breakpoints, runs to the first breakpoint, backtraces, runs to the second
-// breakpoint, backtraces, kills the inferior process, closes down the
-// debugger.
-
-// The main thread keeps track of which pthreads have completed and which 
-// pthreads have completed successfully, and exits when all pthreads have
-// completed successfully, or our time limit has been exceeded.
-
-// This test file helps to uncover race conditions and locking mistakes
-// that are hit when lldb is being used to debug multiple processes
-// simultaneously.
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "lldb/API/LLDB.h"
-#include "lldb/API/SBCommandInterpreter.h"
-#include "lldb/API/SBCommandReturnObject.h"
-#include "lldb/API/SBDebugger.h"
-
-#include <chrono>
-#include <thread>
-
-#define NUMBER_OF_SIMULTANEOUS_DEBUG_SESSIONS 10
-
-#define DEBUG 0
-
-using namespace lldb;
-
-bool *completed_threads_array = 0;
-bool *successful_threads_array  = 0;
-
-const char *inferior_process_name = "testprog";
-
-bool
-wait_for_stop_event (SBProcess process, SBListener listener)
-{
-    bool stopped = false;
-    while (!stopped)
-    {
-        SBEvent event;
-        bool waitfor_ret = listener.WaitForEvent (2, event);
-        if (event.GetType() == SBProcess::eBroadcastBitStateChanged)
-        {
-            if (process.GetState() == StateType::eStateStopped
-                || process.GetState() == StateType::eStateCrashed
-                || process.GetState() == StateType::eStateDetached
-                || process.GetState() == StateType::eStateExited)
-            {
-                stopped = true;
-            }
-        }
-    }
-    return stopped;
-}
-
-bool
-walk_stack_to_main (SBThread thread)
-{
-    if (thread.IsValid() == 0)
-    {
-        return false;
-    }
-
-    bool found_main = false;
-    uint32_t curr_frame = 0;
-    const uint32_t framecount = thread.GetNumFrames();
-    while (!found_main && curr_frame < framecount)
-    {
-        SBFrame frame = thread.GetFrameAtIndex (curr_frame);
-        if (strcmp (frame.GetFunctionName(), "main") == 0)
-        {
-            found_main = true;
-            break;
-        }
-        curr_frame += 1;
-    }
-    return found_main;
-}
-
-void *do_one_debugger (void *in)
-{
-    uint64_t threadnum = (uint64_t) in;
-
-#if defined (__APPLE__)
-    char *threadname;
-    asprintf (&threadname, "thread #%lld", threadnum);
-    pthread_setname_np (threadname);
-    free (threadname);
-#endif
-
-#if DEBUG == 1
-    printf ("#%lld: Starting debug session\n", threadnum);
-#endif
-
-    SBDebugger debugger = lldb::SBDebugger::Create (false);
-    if (debugger.IsValid ())
-    {
-        debugger.SetAsync (true);
-        SBTarget target = debugger.CreateTargetWithFileAndArch(inferior_process_name, "x86_64");
-        SBCommandInterpreter command_interp = debugger.GetCommandInterpreter();
-        if (target.IsValid())
-        {
-            SBBreakpoint bar_br = target.BreakpointCreateByName ("bar", "testprog");
-            if (!bar_br.IsValid())
-            {
-                printf ("#%lld: failed to set breakpoint on bar, exiting.\n", threadnum);
-                exit (1);
-            }
-            SBBreakpoint foo_br = target.BreakpointCreateByName ("foo", "testprog");
-            if (!foo_br.IsValid())
-            {
-                printf ("#%lld: Failed to set breakpoint on foo()\n", threadnum);
-            }
-
-            SBLaunchInfo launch_info (NULL);
-            SBError error;
-            SBProcess process = target.Launch (launch_info, error);
-            if (process.IsValid())
-            {
-                SBListener listener = debugger.GetListener();
-                SBBroadcaster broadcaster = process.GetBroadcaster();
-                uint32_t rc = broadcaster.AddListener (listener, SBProcess::eBroadcastBitStateChanged);
-                if (rc == 0)
-                {
-                    printf ("adding listener failed\n");
-                    exit (1);
-                }
-
-                wait_for_stop_event (process, listener);
-
-                if (!walk_stack_to_main (process.GetThreadAtIndex(0)))
-                {
-                    printf ("#%lld: backtrace while @ foo() failed\n", threadnum);
-                    completed_threads_array[threadnum] = true;
-                    return (void *) 1;
-                }
-
-                if (strcmp (process.GetThreadAtIndex(0).GetFrameAtIndex(0).GetFunctionName(), "foo") != 0)
-                {
-#if DEBUG == 1
-                    printf ("#%lld: First breakpoint did not stop at foo(), instead stopped at '%s'\n", threadnum, process.GetThreadAtIndex(0).GetFrameAtIndex(0).GetFunctionName());
-#endif
-                    completed_threads_array[threadnum] = true;
-                    return (void*) 1;
-                }
-
-                process.Continue();
-
-                wait_for_stop_event (process, listener);
-
-                if (process.GetState() == StateType::eStateExited)
-                {
-                    printf ("#%lld: Process exited\n", threadnum);
-                    completed_threads_array[threadnum] = true;
-                    return (void *) 1;
-                }
-
-
-                if (!walk_stack_to_main (process.GetThreadAtIndex(0)))
-                {
-                    printf ("#%lld: backtrace while @ bar() failed\n", threadnum);
-                    completed_threads_array[threadnum] = true;
-                    return (void *) 1;
-                }
-
-                if (strcmp (process.GetThreadAtIndex(0).GetFrameAtIndex(0).GetFunctionName(), "bar") != 0)
-                {
-                    printf ("#%lld: First breakpoint did not stop at bar()\n", threadnum);
-                    completed_threads_array[threadnum] = true;
-                    return (void*) 1;
-                }
-
-                process.Kill();
-
-                wait_for_stop_event (process, listener);
-
-                SBDebugger::Destroy(debugger);
-
-#if DEBUG == 1
-                printf ("#%lld: All good!\n", threadnum);
-#endif
-                successful_threads_array[threadnum] = true;
-                completed_threads_array[threadnum] = true;
-                return (void*) 0;
-            }
-            else
-            {
-                printf("#%lld: process failed to launch\n", threadnum);
-                successful_threads_array[threadnum] = false;
-                completed_threads_array[threadnum] = true;
-                return (void*) 0;
-            }
-        }
-        else
-        {
-            printf ("#%lld: did not get valid target\n", threadnum);
-            successful_threads_array[threadnum] = false;
-            completed_threads_array[threadnum] = true;
-            return (void*) 0;
-        }
-    }
-    else
-    {
-        printf ("#%lld: did not get debugger\n", threadnum);
-        successful_threads_array[threadnum] = false;
-        completed_threads_array[threadnum] = true;
-        return (void*) 0;
-    }
-    completed_threads_array[threadnum] = true;
-    return (void*) 1;
-}
-
-int main (int argc, char **argv)
-{
-#if !defined(_MSC_VER)
-  signal(SIGPIPE, SIG_IGN);
-#endif
-  
-    SBDebugger::Initialize();
-
-    completed_threads_array = (bool *) malloc (sizeof (bool) * NUMBER_OF_SIMULTANEOUS_DEBUG_SESSIONS);
-    memset (completed_threads_array, 0, sizeof (bool) * NUMBER_OF_SIMULTANEOUS_DEBUG_SESSIONS);
-    successful_threads_array = (bool *) malloc (sizeof (bool) * NUMBER_OF_SIMULTANEOUS_DEBUG_SESSIONS);
-    memset (successful_threads_array, 0, sizeof (bool) * NUMBER_OF_SIMULTANEOUS_DEBUG_SESSIONS);
-
-    if (argc > 1 && argv[1] != NULL)
-    {
-        inferior_process_name = argv[1];
-    }
-
-    std::thread threads[NUMBER_OF_SIMULTANEOUS_DEBUG_SESSIONS];
-    for (uint64_t i = 0; i< NUMBER_OF_SIMULTANEOUS_DEBUG_SESSIONS; i++)
-    {
-        threads[i] = std::move(std::thread(do_one_debugger, (void*)i));
-    }
-
-
-    int max_time_to_wait = 20;  // 20 iterations, or 60 seconds
-    int iter = 0;
-    while (1)
-    {
-        std::this_thread::sleep_for(std::chrono::seconds(3));
-        bool all_done = true;
-        int successful_threads = 0;
-        int total_completed_threads = 0;
-        for (uint64_t i = 0; i < NUMBER_OF_SIMULTANEOUS_DEBUG_SESSIONS; i++)
-        {
-            if (successful_threads_array[i] == true)
-                successful_threads++;
-            if (completed_threads_array[i] == true)
-                total_completed_threads++;
-            if (completed_threads_array[i] == false)
-            {
-                all_done = false;
-            }
-        }
-        if (all_done)
-        {
-#if DEBUG == 1
-            printf ("All threads completed.\n");
-            printf ("%d threads completed successfully out of %d\n", successful_threads, NUMBER_OF_SIMULTANEOUS_DEBUG_SESSIONS);
-#endif
-            SBDebugger::Terminate();
-            exit(0);
-        }
-        else
-        {
-#if DEBUG == 1
-            printf ("%d threads completed so far (%d successfully), out of %d\n", total_completed_threads, successful_threads, NUMBER_OF_SIMULTANEOUS_DEBUG_SESSIONS);
-#endif
-        }
-        if (iter++ == max_time_to_wait)
-        {
-            printf ("reached maximum timeout but only %d threads have completed so far (%d successfully), out of %d.  Exiting.\n", total_completed_threads, successful_threads, NUMBER_OF_SIMULTANEOUS_DEBUG_SESSIONS);
-            break;
-        }
-    }
-
-
-    SBDebugger::Terminate();
-    exit (1);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multiple-debuggers/testprog.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multiple-debuggers/testprog.cpp
deleted file mode 100644 (file)
index c9d1ea1..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-int bar ()
-{
-    return 5;
-}
-int foo ()
-{
-    return bar() + 5;
-}
-int main ()
-{
-    return foo();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multiple-targets/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multiple-targets/Makefile
deleted file mode 100644 (file)
index 3316b59..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-MAKE_DSYM := NO
-
-ENABLE_THREADS := YES
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multiple-targets/TestMultipleTargets.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multiple-targets/TestMultipleTargets.py
deleted file mode 100644 (file)
index 1268ff9..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-"""Test the lldb public C++ api when creating multiple targets simultaneously."""
-
-from __future__ import print_function
-
-
-import os
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestMultipleTargets(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @skipIfNoSBHeaders
-    @skipIfHostIncompatibleWithRemote
-    @expectedFailureAll(
-        oslist=["windows", "freebsd"],
-        bugnumber="llvm.org/pr20282")
-    def test_multiple_targets(self):
-        env = {self.dylibPath: self.getLLDBLibraryEnvVal()}
-
-        self.driver_exe = self.getBuildArtifact("multi-target")
-        self.buildDriver('main.cpp', self.driver_exe)
-        self.addTearDownHook(lambda: os.remove(self.driver_exe))
-        self.signBinary(self.driver_exe)
-
-# check_call will raise a CalledProcessError if multi-process-driver doesn't return
-# exit code 0 to indicate success.  We can let this exception go - the test harness
-# will recognize it as a test failure.
-
-        if self.TraceOn():
-            print("Running test %s" % self.driver_exe)
-            check_call([self.driver_exe, self.driver_exe], env=env)
-        else:
-            with open(os.devnull, 'w') as fnull:
-                check_call([self.driver_exe, self.driver_exe],
-                           env=env, stdout=fnull, stderr=fnull)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multiple-targets/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multiple-targets/main.cpp
deleted file mode 100644 (file)
index 35fb4e0..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#include <thread>
-
-#include "lldb/API/LLDB.h"
-#include "lldb/API/SBDebugger.h"
-#include "lldb/API/SBTarget.h"
-
-using namespace lldb;
-int main (int argc, char **argv)
-{
-  // We are expecting the program path and a path to an executable to load
-  if (argc != 2)
-    return 1;
-  const char *program_file = argv[1];
-  SBDebugger::Initialize();
-  SBDebugger debugger = SBDebugger::Create(false);
-  auto lambda = [&](){
-    SBError error;
-    SBTarget target = debugger.CreateTarget(program_file, nullptr, nullptr, 
-                                            false, error);
-  };
-
-  // Create 3 targets at the same time and make sure we don't crash.
-  std::thread thread1(lambda);
-  std::thread thread2(lambda);
-  std::thread thread3(lambda);
-  thread1.join();
-  thread2.join();
-  thread3.join();
-  SBDebugger::Terminate();
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multithreaded/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multithreaded/Makefile
deleted file mode 100644 (file)
index 8176721..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-ENABLE_THREADS := YES
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
-
-clean::
-       rm -rf $(wildcard *.o *.d *.dSYM)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multithreaded/TestMultithreaded.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multithreaded/TestMultithreaded.py
deleted file mode 100644 (file)
index 436f645..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-"""Test the lldb public C++ api breakpoint callbacks."""
-
-from __future__ import print_function
-
-# __package__ = "lldbsuite.test"
-
-
-import os
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class SBBreakpointCallbackCase(TestBase):
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        TestBase.setUp(self)
-        self.generateSource('driver.cpp')
-        self.generateSource('listener_test.cpp')
-        self.generateSource('test_breakpoint_callback.cpp')
-        self.generateSource('test_listener_event_description.cpp')
-        self.generateSource('test_listener_event_process_state.cpp')
-        self.generateSource('test_listener_resume.cpp')
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfRemote
-    @skipIfNoSBHeaders
-    # clang-cl does not support throw or catch (llvm.org/pr24538)
-    @skipIfWindows
-    def test_breakpoint_callback(self):
-        """Test the that SBBreakpoint callback is invoked when a breakpoint is hit. """
-        self.build_and_test('driver.cpp test_breakpoint_callback.cpp',
-                            'test_breakpoint_callback')
-
-    @skipIfRemote
-    @skipIfNoSBHeaders
-    # clang-cl does not support throw or catch (llvm.org/pr24538)
-    @skipIfWindows
-    @expectedFlakeyFreeBSD
-    def test_sb_api_listener_event_description(self):
-        """ Test the description of an SBListener breakpoint event is valid."""
-        self.build_and_test(
-            'driver.cpp listener_test.cpp test_listener_event_description.cpp',
-            'test_listener_event_description')
-
-    @skipIfRemote
-    @skipIfNoSBHeaders
-    # clang-cl does not support throw or catch (llvm.org/pr24538)
-    @skipIfWindows
-    @expectedFlakeyFreeBSD
-    def test_sb_api_listener_event_process_state(self):
-        """ Test that a registered SBListener receives events when a process
-            changes state.
-        """
-        self.build_and_test(
-            'driver.cpp listener_test.cpp test_listener_event_process_state.cpp',
-            'test_listener_event_process_state')
-
-    @skipIfRemote
-    @skipIfNoSBHeaders
-    # clang-cl does not support throw or catch (llvm.org/pr24538)
-    @skipIfWindows
-    @expectedFlakeyFreeBSD
-    @skipIf(oslist=["linux"]) # flakey
-    def test_sb_api_listener_resume(self):
-        """ Test that a process can be resumed from a non-main thread. """
-        self.build_and_test(
-            'driver.cpp listener_test.cpp test_listener_resume.cpp',
-            'test_listener_resume')
-
-    def build_and_test(self, sources, test_name, args=None):
-        """ Build LLDB test from sources, and run expecting 0 exit code """
-
-        # These tests link against host lldb API.
-        # Compiler's target triple must match liblldb triple
-        # because remote is disabled, we can assume that the os is the same
-        # still need to check architecture
-        if self.getLldbArchitecture() != self.getArchitecture():
-            self.skipTest(
-                "This test is only run if the target arch is the same as the lldb binary arch")
-
-        self.inferior = 'inferior_program'
-        self.buildProgram('inferior.cpp', self.inferior)
-        self.addTearDownHook(lambda:
-                             os.remove(self.getBuildArtifact(self.inferior)))
-
-        self.buildDriver(sources, test_name)
-        self.addTearDownHook(lambda:
-                             os.remove(self.getBuildArtifact(test_name)))
-
-        test_exe = self.getBuildArtifact(test_name)
-        self.signBinary(test_exe)
-        exe = [test_exe, self.getBuildArtifact(self.inferior)]
-
-        env = {self.dylibPath: self.getLLDBLibraryEnvVal()}
-        if 'LLDB_DEBUGSERVER_PATH' in os.environ:
-            env['LLDB_DEBUGSERVER_PATH'] = os.environ['LLDB_DEBUGSERVER_PATH']
-        if self.TraceOn():
-            print("Running test %s" % " ".join(exe))
-            check_call(exe, env=env)
-        else:
-            with open(os.devnull, 'w') as fnull:
-                check_call(exe, env=env, stdout=fnull, stderr=fnull)
-
-    def build_program(self, sources, program):
-        return self.buildDriver(sources, program)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multithreaded/common.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multithreaded/common.h
deleted file mode 100644 (file)
index bd40bdd..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-#ifndef LLDB_TEST_API_COMMON_H
-#define LLDB_TEST_API_COMMON_H
-
-#include <condition_variable>
-#include <chrono>
-#include <exception>
-#include <iostream>
-#include <mutex>
-#include <string>
-#include <queue>
-
-#include <unistd.h>
-
-/// Simple exception class with a message
-struct Exception : public std::exception
-{
-  std::string s;
-  Exception(std::string ss) : s(ss) {}
-  virtual ~Exception() throw () { }
-  const char* what() const throw() { return s.c_str(); }
-};
-
-// Synchronized data structure for listener to send events through
-template<typename T>
-class multithreaded_queue {
-  std::condition_variable m_condition;
-  std::mutex m_mutex;
-  std::queue<T> m_data;
-  bool m_notified;
-
-public:
-
-  void push(T e) {
-    std::lock_guard<std::mutex> lock(m_mutex);
-    m_data.push(e);
-    m_notified = true;
-    m_condition.notify_all();
-  }
-
-  T pop(int timeout_seconds, bool &success) {
-    int count = 0;
-    while (count < timeout_seconds) {
-      std::unique_lock<std::mutex> lock(m_mutex);
-      if (!m_data.empty()) {
-        m_notified = false;
-        T ret = m_data.front();
-        m_data.pop();
-        success = true;
-        return ret;
-      } else if (!m_notified)
-        m_condition.wait_for(lock, std::chrono::seconds(1));
-      count ++;
-    }
-    success = false;
-    return T();
-  }
-};
-
-/// Allocates a char buffer with the current working directory
-inline char* get_working_dir() {
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
-    return getwd(0);
-#else
-    return get_current_dir_name();
-#endif
-}
-
-#endif // LLDB_TEST_API_COMMON_H
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multithreaded/driver.cpp.template b/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multithreaded/driver.cpp.template
deleted file mode 100644 (file)
index 3245942..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-
-/// LLDB C API Test Driver
-
-#include <algorithm>
-#include <iostream>
-#include <iterator>
-#include <string>
-#include <vector>
-#if !defined(_MSC_VER)
-  #include <signal.h>
-#endif
-
-%include_SB_APIs%
-
-#include "common.h"
-
-using namespace std;
-using namespace lldb;
-
-void test(SBDebugger &dbg, std::vector<string> args);
-
-int main(int argc, char** argv) {
-
-// Ignore SIGPIPE.  The lldb driver does this as well,
-// because we seem to get spurious SIGPIPES on some
-// Unixen that take the driver down.
-#if !defined(_MSC_VER)
-  signal(SIGPIPE, SIG_IGN);
-#endif
-  int code = 0;
-
-  SBDebugger::Initialize();
-  SBDebugger dbg = SBDebugger::Create();
-  dbg.HandleCommand("settings set symbols.enable-external-lookup false");
-  dbg.HandleCommand(
-      "settings set plugin.process.gdb-remote.packet-timeout 60");
-
-  try {
-    if (!dbg.IsValid())
-      throw Exception("invalid debugger");
-    vector<string> args(argv + 1, argv + argc);
-
-    test(dbg, args);
-  } catch (Exception &e) {
-    cout << "ERROR: " << e.what() << endl;
-    code = 1;
-  }
-
-  SBDebugger::Destroy(dbg);
-  return code;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multithreaded/inferior.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multithreaded/inferior.cpp
deleted file mode 100644 (file)
index 9dbb289..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-
-#include <iostream>
-
-using namespace std;
-
-int next() {
-  static int i = 0;
-  cout << "incrementing " << i << endl;
-  return ++i;
-}
-
-int main() {
-  int i = 0;
-  while (i < 5)
-    i = next();
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multithreaded/listener_test.cpp.template b/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multithreaded/listener_test.cpp.template
deleted file mode 100644 (file)
index e305d1a..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-// LLDB test snippet that registers a listener with a process that hits
-// a breakpoint.
-
-#include <atomic>
-#include <iostream>
-#include <string>
-#include <thread>
-#include <vector>
-
-%include_SB_APIs%
-#include "common.h"
-
-using namespace lldb;
-using namespace std;
-
-void listener_func();
-void check_listener(SBDebugger &dbg);
-
-// Listener thread and related variables
-atomic<bool> g_done; 
-SBListener g_listener("test-listener");
-thread g_listener_thread;
-
-void shutdown_listener() {
-  g_done.store(true);
-  if (g_listener_thread.joinable())
-    g_listener_thread.join();
-}
-
-void test(SBDebugger &dbg, std::vector<string> args) {
-  try {
-    g_done.store(false);
-    SBTarget target = dbg.CreateTarget(args.at(0).c_str());
-    if (!target.IsValid()) throw Exception("invalid target");
-
-    SBBreakpoint breakpoint = target.BreakpointCreateByName("next");
-    if (!breakpoint.IsValid()) throw Exception("invalid breakpoint");
-
-    std::unique_ptr<char> working_dir(get_working_dir());
-
-    SBError error;
-    SBProcess process = target.Launch(g_listener,
-                                      0, 0, 0, 0, 0,
-                                      working_dir.get(),
-                                      0,
-                                      false,
-                                      error);
-    if (!error.Success())
-      throw Exception("Error launching process.");
-
-    /* FIXME: the approach below deadlocks
-    SBProcess process = target.LaunchSimple (0, 0, working_dir.get());
-
-    // get debugger listener (which is attached to process by default)
-    g_listener = dbg.GetListener();
-    */
-
-    // FIXME: because a listener is attached to the process at launch-time,
-    // registering the listener below results in two listeners being attached,
-    // which is not supported by LLDB.
-    // register listener
-    // process.GetBroadcaster().AddListener(g_listener,
-    //                                   SBProcess::eBroadcastBitStateChanged);
-
-    // start listener thread
-    g_listener_thread = thread(listener_func);
-    check_listener(dbg);
-
-  } catch (Exception &e) {
-    shutdown_listener();
-    throw e;
-  }
-  shutdown_listener();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multithreaded/test_breakpoint_callback.cpp.template b/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multithreaded/test_breakpoint_callback.cpp.template
deleted file mode 100644 (file)
index 4133025..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-
-// LLDB C++ API Test: verify that the function registered with
-// SBBreakpoint.SetCallback() is invoked when a breakpoint is hit.
-
-#include <mutex>
-#include <iostream>
-#include <vector>
-#include <string>
-
-%include_SB_APIs%
-
-#include "common.h"
-
-using namespace std;
-using namespace lldb;
-
-mutex g_mutex;
-condition_variable g_condition;
-int g_breakpoint_hit_count = 0;
-
-bool BPCallback (void *baton,
-                 SBProcess &process,
-                 SBThread &thread,
-                 SBBreakpointLocation &location) {
-  lock_guard<mutex> lock(g_mutex);
-  g_breakpoint_hit_count += 1;
-  g_condition.notify_all();
-  return true;
-}
-
-void test(SBDebugger &dbg, vector<string> args) {
-  dbg.SetAsync(false);  
-  SBTarget target = dbg.CreateTarget(args.at(0).c_str());
-  if (!target.IsValid()) throw Exception("invalid target");
-
-  SBBreakpoint breakpoint = target.BreakpointCreateByName("next");
-  if (!breakpoint.IsValid()) throw Exception("invalid breakpoint");
-  breakpoint.SetCallback(BPCallback, 0);
-
-  std::unique_ptr<char> working_dir(get_working_dir());
-  SBProcess process = target.LaunchSimple (0, 0, working_dir.get());
-
-  {
-    unique_lock<mutex> lock(g_mutex);
-    g_condition.wait_for(lock, chrono::seconds(5));
-    if (g_breakpoint_hit_count != 1)
-      throw Exception("Breakpoint hit count expected to be 1");
-  }
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multithreaded/test_listener_event_description.cpp.template b/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multithreaded/test_listener_event_description.cpp.template
deleted file mode 100644 (file)
index 63e3f36..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-
-// LLDB C++ API Test: verify the event description that is received by an
-// SBListener object registered with a process with a breakpoint.
-
-#include <atomic>
-#include <array>
-#include <iostream>
-#include <string>
-#include <thread>
-
-%include_SB_APIs%
-
-#include "common.h"
-
-using namespace lldb;
-using namespace std;
-
-// listener thread control
-extern atomic<bool> g_done;
-extern SBListener g_listener;
-
-multithreaded_queue<string> g_event_descriptions;
-string g_error_desc;
-
-void listener_func() {
-  while (!g_done) {
-    SBEvent event;
-    bool got_event = g_listener.WaitForEvent(1, event);
-
-    if (got_event) {
-      if (!event.IsValid())
-        throw Exception("event is not valid in listener thread");
-
-      SBStream description;
-      event.GetDescription(description);
-      string str(description.GetData());
-      g_event_descriptions.push(str);
-    }
-  }
-}
-
-bool check_state(string &state, string &desc, bool got_description)
-{
-    g_error_desc.clear();
-
-    if(!got_description)
-    {
-        g_error_desc.append("Did not get expected event description");
-        return false;
-    }
-
-    if (desc.find("state-changed") == desc.npos)
-        g_error_desc.append("Event description incorrect: missing 'state-changed' ");
-
-    if (desc.find("pid = ") == desc.npos)
-        g_error_desc.append("Event description incorrect: missing process pid ");
-
-    string state_search_str = "state = " + state;
-    if (desc.find(state_search_str) == desc.npos)
-    {
-        string errString = ("Event description incorrect: expected state "
-                      + state
-                      + " but desc was "
-                      + desc);
-        g_error_desc.append(errString);
-    }
-
-    if (g_error_desc.length() > 0)
-        return false;
-
-    cout << "check_state: " << state << "  OK\n";
-    return true;
-}
-
-void check_listener(SBDebugger &dbg)
-{
-    bool got_description;
-    string state;
-
-    // check for "launching" state, this may or may not be present
-    string desc = g_event_descriptions.pop(5, got_description);
-    state = "launching";
-    if (check_state(state, desc, got_description))
-    {
-        // found a 'launching' state, pop next one from queue
-        desc = g_event_descriptions.pop(5, got_description);
-    }
-
-    state = "running";
-    if( !check_state(state, desc, got_description) )
-        throw Exception(g_error_desc);
-
-    desc = g_event_descriptions.pop(5, got_description);
-    state = "stopped";
-    if( !check_state(state, desc, got_description) )
-        throw Exception(g_error_desc);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multithreaded/test_listener_event_process_state.cpp.template b/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multithreaded/test_listener_event_process_state.cpp.template
deleted file mode 100644 (file)
index 2926ece..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-
-// LLDB C++ API Test: verify the event description as obtained by calling
-// SBEvent::GetCStringFromEvent that is received by an
-// SBListener object registered with a process with a breakpoint.
-
-#include <atomic>
-#include <iostream>
-#include <string>
-#include <thread>
-
-%include_SB_APIs%
-
-#include "common.h"
-
-using namespace lldb;
-using namespace std;
-
-// listener thread control
-extern atomic<bool> g_done;
-
-multithreaded_queue<string> g_frame_functions;
-
-extern SBListener g_listener;
-
-void listener_func() {
-  while (!g_done) {
-    SBEvent event;
-    bool got_event = g_listener.WaitForEvent(1, event);
-    if (got_event) {
-      if (!event.IsValid())
-        throw Exception("event is not valid in listener thread");
-        // send process description
-        SBProcess process = SBProcess::GetProcessFromEvent(event);
-        if (!process.IsValid())
-            throw Exception("process is not valid");
-        if (SBProcess::GetStateFromEvent(event) != lldb::eStateStopped || SBProcess::GetRestartedFromEvent(event))
-            continue; // Only interested in "stopped" events.
-
-        SBStream description;
-
-        for (int i = 0; i < process.GetNumThreads(); ++i) {
-            // send each thread description
-            SBThread thread = process.GetThreadAtIndex(i);
-            // send each frame function name
-            uint32_t num_frames = thread.GetNumFrames();
-            for(int j = 0; j < num_frames; ++j) {
-                const char* function_name = thread.GetFrameAtIndex(j).GetSymbol().GetName();
-                if (function_name)
-                    g_frame_functions.push(string(function_name));
-            }
-        }
-    }
-  }
-}
-
-void check_listener(SBDebugger &dbg) {
-  // check thread description
-  bool got_description = false;
-  string func_name = g_frame_functions.pop(5, got_description);
-  
-  if(got_description == false)
-    throw Exception("Expected at least one frame function");
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multithreaded/test_listener_resume.cpp.template b/gnu/llvm/lldb/packages/Python/lldbsuite/test/api/multithreaded/test_listener_resume.cpp.template
deleted file mode 100644 (file)
index 4adc9b3..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-
-// LLDB C++ API Test: verify the event description as obtained by calling
-// SBEvent::GetCStringFromEvent that is received by an
-// SBListener object registered with a process with a breakpoint.
-
-#include <atomic>
-#include <iostream>
-#include <string>
-#include <thread>
-
-%include_SB_APIs%
-
-#include "common.h"
-
-using namespace lldb;
-using namespace std;
-
-// listener thread control
-extern atomic<bool> g_done;
-
-// used by listener thread to communicate a successful process continue command
-// back to the checking thread.
-
-multithreaded_queue<bool> g_process_started;
-
-extern SBListener g_listener;
-
-void listener_func() {
-  while (!g_done) {
-    SBEvent event;
-    bool got_event = g_listener.WaitForEvent(1, event);
-    if (got_event) {
-      if (!event.IsValid())
-        throw Exception("event is not valid in listener thread");
-
-      SBProcess process = SBProcess::GetProcessFromEvent(event);
-      if (process.GetState() == eStateStopped) {
-        SBError error = process.Continue();
-        if (!error.Success())
-          throw Exception(string("Cannot continue process from listener thread: ")
-                          + error.GetCString());
-        g_process_started.push(true);
-      }
-    }
-  }
-}
-
-void check_listener(SBDebugger &dbg) {
-  bool got_message = false;
-  while (!got_message)
-    g_process_started.pop(5, got_message);
-  g_done = true;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/breakpoint-it/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/breakpoint-it/Makefile
deleted file mode 100644 (file)
index f8f686a..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-C_SOURCES := main.c
-CFLAGS_EXTRAS := -mthumb
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/breakpoint-it/TestBreakpointIt.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/breakpoint-it/TestBreakpointIt.py
deleted file mode 100644 (file)
index 35ea3ae..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-"""
-Test that breakpoints in an IT instruction don't fire if their condition is
-false.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestBreakpointIt(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @skipIf(archs=no_match(["arm"]))
-    @skipIf(archs=["arm64", "arm64e", "arm64_32"])
-    def test_false(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        self.runCmd("target create %s" % exe)
-        lldbutil.run_break_set_by_symbol(self, "bkpt_false",
-                extra_options="--skip-prologue 0")
-
-        self.runCmd("run")
-        self.assertEqual(self.process().GetState(), lldb.eStateExited,
-                "Breakpoint does not get hit")
-
-    @skipIf(archs=no_match(["arm"]))
-    @skipIf(archs=["arm64", "arm64e", "arm64_32"])
-    def test_true(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        self.runCmd("target create %s" % exe)
-        bpid = lldbutil.run_break_set_by_symbol(self, "bkpt_true",
-                extra_options="--skip-prologue 0")
-
-        self.runCmd("run")
-        self.assertIsNotNone(lldbutil.get_one_thread_stopped_at_breakpoint_id(
-            self.process(), bpid))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/breakpoint-it/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/breakpoint-it/main.c
deleted file mode 100644 (file)
index 35d57bb..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-int main() {
-  int value;
-  asm (
-      "cmp %1, %2\n\t"
-      "ite ne\n\t"
-      ".thumb_func\n\t"
-      "bkpt_true:\n\t"
-      "movne %0, %1\n\t"
-      ".thumb_func\n\t"
-      "bkpt_false:\n\t"
-      "moveq %0, %2\n\t"
-      : "=r" (value) : "r"(42), "r"(47));
-  return value;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/breakpoint-thumb-codesection/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/breakpoint-thumb-codesection/Makefile
deleted file mode 100644 (file)
index 3f8e559..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-C_SOURCES := main.c
-CFLAGS_EXTRAS := -mthumb
-
-include Makefile.rules
\ No newline at end of file
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/breakpoint-thumb-codesection/TestBreakpointThumbCodesection.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/breakpoint-thumb-codesection/TestBreakpointThumbCodesection.py
deleted file mode 100644 (file)
index 0726369..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-"""
-Test that breakpoints correctly work in an thumb function in an arbitrary
-named codesection.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestBreakpointThumbCodesection(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIf(archs=no_match(["arm"]))
-    @skipIfDarwinEmbedded   # codegen on darwin always defaults to thumb for armv7/armv7k targets
-    def test_breakpoint(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        line = line_number('main.c', '// Set break point at this line.')
-
-        self.runCmd("target create %s" % exe)
-        bpid = lldbutil.run_break_set_by_file_and_line(self, "main.c", line)
-
-        self.runCmd("run")
-
-        self.assertIsNotNone(lldbutil.get_one_thread_stopped_at_breakpoint_id(
-            self.process(), bpid), "Process is not stopped at breakpoint")
-
-        self.process().Continue()
-        self.assertEqual(self.process().GetState(), lldb.eStateExited, PROCESS_EXITED)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/breakpoint-thumb-codesection/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/breakpoint-thumb-codesection/main.c
deleted file mode 100644 (file)
index 38ea7be..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-__attribute__((section("__codesection")))
-int f(int a) {
-  return a + 1; // Set break point at this line.
-}
-
-int main() {
-  return f(10);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/TestEmulations.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/TestEmulations.py
deleted file mode 100644 (file)
index 9613edc..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-"""
-Test some ARM instruction emulation.
-"""
-
-from __future__ import print_function
-
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ARMEmulationTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    def test_thumb_emulations(self):
-        test_dir = os.path.join(self.getSourceDir(), "new-test-files")
-        files = os.listdir(test_dir)
-        thumb_files = list()
-        for f in files:
-            if '-thumb.dat' in f:
-                thumb_files.append(f)
-
-        for f in thumb_files:
-            test_file = os.path.join(test_dir, f)
-            self.run_a_single_test(test_file)
-
-    @no_debug_info_test
-    def test_arm_emulations(self):
-        test_dir = os.path.join(self.getSourceDir(), "new-test-files")
-        files = os.listdir(test_dir)
-        arm_files = list()
-        for f in files:
-            if '-arm.dat' in f:
-                arm_files.append(f)
-
-        for f in arm_files:
-            test_file = os.path.join(test_dir, f)
-            self.run_a_single_test(test_file)
-
-    def run_a_single_test(self, filename):
-        insn = lldb.SBInstruction()
-        stream = lldb.SBStream()
-        success = insn.TestEmulation(stream, filename)
-        output = stream.GetData()
-        if self.TraceOn():
-            print('\nRunning test ' + os.path.basename(filename))
-            print(output)
-
-        self.assertTrue(success, 'Emulation test succeeded.')
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-1-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-1-arm.dat
deleted file mode 100644 (file)
index 64b2506..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="add r0, r0, r15"
-triple=arm-apple-ios
-opcode=0xe080000f
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00003000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-1-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-1-thumb.dat
deleted file mode 100644 (file)
index daa32d2..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="add   r0, r13, #0"
-triple=thumb-apple-ios
-opcode=0xa800
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x2fdffe50
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-10-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-10-thumb.dat
deleted file mode 100644 (file)
index bb3d760..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="add     sp, r13"
-triple=thumb-apple-ios
-opcode=0x44ed
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x5fbffca0
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-11-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-11-thumb.dat
deleted file mode 100644 (file)
index e26f221..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="add     sp, r15"
-triple=thumb-apple-ios
-opcode=0x44fd
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fe02e50
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-12-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-12-thumb.dat
deleted file mode 100644 (file)
index a7f7344..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="add sp, r8"
-triple=thumb-apple-ios
-opcode=0x44c5
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe60
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-2-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-2-arm.dat
deleted file mode 100644 (file)
index cf6e0a9..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="add r0, r13, #0"
-triple=arm-apple-ios
-opcode=0xe28d0000
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x2fdffe58
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-2-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-2-thumb.dat
deleted file mode 100644 (file)
index 9a178a0..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="add     r0, sp, r0"
-triple=thumb-apple-ios
-opcode=0x4468
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x2fdffe50
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-3-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-3-arm.dat
deleted file mode 100644 (file)
index 9fc44b7..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="add r0, r1, r0, lsl #2"
-triple=arm-apple-ios
-opcode=0xe0810100
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe48
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe48
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000001
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe48
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe48
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-3-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-3-thumb.dat
deleted file mode 100644 (file)
index c8f96ec..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="add.w r10, r13, #31"
-triple=thumb-apple-ios
-opcode=0xf10d0a1f
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe40
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe40
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe40
-r8=0x00000008
-r9=0x00000009
-r10=0x2fdffe5f
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe40
-r14=0x00002f80
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-4-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-4-arm.dat
deleted file mode 100644 (file)
index 12b40ed..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="add r0, r2, r7, lsl r1"
-triple=arm-apple-ios
-opcode=0xe0820117
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe40
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe40
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x5fbffc82
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe40
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe40
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-4-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-4-thumb.dat
deleted file mode 100644 (file)
index 922b8ec..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="add   r3, r13, #16"
-triple=thumb-apple-ios
-opcode=0xab04
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe48
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe48
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x2fdffe58
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe48
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe48
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-5-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-5-arm.dat
deleted file mode 100644 (file)
index dfb6a87..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="add r10, r13, #31"
-triple=arm-apple-ios
-opcode=0xe28da01f
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x2fdffe6f
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-5-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-5-thumb.dat
deleted file mode 100644 (file)
index 16ff517..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="add     r3, sp, r3"
-triple=thumb-apple-ios
-opcode=0x446b
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x2fdffe53
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-6-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-6-arm.dat
deleted file mode 100644 (file)
index 8a87eff..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="add r12, r13, #24"
-triple=arm-apple-ios
-opcode=0xe28dc018
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x2fdffe68
-r13=0x2fdffe50
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-6-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-6-thumb.dat
deleted file mode 100644 (file)
index e8abd69..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="add   r5, r13, #32"
-triple=thumb-apple-ios
-opcode=0xad08
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe48
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe48
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x2fdffe68
-r6=0x00000006
-r7=0x2fdffe48
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe48
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-7-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-7-arm.dat
deleted file mode 100644 (file)
index 3125142..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="add r6, sp, #8"
-triple=arm-apple-ios
-opcode=0xe28d6008
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe60
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x2fdffe68
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe60
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-7-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-7-thumb.dat
deleted file mode 100644 (file)
index 5060713..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="add     sp, #16"
-triple=thumb-apple-ios
-opcode=0xb004
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe68
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-8-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-8-arm.dat
deleted file mode 100644 (file)
index 44a400f..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="add sp, r8"
-triple=arm-apple-ios
-opcode=0xe08dd008
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe60
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe68
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-8-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-8-thumb.dat
deleted file mode 100644 (file)
index 8bc6c78..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="add     sp, #4"
-triple=thumb-apple-ios
-opcode=0xb001
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe5c
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-9-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-add-9-thumb.dat
deleted file mode 100644 (file)
index 832af4c..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="add     sp, r10"
-triple=thumb-apple-ios
-opcode=0x44d5
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe5a
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-bic-1-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-bic-1-arm.dat
deleted file mode 100644 (file)
index c1cd4f1..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="bic r4, r9"
-triple=arm-apple-ios
-opcode=0xe1c44009
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe60
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe60
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-bic-1-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-bic-1-thumb.dat
deleted file mode 100644 (file)
index c624226..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="bics r4, r6"
-triple=thumb-apple-ios
-opcode=0x43b4
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000000
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldmia-1-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldmia-1-arm.dat
deleted file mode 100644 (file)
index e1922d9..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldmia r0!, {r1, r3}"
-triple=arm-apple-ios
-opcode=0xe8b0000a
-before_state={
-memory={
-address=0x2fdffe50
-data_encoding=uint32_t
-data=[
-    0x0
-    0x2e7c 
-]
-}
-registers={
-r0=0x2fdffe50
-r1=0x2fdffe60
-r2=0x2fdffe70
-r3=0x0000001f
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x2fdffe58
-r1=0x00000000
-r2=0x2fdffe70
-r3=0x00002e7c
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldmia-1-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldmia-1-thumb.dat
deleted file mode 100644 (file)
index 60a805e..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldmia r0!, {r1, r3}"
-triple=thumb-apple-ios
-opcode=0xc80a
-before_state={
-memory={
-address=0x2fdffe40
-data_encoding=uint32_t
-data=[
-0x0
-0x2f84
-]
-}
-registers={
-r0=0x2fdffe40
-r1=0x2fdffe50
-r2=0x2fdffe60
-r3=0x2fdffe70
-r4=0x2fdffe80
-r5=0x2fdffe90
-r6=0x2fdffea0
-r7=0x2fdffe40
-r8=0x2fdffec0
-r9=0x2fdffed0
-r10=0x2fdffee0
-r11=0x2fdffef0
-r12=0x2fdfff00
-r13=0x2fdffe40
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x2fdffe48
-r1=0x00000000
-r2=0x2fdffe60
-r3=0x00002f84
-r4=0x2fdffe80
-r5=0x2fdffe90
-r6=0x2fdffea0
-r7=0x2fdffe40
-r8=0x2fdffec0
-r9=0x2fdffed0
-r10=0x2fdffee0
-r11=0x2fdffef0
-r12=0x2fdfff00
-r13=0x2fdffe40
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldmia-2-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldmia-2-arm.dat
deleted file mode 100644 (file)
index 99401bb..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldmia r0!, {r2, r4, r6, r8, r10, r12}"
-triple=arm-apple-ios
-opcode=0xe8b01554
-before_state={
-memory={
-address=0x2fdffe20
-data_encoding=uint32_t
-data=[
-0x0
-0x2e7c
-0x1
-0x2fdffe84
-0x0
-0x0
-]
-}
-registers={
-r0=0x2fdffe20
-r1=0x2fdffe30
-r2=0x2fdffe40
-r3=0x0000001f
-r4=0x2fdffe60
-r5=0x2fdffe70
-r6=0x2fdffe80
-r7=0x2fdffe20
-r8=0x2fdffea0
-r9=0x2fdffeb0
-r10=0x2fdffec0
-r11=0x2fdffed0
-r12=0x2fdffee0
-r13=0x2fdffe20
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x2fdffe38
-r1=0x2fdffe30
-r2=0x00000000
-r3=0x0000001f
-r4=0x00002e7c
-r5=0x2fdffe70
-r6=0x00000001
-r7=0x2fdffe20
-r8=0x2fdffe84
-r9=0x2fdffeb0
-r10=0x00000000
-r11=0x2fdffed0
-r12=0x00000000
-r13=0x2fdffe20
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldmia-2-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldmia-2-thumb.dat
deleted file mode 100644 (file)
index 39ecf94..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldmia.w r0!,{r2,r4,r6,r8,r10,r12}"
-triple=thumb-apple-ios
-opcode=0xe8b01554
-before_state={
-memory={
-address=0x2fdffe50
-data_encoding=uint32_t
-data=[
-0x0
-0x2f80
-0x1
-0x2fdffeac
-0x0
-0x0
-]
-}
-registers={
-r0=0x2fdffe50
-r1=0x2fdffe60
-r2=0x2fdffe70
-r3=0x2fdffe80
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x2fdffe68
-r1=0x2fdffe60
-r2=0x00000000
-r3=0x2fdffe80
-r4=0x00002f80
-r5=0x2fdffea0
-r6=0x00000001
-r7=0x2fdffe50
-r8=0x2fdffeac
-r9=0x2fdffee0
-r10=0x00000000
-r11=0x2fdfff00
-r12=0x00000000
-r13=0x2fdffe50
-r14=0x00002f80
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldmia-3-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldmia-3-arm.dat
deleted file mode 100644 (file)
index 427d7b2..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldmia r14!, {r1, r3}"
-triple=arm-apple-ios
-opcode=0xe8be000a
-before_state={
-memory={
-address=0x2e7c
-data_encoding=uint32_t
-data=[
-0xe59fc00c
-0xe08fc00c
-]
-}
-registers={
-r0=0x2fdffe50
-r1=0x2fdffe60
-r2=0x2fdffe70
-r3=0x0000001f
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x2fdffe50
-r1=0xe59fc00c
-r2=0x2fdffe70
-r3=0xe08fc00c
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002e84
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldmia-3-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldmia-3-thumb.dat
deleted file mode 100644 (file)
index 9738073..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldmia.w r14!, {r1, r3}"
-triple=thumb-apple-ios
-opcode=0xe8be000a
-before_state={
-memory={
-address=0x2f80
-data_encoding=uint32_t
-data=[
-0xe59fc00c
-0xe08fc00c
-]
-}
-registers={
-r0=0x2fdffe78
-r1=0x2fdffe88
-r2=0x2fdffe98
-r3=0x2fdffea8
-r4=0x2fdffeb8
-r5=0x2fdffec8
-r6=0x2fdffed8
-r7=0x2fdffe78
-r8=0x2fdffef8
-r9=0x2fdfff08
-r10=0x2fdfff18
-r11=0x2fdfff28
-r12=0x2fdfff38
-r13=0x2fdffe78
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x2fdffe78
-r1=0xe59fc00c
-r2=0x2fdffe98
-r3=0xe08fc00c
-r4=0x2fdffeb8
-r5=0x2fdffec8
-r6=0x2fdffed8
-r7=0x2fdffe78
-r8=0x2fdffef8
-r9=0x2fdfff08
-r10=0x2fdfff18
-r11=0x2fdfff28
-r12=0x2fdfff38
-r13=0x2fdffe78
-r14=0x00002f88
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-1-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-1-arm.dat
deleted file mode 100644 (file)
index 307402f..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldr r0, [pc, #+24]"
-triple=arm-apple-ios
-opcode=0xe59f0018
-before_state={
-memory={
-address=0x3018
-data_encoding=uint32_t
-data=[
-0x3030
-]
-}
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00003030
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-1-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-1-thumb.dat
deleted file mode 100644 (file)
index 471669b..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldr     r0, [pc, #12]"
-triple=thumb-apple-ios
-opcode=0x4803
-before_state={
-memory={
-address=0x300c
-data_encoding=uint32_t
-data=[
-0x3024
-]
-}
-registers={
-r0=0x2fdffe50
-r1=0x2fdffe60
-r2=0x2fdffe70
-r3=0x2fdffe80
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00003024
-r1=0x2fdffe60
-r2=0x2fdffe70
-r3=0x2fdffe80
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-10-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-10-thumb.dat
deleted file mode 100644 (file)
index bc7693c..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldr.w   r10,[ pc, #4]"
-triple=thumb-apple-ios
-opcode=0xf8dfa004
-before_state={
-memory={
-address=0x3000
-data_encoding=uint32_t
-data=[
-0x2fe01000
-]
-}
-registers={
-r0=0x2fdffe48
-r1=0x2fdffe58
-r2=0x2fdffe68
-r3=0x2fdffe78
-r4=0x2fdffe88
-r5=0x2fdffe98
-r6=0x2fdffea8
-r7=0x2fdffe48
-r8=0x2fdffec8
-r9=0x2fdffed8
-r10=0x2fdffee8
-r11=0x2fdffef8
-r12=0x2fdfff08
-r13=0x2fdffe48
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x2fdffe48
-r1=0x2fdffe58
-r2=0x2fdffe68
-r3=0x2fdffe78
-r4=0x2fdffe88
-r5=0x2fdffe98
-r6=0x2fdffea8
-r7=0x2fdffe48
-r8=0x2fdffec8
-r9=0x2fdffed8
-r10=0x2fe01000
-r11=0x2fdffef8
-r12=0x2fdfff08
-r13=0x2fdffe48
-r14=0x00002f80
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-11-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-11-thumb.dat
deleted file mode 100644 (file)
index b5bf181..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldr.w   r8, [pc , #0]"
-triple=thumb-apple-ios
-opcode=0xf8df8000
-before_state={
-memory={
-address=0x2ffc
-data_encoding=uint32_t
-data=[
-0xa0e1defe
-]
-}
-registers={
-r0=0x2fdffe50
-r1=0x2fdffe60
-r2=0x2fdffe70
-r3=0x2fdffe80
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x2fdffe50
-r1=0x2fdffe60
-r2=0x2fdffe70
-r3=0x2fdffe80
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0xa0e1defe
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002f80
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-12-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-12-thumb.dat
deleted file mode 100644 (file)
index 5c3a548..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldr.w   r9, [pc, #-4]"
-triple=thumb-apple-ios
-opcode=0xf85f9004
-before_state={
-memory={
-address=0x2fec
-data_encoding=uint32_t
-data=[
-0x9004f85f
-]
-}
-registers={
-r0=0x2fdffe50
-r1=0x2fdffe60
-r2=0x2fdffe70
-r3=0x2fdffe80
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x2fdffe50
-r1=0x2fdffe60
-r2=0x2fdffe70
-r3=0x2fdffe80
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x9004f85f
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002f80
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-2-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-2-arm.dat
deleted file mode 100644 (file)
index 068297e..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldr r0, [pc, #256]"
-triple=arm-apple-ios
-opcode=0xe59f0100
-before_state={
-memory={
-address=0x3100
-data_encoding=uint32_t
-data=[
-0x0
-]
-}
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-2-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-2-thumb.dat
deleted file mode 100644 (file)
index 2772783..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldr r0, [pc, #+24]"
-triple=thumb-apple-ios
-opcode=0x4806
-before_state={
-memory={
-address=0x3018
-data_encoding=uint32_t
-data=[
-0x3030
-]
-}
-registers={
-r0=0x2fdffe50
-r1=0x2fdffe60
-r2=0x2fdffe70
-r3=0x2fdffe80
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00003030
-r1=0x2fdffe60
-r2=0x2fdffe70
-r3=0x2fdffe80
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-3-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-3-arm.dat
deleted file mode 100644 (file)
index f0d6d8a..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldr r0, [r13, #+24]"
-triple=arm-apple-ios
-opcode=0xe59d0018
-before_state={
-memory={
-address=0x2fdffe70
-data_encoding=uint32_t
-data=[
-0x2fdffe80
-]
-}
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x2fdffe80
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-3-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-3-thumb.dat
deleted file mode 100644 (file)
index 012e1c5..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldr r0, [pc, #256]"
-triple=thumb-apple-ios
-opcode=0x4840
-before_state={
-memory={
-address=0x3100
-data_encoding=uint32_t
-data=[
-0x0
-]
-}
-registers={
-r0=0x2fdffe48
-r1=0x2fdffe58
-r2=0x2fdffe68
-r3=0x2fdffe78
-r4=0x2fdffe88
-r5=0x2fdffe98
-r6=0x2fdffea8
-r7=0x2fdffe48
-r8=0x2fdffec8
-r9=0x2fdffed8
-r10=0x2fdffee8
-r11=0x2fdffef8
-r12=0x2fdfff08
-r13=0x2fdffe48
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x2fdffe58
-r2=0x2fdffe68
-r3=0x2fdffe78
-r4=0x2fdffe88
-r5=0x2fdffe98
-r6=0x2fdffea8
-r7=0x2fdffe48
-r8=0x2fdffec8
-r9=0x2fdffed8
-r10=0x2fdffee8
-r11=0x2fdffef8
-r12=0x2fdfff08
-r13=0x2fdffe48
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-4-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-4-arm.dat
deleted file mode 100644 (file)
index e2d2aa6..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldr r1, [r5, #16]"
-triple=arm-apple-ios
-opcode=0xe5951010
-before_state={
-memory={
-address=0x2fdffeb8
-data_encoding=uint32_t
-data=[
-0x7365742d
-]
-}
-registers={
-r0=0x2fdffe58
-r1=0x2fdffe68
-r2=0x2fdffe78
-r3=0x0000001f
-r4=0x2fdffe98
-r5=0x2fdffea8
-r6=0x2fdffeb8
-r7=0x2fdffe58
-r8=0x2fdffed8
-r9=0x2fdffee8
-r10=0x2fdffef8
-r11=0x2fdfff08
-r12=0x2fdfff18
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x2fdffe58
-r1=0x7365742d
-r2=0x2fdffe78
-r3=0x0000001f
-r4=0x2fdffe98
-r5=0x2fdffea8
-r6=0x2fdffeb8
-r7=0x2fdffe58
-r8=0x2fdffed8
-r9=0x2fdffee8
-r10=0x2fdffef8
-r11=0x2fdfff08
-r12=0x2fdfff18
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-4-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-4-thumb.dat
deleted file mode 100644 (file)
index 3eb6f16..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldr r0, [r13, #+24]"
-triple=thumb-apple-ios
-opcode=0x9806
-before_state={
-memory={
-address=0x2fdffe60
-data_encoding=uint32_t
-data=[
-0x2fdffe70
-]
-}
-registers={
-r0=0x2fdffe48
-r1=0x2fdffe58
-r2=0x2fdffe68
-r3=0x2fdffe78
-r4=0x2fdffe88
-r5=0x2fdffe98
-r6=0x2fdffea8
-r7=0x2fdffe48
-r8=0x2fdffec8
-r9=0x2fdffed8
-r10=0x2fdffee8
-r11=0x2fdffef8
-r12=0x2fdfff08
-r13=0x2fdffe48
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x2fdffe70
-r1=0x2fdffe58
-r2=0x2fdffe68
-r3=0x2fdffe78
-r4=0x2fdffe88
-r5=0x2fdffe98
-r6=0x2fdffea8
-r7=0x2fdffe48
-r8=0x2fdffec8
-r9=0x2fdffed8
-r10=0x2fdffee8
-r11=0x2fdffef8
-r12=0x2fdfff08
-r13=0x2fdffe48
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-5-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-5-arm.dat
deleted file mode 100644 (file)
index 45210d9..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldr r2, [r0]"
-triple=arm-apple-ios
-opcode=0xe5902000
-before_state={
-memory={
-address=0x2fdffe60
-data_encoding=uint32_t
-data=[
-0x0
-]
-}
-registers={
-r0=0x2fdffe60
-r1=0x2fdffe70
-r2=0x2fdffe80
-r3=0x0000001f
-r4=0x2fdffea0
-r5=0x2fdffeb0
-r6=0x2fdffec0
-r7=0x2fdffe60
-r8=0x2fdffee0
-r9=0x2fdffef0
-r10=0x2fdfff00
-r11=0x2fdfff10
-r12=0x2fdfff20
-r13=0x2fdffe60
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x2fdffe60
-r1=0x2fdffe70
-r2=0x00000000
-r3=0x0000001f
-r4=0x2fdffea0
-r5=0x2fdffeb0
-r6=0x2fdffec0
-r7=0x2fdffe60
-r8=0x2fdffee0
-r9=0x2fdffef0
-r10=0x2fdfff00
-r11=0x2fdfff10
-r12=0x2fdfff20
-r13=0x2fdffe60
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-5-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-5-thumb.dat
deleted file mode 100644 (file)
index 45289e7..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldr     r1, [pc, #0]"
-triple=thumb-apple-ios
-opcode=0x4900
-before_state={
-memory={
-address=0x3000
-data_encoding=uint32_t
-data=[
-0x2fe01000
-]
-}
-registers={
-r0=0x2fdffe50
-r1=0x2fdffe60
-r2=0x2fdffe70
-r3=0x2fdffe80
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x2fdffe50
-r1=0x2fe01000
-r2=0x2fdffe70
-r3=0x2fdffe80
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-6-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-6-arm.dat
deleted file mode 100644 (file)
index 0f379fd..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldr r2, [r6], +r8, lsl #2"
-triple=arm-apple-ios
-opcode=0xe6962108
-before_state={
-memory={
-address=0x2fdffea8
-data_encoding=uint32_t
-data=[
-0x7365742d
-]
-}
-registers={
-r0=0x2fdffe48
-r1=0x2fdffe58
-r2=0x2fdffe68
-r3=0x0000001f
-r4=0x2fdffe88
-r5=0x2fdffe98
-r6=0x2fdffea8
-r7=0x2fdffe48
-r8=0x2fdffec8
-r9=0x2fdffed8
-r10=0x2fdffee8
-r11=0x2fdffef8
-r12=0x2fdfff08
-r13=0x2fdffe48
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x2fdffe48
-r1=0x2fdffe58
-r2=0x7365742d
-r3=0x0000001f
-r4=0x2fdffe88
-r5=0x2fdffe98
-r6=0xef5ff9c8
-r7=0x2fdffe48
-r8=0x2fdffec8
-r9=0x2fdffed8
-r10=0x2fdffee8
-r11=0x2fdffef8
-r12=0x2fdfff08
-r13=0x2fdffe48
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-6-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-6-thumb.dat
deleted file mode 100644 (file)
index 5b3c119..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldr r1, [r5, #16]"
-triple=thumb-apple-ios
-opcode=0x6929
-before_state={
-memory={
-address=0x2fdffeb0
-data_encoding=uint32_t
-data=[
-0x65742d62
-]
-}
-registers={
-r0=0x2fdffe50
-r1=0x2fdffe60
-r2=0x2fdffe70
-r3=0x2fdffe80
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x2fdffe50
-r1=0x65742d62
-r2=0x2fdffe70
-r3=0x2fdffe80
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-7-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-7-arm.dat
deleted file mode 100644 (file)
index ff425ef..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldr r2, [sp, #24]"
-triple=arm-apple-ios
-opcode=0xe59d2018
-before_state={
-memory={
-address=0x2fdffe70
-data_encoding=uint32_t
-data=[
-0x0
-]
-}
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000000
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-7-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-7-thumb.dat
deleted file mode 100644 (file)
index db8d587..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldr r2, [r0]"
-triple=thumb-apple-ios
-opcode=0x6802
-before_state={
-memory={
-address=0x2fdffe58
-data_encoding=uint32_t
-data=[
-0x0
-]
-}
-registers={
-r0=0x2fdffe58
-r1=0x2fdffe68
-r2=0x2fdffe78
-r3=0x2fdffe88
-r4=0x2fdffe98
-r5=0x2fdffea8
-r6=0x2fdffeb8
-r7=0x2fdffe58
-r8=0x2fdffed8
-r9=0x2fdffee8
-r10=0x2fdffef8
-r11=0x2fdfff08
-r12=0x2fdfff18
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x2fdffe58
-r1=0x2fdffe68
-r2=0x00000000
-r3=0x2fdffe88
-r4=0x2fdffe98
-r5=0x2fdffea8
-r6=0x2fdffeb8
-r7=0x2fdffe58
-r8=0x2fdffed8
-r9=0x2fdffee8
-r10=0x2fdffef8
-r11=0x2fdfff08
-r12=0x2fdfff18
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-8-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-8-arm.dat
deleted file mode 100644 (file)
index c11dfc1..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldr r3, [r11, #-8]"
-triple=arm-apple-ios
-opcode=0xe51b3008
-before_state={
-memory={
-address=0x2fdfff00
-data_encoding=uint32_t
-data=[
-0x63387830
-]
-}
-registers={
-r0=0x2fdffe58
-r1=0x2fdffe68
-r2=0x2fdffe78
-r3=0x0000001f
-r4=0x2fdffe98
-r5=0x2fdffea8
-r6=0x2fdffeb8
-r7=0x2fdffe58
-r8=0x2fdffed8
-r9=0x2fdffee8
-r10=0x2fdffef8
-r11=0x2fdfff08
-r12=0x2fdfff18
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x2fdffe58
-r1=0x2fdffe68
-r2=0x2fdffe78
-r3=0x63387830
-r4=0x2fdffe98
-r5=0x2fdffea8
-r6=0x2fdffeb8
-r7=0x2fdffe58
-r8=0x2fdffed8
-r9=0x2fdffee8
-r10=0x2fdffef8
-r11=0x2fdfff08
-r12=0x2fdfff18
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-8-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-8-thumb.dat
deleted file mode 100644 (file)
index 01d7013..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldr r2, [sp, #24]"
-triple=thumb-apple-ios
-opcode=0x9a06
-before_state={
-memory={
-address=0x2fdffe68
-data_encoding=uint32_t
-data=[
-0x2fdffe78
-]
-}
-registers={
-r0=0x2fdffe50
-r1=0x2fdffe60
-r2=0x2fdffe70
-r3=0x2fdffe80
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x2fdffe50
-r1=0x2fdffe60
-r2=0x2fdffe78
-r3=0x2fdffe80
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-9-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldr-9-thumb.dat
deleted file mode 100644 (file)
index cc3c4db..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldr.w r3, [r11, #8]"
-triple=thumb-apple-ios
-opcode=0xf8db3008
-before_state={
-memory={
-address=0x2fdfff08
-data_encoding=uint32_t
-data=[
-0x62343134
-]
-}
-registers={
-r0=0x2fdffe50
-r1=0x2fdffe60
-r2=0x2fdffe70
-r3=0x2fdffe80
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x2fdffe50
-r1=0x2fdffe60
-r2=0x2fdffe70
-r3=0x62343134
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002f80
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldrd-1-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldrd-1-arm.dat
deleted file mode 100644 (file)
index 970f8aa..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldrd r0, r1, [r12, #+4]"
-triple=arm-apple-ios
-opcode=0xe1cc00d4
-before_state={
-memory={
-address=0x2fdfff14
-data_encoding=uint32_t
-data=[
-0x30313038
-0x31623039
-]
-}
-registers={
-r0=0x2fdffe50
-r1=0x2fdffe60
-r2=0x2fdffe70
-r3=0x0000001f
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x30313038
-r1=0x31623039
-r2=0x2fdffe70
-r3=0x0000001f
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldrd-1-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldrd-1-thumb.dat
deleted file mode 100644 (file)
index 7ab41ce..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldrd r0, r1, [r12, #+4]"
-triple=thumb-apple-ios
-opcode=0xe9dc0101
-before_state={
-memory={
-address=0x2fdfff3c
-data_encoding=uint32_t
-data=[
-0x0
-0x0
-]
-}
-registers={
-r0=0x2fdffe78
-r1=0x2fdffe88
-r2=0x2fdffe98
-r3=0x2fdffea8
-r4=0x2fdffeb8
-r5=0x2fdffec8
-r6=0x2fdffed8
-r7=0x2fdffe78
-r8=0x2fdffef8
-r9=0x2fdfff08
-r10=0x2fdfff18
-r11=0x2fdfff28
-r12=0x2fdfff38
-r13=0x2fdffe78
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000000
-r2=0x2fdffe98
-r3=0x2fdffea8
-r4=0x2fdffeb8
-r5=0x2fdffec8
-r6=0x2fdffed8
-r7=0x2fdffe78
-r8=0x2fdffef8
-r9=0x2fdfff08
-r10=0x2fdfff18
-r11=0x2fdfff28
-r12=0x2fdfff38
-r13=0x2fdffe78
-r14=0x00002f80
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldrd-2-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldrd-2-thumb.dat
deleted file mode 100644 (file)
index 70fe6f5..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldrd r4, r5, [pc, #-0]"
-triple=thumb-apple-ios
-opcode=0xe9df4500
-before_state={
-memory={
-address=0x2ffc
-data_encoding=uint32_t
-data=[
-0xa0e1defe
-0x2fe01000
-]
-}
-registers={
-r0=0x2fdffe78
-r1=0x2fdffe88
-r2=0x2fdffe98
-r3=0x2fdffea8
-r4=0x2fdffeb8
-r5=0x2fdffec8
-r6=0x2fdffed8
-r7=0x2fdffe78
-r8=0x2fdffef8
-r9=0x2fdfff08
-r10=0x2fdfff18
-r11=0x2fdfff28
-r12=0x2fdfff38
-r13=0x2fdffe78
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x2fdffe78
-r1=0x2fdffe88
-r2=0x2fdffe98
-r3=0x2fdffea8
-r4=0xa0e1defe
-r5=0x2fe01000
-r6=0x2fdffed8
-r7=0x2fdffe78
-r8=0x2fdffef8
-r9=0x2fdfff08
-r10=0x2fdfff18
-r11=0x2fdfff28
-r12=0x2fdfff38
-r13=0x2fdffe78
-r14=0x00002f80
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldrh-1-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldrh-1-thumb.dat
deleted file mode 100644 (file)
index 2a47002..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldrh r0, [r2, #16]"
-triple=thumb-apple-ios
-opcode=0x8a10
-before_state={
-memory={
-address=0x2fdffe78
-data_encoding=uint32_t
-data=[
-0x762f
-]
-}
-registers={
-r0=0x2fdffe48
-r1=0x2fdffe58
-r2=0x2fdffe68
-r3=0x2fdffe78
-r4=0x2fdffe88
-r5=0x2fdffe98
-r6=0x2fdffea8
-r7=0x2fdffe48
-r8=0x2fdffec8
-r9=0x2fdffed8
-r10=0x2fdffee8
-r11=0x2fdffef8
-r12=0x2fdfff08
-r13=0x2fdffe48
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x0000762f
-r1=0x2fdffe58
-r2=0x2fdffe68
-r3=0x2fdffe78
-r4=0x2fdffe88
-r5=0x2fdffe98
-r6=0x2fdffea8
-r7=0x2fdffe48
-r8=0x2fdffec8
-r9=0x2fdffed8
-r10=0x2fdffee8
-r11=0x2fdffef8
-r12=0x2fdfff08
-r13=0x2fdffe48
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldrsh-1-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldrsh-1-arm.dat
deleted file mode 100644 (file)
index cecf397..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldrsh r0, [r2], #+15"
-triple=arm-apple-ios
-opcode=0xe0d200ff
-before_state={
-memory={
-address=0x2fdffe70
-data_encoding=uint32_t
-data=[
-0xfffffeeb
-]
-}
-registers={
-r0=0x2fdffe50
-r1=0x2fdffe60
-r2=0x2fdffe70
-r3=0x0000001f
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0xfffffeeb
-r1=0x2fdffe60
-r2=0x2fdffe7f
-r3=0x0000001f
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldrsh-2-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-ldrsh-2-arm.dat
deleted file mode 100644 (file)
index 660b3d3..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-InstructionEmulationState={
-assembly_string="ldrsh r14, [r2], #+15"
-triple=arm-apple-ios
-opcode=0xe0d2e0ff
-before_state={
-memory={
-address=0x2fdffe70
-data_encoding=uint32_t
-data=[
-0xfffffeec
-]
-}
-registers={
-r0=0x2fdffe50
-r1=0x2fdffe60
-r2=0x2fdffe70
-r3=0x0000001f
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x2fdffe50
-r1=0x2fdffe60
-r2=0x2fdffe7f
-r3=0x0000001f
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0xfffffeec
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-1-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-1-arm.dat
deleted file mode 100644 (file)
index 232bc96..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov r12, #256"
-triple=arm-apple-ios
-opcode=0xe3a0cc01
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x00000100
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-1-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-1-thumb.dat
deleted file mode 100644 (file)
index 569510d..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov     ip, pc"
-triple=thumb-apple-ios
-opcode=0x46fc
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x00003000
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-10-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-10-thumb.dat
deleted file mode 100644 (file)
index 6bf9b0d..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov     r0, r15"
-triple=thumb-apple-ios
-opcode=0x4678
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00003000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-11-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-11-thumb.dat
deleted file mode 100644 (file)
index 82043ef..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov     r0, r7"
-triple=thumb-apple-ios
-opcode=0x4638
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x2fdffe58
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-12-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-12-thumb.dat
deleted file mode 100644 (file)
index 1fce18a..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov.w r12, #256"
-triple=thumb-apple-ios
-opcode=0xf44f7c80
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x00000100
-r13=0x2fdffe50
-r14=0x00002f80
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-13-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-13-thumb.dat
deleted file mode 100644 (file)
index d1c1a44..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov r12, r13"
-triple=thumb-apple-ios
-opcode=0x46ec
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x2fdffe50
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-14-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-14-thumb.dat
deleted file mode 100644 (file)
index dfd89c2..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov r14, r2"
-triple=thumb-apple-ios
-opcode=0x4696
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00000002
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-15-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-15-thumb.dat
deleted file mode 100644 (file)
index 0ff8e5d..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov     r1, r14"
-triple=thumb-apple-ios
-opcode=0x4671
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00002f84
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-16-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-16-thumb.dat
deleted file mode 100644 (file)
index 1baf42d..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov     r2, ip"
-triple=thumb-apple-ios
-opcode=0x4662
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x0000000c
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-17-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-17-thumb.dat
deleted file mode 100644 (file)
index 70cee03..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov     r2, r13"
-triple=thumb-apple-ios
-opcode=0x466a
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x2fdffe50
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-18-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-18-thumb.dat
deleted file mode 100644 (file)
index 1893e18..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov r2, r9"
-triple=thumb-apple-ios
-opcode=0x464a
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000009
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-19-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-19-thumb.dat
deleted file mode 100644 (file)
index 238e16b..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov     r3, r12"
-triple=thumb-apple-ios
-opcode=0x4663
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000000c
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-2-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-2-arm.dat
deleted file mode 100644 (file)
index 6d6c0cb..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov r12, r13"
-triple=arm-apple-ios
-opcode=0xe1a0c00d
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x2fdffe58
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-2-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-2-thumb.dat
deleted file mode 100644 (file)
index ad68544..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov     ip, r8"
-triple=thumb-apple-ios
-opcode=0x46c4
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x00000008
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-20-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-20-thumb.dat
deleted file mode 100644 (file)
index 15ecd2e..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov r3, r13"
-triple=thumb-apple-ios
-opcode=0x466b
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x2fdffe50
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-21-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-21-thumb.dat
deleted file mode 100644 (file)
index 6a38f16..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov     r3, sp"
-triple=thumb-apple-ios
-opcode=0x466b
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x2fdffe58
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-22-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-22-thumb.dat
deleted file mode 100644 (file)
index 242b568..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov     r4, r11"
-triple=thumb-apple-ios
-opcode=0x465c
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x0000000b
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-23-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-23-thumb.dat
deleted file mode 100644 (file)
index 7f57440..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov     r5, r10"
-triple=thumb-apple-ios
-opcode=0x4655
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x0000000a
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-24-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-24-thumb.dat
deleted file mode 100644 (file)
index 9a1756e..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov     r6, r9"
-triple=thumb-apple-ios
-opcode=0x464e
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000009
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-25-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-25-thumb.dat
deleted file mode 100644 (file)
index c2fd6a7..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov     r7, lr"
-triple=thumb-apple-ios
-opcode=0x4677
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x00002f84
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-26-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-26-thumb.dat
deleted file mode 100644 (file)
index 2cc155d..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov     r7, r8"
-triple=thumb-apple-ios
-opcode=0x4647
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x00000008
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-27-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-27-thumb.dat
deleted file mode 100644 (file)
index 0b35377..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov     r9, pc"
-triple=thumb-apple-ios
-opcode=0x46f9
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00003000
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-28-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-28-thumb.dat
deleted file mode 100644 (file)
index f7d7778..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov     sp, ip"
-triple=thumb-apple-ios
-opcode=0x46e5
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x0000000c
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-29-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-29-thumb.dat
deleted file mode 100644 (file)
index 5e9098f..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov     sp, pc"
-triple=thumb-apple-ios
-opcode=0x46fd
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x00003000
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-3-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-3-arm.dat
deleted file mode 100644 (file)
index 1fe7155..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov r14, r2"
-triple=arm-apple-ios
-opcode=0xe1a0e002
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe60
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe60
-r14=0x00000002
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-3-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-3-thumb.dat
deleted file mode 100644 (file)
index 8ce1296..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov   ip, sp"
-triple=thumb-apple-ios
-opcode=0x46ec
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x2fdffe58
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-30-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-30-thumb.dat
deleted file mode 100644 (file)
index a0dddad..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov     sp, r7"
-triple=thumb-apple-ios
-opcode=0x46bd
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-31-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-31-thumb.dat
deleted file mode 100644 (file)
index 20d8dc7..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="movs r3, #1"
-triple=thumb-apple-ios
-opcode=0x2301
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000001
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x20000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-4-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-4-arm.dat
deleted file mode 100644 (file)
index 8ef83b2..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov r2, r9"
-triple=arm-apple-ios
-opcode=0xe1a02009
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe60
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000009
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe60
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-4-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-4-thumb.dat
deleted file mode 100644 (file)
index f854ba2..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov     lr, pc"
-triple=thumb-apple-ios
-opcode=0x46fe
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00003000
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-5-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-5-arm.dat
deleted file mode 100644 (file)
index ee85779..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov r3, #2147483648"
-triple=arm-apple-ios
-opcode=0xe3a03102
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe38
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe38
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x80000000
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe38
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe38
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-5-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-5-thumb.dat
deleted file mode 100644 (file)
index d6140bd..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov     lr, r2"
-triple=thumb-apple-ios
-opcode=0x4696
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00000002
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-6-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-6-arm.dat
deleted file mode 100644 (file)
index 863a6d3..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov r3, r13"
-triple=arm-apple-ios
-opcode=0xe1a0300d
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe60
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x2fdffe60
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe60
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-6-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-6-thumb.dat
deleted file mode 100644 (file)
index fac96bf..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov     pc, ip"
-triple=thumb-apple-ios
-opcode=0x46e7
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x0000000c
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-7-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-7-thumb.dat
deleted file mode 100644 (file)
index c537d30..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov     pc, lr"
-triple=thumb-apple-ios
-opcode=0x46f7
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002f84
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-8-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-8-thumb.dat
deleted file mode 100644 (file)
index b724c79..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov     pc, r4"
-triple=thumb-apple-ios
-opcode=0x46a7
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00000004
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-9-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mov-9-thumb.dat
deleted file mode 100644 (file)
index ccf7ea6..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mov     pc, sp"
-triple=thumb-apple-ios
-opcode=0x46ef
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x2fdffe58
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-moveq-1-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-moveq-1-arm.dat
deleted file mode 100644 (file)
index f46b1bf..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="moveq r3, #1"
-triple=arm-apple-ios
-opcode=0x3a03001
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe60
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000001
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe60
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-movs-1-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-movs-1-arm.dat
deleted file mode 100644 (file)
index 3829250..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="movs r12, r13"
-triple=arm-apple-ios
-opcode=0xe1b0c00d
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x2fdffe58
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x20000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-1-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-1-arm.dat
deleted file mode 100644 (file)
index 024dd9f..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mvn r14, #1"
-triple=arm-apple-ios
-opcode=0xe3e0e001
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe60
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe60
-r14=0xfffffffe
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-1-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-1-thumb.dat
deleted file mode 100644 (file)
index c5c385c..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mvn r0, #1"
-triple=thumb-apple-ios
-opcode=0xf06f0001
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe98
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe98
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0xfffffffe
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe98
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe98
-r14=0x00002f80
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-2-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-2-arm.dat
deleted file mode 100644 (file)
index 10df542..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mvn r0, #1"
-triple=arm-apple-ios
-opcode=0xe3e00001
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe68
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe68
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0xfffffffe
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe68
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe68
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-2-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-2-thumb.dat
deleted file mode 100644 (file)
index 3c2f6f4..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mvn r0, #31"
-triple=thumb-apple-ios
-opcode=0xf06f001f
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe90
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe90
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0xffffffe0
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe90
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe90
-r14=0x00002f80
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-3-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-3-arm.dat
deleted file mode 100644 (file)
index 7427089..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mvn r0, #31"
-triple=arm-apple-ios
-opcode=0xe3e0001f
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe60
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0xffffffe0
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe60
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-3-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-3-thumb.dat
deleted file mode 100644 (file)
index ff4ca73..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mvn r14, #1"
-triple=thumb-apple-ios
-opcode=0xf06f0e01
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe90
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe90
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe90
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe90
-r14=0xfffffffe
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-4-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-4-arm.dat
deleted file mode 100644 (file)
index 4efc18c..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mvn r3, r8"
-triple=arm-apple-ios
-opcode=0xe1e03008
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe60
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0xfffffff7
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe60
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-4-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-mvn-4-thumb.dat
deleted file mode 100644 (file)
index f8b1569..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="mvns r3, r8"
-triple=thumb-apple-ios
-opcode=0xea7f0308
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe90
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe90
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0xfffffff7
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe90
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe90
-r14=0x00002f80
-r15=0x00002ffc
-cpsr=0xa0000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-pop-1-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-pop-1-arm.dat
deleted file mode 100644 (file)
index 07163f8..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-InstructionEmulationState={
-assembly_string="pop {r3, r4, r8, r10}"
-triple=arm-apple-ios
-opcode=0xe8bd0518
-before_state={
-memory={
-address=0x2fdffe50
-data_encoding=uint32_t
-data=[
-0x0
-0x2e7c
-0x1
-0x2fdffeac
-]
-}
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000000
-r4=0x00002e7c
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000001
-r9=0x00000009
-r10=0x2fdffeac
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe60
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-pop-1-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-pop-1-thumb.dat
deleted file mode 100644 (file)
index fad6765..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-InstructionEmulationState={
-assembly_string="pop.w {r3, r4, r8, r10}"
-triple=thumb-apple-ios
-opcode=0xe8bd0518
-before_state={
-memory={
-address=0x2fdffe38
-data_encoding=uint32_t
-data=[
-0x0
-0x2f80
-0x1000
-0x1
-]
-}
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe38
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe38
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000000
-r4=0x00002f80
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe38
-r8=0x00001000
-r9=0x00000009
-r10=0x00000001
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe48
-r14=0x00002f80
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-pop-2-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-pop-2-arm.dat
deleted file mode 100644 (file)
index 4b6ae43..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-InstructionEmulationState={
-assembly_string="pop {r9}"
-triple=arm-apple-ios
-opcode=0xe8bd0200
-before_state={
-memory={
-address=0x2fdffe70
-data_encoding=uint32_t
-data=[
-0x0
-]
-}
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe70
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe70
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe70
-r8=0x00000008
-r9=0x00000000
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe74
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-pop-2-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-pop-2-thumb.dat
deleted file mode 100644 (file)
index 9f3efe5..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-InstructionEmulationState={
-assembly_string="pop     {r3}"
-triple=thumb-apple-ios
-opcode=0xbc08
-before_state={
-memory={
-address=0x2fdffe60
-data_encoding=uint32_t
-data=[
-0x0
-]
-}
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe60
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000000
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe64
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-pop-3-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-pop-3-thumb.dat
deleted file mode 100644 (file)
index a2adc41..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-InstructionEmulationState={
-assembly_string="pop {r6}"
-triple=thumb-apple-ios
-opcode=0xbc40
-before_state={
-memory={
-address=0x2fdffe60
-data_encoding=uint32_t
-data=[
-0x0
-]
-}
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe60
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000000
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe64
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-push-1-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-push-1-arm.dat
deleted file mode 100644 (file)
index b2f6e09..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="push {r0, r1, r2, r3, r7, r14}"
-triple=arm-apple-ios
-opcode=0xe92d408f
-before_state={
-registers={
-r0=0x2fdffe30
-r1=0x2fdffe40
-r2=0x2fdffe50
-r3=0x0000001f
-r4=0x2fdffe70
-r5=0x2fdffe80
-r6=0x2fdffe90
-r7=0x2fdffe30
-r8=0x2fdffeb0
-r9=0x2fdffec0
-r10=0x2fdffed0
-r11=0x2fdffee0
-r12=0x2fdffef0
-r13=0x2fdffe30
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x2fdffe30
-r1=0x2fdffe40
-r2=0x2fdffe50
-r3=0x0000001f
-r4=0x2fdffe70
-r5=0x2fdffe80
-r6=0x2fdffe90
-r7=0x2fdffe30
-r8=0x2fdffeb0
-r9=0x2fdffec0
-r10=0x2fdffed0
-r11=0x2fdffee0
-r12=0x2fdffef0
-r13=0x2fdffe18
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-push-1-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-push-1-thumb.dat
deleted file mode 100644 (file)
index 6f5b29e..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="push {r0, r1, r2, r3, r7, r14}"
-triple=thumb-apple-ios
-opcode=0xb58f
-before_state={
-registers={
-r0=0x2fdffe28
-r1=0x2fdffe38
-r2=0x2fdffe48
-r3=0x2fdffe58
-r4=0x2fdffe68
-r5=0x2fdffe78
-r6=0x2fdffe88
-r7=0x2fdffe28
-r8=0x2fdffea8
-r9=0x2fdffeb8
-r10=0x2fdffec8
-r11=0x2fdffed8
-r12=0x2fdffee8
-r13=0x2fdffe28
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x2fdffe28
-r1=0x2fdffe38
-r2=0x2fdffe48
-r3=0x2fdffe58
-r4=0x2fdffe68
-r5=0x2fdffe78
-r6=0x2fdffe88
-r7=0x2fdffe28
-r8=0x2fdffea8
-r9=0x2fdffeb8
-r10=0x2fdffec8
-r11=0x2fdffed8
-r12=0x2fdffee8
-r13=0x2fdffe10
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-push-2-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-push-2-arm.dat
deleted file mode 100644 (file)
index 6f1f438..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="push {r6}"
-triple=arm-apple-ios
-opcode=0xe92d0040
-before_state={
-registers={
-r0=0x2fdffe68
-r1=0x2fdffe78
-r2=0x2fdffe88
-r3=0x0000001f
-r4=0x2fdffea8
-r5=0x2fdffeb8
-r6=0x2fdffec8
-r7=0x2fdffe68
-r8=0x2fdffee8
-r9=0x2fdffef8
-r10=0x2fdfff08
-r11=0x2fdfff18
-r12=0x2fdfff28
-r13=0x2fdffe68
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x2fdffe68
-r1=0x2fdffe78
-r2=0x2fdffe88
-r3=0x0000001f
-r4=0x2fdffea8
-r5=0x2fdffeb8
-r6=0x2fdffec8
-r7=0x2fdffe68
-r8=0x2fdffee8
-r9=0x2fdffef8
-r10=0x2fdfff08
-r11=0x2fdfff18
-r12=0x2fdfff28
-r13=0x2fdffe64
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-push-2-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-push-2-thumb.dat
deleted file mode 100644 (file)
index 23e4df4..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="push {r6}"
-triple=thumb-apple-ios
-opcode=0xb440
-before_state={
-registers={
-r0=0x2fdffe58
-r1=0x2fdffe68
-r2=0x2fdffe78
-r3=0x2fdffe88
-r4=0x2fdffe98
-r5=0x2fdffea8
-r6=0x2fdffeb8
-r7=0x2fdffe58
-r8=0x2fdffed8
-r9=0x2fdffee8
-r10=0x2fdffef8
-r11=0x2fdfff08
-r12=0x2fdfff18
-r13=0x2fdffe58
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x2fdffe58
-r1=0x2fdffe68
-r2=0x2fdffe78
-r3=0x2fdffe88
-r4=0x2fdffe98
-r5=0x2fdffea8
-r6=0x2fdffeb8
-r7=0x2fdffe58
-r8=0x2fdffed8
-r9=0x2fdffee8
-r10=0x2fdffef8
-r11=0x2fdfff08
-r12=0x2fdfff18
-r13=0x2fdffe54
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-push-3-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-push-3-arm.dat
deleted file mode 100644 (file)
index 06847a5..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="push {r7, r14}"
-triple=arm-apple-ios
-opcode=0xe92d4080
-before_state={
-registers={
-r0=0x2fdffe58
-r1=0x2fdffe68
-r2=0x2fdffe78
-r3=0x0000001f
-r4=0x2fdffe98
-r5=0x2fdffea8
-r6=0x2fdffeb8
-r7=0x2fdffe58
-r8=0x2fdffed8
-r9=0x2fdffee8
-r10=0x2fdffef8
-r11=0x2fdfff08
-r12=0x2fdfff18
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x2fdffe58
-r1=0x2fdffe68
-r2=0x2fdffe78
-r3=0x0000001f
-r4=0x2fdffe98
-r5=0x2fdffea8
-r6=0x2fdffeb8
-r7=0x2fdffe58
-r8=0x2fdffed8
-r9=0x2fdffee8
-r10=0x2fdffef8
-r11=0x2fdfff08
-r12=0x2fdfff18
-r13=0x2fdffe50
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-push-3-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-push-3-thumb.dat
deleted file mode 100644 (file)
index e3330f5..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="push {r7, r14}"
-triple=thumb-apple-ios
-opcode=0xb580
-before_state={
-registers={
-r0=0x2fdffe50
-r1=0x2fdffe60
-r2=0x2fdffe70
-r3=0x2fdffe80
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x2fdffe50
-r1=0x2fdffe60
-r2=0x2fdffe70
-r3=0x2fdffe80
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe48
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-1-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-1-arm.dat
deleted file mode 100644 (file)
index 70a5be3..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="str r0, [r13]"
-triple=arm-apple-ios
-opcode=0xe58d0000
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe60
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe60
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-1-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-1-thumb.dat
deleted file mode 100644 (file)
index 3559652..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="str r0, [r13]"
-triple=thumb-apple-ios
-opcode=0x9000
-before_state={
-registers={
-r0=0x2fdffe50
-r1=0x2fdffe60
-r2=0x2fdffe70
-r3=0x2fdffe80
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x2fdffe50
-r1=0x2fdffe60
-r2=0x2fdffe70
-r3=0x2fdffe80
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-2-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-2-arm.dat
deleted file mode 100644 (file)
index 3d77724..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="str r1, [r0, #+4]"
-triple=arm-apple-ios
-opcode=0xe5801004
-before_state={
-registers={
-r0=0x2fdffe60
-r1=0x2fdffe70
-r2=0x2fdffe80
-r3=0x0000001f
-r4=0x2fdffea0
-r5=0x2fdffeb0
-r6=0x2fdffec0
-r7=0x2fdffe60
-r8=0x2fdffee0
-r9=0x2fdffef0
-r10=0x2fdfff00
-r11=0x2fdfff10
-r12=0x2fdfff20
-r13=0x2fdffe60
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x2fdffe60
-r1=0x2fdffe70
-r2=0x2fdffe80
-r3=0x0000001f
-r4=0x2fdffea0
-r5=0x2fdffeb0
-r6=0x2fdffec0
-r7=0x2fdffe60
-r8=0x2fdffee0
-r9=0x2fdffef0
-r10=0x2fdfff00
-r11=0x2fdfff10
-r12=0x2fdfff20
-r13=0x2fdffe60
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-2-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-2-thumb.dat
deleted file mode 100644 (file)
index 73e8cd3..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="str   r0, [sp, #0]"
-triple=thumb-apple-ios
-opcode=0x9000
-before_state={
-registers={
-r0=0x2fdffe50
-r1=0x2fdffe60
-r2=0x2fdffe70
-r3=0x2fdffe80
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x2fdffe50
-r1=0x2fdffe60
-r2=0x2fdffe70
-r3=0x2fdffe80
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-3-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-3-arm.dat
deleted file mode 100644 (file)
index 97c90a0..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="str r2, [r0]"
-triple=arm-apple-ios
-opcode=0xe5802000
-before_state={
-registers={
-r0=0x2fdffe60
-r1=0x2fdffe70
-r2=0x2fdffe80
-r3=0x0000001f
-r4=0x2fdffea0
-r5=0x2fdffeb0
-r6=0x2fdffec0
-r7=0x2fdffe60
-r8=0x2fdffee0
-r9=0x2fdffef0
-r10=0x2fdfff00
-r11=0x2fdfff10
-r12=0x2fdfff20
-r13=0x2fdffe60
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x2fdffe60
-r1=0x2fdffe70
-r2=0x2fdffe80
-r3=0x0000001f
-r4=0x2fdffea0
-r5=0x2fdffeb0
-r6=0x2fdffec0
-r7=0x2fdffe60
-r8=0x2fdffee0
-r9=0x2fdffef0
-r10=0x2fdfff00
-r11=0x2fdfff10
-r12=0x2fdfff20
-r13=0x2fdffe60
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-3-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-3-thumb.dat
deleted file mode 100644 (file)
index 8e891c0..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="str   r1, [sp, #32]"
-triple=thumb-apple-ios
-opcode=0x9108
-before_state={
-registers={
-r0=0x2fdffe50
-r1=0x2fdffe60
-r2=0x2fdffe70
-r3=0x2fdffe80
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x2fdffe50
-r1=0x2fdffe60
-r2=0x2fdffe70
-r3=0x2fdffe80
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-4-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-4-arm.dat
deleted file mode 100644 (file)
index ed3b54e..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="str r2, [r13, #+4]"
-triple=arm-apple-ios
-opcode=0xe58d2004
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-4-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-4-thumb.dat
deleted file mode 100644 (file)
index ec9e2dc..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="str.w r7, [r13, #-12]!"
-triple=thumb-apple-ios
-opcode=0xf84d7d0c
-before_state={
-registers={
-r0=0x2fdffe48
-r1=0x2fdffe58
-r2=0x2fdffe68
-r3=0x2fdffe78
-r4=0x2fdffe88
-r5=0x2fdffe98
-r6=0x2fdffea8
-r7=0x2fdffe48
-r8=0x2fdffec8
-r9=0x2fdffed8
-r10=0x2fdffee8
-r11=0x2fdffef8
-r12=0x2fdfff08
-r13=0x2fdffe48
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x2fdffe48
-r1=0x2fdffe58
-r2=0x2fdffe68
-r3=0x2fdffe78
-r4=0x2fdffe88
-r5=0x2fdffe98
-r6=0x2fdffea8
-r7=0x2fdffe48
-r8=0x2fdffec8
-r9=0x2fdffed8
-r10=0x2fdffee8
-r11=0x2fdffef8
-r12=0x2fdfff08
-r13=0x2fdffe3c
-r14=0x00002f80
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-5-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-str-5-arm.dat
deleted file mode 100644 (file)
index 98b8dfb..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="str r7, [r13, #-12]!"
-triple=arm-apple-ios
-opcode=0xe52d700c
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe4c
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-strb-1-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-strb-1-arm.dat
deleted file mode 100644 (file)
index 2f7320d..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="strb r0, [r2], #+15"
-triple=arm-apple-ios
-opcode=0xe4c2000f
-before_state={
-registers={
-r0=0x2fdffe58
-r1=0x2fdffe68
-r2=0x2fdffe78
-r3=0x0000001f
-r4=0x2fdffe98
-r5=0x2fdffea8
-r6=0x2fdffeb8
-r7=0x2fdffe58
-r8=0x2fdffed8
-r9=0x2fdffee8
-r10=0x2fdffef8
-r11=0x2fdfff08
-r12=0x2fdfff18
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x2fdffe58
-r1=0x2fdffe68
-r2=0x2fdffe87
-r3=0x0000001f
-r4=0x2fdffe98
-r5=0x2fdffea8
-r6=0x2fdffeb8
-r7=0x2fdffe58
-r8=0x2fdffed8
-r9=0x2fdffee8
-r10=0x2fdffef8
-r11=0x2fdfff08
-r12=0x2fdfff18
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-strb-2-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-strb-2-arm.dat
deleted file mode 100644 (file)
index 495c8e7..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="strb r3, [r0, #+8]"
-triple=arm-apple-ios
-opcode=0xe5c03008
-before_state={
-registers={
-r0=0x2fdffe58
-r1=0x2fdffe68
-r2=0x2fdffe78
-r3=0x0000001f
-r4=0x2fdffe98
-r5=0x2fdffea8
-r6=0x2fdffeb8
-r7=0x2fdffe58
-r8=0x2fdffed8
-r9=0x2fdffee8
-r10=0x2fdffef8
-r11=0x2fdfff08
-r12=0x2fdfff18
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x2fdffe58
-r1=0x2fdffe68
-r2=0x2fdffe78
-r3=0x0000001f
-r4=0x2fdffe98
-r5=0x2fdffea8
-r6=0x2fdffeb8
-r7=0x2fdffe58
-r8=0x2fdffed8
-r9=0x2fdffee8
-r10=0x2fdffef8
-r11=0x2fdfff08
-r12=0x2fdfff18
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-strbt-1-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-strbt-1-arm.dat
deleted file mode 100644 (file)
index 494c49a..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="strbt r14, [r2], #+15"
-triple=arm-apple-ios
-opcode=0xe4e2e00f
-before_state={
-registers={
-r0=0x2fdffe50
-r1=0x2fdffe60
-r2=0x2fdffe70
-r3=0x0000001f
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x2fdffe50
-r1=0x2fdffe60
-r2=0x2fdffe7f
-r3=0x0000001f
-r4=0x2fdffe90
-r5=0x2fdffea0
-r6=0x2fdffeb0
-r7=0x2fdffe50
-r8=0x2fdffed0
-r9=0x2fdffee0
-r10=0x2fdffef0
-r11=0x2fdfff00
-r12=0x2fdfff10
-r13=0x2fdffe50
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-strd-1-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-strd-1-thumb.dat
deleted file mode 100644 (file)
index 4876f87..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="strd r10, r11, [r6, #+28]"
-triple=thumb-apple-ios
-opcode=0xe9c6ab07
-before_state={
-registers={
-r0=0x2fdffe70
-r1=0x2fdffe80
-r2=0x2fdffe90
-r3=0x2fdffea0
-r4=0x2fdffeb0
-r5=0x2fdffec0
-r6=0x2fdffed0
-r7=0x2fdffe70
-r8=0x2fdffef0
-r9=0x2fdfff00
-r10=0x2fdfff10
-r11=0x2fdfff20
-r12=0x2fdfff30
-r13=0x2fdffe70
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x2fdffe70
-r1=0x2fdffe80
-r2=0x2fdffe90
-r3=0x2fdffea0
-r4=0x2fdffeb0
-r5=0x2fdffec0
-r6=0x2fdffed0
-r7=0x2fdffe70
-r8=0x2fdffef0
-r9=0x2fdfff00
-r10=0x2fdfff10
-r11=0x2fdfff20
-r12=0x2fdfff30
-r13=0x2fdffe70
-r14=0x00002f80
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-strt-1-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-strt-1-arm.dat
deleted file mode 100644 (file)
index 9fc3115..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="strt r0, [r2], #+15"
-triple=arm-apple-ios
-opcode=0xe4a2000f
-before_state={
-registers={
-r0=0x2fdffe58
-r1=0x2fdffe68
-r2=0x2fdffe78
-r3=0x0000001f
-r4=0x2fdffe98
-r5=0x2fdffea8
-r6=0x2fdffeb8
-r7=0x2fdffe58
-r8=0x2fdffed8
-r9=0x2fdffee8
-r10=0x2fdffef8
-r11=0x2fdfff08
-r12=0x2fdfff18
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x2fdffe58
-r1=0x2fdffe68
-r2=0x2fdffe87
-r3=0x0000001f
-r4=0x2fdffe98
-r5=0x2fdffea8
-r6=0x2fdffeb8
-r7=0x2fdffe58
-r8=0x2fdffed8
-r9=0x2fdffee8
-r10=0x2fdffef8
-r11=0x2fdfff08
-r12=0x2fdfff18
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-1-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-1-arm.dat
deleted file mode 100644 (file)
index 98c435d..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="sub r0, sp, r8"
-triple=arm-apple-ios
-opcode=0xe04d0008
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x2fdffe50
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-1-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-1-thumb.dat
deleted file mode 100644 (file)
index 482480d..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="sub.w    r10, sp, #16"
-triple=thumb-apple-ios
-opcode=0xf1ad0a10
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe40
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe40
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe40
-r8=0x00000008
-r9=0x00000009
-r10=0x2fdffe30
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe40
-r14=0x00002f80
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-10-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-10-arm.dat
deleted file mode 100644 (file)
index 9f07a94..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="sub r7, r12, #8"
-triple=arm-apple-ios
-opcode=0xe24c7008
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x00000004
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-2-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-2-arm.dat
deleted file mode 100644 (file)
index 9a67268..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="sub r10, r12, #31"
-triple=arm-apple-ios
-opcode=0xe24ca01f
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0xffffffed
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-2-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-2-thumb.dat
deleted file mode 100644 (file)
index 11d2138..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="sub.w r10, sp, #31"
-triple=thumb-apple-ios
-opcode=0xf1ad0a1f
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe40
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe40
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe40
-r8=0x00000008
-r9=0x00000009
-r10=0x2fdffe21
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe40
-r14=0x00002f80
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-3-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-3-arm.dat
deleted file mode 100644 (file)
index 4dfe680..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="sub r12, r13, #12"
-triple=arm-apple-ios
-opcode=0xe24dc00c
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x2fdffe44
-r13=0x2fdffe50
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-3-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-3-thumb.dat
deleted file mode 100644 (file)
index a017f52..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="sub.w    r12, sp, #31"
-triple=thumb-apple-ios
-opcode=0xf1ad0c1f
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe40
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe40
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe40
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x2fdffe21
-r13=0x2fdffe40
-r14=0x00002f80
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-4-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-4-arm.dat
deleted file mode 100644 (file)
index 50d13c9..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="sub r13, r13, #24"
-triple=arm-apple-ios
-opcode=0xe24dd018
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe38
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-4-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-4-thumb.dat
deleted file mode 100644 (file)
index 214808d..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="sub.w r1, sp, r3, lsl #2"
-triple=thumb-apple-ios
-opcode=0xebad0183
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe30
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe30
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x2fdffe24
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe30
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe30
-r14=0x00002f80
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-5-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-5-arm.dat
deleted file mode 100644 (file)
index 58de27b..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="sub r13, r13, #4"
-triple=arm-apple-ios
-opcode=0xe24dd004
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe54
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-5-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-5-thumb.dat
deleted file mode 100644 (file)
index 1268828..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="sub.w    r7, sp, #1"
-triple=thumb-apple-ios
-opcode=0xf1ad0701
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe4f
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f80
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-6-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-6-arm.dat
deleted file mode 100644 (file)
index be68913..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="sub r1, r13, #4"
-triple=arm-apple-ios
-opcode=0xe24d1004
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x2fdffe54
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-6-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-6-thumb.dat
deleted file mode 100644 (file)
index d48c42e..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="sub.w     sp, sp, #4"
-triple=thumb-apple-ios
-opcode=0xf1ad0d04
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe4c
-r14=0x00002f80
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-8-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-8-arm.dat
deleted file mode 100644 (file)
index 21b17df..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="sub r2, r2, r3"
-triple=arm-apple-ios
-opcode=0xe0422003
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0xffffffe3
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-9-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-sub-9-arm.dat
deleted file mode 100644 (file)
index 06888ad..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="sub r4, r12, r7"
-triple=arm-apple-ios
-opcode=0xe04c4007
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0xd02001b4
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe58
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe58
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-1-arm.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-1-arm.dat
deleted file mode 100644 (file)
index 856a557..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="subs r10, r13, #31"
-triple=arm-apple-ios
-opcode=0xe25da01f
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002e7c
-r15=0x00002ff8
-cpsr=0x60000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x0000001f
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x2fdffe31
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002e7c
-r15=0x00002ffc
-cpsr=0x20000010
-s0=0x00000000
-s1=0x00000001
-s2=0x00000002
-s3=0x00000003
-s4=0x00000004
-s5=0x00000005
-s6=0x00000006
-s7=0x00000007
-s8=0x00000008
-s9=0x00000009
-s10=0x0000000a
-s11=0x0000000b
-s12=0x0000000c
-s13=0x0000000d
-s14=0x0000000e
-s15=0x0000000f
-s16=0x00000010
-s17=0x00000011
-s18=0x00000012
-s19=0x00000013
-s20=0x00000014
-s21=0x00000015
-s22=0x00000016
-s23=0x00000017
-s24=0x00000018
-s25=0x00000019
-s26=0x0000001a
-s27=0x0000001b
-s28=0x0000001c
-s29=0x0000001d
-s30=0x0000001e
-s31=0x0000001f
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-1-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-1-thumb.dat
deleted file mode 100644 (file)
index 63aa7b8..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="subs  r0, r6, #0"
-triple=thumb-apple-ios
-opcode=0x1e30
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000006
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x20000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-10-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-10-thumb.dat
deleted file mode 100644 (file)
index 75938b4..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="subs.w        r1, sp, #4"
-triple=thumb-apple-ios
-opcode=0xf1bd0104
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe48
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe48
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x2fdffe44
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe48
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe48
-r14=0x00002f80
-r15=0x00002ffc
-cpsr=0x20000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-2-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-2-thumb.dat
deleted file mode 100644 (file)
index 74bddce..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="subs r0, r7, r5"
-triple=thumb-apple-ios
-opcode=0x1b78
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe48
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe48
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x2fdffe43
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe48
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe48
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x20000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-3-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-3-thumb.dat
deleted file mode 100644 (file)
index 965ebf3..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="subs.w r10, r13, #31"
-triple=thumb-apple-ios
-opcode=0xf1bd0a1f
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe38
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe38
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe38
-r8=0x00000008
-r9=0x00000009
-r10=0x2fdffe19
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe38
-r14=0x00002f80
-r15=0x00002ffc
-cpsr=0x20000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-4-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-4-thumb.dat
deleted file mode 100644 (file)
index 0687241..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="subs r1, r3, #4"
-triple=thumb-apple-ios
-opcode=0x1f19
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0xffffffff
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x80000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-5-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-5-thumb.dat
deleted file mode 100644 (file)
index 72ed2ef..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="subs r4, r2, r6"
-triple=thumb-apple-ios
-opcode=0x1b94
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe48
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe48
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0xfffffffc
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe48
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe48
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x80000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-6-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-6-thumb.dat
deleted file mode 100644 (file)
index 67133b2..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="subs r7, r5, #7"
-triple=thumb-apple-ios
-opcode=0x1fef
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe50
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0xfffffffe
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f84
-r15=0x00002ffe
-cpsr=0x80000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-8-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-8-thumb.dat
deleted file mode 100644 (file)
index 965ebf3..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="subs.w r10, r13, #31"
-triple=thumb-apple-ios
-opcode=0xf1bd0a1f
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe38
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe38
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe38
-r8=0x00000008
-r9=0x00000009
-r10=0x2fdffe19
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe38
-r14=0x00002f80
-r15=0x00002ffc
-cpsr=0x20000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-9-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-subs-9-thumb.dat
deleted file mode 100644 (file)
index ea15977..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="subs.w        r10, sp, #31"
-triple=thumb-apple-ios
-opcode=0xf1bd0a1f
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe38
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe38
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe38
-r8=0x00000008
-r9=0x00000009
-r10=0x2fdffe19
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe38
-r14=0x00002f80
-r15=0x00002ffc
-cpsr=0x20000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-vpop-1-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-vpop-1-thumb.dat
deleted file mode 100644 (file)
index 22dd9d8..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-InstructionEmulationState={
-assembly_string="vpop    {d11, d12, d13, d14}"
-triple=thumb-apple-ios
-opcode=0xecbdbb08
-before_state={
-memory={
-address=0x2fdffe60
-data_encoding=uint32_t
-data=[
-0x0
-0x2f80
-0x1000
-0x1
-0x2fdffebc
-0x0
-0x0
-0x2fdffe8c
-]
-}
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe60
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe80
-r14=0x00002f80
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00002f80
-s24=0x00001000
-s25=0x00000001
-s26=0x2fdffebc
-s27=0x00000000
-s28=0x00000000
-s29=0x2fdffe8c
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-vpop-2-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-vpop-2-thumb.dat
deleted file mode 100644 (file)
index e69cd9e..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-InstructionEmulationState={
-assembly_string="vpop    {s0}"
-triple=thumb-apple-ios
-opcode=0xecbd0a01
-before_state={
-memory={
-address=0x2fdffe98
-data_encoding=uint32_t
-data=[
-0x0
-]
-}
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe98
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe98
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe98
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe9c
-r14=0x00002f80
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-vpop-3-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-vpop-3-thumb.dat
deleted file mode 100644 (file)
index 375a92e..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-InstructionEmulationState={
-assembly_string="vpop    {s11, s12, s13, s14}"
-triple=thumb-apple-ios
-opcode=0xecfd5a04
-before_state={
-memory={
-address=0x2fdffe60
-data_encoding=uint32_t
-data=[
-0x0
-0x2f80
-0x1000
-0x1
-]
-}
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe60
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe70
-r14=0x00002f80
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00002f80
-s13=0x00001000
-s14=0x00000001
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-vpush-1-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-vpush-1-thumb.dat
deleted file mode 100644 (file)
index ac4ef56..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="vpush {d11, d12, d13, d14}"
-triple=thumb-apple-ios
-opcode=0xed2dbb08
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe60
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe40
-r14=0x00002f80
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-vpush-2-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-vpush-2-thumb.dat
deleted file mode 100644 (file)
index 58055d6..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="vpush {s0}"
-triple=thumb-apple-ios
-opcode=0xed2d0a01
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe90
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe90
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe90
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe8c
-r14=0x00002f80
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-vpush-3-thumb.dat b/gnu/llvm/lldb/packages/Python/lldbsuite/test/arm/emulation/new-test-files/test-vpush-3-thumb.dat
deleted file mode 100644 (file)
index 2658b43..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-InstructionEmulationState={
-assembly_string="vpush {s11, s12, s13, s14}"
-triple=thumb-apple-ios
-opcode=0xed6d5a04
-before_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe60
-r14=0x00002f80
-r15=0x00002ff8
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-after_state={
-registers={
-r0=0x00000000
-r1=0x00000001
-r2=0x00000002
-r3=0x00000003
-r4=0x00000004
-r5=0x00000005
-r6=0x00000006
-r7=0x2fdffe60
-r8=0x00000008
-r9=0x00000009
-r10=0x0000000a
-r11=0x0000000b
-r12=0x0000000c
-r13=0x2fdffe50
-r14=0x00002f80
-r15=0x00002ffc
-cpsr=0x60000030
-s0=0x00000000
-s1=0x00000000
-s2=0x00000000
-s3=0x00000000
-s4=0x00000000
-s5=0x00000000
-s6=0x00000000
-s7=0x00000000
-s8=0x00000000
-s9=0x00000000
-s10=0x00000000
-s11=0x00000000
-s12=0x00000000
-s13=0x00000000
-s14=0x00000000
-s15=0x00000000
-s16=0x00000000
-s17=0x00000000
-s18=0x00000000
-s19=0x00000000
-s20=0x00000000
-s21=0x00000000
-s22=0x00000000
-s23=0x00000000
-s24=0x00000000
-s25=0x00000000
-s26=0x00000000
-s27=0x00000000
-s28=0x00000000
-s29=0x00000000
-s30=0x00000000
-s31=0x00000000
-}
-}
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/continue/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/continue/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/continue/TestBenchmarkContinue.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/continue/TestBenchmarkContinue.py
deleted file mode 100644 (file)
index 7863481..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbbench import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestBenchmarkContinue(BenchBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @benchmarks_test
-    def test_run_command(self):
-        """Benchmark different ways to continue a process"""
-        self.build()
-        self.data_formatter_commands()
-
-    def setUp(self):
-        # Call super's setUp().
-        BenchBase.setUp(self)
-
-    def data_formatter_commands(self):
-        """Benchmark different ways to continue a process"""
-        self.runCmd("file "+self.getBuildArtifact("a.out"),
-                    CURRENT_EXECUTABLE_SET)
-
-        bkpt = self.target().FindBreakpointByID(
-            lldbutil.run_break_set_by_source_regexp(
-                self, "// break here"))
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type filter clear', check=False)
-            self.runCmd('type synth clear', check=False)
-            self.runCmd(
-                "settings set target.max-children-count 256",
-                check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        runCmd_sw = Stopwatch()
-        lldbutil_sw = Stopwatch()
-
-        for i in range(0, 15):
-            runCmd_sw.start()
-            self.runCmd("continue")
-            runCmd_sw.stop()
-
-        for i in range(0, 15):
-            lldbutil_sw.start()
-            lldbutil.continue_to_breakpoint(self.process(), bkpt)
-            lldbutil_sw.stop()
-
-        print("runCmd: %s\nlldbutil: %s" % (runCmd_sw, lldbutil_sw))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/continue/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/continue/main.cpp
deleted file mode 100644 (file)
index d715a11..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#include <map>
-
-#define intint_map std::map<int, int> 
-
-int g_the_foo = 0;
-
-int thefoo_rw(int arg = 1)
-{
-       if (arg < 0)
-               arg = 0;
-       if (!arg)
-               arg = 1;
-       g_the_foo += arg;
-       return g_the_foo;
-}
-
-int main()
-{
-    intint_map ii;
-    
-    for (int i = 0; i < 15; i++)
-    {
-        ii[i] = i + 1;
-        thefoo_rw(i); // break here
-    }
-
-    ii.clear();
-
-    for (int j = 0; j < 15; j++)
-    {
-        ii[j] = j + 1;
-        thefoo_rw(j); // break here
-    }
-    
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/expression/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/expression/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/expression/TestExpressionCmd.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/expression/TestExpressionCmd.py
deleted file mode 100644 (file)
index 9e5b0ec..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-"""Test lldb's expression evaluations and collect statistics."""
-
-from __future__ import print_function
-
-
-import sys
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbbench import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import configuration
-from lldbsuite.test import lldbutil
-
-
-class ExpressionEvaluationCase(BenchBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        BenchBase.setUp(self)
-        self.source = 'main.cpp'
-        self.line_to_break = line_number(
-            self.source, '// Set breakpoint here.')
-        self.count = 25
-
-    @benchmarks_test
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
-    def test_expr_cmd(self):
-        """Test lldb's expression commands and collect statistics."""
-        self.build()
-        self.exe_name = 'a.out'
-
-        print()
-        self.run_lldb_repeated_exprs(self.exe_name, self.count)
-        print("lldb expr cmd benchmark:", self.stopwatch)
-
-    def run_lldb_repeated_exprs(self, exe_name, count):
-        import pexpect
-        exe = self.getBuildArtifact(exe_name)
-
-        # Set self.child_prompt, which is "(lldb) ".
-        self.child_prompt = '(lldb) '
-        prompt = self.child_prompt
-
-        # Reset the stopwatch now.
-        self.stopwatch.reset()
-        for i in range(count):
-            # So that the child gets torn down after the test.
-            self.child = pexpect.spawn(
-                '%s %s %s' %
-                (lldbtest_config.lldbExec, self.lldbOption, exe))
-            child = self.child
-
-            # Turn on logging for what the child sends back.
-            if self.TraceOn():
-                child.logfile_read = sys.stdout
-
-            child.expect_exact(prompt)
-            child.sendline(
-                'breakpoint set -f %s -l %d' %
-                (self.source, self.line_to_break))
-            child.expect_exact(prompt)
-            child.sendline('run')
-            child.expect_exact(prompt)
-            expr_cmd1 = 'expr ptr[j]->point.x'
-            expr_cmd2 = 'expr ptr[j]->point.y'
-
-            with self.stopwatch:
-                child.sendline(expr_cmd1)
-                child.expect_exact(prompt)
-                child.sendline(expr_cmd2)
-                child.expect_exact(prompt)
-
-            child.sendline('quit')
-            try:
-                self.child.expect(pexpect.EOF)
-            except:
-                pass
-
-        self.child = None
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/expression/TestRepeatedExprs.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/expression/TestRepeatedExprs.py
deleted file mode 100644 (file)
index 438a1fd..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-"""Test evaluating expressions repeatedly comparing lldb against gdb."""
-
-from __future__ import print_function
-
-
-import sys
-import lldb
-from lldbsuite.test.lldbbench import BenchBase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import configuration
-from lldbsuite.test import lldbutil
-
-
-class RepeatedExprsCase(BenchBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        BenchBase.setUp(self)
-        self.source = 'main.cpp'
-        self.line_to_break = line_number(
-            self.source, '// Set breakpoint here.')
-        self.lldb_avg = None
-        self.gdb_avg = None
-        self.count = 100
-
-    @benchmarks_test
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
-    def test_compare_lldb_to_gdb(self):
-        """Test repeated expressions with lldb vs. gdb."""
-        self.build()
-        self.exe_name = 'a.out'
-
-        print()
-        self.run_lldb_repeated_exprs(self.exe_name, self.count)
-        print("lldb benchmark:", self.stopwatch)
-        self.run_gdb_repeated_exprs(self.exe_name, self.count)
-        print("gdb benchmark:", self.stopwatch)
-        print("lldb_avg/gdb_avg: %f" % (self.lldb_avg / self.gdb_avg))
-
-    def run_lldb_repeated_exprs(self, exe_name, count):
-        import pexpect
-        exe = self.getBuildArtifact(exe_name)
-
-        # Set self.child_prompt, which is "(lldb) ".
-        self.child_prompt = '(lldb) '
-        prompt = self.child_prompt
-
-        # So that the child gets torn down after the test.
-        self.child = pexpect.spawn(
-            '%s %s %s' %
-            (lldbtest_config.lldbExec, self.lldbOption, exe))
-        child = self.child
-
-        # Turn on logging for what the child sends back.
-        if self.TraceOn():
-            child.logfile_read = sys.stdout
-
-        child.expect_exact(prompt)
-        child.sendline(
-            'breakpoint set -f %s -l %d' %
-            (self.source, self.line_to_break))
-        child.expect_exact(prompt)
-        child.sendline('run')
-        child.expect_exact(prompt)
-        expr_cmd1 = 'expr ptr[j]->point.x'
-        expr_cmd2 = 'expr ptr[j]->point.y'
-
-        # Reset the stopwatch now.
-        self.stopwatch.reset()
-        for i in range(count):
-            with self.stopwatch:
-                child.sendline(expr_cmd1)
-                child.expect_exact(prompt)
-                child.sendline(expr_cmd2)
-                child.expect_exact(prompt)
-            child.sendline('process continue')
-            child.expect_exact(prompt)
-
-        child.sendline('quit')
-        try:
-            self.child.expect(pexpect.EOF)
-        except:
-            pass
-
-        self.lldb_avg = self.stopwatch.avg()
-        if self.TraceOn():
-            print("lldb expression benchmark:", str(self.stopwatch))
-        self.child = None
-
-    def run_gdb_repeated_exprs(self, exe_name, count):
-        import pexpect
-        exe = self.getBuildArtifact(exe_name)
-
-        # Set self.child_prompt, which is "(gdb) ".
-        self.child_prompt = '(gdb) '
-        prompt = self.child_prompt
-
-        # So that the child gets torn down after the test.
-        self.child = pexpect.spawn('gdb --nx %s' % exe)
-        child = self.child
-
-        # Turn on logging for what the child sends back.
-        if self.TraceOn():
-            child.logfile_read = sys.stdout
-
-        child.expect_exact(prompt)
-        child.sendline('break %s:%d' % (self.source, self.line_to_break))
-        child.expect_exact(prompt)
-        child.sendline('run')
-        child.expect_exact(prompt)
-        expr_cmd1 = 'print ptr[j]->point.x'
-        expr_cmd2 = 'print ptr[j]->point.y'
-
-        # Reset the stopwatch now.
-        self.stopwatch.reset()
-        for i in range(count):
-            with self.stopwatch:
-                child.sendline(expr_cmd1)
-                child.expect_exact(prompt)
-                child.sendline(expr_cmd2)
-                child.expect_exact(prompt)
-            child.sendline('continue')
-            child.expect_exact(prompt)
-
-        child.sendline('quit')
-        child.expect_exact('The program is running.  Exit anyway?')
-        child.sendline('y')
-        try:
-            self.child.expect(pexpect.EOF)
-        except:
-            pass
-
-        self.gdb_avg = self.stopwatch.avg()
-        if self.TraceOn():
-            print("gdb expression benchmark:", str(self.stopwatch))
-        self.child = None
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/expression/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/expression/main.cpp
deleted file mode 100644 (file)
index 4083a68..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-class Point {
-public:
-    int x;
-    int y;
-    Point(int a, int b):
-        x(a),
-        y(b)
-    {}
-};
-
-class Data {
-public:
-    int id;
-    Point point;
-    Data(int i):
-        id(i),
-        point(0, 0)
-    {}
-};
-
-int main(int argc, char const *argv[]) {
-    Data *data[1000];
-    Data **ptr = data;
-    for (int i = 0; i < 1000; ++i) {
-        ptr[i] = new Data(i);
-        ptr[i]->point.x = i;
-        ptr[i]->point.y = i+1;
-    }
-
-    printf("Finished populating data.\n");
-    for (int j = 0; j < 1000; ++j) {
-        bool dump = argc > 1; // Set breakpoint here.
-                              // Evaluate a couple of expressions (2*1000 = 2000 exprs):
-                              // expr ptr[j]->point.x
-                              // expr ptr[j]->point.y
-        if (dump) {
-            printf("data[%d] = %d (%d, %d)\n", j, ptr[j]->id, ptr[j]->point.x, ptr[j]->point.y);
-        }
-    }
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/frame_variable/TestFrameVariableResponse.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/frame_variable/TestFrameVariableResponse.py
deleted file mode 100644 (file)
index 5261204..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-"""Test lldb's response time for 'frame variable' command."""
-
-from __future__ import print_function
-
-
-import sys
-import lldb
-from lldbsuite.test import configuration
-from lldbsuite.test import lldbtest_config
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbbench import *
-
-
-class FrameVariableResponseBench(BenchBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        BenchBase.setUp(self)
-        self.exe = lldbtest_config.lldbExec
-        self.break_spec = '-n main'
-        self.count = 20
-
-    @benchmarks_test
-    @no_debug_info_test
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
-    def test_startup_delay(self):
-        """Test response time for the 'frame variable' command."""
-        print()
-        self.run_frame_variable_bench(self.exe, self.break_spec, self.count)
-        print("lldb frame variable benchmark:", self.stopwatch)
-
-    def run_frame_variable_bench(self, exe, break_spec, count):
-        import pexpect
-        # Set self.child_prompt, which is "(lldb) ".
-        self.child_prompt = '(lldb) '
-        prompt = self.child_prompt
-
-        # Reset the stopwatchs now.
-        self.stopwatch.reset()
-        for i in range(count):
-            # So that the child gets torn down after the test.
-            self.child = pexpect.spawn(
-                '%s %s %s' %
-                (lldbtest_config.lldbExec, self.lldbOption, exe))
-            child = self.child
-
-            # Turn on logging for what the child sends back.
-            if self.TraceOn():
-                child.logfile_read = sys.stdout
-
-            # Set our breakpoint.
-            child.sendline('breakpoint set %s' % break_spec)
-            child.expect_exact(prompt)
-
-            # Run the target and expect it to be stopped due to breakpoint.
-            child.sendline('run')  # Aka 'process launch'.
-            child.expect_exact(prompt)
-
-            with self.stopwatch:
-                # Measure the 'frame variable' response time.
-                child.sendline('frame variable')
-                child.expect_exact(prompt)
-
-            child.sendline('quit')
-            try:
-                self.child.expect(pexpect.EOF)
-            except:
-                pass
-
-        # The test is about to end and if we come to here, the child process has
-        # been terminated.  Mark it so.
-        self.child = None
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxlist/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxlist/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxlist/TestBenchmarkLibcxxList.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxlist/TestBenchmarkLibcxxList.py
deleted file mode 100644 (file)
index 5ad59f3..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbbench import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestBenchmarkLibcxxList(BenchBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @benchmarks_test
-    def test_run_command(self):
-        """Benchmark the std::list data formatter (libc++)"""
-        self.build()
-        self.data_formatter_commands()
-
-    def setUp(self):
-        # Call super's setUp().
-        BenchBase.setUp(self)
-
-    def data_formatter_commands(self):
-        """Benchmark the std::list data formatter (libc++)"""
-        self.runCmd("file " + self.getBuildArtifact("a.out"),
-                    CURRENT_EXECUTABLE_SET)
-
-        bkpt = self.target().FindBreakpointByID(
-            lldbutil.run_break_set_by_source_regexp(
-                self, "break here"))
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type filter clear', check=False)
-            self.runCmd('type synth clear', check=False)
-            self.runCmd(
-                "settings set target.max-children-count 256",
-                check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        sw = Stopwatch()
-
-        sw.start()
-        self.expect('frame variable -A list', substrs=['[300]', '300'])
-        sw.stop()
-
-        print("time to print: %s" % (sw))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxlist/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxlist/main.cpp
deleted file mode 100644 (file)
index 9c4113a..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#include <list>
-
-int main()
-{
-    std::list<int> list;
-    for (int i = 0;
-    i < 1500;
-    i++)
-        list.push_back(i);
-    return list.size(); // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxmap/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxmap/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxmap/TestBenchmarkLibcxxMap.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxmap/TestBenchmarkLibcxxMap.py
deleted file mode 100644 (file)
index ba5ba08..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.lldbbench import *
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestBenchmarkLibcxxMap(BenchBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @benchmarks_test
-    def test_run_command(self):
-        """Benchmark the std::map data formatter (libc++)"""
-        self.build()
-        self.data_formatter_commands()
-
-    def setUp(self):
-        # Call super's setUp().
-        BenchBase.setUp(self)
-
-    def data_formatter_commands(self):
-        """Benchmark the std::map data formatter (libc++)"""
-        self.runCmd("file " +self.getBuildArtifact("a.out"),
-                    CURRENT_EXECUTABLE_SET)
-
-        bkpt = self.target().FindBreakpointByID(
-            lldbutil.run_break_set_by_source_regexp(
-                self, "break here"))
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type filter clear', check=False)
-            self.runCmd('type synth clear', check=False)
-            self.runCmd(
-                "settings set target.max-children-count 256",
-                check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        sw = Stopwatch()
-
-        sw.start()
-        self.expect('frame variable -A map', substrs=['[300]', '300'])
-        sw.stop()
-
-        print("time to print: %s" % (sw))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxmap/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxmap/main.cpp
deleted file mode 100644 (file)
index 45efb26..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#include <map>
-
-int main()
-{
-    std::map<int, int> map;
-    for (int i = 0;
-    i < 1500;
-    i++)
-        map[i] = i;
-    return map.size(); // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/startup/TestStartupDelays.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/startup/TestStartupDelays.py
deleted file mode 100644 (file)
index 104b5d7..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-"""Test lldb's startup delays creating a target, setting a breakpoint, and run to breakpoint stop."""
-
-from __future__ import print_function
-
-
-import sys
-import lldb
-from lldbsuite.test import configuration
-from lldbsuite.test import lldbtest_config
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbbench import *
-
-
-class StartupDelaysBench(BenchBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        BenchBase.setUp(self)
-        # Create self.stopwatch2 for measuring "set first breakpoint".
-        # The default self.stopwatch is for "create fresh target".
-        self.stopwatch2 = Stopwatch()
-        # Create self.stopwatch3 for measuring "run to breakpoint".
-        self.stopwatch3 = Stopwatch()
-        self.exe = lldbtest_config.lldbExec
-        self.break_spec = '-n main'
-        self.count = 30
-
-    @benchmarks_test
-    @no_debug_info_test
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
-    def test_startup_delay(self):
-        """Test start up delays creating a target, setting a breakpoint, and run to breakpoint stop."""
-        print()
-        self.run_startup_delays_bench(self.exe, self.break_spec, self.count)
-        print(
-            "lldb startup delay (create fresh target) benchmark:",
-            self.stopwatch)
-        print(
-            "lldb startup delay (set first breakpoint) benchmark:",
-            self.stopwatch2)
-        print(
-            "lldb startup delay (run to breakpoint) benchmark:",
-            self.stopwatch3)
-
-    def run_startup_delays_bench(self, exe, break_spec, count):
-        import pexpect
-        # Set self.child_prompt, which is "(lldb) ".
-        self.child_prompt = '(lldb) '
-        prompt = self.child_prompt
-
-        # Reset the stopwatchs now.
-        self.stopwatch.reset()
-        self.stopwatch2.reset()
-        for i in range(count):
-            # So that the child gets torn down after the test.
-            self.child = pexpect.spawn(
-                '%s %s' %
-                (lldbtest_config.lldbExec, self.lldbOption))
-            child = self.child
-
-            # Turn on logging for what the child sends back.
-            if self.TraceOn():
-                child.logfile_read = sys.stdout
-
-            with self.stopwatch:
-                # Create a fresh target.
-                child.sendline('file %s' % exe)  # Aka 'target create'.
-                child.expect_exact(prompt)
-
-            with self.stopwatch2:
-                # Read debug info and set the first breakpoint.
-                child.sendline('breakpoint set %s' % break_spec)
-                child.expect_exact(prompt)
-
-            with self.stopwatch3:
-                # Run to the breakpoint just set.
-                child.sendline('run')
-                child.expect_exact(prompt)
-
-            child.sendline('quit')
-            try:
-                self.child.expect(pexpect.EOF)
-            except:
-                pass
-
-        # The test is about to end and if we come to here, the child process has
-        # been terminated.  Mark it so.
-        self.child = None
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/stepping/TestSteppingSpeed.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/stepping/TestSteppingSpeed.py
deleted file mode 100644 (file)
index e5a8f16..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-"""Test lldb's stepping speed."""
-
-from __future__ import print_function
-
-import sys
-import lldb
-from lldbsuite.test import configuration
-from lldbsuite.test import lldbtest_config
-from lldbsuite.test.lldbbench import *
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class SteppingSpeedBench(BenchBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        BenchBase.setUp(self)
-        self.exe = lldbtest_config.lldbExec
-        self.break_spec = '-n main'
-        self.count = 50
-
-        #print("self.exe=%s" % self.exe)
-        #print("self.break_spec=%s" % self.break_spec)
-
-    @benchmarks_test
-    @no_debug_info_test
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
-    def test_run_lldb_steppings(self):
-        """Test lldb steppings on a large executable."""
-        print()
-        self.run_lldb_steppings(self.exe, self.break_spec, self.count)
-        print("lldb stepping benchmark:", self.stopwatch)
-
-    def run_lldb_steppings(self, exe, break_spec, count):
-        import pexpect
-        # Set self.child_prompt, which is "(lldb) ".
-        self.child_prompt = '(lldb) '
-        prompt = self.child_prompt
-
-        # So that the child gets torn down after the test.
-        self.child = pexpect.spawn(
-            '%s %s %s' %
-            (lldbtest_config.lldbExec, self.lldbOption, exe))
-        child = self.child
-
-        # Turn on logging for what the child sends back.
-        if self.TraceOn():
-            child.logfile_read = sys.stdout
-
-        child.expect_exact(prompt)
-        child.sendline('breakpoint set %s' % break_spec)
-        child.expect_exact(prompt)
-        child.sendline('run')
-        child.expect_exact(prompt)
-
-        # Reset the stopwatch now.
-        self.stopwatch.reset()
-        for i in range(count):
-            with self.stopwatch:
-                # Disassemble the function.
-                child.sendline('next')  # Aka 'thread step-over'.
-                child.expect_exact(prompt)
-
-        child.sendline('quit')
-        try:
-            self.child.expect(pexpect.EOF)
-        except:
-            pass
-
-        self.child = None
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py
deleted file mode 100644 (file)
index 5bf7803..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-"""Benchmark the turnaround time starting a debugger and run to the breakpont with lldb vs. gdb."""
-
-from __future__ import print_function
-
-
-import sys
-import lldb
-from lldbsuite.test.lldbbench import *
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import configuration
-from lldbsuite.test import lldbutil
-
-
-class CompileRunToBreakpointBench(BenchBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        BenchBase.setUp(self)
-        self.exe = lldbtest_config.lldbExec
-        self.function = 'Driver::MainLoop()'
-        self.count = 3
-
-        self.lldb_avg = None
-        self.gdb_avg = None
-
-    @benchmarks_test
-    @no_debug_info_test
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
-    def test_run_lldb_then_gdb(self):
-        """Benchmark turnaround time with lldb vs. gdb."""
-        print()
-        self.run_lldb_turnaround(self.exe, self.function, self.count)
-        print("lldb turnaround benchmark:", self.stopwatch)
-        self.run_gdb_turnaround(self.exe, self.function, self.count)
-        print("gdb turnaround benchmark:", self.stopwatch)
-        print("lldb_avg/gdb_avg: %f" % (self.lldb_avg / self.gdb_avg))
-
-    def run_lldb_turnaround(self, exe, function, count):
-        import pexpect
-
-        def run_one_round():
-            prompt = self.child_prompt
-
-            # So that the child gets torn down after the test.
-            self.child = pexpect.spawn(
-                '%s %s %s' %
-                (lldbtest_config.lldbExec, self.lldbOption, exe))
-            child = self.child
-
-            # Turn on logging for what the child sends back.
-            if self.TraceOn():
-                child.logfile_read = sys.stdout
-
-            child.expect_exact(prompt)
-            child.sendline('breakpoint set -F %s' % function)
-            child.expect_exact(prompt)
-            child.sendline('run')
-            child.expect_exact(prompt)
-
-        # Set self.child_prompt, which is "(lldb) ".
-        self.child_prompt = '(lldb) '
-        # Reset the stopwatch now.
-        self.stopwatch.reset()
-
-        for i in range(count + 1):
-            # Ignore the first invoke lldb and run to the breakpoint turnaround
-            # time.
-            if i == 0:
-                run_one_round()
-            else:
-                with self.stopwatch:
-                    run_one_round()
-
-            self.child.sendline('quit')
-            try:
-                self.child.expect(pexpect.EOF)
-            except:
-                pass
-
-        self.lldb_avg = self.stopwatch.avg()
-        self.child = None
-
-    def run_gdb_turnaround(self, exe, function, count):
-        import pexpect
-
-        def run_one_round():
-            prompt = self.child_prompt
-
-            # So that the child gets torn down after the test.
-            self.child = pexpect.spawn('gdb --nx %s' % exe)
-            child = self.child
-
-            # Turn on logging for what the child sends back.
-            if self.TraceOn():
-                child.logfile_read = sys.stdout
-
-            child.expect_exact(prompt)
-            child.sendline('break %s' % function)
-            child.expect_exact(prompt)
-            child.sendline('run')
-            child.expect_exact(prompt)
-
-        # Set self.child_prompt, which is "(gdb) ".
-        self.child_prompt = '(gdb) '
-        # Reset the stopwatch now.
-        self.stopwatch.reset()
-
-        for i in range(count + 1):
-            # Ignore the first invoke lldb and run to the breakpoint turnaround
-            # time.
-            if i == 0:
-                run_one_round()
-            else:
-                with self.stopwatch:
-                    run_one_round()
-
-            self.child.sendline('quit')
-            self.child.expect_exact('The program is running.  Exit anyway?')
-            self.child.sendline('y')
-            try:
-                self.child.expect(pexpect.EOF)
-            except:
-                pass
-
-        self.gdb_avg = self.stopwatch.avg()
-        self.child = None
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/add-dsym/uuid/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/add-dsym/uuid/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/add-dsym/uuid/TestAddDsymCommand.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/add-dsym/uuid/TestAddDsymCommand.py
deleted file mode 100644 (file)
index 8a0fe37..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-"""Test that the 'add-dsym', aka 'target symbols add', command informs the user about success or failure."""
-
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-@skipUnlessDarwin
-class AddDsymCommandCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        TestBase.setUp(self)
-        self.template = 'main.cpp.template'
-        self.source = 'main.cpp'
-        self.teardown_hook_added = False
-
-    @no_debug_info_test
-    def test_add_dsym_command_with_error(self):
-        """Test that the 'add-dsym' command informs the user about failures."""
-
-        # Call the program generator to produce main.cpp, version 1.
-        self.generate_main_cpp(version=1)
-        self.buildDefault(dictionary={'MAKE_DSYM':'YES'})
-
-        # Insert some delay and then call the program generator to produce
-        # main.cpp, version 2.
-        time.sleep(5)
-        self.generate_main_cpp(version=101)
-        # Now call make again, but this time don't generate the dSYM.
-        self.buildDefault(dictionary={'MAKE_DSYM':'NO'})
-
-        self.exe_name = 'a.out'
-        self.do_add_dsym_with_error(self.exe_name)
-
-    @no_debug_info_test
-    def test_add_dsym_command_with_success(self):
-        """Test that the 'add-dsym' command informs the user about success."""
-
-        # Call the program generator to produce main.cpp, version 1.
-        self.generate_main_cpp(version=1)
-        self.buildDefault(dictionary={'MAKE_DSYM':'YES'})
-
-        self.exe_name = 'a.out'
-        self.do_add_dsym_with_success(self.exe_name)
-
-    @no_debug_info_test
-    def test_add_dsym_with_dSYM_bundle(self):
-        """Test that the 'add-dsym' command informs the user about success."""
-
-        # Call the program generator to produce main.cpp, version 1.
-        self.generate_main_cpp(version=1)
-        self.buildDefault(dictionary={'MAKE_DSYM':'YES'})
-
-        self.exe_name = 'a.out'
-        self.do_add_dsym_with_dSYM_bundle(self.exe_name)
-
-    def generate_main_cpp(self, version=0):
-        """Generate main.cpp from main.cpp.template."""
-        temp = os.path.join(self.getSourceDir(), self.template)
-        with open(temp, 'r') as f:
-            content = f.read()
-
-        new_content = content.replace(
-            '%ADD_EXTRA_CODE%',
-            'printf("This is version %d\\n");' %
-            version)
-        src = os.path.join(self.getBuildDir(), self.source)
-        with open(src, 'w') as f:
-            f.write(new_content)
-
-        # The main.cpp has been generated, add a teardown hook to remove it.
-        if not self.teardown_hook_added:
-            self.addTearDownHook(lambda: os.remove(src))
-            self.teardown_hook_added = True
-
-    def do_add_dsym_with_error(self, exe_name):
-        """Test that the 'add-dsym' command informs the user about failures."""
-        exe_path = self.getBuildArtifact(exe_name)
-        self.runCmd("file " + exe_path, CURRENT_EXECUTABLE_SET)
-
-        wrong_path = os.path.join(self.getBuildDir(),
-                                  "%s.dSYM" % exe_name, "Contents")
-        self.expect("add-dsym " + wrong_path, error=True,
-                    substrs=['invalid module path'])
-
-        right_path = os.path.join(
-            self.getBuildDir(),
-            "%s.dSYM" %
-            exe_path,
-            "Contents",
-            "Resources",
-            "DWARF",
-            exe_name)
-        self.expect("add-dsym " + right_path, error=True,
-                    substrs=['symbol file', 'does not match'])
-
-    def do_add_dsym_with_success(self, exe_name):
-        """Test that the 'add-dsym' command informs the user about success."""
-        exe_path = self.getBuildArtifact(exe_name)
-        self.runCmd("file " + exe_path, CURRENT_EXECUTABLE_SET)
-
-        # This time, the UUID should match and we expect some feedback from
-        # lldb.
-        right_path = os.path.join(
-            self.getBuildDir(),
-            "%s.dSYM" %
-            exe_path,
-            "Contents",
-            "Resources",
-            "DWARF",
-            exe_name)
-        self.expect("add-dsym " + right_path,
-                    substrs=['symbol file', 'has been added to'])
-
-    def do_add_dsym_with_dSYM_bundle(self, exe_name):
-        """Test that the 'add-dsym' command informs the user about success when loading files in bundles."""
-        exe_path = self.getBuildArtifact(exe_name)
-        self.runCmd("file " + exe_path, CURRENT_EXECUTABLE_SET)
-
-        # This time, the UUID should be found inside the bundle
-        right_path = "%s.dSYM" % exe_path
-        self.expect("add-dsym " + right_path,
-                    substrs=['symbol file', 'has been added to'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/add-dsym/uuid/main.cpp.template b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/add-dsym/uuid/main.cpp.template
deleted file mode 100644 (file)
index d486b3d..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <stdio.h>
-
-int
-main(int argc, char const *argv[])
-{
-    int my_int = argc + 3;
-    printf("Hello UUID Mismatch: %d\n", my_int); // Set breakpoint here.
-    %ADD_EXTRA_CODE%
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/apropos/basic/TestApropos.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/apropos/basic/TestApropos.py
deleted file mode 100644 (file)
index 920f0dd..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-
-class AproposTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    def test_apropos(self):
-        self.expect("apropos", error=True,
-                    substrs=[' must be called with exactly one argument'])
-        self.expect("apropos a b", error=True,
-                    substrs=[' must be called with exactly one argument'])
-        self.expect("apropos ''", error=True,
-                    substrs=['\'\' is not a valid search word'])
-
-    @no_debug_info_test
-    def test_apropos_variable(self):
-        """Test that 'apropos variable' prints the fully qualified command name"""
-        self.expect(
-            'apropos variable',
-            substrs=[
-                'frame variable',
-                'target variable',
-                'watchpoint set variable'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/apropos/with-process/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/apropos/with-process/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/apropos/with-process/TestAproposWithProcess.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/apropos/with-process/TestAproposWithProcess.py
deleted file mode 100644 (file)
index 64eca71..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-"""
-Test that apropos env doesn't crash trying to touch the process plugin command
-"""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class AproposWithProcessTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line = line_number('main.cpp', '// break here')
-
-    def test_apropos_with_process(self):
-        """Test that apropos env doesn't crash trying to touch the process plugin command."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break in main() after the variables are assigned values.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped', 'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        self.runCmd('apropos env')
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/apropos/with-process/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/apropos/with-process/main.cpp
deleted file mode 100644 (file)
index d18c865..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-int main (int argc, char const *argv[])
-{
-  return 0; // break here
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/breakpoint/command/list/TestBreakpointCommandList.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/breakpoint/command/list/TestBreakpointCommandList.py
deleted file mode 100644 (file)
index f1a8656..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-"""
-Test 'breakpoint command list'.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    def test_list_commands(self):
-        src_dir = self.getSourceDir()
-        yaml_path = os.path.join(src_dir, "a.yaml")
-        yaml_base, ext = os.path.splitext(yaml_path)
-        obj_path = self.getBuildArtifact("main.o")
-        self.yaml2obj(yaml_path, obj_path)
-
-        # Create a target with the object file we just created from YAML
-        target = self.dbg.CreateTarget(obj_path)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Test without any breakpoints.
-        self.expect("breakpoint command list 1", error=True, substrs=["error: No breakpoints exist for which to list commands"])
-
-        # Set a breakpoint
-        self.runCmd("b foo")
-
-        # Check list breakpoint commands for breakpoints that have no commands.
-        self.expect("breakpoint command list 1", startstr="Breakpoint 1 does not have an associated command.")
-
-        # Add a breakpoint command.
-        self.runCmd("breakpoint command add -o 'source list' 1")
-
-        # List breakpoint command that we just created.
-        self.expect("breakpoint command list 1", startstr="""Breakpoint 1:
-    Breakpoint commands:
-      source list
-""")
-
-        # List breakpoint command with invalid breakpoint ID.
-        self.expect("breakpoint command list 2", error=True, startstr="error: '2' is not a currently valid breakpoint ID.")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/breakpoint/command/list/a.yaml b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/breakpoint/command/list/a.yaml
deleted file mode 100644 (file)
index 1007f60..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
---- !ELF
-FileHeader:
-  Class:           ELFCLASS64
-  Data:            ELFDATA2LSB
-  Type:            ET_REL
-  Machine:         EM_X86_64
-Sections:
-  - Name:            .text
-    Type:            SHT_PROGBITS
-    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
-    AddressAlign:    0x0000000000000010
-    Content:         554889E5897DFC5DC3
-Symbols:
-  - Name:            foo
-    Type:            STT_FUNC
-    Section:         .text
-    Size:            0x0000000000000009
-...
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/.categories b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/.categories
deleted file mode 100644 (file)
index 3a3f4df..0000000
+++ /dev/null
@@ -1 +0,0 @@
-cmdline
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/delete/TestCommandDelete.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/delete/TestCommandDelete.py
deleted file mode 100644 (file)
index 3fa654d..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-
-class DeleteCommandTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    def test_delete_builtin(self):
-        self.expect("command delete settings", error=True,
-                    substrs=["'settings' is a permanent debugger command and cannot be removed."])
-
-    @no_debug_info_test
-    def test_delete_alias(self):
-        self.expect("command delete bt", error=True,
-                    substrs=["'bt' is not a known command."])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/history/TestCommandHistory.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/history/TestCommandHistory.py
deleted file mode 100644 (file)
index c866198..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-"""
-Test the command history mechanism
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class CommandHistoryTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    def test_history(self):
-        self.runCmd('command history --clear', inHistory=False)
-        self.runCmd('breakpoint list', check=False, inHistory=True)  # 0
-        self.runCmd('register read', check=False, inHistory=True)  # 1
-        self.runCmd('apropos hello', check=False, inHistory=True)  # 2
-        self.runCmd('memory write', check=False, inHistory=True)  # 3
-        self.runCmd('log list', check=False, inHistory=True)  # 4
-        self.runCmd('disassemble', check=False, inHistory=True)  # 5
-        self.runCmd('expression 1', check=False, inHistory=True)  # 6
-        self.runCmd(
-            'type summary list -w default',
-            check=False,
-            inHistory=True)  # 7
-        self.runCmd('version', check=False, inHistory=True)  # 8
-        self.runCmd('frame select 1', check=False, inHistory=True)  # 9
-
-        self.expect(
-            "command history -s 3 -c 3",
-            inHistory=True,
-            substrs=[
-                '3: memory write',
-                '4: log list',
-                '5: disassemble'])
-
-        self.expect("command history -s 3 -e 3", inHistory=True,
-                    substrs=['3: memory write'])
-
-        self.expect(
-            "command history -s 6 -e 7",
-            inHistory=True,
-            substrs=[
-                '6: expression 1',
-                '7: type summary list -w default'])
-
-        self.expect("command history -c 2", inHistory=True,
-                    substrs=['0: breakpoint list', '1: register read'])
-
-        self.expect("command history -e 3 -c 1", inHistory=True,
-                    substrs=['3: memory write'])
-
-        self.expect(
-            "command history -e 2",
-            inHistory=True,
-            substrs=[
-                '0: breakpoint list',
-                '1: register read',
-                '2: apropos hello'])
-
-        self.expect(
-            "command history -s 12",
-            inHistory=True,
-            substrs=[
-                '12: command history -s 6 -e 7',
-                '13: command history -c 2',
-                '14: command history -e 3 -c 1',
-                '15: command history -e 2',
-                '16: command history -s 12'])
-
-        self.expect(
-            "command history -s end -c 3",
-            inHistory=True,
-            substrs=[
-                '15: command history -e 2',
-                '16: command history -s 12',
-                '17: command history -s end -c 3'])
-
-        self.expect(
-            "command history -s end -e 15",
-            inHistory=True,
-            substrs=[
-                '15: command history -e 2',
-                '16: command history -s 12',
-                '17: command history -s end -c 3',
-                'command history -s end -e 15'])
-
-        self.expect("command history -s 5 -c 1", inHistory=True,
-                    substrs=['5: disassemble'])
-
-        self.expect("command history -c 1 -s 5", inHistory=True,
-                    substrs=['5: disassemble'])
-
-        self.expect("command history -c 1 -e 3", inHistory=True,
-                    substrs=['3: memory write'])
-
-        self.expect(
-            "command history -c 1 -e 3 -s 5",
-            error=True,
-            inHistory=True,
-            substrs=['error: --count, --start-index and --end-index cannot be all specified in the same invocation'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/invalid-args/TestInvalidArgsCommand.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/invalid-args/TestInvalidArgsCommand.py
deleted file mode 100644 (file)
index 47d77b0..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-
-class InvalidArgsCommandTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    def test_script_add(self):
-        self.expect("command script add 1 2", error=True,
-                    substrs=["'command script add' requires one argument"])
-
-        self.expect("command script add", error=True,
-                    substrs=["'command script add' requires one argument"])
-
-    @no_debug_info_test
-    def test_script_clear(self):
-        self.expect("command script clear f", error=True,
-                    substrs=["'command script clear' doesn't take any arguments"])
-
-    @no_debug_info_test
-    def test_script_list(self):
-        self.expect("command script list f", error=True,
-                    substrs=["'command script list' doesn't take any arguments"])
-
-    @no_debug_info_test
-    def test_script_import(self):
-        self.expect("command script import", error=True,
-                    substrs=["command script import needs one or more arguments"])
-
-    @no_debug_info_test
-    def test_alias(self):
-        self.expect("command alias", error=True,
-                    substrs=["'command alias' requires at least two arguments"])
-
-        self.expect("command alias blub foo", error=True,
-                    substrs=["error: invalid command given to 'command alias'. 'foo' does not begin with a valid command.  No alias created."])
-
-    @no_debug_info_test
-    def test_unalias(self):
-        self.expect("command unalias", error=True,
-                    substrs=["must call 'unalias' with a valid alias"])
-
-    @no_debug_info_test
-    def test_delete(self):
-        self.expect("command delete", error=True,
-                    substrs=["must call 'command delete' with one or more valid user"])
-
-    @no_debug_info_test
-    def test_regex(self):
-        self.expect("command regex", error=True,
-                    substrs=["usage: 'command regex <command-name> "])
-
-    @no_debug_info_test
-    def test_source(self):
-        self.expect("command source", error=True,
-                    substrs=["'command source' takes exactly one executable filename argument."])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/nested_alias/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/nested_alias/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/nested_alias/TestNestedAlias.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/nested_alias/TestNestedAlias.py
deleted file mode 100644 (file)
index a1374a9..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-"""
-Test that an alias can reference other aliases without crashing.
-"""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class NestedAliasTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line = line_number('main.cpp', '// break here')
-
-    def test_nested_alias(self):
-        """Test that an alias can reference other aliases without crashing."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break in main() after the variables are assigned values.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped', 'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        # This is the function to remove the custom aliases in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('command unalias read', check=False)
-            self.runCmd('command unalias rd', check=False)
-            self.runCmd('command unalias fo', check=False)
-            self.runCmd('command unalias foself', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.runCmd('command alias read memory read -f A')
-        self.runCmd('command alias rd read -c 3')
-
-        self.expect(
-            'memory read -f A -c 3 `&my_ptr[0]`',
-            substrs=[
-                'deadbeef',
-                'main.cpp:',
-                'feedbeef'])
-        self.expect(
-            'rd `&my_ptr[0]`',
-            substrs=[
-                'deadbeef',
-                'main.cpp:',
-                'feedbeef'])
-
-        self.expect(
-            'memory read -f A -c 3 `&my_ptr[0]`',
-            substrs=['deadfeed'],
-            matching=False)
-        self.expect('rd `&my_ptr[0]`', substrs=['deadfeed'], matching=False)
-
-        self.runCmd('command alias fo frame variable -O --')
-        self.runCmd('command alias foself fo self')
-
-        self.expect(
-            'help foself',
-            substrs=[
-                '--show-all-children',
-                '--raw-output'],
-            matching=False)
-        self.expect(
-            'help foself',
-            substrs=[
-                'Show variables for the current',
-                'stack frame.'],
-            matching=True)
-
-        # Check that foself was resolved and is now independent of 'fo'.
-        self.runCmd('command unalias fo')
-        self.expect(
-            'help foself',
-            substrs=[
-                'Show variables for the current',
-                'stack frame.'],
-            matching=True)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/nested_alias/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/nested_alias/main.cpp
deleted file mode 100644 (file)
index 4df7eed..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-int main (int argc, char const *argv[])
-{
-  void* my_ptr[] = {
-    reinterpret_cast<void*>(0xDEADBEEF),
-    reinterpret_cast<void*>(main),
-    reinterpret_cast<void*>(0xFEEDBEEF),
-    reinterpret_cast<void*>(0xFEEDDEAD),
-    reinterpret_cast<void*>(0xDEADFEED)
-  };
-  return 0; // break here
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/TestCommandScript.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/TestCommandScript.py
deleted file mode 100644 (file)
index de44961..0000000
+++ /dev/null
@@ -1,167 +0,0 @@
-"""
-Test lldb Python commands.
-"""
-
-
-import sys
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-
-
-class CmdPythonTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test(self):
-        self.build()
-        self.pycmd_tests()
-
-    def pycmd_tests(self):
-        self.runCmd("command source py_import")
-
-        # Test a bunch of different kinds of python callables with
-        # both 4 and 5 positional arguments.
-        self.expect("foobar", substrs=["All good"])
-        self.expect("foobar4", substrs=["All good"])
-        self.expect("vfoobar", substrs=["All good"])
-        self.expect("v5foobar", substrs=["All good"])
-        self.expect("sfoobar", substrs=["All good"])
-        self.expect("cfoobar", substrs=["All good"])
-        self.expect("ifoobar", substrs=["All good"])
-        self.expect("sfoobar4", substrs=["All good"])
-        self.expect("cfoobar4", substrs=["All good"])
-        self.expect("ifoobar4", substrs=["All good"])
-        self.expect("ofoobar", substrs=["All good"])
-        self.expect("ofoobar4", substrs=["All good"])
-
-        # Verify command that specifies eCommandRequiresTarget returns failure
-        # without a target.
-        self.expect('targetname',
-                    substrs=['a.out'], matching=False, error=True)
-
-        exe = self.getBuildArtifact("a.out")
-        self.expect("file " + exe,
-                    patterns=["Current executable set to .*a.out"])
-
-        self.expect('targetname',
-                    substrs=['a.out'], matching=True, error=False)
-
-        # This is the function to remove the custom commands in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('command script delete welcome', check=False)
-            self.runCmd('command script delete targetname', check=False)
-            self.runCmd('command script delete longwait', check=False)
-            self.runCmd('command script delete mysto', check=False)
-            self.runCmd('command script delete tell_sync', check=False)
-            self.runCmd('command script delete tell_async', check=False)
-            self.runCmd('command script delete tell_curr', check=False)
-            self.runCmd('command script delete bug11569', check=False)
-            self.runCmd('command script delete takes_exe_ctx', check=False)
-            self.runCmd('command script delete decorated', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        # Interact with debugger in synchronous mode
-        self.setAsync(False)
-
-        # We don't want to display the stdout if not in TraceOn() mode.
-        if not self.TraceOn():
-            self.HideStdout()
-
-        self.expect('welcome Enrico',
-                    substrs=['Hello Enrico, welcome to LLDB'])
-
-        self.expect("help welcome",
-                    substrs=['Just a docstring for welcome_impl',
-                             'A command that says hello to LLDB users'])
-
-        decorated_commands = ["decorated" + str(n) for n in range(1, 5)]
-        for name in decorated_commands:
-            self.expect(name, substrs=["hello from " + name])
-            self.expect("help " + name,
-                        substrs=["Python command defined by @lldb.command"])
-
-        self.expect("help",
-                    substrs=['For more information run',
-                             'welcome'] + decorated_commands)
-
-        self.expect("help -a",
-                    substrs=['For more information run',
-                             'welcome'] + decorated_commands)
-
-        self.expect("help -u", matching=False,
-                    substrs=['For more information run'])
-
-        self.runCmd("command script delete welcome")
-
-        self.expect('welcome Enrico', matching=False, error=True,
-                    substrs=['Hello Enrico, welcome to LLDB'])
-
-        self.expect('targetname fail', error=True,
-                    substrs=['a test for error in command'])
-
-        self.expect('command script list',
-                    substrs=['targetname',
-                             'For more information run'])
-
-        self.expect("help targetname",
-                    substrs=['Expects', '\'raw\'', 'input',
-                             'help', 'raw-input'])
-
-        self.expect("longwait",
-                    substrs=['Done; if you saw the delays I am doing OK'])
-
-        self.runCmd("b main")
-        self.runCmd("run")
-        self.runCmd("mysto 3")
-        self.expect("frame variable array",
-                    substrs=['[0] = 79630', '[1] = 388785018', '[2] = 0'])
-        self.runCmd("mysto 3")
-        self.expect("frame variable array",
-                    substrs=['[0] = 79630', '[4] = 388785018', '[5] = 0'])
-
-# we cannot use the stepover command to check for async execution mode since LLDB
-# seems to get confused when events start to queue up
-        self.expect("tell_sync",
-                    substrs=['running sync'])
-        self.expect("tell_async",
-                    substrs=['running async'])
-        self.expect("tell_curr",
-                    substrs=['I am running sync'])
-
-# check that the execution context is passed in to commands that ask for it
-        self.expect("takes_exe_ctx", substrs=["a.out"])
-
-        # Test that a python command can redefine itself
-        self.expect('command script add -f foobar welcome -h "just some help"')
-
-        self.runCmd("command script clear")
-
-        # Test that re-defining an existing command works
-        self.runCmd(
-            'command script add my_command --class welcome.WelcomeCommand')
-        self.expect('my_command Blah', substrs=['Hello Blah, welcome to LLDB'])
-
-        self.runCmd(
-            'command script add my_command --class welcome.TargetnameCommand')
-        self.expect('my_command', substrs=['a.out'])
-
-        self.runCmd("command script clear")
-
-        self.expect('command script list', matching=False,
-                    substrs=['targetname',
-                             'longwait'])
-
-        self.expect('command script add -f foobar frame', error=True,
-                    substrs=['cannot add command'])
-
-        # http://llvm.org/bugs/show_bug.cgi?id=11569
-        # LLDBSwigPythonCallCommand crashes when a command script returns an
-        # object
-        self.runCmd('command script add -f bug11569 bug11569')
-        # This should not crash.
-        self.runCmd('bug11569', check=False)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/bug11569.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/bug11569.py
deleted file mode 100644 (file)
index 3c124de..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-def bug11569(debugger, args, result, dict):
-    """
-    http://llvm.org/bugs/show_bug.cgi?id=11569
-    LLDBSwigPythonCallCommand crashes when a command script returns an object.
-    """
-    return ["return", "a", "non-string", "should", "not", "crash", "LLDB"]
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/callables.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/callables.py
deleted file mode 100644 (file)
index c31e84c..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-import lldb
-
-# bunch of different kinds of python callables that should
-# all work as commands.
-
-def check(debugger, command, context, result, internal_dict):
-    if (not isinstance(debugger, lldb.SBDebugger) or
-        not isinstance(command, str) or
-        not isinstance(result, lldb.SBCommandReturnObject) or
-        not isinstance(internal_dict, dict) or
-        (not context is None and
-        not isinstance(context, lldb.SBExecutionContext))):
-      raise Exception()
-    result.AppendMessage("All good.")
-
-def vfoobar(*args):
-    check(*args)
-
-def v5foobar(debugger, command, context, result, internal_dict, *args):
-    check(debugger, command, context, result, internal_dict)
-
-def foobar(debugger, command, context, result, internal_dict):
-    check(debugger, command, context, result, internal_dict)
-
-def foobar4(debugger, command, result, internal_dict):
-    check(debugger, command, None, result, internal_dict)
-
-class FooBar:
-    @staticmethod
-    def sfoobar(debugger, command, context, result, internal_dict):
-      check(debugger, command, context, result, internal_dict)
-
-    @classmethod
-    def cfoobar(cls, debugger, command, context, result, internal_dict):
-      check(debugger, command, context, result, internal_dict)
-
-    def ifoobar(self, debugger, command, context, result, internal_dict):
-      check(debugger, command, context, result, internal_dict)
-
-    def __call__(self, debugger, command, context, result, internal_dict):
-      check(debugger, command, context, result, internal_dict)
-
-    @staticmethod
-    def sfoobar4(debugger, command, result, internal_dict):
-      check(debugger, command, None, result, internal_dict)
-
-    @classmethod
-    def cfoobar4(cls, debugger, command, result, internal_dict):
-      check(debugger, command, None, result, internal_dict)
-
-    def ifoobar4(self, debugger, command, result, internal_dict):
-      check(debugger, command, None, result, internal_dict)
-
-class FooBar4:
-    def __call__(self, debugger, command, result, internal_dict):
-      check(debugger, command, None, result, internal_dict)
-
-FooBarObj = FooBar()
-
-FooBar4Obj = FooBar4()
\ No newline at end of file
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/decorated.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/decorated.py
deleted file mode 100644 (file)
index f9707a5..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-from __future__ import print_function
-
-import lldb
-
-
-@lldb.command()
-def decorated1(debugger, args, exe_ctx, result, dict):
-    """
-    Python command defined by @lldb.command
-    """
-    print("hello from decorated1", file=result)
-
-
-@lldb.command(doc="Python command defined by @lldb.command")
-def decorated2(debugger, args, exe_ctx, result, dict):
-    """
-    This docstring is overridden.
-    """
-    print("hello from decorated2", file=result)
-
-
-@lldb.command()
-def decorated3(debugger, args, result, dict):
-    """
-    Python command defined by @lldb.command
-    """
-    print("hello from decorated3", file=result)
-
-
-@lldb.command("decorated4")
-def _decorated4(debugger, args, exe_ctx, result, dict):
-    """
-    Python command defined by @lldb.command
-    """
-    print("hello from decorated4", file=result)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/Makefile
deleted file mode 100644 (file)
index d9ee1cc..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-C_SOURCES := main.c
-EXE := hello_world
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/TestImport.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/TestImport.py
deleted file mode 100644 (file)
index a10c23b..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-"""Test custom import command to import files by path."""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ImportTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(['pyapi'])
-    @no_debug_info_test
-    def test_import_command(self):
-        """Import some Python scripts by path and test them"""
-        self.run_test()
-
-    def run_test(self):
-        """Import some Python scripts by path and test them."""
-
-        # This is the function to remove the custom commands in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('command script delete foo2cmd', check=False)
-            self.runCmd('command script delete foocmd', check=False)
-            self.runCmd('command script delete foobarcmd', check=False)
-            self.runCmd('command script delete barcmd', check=False)
-            self.runCmd('command script delete barothercmd', check=False)
-            self.runCmd('command script delete TPcommandA', check=False)
-            self.runCmd('command script delete TPcommandB', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.runCmd("command script import ./foo/foo.py --allow-reload")
-        self.runCmd("command script import ./foo/foo2.py --allow-reload")
-        self.runCmd("command script import ./foo/bar/foobar.py --allow-reload")
-        self.runCmd("command script import ./bar/bar.py --allow-reload")
-
-        self.expect("command script import ./nosuchfile.py",
-                    error=True, startstr='error: module importing failed')
-        self.expect("command script import ./nosuchfolder/",
-                    error=True, startstr='error: module importing failed')
-        self.expect("command script import ./foo/foo.py", error=False)
-
-        self.runCmd("command script import --allow-reload ./thepackage")
-        self.expect("TPcommandA", substrs=["hello world A"])
-        self.expect("TPcommandB", substrs=["hello world B"])
-
-        self.runCmd("script import dummymodule")
-        self.expect("command script import ./dummymodule.py", error=False)
-        self.expect(
-            "command script import --allow-reload ./dummymodule.py",
-            error=False)
-
-        self.runCmd("command script add -f foo.foo_function foocmd")
-        self.runCmd("command script add -f foobar.foo_function foobarcmd")
-        self.runCmd("command script add -f bar.bar_function barcmd")
-        self.expect("foocmd hello",
-                    substrs=['foo says', 'hello'])
-        self.expect("foo2cmd hello",
-                    substrs=['foo2 says', 'hello'])
-        self.expect("barcmd hello",
-                    substrs=['barutil says', 'bar told me', 'hello'])
-        self.expect("barothercmd hello",
-                    substrs=['barutil says', 'bar told me', 'hello'])
-        self.expect("foobarcmd hello",
-                    substrs=['foobar says', 'hello'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/bar/bar.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/bar/bar.py
deleted file mode 100644 (file)
index 444e009..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-from __future__ import print_function
-
-
-def bar_function(debugger, args, result, dict):
-    global UtilityModule
-    print(UtilityModule.barutil_function("bar told me " + args), file=result)
-    return None
-
-
-def __lldb_init_module(debugger, session_dict):
-    global UtilityModule
-    UtilityModule = __import__("barutil")
-    debugger.HandleCommand(
-        "command script add -f bar.bar_function barothercmd")
-    return None
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/bar/barutil.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/bar/barutil.py
deleted file mode 100644 (file)
index 70ecea3..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-def barutil_function(x):
-    return "barutil says: " + x
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/dummymodule.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/dummymodule.py
deleted file mode 100644 (file)
index 668a5b9..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-def no_useful_code(foo):
-    return foo
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/foo/bar/foobar.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/foo/bar/foobar.py
deleted file mode 100644 (file)
index 6ef7106..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-from __future__ import print_function
-
-
-def foo_function(debugger, args, result, dict):
-    print("foobar says " + args, file=result)
-    return None
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/foo/foo.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/foo/foo.py
deleted file mode 100644 (file)
index 1ccc389..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-from __future__ import print_function
-
-
-def foo_function(debugger, args, result, dict):
-    print("foo says " + args, file=result)
-    return None
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/foo/foo2.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/foo/foo2.py
deleted file mode 100644 (file)
index 71657c2..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-from __future__ import print_function
-
-
-def foo2_function(debugger, args, result, dict):
-    print("foo2 says " + args, file=result)
-    return None
-
-
-def __lldb_init_module(debugger, session_dict):
-    debugger.HandleCommand("command script add -f foo2.foo2_function foo2cmd")
-    return None
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/main.c
deleted file mode 100644 (file)
index dffc8c7..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#include <stdio.h>
-
-int main(int argc, char const *argv[]) {
-    printf("Hello world.\n"); // Set break point at this line.
-    if (argc == 1)
-        return 0;
-
-    // Waiting to be attached by the debugger, otherwise.
-    char line[100];
-    while (fgets(line, sizeof(line), stdin)) { // Waiting to be attached...
-        printf("input line=>%s\n", line);
-    }
-
-    printf("Exiting now\n");
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/rdar-12586188/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/rdar-12586188/Makefile
deleted file mode 100644 (file)
index 22f1051..0000000
+++ /dev/null
@@ -1 +0,0 @@
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/rdar-12586188/TestRdar12586188.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/rdar-12586188/TestRdar12586188.py
deleted file mode 100644 (file)
index 478cfa3..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-"""Check that we handle an ImportError in a special way when command script importing files."""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class Rdar12586188TestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(['pyapi'])
-    @no_debug_info_test
-    def test_rdar12586188_command(self):
-        """Check that we handle an ImportError in a special way when command script importing files."""
-        self.run_test()
-
-    def run_test(self):
-        """Check that we handle an ImportError in a special way when command script importing files."""
-
-        self.expect(
-            "command script import ./fail12586188.py --allow-reload",
-            error=True,
-            substrs=['raise ImportError("I do not want to be imported")'])
-        self.expect(
-            "command script import ./fail212586188.py --allow-reload",
-            error=True,
-            substrs=['raise ValueError("I do not want to be imported")'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/rdar-12586188/fail12586188.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/rdar-12586188/fail12586188.py
deleted file mode 100644 (file)
index ea385e0..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-def f(x):
-    return x + 1
-
-raise ImportError("I do not want to be imported")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/rdar-12586188/fail212586188.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/rdar-12586188/fail212586188.py
deleted file mode 100644 (file)
index 8dbc0e6..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-def f(x):
-    return x + 1
-
-raise ValueError("I do not want to be imported")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/thepackage/TPunitA.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/thepackage/TPunitA.py
deleted file mode 100644 (file)
index 9694b08..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-
-import six
-
-
-def command(debugger, command, result, internal_dict):
-    result.PutCString(six.u("hello world A"))
-    return None
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/thepackage/TPunitB.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/thepackage/TPunitB.py
deleted file mode 100644 (file)
index 94a333b..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-
-import six
-
-
-def command(debugger, command, result, internal_dict):
-    result.PutCString(six.u("hello world B"))
-    return None
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/thepackage/__init__.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/import/thepackage/__init__.py
deleted file mode 100644 (file)
index 24cdea6..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-from __future__ import absolute_import
-
-from . import TPunitA
-from . import TPunitB
-
-
-def __lldb_init_module(debugger, *args):
-    debugger.HandleCommand(
-        "command script add -f thepackage.TPunitA.command TPcommandA")
-    debugger.HandleCommand(
-        "command script add -f thepackage.TPunitB.command TPcommandB")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/main.cpp
deleted file mode 100644 (file)
index a0e9efd..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <cstdlib>
-#include <cstring>
-#include <string>
-#include <fstream>
-#include <iostream>
-
-int
-product (int x, int y)
-{
-    int result = x * y;
-    return result;
-}
-
-int
-sum (int a, int b)
-{
-    int result = a + b;
-    return result;
-}
-
-int
-strange_max (int m, int n)
-{
-    if (m > n)
-        return m;
-    else if (n > m)
-        return n;
-    else
-        return 0;
-}
-
-int
-foo (int i, int j)
-{
-    if (strange_max (i, j) == i)
-        return product (i, j);
-    else if (strange_max  (i, j) == j)
-        return sum (i, j);
-    else
-        return product (sum (i, i), sum (j, j));
-}
-
-int
-main(int argc, char const *argv[])
-{
-
-    int array[9];
-       memset(array,0,9*sizeof(int));
-
-    array[0] = foo (1238, 78392);
-    array[1] = foo (379265, 23674);
-    array[2] = foo (872934, 234);
-    array[3] = foo (1238, 78392);
-    array[4] = foo (379265, 23674);
-    array[5] = foo (872934, 234);
-    array[6] = foo (1238, 78392);
-    array[7] = foo (379265, 23674);
-    array[8] = foo (872934, 234);
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/mysto.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/mysto.py
deleted file mode 100644 (file)
index 04eceb7..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-from __future__ import print_function
-
-import lldb
-
-
-def StepOver(debugger, args, result, dict):
-    """
-    Step over a given number of times instead of only just once
-    """
-    arg_split = args.split(" ")
-    print(type(arg_split))
-    count = int(arg_split[0])
-    for i in range(0, count):
-        debugger.GetSelectedTarget().GetProcess(
-        ).GetSelectedThread().StepOver(lldb.eOnlyThisThread)
-        print("step<%d>" % i)
-
-
-def __lldb_init_module(debugger, session_dict):
-    # by default, --synchronicity is set to synchronous
-    debugger.HandleCommand("command script add -f mysto.StepOver mysto")
-    return None
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/py_import b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/py_import
deleted file mode 100644 (file)
index 4372d32..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-script import sys, os
-script sys.path.append(os.path.join(os.getcwd(), os.pardir))
-script import welcome
-script import bug11569
-command script add welcome --class welcome.WelcomeCommand
-command script add targetname --class welcome.TargetnameCommand
-command script add longwait --function welcome.print_wait_impl
-command script import mysto.py --allow-reload
-command script add tell_sync --function welcome.check_for_synchro --synchronicity sync
-command script add tell_async --function welcome.check_for_synchro --synchronicity async
-command script add tell_curr --function welcome.check_for_synchro --synchronicity curr
-command script add takes_exe_ctx --function welcome.takes_exe_ctx
-command script import decorated.py
-
-
-command script import callables.py
-
-command script add -f callables.foobar foobar
-command script add -f callables.foobar4 foobar4
-command script add -f callables.vfoobar vfoobar
-command script add -f callables.v5foobar v5foobar
-
-command script add -f callables.FooBar.sfoobar sfoobar
-command script add -f callables.FooBar.cfoobar cfoobar
-command script add -f callables.FooBarObj.ifoobar ifoobar
-
-command script add -f callables.FooBar.sfoobar4 sfoobar4
-command script add -f callables.FooBar.cfoobar4 cfoobar4
-command script add -f callables.FooBarObj.ifoobar4 ifoobar4
-
-command script add -f callables.FooBarObj ofoobar
-command script add -f callables.FooBar4Obj ofoobar4
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/welcome.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script/welcome.py
deleted file mode 100644 (file)
index 0539d7c..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-from __future__ import print_function
-import lldb
-import sys
-
-
-class WelcomeCommand(object):
-
-    def __init__(self, debugger, session_dict):
-        pass
-
-    def get_short_help(self):
-        return "Just a docstring for welcome_impl\nA command that says hello to LLDB users"
-
-    def __call__(self, debugger, args, exe_ctx, result):
-        print('Hello ' + args + ', welcome to LLDB', file=result)
-        return None
-
-
-class TargetnameCommand(object):
-
-    def __init__(self, debugger, session_dict):
-        pass
-
-    def __call__(self, debugger, args, exe_ctx, result):
-        target = debugger.GetSelectedTarget()
-        file = target.GetExecutable()
-        print('Current target ' + file.GetFilename(), file=result)
-        if args == 'fail':
-            result.SetError('a test for error in command')
-
-    def get_flags(self):
-        return lldb.eCommandRequiresTarget
-
-
-def print_wait_impl(debugger, args, result, dict):
-    result.SetImmediateOutputFile(sys.stdout)
-    print('Trying to do long task..', file=result)
-    import time
-    time.sleep(1)
-    print('Still doing long task..', file=result)
-    time.sleep(1)
-    print('Done; if you saw the delays I am doing OK', file=result)
-
-
-def check_for_synchro(debugger, args, result, dict):
-    if debugger.GetAsync():
-        print('I am running async', file=result)
-    if debugger.GetAsync() == False:
-        print('I am running sync', file=result)
-
-
-def takes_exe_ctx(debugger, args, exe_ctx, result, dict):
-    print(str(exe_ctx.GetTarget()), file=result)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script_alias/TestCommandScriptAlias.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script_alias/TestCommandScriptAlias.py
deleted file mode 100644 (file)
index 3f2e8cc..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-"""
-Test lldb Python commands.
-"""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-
-
-class CommandScriptAliasTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_pycmd(self):
-        self.runCmd("command script import tcsacmd.py")
-        self.runCmd("command script add -f tcsacmd.some_command_here attach")
-
-        # This is the function to remove the custom commands in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('command script delete attach', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        # We don't want to display the stdout if not in TraceOn() mode.
-        if not self.TraceOn():
-            self.HideStdout()
-
-        self.expect('attach a', substrs=['Victory is mine'])
-        self.runCmd("command script delete attach")
-        # this can't crash but we don't care whether the actual attach works
-        self.runCmd('attach noprocessexistswiththisname', check=False)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script_alias/tcsacmd.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/script_alias/tcsacmd.py
deleted file mode 100644 (file)
index 8d3248c..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-from __future__ import print_function
-import lldb
-
-
-def some_command_here(debugger, command, result, d):
-    if command == "a":
-        print("Victory is mine", file=result)
-        return True
-    else:
-        print("Sadness for all", file=result)
-        return False
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/source/.lldb b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/source/.lldb
deleted file mode 100644 (file)
index ecbdcff..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-# one more level of indirection to stress the command interpreter reentrancy
-command source commands.txt
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/source/TestCommandSource.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/source/TestCommandSource.py
deleted file mode 100644 (file)
index 6d2717b..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-"""
-Test that lldb command "command source" works correctly.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class CommandSourceTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    def test_command_source(self):
-        """Test that lldb command "command source" works correctly."""
-
-        # Sourcing .lldb in the current working directory, which in turn imports
-        # the "my" package that defines the date() function.
-        self.runCmd("command source .lldb")
-
-        # Python should evaluate "my.date()" successfully.
-        command_interpreter = self.dbg.GetCommandInterpreter()
-        self.assertTrue(command_interpreter, VALID_COMMAND_INTERPRETER)
-        result = lldb.SBCommandReturnObject()
-        command_interpreter.HandleCommand("script my.date()", result)
-
-        import datetime
-        self.expect(result.GetOutput(), "script my.date() runs successfully",
-                    exe=False,
-                    substrs=[str(datetime.date.today())])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/source/commands.txt b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/source/commands.txt
deleted file mode 100644 (file)
index 8e4de66..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-script import my
-p 1 + 1
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/source/my.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/command/source/my.py
deleted file mode 100644 (file)
index bd97fda..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-from __future__ import print_function
-
-
-def date():
-    import datetime
-    today = datetime.date.today()
-    print(today)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/disassemble/basic/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/disassemble/basic/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/disassemble/basic/TestDisassembleBreakpoint.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/disassemble/basic/TestDisassembleBreakpoint.py
deleted file mode 100644 (file)
index 4130aae..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-"""
-Test some lldb command abbreviations.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class DisassemblyTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test(self):
-        self.build()
-        target, _, _, bkpt = lldbutil.run_to_source_breakpoint(self,
-                "Set a breakpoint here", lldb.SBFileSpec("main.cpp"))
-        self.runCmd("dis -f")
-        disassembly_with_break = self.res.GetOutput().splitlines()
-
-        self.assertTrue(target.BreakpointDelete(bkpt.GetID()))
-
-        self.runCmd("dis -f")
-        disassembly_without_break = self.res.GetOutput().splitlines()
-
-        # Make sure all assembly instructions are the same as instructions
-        # with the breakpoint removed.
-        self.assertEqual(len(disassembly_with_break),
-                         len(disassembly_without_break))
-        for dis_inst_with, dis_inst_without in \
-                zip(disassembly_with_break, disassembly_without_break):
-            inst_with = dis_inst_with.split(':')[-1]
-            inst_without = dis_inst_without.split(':')[-1]
-            self.assertEqual(inst_with, inst_without)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/disassemble/basic/TestFrameDisassemble.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/disassemble/basic/TestFrameDisassemble.py
deleted file mode 100644 (file)
index 66f7891..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-"""
-Test to ensure SBFrame::Disassemble produces SOME output
-"""
-
-
-
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbtest import *
-
-
-class FrameDisassembleTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_frame_disassemble(self):
-        """Sample test to ensure SBFrame::Disassemble produces SOME output."""
-        self.build()
-        self.frame_disassemble_test()
-
-    def frame_disassemble_test(self):
-        """Sample test to ensure SBFrame::Disassemble produces SOME output"""
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create a breakpoint in main.c at the source matching
-        # "Set a breakpoint here"
-        breakpoint = target.BreakpointCreateBySourceRegex(
-            "Set a breakpoint here", lldb.SBFileSpec("main.cpp"))
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() >= 1,
-                        VALID_BREAKPOINT)
-
-        error = lldb.SBError()
-        # This is the launch info.  If you want to launch with arguments or
-        # environment variables, add them using SetArguments or
-        # SetEnvironmentEntries
-
-        launch_info = lldb.SBLaunchInfo(None)
-        process = target.Launch(launch_info, error)
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Did we hit our breakpoint?
-        from lldbsuite.test.lldbutil import get_threads_stopped_at_breakpoint
-        threads = get_threads_stopped_at_breakpoint(process, breakpoint)
-        self.assertTrue(
-            len(threads) == 1,
-            "There should be a thread stopped at our breakpoint")
-
-        # The hit count for the breakpoint should be 1.
-        self.assertTrue(breakpoint.GetHitCount() == 1)
-
-        frame = threads[0].GetFrameAtIndex(0)
-        disassembly = frame.Disassemble()
-        self.assertTrue(len(disassembly) != 0, "Disassembly was empty.")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/disassemble/basic/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/disassemble/basic/main.cpp
deleted file mode 100644 (file)
index 93d4b1c..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-int
-sum (int a, int b)
-{
-    int result = a + b; // Set a breakpoint here
-    return result;
-}
-
-int
-main(int argc, char const *argv[])
-{
-
-    int array[3];
-
-    array[0] = sum (1238, 78392);
-    array[1] = sum (379265, 23674);
-    array[2] = sum (872934, 234);
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/.categories b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/.categories
deleted file mode 100644 (file)
index 897e40a..0000000
+++ /dev/null
@@ -1 +0,0 @@
-expression
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/anonymous-struct/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/anonymous-struct/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/anonymous-struct/TestCallUserAnonTypedef.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/anonymous-struct/TestCallUserAnonTypedef.py
deleted file mode 100644 (file)
index d53fc52..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-"""
-Test calling user defined functions using expression evaluation.
-This test checks that typesystem lookup works correctly for typedefs of
-untagged structures.
-
-Ticket: https://llvm.org/bugs/show_bug.cgi?id=26790
-"""
-
-
-import lldb
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestExprLookupAnonStructTypedef(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        TestBase.setUp(self)
-        # Find the breakpoint
-        self.line = line_number('main.cpp', '// lldb testsuite break')
-
-    @expectedFailureAll(
-        oslist=['linux'],
-        archs=['arm'],
-        bugnumber="llvm.org/pr27868")
-    def test(self):
-        """Test typedeffed untagged struct arguments for function call expressions"""
-        self.build()
-
-        self.runCmd("file "+self.getBuildArtifact("a.out"),
-                    CURRENT_EXECUTABLE_SET)
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            "main.cpp",
-            self.line,
-            num_expected_locations=-1,
-            loc_exact=True
-        )
-
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.expect("expr multiply(&s)", substrs=['$0 = 1'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/anonymous-struct/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/anonymous-struct/main.cpp
deleted file mode 100644 (file)
index 5b170c5..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#include <tgmath.h>
-
-typedef struct {
-    float f;
-    int i;
-} my_untagged_struct;
-
-double multiply(my_untagged_struct *s)
-{
-    return s->f * s->i;
-}
-
-double multiply(my_untagged_struct *s, int x)
-{
-    return multiply(s) * x;
-}
-
-int main(int argc, char **argv)
-{
-    my_untagged_struct s = {
-        .f = (float)argc,
-        .i = argc,
-    };
-    // lldb testsuite break
-    return !(multiply(&s, argc) == pow(argc, 3));
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/argument_passing_restrictions/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/argument_passing_restrictions/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/argument_passing_restrictions/TestArgumentPassingRestrictions.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/argument_passing_restrictions/TestArgumentPassingRestrictions.py
deleted file mode 100644 (file)
index 858f278..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-"""
-This is a test to ensure that both lldb is reconstructing the right
-calling convention for a CXXRecordDecl as represented by:
-
-   DW_CC_pass_by_reference
-   DW_CC_pass_by_value
-
-and to also make sure that the ASTImporter is copying over this
-setting when importing the CXXRecordDecl via setArgPassingRestrictions.
-"""
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestArgumentPassingRestrictions(TestBase):
-
-  mydir = TestBase.compute_mydir(__file__)
-
-  @skipIf(compiler="clang", compiler_version=['<', '7.0'])
-  def test_argument_passing_restrictions(self):
-    self.build()
-
-    lldbutil.run_to_source_breakpoint(self, '// break here',
-            lldb.SBFileSpec("main.cpp"))
-
-    self.expect("expr returnPassByRef()",
-            substrs=['(PassByRef)', '= 11223344'])
-
-    self.expect("expr takePassByRef(p)",
-            substrs=['(int)', '= 42'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/argument_passing_restrictions/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/argument_passing_restrictions/main.cpp
deleted file mode 100644 (file)
index 4b3b695..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// This structure has a non-trivial copy constructor so
-// it needs to be passed by reference.
-struct PassByRef {
-  PassByRef() = default;
-  PassByRef(const PassByRef &p){x = p.x;};
-
-  int x = 11223344;
-};
-
-PassByRef returnPassByRef() { return PassByRef(); }
-int takePassByRef(PassByRef p) {
-    return p.x;
-}
-
-int main() {
-    PassByRef p = returnPassByRef();
-    p.x = 42;
-    return takePassByRef(p); // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/calculator_mode/TestCalculatorMode.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/calculator_mode/TestCalculatorMode.py
deleted file mode 100644 (file)
index 9cd3c81..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-"""
-Test calling an expression without a target.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestCalculatorMode(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test__calculator_mode(self):
-        """Test calling expressions in the dummy target."""
-        self.expect("expression 11 + 22", "11 + 22 didn't get the expected result", substrs=["33"])
-        # Now try it with a specific language:
-        self.expect("expression -l c -- 11 + 22", "11 + 22 didn't get the expected result", substrs=["33"])
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/Makefile
deleted file mode 100644 (file)
index 31f2d5e..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
-
-clean::
-       rm -rf $(wildcard *.o *.d *.dSYM)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/TestCallBuiltinFunction.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/TestCallBuiltinFunction.py
deleted file mode 100644 (file)
index 4462799..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-"""
-Tests calling builtin functions using expression evaluation.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ExprCommandCallBuiltinFunction(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # Builtins are expanded by Clang, so debug info shouldn't matter.
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        TestBase.setUp(self)
-        # Find the line number to break for main.c.
-        self.line = line_number(
-            'main.cpp',
-            '// Please test these expressions while stopped at this line:')
-
-    def test(self):
-        self.build()
-
-        # Set breakpoint in main and run exe
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        interp = self.dbg.GetCommandInterpreter()
-        result = lldb.SBCommandReturnObject()
-
-        # Test different builtin functions.
-
-        self.expect_expr("__builtin_isinf(0.0f)", result_type="int", result_value="0")
-        self.expect_expr("__builtin_isnormal(0.0f)", result_type="int", result_value="0")
-        self.expect_expr("__builtin_constant_p(1)", result_type="int", result_value="1")
-        self.expect_expr("__builtin_abs(-14)", result_type="int", result_value="14")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/TestCallStdStringFunction.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/TestCallStdStringFunction.py
deleted file mode 100644 (file)
index 261e702..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-"""
-Test calling std::String member functions.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ExprCommandCallFunctionTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break for main.c.
-        self.line = line_number(
-            'main.cpp',
-            '// Please test these expressions while stopped at this line:')
-
-    @expectedFailureAll(
-        compiler="icc",
-        bugnumber="llvm.org/pr14437, fails with ICC 13.1")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
-    def test_with(self):
-        """Test calling std::String member function."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"),
-                    CURRENT_EXECUTABLE_SET)
-
-        # Some versions of GCC encode two locations for the 'return' statement
-        # in main.cpp
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.expect("print str",
-                    substrs=['Hello world'])
-
-        # Calling this function now succeeds, but we follow the typedef return type through to
-        # const char *, and thus don't invoke the Summary formatter.
-
-        # clang's libstdc++ on ios arm64 inlines std::string::c_str() always;
-        # skip this part of the test.
-        triple = self.dbg.GetSelectedPlatform().GetTriple()
-        do_cstr_test = True
-        if triple in ["arm64-apple-ios", "arm64e-apple-ios", "arm64-apple-tvos", "armv7k-apple-watchos", "arm64-apple-bridgeos", "arm64_32-apple-watchos"]:
-            do_cstr_test = False
-        if do_cstr_test:
-            self.expect("print str.c_str()",
-                        substrs=['Hello world'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/TestCallStopAndContinue.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/TestCallStopAndContinue.py
deleted file mode 100644 (file)
index 0f0f1a5..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-"""
-Test calling a function, stopping in the call, continue and gather the result on stop.
-"""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ExprCommandCallStopContinueTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break for main.c.
-        self.line = line_number(
-            'main.cpp',
-            '// Please test these expressions while stopped at this line:')
-        self.func_line = line_number('main.cpp', '{5, "five"}')
-
-    def test(self):
-        """Test gathering result from interrupted function call."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        # Some versions of GCC encode two locations for the 'return' statement
-        # in main.cpp
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            "main.cpp",
-            self.func_line,
-            num_expected_locations=-1,
-            loc_exact=True)
-
-        self.expect("expr -i false -- returnsFive()", error=True,
-                    substrs=['Execution was interrupted, reason: breakpoint'])
-
-        self.runCmd("continue", "Continue completed")
-        self.expect(
-            "thread list",
-            substrs=[
-                'stop reason = User Expression thread plan',
-                r'Completed expression: (Five) $0 = (number = 5, name = "five")'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/TestCallUserDefinedFunction.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/TestCallUserDefinedFunction.py
deleted file mode 100644 (file)
index 8ced082..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-"""
-Test calling user defined functions using expression evaluation.
-
-Note:
-  LLDBs current first choice of evaluating functions is using the IR interpreter,
-  which is only supported on Hexagon. Otherwise JIT is used for the evaluation.
-
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ExprCommandCallUserDefinedFunction(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break for main.c.
-        self.line = line_number(
-            'main.cpp',
-            '// Please test these expressions while stopped at this line:')
-
-    def test(self):
-        """Test return values of user defined function calls."""
-        self.build()
-
-        # Set breakpoint in main and run exe
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # Test recursive function call.
-        self.expect("expr fib(5)", substrs=['$0 = 5'])
-
-        # Test function with more than one paramter
-        self.expect("expr add(4,8)", substrs=['$1 = 12'])
-
-        # Test nesting function calls in function paramters
-        self.expect("expr add(add(5,2),add(3,4))", substrs=['$2 = 14'])
-        self.expect("expr add(add(5,2),fib(5))", substrs=['$3 = 12'])
-
-        # Test function with pointer paramter
-        self.expect(
-            "exp stringCompare((const char*) \"Hello world\")",
-            substrs=['$4 = true'])
-        self.expect(
-            "exp stringCompare((const char*) \"Hellworld\")",
-            substrs=['$5 = false'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/main.cpp
deleted file mode 100644 (file)
index cc5f52d..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-#include <iostream>
-#include <string>
-#include <cstring>
-
-struct Five
-{
-    int number;
-    const char *name;
-};
-
-Five
-returnsFive()
-{
-    Five my_five = {5, "five"};
-    return my_five;
-}
-
-unsigned int
-fib(unsigned int n)
-{
-    if (n < 2)
-        return n;
-    else
-        return fib(n - 1) + fib(n - 2);
-}
-
-int
-add(int a, int b)
-{
-    return a + b;
-}
-
-bool
-stringCompare(const char *str)
-{
-    if (strcmp( str, "Hello world" ) == 0)
-        return true;
-    else
-        return false;
-}
-
-int main (int argc, char const *argv[])
-{
-    std::string str = "Hello world";
-    std::cout << str << std::endl;
-    std::cout << str.c_str() << std::endl;
-    Five main_five = returnsFive();
-#if 0
-    print str
-    print str.c_str()
-#endif
-    return 0; // Please test these expressions while stopped at this line:
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-overridden-method/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-overridden-method/Makefile
deleted file mode 100644 (file)
index 31f2d5e..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
-
-clean::
-       rm -rf $(wildcard *.o *.d *.dSYM)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-overridden-method/TestCallOverriddenMethod.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-overridden-method/TestCallOverriddenMethod.py
deleted file mode 100644 (file)
index 57987c8..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-"""
-Test calling an overriden method.
-
-Note:
-  This verifies that LLDB is correctly building the method overrides table.
-  If this table is not built correctly then calls to overridden methods in
-  derived classes may generate references to non-existant vtable entries,
-  as the compiler treats the overridden method as a totally new virtual
-  method definition.
-  <rdar://problem/14205774>
-
-"""
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class ExprCommandCallOverriddenMethod(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break for main.c.
-        self.line = line_number('main.cpp', '// Set breakpoint here')
-
-    def test_call_on_base(self):
-        """Test calls to overridden methods in derived classes."""
-        self.build()
-
-        # Set breakpoint in main and run exe
-        self.runCmd("file " + self.getBuildArtifact("a.out"),
-                    CURRENT_EXECUTABLE_SET)
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # Test call to method in base class (this should always work as the base
-        # class method is never an override).
-        self.expect("expr b->foo()", substrs=["= 2"])
-
-        # Test calling the base class.
-        self.expect("expr realbase.foo()", substrs=["= 1"])
-
-    @skipIfLinux # Returns wrong result code on some platforms.
-    def test_call_on_derived(self):
-        """Test calls to overridden methods in derived classes."""
-        self.build()
-
-        # Set breakpoint in main and run exe
-        self.runCmd("file " + self.getBuildArtifact("a.out"),
-                    CURRENT_EXECUTABLE_SET)
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # Test call to overridden method in derived class (this will fail if the
-        # overrides table is not correctly set up, as Derived::foo will be assigned
-        # a vtable entry that does not exist in the compiled program).
-        self.expect("expr d.foo()", substrs=["= 2"])
-
-    @skipIf(oslist=["linux"], archs=["aarch64"])
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr43707")
-    def test_call_on_temporary(self):
-        """Test calls to overridden methods in derived classes."""
-        self.build()
-
-        # Set breakpoint in main and run exe
-        self.runCmd("file " + self.getBuildArtifact("a.out"),
-                    CURRENT_EXECUTABLE_SET)
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # Test with locally constructed instances.
-        self.expect("expr Base().foo()", substrs=["= 1"])
-        self.expect("expr Derived().foo()", substrs=["= 2"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-overridden-method/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-overridden-method/main.cpp
deleted file mode 100644 (file)
index 87997fa..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-class Base {
-public:
-  virtual ~Base() {}
-  virtual int foo() { return 1; }
-};
-
-class Derived : public Base {
-public:
-  virtual int foo() { return 2; }
-};
-
-int main() {
-  Base realbase;
-  realbase.foo();
-  Derived d;
-  Base *b = &d;
-  return 0; // Set breakpoint here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-restarts/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-restarts/Makefile
deleted file mode 100644 (file)
index fa5901e..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := lotta-signals.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-restarts/TestCallThatRestarts.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-restarts/TestCallThatRestarts.py
deleted file mode 100644 (file)
index a61e69a..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-"""
-Test calling a function that hits a signal set to auto-restart, make sure the call completes.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ExprCommandThatRestartsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-        self.main_source = "lotta-signals.c"
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-
-    @skipIfFreeBSD  # llvm.org/pr19246: intermittent failure
-    @skipIfDarwin  # llvm.org/pr19246: intermittent failure
-    @skipIfWindows  # Test relies on signals, unsupported on Windows
-    @expectedFlakeyAndroid(bugnumber="llvm.org/pr19246")
-    @expectedFailureNetBSD
-    def test(self):
-        """Test calling function that hits a signal and restarts."""
-        self.build()
-        self.call_function()
-
-    def check_after_call(self, num_sigchld):
-        after_call = self.sigchld_no.GetValueAsSigned(-1)
-        self.assertTrue(
-            after_call -
-            self.start_sigchld_no == num_sigchld,
-            "Really got %d SIGCHLD signals through the call." %
-            (num_sigchld))
-        self.start_sigchld_no = after_call
-
-        # Check that we are back where we were before:
-        frame = self.thread.GetFrameAtIndex(0)
-        self.assertTrue(
-            self.orig_frame_pc == frame.GetPC(),
-            "Restored the zeroth frame correctly")
-
-    def call_function(self):
-        (target, process, self.thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                      'Stop here in main.', self.main_source_spec)
-
-        # Make sure the SIGCHLD behavior is pass/no-stop/no-notify:
-        return_obj = lldb.SBCommandReturnObject()
-        self.dbg.GetCommandInterpreter().HandleCommand(
-            "process handle SIGCHLD -s 0 -p 1 -n 0", return_obj)
-        self.assertTrue(return_obj.Succeeded(), "Set SIGCHLD to pass, no-stop")
-
-        # The sigchld_no variable should be 0 at this point.
-        self.sigchld_no = target.FindFirstGlobalVariable("sigchld_no")
-        self.assertTrue(
-            self.sigchld_no.IsValid(),
-            "Got a value for sigchld_no")
-
-        self.start_sigchld_no = self.sigchld_no.GetValueAsSigned(-1)
-        self.assertTrue(
-            self.start_sigchld_no != -1,
-            "Got an actual value for sigchld_no")
-
-        options = lldb.SBExpressionOptions()
-        # processing 30 signals takes a while, increase the expression timeout
-        # a bit
-        options.SetTimeoutInMicroSeconds(3000000)  # 3s
-        options.SetUnwindOnError(True)
-
-        frame = self.thread.GetFrameAtIndex(0)
-        # Store away the PC to check that the functions unwind to the right
-        # place after calls
-        self.orig_frame_pc = frame.GetPC()
-
-        num_sigchld = 30
-        value = frame.EvaluateExpression(
-            "call_me (%d)" %
-            (num_sigchld), options)
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertTrue(value.GetValueAsSigned(-1) == num_sigchld)
-
-        self.check_after_call(num_sigchld)
-
-        # Okay, now try with a breakpoint in the called code in the case where
-        # we are ignoring breakpoint hits.
-        handler_bkpt = target.BreakpointCreateBySourceRegex(
-            "Got sigchld %d.", self.main_source_spec)
-        self.assertTrue(handler_bkpt.GetNumLocations() > 0)
-        options.SetIgnoreBreakpoints(True)
-        options.SetUnwindOnError(True)
-
-        value = frame.EvaluateExpression(
-            "call_me (%d)" %
-            (num_sigchld), options)
-
-        self.assertTrue(value.IsValid() and value.GetError().Success())
-        self.assertTrue(value.GetValueAsSigned(-1) == num_sigchld)
-        self.check_after_call(num_sigchld)
-
-        # Now set the signal to print but not stop and make sure that calling
-        # still works:
-        self.dbg.GetCommandInterpreter().HandleCommand(
-            "process handle SIGCHLD -s 0 -p 1 -n 1", return_obj)
-        self.assertTrue(
-            return_obj.Succeeded(),
-            "Set SIGCHLD to pass, no-stop, notify")
-
-        value = frame.EvaluateExpression(
-            "call_me (%d)" %
-            (num_sigchld), options)
-
-        self.assertTrue(value.IsValid() and value.GetError().Success())
-        self.assertTrue(value.GetValueAsSigned(-1) == num_sigchld)
-        self.check_after_call(num_sigchld)
-
-        # Now set this unwind on error to false, and make sure that we still
-        # complete the call:
-        options.SetUnwindOnError(False)
-        value = frame.EvaluateExpression(
-            "call_me (%d)" %
-            (num_sigchld), options)
-
-        self.assertTrue(value.IsValid() and value.GetError().Success())
-        self.assertTrue(value.GetValueAsSigned(-1) == num_sigchld)
-        self.check_after_call(num_sigchld)
-
-        # Okay, now set UnwindOnError to true, and then make the signal behavior to stop
-        # and see that now we do stop at the signal point:
-
-        self.dbg.GetCommandInterpreter().HandleCommand(
-            "process handle SIGCHLD -s 1 -p 1 -n 1", return_obj)
-        self.assertTrue(
-            return_obj.Succeeded(),
-            "Set SIGCHLD to pass, stop, notify")
-
-        value = frame.EvaluateExpression(
-            "call_me (%d)" %
-            (num_sigchld), options)
-        self.assertTrue(
-            value.IsValid() and value.GetError().Success() == False)
-
-        # Set signal handling back to no-stop, and continue and we should end
-        # up back in out starting frame:
-        self.dbg.GetCommandInterpreter().HandleCommand(
-            "process handle SIGCHLD -s 0 -p 1 -n 1", return_obj)
-        self.assertTrue(
-            return_obj.Succeeded(),
-            "Set SIGCHLD to pass, no-stop, notify")
-
-        error = process.Continue()
-        self.assertTrue(
-            error.Success(),
-            "Continuing after stopping for signal succeeds.")
-
-        frame = self.thread.GetFrameAtIndex(0)
-        self.assertTrue(
-            frame.GetPC() == self.orig_frame_pc,
-            "Continuing returned to the place we started.")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-restarts/lotta-signals.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-restarts/lotta-signals.c
deleted file mode 100644 (file)
index f5c15b4..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-#include <unistd.h>
-#include <stdio.h>
-#include <signal.h>
-
-static int sigchld_no;
-static int nosig_no;
-static int weird_value;
-
-void
-sigchld_handler (int signo)
-{
-  sigchld_no++;
-  printf ("Got sigchld %d.\n", sigchld_no);
-}
-
-int
-call_me (int some_value)
-{
-  int ret_val = 0;
-  int i;
-  for (i = 0; i < some_value; i++)
-    {
-      int result = 0;
-      if (i%2 == 0)
-          result = kill (getpid(), SIGCHLD);
-      else
-        sigchld_no++;
-
-      usleep(1000);
-      if (result == 0)
-        ret_val++;
-    }
-  usleep (10000);
-  return ret_val;
-}
-
-int
-call_me_nosig (int some_value)
-{
-  int ret_val = 0;
-  int i;
-  for (i = 0; i < some_value; i++)
-    weird_value += i % 4;
-
-  nosig_no += some_value;
-  return some_value;
-}
-
-int 
-main ()
-{
-  int ret_val;
-  signal (SIGCHLD, sigchld_handler);
-  
-  ret_val = call_me (2);  // Stop here in main.
-
-  ret_val = call_me_nosig (10);
-
-  return 0;
-
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-throws/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-throws/Makefile
deleted file mode 100644 (file)
index becb2f0..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-OBJC_SOURCES := call-throws.m
-LD_EXTRAS := -framework Foundation
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-throws/TestCallThatThrows.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-throws/TestCallThatThrows.py
deleted file mode 100644 (file)
index fea56f1..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-"""
-Test calling a function that throws an ObjC exception, make sure that it doesn't propagate the exception.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ExprCommandWithThrowTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-        self.main_source = "call-throws.m"
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-
-    @skipUnlessDarwin
-    def test(self):
-        """Test calling a function that throws and ObjC exception."""
-        self.build()
-        self.call_function()
-
-    def check_after_call(self):
-        # Check that we are back where we were before:
-        frame = self.thread.GetFrameAtIndex(0)
-        self.assertTrue(
-            self.orig_frame_pc == frame.GetPC(),
-            "Restored the zeroth frame correctly")
-
-    def call_function(self):
-        """Test calling function that throws."""
-        (target, process, self.thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                   'I am about to throw.', self.main_source_spec)
-
-        options = lldb.SBExpressionOptions()
-        options.SetUnwindOnError(True)
-
-        frame = self.thread.GetFrameAtIndex(0)
-        # Store away the PC to check that the functions unwind to the right
-        # place after calls
-        self.orig_frame_pc = frame.GetPC()
-
-        value = frame.EvaluateExpression("[my_class callMeIThrow]", options)
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success() == False)
-
-        self.check_after_call()
-
-        # Okay, now try with a breakpoint in the called code in the case where
-        # we are ignoring breakpoint hits.
-        handler_bkpt = target.BreakpointCreateBySourceRegex(
-            "I felt like it", self.main_source_spec)
-        self.assertTrue(handler_bkpt.GetNumLocations() > 0)
-        options.SetIgnoreBreakpoints(True)
-        options.SetUnwindOnError(True)
-
-        value = frame.EvaluateExpression("[my_class callMeIThrow]", options)
-
-        self.assertTrue(
-            value.IsValid() and value.GetError().Success() == False)
-        self.check_after_call()
-
-        # Now set the ObjC language breakpoint and make sure that doesn't
-        # interfere with the call:
-        exception_bkpt = target.BreakpointCreateForException(
-            lldb.eLanguageTypeObjC, False, True)
-        self.assertTrue(exception_bkpt.GetNumLocations() > 0)
-
-        options.SetIgnoreBreakpoints(True)
-        options.SetUnwindOnError(True)
-
-        value = frame.EvaluateExpression("[my_class callMeIThrow]", options)
-
-        self.assertTrue(
-            value.IsValid() and value.GetError().Success() == False)
-        self.check_after_call()
-
-        # Now turn off exception trapping, and call a function that catches the exceptions,
-        # and make sure the function actually completes, and we get the right
-        # value:
-        options.SetTrapExceptions(False)
-        value = frame.EvaluateExpression("[my_class iCatchMyself]", options)
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertTrue(value.GetValueAsUnsigned() == 57)
-        self.check_after_call()
-        options.SetTrapExceptions(True)
-
-        # Now set this unwind on error to false, and make sure that we stop
-        # where the exception was thrown
-        options.SetUnwindOnError(False)
-        value = frame.EvaluateExpression("[my_class callMeIThrow]", options)
-
-        self.assertTrue(
-            value.IsValid() and value.GetError().Success() == False)
-        self.check_after_call()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-throws/call-throws.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/call-throws/call-throws.m
deleted file mode 100644 (file)
index a184718..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@interface MyClass : NSObject
-{
-}
-- (int) callMeIThrow;
-- (int) iCatchMyself;
-@end
-
-@implementation MyClass
-- (int) callMeIThrow
-{
-    NSException *e = [NSException
-                       exceptionWithName:@"JustForTheHeckOfItException"
-                       reason:@"I felt like it"
-                       userInfo:nil];
-    @throw e;
-    return 56;
-}
-
-- (int) iCatchMyself
-{
-  int return_value = 55;
-  @try
-    {
-      return_value = [self callMeIThrow];
-    }
-  @catch (NSException *e)
-    {
-      return_value = 57;
-    }
-  return return_value;
-}
-@end
-
-int
-main ()
-{
-  int return_value;
-  MyClass *my_class = [[MyClass alloc] init];
-
-  NSLog (@"I am about to throw.");
-
-  return_value = [my_class iCatchMyself];
-
-  return return_value;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/cast_int_to_anonymous_enum/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/cast_int_to_anonymous_enum/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/cast_int_to_anonymous_enum/TestCastIntToAnonymousEnum.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/cast_int_to_anonymous_enum/TestCastIntToAnonymousEnum.py
deleted file mode 100644 (file)
index b8eaf51..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-"""
-Test Expression Parser regression text to ensure that we handle anonymous
-enums importing correctly.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestCastIntToAnonymousEnum(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_cast_int_to_anonymous_enum(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self, '// break here',
-                lldb.SBFileSpec("main.cpp", False))
-
-        self.expect("expr (flow_e)0", substrs=['(flow_e) $0 = A'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/cast_int_to_anonymous_enum/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/cast_int_to_anonymous_enum/main.cpp
deleted file mode 100644 (file)
index 7ae4c17..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-enum flow_e {
-    A=0,
-};
-
-int main() {
-   flow_e f;
-
-   return 0; // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/char/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/char/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/char/TestExprsChar.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/char/TestExprsChar.py
deleted file mode 100644 (file)
index f1fa780..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ExprCharTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-        self.main_source = "main.cpp"
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-
-    def do_test(self, dictionary=None):
-        """These basic expression commands should work as expected."""
-        self.build(dictionary=dictionary)
-
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                          '// Break here', self.main_source_spec)
-        frame = thread.GetFrameAtIndex(0)
-
-        value = frame.EvaluateExpression("foo(c)")
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertEqual(value.GetValueAsSigned(0), 1)
-
-        value = frame.EvaluateExpression("foo(sc)")
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertEqual(value.GetValueAsSigned(0), 2)
-
-        value = frame.EvaluateExpression("foo(uc)")
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertEqual(value.GetValueAsSigned(0), 3)
-
-    def test_default_char(self):
-        self.do_test()
-
-    @expectedFailureAll(
-        archs=[
-            "arm",
-            "aarch64",
-            "powerpc64le",
-            "s390x"],
-        bugnumber="llvm.org/pr23069")
-    def test_signed_char(self):
-        self.do_test(dictionary={'CFLAGS_EXTRAS': '-fsigned-char'})
-
-    @expectedFailureAll(
-        archs=[
-            "i[3-6]86",
-            "x86_64",
-            "arm64",
-            'arm64e',
-            'armv7',
-            'armv7k',
-            'arm64_32'],
-        bugnumber="llvm.org/pr23069, <rdar://problem/28721938>")
-    @expectedFailureAll(triple='mips*', bugnumber="llvm.org/pr23069")
-    def test_unsigned_char(self):
-        self.do_test(dictionary={'CFLAGS_EXTRAS': '-funsigned-char'})
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/char/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/char/main.cpp
deleted file mode 100644 (file)
index c8b0beb..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-int foo(char c) { return 1; }
-int foo(signed char c) { return 2; }
-int foo(unsigned char c) { return 3; }
-
-int main() {
-  char c = 0;
-  signed char sc = 0;
-  unsigned char uc = 0;
-  return 0; // Break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/class_template_specialization_empty_pack/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/class_template_specialization_empty_pack/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/class_template_specialization_empty_pack/TestClassTemplateSpecializationParametersHandling.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/class_template_specialization_empty_pack/TestClassTemplateSpecializationParametersHandling.py
deleted file mode 100644 (file)
index d1974d0..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-"""
-Test Expression Parser code gen for ClassTemplateSpecializationDecl to insure
-that we generate a TemplateTypeParmDecl in the TemplateParameterList for empty
-variadic packs.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestClassTemplateSpecializationParametersHandling(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_class_template_specialization(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self, '// break here',
-                lldb.SBFileSpec("main.cpp", False))
-
-        self.expect("expr -u 0 -- b.foo()", substrs=['$0 = 1'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/class_template_specialization_empty_pack/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/class_template_specialization_empty_pack/main.cpp
deleted file mode 100644 (file)
index bc83160..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-template <typename N, class... P>
-struct A {
-    int foo() { return 1;}
-};
-
-int main() {
-  A<int> b;
-  return b.foo(); // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/codegen-crash-typedefdecl-not-in_declcontext/TestCodegenCrashTypedefDeclNotInDeclContext.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/codegen-crash-typedefdecl-not-in_declcontext/TestCodegenCrashTypedefDeclNotInDeclContext.py
deleted file mode 100644 (file)
index f08c0dc..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__, globals(), [])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/codegen-crash-typedefdecl-not-in_declcontext/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/codegen-crash-typedefdecl-not-in_declcontext/main.cpp
deleted file mode 100644 (file)
index e4f6600..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-// This is a reproducer for a crash in codegen. It happens when we have a
-// RecordDecl used in an expression and one of the FieldDecl are not complete.
-// This case happens when:
-// - A RecordDecl (E) has a FieldDecl which is a reference member variable
-// - The underlying type of the FieldDec is a TypedefDecl
-// - The typedef refers to a ClassTemplateSpecialization (DWrapper)
-// - The typedef is not present in the DeclContext of B
-// - The typedef shows up as a return value of a member function of E (f())
-template <typename T> struct DWrapper {};
-
-struct D {};
-
-namespace NS {
-typedef DWrapper<D> DW;
-}
-
-struct B {
-  NS::DW spd;
-  int a = 0;
-};
-
-struct E {
-  E(B &b) : b_ref(b) {}
-  NS::DW f() { return {}; };
-  void g() {
-    return; //%self.expect("p b_ref", substrs=['(B) $0 =', '(spd = NS::DW', 'a = 0)'])
-  }
-
-  B &b_ref;
-};
-
-int main() {
-  B b;
-  E e(b);
-
-  e.g();
-
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion-crash-incomplete-record/TestCompletionCrashIncompleteRecord.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion-crash-incomplete-record/TestCompletionCrashIncompleteRecord.py
deleted file mode 100644 (file)
index f08c0dc..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__, globals(), [])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion-crash-incomplete-record/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion-crash-incomplete-record/main.cpp
deleted file mode 100644 (file)
index f7ca83c..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-int i;
-struct F {
-  int &r;
-  F() : r(i) {}
-};
-template <class T> struct unique_ptr {
-  F i;
-  unique_ptr() : i() {//%self.dbg.GetCommandInterpreter().HandleCompletion("e ", len("e "), 0, -1, lldb.SBStringList())
-}
-};
-int main() {unique_ptr<F> u; }
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion-crash1/TestCompletionCrash1.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion-crash1/TestCompletionCrash1.py
deleted file mode 100644 (file)
index 3f2a610..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__, globals(), [decorators.skipIf(bugnumber="rdar://53659341")])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion-crash1/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion-crash1/main.cpp
deleted file mode 100644 (file)
index 7b123c0..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-namespace std {
-struct a {
-  a() {}
-  a(a &&);
-};
-template <class> struct au {
-  a ay;
-  ~au() { //%self.dbg.GetCommandInterpreter().HandleCompletion("e ", len("e "), 0, -1, lldb.SBStringList())
-  }
-};
-}
-int main() { std::au<int>{}; }
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion-in-lambda-and-unnamed-class/TestCompletionInLambdaAndUnnamedClass.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion-in-lambda-and-unnamed-class/TestCompletionInLambdaAndUnnamedClass.py
deleted file mode 100644 (file)
index 57fb94b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__, globals(),)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion-in-lambda-and-unnamed-class/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion-in-lambda-and-unnamed-class/main.cpp
deleted file mode 100644 (file)
index a3d8ab6..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-int main() {
-  []()
-  { //%self.dbg.GetCommandInterpreter().HandleCompletion("e ", len("e "), 0, -1, lldb.SBStringList())
-  }
-  ();
-  struct {
-      void f()
-      { //%self.dbg.GetCommandInterpreter().HandleCompletion("e ", len("e "), 0, -1, lldb.SBStringList())
-      }
-  } A;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion/.categories b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion/.categories
deleted file mode 100644 (file)
index 3a3f4df..0000000
+++ /dev/null
@@ -1 +0,0 @@
-cmdline
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion/Makefile
deleted file mode 100644 (file)
index 020dce7..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp other.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion/TestExprCompletion.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion/TestExprCompletion.py
deleted file mode 100644 (file)
index 5266266..0000000
+++ /dev/null
@@ -1,254 +0,0 @@
-"""
-Test the lldb command line completion mechanism for the 'expr' command.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbplatform
-from lldbsuite.test import lldbutil
-
-class CommandLineExprCompletionTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_expr_completion(self):
-        self.build()
-        self.main_source = "main.cpp"
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-        self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
-
-        # Try the completion before we have a context to complete on.
-        self.assume_no_completions('expr some_expr')
-        self.assume_no_completions('expr ')
-        self.assume_no_completions('expr f')
-
-
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                          '// Break here', self.main_source_spec)
-
-        # Completing member functions
-        self.complete_exactly('expr some_expr.FooNoArgs',
-                              'expr some_expr.FooNoArgsBar()')
-        self.complete_exactly('expr some_expr.FooWithArgs',
-                              'expr some_expr.FooWithArgsBar(')
-        self.complete_exactly('expr some_expr.FooWithMultipleArgs',
-                              'expr some_expr.FooWithMultipleArgsBar(')
-        self.complete_exactly('expr some_expr.FooUnderscore',
-                              'expr some_expr.FooUnderscoreBar_()')
-        self.complete_exactly('expr some_expr.FooNumbers',
-                              'expr some_expr.FooNumbersBar1()')
-        self.complete_exactly('expr some_expr.StaticMemberMethod',
-                              'expr some_expr.StaticMemberMethodBar()')
-
-        # Completing static functions
-        self.complete_exactly('expr Expr::StaticMemberMethod',
-                              'expr Expr::StaticMemberMethodBar()')
-
-        # Completing member variables
-        self.complete_exactly('expr some_expr.MemberVariab',
-                              'expr some_expr.MemberVariableBar')
-
-        # Multiple completions
-        self.completions_contain('expr some_expr.',
-                                 ['some_expr.FooNumbersBar1()',
-                                  'some_expr.FooUnderscoreBar_()',
-                                  'some_expr.FooWithArgsBar(',
-                                  'some_expr.MemberVariableBar'])
-
-        self.completions_contain('expr some_expr.Foo',
-                                 ['some_expr.FooNumbersBar1()',
-                                  'some_expr.FooUnderscoreBar_()',
-                                  'some_expr.FooWithArgsBar('])
-
-        self.completions_contain('expr ',
-                                 ['static_cast',
-                                  'reinterpret_cast',
-                                  'dynamic_cast'])
-
-        self.completions_contain('expr 1 + ',
-                                 ['static_cast',
-                                  'reinterpret_cast',
-                                  'dynamic_cast'])
-
-        # Completion expr without spaces
-        # This is a bit awkward looking for the user, but that's how
-        # the completion API works at the moment.
-        self.completions_contain('expr 1+',
-                                 ['1+some_expr', "1+static_cast"])
-
-        # Test with spaces
-        self.complete_exactly('expr   some_expr .FooNoArgs',
-                              'expr   some_expr .FooNoArgsBar()')
-        self.complete_exactly('expr  some_expr .FooNoArgs',
-                              'expr  some_expr .FooNoArgsBar()')
-        self.complete_exactly('expr some_expr .FooNoArgs',
-                              'expr some_expr .FooNoArgsBar()')
-        self.complete_exactly('expr some_expr. FooNoArgs',
-                              'expr some_expr. FooNoArgsBar()')
-        self.complete_exactly('expr some_expr . FooNoArgs',
-                              'expr some_expr . FooNoArgsBar()')
-        self.complete_exactly('expr Expr :: StaticMemberMethod',
-                              'expr Expr :: StaticMemberMethodBar()')
-        self.complete_exactly('expr Expr ::StaticMemberMethod',
-                              'expr Expr ::StaticMemberMethodBar()')
-        self.complete_exactly('expr Expr:: StaticMemberMethod',
-                              'expr Expr:: StaticMemberMethodBar()')
-
-        # Test that string literals don't break our parsing logic.
-        self.complete_exactly('expr const char *cstr = "some_e"; char c = *cst',
-                              'expr const char *cstr = "some_e"; char c = *cstr')
-        self.complete_exactly('expr const char *cstr = "some_e" ; char c = *cst',
-                              'expr const char *cstr = "some_e" ; char c = *cstr')
-        # Requesting completions inside an incomplete string doesn't provide any
-        # completions.
-        self.complete_exactly('expr const char *cstr = "some_e',
-                              'expr const char *cstr = "some_e')
-
-        # Completing inside double dash should do nothing
-        self.assume_no_completions('expr -i0 -- some_expr.', 10)
-        self.assume_no_completions('expr -i0 -- some_expr.', 11)
-
-        # Test with expr arguments
-        self.complete_exactly('expr -i0 -- some_expr .FooNoArgs',
-                              'expr -i0 -- some_expr .FooNoArgsBar()')
-        self.complete_exactly('expr  -i0 -- some_expr .FooNoArgs',
-                              'expr  -i0 -- some_expr .FooNoArgsBar()')
-
-        # Addrof and deref
-        self.complete_exactly('expr (*(&some_expr)).FooNoArgs',
-                              'expr (*(&some_expr)).FooNoArgsBar()')
-        self.complete_exactly('expr (*(&some_expr)) .FooNoArgs',
-                              'expr (*(&some_expr)) .FooNoArgsBar()')
-        self.complete_exactly('expr (* (&some_expr)) .FooNoArgs',
-                              'expr (* (&some_expr)) .FooNoArgsBar()')
-        self.complete_exactly('expr (* (& some_expr)) .FooNoArgs',
-                              'expr (* (& some_expr)) .FooNoArgsBar()')
-
-        # Addrof and deref (part 2)
-        self.complete_exactly('expr (&some_expr)->FooNoArgs',
-                              'expr (&some_expr)->FooNoArgsBar()')
-        self.complete_exactly('expr (&some_expr) ->FooNoArgs',
-                              'expr (&some_expr) ->FooNoArgsBar()')
-        self.complete_exactly('expr (&some_expr) -> FooNoArgs',
-                              'expr (&some_expr) -> FooNoArgsBar()')
-        self.complete_exactly('expr (&some_expr)-> FooNoArgs',
-                              'expr (&some_expr)-> FooNoArgsBar()')
-
-        # Builtin arg
-        self.complete_exactly('expr static_ca',
-                              'expr static_cast')
-
-        # From other files
-        self.complete_exactly('expr fwd_decl_ptr->Hidden',
-                              'expr fwd_decl_ptr->HiddenMember')
-
-
-        # Types
-        self.complete_exactly('expr LongClassNa',
-                              'expr LongClassName')
-        self.complete_exactly('expr LongNamespaceName::NestedCla',
-                              'expr LongNamespaceName::NestedClass')
-
-        # Namespaces
-        self.complete_exactly('expr LongNamespaceNa',
-                              'expr LongNamespaceName::')
-
-        # Multiple arguments
-        self.complete_exactly('expr &some_expr + &some_e',
-                              'expr &some_expr + &some_expr')
-        self.complete_exactly('expr SomeLongVarNameWithCapitals + SomeLongVarName',
-                              'expr SomeLongVarNameWithCapitals + SomeLongVarNameWithCapitals')
-        self.complete_exactly('expr SomeIntVar + SomeIntV',
-                              'expr SomeIntVar + SomeIntVar')
-
-        # Multiple statements
-        self.complete_exactly('expr long LocalVariable = 0; LocalVaria',
-                              'expr long LocalVariable = 0; LocalVariable')
-
-        # Custom Decls
-        self.complete_exactly('expr auto l = [](int LeftHandSide, int bx){ return LeftHandS',
-                              'expr auto l = [](int LeftHandSide, int bx){ return LeftHandSide')
-        self.complete_exactly('expr struct LocalStruct { long MemberName; } ; LocalStruct S; S.Mem',
-                              'expr struct LocalStruct { long MemberName; } ; LocalStruct S; S.MemberName')
-
-        # Completing function call arguments
-        self.complete_exactly('expr some_expr.FooWithArgsBar(some_exp',
-                              'expr some_expr.FooWithArgsBar(some_expr')
-        self.complete_exactly('expr some_expr.FooWithArgsBar(SomeIntV',
-                              'expr some_expr.FooWithArgsBar(SomeIntVar')
-        self.complete_exactly('expr some_expr.FooWithMultipleArgsBar(SomeIntVar, SomeIntVa',
-                              'expr some_expr.FooWithMultipleArgsBar(SomeIntVar, SomeIntVar')
-
-        # Function return values
-        self.complete_exactly('expr some_expr.Self().FooNoArgs',
-                              'expr some_expr.Self().FooNoArgsBar()')
-        self.complete_exactly('expr some_expr.Self() .FooNoArgs',
-                              'expr some_expr.Self() .FooNoArgsBar()')
-        self.complete_exactly('expr some_expr.Self(). FooNoArgs',
-                              'expr some_expr.Self(). FooNoArgsBar()')
-
-    def test_expr_completion_with_descriptions(self):
-        self.build()
-        self.main_source = "main.cpp"
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-        self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
-
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                          '// Break here', self.main_source_spec)
-
-        self.check_completion_with_desc("expr ", [
-            # VarDecls have their type as description.
-            ["some_expr", "Expr &"],
-            # builtin types have no description.
-            ["int", ""],
-            ["float", ""]
-        ])
-        self.check_completion_with_desc("expr some_expr.", [
-            # Functions have their signature as description.
-            ["some_expr.Self()", "Expr &Self()"],
-            ["some_expr.operator=(", "inline Expr &operator=(const Expr &)"],
-            ["some_expr.FooNumbersBar1()", "int FooNumbersBar1()"],
-            ["some_expr.StaticMemberMethodBar()", "static int StaticMemberMethodBar()"],
-            ["some_expr.FooWithArgsBar(", "int FooWithArgsBar(int)"],
-            ["some_expr.FooNoArgsBar()", "int FooNoArgsBar()"],
-            ["some_expr.FooUnderscoreBar_()", "int FooUnderscoreBar_()"],
-            ["some_expr.FooWithMultipleArgsBar(", "int FooWithMultipleArgsBar(int, int)"],
-            ["some_expr.~Expr()", "inline ~Expr()"],
-            # FieldDecls have their type as description.
-            ["some_expr.MemberVariableBar", "int"],
-        ])
-
-    def assume_no_completions(self, str_input, cursor_pos = None):
-        interp = self.dbg.GetCommandInterpreter()
-        match_strings = lldb.SBStringList()
-        if cursor_pos is None:
-          cursor_pos = len(str_input)
-        num_matches = interp.HandleCompletion(str_input, cursor_pos, 0, -1, match_strings)
-
-        available_completions = []
-        for m in match_strings:
-            available_completions.append(m)
-
-        self.assertEquals(num_matches, 0, "Got matches, but didn't expect any: " + str(available_completions))
-
-    def completions_contain(self, str_input, items):
-        interp = self.dbg.GetCommandInterpreter()
-        match_strings = lldb.SBStringList()
-        num_matches = interp.HandleCompletion(str_input, len(str_input), 0, -1, match_strings)
-        common_match = match_strings.GetStringAtIndex(0)
-
-        for item in items:
-            found = False
-            for m in match_strings:
-                if m == item:
-                    found = True
-            if not found:
-                # Transform match_strings to a python list with strings
-                available_completions = []
-                for m in match_strings:
-                     available_completions.append(m)
-                self.assertTrue(found, "Couldn't find completion " + item + " in completions " + str(available_completions))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion/main.cpp
deleted file mode 100644 (file)
index 908bebb..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-namespace LongNamespaceName { class NestedClass { long m; }; }
-
-// Defined in other.cpp, we only have a forward declaration here.
-struct ForwardDecl;
-extern ForwardDecl fwd_decl;
-
-class LongClassName { long i ; };
-
-class Expr {
-public:
-    int FooNoArgsBar() { return 1; }
-    int FooWithArgsBar(int i) { return i; }
-    int FooWithMultipleArgsBar(int i, int j) { return i + j; }
-    int FooUnderscoreBar_() { return 4; }
-    int FooNumbersBar1() { return 8; }
-    int MemberVariableBar = 0;
-    Expr &Self() { return *this; }
-    static int StaticMemberMethodBar() { return 82; }
-};
-
-int main()
-{
-    LongClassName a;
-    LongNamespaceName::NestedClass NestedFoo;
-    long SomeLongVarNameWithCapitals = 44;
-    int SomeIntVar = 33;
-    Expr some_expr;
-    some_expr.FooNoArgsBar();
-    some_expr.FooWithArgsBar(1);
-    some_expr.FooUnderscoreBar_();
-    some_expr.FooNumbersBar1();
-    Expr::StaticMemberMethodBar();
-    ForwardDecl *fwd_decl_ptr = &fwd_decl;
-    return 0; // Break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion/other.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/completion/other.cpp
deleted file mode 100644 (file)
index 1f8a488..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-struct ForwardDecl {
-   long HiddenMemberName;
-};
-ForwardDecl fwd_decl;
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/context-object-objc/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/context-object-objc/Makefile
deleted file mode 100644 (file)
index a3198db..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-OBJC_SOURCES := main.m
-LD_EXTRAS := -framework Foundation
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/context-object-objc/TestContextObjectObjc.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/context-object-objc/TestContextObjectObjc.py
deleted file mode 100644 (file)
index 4ae4fd8..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-"""
-Tests expression evaluation in context of an objc class.
-"""
-
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-
-class ContextObjectObjcTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    def test_context_object_objc(self):
-        """Tests expression evaluation in context of an objc class."""
-        self.build()
-
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self, '// Break here', self.main_source_spec)
-        frame = thread.GetFrameAtIndex(0)
-
-        #
-        # Test objc class variable
-        #
-
-        obj_val = frame.FindVariable("objcClass")
-        self.assertTrue(obj_val.IsValid())
-        obj_val = obj_val.Dereference()
-        self.assertTrue(obj_val.IsValid())
-
-        # Test an empty expression evaluation
-        value = obj_val.EvaluateExpression("")
-        self.assertFalse(value.IsValid())
-        self.assertFalse(value.GetError().Success())
-
-        # Test retrieving of a field (not a local with the same name)
-        value = obj_val.EvaluateExpression("field")
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertEqual(value.GetValueAsSigned(), 1111)
-
-        # Test if the self pointer is properly evaluated
-
-        # Test retrieving of an objcClass's property through the self pointer
-        value = obj_val.EvaluateExpression("self.property")
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertEqual(value.GetValueAsSigned(), 2222)
-
-        # Test objcClass's methods evaluation through the self pointer
-        value = obj_val.EvaluateExpression("[self method]")
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertEqual(value.GetValueAsSigned(), 3333)
-
-        # Test if we can use a computation result reference object correctly
-
-        obj_val = frame.EvaluateExpression("[ObjcClass createNew]")
-        self.assertTrue(obj_val.IsValid())
-        obj_val = obj_val.Dereference()
-        self.assertTrue(obj_val.IsValid())
-
-        # Test an expression evaluation on it
-        value = obj_val.EvaluateExpression("1")
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-
-        # Test retrieving of a field on it
-        value = obj_val.EvaluateExpression("field")
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertEqual(value.GetValueAsSigned(), 1111)
-
-    def setUp(self):
-        TestBase.setUp(self)
-
-        self.main_source = "main.m"
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/context-object-objc/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/context-object-objc/main.m
deleted file mode 100644 (file)
index 5c495b2..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@interface ObjcClass : NSObject {
-    int field;
-}
-
-@property int property;
-
-+(ObjcClass*)createNew;
-
--(id)init;
-
--(int)method;
-
-@end
-
-@implementation ObjcClass
-
-+(ObjcClass*)createNew {
-    return [ObjcClass new];
-}
-
--(id)init {
-    self = [super init];
-    if (self) {
-        field = 1111;
-        _property = 2222;
-    }
-    return self;
-}
-
--(int)method {
-    return 3333;
-}
-
-@end
-
-int main()
-{
-    @autoreleasepool {
-        ObjcClass* objcClass = [ObjcClass new];
-        
-        int field = 4444;
-        
-        return 0; // Break here
-    }
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/context-object/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/context-object/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/context-object/TestContextObject.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/context-object/TestContextObject.py
deleted file mode 100644 (file)
index 02b8162..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-"""
-Tests expression evaluation in context of an object.
-"""
-
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbtest import *
-
-class ContextObjectTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_context_object(self):
-        """Tests expression evaluation in context of an object."""
-        self.build()
-
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self, '// Break here', self.main_source_spec)
-        frame = thread.GetFrameAtIndex(0)
-
-        #
-        # Test C++ struct variable
-        #
-
-        obj_val = frame.FindVariable("cpp_struct")
-        self.assertTrue(obj_val.IsValid())
-
-        # Test an empty expression evaluation
-        value = obj_val.EvaluateExpression("")
-        self.assertFalse(value.IsValid())
-        self.assertFalse(value.GetError().Success())
-
-        # Test retrieveing of a field (not a local with the same name)
-        value = obj_val.EvaluateExpression("field")
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertEqual(value.GetValueAsSigned(), 1111)
-
-        # Test functions evaluation
-        value = obj_val.EvaluateExpression("function()")
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertEqual(value.GetValueAsSigned(), 2222)
-
-        # Test that we retrieve the right global
-        value = obj_val.EvaluateExpression("global.field")
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertEqual(value.GetValueAsSigned(), 1111)
-
-        #
-        # Test C++ union variable
-        #
-
-        obj_val = frame.FindVariable("cpp_union")
-        self.assertTrue(obj_val.IsValid())
-
-        # Test retrieveing of a field
-        value = obj_val.EvaluateExpression("field_int")
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertEqual(value.GetValueAsSigned(), 5555)
-
-        #
-        # Test C++ scalar
-        #
-
-        obj_val = frame.FindVariable("cpp_scalar")
-        self.assertTrue(obj_val.IsValid())
-
-        # Test an expression evaluation
-        value = obj_val.EvaluateExpression("1")
-        self.assertFalse(value.IsValid())
-        self.assertFalse(value.GetError().Success())
-
-        #
-        # Test C++ array
-        #
-
-        obj_val = frame.FindVariable("cpp_array")
-        self.assertTrue(obj_val.IsValid())
-
-        # Test an expression evaluation
-        value = obj_val.EvaluateExpression("1")
-        self.assertFalse(value.IsValid())
-        self.assertFalse(value.GetError().Success())
-
-        # Test retrieveing of an element's field
-        value = obj_val.GetValueForExpressionPath("[7]").EvaluateExpression("field")
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertEqual(value.GetValueAsSigned(), 1111)
-
-        #
-        # Test C++ pointer
-        #
-
-        obj_val = frame.FindVariable("cpp_pointer")
-        self.assertTrue(obj_val.IsValid())
-
-        # Test an expression evaluation
-        value = obj_val.EvaluateExpression("1")
-        self.assertFalse(value.IsValid())
-        self.assertFalse(value.GetError().Success())
-
-        # Test retrieveing of a dereferenced object's field
-        value = obj_val.Dereference().EvaluateExpression("field")
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertEqual(value.GetValueAsSigned(), 1111)
-
-        #
-        # Test C++ computation result
-        #
-
-        obj_val = frame.EvaluateExpression("cpp_namespace::GetCppStruct()")
-        self.assertTrue(obj_val.IsValid())
-
-        # Test an expression evaluation
-        value = obj_val.EvaluateExpression("1")
-        self.assertTrue(value.IsValid())
-        self.assertFalse(value.GetError().Success())
-
-        #
-        # Test C++ computation result located in debuggee memory
-        #
-
-        obj_val = frame.EvaluateExpression("cpp_namespace::GetCppStructPtr()")
-        self.assertTrue(obj_val.IsValid())
-
-        # Test an expression evaluation
-        value = obj_val.EvaluateExpression("1")
-        self.assertFalse(value.IsValid())
-        self.assertFalse(value.GetError().Success())
-
-        # Test retrieveing of a dereferenced object's field
-        value = obj_val.Dereference().EvaluateExpression("field")
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertEqual(value.GetValueAsSigned(), 1111)
-
-    def setUp(self):
-        TestBase.setUp(self)
-
-        self.main_source = "main.cpp"
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/context-object/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/context-object/main.cpp
deleted file mode 100644 (file)
index 098b608..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-namespace cpp_namespace {
-  struct CppStruct {
-    int field = 1111;
-
-    int function() {
-      return 2222;
-    }
-  };
-
-  union CppUnion {
-    char field_char;
-    short field_short;
-    int field_int;
-  };
-
-  CppStruct GetCppStruct() {
-    return CppStruct();
-  }
-
-  CppStruct global;
-
-  CppStruct *GetCppStructPtr() {
-    return &global;
-  }
-}
-
-int global = 3333;
-
-int main()
-{
-  cpp_namespace::CppStruct cpp_struct = cpp_namespace::GetCppStruct();
-  cpp_struct.function();
-
-  int field = 4444;
-
-  cpp_namespace::CppUnion cpp_union;
-  cpp_union.field_int = 5555;
-
-  int cpp_scalar = 6666;
-
-  cpp_namespace::CppStruct cpp_array[16];
-
-  cpp_namespace::CppStruct *cpp_pointer = cpp_namespace::GetCppStructPtr();
-
-  return 0; // Break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/diagnostics/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/diagnostics/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/diagnostics/TestExprDiagnostics.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/diagnostics/TestExprDiagnostics.py
deleted file mode 100644 (file)
index da29d7b..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-"""
-Test the diagnostics emitted by our embeded Clang instance that parses expressions.
-"""
-
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-from lldbsuite.test.decorators import *
-
-class ExprDiagnosticsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-        self.main_source = "main.cpp"
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-
-    def test_source_and_caret_printing(self):
-        """Test that the source and caret positions LLDB prints are correct"""
-        self.build()
-
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                          '// Break here', self.main_source_spec)
-        frame = thread.GetFrameAtIndex(0)
-
-        # Test that source/caret are at the right position.
-        value = frame.EvaluateExpression("unknown_identifier")
-        self.assertFalse(value.GetError().Success())
-        # We should get a nice diagnostic with a caret pointing at the start of
-        # the identifier.
-        self.assertIn("\nunknown_identifier\n^\n", value.GetError().GetCString())
-        self.assertIn("<user expression 0>:1:1", value.GetError().GetCString())
-
-        # Same as above but with the identifier in the middle.
-        value = frame.EvaluateExpression("1 + unknown_identifier  ")
-        self.assertFalse(value.GetError().Success())
-        self.assertIn("\n1 + unknown_identifier", value.GetError().GetCString())
-        self.assertIn("\n    ^\n", value.GetError().GetCString())
-
-        # Multiline expressions.
-        value = frame.EvaluateExpression("int a = 0;\nfoobar +=1;\na")
-        self.assertFalse(value.GetError().Success())
-        # We should still get the right line information and caret position.
-        self.assertIn("\nfoobar +=1;\n^\n", value.GetError().GetCString())
-        # It's the second line of the user expression.
-        self.assertIn("<user expression 2>:2:1", value.GetError().GetCString())
-
-        # Top-level expressions.
-        top_level_opts = lldb.SBExpressionOptions();
-        top_level_opts.SetTopLevel(True)
-
-        value = frame.EvaluateExpression("void foo(unknown_type x) {}", top_level_opts)
-        self.assertFalse(value.GetError().Success())
-        self.assertIn("\nvoid foo(unknown_type x) {}\n         ^\n", value.GetError().GetCString())
-        # Top-level expressions might use a different wrapper code, but the file name should still
-        # be the same.
-        self.assertIn("<user expression 3>:1:10", value.GetError().GetCString())
-
-        # Multiline top-level expressions.
-        value = frame.EvaluateExpression("void x() {}\nvoid foo(unknown_type x) {}", top_level_opts)
-        self.assertFalse(value.GetError().Success())
-        self.assertIn("\nvoid foo(unknown_type x) {}\n         ^\n", value.GetError().GetCString())
-        self.assertIn("<user expression 4>:2:10", value.GetError().GetCString())
-
-        # Test that we render Clang's 'notes' correctly.
-        value = frame.EvaluateExpression("struct SFoo{}; struct SFoo { int x; };", top_level_opts)
-        self.assertFalse(value.GetError().Success())
-        self.assertIn("<user expression 5>:1:8: previous definition is here\nstruct SFoo{}; struct SFoo { int x; };\n       ^\n", value.GetError().GetCString())
-
-        # Declarations from the debug information currently have no debug information. It's not clear what
-        # we should do in this case, but we should at least not print anything that's wrong.
-        # In the future our declarations should have valid source locations.
-        value = frame.EvaluateExpression("struct FooBar { double x };", top_level_opts)
-        self.assertFalse(value.GetError().Success())
-        self.assertEqual("error: <user expression 6>:1:8: redefinition of 'FooBar'\nstruct FooBar { double x };\n       ^\n", value.GetError().GetCString())
-
-        value = frame.EvaluateExpression("foo(1, 2)")
-        self.assertFalse(value.GetError().Success())
-        self.assertEqual("error: <user expression 7>:1:1: no matching function for call to 'foo'\nfoo(1, 2)\n^~~\nnote: candidate function not viable: requires single argument 'x', but 2 arguments were provided\n\n", value.GetError().GetCString())
-
-        # Redefine something that we defined in a user-expression. We should use the previous expression file name
-        # for the original decl.
-        value = frame.EvaluateExpression("struct Redef { double x; };", top_level_opts)
-        value = frame.EvaluateExpression("struct Redef { float y; };", top_level_opts)
-        self.assertFalse(value.GetError().Success())
-        self.assertIn("error: <user expression 9>:1:8: redefinition of 'Redef'\nstruct Redef { float y; };\n       ^\n<user expression 8>:1:8: previous definition is here\nstruct Redef { double x; };\n       ^", value.GetError().GetCString())
-
-    @skipUnlessDarwin
-    def test_source_locations_from_objc_modules(self):
-        self.build()
-
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                          '// Break here', self.main_source_spec)
-        frame = thread.GetFrameAtIndex(0)
-
-        # Import foundation so that the Obj-C module is loaded (which contains source locations
-        # that can be used by LLDB).
-        self.runCmd("expr @import Foundation")
-        value = frame.EvaluateExpression("NSLog(1);")
-        self.assertFalse(value.GetError().Success())
-        # LLDB should print the source line that defines NSLog. To not rely on any
-        # header paths/line numbers or the actual formatting of the Foundation headers, only look
-        # for a few tokens in the output.
-        # File path should come from Foundation framework.
-        self.assertIn("/Foundation.framework/", value.GetError().GetCString())
-        # The NSLog definition source line should be printed. Return value and
-        # the first argument are probably stable enough that this test can check for them.
-        self.assertIn("void NSLog(NSString *format", value.GetError().GetCString())
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/diagnostics/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/diagnostics/main.cpp
deleted file mode 100644 (file)
index f4ad1ad..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-void foo(int x) {}
-
-struct FooBar {
-  int i;
-};
-
-int main() {
-  FooBar f;
-  foo(1);
-  return 0; // Break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/dollar-in-variable/TestDollarInVariable.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/dollar-in-variable/TestDollarInVariable.py
deleted file mode 100644 (file)
index 7458867..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__, globals(),
-  [lldbinline.expectedFailureAll(oslist=["windows"])])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/dollar-in-variable/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/dollar-in-variable/main.c
deleted file mode 100644 (file)
index e5fec25..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Make sure we correctly handle $ in variable names.
-
-int main() {
-  // Some variables that might conflict with our variables below.
-  int __lldb_expr_result = 2;
-  int $$foo = 1;
-  int R0 = 2;
-
-  // Some variables with dollar signs that should work (and shadow
-  // any built-in LLDB variables).
-  int $__lldb_expr_result = 11;
-  int $foo = 12;
-  int $R0 = 13;
-  int $0 = 14;
-
-  //%self.expect("expr $__lldb_expr_result", substrs=['(int) $0 = 11'])
-  //%self.expect("expr $foo", substrs=['(int)', ' = 12'])
-  //%self.expect("expr $R0", substrs=['(int)', ' = 13'])
-  //%self.expect("expr int $foo = 123", error=True, substrs=["declaration conflicts"])
-  return 0; //%self.expect("expr $0", substrs=['(int)', ' = 14'])
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/dont_allow_jit/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/dont_allow_jit/Makefile
deleted file mode 100644 (file)
index 695335e..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-C_SOURCES := main.c
-CFLAGS_EXTRAS := -std=c99
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/dont_allow_jit/TestAllowJIT.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/dont_allow_jit/TestAllowJIT.py
deleted file mode 100644 (file)
index c70e90e..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-"""
-Test that --allow-jit=false does disallow JITting:
-"""
-
-
-
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-
-class TestAllowJIT(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # If your test case doesn't stress debug info, the
-    # set this to true.  That way it won't be run once for
-    # each debug info format.
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_allow_jit_expr_command(self):
-        """Test the --allow-jit command line flag"""
-        self.build()
-        self.main_source_file = lldb.SBFileSpec("main.c")
-        self.expr_cmd_test()
-
-    def test_allow_jit_options(self):
-        """Test the SetAllowJIT SBExpressionOption setting"""
-        self.build()
-        self.main_source_file = lldb.SBFileSpec("main.c")
-        self.expr_options_test()
-
-    def expr_cmd_test(self):
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                   "Set a breakpoint here", self.main_source_file)
-
-        frame = thread.GetFrameAtIndex(0)
-
-        # First make sure we can call the function with 
-        interp = self.dbg.GetCommandInterpreter()
-        self.expect("expr --allow-jit 1 -- call_me(10)",
-                    substrs = ["(int) $", "= 18"])
-        # Now make sure it fails with the "can't IR interpret message" if allow-jit is false:
-        self.expect("expr --allow-jit 0 -- call_me(10)",
-                    error=True,
-                    substrs = ["Can't evaluate the expression without a running target"])
-
-    def expr_options_test(self):
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                   "Set a breakpoint here", self.main_source_file)
-
-        frame = thread.GetFrameAtIndex(0)
-
-        # First make sure we can call the function with the default option set. 
-        options = lldb.SBExpressionOptions()
-        # Check that the default is to allow JIT:
-        self.assertEqual(options.GetAllowJIT(), True, "Default is true")
-
-        # Now use the options:
-        result = frame.EvaluateExpression("call_me(10)", options)
-        self.assertTrue(result.GetError().Success(), "expression succeeded")
-        self.assertEqual(result.GetValueAsSigned(), 18, "got the right value.")
-
-        # Now disallow JIT and make sure it fails:
-        options.SetAllowJIT(False)
-        # Check that we got the right value:
-        self.assertEqual(options.GetAllowJIT(), False, "Got False after setting to False")
-
-        # Again use it and ensure we fail:
-        result = frame.EvaluateExpression("call_me(10)", options)
-        self.assertTrue(result.GetError().Fail(), "expression failed with no JIT")
-        self.assertTrue("Can't evaluate the expression without a running target" in result.GetError().GetCString(), "Got right error")
-
-        # Finally set the allow JIT value back to true and make sure that works:
-        options.SetAllowJIT(True)
-        self.assertEqual(options.GetAllowJIT(), True, "Set back to True correctly")
-
-        # And again, make sure this works:
-        result = frame.EvaluateExpression("call_me(10)", options)
-        self.assertTrue(result.GetError().Success(), "expression succeeded")
-        self.assertEqual(result.GetValueAsSigned(), 18, "got the right value.")
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/dont_allow_jit/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/dont_allow_jit/main.c
deleted file mode 100644 (file)
index ebd8ae1..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#include <stdio.h>
-
-int
-call_me(int input)
-{
-  return printf("I was called: %d.\n", input);
-}
-
-int
-main()
-{
-  int test_var = 10;
-  printf ("Set a breakpoint here: %d.\n", test_var);
-  return call_me(100);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/entry-bp/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/entry-bp/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/entry-bp/TestExprEntryBP.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/entry-bp/TestExprEntryBP.py
deleted file mode 100644 (file)
index b6e6b8b..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-"""
-Tests expressions evaluation when the breakpoint on module's entry is set.
-"""
-
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbtest import *
-
-class ExprEntryBPTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_expr_entry_bp(self):
-        """Tests expressions evaluation when the breakpoint on module's entry is set."""
-        self.build()
-        self.main_source_file = lldb.SBFileSpec("main.c")
-
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self, "Set a breakpoint here", self.main_source_file)
-
-        self.assertEqual(1, bkpt.GetNumLocations())
-        entry = bkpt.GetLocationAtIndex(0).GetAddress().GetModule().GetObjectFileEntryPointAddress()
-        self.assertTrue(entry.IsValid(), "Can't get a module entry point")
-
-        entry_bp = target.BreakpointCreateBySBAddress(entry)
-        self.assertTrue(entry_bp.IsValid(), "Can't set a breakpoint on the module entry point")
-
-        result = target.EvaluateExpression("sum(7, 1)")
-        self.assertTrue(result.IsValid(), "Can't evaluate expression")
-        self.assertEqual(8, result.GetValueAsSigned())
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/entry-bp/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/entry-bp/main.c
deleted file mode 100644 (file)
index 168fc9c..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <stdio.h>
-
-int sum(int x, int y) {
-  return x + y;
-}
-
-int main() {
-  printf("Set a breakpoint here.\n");
-  return sum(-1, 1);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/expr-in-syscall/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/expr-in-syscall/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/expr-in-syscall/TestExpressionInSyscall.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/expr-in-syscall/TestExpressionInSyscall.py
deleted file mode 100644 (file)
index a383f69..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-"""Test that we are able to evaluate expressions when the inferior is blocked in a syscall"""
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ExprSyscallTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr21765, getpid() does not exist on Windows")
-    @expectedFailureNetBSD
-    def test_setpgid(self):
-        self.build()
-        self.expr_syscall()
-
-    def expr_syscall(self):
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        listener = lldb.SBListener("my listener")
-
-        # launch the inferior and don't wait for it to stop
-        self.dbg.SetAsync(True)
-        error = lldb.SBError()
-        process = target.Launch(listener,
-                                None,      # argv
-                                None,      # envp
-                                None,      # stdin_path
-                                None,      # stdout_path
-                                None,      # stderr_path
-                                None,      # working directory
-                                0,         # launch flags
-                                False,     # Stop at entry
-                                error)     # error
-
-        self.assertTrue(process and process.IsValid(), PROCESS_IS_VALID)
-
-        event = lldb.SBEvent()
-
-        # Give the child enough time to reach the syscall,
-        # while clearing out all the pending events.
-        # The last WaitForEvent call will time out after 2 seconds.
-        while listener.WaitForEvent(2, event):
-            pass
-
-        # now the process should be running (blocked in the syscall)
-        self.assertEqual(
-            process.GetState(),
-            lldb.eStateRunning,
-            "Process is running")
-
-        # send the process a signal
-        process.SendAsyncInterrupt()
-        while listener.WaitForEvent(2, event):
-            pass
-
-        # as a result the process should stop
-        # in all likelihood we have stopped in the middle of the sleep()
-        # syscall
-        self.assertEqual(
-            process.GetState(),
-            lldb.eStateStopped,
-            PROCESS_STOPPED)
-        thread = process.GetSelectedThread()
-
-        # try evaluating a couple of expressions in this state
-        self.expect("expr release_flag = 1", substrs=[" = 1"])
-        self.expect("print (int)getpid()",
-                    substrs=[str(process.GetProcessID())])
-
-        # and run the process to completion
-        process.Continue()
-
-        # process all events
-        while listener.WaitForEvent(10, event):
-            new_state = lldb.SBProcess.GetStateFromEvent(event)
-            if new_state == lldb.eStateExited:
-                break
-
-        self.assertEqual(process.GetState(), lldb.eStateExited)
-        self.assertEqual(process.GetExitStatus(), 0)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/expr-in-syscall/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/expr-in-syscall/main.cpp
deleted file mode 100644 (file)
index 743b694..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#include <chrono>
-#include <thread>
-
-volatile int release_flag = 0;
-
-int main(int argc, char const *argv[])
-{
-    while (! release_flag) // Wait for debugger to attach
-        std::this_thread::sleep_for(std::chrono::seconds(3));
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/fixits/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/fixits/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/fixits/TestFixIts.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/fixits/TestFixIts.py
deleted file mode 100644 (file)
index c93a05a..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-"""
-Test calling an expression with errors that a FixIt can fix.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ExprCommandWithFixits(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-        self.main_source = "main.cpp"
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-
-    @skipUnlessDarwin
-    def test_with_target(self):
-        """Test calling expressions with errors that can be fixed by the FixIts."""
-        self.build()
-        self.try_expressions()
-
-    def test_with_dummy_target(self):
-        """Test calling expressions in the dummy target with errors that can be fixed by the FixIts."""
-        ret_val = lldb.SBCommandReturnObject()
-        result = self.dbg.GetCommandInterpreter().HandleCommand("expression ((1 << 16) - 1))", ret_val)
-        self.assertEqual(result, lldb.eReturnStatusSuccessFinishResult, "The expression was successful.")
-        self.assertTrue("Fix-it applied" in ret_val.GetError(), "Found the applied FixIt.")
-
-    def try_expressions(self):
-        """Test calling expressions with errors that can be fixed by the FixIts."""
-        (target, process, self.thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                        'Stop here to evaluate expressions', self.main_source_spec)
-
-        options = lldb.SBExpressionOptions()
-        options.SetAutoApplyFixIts(True)
-
-        frame = self.thread.GetFrameAtIndex(0)
-
-        # Try with one error:
-        value = frame.EvaluateExpression("my_pointer.first", options)
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertTrue(value.GetValueAsUnsigned() == 10)
-
-        # Try with two errors:
-        two_error_expression = "my_pointer.second->a"
-        value = frame.EvaluateExpression(two_error_expression, options)
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertTrue(value.GetValueAsUnsigned() == 20)
-
-        # Now turn off the fixits, and the expression should fail:
-        options.SetAutoApplyFixIts(False)
-        value = frame.EvaluateExpression(two_error_expression, options)
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Fail())
-        error_string = value.GetError().GetCString()
-        self.assertTrue(
-            error_string.find("fixed expression suggested:") != -1,
-            "Fix was suggested")
-        self.assertTrue(
-            error_string.find("my_pointer->second.a") != -1,
-            "Fix was right")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/fixits/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/fixits/main.cpp
deleted file mode 100644 (file)
index 371d833..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#include <stdio.h>
-
-struct SubStruct
-{
-  int a;
-  int b;
-};
-
-struct MyStruct
-{
-  int first;
-  struct SubStruct second;
-};
-
-int
-main()
-{
-  struct MyStruct my_struct = {10, {20, 30}};
-  struct MyStruct *my_pointer = &my_struct;
-  printf ("Stop here to evaluate expressions: %d %d %p\n", my_pointer->first, my_pointer->second.a, my_pointer);
-  return 0;
-}
-
-
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/TestFormatters.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/TestFormatters.py
deleted file mode 100644 (file)
index 98872df..0000000
+++ /dev/null
@@ -1,300 +0,0 @@
-"""
-Test using LLDB data formatters with frozen objects coming from the expression parser.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ExprFormattersTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break for main.cpp.
-        self.line = line_number('main.cpp',
-                                '// Stop here')
-
-    @skipIfFreeBSD  # llvm.org/pr24691 skipping to avoid crashing the test runner
-    @expectedFailureNetBSD
-    @expectedFailureAll(
-        oslist=['freebsd'],
-        bugnumber='llvm.org/pr19011 Newer Clang omits C1 complete object constructor')
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
-    @skipIfTargetAndroid()  # skipping to avoid crashing the test runner
-    @expectedFailureAndroid('llvm.org/pr24691')  # we hit an assertion in clang
-    def test(self):
-        """Test expr + formatters for good interoperability."""
-        self.build()
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type synthetic clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        """Test expr + formatters for good interoperability."""
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.runCmd("command script import formatters.py")
-        self.runCmd("command script import foosynth.py")
-
-        if self.TraceOn():
-            self.runCmd("frame variable foo1 --show-types")
-            self.runCmd("frame variable foo1.b --show-types")
-            self.runCmd("frame variable foo1.b.b_ref --show-types")
-
-        self.filecheck("expression --show-types -- *(new foo(47))", __file__,
-                '-check-prefix=EXPR-TYPES-NEW-FOO')
-        # EXPR-TYPES-NEW-FOO: (foo) ${{.*}} = {
-        # EXPR-TYPES-NEW-FOO-NEXT:   (int) a = 47
-        # EXPR-TYPES-NEW-FOO-NEXT:   (int *) a_ptr = 0x
-        # EXPR-TYPES-NEW-FOO-NEXT:   (bar) b = {
-        # EXPR-TYPES-NEW-FOO-NEXT:     (int) i = 94
-        # EXPR-TYPES-NEW-FOO-NEXT:     (int *) i_ptr = 0x
-        # EXPR-TYPES-NEW-FOO-NEXT:     (baz) b = {
-        # EXPR-TYPES-NEW-FOO-NEXT:       (int) h = 97
-        # EXPR-TYPES-NEW-FOO-NEXT:       (int) k = 99
-        # EXPR-TYPES-NEW-FOO-NEXT:     }
-        # EXPR-TYPES-NEW-FOO-NEXT:     (baz &) b_ref = 0x
-        # EXPR-TYPES-NEW-FOO-NEXT:   }
-        # EXPR-TYPES-NEW-FOO-NEXT: }
-
-
-        self.runCmd("type summary add -F formatters.foo_SummaryProvider3 foo")
-        self.filecheck("expression foo1", __file__, '-check-prefix=EXPR-FOO1opts')
-        # EXPR-FOO1opts: (foo) $
-        # EXPR-FOO1opts-SAME: a = 12
-        # EXPR-FOO1opts-SAME: a_ptr = {{[0-9]+}} -> 13
-        # EXPR-FOO1opts-SAME: i = 24
-        # EXPR-FOO1opts-SAME: i_ptr = {{[0-9]+}} -> 25
-        # EXPR-FOO1opts-SAME: b_ref = {{[0-9]+}}
-        # EXPR-FOO1opts-SAME: h = 27
-        # EXPR-FOO1opts-SAME: k = 29
-        # EXPR-FOO1opts-SAME: WITH_OPTS
-
-        self.runCmd("type summary delete foo")
-
-        self.runCmd("type summary add -F formatters.foo_SummaryProvider foo")
-
-        self.expect("expression new int(12)",
-                    substrs=['(int *) $', ' = 0x'])
-
-        self.runCmd(
-            "type summary add -s \"${var%pointer} -> ${*var%decimal}\" \"int *\"")
-
-        self.expect("expression new int(12)",
-                    substrs=['(int *) $', '= 0x', ' -> 12'])
-
-        self.expect("expression foo1.a_ptr",
-                    substrs=['(int *) $', '= 0x', ' -> 13'])
-
-        self.filecheck("expression foo1", __file__, '-check-prefix=EXPR-FOO1')
-        # EXPR-FOO1: (foo) $
-        # EXPR-FOO1-SAME: a = 12
-        # EXPR-FOO1-SAME: a_ptr = {{[0-9]+}} -> 13
-        # EXPR-FOO1-SAME: i = 24
-        # EXPR-FOO1-SAME: i_ptr = {{[0-9]+}} -> 25
-        # EXPR-FOO1-SAME: b_ref = {{[0-9]+}}
-        # EXPR-FOO1-SAME: h = 27
-        # EXPR-FOO1-SAME: k = 29
-
-        self.filecheck("expression --ptr-depth=1 -- new foo(47)", __file__,
-                '-check-prefix=EXPR-PTR-DEPTH1')
-        # EXPR-PTR-DEPTH1: (foo *) $
-        # EXPR-PTR-DEPTH1-SAME: a = 47
-        # EXPR-PTR-DEPTH1-SAME: a_ptr = {{[0-9]+}} -> 48
-        # EXPR-PTR-DEPTH1-SAME: i = 94
-        # EXPR-PTR-DEPTH1-SAME: i_ptr = {{[0-9]+}} -> 95
-
-        self.filecheck("expression foo2", __file__, '-check-prefix=EXPR-FOO2')
-        # EXPR-FOO2: (foo) $
-        # EXPR-FOO2-SAME: a = 121
-        # EXPR-FOO2-SAME: a_ptr = {{[0-9]+}} -> 122
-        # EXPR-FOO2-SAME: i = 242
-        # EXPR-FOO2-SAME: i_ptr = {{[0-9]+}} -> 243
-        # EXPR-FOO2-SAME: h = 245
-        # EXPR-FOO2-SAME: k = 247
-
-        object_name = self.res.GetOutput()
-        object_name = object_name[7:]
-        object_name = object_name[0:object_name.find(' =')]
-
-        self.filecheck("frame variable foo2", __file__, '-check-prefix=VAR-FOO2')
-        # VAR-FOO2: (foo) foo2
-        # VAR-FOO2-SAME: a = 121
-        # VAR-FOO2-SAME: a_ptr = {{[0-9]+}} -> 122
-        # VAR-FOO2-SAME: i = 242
-        # VAR-FOO2-SAME: i_ptr = {{[0-9]+}} -> 243
-        # VAR-FOO2-SAME: h = 245
-        # VAR-FOO2-SAME: k = 247
-
-        # The object is the same as foo2, so use the EXPR-FOO2 checks.
-        self.filecheck("expression $" + object_name, __file__,
-                '-check-prefix=EXPR-FOO2')
-
-        self.runCmd("type summary delete foo")
-        self.runCmd(
-            "type synthetic add --python-class foosynth.FooSyntheticProvider foo")
-
-        self.expect("expression --show-types -- $" + object_name,
-                    substrs=['(foo) $', ' = {', '(int) *i_ptr = 243'])
-
-        self.runCmd("n")
-        self.runCmd("n")
-
-        self.runCmd("type synthetic delete foo")
-        self.runCmd("type summary add -F formatters.foo_SummaryProvider foo")
-
-        self.expect(
-            "expression foo2",
-            substrs=[
-                '(foo) $',
-                'a = 7777',
-                'a_ptr = ',
-                ' -> 122',
-                'i = 242',
-                'i_ptr = ',
-                ' -> 8888'])
-
-        self.expect("expression $" + object_name + '.a',
-                    substrs=['7777'])
-
-        self.expect("expression *$" + object_name + '.b.i_ptr',
-                    substrs=['8888'])
-
-        self.expect(
-            "expression $" +
-            object_name,
-            substrs=[
-                '(foo) $',
-                'a = 121',
-                'a_ptr = ',
-                ' -> 122',
-                'i = 242',
-                'i_ptr = ',
-                ' -> 8888',
-                'h = 245',
-                'k = 247'])
-
-        self.runCmd("type summary delete foo")
-        self.runCmd(
-            "type synthetic add --python-class foosynth.FooSyntheticProvider foo")
-
-        self.expect("expression --show-types -- $" + object_name,
-                    substrs=['(foo) $', ' = {', '(int) *i_ptr = 8888'])
-
-        self.runCmd("n")
-
-        self.runCmd("type synthetic delete foo")
-        self.runCmd("type summary add -F formatters.foo_SummaryProvider foo")
-
-        self.expect(
-            "expression $" +
-            object_name,
-            substrs=[
-                '(foo) $',
-                'a = 121',
-                'a_ptr = ',
-                ' -> 122',
-                'i = 242',
-                'i_ptr = ',
-                ' -> 8888',
-                'k = 247'])
-
-        process = self.dbg.GetSelectedTarget().GetProcess()
-        thread = process.GetThreadAtIndex(0)
-        frame = thread.GetSelectedFrame()
-
-        frozen = frame.EvaluateExpression("$" + object_name + ".a_ptr")
-
-        a_data = frozen.GetPointeeData()
-
-        error = lldb.SBError()
-        self.assertTrue(
-            a_data.GetUnsignedInt32(
-                error,
-                0) == 122,
-            '*a_ptr = 122')
-
-        ret = line_number("main.cpp", "Done initializing")
-        self.runCmd("thread until " + str(ret))
-
-        self.expect("frame variable numbers",
-                    substrs=['1', '2', '3', '4', '5'])
-
-        self.expect("expression numbers",
-                    substrs=['1', '2', '3', '4', '5'])
-
-        frozen = frame.EvaluateExpression("&numbers")
-
-        a_data = frozen.GetPointeeData(0, 1)
-
-        self.assertTrue(
-            a_data.GetUnsignedInt32(
-                error,
-                0) == 1,
-            'numbers[0] == 1')
-        self.assertTrue(
-            a_data.GetUnsignedInt32(
-                error,
-                4) == 2,
-            'numbers[1] == 2')
-        self.assertTrue(
-            a_data.GetUnsignedInt32(
-                error,
-                8) == 3,
-            'numbers[2] == 3')
-        self.assertTrue(
-            a_data.GetUnsignedInt32(
-                error,
-                12) == 4,
-            'numbers[3] == 4')
-        self.assertTrue(
-            a_data.GetUnsignedInt32(
-                error,
-                16) == 5,
-            'numbers[4] == 5')
-
-        frozen = frame.EvaluateExpression("numbers")
-
-        a_data = frozen.GetData()
-
-        self.assertTrue(
-            a_data.GetUnsignedInt32(
-                error,
-                0) == 1,
-            'numbers[0] == 1')
-        self.assertTrue(
-            a_data.GetUnsignedInt32(
-                error,
-                4) == 2,
-            'numbers[1] == 2')
-        self.assertTrue(
-            a_data.GetUnsignedInt32(
-                error,
-                8) == 3,
-            'numbers[2] == 3')
-        self.assertTrue(
-            a_data.GetUnsignedInt32(
-                error,
-                12) == 4,
-            'numbers[3] == 4')
-        self.assertTrue(
-            a_data.GetUnsignedInt32(
-                error,
-                16) == 5,
-            'numbers[4] == 5')
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/foosynth.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/foosynth.py
deleted file mode 100644 (file)
index 7b1284d..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-import lldb
-
-
-class FooSyntheticProvider:
-
-    def __init__(self, valobj, dict):
-        self.valobj = valobj
-        self.update()
-
-    def update(self):
-        self.adjust_for_architecture()
-
-    def num_children(self):
-        return 1
-
-    def get_child_at_index(self, index):
-        if index != 0:
-            return None
-        return self.i_ptr.Dereference()
-
-    def get_child_index(self, name):
-        if name == "*i_ptr":
-            return 0
-        return None
-
-    def adjust_for_architecture(self):
-        self.lp64 = (
-            self.valobj.GetTarget().GetProcess().GetAddressByteSize() == 8)
-        self.is_little = (self.valobj.GetTarget().GetProcess(
-        ).GetByteOrder() == lldb.eByteOrderLittle)
-        self.pointer_size = self.valobj.GetTarget().GetProcess().GetAddressByteSize()
-        self.bar = self.valobj.GetChildMemberWithName('b')
-        self.i_ptr = self.bar.GetChildMemberWithName('i_ptr')
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/formatters.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/formatters.py
deleted file mode 100644 (file)
index ac2888b..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-import lldb
-
-def foo_SummaryProvider(valobj, dict):
-    a = valobj.GetChildMemberWithName('a')
-    a_ptr = valobj.GetChildMemberWithName('a_ptr')
-    bar = valobj.GetChildMemberWithName('b')
-    i = bar.GetChildMemberWithName('i')
-    i_ptr = bar.GetChildMemberWithName('i_ptr')
-    b_ref = bar.GetChildMemberWithName('b_ref')
-    b_ref_ptr = b_ref.AddressOf()
-    b_ref = b_ref_ptr.Dereference()
-    h = b_ref.GetChildMemberWithName('h')
-    k = b_ref.GetChildMemberWithName('k')
-    return 'a = ' + str(a.GetValueAsUnsigned(0)) + ', a_ptr = ' + \
-        str(a_ptr.GetValueAsUnsigned(0)) + ' -> ' + str(a_ptr.Dereference().GetValueAsUnsigned(0)) + \
-        ', i = ' + str(i.GetValueAsUnsigned(0)) + \
-        ', i_ptr = ' + str(i_ptr.GetValueAsUnsigned(0)) + ' -> ' + str(i_ptr.Dereference().GetValueAsUnsigned(0)) + \
-        ', b_ref = ' + str(b_ref.GetValueAsUnsigned(0)) + \
-        ', h = ' + str(h.GetValueAsUnsigned(0)) + ' , k = ' + str(k.GetValueAsUnsigned(0))
-
-def foo_SummaryProvider3(valobj, dict, options):
-    if not isinstance(options, lldb.SBTypeSummaryOptions):
-        raise Exception()
-    return foo_SummaryProvider(valobj, dict) + ", WITH_OPTS"
\ No newline at end of file
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/main.cpp
deleted file mode 100644 (file)
index 4ca2504..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#include <iostream>
-#include <string>
-
-struct baz
-    {
-        int h;
-        int k;
-        baz(int a, int b) : h(a), k(b) {}
-    };
-
-struct bar
-       {
-               int i;
-               int* i_ptr;
-        baz b;
-        baz& b_ref;
-               bar(int x) : i(x),i_ptr(new int(x+1)),b(i+3,i+5),b_ref(b) {}
-       };
-       
-struct foo
-       {
-               int a;
-               int* a_ptr;
-               bar b;
-               
-               foo(int x) : a(x),
-               a_ptr(new int(x+1)),
-               b(2*x) {}
-               
-       };
-       
-int main(int argc, char** argv)
-{
-       foo foo1(12);
-       foo foo2(121);
-       
-       foo2.a = 7777; // Stop here
-       *(foo2.b.i_ptr) = 8888;
-    foo2.b.b.h = 9999;
-       
-       *(foo1.a_ptr) = 9999;
-       foo1.b.i = 9999;
-       
-       int numbers[5] = {1,2,3,4,5};
-
-       return 0; // Done initializing
-
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/function_template_specialization_temp_args/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/function_template_specialization_temp_args/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/function_template_specialization_temp_args/TestFunctionTemplateSpecializationTempArgs.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/function_template_specialization_temp_args/TestFunctionTemplateSpecializationTempArgs.py
deleted file mode 100644 (file)
index bd5bc0e..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestFunctionTemplateSpecializationTempArgs(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_function_template_specialization_temp_args(self):
-        self.build()
-
-        (self.target, self.process, _, bkpt) = lldbutil.run_to_source_breakpoint(self, '// break here',
-                lldb.SBFileSpec("main.cpp", False))
-
-        self.expect("expr p0",
-                substrs=['(VType) $0 = {}'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/function_template_specialization_temp_args/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/function_template_specialization_temp_args/main.cpp
deleted file mode 100644 (file)
index 6d01288..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-template <typename T> struct M {};
-
-template <typename T> void f(T &t);
-
-template <> void f<int>(int &t) {
-  typedef M<int> VType;
-
-  VType p0; // break here
-}
-
-int main() {
-  int x;
-
-  f(x);
-
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/ignore-artificial-constructors/TestIgnoreArtificialConstructors.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/ignore-artificial-constructors/TestIgnoreArtificialConstructors.py
deleted file mode 100644 (file)
index e33423a..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__, globals(), [lldbinline.expectedFailureAll(
-            oslist=["windows"], bugnumber="llvm.org/pr43707")])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/ignore-artificial-constructors/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/ignore-artificial-constructors/main.cpp
deleted file mode 100644 (file)
index 41457eb..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-struct Foo {
-  // Triggers that we emit an artificial constructor for Foo.
-  virtual ~Foo() = default;
-};
-
-int main() {
-  Foo f;
-  // Try to construct foo in our expression.
-  return 0; //%self.expect("expr Foo()", substrs=["(Foo) $0 = {}"])
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/basic/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/basic/Makefile
deleted file mode 100644 (file)
index f938f74..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-USE_LIBCPP := 1
-CXX_SOURCES := main.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/basic/TestImportStdModule.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/basic/TestImportStdModule.py
deleted file mode 100644 (file)
index de0d796..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-"""
-Test importing the 'std' C++ module and evaluate expressions with it.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ImportStdModule(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        # Activate importing of std module.
-        self.runCmd("settings set target.import-std-module true")
-        # Calling some normal std functions that return non-template types.
-        self.expect("expr std::abs(-42)", substrs=['(int) $0 = 42'])
-        self.expect("expr std::div(2, 1).quot", substrs=['(int) $1 = 2'])
-        # Using types from std.
-        self.expect("expr (std::size_t)33U", substrs=['(size_t) $2 = 33'])
-        # Calling templated functions that return non-template types.
-        self.expect("expr char char_a = 'b'; char char_b = 'a'; std::swap(char_a, char_b); char_a",
-                    substrs=["(char) $3 = 'a'"])
-
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    def test_non_cpp_language(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        # Activate importing of std module.
-        self.runCmd("settings set target.import-std-module true")
-        # These languages don't support C++ modules, so they shouldn't
-        # be able to evaluate the expression.
-        self.expect("expr -l C -- std::abs(-42)", error=True)
-        self.expect("expr -l C99 -- std::abs(-42)", error=True)
-        self.expect("expr -l C11 -- std::abs(-42)", error=True)
-        self.expect("expr -l ObjC -- std::abs(-42)", error=True)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/basic/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/basic/main.cpp
deleted file mode 100644 (file)
index 2f6d078..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// We need to import any std module. It doesn't matter which one.
-#include <iostream>
-
-int main(int argc, char **argv) {
-  std::cout << "Test" << std::endl;
-  return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/conflicts/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/conflicts/Makefile
deleted file mode 100644 (file)
index f938f74..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-USE_LIBCPP := 1
-CXX_SOURCES := main.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/conflicts/TestStdModuleWithConflicts.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/conflicts/TestStdModuleWithConflicts.py
deleted file mode 100644 (file)
index ad5322b..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-"""
-Test importing the 'std' C++ module and check if we can handle
-prioritizing the conflicting functions from debug info and std
-module.
-
-See also import-std-module/basic/TestImportStdModule.py for
-the same test on a 'clean' code base without conflicts.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestImportStdModuleConflicts(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-        self.expect("expr std::abs(-42)", substrs=['(int) $0 = 42'])
-        self.expect("expr std::div(2, 1).quot", substrs=['(int) $1 = 2'])
-        self.expect("expr (std::size_t)33U", substrs=['(size_t) $2 = 33'])
-        self.expect("expr char char_a = 'b'; char char_b = 'a'; std::swap(char_a, char_b); char_a",
-                    substrs=["(char) $3 = 'a'"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/conflicts/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/conflicts/main.cpp
deleted file mode 100644 (file)
index e49b862..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <cstdlib>
-#include <utility>
-
-int main(int argc, char **argv) {
-  std::size_t f = argc;
-  f = std::abs(argc);
-  f = std::div(argc * 2, argc).quot;
-  std::swap(f, f);
-  return f; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-basic/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-basic/Makefile
deleted file mode 100644 (file)
index f938f74..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-USE_LIBCPP := 1
-CXX_SOURCES := main.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-basic/TestBasicDeque.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-basic/TestBasicDeque.py
deleted file mode 100644 (file)
index 4615d24..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-"""
-Test basic std::list functionality.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestBasicDeque(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 3'])
-        self.expect("expr (int)a.front()", substrs=['(int) $1 = 3'])
-        self.expect("expr (int)a.back()", substrs=['(int) $2 = 2'])
-
-        self.expect("expr std::sort(a.begin(), a.end())")
-        self.expect("expr (int)a.front()", substrs=['(int) $3 = 1'])
-        self.expect("expr (int)a.back()", substrs=['(int) $4 = 3'])
-
-        self.expect("expr std::reverse(a.begin(), a.end())")
-        self.expect("expr (int)a.front()", substrs=['(int) $5 = 3'])
-        self.expect("expr (int)a.back()", substrs=['(int) $6 = 1'])
-
-        self.expect("expr (int)(*a.begin())", substrs=['(int) $7 = 3'])
-        self.expect("expr (int)(*a.rbegin())", substrs=['(int) $8 = 1'])
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-basic/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-basic/main.cpp
deleted file mode 100644 (file)
index 5bed556..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <deque>
-
-int main(int argc, char **argv) {
-  std::deque<int> a = {3, 1, 2};
-  return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-dbg-info-content/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-dbg-info-content/Makefile
deleted file mode 100644 (file)
index f938f74..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-USE_LIBCPP := 1
-CXX_SOURCES := main.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-dbg-info-content/TestDbgInfoContentDeque.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-dbg-info-content/TestDbgInfoContentDeque.py
deleted file mode 100644 (file)
index cde74af..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-"""
-Test std::deque functionality with a decl from dbg info as content.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestDbgInfoContentDeque(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 3'])
-        self.expect("expr (int)a.front().a", substrs=['(int) $1 = 3'])
-        self.expect("expr (int)a.back().a", substrs=['(int) $2 = 2'])
-
-        self.expect("expr std::reverse(a.begin(), a.end())")
-        self.expect("expr (int)a.front().a", substrs=['(int) $3 = 2'])
-        self.expect("expr (int)a.back().a", substrs=['(int) $4 = 3'])
-
-        self.expect("expr (int)(a.begin()->a)", substrs=['(int) $5 = 2'])
-        self.expect("expr (int)(a.rbegin()->a)", substrs=['(int) $6 = 3'])
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-dbg-info-content/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-dbg-info-content/main.cpp
deleted file mode 100644 (file)
index f8fd1fb..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <deque>
-
-struct Foo {
-  int a;
-};
-
-int main(int argc, char **argv) {
-  std::deque<Foo> a = {{3}, {1}, {2}};
-  return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/Makefile
deleted file mode 100644 (file)
index 533ff70..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-# We don't have any standard include directories, so we can't
-# parse the test_common.h header we usually inject as it includes
-# system headers.
-NO_TEST_COMMON_H := 1
-
-CXXFLAGS_EXTRAS = -I $(SRCDIR)/root/usr/include/c++/v1/ -I $(SRCDIR)/root/usr/include/ -nostdinc -nostdinc++ -DENABLE_STD_CONTENT=1
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/TestEmptyStdModule.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/TestEmptyStdModule.py
deleted file mode 100644 (file)
index 76e79df..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-"""
-Test that LLDB doesn't crash if the std module we load is empty.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-import os
-
-class ImportStdModule(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # We only emulate a fake libc++ in this test and don't use the real libc++,
-    # but we still add the libc++ category so that this test is only run in
-    # test configurations where libc++ is actually supposed to be tested.
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    def test(self):
-        self.build()
-
-        sysroot = os.path.join(os.getcwd(), "root")
-
-        # Set the sysroot.
-        self.runCmd("platform select --sysroot '" + sysroot + "' host", CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        # Use the typedef that is only defined in our 'empty' module. If this fails, then LLDB
-        # somehow figured out the correct define for the header and compiled the right
-        # standard module that actually contains the std::vector template.
-        self.expect("expr MissingContent var = 3; var", substrs=['$0 = 3'])
-        # Try to access our mock std::vector. This should fail but not crash LLDB as the
-        # std::vector template should be missing from the std module.
-        self.expect("expr (size_t)v.size()", substrs=["Couldn't lookup symbols"], error=True)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/main.cpp
deleted file mode 100644 (file)
index b01fe1a..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <algorithm>
-
-int main(int argc, char **argv) {
-  // Makes sure we have the mock libc headers in the debug information.
-  libc_struct s;
-  std::vector<int> v;
-  return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/root/usr/include/c++/v1/algorithm b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/root/usr/include/c++/v1/algorithm
deleted file mode 100644 (file)
index a77c3d8..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// This is only defined when building, but LLDB is missing this flag when loading the standard
-// library module so the actual contents of the module are missing.
-#ifdef ENABLE_STD_CONTENT
-
-#include "libc_header.h"
-
-namespace std {
-  inline namespace __1 {
-    // Pretend to be a std::vector template we need to instantiate
-    // in LLDB.
-    template<typename T>
-    struct vector { T i; int size() { return 2; } };
-  }
-}
-#else
-// Unused typedef we can use to check that we actually loaded
-// an empty module. Will be missing if LLDB somehow can get the
-// ENABLE_STD_CONTENT define right and break this test silently
-// (as with the define the module isn't empty anymore and this
-// test always succeeds).
-typedef int MissingContent;
-#endif // ENABLE_STD_CONTENT
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/root/usr/include/c++/v1/module.modulemap b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/root/usr/include/c++/v1/module.modulemap
deleted file mode 100644 (file)
index 0eb4849..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-module std {
-  module "algorithm" { header "algorithm" export * }
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/root/usr/include/libc_header.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/root/usr/include/libc_header.h
deleted file mode 100644 (file)
index 47525c9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-struct libc_struct {};
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-basic/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-basic/Makefile
deleted file mode 100644 (file)
index f938f74..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-USE_LIBCPP := 1
-CXX_SOURCES := main.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-basic/TestBasicForwardList.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-basic/TestBasicForwardList.py
deleted file mode 100644 (file)
index 9e45bf2..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-"""
-Test basic std::forward_list functionality.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestBasicForwardList(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (size_t)std::distance(a.begin(), a.end())", substrs=['(size_t) $0 = 3'])
-        self.expect("expr (int)a.front()", substrs=['(int) $1 = 3'])
-
-        self.expect("expr a.sort()")
-        self.expect("expr (int)a.front()", substrs=['(int) $2 = 1'])
-
-        self.expect("expr (int)(*a.begin())", substrs=['(int) $3 = 1'])
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-basic/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-basic/main.cpp
deleted file mode 100644 (file)
index 4f5e30f..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <forward_list>
-
-int main(int argc, char **argv) {
-  std::forward_list<int> a = {3, 1, 2};
-  return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-dbg-info-content/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-dbg-info-content/Makefile
deleted file mode 100644 (file)
index f938f74..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-USE_LIBCPP := 1
-CXX_SOURCES := main.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-dbg-info-content/TestDbgInfoContentForwardList.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-dbg-info-content/TestDbgInfoContentForwardList.py
deleted file mode 100644 (file)
index 290a045..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-"""
-Test std::forward_list functionality with a decl from debug info as content.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestDbgInfoContentForwardList(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (size_t)std::distance(a.begin(), a.end())", substrs=['(size_t) $0 = 3'])
-        self.expect("expr (int)a.front().a", substrs=['(int) $1 = 3'])
-
-        self.expect("expr (int)(a.begin()->a)", substrs=['(int) $2 = 3'])
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-dbg-info-content/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-dbg-info-content/main.cpp
deleted file mode 100644 (file)
index b1ffc4b..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <forward_list>
-
-struct Foo {
-  int a;
-};
-
-int main(int argc, char **argv) {
-  std::forward_list<Foo> a = {{3}, {1}, {2}};
-  return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-basic/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-basic/Makefile
deleted file mode 100644 (file)
index f938f74..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-USE_LIBCPP := 1
-CXX_SOURCES := main.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-basic/TestBasicList.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-basic/TestBasicList.py
deleted file mode 100644 (file)
index e8dfc88..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-"""
-Test basic std::list functionality.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestBasicList(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 3'])
-        self.expect("expr (int)a.front()", substrs=['(int) $1 = 3'])
-        self.expect("expr (int)a.back()", substrs=['(int) $2 = 2'])
-
-        self.expect("expr a.sort()")
-        self.expect("expr (int)a.front()", substrs=['(int) $3 = 1'])
-        self.expect("expr (int)a.back()", substrs=['(int) $4 = 3'])
-
-        self.expect("expr std::reverse(a.begin(), a.end())")
-        self.expect("expr (int)a.front()", substrs=['(int) $5 = 3'])
-        self.expect("expr (int)a.back()", substrs=['(int) $6 = 1'])
-
-        self.expect("expr (int)(*a.begin())", substrs=['(int) $7 = 3'])
-        self.expect("expr (int)(*a.rbegin())", substrs=['(int) $8 = 1'])
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-basic/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-basic/main.cpp
deleted file mode 100644 (file)
index e54719a..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <list>
-
-int main(int argc, char **argv) {
-  std::list<int> a = {3, 1, 2};
-  return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-dbg-info-content/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-dbg-info-content/Makefile
deleted file mode 100644 (file)
index f938f74..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-USE_LIBCPP := 1
-CXX_SOURCES := main.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-dbg-info-content/TestDbgInfoContentList.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-dbg-info-content/TestDbgInfoContentList.py
deleted file mode 100644 (file)
index fa8be7c..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-"""
-Test basic std::list functionality but with a declaration from
-the debug info (the Foo struct) as content.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestDbgInfoContentList(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 3'])
-        self.expect("expr (int)a.front().a", substrs=['(int) $1 = 3'])
-        self.expect("expr (int)a.back().a", substrs=['(int) $2 = 2'])
-
-        self.expect("expr std::reverse(a.begin(), a.end())")
-        self.expect("expr (int)a.front().a", substrs=['(int) $3 = 2'])
-        self.expect("expr (int)a.back().a", substrs=['(int) $4 = 3'])
-
-        self.expect("expr (int)(a.begin()->a)", substrs=['(int) $5 = 2'])
-        self.expect("expr (int)(a.rbegin()->a)", substrs=['(int) $6 = 3'])
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-dbg-info-content/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-dbg-info-content/main.cpp
deleted file mode 100644 (file)
index 3cfb35f..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <list>
-
-struct Foo {
-  int a;
-};
-
-int main(int argc, char **argv) {
-  std::list<Foo> a = {{3}, {1}, {2}};
-  return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/no-std-module/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/no-std-module/Makefile
deleted file mode 100644 (file)
index f938f74..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-USE_LIBCPP := 1
-CXX_SOURCES := main.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/no-std-module/TestMissingStdModule.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/no-std-module/TestMissingStdModule.py
deleted file mode 100644 (file)
index 83d672f..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-"""
-Test that importing the std module on a compile unit
-that doesn't use the std module will not break LLDB.
-
-It's not really specified at the moment what kind of
-error we should report back to the user in this
-situation. Currently Clang will just complain that
-the std module doesn't exist or can't be loaded.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class STLTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        # Activate importing of std module.
-        self.runCmd("settings set target.import-std-module true")
-
-        # Run some commands that should all fail without our std module.
-        self.expect("expr std::abs(-42)", error=True)
-        self.expect("expr std::div(2, 1).quot", error=True)
-        self.expect("expr (std::size_t)33U", error=True)
-        self.expect("expr char a = 'b'; char b = 'a'; std::swap(a, b); a",
-                    error=True)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/no-std-module/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/no-std-module/main.cpp
deleted file mode 100644 (file)
index c93e9d0..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-// We don't import any std module here.
-
-int main(int argc, char **argv) {
-  return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/queue/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/queue/Makefile
deleted file mode 100644 (file)
index f938f74..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-USE_LIBCPP := 1
-CXX_SOURCES := main.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/queue/TestQueue.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/queue/TestQueue.py
deleted file mode 100644 (file)
index 42e5f8d..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-"""
-Tests std::queue functionality.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestQueue(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        # Test std::queue functionality with a std::deque.
-        self.expect("expr q_deque.pop()")
-        self.expect("expr q_deque.push({4})")
-        self.expect("expr (size_t)q_deque.size()", substrs=['(size_t) $0 = 1'])
-        self.expect("expr (int)q_deque.front().i", substrs=['(int) $1 = 4'])
-        self.expect("expr (int)q_deque.back().i", substrs=['(int) $2 = 4'])
-        self.expect("expr q_deque.empty()", substrs=['(bool) $3 = false'])
-        self.expect("expr q_deque.pop()")
-        self.expect("expr q_deque.emplace(5)")
-        self.expect("expr (int)q_deque.front().i", substrs=['(int) $4 = 5'])
-
-        # Test std::queue functionality with a std::list.
-        self.expect("expr q_list.pop()")
-        self.expect("expr q_list.push({4})")
-        self.expect("expr (size_t)q_list.size()", substrs=['(size_t) $5 = 1'])
-        self.expect("expr (int)q_list.front().i", substrs=['(int) $6 = 4'])
-        self.expect("expr (int)q_list.back().i", substrs=['(int) $7 = 4'])
-        self.expect("expr q_list.empty()", substrs=['(bool) $8 = false'])
-        self.expect("expr q_list.pop()")
-        self.expect("expr q_list.emplace(5)")
-        self.expect("expr (int)q_list.front().i", substrs=['(int) $9 = 5'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/queue/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/queue/main.cpp
deleted file mode 100644 (file)
index 66e8f02..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <deque>
-#include <list>
-#include <queue>
-
-struct C {
-  // Constructor for testing emplace.
-  C(int i) : i(i) {};
-  int i;
-};
-
-int main(int argc, char **argv) {
-  // std::deque is the default container.
-  std::queue<C> q_deque({{1}});
-  std::queue<C, std::list<C>> q_list({{1}});
-  return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr-dbg-info-content/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr-dbg-info-content/Makefile
deleted file mode 100644 (file)
index f938f74..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-USE_LIBCPP := 1
-CXX_SOURCES := main.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr-dbg-info-content/TestSharedPtrDbgInfoContent.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr-dbg-info-content/TestSharedPtrDbgInfoContent.py
deleted file mode 100644 (file)
index ec39651..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-"""
-Test std::shared_ptr functionality with a class from debug info as content.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestSharedPtrDbgInfoContent(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (int)s->a", substrs=['(int) $0 = 3'])
-        self.expect("expr (int)(s->a = 5)", substrs=['(int) $1 = 5'])
-        self.expect("expr (int)s->a", substrs=['(int) $2 = 5'])
-        self.expect("expr (bool)s", substrs=['(bool) $3 = true'])
-        self.expect("expr s.reset()")
-        self.expect("expr (bool)s", substrs=['(bool) $4 = false'])
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr-dbg-info-content/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr-dbg-info-content/main.cpp
deleted file mode 100644 (file)
index 73664f1..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#include <memory>
-
-struct Foo {
-  int a;
-};
-
-int main(int argc, char **argv) {
-  std::shared_ptr<Foo> s(new Foo);
-  s->a = 3;
-  return s->a; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr/Makefile
deleted file mode 100644 (file)
index f938f74..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-USE_LIBCPP := 1
-CXX_SOURCES := main.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr/TestSharedPtr.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr/TestSharedPtr.py
deleted file mode 100644 (file)
index 7e05bcc..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-"""
-Test basic std::shared_ptr functionality.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestSharedPtr(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (int)*s", substrs=['(int) $0 = 3'])
-        self.expect("expr (int)(*s = 5)", substrs=['(int) $1 = 5'])
-        self.expect("expr (int)*s", substrs=['(int) $2 = 5'])
-        self.expect("expr (bool)s", substrs=['(bool) $3 = true'])
-        self.expect("expr s.reset()")
-        self.expect("expr (bool)s", substrs=['(bool) $4 = false'])
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr/main.cpp
deleted file mode 100644 (file)
index cb81754..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <memory>
-
-int main(int argc, char **argv) {
-  std::shared_ptr<int> s(new int);
-  *s = 3;
-  return *s; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/stack/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/stack/Makefile
deleted file mode 100644 (file)
index f938f74..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-USE_LIBCPP := 1
-CXX_SOURCES := main.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/stack/TestStack.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/stack/TestStack.py
deleted file mode 100644 (file)
index fe19a4e..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-"""
-Tests std::stack functionality.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestStack(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        # Test std::stack functionality with a std::deque.
-        self.expect("expr s_deque.pop()")
-        self.expect("expr s_deque.push({4})")
-        self.expect("expr (size_t)s_deque.size()", substrs=['(size_t) $0 = 3'])
-        self.expect("expr (int)s_deque.top().i", substrs=['(int) $1 = 4'])
-        self.expect("expr s_deque.emplace(5)")
-        self.expect("expr (int)s_deque.top().i", substrs=['(int) $2 = 5'])
-
-        # Test std::stack functionality with a std::vector.
-        self.expect("expr s_vector.pop()")
-        self.expect("expr s_vector.push({4})")
-        self.expect("expr (size_t)s_vector.size()", substrs=['(size_t) $3 = 3'])
-        self.expect("expr (int)s_vector.top().i", substrs=['(int) $4 = 4'])
-        self.expect("expr s_vector.emplace(5)")
-        self.expect("expr (int)s_vector.top().i", substrs=['(int) $5 = 5'])
-
-        # Test std::stack functionality with a std::list.
-        self.expect("expr s_list.pop()")
-        self.expect("expr s_list.push({4})")
-        self.expect("expr (size_t)s_list.size()", substrs=['(size_t) $6 = 3'])
-        self.expect("expr (int)s_list.top().i", substrs=['(int) $7 = 4'])
-        self.expect("expr s_list.emplace(5)")
-        self.expect("expr (int)s_list.top().i", substrs=['(int) $8 = 5'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/stack/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/stack/main.cpp
deleted file mode 100644 (file)
index 0ce9499..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#include <list>
-#include <stack>
-#include <vector>
-
-struct C {
-  // Constructor for testing emplace.
-  C(int i) : i(i) {};
-  int i;
-};
-
-int main(int argc, char **argv) {
-  // std::deque is the default container.
-  std::stack<C> s_deque({{1}, {2}, {3}});
-  std::stack<C, std::vector<C>> s_vector({{1}, {2}, {3}});
-  std::stack<C, std::list<C>> s_list({{1}, {2}, {3}});
-  return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/Makefile
deleted file mode 100644 (file)
index 4915cda..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-# We don't have any standard include directories, so we can't
-# parse the test_common.h header we usually inject as it includes
-# system headers.
-NO_TEST_COMMON_H := 1
-
-CXXFLAGS_EXTRAS = -I $(SRCDIR)/root/usr/include/c++/v1/ -I $(SRCDIR)/root/usr/include/ -nostdinc -nostdinc++
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/TestStdModuleSysroot.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/TestStdModuleSysroot.py
deleted file mode 100644 (file)
index 684e287..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-"""
-Test that we respect the sysroot when building the std module.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-import os
-
-class ImportStdModule(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # We only emulate a fake libc++ in this test and don't use the real libc++,
-    # but we still add the libc++ category so that this test is only run in
-    # test configurations where libc++ is actually supposed to be tested.
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    def test(self):
-        self.build()
-
-        sysroot = os.path.join(os.getcwd(), "root")
-
-        # Set the sysroot.
-        self.runCmd("platform select --sysroot '" + sysroot + "' host", CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        # Call our custom function in our sysroot std module.
-        # If this gives us the correct result, then we used the sysroot.
-        # We rely on the default argument of -123 to make sure we actually have the C++ module.
-        # (We don't have default arguments in the debug information).
-        self.expect("expr std::myabs()", substrs=['(int) $0 = 123'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/main.cpp
deleted file mode 100644 (file)
index c01fadc..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <algorithm>
-
-int main(int argc, char **argv) {
-  libc_struct s;
-  std::vector v;
-  return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/algorithm b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/algorithm
deleted file mode 100644 (file)
index a0cb2f1..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "libc_header.h"
-
-namespace std {
-  // Makes sure we get a support file for this header.
-  struct vector { int i; };
-
-  __attribute__((__nodebug__))
-  inline int myabs(int i = -123) {
-    double nil;
-    return i < 0 ? -i : i;
-  }
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/module.modulemap b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/module.modulemap
deleted file mode 100644 (file)
index 0eb4849..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-module std {
-  module "algorithm" { header "algorithm" export * }
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/libc_header.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/libc_header.h
deleted file mode 100644 (file)
index 47525c9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-struct libc_struct {};
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr-dbg-info-content/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr-dbg-info-content/Makefile
deleted file mode 100644 (file)
index f938f74..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-USE_LIBCPP := 1
-CXX_SOURCES := main.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr-dbg-info-content/TestUniquePtrDbgInfoContent.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr-dbg-info-content/TestUniquePtrDbgInfoContent.py
deleted file mode 100644 (file)
index 9389de9..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-"""
-Test std::unique_ptr functionality with a decl from debug info as content.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestUniquePtrDbgInfoContent(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (int)s->a", substrs=['(int) $0 = 3'])
-        self.expect("expr (int)(s->a = 5)", substrs=['(int) $1 = 5'])
-        self.expect("expr (int)s->a", substrs=['(int) $2 = 5'])
-        self.expect("expr (bool)s", substrs=['(bool) $3 = true'])
-        self.expect("expr s.reset()")
-        self.expect("expr (bool)s", substrs=['(bool) $4 = false'])
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr-dbg-info-content/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr-dbg-info-content/main.cpp
deleted file mode 100644 (file)
index 73664f1..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#include <memory>
-
-struct Foo {
-  int a;
-};
-
-int main(int argc, char **argv) {
-  std::shared_ptr<Foo> s(new Foo);
-  s->a = 3;
-  return s->a; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr/Makefile
deleted file mode 100644 (file)
index f938f74..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-USE_LIBCPP := 1
-CXX_SOURCES := main.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr/TestUniquePtr.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr/TestUniquePtr.py
deleted file mode 100644 (file)
index a0e05b2..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-"""
-Test basic std::unique_ptr functionality.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestUniquePtr(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (int)*s", substrs=['(int) $0 = 3'])
-        self.expect("expr (int)(*s = 5)", substrs=['(int) $1 = 5'])
-        self.expect("expr (int)*s", substrs=['(int) $2 = 5'])
-        self.expect("expr (bool)s", substrs=['(bool) $3 = true'])
-        self.expect("expr s.reset()")
-        self.expect("expr (bool)s", substrs=['(bool) $4 = false'])
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr/main.cpp
deleted file mode 100644 (file)
index cb81754..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <memory>
-
-int main(int argc, char **argv) {
-  std::shared_ptr<int> s(new int);
-  *s = 3;
-  return *s; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-basic/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-basic/Makefile
deleted file mode 100644 (file)
index f938f74..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-USE_LIBCPP := 1
-CXX_SOURCES := main.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-basic/TestBasicVector.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-basic/TestBasicVector.py
deleted file mode 100644 (file)
index 840bacb..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-"""
-Test basic std::vector functionality.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestBasicVector(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 3'])
-        self.expect("expr (int)a.front()", substrs=['(int) $1 = 3'])
-        self.expect("expr (int)a[1]", substrs=['(int) $2 = 1'])
-        self.expect("expr (int)a.back()", substrs=['(int) $3 = 2'])
-
-        self.expect("expr std::sort(a.begin(), a.end())")
-        self.expect("expr (int)a.front()", substrs=['(int) $4 = 1'])
-        self.expect("expr (int)a[1]", substrs=['(int) $5 = 2'])
-        self.expect("expr (int)a.back()", substrs=['(int) $6 = 3'])
-
-        self.expect("expr std::reverse(a.begin(), a.end())")
-        self.expect("expr (int)a.front()", substrs=['(int) $7 = 3'])
-        self.expect("expr (int)a[1]", substrs=['(int) $8 = 2'])
-        self.expect("expr (int)a.back()", substrs=['(int) $9 = 1'])
-
-        self.expect("expr (int)(*a.begin())", substrs=['(int) $10 = 3'])
-        self.expect("expr (int)(*a.rbegin())", substrs=['(int) $11 = 1'])
-
-        self.expect("expr a.pop_back()")
-        self.expect("expr (int)a.back()", substrs=['(int) $12 = 2'])
-        self.expect("expr (size_t)a.size()", substrs=['(size_t) $13 = 2'])
-
-        self.expect("expr (int)a.at(0)", substrs=['(int) $14 = 3'])
-
-        self.expect("expr a.push_back(4)")
-        self.expect("expr (int)a.back()", substrs=['(int) $15 = 4'])
-        self.expect("expr (size_t)a.size()", substrs=['(size_t) $16 = 3'])
-
-        self.expect("expr a.emplace_back(5)")
-        self.expect("expr (int)a.back()", substrs=['(int) $17 = 5'])
-        self.expect("expr (size_t)a.size()", substrs=['(size_t) $18 = 4'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-basic/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-basic/main.cpp
deleted file mode 100644 (file)
index edf130d..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <vector>
-
-int main(int argc, char **argv) {
-  std::vector<int> a = {3, 1, 2};
-  return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-bool/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-bool/Makefile
deleted file mode 100644 (file)
index f938f74..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-USE_LIBCPP := 1
-CXX_SOURCES := main.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-bool/TestBoolVector.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-bool/TestBoolVector.py
deleted file mode 100644 (file)
index 45a2507..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-"""
-Test basic std::vector<bool> functionality.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestBoolVector(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 4'])
-        self.expect("expr (bool)a.front()", substrs=['(bool) $1 = false'])
-        self.expect("expr (bool)a[1]", substrs=['(bool) $2 = true'])
-        self.expect("expr (bool)a.back()", substrs=['(bool) $3 = true'])
-
-        self.expect("expr (bool)(*a.begin())", substrs=['(bool) $4 = false'])
-        self.expect("expr (bool)(*a.rbegin())", substrs=['(bool) $5 = true'])
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-bool/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-bool/main.cpp
deleted file mode 100644 (file)
index 9554401..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <vector>
-
-int main(int argc, char **argv) {
-  std::vector<bool> a = {0, 1, 0, 1};
-  return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-dbg-info-content/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-dbg-info-content/Makefile
deleted file mode 100644 (file)
index f938f74..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-USE_LIBCPP := 1
-CXX_SOURCES := main.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-dbg-info-content/TestDbgInfoContentVector.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-dbg-info-content/TestDbgInfoContentVector.py
deleted file mode 100644 (file)
index 4d51f1b..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-"""
-Test basic std::vector functionality but with a declaration from
-the debug info (the Foo struct) as content.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestDbgInfoContentVector(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 3'])
-        self.expect("expr (int)a.front().a", substrs=['(int) $1 = 3'])
-        self.expect("expr (int)a[1].a", substrs=['(int) $2 = 1'])
-        self.expect("expr (int)a.back().a", substrs=['(int) $3 = 2'])
-
-        self.expect("expr std::reverse(a.begin(), a.end())")
-        self.expect("expr (int)a.front().a", substrs=['(int) $4 = 2'])
-
-        self.expect("expr (int)(a.begin()->a)", substrs=['(int) $5 = 2'])
-        self.expect("expr (int)(a.rbegin()->a)", substrs=['(int) $6 = 3'])
-
-        self.expect("expr a.pop_back()")
-        self.expect("expr (int)a.back().a", substrs=['(int) $7 = 1'])
-        self.expect("expr (size_t)a.size()", substrs=['(size_t) $8 = 2'])
-
-        self.expect("expr (int)a.at(0).a", substrs=['(int) $9 = 2'])
-
-        self.expect("expr a.push_back({4})")
-        self.expect("expr (int)a.back().a", substrs=['(int) $10 = 4'])
-        self.expect("expr (size_t)a.size()", substrs=['(size_t) $11 = 3'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-dbg-info-content/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-dbg-info-content/main.cpp
deleted file mode 100644 (file)
index 24c3fec..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <vector>
-
-struct Foo {
-  int a;
-};
-
-int main(int argc, char **argv) {
-  std::vector<Foo> a = {{3}, {1}, {2}};
-  return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-of-vectors/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-of-vectors/Makefile
deleted file mode 100644 (file)
index f938f74..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-USE_LIBCPP := 1
-CXX_SOURCES := main.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-of-vectors/TestVectorOfVectors.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-of-vectors/TestVectorOfVectors.py
deleted file mode 100644 (file)
index feaeac9..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-"""
-Test std::vector functionality when it's contents are vectors.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestVectorOfVectors(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 2'])
-        self.expect("expr (int)a.front().front()", substrs=['(int) $1 = 1'])
-        self.expect("expr (int)a[1][1]", substrs=['(int) $2 = 2'])
-        self.expect("expr (int)a.back().at(0)", substrs=['(int) $3 = 3'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-of-vectors/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-of-vectors/main.cpp
deleted file mode 100644 (file)
index b5ada90..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <vector>
-
-int main(int argc, char **argv) {
-  std::vector<std::vector<int> > a = {{1, 2, 3}, {3, 2, 1}};
-  return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr-dbg-info-content/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr-dbg-info-content/Makefile
deleted file mode 100644 (file)
index f938f74..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-USE_LIBCPP := 1
-CXX_SOURCES := main.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr-dbg-info-content/TestDbgInfoContentWeakPtr.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr-dbg-info-content/TestDbgInfoContentWeakPtr.py
deleted file mode 100644 (file)
index 5ed3031..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-"""
-Test std::weak_ptr functionality with a decl from debug info as content.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestDbgInfoContentWeakPtr(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (int)w.lock()->a", substrs=['(int) $0 = 3'])
-        self.expect("expr (int)(w.lock()->a = 5)", substrs=['(int) $1 = 5'])
-        self.expect("expr (int)w.lock()->a", substrs=['(int) $2 = 5'])
-        self.expect("expr w.use_count()", substrs=['(long) $3 = 1'])
-        self.expect("expr w.reset()")
-        self.expect("expr w.use_count()", substrs=['(long) $4 = 0'])
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr-dbg-info-content/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr-dbg-info-content/main.cpp
deleted file mode 100644 (file)
index d2c5a62..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#include <memory>
-
-struct Foo {
-  int a;
-};
-
-int main(int argc, char **argv) {
-  std::shared_ptr<Foo> s(new Foo);
-  s->a = 3;
-  std::weak_ptr<Foo> w = s;
-  return s->a; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr/Makefile
deleted file mode 100644 (file)
index f938f74..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-USE_LIBCPP := 1
-CXX_SOURCES := main.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr/TestWeakPtr.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr/TestWeakPtr.py
deleted file mode 100644 (file)
index 7624174..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-"""
-Test basic std::weak_ptr functionality.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestSharedPtr(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (int)*w.lock()", substrs=['(int) $0 = 3'])
-        self.expect("expr (int)(*w.lock() = 5)", substrs=['(int) $1 = 5'])
-        self.expect("expr (int)*w.lock()", substrs=['(int) $2 = 5'])
-        self.expect("expr w.use_count()", substrs=['(long) $3 = 1'])
-        self.expect("expr w.reset()")
-        self.expect("expr w.use_count()", substrs=['(long) $4 = 0'])
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr/main.cpp
deleted file mode 100644 (file)
index 13479eb..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <memory>
-
-int main(int argc, char **argv) {
-  std::shared_ptr<int> s(new int);
-  *s = 3;
-  std::weak_ptr<int> w = s;
-  return *s; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import_builtin_fileid/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import_builtin_fileid/Makefile
deleted file mode 100644 (file)
index b46bd7f..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-OBJC_SOURCES := main.m
-LD_EXTRAS := -framework Cocoa
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import_builtin_fileid/TestImportBuiltinFileID.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import_builtin_fileid/TestImportBuiltinFileID.py
deleted file mode 100644 (file)
index 08b6a8c..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-"""
-They may be cases where an expression will import SourceLocation and if the
-SourceLocation ends up with a FileID that is a built-in we need to copy that
-buffer over correctly.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestImportBuiltinFileID(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    @skipIfDarwinEmbedded
-    @add_test_categories(["gmodules"])
-    def test_import_builtin_fileid(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self, '// break here',
-                lldb.SBFileSpec("main.m", False))
-
-        self.expect("expr int (*DBG_CGImageGetRenderingIntent)(void *) = ((int (*)(void *))CGImageGetRenderingIntent); DBG_CGImageGetRenderingIntent((void *)0x00000000000000);", 
-                substrs=['$0 = 0'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import_builtin_fileid/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/import_builtin_fileid/main.m
deleted file mode 100644 (file)
index ef74940..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#import <Cocoa/Cocoa.h>
-
-int main(int argc, const char * argv[]) {
-
-    return 0; // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/inline-namespace/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/inline-namespace/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/inline-namespace/TestInlineNamespace.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/inline-namespace/TestInlineNamespace.py
deleted file mode 100644 (file)
index b17115b..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-"""
-Test that we correctly handle inline namespaces.
-"""
-
-import lldb
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestInlineNamespace(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        # The 'A::B::f' function must be found via 'A::f' as 'B' is an inline
-        # namespace.
-        self.expect("expr A::f()", substrs=['$0 = 3'])
-        # But we should still find the function when we pretend the inline
-        # namespace is not inline.
-        self.expect("expr A::B::f()", substrs=['$1 = 3'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/inline-namespace/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/inline-namespace/main.cpp
deleted file mode 100644 (file)
index c10b361..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace A {
-  inline namespace B {
-    int f() { return 3; }
-  };
-}
-
-int main(int argc, char **argv) {
-  // Set break point at this line.
-  return A::f();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/invalid-args/TestInvalidArgsExpression.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/invalid-args/TestInvalidArgsExpression.py
deleted file mode 100644 (file)
index e0ede0a..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-
-class InvalidArgsExpressionTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    def test_invalid_lang(self):
-        self.expect("expression -l foo --", error=True,
-                    substrs=["error: unknown language type: 'foo' for expression"])
-
-    @no_debug_info_test
-    def test_invalid_all_thread(self):
-        self.expect("expression -a foo --", error=True,
-                    substrs=['error: invalid all-threads value setting: "foo"'])
-
-    @no_debug_info_test
-    def test_invalid_ignore_br(self):
-        self.expect("expression -i foo --", error=True,
-                    substrs=['error: could not convert "foo" to a boolean value.'])
-
-    @no_debug_info_test
-    def test_invalid_allow_jit(self):
-        self.expect("expression -j foo --", error=True,
-                    substrs=['error: could not convert "foo" to a boolean value.'])
-
-    @no_debug_info_test
-    def test_invalid_timeout(self):
-        self.expect("expression -t foo --", error=True,
-                    substrs=['error: invalid timeout setting "foo"'])
-
-        self.expect("expression -t \"\" --", error=True,
-                    substrs=['error: invalid timeout setting ""'])
-
-    @no_debug_info_test
-    def test_invalid_unwind(self):
-        self.expect("expression -u foo --", error=True,
-                    substrs=['error: could not convert "foo" to a boolean value.'])
-
-    @no_debug_info_test
-    def test_invalid_fixits(self):
-        self.expect("expression -X foo --", error=True,
-                    substrs=['error: could not convert "foo" to a boolean value.'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter-phi-nodes/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter-phi-nodes/Makefile
deleted file mode 100644 (file)
index a1f689e..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-\r
-CXX_SOURCES := main.cpp\r
-\r
-include Makefile.rules\r
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter-phi-nodes/TestIRInterpreterPHINodes.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter-phi-nodes/TestIRInterpreterPHINodes.py
deleted file mode 100644 (file)
index 20a9477..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-"""
-Test PHI nodes work in the IR interpreter.
-"""
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class IRInterpreterPHINodesTestCase(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_phi_node_support(self):
-        """Test support for PHI nodes in the IR interpreter."""
-
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd('file ' + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break on the first assignment to i
-        line = line_number('main.cpp', 'i = 5')
-        lldbutil.run_break_set_by_file_and_line(
-            self, 'main.cpp', line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd('run', RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint
-        self.expect('thread list', STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped', 'stop reason = breakpoint'])
-
-        self.runCmd('s')
-
-        # The logical 'or' causes a PHI node to be generated. Execute without JIT
-        # to test that the interpreter can handle this
-        self.expect('expr -j 0 -- i == 3 || i == 5', substrs=['true'])
-
-        self.runCmd('s')
-        self.expect('expr -j 0 -- i == 3 || i == 5', substrs=['false'])
-        self.runCmd('s')
-        self.expect('expr -j 0 -- i == 3 || i == 5', substrs=['true'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter-phi-nodes/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter-phi-nodes/main.cpp
deleted file mode 100644 (file)
index 8e181ae..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-int main()
-{
-    int i;
-    i = 5;
-    i = 2;
-    i = 3;
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter/Makefile
deleted file mode 100644 (file)
index 00a9da0..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-default: a.out
-
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter/TestIRInterpreter.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter/TestIRInterpreter.py
deleted file mode 100644 (file)
index dd1308b..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-"""
-Test the IR interpreter
-"""
-
-
-import unittest2
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class IRInterpreterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break for main.c.
-        self.line = line_number('main.c',
-                                '// Set breakpoint here')
-
-        # Disable confirmation prompt to avoid infinite wait
-        self.runCmd("settings set auto-confirm true")
-        self.addTearDownHook(
-            lambda: self.runCmd("settings clear auto-confirm"))
-
-    def build_and_run(self):
-        """Test the IR interpreter"""
-        self.build()
-
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", self.line, num_expected_locations=1, loc_exact=False)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-    @add_test_categories(['pyapi'])
-    # getpid() is POSIX, among other problems, see bug
-    @expectedFailureAll(
-        oslist=['windows'],
-        bugnumber="http://llvm.org/pr21765")
-    @expectedFailureNetBSD
-    @expectedFailureAll(
-        oslist=['linux'],
-        archs=['arm'],
-        bugnumber="llvm.org/pr27868")
-    def test_ir_interpreter(self):
-        self.build_and_run()
-
-        options = lldb.SBExpressionOptions()
-        options.SetLanguage(lldb.eLanguageTypeC_plus_plus)
-
-        set_up_expressions = ["int $i = 9", "int $j = 3", "int $k = 5"]
-
-        expressions = ["$i + $j",
-                       "$i - $j",
-                       "$i * $j",
-                       "$i / $j",
-                       "$i % $k",
-                       "$i << $j",
-                       "$i & $j",
-                       "$i | $j",
-                       "$i ^ $j"]
-
-        for expression in set_up_expressions:
-            self.frame().EvaluateExpression(expression, options)
-
-        for expression in expressions:
-            interp_expression = expression
-            jit_expression = "(int)getpid(); " + expression
-
-            interp_result = self.frame().EvaluateExpression(
-                interp_expression, options).GetValueAsSigned()
-            jit_result = self.frame().EvaluateExpression(
-                jit_expression, options).GetValueAsSigned()
-
-            self.assertEqual(
-                interp_result,
-                jit_result,
-                "While evaluating " +
-                expression)
-
-    def test_type_conversions(self):
-        target = self.dbg.GetDummyTarget()
-        short_val = target.EvaluateExpression("(short)-1")
-        self.assertEqual(short_val.GetValueAsSigned(), -1)
-        long_val = target.EvaluateExpression("(long) "+ short_val.GetName())
-        self.assertEqual(long_val.GetValueAsSigned(), -1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter/main.c
deleted file mode 100644 (file)
index 31204b2..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <stdio.h>
-
-int main()
-{
-    printf("This is a dummy\n"); // Set breakpoint here   
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/issue_11588/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/issue_11588/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/issue_11588/Test11588.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/issue_11588/Test11588.py
deleted file mode 100644 (file)
index abff18f..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-"""
-Test the solution to issue 11581.
-valobj.AddressOf() returns None when an address is
-expected in a SyntheticChildrenProvider
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class Issue11581TestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
-    def test_11581_commands(self):
-        # This is the function to remove the custom commands in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type synthetic clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        """valobj.AddressOf() should return correct values."""
-        self.build()
-
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                              'Set breakpoint here.',
-                                              lldb.SBFileSpec("main.cpp", False))
-        self.runCmd("command script import --allow-reload s11588.py")
-        self.runCmd(
-            "type synthetic add --python-class s11588.Issue11581SyntheticProvider StgClosure")
-
-        self.expect("expr --show-types -- *((StgClosure*)(r14-1))",
-                    substrs=["(StgClosure) $",
-                             "(StgClosure *) &$", "0x",
-                             "addr = ",
-                             "load_address = "])
-
-        # register r14 is an x86_64 extension let's skip this part of the test
-        # if we are on a different architecture
-        if self.getArchitecture() == 'x86_64':
-            target = self.dbg.GetSelectedTarget()
-            process = target.GetProcess()
-            frame = process.GetSelectedThread().GetSelectedFrame()
-            pointer = frame.FindVariable("r14")
-            addr = pointer.GetValueAsUnsigned(0)
-            self.assertTrue(addr != 0, "could not read pointer to StgClosure")
-            addr = addr - 1
-            self.runCmd("register write r14 %d" % addr)
-            self.expect(
-                "register read r14", substrs=[
-                    "0x", hex(addr)[
-                        2:].rstrip("L")])  # Remove trailing 'L' if it exists
-            self.expect("expr --show-types -- *(StgClosure*)$r14",
-                        substrs=["(StgClosure) $",
-                                 "(StgClosure *) &$", "0x",
-                                 "addr = ",
-                                 "load_address = ",
-                                 hex(addr)[2:].rstrip("L"),
-                                 str(addr)])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/issue_11588/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/issue_11588/main.cpp
deleted file mode 100644 (file)
index 4f9ea3a..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-//
-//  11588.cpp
-//
-
-#include <iostream>
-
-class StgInfoTable {};
-
-class StgHeader
-{
-private:
-       StgInfoTable* info;
-public:
-       StgHeader()
-       {
-               info = new StgInfoTable();
-       }
-       ~StgHeader()
-       {
-               delete info;
-       }
-};
-
-class StgClosure
-{
-private:
-       StgHeader header;
-       StgClosure* payload[1];
-public:
-       StgClosure(bool make_payload = true)
-       {
-               if (make_payload)
-                       payload[0] = new StgClosure(false);
-               else
-                       payload[0] = NULL;
-       }
-       ~StgClosure()
-       {
-               if (payload[0])
-                       delete payload[0];
-       }
-};
-
-typedef unsigned long long int ptr_type;
-
-int main()
-{
-       StgClosure* r14_ = new StgClosure();
-       r14_ = (StgClosure*)(((ptr_type)r14_ | 0x01)); // set the LSB to 1 for tagging
-       ptr_type r14 = (ptr_type)r14_;
-       int x = 0;
-       x = 3;
-       return (x-1); // Set breakpoint here.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/issue_11588/s11588.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/issue_11588/s11588.py
deleted file mode 100644 (file)
index 51c2042..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-class Issue11581SyntheticProvider(object):
-
-    def __init__(self, valobj, dict):
-        self.valobj = valobj
-        self.addrOf = valobj.AddressOf()
-        self.addr = valobj.GetAddress()
-        self.load_address = valobj.GetLoadAddress()
-
-    def num_children(self):
-        return 3
-
-    def get_child_at_index(self, index):
-        if index == 0:
-            return self.addrOf
-        if index == 1:
-            return self.valobj.CreateValueFromExpression(
-                "addr", str(self.addr))
-        if index == 2:
-            return self.valobj.CreateValueFromExpression(
-                "load_address", str(self.load_address))
-
-    def get_child_index(self, name):
-        if name == "addrOf":
-            return 0
-        if name == "addr":
-            return 1
-        if name == "load_address":
-            return 2
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/macros/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/macros/Makefile
deleted file mode 100644 (file)
index a2af5c4..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-CXX_SOURCES := main.cpp
-
-DEBUG_INFO_FLAG = -g3 -gdwarf-5
-
-# GCC produces incorrect .debug_macro section when "-include" option is used:
-# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93075.
-NO_TEST_COMMON_H := 1
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/macros/TestMacros.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/macros/TestMacros.py
deleted file mode 100644 (file)
index aed83e2..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestMacros(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(
-        compiler="clang",
-        bugnumber="clang does not emit .debug_macro[.dwo] sections.")
-    @expectedFailureAll(
-        debug_info="dwo",
-        bugnumber="GCC produces multiple .debug_macro.dwo sections and the spec is unclear as to what it means")
-    @expectedFailureAll(
-        hostoslist=["windows"],
-        compiler="gcc",
-        triple='.*-android')
-    @expectedFailureAll(
-        compiler="gcc", compiler_version=['<', '5.1'],
-        bugnumber=".debug_macro was introduced in DWARF 5, GCC supports it since version 5.1")
-    def test_expr_with_macros(self):
-        self.build()
-
-        # Get main source file
-        src_file = "main.cpp"
-        hdr_file = "macro1.h"
-        src_file_spec = lldb.SBFileSpec(src_file)
-        self.assertTrue(src_file_spec.IsValid(), "Main source file")
-
-        (target, process, thread, bp1) = lldbutil.run_to_source_breakpoint(
-            self, "Break here", src_file_spec)
-
-        # Get frame for current thread
-        frame = thread.GetSelectedFrame()
-
-        result = frame.EvaluateExpression("MACRO_1")
-        self.assertTrue(
-            result.IsValid() and result.GetValue() == "100",
-            "MACRO_1 = 100")
-
-        result = frame.EvaluateExpression("MACRO_2")
-        self.assertTrue(
-            result.IsValid() and result.GetValue() == "200",
-            "MACRO_2 = 200")
-
-        result = frame.EvaluateExpression("ONE")
-        self.assertTrue(
-            result.IsValid() and result.GetValue() == "1",
-            "ONE = 1")
-
-        result = frame.EvaluateExpression("TWO")
-        self.assertTrue(
-            result.IsValid() and result.GetValue() == "2",
-            "TWO = 2")
-
-        result = frame.EvaluateExpression("THREE")
-        self.assertTrue(
-            result.IsValid() and result.GetValue() == "3",
-            "THREE = 3")
-
-        result = frame.EvaluateExpression("FOUR")
-        self.assertTrue(
-            result.IsValid() and result.GetValue() == "4",
-            "FOUR = 4")
-
-        result = frame.EvaluateExpression("HUNDRED")
-        self.assertTrue(
-            result.IsValid() and result.GetValue() == "100",
-            "HUNDRED = 100")
-
-        result = frame.EvaluateExpression("THOUSAND")
-        self.assertTrue(
-            result.IsValid() and result.GetValue() == "1000",
-            "THOUSAND = 1000")
-
-        result = frame.EvaluateExpression("MILLION")
-        self.assertTrue(result.IsValid() and result.GetValue()
-                        == "1000000", "MILLION = 1000000")
-
-        result = frame.EvaluateExpression("MAX(ONE, TWO)")
-        self.assertTrue(
-            result.IsValid() and result.GetValue() == "2",
-            "MAX(ONE, TWO) = 2")
-
-        result = frame.EvaluateExpression("MAX(THREE, TWO)")
-        self.assertTrue(
-            result.IsValid() and result.GetValue() == "3",
-            "MAX(THREE, TWO) = 3")
-
-        # Get the thread of the process
-        thread.StepOver()
-
-        # Get frame for current thread
-        frame = thread.GetSelectedFrame()
-
-        result = frame.EvaluateExpression("MACRO_2")
-        self.assertTrue(
-            result.GetError().Fail(),
-            "Printing MACRO_2 fails in the mail file")
-
-        result = frame.EvaluateExpression("FOUR")
-        self.assertTrue(
-            result.GetError().Fail(),
-            "Printing FOUR fails in the main file")
-
-        thread.StepInto()
-
-        # Get frame for current thread
-        frame = thread.GetSelectedFrame()
-
-        result = frame.EvaluateExpression("ONE")
-        self.assertTrue(
-            result.IsValid() and result.GetValue() == "1",
-            "ONE = 1")
-
-        result = frame.EvaluateExpression("MAX(ONE, TWO)")
-        self.assertTrue(
-            result.IsValid() and result.GetValue() == "2",
-            "MAX(ONE, TWO) = 2")
-
-        # This time, MACRO_1 and MACRO_2 are not visible.
-        result = frame.EvaluateExpression("MACRO_1")
-        self.assertTrue(result.GetError().Fail(),
-                        "Printing MACRO_1 fails in the header file")
-
-        result = frame.EvaluateExpression("MACRO_2")
-        self.assertTrue(result.GetError().Fail(),
-                        "Printing MACRO_2 fails in the header file")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/macros/macro1.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/macros/macro1.h
deleted file mode 100644 (file)
index e026bc0..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-
-#include "macro2.h"
-
-#define ONE 1
-#define TWO 2
-#define THREE 3
-#define FOUR 4
-
-class Simple
-{
-public:
-    int
-    Method()
-    {
-        return ONE + TWO;
-    };
-};
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/macros/macro2.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/macros/macro2.h
deleted file mode 100644 (file)
index cec6efb..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#define HUNDRED 100
-#define THOUSAND 1000
-#define MILLION 1000000
-
-#define MAX(a, b)\
-((a) > (b) ?\
-  (a):\
-  (b))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/macros/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/macros/main.cpp
deleted file mode 100644 (file)
index f2c2c10..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#include "macro1.h"
-
-#define MACRO_1 100
-#define MACRO_2 200
-
-int
-main ()
-{
-  int a = ONE + TWO; // Break here
-
-  #undef MACRO_2
-  #undef FOUR
-
-  return Simple().Method();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-completion/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-completion/Makefile
deleted file mode 100644 (file)
index c9319d6..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-C_SOURCES := main.c
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-completion/TestMultilineCompletion.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-completion/TestMultilineCompletion.py
deleted file mode 100644 (file)
index 9b2b712..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-"""
-Test completion for multiline expressions.
-"""
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.lldbpexpect import PExpectTest
-
-class MultilineCompletionTest(PExpectTest):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # PExpect uses many timeouts internally and doesn't play well
-    # under ASAN on a loaded machine..
-    @skipIfAsan
-    @skipIfRemote  # test is written to explicitly "run" the binary
-    @skipIfEditlineSupportMissing
-    def test_basic_completion(self):
-        """Test that we can complete a simple multiline expression"""
-        self.build()
-
-        self.launch(executable=self.getBuildArtifact("a.out"), dimensions=(100,500))
-        self.expect("b main", substrs=["Breakpoint 1", "address ="])
-        self.expect("run", substrs=["stop reason ="])
-
-        self.child.sendline("expr")
-        self.child.expect_exact("terminate with an empty line to evaluate")
-        self.child.send("to_\t")
-        self.child.expect_exact("to_complete")
-
-        self.child.send("\n\n")
-        self.expect_prompt()
-
-        self.quit()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-completion/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-completion/main.c
deleted file mode 100644 (file)
index 6dd3616..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-int main(int argc, char **argv) {
-  int to_complete = 0;
-  return to_complete;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-navigation/TestMultilineNavigation.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-navigation/TestMultilineNavigation.py
deleted file mode 100644 (file)
index 743e799..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-"""
-Tests navigating in the multiline expression editor.
-"""
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.lldbpexpect import PExpectTest
-
-class TestCase(PExpectTest):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    arrow_up = "\033[A"
-    arrow_down = "\033[B"
-
-    # PExpect uses many timeouts internally and doesn't play well
-    # under ASAN on a loaded machine..
-    @skipIfAsan
-    @skipIfEditlineSupportMissing
-    def test_nav_arrow_up(self):
-        """Tests that we can navigate back to the previous line with the up arrow"""
-        self.launch()
-
-        # Start multiline expression mode by just running 'expr'
-        self.child.sendline("expr")
-        self.child.expect_exact("terminate with an empty line to evaluate")
-        # Create a simple integer expression '123' and press enter.
-        self.child.send("123\n")
-        # We should see the prompt for the second line of our expression.
-        self.child.expect_exact("2: ")
-        # Go back to the first line and change 123 to 124.
-        # Then press enter twice to evaluate our expression.
-        self.child.send(self.arrow_up + "\b4\n\n")
-        # The result of our expression should be 124 (our edited expression)
-        # and not 123 (the one we initially typed).
-        self.child.expect_exact("(int) $0 = 124")
-
-        self.quit()
-
-    @skipIfAsan
-    @skipIfEditlineSupportMissing
-    def test_nav_arrow_down(self):
-        """Tests that we can navigate to the next line with the down arrow"""
-        self.launch()
-
-        # Start multiline expression mode by just running 'expr'
-        self.child.sendline("expr")
-        self.child.expect_exact("terminate with an empty line to evaluate")
-        # Create a simple integer expression '111' and press enter.
-        self.child.send("111\n")
-        # We should see the prompt for the second line of our expression.
-        self.child.expect_exact("2: ")
-        # Create another simple integer expression '222'.
-        self.child.send("222")
-        # Go back to the first line and change '111' to '111+' to make
-        # an addition operation that spans two lines. We need to go up to
-        # test that we can go back down again.
-        self.child.send(self.arrow_up + "+")
-        # Go back down to our second line and change '222' to '223'
-        # so that the full expression is now '111+\n223'.
-        # Then press enter twice to evaluate the expression.
-        self.child.send(self.arrow_down + "\b3\n\n")
-        # The result of our expression '111 + 223' should be '334'.
-        # If the expression is '333' then arrow down failed to get
-        # us back to the second line.
-        self.child.expect_exact("(int) $0 = 334")
-
-        self.quit()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_cpp_and_c/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_cpp_and_c/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_cpp_and_c/TestNamespaceLocalVarSameNameCppAndC.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_cpp_and_c/TestNamespaceLocalVarSameNameCppAndC.py
deleted file mode 100644 (file)
index ab2ddd0..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestNamespaceLocalVarSameNameCppAndC(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    @add_test_categories(["gmodules"])
-    def test_namespace_local_var_same_name_cpp_and_c(self):
-        self.build()
-
-        (self.target, self.process, _, bkpt) = lldbutil.run_to_source_breakpoint(self, '// break here',
-                lldb.SBFileSpec("main.cpp", False))
-
-        self.expect("expr error",
-                substrs=['(int) $0 = 1'])
-
-        lldbutil.continue_to_breakpoint(self.process, bkpt)
-
-        self.expect("expr error",
-                substrs=['(int) $1 = 1'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_cpp_and_c/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_cpp_and_c/main.cpp
deleted file mode 100644 (file)
index 5e8237e..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-namespace error {
-int x;
-}
-
-struct A {
-  void foo() {
-    int error = 1;
-
-    return; // break here
-  }
-};
-
-int main() {
-  int error = 1;
-
-  A a;
-
-  a.foo();
-
-  return 0; // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_obj_c/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_obj_c/Makefile
deleted file mode 100644 (file)
index 4d12ff1..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-OBJCXX_SOURCES := main.mm util.mm
-
-
-LD_EXTRAS := -framework Foundation
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_obj_c/TestNamespaceLocalVarSameNameObjC.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_obj_c/TestNamespaceLocalVarSameNameObjC.py
deleted file mode 100644 (file)
index eb894cc..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestNamespaceLocalVarSameNameObjC(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    @add_test_categories(["gmodules"])
-    def test_namespace_local_var_same_name_obj_c(self):
-        self.build()
-
-        (self.target, self.process, _, bkpt) = lldbutil.run_to_source_breakpoint(self, '// break here',
-                lldb.SBFileSpec("util.mm", False))
-
-        self.expect("expr error",
-                substrs=['(NSError *) $0 ='])
-
-        lldbutil.continue_to_breakpoint(self.process, bkpt)
-
-        self.expect("expr error",
-                substrs=['(NSError *) $1 ='])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_obj_c/main.mm b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_obj_c/main.mm
deleted file mode 100644 (file)
index 70e9598..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#import <Foundation/Foundation.h>
-@interface Util : NSObject
-+ (void)debugPrintErrorStatic;
-- (void)debugPrintError;
-@end
-
-int main(int argc, const char * argv[]) {
-  [Util debugPrintErrorStatic];
-
-  Util *u = [[Util alloc] init];
-
-  [u debugPrintError];
-
-  return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_obj_c/util.mm b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_obj_c/util.mm
deleted file mode 100644 (file)
index 11c9c14..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#import <Foundation/Foundation.h>
-
-namespace error {
-int blah;
-}
-
-@interface Util : NSObject
-+ (void)debugPrintErrorStatic;
-- (void)debugPrintError;
-@end
-
-@implementation Util
-+ (void)debugPrintErrorStatic {
-  NSError* error = [NSError errorWithDomain:NSURLErrorDomain code:-1 userInfo:nil];
-  NSLog(@"xxx, error = %@", error); // break here
-}
-
-- (void)debugPrintError {
-  NSError* error = [NSError errorWithDomain:NSURLErrorDomain code:-1 userInfo:nil];
-  NSLog(@"xxx, error = %@", error); // break here
-}
-@end
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/no-deadlock/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/no-deadlock/Makefile
deleted file mode 100644 (file)
index 4b3467b..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-CXX_SOURCES := locking.cpp
-CXXFLAGS_EXTRAS := -std=c++11
-ENABLE_THREADS := YES
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/no-deadlock/TestExprDoesntBlock.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/no-deadlock/TestExprDoesntBlock.py
deleted file mode 100644 (file)
index d7d9633..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-"""
-Test that expr will time out and allow other threads to run if it blocks.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ExprDoesntDeadlockTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr17946')
-    @add_test_categories(["basic_process"])
-    def test_with_run_command(self):
-        """Test that expr will time out and allow other threads to run if it blocks."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create a breakpoint at source line before call_me_to_get_lock
-        # gets called.
-
-        main_file_spec = lldb.SBFileSpec("locking.cpp")
-        breakpoint = target.BreakpointCreateBySourceRegex(
-            'Break here', main_file_spec)
-        if self.TraceOn():
-            print("breakpoint:", breakpoint)
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Frame #0 should be on self.line1 and the break condition should hold.
-        from lldbsuite.test.lldbutil import get_stopped_thread
-        thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint condition")
-
-        frame0 = thread.GetFrameAtIndex(0)
-
-        var = frame0.EvaluateExpression("call_me_to_get_lock(get_int())")
-        self.assertTrue(var.IsValid())
-        self.assertEqual(var.GetValueAsSigned(0), 567)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/no-deadlock/locking.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/no-deadlock/locking.cpp
deleted file mode 100644 (file)
index 8288a66..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-#include <stdio.h>
-#include <thread>
-#include <mutex>
-#include <condition_variable>
-
-std::mutex contended_mutex;
-
-std::mutex control_mutex;
-std::condition_variable  control_condition;
-
-std::mutex thread_started_mutex;
-std::condition_variable  thread_started_condition;
-
-// This function runs in a thread.  The locking dance is to make sure that 
-// by the time the main thread reaches the pthread_join below, this thread
-// has for sure acquired the contended_mutex.  So then the call_me_to_get_lock
-// function will block trying to get the mutex, and only succeed once it
-// signals this thread, then lets it run to wake up from the cond_wait and
-// release the mutex.
-
-void
-lock_acquirer_1 (void)
-{
-  std::unique_lock<std::mutex> contended_lock(contended_mutex);
-  
-  // Grab this mutex, that will ensure that the main thread
-  // is in its cond_wait for it (since that's when it drops the mutex.
-
-  thread_started_mutex.lock();
-  thread_started_mutex.unlock();
-
-  // Now signal the main thread that it can continue, we have the contended lock
-  // so the call to call_me_to_get_lock won't make any progress till  this
-  // thread gets a chance to run.
-
-  std::unique_lock<std::mutex> control_lock(control_mutex);
-
-  thread_started_condition.notify_all();
-
-  control_condition.wait(control_lock);
-
-}
-
-int
-call_me_to_get_lock (int ret_val)
-{
-  control_condition.notify_all();
-  contended_mutex.lock();
-  return ret_val;
-}
-
-int
-get_int() {
-  return 567;
-}
-
-int main ()
-{
-  std::unique_lock<std::mutex> thread_started_lock(thread_started_mutex);
-
-  std::thread thread_1(lock_acquirer_1);
-
-  thread_started_condition.wait(thread_started_lock);
-
-  control_mutex.lock();
-  control_mutex.unlock();
-
-  // Break here.  At this point the other thread will have the contended_mutex,
-  // and be sitting in its cond_wait for the control condition.  So there is
-  // no way that our by-hand calling of call_me_to_get_lock will proceed
-  // without running the first thread at least somewhat.
-
-  int result = call_me_to_get_lock(get_int());
-  thread_1.join();
-
-  return 0;
-
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/options/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/options/Makefile
deleted file mode 100644 (file)
index 7df2269..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp foo.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/options/TestExprOptions.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/options/TestExprOptions.py
deleted file mode 100644 (file)
index 833833a..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-"""
-Test expression command options.
-
-Test cases:
-
-o test_expr_options:
-  Test expression command options.
-"""
-
-
-
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-
-
-class ExprOptionsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-        self.main_source = "main.cpp"
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-        self.line = line_number('main.cpp', '// breakpoint_in_main')
-        self.exe = self.getBuildArtifact("a.out")
-
-    def test_expr_options(self):
-        """These expression command options should work as expected."""
-        self.build()
-
-        # Set debugger into synchronous mode
-        self.dbg.SetAsync(False)
-
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
-            self, '// breakpoint_in_main', self.main_source_spec)
-
-        frame = thread.GetFrameAtIndex(0)
-        options = lldb.SBExpressionOptions()
-
-        # test --language on C++ expression using the SB API's
-
-        # Make sure we can evaluate a C++11 expression.
-        val = frame.EvaluateExpression('foo != nullptr')
-        self.assertTrue(val.IsValid())
-        self.assertTrue(val.GetError().Success())
-        self.DebugSBValue(val)
-
-        # Make sure it still works if language is set to C++11:
-        options.SetLanguage(lldb.eLanguageTypeC_plus_plus_11)
-        val = frame.EvaluateExpression('foo != nullptr', options)
-        self.assertTrue(val.IsValid())
-        self.assertTrue(val.GetError().Success())
-        self.DebugSBValue(val)
-
-        # Make sure it fails if language is set to C:
-        options.SetLanguage(lldb.eLanguageTypeC)
-        val = frame.EvaluateExpression('foo != nullptr', options)
-        self.assertTrue(val.IsValid())
-        self.assertFalse(val.GetError().Success())
-
-    @skipIfDarwin
-    def test_expr_options_lang(self):
-        """These expression language options should work as expected."""
-        self.build()
-
-        # Set debugger into synchronous mode
-        self.dbg.SetAsync(False)
-
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
-            self, '// breakpoint_in_main', self.main_source_spec)
-
-        frame = thread.GetFrameAtIndex(0)
-        options = lldb.SBExpressionOptions()
-
-        # Make sure we can retrieve `id` variable if language is set to C++11:
-        options.SetLanguage(lldb.eLanguageTypeC_plus_plus_11)
-        val = frame.EvaluateExpression('id == 0', options)
-        self.assertTrue(val.IsValid())
-        self.assertTrue(val.GetError().Success())
-        self.DebugSBValue(val)
-
-        # Make sure we can't retrieve `id` variable if language is set to ObjC:
-        options.SetLanguage(lldb.eLanguageTypeObjC)
-        val = frame.EvaluateExpression('id == 0', options)
-        self.assertTrue(val.IsValid())
-        self.assertFalse(val.GetError().Success())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/options/foo.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/options/foo.cpp
deleted file mode 100644 (file)
index 8a5a6a2..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-namespace ns {
-    int func(void)
-    {
-        return 0;
-    }
-}
-
-extern "C" int foo(void)
-{
-    return ns::func();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/options/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/options/main.cpp
deleted file mode 100644 (file)
index 0d30c79..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-extern "C" int foo(void);
-static int static_value = 0;
-static int id = 1234;
-
-int
-bar()
-{
-    static_value++;
-    id++;
-    return static_value + id;
-}
-
-int main (int argc, char const *argv[])
-{
-    bar(); // breakpoint_in_main
-    return foo();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persist_objc_pointeetype/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persist_objc_pointeetype/Makefile
deleted file mode 100644 (file)
index 69a2ad6..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-OBJC_SOURCES := main.m
-
-
-LD_EXTRAS := -framework Foundation -framework CloudKit
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persist_objc_pointeetype/TestPersistObjCPointeeType.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persist_objc_pointeetype/TestPersistObjCPointeeType.py
deleted file mode 100644 (file)
index 577753c..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-"""
-Test that we can p *objcObject
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class PersistObjCPointeeType(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break for main.cpp.
-        self.line = line_number('main.m', '// break here')
-
-    @skipUnlessDarwin
-    @skipIf(archs=["i386", "i686"])
-    @skipIf(debug_info="gmodules", archs=['arm64', 'armv7', 'armv7k', 'arm64e', 'arm64_32'])  # compile error with gmodules for iOS
-    def test_with(self):
-        """Test that we can p *objcObject"""
-        self.build()
-
-        def cleanup():
-            pass
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.m", self.line, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.expect("p *self", substrs=['_sc_name = nil',
-                                        '_sc_name2 = nil',
-                                        '_sc_name3 = nil',
-                                        '_sc_name4 = nil',
-                                        '_sc_name5 = nil',
-                                        '_sc_name6 = nil',
-                                        '_sc_name7 = nil',
-                                        '_sc_name8 = nil'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persist_objc_pointeetype/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persist_objc_pointeetype/main.m
deleted file mode 100644 (file)
index a2b6b70..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
-clang -g ExtendSuperclass.m -o ExtendSuperclass -framework Foundation -framework ProtectedCloudStorage -F/System/Library/PrivateFrameworks/ -framework CloudKit && ./ExtendSuperclass
-*/
-#include <assert.h>
-#import <Foundation/Foundation.h>
-#import <CloudKit/CloudKit.h>
-
-#define SuperClass CKDatabase
-
-@interface SubClass : SuperClass
-@end
-
-// class extension
-@interface SuperClass ()
-@property (nonatomic, strong)     NSString             *_sc_name;
-@property (nonatomic, strong)     NSString             *_sc_name2;
-@property (nonatomic, strong)     NSString             *_sc_name3;
-@property (nonatomic, strong)     NSString             *_sc_name4;
-@property (nonatomic, strong)     NSString             *_sc_name5;
-@property (nonatomic, strong)     NSString             *_sc_name6;
-@property (nonatomic, strong)     NSString             *_sc_name7;
-@property (nonatomic, strong)     NSString             *_sc_name8;
-@end
-
-@implementation SuperClass (MySuperClass)
-- (id)initThatDoesNotAssert
-{
-    return [super init];
-}
-@end
-
-@implementation SubClass
-- (id)initThatDoesNotAssert
-{
-    assert(_sc_name == nil);
-    assert(_sc_name2 == nil);
-    assert(_sc_name3 == nil);
-    assert(_sc_name4 == nil);
-    assert(_sc_name5 == nil);
-    assert(_sc_name6 == nil);
-    assert(_sc_name7 == nil);
-    assert(_sc_name8 == nil); // break here
-
-    if ((self = [super _initWithContainer:(CKContainer*)@"foo" scope:0xff])) {
-        assert(_sc_name == nil);
-        assert(_sc_name2 == nil);
-        assert(_sc_name3 == nil);
-        assert(_sc_name4 == nil);
-        assert(_sc_name5 == nil);
-        assert(_sc_name6 == nil);
-        assert(_sc_name7 == nil);
-        assert(_sc_name8 == nil);
-
-        _sc_name = @"empty";
-    }
-    return self;
-}
-@synthesize _sc_name;
-@synthesize _sc_name2;
-@synthesize _sc_name3;
-@synthesize _sc_name4;
-@synthesize _sc_name5;
-@synthesize _sc_name6;
-@synthesize _sc_name7;
-@synthesize _sc_name8;
-- (void)foo:(NSString*)bar { self._sc_name = bar; }
-- (NSString*)description { return [NSString stringWithFormat:@"%p: %@", self, self._sc_name]; }
-@end
-
-int main()
-{
-    SubClass *sc = [[SubClass alloc] initThatDoesNotAssert];
-    NSLog(@"%@", sc);
-    [sc foo:@"bar"];
-    NSLog(@"%@", sc);
-    sc._sc_name = @"bar2";
-    NSLog(@"%@", sc);
-    NSLog(@"%@", sc._sc_name);
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_ptr_update/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_ptr_update/Makefile
deleted file mode 100644 (file)
index 549336d..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
-
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_ptr_update/TestPersistentPtrUpdate.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_ptr_update/TestPersistentPtrUpdate.py
deleted file mode 100644 (file)
index 5660113..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-"""
-Test that we can have persistent pointer variables
-"""
-
-
-
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbtest import *
-
-
-class PersistentPtrUpdateTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test(self):
-        """Test that we can have persistent pointer variables"""
-        self.build()
-
-        def cleanup():
-            pass
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        self.runCmd('break set -p here')
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.runCmd("expr void* $foo = 0")
-
-        self.runCmd("continue")
-
-        self.expect("expr $foo", substrs=['$foo', '0x0'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_ptr_update/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_ptr_update/main.c
deleted file mode 100644 (file)
index 7334696..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-void* foo(void *p)
-{
-  return p; // break here
-}
-
-int main() {
-  while (1) {
-    foo(0);
-  }
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_types/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_types/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_types/TestNestedPersistentTypes.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_types/TestNestedPersistentTypes.py
deleted file mode 100644 (file)
index 973eade..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-"""
-Test that nested persistent types work.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class NestedPersistentTypesTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_persistent_types(self):
-        """Test that nested persistent types work."""
-        self.build()
-
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("breakpoint set --name main")
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.runCmd("expression struct $foo { int a; int b; };")
-
-        self.runCmd(
-            "expression struct $bar { struct $foo start; struct $foo end; };")
-
-        self.runCmd("expression struct $bar $my_bar = {{ 2, 3 }, { 4, 5 }};")
-
-        self.expect("expression $my_bar",
-                    substrs=['a = 2', 'b = 3', 'a = 4', 'b = 5'])
-
-        self.expect("expression $my_bar.start.b",
-                    substrs=['(int)', '3'])
-
-        self.expect("expression $my_bar.end.b",
-                    substrs=['(int)', '5'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_types/TestPersistentTypes.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_types/TestPersistentTypes.py
deleted file mode 100644 (file)
index e60a768..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-"""
-Test that lldb persistent types works correctly.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class PersistenttypesTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_persistent_types(self):
-        """Test that lldb persistent types works correctly."""
-        self.build()
-
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("breakpoint set --name main")
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.runCmd("expression struct $foo { int a; int b; };")
-
-        self.expect(
-            "expression struct $foo $my_foo; $my_foo.a = 2; $my_foo.b = 3;",
-            startstr="(int) $0 = 3")
-
-        self.expect("expression $my_foo",
-                    substrs=['a = 2', 'b = 3'])
-
-        self.runCmd("expression typedef int $bar")
-
-        self.expect("expression $bar i = 5; i",
-                    startstr="($bar) $1 = 5")
-
-        self.runCmd(
-            "expression struct $foobar { char a; char b; char c; char d; };")
-        self.runCmd("next")
-
-        self.expect(
-            "memory read foo -t $foobar",
-            substrs=[
-                '($foobar) 0x',
-                ' = ',
-                "a = 'H'",
-                "b = 'e'",
-                "c = 'l'",
-                "d = 'l'"])  # persistent types are OK to use for memory read
-
-        self.expect(
-            "memory read foo -t $foobar -x c",
-            substrs=[
-                '($foobar) 0x',
-                ' = ',
-                "a = 'H'",
-                "b = 'e'",
-                "c = 'l'",
-                "d = 'l'"])  # persistent types are OK to use for memory read
-
-        self.expect(
-            "memory read foo -t foobar",
-            substrs=[
-                '($foobar) 0x',
-                ' = ',
-                "a = 'H'",
-                "b = 'e'",
-                "c = 'l'",
-                "d = 'l'"],
-            matching=False,
-            error=True)  # the type name is $foobar, make sure we settle for nothing less
-
-        self.expect("expression struct { int a; int b; } x = { 2, 3 }; x",
-                    substrs=['a = 2', 'b = 3'])
-
-        self.expect(
-            "expression struct { int x; int y; int z; } object; object.y = 1; object.z = 3; object.x = 2; object",
-            substrs=[
-                'x = 2',
-                'y = 1',
-                'z = 3'])
-
-        self.expect(
-            "expression struct A { int x; int y; }; struct { struct A a; int z; } object; object.a.y = 1; object.z = 3; object.a.x = 2; object",
-            substrs=[
-                'x = 2',
-                'y = 1',
-                'z = 3'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_types/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_types/main.c
deleted file mode 100644 (file)
index 9425c8b..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-int main (int argc, char const *argv[])
-{
-       const char* foo = "Hello world";
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_variables/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_variables/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_variables/TestPersistentVariables.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_variables/TestPersistentVariables.py
deleted file mode 100644 (file)
index 57c04b2..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-"""
-Test that lldb persistent variables works correctly.
-"""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-
-
-class PersistentVariablesTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_persistent_variables(self):
-        """Test that lldb persistent variables works correctly."""
-        self.build()
-
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("breakpoint set --source-pattern-regexp break")
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.runCmd("expression int $i = i")
-
-        self.expect("expression $i == i",
-                    startstr="(bool) $0 = true")
-
-        self.expect("expression $i + 1",
-                    startstr="(int) $1 = 6")
-
-        self.expect("expression $i + 3",
-                    startstr="(int) $2 = 8")
-
-        self.expect("expression $2 + $1",
-                    startstr="(int) $3 = 14")
-
-        self.expect("expression $3",
-                    startstr="(int) $3 = 14")
-
-        self.expect("expression $2",
-                    startstr="(int) $2 = 8")
-
-        self.expect("expression (int)-2",
-                    startstr="(int) $4 = -2")
-
-        self.expect("expression $4 > (int)31",
-                    startstr="(bool) $5 = false")
-
-        self.expect("expression (long)$4",
-                    startstr="(long) $6 = -2")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_variables/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_variables/main.c
deleted file mode 100644 (file)
index 771bf4a..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-int main (int argc, char const *argv[])
-{
-    int i = 5;
-    return 0; // Set breakpoint here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/po_verbosity/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/po_verbosity/Makefile
deleted file mode 100644 (file)
index 9e812e1..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-OBJC_SOURCES := main.m
-
-
-LD_EXTRAS := -framework Foundation
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/po_verbosity/TestPoVerbosity.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/po_verbosity/TestPoVerbosity.py
deleted file mode 100644 (file)
index e203b38..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-"""
-Test that the po command acts correctly.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class PoVerbosityTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break for main.cpp.
-        self.line = line_number('main.m',
-                                '// Stop here')
-
-    @skipUnlessDarwin
-    def test(self):
-        """Test that the po command acts correctly."""
-        self.build()
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type synthetic clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        """Test expr + formatters for good interoperability."""
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.m", self.line, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.expect("expr -O -v -- foo",
-                    substrs=['(id) $', ' = 0x', '1 = 2', '2 = 3;'])
-        self.expect("expr -O -vfull -- foo",
-                    substrs=['(id) $', ' = 0x', '1 = 2', '2 = 3;'])
-        self.expect("expr -O -- foo", matching=False,
-                    substrs=['(id) $'])
-
-        self.expect("expr -O -- 22", matching=False,
-                    substrs=['(int) $'])
-        self.expect("expr -O -- 22",
-                    substrs=['22'])
-
-        self.expect("expr -O -vfull -- 22",
-                    substrs=['(int) $', ' = 22'])
-
-        self.expect("expr -O -v -- 22",
-                    substrs=['(int) $', ' = 22'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/po_verbosity/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/po_verbosity/main.m
deleted file mode 100644 (file)
index 9c79f85..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#import <Foundation/Foundation.h>
-
-int main()
-{
-    [NSString initialize];
-       id foo = @{@1 : @2, @2 : @3};
-       int x = 34;
-       return 0; // Stop here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/pr35310/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/pr35310/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/pr35310/TestExprsBug35310.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/pr35310/TestExprsBug35310.py
deleted file mode 100644 (file)
index 23dbce9..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class ExprBug35310(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-        self.main_source = "main.cpp"
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-
-    def test_issue35310(self):
-        """Test invoking functions with non-standard linkage names.
-
-        The GNU abi_tag extension used by libstdc++ is a common source
-        of these, but they could originate from other reasons as well.
-        """
-        self.build()
-
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                          '// Break here', self.main_source_spec)
-        frame = thread.GetFrameAtIndex(0)
-
-        value = frame.EvaluateExpression("a.test_abi_tag()")
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertEqual(value.GetValueAsSigned(0), 1)
-
-        value = frame.EvaluateExpression("a.test_asm_name()")
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertEqual(value.GetValueAsSigned(0), 2)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/pr35310/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/pr35310/main.cpp
deleted file mode 100644 (file)
index a8e8a5c..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <stdio.h>
-
-class A {
-public:
-  int __attribute__((abi_tag("cxx11"))) test_abi_tag() {
-      return 1;
-  }
-  int test_asm_name() asm("A_test_asm") {
-      return 2;
-  }
-};
-
-int main(int argc, char **argv) {
-  A a;
-  // Break here
-  a.test_abi_tag();
-  a.test_asm_name();
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/radar_8638051/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/radar_8638051/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/radar_8638051/Test8638051.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/radar_8638051/Test8638051.py
deleted file mode 100644 (file)
index b0da7e7..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-"""
-Test the robustness of lldb expression parser.
-"""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-
-
-class Radar8638051TestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_expr_commands(self):
-        """The following expression commands should not crash."""
-        self.build()
-
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("breakpoint set -n c")
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.expect("expression val",
-                    startstr="(int) $0 = 1")
-        # (int) $0 = 1
-
-        self.expect("expression *(&val)",
-                    startstr="(int) $1 = 1")
-        # (int) $1 = 1
-
-        # rdar://problem/8638051
-        # lldb expression command: Could this crash be avoided
-        self.expect("expression &val",
-                    startstr="(int *) $2 = ")
-        # (int *) $2 = 0x....
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/radar_8638051/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/radar_8638051/main.c
deleted file mode 100644 (file)
index dc528a4..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-// This simple program is to demonstrate the capability of the lldb command
-// "breakpoint command add" to add a set of commands to a breakpoint to be
-// executed when the breakpoint is hit.
-//
-// In particular, we want to break within c(), but only if the immediate caller
-// is a().
-
-int a(int);
-int b(int);
-int c(int);
-
-int a(int val)
-{
-    if (val <= 1)
-        return b(val);
-    else if (val >= 3)
-        return c(val); // Find the line number where c's parent frame is a here.
-
-    return val;
-}
-
-int b(int val)
-{
-    return c(val);
-}
-
-int c(int val)
-{
-    return val + 3;
-}
-
-int main (int argc, char const *argv[])
-{
-    int A1 = a(1);  // a(1) -> b(1) -> c(1)
-    printf("a(1) returns %d\n", A1);
-    
-    int B2 = b(2);  // b(2) -> c(2)
-    printf("b(2) returns %d\n", B2);
-    
-    int A3 = a(3);  // a(3) -> c(3)
-    printf("a(3) returns %d\n", A3);
-    
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9531204/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9531204/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9531204/TestPrintfAfterUp.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9531204/TestPrintfAfterUp.py
deleted file mode 100644 (file)
index 56e7186..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-"""
-The evaluating printf(...) after break stop and then up a stack frame.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class Radar9531204TestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # rdar://problem/9531204
-    @expectedFailureNetBSD
-    def test_expr_commands(self):
-        """The evaluating printf(...) after break stop and then up a stack frame."""
-        self.build()
-
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_symbol(
-            self, 'foo', sym_exact=True, num_expected_locations=1)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.runCmd("frame variable")
-
-        # This works fine.
-        self.runCmd('expression (int)printf("value is: %d.\\n", value);')
-
-        # rdar://problem/9531204
-        # "Error dematerializing struct" error when evaluating expressions "up" on the stack
-        self.runCmd('up')  # frame select -r 1
-
-        self.runCmd("frame variable")
-
-        # This does not currently.
-        self.runCmd('expression (int)printf("argc is: %d.\\n", argc)')
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9531204/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9531204/main.c
deleted file mode 100644 (file)
index 43200d3..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-// breakpoint set -n foo
-//
-//
-int foo (int value)
-{
-  printf ("I got the value: %d.\n", value);
-  return 0;
-}
-
-int main (int argc, char **argv)
-{
-  foo (argc);
-  printf ("Hello there: %d.\n", argc);
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9673664/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9673664/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9673664/TestExprHelpExamples.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9673664/TestExprHelpExamples.py
deleted file mode 100644 (file)
index 3eb3a86..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-"""
-Test example snippets from the lldb 'help expression' output.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class Radar9673644TestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.main_source = "main.c"
-        self.line = line_number(self.main_source, '// Set breakpoint here.')
-
-    def test_expr_commands(self):
-        """The following expression commands should just work."""
-        self.build()
-
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            self.main_source,
-            self.line,
-            num_expected_locations=1,
-            loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # rdar://problem/9673664 lldb expression evaluation problem
-
-        self.expect('expr char str[] = "foo"; str[0]',
-                    substrs=["'f'"])
-        # runCmd: expr char c[] = "foo"; c[0]
-        # output: (char) $0 = 'f'
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9673664/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9673664/main.c
deleted file mode 100644 (file)
index c765cf2..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-int main (int argc, char const *argv[])
-{
-    printf("Hello, world.\n"); // Set breakpoint here.
-    
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/rdar42038760/TestScalarURem.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/rdar42038760/TestScalarURem.py
deleted file mode 100644 (file)
index 0342465..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__, globals(), None)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/rdar42038760/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/rdar42038760/main.c
deleted file mode 100644 (file)
index 98a957f..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Make sure we IR-interpret the expression correctly.
-
-typedef unsigned int uint32_t;
-struct S0 {
-  signed f2;
-};
-static g_463 = 0x1561983AL;
-void func_1(void)
-{
-  struct S0 l_19;
-  l_19.f2 = 419;
-  uint32_t l_4037 = 4294967295UL;
-  l_19.f2 = g_463; //%self.expect("expr ((l_4037 % (-(g_463))) | l_19.f2)", substrs=['(unsigned int) $0 = 358717883'])
-}
-int main()
-{
-  func_1();
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/rdar44436068/Test128BitsInteger.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/rdar44436068/Test128BitsInteger.py
deleted file mode 100644 (file)
index 433c275..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__, globals(),
-        decorators.skipIf(archs=["armv7k"]))
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/rdar44436068/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/rdar44436068/main.c
deleted file mode 100644 (file)
index 156dbf0..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-int main(void)
-{
-    __int128_t n = 1;
-    n = n + n;
-    return n; //%self.expect("p n", substrs=['(__int128_t) $0 = 2'])
-              //%self.expect("p n + 6", substrs=['(__int128) $1 = 8'])
-              //%self.expect("p n + n", substrs=['(__int128) $2 = 4'])
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/regression-access-function-template-in-record/TestRegressionAccessFunctionTemplateInRecord.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/regression-access-function-template-in-record/TestRegressionAccessFunctionTemplateInRecord.py
deleted file mode 100644 (file)
index f08c0dc..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__, globals(), [])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/regression-access-function-template-in-record/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/regression-access-function-template-in-record/main.cpp
deleted file mode 100644 (file)
index 02f15c2..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-namespace n {
-template <class> class a {};
-template <class b> struct shared_ptr {
-  template <class...>
-  static void make_shared() { //%self.dbg.GetCommandInterpreter().HandleCompletion("e ", len("e "), 0, -1, lldb.SBStringList())
-    typedef a<b> c;
-    c d;
-  }
-};
-} // namespace n
-int main() { n::shared_ptr<int>::make_shared(); }
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/save_jit_objects/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/save_jit_objects/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/save_jit_objects/TestSaveJITObjects.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/save_jit_objects/TestSaveJITObjects.py
deleted file mode 100644 (file)
index 62925c6..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-"""
-Test that LLDB can emit JIT objects when the appropriate setting is enabled
-"""
-
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class SaveJITObjectsTestCase(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    def enumerateJITFiles(self):
-        return [f for f in os.listdir(self.getBuildDir()) if f.startswith("jit")]
-
-    def countJITFiles(self):
-        return len(self.enumerateJITFiles())
-
-    def cleanJITFiles(self):
-        for j in self.enumerateJITFiles():
-            os.remove(j)
-        return
-
-    @expectedFailureAll(oslist=["windows"])
-    @expectedFailureNetBSD
-    def test_save_jit_objects(self):
-        self.build()
-        os.chdir(self.getBuildDir())
-        src_file = "main.c"
-        src_file_spec = lldb.SBFileSpec(src_file)
-
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
-            self, "break", src_file_spec)
-
-        frame = thread.frames[0]
-
-        self.cleanJITFiles()
-        frame.EvaluateExpression("(void*)malloc(0x1)")
-        self.assertTrue(self.countJITFiles() == 0,
-                        "No files emitted with save-jit-objects=false")
-
-        self.runCmd("settings set target.save-jit-objects true")
-        frame.EvaluateExpression("(void*)malloc(0x1)")
-        jit_files_count = self.countJITFiles()
-        self.cleanJITFiles()
-        self.assertTrue(jit_files_count != 0,
-                        "At least one file emitted with save-jit-objects=true")
-
-        process.Kill()
-        os.chdir(self.getSourceDir())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/save_jit_objects/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/save_jit_objects/main.c
deleted file mode 100644 (file)
index c9775b6..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-int main (int argc, char const *argv[])
-{
-       const char* foo = "Hello world"; // break here
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/scoped_enums/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/scoped_enums/Makefile
deleted file mode 100644 (file)
index 4eb417e..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-CXX_SOURCES := main.cpp
-CXXFLAGS_EXTRAS := -std=c++11
-
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/scoped_enums/TestScopedEnumType.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/scoped_enums/TestScopedEnumType.py
deleted file mode 100644 (file)
index dd40e87..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ScopedEnumType(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIf(dwarf_version=['<', '4'])
-    def test(self):
-        self.build()
-
-        self.main_source = "main.cpp"
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                          '// Set break point at this line.', self.main_source_spec)
-        frame = thread.GetFrameAtIndex(0)
-
-        self.expect("expr f == Foo::FooBar",
-                substrs=['(bool) $0 = true'])
-
-        value = frame.EvaluateExpression("f == Foo::FooBar")
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertEqual(value.GetValueAsUnsigned(), 1)
-
-        value = frame.EvaluateExpression("b == BarBar")
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertEqual(value.GetValueAsUnsigned(), 1)
-
-        ## b is not a Foo
-        value = frame.EvaluateExpression("b == Foo::FooBar")
-        self.assertTrue(value.IsValid())
-        self.assertFalse(value.GetError().Success())
-
-        ## integral is not implicitly convertible to a scoped enum
-        value = frame.EvaluateExpression("1 == Foo::FooBar")
-        self.assertTrue(value.IsValid())
-        self.assertFalse(value.GetError().Success())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/scoped_enums/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/scoped_enums/main.cpp
deleted file mode 100644 (file)
index b0d67d2..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-enum class Foo {
-  FooBar = 42
-};
-
-enum Bar {
-    BarBar = 3,
-    BarBarBar = 42
-};
-
-int main(int argc, const char **argv) {
-  Foo f = Foo::FooBar;
-  Bar b = BarBar;
-  bool b1 = f == Foo::FooBar;
-  bool b2 = b == BarBar;
-  return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/static-initializers/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/static-initializers/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/static-initializers/TestStaticInitializers.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/static-initializers/TestStaticInitializers.py
deleted file mode 100644 (file)
index 6110707..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class StaticInitializers(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(archs="aarch64", oslist="linux",
-                        bugnumber="https://bugs.llvm.org/show_bug.cgi?id=44053")
-    def test(self):
-        """ Test a static initializer. """
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self, '// break here',
-                lldb.SBFileSpec("main.cpp", False))
-
-        # We use counter to observe if the initializer was called.
-        self.expect("expr counter", substrs=["(int) $", " = 0"])
-        self.expect("expr -p -- struct Foo { Foo() { inc_counter(); } }; Foo f;")
-        self.expect("expr counter", substrs=["(int) $", " = 1"])
-
-    def test_failing_init(self):
-        """ Test a static initializer that fails to execute. """
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self, '// break here',
-                lldb.SBFileSpec("main.cpp", False))
-
-        # FIXME: This error message is not even remotely helpful.
-        self.expect("expr -p -- struct Foo2 { Foo2() { do_abort(); } }; Foo2 f;", error=True,
-                    substrs=["error: couldn't run static initializers: couldn't run static initializer:"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/static-initializers/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/static-initializers/main.cpp
deleted file mode 100644 (file)
index 0bcf1eb..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#include <cstdlib>
-
-int counter = 0;
-
-void inc_counter() { ++counter; }
-
-void do_abort() { abort(); }
-
-int main() {
-  return 0; // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/test/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/test/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/test/TestExprs.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/test/TestExprs.py
deleted file mode 100644 (file)
index 8437eac..0000000
+++ /dev/null
@@ -1,252 +0,0 @@
-"""
-Test many basic expression commands and SBFrame.EvaluateExpression() API.
-
-Test cases:
-
-o test_many_expr_commands:
-  Test many basic expression commands.
-o test_evaluate_expression_python:
-  Use Python APIs (SBFrame.EvaluateExpression()) to evaluate expressions.
-o test_expr_commands_can_handle_quotes:
-  Throw some expression commands with quotes at lldb.
-"""
-
-
-
-import unittest2
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class BasicExprCommandsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break for main.c.
-        self.line = line_number(
-            'main.cpp',
-            '// Please test many expressions while stopped at this line:')
-
-        # Disable confirmation prompt to avoid infinite wait
-        self.runCmd("settings set auto-confirm true")
-        self.addTearDownHook(
-            lambda: self.runCmd("settings clear auto-confirm"))
-
-    def build_and_run(self):
-        """These basic expression commands should work as expected."""
-        self.build()
-
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=False)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-    @unittest2.expectedFailure(
-        "llvm.org/pr17135 <rdar://problem/14874559> APFloat::toString does not identify the correct (i.e. least) precision.")
-    def test_floating_point_expr_commands(self):
-        self.build_and_run()
-
-        self.expect("expression 2.234f",
-                    patterns=["\(float\) \$.* = 2\.234"])
-        # (float) $2 = 2.234
-
-    def test_many_expr_commands(self):
-        self.build_and_run()
-
-        self.expect("expression 2",
-                    patterns=["\(int\) \$.* = 2"])
-        # (int) $0 = 1
-
-        self.expect("expression 2ull",
-                    patterns=["\(unsigned long long\) \$.* = 2"])
-        # (unsigned long long) $1 = 2
-
-        self.expect("expression 0.5f",
-                    patterns=["\(float\) \$.* = 0\.5"])
-        # (float) $2 = 0.5
-
-        self.expect("expression 2.234",
-                    patterns=["\(double\) \$.* = 2\.234"])
-        # (double) $3 = 2.234
-
-        self.expect("expression 2+3",
-                    patterns=["\(int\) \$.* = 5"])
-        # (int) $4 = 5
-
-        self.expect("expression argc",
-                    patterns=["\(int\) \$.* = 1"])
-        # (int) $5 = 1
-
-        self.expect("expression argc + 22",
-                    patterns=["\(int\) \$.* = 23"])
-        # (int) $6 = 23
-
-        self.expect("expression argv",
-                    patterns=["\(const char \*\*\) \$.* = 0x"])
-        # (const char *) $7 = ...
-
-        self.expect("expression argv[0]",
-                    substrs=["(const char *)",
-                             "a.out"])
-        # (const char *) $8 = 0x... "/Volumes/data/lldb/svn/trunk/test/expression_command/test/a.out"
-
-    @add_test_categories(['pyapi'])
-    @expectedFlakeyNetBSD
-    def test_evaluate_expression_python(self):
-        """Test SBFrame.EvaluateExpression() API for evaluating an expression."""
-        self.build()
-
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Create the breakpoint.
-        filespec = lldb.SBFileSpec("main.cpp", False)
-        breakpoint = target.BreakpointCreateByLocation(filespec, self.line)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Verify the breakpoint just created.
-        self.expect(str(breakpoint), BREAKPOINT_CREATED, exe=False,
-                    substrs=['main.cpp',
-                             str(self.line)])
-
-        # Launch the process, and do not stop at the entry point.
-        # Pass 'X Y Z' as the args, which makes argc == 4.
-        process = target.LaunchSimple(
-            ['X', 'Y', 'Z'], None, self.get_process_working_directory())
-
-        if not process:
-            self.fail("SBTarget.LaunchProcess() failed")
-
-        if process.GetState() != lldb.eStateStopped:
-            self.fail("Process should be in the 'stopped' state, "
-                      "instead the actual state is: '%s'" %
-                      lldbutil.state_type_to_str(process.GetState()))
-
-        thread = lldbutil.get_one_thread_stopped_at_breakpoint(
-            process, breakpoint)
-        self.assertIsNotNone(
-            thread, "Expected one thread to be stopped at the breakpoint")
-
-        # The filename of frame #0 should be 'main.cpp' and function is main.
-        self.expect(lldbutil.get_filenames(thread)[0],
-                    "Break correctly at main.cpp", exe=False,
-                    startstr="main.cpp")
-        self.expect(lldbutil.get_function_names(thread)[0],
-                    "Break correctly at main()", exe=False,
-                    startstr="main")
-
-        # We should be stopped on the breakpoint with a hit count of 1.
-        self.assertTrue(breakpoint.GetHitCount() == 1, BREAKPOINT_HIT_ONCE)
-
-        #
-        # Use Python API to evaluate expressions while stopped in a stack frame.
-        #
-        frame = thread.GetFrameAtIndex(0)
-
-        val = frame.EvaluateExpression("2.234")
-        self.expect(val.GetValue(), "2.345 evaluated correctly", exe=False,
-                    startstr="2.234")
-        self.expect(val.GetTypeName(), "2.345 evaluated correctly", exe=False,
-                    startstr="double")
-        self.DebugSBValue(val)
-
-        val = frame.EvaluateExpression("argc")
-        self.expect(val.GetValue(), "Argc evaluated correctly", exe=False,
-                    startstr="4")
-        self.DebugSBValue(val)
-
-        val = frame.EvaluateExpression("*argv[1]")
-        self.expect(val.GetValue(), "Argv[1] evaluated correctly", exe=False,
-                    startstr="'X'")
-        self.DebugSBValue(val)
-
-        val = frame.EvaluateExpression("*argv[2]")
-        self.expect(val.GetValue(), "Argv[2] evaluated correctly", exe=False,
-                    startstr="'Y'")
-        self.DebugSBValue(val)
-
-        val = frame.EvaluateExpression("*argv[3]")
-        self.expect(val.GetValue(), "Argv[3] evaluated correctly", exe=False,
-                    startstr="'Z'")
-        self.DebugSBValue(val)
-
-        callee_break = target.BreakpointCreateByName(
-            "a_function_to_call", None)
-        self.assertTrue(callee_break.GetNumLocations() > 0)
-
-        # Make sure ignoring breakpoints works from the command line:
-        self.expect("expression -i true -- a_function_to_call()",
-                    substrs=['(int) $', ' 1'])
-        self.assertTrue(callee_break.GetHitCount() == 1)
-
-        # Now try ignoring breakpoints using the SB API's:
-        options = lldb.SBExpressionOptions()
-        options.SetIgnoreBreakpoints(True)
-        value = frame.EvaluateExpression('a_function_to_call()', options)
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetValueAsSigned(0) == 2)
-        self.assertTrue(callee_break.GetHitCount() == 2)
-
-    # rdar://problem/8686536
-    # CommandInterpreter::HandleCommand is stripping \'s from input for
-    # WantsRawCommand commands
-    @expectedFailureNetBSD
-    def test_expr_commands_can_handle_quotes(self):
-        """Throw some expression commands with quotes at lldb."""
-        self.build()
-
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=False)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # runCmd: expression 'a'
-        # output: (char) $0 = 'a'
-        self.expect("expression 'a'",
-                    substrs=['(char) $',
-                             "'a'"])
-
-        # runCmd: expression (int) printf ("\n\n\tHello there!\n")
-        # output: (int) $1 = 16
-        self.expect(r'''expression (int) printf ("\n\n\tHello there!\n")''',
-                    substrs=['(int) $',
-                             '16'])
-
-        # runCmd: expression (int) printf("\t\x68\n")
-        # output: (int) $2 = 3
-        self.expect(r'''expression (int) printf("\t\x68\n")''',
-                    substrs=['(int) $',
-                             '3'])
-
-        # runCmd: expression (int) printf("\"\n")
-        # output: (int) $3 = 2
-        self.expect(r'''expression (int) printf("\"\n")''',
-                    substrs=['(int) $',
-                             '2'])
-
-        # runCmd: expression (int) printf("'\n")
-        # output: (int) $4 = 2
-        self.expect(r'''expression (int) printf("'\n")''',
-                    substrs=['(int) $',
-                             '2'])
-
-        # runCmd: command alias print_hi expression (int) printf ("\n\tHi!\n")
-        # output:
-        self.runCmd(
-            r'''command alias print_hi expression (int) printf ("\n\tHi!\n")''')
-        # This fails currently.
-        self.expect('print_hi',
-                    substrs=['(int) $',
-                             '6'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/test/TestExprs2.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/test/TestExprs2.py
deleted file mode 100644 (file)
index cd02f89..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-"""
-Test some more expression commands.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ExprCommands2TestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break for main.c.
-        self.line = line_number(
-            'main.cpp',
-            '// Please test many expressions while stopped at this line:')
-
-    def test_more_expr_commands(self):
-        """Test some more expression commands."""
-        self.build()
-
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=False)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # Does static casting work?
-        self.expect("expression (int*)argv",
-                    startstr="(int *) $0 = 0x")
-        # (int *) $0 = 0x00007fff5fbff258
-
-        # Do return values containing the contents of expression locals work?
-        self.expect("expression int i = 5; i",
-                    startstr="(int) $1 = 5")
-        # (int) $2 = 5
-        self.expect("expression $1 + 1",
-                    startstr="(int) $2 = 6")
-        # (int) $3 = 6
-
-        # Do return values containing the results of static expressions work?
-        self.expect("expression 20 + 3",
-                    startstr="(int) $3 = 23")
-        # (int) $4 = 5
-        self.expect("expression $3 + 1",
-                    startstr="(int) $4 = 24")
-        # (int) $5 = 6
-
-    @skipIfLinux
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24489")
-    def test_expr_symbols(self):
-        """Test symbols."""
-        self.build()
-
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-                self, "main.cpp", self.line, num_expected_locations=1, loc_exact=False)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # Do anonymous symbols work?
-        self.expect("expression ((char**)environ)[0]",
-                startstr="(char *) $0 = 0x")
-        # (char *) $1 = 0x00007fff5fbff298 "Apple_PubSub_Socket_Render=/tmp/launch-7AEsUD/Render"
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/test/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/test/main.cpp
deleted file mode 100644 (file)
index 22208a8..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#include <stdio.h>
-
-static int static_value = 0;
-
-int
-a_function_to_call()
-{
-    static_value++;
-    return static_value;
-}
-
-int main (int argc, char const *argv[])
-{
-    printf ("Hello world!\n");
-    puts ("hello");
-    // Please test many expressions while stopped at this line:
-#if 0
-    expression 'a'        // make sure character constant makes it down (this is broken: <rdar://problem/8686536>)
-    expression 2          // Test int
-    expression 2ull       // Test unsigned long long
-    expression 2.234f     // Test float constants
-    expression 2.234      // Test double constants
-    expression 2+3
-    expression argc
-    expression argc + 22
-    expression argv
-    expression argv[0]
-    expression argv[1]
-    expression argv[-1]
-    expression puts("bonjour")                        // Test constant strings...
-    expression printf("\t\x68\n")       // Test constant strings that contain the \xXX (TAB, 'h', '\n' should be printed) (this is broken: <rdar://problem/8686536>)
-    expression printf("\"\n")       // Test constant strings that contains an escaped double quote char (this is broken: <rdar://problem/8686536>)
-    expression printf("\'\n")       // Test constant strings that contains an escaped single quote char (this is broken: <rdar://problem/8686536>)
-    expression printf ("one: %i\n", 1)
-    expression printf ("1.234 as float: %f\n", 1.234f)
-    expression printf ("1.234 as double: %g\n", 1.234)
-    expression printf ("one: %i, two: %llu\n", 1, 2ull)
-    expression printf ("two: %llu, one: %i\n", 2ull, 1)
-    expression random() % 255l
-#endif
-
-    a_function_to_call();
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/timeout/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/timeout/Makefile
deleted file mode 100644 (file)
index 06a21f5..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := wait-a-while.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/timeout/TestCallWithTimeout.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/timeout/TestCallWithTimeout.py
deleted file mode 100644 (file)
index a64167e..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-"""
-Test calling a function that waits a while, and make sure the timeout option to expr works.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ExprCommandWithTimeoutsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-        self.main_source = "wait-a-while.cpp"
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-
-    @expectedFlakeyFreeBSD("llvm.org/pr19605")
-    @expectedFailureAll(
-        oslist=[
-            "windows"],
-        bugnumber="llvm.org/pr21765")
-    def test(self):
-        """Test calling std::String member function."""
-        self.build()
-
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
-            self, 'stop here in main.', self.main_source_spec)
-
-        # First set the timeout too short, and make sure we fail.
-        options = lldb.SBExpressionOptions()
-        options.SetTimeoutInMicroSeconds(10)
-        options.SetUnwindOnError(True)
-
-        frame = thread.GetFrameAtIndex(0)
-
-        value = frame.EvaluateExpression("wait_a_while(1000000)", options)
-        self.assertTrue(value.IsValid())
-        self.assertFalse(value.GetError().Success())
-
-        # Now do the same thing with the command line command, and make sure it
-        # works too.
-        interp = self.dbg.GetCommandInterpreter()
-
-        result = lldb.SBCommandReturnObject()
-        return_value = interp.HandleCommand(
-            "expr -t 100 -u true -- wait_a_while(1000000)", result)
-        self.assertTrue(return_value == lldb.eReturnStatusFailed)
-
-        # Okay, now do it again with long enough time outs:
-
-        options.SetTimeoutInMicroSeconds(1000000)
-        value = frame.EvaluateExpression("wait_a_while (1000)", options)
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-
-        # Now do the same thingwith the command line command, and make sure it
-        # works too.
-        interp = self.dbg.GetCommandInterpreter()
-
-        result = lldb.SBCommandReturnObject()
-        return_value = interp.HandleCommand(
-            "expr -t 1000000 -u true -- wait_a_while(1000)", result)
-        self.assertTrue(return_value == lldb.eReturnStatusSuccessFinishResult)
-
-        # Finally set the one thread timeout and make sure that doesn't change
-        # things much:
-
-        options.SetTimeoutInMicroSeconds(1000000)
-        options.SetOneThreadTimeoutInMicroSeconds(500000)
-        value = frame.EvaluateExpression("wait_a_while (1000)", options)
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/timeout/wait-a-while.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/timeout/wait-a-while.cpp
deleted file mode 100644 (file)
index ac37c5d..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#include <stdio.h>
-#include <stdint.h>
-
-#include <chrono>
-#include <thread>
-
-
-int
-wait_a_while (int microseconds)
-{
-    int num_times = 0;
-    auto end_time = std::chrono::system_clock::now() + std::chrono::microseconds(microseconds);
-
-    while (1)
-    {
-        num_times++;
-        auto wait_time = end_time - std::chrono::system_clock::now();
-
-        std::this_thread::sleep_for(wait_time);
-        if (std::chrono::system_clock::now() > end_time)
-            break;
-    }
-    return num_times;
-}
-
-int
-main (int argc, char **argv)
-{
-    printf ("stop here in main.\n");
-    int num_times = wait_a_while (argc * 1000);
-    printf ("Done, took %d times.\n", num_times);
-
-    return 0;
-
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/top-level/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/top-level/Makefile
deleted file mode 100644 (file)
index e5e9e78..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-CXX_SOURCES := main.cpp test.cpp
-
-all: dummy
-
-include Makefile.rules
-
-dummy: dummy.cpp
-       $(MAKE) -f $(MAKEFILE_RULES) \
-               CXX_SOURCES=dummy.cpp EXE=dummy
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/top-level/TestTopLevelExprs.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/top-level/TestTopLevelExprs.py
deleted file mode 100644 (file)
index 4e1a377..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-"""
-Test top-level expressions.
-"""
-
-
-
-import unittest2
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TopLevelExpressionsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break for main.c.
-        self.line = line_number('main.cpp',
-                                '// Set breakpoint here')
-        self.dummy_line = line_number('dummy.cpp',
-                                      '// Set breakpoint here')
-
-        # Disable confirmation prompt to avoid infinite wait
-        self.runCmd("settings set auto-confirm true")
-        self.addTearDownHook(
-            lambda: self.runCmd("settings clear auto-confirm"))
-
-    def build_and_run(self):
-        """Test top-level expressions."""
-        self.build()
-
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=False)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-    def run_dummy(self):
-        self.runCmd("file " + self.getBuildArtifact("dummy"),
-                    CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            "dummy.cpp",
-            self.dummy_line,
-            num_expected_locations=1,
-            loc_exact=False)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-    @add_test_categories(['pyapi'])
-    @skipIf(debug_info="gmodules")  # not relevant
-    @skipIf(oslist=["windows"])  # Error in record layout on Windows
-    def test_top_level_expressions(self):
-        self.build_and_run()
-
-        resultFromCode = self.frame().EvaluateExpression("doTest()").GetValueAsUnsigned()
-
-        self.runCmd("kill")
-
-        self.run_dummy()
-
-        codeFile = open('test.cpp', 'r')
-
-        expressions = []
-        current_expression = ""
-
-        for line in codeFile:
-            if line.startswith("// --"):
-                expressions.append(current_expression)
-                current_expression = ""
-            else:
-                current_expression += line
-
-        options = lldb.SBExpressionOptions()
-        options.SetLanguage(lldb.eLanguageTypeC_plus_plus)
-        options.SetTopLevel(True)
-
-        for expression in expressions:
-            self.frame().EvaluateExpression(expression, options)
-
-        resultFromTopLevel = self.frame().EvaluateExpression("doTest()")
-
-        self.assertTrue(resultFromTopLevel.IsValid())
-        self.assertEqual(
-            resultFromCode,
-            resultFromTopLevel.GetValueAsUnsigned())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/top-level/dummy.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/top-level/dummy.cpp
deleted file mode 100644 (file)
index fa49bd4..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#include <stdio.h>
-
-// These are needed to make sure that the linker does not strip the parts of the
-// C++ abi library that are necessary to execute the expressions in the
-// debugger. It would be great if we did not need to do this, but the fact that
-// LLDB cannot conjure up the abi library on demand is not relevant for testing
-// top level expressions.
-struct DummyA {};
-struct DummyB : public virtual DummyA {};
-
-int main() {
-  DummyB b;
-  printf("This is a dummy\n"); // Set breakpoint here
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/top-level/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/top-level/main.cpp
deleted file mode 100644 (file)
index f9b2dd4..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <stdio.h>
-
-extern int doTest();
-
-int main()
-{
-    printf("%d\n", doTest()); // Set breakpoint here   
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/top-level/test.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/top-level/test.cpp
deleted file mode 100644 (file)
index 5a97874..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-class MyClass
-{
-public:
-  int memberResult()
-  {
-    return 1;
-  }
-  static int staticResult()
-  {
-    return 1;
-  }
-  int externResult();
-};
-
-// --
-
-int MyClass::externResult()
-{
-  return 1;
-}
-
-// --
-
-MyClass m;
-
-// --
-
-enum MyEnum {
-  myEnumOne = 1,
-  myEnumTwo,
-  myEnumThree
-};
-
-// --
-
-class AnotherClass
-{
-public:
-    __attribute__ ((always_inline)) int complicatedFunction() 
-    {
-        struct {
-            int i;
-        } s = { 15 };
-    
-        int numbers[4] = { 2, 3, 4, 5 };
-    
-        for (signed char number: numbers)
-        {
-            s.i -= number;
-        }
-    
-        return s.i;
-    }
-};
-
-// --
-
-class DiamondA
-{
-private:
-  struct {
-    int m_i;
-  };
-public:
-  DiamondA(int i) : m_i(i) { }
-  int accessor() { return m_i; }
-};
-
-// --
-
-class DiamondB : public virtual DiamondA
-{
-public:
-  DiamondB(int i) : DiamondA(i) { }
-};
-
-// --
-
-class DiamondC : public virtual DiamondA
-{
-public:
-  DiamondC(int i) : DiamondA(i) { }
-};
-
-// --
-
-class DiamondD : public DiamondB, public DiamondC
-{
-public:
-  DiamondD(int i) : DiamondA(i), DiamondB(i), DiamondC(i) { }
-};
-
-// --
-
-int doTest()
-{
-    int accumulator = m.memberResult();
-    accumulator += MyClass::staticResult();
-    accumulator += m.externResult();
-    accumulator += MyEnum::myEnumThree;
-    accumulator += myEnumOne;
-    accumulator += AnotherClass().complicatedFunction();
-    accumulator += DiamondD(3).accessor();
-    return accumulator;
-}
-
-// --
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/two-files/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/two-files/Makefile
deleted file mode 100644 (file)
index c82383d..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-OBJC_SOURCES := main.m foo.m
-
-
-
-LD_EXTRAS := -framework Foundation
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/two-files/TestObjCTypeQueryFromOtherCompileUnit.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/two-files/TestObjCTypeQueryFromOtherCompileUnit.py
deleted file mode 100644 (file)
index c518bf0..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-"""
-Regression test for <rdar://problem/8981098>:
-
-The expression parser's type search only looks in the current compilation unit for types.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjCTypeQueryTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break for main.m.
-        self.line = line_number(
-            'main.m', "// Set breakpoint here, then do 'expr (NSArray*)array_token'.")
-
-    @skipUnlessDarwin
-    def test(self):
-        """The expression parser's type search should be wider than the current compilation unit."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # Now do a NSArry type query from the 'main.m' compile uint.
-        self.expect("expression (NSArray*)array_token",
-                    substrs=['(NSArray *) $0 = 0x'])
-        # (NSArray *) $0 = 0x00007fff70118398
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/two-files/foo.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/two-files/foo.m
deleted file mode 100644 (file)
index 1609ebd..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#import <Foundation/Foundation.h>
-
-NSMutableArray *
-GetArray ()
-{
-  static NSMutableArray *the_array = NULL;
-  if (the_array == NULL)
-    the_array = [[NSMutableArray alloc] init];
-  return the_array;
-}
-
-int 
-AddElement (char *value)
-{
-  NSString *element = [NSString stringWithUTF8String: value];
-  int cur_elem = [GetArray() count];
-  [GetArray() addObject: element];
-  return cur_elem;
-}
-
-const char *
-GetElement (int idx)
-{
-  if (idx >= [GetArray() count])
-    return NULL;
-  else
-    return [[GetArray() objectAtIndex: idx] UTF8String];
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/two-files/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/two-files/main.m
deleted file mode 100644 (file)
index 3f57383..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#import <Foundation/Foundation.h>
-#include <stdio.h>
-
-extern int AddElement (char *value);
-extern char *GetElement (int idx);
-extern void *GetArray();
-
-int
-main ()
-{
-  NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-
-  int idx = AddElement ("some string");
-  void *array_token = GetArray();
-
-  char *string = GetElement (0); // Set breakpoint here, then do 'expr (NSArray*)array_token'.
-  if (string)
-    printf ("This: %s.\n", string);
-
-  [pool release];
-  return 0;
-}  
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/unicode-in-variable/TestUnicodeInVariable.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/unicode-in-variable/TestUnicodeInVariable.py
deleted file mode 100644 (file)
index 0342465..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__, globals(), None)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/unicode-in-variable/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/unicode-in-variable/main.cpp
deleted file mode 100644 (file)
index 82e38b1..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Make sure we correctly handle unicode in variable names.
-
-struct A {
-  // We need a member variable in the context that could shadow our local
-  // variable. If our optimization code fails to handle this, then we won't
-  // correctly inject our local variable so that it won't get shadowed.
-  int foob\u00E1r = 2;
-  int foo() {
-    int foob\u00E1r = 3;
-    return foob\u00E1r; //%self.expect("expr foobár", substrs=['(int)', ' = 3'])
-  }
-};
-
-int main() {
-  A a;
-  return a.foo();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/unwind_expression/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/unwind_expression/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/unwind_expression/TestUnwindExpression.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/unwind_expression/TestUnwindExpression.py
deleted file mode 100644 (file)
index de883f4..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-"""
-Test stopping at a breakpoint in an expression, and unwinding from there.
-"""
-
-
-
-import unittest2
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class UnwindFromExpressionTest(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    main_spec = lldb.SBFileSpec("main.cpp", False)
-
-    def build_and_run_to_bkpt(self):
-        self.build()
-
-        (target, process, self.thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                "// Set a breakpoint here to get started", self.main_spec)
-
-        # Next set a breakpoint in this function, set up Expression options to stop on
-        # breakpoint hits, and call the function.
-        self.fun_bkpt = self.target().BreakpointCreateBySourceRegex(
-            "// Stop inside the function here.", self.main_spec)
-        self.assertTrue(self.fun_bkpt, VALID_BREAKPOINT)
-
-
-    @no_debug_info_test
-    @expectedFailureAll(bugnumber="llvm.org/pr33164")
-    def test_conditional_bktp(self):
-        """
-        Test conditional breakpoint handling in the IgnoreBreakpoints = False case
-        """
-        self.build_and_run_to_bkpt()
-
-        self.fun_bkpt.SetCondition("0") # Should not get hit
-        options = lldb.SBExpressionOptions()
-        options.SetIgnoreBreakpoints(False)
-        options.SetUnwindOnError(False)
-
-        main_frame = self.thread.GetFrameAtIndex(0)
-        val = main_frame.EvaluateExpression("second_function(47)", options)
-        self.assertTrue(
-            val.GetError().Success(),
-            "We did complete the execution.")
-        self.assertEquals(47, val.GetValueAsSigned())
-
-
-    @add_test_categories(['pyapi'])
-    @expectedFlakeyNetBSD
-    def test_unwind_expression(self):
-        """Test unwinding from an expression."""
-        self.build_and_run_to_bkpt()
-
-        # Run test with varying one thread timeouts to also test the halting
-        # logic in the IgnoreBreakpoints = False case
-        self.do_unwind_test(self.thread, self.fun_bkpt, 1000)
-        self.do_unwind_test(self.thread, self.fun_bkpt, 100000)
-
-    def do_unwind_test(self, thread, bkpt, timeout):
-        #
-        # Use Python API to evaluate expressions while stopped in a stack frame.
-        #
-        main_frame = thread.GetFrameAtIndex(0)
-
-        options = lldb.SBExpressionOptions()
-        options.SetIgnoreBreakpoints(False)
-        options.SetUnwindOnError(False)
-        options.SetOneThreadTimeoutInMicroSeconds(timeout)
-
-        val = main_frame.EvaluateExpression("a_function_to_call()", options)
-
-        self.assertTrue(
-            val.GetError().Fail(),
-            "We did not complete the execution.")
-        error_str = val.GetError().GetCString()
-        self.assertTrue(
-            "Execution was interrupted, reason: breakpoint" in error_str,
-            "And the reason was right.")
-
-        thread = lldbutil.get_one_thread_stopped_at_breakpoint(
-            self.process(), bkpt)
-        self.assertTrue(
-            thread.IsValid(),
-            "We are indeed stopped at our breakpoint")
-
-        # Now unwind the expression, and make sure we got back to where we
-        # started.
-        error = thread.UnwindInnermostExpression()
-        self.assertTrue(error.Success(), "We succeeded in unwinding")
-
-        cur_frame = thread.GetFrameAtIndex(0)
-        self.assertTrue(
-            cur_frame.IsEqual(main_frame),
-            "We got back to the main frame.")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/unwind_expression/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/unwind_expression/main.cpp
deleted file mode 100644 (file)
index 56b06f3..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-static int static_value = 0;
-
-int
-a_function_to_call()
-{
-    static_value++; // Stop inside the function here.
-    return static_value;
-}
-
-int second_function(int x){
-  for(int i=0; i<10; ++i) {
-    a_function_to_call();
-  }
-  return x;
-}
-
-int main (int argc, char const *argv[])
-{
-    a_function_to_call();  // Set a breakpoint here to get started 
-    second_function(1);
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/vector_of_enums/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/vector_of_enums/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/vector_of_enums/TestVectorOfEnums.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/vector_of_enums/TestVectorOfEnums.py
deleted file mode 100644 (file)
index 2da9546..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-"""
-Test Expression Parser regression test to ensure that we handle enums
-correctly, in this case specifically std::vector of enums.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestVectorOfEnums(TestBase):
-
-  mydir = TestBase.compute_mydir(__file__)
-
-  @add_test_categories(["libc++"])
-  def test_vector_of_enums(self):
-    self.build()
-
-    lldbutil.run_to_source_breakpoint(self, '// break here',
-            lldb.SBFileSpec("main.cpp", False))
-
-    self.expect("expr v", substrs=[
-         'size=3',
-         '[0] = a',
-         '[1] = b',
-         '[2] = c',
-         '}'
-        ])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/vector_of_enums/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/vector_of_enums/main.cpp
deleted file mode 100644 (file)
index 10d3ae5..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#include <vector>
-
-enum E {
-a,
-b,
-c,
-d
-} ;
-
-int main() {
-  std::vector<E> v = {E::a, E::b, E::c};
-
-  return v.size(); // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/Makefile
deleted file mode 100644 (file)
index 6fd8133..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-C_SOURCES := main.c
-CFLAGS_EXTRAS := -std=c99 -fmodules
-LD_EXTRAS := -ldylib -L.
-
-all: a.out hidden/libdylib.dylib
-
-a.out: libdylib.dylib
-
-include Makefile.rules
-
-libdylib.dylib: dylib.c
-       $(MAKE) -C $(BUILDDIR) -f $(MAKEFILE_RULES) \
-               C_SOURCES= DYLIB_C_SOURCES=dylib.c DYLIB_NAME=dylib \
-               CFLAGS_EXTRAS=-DHAS_THEM LD_EXTRAS=-dynamiclib
-
-hidden/libdylib.dylib:
-       mkdir hidden
-       $(MAKE) -C $(BUILDDIR)/hidden -f $(MAKEFILE_RULES) \
-               C_SOURCES= DYLIB_C_SOURCES=dylib.c DYLIB_NAME=dylib \
-               LD_EXTRAS=-dynamiclib
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/TestWeakSymbols.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/TestWeakSymbols.py
deleted file mode 100644 (file)
index b58d838..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-"""
-Test that we can compile expressions referring to
-absent weak symbols from a dylib.
-"""
-
-
-
-import os
-import lldb
-from lldbsuite.test import decorators
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbtest import *
-
-
-class TestWeakSymbolsInExpressions(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @decorators.skipUnlessDarwin
-    def test_weak_symbol_in_expr(self):
-        """Tests that we can refer to weak symbols in expressions."""
-        self.build()
-        self.main_source_file = lldb.SBFileSpec("main.c")
-        self.do_test()
-
-    def run_weak_var_check (self, weak_varname, present):
-        # The expression will modify present_weak_int to signify which branch
-        # was taken.  Set it to so we don't get confused by a previous run.
-        value = self.target.FindFirstGlobalVariable("present_weak_int")
-        value.SetValueFromCString("0")
-        if present:
-            correct_value = 10
-        else:
-            correct_value = 20
-            
-        # Note, I'm adding the "; 10" at the end of the expression to work around
-        # the bug that expressions with no result currently return False for Success()...
-        expr = "if (&" + weak_varname + " != NULL) { present_weak_int = 10; } else { present_weak_int = 20;}; 10"
-        result = self.frame.EvaluateExpression(expr)
-        self.assertTrue(result.GetError().Success(), "absent_weak_int expr failed: %s"%(result.GetError().GetCString()))
-        self.assertEqual(value.GetValueAsSigned(), correct_value, "Didn't change present_weak_int correctly.")
-        
-    def do_test(self):
-        hidden_dir = os.path.join(self.getBuildDir(), "hidden")
-        hidden_dylib = os.path.join(hidden_dir, "libdylib.dylib")
-
-        launch_info = lldb.SBLaunchInfo(None)
-        launch_info.SetWorkingDirectory(self.getBuildDir())
-        # We have to point to the hidden directory to pick up the
-        # version of the dylib without the weak symbols:
-        env_expr = self.platformContext.shlib_environment_var + "=" + hidden_dir
-        launch_info.SetEnvironmentEntries([env_expr], True)
-
-        (self.target, _, thread, _) = lldbutil.run_to_source_breakpoint(
-                                              self, "Set a breakpoint here",
-                                              self.main_source_file,
-                                              launch_info = launch_info,
-                                              extra_images = [hidden_dylib])
-        # First we have to import the Dylib module so we get the type info
-        # for the weak symbol.  We need to add the source dir to the module
-        # search paths, and then run @import to introduce it into the expression
-        # context:
-        self.dbg.HandleCommand("settings set target.clang-module-search-paths " + self.getSourceDir())
-        
-        self.frame = thread.frames[0]
-        self.assertTrue(self.frame.IsValid(), "Got a good frame")
-        options = lldb.SBExpressionOptions()
-        options.SetLanguage(lldb.eLanguageTypeObjC)
-        result = self.frame.EvaluateExpression("@import Dylib", options)
-
-        # Now run an expression that references an absent weak symbol:
-        self.run_weak_var_check("absent_weak_int", False)
-        self.run_weak_var_check("absent_weak_function", False)
-        
-        # Make sure we can do the same thing with present weak symbols
-        self.run_weak_var_check("present_weak_int", True)
-        self.run_weak_var_check("present_weak_function", True)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/dylib.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/dylib.c
deleted file mode 100644 (file)
index dc513e5..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#include "dylib.h"
-
-int present_weak_int = 10;
-int present_weak_function()
-{
-  return present_weak_int;
-}
-
-#if defined HAS_THEM
-int absent_weak_int = 10;
-int absent_weak_function() {
-  return absent_weak_int;
-}
-#endif
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/dylib.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/dylib.h
deleted file mode 100644 (file)
index f668ec0..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-extern int absent_weak_int __attribute__((weak_import));
-
-extern int present_weak_int __attribute__((weak_import));
-
-extern int absent_weak_function() __attribute__((weak_import));
-
-extern int present_weak_function() __attribute__((weak_import));
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/main.c
deleted file mode 100644 (file)
index 5ea257b..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#include "dylib.h"
-#include <stdio.h>
-
-int
-doSomething()
-{
-  // Set a breakpoint here.
-  if (&absent_weak_int != NULL)
-    printf("In absent_weak_int: %d\n", absent_weak_int);
-  if (absent_weak_function != NULL)
-    printf("In absent_weak_func: %p\n", absent_weak_function);
-  if (&present_weak_int != NULL)
-    printf("In present_weak_int: %d\n", present_weak_int);
-  if (present_weak_function != NULL)
-    printf("In present_weak_func: %p\n", present_weak_function);
-
-}
-
-int
-main()
-{
-  return doSomething();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/module.modulemap b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/module.modulemap
deleted file mode 100644 (file)
index 6f76714..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-module Dylib {
-  header "dylib.h"
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/xvalue/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/xvalue/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/xvalue/TestXValuePrinting.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/xvalue/TestXValuePrinting.py
deleted file mode 100644 (file)
index 3a394d7..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ExprXValuePrintingTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-        self.main_source = "main.cpp"
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-
-    def do_test(self, dictionary=None):
-        """Printing an xvalue should work."""
-        self.build(dictionary=dictionary)
-
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                          '// Break here', self.main_source_spec)
-        frame = thread.GetFrameAtIndex(0)
-
-        value = frame.EvaluateExpression("foo().data")
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertEqual(value.GetValueAsSigned(), 1234)
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
-    def test(self):
-        self.do_test()
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/xvalue/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/expression/xvalue/main.cpp
deleted file mode 100644 (file)
index 556c63f..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-struct Tmp
-{
-  int data = 1234;
-};
-
-Tmp foo() { return Tmp(); }
-
-int main(int argc, char const *argv[])
-{
-  int something = foo().data;
-  return 0; // Break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/array/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/array/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/array/TestArray.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/array/TestArray.py
deleted file mode 100644 (file)
index 9b049a2..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-"""
-Test the output of `frame diagnose` for an array access
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestArray(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    @skipIfDarwinEmbedded  # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64
-    def test_array(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.expect("thread list", "Thread should be stopped",
-                    substrs=['stopped'])
-        self.expect(
-            "frame diagnose",
-            "Crash diagnosis was accurate",
-            substrs=["a[10]"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/array/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/array/main.c
deleted file mode 100644 (file)
index 95c6515..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-struct Foo {
-  int b;
-  int c;
-};
-
-int main() {
-  struct Foo *a = 0;
-  return a[10].c;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/bad-reference/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/bad-reference/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/bad-reference/TestBadReference.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/bad-reference/TestBadReference.py
deleted file mode 100644 (file)
index 8650484..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-"""
-Test the output of `frame diagnose` for dereferencing a bad reference
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestBadReference(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    @skipIfDarwinEmbedded  # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64
-    def test_bad_reference(self):
-        TestBase.setUp(self)
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.expect("thread list", "Thread should be stopped",
-                    substrs=['stopped'])
-        self.expect("frame diagnose", "Crash diagnosis was accurate", "f->b")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/bad-reference/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/bad-reference/main.cpp
deleted file mode 100644 (file)
index 2f61152..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-struct Bar {
-  int c;
-  int d;
-};
-
-struct Foo {
-  int a;
-  struct Bar &b;
-};
-
-struct Foo *GetAFoo() {
-  static struct Foo f = { 0, *((Bar*)0) };
-  return &f;
-}
-
-int GetSum(struct Foo *f) {
-  return f->a + f->b.d;
-}
-
-int main() {
-  return GetSum(GetAFoo());
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/complicated-expression/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/complicated-expression/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/complicated-expression/TestComplicatedExpression.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/complicated-expression/TestComplicatedExpression.py
deleted file mode 100644 (file)
index ccc0f88..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-"""
-Test the output of `frame diagnose` for a subexpression of a complicated expression
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestDiagnoseDereferenceArgument(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    @skipIfDarwinEmbedded  # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64
-    def test_diagnose_dereference_argument(self):
-        TestBase.setUp(self)
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.expect("thread list", "Thread should be stopped",
-                    substrs=['stopped'])
-        self.expect(
-            "frame diagnose",
-            "Crash diagnosis was accurate",
-            "f->b->d")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/complicated-expression/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/complicated-expression/main.c
deleted file mode 100644 (file)
index 147aae9..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-struct Bar {
-  int c;
-  int d;
-};
-
-struct Foo {
-  int a;
-  struct Bar *b;
-};
-
-struct Foo *GetAFoo() {
-  static struct Foo f = { 0, 0 };
-  return &f;
-}
-
-int SumTwoIntegers(int x, int y) {
-  return x + y;
-}
-
-int GetSum(struct Foo *f) {
-  return SumTwoIntegers(f->a, f->b->d ? 0 : 1);
-}
-
-int main() {
-  return GetSum(GetAFoo());
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-argument/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-argument/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-argument/TestDiagnoseDereferenceArgument.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-argument/TestDiagnoseDereferenceArgument.py
deleted file mode 100644 (file)
index bdc89a6..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-"""
-Test the output of `frame diagnose` for dereferencing a function argument
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestDiagnoseDereferenceArgument(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    @skipIfDarwinEmbedded  # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64
-    def test_diagnose_dereference_argument(self):
-        TestBase.setUp(self)
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.expect("thread list", "Thread should be stopped",
-                    substrs=['stopped'])
-        self.expect(
-            "frame diagnose",
-            "Crash diagnosis was accurate",
-            "f->b->d")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-argument/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-argument/main.c
deleted file mode 100644 (file)
index 0ec23b1..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-struct Bar {
-  int c;
-  int d;
-};
-
-struct Foo {
-  int a;
-  struct Bar *b;
-};
-
-struct Foo *GetAFoo() {
-  static struct Foo f = { 0, 0 };
-  return &f;
-}
-
-int GetSum(struct Foo *f) {
-  return f->a + f->b->d;
-}
-
-int main() {
-  return GetSum(GetAFoo());
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-function-return/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-function-return/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-function-return/TestDiagnoseDereferenceFunctionReturn.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-function-return/TestDiagnoseDereferenceFunctionReturn.py
deleted file mode 100644 (file)
index c49c807..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-"""
-Test the output of `frame diagnose` for dereferencing a function's return value
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestDiagnoseDereferenceFunctionReturn(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    @skipIfDarwinEmbedded  # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64
-    @expectedFailureAll(oslist=['macosx'], archs=['i386'], bugnumber="rdar://28656408")
-    def test_diagnose_dereference_function_return(self):
-        TestBase.setUp(self)
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.expect("thread list", "Thread should be stopped",
-                    substrs=['stopped'])
-        self.expect(
-            "frame diagnose",
-            "Crash diagnosis was accurate",
-            substrs=[
-                "GetAFoo",
-                "->b"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-function-return/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-function-return/main.c
deleted file mode 100644 (file)
index 420e6f2..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-struct Foo {
-  int a;
-  int b;
-};
-
-struct Foo *GetAFoo() {
-  return 0;
-}
-
-int main() {
-  return GetAFoo()->b;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-this/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-this/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-this/TestDiagnoseDereferenceThis.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-this/TestDiagnoseDereferenceThis.py
deleted file mode 100644 (file)
index 85de511..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-"""
-Test the output of `frame diagnose` for dereferencing `this`
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestDiagnoseDereferenceThis(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    @skipIfDarwinEmbedded  # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64
-    def test_diagnose_dereference_this(self):
-        TestBase.setUp(self)
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.expect("thread list", "Thread should be stopped",
-                    substrs=['stopped'])
-        self.expect(
-            "frame diagnose",
-            "Crash diagnosis was accurate",
-            "this->a")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-this/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-this/main.cpp
deleted file mode 100644 (file)
index 1f17723..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-struct Foo {
-  int a;
-  int b;
-  int Sum() { return a + b; }
-};
-
-struct Foo *GetAFoo() {
-  return (struct Foo*)0;
-}
-
-int main() {
-  struct Foo *foo = GetAFoo();
-  return foo->Sum();
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/inheritance/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/inheritance/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/inheritance/TestDiagnoseInheritance.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/inheritance/TestDiagnoseInheritance.py
deleted file mode 100644 (file)
index 54d44f0..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-"""
-Test the output of `frame diagnose` for calling virtual methods
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestDiagnoseInheritance(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    @skipIfDarwinEmbedded  # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64
-    def test_diagnose_inheritance(self):
-        TestBase.setUp(self)
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.expect("thread list", "Thread should be stopped",
-                    substrs=['stopped'])
-        self.expect("frame diagnose", "Crash diagnosis was accurate", "d")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/inheritance/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/inheritance/main.cpp
deleted file mode 100644 (file)
index 78cac2c..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-#include <stdio.h>
-#include <stdint.h>
-
-class A
-{
-public:
-    A(int a) : 
-        m_a(a)
-    {
-    }
-    virtual ~A(){}
-    virtual int get2() const { return m_a; }
-    virtual int get() const { return m_a; }
-protected:
-    int m_a;    
-};
-
-class B : public A
-{
-public:
-    B(int a, int b) : 
-        A(a),
-        m_b(b)
-    {
-    }
-
-    ~B() override
-    {
-    }
-
-    int get2() const override
-    {
-        return m_b;
-    }
-    int get() const override
-    {
-        return m_b;
-    }   
-            
-protected:
-    int m_b;
-};
-
-struct C
-{
-    C(int c) : m_c(c){}
-    virtual ~C(){}
-    int m_c;
-};
-
-class D : public C, public B
-{
-public:
-    D(int a, int b, int c, int d) : 
-        C(c),
-        B(a, b),
-        m_d(d)
-    {
-    }
-protected:
-    int m_d;
-};
-int main (int argc, char const *argv[], char const *envp[])
-{
-    D *good_d = new D(1, 2, 3, 4);
-    D *d = nullptr;
-    return d->get();
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/local-variable/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/local-variable/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/local-variable/TestLocalVariable.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/local-variable/TestLocalVariable.py
deleted file mode 100644 (file)
index 8d49d30..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-"""
-Test the output of `frame diagnose` for dereferencing a local variable
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestLocalVariable(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    @skipIfDarwinEmbedded  # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64
-    def test_local_variable(self):
-        TestBase.setUp(self)
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.expect("thread list", "Thread should be stopped",
-                    substrs=['stopped'])
-        self.expect("frame diagnose", "Crash diagnosis was accurate", "myInt")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/local-variable/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/local-variable/main.c
deleted file mode 100644 (file)
index 33307be..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-int main() {
-  int *myInt = 0;
-  return *myInt;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/virtual-method-call/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/virtual-method-call/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/virtual-method-call/TestDiagnoseDereferenceVirtualMethodCall.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/virtual-method-call/TestDiagnoseDereferenceVirtualMethodCall.py
deleted file mode 100644 (file)
index 7ea42de..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-"""
-Test the output of `frame diagnose` for calling virtual methods
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestDiagnoseVirtualMethodCall(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    @skipIfDarwinEmbedded  # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64
-    def test_diagnose_virtual_method_call(self):
-        TestBase.setUp(self)
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.expect("thread list", "Thread should be stopped",
-                    substrs=['stopped'])
-        self.expect("frame diagnose", "Crash diagnosis was accurate", "foo")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/virtual-method-call/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/virtual-method-call/main.cpp
deleted file mode 100644 (file)
index 2a03dc1..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-class Foo {
-public:
-  int a;
-  int b;
-  virtual int Sum() { return a + b; }
-};
-
-struct Foo *GetAFoo() {
-  return (struct Foo*)0;
-}
-
-int main() {
-  struct Foo *foo = GetAFoo();
-  return foo->Sum();
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/language/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/language/Makefile
deleted file mode 100644 (file)
index 993dc3f..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-CXX_SOURCES := main.cpp other.cpp other-2.cpp
-C_SOURCES := somefunc.c
-
-include Makefile.rules
-
-other-2.o: other-2.cpp
-       $(CXX) $(CFLAGS_NO_DEBUG) -c $(SRCDIR)/other-2.cpp
-
-somefunc.o: somefunc.c
-       $(CC) $(CFLAGS) -std=c99 -c $(SRCDIR)/somefunc.c
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/language/TestGuessLanguage.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/language/TestGuessLanguage.py
deleted file mode 100644 (file)
index 2c8d1dd..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-"""
-Test the SB API SBFrame::GuessLanguage.
-"""
-
-
-
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-
-
-class TestFrameGuessLanguage(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # If your test case doesn't stress debug info, the
-    # set this to true.  That way it won't be run once for
-    # each debug info format.
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @skipIf(compiler="clang", compiler_version=['<', '10.0'])
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr37658")
-    def test_guess_language(self):
-        """Test GuessLanguage for C and C++."""
-        self.build()
-        self.do_test()
-
-    def check_language(self, thread, frame_no, test_lang):
-        frame = thread.frames[frame_no]
-        self.assertTrue(frame.IsValid(), "Frame %d was not valid."%(frame_no))
-        lang = frame.GuessLanguage()
-        self.assertEqual(lang, test_lang)
-
-    def do_test(self):
-        """Test GuessLanguage for C & C++."""
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create a breakpoint in main.c at the source matching
-        # "Set a breakpoint here"
-        breakpoint = target.BreakpointCreateBySourceRegex(
-            "Set breakpoint here", lldb.SBFileSpec("somefunc.c"))
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() >= 1,
-                        VALID_BREAKPOINT)
-
-        error = lldb.SBError()
-        # This is the launch info.  If you want to launch with arguments or
-        # environment variables, add them using SetArguments or
-        # SetEnvironmentEntries
-
-        launch_info = lldb.SBLaunchInfo(None)
-        process = target.Launch(launch_info, error)
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Did we hit our breakpoint?
-        from lldbsuite.test.lldbutil import get_threads_stopped_at_breakpoint
-        threads = get_threads_stopped_at_breakpoint(process, breakpoint)
-        self.assertTrue(
-            len(threads) == 1,
-            "There should be a thread stopped at our breakpoint")
-
-        # The hit count for the breakpoint should be 1.
-        self.assertTrue(breakpoint.GetHitCount() == 1)
-
-        thread = threads[0]
-
-        c_frame_language = lldb.eLanguageTypeC99
-        cxx_frame_language = lldb.eLanguageTypeC_plus_plus_11
-        # gcc emits DW_LANG_C89 even if -std=c99 was specified
-        if "gcc" in self.getCompiler():
-            c_frame_language = lldb.eLanguageTypeC89
-            cxx_frame_language = lldb.eLanguageTypeC_plus_plus
-
-        self.check_language(thread, 0, c_frame_language)
-        self.check_language(thread, 1, cxx_frame_language)
-        self.check_language(thread, 2, lldb.eLanguageTypeC_plus_plus)
-
-
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/language/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/language/main.cpp
deleted file mode 100644 (file)
index f5449f2..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <stdio.h>
-#include "other.h"
-
-int
-main()
-{
-  int test_var = 10;
-  Other::DoSomethingElse();
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/language/other-2.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/language/other-2.cpp
deleted file mode 100644 (file)
index 77632de..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#include "other.h"
-
-void 
-Other::DoSomethingElse()
-{
-  DoSomething();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/language/other.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/language/other.cpp
deleted file mode 100644 (file)
index 41f4f26..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#include "other.h"
-
-extern "C" void some_func();
-
-void 
-Other::DoSomething()
-{
-  some_func();
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/language/other.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/language/other.h
deleted file mode 100644 (file)
index 0a2c125..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-class Other
-{
- public:
-  static void DoSomething();
-  static void DoSomethingElse();
-};
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/language/somefunc.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/language/somefunc.c
deleted file mode 100644 (file)
index a4b4f47..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <stdio.h>
-
-void
-some_func()
-{
-  printf("Set breakpoint here.");
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/recognizer/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/recognizer/Makefile
deleted file mode 100644 (file)
index 8248c01..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-OBJC_SOURCES := main.m
-
-CFLAGS_EXTRAS := -g0 # No debug info.
-MAKE_DSYM := NO
-
-
-
-LD_EXTRAS := -framework Foundation
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/recognizer/TestFrameRecognizer.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/recognizer/TestFrameRecognizer.py
deleted file mode 100644 (file)
index 2ecbe1e..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-# encoding: utf-8
-"""
-Test lldb's frame recognizers.
-"""
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-import recognizer
-
-class FrameRecognizerTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @skipUnlessDarwin
-    def test_frame_recognizer_1(self):
-        self.build()
-
-        target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
-        self.assertTrue(target, VALID_TARGET)
-
-        self.runCmd("command script import " + os.path.join(self.getSourceDir(), "recognizer.py"))
-
-        self.expect("frame recognizer list",
-                    substrs=['no matching results found.'])
-
-        self.runCmd("frame recognizer add -l recognizer.MyFrameRecognizer -s a.out -n foo")
-
-        self.expect("frame recognizer list",
-                    substrs=['0: recognizer.MyFrameRecognizer, module a.out, function foo'])
-
-        self.runCmd("frame recognizer add -l recognizer.MyOtherFrameRecognizer -s a.out -n bar -x")
-
-        self.expect("frame recognizer list",
-                    substrs=['0: recognizer.MyFrameRecognizer, module a.out, function foo',
-                             '1: recognizer.MyOtherFrameRecognizer, module a.out, function bar (regexp)'
-                    ])
-
-        self.runCmd("frame recognizer delete 0")
-
-        self.expect("frame recognizer list",
-                    substrs=['1: recognizer.MyOtherFrameRecognizer, module a.out, function bar (regexp)'])
-
-        self.runCmd("frame recognizer clear")
-
-        self.expect("frame recognizer list",
-                    substrs=['no matching results found.'])
-
-        self.runCmd("frame recognizer add -l recognizer.MyFrameRecognizer -s a.out -n foo")
-
-        lldbutil.run_break_set_by_symbol(self, "foo")
-        self.runCmd("r")
-
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped', 'stop reason = breakpoint'])
-
-        process = target.GetProcess()
-        thread = process.GetSelectedThread()
-        frame = thread.GetSelectedFrame()
-
-        self.assertEqual(frame.GetSymbol().GetName(), "foo")
-        self.assertFalse(frame.GetLineEntry().IsValid())
-
-        self.expect("frame variable",
-                    substrs=['(int) a = 42', '(int) b = 56'])
-
-        # Recognized arguments don't show up by default...
-        variables = frame.GetVariables(lldb.SBVariablesOptions())
-        self.assertEqual(variables.GetSize(), 0)
-
-        # ...unless you set target.display-recognized-arguments to 1...
-        self.runCmd("settings set target.display-recognized-arguments 1")
-        variables = frame.GetVariables(lldb.SBVariablesOptions())
-        self.assertEqual(variables.GetSize(), 2)
-
-        # ...and you can reset it back to 0 to hide them again...
-        self.runCmd("settings set target.display-recognized-arguments 0")
-        variables = frame.GetVariables(lldb.SBVariablesOptions())
-        self.assertEqual(variables.GetSize(), 0)
-
-        # ... or explicitly ask for them with SetIncludeRecognizedArguments(True).
-        opts = lldb.SBVariablesOptions()
-        opts.SetIncludeRecognizedArguments(True)
-        variables = frame.GetVariables(opts)
-
-        self.assertEqual(variables.GetSize(), 2)
-        self.assertEqual(variables.GetValueAtIndex(0).name, "a")
-        self.assertEqual(variables.GetValueAtIndex(0).signed, 42)
-        self.assertEqual(variables.GetValueAtIndex(0).GetValueType(), lldb.eValueTypeVariableArgument)
-        self.assertEqual(variables.GetValueAtIndex(1).name, "b")
-        self.assertEqual(variables.GetValueAtIndex(1).signed, 56)
-        self.assertEqual(variables.GetValueAtIndex(1).GetValueType(), lldb.eValueTypeVariableArgument)
-
-        self.expect("frame recognizer info 0",
-                    substrs=['frame 0 is recognized by recognizer.MyFrameRecognizer'])
-
-        self.expect("frame recognizer info 999", error=True,
-                    substrs=['no frame with index 999'])
-
-        self.expect("frame recognizer info 1",
-                    substrs=['frame 1 not recognized by any recognizer'])
-
-        # FIXME: The following doesn't work yet, but should be fixed.
-        """
-        lldbutil.run_break_set_by_symbol(self, "bar")
-        self.runCmd("c")
-
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped', 'stop reason = breakpoint'])
-
-        self.expect("frame variable -t",
-                    substrs=['(int *) a = '])
-
-        self.expect("frame variable -t *a",
-                    substrs=['*a = 78'])
-        """
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/recognizer/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/recognizer/main.m
deleted file mode 100644 (file)
index 9c6ce9d..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-//===-- main.m ------------------------------------------------*- ObjC -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#import <Foundation/Foundation.h>
-
-void foo(int a, int b)
-{
-    printf("%d %d\n", a, b);
-}
-
-void bar(int *ptr)
-{
-       printf("%d\n", *ptr);
-}
-
-int main (int argc, const char * argv[])
-{
-    foo(42, 56);
-    int i = 78;
-    bar(&i);
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/recognizer/recognizer.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/recognizer/recognizer.py
deleted file mode 100644 (file)
index 548676c..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-# encoding: utf-8
-
-import lldb
-
-class MyFrameRecognizer(object):
-    def get_recognized_arguments(self, frame):
-        if frame.name == "foo":
-            arg1 = frame.EvaluateExpression("$arg1").signed
-            arg2 = frame.EvaluateExpression("$arg2").signed
-            val1 = frame.GetThread().GetProcess().GetTarget().CreateValueFromExpression("a", "%d" % arg1)
-            val2 = frame.GetThread().GetProcess().GetTarget().CreateValueFromExpression("b", "%d" % arg2)
-            return [val1, val2]
-        elif frame.name == "bar":
-            arg1 = frame.EvaluateExpression("$arg1").signed
-            val1 = frame.GetThread().GetProcess().GetTarget().CreateValueFromExpression("a", "(int *)%d" % arg1)
-            return [val1]
-        return []
-
-class MyOtherFrameRecognizer(object):
-    def get_recognized_arguments(self, frame):
-        return []
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/select/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/select/Makefile
deleted file mode 100644 (file)
index 3d0b98f..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-CXX_SOURCES := main.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/select/TestFrameSelect.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/select/TestFrameSelect.py
deleted file mode 100644 (file)
index 2f2dd5a..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-"""
-Test 'frame select' command.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestFrameSelect(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    @skipIfWindows
-    def test_relative(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.expect("frame select -r 1", substrs=["nested2() at"])
-        self.expect("frame select -r -1", substrs=["nested3() at"])
-
-        self.expect("frame select -r -1", error=True, substrs=["Already at the bottom of the stack."])
-        self.expect("frame select -r -2147483647", error=True, substrs=["Already at the bottom of the stack."])
-        self.expect("frame select -r -2147483648", error=True, substrs=["error: invalid frame offset argument '-2147483648'"])
-        self.expect("frame select -r -2147483649", error=True, substrs=["error: invalid frame offset argument '-2147483649'"])
-
-        self.expect("frame select -r 1", substrs=["nested2() at"])
-        self.expect("frame select -r -2", substrs=["nested3() at"])
-        self.expect("frame select -r 1", substrs=["nested2() at"])
-        self.expect("frame select -r -2147483647", substrs=["nested3() at"])
-        self.expect("frame select -r 1", substrs=["nested2() at"])
-        self.expect("frame select -r -2147483648", error=True, substrs=["error: invalid frame offset argument '-2147483648'"])
-        self.expect("frame select -r -2147483649", error=True, substrs=["error: invalid frame offset argument '-2147483649'"])
-
-        self.expect("frame select -r 100")
-        self.expect("frame select -r 1", error=True, substrs=["Already at the top of the stack."])
-
-    @no_debug_info_test
-    @skipIfWindows
-    def test_mixing_relative_and_abs(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        # The function associated with each frame index can change depending
-        # on the function calling main (e.g. `start`), so this only tests that
-        # the frame index number is correct. We test the actual functions
-        # in the relative test.
-
-        # Jump to the top of the stack.
-        self.expect("frame select 0", substrs=["frame #0"])
-
-        # Run some relative commands.
-        self.expect("up", substrs=["frame #1"])
-        self.expect("frame select -r 1", substrs=["frame #2"])
-        self.expect("frame select -r -1", substrs=["frame #1"])
-
-        # Test that absolute indices still work.
-        self.expect("frame select 2", substrs=["frame #2"])
-        self.expect("frame select 1", substrs=["frame #1"])
-        self.expect("frame select 3", substrs=["frame #3"])
-        self.expect("frame select 0", substrs=["frame #0"])
-        self.expect("frame select 1", substrs=["frame #1"])
-
-        # Run some other relative frame select commands.
-        self.expect("down", substrs=["frame #0"])
-        self.expect("frame select -r 1", substrs=["frame #1"])
-        self.expect("frame select -r -1", substrs=["frame #0"])
-
-        # Test that absolute indices still work.
-        self.expect("frame select 2", substrs=["frame #2"])
-        self.expect("frame select 1", substrs=["frame #1"])
-        self.expect("frame select 3", substrs=["frame #3"])
-        self.expect("frame select 0", substrs=["frame #0"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/select/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/select/main.cpp
deleted file mode 100644 (file)
index c852bdb..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-int nested3() {
-  return 3; // Set break point at this line.
-}
-
-int nested2() {
-  return 2 + nested3();
-}
-
-int nested1() {
-  return 1 + nested2();
-}
-
-
-int main(int argc, char **argv) {
-  return nested1();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/var-scope/TestFrameVariableScope.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/var-scope/TestFrameVariableScope.py
deleted file mode 100644 (file)
index 48e49ed..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(
-    __file__, globals(), [])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/var-scope/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/var-scope/main.c
deleted file mode 100644 (file)
index 71f4cb2..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-int foo(int x, int y) {
-    int z = 3 + x;
-    return z + y; //% self.expect("frame variable -s", substrs=['ARG: (int) x = -3','ARG: (int) y = 0'])
-     //% self.expect("frame variable -s x", substrs=['ARG: (int) x = -3'])
-     //% self.expect("frame variable -s y", substrs=['ARG: (int) y = 0'])
-     //% self.expect("frame variable -s z", substrs=['LOCAL: (int) z = 0'])
-}
-
-int main (int argc, char const *argv[])
-{
-    return foo(-3,0);  //% self.expect("frame variable -s argc argv", substrs=['ARG: (int) argc ='])
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/var/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/var/Makefile
deleted file mode 100644 (file)
index 695335e..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-C_SOURCES := main.c
-CFLAGS_EXTRAS := -std=c99
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/var/TestFrameVar.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/var/TestFrameVar.py
deleted file mode 100644 (file)
index aa0f6b7..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-"""
-Make sure the frame variable -g, -a, and -l flags work.
-"""
-
-
-
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbtest import *
-
-
-class TestFrameVar(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # If your test case doesn't stress debug info, the
-    # set this to true.  That way it won't be run once for
-    # each debug info format.
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_frame_var(self):
-        self.build()
-        self.do_test()
-
-    def do_test(self):
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create a breakpoint in main.c at the source matching
-        # "Set a breakpoint here"
-        breakpoint = target.BreakpointCreateBySourceRegex(
-            "Set a breakpoint here", lldb.SBFileSpec("main.c"))
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() >= 1,
-                        VALID_BREAKPOINT)
-
-        error = lldb.SBError()
-        # This is the launch info.  If you want to launch with arguments or
-        # environment variables, add them using SetArguments or
-        # SetEnvironmentEntries
-
-        launch_info = lldb.SBLaunchInfo(None)
-        process = target.Launch(launch_info, error)
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Did we hit our breakpoint?
-        from lldbsuite.test.lldbutil import get_threads_stopped_at_breakpoint
-        threads = get_threads_stopped_at_breakpoint(process, breakpoint)
-        self.assertTrue(
-            len(threads) == 1,
-            "There should be a thread stopped at our breakpoint")
-
-        # The hit count for the breakpoint should be 1.
-        self.assertTrue(breakpoint.GetHitCount() == 1)
-
-        frame = threads[0].GetFrameAtIndex(0)
-        command_result = lldb.SBCommandReturnObject()
-        interp = self.dbg.GetCommandInterpreter()
-
-        # Just get args:
-        result = interp.HandleCommand("frame var -l", command_result)
-        self.assertEqual(result, lldb.eReturnStatusSuccessFinishResult, "frame var -a didn't succeed")
-        output = command_result.GetOutput()
-        self.assertTrue("argc" in output, "Args didn't find argc")
-        self.assertTrue("argv" in output, "Args didn't find argv")
-        self.assertTrue("test_var" not in output, "Args found a local")
-        self.assertTrue("g_var" not in output, "Args found a global")
-
-        # Just get locals:
-        result = interp.HandleCommand("frame var -a", command_result)
-        self.assertEqual(result, lldb.eReturnStatusSuccessFinishResult, "frame var -a didn't succeed")
-        output = command_result.GetOutput()
-        self.assertTrue("argc" not in output, "Locals found argc")
-        self.assertTrue("argv" not in output, "Locals found argv")
-        self.assertTrue("test_var" in output, "Locals didn't find test_var")
-        self.assertTrue("g_var" not in output, "Locals found a global")
-
-        # Get the file statics:
-        result = interp.HandleCommand("frame var -l -a -g", command_result)
-        self.assertEqual(result, lldb.eReturnStatusSuccessFinishResult, "frame var -a didn't succeed")
-        output = command_result.GetOutput()
-        self.assertTrue("argc" not in output, "Globals found argc")
-        self.assertTrue("argv" not in output, "Globals found argv")
-        self.assertTrue("test_var" not in output, "Globals found test_var")
-        self.assertTrue("g_var" in output, "Globals didn't find g_var")
-
-
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/var/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/frame/var/main.c
deleted file mode 100644 (file)
index da23af2..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#include <stdio.h>
-
-int g_var = 200;
-
-int
-main(int argc, char **argv)
-{
-  int test_var = 10;
-  printf ("Set a breakpoint here: %d %d.\n", test_var, g_var);
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/gui/basic/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/gui/basic/Makefile
deleted file mode 100644 (file)
index c9319d6..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-C_SOURCES := main.c
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/gui/basic/TestGuiBasic.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/gui/basic/TestGuiBasic.py
deleted file mode 100644 (file)
index 2dcc7d0..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-"""
-Test that the 'gui' displays the help window and basic UI.
-"""
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.lldbpexpect import PExpectTest
-
-class BasicGuiCommandTest(PExpectTest):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # PExpect uses many timeouts internally and doesn't play well
-    # under ASAN on a loaded machine..
-    @skipIfAsan
-    @skipIfCursesSupportMissing
-    @skipIfRemote # "run" command will not work correctly for remote debug
-    def test_gui(self):
-        self.build()
-
-        self.launch(executable=self.getBuildArtifact("a.out"), dimensions=(100,500))
-        self.expect('br set -f main.c -p "// Break here"', substrs=["Breakpoint 1", "address ="])
-        self.expect("run", substrs=["stop reason ="])
-
-
-        escape_key = chr(27).encode()
-
-        # Start the GUI for the first time and check for the welcome window.
-        self.child.sendline("gui")
-        self.child.expect_exact("Welcome to the LLDB curses GUI.")
-
-        # Press escape to quit the welcome screen
-        self.child.send(escape_key)
-        # Press escape again to quit the gui
-        self.child.send(escape_key)
-        self.expect_prompt()
-
-        # Start the GUI a second time, this time we should have the normal GUI.
-        self.child.sendline("gui")
-        # Check for GUI elements in the menu bar.
-        self.child.expect_exact("Target")
-        self.child.expect_exact("Process")
-        self.child.expect_exact("Thread")
-        self.child.expect_exact("View")
-        self.child.expect_exact("Help")
-
-        # Check the sources window.
-        self.child.expect_exact("Sources")
-        self.child.expect_exact("main")
-        self.child.expect_exact("funky_var_name_that_should_be_rendered")
-
-        # Check the variable window.
-        self.child.expect_exact("Variables")
-        self.child.expect_exact("(int) funky_var_name_that_should_be_rendered = 22")
-
-        # Check the bar at the bottom.
-        self.child.expect_exact("Frame:")
-
-        # Press escape to quit the gui
-        self.child.send(escape_key)
-
-        self.expect_prompt()
-        self.quit()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/gui/basic/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/gui/basic/main.c
deleted file mode 100644 (file)
index 97d57fc..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-int main(int argc, char **argv) {
-  int funky_var_name_that_should_be_rendered = 22;
-  return 0; // Break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/gui/invalid-args/TestInvalidArgsGui.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/gui/invalid-args/TestInvalidArgsGui.py
deleted file mode 100644 (file)
index 11fdc92..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-
-class GuiTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    @skipIfCursesSupportMissing
-    def test_reproducer_generate_invalid_invocation(self):
-        self.expect("gui blub", error=True,
-                    substrs=["the gui command takes no arguments."])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/help/TestHelp.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/help/TestHelp.py
deleted file mode 100644 (file)
index 31656af..0000000
+++ /dev/null
@@ -1,265 +0,0 @@
-"""
-Test some lldb help commands.
-
-See also CommandInterpreter::OutputFormattedHelpText().
-"""
-
-
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class HelpCommandTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    def test_simplehelp(self):
-        """A simple test of 'help' command and its output."""
-        self.expect("help",
-                    startstr='Debugger commands:')
-
-        self.expect("help -a", matching=False,
-                    substrs=['next'])
-
-        self.expect("help", matching=True,
-                    substrs=['next'])
-
-    @no_debug_info_test
-    def test_help_on_help(self):
-        """Testing the help on the help facility."""
-        self.expect("help help", matching=True,
-                    substrs=['--hide-aliases',
-                             '--hide-user-commands'])
-
-    @no_debug_info_test
-    def version_number_string(self):
-        """Helper function to find the version number string of lldb."""
-        plist = os.path.join(
-            os.environ["LLDB_SRC"],
-            "resources",
-            "LLDB-Info.plist")
-        try:
-            CFBundleVersionSegFound = False
-            with open(plist, 'r') as f:
-                for line in f:
-                    if CFBundleVersionSegFound:
-                        version_line = line.strip()
-                        import re
-                        m = re.match("<string>(.*)</string>", version_line)
-                        if m:
-                            version = m.group(1)
-                            return version
-                        else:
-                            # Unsuccessful, let's juts break out of the for
-                            # loop.
-                            break
-
-                    if line.find("<key>CFBundleVersion</key>") != -1:
-                        # Found our match.  The next line contains our version
-                        # string, for example:
-                        #
-                        #     <string>38</string>
-                        CFBundleVersionSegFound = True
-
-        except:
-            # Just fallthrough...
-            import traceback
-            traceback.print_exc()
-
-        # Use None to signify that we are not able to grok the version number.
-        return None
-
-    @no_debug_info_test
-    def test_help_arch(self):
-        """Test 'help arch' which should list of supported architectures."""
-        self.expect("help arch",
-                    substrs=['arm', 'x86_64', 'i386'])
-
-    @no_debug_info_test
-    def test_help_version(self):
-        """Test 'help version' and 'version' commands."""
-        self.expect("help version",
-                    substrs=['Show the LLDB debugger version.'])
-        import re
-        version_str = self.version_number_string()
-        match = re.match('[0-9]+', version_str)
-        search_regexp = ['lldb( version|-' + (version_str if match else '[0-9]+') + ').*\n']
-
-        self.expect("version",
-                    patterns=search_regexp)
-
-    @no_debug_info_test
-    def test_help_should_not_crash_lldb(self):
-        """Command 'help disasm' should not crash lldb."""
-        self.runCmd("help disasm", check=False)
-        self.runCmd("help unsigned-integer")
-
-    @no_debug_info_test
-    def test_help_should_not_hang_emacsshell(self):
-        """Command 'settings set term-width 0' should not hang the help command."""
-        self.expect(
-            "settings set term-width 0",
-            COMMAND_FAILED_AS_EXPECTED,
-            error=True,
-            substrs=['error: 0 is out of range, valid values must be between'])
-        # self.runCmd("settings set term-width 0")
-        self.expect("help",
-                    startstr='Debugger commands:')
-
-    @no_debug_info_test
-    def test_help_breakpoint_set(self):
-        """Test that 'help breakpoint set' does not print out redundant lines of:
-        'breakpoint set [-s <shlib-name>] ...'."""
-        self.expect("help breakpoint set", matching=False,
-                    substrs=['breakpoint set [-s <shlib-name>]'])
-
-    @no_debug_info_test
-    def test_help_image_dump_symtab_should_not_crash(self):
-        """Command 'help image dump symtab' should not crash lldb."""
-        # 'image' is an alias for 'target modules'.
-        self.expect("help image dump symtab",
-                    substrs=['dump symtab',
-                             'sort-order'])
-
-    @no_debug_info_test
-    def test_help_image_du_sym_is_ambiguous(self):
-        """Command 'help image du sym' is ambiguous and spits out the list of candidates."""
-        self.expect("help image du sym",
-                    COMMAND_FAILED_AS_EXPECTED, error=True,
-                    substrs=['error: ambiguous command image du sym',
-                             'symfile',
-                             'symtab'])
-
-    @no_debug_info_test
-    def test_help_image_du_line_should_work(self):
-        """Command 'help image du line-table' is not ambiguous and should work."""
-        # 'image' is an alias for 'target modules'.
-        self.expect("help image du line", substrs=[
-                    'Dump the line table for one or more compilation units'])
-
-    @no_debug_info_test
-    def test_help_target_variable_syntax(self):
-        """Command 'help target variable' should display <variable-name> ..."""
-        self.expect("help target variable",
-                    substrs=['<variable-name> [<variable-name> [...]]'])
-
-    @no_debug_info_test
-    def test_help_watchpoint_and_its_args(self):
-        """Command 'help watchpoint', 'help watchpt-id', and 'help watchpt-id-list' should work."""
-        self.expect("help watchpoint",
-                    substrs=['delete', 'disable', 'enable', 'list'])
-        self.expect("help watchpt-id",
-                    substrs=['<watchpt-id>'])
-        self.expect("help watchpt-id-list",
-                    substrs=['<watchpt-id-list>'])
-
-    @no_debug_info_test
-    def test_help_watchpoint_set(self):
-        """Test that 'help watchpoint set' prints out 'expression' and 'variable'
-        as the possible subcommands."""
-        self.expect("help watchpoint set",
-                    substrs=['The following subcommands are supported:'],
-                    patterns=['expression +--',
-                              'variable +--'])
-
-    @no_debug_info_test
-    def test_help_po_hides_options(self):
-        """Test that 'help po' does not show all the options for expression"""
-        self.expect(
-            "help po",
-            substrs=[
-                '--show-all-children',
-                '--object-description'],
-            matching=False)
-
-    @no_debug_info_test
-    def test_help_run_hides_options(self):
-        """Test that 'help run' does not show all the options for process launch"""
-        self.expect("help run",
-                    substrs=['--arch', '--environment'], matching=False)
-
-    @no_debug_info_test
-    def test_help_next_shows_options(self):
-        """Test that 'help next' shows all the options for thread step-over"""
-        self.expect("help next",
-                    substrs=['--step-out-avoids-no-debug', '--run-mode'], matching=True)
-
-    @no_debug_info_test
-    def test_help_provides_alternatives(self):
-        """Test that help on commands that don't exist provides information on additional help avenues"""
-        self.expect(
-            "help thisisnotadebuggercommand",
-            substrs=[
-                "'thisisnotadebuggercommand' is not a known command.",
-                "Try 'help' to see a current list of commands.",
-                "Try 'apropos thisisnotadebuggercommand' for a list of related commands.",
-                "Try 'type lookup thisisnotadebuggercommand' for information on types, methods, functions, modules, etc."],
-            error=True)
-
-        self.expect(
-            "help process thisisnotadebuggercommand",
-            substrs=[
-                "'process thisisnotadebuggercommand' is not a known command.",
-                "Try 'help' to see a current list of commands.",
-                "Try 'apropos thisisnotadebuggercommand' for a list of related commands.",
-                "Try 'type lookup thisisnotadebuggercommand' for information on types, methods, functions, modules, etc."])
-
-    @no_debug_info_test
-    def test_custom_help_alias(self):
-        """Test that aliases pick up custom help text."""
-        def cleanup():
-            self.runCmd('command unalias afriendlyalias', check=False)
-            self.runCmd('command unalias averyfriendlyalias', check=False)
-
-        self.addTearDownHook(cleanup)
-        self.runCmd(
-            'command alias --help "I am a friendly alias" -- afriendlyalias help')
-        self.expect(
-            "help afriendlyalias",
-            matching=True,
-            substrs=['I am a friendly alias'])
-        self.runCmd(
-            'command alias --long-help "I am a very friendly alias" -- averyfriendlyalias help')
-        self.expect("help averyfriendlyalias", matching=True,
-                    substrs=['I am a very friendly alias'])
-    @no_debug_info_test
-    def test_alias_prints_origin(self):
-        """Test that 'help <unique_match_to_alias>' prints the alias origin."""
-        def cleanup():
-            self.runCmd('command unalias alongaliasname', check=False)
-
-        self.addTearDownHook(cleanup)
-        self.runCmd('command alias alongaliasname help')
-        self.expect("help alongaliasna", matching=True,
-                    substrs=["'alongaliasna' is an abbreviation for 'help'"])
-
-    @no_debug_info_test
-    def test_hidden_help(self):
-        self.expect("help -h",
-                    substrs=["_regexp-bt"])
-
-    @no_debug_info_test
-    def test_help_ambiguous(self):
-        self.expect("help g",
-                    substrs=["Help requested with ambiguous command name, possible completions:",
-                             "gdb-remote", "gui"])
-
-    @no_debug_info_test
-    def test_help_unknown_flag(self):
-        self.expect("help -z", error=True,
-                    substrs=["unknown or ambiguous option"])
-
-    @no_debug_info_test
-    def test_help_format_output(self):
-        """Test that help output reaches TerminalWidth."""
-        self.runCmd(
-            'settings set term-width 108')
-        self.expect(
-            "help format",
-            matching=True,
-            substrs=['<format> -- One of the format names'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/log/basic/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/log/basic/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/log/basic/TestLogging.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/log/basic/TestLogging.py
deleted file mode 100644 (file)
index 16321dc..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-"""
-Test lldb logging.  This test just makes sure logging doesn't crash, and produces some output.
-"""
-
-
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class LogTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        super(LogTestCase, self).setUp()
-        self.log_file = self.getBuildArtifact("log-file.txt")
-
-    def test_file_writing(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.expect("file " + exe,
-                    patterns=["Current executable set to .*a.out"])
-
-        if (os.path.exists(self.log_file)):
-            os.remove(self.log_file)
-
-        # By default, Debugger::EnableLog() will set log options to
-        # PREPEND_THREAD_NAME + OPTION_THREADSAFE. We don't want the
-        # threadnames here, so we enable just threadsafe (-t).
-        self.runCmd("log enable -t -f '%s' lldb commands" % (self.log_file))
-
-        self.runCmd("command alias bp breakpoint")
-
-        self.runCmd("bp set -n main")
-
-        self.runCmd("bp l")
-
-        self.runCmd("log disable lldb")
-
-        self.assertTrue(os.path.isfile(self.log_file))
-
-        f = open(self.log_file)
-        log_lines = f.readlines()
-        f.close()
-        os.remove(self.log_file)
-
-        self.assertGreater(
-            len(log_lines),
-            0,
-            "Something was written to the log file.")
-
-    # Check that lldb truncates its log files
-    def test_log_truncate(self):
-        # put something in our log file
-        with open(self.log_file, "w") as f:
-            for i in range(1, 1000):
-                f.write("bacon\n")
-
-        self.runCmd("log enable -t -f '%s' lldb commands" % self.log_file)
-        self.runCmd("help log")
-        self.runCmd("log disable lldb")
-
-        self.assertTrue(os.path.isfile(self.log_file))
-        with open(self.log_file, "r") as f:
-            contents = f.read()
-
-        # check that it got removed
-        self.assertEquals(contents.find("bacon"), -1)
-
-    # Check that lldb can append to a log file
-    def test_log_append(self):
-        # put something in our log file
-        with open(self.log_file, "w") as f:
-            f.write("bacon\n")
-
-        self.runCmd( "log enable -t -a -f '%s' lldb commands" % self.log_file)
-        self.runCmd("help log")
-        self.runCmd("log disable lldb")
-
-        self.assertTrue(os.path.isfile(self.log_file))
-        with open(self.log_file, "r") as f:
-            contents = f.read()
-
-        # check that it is still there
-        self.assertEquals(contents.find("bacon"), 0)
-
-    # Enable all log options and check that nothing crashes.
-    @skipIfWindows
-    def test_all_log_options(self):
-        if (os.path.exists(self.log_file)):
-            os.remove(self.log_file)
-
-        self.runCmd("log enable -v -t -s -T -p -n -S -F -f '%s' lldb commands" % self.log_file)
-        self.runCmd("help log")
-        self.runCmd("log disable lldb")
-
-        self.assertTrue(os.path.isfile(self.log_file))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/log/basic/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/log/basic/main.cpp
deleted file mode 100644 (file)
index f5f1687..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <cstdlib>
-#include <string>
-#include <fstream>
-#include <iostream>
-
-int
-product (int x, int y)
-{
-    int result = x * y;
-    return result;
-}
-
-int
-sum (int a, int b)
-{
-    int result = a + b;
-    return result;
-}
-
-int
-strange_max (int m, int n)
-{
-    if (m > n)
-        return m;
-    else if (n > m)
-        return n;
-    else
-        return 0;
-}
-
-int
-foo (int i, int j)
-{
-    if (strange_max (i, j) == i)
-        return product (i, j);
-    else if (strange_max  (i, j) == j)
-        return sum (i, j);
-    else
-        return product (sum (i, i), sum (j, j));
-}
-
-int
-main(int argc, char const *argv[])
-{
-
-    int array[3];
-
-    array[0] = foo (1238, 78392);
-    array[1] = foo (379265, 23674);
-    array[2] = foo (872934, 234);
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/log/invalid-args/TestInvalidArgsLog.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/log/invalid-args/TestInvalidArgsLog.py
deleted file mode 100644 (file)
index 4d3c573..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-
-class InvalidArgsLogTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    def test_enable_empty(self):
-        self.expect("log enable", error=True,
-                    substrs=["error: log enable takes a log channel and one or more log types."])
-
-    @no_debug_info_test
-    def test_disable_empty(self):
-        self.expect("log disable", error=True,
-                    substrs=["error: log disable takes a log channel and one or more log types."])
-
-    @no_debug_info_test
-    def test_timer_empty(self):
-        self.expect("log timer", error=True,
-                    substrs=["error: Missing subcommand"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/platform/basic/TestPlatformCommand.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/platform/basic/TestPlatformCommand.py
deleted file mode 100644 (file)
index ab45b22..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-"""
-Test some lldb platform commands.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class PlatformCommandTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    def test_help_platform(self):
-        self.runCmd("help platform")
-
-    @no_debug_info_test
-    def test_list(self):
-        self.expect("platform list",
-                    patterns=['^Available platforms:'])
-
-    @no_debug_info_test
-    def test_process_list(self):
-        self.expect("platform process list",
-                    substrs=['PID', 'TRIPLE', 'NAME'])
-
-    @no_debug_info_test
-    def test_process_info_with_no_arg(self):
-        """This is expected to fail and to return a proper error message."""
-        self.expect("platform process info", error=True,
-                    substrs=['one or more process id(s) must be specified'])
-
-    @no_debug_info_test
-    def test_status(self):
-        self.expect(
-            "platform status",
-            substrs=[
-                'Platform',
-                'Triple',
-                'OS Version',
-                'Kernel',
-                'Hostname'])
-
-    @expectedFailureAll(oslist=["windows"])
-    @no_debug_info_test
-    def test_shell(self):
-        """ Test that the platform shell command can invoke ls. """
-        triple = self.dbg.GetSelectedPlatform().GetTriple()
-        if re.match(".*-.*-windows", triple):
-            self.expect(
-                "platform shell dir c:\\", substrs=[
-                    "Windows", "Program Files"])
-        elif re.match(".*-.*-.*-android", triple):
-            self.expect(
-                "platform shell ls /",
-                substrs=[
-                    "cache",
-                    "dev",
-                    "system"])
-        else:
-            self.expect("platform shell ls /", substrs=["dev", "tmp", "usr"])
-
-    @no_debug_info_test
-    def test_shell_builtin(self):
-        """ Test a shell built-in command (echo) """
-        self.expect("platform shell echo hello lldb",
-                    substrs=["hello lldb"])
-
-    # FIXME: re-enable once platform shell -t can specify the desired timeout
-    @no_debug_info_test
-    def test_shell_timeout(self):
-        """ Test a shell built-in command (sleep) that times out """
-        self.skipTest("due to taking too long to complete.")
-        self.expect("platform shell sleep 15", error=True, substrs=[
-                    "error: timed out waiting for shell command to complete"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/platform/basic/TestPlatformPython.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/platform/basic/TestPlatformPython.py
deleted file mode 100644 (file)
index ab10d30..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-"""
-Test the lldb platform Python API.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class PlatformPythonTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(['pyapi'])
-    @no_debug_info_test
-    def test_platform_list(self):
-        """Test SBDebugger::GetNumPlatforms() & GetPlatformAtIndex() API"""
-        # Verify the host platform is present by default.
-        initial_num_platforms = self.dbg.GetNumPlatforms()
-        self.assertGreater(initial_num_platforms, 0)
-        host_platform = self.dbg.GetPlatformAtIndex(0)
-        self.assertTrue(host_platform.IsValid() and
-                        host_platform.GetName() == 'host',
-                        'The host platform is present')
-        # Select another platform and verify that the platform is added to
-        # the platform list.
-        platform_idx = self.dbg.GetNumAvailablePlatforms() - 1
-        if platform_idx < 1:
-            self.fail('No platforms other than host are available')
-        platform_data = self.dbg.GetAvailablePlatformInfoAtIndex(platform_idx)
-        platform_name = platform_data.GetValueForKey('name').GetStringValue(100)
-        self.assertNotEqual(platform_name, 'host')
-        self.dbg.SetCurrentPlatform(platform_name)
-        selected_platform = self.dbg.GetSelectedPlatform()
-        self.assertTrue(selected_platform.IsValid())
-        self.assertEqual(selected_platform.GetName(), platform_name)
-        self.assertEqual(self.dbg.GetNumPlatforms(), initial_num_platforms + 1)
-        platform_found = False
-        for platform_idx in range(self.dbg.GetNumPlatforms()):
-            platform = self.dbg.GetPlatformAtIndex(platform_idx)
-            if platform.GetName() == platform_name:
-                platform_found = True
-                break
-        self.assertTrue(platform_found)
-
-    @add_test_categories(['pyapi'])
-    @no_debug_info_test
-    def test_host_is_connected(self):
-        # We've already tested that this one IS the host platform.
-        host_platform = self.dbg.GetPlatformAtIndex(0)
-        self.assertTrue(host_platform.IsConnected(), "The host platform is always connected")
-
-
-    @add_test_categories(['pyapi'])
-    @no_debug_info_test
-    def test_available_platform_list(self):
-        """Test SBDebugger::GetNumAvailablePlatforms() and GetAvailablePlatformInfoAtIndex() API"""
-        num_platforms = self.dbg.GetNumAvailablePlatforms()
-        self.assertGreater(
-            num_platforms, 0,
-            'There should be at least one platform available')
-
-        for i in range(num_platforms):
-            platform_data = self.dbg.GetAvailablePlatformInfoAtIndex(i)
-            name_data = platform_data.GetValueForKey('name')
-            desc_data = platform_data.GetValueForKey('description')
-            self.assertTrue(
-                name_data and name_data.IsValid(),
-                'Platform has a name')
-            self.assertEqual(
-                name_data.GetType(), lldb.eStructuredDataTypeString,
-                'Platform name is a string')
-            self.assertTrue(
-                desc_data and desc_data.IsValid(),
-                'Platform has a description')
-            self.assertEqual(
-                desc_data.GetType(), lldb.eStructuredDataTypeString,
-                'Platform description is a string')
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/platform/process/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/platform/process/Makefile
deleted file mode 100644 (file)
index b560876..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-CXX_SOURCES := main.cpp
-
-EXE := TestProcess
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/platform/process/TestProcessList.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/platform/process/TestProcessList.py
deleted file mode 100644 (file)
index 102d6f9..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-"""
-Test process list.
-"""
-
-
-
-import os
-import lldb
-import shutil
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ProcessListTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @skipIfWindows # https://bugs.llvm.org/show_bug.cgi?id=43702
-    def test_process_list_with_args(self):
-        """Test process list show process args"""
-        self.build()
-        exe = self.getBuildArtifact("TestProcess")
-
-        # Spawn a new process
-        popen = self.spawnSubprocess(exe, args=["arg1", "--arg2", "arg3"])
-        self.addTearDownHook(self.cleanupSubprocesses)
-
-        self.expect("platform process list -v",
-                    substrs=["TestProcess arg1 --arg2 arg3", str(popen.pid)])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/platform/process/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/platform/process/main.cpp
deleted file mode 100644 (file)
index da43e60..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <stdio.h>
-
-#include <chrono>
-#include <thread>
-
-int main(int argc, char const *argv[]) {
-  std::this_thread::sleep_for(std::chrono::seconds(30));
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/attach-resume/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/attach-resume/Makefile
deleted file mode 100644 (file)
index dc1d28d..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-CXX_SOURCES := main.cpp
-ENABLE_THREADS := YES
-EXE := AttachResume
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/attach-resume/TestAttachResume.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/attach-resume/TestAttachResume.py
deleted file mode 100644 (file)
index b559f44..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-"""
-Test process attach/resume.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-exe_name = "AttachResume"  # Must match Makefile
-
-
-class AttachResumeTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @skipIfRemote
-    @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr19310')
-    @expectedFailureNetBSD
-    @skipIfWindows # llvm.org/pr24778, llvm.org/pr21753
-    def test_attach_continue_interrupt_detach(self):
-        """Test attach/continue/interrupt/detach"""
-        self.build()
-        self.process_attach_continue_interrupt_detach()
-
-    def process_attach_continue_interrupt_detach(self):
-        """Test attach/continue/interrupt/detach"""
-
-        exe = self.getBuildArtifact(exe_name)
-
-        popen = self.spawnSubprocess(exe)
-        self.addTearDownHook(self.cleanupSubprocesses)
-
-        self.runCmd("process attach -p " + str(popen.pid))
-
-        self.setAsync(True)
-        listener = self.dbg.GetListener()
-        process = self.dbg.GetSelectedTarget().GetProcess()
-
-        self.runCmd("c")
-        lldbutil.expect_state_changes(
-            self, listener, process, [
-                lldb.eStateRunning])
-
-        self.runCmd("process interrupt")
-        lldbutil.expect_state_changes(
-            self, listener, process, [
-                lldb.eStateStopped])
-
-        # be sure to continue/interrupt/continue (r204504)
-        self.runCmd("c")
-        lldbutil.expect_state_changes(
-            self, listener, process, [
-                lldb.eStateRunning])
-
-        self.runCmd("process interrupt")
-        lldbutil.expect_state_changes(
-            self, listener, process, [
-                lldb.eStateStopped])
-
-        # Second interrupt should have no effect.
-        self.expect(
-            "process interrupt",
-            patterns=["Process is not running"],
-            error=True)
-
-        # check that this breakpoint is auto-cleared on detach (r204752)
-        self.runCmd("br set -f main.cpp -l %u" %
-                    (line_number('main.cpp', '// Set breakpoint here')))
-
-        self.runCmd("c")
-        lldbutil.expect_state_changes(
-            self, listener, process, [
-                lldb.eStateRunning, lldb.eStateStopped])
-        self.expect('br list', 'Breakpoint not hit',
-                    substrs=['hit count = 1'])
-
-        # Make sure the breakpoint is not hit again.
-        self.expect("expr debugger_flag = false", substrs=[" = false"])
-
-        self.runCmd("c")
-        lldbutil.expect_state_changes(
-            self, listener, process, [
-                lldb.eStateRunning])
-
-        # make sure to detach while in running state (r204759)
-        self.runCmd("detach")
-        lldbutil.expect_state_changes(
-            self, listener, process, [
-                lldb.eStateDetached])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/attach-resume/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/attach-resume/main.cpp
deleted file mode 100644 (file)
index 82aad70..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#include <stdio.h>
-#include <fcntl.h>
-
-#include <chrono>
-#include <thread>
-
-volatile bool debugger_flag = true; // The debugger will flip this to false
-
-void *start(void *data)
-{
-    int i;
-    size_t idx = (size_t)data;
-    for (i=0; i<30; i++)
-    {
-        if ( idx == 0 && debugger_flag)
-            std::this_thread::sleep_for(std::chrono::microseconds(1)); // Set breakpoint here
-        std::this_thread::sleep_for(std::chrono::seconds(1));
-    }
-    return 0;
-}
-
-int main(int argc, char const *argv[])
-{
-    lldb_enable_attach();
-
-    static const size_t nthreads = 16;
-    std::thread threads[nthreads];
-    size_t i;
-
-    for (i=0; i<nthreads; i++)
-        threads[i] = std::move(std::thread(start, (void*)i));
-
-    for (i=0; i<nthreads; i++)
-        threads[i].join();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/attach/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/attach/Makefile
deleted file mode 100644 (file)
index 8a52f8f..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-CXX_SOURCES := main.cpp
-
-EXE := ProcessAttach
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/attach/TestProcessAttach.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/attach/TestProcessAttach.py
deleted file mode 100644 (file)
index b85d571..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-"""
-Test process attach.
-"""
-
-
-
-import os
-import lldb
-import shutil
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-exe_name = "ProcessAttach"  # Must match Makefile
-
-
-class ProcessAttachTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @skipIfiOSSimulator
-    @expectedFailureNetBSD
-    def test_attach_to_process_by_id(self):
-        """Test attach by process id"""
-        self.build()
-        exe = self.getBuildArtifact(exe_name)
-
-        # Spawn a new process
-        popen = self.spawnSubprocess(exe)
-        self.addTearDownHook(self.cleanupSubprocesses)
-
-        self.runCmd("process attach -p " + str(popen.pid))
-
-        target = self.dbg.GetSelectedTarget()
-
-        process = target.GetProcess()
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-    @expectedFailureNetBSD
-    def test_attach_to_process_from_different_dir_by_id(self):
-        """Test attach by process id"""
-        newdir = self.getBuildArtifact("newdir")
-        try:
-            os.mkdir(newdir)
-        except OSError as e:
-            if e.errno != os.errno.EEXIST:
-                raise
-        testdir = self.getBuildDir()
-        exe = os.path.join(newdir, 'proc_attach')
-        self.buildProgram('main.cpp', exe)
-        self.addTearDownHook(lambda: shutil.rmtree(newdir))
-
-        # Spawn a new process
-        popen = self.spawnSubprocess(exe)
-        self.addTearDownHook(self.cleanupSubprocesses)
-
-        os.chdir(newdir)
-        self.addTearDownHook(lambda: os.chdir(testdir))
-        self.runCmd("process attach -p " + str(popen.pid))
-
-        target = self.dbg.GetSelectedTarget()
-
-        process = target.GetProcess()
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-    @expectedFailureNetBSD
-    def test_attach_to_process_by_name(self):
-        """Test attach by process name"""
-        self.build()
-        exe = self.getBuildArtifact(exe_name)
-
-        # Spawn a new process
-        popen = self.spawnSubprocess(exe)
-        self.addTearDownHook(self.cleanupSubprocesses)
-
-        self.runCmd("process attach -n " + exe_name)
-
-        target = self.dbg.GetSelectedTarget()
-
-        process = target.GetProcess()
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-    def tearDown(self):
-        # Destroy process before TestBase.tearDown()
-        self.dbg.GetSelectedTarget().GetProcess().Destroy()
-
-        # Call super's tearDown().
-        TestBase.tearDown(self)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/attach/attach_denied/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/attach/attach_denied/Makefile
deleted file mode 100644 (file)
index a694d36..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-CXX_SOURCES := main.cpp
-
-EXE := AttachDenied
-
-all: AttachDenied sign
-
-include Makefile.rules
-
-sign: entitlements.plist AttachDenied
-ifeq ($(OS),Darwin)
-       codesign -s - -f --entitlements $^
-endif
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/attach/attach_denied/TestAttachDenied.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/attach/attach_denied/TestAttachDenied.py
deleted file mode 100644 (file)
index dcd73da..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-"""
-Test denied process attach.
-"""
-
-
-
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-exe_name = 'AttachDenied'  # Must match Makefile
-
-
-class AttachDeniedTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @skipIfWindows
-    @skipIfiOSSimulator
-    @skipIfDarwinEmbedded  # ptrace(ATTACH_REQUEST...) won't work on ios/tvos/etc
-    def test_attach_to_process_by_id_denied(self):
-        """Test attach by process id denied"""
-        self.build()
-        exe = self.getBuildArtifact(exe_name)
-
-        # Use a file as a synchronization point between test and inferior.
-        pid_file_path = lldbutil.append_to_process_working_directory(self,
-            "pid_file_%d" % (int(time.time())))
-        self.addTearDownHook(
-            lambda: self.run_platform_command(
-                "rm %s" %
-                (pid_file_path)))
-
-        # Spawn a new process
-        popen = self.spawnSubprocess(exe, [pid_file_path])
-        self.addTearDownHook(self.cleanupSubprocesses)
-
-        pid = lldbutil.wait_for_file_on_target(self, pid_file_path)
-
-        self.expect('process attach -p ' + pid,
-                    startstr='error: attach failed:',
-                    error=True)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/attach/attach_denied/entitlements.plist b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/attach/attach_denied/entitlements.plist
deleted file mode 100644 (file)
index 3d60e8b..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-    <key>com.apple.security.cs.debugger</key>
-    <true/>
-</dict>
-</plist>
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/attach/attach_denied/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/attach/attach_denied/main.cpp
deleted file mode 100644 (file)
index ff1fcca..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-#include <errno.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/types.h>
-#include <sys/ptrace.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-
-#if defined(PTRACE_ATTACH)
-#define ATTACH_REQUEST PTRACE_ATTACH
-#define DETACH_REQUEST PTRACE_DETACH
-#elif defined(PT_ATTACH)
-#define ATTACH_REQUEST PT_ATTACH
-#define DETACH_REQUEST PT_DETACH
-#else
-#error "Unsupported platform"
-#endif
-
-bool writePid (const char* file_name, const pid_t pid)
-{
-    char *tmp_file_name = (char *)malloc(strlen(file_name) + 16);
-    strcpy(tmp_file_name, file_name);
-    strcat(tmp_file_name, "_tmp");
-    int fd = open (tmp_file_name, O_CREAT | O_WRONLY | O_TRUNC, S_IRUSR | S_IWUSR);
-    if (fd == -1)
-    {
-        fprintf (stderr, "open(%s) failed: %s\n", tmp_file_name, strerror (errno));
-        free(tmp_file_name);
-        return false;
-    }
-    char buffer[64];
-    snprintf (buffer, sizeof(buffer), "%ld", (long)pid);
-
-    bool res = true;
-    if (write (fd, buffer, strlen (buffer)) == -1)
-    {
-        fprintf (stderr, "write(%s) failed: %s\n", buffer, strerror (errno));
-        res = false;
-    }
-    close (fd);
-
-    if (rename (tmp_file_name, file_name) == -1)
-    {
-        fprintf (stderr, "rename(%s, %s) failed: %s\n", tmp_file_name, file_name, strerror (errno));
-        res = false;
-    }
-    free(tmp_file_name);
-
-    return res;
-}
-
-void signal_handler (int)
-{
-}
-
-int main (int argc, char const *argv[])
-{
-    if (argc < 2)
-    {
-        fprintf (stderr, "invalid number of command line arguments\n");
-        return 1;
-    }
-
-    const pid_t pid = fork ();
-    if (pid == -1)
-    {
-        fprintf (stderr, "fork failed: %s\n", strerror (errno));
-        return 1;
-    }
-
-    if (pid > 0)
-    {
-        // Make pause call to return when a signal is received. Normally this happens when the
-        // test runner tries to terminate us.
-        signal (SIGHUP, signal_handler);
-        signal (SIGTERM, signal_handler);
-        if (ptrace (ATTACH_REQUEST, pid, NULL, 0) == -1)
-        {
-            fprintf (stderr, "ptrace(ATTACH) failed: %s\n", strerror (errno));
-        }
-        else
-        {
-            if (writePid (argv[1], pid))
-                pause ();  // Waiting for the debugger trying attach to the child.
-
-            if (ptrace (DETACH_REQUEST, pid, NULL, 0) != 0)
-                fprintf (stderr, "ptrace(DETACH) failed: %s\n", strerror (errno));
-        }
-
-        kill (pid, SIGTERM);
-        int status = 0;
-        if (waitpid (pid, &status, 0) == -1)
-            fprintf (stderr, "waitpid failed: %s\n", strerror (errno));
-    }
-    else
-    {
-        // child inferior.
-        pause ();
-    }
-
-    printf ("Exiting now\n");
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/attach/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/attach/main.cpp
deleted file mode 100644 (file)
index 46ffacc..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <stdio.h>
-
-#include <chrono>
-#include <thread>
-
-int main(int argc, char const *argv[]) {
-    int temp;
-    lldb_enable_attach();
-
-    // Waiting to be attached by the debugger.
-    temp = 0;
-
-    while (temp < 30) // Waiting to be attached...
-    {
-        std::this_thread::sleep_for(std::chrono::seconds(2));
-        temp++;
-    }
-
-    printf("Exiting now\n");
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/TestLaunchWithShellExpand.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/TestLaunchWithShellExpand.py
deleted file mode 100644 (file)
index 49bd0cf..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-"""
-Test that argdumper is a viable launching strategy.
-"""
-import os
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class LaunchWithShellExpandTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @expectedFailureAll(
-        oslist=[
-            "windows",
-            "linux",
-            "freebsd"],
-        bugnumber="llvm.org/pr24778 llvm.org/pr22627")
-    @skipIfDarwinEmbedded # iOS etc don't launch the binary via a shell, so arg expansion won't happen
-    @expectedFailureNetBSD
-    def test(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        self.runCmd("target create %s" % exe)
-
-        # Create the target
-        target = self.dbg.CreateTarget(exe)
-
-        # Create any breakpoints we need
-        breakpoint = target.BreakpointCreateBySourceRegex(
-            'break here', lldb.SBFileSpec("main.cpp", False))
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Ensure we do the expansion with /bin/sh on POSIX.
-        os.environ["SHELL"] = '/bin/sh'
-
-        self.runCmd(
-            "process launch -X true -w %s -- fi*.tx? () > <" %
-            (self.getSourceDir()))
-
-        process = self.process()
-
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        STOPPED_DUE_TO_BREAKPOINT)
-
-        thread = process.GetThreadAtIndex(0)
-
-        self.assertTrue(thread.IsValid(),
-                        "Process stopped at 'main' should have a valid thread")
-
-        stop_reason = thread.GetStopReason()
-
-        self.assertTrue(
-            stop_reason == lldb.eStopReasonBreakpoint,
-            "Thread in process stopped in 'main' should have a stop reason of eStopReasonBreakpoint")
-
-        self.expect("frame variable argv[1]", substrs=['file1.txt'])
-        self.expect("frame variable argv[2]", substrs=['file2.txt'])
-        self.expect("frame variable argv[3]", substrs=['file3.txt'])
-        self.expect("frame variable argv[4]", substrs=['file4.txy'])
-        self.expect("frame variable argv[5]", substrs=['()'])
-        self.expect("frame variable argv[6]", substrs=['>'])
-        self.expect("frame variable argv[7]", substrs=['<'])
-        self.expect(
-            "frame variable argv[5]",
-            substrs=['file5.tyx'],
-            matching=False)
-        self.expect(
-            "frame variable argv[8]",
-            substrs=['file5.tyx'],
-            matching=False)
-
-        self.runCmd("process kill")
-
-        self.runCmd(
-            'process launch -X true -w %s -- "foo bar"' %
-            (self.getSourceDir()))
-
-        process = self.process()
-
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        STOPPED_DUE_TO_BREAKPOINT)
-
-        thread = process.GetThreadAtIndex(0)
-
-        self.assertTrue(thread.IsValid(),
-                        "Process stopped at 'main' should have a valid thread")
-
-        stop_reason = thread.GetStopReason()
-
-        self.assertTrue(
-            stop_reason == lldb.eStopReasonBreakpoint,
-            "Thread in process stopped in 'main' should have a stop reason of eStopReasonBreakpoint")
-
-        self.expect("frame variable argv[1]", substrs=['foo bar'])
-
-        self.runCmd("process kill")
-
-        self.runCmd('process launch -X true -w %s -- foo\ bar'
-                    % (self.getBuildDir()))
-
-        process = self.process()
-
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        STOPPED_DUE_TO_BREAKPOINT)
-
-        thread = process.GetThreadAtIndex(0)
-
-        self.assertTrue(thread.IsValid(),
-                        "Process stopped at 'main' should have a valid thread")
-
-        stop_reason = thread.GetStopReason()
-
-        self.assertTrue(
-            stop_reason == lldb.eStopReasonBreakpoint,
-            "Thread in process stopped in 'main' should have a stop reason of eStopReasonBreakpoint")
-
-        self.expect("frame variable argv[1]", substrs=['foo bar'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/file1.txt b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/file1.txt
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/file2.txt b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/file2.txt
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/file3.txt b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/file3.txt
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/file4.txy b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/file4.txy
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/file5.tyx b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/file5.tyx
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/foo bar b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/foo bar
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/main.cpp
deleted file mode 100644 (file)
index cbef8d1..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-int 
-main (int argc, char const **argv)
-{
-    return 0; // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch/Makefile
deleted file mode 100644 (file)
index eff7727..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-CXX_SOURCES := main.cpp
-#CXX_SOURCES := print-cwd.cpp
-
-include Makefile.rules
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch/TestProcessLaunch.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch/TestProcessLaunch.py
deleted file mode 100644 (file)
index a2b27c2..0000000
+++ /dev/null
@@ -1,205 +0,0 @@
-"""
-Test lldb process launch flags.
-"""
-
-from __future__ import print_function
-
-import os
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-import six
-
-
-class ProcessLaunchTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        self.runCmd("settings set auto-confirm true")
-
-    def tearDown(self):
-        self.runCmd("settings clear auto-confirm")
-        TestBase.tearDown(self)
-
-    @not_remote_testsuite_ready
-    def test_io(self):
-        """Test that process launch I/O redirection flags work properly."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.expect("file " + exe,
-                    patterns=["Current executable set to .*a.out"])
-
-        in_file = os.path.join(self.getSourceDir(), "input-file.txt")
-        out_file = lldbutil.append_to_process_working_directory(self, "output-test.out")
-        err_file = lldbutil.append_to_process_working_directory(self, "output-test.err")
-
-        # Make sure the output files do not exist before launching the process
-        try:
-            os.remove(out_file)
-        except OSError:
-            pass
-
-        try:
-            os.remove(err_file)
-        except OSError:
-            pass
-
-        launch_command = "process launch -i '{0}' -o '{1}' -e '{2}' -w '{3}'".format(
-                in_file, out_file, err_file, self.get_process_working_directory())
-
-        if lldb.remote_platform:
-            self.runCmd('platform put-file "{local}" "{remote}"'.format(
-                local=in_file, remote=in_file))
-
-        self.expect(launch_command,
-                    patterns=["Process .* launched: .*a.out"])
-
-        success = True
-        err_msg = ""
-
-        out = lldbutil.read_file_on_target(self, out_file)
-        if out != "This should go to stdout.\n":
-            success = False
-            err_msg = err_msg + "    ERROR: stdout file does not contain correct output.\n"
-
-
-        err = lldbutil.read_file_on_target(self, err_file)
-        if err != "This should go to stderr.\n":
-            success = False
-            err_msg = err_msg + "    ERROR: stderr file does not contain correct output.\n"
-
-        if not success:
-            self.fail(err_msg)
-
-    # rdar://problem/9056462
-    # The process launch flag '-w' for setting the current working directory
-    # not working?
-    @not_remote_testsuite_ready
-    @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr20265")
-    @expectedFailureNetBSD
-    def test_set_working_dir_nonexisting(self):
-        """Test that '-w dir' fails to set the working dir when running the inferior with a dir which doesn't exist."""
-        d = {'CXX_SOURCES': 'print_cwd.cpp'}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(d)
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe)
-
-        mywd = 'my_working_dir'
-        out_file_name = "my_working_dir_test.out"
-        err_file_name = "my_working_dir_test.err"
-
-        my_working_dir_path = self.getBuildArtifact(mywd)
-        out_file_path = os.path.join(my_working_dir_path, out_file_name)
-        err_file_path = os.path.join(my_working_dir_path, err_file_name)
-
-        # Check that we get an error when we have a nonexisting path
-        invalid_dir_path = mywd + 'z'
-        launch_command = "process launch -w %s -o %s -e %s" % (
-            invalid_dir_path, out_file_path, err_file_path)
-
-        self.expect(
-            launch_command, error=True, patterns=[
-                "error:.* No such file or directory: %s" %
-                invalid_dir_path])
-
-    @not_remote_testsuite_ready
-    def test_set_working_dir_existing(self):
-        """Test that '-w dir' sets the working dir when running the inferior."""
-        d = {'CXX_SOURCES': 'print_cwd.cpp'}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(d)
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe)
-
-        mywd = 'my_working_dir'
-        out_file_name = "my_working_dir_test.out"
-        err_file_name = "my_working_dir_test.err"
-
-        my_working_dir_path = self.getBuildArtifact(mywd)
-        lldbutil.mkdir_p(my_working_dir_path)
-        out_file_path = os.path.join(my_working_dir_path, out_file_name)
-        err_file_path = os.path.join(my_working_dir_path, err_file_name)
-
-        # Make sure the output files do not exist before launching the process
-        try:
-            os.remove(out_file_path)
-            os.remove(err_file_path)
-        except OSError:
-            pass
-
-        launch_command = "process launch -w %s -o %s -e %s" % (
-            my_working_dir_path, out_file_path, err_file_path)
-
-        self.expect(launch_command,
-                    patterns=["Process .* launched: .*a.out"])
-
-        success = True
-        err_msg = ""
-
-        # Check to see if the 'stdout' file was created
-        try:
-            out_f = open(out_file_path)
-        except IOError:
-            success = False
-            err_msg = err_msg + "ERROR: stdout file was not created.\n"
-        else:
-            # Check to see if the 'stdout' file contains the right output
-            line = out_f.readline()
-            if self.TraceOn():
-                print("line:", line)
-            if not re.search(mywd, line):
-                success = False
-                err_msg = err_msg + "The current working directory was not set correctly.\n"
-                out_f.close()
-
-        # Try to delete the 'stdout' and 'stderr' files
-        try:
-            os.remove(out_file_path)
-            os.remove(err_file_path)
-        except OSError:
-            pass
-
-        if not success:
-            self.fail(err_msg)
-
-    def test_environment_with_special_char(self):
-        """Test that environment variables containing '*' and '}' are handled correctly by the inferior."""
-        source = 'print_env.cpp'
-        d = {'CXX_SOURCES': source}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(d)
-        exe = self.getBuildArtifact("a.out")
-
-        evil_var = 'INIT*MIDDLE}TAIL'
-
-        target = self.dbg.CreateTarget(exe)
-        main_source_spec = lldb.SBFileSpec(source)
-        breakpoint = target.BreakpointCreateBySourceRegex(
-            '// Set breakpoint here.', main_source_spec)
-
-        process = target.LaunchSimple(None,
-                                      ['EVIL=' + evil_var],
-                                      self.get_process_working_directory())
-        self.assertEqual(
-            process.GetState(),
-            lldb.eStateStopped,
-            PROCESS_STOPPED)
-
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-            process, breakpoint)
-        self.assertEqual(len(threads), 1)
-        frame = threads[0].GetFrameAtIndex(0)
-        sbvalue = frame.EvaluateExpression("evil")
-        value = sbvalue.GetSummary().strip('"')
-
-        self.assertEqual(value, evil_var)
-        process.Continue()
-        self.assertEqual(process.GetState(), lldb.eStateExited, PROCESS_EXITED)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch/input-file.txt b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch/input-file.txt
deleted file mode 100644 (file)
index cc269ba..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-This should go to stdout.
-This should go to stderr.
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch/main.cpp
deleted file mode 100644 (file)
index f2035d5..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-
-int
-main (int argc, char **argv)
-{
-  char buffer[1024];
-
-  fgets (buffer, sizeof (buffer), stdin);
-  fprintf (stdout, "%s", buffer);
-
-  
-  fgets (buffer, sizeof (buffer), stdin);
-  fprintf (stderr, "%s", buffer);
-
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch/print_cwd.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch/print_cwd.cpp
deleted file mode 100644 (file)
index b4b073f..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#include <stdio.h>
-
-#ifdef _MSC_VER
-#define _CRT_NONSTDC_NO_WARNINGS
-#include <direct.h>
-#undef getcwd
-#define getcwd(buffer, length) _getcwd(buffer, length)
-#else
-#include <unistd.h>
-#endif
-
-int
-main (int argc, char **argv)
-{
-  char buffer[1024];
-
-  fprintf(stdout, "stdout: %s\n", getcwd(buffer, 1024));
-  fprintf(stderr, "stderr: %s\n", getcwd(buffer, 1024));
-
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch/print_env.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/process/launch/print_env.cpp
deleted file mode 100644 (file)
index 8c6df8e..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-int main (int argc, char **argv)
-{
-  char *evil = getenv("EVIL");
-
-  return 0;  // Set breakpoint here.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/quit/TestQuit.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/quit/TestQuit.py
deleted file mode 100644 (file)
index d4dbd16..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-"""
-Test lldb's quit command.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class QuitCommandTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    def test_quit_exit_code_disallow(self):
-        self.ci.AllowExitCodeOnQuit(False)
-        self.expect(
-            "quit 20",
-            substrs=[
-                "error: The current driver doesn't allow custom exit codes for the quit command"],
-            error=True)
-        self.assertFalse(self.ci.HasCustomQuitExitCode())
-
-    @no_debug_info_test
-    def test_quit_exit_code_allow(self):
-        self.ci.AllowExitCodeOnQuit(True)
-        self.runCmd("quit 10", check=False)
-        self.assertTrue(self.ci.HasCustomQuitExitCode())
-        self.assertEqual(self.ci.GetQuitStatus(), 10)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/Makefile
deleted file mode 100644 (file)
index 5cc7382..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-CXX_SOURCES := main.cpp
-
-CFLAGS_EXTRAS := -mmpx -fcheck-pointer-bounds -fuse-ld=bfd
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/TestMPXRegisters.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/TestMPXRegisters.py
deleted file mode 100644 (file)
index 5644855..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-"""
-Test the Intel(R) MPX registers.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class RegisterCommandsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIf(compiler="clang")
-    @skipIf(oslist=no_match(['linux']))
-    @skipIf(archs=no_match(['i386', 'x86_64']))
-    @skipIf(oslist=["linux"], compiler="gcc", compiler_version=["<", "5"]) #GCC version >= 5 supports Intel(R) MPX.
-    def test_mpx_registers_with_example_code(self):
-        """Test Intel(R) MPX registers with example code."""
-        self.build()
-        self.mpx_registers_with_example_code()
-
-    def mpx_registers_with_example_code(self):
-        """Test Intel(R) MPX registers after running example code."""
-        self.line = line_number('main.cpp', '// Set a break point here.')
-
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(self, "main.cpp", self.line, num_expected_locations=1)
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        target = self.dbg.GetSelectedTarget()
-        process = target.GetProcess()
-
-        if (process.GetState() == lldb.eStateExited):
-            self.skipTest("Intel(R) MPX is not supported.")
-        else:
-            self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
-                        substrs = ["stop reason = breakpoint 1."])
-
-        if self.getArchitecture() == 'x86_64':
-            self.expect("register read -s 3",
-                        substrs = ['bnd0 = {0x0000000000000010 0xffffffffffffffe6}',
-                                   'bnd1 = {0x0000000000000020 0xffffffffffffffd6}',
-                                   'bnd2 = {0x0000000000000030 0xffffffffffffffc6}',
-                                   'bnd3 = {0x0000000000000040 0xffffffffffffffb6}',
-                                   'bndcfgu = {0x01 0x80 0xb5 0x76 0xff 0x7f 0x00 0x00}',
-                                   'bndstatus = {0x02 0x80 0xb5 0x76 0xff 0x7f 0x00 0x00}'])
-        if self.getArchitecture() == 'i386':
-            self.expect("register read -s 3",
-                        substrs = ['bnd0 = {0x0000000000000010 0x00000000ffffffe6}',
-                                   'bnd1 = {0x0000000000000020 0x00000000ffffffd6}',
-                                   'bnd2 = {0x0000000000000030 0x00000000ffffffc6}',
-                                   'bnd3 = {0x0000000000000040 0x00000000ffffffb6}',
-                                   'bndcfgu = {0x01 0xd0 0x7d 0xf7 0x00 0x00 0x00 0x00}',
-                                   'bndstatus = {0x02 0xd0 0x7d 0xf7 0x00 0x00 0x00 0x00}'])
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/main.cpp
deleted file mode 100644 (file)
index 97b5058..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-////
-//// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-//// See https://llvm.org/LICENSE.txt for license information.
-//// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-////
-////===----------------------------------------------------------------------===//
-//
-
-#include <cpuid.h>
-#include <cstddef>
-
-int
-main(int argc, char const *argv[])
-{
-// PR_MPX_ENABLE_MANAGEMENT won't be defined on linux kernel versions below 3.19
-#ifndef PR_MPX_ENABLE_MANAGEMENT
-    return -1;
-#endif
-
-    // This call returns 0 only if the CPU and the kernel support Intel(R) MPX.
-    if (prctl(PR_MPX_ENABLE_MANAGEMENT, 0, 0, 0, 0) != 0)
-        return -1;
-
-// Run Intel(R) MPX test code.
-#if defined(__x86_64__)
-    asm("mov $16, %rax\n\t"
-        "mov $9, %rdx\n\t"
-        "bndmk (%rax,%rdx), %bnd0\n\t"
-        "mov $32, %rax\n\t"
-        "mov $9, %rdx\n\t"
-        "bndmk (%rax,%rdx), %bnd1\n\t"
-        "mov $48, %rax\n\t"
-        "mov $9, %rdx\n\t"
-        "bndmk (%rax,%rdx), %bnd2\n\t"
-        "mov $64, %rax\n\t"
-        "mov $9, %rdx\n\t"
-        "bndmk (%rax,%rdx), %bnd3\n\t"
-        "bndstx %bnd3, (%rax) \n\t"
-        "nop\n\t");
-#endif
-#if defined(__i386__)
-    asm("mov $16, %eax\n\t"
-        "mov $9, %edx\n\t"
-        "bndmk (%eax,%edx), %bnd0\n\t"
-        "mov $32, %eax\n\t"
-        "mov $9, %edx\n\t"
-        "bndmk (%eax,%edx), %bnd1\n\t"
-        "mov $48, %eax\n\t"
-        "mov $9, %edx\n\t"
-        "bndmk (%eax,%edx), %bnd2\n\t"
-        "mov $64, %eax\n\t"
-        "mov $9, %edx\n\t"
-        "bndmk (%eax,%edx), %bnd3\n\t"
-        "bndstx  %bnd3, (%eax)\n\t"
-        "nop\n\t");
-#endif
-    asm("nop\n\t"); // Set a break point here.
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_bound_violation/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_bound_violation/Makefile
deleted file mode 100644 (file)
index 5cc7382..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-CXX_SOURCES := main.cpp
-
-CFLAGS_EXTRAS := -mmpx -fcheck-pointer-bounds -fuse-ld=bfd
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_bound_violation/TestBoundViolation.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_bound_violation/TestBoundViolation.py
deleted file mode 100644 (file)
index 9a812a1..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-"""
-Test the Intel(R) MPX bound violation signal.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class RegisterCommandsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIf(compiler="clang")
-    @skipIf(oslist=no_match(['linux']))
-    @skipIf(archs=no_match(['i386', 'x86_64']))
-    @skipIf(oslist=["linux"], compiler="gcc", compiler_version=["<", "5"]) #GCC version >= 5 supports Intel(R) MPX.
-    def test_mpx_boundary_violation(self):
-        """Test Intel(R) MPX bound violation signal."""
-        self.build()
-        self.mpx_boundary_violation()
-
-    def mpx_boundary_violation(self):
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        target = self.dbg.GetSelectedTarget()
-        process = target.GetProcess()
-
-        if (process.GetState() == lldb.eStateExited):
-            self.skipTest("Intel(R) MPX is not supported.")
-
-        if (process.GetState() == lldb.eStateStopped):
-            self.expect("thread backtrace", STOPPED_DUE_TO_SIGNAL,
-                        substrs = ['stop reason = signal SIGSEGV: upper bound violation',
-                                   'fault address:', 'lower bound:', 'upper bound:'])
-
-        self.runCmd("continue")
-
-        if (process.GetState() == lldb.eStateStopped):
-            self.expect("thread backtrace", STOPPED_DUE_TO_SIGNAL,
-                        substrs = ['stop reason = signal SIGSEGV: lower bound violation',
-                                   'fault address:', 'lower bound:', 'upper bound:'])
-
-        self.runCmd("continue")
-        self.assertTrue(process.GetState() == lldb.eStateExited,
-                        PROCESS_EXITED)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_bound_violation/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_bound_violation/main.cpp
deleted file mode 100644 (file)
index 3c5ef07..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-////
-//// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-//// See https://llvm.org/LICENSE.txt for license information.
-//// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-////
-////===----------------------------------------------------------------------===//
-//
-
-#include <cstddef>
-#include <sys/prctl.h>
-
-static void violate_upper_bound(int *ptr, int size)
-{
-  int i;
-  i = *(ptr + size);
-}
-
-static void violate_lower_bound (int *ptr, int size)
-{
-  int i;
-  i = *(ptr - size);
-}
-
-int
-main(int argc, char const *argv[])
-{
-  unsigned int rax, rbx, rcx, rdx;
-  int array[5];
-
-// PR_MPX_ENABLE_MANAGEMENT won't be defined on linux kernel versions below 3.19
-#ifndef PR_MPX_ENABLE_MANAGEMENT
-    return -1;
-#endif
-
-  // This call returns 0 only if the CPU and the kernel support Intel(R) MPX.
-  if (prctl(PR_MPX_ENABLE_MANAGEMENT, 0, 0, 0, 0) != 0)
-    return -1;
-
-  violate_upper_bound(array, 5);
-  violate_lower_bound(array, 5);
-
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_offset_intersection/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_offset_intersection/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_offset_intersection/TestMPXOffsetIntersection.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_offset_intersection/TestMPXOffsetIntersection.py
deleted file mode 100644 (file)
index 109e8e9..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-"""
-Test Intel(R) MPX registers do not get overwritten by AVX data.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class MPXOffsetIntersectionTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    AVX_REGS = ('ymm' + str(i) for i in range(16))
-    YMM_VALUE = '{' + ' '.join(('0x00' for _ in range(32))) + '}'
-
-    MPX_REGULAR_REGS = ('bnd0', 'bnd1', 'bnd2', 'bnd3')
-    MPX_CONFIG_REGS = ('bndcfgu', 'bndstatus')
-    BND_VALUE = '{' + ' '.join(('0xff' for _ in range(16))) + '}'
-
-    @skipIf(oslist=no_match(['linux']))
-    @skipIf(archs=no_match(['x86_64']))
-    def test_mpx_registers_offset_intersection(self):
-        """Test if AVX data does not overwrite MPX values."""
-        self.build()
-        self.mpx_registers_offset_intersection()
-
-    def mpx_registers_offset_intersection(self):
-        exe = self.getBuildArtifact('a.out')
-        self.runCmd('file ' + exe, CURRENT_EXECUTABLE_SET)
-        self.runCmd('run', RUN_SUCCEEDED)
-        target = self.dbg.GetSelectedTarget()
-        process = target.GetProcess()
-        thread = process.GetThreadAtIndex(0)
-        currentFrame = thread.GetFrameAtIndex(0)
-
-        has_avx = False
-        has_mpx = False
-        for registerSet in currentFrame.GetRegisters():
-            if 'advanced vector extensions' in registerSet.GetName().lower():
-                has_avx = True
-            if 'memory protection extension' in registerSet.GetName().lower():
-                has_mpx = True
-        if not (has_avx and has_mpx):
-            self.skipTest('Both AVX and MPX registers must be supported.')
-
-        for reg in self.AVX_REGS:
-            self.runCmd('register write ' + reg + " '" + self.YMM_VALUE + " '")
-        for reg in self.MPX_REGULAR_REGS + self.MPX_CONFIG_REGS:
-            self.runCmd('register write ' + reg + " '" + self.BND_VALUE + " '")
-
-        self.verify_mpx()
-        self.verify_avx()
-        self.verify_mpx()
-
-    def verify_mpx(self):
-        for reg in self.MPX_REGULAR_REGS:
-            self.expect('register read ' + reg,
-                        substrs = [reg + ' = {0xffffffffffffffff 0xffffffffffffffff}'])
-        for reg in self.MPX_CONFIG_REGS:
-            self.expect('register read ' + reg,
-                        substrs = [reg + ' = {0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff}'])
-
-    def verify_avx(self):
-        for reg in self.AVX_REGS:
-            self.expect('register read ' + reg, substrs = [reg + ' = ' + self.YMM_VALUE])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_offset_intersection/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_offset_intersection/main.cpp
deleted file mode 100644 (file)
index 0285cfd..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <cstdint>
-
-int main() {
-  asm volatile("int3");
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/register_command/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/register_command/Makefile
deleted file mode 100644 (file)
index d2bc2ba..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp a.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/register_command/TestRegisters.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/register_command/TestRegisters.py
deleted file mode 100644 (file)
index 01d2367..0000000
+++ /dev/null
@@ -1,502 +0,0 @@
-"""
-Test the 'register' command.
-"""
-
-from __future__ import print_function
-
-
-import os
-import sys
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class RegisterCommandsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        TestBase.setUp(self)
-        self.has_teardown = False
-
-    def tearDown(self):
-        self.dbg.GetSelectedTarget().GetProcess().Destroy()
-        TestBase.tearDown(self)
-
-    @skipIfiOSSimulator
-    @skipIf(archs=no_match(['amd64', 'arm', 'i386', 'x86_64']))
-    @expectedFailureNetBSD
-    def test_register_commands(self):
-        """Test commands related to registers, in particular vector registers."""
-        self.build()
-        self.common_setup()
-
-        # verify that logging does not assert
-        self.log_enable("registers")
-
-        self.expect("register read -a", MISSING_EXPECTED_REGISTERS,
-                    substrs=['registers were unavailable'], matching=False)
-
-        if self.getArchitecture() in ['amd64', 'i386', 'x86_64']:
-            self.runCmd("register read xmm0")
-            self.runCmd("register read ymm15")  # may be available
-            self.runCmd("register read bnd0")  # may be available
-        elif self.getArchitecture() in ['arm', 'armv7', 'armv7k', 'arm64', 'arm64e', 'arm64_32']:
-            self.runCmd("register read s0")
-            self.runCmd("register read q15")  # may be available
-
-        self.expect(
-            "register read -s 4",
-            substrs=['invalid register set index: 4'],
-            error=True)
-
-    @skipIfiOSSimulator
-    # Writing of mxcsr register fails, presumably due to a kernel/hardware
-    # problem
-    @skipIfTargetAndroid(archs=["i386"])
-    @skipIf(archs=no_match(['amd64', 'arm', 'i386', 'x86_64']))
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr37995")
-    def test_fp_register_write(self):
-        """Test commands that write to registers, in particular floating-point registers."""
-        self.build()
-        self.fp_register_write()
-
-    @skipIfiOSSimulator
-    # "register read fstat" always return 0xffff
-    @expectedFailureAndroid(archs=["i386"])
-    @skipIfFreeBSD  # llvm.org/pr25057
-    @skipIf(archs=no_match(['amd64', 'i386', 'x86_64']))
-    @skipIfOutOfTreeDebugserver
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr37995")
-    @expectedFailureNetBSD
-    def test_fp_special_purpose_register_read(self):
-        """Test commands that read fpu special purpose registers."""
-        self.build()
-        self.fp_special_purpose_register_read()
-
-    @skipIfiOSSimulator
-    @skipIf(archs=no_match(['amd64', 'arm', 'i386', 'x86_64']))
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr37683")
-    def test_register_expressions(self):
-        """Test expression evaluation with commands related to registers."""
-        self.build()
-        self.common_setup()
-
-        if self.getArchitecture() in ['amd64', 'i386', 'x86_64']:
-            gpr = "eax"
-            vector = "xmm0"
-        elif self.getArchitecture() in ['arm64', 'aarch64', 'arm64e', 'arm64_32']:
-            gpr = "w0"
-            vector = "v0"
-        elif self.getArchitecture() in ['arm', 'armv7', 'armv7k']:
-            gpr = "r0"
-            vector = "q0"
-
-        self.expect("expr/x $%s" % gpr, substrs=['unsigned int', ' = 0x'])
-        self.expect("expr $%s" % vector, substrs=['vector_type'])
-        self.expect(
-            "expr (unsigned int)$%s[0]" %
-            vector, substrs=['unsigned int'])
-
-        if self.getArchitecture() in ['amd64', 'x86_64']:
-            self.expect(
-                "expr -- ($rax & 0xffffffff) == $eax",
-                substrs=['true'])
-
-    @skipIfiOSSimulator
-    @skipIf(archs=no_match(['amd64', 'x86_64']))
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr37683")
-    def test_convenience_registers(self):
-        """Test convenience registers."""
-        self.build()
-        self.convenience_registers()
-
-    @skipIfiOSSimulator
-    @skipIf(archs=no_match(['amd64', 'x86_64']))
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr37683")
-    @expectedFailureNetBSD
-    def test_convenience_registers_with_process_attach(self):
-        """Test convenience registers after a 'process attach'."""
-        self.build()
-        self.convenience_registers_with_process_attach(test_16bit_regs=False)
-
-    @skipIfiOSSimulator
-    @skipIf(archs=no_match(['amd64', 'x86_64']))
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr37683")
-    @expectedFailureNetBSD
-    def test_convenience_registers_16bit_with_process_attach(self):
-        """Test convenience registers after a 'process attach'."""
-        self.build()
-        self.convenience_registers_with_process_attach(test_16bit_regs=True)
-
-    def common_setup(self):
-        exe = self.getBuildArtifact("a.out")
-
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break in main().
-        lldbutil.run_break_set_by_symbol(
-            self, "main", num_expected_locations=-1)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped', 'stop reason = breakpoint'])
-
-    # platform specific logging of the specified category
-    def log_enable(self, category):
-        # This intentionally checks the host platform rather than the target
-        # platform as logging is host side.
-        self.platform = ""
-        if (sys.platform.startswith("freebsd") or
-                sys.platform.startswith("linux") or
-                sys.platform.startswith("netbsd")):
-            self.platform = "posix"
-
-        if self.platform != "":
-            self.log_file = self.getBuildArtifact('TestRegisters.log')
-            self.runCmd(
-                "log enable " +
-                self.platform +
-                " " +
-                str(category) +
-                " registers -v -f " +
-                self.log_file,
-                RUN_SUCCEEDED)
-            if not self.has_teardown:
-                def remove_log(self):
-                    if os.path.exists(self.log_file):
-                        os.remove(self.log_file)
-                self.has_teardown = True
-                self.addTearDownHook(remove_log)
-
-    def write_and_read(self, frame, register, new_value, must_exist=True):
-        value = frame.FindValue(register, lldb.eValueTypeRegister)
-        if must_exist:
-            self.assertTrue(
-                value.IsValid(),
-                "finding a value for register " +
-                register)
-        elif not value.IsValid():
-            return  # If register doesn't exist, skip this test
-
-        # Also test the 're' alias.
-        self.runCmd("re write " + register + " \'" + new_value + "\'")
-        self.expect(
-            "register read " +
-            register,
-            substrs=[
-                register +
-                ' = ',
-                new_value])
-
-    def fp_special_purpose_register_read(self):
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Launch the process and stop.
-        self.expect("run", PROCESS_STOPPED, substrs=['stopped'])
-
-        # Check stop reason; Should be either signal SIGTRAP or EXC_BREAKPOINT
-        output = self.res.GetOutput()
-        matched = False
-        substrs = [
-            'stop reason = EXC_BREAKPOINT',
-            'stop reason = signal SIGTRAP']
-        for str1 in substrs:
-            matched = output.find(str1) != -1
-            with recording(self, False) as sbuf:
-                print("%s sub string: %s" % ('Expecting', str1), file=sbuf)
-                print("Matched" if matched else "Not Matched", file=sbuf)
-            if matched:
-                break
-        self.assertTrue(matched, STOPPED_DUE_TO_SIGNAL)
-
-        process = target.GetProcess()
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        PROCESS_STOPPED)
-
-        thread = process.GetThreadAtIndex(0)
-        self.assertTrue(thread.IsValid(), "current thread is valid")
-
-        currentFrame = thread.GetFrameAtIndex(0)
-        self.assertTrue(currentFrame.IsValid(), "current frame is valid")
-
-        # Extract the value of fstat and ftag flag at the point just before
-        # we start pushing floating point values on st% register stack
-        value = currentFrame.FindValue("fstat", lldb.eValueTypeRegister)
-        error = lldb.SBError()
-        reg_value_fstat_initial = value.GetValueAsUnsigned(error, 0)
-
-        self.assertTrue(error.Success(), "reading a value for fstat")
-        value = currentFrame.FindValue("ftag", lldb.eValueTypeRegister)
-        error = lldb.SBError()
-        reg_value_ftag_initial = value.GetValueAsUnsigned(error, 0)
-
-        self.assertTrue(error.Success(), "reading a value for ftag")
-        fstat_top_pointer_initial = (reg_value_fstat_initial & 0x3800) >> 11
-
-        # Execute 'si' aka 'thread step-inst' instruction 5 times and with
-        # every execution verify the value of fstat and ftag registers
-        for x in range(0, 5):
-            # step into the next instruction to push a value on 'st' register
-            # stack
-            self.runCmd("si", RUN_SUCCEEDED)
-
-            # Verify fstat and save it to be used for verification in next
-            # execution of 'si' command
-            if not (reg_value_fstat_initial & 0x3800):
-                self.expect("register read fstat", substrs=[
-                            'fstat' + ' = ', str("0x%0.4x" % ((reg_value_fstat_initial & ~(0x3800)) | 0x3800))])
-                reg_value_fstat_initial = (
-                    (reg_value_fstat_initial & ~(0x3800)) | 0x3800)
-                fstat_top_pointer_initial = 7
-            else:
-                self.expect("register read fstat", substrs=[
-                            'fstat' + ' = ', str("0x%0.4x" % (reg_value_fstat_initial - 0x0800))])
-                reg_value_fstat_initial = (reg_value_fstat_initial - 0x0800)
-                fstat_top_pointer_initial -= 1
-
-            # Verify ftag and save it to be used for verification in next
-            # execution of 'si' command
-            self.expect(
-                "register read ftag", substrs=[
-                    'ftag' + ' = ', str(
-                        "0x%0.4x" %
-                        (reg_value_ftag_initial | (
-                            1 << fstat_top_pointer_initial)))])
-            reg_value_ftag_initial = reg_value_ftag_initial | (
-                1 << fstat_top_pointer_initial)
-
-    def fp_register_write(self):
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Launch the process, stop at the entry point.
-        error = lldb.SBError()
-        process = target.Launch(
-                lldb.SBListener(),
-                None, None, # argv, envp
-                None, None, None, # stdin/out/err
-                self.get_process_working_directory(),
-                0, # launch flags
-                True, # stop at entry
-                error)
-        self.assertTrue(error.Success(), "Launch succeeds. Error is :" + str(error))
-
-        self.assertTrue(
-            process.GetState() == lldb.eStateStopped,
-            PROCESS_STOPPED)
-
-        thread = process.GetThreadAtIndex(0)
-        self.assertTrue(thread.IsValid(), "current thread is valid")
-
-        currentFrame = thread.GetFrameAtIndex(0)
-        self.assertTrue(currentFrame.IsValid(), "current frame is valid")
-
-        if self.getArchitecture() in ['amd64', 'i386', 'x86_64']:
-            reg_list = [
-                # reg          value        must-have
-                ("fcw", "0x0000ff0e", False),
-                ("fsw", "0x0000ff0e", False),
-                ("ftw", "0x0000ff0e", False),
-                ("ip", "0x0000ff0e", False),
-                ("dp", "0x0000ff0e", False),
-                ("mxcsr", "0x0000ff0e", False),
-                ("mxcsrmask", "0x0000ff0e", False),
-            ]
-
-            st0regname = None
-            if currentFrame.FindRegister("st0").IsValid():
-                st0regname = "st0"
-            elif currentFrame.FindRegister("stmm0").IsValid():
-                st0regname = "stmm0"
-            if st0regname is not None:
-                # reg          value
-                # must-have
-                reg_list.append(
-                    (st0regname, "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00}", True))
-                reg_list.append(
-                    ("xmm0",
-                     "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f}",
-                     True))
-                reg_list.append(
-                    ("xmm15",
-                     "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x0e 0x0f}",
-                     False))
-        elif self.getArchitecture() in ['arm64', 'aarch64', 'arm64e', 'arm64_32']:
-            reg_list = [
-                # reg      value
-                # must-have
-                ("fpsr", "0xfbf79f9f", True),
-                ("s0", "1.25", True),
-                ("s31", "0.75", True),
-                ("d1", "123", True),
-                ("d17", "987", False),
-                ("v1", "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f}", True),
-                ("v14",
-                 "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x0e 0x0f}",
-                 False),
-            ]
-        elif self.getArchitecture() in ['armv7'] and self.platformIsDarwin():
-            reg_list = [
-                # reg      value
-                # must-have
-                ("fpsr", "0xfbf79f9f", True),
-                ("s0", "1.25", True),
-                ("s31", "0.75", True),
-                ("d1", "123", True),
-                ("d17", "987", False),
-                ("q1", "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f}", True),
-                ("q14",
-                 "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x0e 0x0f}",
-                 False),
-            ]
-        elif self.getArchitecture() in ['arm', 'armv7k']:
-            reg_list = [
-                # reg      value
-                # must-have
-                ("fpscr", "0xfbf79f9f", True),
-                ("s0", "1.25", True),
-                ("s31", "0.75", True),
-                ("d1", "123", True),
-                ("d17", "987", False),
-                ("q1", "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f}", True),
-                ("q14",
-                 "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x0e 0x0f}",
-                 False),
-            ]
-
-        for (reg, val, must) in reg_list:
-            self.write_and_read(currentFrame, reg, val, must)
-
-        if self.getArchitecture() in ['amd64', 'i386', 'x86_64']:
-            if st0regname is None:
-                self.fail("st0regname could not be determined")
-            self.runCmd(
-                "register write " +
-                st0regname +
-                " \"{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}\"")
-            self.expect(
-                "register read " +
-                st0regname +
-                " --format f",
-                substrs=[
-                    st0regname +
-                    ' = 0'])
-
-            has_avx = False
-            has_mpx = False
-            # Returns an SBValueList.
-            registerSets = currentFrame.GetRegisters()
-            for registerSet in registerSets:
-                if 'advanced vector extensions' in registerSet.GetName().lower():
-                    has_avx = True
-                if 'memory protection extension' in registerSet.GetName().lower():
-                    has_mpx = True
-
-            if has_avx:
-                new_value = "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x0e 0x0f 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x0c 0x0d 0x0e 0x0f}"
-                self.write_and_read(currentFrame, "ymm0", new_value)
-                self.write_and_read(currentFrame, "ymm7", new_value)
-                self.expect("expr $ymm0", substrs=['vector_type'])
-            else:
-                self.runCmd("register read ymm0")
-
-            if has_mpx:
-                # Test write and read for bnd0.
-                new_value_w = "{0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10}"
-                self.runCmd("register write bnd0 \'" + new_value_w + "\'")
-                new_value_r = "{0x0807060504030201 0x100f0e0d0c0b0a09}"
-                self.expect("register read bnd0", substrs = ['bnd0 = ', new_value_r])
-                self.expect("expr $bnd0", substrs = ['vector_type'])
-
-                # Test write and for bndstatus.
-                new_value = "{0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08}"
-                self.write_and_read(currentFrame, "bndstatus", new_value)
-                self.expect("expr $bndstatus", substrs = ['vector_type'])
-            else:
-                self.runCmd("register read bnd0")
-
-    def convenience_registers(self):
-        """Test convenience registers."""
-        self.common_setup()
-
-        # The command "register read -a" does output a derived register like
-        # eax...
-        self.expect("register read -a", matching=True,
-                    substrs=['eax'])
-
-        # ...however, the vanilla "register read" command should not output derived registers like eax.
-        self.expect("register read", matching=False,
-                    substrs=['eax'])
-
-        # Test reading of rax and eax.
-        self.expect("register read rax eax",
-                    substrs=['rax = 0x', 'eax = 0x'])
-
-        # Now write rax with a unique bit pattern and test that eax indeed
-        # represents the lower half of rax.
-        self.runCmd("register write rax 0x1234567887654321")
-        self.expect("register read rax 0x1234567887654321",
-                    substrs=['0x1234567887654321'])
-
-    def convenience_registers_with_process_attach(self, test_16bit_regs):
-        """Test convenience registers after a 'process attach'."""
-        exe = self.getBuildArtifact("a.out")
-
-        # Spawn a new process
-        pid = self.spawnSubprocess(exe, ['wait_for_attach']).pid
-        self.addTearDownHook(self.cleanupSubprocesses)
-
-        if self.TraceOn():
-            print("pid of spawned process: %d" % pid)
-
-        self.runCmd("process attach -p %d" % pid)
-
-        # Check that "register read eax" works.
-        self.runCmd("register read eax")
-
-        if self.getArchitecture() in ['amd64', 'x86_64']:
-            self.expect("expr -- ($rax & 0xffffffff) == $eax",
-                        substrs=['true'])
-
-        if test_16bit_regs:
-            self.expect("expr -- $ax == (($ah << 8) | $al)",
-                        substrs=['true'])
-
-    @skipIfiOSSimulator
-    @skipIf(archs=no_match(['amd64', 'arm', 'i386', 'x86_64']))
-    def test_invalid_invocation(self):
-        self.build()
-        self.common_setup()
-
-        self.expect("register read -a arg", error=True,
-                    substrs=["the --all option can't be used when registers names are supplied as arguments"])
-
-        self.expect("register read --set 0 r", error=True,
-                    substrs=["the --set <set> option can't be used when registers names are supplied as arguments"])
-
-        self.expect("register write a", error=True,
-                    substrs=["register write takes exactly 2 arguments: <reg-name> <value>"])
-        self.expect("register write a b c", error=True,
-                    substrs=["register write takes exactly 2 arguments: <reg-name> <value>"])
-
-    @skipIfiOSSimulator
-    @skipIf(archs=no_match(['amd64', 'arm', 'i386', 'x86_64']))
-    def test_write_unknown_register(self):
-        self.build()
-        self.common_setup()
-
-        self.expect("register write blub 1", error=True,
-                    substrs=["error: Register not found for 'blub'."])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/register_command/a.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/register_command/a.cpp
deleted file mode 100644 (file)
index 79f111a..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-//===-- a.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-long double
-return_long_double (long double value)
-{
-#if defined (__i386__) || defined (__x86_64__)
-    float a=2, b=4,c=8, d=16, e=32, f=64, k=128, l=256, add=0;
-    __asm__ (
-        "int3 ;"
-        "flds %1 ;"
-        "flds %2 ;"
-        "flds %3 ;"
-        "flds %4 ;"
-        "flds %5 ;"
-        "flds %6 ;"
-        "flds %7 ;"
-        "faddp ;" : "=g" (add) : "g" (a), "g" (b), "g" (c), "g" (d), "g" (e), "g" (f), "g" (k), "g" (l) );  // Set break point at this line.
-#endif    // #if defined (__i386__) || defined (__x86_64__)
-    return value;
-}
-
-long double
-outer_return_long_double (long double value)
-{
-    long double val = return_long_double(value);
-    val *= 2 ;
-    return val;
-}
-
-long double
-outermost_return_long_double (long double value)
-{
-    long double val = outer_return_long_double(value);
-    val *= 2 ;
-    return val;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/register_command/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/register/register/register_command/main.cpp
deleted file mode 100644 (file)
index 493a09e..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-#include <chrono>
-#include <thread>
-
-long double outermost_return_long_double (long double my_long_double);
-
-int main (int argc, char const *argv[])
-{
-    lldb_enable_attach();
-
-    char my_string[] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 0};
-    double my_double = 1234.5678;
-    long double my_long_double = 1234.5678;
-
-    // For simplicity assume that any cmdline argument means wait for attach.
-    if (argc > 1)
-    {
-        volatile int wait_for_attach=1;
-        while (wait_for_attach)
-            std::this_thread::sleep_for(std::chrono::microseconds(1));
-    }
-
-    printf("my_string=%s\n", my_string);
-    printf("my_double=%g\n", my_double);
-    outermost_return_long_double (my_long_double);
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/reproducer/invalid-args/TestInvalidArgsReproducer.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/reproducer/invalid-args/TestInvalidArgsReproducer.py
deleted file mode 100644 (file)
index 74db2fc..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-
-class ReproducerTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    def test_reproducer_generate_invalid_invocation(self):
-        self.expect("reproducer generate f", error=True,
-                    substrs=["'reproducer generate' takes no arguments"])
-
-    @no_debug_info_test
-    def test_reproducer_status_invalid_invocation(self):
-        self.expect("reproducer status f", error=True,
-                    substrs=["'reproducer status' takes no arguments"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/settings/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/settings/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/settings/TestSettings.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/settings/TestSettings.py
deleted file mode 100644 (file)
index 1130821..0000000
+++ /dev/null
@@ -1,604 +0,0 @@
-"""
-Test lldb settings command.
-"""
-
-
-
-import os
-import re
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class SettingsCommandTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_apropos_should_also_search_settings_description(self):
-        """Test that 'apropos' command should also search descriptions for the settings variables."""
-
-        self.expect("apropos 'environment variable'",
-                    substrs=["target.env-vars",
-                             "environment variables",
-                             "executable's environment"])
-
-    def test_append_target_env_vars(self):
-        """Test that 'append target.run-args' works."""
-        # Append the env-vars.
-        self.runCmd('settings append target.env-vars MY_ENV_VAR=YES')
-        # And add hooks to restore the settings during tearDown().
-        self.addTearDownHook(
-            lambda: self.runCmd("settings clear target.env-vars"))
-
-        # Check it immediately!
-        self.expect('settings show target.env-vars',
-                    substrs=['MY_ENV_VAR=YES'])
-
-    def test_insert_before_and_after_target_run_args(self):
-        """Test that 'insert-before/after target.run-args' works."""
-        # Set the run-args first.
-        self.runCmd('settings set target.run-args a b c')
-        # And add hooks to restore the settings during tearDown().
-        self.addTearDownHook(
-            lambda: self.runCmd("settings clear target.run-args"))
-
-        # Now insert-before the index-0 element with '__a__'.
-        self.runCmd('settings insert-before target.run-args 0 __a__')
-        # And insert-after the index-1 element with '__A__'.
-        self.runCmd('settings insert-after target.run-args 1 __A__')
-        # Check it immediately!
-        self.expect('settings show target.run-args',
-                    substrs=['target.run-args',
-                             '[0]: "__a__"',
-                             '[1]: "a"',
-                             '[2]: "__A__"',
-                             '[3]: "b"',
-                             '[4]: "c"'])
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr44430")
-    def test_replace_target_run_args(self):
-        """Test that 'replace target.run-args' works."""
-        # Set the run-args and then replace the index-0 element.
-        self.runCmd('settings set target.run-args a b c')
-        # And add hooks to restore the settings during tearDown().
-        self.addTearDownHook(
-            lambda: self.runCmd("settings clear target.run-args"))
-
-        # Now replace the index-0 element with 'A', instead.
-        self.runCmd('settings replace target.run-args 0 A')
-        # Check it immediately!
-        self.expect('settings show target.run-args',
-                    substrs=['target.run-args (arguments) =',
-                             '[0]: "A"',
-                             '[1]: "b"',
-                             '[2]: "c"'])
-
-    def test_set_prompt(self):
-        """Test that 'set prompt' actually changes the prompt."""
-
-        # Set prompt to 'lldb2'.
-        self.runCmd("settings set prompt 'lldb2 '")
-
-        # Immediately test the setting.
-        self.expect("settings show prompt", SETTING_MSG("prompt"),
-                    startstr='prompt (string) = "lldb2 "')
-
-        # The overall display should also reflect the new setting.
-        self.expect("settings show", SETTING_MSG("prompt"),
-                    substrs=['prompt (string) = "lldb2 "'])
-
-        # Use '-r' option to reset to the original default prompt.
-        self.runCmd("settings clear prompt")
-
-    def test_set_term_width(self):
-        """Test that 'set term-width' actually changes the term-width."""
-
-        self.runCmd("settings set term-width 70")
-
-        # Immediately test the setting.
-        self.expect("settings show term-width", SETTING_MSG("term-width"),
-                    startstr="term-width (int) = 70")
-
-        # The overall display should also reflect the new setting.
-        self.expect("settings show", SETTING_MSG("term-width"),
-                    substrs=["term-width (int) = 70"])
-
-    # rdar://problem/10712130
-    @skipIf(oslist=["windows"], bugnumber="llvm.org/pr44431")
-    def test_set_frame_format(self):
-        """Test that 'set frame-format' with a backtick char in the format string works as well as fullpath."""
-        self.build()
-
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        def cleanup():
-            self.runCmd(
-                "settings set frame-format %s" %
-                self.format_string, check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.runCmd("settings show frame-format")
-        m = re.match(
-            '^frame-format \(format-string\) = "(.*)\"$',
-            self.res.GetOutput())
-        self.assertTrue(m, "Bad settings string")
-        self.format_string = m.group(1)
-
-        # Change the default format to print function.name rather than
-        # function.name-with-args
-        format_string = "frame #${frame.index}: ${frame.pc}{ ${module.file.basename}\`${function.name}{${function.pc-offset}}}{ at ${line.file.fullpath}:${line.number}}{, lang=${language}}\n"
-        self.runCmd("settings set frame-format %s" % format_string)
-
-        # Immediately test the setting.
-        self.expect("settings show frame-format", SETTING_MSG("frame-format"),
-                    substrs=[format_string])
-
-        self.runCmd("breakpoint set -n main")
-        self.runCmd("process launch --working-dir '{0}'".format(self.get_process_working_directory()),
-                RUN_SUCCEEDED)
-        self.expect("thread backtrace",
-                    substrs=["`main", self.getSourceDir()])
-
-    def test_set_auto_confirm(self):
-        """Test that after 'set auto-confirm true', manual confirmation should not kick in."""
-        self.build()
-
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("settings set auto-confirm true")
-
-        # Immediately test the setting.
-        self.expect("settings show auto-confirm", SETTING_MSG("auto-confirm"),
-                    startstr="auto-confirm (boolean) = true")
-
-        # Now 'breakpoint delete' should just work fine without confirmation
-        # prompt from the command interpreter.
-        self.runCmd("breakpoint set -n main")
-        self.expect("breakpoint delete",
-                    startstr="All breakpoints removed")
-
-        # Restore the original setting of auto-confirm.
-        self.runCmd("settings clear auto-confirm")
-        self.expect("settings show auto-confirm", SETTING_MSG("auto-confirm"),
-                    startstr="auto-confirm (boolean) = false")
-
-    @skipIf(archs=no_match(['x86_64', 'i386', 'i686']))
-    def test_disassembler_settings(self):
-        """Test that user options for the disassembler take effect."""
-        self.build()
-
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # AT&T syntax
-        self.runCmd("settings set target.x86-disassembly-flavor att")
-        self.runCmd("settings set target.use-hex-immediates false")
-        self.expect("disassemble -n numberfn",
-                    substrs=["$90"])
-        self.runCmd("settings set target.use-hex-immediates true")
-        self.runCmd("settings set target.hex-immediate-style c")
-        self.expect("disassemble -n numberfn",
-                    substrs=["$0x5a"])
-        self.runCmd("settings set target.hex-immediate-style asm")
-        self.expect("disassemble -n numberfn",
-                    substrs=["$5ah"])
-
-        # Intel syntax
-        self.runCmd("settings set target.x86-disassembly-flavor intel")
-        self.runCmd("settings set target.use-hex-immediates false")
-        self.expect("disassemble -n numberfn",
-                    substrs=["90"])
-        self.runCmd("settings set target.use-hex-immediates true")
-        self.runCmd("settings set target.hex-immediate-style c")
-        self.expect("disassemble -n numberfn",
-                    substrs=["0x5a"])
-        self.runCmd("settings set target.hex-immediate-style asm")
-        self.expect("disassemble -n numberfn",
-                    substrs=["5ah"])
-
-    @skipIfDarwinEmbedded   # <rdar://problem/34446098> debugserver on ios etc can't write files
-    def test_run_args_and_env_vars(self):
-        """Test that run-args and env-vars are passed to the launched process."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Set the run-args and the env-vars.
-        # And add hooks to restore the settings during tearDown().
-        self.runCmd('settings set target.run-args A B C')
-        self.addTearDownHook(
-            lambda: self.runCmd("settings clear target.run-args"))
-        self.runCmd('settings set target.env-vars ["MY_ENV_VAR"]=YES')
-        self.addTearDownHook(
-            lambda: self.runCmd("settings clear target.env-vars"))
-
-        self.runCmd("process launch --working-dir '{0}'".format(self.get_process_working_directory()),
-                RUN_SUCCEEDED)
-
-        # Read the output file produced by running the program.
-        output = lldbutil.read_file_from_process_wd(self, "output2.txt")
-
-        self.expect(
-            output,
-            exe=False,
-            substrs=[
-                "argv[1] matches",
-                "argv[2] matches",
-                "argv[3] matches",
-                "Environment variable 'MY_ENV_VAR' successfully passed."])
-
-    @skipIfRemote  # it doesn't make sense to send host env to remote target
-    def test_pass_host_env_vars(self):
-        """Test that the host env vars are passed to the launched process."""
-        self.build()
-
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # By default, inherit-env is 'true'.
-        self.expect(
-            'settings show target.inherit-env',
-            "Default inherit-env is 'true'",
-            startstr="target.inherit-env (boolean) = true")
-
-        # Set some host environment variables now.
-        os.environ["MY_HOST_ENV_VAR1"] = "VAR1"
-        os.environ["MY_HOST_ENV_VAR2"] = "VAR2"
-
-        # This is the function to unset the two env variables set above.
-        def unset_env_variables():
-            os.environ.pop("MY_HOST_ENV_VAR1")
-            os.environ.pop("MY_HOST_ENV_VAR2")
-
-        self.addTearDownHook(unset_env_variables)
-        self.runCmd("process launch --working-dir '{0}'".format(self.get_process_working_directory()),
-                RUN_SUCCEEDED)
-
-        # Read the output file produced by running the program.
-        output = lldbutil.read_file_from_process_wd(self, "output1.txt")
-
-        self.expect(
-            output,
-            exe=False,
-            substrs=[
-                "The host environment variable 'MY_HOST_ENV_VAR1' successfully passed.",
-                "The host environment variable 'MY_HOST_ENV_VAR2' successfully passed."])
-
-    @skipIfDarwinEmbedded   # <rdar://problem/34446098> debugserver on ios etc can't write files
-    def test_set_error_output_path(self):
-        """Test that setting target.error/output-path for the launched process works."""
-        self.build()
-
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Set the error-path and output-path and verify both are set.
-        self.runCmd("settings set target.error-path '{0}'".format(
-            lldbutil.append_to_process_working_directory(self, "stderr.txt")))
-        self.runCmd("settings set target.output-path '{0}".format(
-            lldbutil.append_to_process_working_directory(self, "stdout.txt")))
-        # And add hooks to restore the original settings during tearDown().
-        self.addTearDownHook(
-            lambda: self.runCmd("settings clear target.output-path"))
-        self.addTearDownHook(
-            lambda: self.runCmd("settings clear target.error-path"))
-
-        self.expect("settings show target.error-path",
-                    SETTING_MSG("target.error-path"),
-                    substrs=['target.error-path (file)', 'stderr.txt"'])
-
-        self.expect("settings show target.output-path",
-                    SETTING_MSG("target.output-path"),
-                    substrs=['target.output-path (file)', 'stdout.txt"'])
-
-        self.runCmd("process launch --working-dir '{0}'".format(self.get_process_working_directory()),
-                RUN_SUCCEEDED)
-
-        output = lldbutil.read_file_from_process_wd(self, "stderr.txt")
-        message = "This message should go to standard error."
-        if lldbplatformutil.hasChattyStderr(self):
-            self.expect(output, exe=False, substrs=[message])
-        else:
-            self.expect(output, exe=False, startstr=message)
-
-        output = lldbutil.read_file_from_process_wd(self, "stdout.txt")
-        self.expect(output, exe=False,
-                    startstr="This message should go to standard out.")
-
-    def test_print_dictionary_setting(self):
-        self.runCmd("settings clear target.env-vars")
-        self.runCmd("settings set target.env-vars [\"MY_VAR\"]=some-value")
-        self.expect("settings show target.env-vars",
-                    substrs=["MY_VAR=some-value"])
-        self.runCmd("settings clear target.env-vars")
-
-    def test_print_array_setting(self):
-        self.runCmd("settings clear target.run-args")
-        self.runCmd("settings set target.run-args gobbledy-gook")
-        self.expect("settings show target.run-args",
-                    substrs=['[0]: "gobbledy-gook"'])
-        self.runCmd("settings clear target.run-args")
-
-    def test_settings_with_quotes(self):
-        self.runCmd("settings clear target.run-args")
-        self.runCmd("settings set target.run-args a b c")
-        self.expect("settings show target.run-args",
-                    substrs=['[0]: "a"',
-                             '[1]: "b"',
-                             '[2]: "c"'])
-        self.runCmd("settings set target.run-args 'a b c'")
-        self.expect("settings show target.run-args",
-                    substrs=['[0]: "a b c"'])
-        self.runCmd("settings clear target.run-args")
-        self.runCmd("settings clear target.env-vars")
-        self.runCmd(
-            'settings set target.env-vars ["MY_FILE"]="this is a file name with spaces.txt"')
-        self.expect("settings show target.env-vars",
-                    substrs=['MY_FILE=this is a file name with spaces.txt'])
-        self.runCmd("settings clear target.env-vars")
-        # Test and make sure that setting "format-string" settings obeys quotes
-        # if they are provided
-        self.runCmd("settings set thread-format    'abc def'   ")
-        self.expect("settings show thread-format",
-                    'thread-format (format-string) = "abc def"')
-        self.runCmd('settings set thread-format    "abc def"   ')
-        self.expect("settings show thread-format",
-                    'thread-format (format-string) = "abc def"')
-        # Make sure when no quotes are provided that we maintain any trailing
-        # spaces
-        self.runCmd('settings set thread-format abc def   ')
-        self.expect("settings show thread-format",
-                    'thread-format (format-string) = "abc def   "')
-        self.runCmd('settings clear thread-format')
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr44430")
-    def test_settings_with_trailing_whitespace(self):
-
-        # boolean
-        # Set to known value
-        self.runCmd("settings set target.skip-prologue true")
-        # Set to new value with trailing whitespace
-        self.runCmd("settings set target.skip-prologue false ")
-        # Make sure the setting was correctly set to "false"
-        self.expect(
-            "settings show target.skip-prologue",
-            SETTING_MSG("target.skip-prologue"),
-            startstr="target.skip-prologue (boolean) = false")
-        self.runCmd("settings clear target.skip-prologue", check=False)
-        # integer
-        self.runCmd("settings set term-width 70")      # Set to known value
-        # Set to new value with trailing whitespaces
-        self.runCmd("settings set term-width 60 \t")
-        self.expect("settings show term-width", SETTING_MSG("term-width"),
-                    startstr="term-width (int) = 60")
-        self.runCmd("settings clear term-width", check=False)
-        # string
-        self.runCmd("settings set target.arg0 abc")    # Set to known value
-        # Set to new value with trailing whitespaces
-        self.runCmd("settings set target.arg0 cde\t ")
-        self.expect("settings show target.arg0", SETTING_MSG("target.arg0"),
-                    startstr='target.arg0 (string) = "cde"')
-        self.runCmd("settings clear target.arg0", check=False)
-        # file
-        path1 = self.getBuildArtifact("path1.txt")
-        path2 = self.getBuildArtifact("path2.txt")
-        self.runCmd(
-            "settings set target.output-path %s" %
-            path1)   # Set to known value
-        self.expect(
-            "settings show target.output-path",
-            SETTING_MSG("target.output-path"),
-            startstr='target.output-path (file) = ',
-            substrs=[path1])
-        self.runCmd("settings set target.output-path %s " %
-                    path2)  # Set to new value with trailing whitespaces
-        self.expect(
-            "settings show target.output-path",
-            SETTING_MSG("target.output-path"),
-            startstr='target.output-path (file) = ',
-            substrs=[path2])
-        self.runCmd("settings clear target.output-path", check=False)
-        # enum
-        # Set to known value
-        self.runCmd("settings set stop-disassembly-display never")
-        # Set to new value with trailing whitespaces
-        self.runCmd("settings set stop-disassembly-display always ")
-        self.expect(
-            "settings show stop-disassembly-display",
-            SETTING_MSG("stop-disassembly-display"),
-            startstr='stop-disassembly-display (enum) = always')
-        self.runCmd("settings clear stop-disassembly-display", check=False)
-        # language
-        # Set to known value
-        self.runCmd("settings set target.language c89")
-        # Set to new value with trailing whitespace
-        self.runCmd("settings set target.language c11 ")
-        self.expect(
-            "settings show target.language",
-            SETTING_MSG("target.language"),
-            startstr="target.language (language) = c11")
-        self.runCmd("settings clear target.language", check=False)
-        # arguments
-        self.runCmd("settings set target.run-args 1 2 3")  # Set to known value
-        # Set to new value with trailing whitespaces
-        self.runCmd("settings set target.run-args 3 4 5 ")
-        self.expect(
-            "settings show target.run-args",
-            SETTING_MSG("target.run-args"),
-            substrs=[
-                'target.run-args (arguments) =',
-                '[0]: "3"',
-                '[1]: "4"',
-                '[2]: "5"'])
-        self.runCmd("settings set target.run-args 1 2 3")  # Set to known value
-        # Set to new value with trailing whitespaces
-        self.runCmd("settings set target.run-args 3 \  \ ")
-        self.expect(
-            "settings show target.run-args",
-            SETTING_MSG("target.run-args"),
-            substrs=[
-                'target.run-args (arguments) =',
-                '[0]: "3"',
-                '[1]: " "',
-                '[2]: " "'])
-        self.runCmd("settings clear target.run-args", check=False)
-        # dictionaries
-        self.runCmd("settings clear target.env-vars")  # Set to known value
-        # Set to new value with trailing whitespaces
-        self.runCmd("settings set target.env-vars A=B C=D\t ")
-        self.expect(
-            "settings show target.env-vars",
-            SETTING_MSG("target.env-vars"),
-            substrs=[
-                'target.env-vars (dictionary of strings) =',
-                'A=B',
-                'C=D'])
-        self.runCmd("settings clear target.env-vars", check=False)
-        # regex
-        # Set to known value
-        self.runCmd("settings clear target.process.thread.step-avoid-regexp")
-        # Set to new value with trailing whitespaces
-        self.runCmd(
-            "settings set target.process.thread.step-avoid-regexp foo\\ ")
-        self.expect(
-            "settings show target.process.thread.step-avoid-regexp",
-            SETTING_MSG("target.process.thread.step-avoid-regexp"),
-            substrs=['target.process.thread.step-avoid-regexp (regex) = foo\\ '])
-        self.runCmd(
-            "settings clear target.process.thread.step-avoid-regexp",
-            check=False)
-        # format-string
-        self.runCmd("settings clear disassembly-format")  # Set to known value
-        # Set to new value with trailing whitespaces
-        self.runCmd("settings set disassembly-format foo ")
-        self.expect("settings show disassembly-format",
-                    SETTING_MSG("disassembly-format"),
-                    substrs=['disassembly-format (format-string) = "foo "'])
-        self.runCmd("settings clear disassembly-format", check=False)
-
-    def test_settings_list(self):
-        # List settings (and optionally test the filter to only show 'target' settings).
-        self.expect("settings list target", substrs=["language", "arg0", "detach-on-error"])
-        self.expect("settings list target", matching=False, substrs=["packet-timeout"])
-        self.expect("settings list", substrs=["language", "arg0", "detach-on-error", "packet-timeout"])
-
-    def test_settings_remove_single(self):
-        # Set some environment variables and use 'remove' to delete them.
-        self.runCmd("settings set target.env-vars a=b c=d")
-        self.expect("settings show target.env-vars", substrs=["a=b", "c=d"])
-        self.runCmd("settings remove target.env-vars a")
-        self.expect("settings show target.env-vars", matching=False, substrs=["a=b"])
-        self.expect("settings show target.env-vars", substrs=["c=d"])
-        self.runCmd("settings remove target.env-vars c")
-        self.expect("settings show target.env-vars", matching=False, substrs=["a=b", "c=d"])
-
-    def test_settings_remove_multiple(self):
-        self.runCmd("settings set target.env-vars a=b c=d e=f")
-        self.expect("settings show target.env-vars", substrs=["a=b", "c=d", "e=f"])
-        self.runCmd("settings remove target.env-vars a e")
-        self.expect("settings show target.env-vars", matching=False, substrs=["a=b", "e=f"])
-        self.expect("settings show target.env-vars", substrs=["c=d"])
-
-    def test_settings_remove_nonexistent_value(self):
-        self.expect("settings remove target.env-vars doesntexist", error=True,
-                    substrs=["no value found named 'doesntexist'"])
-
-    def test_settings_remove_nonexistent_settings(self):
-        self.expect("settings remove doesntexist alsodoesntexist", error=True,
-                    substrs=["error: invalid value path 'doesntexist'"])
-
-    def test_settings_remove_missing_arg(self):
-        self.expect("settings remove", error=True,
-                    substrs=["'settings remove' takes an array or dictionary item, or"])
-
-    def test_settings_remove_empty_arg(self):
-        self.expect("settings remove ''", error=True,
-                    substrs=["'settings remove' command requires a valid variable name"])
-
-    def test_all_settings_exist(self):
-        self.expect("settings show",
-                    substrs=["auto-confirm",
-                             "frame-format",
-                             "notify-void",
-                             "prompt",
-                             "script-lang",
-                             "stop-disassembly-count",
-                             "stop-disassembly-display",
-                             "stop-line-count-after",
-                             "stop-line-count-before",
-                             "stop-show-column",
-                             "term-width",
-                             "thread-format",
-                             "use-external-editor",
-                             "target.default-arch",
-                             "target.move-to-nearest-code",
-                             "target.expr-prefix",
-                             "target.language",
-                             "target.prefer-dynamic-value",
-                             "target.enable-synthetic-value",
-                             "target.skip-prologue",
-                             "target.source-map",
-                             "target.exec-search-paths",
-                             "target.max-children-count",
-                             "target.max-string-summary-length",
-                             "target.breakpoints-use-platform-avoid-list",
-                             "target.run-args",
-                             "target.env-vars",
-                             "target.inherit-env",
-                             "target.input-path",
-                             "target.output-path",
-                             "target.error-path",
-                             "target.disable-aslr",
-                             "target.disable-stdio",
-                             "target.x86-disassembly-flavor",
-                             "target.use-hex-immediates",
-                             "target.hex-immediate-style",
-                             "target.process.disable-memory-cache",
-                             "target.process.extra-startup-command",
-                             "target.process.thread.step-avoid-regexp",
-                             "target.process.thread.trace-thread"])
-
-    # settings under an ".experimental" domain should have two properties:
-    #   1. If the name does not exist with "experimental" in the name path,
-    #      the name lookup should try to find it without "experimental".  So
-    #      a previously-experimental setting that has been promoted to a
-    #      "real" setting will still be set by the original name.
-    #   2. Changing a setting with .experimental., name, where the setting
-    #      does not exist either with ".experimental." or without, should
-    #      not generate an error.  So if an experimental setting is removed,
-    #      people who may have that in their ~/.lldbinit files should not see
-    #      any errors.
-    def test_experimental_settings(self):
-        cmdinterp = self.dbg.GetCommandInterpreter()
-        result = lldb.SBCommandReturnObject()
-
-        # Set target.arg0 to a known value, check that we can retrieve it via
-        # the actual name and via .experimental.
-        self.expect('settings set target.arg0 first-value')
-        self.expect('settings show target.arg0', substrs=['first-value'])
-        self.expect('settings show target.experimental.arg0', substrs=['first-value'], error=False)
-
-        # Set target.arg0 to a new value via a target.experimental.arg0 name,
-        # verify that we can read it back via both .experimental., and not.
-        self.expect('settings set target.experimental.arg0 second-value', error=False)
-        self.expect('settings show target.arg0', substrs=['second-value'])
-        self.expect('settings show target.experimental.arg0', substrs=['second-value'], error=False)
-
-        # showing & setting an undefined .experimental. setting should generate no errors.
-        self.expect('settings show target.experimental.setting-which-does-not-exist', patterns=['^\s$'], error=False)
-        self.expect('settings set target.experimental.setting-which-does-not-exist true', error=False)
-
-        # A domain component before .experimental. which does not exist should give an error
-        # But the code does not yet do that.
-        # self.expect('settings set target.setting-which-does-not-exist.experimental.arg0 true', error=True)
-
-        # finally, confirm that trying to set a setting that does not exist still fails.
-        # (SHOWING a setting that does not exist does not currently yield an error.)
-        self.expect('settings set target.setting-which-does-not-exist true', error=True)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/settings/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/settings/main.cpp
deleted file mode 100644 (file)
index 5159eaa..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <cstdlib>
-#include <string>
-#include <fstream>
-#include <iostream>
-
-int numberfn()
-{
-    return 0x5a;
-}
-
-int
-main(int argc, char const *argv[])
-{
-    // The program writes its output to the following file:
-    //
-    //     o "output1.txt" for test_pass_host_env_vars() test case
-    //     o "output2.txt" for test_run_args_and_env_vars_with_dsym() test case
-    //     o "output2.txt" for test_run_args_and_env_vars_with_dwarf() test case
-    std::ofstream outfile;
-    if (argc == 1)
-        outfile.open("output1.txt");
-    else
-        outfile.open("output2.txt");
-
-    for (unsigned i = 0; i < argc; ++i) {
-        std::string theArg(argv[i]);
-        if (i == 1 && "A" == theArg)
-            outfile << "argv[1] matches\n";
-
-        if (i == 2 && "B" == theArg)
-            outfile << "argv[2] matches\n";
-
-        if (i == 3 && "C" == theArg)
-            outfile << "argv[3] matches\n";
-    }
-
-    // For passing environment vars from the debugger to the launched process.
-    if (::getenv("MY_ENV_VAR")) {
-        std::string MY_ENV_VAR(getenv("MY_ENV_VAR"));
-        if ("YES" == MY_ENV_VAR) {
-            outfile << "Environment variable 'MY_ENV_VAR' successfully passed.\n";
-        }
-    }
-
-
-    // For passing host environment vars to the launched process.
-    if (::getenv("MY_HOST_ENV_VAR1")) {
-        std::string MY_HOST_ENV_VAR1(getenv("MY_HOST_ENV_VAR1"));
-        if ("VAR1" == MY_HOST_ENV_VAR1) {
-            outfile << "The host environment variable 'MY_HOST_ENV_VAR1' successfully passed.\n";
-        }
-    }
-
-    if (::getenv("MY_HOST_ENV_VAR2")) {
-        std::string MY_HOST_ENV_VAR2(getenv("MY_HOST_ENV_VAR2"));
-        if ("VAR2" == MY_HOST_ENV_VAR2) {
-            outfile << "The host environment variable 'MY_HOST_ENV_VAR2' successfully passed.\n";
-        }
-    }
-
-    std::cerr << "This message should go to standard error.\n";
-    std::cout << "This message should go to standard out.\n";
-
-    outfile.close();
-    return numberfn();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/settings/quoting/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/settings/quoting/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/settings/quoting/TestQuoting.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/settings/quoting/TestQuoting.py
deleted file mode 100644 (file)
index 5853313..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-"""
-Test quoting of arguments to lldb commands
-"""
-
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class SettingsCommandTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @classmethod
-    def classCleanup(cls):
-        """Cleanup the test byproducts."""
-        cls.RemoveTempFile("stdout.txt")
-
-    @no_debug_info_test
-    def test_no_quote(self):
-        self.do_test_args("a b c", "a\0b\0c\0")
-
-    @no_debug_info_test
-    def test_single_quote(self):
-        self.do_test_args("'a b c'", "a b c\0")
-
-    @no_debug_info_test
-    def test_double_quote(self):
-        self.do_test_args('"a b c"', "a b c\0")
-
-    @no_debug_info_test
-    def test_single_quote_escape(self):
-        self.do_test_args("'a b\\' c", "a b\\\0c\0")
-
-    @no_debug_info_test
-    def test_double_quote_escape(self):
-        self.do_test_args('"a b\\" c"', 'a b" c\0')
-
-    @no_debug_info_test
-    def test_double_quote_escape2(self):
-        self.do_test_args('"a b\\\\" c', 'a b\\\0c\0')
-
-    @no_debug_info_test
-    def test_single_in_double(self):
-        self.do_test_args('"a\'b"', "a'b\0")
-
-    @no_debug_info_test
-    def test_double_in_single(self):
-        self.do_test_args("'a\"b'", 'a"b\0')
-
-    @no_debug_info_test
-    def test_combined(self):
-        self.do_test_args('"a b"c\'d e\'', 'a bcd e\0')
-
-    @no_debug_info_test
-    def test_bare_single(self):
-        self.do_test_args("a\\'b", "a'b\0")
-
-    @no_debug_info_test
-    def test_bare_double(self):
-        self.do_test_args('a\\"b', 'a"b\0')
-
-    def do_test_args(self, args_in, args_out):
-        """Test argument parsing. Run the program with args_in. The program dumps its arguments
-        to stdout. Compare the stdout with args_out."""
-        self.buildDefault()
-
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        local_outfile = self.getBuildArtifact("output.txt")
-        if lldb.remote_platform:
-            remote_outfile = "output.txt" # Relative to platform's PWD
-        else:
-            remote_outfile = local_outfile
-
-        self.runCmd("process launch -- %s %s" %(remote_outfile, args_in))
-
-        if lldb.remote_platform:
-            src_file_spec = lldb.SBFileSpec(remote_outfile, False)
-            dst_file_spec = lldb.SBFileSpec(local_outfile, True)
-            lldb.remote_platform.Get(src_file_spec, dst_file_spec)
-
-        with open(local_outfile, 'r') as f:
-            output = f.read()
-
-        self.RemoveTempFile(local_outfile)
-
-        self.assertEqual(output, args_out)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/settings/quoting/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/settings/quoting/main.c
deleted file mode 100644 (file)
index 2ebaa14..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-/* This program writes its arguments (separated by '\0') to stdout. */
-int
-main(int argc, char const *argv[])
-{
-    int i;
-
-    FILE *output = fopen (argv[1], "w");
-    if (output == NULL)
-        exit (1);
-
-    for (i = 2; i < argc; ++i)
-        fwrite(argv[i], strlen(argv[i])+1, 1, output);
-
-    fclose (output);
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/source/info/TestSourceInfo.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/source/info/TestSourceInfo.py
deleted file mode 100644 (file)
index c8308c1..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__, globals())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/source/info/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/source/info/main.cpp
deleted file mode 100644 (file)
index 7d71490..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-int bar();
-
-int foo() {
-  return 3;
-}
-
-int main() {
-  int f = foo() + bar();
-  f++;
-  return f; //%self.expect("source info", substrs=["Lines found in module ", "main.cpp:10"])
-  //%self.expect("source info -f main.cpp -c 10", matching=True, substrs=["main.cpp:10"])
-  //%self.expect("source info -f main.cpp -c 1", matching=False, substrs=["main.cpp:10"])
-  //%self.expect("source info -f main.cpp -l 10", matching=False, substrs=["main.cpp:7"])
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/source/info/second.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/source/info/second.cpp
deleted file mode 100644 (file)
index 0e068a6..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-int bar() {
-  int i = 3; //%self.expect("source info", substrs=["Lines found in module ", "second.cpp:2"])
-  return i; //%self.expect("source info", substrs=["Lines found in module ", "second.cpp:3"])
-  //%self.expect("source info --name main", substrs=["Lines found in module ", "main.cpp:7", "main.cpp:10"])
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/statistics/basic/TestStats.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/statistics/basic/TestStats.py
deleted file mode 100644 (file)
index 9f5c717..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(
-    __file__, globals(), [decorators.no_debug_info_test])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/statistics/basic/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/statistics/basic/main.c
deleted file mode 100644 (file)
index 9adb3a0..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Test that the lldb command `statistics` works.
-
-int main(void) {
-  int patatino = 27;
-  //%self.expect("statistics disable", substrs=['need to enable statistics before disabling'], error=True)
-  //%self.expect("statistics enable")
-  //%self.expect("statistics enable", substrs=['already enabled'], error=True)
-  //%self.expect("expr patatino", substrs=['27'])
-  //%self.expect("statistics disable")
-  //%self.expect("statistics dump", substrs=['expr evaluation successes : 1', 'expr evaluation failures : 0'])
-  //%self.expect("frame var", substrs=['27'])
-  //%self.expect("statistics enable")
-  //%self.expect("frame var", substrs=['27'])
-  //%self.expect("statistics disable")
-  //%self.expect("statistics dump", substrs=['frame var successes : 1', 'frame var failures : 0'])
-
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/basic/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/basic/Makefile
deleted file mode 100644 (file)
index b31e594..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# Example:
-#
-# C_SOURCES := b.c
-# EXE := b.out
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/basic/TestTargetCommand.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/basic/TestTargetCommand.py
deleted file mode 100644 (file)
index 6152a6a..0000000
+++ /dev/null
@@ -1,439 +0,0 @@
-"""
-Test some target commands: create, list, select, variable.
-"""
-
-import os
-import stat
-import tempfile
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class targetCommandTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers for our breakpoints.
-        self.line_b = line_number('b.c', '// Set break point at this line.')
-        self.line_c = line_number('c.c', '// Set break point at this line.')
-
-    def buildB(self):
-        db = {'C_SOURCES': 'b.c', 'EXE': self.getBuildArtifact('b.out')}
-        self.build(dictionary=db)
-        self.addTearDownCleanup(dictionary=db)
-
-    def buildAll(self):
-        da = {'C_SOURCES': 'a.c', 'EXE': self.getBuildArtifact('a.out')}
-        self.build(dictionary=da)
-        self.addTearDownCleanup(dictionary=da)
-
-        self.buildB()
-
-        dc = {'C_SOURCES': 'c.c', 'EXE': self.getBuildArtifact('c.out')}
-        self.build(dictionary=dc)
-        self.addTearDownCleanup(dictionary=dc)
-
-    def test_target_command(self):
-        """Test some target commands: create, list, select."""
-        self.buildAll()
-        self.do_target_command()
-
-    def test_target_variable_command(self):
-        """Test 'target variable' command before and after starting the inferior."""
-        d = {'C_SOURCES': 'globals.c', 'EXE': self.getBuildArtifact('globals')}
-        self.build(dictionary=d)
-        self.addTearDownCleanup(dictionary=d)
-
-        self.do_target_variable_command('globals')
-
-    def test_target_variable_command_no_fail(self):
-        """Test 'target variable' command before and after starting the inferior."""
-        d = {'C_SOURCES': 'globals.c', 'EXE': self.getBuildArtifact('globals')}
-        self.build(dictionary=d)
-        self.addTearDownCleanup(dictionary=d)
-
-        self.do_target_variable_command_no_fail('globals')
-
-    def do_target_command(self):
-        """Exercise 'target create', 'target list', 'target select' commands."""
-        exe_a = self.getBuildArtifact("a.out")
-        exe_b = self.getBuildArtifact("b.out")
-        exe_c = self.getBuildArtifact("c.out")
-
-        self.runCmd("target list")
-        output = self.res.GetOutput()
-        if output.startswith("No targets"):
-            # We start from index 0.
-            base = 0
-        else:
-            # Find the largest index of the existing list.
-            import re
-            pattern = re.compile("target #(\d+):")
-            for line in reversed(output.split(os.linesep)):
-                match = pattern.search(line)
-                if match:
-                    # We will start from (index + 1) ....
-                    base = int(match.group(1), 10) + 1
-                    #print("base is:", base)
-                    break
-
-        self.runCmd("target create " + exe_a, CURRENT_EXECUTABLE_SET)
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.runCmd("target create " + exe_b, CURRENT_EXECUTABLE_SET)
-        lldbutil.run_break_set_by_file_and_line(
-            self, 'b.c', self.line_b, num_expected_locations=1, loc_exact=True)
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.runCmd("target create " + exe_c, CURRENT_EXECUTABLE_SET)
-        lldbutil.run_break_set_by_file_and_line(
-            self, 'c.c', self.line_c, num_expected_locations=1, loc_exact=True)
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.runCmd("target list")
-
-        self.runCmd("target select %d" % base)
-        self.runCmd("thread backtrace")
-
-        self.runCmd("target select %d" % (base + 2))
-        self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['c.c:%d' % self.line_c,
-                             'stop reason = breakpoint'])
-
-        self.runCmd("target select %d" % (base + 1))
-        self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['b.c:%d' % self.line_b,
-                             'stop reason = breakpoint'])
-
-        self.runCmd("target list")
-
-    def do_target_variable_command(self, exe_name):
-        """Exercise 'target variable' command before and after starting the inferior."""
-        self.runCmd("file " + self.getBuildArtifact(exe_name),
-                    CURRENT_EXECUTABLE_SET)
-
-        self.expect(
-            "target variable my_global_char",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                "my_global_char",
-                "'X'"])
-        self.expect(
-            "target variable my_global_str",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                'my_global_str',
-                '"abc"'])
-        self.expect(
-            "target variable my_static_int",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                'my_static_int',
-                '228'])
-        self.expect("target variable my_global_str_ptr", matching=False,
-                    substrs=['"abc"'])
-        self.expect("target variable *my_global_str_ptr", matching=True,
-                    substrs=['"abc"'])
-        self.expect(
-            "target variable *my_global_str",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=['a'])
-
-        self.runCmd("b main")
-        self.runCmd("run")
-
-        self.expect(
-            "target variable my_global_str",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                'my_global_str',
-                '"abc"'])
-        self.expect(
-            "target variable my_static_int",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                'my_static_int',
-                '228'])
-        self.expect("target variable my_global_str_ptr", matching=False,
-                    substrs=['"abc"'])
-        self.expect("target variable *my_global_str_ptr", matching=True,
-                    substrs=['"abc"'])
-        self.expect(
-            "target variable *my_global_str",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=['a'])
-        self.expect(
-            "target variable my_global_char",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                "my_global_char",
-                "'X'"])
-
-        self.runCmd("c")
-
-        # rdar://problem/9763907
-        # 'target variable' command fails if the target program has been run
-        self.expect(
-            "target variable my_global_str",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                'my_global_str',
-                '"abc"'])
-        self.expect(
-            "target variable my_static_int",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                'my_static_int',
-                '228'])
-        self.expect("target variable my_global_str_ptr", matching=False,
-                    substrs=['"abc"'])
-        self.expect("target variable *my_global_str_ptr", matching=True,
-                    substrs=['"abc"'])
-        self.expect(
-            "target variable *my_global_str",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=['a'])
-        self.expect(
-            "target variable my_global_char",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                "my_global_char",
-                "'X'"])
-
-    def do_target_variable_command_no_fail(self, exe_name):
-        """Exercise 'target variable' command before and after starting the inferior."""
-        self.runCmd("file " + self.getBuildArtifact(exe_name),
-                    CURRENT_EXECUTABLE_SET)
-
-        self.expect(
-            "target variable my_global_char",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                "my_global_char",
-                "'X'"])
-        self.expect(
-            "target variable my_global_str",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                'my_global_str',
-                '"abc"'])
-        self.expect(
-            "target variable my_static_int",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                'my_static_int',
-                '228'])
-        self.expect("target variable my_global_str_ptr", matching=False,
-                    substrs=['"abc"'])
-        self.expect("target variable *my_global_str_ptr", matching=True,
-                    substrs=['"abc"'])
-        self.expect(
-            "target variable *my_global_str",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=['a'])
-
-        self.runCmd("b main")
-        self.runCmd("run")
-
-        # New feature: you don't need to specify the variable(s) to 'target vaiable'.
-        # It will find all the global and static variables in the current
-        # compile unit.
-        self.expect("target variable",
-                    substrs=['my_global_char',
-                             'my_global_str',
-                             'my_global_str_ptr',
-                             'my_static_int'])
-
-        self.expect(
-            "target variable my_global_str",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                'my_global_str',
-                '"abc"'])
-        self.expect(
-            "target variable my_static_int",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                'my_static_int',
-                '228'])
-        self.expect("target variable my_global_str_ptr", matching=False,
-                    substrs=['"abc"'])
-        self.expect("target variable *my_global_str_ptr", matching=True,
-                    substrs=['"abc"'])
-        self.expect(
-            "target variable *my_global_str",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=['a'])
-        self.expect(
-            "target variable my_global_char",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                "my_global_char",
-                "'X'"])
-
-    @no_debug_info_test
-    def test_target_stop_hook_disable_enable(self):
-        self.buildB()
-        self.runCmd("file " + self.getBuildArtifact("b.out"), CURRENT_EXECUTABLE_SET)
-
-        self.expect("target stop-hook disable 1", error=True, substrs=['unknown stop hook id: "1"'])
-        self.expect("target stop-hook disable blub", error=True, substrs=['invalid stop hook id: "blub"'])
-        self.expect("target stop-hook enable 1", error=True, substrs=['unknown stop hook id: "1"'])
-        self.expect("target stop-hook enable blub", error=True, substrs=['invalid stop hook id: "blub"'])
-
-    @no_debug_info_test
-    def test_target_stop_hook_delete(self):
-        self.buildB()
-        self.runCmd("file " + self.getBuildArtifact("b.out"), CURRENT_EXECUTABLE_SET)
-
-        self.expect("target stop-hook delete 1", error=True, substrs=['unknown stop hook id: "1"'])
-        self.expect("target stop-hook delete blub", error=True, substrs=['invalid stop hook id: "blub"'])
-
-    @no_debug_info_test
-    def test_target_list_args(self):
-        self.expect("target list blub", error=True,
-                    substrs=["the 'target list' command takes no arguments"])
-
-    @no_debug_info_test
-    def test_target_select_no_index(self):
-        self.expect("target select", error=True,
-                    substrs=["'target select' takes a single argument: a target index"])
-
-    @no_debug_info_test
-    def test_target_select_invalid_index(self):
-        self.runCmd("target delete --all")
-        self.expect("target select 0", error=True,
-                    substrs=["index 0 is out of range since there are no active targets"])
-        self.buildB()
-        self.runCmd("file " + self.getBuildArtifact("b.out"), CURRENT_EXECUTABLE_SET)
-        self.expect("target select 1", error=True,
-                    substrs=["index 1 is out of range, valid target indexes are 0 - 0"])
-
-
-    @no_debug_info_test
-    def test_target_create_multiple_args(self):
-        self.expect("target create a b", error=True,
-                    substrs=["'target create' takes exactly one executable path"])
-
-    @no_debug_info_test
-    def test_target_create_nonexistent_core_file(self):
-        self.expect("target create -c doesntexist", error=True,
-                    substrs=["core file 'doesntexist' doesn't exist"])
-
-    # Write only files don't seem to be supported on Windows.
-    @skipIfWindows
-    @no_debug_info_test
-    def test_target_create_unreadable_core_file(self):
-        tf = tempfile.NamedTemporaryFile()
-        os.chmod(tf.name, stat.S_IWRITE)
-        self.expect("target create -c '" + tf.name + "'", error=True,
-                    substrs=["core file '", "' is not readable"])
-
-    @no_debug_info_test
-    def test_target_create_nonexistent_sym_file(self):
-        self.expect("target create -s doesntexist doesntexisteither", error=True,
-                    substrs=["invalid symbol file path 'doesntexist'"])
-
-    @skipIfWindows
-    @no_debug_info_test
-    def test_target_create_invalid_core_file(self):
-        invalid_core_path = os.path.join(self.getSourceDir(), "invalid_core_file")
-        self.expect("target create -c '" + invalid_core_path + "'", error=True,
-                    substrs=["Unable to find process plug-in for core file '"])
-
-
-    # Write only files don't seem to be supported on Windows.
-    @skipIfWindows
-    @no_debug_info_test
-    def test_target_create_unreadable_sym_file(self):
-        tf = tempfile.NamedTemporaryFile()
-        os.chmod(tf.name, stat.S_IWRITE)
-        self.expect("target create -s '" + tf.name + "' no_exe", error=True,
-                    substrs=["symbol file '", "' is not readable"])
-
-    @no_debug_info_test
-    def test_target_delete_all(self):
-        self.buildAll()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-        self.runCmd("file " + self.getBuildArtifact("b.out"), CURRENT_EXECUTABLE_SET)
-        self.expect("target delete --all")
-        self.expect("target list", substrs=["No targets."])
-
-    @no_debug_info_test
-    def test_target_delete_by_index(self):
-        self.buildAll()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-        self.runCmd("file " + self.getBuildArtifact("b.out"), CURRENT_EXECUTABLE_SET)
-        self.runCmd("file " + self.getBuildArtifact("c.out"), CURRENT_EXECUTABLE_SET)
-        self.expect("target delete 3", error=True,
-                    substrs=["target index 3 is out of range, valid target indexes are 0 - 2"])
-
-        self.runCmd("target delete 1")
-        self.expect("target list", matching=False, substrs=["b.out"])
-        self.runCmd("target delete 1")
-        self.expect("target list", matching=False, substrs=["c.out"])
-
-        self.expect("target delete 1", error=True,
-                    substrs=["target index 1 is out of range, the only valid index is 0"])
-
-        self.runCmd("target delete 0")
-        self.expect("target list", matching=False, substrs=["a.out"])
-
-        self.expect("target delete 0", error=True, substrs=["no targets to delete"])
-        self.expect("target delete 1", error=True, substrs=["no targets to delete"])
-
-    @no_debug_info_test
-    def test_target_delete_by_index_multiple(self):
-        self.buildAll()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-        self.runCmd("file " + self.getBuildArtifact("b.out"), CURRENT_EXECUTABLE_SET)
-        self.runCmd("file " + self.getBuildArtifact("c.out"), CURRENT_EXECUTABLE_SET)
-
-        self.expect("target delete 0 1 2 3", error=True,
-                    substrs=["target index 3 is out of range, valid target indexes are 0 - 2"])
-        self.expect("target list", substrs=["a.out", "b.out", "c.out"])
-
-        self.runCmd("target delete 0 1 2")
-        self.expect("target list", matching=False, substrs=["a.out", "c.out"])
-
-    @no_debug_info_test
-    def test_target_delete_selected(self):
-        self.buildAll()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-        self.runCmd("file " + self.getBuildArtifact("b.out"), CURRENT_EXECUTABLE_SET)
-        self.runCmd("file " + self.getBuildArtifact("c.out"), CURRENT_EXECUTABLE_SET)
-        self.runCmd("target select 1")
-        self.runCmd("target delete")
-        self.expect("target list", matching=False, substrs=["b.out"])
-        self.runCmd("target delete")
-        self.runCmd("target delete")
-        self.expect("target list", substrs=["No targets."])
-        self.expect("target delete", error=True, substrs=["no target is currently selected"])
-
-    @no_debug_info_test
-    def test_target_modules_search_paths_clear(self):
-        self.buildB()
-        self.runCmd("file " + self.getBuildArtifact("b.out"), CURRENT_EXECUTABLE_SET)
-        self.runCmd("target modules search-paths add foo bar")
-        self.runCmd("target modules search-paths add foz baz")
-        self.runCmd("target modules search-paths clear")
-        self.expect("target list", matching=False, substrs=["bar", "baz"])
-
-    @no_debug_info_test
-    def test_target_modules_search_paths_query(self):
-        self.buildB()
-        self.runCmd("file " + self.getBuildArtifact("b.out"), CURRENT_EXECUTABLE_SET)
-        self.runCmd("target modules search-paths add foo bar")
-        self.expect("target modules search-paths query foo", substrs=["bar"])
-        # Query something that doesn't exist.
-        self.expect("target modules search-paths query faz", substrs=["faz"])
-
-        # Invalid arguments.
-        self.expect("target modules search-paths query faz baz", error=True,
-                    substrs=["query requires one argument"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/basic/a.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/basic/a.c
deleted file mode 100644 (file)
index ec4824a..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-int main(int argc, const char* argv[])
-{
-    int *null_ptr = 0;
-    printf("Hello, segfault!\n");
-    printf("Now crash %d\n", *null_ptr); // Crash here.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/basic/b.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/basic/b.c
deleted file mode 100644 (file)
index bcc466c..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-int main (int argc, char const *argv[])
-{
-    return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/basic/c.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/basic/c.c
deleted file mode 100644 (file)
index a2cb599..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-int main (int argc, char const *argv[])
-{
-    enum days {
-        Monday = 10,
-        Tuesday,
-        Wednesday,
-        Thursday,
-        Friday,
-        Saturday,
-        Sunday,
-        kNumDays
-    };
-    enum days day;
-    for (day = Monday - 1; day <= kNumDays + 1; day++)
-    {
-        printf("day as int is %i\n", (int)day);
-    }
-    return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/basic/globals.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/basic/globals.c
deleted file mode 100644 (file)
index 421b34c..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-char my_global_char = 'X';
-const char* my_global_str = "abc";
-const char **my_global_str_ptr = &my_global_str;
-static int my_static_int = 228;
-
-int main (int argc, char const *argv[])
-{
-    printf("global char: %c\n", my_global_char);
-    
-    printf("global str: %s\n", my_global_str);
-
-    printf("argc + my_static_int = %d\n", (argc + my_static_int));
-    
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/basic/invalid_core_file b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/basic/invalid_core_file
deleted file mode 100644 (file)
index 39802f6..0000000
+++ /dev/null
@@ -1 +0,0 @@
-stub
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/create-deps/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/create-deps/Makefile
deleted file mode 100644 (file)
index 3e5b104..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-LD_EXTRAS := -L. -lload_a
-CXX_SOURCES := main.cpp
-
-a.out: libload_a
-
-include Makefile.rules
-
-libload_a:
-       $(MAKE) -f $(MAKEFILE_RULES) \
-               DYLIB_ONLY=YES DYLIB_NAME=load_a DYLIB_CXX_SOURCES=a.cpp
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/create-deps/TestTargetCreateDeps.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/create-deps/TestTargetCreateDeps.py
deleted file mode 100644 (file)
index 31be1cc..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-"""
-Test that loading of dependents works correctly for all the potential
-combinations.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-@skipIfWindows # Windows deals differently with shared libs.
-class TargetDependentsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        TestBase.setUp(self)
-        self.build()
-
-    def has_exactly_one_image(self, matching, msg=""):
-        self.expect(
-            "image list",
-            "image list should contain at least one image",
-            substrs=['[  0]'])
-        should_match = not matching
-        self.expect(
-            "image list", msg, matching=should_match, substrs=['[  1]'])
-
-
-    @expectedFailureAll(oslist=["linux"],
-        triple=no_match(".*-android"))
-        #linux does not support loading dependent files, but android does
-    @expectedFailureNetBSD
-    def test_dependents_implicit_default_exe(self):
-        """Test default behavior"""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("target create  " + exe, CURRENT_EXECUTABLE_SET)
-        self.has_exactly_one_image(False)
-
-    @expectedFailureAll(oslist=["linux"],
-        triple=no_match(".*-android"))
-        #linux does not support loading dependent files, but android does
-    @expectedFailureNetBSD
-    def test_dependents_explicit_default_exe(self):
-        """Test default behavior"""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("target create -ddefault " + exe, CURRENT_EXECUTABLE_SET)
-        self.has_exactly_one_image(False)
-
-    def test_dependents_explicit_true_exe(self):
-        """Test default behavior"""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("target create -dtrue " + exe, CURRENT_EXECUTABLE_SET)
-        self.has_exactly_one_image(True)
-
-    @expectedFailureAll(oslist=["linux"],
-        triple=no_match(".*-android"))
-        #linux does not support loading dependent files, but android does
-    @expectedFailureNetBSD
-    def test_dependents_explicit_false_exe(self):
-        """Test default behavior"""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("target create -dfalse " + exe, CURRENT_EXECUTABLE_SET)
-        self.has_exactly_one_image(False)
-
-    def test_dependents_implicit_false_exe(self):
-        """Test default behavior"""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("target create  -d " + exe, CURRENT_EXECUTABLE_SET)
-        self.has_exactly_one_image(True)
-
-    @expectedFailureAndroid # android will return mutiple images
-    def test_dependents_implicit_default_lib(self):
-        ctx = self.platformContext
-        dylibName = ctx.shlib_prefix + 'load_a.' + ctx.shlib_extension
-        lib = self.getBuildArtifact(dylibName)
-        self.runCmd("target create " + lib, CURRENT_EXECUTABLE_SET)
-        self.has_exactly_one_image(True)
-
-    def test_dependents_explicit_default_lib(self):
-        ctx = self.platformContext
-        dylibName = ctx.shlib_prefix + 'load_a.' + ctx.shlib_extension
-        lib = self.getBuildArtifact(dylibName)
-        self.runCmd("target create -ddefault " + lib, CURRENT_EXECUTABLE_SET)
-        self.has_exactly_one_image(True)
-
-    def test_dependents_explicit_true_lib(self):
-        ctx = self.platformContext
-        dylibName = ctx.shlib_prefix + 'load_a.' + ctx.shlib_extension
-        lib = self.getBuildArtifact(dylibName)
-        self.runCmd("target create -dtrue " + lib, CURRENT_EXECUTABLE_SET)
-        self.has_exactly_one_image(True)
-
-    @expectedFailureAll(oslist=["linux"],
-        triple=no_match(".*-android"))
-        #linux does not support loading dependent files, but android does
-    @expectedFailureNetBSD
-    def test_dependents_explicit_false_lib(self):
-        ctx = self.platformContext
-        dylibName = ctx.shlib_prefix + 'load_a.' + ctx.shlib_extension
-        lib = self.getBuildArtifact(dylibName)
-        self.runCmd("target create -dfalse " + lib, CURRENT_EXECUTABLE_SET)
-        self.has_exactly_one_image(False)
-
-    def test_dependents_implicit_false_lib(self):
-        ctx = self.platformContext
-        dylibName = ctx.shlib_prefix + 'load_a.' + ctx.shlib_extension
-        lib = self.getBuildArtifact(dylibName)
-        self.runCmd("target create -d " + lib, CURRENT_EXECUTABLE_SET)
-        self.has_exactly_one_image(True)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/create-deps/a.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/create-deps/a.cpp
deleted file mode 100644 (file)
index e80612b..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-//===-- b.c -----------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-int a_function ()
-{
-    return 500;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/create-deps/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/create-deps/main.cpp
deleted file mode 100644 (file)
index 7ee1981..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-extern int a_function ();
-extern int b_function ();
-
-int
-main (int argc, char const *argv[])
-{
-    return a_function();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/create-no-such-arch/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/create-no-such-arch/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/create-no-such-arch/TestNoSuchArch.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/create-no-such-arch/TestNoSuchArch.py
deleted file mode 100644 (file)
index 622a813..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-"""
-Test that using a non-existent architecture name does not crash LLDB.
-"""
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class NoSuchArchTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Check that passing an invalid arch via the command-line fails but
-        # doesn't crash
-        self.expect(
-            "target create --arch nothingtoseehere %s" %
-            (exe), error=True, substrs=["error: invalid triple 'nothingtoseehere'"])
-
-        # Check that passing an invalid arch via the SB API fails but doesn't
-        # crash
-        target = self.dbg.CreateTargetWithFileAndArch(exe, "nothingtoseehere")
-        self.assertFalse(target.IsValid(), "This target should not be valid")
-
-        # Now just create the target with the default arch and check it's fine
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target.IsValid(), "This target should now be valid")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/create-no-such-arch/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/create-no-such-arch/main.cpp
deleted file mode 100644 (file)
index 4cce7f6..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-int main() {
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/dump-symtab-demangle/TestDumpSymtabDemangle.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/dump-symtab-demangle/TestDumpSymtabDemangle.py
deleted file mode 100644 (file)
index 9f95a11..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-"""
-Test 'target modules dump symtab -m' doesn't demangle symbols.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    def test(self):
-        src_dir = self.getSourceDir()
-        yaml_path = os.path.join(src_dir, "a.yaml")
-        yaml_base, ext = os.path.splitext(yaml_path)
-        obj_path = self.getBuildArtifact("main.o")
-        self.yaml2obj(yaml_path, obj_path)
-
-        # Create a target with the object file we just created from YAML
-        target = self.dbg.CreateTarget(obj_path)
-        self.assertTrue(target, VALID_TARGET)
-
-        # First test that we demangle by default and our mangled symbol isn't in the output.
-        self.expect("target modules dump symtab", substrs=["foo::bar(int)"])
-        self.expect("target modules dump symtab", matching=False, substrs=["_ZN3foo3barEi"])
-
-        # Turn off demangling and make sure that we now see the mangled name in the output.
-        self.expect("target modules dump symtab -m", substrs=["_ZN3foo3barEi"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/dump-symtab-demangle/a.yaml b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/dump-symtab-demangle/a.yaml
deleted file mode 100644 (file)
index ed591d7..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
---- !ELF
-FileHeader:
-  Class:           ELFCLASS64
-  Data:            ELFDATA2LSB
-  Type:            ET_REL
-  Machine:         EM_X86_64
-Sections:
-  - Name:            .text
-    Type:            SHT_PROGBITS
-    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
-    AddressAlign:    0x0000000000000010
-    Content:         554889E5897DFC5DC3
-Symbols:
-  - Name:            _ZN3foo3barEi
-    Type:            STT_FUNC
-    Section:         .text
-    Size:            0x0000000000000009
-...
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/stop-hooks/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/stop-hooks/Makefile
deleted file mode 100644 (file)
index 695335e..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-C_SOURCES := main.c
-CFLAGS_EXTRAS := -std=c99
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/stop-hooks/TestStopHooks.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/stop-hooks/TestStopHooks.py
deleted file mode 100644 (file)
index 64686af..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-"""
-Test that stop hooks trigger on "step-out"
-"""
-
-
-
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbtest import *
-
-
-class TestStopHooks(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # If your test case doesn't stress debug info, the
-    # set this to true.  That way it won't be run once for
-    # each debug info format.
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_stop_hooks_step_out(self):
-        """Test that stop hooks fire on step-out."""
-        self.build()
-        self.main_source_file = lldb.SBFileSpec("main.c")
-        self.step_out_test()
-
-    def step_out_test(self):
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                   "Set a breakpoint here", self.main_source_file)
-
-        interp = self.dbg.GetCommandInterpreter()
-        result = lldb.SBCommandReturnObject()
-        interp.HandleCommand("target stop-hook add -o 'expr g_var++'", result)
-        self.assertTrue(result.Succeeded, "Set the target stop hook")
-        thread.StepOut()
-        var = target.FindFirstGlobalVariable("g_var")
-        self.assertTrue(var.IsValid())
-        self.assertEqual(var.GetValueAsUnsigned(), 1, "Updated g_var")
-
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/stop-hooks/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/target/stop-hooks/main.c
deleted file mode 100644 (file)
index d08ad14..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#include <stdio.h>
-
-static int g_var = 0;
-
-int step_out_of_me()
-{
-  return g_var; // Set a breakpoint here and step out.
-}
-
-int
-main()
-{
-  return step_out_of_me();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/version/TestVersion.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/version/TestVersion.py
deleted file mode 100644 (file)
index 48b46f6..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-
-class VersionTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    def test_version(self):
-        # Should work even when people patch the output,
-        # so let's just assume that every vendor at least mentions
-        # 'lldb' in their version string.
-        self.expect("version", substrs=['lldb'])
-
-    @no_debug_info_test
-    def test_version_invalid_invocation(self):
-        self.expect("version a", error=True,
-                    substrs=['the version command takes no arguments.'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/.categories b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/.categories
deleted file mode 100644 (file)
index 50c1613..0000000
+++ /dev/null
@@ -1 +0,0 @@
-watchpoint
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchlocation/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchlocation/Makefile
deleted file mode 100644 (file)
index de4ec12..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-ENABLE_THREADS := YES
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchlocation/TestWatchLocation.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchlocation/TestWatchLocation.py
deleted file mode 100644 (file)
index 55bf929..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-"""
-Test lldb watchpoint that uses '-s size' to watch a pointed location with size.
-"""
-
-
-
-import re
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class HelloWatchLocationTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Our simple source filename.
-        self.source = 'main.cpp'
-        # Find the line number to break inside main().
-        self.line = line_number(
-            self.source, '// Set break point at this line.')
-        # This is for verifying that watch location works.
-        self.violating_func = "do_bad_thing_with_location"
-        # Build dictionary to have unique executable names for each test
-        # method.
-        self.exe_name = self.testMethodName
-        self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}
-
-    # Most of the MIPS boards provide only one H/W watchpoints, and S/W
-    # watchpoints are not supported yet
-    @expectedFailureAll(triple=re.compile('^mips'))
-    # SystemZ and PowerPC also currently supports only one H/W watchpoint
-    @expectedFailureAll(archs=['powerpc64le', 's390x'])
-    @skipIfDarwin
-    def test_hello_watchlocation(self):
-        """Test watching a location with '-s size' option."""
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(dictionary=self.d)
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line(
-            self, None, self.line, num_expected_locations=1, loc_exact=False)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # We should be stopped again due to the breakpoint.
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Now let's set a write-type watchpoint pointed to by 'g_char_ptr'.
-        self.expect(
-            "watchpoint set expression -w write -s 1 -- g_char_ptr",
-            WATCHPOINT_CREATED,
-            substrs=[
-                'Watchpoint created',
-                'size = 1',
-                'type = w'])
-        # Get a hold of the watchpoint id just created, it is used later on to
-        # match the watchpoint id which is expected to be fired.
-        match = re.match(
-            "Watchpoint created: Watchpoint (.*):",
-            self.res.GetOutput().splitlines()[0])
-        if match:
-            expected_wp_id = int(match.group(1), 0)
-        else:
-            self.fail("Grokking watchpoint id faailed!")
-
-        self.runCmd("expr unsigned val = *g_char_ptr; val")
-        self.expect(self.res.GetOutput().splitlines()[0], exe=False,
-                    endstr=' = 0')
-
-        self.runCmd("watchpoint set expression -w write -s 4 -- &threads[0]")
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 0 initially.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 0'])
-
-        self.runCmd("process continue")
-
-        # We should be stopped again due to the watchpoint (write type), but
-        # only once.  The stop reason of the thread should be watchpoint.
-        self.expect("thread list", STOPPED_DUE_TO_WATCHPOINT,
-                    substrs=['stopped',
-                             'stop reason = watchpoint %d' % expected_wp_id])
-
-        # Switch to the thread stopped due to watchpoint and issue some
-        # commands.
-        self.switch_to_thread_with_stop_reason(lldb.eStopReasonWatchpoint)
-        self.runCmd("thread backtrace")
-        self.expect("frame info",
-                    substrs=[self.violating_func])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should now be 1.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 1'])
-
-        self.runCmd("thread backtrace all")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchlocation/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchlocation/main.cpp
deleted file mode 100644 (file)
index ac8cf6b..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <chrono>
-#include <condition_variable>
-#include <cstdio>
-#include <random>
-#include <thread>
-
-std::default_random_engine g_random_engine{std::random_device{}()};
-std::uniform_int_distribution<> g_distribution{0, 3000000};
-std::condition_variable g_condition_variable;
-std::mutex g_mutex;
-int g_count;
-
-char *g_char_ptr = nullptr;
-
-void
-barrier_wait()
-{
-    std::unique_lock<std::mutex> lock{g_mutex};
-    if (--g_count > 0)
-        g_condition_variable.wait(lock);
-    else
-        g_condition_variable.notify_all();
-}
-
-void
-do_bad_thing_with_location(char *char_ptr, char new_val)
-{
-    unsigned what = new_val;
-    printf("new value written to location(%p) = %u\n", char_ptr, what);
-    *char_ptr = new_val;
-}
-
-uint32_t
-access_pool (bool flag = false)
-{
-    static std::mutex g_access_mutex;
-    g_access_mutex.lock();
-
-    char old_val = *g_char_ptr;
-    if (flag)
-        do_bad_thing_with_location(g_char_ptr, old_val + 1);
-
-    g_access_mutex.unlock();
-    return *g_char_ptr;
-}
-
-void
-thread_func (uint32_t thread_index)
-{
-    printf ("%s (thread index = %u) startng...\n", __FUNCTION__, thread_index);
-
-    barrier_wait();
-
-    uint32_t count = 0;
-    uint32_t val;
-    while (count++ < 15)
-    {
-        // random micro second sleep from zero to 3 seconds
-        int usec = g_distribution(g_random_engine);
-        printf ("%s (thread = %u) doing a usleep (%d)...\n", __FUNCTION__, thread_index, usec);
-        std::this_thread::sleep_for(std::chrono::microseconds{usec});
-
-        if (count < 7)
-            val = access_pool ();
-        else
-            val = access_pool (true);
-
-        printf ("%s (thread = %u) after usleep access_pool returns %d (count=%d)...\n", __FUNCTION__, thread_index, val, count);
-    }
-    printf ("%s (thread index = %u) exiting...\n", __FUNCTION__, thread_index);
-}
-
-
-int main (int argc, char const *argv[])
-{
-    g_count = 4;
-    std::thread threads[3];
-
-    g_char_ptr = new char{};
-
-    // Create 3 threads
-    for (auto &thread : threads)
-        thread = std::thread{thread_func, std::distance(threads, &thread)};
-
-    printf ("Before turning all three threads loose...\n"); // Set break point at this line.
-    barrier_wait();
-
-    // Join all of our threads
-    for (auto &thread : threads)
-        thread.join();
-
-    delete g_char_ptr;
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchpoint/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchpoint/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchpoint/TestMyFirstWatchpoint.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchpoint/TestMyFirstWatchpoint.py
deleted file mode 100644 (file)
index d51565b..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-"""
-Test my first lldb watchpoint.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class HelloWatchpointTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Our simple source filename.
-        self.source = 'main.c'
-        # Find the line number to break inside main().
-        self.line = line_number(
-            self.source, '// Set break point at this line.')
-        # And the watchpoint variable declaration line number.
-        self.decl = line_number(self.source,
-                                '// Watchpoint variable declaration.')
-        self.exe_name = self.getBuildArtifact('a.out')
-        self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
-
-    @add_test_categories(["basic_process"])
-    def test_hello_watchpoint_using_watchpoint_set(self):
-        """Test a simple sequence of watchpoint creation and watchpoint hit."""
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(dictionary=self.d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line(
-            self, None, self.line, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # We should be stopped again due to the breakpoint.
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Now let's set a write-type watchpoint for 'global'.
-        # There should be only one watchpoint hit (see main.c).
-        self.expect(
-            "watchpoint set variable -w write global",
-            WATCHPOINT_CREATED,
-            substrs=[
-                'Watchpoint created',
-                'size = 4',
-                'type = w',
-                '%s:%d' %
-                (self.source,
-                 self.decl)])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 0 initially.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 0'])
-
-        self.runCmd("process continue")
-
-        # We should be stopped again due to the watchpoint (write type), but
-        # only once.  The stop reason of the thread should be watchpoint.
-        self.expect("thread list", STOPPED_DUE_TO_WATCHPOINT,
-                    substrs=['stopped',
-                             'stop reason = watchpoint'])
-
-        self.runCmd("process continue")
-
-        # Don't expect the read of 'global' to trigger a stop exception.
-        process = self.dbg.GetSelectedTarget().GetProcess()
-        if process.GetState() == lldb.eStateStopped:
-            self.assertFalse(
-                lldbutil.get_stopped_thread(
-                    process, lldb.eStopReasonWatchpoint))
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should now be 1.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 1'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchpoint/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchpoint/main.c
deleted file mode 100644 (file)
index 173162d..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-#include <stdint.h>
-
-int32_t global = 10; // Watchpoint variable declaration.
-char gchar1 = 'a';
-char gchar2 = 'b';
-
-int main(int argc, char** argv) {
-    int local = 0;
-    printf("&global=%p\n", &global);
-    printf("about to write to 'global'...\n"); // Set break point at this line.
-                                               // When stopped, watch 'global' for write.
-    global = 20;
-    gchar1 += 1;
-    gchar2 += 1;
-    local += argc;
-    ++local;
-    printf("local: %d\n", local);
-    printf("global=%d\n", global);
-    printf("gchar1='%c'\n", gchar1);
-    printf("gchar2='%c'\n", gchar2);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multi_watchpoint_slots/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multi_watchpoint_slots/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multi_watchpoint_slots/TestWatchpointMultipleSlots.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multi_watchpoint_slots/TestWatchpointMultipleSlots.py
deleted file mode 100644 (file)
index 843a2ac..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-"""
-Test watchpoint slots we should not be able to install multiple watchpoints
-within same word boundary. We should be able to install individual watchpoints
-on any of the bytes, half-word, or word. This is only for ARM/AArch64 targets.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class WatchpointSlotsTestCase(TestBase):
-    NO_DEBUG_INFO_TESTCASE = True
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-        # Source filename.
-        self.source = 'main.c'
-
-        # Output filename.
-        self.exe_name = self.getBuildArtifact("a.out")
-        self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
-
-    # This is a arm and aarch64 specific test case. No other architectures tested.
-    @skipIf(archs=no_match(['arm', 'aarch64']))
-    def test_multiple_watchpoints_on_same_word(self):
-
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(dictionary=self.d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Detect line number after which we are going to increment arrayName.
-        loc_line = line_number('main.c', '// About to write byteArray')
-
-        # Set a breakpoint on the line detected above.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", loc_line, num_expected_locations=1, loc_exact=True)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                     substrs=['stopped', 'stop reason = breakpoint'])
-
-        # Delete breakpoint we just hit.
-        self.expect("breakpoint delete 1", substrs=['1 breakpoints deleted'])
-
-        # Set a watchpoint at byteArray[0]
-        self.expect("watchpoint set variable byteArray[0]", WATCHPOINT_CREATED,
-                    substrs=['Watchpoint created','size = 1'])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 0 initially.
-        self.expect("watchpoint list -v 1", substrs=['hit_count = 0'])
-
-        # debugserver on ios doesn't give an error, it creates another watchpoint,
-        # only expect errors on non-darwin platforms.
-        if not self.platformIsDarwin():
-            # Try setting a watchpoint at byteArray[1]
-            self.expect("watchpoint set variable byteArray[1]", error=True,
-                        substrs=['Watchpoint creation failed'])
-
-        self.runCmd("process continue")
-
-        # We should be stopped due to the watchpoint.
-        # The stop reason of the thread should be watchpoint.
-        self.expect("thread list", STOPPED_DUE_TO_WATCHPOINT,
-                    substrs=['stopped', 'stop reason = watchpoint 1'])
-
-        # Delete the watchpoint we hit above successfully.
-        self.expect("watchpoint delete 1", substrs=['1 watchpoints deleted'])
-
-        # Set a watchpoint at byteArray[3]
-        self.expect("watchpoint set variable byteArray[3]", WATCHPOINT_CREATED,
-                    substrs=['Watchpoint created','size = 1'])
-
-        # Resume inferior.
-        self.runCmd("process continue")
-
-        # We should be stopped due to the watchpoint.
-        # The stop reason of the thread should be watchpoint.
-        if self.platformIsDarwin():
-            # On darwin we'll hit byteArray[3] which is watchpoint 2
-            self.expect("thread list -v", STOPPED_DUE_TO_WATCHPOINT,
-                        substrs=['stopped', 'stop reason = watchpoint 2'])
-        else:
-            self.expect("thread list -v", STOPPED_DUE_TO_WATCHPOINT,
-                        substrs=['stopped', 'stop reason = watchpoint 3'])
-
-        # Resume inferior.
-        self.runCmd("process continue")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multi_watchpoint_slots/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multi_watchpoint_slots/main.c
deleted file mode 100644 (file)
index 76ad27a..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-#include <stdint.h>
-
-uint64_t pad0 = 0;
-uint8_t byteArray[4] = {0};
-uint64_t pad1 = 0;
-
-int main(int argc, char** argv) {
-
-    int i;
-
-    for (i = 0; i < 4; i++)
-    {
-        printf("About to write byteArray[%d] ...\n", i); // About to write byteArray
-        pad0++;
-        byteArray[i] = 7;
-        pad1++;
-    }
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_hits/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_hits/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_hits/TestMultipleHits.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_hits/TestMultipleHits.py
deleted file mode 100644 (file)
index 2186dd0..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-"""
-Test handling of cases when a single instruction triggers multiple watchpoints
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class MultipleHitsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @skipIf(bugnumber="llvm.org/pr30758", oslist=["linux"], archs=["arm", "aarch64", "powerpc64le"])
-    @skipIfwatchOS
-    def test(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target and target.IsValid(), VALID_TARGET)
-
-        bp = target.BreakpointCreateByName("main")
-        self.assertTrue(bp and bp.IsValid(), "Breakpoint is valid")
-
-        process = target.LaunchSimple(None, None,
-                self.get_process_working_directory())
-        self.assertEqual(process.GetState(), lldb.eStateStopped)
-
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
-        self.assertIsNotNone(thread)
-
-        frame = thread.GetFrameAtIndex(0)
-        self.assertTrue(frame and frame.IsValid(), "Frame is valid")
-
-        buf = frame.FindValue("buf", lldb.eValueTypeVariableGlobal)
-        self.assertTrue(buf and buf.IsValid(), "buf is valid")
-
-        for i in [0, target.GetAddressByteSize()]:
-            member = buf.GetChildAtIndex(i)
-            self.assertTrue(member and member.IsValid(), "member is valid")
-
-            error = lldb.SBError()
-            watch = member.Watch(True, True, True, error)
-            self.assertTrue(error.Success())
-
-        process.Continue();
-        self.assertEqual(process.GetState(), lldb.eStateStopped)
-        self.assertEqual(thread.GetStopReason(), lldb.eStopReasonWatchpoint)
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_hits/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_hits/main.cpp
deleted file mode 100644 (file)
index f99c125..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-#include <stdint.h>
-alignas(16) uint8_t buf[32];
-// This uses inline assembly to generate an instruction that writes to a large
-// block of memory. If it fails on your compiler/architecture, please add
-// appropriate code to generate a large write to "buf". If you cannot write at
-// least 2*sizeof(void*) bytes with a single instruction, you will have to skip
-// this test.
-
-int main() {
-#if defined(__i386__) || defined(__x86_64__)
-  asm volatile ("movdqa %%xmm0, %0" : : "m"(buf));
-#elif defined(__arm__)
-  asm volatile ("stm %0, { r0, r1, r2, r3 }" : : "r"(buf));
-#elif defined(__aarch64__)
-  asm volatile ("stp x0, x1, %0" : : "m"(buf));
-#elif defined(__mips__)
-  asm volatile ("lw $2, %0" : : "m"(buf));
-#endif
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_threads/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_threads/Makefile
deleted file mode 100644 (file)
index de4ec12..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-ENABLE_THREADS := YES
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_threads/TestWatchpointMultipleThreads.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_threads/TestWatchpointMultipleThreads.py
deleted file mode 100644 (file)
index 3e6329e..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-"""
-Test that lldb watchpoint works for multiple threads.
-"""
-
-from __future__ import print_function
-
-
-import re
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class WatchpointForMultipleThreadsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-    main_spec = lldb.SBFileSpec("main.cpp", False)
-
-    def test_watchpoint_before_thread_start(self):
-        """Test that we can hit a watchpoint we set before starting another thread"""
-        self.do_watchpoint_test("Before running the thread")
-
-    def test_watchpoint_after_thread_start(self):
-        """Test that we can hit a watchpoint we set after starting another thread"""
-        self.do_watchpoint_test("After running the thread")
-
-    def do_watchpoint_test(self, line):
-        self.build()
-        lldbutil.run_to_source_breakpoint(self, line, self.main_spec)
-
-        # Now let's set a write-type watchpoint for variable 'g_val'.
-        self.expect(
-            "watchpoint set variable -w write g_val",
-            WATCHPOINT_CREATED,
-            substrs=[
-                'Watchpoint created',
-                'size = 4',
-                'type = w'])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 0 initially.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 0'])
-
-        self.runCmd("process continue")
-
-        self.runCmd("thread list")
-        if "stop reason = watchpoint" in self.res.GetOutput():
-            # Good, we verified that the watchpoint works!
-            self.runCmd("thread backtrace all")
-        else:
-            self.fail("The stop reason should be either break or watchpoint")
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should now be 1.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 1'])
-
-    def test_watchpoint_multiple_threads_wp_set_and_then_delete(self):
-        """Test that lldb watchpoint works for multiple threads, and after the watchpoint is deleted, the watchpoint event should no longer fires."""
-        self.build()
-        self.setTearDownCleanup()
-
-        lldbutil.run_to_source_breakpoint(self, "After running the thread", self.main_spec)
-
-        # Now let's set a write-type watchpoint for variable 'g_val'.
-        self.expect(
-            "watchpoint set variable -w write g_val",
-            WATCHPOINT_CREATED,
-            substrs=[
-                'Watchpoint created',
-                'size = 4',
-                'type = w'])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 0 initially.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 0'])
-
-        watchpoint_stops = 0
-        while True:
-            self.runCmd("process continue")
-            self.runCmd("process status")
-            if re.search("Process .* exited", self.res.GetOutput()):
-                # Great, we are done with this test!
-                break
-
-            self.runCmd("thread list")
-            if "stop reason = watchpoint" in self.res.GetOutput():
-                self.runCmd("thread backtrace all")
-                watchpoint_stops += 1
-                if watchpoint_stops > 1:
-                    self.fail(
-                        "Watchpoint hits not supposed to exceed 1 by design!")
-                # Good, we verified that the watchpoint works!  Now delete the
-                # watchpoint.
-                if self.TraceOn():
-                    print(
-                        "watchpoint_stops=%d at the moment we delete the watchpoint" %
-                        watchpoint_stops)
-                self.runCmd("watchpoint delete 1")
-                self.expect("watchpoint list -v",
-                            substrs=['No watchpoints currently set.'])
-                continue
-            else:
-                self.fail("The stop reason should be either break or watchpoint")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_threads/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_threads/main.cpp
deleted file mode 100644 (file)
index 1e6266d..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "pseudo_barrier.h"
-#include <cstdio>
-#include <thread>
-
-volatile uint32_t g_val = 0;
-pseudo_barrier_t g_barrier;
-
-void thread_func() {
-  pseudo_barrier_wait(g_barrier);
-  printf("%s starting...\n", __FUNCTION__);
-  for (uint32_t i = 0; i < 10; ++i)
-    g_val = i;
-}
-
-int main(int argc, char const *argv[]) {
-  printf("Before running the thread\n");
-  pseudo_barrier_init(g_barrier, 2);
-  std::thread thread(thread_func);
-
-  printf("After running the thread\n");
-  pseudo_barrier_wait(g_barrier);
-
-  thread.join();
-
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/step_over_watchpoint/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/step_over_watchpoint/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/step_over_watchpoint/TestStepOverWatchpoint.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/step_over_watchpoint/TestStepOverWatchpoint.py
deleted file mode 100644 (file)
index 2b8bbbc..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-"""Test stepping over watchpoints."""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestStepOverWatchpoint(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @expectedFailureAll(
-        oslist=["linux"],
-        archs=[
-            'aarch64',
-            'arm'],
-        bugnumber="llvm.org/pr26031")
-    # Read-write watchpoints not supported on SystemZ
-    @expectedFailureAll(archs=['s390x'])
-    @expectedFailureAll(oslist=["ios", "watchos", "tvos", "bridgeos"], bugnumber="<rdar://problem/34027183>")  # watchpoint tests aren't working on arm64
-    @add_test_categories(["basic_process"])
-    def test(self):
-        """Test stepping over watchpoints."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(self.target, VALID_TARGET)
-
-        lldbutil.run_break_set_by_symbol(self, 'main')
-
-        process = target.LaunchSimple(None, None,
-                                      self.get_process_working_directory())
-        self.assertTrue(process.IsValid(), PROCESS_IS_VALID)
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        PROCESS_STOPPED)
-
-        thread = lldbutil.get_stopped_thread(process,
-                                             lldb.eStopReasonBreakpoint)
-        self.assertTrue(thread.IsValid(), "Failed to get thread.")
-
-        frame = thread.GetFrameAtIndex(0)
-        self.assertTrue(frame.IsValid(), "Failed to get frame.")
-
-        read_value = frame.FindValue('g_watch_me_read',
-                                     lldb.eValueTypeVariableGlobal)
-        self.assertTrue(read_value.IsValid(), "Failed to find read value.")
-
-        error = lldb.SBError()
-
-        # resolve_location=True, read=True, write=False
-        read_watchpoint = read_value.Watch(True, True, False, error)
-        self.assertTrue(error.Success(),
-                        "Error while setting watchpoint: %s" %
-                        error.GetCString())
-        self.assertTrue(read_watchpoint, "Failed to set read watchpoint.")
-
-        thread.StepOver()
-        self.assertTrue(thread.GetStopReason() == lldb.eStopReasonWatchpoint,
-                        STOPPED_DUE_TO_WATCHPOINT)
-        self.assertTrue(thread.GetStopDescription(20) == 'watchpoint 1')
-
-        process.Continue()
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        PROCESS_STOPPED)
-        self.assertTrue(thread.GetStopDescription(20) == 'step over')
-
-        self.step_inst_for_watchpoint(1)
-
-        write_value = frame.FindValue('g_watch_me_write',
-                                      lldb.eValueTypeVariableGlobal)
-        self.assertTrue(write_value, "Failed to find write value.")
-
-        # Most of the MIPS boards provide only one H/W watchpoints, and S/W
-        # watchpoints are not supported yet
-        arch = self.getArchitecture()
-        if re.match("^mips", arch) or re.match("powerpc64le", arch):
-            self.runCmd("watchpoint delete 1")
-
-        # resolve_location=True, read=False, write=True
-        write_watchpoint = write_value.Watch(True, False, True, error)
-        self.assertTrue(write_watchpoint, "Failed to set write watchpoint.")
-        self.assertTrue(error.Success(),
-                        "Error while setting watchpoint: %s" %
-                        error.GetCString())
-
-        thread.StepOver()
-        self.assertTrue(thread.GetStopReason() == lldb.eStopReasonWatchpoint,
-                        STOPPED_DUE_TO_WATCHPOINT)
-        self.assertTrue(thread.GetStopDescription(20) == 'watchpoint 2')
-
-        process.Continue()
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        PROCESS_STOPPED)
-        self.assertTrue(thread.GetStopDescription(20) == 'step over')
-
-        self.step_inst_for_watchpoint(2)
-
-    def step_inst_for_watchpoint(self, wp_id):
-        watchpoint_hit = False
-        current_line = self.frame().GetLineEntry().GetLine()
-        while self.frame().GetLineEntry().GetLine() == current_line:
-            self.thread().StepInstruction(False)  # step_over=False
-            stop_reason = self.thread().GetStopReason()
-            if stop_reason == lldb.eStopReasonWatchpoint:
-                self.assertFalse(watchpoint_hit, "Watchpoint already hit.")
-                expected_stop_desc = "watchpoint %d" % wp_id
-                actual_stop_desc = self.thread().GetStopDescription(20)
-                self.assertTrue(actual_stop_desc == expected_stop_desc,
-                                "Watchpoint ID didn't match.")
-                watchpoint_hit = True
-            else:
-                self.assertTrue(stop_reason == lldb.eStopReasonPlanComplete,
-                                STOPPED_DUE_TO_STEP_IN)
-        self.assertTrue(watchpoint_hit, "Watchpoint never hit.")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/step_over_watchpoint/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/step_over_watchpoint/main.c
deleted file mode 100644 (file)
index 2d87d9a..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-char g_watch_me_read;
-char g_watch_me_write;
-char g_temp;
-
-void watch_read() {
-    g_temp = g_watch_me_read;
-}
-
-void watch_write() {
-    g_watch_me_write = g_temp;
-}
-
-int main() {
-    watch_read();
-    g_temp = g_watch_me_read;
-    watch_write();
-    g_watch_me_write = g_temp;
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/variable_out_of_scope/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/variable_out_of_scope/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/variable_out_of_scope/TestWatchedVarHitWhenInScope.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/variable_out_of_scope/TestWatchedVarHitWhenInScope.py
deleted file mode 100644 (file)
index eee8913..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-"""
-Test that a variable watchpoint should only hit when in scope.
-"""
-
-
-
-import unittest2
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.decorators import *
-
-
-class WatchedVariableHitWhenInScopeTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    # This test depends on not tracking watchpoint expression hits if we have
-    # left the watchpoint scope.  We will provide such an ability at some point
-    # but the way this was done was incorrect, and it is unclear that for the
-    # most part that's not what folks mostly want, so we have to provide a
-    # clearer API to express this.
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Our simple source filename.
-        self.source = 'main.c'
-        self.exe_name = self.testMethodName
-        self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
-
-    # Test hangs due to a kernel bug, see fdfeff0f in the linux kernel for details
-    @skipIfTargetAndroid(api_levels=list(range(25+1)), archs=["aarch64", "arm"])
-    @skipIf
-    def test_watched_var_should_only_hit_when_in_scope(self):
-        """Test that a variable watchpoint should only hit when in scope."""
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(dictionary=self.d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Add a breakpoint to set a watchpoint when stopped in main.
-        lldbutil.run_break_set_by_symbol(
-            self, "main", num_expected_locations=-1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # We should be stopped again due to the breakpoint.
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Now let's set a watchpoint for 'c.a'.
-        # There should be only one watchpoint hit (see main.c).
-        self.expect("watchpoint set variable c.a", WATCHPOINT_CREATED,
-                    substrs=['Watchpoint created', 'size = 4', 'type = w'])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 0 initially.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 0'])
-
-        self.runCmd("process continue")
-
-        # We should be stopped again due to the watchpoint (write type), but
-        # only once.  The stop reason of the thread should be watchpoint.
-        self.expect("thread list", STOPPED_DUE_TO_WATCHPOINT,
-                    substrs=['stopped',
-                             'stop reason = watchpoint'])
-
-        self.runCmd("process continue")
-        # Don't expect the read of 'global' to trigger a stop exception.
-        # The process status should be 'exited'.
-        self.expect("process status",
-                    substrs=['exited'])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should now be 1.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 1'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/variable_out_of_scope/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/variable_out_of_scope/main.c
deleted file mode 100644 (file)
index 1bf7a00..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-typedef struct
-{
-    int a;
-    float b;
-} mystruct;
-
-int main()
-{
-    mystruct c;
-    
-    c.a = 5;
-    c.b = 3.6;
-    
-    return 0;
-}
\ No newline at end of file
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/TestWatchpointCommands.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/TestWatchpointCommands.py
deleted file mode 100644 (file)
index 50f7881..0000000
+++ /dev/null
@@ -1,365 +0,0 @@
-"""
-Test watchpoint list, enable, disable, and delete commands.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class WatchpointCommandsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Our simple source filename.
-        self.source = 'main.c'
-        # Find the line number to break inside main().
-        self.line = line_number(
-            self.source, '// Set break point at this line.')
-        self.line2 = line_number(
-            self.source,
-            '// Set 2nd break point for disable_then_enable test case.')
-        # And the watchpoint variable declaration line number.
-        self.decl = line_number(self.source,
-                                '// Watchpoint variable declaration.')
-        # Build dictionary to have unique executable names for each test
-        # method.
-        self.exe_name = self.testMethodName
-        self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
-
-    # Read-write watchpoints not supported on SystemZ
-    @expectedFailureAll(archs=['s390x'])
-    def test_rw_watchpoint(self):
-        """Test read_write watchpoint and expect to stop two times."""
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(dictionary=self.d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line(
-            self, None, self.line, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # We should be stopped again due to the breakpoint.
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Now let's set a read_write-type watchpoint for 'global'.
-        # There should be two watchpoint hits (see main.c).
-        self.expect(
-            "watchpoint set variable -w read_write global",
-            WATCHPOINT_CREATED,
-            substrs=[
-                'Watchpoint created',
-                'size = 4',
-                'type = rw',
-                '%s:%d' %
-                (self.source,
-                 self.decl)])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 0 initially.
-        self.expect("watchpoint list -v",
-                    substrs=['Number of supported hardware watchpoints:',
-                             'hit_count = 0'])
-
-        self.runCmd("process continue")
-
-        # We should be stopped again due to the watchpoint (read_write type).
-        # The stop reason of the thread should be watchpoint.
-        self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
-                    substrs=['stop reason = watchpoint'])
-
-        self.runCmd("process continue")
-
-        # We should be stopped again due to the watchpoint (read_write type).
-        # The stop reason of the thread should be watchpoint.
-        self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
-                    substrs=['stop reason = watchpoint'])
-
-        self.runCmd("process continue")
-
-        # There should be no more watchpoint hit and the process status should
-        # be 'exited'.
-        self.expect("process status",
-                    substrs=['exited'])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should now be 2.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 2'])
-
-    # Read-write watchpoints not supported on SystemZ
-    @expectedFailureAll(archs=['s390x'])
-    def test_rw_watchpoint_delete(self):
-        """Test delete watchpoint and expect not to stop for watchpoint."""
-        self.build()
-        lldbutil.run_to_line_breakpoint(self, lldb.SBFileSpec(self.source),
-                                        self.line)
-
-        # Now let's set a read_write-type watchpoint for 'global'.
-        # There should be two watchpoint hits (see main.c).
-        self.expect(
-            "watchpoint set variable -w read_write global",
-            WATCHPOINT_CREATED,
-            substrs=[
-                'Watchpoint created',
-                'size = 4',
-                'type = rw',
-                '%s:%d' %
-                (self.source,
-                 self.decl)])
-
-        # Delete the watchpoint immediately, but set auto-confirm to true
-        # first.
-        self.runCmd("settings set auto-confirm true")
-        self.expect("watchpoint delete",
-                    substrs=['All watchpoints removed.'])
-        # Restore the original setting of auto-confirm.
-        self.runCmd("settings clear auto-confirm")
-
-        target = self.dbg.GetSelectedTarget()
-        self.assertTrue(target and not target.GetNumWatchpoints())
-
-        # Now let's set a read_write-type watchpoint for 'global'.
-        # There should be two watchpoint hits (see main.c).
-        self.expect(
-            "watchpoint set variable -w read_write global",
-            WATCHPOINT_CREATED,
-            substrs=[
-                'Watchpoint created',
-                'size = 4',
-                'type = rw',
-                '%s:%d' %
-                (self.source,
-                 self.decl)])
-
-
-        # Delete the watchpoint immediately using the force option.
-        self.expect("watchpoint delete --force",
-                    substrs=['All watchpoints removed.'])
-
-        self.assertTrue(target and not target.GetNumWatchpoints())
-
-        self.runCmd("process continue")
-
-        # There should be no more watchpoint hit and the process status should
-        # be 'exited'.
-        self.expect("process status",
-                    substrs=['exited'])
-
-    # Read-write watchpoints not supported on SystemZ
-    @expectedFailureAll(archs=['s390x'])
-    def test_rw_watchpoint_set_ignore_count(self):
-        """Test watchpoint ignore count and expect to not to stop at all."""
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(dictionary=self.d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line(
-            self, None, self.line, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # We should be stopped again due to the breakpoint.
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Now let's set a read_write-type watchpoint for 'global'.
-        # There should be two watchpoint hits (see main.c).
-        self.expect(
-            "watchpoint set variable -w read_write global",
-            WATCHPOINT_CREATED,
-            substrs=[
-                'Watchpoint created',
-                'size = 4',
-                'type = rw',
-                '%s:%d' %
-                (self.source,
-                 self.decl)])
-
-        # Set the ignore count of the watchpoint immediately.
-        self.expect("watchpoint ignore -i 2",
-                    substrs=['All watchpoints ignored.'])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # Expect to find an ignore_count of 2.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 0', 'ignore_count = 2'])
-
-        self.runCmd("process continue")
-
-        # There should be no more watchpoint hit and the process status should
-        # be 'exited'.
-        self.expect("process status",
-                    substrs=['exited'])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # Expect to find a hit_count of 2 as well.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 2', 'ignore_count = 2'])
-
-    # Read-write watchpoints not supported on SystemZ
-    @expectedFailureAll(archs=['s390x'])
-    def test_rw_disable_after_first_stop(self):
-        """Test read_write watchpoint but disable it after the first stop."""
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(dictionary=self.d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line(
-            self, None, self.line, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # We should be stopped again due to the breakpoint.
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Now let's set a read_write-type watchpoint for 'global'.
-        # There should be two watchpoint hits (see main.c).
-        self.expect(
-            "watchpoint set variable -w read_write global",
-            WATCHPOINT_CREATED,
-            substrs=[
-                'Watchpoint created',
-                'size = 4',
-                'type = rw',
-                '%s:%d' %
-                (self.source,
-                 self.decl)])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 0 initially.
-        self.expect("watchpoint list -v",
-                    substrs=['state = enabled', 'hit_count = 0'])
-
-        self.runCmd("process continue")
-
-        # We should be stopped again due to the watchpoint (read_write type).
-        # The stop reason of the thread should be watchpoint.
-        self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
-                    substrs=['stop reason = watchpoint'])
-
-        # Before continuing, we'll disable the watchpoint, which means we won't
-        # stop again after this.
-        self.runCmd("watchpoint disable")
-
-        self.expect("watchpoint list -v",
-                    substrs=['state = disabled', 'hit_count = 1'])
-
-        self.runCmd("process continue")
-
-        # There should be no more watchpoint hit and the process status should
-        # be 'exited'.
-        self.expect("process status",
-                    substrs=['exited'])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 1.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 1'])
-
-    # Read-write watchpoints not supported on SystemZ
-    @expectedFailureAll(archs=['s390x'])
-    def test_rw_disable_then_enable(self):
-        """Test read_write watchpoint, disable initially, then enable it."""
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(dictionary=self.d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line(
-            self, None, self.line, num_expected_locations=1)
-        lldbutil.run_break_set_by_file_and_line(
-            self, None, self.line2, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # We should be stopped again due to the breakpoint.
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Now let's set a read_write-type watchpoint for 'global'.
-        # There should be two watchpoint hits (see main.c).
-        self.expect(
-            "watchpoint set variable -w read_write global",
-            WATCHPOINT_CREATED,
-            substrs=[
-                'Watchpoint created',
-                'size = 4',
-                'type = rw',
-                '%s:%d' %
-                (self.source,
-                 self.decl)])
-
-        # Immediately, we disable the watchpoint.  We won't be stopping due to a
-        # watchpoint after this.
-        self.runCmd("watchpoint disable")
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 0 initially.
-        self.expect("watchpoint list -v",
-                    substrs=['state = disabled', 'hit_count = 0'])
-
-        self.runCmd("process continue")
-
-        # We should be stopped again due to the breakpoint.
-        self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stop reason = breakpoint'])
-
-        # Before continuing, we'll enable the watchpoint, which means we will
-        # stop again after this.
-        self.runCmd("watchpoint enable")
-
-        self.expect("watchpoint list -v",
-                    substrs=['state = enabled', 'hit_count = 0'])
-
-        self.runCmd("process continue")
-
-        # We should be stopped again due to the watchpoint (read_write type).
-        # The stop reason of the thread should be watchpoint.
-        self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
-                    substrs=['stop reason = watchpoint'])
-
-        self.runCmd("process continue")
-
-        # There should be no more watchpoint hit and the process status should
-        # be 'exited'.
-        self.expect("process status",
-                    substrs=['exited'])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 1.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 1'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/TestWatchpointCommandLLDB.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/TestWatchpointCommandLLDB.py
deleted file mode 100644 (file)
index cb5a535..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-"""
-Test 'watchpoint command'.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class WatchpointLLDBCommandTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Our simple source filename.
-        self.source = 'main.cpp'
-        # Find the line number to break inside main().
-        self.line = line_number(
-            self.source, '// Set break point at this line.')
-        # And the watchpoint variable declaration line number.
-        self.decl = line_number(self.source,
-                                '// Watchpoint variable declaration.')
-        # Build dictionary to have unique executable names for each test
-        # method.
-        self.exe_name = 'a%d.out' % self.test_number
-        self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}
-
-    def test_watchpoint_command(self):
-        """Test 'watchpoint command'."""
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(dictionary=self.d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line(
-            self, None, self.line, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # We should be stopped again due to the breakpoint.
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Now let's set a write-type watchpoint for 'global'.
-        self.expect(
-            "watchpoint set variable -w write global",
-            WATCHPOINT_CREATED,
-            substrs=[
-                'Watchpoint created',
-                'size = 4',
-                'type = w',
-                '%s:%d' %
-                (self.source,
-                 self.decl)])
-
-        self.runCmd('watchpoint command add 1 -o "expr -- cookie = 777"')
-
-        # List the watchpoint command we just added.
-        self.expect("watchpoint command list 1",
-                    substrs=['expr -- cookie = 777'])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 0 initially.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 0'])
-
-        self.runCmd("process continue")
-
-        # We should be stopped again due to the watchpoint (write type).
-        # The stop reason of the thread should be watchpoint.
-        self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
-                    substrs=['stop reason = watchpoint'])
-
-        # Check that the watchpoint snapshoting mechanism is working.
-        self.expect("watchpoint list -v",
-                    substrs=['old value:', ' = 0',
-                             'new value:', ' = 1'])
-
-        # The watchpoint command "forced" our global variable 'cookie' to
-        # become 777.
-        self.expect("frame variable --show-globals cookie",
-                    substrs=['(int32_t)', 'cookie = 777'])
-
-    def test_watchpoint_command_can_disable_a_watchpoint(self):
-        """Test that 'watchpoint command' action can disable a watchpoint after it is triggered."""
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(dictionary=self.d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line(
-            self, None, self.line, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # We should be stopped again due to the breakpoint.
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Now let's set a write-type watchpoint for 'global'.
-        self.expect(
-            "watchpoint set variable -w write global",
-            WATCHPOINT_CREATED,
-            substrs=[
-                'Watchpoint created',
-                'size = 4',
-                'type = w',
-                '%s:%d' %
-                (self.source,
-                 self.decl)])
-
-        self.runCmd('watchpoint command add 1 -o "watchpoint disable 1"')
-
-        # List the watchpoint command we just added.
-        self.expect("watchpoint command list 1",
-                    substrs=['watchpoint disable 1'])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 0 initially.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 0'])
-
-        self.runCmd("process continue")
-
-        # We should be stopped again due to the watchpoint (write type).
-        # The stop reason of the thread should be watchpoint.
-        self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
-                    substrs=['stop reason = watchpoint'])
-
-        # Check that the watchpoint has been disabled.
-        self.expect("watchpoint list -v",
-                    substrs=['disabled'])
-
-        self.runCmd("process continue")
-
-        # There should be no more watchpoint hit and the process status should
-        # be 'exited'.
-        self.expect("process status",
-                    substrs=['exited'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/TestWatchpointCommandPython.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/TestWatchpointCommandPython.py
deleted file mode 100644 (file)
index c72a535..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-"""
-Test 'watchpoint command'.
-"""
-
-
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class WatchpointPythonCommandTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Our simple source filename.
-        self.source = 'main.cpp'
-        # Find the line number to break inside main().
-        self.line = line_number(
-            self.source, '// Set break point at this line.')
-        # And the watchpoint variable declaration line number.
-        self.decl = line_number(self.source,
-                                '// Watchpoint variable declaration.')
-        # Build dictionary to have unique executable names for each test
-        # method.
-        self.exe_name = self.testMethodName
-        self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}
-
-    @skipIfFreeBSD  # timing out on buildbot
-    def test_watchpoint_command(self):
-        """Test 'watchpoint command'."""
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(dictionary=self.d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line(
-            self, None, self.line, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # We should be stopped again due to the breakpoint.
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Now let's set a write-type watchpoint for 'global'.
-        self.expect(
-            "watchpoint set variable -w write global",
-            WATCHPOINT_CREATED,
-            substrs=[
-                'Watchpoint created',
-                'size = 4',
-                'type = w',
-                '%s:%d' %
-                (self.source,
-                 self.decl)])
-
-        self.runCmd(
-            'watchpoint command add -s python 1 -o \'frame.EvaluateExpression("cookie = 777")\'')
-
-        # List the watchpoint command we just added.
-        self.expect("watchpoint command list 1",
-                    substrs=['frame.EvaluateExpression', 'cookie = 777'])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 0 initially.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 0'])
-
-        self.runCmd("process continue")
-
-        # We should be stopped again due to the watchpoint (write type).
-        # The stop reason of the thread should be watchpoint.
-        self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
-                    substrs=['stop reason = watchpoint'])
-
-        # Check that the watchpoint snapshoting mechanism is working.
-        self.expect("watchpoint list -v",
-                    substrs=['old value:', ' = 0',
-                             'new value:', ' = 1'])
-
-        # The watchpoint command "forced" our global variable 'cookie' to
-        # become 777.
-        self.expect("frame variable --show-globals cookie",
-                    substrs=['(int32_t)', 'cookie = 777'])
-
-    @skipIfFreeBSD  # timing out on buildbot
-    def test_continue_in_watchpoint_command(self):
-        """Test continue in a watchpoint command."""
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(dictionary=self.d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line(
-            self, None, self.line, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # We should be stopped again due to the breakpoint.
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Now let's set a write-type watchpoint for 'global'.
-        self.expect(
-            "watchpoint set variable -w write global",
-            WATCHPOINT_CREATED,
-            substrs=[
-                'Watchpoint created',
-                'size = 4',
-                'type = w',
-                '%s:%d' %
-                (self.source,
-                 self.decl)])
-
-        cmd_script_file = os.path.join(self.getSourceDir(),
-                                       "watchpoint_command.py")
-        self.runCmd("command script import '%s'" % (cmd_script_file))
-
-        self.runCmd(
-            'watchpoint command add -F watchpoint_command.watchpoint_command')
-
-        # List the watchpoint command we just added.
-        self.expect("watchpoint command list 1",
-                    substrs=['watchpoint_command.watchpoint_command'])
-
-        self.runCmd("process continue")
-
-        # We should be stopped again due to the watchpoint (write type).
-        # The stop reason of the thread should be watchpoint.
-        self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
-                    substrs=['stop reason = watchpoint'])
-
-        # We should have hit the watchpoint once, set cookie to 888, then continued to the
-        # second hit and set it to 999
-        self.expect("frame variable --show-globals cookie",
-                    substrs=['(int32_t)', 'cookie = 999'])
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/main.cpp
deleted file mode 100644 (file)
index 43e4c1a..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-#include <stdint.h>
-
-int32_t global = 0; // Watchpoint variable declaration.
-int32_t cookie = 0;
-
-static void modify(int32_t &var) {
-    ++var;
-}
-
-int main(int argc, char** argv) {
-    int local = 0;
-    printf("&global=%p\n", &global);
-    printf("about to write to 'global'...\n"); // Set break point at this line.
-    for (int i = 0; i < 10; ++i)
-        modify(global);
-
-    printf("global=%d\n", global);
-    printf("cookie=%d\n", cookie);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/watchpoint_command.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/watchpoint_command.py
deleted file mode 100644 (file)
index ae5913a..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-import lldb
-
-num_hits = 0
-
-
-def watchpoint_command(frame, wp, dict):
-    global num_hits
-    if num_hits == 0:
-        print ("I stopped the first time")
-        frame.EvaluateExpression("cookie = 888")
-        num_hits += 1
-        frame.thread.process.Continue()
-    else:
-        print ("I stopped the %d time" % (num_hits))
-        frame.EvaluateExpression("cookie = 999")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/condition/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/condition/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/condition/TestWatchpointConditionCmd.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/condition/TestWatchpointConditionCmd.py
deleted file mode 100644 (file)
index 0605aae..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-"""
-Test watchpoint modify command to set condition on a watchpoint.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class WatchpointConditionCmdTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Our simple source filename.
-        self.source = 'main.cpp'
-        # Find the line number to break inside main().
-        self.line = line_number(
-            self.source, '// Set break point at this line.')
-        # And the watchpoint variable declaration line number.
-        self.decl = line_number(self.source,
-                                '// Watchpoint variable declaration.')
-        # Build dictionary to have unique executable names for each test
-        # method.
-        self.exe_name = self.testMethodName
-        self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}
-
-    def test_watchpoint_cond(self):
-        """Test watchpoint condition."""
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(dictionary=self.d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line(
-            self, None, self.line, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # We should be stopped again due to the breakpoint.
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Now let's set a write-type watchpoint for 'global'.
-        # With a condition of 'global==5'.
-        self.expect(
-            "watchpoint set variable -w write global",
-            WATCHPOINT_CREATED,
-            substrs=[
-                'Watchpoint created',
-                'size = 4',
-                'type = w',
-                '%s:%d' %
-                (self.source,
-                 self.decl)])
-
-        self.runCmd("watchpoint modify -c 'global==5'")
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 0 initially.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 0', 'global==5'])
-
-        self.runCmd("process continue")
-
-        # We should be stopped again due to the watchpoint (write type).
-        # The stop reason of the thread should be watchpoint.
-        self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
-                    substrs=['stop reason = watchpoint'])
-        self.expect("frame variable --show-globals global",
-                    substrs=['(int32_t)', 'global = 5'])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should now be 2.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 5'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/condition/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/condition/main.cpp
deleted file mode 100644 (file)
index 3f7c5f5..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-#include <stdint.h>
-
-int32_t global = 0; // Watchpoint variable declaration.
-
-static void modify(int32_t &var) {
-    ++var;
-}
-
-int main(int argc, char** argv) {
-    int local = 0;
-    printf("&global=%p\n", &global);
-    printf("about to write to 'global'...\n"); // Set break point at this line.
-                                               // When stopped, watch 'global',
-                                               // for the condition "global == 5".
-    for (int i = 0; i < 10; ++i)
-        modify(global);
-
-    printf("global=%d\n", global);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/main.c
deleted file mode 100644 (file)
index a9d1cf2..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-#include <stdint.h>
-
-int32_t global = 10; // Watchpoint variable declaration.
-
-int main(int argc, char** argv) {
-    int local = 0;
-    printf("&global=%p\n", &global);
-    printf("about to write to 'global'...\n"); // Set break point at this line.
-                                               // When stopped, watch 'global'.
-    global = 20;
-    local += argc;
-    ++local; // Set 2nd break point for disable_then_enable test case.
-    printf("local: %d\n", local);
-    printf("global=%d\n", global);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_disable/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_disable/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_disable/TestWatchpointDisable.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_disable/TestWatchpointDisable.py
deleted file mode 100644 (file)
index cf33f47..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-"""
-Test that the SBWatchpoint::SetEnable API works.
-"""
-
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-from lldbsuite.test import lldbplatform, lldbplatformutil
-
-
-class TestWatchpointSetEnable(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_disable_works (self):
-        """Set a watchpoint, disable it, and make sure it doesn't get hit."""
-        self.build()
-        self.do_test(False)
-
-    def test_disable_enable_works (self):
-        """Set a watchpoint, disable it, and make sure it doesn't get hit."""
-        self.build()
-        self.do_test(True)
-
-    def do_test(self, test_enable):
-        """Set a watchpoint, disable it and make sure it doesn't get hit."""
-
-        exe = self.getBuildArtifact("a.out")
-        main_file_spec = lldb.SBFileSpec("main.c")
-
-        # Create a target by the debugger.
-        self.target = self.dbg.CreateTarget(exe)
-        self.assertTrue(self.target, VALID_TARGET)
-
-        bkpt_before = self.target.BreakpointCreateBySourceRegex("Set a breakpoint here", main_file_spec)
-        self.assertEqual(bkpt_before.GetNumLocations(),  1, "Failed setting the before breakpoint.")
-
-        bkpt_after = self.target.BreakpointCreateBySourceRegex("We should have stopped", main_file_spec)
-        self.assertEqual(bkpt_after.GetNumLocations(), 1, "Failed setting the after breakpoint.")
-
-        process = self.target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        thread = lldbutil.get_one_thread_stopped_at_breakpoint(process, bkpt_before)
-        self.assertTrue(thread.IsValid(), "We didn't stop at the before breakpoint.")
-
-        ret_val = lldb.SBCommandReturnObject()
-        self.dbg.GetCommandInterpreter().HandleCommand("watchpoint set variable -w write global_var", ret_val)
-        self.assertTrue(ret_val.Succeeded(), "Watchpoint set variable did not return success.")
-
-        wp = self.target.FindWatchpointByID(1)
-        self.assertTrue(wp.IsValid(), "Didn't make a valid watchpoint.")
-        self.assertTrue(wp.GetWatchAddress() != lldb.LLDB_INVALID_ADDRESS, "Watch address is invalid")
-
-        wp.SetEnabled(False)
-        self.assertTrue(not wp.IsEnabled(), "The watchpoint thinks it is still enabled")
-
-        process.Continue()
-
-        stop_reason = thread.GetStopReason()
-
-        self.assertEqual(stop_reason, lldb.eStopReasonBreakpoint, "We didn't stop at our breakpoint.")
-
-        if test_enable:
-            wp.SetEnabled(True)
-            self.assertTrue(wp.IsEnabled(), "The watchpoint thinks it is still disabled.")
-            process.Continue()
-            stop_reason = thread.GetStopReason()
-            self.assertEqual(stop_reason, lldb.eStopReasonWatchpoint, "We didn't stop at our watchpoint")
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_disable/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_disable/main.c
deleted file mode 100644 (file)
index dcbc766..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <stdio.h>
-
-int global_var = 10;
-
-int
-main()
-{
-  printf("Set a breakpoint here: %d.\n", global_var);
-  global_var = 20;
-  printf("We should have stopped on the previous line: %d.\n", global_var);
-  global_var = 30;
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_events/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_events/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_events/TestWatchpointEvents.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_events/TestWatchpointEvents.py
deleted file mode 100644 (file)
index 826bed8..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-"""Test that adding, deleting and modifying watchpoints sends the appropriate events."""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestWatchpointEvents (TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers that we will step to in main:
-        self.main_source = "main.c"
-
-    @add_test_categories(['pyapi'])
-    def test_with_python_api(self):
-        """Test that adding, deleting and modifying watchpoints sends the appropriate events."""
-        self.build()
-
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-
-        break_in_main = target.BreakpointCreateBySourceRegex(
-            '// Put a breakpoint here.', self.main_source_spec)
-        self.assertTrue(break_in_main, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-            process, break_in_main)
-
-        if len(threads) != 1:
-            self.fail("Failed to stop at first breakpoint in main.")
-
-        thread = threads[0]
-        frame = thread.GetFrameAtIndex(0)
-        local_var = frame.FindVariable("local_var")
-        self.assertTrue(local_var.IsValid())
-
-        self.listener = lldb.SBListener("com.lldb.testsuite_listener")
-        self.target_bcast = target.GetBroadcaster()
-        self.target_bcast.AddListener(
-            self.listener, lldb.SBTarget.eBroadcastBitWatchpointChanged)
-        self.listener.StartListeningForEvents(
-            self.target_bcast, lldb.SBTarget.eBroadcastBitWatchpointChanged)
-
-        error = lldb.SBError()
-        local_watch = local_var.Watch(True, False, True, error)
-        if not error.Success():
-            self.fail(
-                "Failed to make watchpoint for local_var: %s" %
-                (error.GetCString()))
-
-        self.GetWatchpointEvent(lldb.eWatchpointEventTypeAdded)
-        # Now change some of the features of this watchpoint and make sure we
-        # get events:
-        local_watch.SetEnabled(False)
-        self.GetWatchpointEvent(lldb.eWatchpointEventTypeDisabled)
-
-        local_watch.SetEnabled(True)
-        self.GetWatchpointEvent(lldb.eWatchpointEventTypeEnabled)
-
-        local_watch.SetIgnoreCount(10)
-        self.GetWatchpointEvent(lldb.eWatchpointEventTypeIgnoreChanged)
-
-        condition = "1 == 2"
-        local_watch.SetCondition(condition)
-        self.GetWatchpointEvent(lldb.eWatchpointEventTypeConditionChanged)
-
-        self.assertTrue(local_watch.GetCondition() == condition,
-                        'make sure watchpoint condition is "' + condition + '"')
-
-    def GetWatchpointEvent(self, event_type):
-        # We added a watchpoint so we should get a watchpoint added event.
-        event = lldb.SBEvent()
-        success = self.listener.WaitForEvent(1, event)
-        self.assertTrue(success, "Successfully got watchpoint event")
-        self.assertTrue(
-            lldb.SBWatchpoint.EventIsWatchpointEvent(event),
-            "Event is a watchpoint event.")
-        found_type = lldb.SBWatchpoint.GetWatchpointEventTypeFromEvent(event)
-        self.assertTrue(
-            found_type == event_type,
-            "Event is not correct type, expected: %d, found: %d" %
-            (event_type,
-             found_type))
-        # There shouldn't be another event waiting around:
-        found_event = self.listener.PeekAtNextEventForBroadcasterWithType(
-            self.target_bcast, lldb.SBTarget.eBroadcastBitBreakpointChanged, event)
-        if found_event:
-            print("Found an event I didn't expect: ", event)
-
-        self.assertTrue(not found_event, "Only one event per change.")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_events/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_events/main.c
deleted file mode 100644 (file)
index 4b91753..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <stdio.h>
-
-int 
-main (int argc, char **argv)
-{
-  int local_var = 10; 
-  printf ("local_var is: %d.\n", local_var++); // Put a breakpoint here.
-  return local_var;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_on_vectors/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_on_vectors/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_on_vectors/TestValueOfVectorVariable.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_on_vectors/TestValueOfVectorVariable.py
deleted file mode 100644 (file)
index 81b44c0..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-"""
-Test displayed value of a vector variable while doing watchpoint operations
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestValueOfVectorVariableTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_value_of_vector_variable_using_watchpoint_set(self):
-        """Test verify displayed value of vector variable."""
-        exe = self.getBuildArtifact("a.out")
-        d = {'C_SOURCES': self.source, 'EXE': exe}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.value_of_vector_variable_with_watchpoint_set()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Our simple source filename.
-        self.source = 'main.c'
-
-    def value_of_vector_variable_with_watchpoint_set(self):
-        """Test verify displayed value of vector variable"""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Set break to get a frame
-        self.runCmd("b main")
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # Value of a vector variable should be displayed correctly
-        self.expect(
-            "watchpoint set variable global_vector",
-            WATCHPOINT_CREATED,
-            substrs=['new value: (1, 2, 3, 4)'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_on_vectors/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_on_vectors/main.c
deleted file mode 100644 (file)
index 04d8a06..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-typedef signed char v4i8 __attribute__ ((vector_size(4)));
-v4i8 global_vector = {1, 2, 3, 4};
-
-int
-main ()
-{
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_set_command/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_set_command/Makefile
deleted file mode 100644 (file)
index de4ec12..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-ENABLE_THREADS := YES
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_set_command/TestWatchLocationWithWatchSet.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_set_command/TestWatchLocationWithWatchSet.py
deleted file mode 100644 (file)
index 326028e..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-"""
-Test lldb watchpoint that uses 'watchpoint set -w write -s size' to watch a pointed location with size.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class WatchLocationUsingWatchpointSetTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Our simple source filename.
-        self.source = 'main.cpp'
-        # Find the line number to break inside main().
-        self.line = line_number(
-            self.source, '// Set break point at this line.')
-        # This is for verifying that watch location works.
-        self.violating_func = "do_bad_thing_with_location"
-        # Build dictionary to have unique executable names for each test
-        # method.
-
-    @skipIf(
-        oslist=["linux"],
-        archs=[
-            'aarch64',
-            'arm'],
-        bugnumber="llvm.org/pr26031")
-    def test_watchlocation_using_watchpoint_set(self):
-        """Test watching a location with 'watchpoint set expression -w write -s size' option."""
-        self.build()
-        self.setTearDownCleanup()
-
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line(
-            self, None, self.line, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # We should be stopped again due to the breakpoint.
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Now let's set a write-type watchpoint pointed to by 'g_char_ptr' and
-        # with offset as 7.
-        # The main.cpp, by design, misbehaves by not following the agreed upon
-        # protocol of only accessing the allowable index range of [0, 6].
-        self.expect(
-            "watchpoint set expression -w write -s 1 -- g_char_ptr + 7",
-            WATCHPOINT_CREATED,
-            substrs=[
-                'Watchpoint created',
-                'size = 1',
-                'type = w'])
-        self.runCmd("expr unsigned val = g_char_ptr[7]; val")
-        self.expect(self.res.GetOutput().splitlines()[0], exe=False,
-                    endstr=' = 0')
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 0 initially.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 0'])
-
-        self.runCmd("process continue")
-
-        # We should be stopped again due to the watchpoint (write type), but
-        # only once.  The stop reason of the thread should be watchpoint.
-        self.expect("thread list", STOPPED_DUE_TO_WATCHPOINT,
-                    substrs=['stopped',
-                             'stop reason = watchpoint',
-                             self.violating_func])
-
-        # Switch to the thread stopped due to watchpoint and issue some
-        # commands.
-        self.switch_to_thread_with_stop_reason(lldb.eStopReasonWatchpoint)
-        self.runCmd("thread backtrace")
-        self.runCmd("expr unsigned val = g_char_ptr[7]; val")
-        self.expect(self.res.GetOutput().splitlines()[0], exe=False,
-                    endstr=' = 99')
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should now be the same as the number of threads that
-        # stopped on a watchpoint.
-        threads = lldbutil.get_stopped_threads(
-            self.process(), lldb.eStopReasonWatchpoint)
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = %d' % len(threads)])
-
-        self.runCmd("thread backtrace all")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_set_command/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_set_command/main.cpp
deleted file mode 100644 (file)
index f21d2b3..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <chrono>
-#include <condition_variable>
-#include <cstdio>
-#include <thread>
-
-std::condition_variable g_condition_variable;
-std::mutex g_mutex;
-int g_count;
-
-char *g_char_ptr = nullptr;
-
-void
-barrier_wait()
-{
-    std::unique_lock<std::mutex> lock{g_mutex};
-    if (--g_count > 0)
-        g_condition_variable.wait(lock);
-    else
-        g_condition_variable.notify_all();
-}
-
-void
-do_bad_thing_with_location(unsigned index, char *char_ptr, char new_val)
-{
-    unsigned what = new_val;
-    printf("new value written to array(%p) and index(%u) = %u\n", char_ptr, index, what);
-    char_ptr[index] = new_val;
-}
-
-uint32_t
-access_pool (bool flag = false)
-{
-    static std::mutex g_access_mutex;
-    static unsigned idx = 0; // Well-behaving thread only writes into indexs from 0..6.
-    if (!flag)
-        g_access_mutex.lock();
-
-    // idx valid range is [0, 6].
-    if (idx > 6)
-        idx = 0;
-
-    if (flag)
-    {
-        // Write into a forbidden area.
-        do_bad_thing_with_location(7, g_char_ptr, 99);
-    }
-
-    unsigned index = idx++;
-
-    if (!flag)
-        g_access_mutex.unlock();
-    return g_char_ptr[index];
-}
-
-void
-thread_func (uint32_t thread_index)
-{
-    printf ("%s (thread index = %u) startng...\n", __FUNCTION__, thread_index);
-
-    barrier_wait();
-
-    uint32_t count = 0;
-    uint32_t val;
-    while (count++ < 15)
-    {
-        printf ("%s (thread = %u) sleeping for 1 second...\n", __FUNCTION__, thread_index);
-        std::this_thread::sleep_for(std::chrono::seconds(1));
-
-        if (count < 7)
-            val = access_pool ();
-        else
-            val = access_pool (true);
-
-        printf ("%s (thread = %u) after sleep access_pool returns %d (count=%d)...\n", __FUNCTION__, thread_index, val, count);
-    }
-    printf ("%s (thread index = %u) exiting...\n", __FUNCTION__, thread_index);
-}
-
-
-int main (int argc, char const *argv[])
-{
-    g_count = 4;
-    std::thread threads[3];
-
-    g_char_ptr = new char[10]{};
-
-    // Create 3 threads
-    for (auto &thread : threads)
-        thread = std::thread{thread_func, std::distance(threads, &thread)};
-
-    struct {
-        int a;
-        int b;
-        int c;
-    } MyAggregateDataType;
-
-    printf ("Before turning all three threads loose...\n"); // Set break point at this line.
-    barrier_wait();
-
-    // Join all of our threads
-    for (auto &thread : threads)
-        thread.join();
-
-    delete[] g_char_ptr;
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_size/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_size/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_size/TestWatchpointSizes.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_size/TestWatchpointSizes.py
deleted file mode 100644 (file)
index e6634f1..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-"""
-Test watchpoint size cases (1-byte, 2-byte, 4-byte).
-Make sure we can watch all bytes, words or double words individually
-when they are packed in a 8-byte region.
-
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class WatchpointSizeTestCase(TestBase):
-    NO_DEBUG_INFO_TESTCASE = True
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-        # Source filename.
-        self.source = 'main.c'
-
-        # Output filename.
-        self.exe_name = self.getBuildArtifact("a.out")
-        self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
-
-    # Read-write watchpoints not supported on SystemZ
-    @expectedFailureAll(archs=['s390x'])
-    def test_byte_size_watchpoints_with_byte_selection(self):
-        """Test to selectively watch different bytes in a 8-byte array."""
-        self.run_watchpoint_size_test('byteArray', 8, '1')
-
-    # Read-write watchpoints not supported on SystemZ
-    @expectedFailureAll(archs=['s390x'])
-    def test_two_byte_watchpoints_with_word_selection(self):
-        """Test to selectively watch different words in an 8-byte word array."""
-        self.run_watchpoint_size_test('wordArray', 4, '2')
-
-    # Read-write watchpoints not supported on SystemZ
-    @expectedFailureAll(archs=['s390x'])
-    def test_four_byte_watchpoints_with_dword_selection(self):
-        """Test to selectively watch two double words in an 8-byte dword array."""
-        self.run_watchpoint_size_test('dwordArray', 2, '4')
-
-    def run_watchpoint_size_test(self, arrayName, array_size, watchsize):
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(dictionary=self.d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Detect line number after which we are going to increment arrayName.
-        loc_line = line_number('main.c', '// About to write ' + arrayName)
-
-        # Set a breakpoint on the line detected above.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", loc_line, num_expected_locations=1, loc_exact=True)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        for i in range(array_size):
-            # We should be stopped again due to the breakpoint.
-            # The stop reason of the thread should be breakpoint.
-            self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                        substrs=['stopped', 'stop reason = breakpoint'])
-
-            # Set a read_write type watchpoint arrayName
-            watch_loc = arrayName + "[" + str(i) + "]"
-            self.expect(
-                "watchpoint set variable -w read_write " +
-                watch_loc,
-                WATCHPOINT_CREATED,
-                substrs=[
-                    'Watchpoint created',
-                    'size = ' +
-                    watchsize,
-                    'type = rw'])
-
-            # Use the '-v' option to do verbose listing of the watchpoint.
-            # The hit count should be 0 initially.
-            self.expect("watchpoint list -v", substrs=['hit_count = 0'])
-
-            self.runCmd("process continue")
-
-            # We should be stopped due to the watchpoint.
-            # The stop reason of the thread should be watchpoint.
-            self.expect("thread list", STOPPED_DUE_TO_WATCHPOINT,
-                        substrs=['stopped', 'stop reason = watchpoint'])
-
-            # Use the '-v' option to do verbose listing of the watchpoint.
-            # The hit count should now be 1.
-            self.expect("watchpoint list -v",
-                        substrs=['hit_count = 1'])
-
-            self.runCmd("process continue")
-
-            # We should be stopped due to the watchpoint.
-            # The stop reason of the thread should be watchpoint.
-            self.expect("thread list", STOPPED_DUE_TO_WATCHPOINT,
-                        substrs=['stopped', 'stop reason = watchpoint'])
-
-            # Use the '-v' option to do verbose listing of the watchpoint.
-            # The hit count should now be 1.
-            # Verify hit_count has been updated after value has been read.
-            self.expect("watchpoint list -v",
-                        substrs=['hit_count = 2'])
-
-            # Delete the watchpoint immediately, but set auto-confirm to true
-            # first.
-            self.runCmd("settings set auto-confirm true")
-            self.expect(
-                "watchpoint delete",
-                substrs=['All watchpoints removed.'])
-            # Restore the original setting of auto-confirm.
-            self.runCmd("settings clear auto-confirm")
-
-            self.runCmd("process continue")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_size/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_size/main.c
deleted file mode 100644 (file)
index 4edcf87..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-#include <stdint.h>
-
-uint64_t pad0 = 0;
-uint8_t byteArray[8] = {0};
-uint64_t pad1 = 0;
-uint16_t wordArray[4] = {0};
-uint64_t pad2 = 0;
-uint32_t dwordArray[2] = {0};
-
-int main(int argc, char** argv) {
-
-    int i;
-    uint8_t localByte;
-    uint16_t localWord;
-    uint32_t localDword;
-
-    for (i = 0; i < 8; i++)
-    {
-        printf("About to write byteArray[%d] ...\n", i); // About to write byteArray
-        pad0++;
-        byteArray[i] = 7;
-        pad1++;
-        localByte = byteArray[i]; // Here onwards we should'nt be stopped in loop
-        byteArray[i]++;
-        localByte = byteArray[i];
-    }
-
-    pad0 = 0;
-    pad1 = 0;
-
-    for (i = 0; i < 4; i++)
-    {
-        printf("About to write wordArray[%d] ...\n", i); // About to write wordArray
-        pad0++;
-        wordArray[i] = 7;
-        pad1++;
-        localWord = wordArray[i]; // Here onwards we should'nt be stopped in loop
-        wordArray[i]++;
-        localWord = wordArray[i];
-    }
-
-    pad0 = 0;
-    pad1 = 0;
-
-    for (i = 0; i < 2; i++)
-    {
-        printf("About to write dwordArray[%d] ...\n", i); // About to write dwordArray
-        pad0++;
-        dwordArray[i] = 7;
-        pad1++;
-        localDword = dwordArray[i]; // Here onwards we shouldn't be stopped in loop
-        dwordArray[i]++;
-        localDword = dwordArray[i];
-    }
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/driver/batch_mode/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/driver/batch_mode/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py
deleted file mode 100644 (file)
index 9639c70..0000000
+++ /dev/null
@@ -1,164 +0,0 @@
-"""
-Test that the lldb driver's batch mode works correctly.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-from lldbsuite.test.lldbpexpect import PExpectTest
-
-
-class DriverBatchModeTest(PExpectTest):
-
-    mydir = TestBase.compute_mydir(__file__)
-    source = 'main.c'
-
-    @skipIfRemote  # test not remote-ready llvm.org/pr24813
-    @expectedFlakeyFreeBSD("llvm.org/pr25172 fails rarely on the buildbot")
-    def test_batch_mode_run_crash(self):
-        """Test that the lldb driver's batch mode works correctly."""
-        self.build()
-
-        exe = self.getBuildArtifact("a.out")
-
-        # Pass CRASH so the process will crash and stop in batch mode.
-        extra_args = ['-b',
-            '-o', 'break set -n main',
-            '-o', 'run',
-            '-o', 'continue',
-            '-k', 'frame var touch_me_not',
-            '--', 'CRASH',
-        ]
-        self.launch(executable=exe, extra_args=extra_args)
-        child = self.child
-
-        # We should see the "run":
-        child.expect_exact("run")
-        # We should have hit the breakpoint & continued:
-        child.expect_exact("continue")
-        # The App should have crashed:
-        child.expect_exact("About to crash")
-        # The -k option should have printed the frame variable once:
-        child.expect_exact('(char *) touch_me_not')
-        # Then we should have a live prompt:
-        self.expect_prompt()
-        self.expect("frame variable touch_me_not", substrs='(char *) touch_me_not')
-
-    @skipIfRemote  # test not remote-ready llvm.org/pr24813
-    @expectedFlakeyFreeBSD("llvm.org/pr25172 fails rarely on the buildbot")
-    def test_batch_mode_run_exit(self):
-        """Test that the lldb driver's batch mode works correctly."""
-        self.build()
-
-        exe = self.getBuildArtifact("a.out")
-
-        # Now do it again, and make sure if we don't crash, we quit:
-        extra_args = ['-b',
-            '-o', 'break set -n main',
-            '-o', 'run',
-            '-o', 'continue',
-            '--', 'NOCRASH',
-        ]
-        self.launch(executable=exe, extra_args=extra_args)
-        child = self.child
-
-        # We should see the "run":
-        child.expect_exact("run")
-        # We should have hit the breakpoint & continued:
-        child.expect_exact("continue")
-        # The App should have not have crashed:
-        child.expect_exact("Got there on time and it did not crash.")
-
-        # Then lldb should exit.
-        child.expect_exact("exited")
-        import pexpect
-        child.expect(pexpect.EOF)
-
-    @skipIfRemote
-    @expectedFlakeyFreeBSD("llvm.org/pr25172 fails rarely on the buildbot")
-    def test_batch_mode_launch_stop_at_entry(self):
-        """Test that the lldb driver's batch mode works correctly for process launch."""
-        self.build()
-
-        exe = self.getBuildArtifact("a.out")
-
-        # Launch with the option '--stop-at-entry' stops with a signal (usually SIGSTOP)
-        # that should be suppressed since it doesn't imply a crash and
-        # this is not a reason to exit batch mode.
-        extra_args = ['-b',
-            '-o', 'process launch --stop-at-entry',
-            '-o', 'continue',
-        ]
-        self.launch(executable=exe, extra_args=extra_args)
-        child = self.child
-
-        # Check that the process has been launched:
-        child.expect("Process ([0-9]+) launched:")
-        # We should have continued:
-        child.expect_exact("continue")
-        # The App should have not have crashed:
-        child.expect_exact("Got there on time and it did not crash.")
-        
-        # Then lldb should exit.
-        child.expect_exact("exited")
-        import pexpect
-        child.expect(pexpect.EOF)
-
-    def closeVictim(self):
-        if self.victim is not None:
-            self.victim.close()
-            self.victim = None
-
-    @skipIfRemote  # test not remote-ready llvm.org/pr24813
-    @expectedFlakeyFreeBSD("llvm.org/pr25172 fails rarely on the buildbot")
-    @expectedFailureNetBSD
-    def test_batch_mode_attach_exit(self):
-        """Test that the lldb driver's batch mode works correctly."""
-        self.build()
-        self.setTearDownCleanup()
-
-        exe = self.getBuildArtifact("a.out")
-
-        # Start up the process by hand, attach to it, and wait for its completion.
-        # Attach is funny, since it looks like it stops with a signal on most Unixen so
-        # care must be taken not to treat that as a reason to exit batch mode.
-
-        # Start up the process by hand and wait for it to get to the wait loop.
-        import pexpect
-        self.victim = pexpect.spawn('%s WAIT' % (exe))
-        if self.victim is None:
-            self.fail("Could not spawn ", exe, ".")
-
-        self.addTearDownHook(self.closeVictim)
-
-        self.victim.expect("PID: ([0-9]+) END")
-        victim_pid = int(self.victim.match.group(1))
-
-        self.victim.expect("Waiting")
-
-        extra_args = [
-            '-b',
-            '-o', 'process attach -p %d'%victim_pid,
-            '-o', "breakpoint set --file '%s' -p 'Stop here to unset keep_waiting' -N keep_waiting"%self.source,
-            '-o', 'continue',
-            '-o', 'break delete keep_waiting',
-            '-o', 'expr keep_waiting = 0',
-            '-o', 'continue',
-        ]
-        self.launch(executable=exe, extra_args=extra_args)
-        child = self.child
-
-        child.expect_exact("attach")
-
-        child.expect_exact(self.PROMPT + "continue")
-
-        child.expect_exact(self.PROMPT + "continue")
-
-        # Then we should see the process exit:
-        child.expect_exact("Process %d exited with status" % (victim_pid))
-
-        self.victim.expect(pexpect.EOF)
-        child.expect(pexpect.EOF)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/driver/batch_mode/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/driver/batch_mode/main.c
deleted file mode 100644 (file)
index c85a0f2..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-
-int 
-main (int argc, char **argv)
-{
-    lldb_enable_attach();
-
-    int do_crash = 0;
-    int do_wait = 0;
-
-    int idx;
-    for (idx = 1; idx < argc; idx++)
-    {
-        if (strcmp(argv[idx], "CRASH") == 0)
-            do_crash = 1;
-        if (strcmp(argv[idx], "WAIT") == 0)
-            do_wait = 1;
-    }
-    printf("PID: %d END\n", getpid());
-
-    if (do_wait)
-    {
-        int keep_waiting = 1;
-        while (keep_waiting)
-        {
-            printf ("Waiting\n");
-            sleep(1); // Stop here to unset keep_waiting
-        }
-    }
-
-    if (do_crash)
-    {
-      char *touch_me_not = (char *) 0;
-      printf ("About to crash.\n");
-      touch_me_not[0] = 'a';
-    }
-    printf ("Got there on time and it did not crash.\n");
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/abbreviation/.categories b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/abbreviation/.categories
deleted file mode 100644 (file)
index 3a3f4df..0000000
+++ /dev/null
@@ -1 +0,0 @@
-cmdline
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/abbreviation/TestAbbreviations.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/abbreviation/TestAbbreviations.py
deleted file mode 100644 (file)
index 4a129bb..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-"""
-Test some lldb command abbreviations and aliases for proper resolution.
-"""
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class AbbreviationsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    def test_command_abbreviations_and_aliases(self):
-        command_interpreter = self.dbg.GetCommandInterpreter()
-        self.assertTrue(command_interpreter, VALID_COMMAND_INTERPRETER)
-        result = lldb.SBCommandReturnObject()
-
-        # Check that abbreviations are expanded to the full command.
-        command_interpreter.ResolveCommand("ap script", result)
-        self.assertTrue(result.Succeeded())
-        self.assertEqual("apropos script", result.GetOutput())
-
-        command_interpreter.ResolveCommand("h", result)
-        self.assertTrue(result.Succeeded())
-        self.assertEqual("help", result.GetOutput())
-
-        # Check resolution of abbreviations for multi-word commands.
-        command_interpreter.ResolveCommand("lo li", result)
-        self.assertTrue(result.Succeeded())
-        self.assertEqual("log list", result.GetOutput())
-
-        command_interpreter.ResolveCommand("br s", result)
-        self.assertTrue(result.Succeeded())
-        self.assertEqual("breakpoint set", result.GetOutput())
-
-        # Try an ambiguous abbreviation.
-        # "pl" could be "platform" or "plugin".
-        command_interpreter.ResolveCommand("pl", result)
-        self.assertFalse(result.Succeeded())
-        self.assertTrue(result.GetError().startswith("Ambiguous command"))
-
-        # Make sure an unabbreviated command is not mangled.
-        command_interpreter.ResolveCommand(
-            "breakpoint set --name main --line 123", result)
-        self.assertTrue(result.Succeeded())
-        self.assertEqual(
-            "breakpoint set --name main --line 123",
-            result.GetOutput())
-
-        # Create some aliases.
-        self.runCmd("com a alias com al")
-        self.runCmd("alias gurp help")
-
-        # Check that an alias is replaced with the actual command
-        command_interpreter.ResolveCommand("gurp target create", result)
-        self.assertTrue(result.Succeeded())
-        self.assertEqual("help target create", result.GetOutput())
-
-        # Delete the alias and make sure it no longer has an effect.
-        self.runCmd("com u gurp")
-        command_interpreter.ResolveCommand("gurp", result)
-        self.assertFalse(result.Succeeded())
-
-        # Check aliases with text replacement.
-        self.runCmd("alias pltty process launch -s -o %1 -e %1")
-        command_interpreter.ResolveCommand("pltty /dev/tty0", result)
-        self.assertTrue(result.Succeeded())
-        self.assertEqual(
-            "process launch -s -o /dev/tty0 -e /dev/tty0",
-            result.GetOutput())
-
-        self.runCmd("alias xyzzy breakpoint set -n %1 -l %2")
-        command_interpreter.ResolveCommand("xyzzy main 123", result)
-        self.assertTrue(result.Succeeded())
-        self.assertEqual(
-            "breakpoint set -n main -l 123",
-            result.GetOutput().strip())
-
-        # And again, without enough parameters.
-        command_interpreter.ResolveCommand("xyzzy main", result)
-        self.assertFalse(result.Succeeded())
-
-        # Check a command that wants the raw input.
-        command_interpreter.ResolveCommand(
-            r'''sc print("\n\n\tHello!\n")''', result)
-        self.assertTrue(result.Succeeded())
-        self.assertEqual(
-            r'''script print("\n\n\tHello!\n")''',
-            result.GetOutput())
-
-        # Prompt changing stuff should be tested, but this doesn't seem like the
-        # right test to do it in.  It has nothing to do with aliases or abbreviations.
-        #self.runCmd("com sou ./change_prompt.lldb")
-        # self.expect("settings show prompt",
-        #            startstr = 'prompt (string) = "[with-three-trailing-spaces]   "')
-        #self.runCmd("settings clear prompt")
-        # self.expect("settings show prompt",
-        #            startstr = 'prompt (string) = "(lldb) "')
-        #self.runCmd("se se prompt 'Sycamore> '")
-        # self.expect("se sh prompt",
-        #            startstr = 'prompt (string) = "Sycamore> "')
-        #self.runCmd("se cl prompt")
-        # self.expect("set sh prompt",
-        #            startstr = 'prompt (string) = "(lldb) "')
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/abbreviation/TestCommonShortSpellings.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/abbreviation/TestCommonShortSpellings.py
deleted file mode 100644 (file)
index 9e4b3bb..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-"""
-Test some lldb command abbreviations to make sure the common short spellings of
-many commands remain available even after we add/delete commands in the future.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class CommonShortSpellingsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    def test_abbrevs2(self):
-        command_interpreter = self.dbg.GetCommandInterpreter()
-        self.assertTrue(command_interpreter, VALID_COMMAND_INTERPRETER)
-        result = lldb.SBCommandReturnObject()
-
-        abbrevs = [
-            ('br s', 'breakpoint set'),
-            ('disp', '_regexp-display'),  # a.k.a., 'display'
-            ('di', 'disassemble'),
-            ('dis', 'disassemble'),
-            ('ta st a', 'target stop-hook add'),
-            ('fr v', 'frame variable'),
-            ('f 1', 'frame select 1'),
-            ('ta st li', 'target stop-hook list'),
-        ]
-
-        for (short_val, long_val) in abbrevs:
-            command_interpreter.ResolveCommand(short_val, result)
-            self.assertTrue(result.Succeeded())
-            self.assertEqual(long_val, result.GetOutput())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/alias/.categories b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/alias/.categories
deleted file mode 100644 (file)
index 3a3f4df..0000000
+++ /dev/null
@@ -1 +0,0 @@
-cmdline
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/archives/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/archives/Makefile
deleted file mode 100644 (file)
index 4d1950c..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-C_SOURCES := main.c
-
-MAKE_DSYM := NO
-ARCHIVE_NAME := libfoo.a
-ARCHIVE_C_SOURCES := a.c b.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/archives/README b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/archives/README
deleted file mode 100644 (file)
index d327f45..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-a.out file refers to libfoo.a for a.o and b.o, which is what we want to accomplish for
-this test case.
-
-[16:17:44] johnny:/Volumes/data/lldb/svn/latest/test/functionalities/archives $ dsymutil -s a.out 
-----------------------------------------------------------------------
-Symbol table for: 'a.out' (x86_64)
-----------------------------------------------------------------------
-Index    n_strx   n_type             n_sect n_desc n_value
-======== -------- ------------------ ------ ------ ----------------
-[     0] 00000002 64 (N_SO         ) 00     0000   0000000000000000 '/Volumes/data/lldb/svn/latest/test/functionalities/archives/'
-[     1] 0000003f 64 (N_SO         ) 00     0000   0000000000000000 'main.c'
-[     2] 00000046 66 (N_OSO        ) 03     0001   000000004f0f780c '/Volumes/data/lldb/svn/latest/test/functionalities/archives/main.o'
-[     3] 00000001 2e (N_BNSYM      ) 01     0000   0000000100000d70
-[     4] 00000089 24 (N_FUN        ) 01     0000   0000000100000d70 '_main'
-[     5] 00000001 24 (N_FUN        ) 00     0000   000000000000005d
-[     6] 00000001 4e (N_ENSYM      ) 01     0000   000000000000005d
-[     7] 00000001 64 (N_SO         ) 01     0000   0000000000000000
-[     8] 00000002 64 (N_SO         ) 00     0000   0000000000000000 '/Volumes/data/lldb/svn/latest/test/functionalities/archives/'
-[     9] 0000008f 64 (N_SO         ) 00     0000   0000000000000000 'a.c'
-[    10] 00000093 66 (N_OSO        ) 03     0001   000000004f0f780c '/Volumes/data/lldb/svn/latest/test/functionalities/archives/libfoo.a(a.o)'
-[    11] 00000001 2e (N_BNSYM      ) 01     0000   0000000100000dd0
-[    12] 000000dd 24 (N_FUN        ) 01     0000   0000000100000dd0 '_a'
-[    13] 00000001 24 (N_FUN        ) 00     0000   0000000000000020
-[    14] 00000001 4e (N_ENSYM      ) 01     0000   0000000000000020
-[    15] 00000001 2e (N_BNSYM      ) 01     0000   0000000100000df0
-[    16] 000000e0 24 (N_FUN        ) 01     0000   0000000100000df0 '_aa'
-[    17] 00000001 24 (N_FUN        ) 00     0000   0000000000000018
-[    18] 00000001 4e (N_ENSYM      ) 01     0000   0000000000000018
-[    19] 000000e4 20 (N_GSYM       ) 00     0000   0000000000000000 '___a_global'
-[    20] 00000001 64 (N_SO         ) 01     0000   0000000000000000
-[    21] 00000002 64 (N_SO         ) 00     0000   0000000000000000 '/Volumes/data/lldb/svn/latest/test/functionalities/archives/'
-[    22] 000000f0 64 (N_SO         ) 00     0000   0000000000000000 'b.c'
-[    23] 000000f4 66 (N_OSO        ) 03     0001   000000004f0f780c '/Volumes/data/lldb/svn/latest/test/functionalities/archives/libfoo.a(b.o)'
-[    24] 00000001 2e (N_BNSYM      ) 01     0000   0000000100000e10
-[    25] 0000013e 24 (N_FUN        ) 01     0000   0000000100000e10 '_b'
-[    26] 00000001 24 (N_FUN        ) 00     0000   0000000000000020
-[    27] 00000001 4e (N_ENSYM      ) 01     0000   0000000000000020
-[    28] 00000001 2e (N_BNSYM      ) 01     0000   0000000100000e30
-[    29] 00000141 24 (N_FUN        ) 01     0000   0000000100000e30 '_bb'
-[    30] 00000001 24 (N_FUN        ) 00     0000   0000000000000018
-[    31] 00000001 4e (N_ENSYM      ) 01     0000   0000000000000018
-[    32] 00000145 26 (N_STSYM      ) 0a     0000   000000010000104c '___b_global'
-[    33] 00000001 64 (N_SO         ) 01     0000   0000000000000000
-[    34] 00000151 0e (     SECT    ) 07     0000   0000000100001000 '_pvars'
-[    35] 00000158 0e (     SECT    ) 0a     0000   000000010000104c '___b_global'
-[    36] 00000164 0f (     SECT EXT) 0b     0000   0000000100001050 '_NXArgc'
-[    37] 0000016c 0f (     SECT EXT) 0b     0000   0000000100001058 '_NXArgv'
-[    38] 00000174 0f (     SECT EXT) 0a     0000   0000000100001048 '___a_global'
-[    39] 00000180 0f (     SECT EXT) 0b     0000   0000000100001068 '___progname'
-[    40] 0000018c 03 (     ABS  EXT) 01     0010   0000000100000000 '__mh_execute_header'
-[    41] 000001a0 0f (     SECT EXT) 01     0000   0000000100000dd0 '_a'
-[    42] 000001a3 0f (     SECT EXT) 01     0000   0000000100000df0 '_aa'
-[    43] 000001a7 0f (     SECT EXT) 01     0000   0000000100000e10 '_b'
-[    44] 000001aa 0f (     SECT EXT) 01     0000   0000000100000e30 '_bb'
-[    45] 000001ae 0f (     SECT EXT) 0b     0000   0000000100001060 '_environ'
-[    46] 000001b7 0f (     SECT EXT) 01     0000   0000000100000d70 '_main'
-[    47] 000001bd 0f (     SECT EXT) 01     0000   0000000100000d30 'start'
-[    48] 000001c3 01 (     UNDF EXT) 00     0100   0000000000000000 '_exit'
-[    49] 000001c9 01 (     UNDF EXT) 00     0100   0000000000000000 '_printf'
-[    50] 000001d1 01 (     UNDF EXT) 00     0100   0000000000000000 'dyld_stub_binder'
-
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/archives/TestBSDArchives.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/archives/TestBSDArchives.py
deleted file mode 100644 (file)
index b412ac4..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-"""Test breaking inside functions defined within a BSD archive file libfoo.a."""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class BSDArchivesTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number in a(int) to break at.
-        self.line = line_number(
-            'a.c', '// Set file and line breakpoint inside a().')
-
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24527.  Makefile.rules doesn't know how to build static libs on Windows")
-    def test(self):
-        """Break inside a() and b() defined within libfoo.a."""
-        self.build()
-
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break inside a() by file and line first.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "a.c", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Break at a(int) first.
-        self.expect("frame variable", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['(int) arg = 1'])
-        self.expect("frame variable __a_global", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['(int) __a_global = 1'])
-
-        # Set breakpoint for b() next.
-        lldbutil.run_break_set_by_symbol(
-            self, "b", num_expected_locations=1, sym_exact=True)
-
-        # Continue the program, we should break at b(int) next.
-        self.runCmd("continue")
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-        self.expect("frame variable", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['(int) arg = 2'])
-        self.expect("frame variable __b_global", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['(int) __b_global = 2'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/archives/a.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/archives/a.c
deleted file mode 100644 (file)
index c8d226a..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-//===-- a.c -----------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-int __a_global = 1;
-
-int a(int arg) {
-    int result = arg + __a_global;
-    return result; // Set file and line breakpoint inside a().
-}
-
-int aa(int arg1) {
-    int result1 = arg1 - __a_global;
-    return result1;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/archives/b.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/archives/b.c
deleted file mode 100644 (file)
index 6510b97..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-//===-- b.c -----------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-static int __b_global = 2;
-
-int b(int arg) {
-    int result = arg + __b_global;
-    return result;
-}
-
-int bb(int arg1) {
-    int result2 = arg1 - __b_global;
-    return result2;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/archives/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/archives/main.c
deleted file mode 100644 (file)
index 1525a1a..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-extern int a(int);
-extern int b(int);
-int main (int argc, char const *argv[])
-{
-    printf ("a(1) returns %d\n", a(1));
-    printf ("b(2) returns %d\n", b(2));
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/asan/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/asan/Makefile
deleted file mode 100644 (file)
index 4913a18..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-C_SOURCES := main.c
-CFLAGS_EXTRAS := -fsanitize=address -g -gcolumn-info
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/asan/TestMemoryHistory.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/asan/TestMemoryHistory.py
deleted file mode 100644 (file)
index 4df3151..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-"""
-Test that ASan memory history provider returns correct stack traces
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbplatform
-from lldbsuite.test import lldbutil
-
-
-class AsanTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # llvm.org/pr21136 runtimes not yet available by default
-    @expectedFailureNetBSD
-    @skipUnlessAddressSanitizer
-    def test(self):
-        self.build()
-        self.asan_tests()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        self.line_malloc = line_number('main.c', '// malloc line')
-        self.line_malloc2 = line_number('main.c', '// malloc2 line')
-        self.line_free = line_number('main.c', '// free line')
-        self.line_breakpoint = line_number('main.c', '// break line')
-
-    def asan_tests(self):
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        self.registerSanitizerLibrariesWithTarget(target)
-
-        self.runCmd("breakpoint set -f main.c -l %d" % self.line_breakpoint)
-
-        # "memory history" command should not work without a process
-        self.expect("memory history 0",
-                    error=True,
-                    substrs=["invalid process"])
-
-        self.runCmd("run")
-
-        stop_reason = self.dbg.GetSelectedTarget().process.GetSelectedThread().GetStopReason()
-        if stop_reason == lldb.eStopReasonExec:
-            # On OS X 10.10 and older, we need to re-exec to enable
-            # interceptors.
-            self.runCmd("continue")
-
-        # the stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped', 'stop reason = breakpoint'])
-
-        # test that the ASan dylib is present
-        self.expect(
-            "image lookup -n __asan_describe_address",
-            "__asan_describe_address should be present",
-            substrs=['1 match found'])
-
-        # test the 'memory history' command
-        self.expect(
-            "memory history 'pointer'",
-            substrs=[
-                'Memory allocated by Thread',
-                'a.out`f1',
-                'main.c:%d' %
-                self.line_malloc,
-                'Memory deallocated by Thread',
-                'a.out`f2',
-                'main.c:%d' %
-                self.line_free])
-
-        # do the same using SB API
-        process = self.dbg.GetSelectedTarget().process
-        val = process.GetSelectedThread().GetSelectedFrame().EvaluateExpression("pointer")
-        addr = val.GetValueAsUnsigned()
-        threads = process.GetHistoryThreads(addr)
-        self.assertEqual(threads.GetSize(), 2)
-
-        history_thread = threads.GetThreadAtIndex(0)
-        self.assertTrue(history_thread.num_frames >= 2)
-        self.assertEqual(history_thread.frames[1].GetLineEntry(
-        ).GetFileSpec().GetFilename(), "main.c")
-        self.assertEqual(
-            history_thread.frames[1].GetLineEntry().GetLine(),
-            self.line_free)
-
-        history_thread = threads.GetThreadAtIndex(1)
-        self.assertTrue(history_thread.num_frames >= 2)
-        self.assertEqual(history_thread.frames[1].GetLineEntry(
-        ).GetFileSpec().GetFilename(), "main.c")
-        self.assertEqual(
-            history_thread.frames[1].GetLineEntry().GetLine(),
-            self.line_malloc)
-
-        # let's free the container (SBThreadCollection) and see if the
-        # SBThreads still live
-        threads = None
-        self.assertTrue(history_thread.num_frames >= 2)
-        self.assertEqual(history_thread.frames[1].GetLineEntry(
-        ).GetFileSpec().GetFilename(), "main.c")
-        self.assertEqual(
-            history_thread.frames[1].GetLineEntry().GetLine(),
-            self.line_malloc)
-
-        # ASan will break when a report occurs and we'll try the API then
-        self.runCmd("continue")
-
-        self.expect(
-            "thread list",
-            "Process should be stopped due to ASan report",
-            substrs=[
-                'stopped',
-                'stop reason = Use of deallocated memory'])
-
-        # make sure the 'memory history' command still works even when we're
-        # generating a report now
-        self.expect(
-            "memory history 'another_pointer'",
-            substrs=[
-                'Memory allocated by Thread',
-                'a.out`f1',
-                'main.c:%d' %
-                self.line_malloc2])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/asan/TestReportData.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/asan/TestReportData.py
deleted file mode 100644 (file)
index 0ca4843..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-"""
-Test the AddressSanitizer runtime support for report breakpoint and data extraction.
-"""
-
-
-
-import json
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class AsanTestReportDataCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # llvm.org/pr21136 runtimes not yet available by default
-    @expectedFailureNetBSD
-    @skipUnlessAddressSanitizer
-    @skipIf(archs=['i386'], bugnumber="llvm.org/PR36710")
-    def test(self):
-        self.build()
-        self.asan_tests()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        self.line_malloc = line_number('main.c', '// malloc line')
-        self.line_malloc2 = line_number('main.c', '// malloc2 line')
-        self.line_free = line_number('main.c', '// free line')
-        self.line_breakpoint = line_number('main.c', '// break line')
-        self.line_crash = line_number('main.c', '// BOOM line')
-        self.col_crash = 16
-
-    def asan_tests(self):
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        self.registerSanitizerLibrariesWithTarget(target)
-
-        self.runCmd("run")
-
-        stop_reason = self.dbg.GetSelectedTarget().process.GetSelectedThread().GetStopReason()
-        if stop_reason == lldb.eStopReasonExec:
-            # On OS X 10.10 and older, we need to re-exec to enable
-            # interceptors.
-            self.runCmd("continue")
-
-        self.expect(
-            "thread list",
-            "Process should be stopped due to ASan report",
-            substrs=[
-                'stopped',
-                'stop reason = Use of deallocated memory'])
-
-        self.assertEqual(
-            self.dbg.GetSelectedTarget().process.GetSelectedThread().GetStopReason(),
-            lldb.eStopReasonInstrumentation)
-
-        self.expect("bt", "The backtrace should show the crashing line",
-                    substrs=['main.c:%d:%d' % (self.line_crash, self.col_crash)])
-
-        self.expect(
-            "thread info -s",
-            "The extended stop info should contain the ASan provided fields",
-            substrs=[
-                "access_size",
-                "access_type",
-                "address",
-                "pc",
-                "description",
-                "heap-use-after-free"])
-
-        output_lines = self.res.GetOutput().split('\n')
-        json_line = '\n'.join(output_lines[2:])
-        data = json.loads(json_line)
-        self.assertEqual(data["description"], "heap-use-after-free")
-        self.assertEqual(data["instrumentation_class"], "AddressSanitizer")
-        self.assertEqual(data["stop_type"], "fatal_error")
-
-        # now let's try the SB API
-        process = self.dbg.GetSelectedTarget().process
-        thread = process.GetSelectedThread()
-
-        s = lldb.SBStream()
-        self.assertTrue(thread.GetStopReasonExtendedInfoAsJSON(s))
-        s = s.GetData()
-        data2 = json.loads(s)
-        self.assertEqual(data, data2)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/asan/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/asan/main.c
deleted file mode 100644 (file)
index 45f9f4f..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-#include <stdlib.h>
-
-char *pointer;
-char *another_pointer;
-
-void f1() {
-    pointer = malloc(10); // malloc line
-    another_pointer = malloc(20); // malloc2 line
-}
-
-void f2() {
-    free(pointer); // free line
-}
-
-int main (int argc, char const *argv[])
-{
-    f1();
-    f2();
-
-    printf("Hello world!\n"); // break line
-
-    pointer[0] = 'A'; // BOOM line
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/avoids-fd-leak/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/avoids-fd-leak/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/avoids-fd-leak/TestFdLeak.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/avoids-fd-leak/TestFdLeak.py
deleted file mode 100644 (file)
index a984254..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-"""
-Test whether a process started by lldb has no extra file descriptors open.
-"""
-
-
-
-import lldb
-from lldbsuite.test import lldbutil
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-
-
-def python_leaky_fd_version(test):
-    import sys
-    # Python random module leaks file descriptors on some versions.
-    if sys.version_info >= (2, 7, 8) and sys.version_info < (2, 7, 10):
-        return "Python random module leaks file descriptors in this python version"
-    return None
-
-
-class AvoidsFdLeakTestCase(TestBase):
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailure(python_leaky_fd_version, "bugs.freebsd.org/197376")
-    @expectedFailureAll(
-        oslist=['freebsd'],
-        bugnumber="llvm.org/pr25624 still failing with Python 2.7.10")
-    # The check for descriptor leakage needs to be implemented differently
-    # here.
-    @skipIfWindows
-    @skipIfTargetAndroid()  # Android have some other file descriptors open by the shell
-    @skipIfDarwinEmbedded # <rdar://problem/33888742>  # debugserver on ios has an extra fd open on launch
-    def test_fd_leak_basic(self):
-        self.do_test([])
-
-    @expectedFailure(python_leaky_fd_version, "bugs.freebsd.org/197376")
-    @expectedFailureAll(
-        oslist=['freebsd'],
-        bugnumber="llvm.org/pr25624 still failing with Python 2.7.10")
-    # The check for descriptor leakage needs to be implemented differently
-    # here.
-    @skipIfWindows
-    @skipIfTargetAndroid()  # Android have some other file descriptors open by the shell
-    @skipIfDarwinEmbedded # <rdar://problem/33888742>  # debugserver on ios has an extra fd open on launch
-    def test_fd_leak_log(self):
-        self.do_test(["log enable -f '/dev/null' lldb commands"])
-
-    def do_test(self, commands):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        for c in commands:
-            self.runCmd(c)
-
-        target = self.dbg.CreateTarget(exe)
-
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        self.assertTrue(
-            process.GetState() == lldb.eStateExited,
-            "Process should have exited.")
-        self.assertTrue(
-            process.GetExitStatus() == 0,
-            "Process returned non-zero status. Were incorrect file descriptors passed?")
-
-    @expectedFailure(python_leaky_fd_version, "bugs.freebsd.org/197376")
-    @expectedFailureAll(
-        oslist=['freebsd'],
-        bugnumber="llvm.org/pr25624 still failing with Python 2.7.10")
-    # The check for descriptor leakage needs to be implemented differently
-    # here.
-    @skipIfWindows
-    @skipIfTargetAndroid()  # Android have some other file descriptors open by the shell
-    @skipIfDarwinEmbedded # <rdar://problem/33888742>  # debugserver on ios has an extra fd open on launch
-    def test_fd_leak_multitarget(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        breakpoint = target.BreakpointCreateBySourceRegex(
-            'Set breakpoint here', lldb.SBFileSpec("main.c", False))
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        process1 = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process1, PROCESS_IS_VALID)
-        self.assertTrue(
-            process1.GetState() == lldb.eStateStopped,
-            "Process should have been stopped.")
-
-        target2 = self.dbg.CreateTarget(exe)
-        process2 = target2.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process2, PROCESS_IS_VALID)
-
-        self.assertTrue(
-            process2.GetState() == lldb.eStateExited,
-            "Process should have exited.")
-        self.assertTrue(
-            process2.GetExitStatus() == 0,
-            "Process returned non-zero status. Were incorrect file descriptors passed?")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/avoids-fd-leak/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/avoids-fd-leak/main.c
deleted file mode 100644 (file)
index 5bdf227..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <errno.h>
-#include <stdio.h>
-
-int
-main (int argc, char const **argv)
-{
-    struct stat buf;
-    int i, rv = 0; // Set breakpoint here.
-
-    // Make sure stdin/stdout/stderr exist.
-    for (i = 0; i <= 2; ++i) {
-        if (fstat(i, &buf) != 0)
-            return 1;
-    }
-
-    // Make sure no other file descriptors are open.
-    for (i = 3; i <= 256; ++i) {
-        if (fstat(i, &buf) == 0 || errno != EBADF) {
-            fprintf(stderr, "File descriptor %d is open.\n", i);
-            rv = 2;
-        }
-    }
-
-    return rv;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/backticks/.categories b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/backticks/.categories
deleted file mode 100644 (file)
index 3a3f4df..0000000
+++ /dev/null
@@ -1 +0,0 @@
-cmdline
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/backticks/TestBackticksWithoutATarget.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/backticks/TestBackticksWithoutATarget.py
deleted file mode 100644 (file)
index fdef89c..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-"""
-Test that backticks without a target should work (not infinite looping).
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class BackticksWithNoTargetTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    def test_backticks_no_target(self):
-        """A simple test of backticks without a target."""
-        self.expect("print `1+2-3`",
-                    substrs=[' = 0'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/Makefile
deleted file mode 100644 (file)
index 695335e..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-C_SOURCES := main.c
-CFLAGS_EXTRAS := -std=c99
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestAddressBreakpoints.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestAddressBreakpoints.py
deleted file mode 100644 (file)
index 6b42b51..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-"""
-Test address breakpoints set with shared library of SBAddress work correctly.
-"""
-
-
-
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbtest import *
-
-
-class AddressBreakpointTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_address_breakpoints(self):
-        """Test address breakpoints set with shared library of SBAddress work correctly."""
-        self.build()
-        self.address_breakpoints()
-
-    def address_breakpoints(self):
-        """Test address breakpoints set with shared library of SBAddress work correctly."""
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create a breakpoint on main.c by name 'c'.
-        breakpoint = target.BreakpointCreateBySourceRegex(
-            "Set a breakpoint here", lldb.SBFileSpec("main.c"))
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() >= 1,
-                        VALID_BREAKPOINT)
-
-        # Get the breakpoint location from breakpoint after we verified that,
-        # indeed, it has one location.
-        location = breakpoint.GetLocationAtIndex(0)
-        self.assertTrue(location and
-                        location.IsEnabled(),
-                        VALID_BREAKPOINT_LOCATION)
-
-        # Next get the address from the location, and create an address breakpoint using
-        # that address:
-
-        address = location.GetAddress()
-        target.BreakpointDelete(breakpoint.GetID())
-
-        breakpoint = target.BreakpointCreateBySBAddress(address)
-
-        # Disable ASLR.  This will allow us to actually test (on platforms that support this flag)
-        # that the breakpoint was able to track the module.
-
-        launch_info = lldb.SBLaunchInfo(None)
-        flags = launch_info.GetLaunchFlags()
-        flags &= ~lldb.eLaunchFlagDisableASLR
-        launch_info.SetLaunchFlags(flags)
-
-        error = lldb.SBError()
-
-        process = target.Launch(launch_info, error)
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Did we hit our breakpoint?
-        from lldbsuite.test.lldbutil import get_threads_stopped_at_breakpoint
-        threads = get_threads_stopped_at_breakpoint(process, breakpoint)
-        self.assertTrue(
-            len(threads) == 1,
-            "There should be a thread stopped at our breakpoint")
-
-        # The hit count for the breakpoint should be 1.
-        self.assertTrue(breakpoint.GetHitCount() == 1)
-
-        process.Kill()
-
-        # Now re-launch and see that we hit the breakpoint again:
-        launch_info.Clear()
-        launch_info.SetLaunchFlags(flags)
-
-        process = target.Launch(launch_info, error)
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        thread = get_threads_stopped_at_breakpoint(process, breakpoint)
-        self.assertTrue(
-            len(threads) == 1,
-            "There should be a thread stopped at our breakpoint")
-
-        # The hit count for the breakpoint should now be 2.
-        self.assertTrue(breakpoint.GetHitCount() == 2)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestBadAddressBreakpoints.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestBadAddressBreakpoints.py
deleted file mode 100644 (file)
index 6d468e0..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-"""
-Test that breakpoints set on a bad address say they are bad.
-"""
-
-
-
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbtest import *
-
-
-class BadAddressBreakpointTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_bad_address_breakpoints(self):
-        """Test that breakpoints set on a bad address say they are bad."""
-        self.build()
-        self.address_breakpoints()
-
-    def address_breakpoints(self):
-        """Test that breakpoints set on a bad address say they are bad."""
-        target, process, thread, bkpt = \
-            lldbutil.run_to_source_breakpoint(self,
-                                              "Set a breakpoint here",
-                                              lldb.SBFileSpec("main.c"))
-
-        # Now see if we can read from 0.  If I can't do that, I don't
-        # have a good way to know what an illegal address is...
-        error = lldb.SBError()
-
-        ptr = process.ReadPointerFromMemory(0x0, error)
-
-        if not error.Success():
-            bkpt = target.BreakpointCreateByAddress(0x0)
-            for bp_loc in bkpt:
-                self.assertTrue(bp_loc.IsResolved() == False)
-        else:
-            self.fail(
-                "Could not find an illegal address at which to set a bad breakpoint.")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/main.c
deleted file mode 100644 (file)
index 6b77929..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <stdio.h>
-
-int
-main()
-{
-    printf ("Set a breakpoint here.\n");
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/Makefile
deleted file mode 100644 (file)
index 695335e..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-C_SOURCES := main.c
-CFLAGS_EXTRAS := -std=c99
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/TestBreakpointAutoContinue.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/TestBreakpointAutoContinue.py
deleted file mode 100644 (file)
index e0b727e..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-"""
-Test that the breakpoint auto-continue flag works correctly.
-"""
-
-
-
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbtest import *
-
-
-class BreakpointAutoContinue(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_breakpoint_auto_continue(self):
-        """Make sure the auto continue continues with no other complications"""
-        self.build()
-        self.simple_auto_continue()
-
-    def test_auto_continue_with_command(self):
-        """Add a command, make sure the command gets run"""
-        self.build()
-        self.auto_continue_with_command()
-
-    def test_auto_continue_on_location(self):
-        """Set auto-continue on a location and make sure only that location continues"""
-        self.build()
-        self.auto_continue_location()
-
-    def make_target_and_bkpt(self, additional_options=None, num_expected_loc=1,
-                             pattern="Set a breakpoint here"):
-        exe = self.getBuildArtifact("a.out")
-        self.target = self.dbg.CreateTarget(exe)
-        self.assertTrue(self.target.IsValid(), "Target is not valid")
-
-        extra_options_txt = "--auto-continue 1 "
-        if additional_options:
-            extra_options_txt += additional_options
-        bpno = lldbutil.run_break_set_by_source_regexp(self, pattern,
-                                            extra_options = extra_options_txt,
-                                            num_expected_locations = num_expected_loc)
-        return bpno
-
-    def launch_it (self, expected_state):
-        error = lldb.SBError()
-        launch_info = lldb.SBLaunchInfo(None)
-        launch_info.SetWorkingDirectory(self.get_process_working_directory())
-
-        process = self.target.Launch(launch_info, error)
-        self.assertTrue(error.Success(), "Launch failed.")
-
-        state = process.GetState()
-        self.assertEqual(state, expected_state, "Didn't get expected state")
-
-        return process
-
-    def simple_auto_continue(self):
-        bpno = self.make_target_and_bkpt()
-        process = self.launch_it(lldb.eStateExited)
-
-        bkpt = self.target.FindBreakpointByID(bpno)
-        self.assertEqual(bkpt.GetHitCount(), 2, "Should have run through the breakpoint twice")
-
-    def auto_continue_with_command(self):
-        bpno = self.make_target_and_bkpt("-N BKPT -C 'break modify --auto-continue 0 BKPT'")
-        process = self.launch_it(lldb.eStateStopped)
-        state = process.GetState()
-        self.assertEqual(state, lldb.eStateStopped, "Process should be stopped")
-        bkpt = self.target.FindBreakpointByID(bpno)
-        threads = lldbutil.get_threads_stopped_at_breakpoint(process, bkpt)
-        self.assertEqual(len(threads), 1, "There was a thread stopped at our breakpoint")
-        self.assertEqual(bkpt.GetHitCount(), 2, "Should have hit the breakpoint twice")
-
-    def auto_continue_location(self):
-        bpno = self.make_target_and_bkpt(pattern="Set a[^ ]* breakpoint here", num_expected_loc=2)
-        bkpt = self.target.FindBreakpointByID(bpno)
-        bkpt.SetAutoContinue(False)
-
-        loc = lldb.SBBreakpointLocation()
-        for i in range(0,2):
-            func_name = bkpt.location[i].GetAddress().function.name
-            if func_name == "main":
-                loc = bkpt.location[i]
-
-        self.assertTrue(loc.IsValid(), "Didn't find a location in main")
-        loc.SetAutoContinue(True)
-
-        process = self.launch_it(lldb.eStateStopped)
-
-        threads = lldbutil.get_threads_stopped_at_breakpoint(process, bkpt)
-        self.assertEqual(len(threads), 1, "Didn't get one thread stopped at our breakpoint")
-        func_name = threads[0].frame[0].function.name
-        self.assertEqual(func_name, "call_me")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/main.c
deleted file mode 100644 (file)
index a37f05e..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <stdio.h>
-
-void
-call_me()
-{
-  printf("Set another breakpoint here.\n");
-}
-
-int
-main()
-{
-  int change_me = 0;
-  for (int i = 0; i < 2; i++)
-  {
-    printf ("Set a breakpoint here: %d with: %d.\n", i, change_me);
-  }
-  call_me();
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_by_line_and_column/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_by_line_and_column/Makefile
deleted file mode 100644 (file)
index ad42b20..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-C_SOURCES := main.c
-CFLAGS_EXTRAS := -std=c99 -gcolumn-info
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_by_line_and_column/TestBreakpointByLineAndColumn.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_by_line_and_column/TestBreakpointByLineAndColumn.py
deleted file mode 100644 (file)
index 98fe433..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-"""
-Test setting a breakpoint by line and column.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class BreakpointByLineAndColumnTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    ## Skip gcc version less 7.1 since it doesn't support -gcolumn-info
-    @skipIf(compiler="gcc", compiler_version=['<', '7.1'])
-    def testBreakpointByLineAndColumn(self):
-        self.build()
-        main_c = lldb.SBFileSpec("main.c")
-        _, _, _, breakpoint = lldbutil.run_to_line_breakpoint(self,
-                                                              main_c, 19, 50)
-        self.expect("fr v did_call", substrs='1')
-        in_then = False
-        for i in range(breakpoint.GetNumLocations()):
-            b_loc = breakpoint.GetLocationAtIndex(i).GetAddress().GetLineEntry()
-            self.assertEqual(b_loc.GetLine(), 19)
-            in_then |= b_loc.GetColumn() == 50
-        self.assertTrue(in_then)
-
-    ## Skip gcc version less 7.1 since it doesn't support -gcolumn-info
-    @skipIf(compiler="gcc", compiler_version=['<', '7.1'])
-    def testBreakpointByLine(self):
-        self.build()
-        main_c = lldb.SBFileSpec("main.c")
-        _, _, _, breakpoint = lldbutil.run_to_line_breakpoint(self, main_c, 19)
-        self.expect("fr v did_call", substrs='0')
-        in_condition = False
-        for i in range(breakpoint.GetNumLocations()):
-            b_loc = breakpoint.GetLocationAtIndex(i).GetAddress().GetLineEntry()
-            self.assertEqual(b_loc.GetLine(), 19)
-            in_condition |= b_loc.GetColumn() < 30
-        self.assertTrue(in_condition)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_by_line_and_column/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_by_line_and_column/main.c
deleted file mode 100644 (file)
index f9adad3..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-int square(int x)
-{
-  return x * x;
-}
-
-int main (int argc, char const *argv[])
-{
-  int did_call = 0;
-
-  // Line 20.                                    v Column 50.
-  if(square(argc+1) != 0) { did_call = 1; return square(argc); }
-  //                                             ^
-  return square(0);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/Makefile
deleted file mode 100644 (file)
index 8d669cb..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c a.c b.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
deleted file mode 100644 (file)
index 77db8f7..0000000
+++ /dev/null
@@ -1,287 +0,0 @@
-"""
-Test lldb breakpoint command add/list/delete.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-import side_effect
-
-
-class BreakpointCommandTestCase(TestBase):
-
-    NO_DEBUG_INFO_TESTCASE = True
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24528")
-    def not_test_breakpoint_command_sequence(self):
-        """Test a sequence of breakpoint command add, list, and delete."""
-        self.build()
-        self.breakpoint_command_sequence()
-
-    @skipIf(oslist=["windows"], bugnumber="llvm.org/pr44431")
-    def test_script_parameters(self):
-        """Test a sequence of breakpoint command add, list, and delete."""
-        self.build()
-        self.breakpoint_command_script_parameters()
-
-    def test_commands_on_creation(self):
-        self.build()
-        self.breakpoint_commands_on_creation()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line = line_number('main.c', '// Set break point at this line.')
-        # disable "There is a running process, kill it and restart?" prompt
-        self.runCmd("settings set auto-confirm true")
-        self.addTearDownHook(
-            lambda: self.runCmd("settings clear auto-confirm"))
-
-    def test_delete_all_breakpoints(self):
-        """Test that deleting all breakpoints works."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_symbol(self, "main")
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.runCmd("breakpoint delete")
-        self.runCmd("process continue")
-        self.expect("process status", PROCESS_STOPPED,
-                    patterns=['Process .* exited with status = 0'])
-
-
-    def breakpoint_command_sequence(self):
-        """Test a sequence of breakpoint command add, list, and delete."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Add three breakpoints on the same line.  The first time we don't specify the file,
-        # since the default file is the one containing main:
-        lldbutil.run_break_set_by_file_and_line(
-            self, None, self.line, num_expected_locations=1, loc_exact=True)
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", self.line, num_expected_locations=1, loc_exact=True)
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", self.line, num_expected_locations=1, loc_exact=True)
-        # Breakpoint 4 - set at the same location as breakpoint 1 to test
-        # setting breakpoint commands on two breakpoints at a time
-        lldbutil.run_break_set_by_file_and_line(
-            self, None, self.line, num_expected_locations=1, loc_exact=True)
-        # Make sure relative path source breakpoints work as expected. We test
-        # with partial paths with and without "./" prefixes.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "./main.c", self.line,
-            num_expected_locations=1, loc_exact=True)
-        lldbutil.run_break_set_by_file_and_line(
-            self, "breakpoint_command/main.c", self.line,
-            num_expected_locations=1, loc_exact=True)
-        lldbutil.run_break_set_by_file_and_line(
-            self, "./breakpoint_command/main.c", self.line,
-            num_expected_locations=1, loc_exact=True)
-        lldbutil.run_break_set_by_file_and_line(
-            self, "breakpoint/breakpoint_command/main.c", self.line,
-            num_expected_locations=1, loc_exact=True)
-        lldbutil.run_break_set_by_file_and_line(
-            self, "./breakpoint/breakpoint_command/main.c", self.line,
-            num_expected_locations=1, loc_exact=True)
-        # Test relative breakpoints with incorrect paths and make sure we get
-        # no breakpoint locations
-        lldbutil.run_break_set_by_file_and_line(
-            self, "invalid/main.c", self.line,
-            num_expected_locations=0, loc_exact=True)
-        lldbutil.run_break_set_by_file_and_line(
-            self, "./invalid/main.c", self.line,
-            num_expected_locations=0, loc_exact=True)
-        # Now add callbacks for the breakpoints just created.
-        self.runCmd(
-            "breakpoint command add -s command -o 'frame variable --show-types --scope' 1 4")
-        self.runCmd(
-            "breakpoint command add -s python -o 'import side_effect; side_effect.one_liner = \"one liner was here\"' 2")
-
-        import side_effect
-        self.runCmd("command script import --allow-reload ./bktptcmd.py")
-
-        self.runCmd(
-            "breakpoint command add --python-function bktptcmd.function 3")
-
-        # Check that the breakpoint commands are correctly set.
-
-        # The breakpoint list now only contains breakpoint 1.
-        self.expect(
-            "breakpoint list", "Breakpoints 1 & 2 created", substrs=[
-                "2: file = 'main.c', line = %d, exact_match = 0, locations = 1" %
-                self.line], patterns=[
-                "1: file = '.*main.c', line = %d, exact_match = 0, locations = 1" %
-                self.line])
-
-        self.expect(
-            "breakpoint list -f",
-            "Breakpoints 1 & 2 created",
-            substrs=[
-                "2: file = 'main.c', line = %d, exact_match = 0, locations = 1" %
-                self.line],
-            patterns=[
-                "1: file = '.*main.c', line = %d, exact_match = 0, locations = 1" %
-                self.line,
-                "1.1: .+at main.c:%d:?[0-9]*, .+unresolved, hit count = 0" %
-                self.line,
-                "2.1: .+at main.c:%d:?[0-9]*, .+unresolved, hit count = 0" %
-                self.line])
-
-        self.expect("breakpoint command list 1", "Breakpoint 1 command ok",
-                    substrs=["Breakpoint commands:",
-                             "frame variable --show-types --scope"])
-        self.expect("breakpoint command list 2", "Breakpoint 2 command ok",
-                    substrs=["Breakpoint commands (Python):",
-                             "import side_effect",
-                             "side_effect.one_liner"])
-        self.expect("breakpoint command list 3", "Breakpoint 3 command ok",
-                    substrs=["Breakpoint commands (Python):",
-                             "bktptcmd.function(frame, bp_loc, internal_dict)"])
-
-        self.expect("breakpoint command list 4", "Breakpoint 4 command ok",
-                    substrs=["Breakpoint commands:",
-                             "frame variable --show-types --scope"])
-
-        self.runCmd("breakpoint delete 4")
-
-        # Next lets try some other breakpoint kinds.  First break with a regular expression
-        # and then specify only one file.  The first time we should get two locations,
-        # the second time only one:
-
-        lldbutil.run_break_set_by_regexp(
-            self, r"._MyFunction", num_expected_locations=2)
-
-        lldbutil.run_break_set_by_regexp(
-            self,
-            r"._MyFunction",
-            extra_options="-f a.c",
-            num_expected_locations=1)
-
-        lldbutil.run_break_set_by_regexp(
-            self,
-            r"._MyFunction",
-            extra_options="-f a.c -f b.c",
-            num_expected_locations=2)
-
-        # Now try a source regex breakpoint:
-        lldbutil.run_break_set_by_source_regexp(
-            self,
-            r"is about to return [12]0",
-            extra_options="-f a.c -f b.c",
-            num_expected_locations=2)
-
-        lldbutil.run_break_set_by_source_regexp(
-            self,
-            r"is about to return [12]0",
-            extra_options="-f a.c",
-            num_expected_locations=1)
-
-        # Reset our canary variables and run the program.
-        side_effect.one_liner = None
-        side_effect.bktptcmd = None
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # Check the value of canary variables.
-        self.assertEquals("one liner was here", side_effect.one_liner)
-        self.assertEquals("function was here", side_effect.bktptcmd)
-
-        # Finish the program.
-        self.runCmd("process continue")
-
-        # Remove the breakpoint command associated with breakpoint 1.
-        self.runCmd("breakpoint command delete 1")
-
-        # Remove breakpoint 2.
-        self.runCmd("breakpoint delete 2")
-
-        self.expect(
-            "breakpoint command list 1",
-            startstr="Breakpoint 1 does not have an associated command.")
-        self.expect(
-            "breakpoint command list 2",
-            error=True,
-            startstr="error: '2' is not a currently valid breakpoint ID.")
-
-        # The breakpoint list now only contains breakpoint 1.
-        self.expect(
-            "breakpoint list -f",
-            "Breakpoint 1 exists",
-            patterns=[
-                "1: file = '.*main.c', line = %d, exact_match = 0, locations = 1, resolved = 1" %
-                self.line,
-                "hit count = 1"])
-
-        # Not breakpoint 2.
-        self.expect(
-            "breakpoint list -f",
-            "No more breakpoint 2",
-            matching=False,
-            substrs=[
-                "2: file = 'main.c', line = %d, exact_match = 0, locations = 1, resolved = 1" %
-                self.line])
-
-        # Run the program again, with breakpoint 1 remaining.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # We should be stopped again due to breakpoint 1.
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 2.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_TWICE,
-                    substrs=['resolved, hit count = 2'])
-
-    def breakpoint_command_script_parameters(self):
-        """Test that the frame and breakpoint location are being properly passed to the script breakpoint command function."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Add a breakpoint.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", self.line, num_expected_locations=1, loc_exact=True)
-
-        # Now add callbacks for the breakpoints just created.
-        self.runCmd("breakpoint command add -s python -o 'import side_effect; side_effect.frame = str(frame); side_effect.bp_loc = str(bp_loc)' 1")
-
-        # Reset canary variables and run.
-        side_effect.frame = None
-        side_effect.bp_loc = None
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.expect(side_effect.frame, exe=False, startstr="frame #0:")
-        self.expect(side_effect.bp_loc, exe=False,
-                patterns=["1.* where = .*main .* resolved, hit count = 1"])
-
-    def breakpoint_commands_on_creation(self):
-        """Test that setting breakpoint commands when creating the breakpoint works"""
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target.IsValid(), "Created an invalid target.")
-
-        # Add a breakpoint.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", self.line, num_expected_locations=1, loc_exact=True,
-            extra_options='-C bt -C "thread list" -C continue')
-
-        bkpt = target.FindBreakpointByID(1)
-        self.assertTrue(bkpt.IsValid(), "Couldn't find breakpoint 1")
-        com_list = lldb.SBStringList()
-        bkpt.GetCommandLineCommands(com_list)
-        self.assertEqual(com_list.GetSize(), 3, "Got the wrong number of commands")
-        self.assertEqual(com_list.GetStringAtIndex(0), "bt", "First bt")
-        self.assertEqual(com_list.GetStringAtIndex(1), "thread list", "Next thread list")
-        self.assertEqual(com_list.GetStringAtIndex(2), "continue", "Last continue")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py
deleted file mode 100644 (file)
index 15a3120..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-"""
-Test that you can set breakpoint commands successfully with the Python API's:
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-import side_effect
-
-
-class PythonBreakpointCommandSettingTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @add_test_categories(['pyapi'])
-    def test_step_out_python(self):
-        """Test stepping out using a python breakpoint command."""
-        self.build()
-        self.do_set_python_command_from_python()
-
-    def test_bkpt_cmd_bad_arguments(self):
-        """Test what happens when pass structured data to a command:"""
-        self.build()
-        self.do_bad_args_to_python_command()
-        
-    def setUp(self):
-        TestBase.setUp(self)
-        self.main_source = "main.c"
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-
-    def do_set_python_command_from_python(self):
-        exe = self.getBuildArtifact("a.out")
-        error = lldb.SBError()
-
-        self.target = self.dbg.CreateTarget(exe)
-        self.assertTrue(self.target, VALID_TARGET)
-
-        body_bkpt = self.target.BreakpointCreateBySourceRegex(
-            "Set break point at this line.", self.main_source_spec)
-        self.assertTrue(body_bkpt, VALID_BREAKPOINT)
-
-        func_bkpt = self.target.BreakpointCreateBySourceRegex(
-            "Set break point at this line.", self.main_source_spec)
-        self.assertTrue(func_bkpt, VALID_BREAKPOINT)
-
-        fancy_bkpt = self.target.BreakpointCreateBySourceRegex(
-            "Set break point at this line.", self.main_source_spec)
-        self.assertTrue(fancy_bkpt, VALID_BREAKPOINT)
-
-        fancier_bkpt = self.target.BreakpointCreateBySourceRegex(
-            "Set break point at this line.", self.main_source_spec)
-        self.assertTrue(fancier_bkpt, VALID_BREAKPOINT)
-
-        not_so_fancy_bkpt = self.target.BreakpointCreateBySourceRegex(
-            "Set break point at this line.", self.main_source_spec)
-        self.assertTrue(not_so_fancy_bkpt, VALID_BREAKPOINT)
-
-        # Also test that setting a source regex breakpoint with an empty file
-        # spec list sets it on all files:
-        no_files_bkpt = self.target.BreakpointCreateBySourceRegex(
-            "Set a breakpoint here", lldb.SBFileSpecList(), lldb.SBFileSpecList())
-        self.assertTrue(no_files_bkpt, VALID_BREAKPOINT)
-        num_locations = no_files_bkpt.GetNumLocations()
-        self.assertTrue(
-            num_locations >= 2,
-            "Got at least two breakpoint locations")
-        got_one_in_A = False
-        got_one_in_B = False
-        for idx in range(0, num_locations):
-            comp_unit = no_files_bkpt.GetLocationAtIndex(idx).GetAddress().GetSymbolContext(
-                lldb.eSymbolContextCompUnit).GetCompileUnit().GetFileSpec()
-            print("Got comp unit: ", comp_unit.GetFilename())
-            if comp_unit.GetFilename() == "a.c":
-                got_one_in_A = True
-            elif comp_unit.GetFilename() == "b.c":
-                got_one_in_B = True
-
-        self.assertTrue(got_one_in_A, "Failed to match the pattern in A")
-        self.assertTrue(got_one_in_B, "Failed to match the pattern in B")
-        self.target.BreakpointDelete(no_files_bkpt.GetID())
-
-        error = lldb.SBError()
-        error = body_bkpt.SetScriptCallbackBody(
-                "import side_effect; side_effect.callback = 'callback was here'")
-        self.assertTrue(
-            error.Success(),
-            "Failed to set the script callback body: %s." %
-            (error.GetCString()))
-
-        self.expect("command script import --allow-reload ./bktptcmd.py")
-        
-        func_bkpt.SetScriptCallbackFunction("bktptcmd.function")
-
-        extra_args = lldb.SBStructuredData()
-        stream = lldb.SBStream()
-        stream.Print('{"side_effect" : "I am fancy"}')
-        extra_args.SetFromJSON(stream)
-        error = fancy_bkpt.SetScriptCallbackFunction("bktptcmd.another_function", extra_args)
-        self.assertTrue(error.Success(), "Failed to add callback %s"%(error.GetCString()))
-        
-        stream.Clear()
-        stream.Print('{"side_effect" : "I am so much fancier"}')
-        extra_args.SetFromJSON(stream)
-        
-        # Fancier's callback is set up from the command line
-        id = fancier_bkpt.GetID()
-        self.expect("breakpoint command add -F bktptcmd.a_third_function -k side_effect -v 'I am fancier' %d"%(id))
-
-        # Not so fancy gets an empty extra_args:
-        empty_args = lldb.SBStructuredData()
-        error = not_so_fancy_bkpt.SetScriptCallbackFunction("bktptcmd.empty_extra_args", empty_args)
-        self.assertTrue(error.Success(), "Failed to add callback %s"%(error.GetCString()))
-        
-        # Clear out canary variables
-        side_effect.bktptcmd = None
-        side_effect.callback = None
-        side_effect.fancy    = None
-        side_effect.fancier  = None
-        side_effect.not_so_fancy = None
-        
-        # Now launch the process, and do not stop at entry point.
-        self.process = self.target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(self.process, PROCESS_IS_VALID)
-
-        # Now finish, and make sure the return value is correct.
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-            self.process, body_bkpt)
-        self.assertEquals(len(threads), 1, "Stopped at inner breakpoint.")
-        self.thread = threads[0]
-
-        self.assertEquals("callback was here", side_effect.callback)
-        self.assertEquals("function was here", side_effect.bktptcmd)
-        self.assertEquals("I am fancy", side_effect.fancy)
-        self.assertEquals("I am fancier", side_effect.fancier)
-        self.assertEquals("Not so fancy", side_effect.not_so_fancy)
-
-    def do_bad_args_to_python_command(self):
-        exe = self.getBuildArtifact("a.out")
-        error = lldb.SBError()
-
-        self.target = self.dbg.CreateTarget(exe)
-        self.assertTrue(self.target, VALID_TARGET)
-
-
-        self.expect("command script import --allow-reload ./bktptcmd.py")
-
-        bkpt = self.target.BreakpointCreateBySourceRegex(
-            "Set break point at this line.", self.main_source_spec)
-        self.assertTrue(bkpt, VALID_BREAKPOINT)
-
-        # Pass a breakpoint command function that doesn't take extra_args,
-        # but pass it extra args:
-        
-        extra_args = lldb.SBStructuredData()
-        stream = lldb.SBStream()
-        stream.Print('{"side_effect" : "I am fancy"}')
-        extra_args.SetFromJSON(stream)
-
-        error = bkpt.SetScriptCallbackFunction("bktptcmd.function", extra_args)
-        self.assertTrue(error.Fail(), "Can't pass extra args if the function doesn't take them")
-
-        error = bkpt.SetScriptCallbackFunction("bktptcmd.useless_function", extra_args)
-        self.assertTrue(error.Fail(), "Can't pass extra args if the function has wrong number of args.")
-
-        error = bkpt.SetScriptCallbackFunction("bktptcmd.nosuch_function", extra_args)
-        self.assertTrue(error.Fail(), "Can't pass extra args if the function doesn't exist.")
-        
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestRegexpBreakCommand.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestRegexpBreakCommand.py
deleted file mode 100644 (file)
index ed46265..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-"""
-Test _regexp-break command which uses regular expression matching to dispatch to other built in breakpoint commands.
-"""
-
-
-
-import os
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class RegexpBreakCommandTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test(self):
-        """Test _regexp-break command."""
-        self.build()
-        self.regexp_break_command()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.source = 'main.c'
-        self.line = line_number(
-            self.source, '// Set break point at this line.')
-
-    def regexp_break_command(self):
-        """Test the super consie "b" command, which is analias for _regexp-break."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        break_results = lldbutil.run_break_set_command(
-            self, "b %d" %
-            self.line)
-        lldbutil.check_breakpoint_result(
-            self,
-            break_results,
-            file_name='main.c',
-            line_number=self.line,
-            num_locations=1)
-
-        break_results = lldbutil.run_break_set_command(
-            self, "b %s:%d" % (self.source, self.line))
-        lldbutil.check_breakpoint_result(
-            self,
-            break_results,
-            file_name='main.c',
-            line_number=self.line,
-            num_locations=1)
-
-        # Check breakpoint with full file path.
-        full_path = os.path.join(self.getSourceDir(), self.source)
-        break_results = lldbutil.run_break_set_command(
-            self, "b %s:%d" % (full_path, self.line))
-        lldbutil.check_breakpoint_result(
-            self,
-            break_results,
-            file_name='main.c',
-            line_number=self.line,
-            num_locations=1)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/a.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/a.c
deleted file mode 100644 (file)
index 870e4a6..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <stdio.h>
-
-int
-a_MyFunction ()
-{
-  // Set a breakpoint here.
-  printf ("a is about to return 10.\n");
-  return 10;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/b.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/b.c
deleted file mode 100644 (file)
index 02b78e7..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <stdio.h>
-
-int
-b_MyFunction ()
-{
-  // Set a breakpoint here.
-  printf ("b is about to return 20.\n");
-  return 20;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/bktptcmd.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/bktptcmd.py
deleted file mode 100644 (file)
index e839de5..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-from __future__ import print_function
-import side_effect
-
-def useless_function(first, second):
-    print("I have the wrong number of arguments.")
-
-def function(frame, bp_loc, dict):
-    side_effect.bktptcmd = "function was here"
-
-def another_function(frame, bp_loc, extra_args, dict):
-    se_value = extra_args.GetValueForKey("side_effect")
-    se_string = se_value.GetStringValue(100)
-    side_effect.fancy = se_string
-
-def a_third_function(frame, bp_loc, extra_args, dict):
-    se_value = extra_args.GetValueForKey("side_effect")
-    se_string = se_value.GetStringValue(100)
-    side_effect.fancier = se_string
-
-def empty_extra_args(frame, bp_loc, extra_args, dict):
-    if extra_args.IsValid():
-        side_effect.not_so_fancy = "Extra args should not be valid"
-    side_effect.not_so_fancy = "Not so fancy"
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/main.c
deleted file mode 100644 (file)
index 8bebb94..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-int main (int argc, char const *argv[])
-{
-    // Add a body to the function, so we can set more than one
-    // breakpoint in it.
-    static volatile int var = 0;
-    var++;
-    return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/side_effect.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/side_effect.py
deleted file mode 100644 (file)
index ef4ab2b..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-"""
-A dummy module for testing the execution of various breakpoint commands. A
-command will modify a global variable in this module and test will check its
-value.
-"""
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/Makefile
deleted file mode 100644 (file)
index 695335e..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-C_SOURCES := main.c
-CFLAGS_EXTRAS := -std=c99
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py
deleted file mode 100644 (file)
index de9a47d..0000000
+++ /dev/null
@@ -1,223 +0,0 @@
-"""
-Test breakpoint conditions with 'breakpoint modify -c <expr> id'.
-"""
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class BreakpointConditionsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_breakpoint_condition_and_run_command(self):
-        """Exercise breakpoint condition with 'breakpoint modify -c <expr> id'."""
-        self.build()
-        self.breakpoint_conditions()
-
-    def test_breakpoint_condition_inline_and_run_command(self):
-        """Exercise breakpoint condition inline with 'breakpoint set'."""
-        self.build()
-        self.breakpoint_conditions(inline=True)
-
-    @add_test_categories(['pyapi'])
-    def test_breakpoint_condition_and_python_api(self):
-        """Use Python APIs to set breakpoint conditions."""
-        self.build()
-        self.breakpoint_conditions_python()
-
-    @add_test_categories(['pyapi'])
-    def test_breakpoint_invalid_condition_and_python_api(self):
-        """Use Python APIs to set breakpoint conditions."""
-        self.build()
-        self.breakpoint_invalid_conditions_python()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to of function 'c'.
-        self.line1 = line_number(
-            'main.c', '// Find the line number of function "c" here.')
-        self.line2 = line_number(
-            'main.c', "// Find the line number of c's parent call here.")
-
-    def breakpoint_conditions(self, inline=False):
-        """Exercise breakpoint condition with 'breakpoint modify -c <expr> id'."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        if inline:
-            # Create a breakpoint by function name 'c' and set the condition.
-            lldbutil.run_break_set_by_symbol(
-                self,
-                "c",
-                extra_options="-c 'val == 3'",
-                num_expected_locations=1,
-                sym_exact=True)
-        else:
-            # Create a breakpoint by function name 'c'.
-            lldbutil.run_break_set_by_symbol(
-                self, "c", num_expected_locations=1, sym_exact=True)
-
-            # And set a condition on the breakpoint to stop on when 'val == 3'.
-            self.runCmd("breakpoint modify -c 'val == 3' 1")
-
-        # Now run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The process should be stopped at this point.
-        self.expect("process status", PROCESS_STOPPED,
-                    patterns=['Process .* stopped'])
-
-        # 'frame variable --show-types val' should return 3 due to breakpoint condition.
-        self.expect(
-            "frame variable --show-types val",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            startstr='(int) val = 3')
-
-        # Also check the hit count, which should be 3, by design.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=["resolved = 1",
-                             "Condition: val == 3",
-                             "hit count = 1"])
-
-        # The frame #0 should correspond to main.c:36, the executable statement
-        # in function name 'c'.  And the parent frame should point to
-        # main.c:24.
-        self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT_CONDITION,
-                    #substrs = ["stop reason = breakpoint"],
-                    patterns=["frame #0.*main.c:%d" % self.line1,
-                              "frame #1.*main.c:%d" % self.line2])
-
-        # Test that "breakpoint modify -c ''" clears the condition for the last
-        # created breakpoint, so that when the breakpoint hits, val == 1.
-        self.runCmd("process kill")
-        self.runCmd("breakpoint modify -c ''")
-        self.expect(
-            "breakpoint list -f",
-            BREAKPOINT_STATE_CORRECT,
-            matching=False,
-            substrs=["Condition:"])
-
-        # Now run the program again.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The process should be stopped at this point.
-        self.expect("process status", PROCESS_STOPPED,
-                    patterns=['Process .* stopped'])
-
-        # 'frame variable --show-types val' should return 1 since it is the first breakpoint hit.
-        self.expect(
-            "frame variable --show-types val",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            startstr='(int) val = 1')
-
-        self.runCmd("process kill")
-
-    def breakpoint_conditions_python(self):
-        """Use Python APIs to set breakpoint conditions."""
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create a breakpoint on main.c by name 'c'.
-        breakpoint = target.BreakpointCreateByName('c', 'a.out')
-        #print("breakpoint:", breakpoint)
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        # We didn't associate a thread index with the breakpoint, so it should
-        # be invalid.
-        self.assertTrue(breakpoint.GetThreadIndex() == lldb.UINT32_MAX,
-                        "The thread index should be invalid")
-        # The thread name should be invalid, too.
-        self.assertTrue(breakpoint.GetThreadName() is None,
-                        "The thread name should be invalid")
-
-        # Let's set the thread index for this breakpoint and verify that it is,
-        # indeed, being set correctly.
-        # There's only one thread for the process.
-        breakpoint.SetThreadIndex(1)
-        self.assertTrue(breakpoint.GetThreadIndex() == 1,
-                        "The thread index has been set correctly")
-
-        # Get the breakpoint location from breakpoint after we verified that,
-        # indeed, it has one location.
-        location = breakpoint.GetLocationAtIndex(0)
-        self.assertTrue(location and
-                        location.IsEnabled(),
-                        VALID_BREAKPOINT_LOCATION)
-
-        # Set the condition on the breakpoint location.
-        location.SetCondition('val == 3')
-        self.expect(location.GetCondition(), exe=False,
-                    startstr='val == 3')
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Frame #0 should be on self.line1 and the break condition should hold.
-        from lldbsuite.test.lldbutil import get_stopped_thread
-        thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint condition")
-        frame0 = thread.GetFrameAtIndex(0)
-        var = frame0.FindValue('val', lldb.eValueTypeVariableArgument)
-        self.assertTrue(frame0.GetLineEntry().GetLine() == self.line1 and
-                        var.GetValue() == '3')
-
-        # The hit count for the breakpoint should be 1.
-        self.assertTrue(breakpoint.GetHitCount() == 1)
-
-        # Test that the condition expression didn't create a result variable:
-        options = lldb.SBExpressionOptions()
-        value = frame0.EvaluateExpression("$0", options)
-        self.assertTrue(value.GetError().Fail(),
-                        "Conditions should not make result variables.")
-        process.Continue()
-
-    def breakpoint_invalid_conditions_python(self):
-        """Use Python APIs to set breakpoint conditions."""
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create a breakpoint on main.c by name 'c'.
-        breakpoint = target.BreakpointCreateByName('c', 'a.out')
-        #print("breakpoint:", breakpoint)
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        # Set the condition on the breakpoint.
-        breakpoint.SetCondition('no_such_variable == not_this_one_either')
-        self.expect(breakpoint.GetCondition(), exe=False,
-                    startstr='no_such_variable == not_this_one_either')
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Frame #0 should be on self.line1 and the break condition should hold.
-        from lldbsuite.test.lldbutil import get_stopped_thread
-        thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint condition")
-        frame0 = thread.GetFrameAtIndex(0)
-        var = frame0.FindValue('val', lldb.eValueTypeVariableArgument)
-        self.assertTrue(frame0.GetLineEntry().GetLine() == self.line1)
-
-        # The hit count for the breakpoint should be 1.
-        self.assertTrue(breakpoint.GetHitCount() == 1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/main.c
deleted file mode 100644 (file)
index c830b17..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-// This simple program is to demonstrate the capability of the lldb command
-// "breakpoint modify -c 'val == 3' breakpt-id" to break within c(int val) only
-// when the value of the arg is 3.
-
-int a(int);
-int b(int);
-int c(int);
-
-int a(int val)
-{
-    if (val <= 1)
-        return b(val);
-    else if (val >= 3)
-        return c(val); // Find the line number of c's parent call here.
-
-    return val;
-}
-
-int b(int val)
-{
-    return c(val);
-}
-
-int c(int val)
-{
-    return val + 3; // Find the line number of function "c" here.
-}
-
-int main (int argc, char const *argv[])
-{
-    int A1 = a(1);  // a(1) -> b(1) -> c(1)
-    printf("a(1) returns %d\n", A1);
-    
-    int B2 = b(2);  // b(2) -> c(2)
-    printf("b(2) returns %d\n", B2);
-    
-    int A3 = a(3);  // a(3) -> c(3)
-    printf("a(3) returns %d\n", A3);
-
-    for (int i = 0; i < 2; ++i)
-        printf("Loop\n");
-    
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_hit_count/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_hit_count/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_hit_count/TestBreakpointHitCount.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_hit_count/TestBreakpointHitCount.py
deleted file mode 100644 (file)
index 0254bf0..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-"""
-Test breakpoint hit count features.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class BreakpointHitCountTestCase(TestBase):
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(['pyapi'])
-    def test_breakpoint_location_hit_count(self):
-        """Use Python APIs to check breakpoint hit count."""
-        self.build()
-        self.do_test_breakpoint_location_hit_count()
-
-    def test_breakpoint_one_shot(self):
-        """Check that one-shot breakpoints trigger only once."""
-        self.build()
-
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        self.runCmd("tb a")
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        from lldbsuite.test.lldbutil import get_stopped_thread
-        thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint")
-
-        frame0 = thread.GetFrameAtIndex(0)
-        self.assertTrue(frame0.GetFunctionName() == "a(int)" or frame0.GetFunctionName() == "int a(int)");
-
-        process.Continue()
-        self.assertEqual(process.GetState(), lldb.eStateExited)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        self.a_int_body_line_no = line_number(
-            'main.cpp', '// Breakpoint Location 1')
-        self.a_float_body_line_no = line_number(
-            'main.cpp', '// Breakpoint Location 2')
-
-    def do_test_breakpoint_location_hit_count(self):
-        """Use Python APIs to check breakpoint hit count."""
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Create a breakpoint in main.cpp by name 'a',
-        # there should be two locations.
-        breakpoint = target.BreakpointCreateByName('a', 'a.out')
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() == 2,
-                        VALID_BREAKPOINT)
-
-        # Verify all breakpoint locations are enabled.
-        location1 = breakpoint.GetLocationAtIndex(0)
-        self.assertTrue(location1 and
-                        location1.IsEnabled(),
-                        VALID_BREAKPOINT_LOCATION)
-
-        location2 = breakpoint.GetLocationAtIndex(1)
-        self.assertTrue(location2 and
-                        location2.IsEnabled(),
-                        VALID_BREAKPOINT_LOCATION)
-
-        # Launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Verify 1st breakpoint location is hit.
-        from lldbsuite.test.lldbutil import get_stopped_thread
-        thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint")
-
-        frame0 = thread.GetFrameAtIndex(0)
-        location1 = breakpoint.FindLocationByAddress(frame0.GetPC())
-        self.assertTrue(
-            frame0.GetLineEntry().GetLine() == self.a_int_body_line_no,
-            "Stopped in int a(int)")
-        self.assertTrue(location1)
-        self.assertEqual(location1.GetHitCount(), 1)
-        self.assertEqual(breakpoint.GetHitCount(), 1)
-
-        process.Continue()
-
-        # Verify 2nd breakpoint location is hit.
-        thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint")
-
-        frame0 = thread.GetFrameAtIndex(0)
-        location2 = breakpoint.FindLocationByAddress(frame0.GetPC())
-        self.assertTrue(
-            frame0.GetLineEntry().GetLine() == self.a_float_body_line_no,
-            "Stopped in float a(float)")
-        self.assertTrue(location2)
-        self.assertEqual(location2.GetHitCount(), 1)
-        self.assertEqual(location1.GetHitCount(), 1)
-        self.assertEqual(breakpoint.GetHitCount(), 2)
-
-        process.Continue()
-
-        # Verify 2nd breakpoint location is hit again.
-        thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint")
-
-        self.assertEqual(location2.GetHitCount(), 2)
-        self.assertEqual(location1.GetHitCount(), 1)
-        self.assertEqual(breakpoint.GetHitCount(), 3)
-
-        process.Continue()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_hit_count/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_hit_count/main.cpp
deleted file mode 100644 (file)
index 9fc133f..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-int a(int val)
-{
-   return val; // Breakpoint Location 1
-}
-
-float a(float val)
-{
-    return val; // Breakpoint Location 2
-}
-
-int main (int argc, char const *argv[])
-{
-    int A1 = a(1);
-    float A2 = a(2.0f);
-    float A3 = a(3.0f);
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ids/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ids/Makefile
deleted file mode 100644 (file)
index 2c00681..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-CXX_SOURCES := main.cpp
-
-ifneq (,$(findstring icc,$(CC)))
-    CXXFLAGS_EXTRAS := -debug inline-debug-info
-endif
-
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ids/TestBreakpointIDs.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ids/TestBreakpointIDs.py
deleted file mode 100644 (file)
index 82f554e..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-"""
-Test lldb breakpoint ids.
-"""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class BreakpointIDTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test(self):
-        self.build()
-
-        exe = self.getBuildArtifact("a.out")
-        self.expect("file " + exe,
-                    patterns=["Current executable set to .*a.out"])
-
-        bpno = lldbutil.run_break_set_by_symbol(
-            self, 'product', num_expected_locations=-1, sym_exact=False)
-        self.assertTrue(bpno == 1, "First breakpoint number is 1.")
-
-        bpno = lldbutil.run_break_set_by_symbol(
-            self, 'sum', num_expected_locations=-1, sym_exact=False)
-        self.assertTrue(bpno == 2, "Second breakpoint number is 2.")
-
-        bpno = lldbutil.run_break_set_by_symbol(
-            self, 'junk', num_expected_locations=0, sym_exact=False)
-        self.assertTrue(bpno == 3, "Third breakpoint number is 3.")
-
-        self.expect(
-            "breakpoint disable 1.1 - 2.2 ",
-            COMMAND_FAILED_AS_EXPECTED,
-            error=True,
-            startstr="error: Invalid range: Ranges that specify particular breakpoint locations must be within the same major breakpoint; you specified two different major breakpoints, 1 and 2.")
-
-        self.expect(
-            "breakpoint disable 2 - 2.2",
-            COMMAND_FAILED_AS_EXPECTED,
-            error=True,
-            startstr="error: Invalid breakpoint id range:  Either both ends of range must specify a breakpoint location, or neither can specify a breakpoint location.")
-
-        self.expect(
-            "breakpoint disable 2.1 - 2",
-            COMMAND_FAILED_AS_EXPECTED,
-            error=True,
-            startstr="error: Invalid breakpoint id range:  Either both ends of range must specify a breakpoint location, or neither can specify a breakpoint location.")
-
-        self.expect("breakpoint disable 2.1 - 2.2",
-                    startstr="2 breakpoints disabled.")
-
-        self.expect("breakpoint enable 2.*",
-                    patterns=[".* breakpoints enabled."])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ids/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ids/main.cpp
deleted file mode 100644 (file)
index 3c98e14..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <cstdlib>
-#include <string>
-#include <fstream>
-#include <iostream>
-
-
-#define INLINE inline __attribute__((always_inline))
-
-INLINE int
-product (int x, int y)
-{
-    int result = x * y;
-    return result;
-}
-
-INLINE int
-sum (int a, int b)
-{
-    int result = a + b;
-    return result;
-}
-
-int
-strange_max (int m, int n)
-{
-    if (m > n)
-        return m;
-    else if (n > m)
-        return n;
-    else
-        return 0;
-}
-
-int
-foo (int i, int j)
-{
-    if (strange_max (i, j) == i)
-        return product (i, j);
-    else if (strange_max  (i, j) == j)
-        return sum (i, j);
-    else
-        return product (sum (i, i), sum (j, j));
-}
-
-int
-main(int argc, char const *argv[])
-{
-
-    int array[3];
-
-    array[0] = foo (1238, 78392);
-    array[1] = foo (379265, 23674);
-    array[2] = foo (872934, 234);
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ignore_count/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ignore_count/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py
deleted file mode 100644 (file)
index 3fa81ae..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-"""
-Test breakpoint ignore count features.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class BreakpointIgnoreCountTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfWindows # This test will hang on windows llvm.org/pr21753
-    def test_with_run_command(self):
-        """Exercise breakpoint ignore count with 'breakpoint set -i <count>'."""
-        self.build()
-        self.breakpoint_ignore_count()
-
-    @add_test_categories(['pyapi'])
-    @skipIfWindows # This test will hang on windows llvm.org/pr21753
-    def test_with_python_api(self):
-        """Use Python APIs to set breakpoint ignore count."""
-        self.build()
-        self.breakpoint_ignore_count_python()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to of function 'c'.
-        self.line1 = line_number(
-            'main.c', '// Find the line number of function "c" here.')
-        self.line2 = line_number(
-            'main.c', '// b(2) -> c(2) Find the call site of b(2).')
-        self.line3 = line_number(
-            'main.c', '// a(3) -> c(3) Find the call site of c(3).')
-        self.line4 = line_number(
-            'main.c', '// a(3) -> c(3) Find the call site of a(3).')
-        self.line5 = line_number(
-            'main.c', '// Find the call site of c in main.')
-
-    def breakpoint_ignore_count(self):
-        """Exercise breakpoint ignore count with 'breakpoint set -i <count>'."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Create a breakpoint in main.c at line1.
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            'main.c',
-            self.line1,
-            extra_options='-i 1',
-            num_expected_locations=1,
-            loc_exact=True)
-
-        # Now run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The process should be stopped at this point.
-        self.expect("process status", PROCESS_STOPPED,
-                    patterns=['Process .* stopped'])
-
-        # Also check the hit count, which should be 2, due to ignore count of
-        # 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_THRICE,
-                    substrs=["resolved = 1",
-                             "hit count = 2"])
-
-        # The frame #0 should correspond to main.c:37, the executable statement
-        # in function name 'c'.  And frame #2 should point to main.c:45.
-        self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT_IGNORE_COUNT,
-                    #substrs = ["stop reason = breakpoint"],
-                    patterns=["frame #0.*main.c:%d" % self.line1,
-                              "frame #2.*main.c:%d" % self.line2])
-
-        # continue -i 1 is the same as setting the ignore count to 1 again, try that:
-        # Now run the program.
-        self.runCmd("process continue -i 1", RUN_SUCCEEDED)
-
-        # The process should be stopped at this point.
-        self.expect("process status", PROCESS_STOPPED,
-                    patterns=['Process .* stopped'])
-
-        # Also check the hit count, which should be 2, due to ignore count of
-        # 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_THRICE,
-                    substrs=["resolved = 1",
-                             "hit count = 4"])
-
-        # The frame #0 should correspond to main.c:37, the executable statement
-        # in function name 'c'.  And frame #2 should point to main.c:45.
-        self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT_IGNORE_COUNT,
-                    #substrs = ["stop reason = breakpoint"],
-                    patterns=["frame #0.*main.c:%d" % self.line1,
-                              "frame #1.*main.c:%d" % self.line5])
-
-    def breakpoint_ignore_count_python(self):
-        """Use Python APIs to set breakpoint ignore count."""
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create a breakpoint on main.c by name 'c'.
-        breakpoint = target.BreakpointCreateByName('c', 'a.out')
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        # Get the breakpoint location from breakpoint after we verified that,
-        # indeed, it has one location.
-        location = breakpoint.GetLocationAtIndex(0)
-        self.assertTrue(location and
-                        location.IsEnabled(),
-                        VALID_BREAKPOINT_LOCATION)
-
-        # Set the ignore count on the breakpoint location.
-        location.SetIgnoreCount(2)
-        self.assertTrue(location.GetIgnoreCount() == 2,
-                        "SetIgnoreCount() works correctly")
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Frame#0 should be on main.c:37, frame#1 should be on main.c:25, and
-        # frame#2 should be on main.c:48.
-        # lldbutil.print_stacktraces(process)
-        from lldbsuite.test.lldbutil import get_stopped_thread
-        thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint")
-        frame0 = thread.GetFrameAtIndex(0)
-        frame1 = thread.GetFrameAtIndex(1)
-        frame2 = thread.GetFrameAtIndex(2)
-        self.assertTrue(frame0.GetLineEntry().GetLine() == self.line1 and
-                        frame1.GetLineEntry().GetLine() == self.line3 and
-                        frame2.GetLineEntry().GetLine() == self.line4,
-                        STOPPED_DUE_TO_BREAKPOINT_IGNORE_COUNT)
-
-        # The hit count for the breakpoint should be 3.
-        self.assertTrue(breakpoint.GetHitCount() == 3)
-
-        process.Continue()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ignore_count/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ignore_count/main.c
deleted file mode 100644 (file)
index b1ed446..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-// This simple program is to demonstrate the capability of the lldb command
-// "breakpoint modify -i <count> breakpt-id" to set the number of times a
-// breakpoint is skipped before stopping.  Ignore count can also be set upon
-// breakpoint creation by 'breakpoint set ... -i <count>'.
-
-int a(int);
-int b(int);
-int c(int);
-
-int a(int val)
-{
-    if (val <= 1)
-        return b(val);
-    else if (val >= 3)
-        return c(val); // a(3) -> c(3) Find the call site of c(3).
-
-    return val;
-}
-
-int b(int val)
-{
-    return c(val);
-}
-
-int c(int val)
-{
-    return val + 3; // Find the line number of function "c" here.
-}
-
-int main (int argc, char const *argv[])
-{
-    int A1 = a(1);  // a(1) -> b(1) -> c(1)
-    printf("a(1) returns %d\n", A1);
-    
-    int B2 = b(2);  // b(2) -> c(2) Find the call site of b(2).
-    printf("b(2) returns %d\n", B2);
-    
-    int A3 = a(3);  // a(3) -> c(3) Find the call site of a(3).
-    printf("a(3) returns %d\n", A3);
-    
-    int C1 = c(5); // Find the call site of c in main.
-    printf ("c(5) returns %d\n", C1);
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/Makefile
deleted file mode 100644 (file)
index 692ba17..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/TestAvoidBreakpointInDelaySlot.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/TestAvoidBreakpointInDelaySlot.py
deleted file mode 100644 (file)
index ff08715..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-"""
-Test specific to MIPS
-"""
-
-from __future__ import print_function
-
-import re
-import unittest2
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class AvoidBreakpointInDelaySlotAPITestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIf(archs=no_match(re.compile('mips*')))
-    def test(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.expect("file " + exe,
-                    patterns=["Current executable set to .*a.out.*"])
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        breakpoint = target.BreakpointCreateByName('main', 'a.out')
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        list = target.FindFunctions('foo', lldb.eFunctionNameTypeAuto)
-        self.assertTrue(list.GetSize() == 1)
-        sc = list.GetContextAtIndex(0)
-        self.assertTrue(sc.GetSymbol().GetName() == "foo")
-        function = sc.GetFunction()
-        self.assertTrue(function)
-        self.function(function, target)
-
-    def function(self, function, target):
-        """Iterate over instructions in function and place a breakpoint on delay slot instruction"""
-        # Get the list of all instructions in the function
-        insts = function.GetInstructions(target)
-        print(insts)
-        i = 0
-        for inst in insts:
-            if (inst.HasDelaySlot()):
-                # Remember the address of branch instruction.
-                branchinstaddress = inst.GetAddress().GetLoadAddress(target)
-
-                # Get next instruction i.e delay slot instruction.
-                delayinst = insts.GetInstructionAtIndex(i + 1)
-                delayinstaddr = delayinst.GetAddress().GetLoadAddress(target)
-
-                # Set breakpoint on delay slot instruction
-                breakpoint = target.BreakpointCreateByAddress(delayinstaddr)
-
-                # Verify the breakpoint.
-                self.assertTrue(breakpoint and
-                                breakpoint.GetNumLocations() == 1,
-                                VALID_BREAKPOINT)
-                # Get the location from breakpoint
-                location = breakpoint.GetLocationAtIndex(0)
-
-                # Get the address where breakpoint is actually set.
-                bpaddr = location.GetLoadAddress()
-
-                # Breakpoint address should be adjusted to the address of
-                # branch instruction.
-                self.assertTrue(branchinstaddress == bpaddr)
-                i += 1
-            else:
-                i += 1
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/main.c
deleted file mode 100644 (file)
index bc3ecee..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#include <stdio.h>
-
-foo (int a, int b)
-{
-    int c;
-    if (a<=b)
-        c=b-a;
-    else
-        c=b+a;
-    return c;
-}
-
-int main()
-{
-    int a=7, b=8, c;
-    
-    c = foo(a, b);
-
-return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/Makefile
deleted file mode 100644 (file)
index 283cc1b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-C_SOURCES := a.c
-CXX_SOURCES := main.cpp b.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/TestBreakpointLanguage.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/TestBreakpointLanguage.py
deleted file mode 100644 (file)
index ceffb11..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-"""
-Test that the language option for breakpoints works correctly
-parser.
-"""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class TestBreakpointLanguage(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def check_location_file(self, bp, loc, test_name):
-        bp_loc = bp.GetLocationAtIndex(loc)
-        addr = bp_loc.GetAddress()
-        comp_unit = addr.GetCompileUnit()
-        comp_name = comp_unit.GetFileSpec().GetFilename()
-        return comp_name == test_name
-
-    def test_regex_breakpoint_language(self):
-        """Test that the name regex breakpoint commands obey the language filter."""
-
-        self.build()
-        # Create a target by the debugger.
-        exe = self.getBuildArtifact("a.out")
-        error = lldb.SBError()
-        # Don't read in dependencies so we don't come across false matches that
-        # add unwanted breakpoint hits.
-        self.target = self.dbg.CreateTarget(exe, None, None, False, error)
-        self.assertTrue(self.target, VALID_TARGET)
-
-        cpp_bp = self.target.BreakpointCreateByRegex(
-            "func_from",
-            lldb.eLanguageTypeC_plus_plus,
-            lldb.SBFileSpecList(),
-            lldb.SBFileSpecList())
-        self.assertTrue(
-            cpp_bp.GetNumLocations() == 1,
-            "Only one C++ symbol matches")
-        self.assertTrue(self.check_location_file(cpp_bp, 0, "b.cpp"))
-
-        c_bp = self.target.BreakpointCreateByRegex(
-            "func_from",
-            lldb.eLanguageTypeC,
-            lldb.SBFileSpecList(),
-            lldb.SBFileSpecList())
-        self.assertTrue(
-            c_bp.GetNumLocations() == 1,
-            "Only one C symbol matches")
-        self.assertTrue(self.check_location_file(c_bp, 0, "a.c"))
-
-        objc_bp = self.target.BreakpointCreateByRegex(
-            "func_from",
-            lldb.eLanguageTypeObjC,
-            lldb.SBFileSpecList(),
-            lldb.SBFileSpecList())
-        self.assertTrue(
-            objc_bp.GetNumLocations() == 0,
-            "No ObjC symbol matches")
-
-    def test_by_name_breakpoint_language(self):
-        """Test that the name regex breakpoint commands obey the language filter."""
-
-        self.build()
-        # Create a target by the debugger.
-        exe = self.getBuildArtifact("a.out")
-        error = lldb.SBError()
-        # Don't read in dependencies so we don't come across false matches that
-        # add unwanted breakpoint hits.
-        self.target = self.dbg.CreateTarget(exe, None, None, False, error)
-        self.assertTrue(self.target, VALID_TARGET)
-
-        cpp_bp = self.target.BreakpointCreateByName(
-            "func_from_cpp",
-            lldb.eFunctionNameTypeAuto,
-            lldb.eLanguageTypeC_plus_plus,
-            lldb.SBFileSpecList(),
-            lldb.SBFileSpecList())
-        self.assertTrue(
-            cpp_bp.GetNumLocations() == 1,
-            "Only one C++ symbol matches")
-        self.assertTrue(self.check_location_file(cpp_bp, 0, "b.cpp"))
-
-        no_cpp_bp = self.target.BreakpointCreateByName(
-            "func_from_c",
-            lldb.eFunctionNameTypeAuto,
-            lldb.eLanguageTypeC_plus_plus,
-            lldb.SBFileSpecList(),
-            lldb.SBFileSpecList())
-        self.assertTrue(
-            no_cpp_bp.GetNumLocations() == 0,
-            "And the C one doesn't match")
-
-        c_bp = self.target.BreakpointCreateByName(
-            "func_from_c",
-            lldb.eFunctionNameTypeAuto,
-            lldb.eLanguageTypeC,
-            lldb.SBFileSpecList(),
-            lldb.SBFileSpecList())
-        self.assertTrue(
-            c_bp.GetNumLocations() == 1,
-            "Only one C symbol matches")
-        self.assertTrue(self.check_location_file(c_bp, 0, "a.c"))
-
-        no_c_bp = self.target.BreakpointCreateByName(
-            "func_from_cpp",
-            lldb.eFunctionNameTypeAuto,
-            lldb.eLanguageTypeC,
-            lldb.SBFileSpecList(),
-            lldb.SBFileSpecList())
-        self.assertTrue(
-            no_c_bp.GetNumLocations() == 0,
-            "And the C++ one doesn't match")
-
-        objc_bp = self.target.BreakpointCreateByName(
-            "func_from_cpp",
-            lldb.eFunctionNameTypeAuto,
-            lldb.eLanguageTypeObjC,
-            lldb.SBFileSpecList(),
-            lldb.SBFileSpecList())
-        self.assertTrue(
-            objc_bp.GetNumLocations() == 0,
-            "No ObjC symbol matches")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/a.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/a.c
deleted file mode 100644 (file)
index b90e2bd..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-int 
-func_from_c ()
-{
-  return 5;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/b.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/b.cpp
deleted file mode 100644 (file)
index 8937344..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-int
-func_from_cpp()
-{
-    return 10;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/main.cpp
deleted file mode 100644 (file)
index b7d00a6..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#include <stdio.h>
-extern "C" int func_from_c();
-extern int func_from_cpp();
-
-int
-main()
-{
-    func_from_c();
-    func_from_cpp();
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/Makefile
deleted file mode 100644 (file)
index 9645fd9..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-C_SOURCES := main.c
-
-ifneq (,$(findstring icc,$(CC)))
-    CFLAGS_EXTRAS := -debug inline-debug-info
-endif
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py
deleted file mode 100644 (file)
index 334b0f0..0000000
+++ /dev/null
@@ -1,196 +0,0 @@
-"""
-Test breakpoint commands for a breakpoint ID with multiple locations.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class BreakpointLocationsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24528")
-    def test_enable(self):
-        """Test breakpoint enable/disable for a breakpoint ID with multiple locations."""
-        self.build()
-        self.breakpoint_locations_test()
-
-    def test_shadowed_cond_options(self):
-        """Test that options set on the breakpoint and location behave correctly."""
-        self.build()
-        self.shadowed_bkpt_cond_test()
-
-    def test_shadowed_command_options(self):
-        """Test that options set on the breakpoint and location behave correctly."""
-        self.build()
-        self.shadowed_bkpt_command_test()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line = line_number('main.c', '// Set break point at this line.')
-
-    def set_breakpoint (self):
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, "Target %s is not valid"%(exe))
-
-        # This should create a breakpoint with 3 locations.
-
-        bkpt = target.BreakpointCreateByLocation("main.c", self.line)
-
-        # The breakpoint list should show 3 locations.
-        self.assertEqual(bkpt.GetNumLocations(), 3, "Wrong number of locations")
-
-        self.expect(
-            "breakpoint list -f",
-            "Breakpoint locations shown correctly",
-            substrs=[
-                "1: file = 'main.c', line = %d, exact_match = 0, locations = 3" %
-                self.line],
-            patterns=[
-                "where = a.out`func_inlined .+unresolved, hit count = 0",
-                "where = a.out`main .+\[inlined\].+unresolved, hit count = 0"])
-
-        return bkpt
-
-    def shadowed_bkpt_cond_test(self):
-        """Test that options set on the breakpoint and location behave correctly."""
-        # Breakpoint option propagation from bkpt to loc used to be done the first time
-        # a breakpoint location option was specifically set.  After that the other options
-        # on that location would stop tracking the breakpoint.  That got fixed, and this test
-        # makes sure only the option touched is affected.
-
-        bkpt = self.set_breakpoint()
-        bkpt_cond = "1 == 0"
-        bkpt.SetCondition(bkpt_cond)
-        self.assertEqual(bkpt.GetCondition(), bkpt_cond,"Successfully set condition")
-        self.assertTrue(bkpt.location[0].GetCondition() == bkpt.GetCondition(), "Conditions are the same")
-
-        # Now set a condition on the locations, make sure that this doesn't effect the bkpt:
-        bkpt_loc_1_cond = "1 == 1"
-        bkpt.location[0].SetCondition(bkpt_loc_1_cond)
-        self.assertEqual(bkpt.location[0].GetCondition(), bkpt_loc_1_cond, "Successfully changed location condition")
-        self.assertNotEqual(bkpt.GetCondition(), bkpt_loc_1_cond, "Changed location changed Breakpoint condition")
-        self.assertEqual(bkpt.location[1].GetCondition(), bkpt_cond, "Changed another location's condition")
-
-        # Now make sure that setting one options doesn't fix the value of another:
-        bkpt.SetIgnoreCount(10)
-        self.assertEqual(bkpt.GetIgnoreCount(), 10, "Set the ignore count successfully")
-        self.assertEqual(bkpt.location[0].GetIgnoreCount(), 10, "Location doesn't track top-level bkpt.")
-
-        # Now make sure resetting the condition to "" resets the tracking:
-        bkpt.location[0].SetCondition("")
-        bkpt_new_cond = "1 == 3"
-        bkpt.SetCondition(bkpt_new_cond)
-        self.assertEqual(bkpt.location[0].GetCondition(), bkpt_new_cond, "Didn't go back to tracking condition")
-
-    def shadowed_bkpt_command_test(self):
-        """Test that options set on the breakpoint and location behave correctly."""
-        # Breakpoint option propagation from bkpt to loc used to be done the first time
-        # a breakpoint location option was specifically set.  After that the other options
-        # on that location would stop tracking the breakpoint.  That got fixed, and this test
-        # makes sure only the option touched is affected.
-
-        bkpt = self.set_breakpoint()
-        commands = ["AAAAAA", "BBBBBB", "CCCCCC"]
-        str_list = lldb.SBStringList()
-        str_list.AppendList(commands, len(commands))
-
-        bkpt.SetCommandLineCommands(str_list)
-        cmd_list = lldb.SBStringList()
-        bkpt.GetCommandLineCommands(cmd_list)
-        list_size = str_list.GetSize()
-        self.assertEqual(cmd_list.GetSize() , list_size, "Added the right number of commands")
-        for i in range(0,list_size):
-            self.assertEqual(str_list.GetStringAtIndex(i), cmd_list.GetStringAtIndex(i), "Mismatched commands.")
-
-        commands = ["DDDDDD", "EEEEEE", "FFFFFF", "GGGGGG"]
-        loc_list = lldb.SBStringList()
-        loc_list.AppendList(commands, len(commands))
-        bkpt.location[1].SetCommandLineCommands(loc_list)
-        loc_cmd_list = lldb.SBStringList()
-        bkpt.location[1].GetCommandLineCommands(loc_cmd_list)
-
-        loc_list_size = loc_list.GetSize()
-
-        # Check that the location has the right commands:
-        self.assertEqual(loc_cmd_list.GetSize() , loc_list_size, "Added the right number of commands to location")
-        for i in range(0,loc_list_size):
-            self.assertEqual(loc_list.GetStringAtIndex(i), loc_cmd_list.GetStringAtIndex(i), "Mismatched commands.")
-
-        # Check that we didn't mess up the breakpoint level commands:
-        self.assertEqual(cmd_list.GetSize() , list_size, "Added the right number of commands")
-        for i in range(0,list_size):
-            self.assertEqual(str_list.GetStringAtIndex(i), cmd_list.GetStringAtIndex(i), "Mismatched commands.")
-
-        # And check we didn't mess up another location:
-        untouched_loc_cmds = lldb.SBStringList()
-        bkpt.location[0].GetCommandLineCommands(untouched_loc_cmds)
-        self.assertEqual(untouched_loc_cmds.GetSize() , 0, "Changed the wrong location")
-
-    def breakpoint_locations_test(self):
-        """Test breakpoint enable/disable for a breakpoint ID with multiple locations."""
-        self.set_breakpoint()
-
-        # The 'breakpoint disable 3.*' command should fail gracefully.
-        self.expect("breakpoint disable 3.*",
-                    "Disabling an invalid breakpoint should fail gracefully",
-                    error=True,
-                    startstr="error: '3' is not a valid breakpoint ID.")
-
-        # The 'breakpoint disable 1.*' command should disable all 3 locations.
-        self.expect(
-            "breakpoint disable 1.*",
-            "All 3 breakpoint locatons disabled correctly",
-            startstr="3 breakpoints disabled.")
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # We should not stopped on any breakpoint at all.
-        self.expect("process status", "No stopping on any disabled breakpoint",
-                    patterns=["^Process [0-9]+ exited with status = 0"])
-
-        # The 'breakpoint enable 1.*' command should enable all 3 breakpoints.
-        self.expect(
-            "breakpoint enable 1.*",
-            "All 3 breakpoint locatons enabled correctly",
-            startstr="3 breakpoints enabled.")
-
-        # The 'breakpoint disable 1.1' command should disable 1 location.
-        self.expect(
-            "breakpoint disable 1.1",
-            "1 breakpoint locatons disabled correctly",
-            startstr="1 breakpoints disabled.")
-
-        # Run the program again.  We should stop on the two breakpoint
-        # locations.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # Stopped once.
-        self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=["stop reason = breakpoint 1."])
-
-        # Continue the program, there should be another stop.
-        self.runCmd("process continue")
-
-        # Stopped again.
-        self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=["stop reason = breakpoint 1."])
-
-        # At this point, 1.1 has a hit count of 0 and the other a hit count of
-        # 1".
-        self.expect(
-            "breakpoint list -f",
-            "The breakpoints should report correct hit counts",
-            patterns=[
-                "1\.1: .+ unresolved, hit count = 0 +Options: disabled",
-                "1\.2: .+ resolved, hit count = 1",
-                "1\.3: .+ resolved, hit count = 1"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/main.c
deleted file mode 100644 (file)
index 7ec3ded..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#include <stdio.h>
-
-#define INLINE inline __attribute__((always_inline))
-
-int
-func_not_inlined (void)
-{
-    printf ("Called func_not_inlined.\n");
-    return 0;
-}
-
-INLINE int
-func_inlined (void)
-{
-    static int func_inline_call_count = 0;
-    printf ("Called func_inlined.\n");
-    ++func_inline_call_count;
-    printf ("Returning func_inlined call count: %d.\n", func_inline_call_count);
-    return func_inline_call_count; // Set break point at this line.
-}
-
-extern int func_inlined (void);
-
-int
-main (int argc, char **argv)
-{
-  printf ("Starting...\n");
-
-  int (*func_ptr) (void);
-  func_ptr = func_inlined;
-
-  int a = func_inlined();
-  printf("First call to func_inlined() returns: %d.\n", a);
-
-  func_not_inlined ();
-
-  func_ptr ();
-
-  printf("Last call to func_inlined() returns: %d.\n", func_inlined ());
-  return 0;
-}
-
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_names/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_names/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_names/TestBreakpointNames.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_names/TestBreakpointNames.py
deleted file mode 100644 (file)
index 1212ad4..0000000
+++ /dev/null
@@ -1,370 +0,0 @@
-"""
-Test breakpoint names.
-"""
-
-
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class BreakpointNames(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @add_test_categories(['pyapi'])
-    def test_setting_names(self):
-        """Use Python APIs to test that we can set breakpoint names."""
-        self.build()
-        self.setup_target()
-        self.do_check_names()
-
-    def test_illegal_names(self):
-        """Use Python APIs to test that we don't allow illegal names."""
-        self.build()
-        self.setup_target()
-        self.do_check_illegal_names()
-
-    def test_using_names(self):
-        """Use Python APIs to test that operations on names works correctly."""
-        self.build()
-        self.setup_target()
-        self.do_check_using_names()
-
-    def test_configuring_names(self):
-        """Use Python APIs to test that configuring options on breakpoint names works correctly."""
-        self.build()
-        self.make_a_dummy_name()
-        self.setup_target()
-        self.do_check_configuring_names()
-
-    def test_configuring_permissions_sb(self):
-        """Use Python APIs to test that configuring permissions on names works correctly."""
-        self.build()
-        self.setup_target()
-        self.do_check_configuring_permissions_sb()
-
-    def test_configuring_permissions_cli(self):
-        """Use Python APIs to test that configuring permissions on names works correctly."""
-        self.build()
-        self.setup_target()
-        self.do_check_configuring_permissions_cli()
-
-    def setup_target(self):
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a targets we are making breakpoint in and copying to:
-        self.target = self.dbg.CreateTarget(exe)
-        self.assertTrue(self.target, VALID_TARGET)
-        self.main_file_spec = lldb.SBFileSpec(os.path.join(self.getSourceDir(), "main.c"))
-
-    def check_name_in_target(self, bkpt_name):
-        name_list = lldb.SBStringList()
-        self.target.GetBreakpointNames(name_list)
-        found_it = False
-        for name in name_list:
-            if name == bkpt_name:
-                found_it = True
-                break
-        self.assertTrue(found_it, "Didn't find the name %s in the target's name list:"%(bkpt_name))
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-        # These are the settings we're going to be putting into names & breakpoints:
-        self.bp_name_string = "ABreakpoint"
-        self.is_one_shot = True
-        self.ignore_count = 1000
-        self.condition = "1 == 2"
-        self.auto_continue = True
-        self.tid = 0xaaaa
-        self.tidx = 10
-        self.thread_name = "Fooey"
-        self.queue_name = "Blooey"
-        self.cmd_list = lldb.SBStringList()
-        self.cmd_list.AppendString("frame var")
-        self.cmd_list.AppendString("bt")
-        self.help_string = "I do something interesting"
-
-
-    def do_check_names(self):
-        """Use Python APIs to check that we can set & retrieve breakpoint names"""
-        bkpt = self.target.BreakpointCreateByLocation(self.main_file_spec, 10)
-        bkpt_name = "ABreakpoint"
-        other_bkpt_name = "_AnotherBreakpoint"
-
-        # Add a name and make sure we match it:
-        success = bkpt.AddName(bkpt_name)
-        self.assertTrue(success, "We couldn't add a legal name to a breakpoint.")
-
-        matches = bkpt.MatchesName(bkpt_name)
-        self.assertTrue(matches, "We didn't match the name we just set")
-
-        # Make sure we don't match irrelevant names:
-        matches = bkpt.MatchesName("NotABreakpoint")
-        self.assertTrue(not matches, "We matched a name we didn't set.")
-
-        # Make sure the name is also in the target:
-        self.check_name_in_target(bkpt_name)
-
-        # Add another name, make sure that works too:
-        bkpt.AddName(other_bkpt_name)
-
-        matches = bkpt.MatchesName(bkpt_name)
-        self.assertTrue(matches, "Adding a name means we didn't match the name we just set")
-        self.check_name_in_target(other_bkpt_name)
-
-        # Remove the name and make sure we no longer match it:
-        bkpt.RemoveName(bkpt_name)
-        matches = bkpt.MatchesName(bkpt_name)
-        self.assertTrue(not matches,"We still match a name after removing it.")
-
-        # Make sure the name list has the remaining name:
-        name_list = lldb.SBStringList()
-        bkpt.GetNames(name_list)
-        num_names = name_list.GetSize()
-        self.assertTrue(num_names == 1, "Name list has %d items, expected 1."%(num_names))
-
-        name = name_list.GetStringAtIndex(0)
-        self.assertTrue(name == other_bkpt_name, "Remaining name was: %s expected %s."%(name, other_bkpt_name))
-
-    def do_check_illegal_names(self):
-        """Use Python APIs to check that we reject illegal names."""
-        bkpt = self.target.BreakpointCreateByLocation(self.main_file_spec, 10)
-        bad_names = ["-CantStartWithADash",
-                     "1CantStartWithANumber",
-                     "^CantStartWithNonAlpha",
-                     "CantHave-ADash",
-                     "Cant Have Spaces"]
-        for bad_name in bad_names:
-            success = bkpt.AddName(bad_name)
-            self.assertTrue(not success,"We allowed an illegal name: %s"%(bad_name))
-            bp_name = lldb.SBBreakpointName(self.target, bad_name)
-            self.assertFalse(bp_name.IsValid(), "We made a breakpoint name with an illegal name: %s"%(bad_name));
-
-            retval =lldb.SBCommandReturnObject()
-            self.dbg.GetCommandInterpreter().HandleCommand("break set -n whatever -N '%s'"%(bad_name), retval)
-            self.assertTrue(not retval.Succeeded(), "break set succeeded with: illegal name: %s"%(bad_name))
-
-    def do_check_using_names(self):
-        """Use Python APIs to check names work in place of breakpoint ID's."""
-
-        # Create a dummy breakpoint to use up ID 1
-        _ = self.target.BreakpointCreateByLocation(self.main_file_spec, 30)
-
-        # Create a breakpiont to test with
-        bkpt = self.target.BreakpointCreateByLocation(self.main_file_spec, 10)
-        bkpt_name = "ABreakpoint"
-        bkpt_id = bkpt.GetID()
-        other_bkpt_name= "_AnotherBreakpoint"
-
-        # Add a name and make sure we match it:
-        success = bkpt.AddName(bkpt_name)
-        self.assertTrue(success, "We couldn't add a legal name to a breakpoint.")
-
-        bkpts = lldb.SBBreakpointList(self.target)
-        self.target.FindBreakpointsByName(bkpt_name, bkpts)
-
-        self.assertTrue(bkpts.GetSize() == 1, "One breakpoint matched.")
-        found_bkpt = bkpts.GetBreakpointAtIndex(0)
-        self.assertTrue(bkpt.GetID() == found_bkpt.GetID(),"The right breakpoint.")
-        self.assertTrue(bkpt.GetID() == bkpt_id,"With the same ID as before.")
-
-        retval = lldb.SBCommandReturnObject()
-        self.dbg.GetCommandInterpreter().HandleCommand("break disable %s"%(bkpt_name), retval)
-        self.assertTrue(retval.Succeeded(), "break disable failed with: %s."%(retval.GetError()))
-        self.assertTrue(not bkpt.IsEnabled(), "We didn't disable the breakpoint.")
-
-        # Also make sure we don't apply commands to non-matching names:
-        self.dbg.GetCommandInterpreter().HandleCommand("break modify --one-shot 1 %s"%(other_bkpt_name), retval)
-        self.assertTrue(retval.Succeeded(), "break modify failed with: %s."%(retval.GetError()))
-        self.assertTrue(not bkpt.IsOneShot(), "We applied one-shot to the wrong breakpoint.")
-
-    def check_option_values(self, bp_object):
-        self.assertEqual(bp_object.IsOneShot(), self.is_one_shot, "IsOneShot")
-        self.assertEqual(bp_object.GetIgnoreCount(), self.ignore_count, "IgnoreCount")
-        self.assertEqual(bp_object.GetCondition(), self.condition, "Condition")
-        self.assertEqual(bp_object.GetAutoContinue(), self.auto_continue, "AutoContinue")
-        self.assertEqual(bp_object.GetThreadID(), self.tid, "Thread ID")
-        self.assertEqual(bp_object.GetThreadIndex(), self.tidx, "Thread Index")
-        self.assertEqual(bp_object.GetThreadName(), self.thread_name, "Thread Name")
-        self.assertEqual(bp_object.GetQueueName(), self.queue_name, "Queue Name")
-        set_cmds = lldb.SBStringList()
-        bp_object.GetCommandLineCommands(set_cmds)
-        self.assertEqual(set_cmds.GetSize(), self.cmd_list.GetSize(), "Size of command line commands")
-        for idx in range(0, set_cmds.GetSize()):
-            self.assertEqual(self.cmd_list.GetStringAtIndex(idx), set_cmds.GetStringAtIndex(idx), "Command %d"%(idx))
-
-    def make_a_dummy_name(self):
-        "This makes a breakpoint name in the dummy target to make sure it gets copied over"
-
-        dummy_target = self.dbg.GetDummyTarget()
-        self.assertTrue(dummy_target.IsValid(), "Dummy target was not valid.")
-
-        def cleanup ():
-            self.dbg.GetDummyTarget().DeleteBreakpointName(self.bp_name_string)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        # Now find it in the dummy target, and make sure these settings took:
-        bp_name = lldb.SBBreakpointName(dummy_target, self.bp_name_string)
-        # Make sure the name is right:
-        self.assertTrue (bp_name.GetName() == self.bp_name_string, "Wrong bp_name: %s"%(bp_name.GetName()))
-        bp_name.SetOneShot(self.is_one_shot)
-        bp_name.SetIgnoreCount(self.ignore_count)
-        bp_name.SetCondition(self.condition)
-        bp_name.SetAutoContinue(self.auto_continue)
-        bp_name.SetThreadID(self.tid)
-        bp_name.SetThreadIndex(self.tidx)
-        bp_name.SetThreadName(self.thread_name)
-        bp_name.SetQueueName(self.queue_name)
-        bp_name.SetCommandLineCommands(self.cmd_list)
-
-        # Now look it up again, and make sure it got set correctly.
-        bp_name = lldb.SBBreakpointName(dummy_target, self.bp_name_string)
-        self.assertTrue(bp_name.IsValid(), "Failed to make breakpoint name.")
-        self.check_option_values(bp_name)
-
-    def do_check_configuring_names(self):
-        """Use Python APIs to check that configuring breakpoint names works correctly."""
-        other_bp_name_string = "AnotherBreakpointName"
-        cl_bp_name_string = "CLBreakpointName"
-
-        # Now find the version copied in from the dummy target, and make sure these settings took:
-        bp_name = lldb.SBBreakpointName(self.target, self.bp_name_string)
-        self.assertTrue(bp_name.IsValid(), "Failed to make breakpoint name.")
-        self.check_option_values(bp_name)
-
-        # Now add this name to a breakpoint, and make sure it gets configured properly
-        bkpt = self.target.BreakpointCreateByLocation(self.main_file_spec, 10)
-        success = bkpt.AddName(self.bp_name_string)
-        self.assertTrue(success, "Couldn't add this name to the breakpoint")
-        self.check_option_values(bkpt)
-
-        # Now make a name from this breakpoint, and make sure the new name is properly configured:
-        new_name = lldb.SBBreakpointName(bkpt, other_bp_name_string)
-        self.assertTrue(new_name.IsValid(), "Couldn't make a valid bp_name from a breakpoint.")
-        self.check_option_values(bkpt)
-
-        # Now change the name's option and make sure it gets propagated to
-        # the breakpoint:
-        new_auto_continue = not self.auto_continue
-        bp_name.SetAutoContinue(new_auto_continue)
-        self.assertEqual(bp_name.GetAutoContinue(), new_auto_continue, "Couldn't change auto-continue on the name")
-        self.assertEqual(bkpt.GetAutoContinue(), new_auto_continue, "Option didn't propagate to the breakpoint.")
-
-        # Now make this same breakpoint name - but from the command line
-        cmd_str = "breakpoint name configure %s -o %d -i %d -c '%s' -G %d -t %d -x %d -T '%s' -q '%s' -H '%s'"%(cl_bp_name_string,
-                                                                             self.is_one_shot,
-                                                                             self.ignore_count,
-                                                                             self.condition,
-                                                                             self.auto_continue,
-                                                                             self.tid,
-                                                                             self.tidx,
-                                                                             self.thread_name,
-                                                                             self.queue_name,
-                                                                             self.help_string)
-        for cmd in self.cmd_list:
-            cmd_str += " -C '%s'"%(cmd)
-
-        self.runCmd(cmd_str, check=True)
-        # Now look up this name again and check its options:
-        cl_name = lldb.SBBreakpointName(self.target, cl_bp_name_string)
-        self.check_option_values(cl_name)
-        # Also check the help string:
-        self.assertEqual(self.help_string, cl_name.GetHelpString(), "Help string didn't match")
-        # Change the name and make sure that works:
-        new_help = "I do something even more interesting"
-        cl_name.SetHelpString(new_help)
-        self.assertEqual(new_help, cl_name.GetHelpString(), "SetHelpString didn't")
-
-        # We should have three names now, make sure the target can list them:
-        name_list = lldb.SBStringList()
-        self.target.GetBreakpointNames(name_list)
-        for name_string in [self.bp_name_string, other_bp_name_string, cl_bp_name_string]:
-            self.assertTrue(name_string in name_list, "Didn't find %s in names"%(name_string))
-
-        # Delete the name from the current target.  Make sure that works and deletes the
-        # name from the breakpoint as well:
-        self.target.DeleteBreakpointName(self.bp_name_string)
-        name_list.Clear()
-        self.target.GetBreakpointNames(name_list)
-        self.assertTrue(self.bp_name_string not in name_list, "Didn't delete %s from a real target"%(self.bp_name_string))
-        # Also make sure the name got removed from breakpoints holding it:
-        self.assertFalse(bkpt.MatchesName(self.bp_name_string), "Didn't remove the name from the breakpoint.")
-
-        # Test that deleting the name we injected into the dummy target works (there's also a
-        # cleanup that will do this, but that won't test the result...
-        dummy_target = self.dbg.GetDummyTarget()
-        dummy_target.DeleteBreakpointName(self.bp_name_string)
-        name_list.Clear()
-        dummy_target.GetBreakpointNames(name_list)
-        self.assertTrue(self.bp_name_string not in name_list, "Didn't delete %s from the dummy target"%(self.bp_name_string))
-        # Also make sure the name got removed from breakpoints holding it:
-        self.assertFalse(bkpt.MatchesName(self.bp_name_string), "Didn't remove the name from the breakpoint.")
-
-    def check_permission_results(self, bp_name):
-        self.assertEqual(bp_name.GetAllowDelete(), False, "Didn't set allow delete.")
-        protected_bkpt = self.target.BreakpointCreateByLocation(self.main_file_spec, 10)
-        protected_id = protected_bkpt.GetID()
-
-        unprotected_bkpt = self.target.BreakpointCreateByLocation(self.main_file_spec, 10)
-        unprotected_id = unprotected_bkpt.GetID()
-
-        success = protected_bkpt.AddName(self.bp_name_string)
-        self.assertTrue(success, "Couldn't add this name to the breakpoint")
-
-        self.target.DisableAllBreakpoints()
-        self.assertEqual(protected_bkpt.IsEnabled(), True, "Didnt' keep breakpoint from being disabled")
-        self.assertEqual(unprotected_bkpt.IsEnabled(), False, "Protected too many breakpoints from disabling.")
-
-        # Try from the command line too:
-        unprotected_bkpt.SetEnabled(True)
-        result = lldb.SBCommandReturnObject()
-        self.dbg.GetCommandInterpreter().HandleCommand("break disable", result)
-        self.assertTrue(result.Succeeded())
-        self.assertEqual(protected_bkpt.IsEnabled(), True, "Didnt' keep breakpoint from being disabled")
-        self.assertEqual(unprotected_bkpt.IsEnabled(), False, "Protected too many breakpoints from disabling.")
-
-        self.target.DeleteAllBreakpoints()
-        bkpt = self.target.FindBreakpointByID(protected_id)
-        self.assertTrue(bkpt.IsValid(), "Didn't keep the breakpoint from being deleted.")
-        bkpt = self.target.FindBreakpointByID(unprotected_id)
-        self.assertFalse(bkpt.IsValid(), "Protected too many breakpoints from deletion.")
-
-        # Remake the unprotected breakpoint and try again from the command line:
-        unprotected_bkpt = self.target.BreakpointCreateByLocation(self.main_file_spec, 10)
-        unprotected_id = unprotected_bkpt.GetID()
-
-        self.dbg.GetCommandInterpreter().HandleCommand("break delete -f", result)
-        self.assertTrue(result.Succeeded())
-        bkpt = self.target.FindBreakpointByID(protected_id)
-        self.assertTrue(bkpt.IsValid(), "Didn't keep the breakpoint from being deleted.")
-        bkpt = self.target.FindBreakpointByID(unprotected_id)
-        self.assertFalse(bkpt.IsValid(), "Protected too many breakpoints from deletion.")
-
-    def do_check_configuring_permissions_sb(self):
-        bp_name = lldb.SBBreakpointName(self.target, self.bp_name_string)
-
-        # Make a breakpoint name with delete disallowed:
-        bp_name = lldb.SBBreakpointName(self.target, self.bp_name_string)
-        self.assertTrue(bp_name.IsValid(), "Failed to make breakpoint name for valid name.")
-
-        bp_name.SetAllowDelete(False)
-        bp_name.SetAllowDisable(False)
-        bp_name.SetAllowList(False)
-        self.check_permission_results(bp_name)
-
-    def do_check_configuring_permissions_cli(self):
-        # Make the name with the right options using the command line:
-        self.runCmd("breakpoint name configure -L 0 -D 0 -A 0 %s"%(self.bp_name_string), check=True)
-        # Now look up the breakpoint we made, and check that it works.
-        bp_name = lldb.SBBreakpointName(self.target, self.bp_name_string)
-        self.assertTrue(bp_name.IsValid(), "Didn't make a breakpoint name we could find.")
-        self.check_permission_results(bp_name)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_names/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_names/main.c
deleted file mode 100644 (file)
index b1ed446..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-// This simple program is to demonstrate the capability of the lldb command
-// "breakpoint modify -i <count> breakpt-id" to set the number of times a
-// breakpoint is skipped before stopping.  Ignore count can also be set upon
-// breakpoint creation by 'breakpoint set ... -i <count>'.
-
-int a(int);
-int b(int);
-int c(int);
-
-int a(int val)
-{
-    if (val <= 1)
-        return b(val);
-    else if (val >= 3)
-        return c(val); // a(3) -> c(3) Find the call site of c(3).
-
-    return val;
-}
-
-int b(int val)
-{
-    return c(val);
-}
-
-int c(int val)
-{
-    return val + 3; // Find the line number of function "c" here.
-}
-
-int main (int argc, char const *argv[])
-{
-    int A1 = a(1);  // a(1) -> b(1) -> c(1)
-    printf("a(1) returns %d\n", A1);
-    
-    int B2 = b(2);  // b(2) -> c(2) Find the call site of b(2).
-    printf("b(2) returns %d\n", B2);
-    
-    int A3 = a(3);  // a(3) -> c(3) Find the call site of a(3).
-    printf("a(3) returns %d\n", A3);
-    
-    int C1 = c(5); // Find the call site of c in main.
-    printf ("c(5) returns %d\n", C1);
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/Makefile
deleted file mode 100644 (file)
index 7df2269..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp foo.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/TestBreakpointOptions.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/TestBreakpointOptions.py
deleted file mode 100644 (file)
index 0419b4d..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-"""
-Test breakpoint command for different options.
-"""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class BreakpointOptionsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test(self):
-        """Test breakpoint command for different options."""
-        self.build()
-        self.breakpoint_options_test()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    def breakpoint_options_test(self):
-        """Test breakpoint command for different options."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # This should create a breakpoint with 1 locations.
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            "main.cpp",
-            self.line,
-            extra_options="-K 1",
-            num_expected_locations=1)
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            "main.cpp",
-            self.line,
-            extra_options="-K 0",
-            num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # Stopped once.
-        self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=["stop reason = breakpoint 2."])
-
-        # Check the list of breakpoint.
-        self.expect(
-            "breakpoint list -f",
-            "Breakpoint locations shown correctly",
-            substrs=[
-                "1: file = 'main.cpp', line = %d, exact_match = 0, locations = 1" %
-                self.line,
-                "2: file = 'main.cpp', line = %d, exact_match = 0, locations = 1" %
-                self.line])
-
-        # Continue the program, there should be another stop.
-        self.runCmd("process continue")
-
-        # Stopped again.
-        self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=["stop reason = breakpoint 1."])
-
-        # Continue the program, we should exit.
-        self.runCmd("process continue")
-
-        # We should exit.
-        self.expect("process status", "Process exited successfully",
-                    patterns=["^Process [0-9]+ exited with status = 0"])
-
-    def breakpoint_options_language_test(self):
-        """Test breakpoint command for language option."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # This should create a breakpoint with 1 locations.
-        lldbutil.run_break_set_by_symbol(
-            self,
-            'ns::func',
-            sym_exact=False,
-            extra_options="-L c++",
-            num_expected_locations=1)
-
-        # This should create a breakpoint with 0 locations.
-        lldbutil.run_break_set_by_symbol(
-            self,
-            'ns::func',
-            sym_exact=False,
-            extra_options="-L c",
-            num_expected_locations=0)
-        self.runCmd("settings set target.language c")
-        lldbutil.run_break_set_by_symbol(
-            self, 'ns::func', sym_exact=False, num_expected_locations=0)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # Stopped once.
-        self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=["stop reason = breakpoint 1."])
-
-        # Continue the program, we should exit.
-        self.runCmd("process continue")
-
-        # We should exit.
-        self.expect("process status", "Process exited successfully",
-                    patterns=["^Process [0-9]+ exited with status = 0"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/foo.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/foo.cpp
deleted file mode 100644 (file)
index e5d0e09..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-
-namespace ns {
-    int func(void)
-    {
-        return 0;
-    }
-}
-
-extern "C" int foo(void)
-{
-    return ns::func();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/main.cpp
deleted file mode 100644 (file)
index b2e8f52..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-extern "C" int foo(void);
-int main (int argc, char **argv) { // Set break point at this line.
-  return foo();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/TestBreakpointSetRestart.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/TestBreakpointSetRestart.py
deleted file mode 100644 (file)
index 40a20a0..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-"""
-Test inferior restart when breakpoint is set on running target.
-"""
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-
-
-class BreakpointSetRestart(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    BREAKPOINT_TEXT = 'Set a breakpoint here'
-
-    @skipIfNetBSD
-    def test_breakpoint_set_restart(self):
-        self.build()
-
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        self.dbg.SetAsync(True)
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        event = lldb.SBEvent()
-        # Wait for inferior to transition to running state
-        while self.dbg.GetListener().WaitForEvent(2, event):
-            if lldb.SBProcess.GetStateFromEvent(event) == lldb.eStateRunning:
-                break
-
-        bp = target.BreakpointCreateBySourceRegex(
-            self.BREAKPOINT_TEXT, lldb.SBFileSpec('main.cpp'))
-        self.assertTrue(
-            bp.IsValid() and bp.GetNumLocations() == 1,
-            VALID_BREAKPOINT)
-
-        while self.dbg.GetListener().WaitForEvent(2, event):
-            if lldb.SBProcess.GetStateFromEvent(
-                    event) == lldb.eStateStopped and lldb.SBProcess.GetRestartedFromEvent(event):
-                continue
-            if lldb.SBProcess.GetStateFromEvent(event) == lldb.eStateRunning:
-                continue
-            self.fail(
-                "Setting a breakpoint generated an unexpected event: %s" %
-                lldb.SBDebugger.StateAsCString(
-                    lldb.SBProcess.GetStateFromEvent(event)))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/main.cpp
deleted file mode 100644 (file)
index 46682ec..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <chrono>
-#include <stdio.h>
-#include <thread>
-
-
-int main(int argc, char const *argv[])
-{
-    static bool done = false;
-    while (!done)
-    {
-      std::this_thread::sleep_for(std::chrono::milliseconds{100});
-    }
-    printf("Set a breakpoint here.\n");
-    return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/Makefile
deleted file mode 100644 (file)
index 7c6a18b..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-CXX_SOURCES := relative.cpp
-
-EXE := CompDirSymLink
-
-include Makefile.rules
-
-# Force relative filenames by copying it into the build directory.
-relative.cpp: main.cpp
-       cp -f $< $@
-
-clean::
-       rm -rf relative.cpp
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py
deleted file mode 100644 (file)
index 0e372c7..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-"""
-Test breakpoint command with AT_comp_dir set to symbolic link.
-"""
-
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-_EXE_NAME = 'CompDirSymLink'  # Must match Makefile
-_SRC_FILE = 'relative.cpp'
-_COMP_DIR_SYM_LINK_PROP = 'plugin.symbol-file.dwarf.comp-dir-symlink-paths'
-
-
-class CompDirSymLinkTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line = line_number(
-            os.path.join(self.getSourceDir(), "main.cpp"),
-            '// Set break point at this line.')
-
-    @skipIf(hostoslist=["windows"])
-    def test_symlink_paths_set(self):
-        pwd_symlink = self.create_src_symlink()
-        self.doBuild(pwd_symlink)
-        self.runCmd(
-            "settings set %s %s" %
-            (_COMP_DIR_SYM_LINK_PROP, pwd_symlink))
-        src_path = self.getBuildArtifact(_SRC_FILE)
-        lldbutil.run_break_set_by_file_and_line(self, src_path, self.line)
-
-    @skipIf(hostoslist=no_match(["linux"]))
-    def test_symlink_paths_set_procselfcwd(self):
-        os.chdir(self.getBuildDir())
-        pwd_symlink = '/proc/self/cwd'
-        self.doBuild(pwd_symlink)
-        self.runCmd(
-            "settings set %s %s" %
-            (_COMP_DIR_SYM_LINK_PROP, pwd_symlink))
-        src_path = self.getBuildArtifact(_SRC_FILE)
-        # /proc/self/cwd points to a realpath form of current directory.
-        src_path = os.path.realpath(src_path)
-        lldbutil.run_break_set_by_file_and_line(self, src_path, self.line)
-
-    @skipIf(hostoslist=["windows"])
-    def test_symlink_paths_unset(self):
-        pwd_symlink = self.create_src_symlink()
-        self.doBuild(pwd_symlink)
-        self.runCmd('settings clear ' + _COMP_DIR_SYM_LINK_PROP)
-        src_path = self.getBuildArtifact(_SRC_FILE)
-        self.assertRaises(
-            AssertionError,
-            lldbutil.run_break_set_by_file_and_line,
-            self,
-            src_path,
-            self.line)
-
-    def create_src_symlink(self):
-        pwd_symlink = self.getBuildArtifact('pwd_symlink')
-        if os.path.exists(pwd_symlink):
-            os.unlink(pwd_symlink)
-        os.symlink(self.getBuildDir(), pwd_symlink)
-        self.addTearDownHook(lambda: os.remove(pwd_symlink))
-        return pwd_symlink
-
-    def doBuild(self, pwd_symlink):
-        self.build(None, None, {'PWD': pwd_symlink})
-
-        exe = self.getBuildArtifact(_EXE_NAME)
-        self.runCmd('file ' + exe, CURRENT_EXECUTABLE_SET)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/main.cpp
deleted file mode 100644 (file)
index 13e5e3e..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-int main (int argc, char const *argv[])
-{
-    return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/Makefile
deleted file mode 100644 (file)
index 2c00681..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-CXX_SOURCES := main.cpp
-
-ifneq (,$(findstring icc,$(CC)))
-    CXXFLAGS_EXTRAS := -debug inline-debug-info
-endif
-
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/TestConsecutiveBreakpoints.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/TestConsecutiveBreakpoints.py
deleted file mode 100644 (file)
index cf36f14..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-"""
-Test that we handle breakpoints on consecutive instructions correctly.
-"""
-
-
-
-import unittest2
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ConsecutiveBreakpointsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def prepare_test(self):
-        self.build()
-
-        (self.target, self.process, self.thread, bkpt) = lldbutil.run_to_source_breakpoint(
-                self, "Set breakpoint here", lldb.SBFileSpec("main.cpp"))
-
-        # Set breakpoint to the next instruction
-        frame = self.thread.GetFrameAtIndex(0)
-
-        address = frame.GetPCAddress()
-        instructions = self.target.ReadInstructions(address, 2)
-        self.assertTrue(len(instructions) == 2)
-        self.bkpt_address = instructions[1].GetAddress()
-        self.breakpoint2 = self.target.BreakpointCreateByAddress(
-            self.bkpt_address.GetLoadAddress(self.target))
-        self.assertTrue(
-            self.breakpoint2 and self.breakpoint2.GetNumLocations() == 1,
-            VALID_BREAKPOINT)
-
-    def finish_test(self):
-        # Run the process until termination
-        self.process.Continue()
-        self.assertEquals(self.process.GetState(), lldb.eStateExited)
-
-    @no_debug_info_test
-    def test_continue(self):
-        """Test that continue stops at the second breakpoint."""
-        self.prepare_test()
-
-        self.process.Continue()
-        self.assertEquals(self.process.GetState(), lldb.eStateStopped)
-        # We should be stopped at the second breakpoint
-        self.thread = lldbutil.get_one_thread_stopped_at_breakpoint(
-            self.process, self.breakpoint2)
-        self.assertIsNotNone(
-            self.thread,
-            "Expected one thread to be stopped at breakpoint 2")
-
-        self.finish_test()
-
-    @no_debug_info_test
-    def test_single_step(self):
-        """Test that single step stops at the second breakpoint."""
-        self.prepare_test()
-
-        step_over = False
-        self.thread.StepInstruction(step_over)
-
-        self.assertEquals(self.process.GetState(), lldb.eStateStopped)
-        self.assertEquals(
-            self.thread.GetFrameAtIndex(0).GetPCAddress().GetLoadAddress(
-                self.target), self.bkpt_address.GetLoadAddress(
-                self.target))
-        self.thread = lldbutil.get_one_thread_stopped_at_breakpoint(
-            self.process, self.breakpoint2)
-        self.assertIsNotNone(
-            self.thread,
-            "Expected one thread to be stopped at breakpoint 2")
-
-        self.finish_test()
-
-    @no_debug_info_test
-    def test_single_step_thread_specific(self):
-        """Test that single step stops, even though the second breakpoint is not valid."""
-        self.prepare_test()
-
-        # Choose a thread other than the current one. A non-existing thread is
-        # fine.
-        thread_index = self.process.GetNumThreads() + 1
-        self.assertFalse(self.process.GetThreadAtIndex(thread_index).IsValid())
-        self.breakpoint2.SetThreadIndex(thread_index)
-
-        step_over = False
-        self.thread.StepInstruction(step_over)
-
-        self.assertEquals(self.process.GetState(), lldb.eStateStopped)
-        self.assertEquals(
-            self.thread.GetFrameAtIndex(0).GetPCAddress().GetLoadAddress(
-                self.target), self.bkpt_address.GetLoadAddress(
-                self.target))
-        self.assertEquals(
-            self.thread.GetStopReason(),
-            lldb.eStopReasonPlanComplete,
-            "Stop reason should be 'plan complete'")
-
-        self.finish_test()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/main.cpp
deleted file mode 100644 (file)
index 94d0a04..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-int
-main(int argc, char const *argv[])
-{
-    int a = 0;
-    int b = 1;
-    a = b + 1; // Set breakpoint here
-    b = a + 1;
-    return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp/Makefile
deleted file mode 100644 (file)
index 2c00681..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-CXX_SOURCES := main.cpp
-
-ifneq (,$(findstring icc,$(CC)))
-    CXXFLAGS_EXTRAS := -debug inline-debug-info
-endif
-
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp/TestCPPBreakpointLocations.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp/TestCPPBreakpointLocations.py
deleted file mode 100644 (file)
index be21c6e..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-"""
-Test lldb breakpoint ids.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestCPPBreakpointLocations(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24764")
-    def test(self):
-        self.build()
-        self.breakpoint_id_tests()
-
-    def verify_breakpoint_locations(self, target, bp_dict):
-
-        name = bp_dict['name']
-        names = bp_dict['loc_names']
-        bp = target.BreakpointCreateByName(name)
-        self.assertEquals(
-            bp.GetNumLocations(),
-            len(names),
-            "Make sure we find the right number of breakpoint locations")
-
-        bp_loc_names = list()
-        for bp_loc in bp:
-            bp_loc_names.append(bp_loc.GetAddress().GetFunction().GetName())
-
-        for name in names:
-            found = name in bp_loc_names
-            if not found:
-                print("Didn't find '%s' in: %s" % (name, bp_loc_names))
-            self.assertTrue(found, "Make sure we find all required locations")
-
-    def breakpoint_id_tests(self):
-
-        # Create a target by the debugger.
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-        bp_dicts = [
-            {'name': 'func1', 'loc_names': ['a::c::func1()', 'b::c::func1()']},
-            {'name': 'func2', 'loc_names': ['a::c::func2()', 'c::d::func2()']},
-            {'name': 'func3', 'loc_names': ['a::c::func3()', 'b::c::func3()', 'c::d::func3()']},
-            {'name': 'c::func1', 'loc_names': ['a::c::func1()', 'b::c::func1()']},
-            {'name': 'c::func2', 'loc_names': ['a::c::func2()']},
-            {'name': 'c::func3', 'loc_names': ['a::c::func3()', 'b::c::func3()']},
-            {'name': 'a::c::func1', 'loc_names': ['a::c::func1()']},
-            {'name': 'b::c::func1', 'loc_names': ['b::c::func1()']},
-            {'name': 'c::d::func2', 'loc_names': ['c::d::func2()']},
-            {'name': 'a::c::func1()', 'loc_names': ['a::c::func1()']},
-            {'name': 'b::c::func1()', 'loc_names': ['b::c::func1()']},
-            {'name': 'c::d::func2()', 'loc_names': ['c::d::func2()']},
-        ]
-
-        for bp_dict in bp_dicts:
-            self.verify_breakpoint_locations(target, bp_dict)
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24764")
-    def test_destructors(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-
-        # Don't skip prologue, so we can check the breakpoint address more
-        # easily
-        self.runCmd("settings set target.skip-prologue false")
-        try:
-            names = ['~c', 'c::~c', 'c::~c()']
-            loc_names = {'a::c::~c()', 'b::c::~c()'}
-            # TODO: For windows targets we should put windows mangled names
-            # here
-            symbols = [
-                '_ZN1a1cD1Ev',
-                '_ZN1a1cD2Ev',
-                '_ZN1b1cD1Ev',
-                '_ZN1b1cD2Ev']
-
-            for name in names:
-                bp = target.BreakpointCreateByName(name)
-
-                bp_loc_names = {bp_loc.GetAddress().GetFunction().GetName()
-                                for bp_loc in bp}
-                self.assertEquals(
-                    bp_loc_names,
-                    loc_names,
-                    "Breakpoint set on the correct symbol")
-
-                bp_addresses = {bp_loc.GetLoadAddress() for bp_loc in bp}
-                symbol_addresses = set()
-                for symbol in symbols:
-                    sc_list = target.FindSymbols(symbol, lldb.eSymbolTypeCode)
-                    self.assertEquals(
-                        sc_list.GetSize(), 1, "Found symbol " + symbol)
-                    symbol = sc_list.GetContextAtIndex(0).GetSymbol()
-                    symbol_addresses.add(
-                        symbol.GetStartAddress().GetLoadAddress(target))
-
-                self.assertEquals(
-                    symbol_addresses,
-                    bp_addresses,
-                    "Breakpoint set on correct address")
-        finally:
-            self.runCmd("settings clear target.skip-prologue")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp/main.cpp
deleted file mode 100644 (file)
index 4afabcb..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-#include <stdint.h>
-
-namespace a {
-    class c {
-    public:
-        c();
-        ~c();
-        void func1() 
-        {
-            puts (__PRETTY_FUNCTION__);
-        }
-        void func2() 
-        {
-            puts (__PRETTY_FUNCTION__);
-        }
-        void func3() 
-        {
-            puts (__PRETTY_FUNCTION__);
-        }
-    };
-
-    c::c() {}
-    c::~c() {}
-}
-
-namespace b {
-    class c {
-    public:
-        c();
-        ~c();
-        void func1() 
-        {
-            puts (__PRETTY_FUNCTION__);
-        }
-        void func3() 
-        {
-            puts (__PRETTY_FUNCTION__);
-        }
-    };
-
-    c::c() {}
-    c::~c() {}
-}
-
-namespace c {
-    class d {
-    public:
-        d () {}
-        ~d() {}
-        void func2() 
-        {
-            puts (__PRETTY_FUNCTION__);
-        }
-        void func3() 
-        {
-            puts (__PRETTY_FUNCTION__);
-        }
-    };
-}
-
-int main (int argc, char const *argv[])
-{
-    a::c ac;
-    b::c bc;
-    c::d cd;
-    ac.func1();
-    ac.func2();
-    ac.func3();
-    bc.func1();
-    bc.func3();
-    cd.func2();
-    cd.func3();
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp_exception/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp_exception/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp_exception/TestCPPExceptionBreakpoint.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp_exception/TestCPPExceptionBreakpoint.py
deleted file mode 100644 (file)
index ba8e94e..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-"""
-Test that you can set breakpoint and hit the C++ language exception breakpoint
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestCPPExceptionBreakpoint (TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    my_var = 10
-
-    @add_test_categories(['pyapi'])
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24538")
-    @expectedFailureNetBSD
-    def test_cpp_exception_breakpoint(self):
-        """Test setting and hitting the C++ exception breakpoint."""
-        self.build()
-        self.do_cpp_exception_bkpt()
-
-    @add_test_categories(['pyapi'])
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24538")
-    @expectedFailureNetBSD
-    def test_dummy_target_cpp_exception_breakpoint(self):
-        """Test setting and hitting the C++ exception breakpoint from dummy target."""
-        self.build()
-        self.do_dummy_target_cpp_exception_bkpt()
-
-    def setUp(self):
-        TestBase.setUp(self)
-        self.main_source = "main.c"
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-
-    def do_cpp_exception_bkpt(self):
-        exe = self.getBuildArtifact("a.out")
-        error = lldb.SBError()
-
-        self.target = self.dbg.CreateTarget(exe)
-        self.assertTrue(self.target, VALID_TARGET)
-
-        exception_bkpt = self.target.BreakpointCreateForException(
-            lldb.eLanguageTypeC_plus_plus, False, True)
-        self.assertTrue(
-            exception_bkpt.IsValid(),
-            "Created exception breakpoint.")
-
-        process = self.target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint(
-            process, exception_bkpt)
-        self.assertTrue(len(thread_list) == 1,
-                        "One thread stopped at the exception breakpoint.")
-
-    def do_dummy_target_cpp_exception_bkpt(self):
-        exe = self.getBuildArtifact("a.out")
-        error = lldb.SBError()
-
-        dummy_exception_bkpt = self.dbg.GetDummyTarget().BreakpointCreateForException(
-            lldb.eLanguageTypeC_plus_plus, False, True)
-        self.assertTrue(
-            dummy_exception_bkpt.IsValid(),
-            "Created exception breakpoint in dummy target.")
-
-        self.target = self.dbg.CreateTarget(exe)
-        self.assertTrue(self.target, VALID_TARGET)
-
-        exception_bkpt = self.target.GetBreakpointAtIndex(0)
-        self.assertTrue(
-            exception_bkpt.IsValid(),
-            "Target primed with exception breakpoint from dummy target.")
-
-        process = self.target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint(
-           process, exception_bkpt)
-        self.assertTrue(len(thread_list) == 1,
-                       "One thread stopped at the exception breakpoint.")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp_exception/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp_exception/main.cpp
deleted file mode 100644 (file)
index 76cb227..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <exception>
-
-void
-throws_int ()
-{
-    throw 5;
-}
-
-int
-main ()
-{
-    throws_int();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/TestDebugBreak.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/TestDebugBreak.py
deleted file mode 100644 (file)
index 2164ddf..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-"""
-Test embedded breakpoints, like `asm int 3;` in x86 or or `__debugbreak` on Windows.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class DebugBreakTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIf(archs=no_match(["i386", "i686", "x86_64"]))
-    @no_debug_info_test
-    def test_asm_int_3(self):
-        """Test that intrinsics like `__debugbreak();` and `asm {"int3"}` are treated like breakpoints."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Run the program.
-        target = self.dbg.CreateTarget(exe)
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        # We've hit the first stop, so grab the frame.
-        self.assertEqual(process.GetState(), lldb.eStateStopped)
-        stop_reason = lldb.eStopReasonException if (lldbplatformutil.getPlatform(
-        ) == "windows" or lldbplatformutil.getPlatform() == "macosx") else lldb.eStopReasonSignal
-        thread = lldbutil.get_stopped_thread(process, stop_reason)
-        self.assertIsNotNone(
-            thread, "Unable to find thread stopped at the __debugbreak()")
-        frame = thread.GetFrameAtIndex(0)
-
-        # We should be in funciton 'bar'.
-        self.assertTrue(frame.IsValid())
-        function_name = frame.GetFunctionName()
-        self.assertTrue('bar' in function_name,
-                        "Unexpected function name {}".format(function_name))
-
-        # We should be able to evaluate the parameter foo.
-        value = frame.EvaluateExpression('*foo')
-        self.assertEqual(value.GetValueAsSigned(), 42)
-
-        # The counter should be 1 at the first stop and increase by 2 for each
-        # subsequent stop.
-        counter = 1
-        while counter < 20:
-            value = frame.EvaluateExpression('count')
-            self.assertEqual(value.GetValueAsSigned(), counter)
-            counter += 2
-            process.Continue()
-
-        # The inferior should exit after the last iteration.
-        self.assertEqual(process.GetState(), lldb.eStateExited)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/main.c
deleted file mode 100644 (file)
index 5f93632..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifdef _MSC_VER
-#include <intrin.h>
-#define BREAKPOINT_INTRINSIC()    __debugbreak()
-#else
-#define BREAKPOINT_INTRINSIC()    __asm__ __volatile__ ("int3")
-#endif
-
-int
-bar(int const *foo)
-{
-    int count = 0, i = 0;
-    for (; i < 10; ++i)
-    {
-        count += 1;
-        BREAKPOINT_INTRINSIC();
-        count += 1;
-    }
-    return *foo;
-}
-
-int
-main(int argc, char **argv)
-{
-    int foo = 42;
-    bar(&foo);
-    return 0;
-}
-
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/dummy_target_breakpoints/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/dummy_target_breakpoints/Makefile
deleted file mode 100644 (file)
index 9645fd9..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-C_SOURCES := main.c
-
-ifneq (,$(findstring icc,$(CC)))
-    CFLAGS_EXTRAS := -debug inline-debug-info
-endif
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/dummy_target_breakpoints/TestBreakpointsWithNoTargets.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/dummy_target_breakpoints/TestBreakpointsWithNoTargets.py
deleted file mode 100644 (file)
index e3f293a..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-"""
-Test breakpoint commands set before we have a target
-"""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class BreakpointInDummyTarget (TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test(self):
-        """Test breakpoint set before we have a target. """
-        self.build()
-        self.dummy_breakpoint_test()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line = line_number('main.c', 'Set a breakpoint on this line.')
-        self.line2 = line_number('main.c', 'Set another on this line.')
-
-    def dummy_breakpoint_test(self):
-        """Test breakpoint set before we have a target. """
-
-        # This should create a breakpoint with 3 locations.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", self.line, num_expected_locations=0)
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", self.line2, num_expected_locations=0)
-
-        # This is the function to remove breakpoints from the dummy target
-        # to get a clean slate for the next test case.
-        def cleanup():
-            self.runCmd('breakpoint delete -D -f', check=False)
-            self.runCmd('breakpoint list', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # The breakpoint list should show 3 locations.
-        self.expect(
-            "breakpoint list -f",
-            "Breakpoint locations shown correctly",
-            substrs=[
-                "1: file = 'main.c', line = %d, exact_match = 0, locations = 1" %
-                self.line,
-                "2: file = 'main.c', line = %d, exact_match = 0, locations = 1" %
-                self.line2])
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # Stopped once.
-        self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=["stop reason = breakpoint 1."])
-
-        # Continue the program, there should be another stop.
-        self.runCmd("process continue")
-
-        # Stopped again.
-        self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=["stop reason = breakpoint 2."])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/dummy_target_breakpoints/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/dummy_target_breakpoints/main.c
deleted file mode 100644 (file)
index e1f0323..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#include <stdio.h>
-
-int
-main (int argc, char **argv)
-{
-  printf ("Set a breakpoint on this line.\n"); 
-  
-  return 0; // Set another on this line.
-}
-
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/Makefile
deleted file mode 100644 (file)
index 4b3098c..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-DYLIB_NAME := foo
-DYLIB_CXX_SOURCES := foo.cpp
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/TestBreakpointInGlobalConstructor.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/TestBreakpointInGlobalConstructor.py
deleted file mode 100644 (file)
index 4439607..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-"""
-Test that we can hit breakpoints in global constructors
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestBreakpointInGlobalConstructors(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @expectedFailureNetBSD
-    def test(self):
-        self.build()
-        self.line_foo = line_number('foo.cpp', '// !BR_foo')
-        self.line_main = line_number('main.cpp', '// !BR_main')
-
-        target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
-        self.assertTrue(target, VALID_TARGET)
-
-        env= self.registerSharedLibrariesWithTarget(target, ["foo"])
-
-        bp_main = lldbutil.run_break_set_by_file_and_line(
-            self, 'main.cpp', self.line_main)
-
-        bp_foo = lldbutil.run_break_set_by_file_and_line(
-            self, 'foo.cpp', self.line_foo, num_expected_locations=-2)
-
-        process = target.LaunchSimple(
-            None, env, self.get_process_working_directory())
-
-        self.assertIsNotNone(
-            lldbutil.get_one_thread_stopped_at_breakpoint_id(
-                self.process(), bp_foo))
-
-        self.runCmd("continue")
-
-        self.assertIsNotNone(
-            lldbutil.get_one_thread_stopped_at_breakpoint_id(
-                self.process(), bp_main))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/foo.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/foo.cpp
deleted file mode 100644 (file)
index f959a29..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#include "foo.h"
-
-Foo::Foo() : x(42) {
-    bool some_code = x == 42;  // !BR_foo
-} 
-
-Foo FooObj;
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/foo.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/foo.h
deleted file mode 100644 (file)
index 3bc63fe..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef FOO_H
-#define FOO_H
-
-struct LLDB_TEST_API Foo {
-  Foo();
-  int x;
-};
-
-extern LLDB_TEST_API Foo FooObj;
-
-#endif
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/main.cpp
deleted file mode 100644 (file)
index d1c8038..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#include "foo.h"
-
-struct Main {
-  Main();
-  int x;
-};
-
-Main::Main() : x(47) {
-    bool some_code = x == 47; // !BR_main
-}
-
-Main MainObj;
-
-int main() { return MainObj.x + FooObj.x; }
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/hardware_breakpoints/hardware_breakpoint_on_multiple_threads/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/hardware_breakpoints/hardware_breakpoint_on_multiple_threads/Makefile
deleted file mode 100644 (file)
index de4ec12..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-ENABLE_THREADS := YES
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/hardware_breakpoints/hardware_breakpoint_on_multiple_threads/TestHWBreakMultiThread.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/hardware_breakpoints/hardware_breakpoint_on_multiple_threads/TestHWBreakMultiThread.py
deleted file mode 100644 (file)
index 56112b2..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-"""
-Test hardware breakpoints for multiple threads.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-# Hardware breakpoints are supported only by platforms mentioned in oslist.
-@skipUnlessPlatform(oslist=['linux'])
-class HardwareBreakpointMultiThreadTestCase(TestBase):
-    NO_DEBUG_INFO_TESTCASE = True
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # LLDB supports hardware breakpoints for arm and aarch64 architectures.
-    @skipIf(archs=no_match(['arm', 'aarch64']))
-    def test_hw_break_set_delete_multi_thread(self):
-        self.build()
-        self.setTearDownCleanup()
-        self.break_multi_thread('delete')
-
-    # LLDB supports hardware breakpoints for arm and aarch64 architectures.
-    @skipIf(archs=no_match(['arm', 'aarch64']))
-    def test_hw_break_set_disable_multi_thread(self):
-        self.build()
-        self.setTearDownCleanup()
-        self.break_multi_thread('disable')
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Our simple source filename.
-        self.source = 'main.cpp'
-        # Find the line number to break inside main().
-        self.first_stop = line_number(
-            self.source, 'Starting thread creation with hardware breakpoint set')
-
-    def break_multi_thread(self, removal_type):
-        """Test that lldb hardware breakpoints work for multiple threads."""
-        self.runCmd("file " + self.getBuildArtifact("a.out"),
-                    CURRENT_EXECUTABLE_SET)
-
-        # Stop in main before creating any threads.
-        lldbutil.run_break_set_by_file_and_line(
-            self, None, self.first_stop, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # We should be stopped again due to the breakpoint.
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Now set a hardware breakpoint in thread function.
-        self.expect("breakpoint set -b hw_break_function --hardware",
-            substrs=[
-                'Breakpoint',
-                'hw_break_function',
-                'address = 0x'])
-
-        # We should stop in hw_break_function function for 4 threads.
-        count = 0
-
-        while count < 2 :
-
-            self.runCmd("process continue")
-
-            # We should be stopped in hw_break_function
-            # The stop reason of the thread should be breakpoint.
-            self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                substrs=[
-                    'stop reason = breakpoint',
-                    'hw_break_function'])
-
-            # Continue the loop and test that we are stopped 4 times.
-            count += 1
-
-        if removal_type == 'delete':
-            self.runCmd("settings set auto-confirm true")
-
-            # Now 'breakpoint delete' should just work fine without confirmation
-            # prompt from the command interpreter.
-            self.expect("breakpoint delete",
-                        startstr="All breakpoints removed")
-
-            # Restore the original setting of auto-confirm.
-            self.runCmd("settings clear auto-confirm")
-
-        elif removal_type == 'disable':
-            self.expect("breakpoint disable",
-                        startstr="All breakpoints disabled.")
-
-        # Continue. Program should exit without stopping anywhere.
-        self.runCmd("process continue")
-
-        # Process should have stopped and exited with status = 0
-        self.expect("process status", PROCESS_STOPPED,
-                    patterns=['Process .* exited with status = 0'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/hardware_breakpoints/hardware_breakpoint_on_multiple_threads/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/hardware_breakpoints/hardware_breakpoint_on_multiple_threads/main.cpp
deleted file mode 100644 (file)
index 94a12c6..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <chrono>
-#include <cstdio>
-#include <mutex>
-#include <random>
-#include <thread>
-
-#define NUM_OF_THREADS 4
-
-std::mutex hw_break_mutex;
-
-void
-hw_break_function (uint32_t thread_index) {
-  printf ("%s called by Thread #%u...\n", __FUNCTION__, thread_index);
-}
-
-
-void
-thread_func (uint32_t thread_index) {
-  printf ("%s (thread index = %u) starting...\n", __FUNCTION__, thread_index);
-
-  hw_break_mutex.lock();
-  
-  hw_break_function(thread_index); // Call hw_break_function
-
-  hw_break_mutex.unlock();
-}
-
-
-int main (int argc, char const *argv[])
-{
-  std::thread threads[NUM_OF_THREADS]; 
-
-  printf ("Starting thread creation with hardware breakpoint set...\n");
-
-  for (auto &thread : threads)
-    thread = std::thread{thread_func, std::distance(threads, &thread)};
-
-  for (auto &thread : threads)
-    thread.join();
-
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/inlined_breakpoints/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/inlined_breakpoints/Makefile
deleted file mode 100644 (file)
index 551d02f..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := int.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/inlined_breakpoints/TestInlinedBreakpoints.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/inlined_breakpoints/TestInlinedBreakpoints.py
deleted file mode 100644 (file)
index 76fefda..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-"""
-Test that inlined breakpoints (breakpoint set on a file/line included from
-another source file) works correctly.
-"""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class InlinedBreakpointsTestCase(TestBase):
-    """Bug fixed: rdar://problem/8464339"""
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_with_run_command(self):
-        """Test 'b basic_types.cpp:176' does break (where int.cpp includes basic_type.cpp)."""
-        self.build()
-        self.inlined_breakpoints()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside basic_type.cpp.
-        self.line = line_number(
-            'basic_type.cpp',
-            '// Set break point at this line.')
-
-    def inlined_breakpoints(self):
-        """Test 'b basic_types.cpp:176' does break (where int.cpp includes basic_type.cpp)."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # With the inline-breakpoint-strategy, our file+line breakpoint should
-        # not resolve to a location.
-        self.runCmd('settings set target.inline-breakpoint-strategy headers')
-
-        # Set a breakpoint and fail because it is in an inlined source
-        # implemenation file
-        lldbutil.run_break_set_by_file_and_line(
-            self, "basic_type.cpp", self.line, num_expected_locations=0)
-
-        # Now enable breakpoints in implementation files and see the breakpoint
-        # set succeed
-        self.runCmd('settings set target.inline-breakpoint-strategy always')
-        # And add hooks to restore the settings during tearDown().
-        self.addTearDownHook(lambda: self.runCmd(
-            "settings set target.inline-breakpoint-strategy always"))
-
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            "basic_type.cpp",
-            self.line,
-            num_expected_locations=1,
-            loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        # And it should break at basic_type.cpp:176.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint',
-                             'basic_type.cpp:%d' % self.line])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/inlined_breakpoints/basic_type.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/inlined_breakpoints/basic_type.cpp
deleted file mode 100644 (file)
index 75d2c36..0000000
+++ /dev/null
@@ -1,178 +0,0 @@
-// This file must have the following defined before it is included:
-// T defined to the type to test (int, float, etc)
-// T_CSTR a C string representation of the type T ("int", "float")
-// T_VALUE_1 defined to a valid initializer value for TEST_TYPE (7 for int, 2.0 for float)
-// T_VALUE_2, T_VALUE_3, T_VALUE_4 defined to a valid initializer value for TEST_TYPE that is different from TEST_VALUE_1
-// T_PRINTF_FORMAT defined if T can be printed with printf
-//
-// An example for integers is below
-#if 0
-
-#define T int
-#define T_CSTR "int"
-#define T_VALUE_1 11001110
-#define T_VALUE_2 22002220
-#define T_VALUE_3 33003330
-#define T_VALUE_4 44044440
-#define T_PRINTF_FORMAT "%i"
-
-#include "basic_type.cpp"
-
-#endif
-
-#include <cstdint>
-#include <cstdio>
-
-class a_class 
-{
-public:
-    a_class (const T& a, const T& b) :
-        m_a (a),
-        m_b (b)
-    {
-    }
-
-    ~a_class ()
-    {
-    }
-
-    const T&
-    get_a()
-    {
-        return m_a;
-    } 
-
-    void
-    set_a (const T& a)
-    {
-        m_a = a;
-    }
-
-    const T&
-    get_b()
-    {
-        return m_b;
-    } 
-
-    void
-    set_b (const T& b)
-    {
-        m_b = b;
-    }
-
-protected:
-    T m_a;
-    T m_b;
-};
-
-typedef struct a_struct_tag {
-    T a;
-    T b;
-} a_struct_t;
-
-
-typedef union a_union_zero_tag {
-    T a;
-    double a_double;
-} a_union_zero_t;
-
-typedef struct a_union_nonzero_tag {
-  double a_double;
-  a_union_zero_t u;
-} a_union_nonzero_t;
-
-
-void Puts(char const *msg)
-{
-  std::puts(msg);
-}
-
-int 
-main (int argc, char const *argv[])
-{
-    T a = T_VALUE_1;
-    T* a_ptr = &a;
-    T& a_ref = a;
-    T a_array_bounded[2] = { T_VALUE_1, T_VALUE_2 };    
-    T a_array_unbounded[] = { T_VALUE_1, T_VALUE_2 };
-
-    a_class a_class_instance (T_VALUE_1, T_VALUE_2);
-    a_class *a_class_ptr = &a_class_instance;
-    a_class &a_class_ref = a_class_instance;
-
-    a_struct_t a_struct = { T_VALUE_1, T_VALUE_2 };
-    a_struct_t *a_struct_ptr = &a_struct;
-    a_struct_t &a_struct_ref = a_struct;
-
-    // Create a union with type T at offset zero
-    a_union_zero_t a_union_zero;
-    a_union_zero.a = T_VALUE_1;
-    a_union_zero_t *a_union_zero_ptr = &a_union_zero;
-    a_union_zero_t &a_union_zero_ref = a_union_zero;
-
-    // Create a union with type T at a non-zero offset
-    a_union_nonzero_t a_union_nonzero;
-    a_union_nonzero.u.a = T_VALUE_1;
-    a_union_nonzero_t *a_union_nonzero_ptr = &a_union_nonzero;
-    a_union_nonzero_t &a_union_nonzero_ref = a_union_nonzero;
-
-    a_struct_t a_struct_array_bounded[2]  = {{ T_VALUE_1, T_VALUE_2 }, { T_VALUE_3, T_VALUE_4 }};
-    a_struct_t a_struct_array_unbounded[] = {{ T_VALUE_1, T_VALUE_2 }, { T_VALUE_3, T_VALUE_4 }};
-    a_union_zero_t a_union_zero_array_bounded[2];
-    a_union_zero_array_bounded[0].a = T_VALUE_1;
-    a_union_zero_array_bounded[1].a = T_VALUE_2;
-    a_union_zero_t a_union_zero_array_unbounded[] = {{ T_VALUE_1 }, { T_VALUE_2 }};
-    
-#ifdef T_PRINTF_FORMAT
-    std::printf ("%s: a = '" T_PRINTF_FORMAT "'\n", T_CSTR, a);
-    std::printf ("%s*: %p => *a_ptr = '" T_PRINTF_FORMAT "'\n", T_CSTR, a_ptr, *a_ptr);
-    std::printf ("%s&: @%p => a_ref = '" T_PRINTF_FORMAT "'\n", T_CSTR, &a_ref, a_ref);
-
-    std::printf ("%s[2]: a_array_bounded[0] = '" T_PRINTF_FORMAT "'\n", T_CSTR, a_array_bounded[0]);
-    std::printf ("%s[2]: a_array_bounded[1] = '" T_PRINTF_FORMAT "'\n", T_CSTR, a_array_bounded[1]);
-
-    std::printf ("%s[]: a_array_unbounded[0] = '" T_PRINTF_FORMAT "'\n", T_CSTR, a_array_unbounded[0]);
-    std::printf ("%s[]: a_array_unbounded[1] = '" T_PRINTF_FORMAT "'\n", T_CSTR, a_array_unbounded[1]);
-
-    std::printf ("(a_class) a_class_instance.m_a = '" T_PRINTF_FORMAT "'\n", a_class_instance.get_a());
-    std::printf ("(a_class) a_class_instance.m_b = '" T_PRINTF_FORMAT "'\n", a_class_instance.get_b());
-    std::printf ("(a_class*) a_class_ptr = %p, a_class_ptr->m_a = '" T_PRINTF_FORMAT "'\n", a_class_ptr, a_class_ptr->get_a());
-    std::printf ("(a_class*) a_class_ptr = %p, a_class_ptr->m_b = '" T_PRINTF_FORMAT "'\n", a_class_ptr, a_class_ptr->get_b());
-    std::printf ("(a_class&) a_class_ref = %p, a_class_ref.m_a = '" T_PRINTF_FORMAT "'\n", &a_class_ref, a_class_ref.get_a());
-    std::printf ("(a_class&) a_class_ref = %p, a_class_ref.m_b = '" T_PRINTF_FORMAT "'\n", &a_class_ref, a_class_ref.get_b());
-
-    std::printf ("(a_struct_t) a_struct.a = '" T_PRINTF_FORMAT "'\n", a_struct.a);
-    std::printf ("(a_struct_t) a_struct.b = '" T_PRINTF_FORMAT "'\n", a_struct.b);
-    std::printf ("(a_struct_t*) a_struct_ptr = %p, a_struct_ptr->a = '" T_PRINTF_FORMAT "'\n", a_struct_ptr, a_struct_ptr->a);
-    std::printf ("(a_struct_t*) a_struct_ptr = %p, a_struct_ptr->b = '" T_PRINTF_FORMAT "'\n", a_struct_ptr, a_struct_ptr->b);
-    std::printf ("(a_struct_t&) a_struct_ref = %p, a_struct_ref.a = '" T_PRINTF_FORMAT "'\n", &a_struct_ref, a_struct_ref.a);
-    std::printf ("(a_struct_t&) a_struct_ref = %p, a_struct_ref.b = '" T_PRINTF_FORMAT "'\n", &a_struct_ref, a_struct_ref.b);
-    
-    std::printf ("(a_union_zero_t) a_union_zero.a = '" T_PRINTF_FORMAT "'\n", a_union_zero.a);
-    std::printf ("(a_union_zero_t*) a_union_zero_ptr = %p, a_union_zero_ptr->a = '" T_PRINTF_FORMAT "'\n", a_union_zero_ptr, a_union_zero_ptr->a);
-    std::printf ("(a_union_zero_t&) a_union_zero_ref = %p, a_union_zero_ref.a = '" T_PRINTF_FORMAT "'\n", &a_union_zero_ref, a_union_zero_ref.a);
-
-    std::printf ("(a_union_nonzero_t) a_union_nonzero.u.a = '" T_PRINTF_FORMAT "'\n", a_union_nonzero.u.a);
-    std::printf ("(a_union_nonzero_t*) a_union_nonzero_ptr = %p, a_union_nonzero_ptr->u.a = '" T_PRINTF_FORMAT "'\n", a_union_nonzero_ptr, a_union_nonzero_ptr->u.a);
-    std::printf ("(a_union_nonzero_t&) a_union_nonzero_ref = %p, a_union_nonzero_ref.u.a = '" T_PRINTF_FORMAT "'\n", &a_union_nonzero_ref, a_union_nonzero_ref.u.a);
-
-    std::printf ("(a_struct_t[2]) a_struct_array_bounded[0].a = '" T_PRINTF_FORMAT "'\n", a_struct_array_bounded[0].a);
-    std::printf ("(a_struct_t[2]) a_struct_array_bounded[0].b = '" T_PRINTF_FORMAT "'\n", a_struct_array_bounded[0].b);
-    std::printf ("(a_struct_t[2]) a_struct_array_bounded[1].a = '" T_PRINTF_FORMAT "'\n", a_struct_array_bounded[1].a);
-    std::printf ("(a_struct_t[2]) a_struct_array_bounded[1].b = '" T_PRINTF_FORMAT "'\n", a_struct_array_bounded[1].b);
-
-    std::printf ("(a_struct_t[]) a_struct_array_unbounded[0].a = '" T_PRINTF_FORMAT "'\n", a_struct_array_unbounded[0].a);
-    std::printf ("(a_struct_t[]) a_struct_array_unbounded[0].b = '" T_PRINTF_FORMAT "'\n", a_struct_array_unbounded[0].b);
-    std::printf ("(a_struct_t[]) a_struct_array_unbounded[1].a = '" T_PRINTF_FORMAT "'\n", a_struct_array_unbounded[1].a);
-    std::printf ("(a_struct_t[]) a_struct_array_unbounded[1].b = '" T_PRINTF_FORMAT "'\n", a_struct_array_unbounded[1].b);
-
-    std::printf ("(a_union_zero_t[2]) a_union_zero_array_bounded[0].a = '" T_PRINTF_FORMAT "'\n", a_union_zero_array_bounded[0].a);
-    std::printf ("(a_union_zero_t[2]) a_union_zero_array_bounded[1].a = '" T_PRINTF_FORMAT "'\n", a_union_zero_array_bounded[1].a);
-
-    std::printf ("(a_union_zero_t[]) a_union_zero_array_unbounded[0].a = '" T_PRINTF_FORMAT "'\n", a_union_zero_array_unbounded[0].a);
-    std::printf ("(a_union_zero_t[]) a_union_zero_array_unbounded[1].a = '" T_PRINTF_FORMAT "'\n", a_union_zero_array_unbounded[1].a);
-
-#endif
-    Puts("About to exit, break here to check values..."); // Set break point at this line.
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/inlined_breakpoints/int.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/inlined_breakpoints/int.cpp
deleted file mode 100644 (file)
index 922398b..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#define T int
-#define T_CSTR "int"
-#define T_VALUE_1 11001110
-#define T_VALUE_2 22002220
-#define T_VALUE_3 33003330
-#define T_VALUE_4 44004440
-#define T_PRINTF_FORMAT "%i"
-
-#include "basic_type.cpp"
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/Makefile
deleted file mode 100644 (file)
index 4b3098c..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-DYLIB_NAME := foo
-DYLIB_CXX_SOURCES := foo.cpp
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/TestMoveNearest.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/TestMoveNearest.py
deleted file mode 100644 (file)
index b8281e9..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-from __future__ import print_function
-
-
-import unittest2
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class TestMoveNearest(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line1 = line_number('foo.h', '// !BR1')
-        self.line2 = line_number('foo.h', '// !BR2')
-        self.line_between = line_number('main.cpp', "// BR_Between")
-        print("BR_Between found at", self.line_between)
-        self.line_main = line_number('main.cpp', '// !BR_main')
-
-    def test(self):
-        """Test target.move-to-nearest logic"""
-
-        self.build()
-        target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
-        self.assertTrue(target, VALID_TARGET)
-
-        lldbutil.run_break_set_by_symbol(self, 'main', sym_exact=True)
-        environment = self.registerSharedLibrariesWithTarget(target, ["foo"])
-        process = target.LaunchSimple(None, environment, self.get_process_working_directory())
-        self.assertEquals(process.GetState(), lldb.eStateStopped)
-
-        # Regardless of the -m value the breakpoint should have exactly one
-        # location on the foo functions
-        self.runCmd("settings set target.move-to-nearest-code true")
-        lldbutil.run_break_set_by_file_and_line(self, 'foo.h', self.line1,
-                loc_exact=True, extra_options="-m 1")
-        lldbutil.run_break_set_by_file_and_line(self, 'foo.h', self.line2,
-                loc_exact=True, extra_options="-m 1")
-
-        self.runCmd("settings set target.move-to-nearest-code false")
-        lldbutil.run_break_set_by_file_and_line(self, 'foo.h', self.line1,
-                loc_exact=True, extra_options="-m 0")
-        lldbutil.run_break_set_by_file_and_line(self, 'foo.h', self.line2,
-                loc_exact=True, extra_options="-m 0")
-
-
-        # Make sure we set a breakpoint in main with -m 1 for various lines in
-        # the function declaration
-        # "int"
-        lldbutil.run_break_set_by_file_and_line(self, 'main.cpp',
-                self.line_main-1, extra_options="-m 1")
-        # "main()"
-        lldbutil.run_break_set_by_file_and_line(self, 'main.cpp',
-                self.line_main, extra_options="-m 1")
-        # "{"
-        lldbutil.run_break_set_by_file_and_line(self, 'main.cpp',
-                self.line_main+1, extra_options="-m 1")
-        # "return .."
-        lldbutil.run_break_set_by_file_and_line(self, 'main.cpp',
-                self.line_main+2, extra_options="-m 1")
-
-        # Make sure we don't put move the breakpoint if it is set between two functions:
-        lldbutil.run_break_set_by_file_and_line(self, 'main.cpp',
-                self.line_between, extra_options="-m 1", num_expected_locations=0)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/foo.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/foo.cpp
deleted file mode 100644 (file)
index 8dad0a2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "foo.h"
-
-int call_foo1() { return foo1(); }
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/foo.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/foo.h
deleted file mode 100644 (file)
index 9f0e56d..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-inline int foo1() { return 1; } // !BR1
-
-inline int foo2() { return 2; } // !BR2
-
-LLDB_TEST_API extern int call_foo1();
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/main.cpp
deleted file mode 100644 (file)
index 76a22a5..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#include "foo.h"
-
-int call_foo2() { return foo2(); }
-// BR_Between
-int
-main() // !BR_main
-{
-  return call_foo1() + call_foo2();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/objc/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/objc/Makefile
deleted file mode 100644 (file)
index 37dd8f4..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-OBJC_SOURCES := main.m
-
-
-
-LD_EXTRAS := -framework Foundation
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/objc/TestObjCBreakpoints.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/objc/TestObjCBreakpoints.py
deleted file mode 100644 (file)
index 2091987..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-"""
-Test that objective-c constant strings are generated correctly by the expression
-parser.
-"""
-
-
-
-import shutil
-import subprocess
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-@skipUnlessDarwin
-class TestObjCBreakpoints(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_break(self):
-        """Test setting Objective-C specific breakpoints (DWARF in .o files)."""
-        self.build()
-        self.setTearDownCleanup()
-        self.check_objc_breakpoints(False)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.main_source = "main.m"
-        self.line = line_number(self.main_source, '// Set breakpoint here')
-
-    def check_category_breakpoints(self):
-        name_bp = self.target.BreakpointCreateByName("myCategoryFunction")
-        selector_bp = self.target.BreakpointCreateByName(
-            "myCategoryFunction",
-            lldb.eFunctionNameTypeSelector,
-            lldb.SBFileSpecList(),
-            lldb.SBFileSpecList())
-        self.assertTrue(
-            name_bp.GetNumLocations() == selector_bp.GetNumLocations(),
-            'Make sure setting a breakpoint by name "myCategoryFunction" sets a breakpoint even though it is in a category')
-        for bp_loc in selector_bp:
-            function_name = bp_loc.GetAddress().GetSymbol().GetName()
-            self.assertTrue(
-                " myCategoryFunction]" in function_name,
-                'Make sure all function names have " myCategoryFunction]" in their names')
-
-        category_bp = self.target.BreakpointCreateByName(
-            "-[MyClass(MyCategory) myCategoryFunction]")
-        stripped_bp = self.target.BreakpointCreateByName(
-            "-[MyClass myCategoryFunction]")
-        stripped2_bp = self.target.BreakpointCreateByName(
-            "[MyClass myCategoryFunction]")
-        self.assertTrue(
-            category_bp.GetNumLocations() == 1,
-            "Make sure we can set a breakpoint using a full objective C function name with the category included (-[MyClass(MyCategory) myCategoryFunction])")
-        self.assertTrue(
-            stripped_bp.GetNumLocations() == 1,
-            "Make sure we can set a breakpoint using a full objective C function name without the category included (-[MyClass myCategoryFunction])")
-        self.assertTrue(
-            stripped2_bp.GetNumLocations() == 1,
-            "Make sure we can set a breakpoint using a full objective C function name without the category included ([MyClass myCategoryFunction])")
-
-    def check_objc_breakpoints(self, have_dsym):
-        """Test constant string generation amd comparison by the expression parser."""
-
-        # Set debugger into synchronous mode
-        self.dbg.SetAsync(False)
-
-        # Create a target by the debugger.
-        exe = self.getBuildArtifact("a.out")
-        self.target = self.dbg.CreateTarget(exe)
-        self.assertTrue(self.target, VALID_TARGET)
-
-        #----------------------------------------------------------------------
-        # Set breakpoints on all selectors whose name is "count". This should
-        # catch breakpoints that are both C functions _and_ anything whose
-        # selector is "count" because just looking at "count" we can't tell
-        # definitively if the name is a selector or a C function
-        #----------------------------------------------------------------------
-        name_bp = self.target.BreakpointCreateByName("count")
-        selector_bp = self.target.BreakpointCreateByName(
-            "count",
-            lldb.eFunctionNameTypeSelector,
-            lldb.SBFileSpecList(),
-            lldb.SBFileSpecList())
-        self.assertTrue(
-            name_bp.GetNumLocations() >= selector_bp.GetNumLocations(),
-            'Make sure we get at least the same amount of breakpoints if not more when setting by name "count"')
-        self.assertTrue(
-            selector_bp.GetNumLocations() > 50,
-            'Make sure we find a lot of "count" selectors')  # There are 93 on the latest MacOSX
-        for bp_loc in selector_bp:
-            function_name = bp_loc.GetAddress().GetSymbol().GetName()
-            self.assertTrue(
-                " count]" in function_name,
-                'Make sure all function names have " count]" in their names')
-
-        #----------------------------------------------------------------------
-        # Set breakpoints on all selectors whose name is "isEqual:". This should
-        # catch breakpoints that are only ObjC selectors because no C function
-        # can end with a :
-        #----------------------------------------------------------------------
-        name_bp = self.target.BreakpointCreateByName("isEqual:")
-        selector_bp = self.target.BreakpointCreateByName(
-            "isEqual:",
-            lldb.eFunctionNameTypeSelector,
-            lldb.SBFileSpecList(),
-            lldb.SBFileSpecList())
-        self.assertTrue(
-            name_bp.GetNumLocations() == selector_bp.GetNumLocations(),
-            'Make sure setting a breakpoint by name "isEqual:" only sets selector breakpoints')
-        for bp_loc in selector_bp:
-            function_name = bp_loc.GetAddress().GetSymbol().GetName()
-            self.assertTrue(
-                " isEqual:]" in function_name,
-                'Make sure all function names have " isEqual:]" in their names')
-
-        self.check_category_breakpoints()
-
-        if have_dsym:
-            shutil.rmtree(exe + ".dSYM")
-        self.assertTrue(subprocess.call(
-            ['/usr/bin/strip', '-Sx', exe]) == 0, 'stripping dylib succeeded')
-
-        # Check breakpoints again, this time using the symbol table only
-        self.check_category_breakpoints()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/objc/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/objc/main.m
deleted file mode 100644 (file)
index 5356749..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-#import <Foundation/Foundation.h>
-#include <unistd.h>
-
-@interface MyClass : NSObject
-@end
-
-@implementation MyClass : NSObject
-@end
-
-@implementation MyClass (MyCategory)
-
-
-- (void) myCategoryFunction {
-    NSLog (@"myCategoryFunction");
-}
-
-@end
-
-
-    
-int
-Test_Selector ()
-{
-    SEL sel = @selector(length);
-    printf("sel = %p\n", sel);
-    // Expressions to test here for selector: 
-    // expression (char *)sel_getName(sel)
-    //      The expression above should return "sel" as it should be just
-    //      a uniqued C string pointer. We were seeing the result pointer being
-    //      truncated with recent LLDBs.
-    return 0; // Break here for selector: tests
-}
-
-int
-Test_NSString (const char *program)
-{
-    NSString *str = [NSString stringWithFormat:@"Hello from '%s'", program];
-    NSLog(@"NSString instance: %@", str);
-    printf("str = '%s'\n", [str cStringUsingEncoding: [NSString defaultCStringEncoding]]);
-    printf("[str length] = %zu\n", (size_t)[str length]);
-    printf("[str description] = %s\n", [[str description] UTF8String]);
-    id str_id = str;
-    // Expressions to test here for NSString:
-    // expression (char *)sel_getName(sel)
-    // expression [str length]
-    // expression [str_id length]
-    // expression [str description]
-    // expression [str_id description]
-    // expression str.length
-    // expression str.description
-    // expression str = @"new"
-    // expression str = [NSString stringWithFormat: @"%cew", 'N']
-    return 0; // Break here for NSString tests
-}
-
-NSString *my_global_str = NULL;
-
-int
-Test_NSArray ()
-{
-    NSMutableArray *nil_mutable_array = nil;
-    NSArray *array1 = [NSArray arrayWithObjects: @"array1 object1", @"array1 object2", @"array1 object3", nil];
-    NSArray *array2 = [NSArray arrayWithObjects: array1, @"array2 object2", @"array2 object3", nil];
-    // Expressions to test here for NSArray:
-    // expression [nil_mutable_array count]
-    // expression [array1 count]
-    // expression array1.count
-    // expression [array2 count]
-    // expression array2.count
-    id obj;
-    // After each object at index call, use expression and validate object
-    obj = [array1 objectAtIndex: 0]; // Break here for NSArray tests
-    obj = [array1 objectAtIndex: 1];
-    obj = [array1 objectAtIndex: 2];
-
-    obj = [array2 objectAtIndex: 0];
-    obj = [array2 objectAtIndex: 1];
-    obj = [array2 objectAtIndex: 2];
-    NSUInteger count = [nil_mutable_array count];
-    return 0;
-}
-
-
-int main (int argc, char const *argv[])
-{
-    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-    Test_Selector(); // Set breakpoint here
-    Test_NSArray ();
-    Test_NSString (argv[0]);
-    MyClass *my_class = [[MyClass alloc] init];
-    [my_class myCategoryFunction];
-    printf("sizeof(id) = %zu\n", sizeof(id));
-    printf("sizeof(Class) = %zu\n", sizeof(Class));
-    printf("sizeof(SEL) = %zu\n", sizeof(SEL));
-
-    [pool release];
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/Makefile
deleted file mode 100644 (file)
index 9645fd9..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-C_SOURCES := main.c
-
-ifneq (,$(findstring icc,$(CC)))
-    CFLAGS_EXTRAS := -debug inline-debug-info
-endif
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/TestRequireHWBreakpoints.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/TestRequireHWBreakpoints.py
deleted file mode 100644 (file)
index 0bf82c4..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-"""
-Test require hardware breakpoints.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class BreakpointLocationsTestCase(TestBase):
-    NO_DEBUG_INFO_TESTCASE = True
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_breakpoint(self):
-        """Test regular breakpoints when hardware breakpoints are required."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-
-        self.runCmd("settings set target.require-hardware-breakpoint true")
-
-        breakpoint = target.BreakpointCreateByLocation("main.c", 1)
-        self.assertTrue(breakpoint.IsHardware())
-
-    @skipIfWindows
-    @expectedFailureAll(archs="aarch64", oslist="linux",
-                        bugnumber="https://bugs.llvm.org/show_bug.cgi?id=44055")
-    def test_step_range(self):
-        """Test stepping when hardware breakpoints are required."""
-        self.build()
-
-        _, _, thread, _ = lldbutil.run_to_line_breakpoint(
-            self, lldb.SBFileSpec("main.c"), 1)
-
-        self.runCmd("settings set target.require-hardware-breakpoint true")
-
-        # Ensure we fail in the interpreter.
-        self.expect("thread step-in")
-        self.expect("thread step-in", error=True)
-
-        # Ensure we fail when stepping through the API.
-        error = lldb.SBError()
-        thread.StepInto('', 4, error)
-        self.assertTrue(error.Fail())
-        self.assertTrue("Could not create hardware breakpoint for thread plan"
-                        in error.GetCString())
-
-    @skipIfWindows
-    @expectedFailureAll(archs="aarch64", oslist="linux",
-                        bugnumber="https://bugs.llvm.org/show_bug.cgi?id=44055")
-    def test_step_out(self):
-        """Test stepping out when hardware breakpoints are required."""
-        self.build()
-
-        _, _, thread, _ = lldbutil.run_to_line_breakpoint(
-            self, lldb.SBFileSpec("main.c"), 1)
-
-        self.runCmd("settings set target.require-hardware-breakpoint true")
-
-        # Ensure this fails in the command interpreter.
-        self.expect("thread step-out", error=True)
-
-        # Ensure we fail when stepping through the API.
-        error = lldb.SBError()
-        thread.StepOut(error)
-        self.assertTrue(error.Fail())
-        self.assertTrue("Could not create hardware breakpoint for thread plan"
-                        in error.GetCString())
-
-    @skipIfWindows
-    @expectedFailureAll(archs="aarch64", oslist="linux",
-                        bugnumber="https://bugs.llvm.org/show_bug.cgi?id=44055")
-    def test_step_over(self):
-        """Test stepping over when hardware breakpoints are required."""
-        self.build()
-
-        _, _, thread, _ = lldbutil.run_to_line_breakpoint(
-            self, lldb.SBFileSpec("main.c"), 7)
-
-        self.runCmd("settings set target.require-hardware-breakpoint true")
-
-        # Step over doesn't fail immediately but fails later on.
-        self.expect(
-            "thread step-over",
-            error=True,
-            substrs=[
-                'error: Could not create hardware breakpoint for thread plan.'
-            ])
-
-    @skipIfWindows
-    @expectedFailureAll(archs="aarch64", oslist="linux",
-                        bugnumber="https://bugs.llvm.org/show_bug.cgi?id=44055")
-    def test_step_until(self):
-        """Test stepping until when hardware breakpoints are required."""
-        self.build()
-
-        _, _, thread, _ = lldbutil.run_to_line_breakpoint(
-            self, lldb.SBFileSpec("main.c"), 7)
-
-        self.runCmd("settings set target.require-hardware-breakpoint true")
-
-        self.expect("thread until 5", error=True)
-
-        # Ensure we fail when stepping through the API.
-        error = thread.StepOverUntil(lldb.SBFrame(), lldb.SBFileSpec(), 5)
-        self.assertTrue(error.Fail())
-        self.assertTrue("Could not create hardware breakpoint for thread plan"
-                        in error.GetCString())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/main.c
deleted file mode 100644 (file)
index 7d49a57..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-int break_on_me() {
-  int i = 10;
-  i++;
-  return i;
-}
-
-int main() {
-  return break_on_me();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/Makefile
deleted file mode 100644 (file)
index 695335e..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-C_SOURCES := main.c
-CFLAGS_EXTRAS := -std=c99
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/TestScriptedResolver.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/TestScriptedResolver.py
deleted file mode 100644 (file)
index 895f4fa..0000000
+++ /dev/null
@@ -1,224 +0,0 @@
-"""
-Test setting breakpoints using a scripted resolver
-"""
-
-import os
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-
-
-class TestScriptedResolver(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24528")
-    def test_scripted_resolver(self):
-        """Use a scripted resolver to set a by symbol name breakpoint"""
-        self.build()
-        self.do_test()
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24528")
-    def test_search_depths(self):
-        """ Make sure we are called at the right depths depending on what we return
-            from __get_depth__"""
-        self.build()
-        self.do_test_depths()
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24528")
-    def test_command_line(self):
-        """ Test setting a resolver breakpoint from the command line """
-        self.build()
-        self.do_test_cli()
-
-    def test_bad_command_lines(self):
-        """Make sure we get appropriate errors when we give invalid key/value
-           options"""
-        self.build()
-        self.do_test_bad_options()        
-
-    def make_target_and_import(self):
-        target = lldbutil.run_to_breakpoint_make_target(self)
-        interp = self.dbg.GetCommandInterpreter()
-        error = lldb.SBError()
-
-        script_name = os.path.join(self.getSourceDir(), "resolver.py")
-        source_name = os.path.join(self.getSourceDir(), "main.c")
-
-        command = "command script import " + script_name
-        result = lldb.SBCommandReturnObject()
-        interp.HandleCommand(command, result)
-        self.assertTrue(result.Succeeded(), "com scr imp failed: %s"%(result.GetError()))
-        return target
-
-    def make_extra_args(self):
-        json_string = '{"symbol":"break_on_me", "test1": "value1"}'
-        json_stream = lldb.SBStream()
-        json_stream.Print(json_string)
-        extra_args = lldb.SBStructuredData()
-        error = extra_args.SetFromJSON(json_stream)
-        self.assertTrue(error.Success(), "Error making SBStructuredData: %s"%(error.GetCString()))
-        return extra_args
-
-    def do_test(self):
-        """This reads in a python file and sets a breakpoint using it."""
-
-        target = self.make_target_and_import()
-        extra_args = self.make_extra_args()
-
-        file_list = lldb.SBFileSpecList()
-        module_list = lldb.SBFileSpecList()
-
-        # Make breakpoints with this resolver using different filters, first ones that will take:
-        right = []
-        # one with no file or module spec - this one should fire:
-        right.append(target.BreakpointCreateFromScript("resolver.Resolver", extra_args, module_list, file_list))
-
-        # one with the right source file and no module - should also fire:
-        file_list.Append(lldb.SBFileSpec("main.c"))
-        right.append(target.BreakpointCreateFromScript("resolver.Resolver", extra_args, module_list, file_list))
-        # Make sure the help text shows up in the "break list" output:
-        self.expect("break list", substrs=["I am a python breakpoint resolver"], msg="Help is listed in break list")
-
-        # one with the right source file and right module - should also fire:
-        module_list.Append(lldb.SBFileSpec("a.out"))
-        right.append(target.BreakpointCreateFromScript("resolver.Resolver", extra_args, module_list, file_list))
-
-        # And one with no source file but the right module:
-        file_list.Clear()
-        right.append(target.BreakpointCreateFromScript("resolver.Resolver", extra_args, module_list, file_list))
-
-        # Make sure these all got locations:
-        for i in range (0, len(right)):
-            self.assertTrue(right[i].GetNumLocations() >= 1, "Breakpoint %d has no locations."%(i))
-
-        # Now some ones that won't take:
-
-        module_list.Clear()
-        file_list.Clear()
-        wrong = []
-
-        # one with the wrong module - should not fire:
-        module_list.Append(lldb.SBFileSpec("noSuchModule"))
-        wrong.append(target.BreakpointCreateFromScript("resolver.Resolver", extra_args, module_list, file_list))
-
-        # one with the wrong file - also should not fire:
-        file_list.Clear()
-        module_list.Clear()
-        file_list.Append(lldb.SBFileSpec("noFileOfThisName.xxx"))
-        wrong.append(target.BreakpointCreateFromScript("resolver.Resolver", extra_args, module_list, file_list))
-        
-        # Now make sure the CU level iteration obeys the file filters:
-        file_list.Clear()
-        module_list.Clear()
-        file_list.Append(lldb.SBFileSpec("no_such_file.xxx"))
-        wrong.append(target.BreakpointCreateFromScript("resolver.ResolverCUDepth", extra_args, module_list, file_list))
-
-        # And the Module filters:
-        file_list.Clear()
-        module_list.Clear()
-        module_list.Append(lldb.SBFileSpec("NoSuchModule.dylib"))
-        wrong.append(target.BreakpointCreateFromScript("resolver.ResolverCUDepth", extra_args, module_list, file_list))
-
-        # Now make sure the Function level iteration obeys the file filters:
-        file_list.Clear()
-        module_list.Clear()
-        file_list.Append(lldb.SBFileSpec("no_such_file.xxx"))
-        wrong.append(target.BreakpointCreateFromScript("resolver.ResolverFuncDepth", extra_args, module_list, file_list))
-
-        # And the Module filters:
-        file_list.Clear()
-        module_list.Clear()
-        module_list.Append(lldb.SBFileSpec("NoSuchModule.dylib"))
-        wrong.append(target.BreakpointCreateFromScript("resolver.ResolverFuncDepth", extra_args, module_list, file_list))
-
-        # Make sure these didn't get locations:
-        for i in range(0, len(wrong)):
-            self.assertEqual(wrong[i].GetNumLocations(), 0, "Breakpoint %d has locations."%(i))
-
-        # Now run to main and ensure we hit the breakpoints we should have:
-
-        lldbutil.run_to_breakpoint_do_run(self, target, right[0])
-        
-        # Test the hit counts:
-        for i in range(0, len(right)):
-            self.assertEqual(right[i].GetHitCount(), 1, "Breakpoint %d has the wrong hit count"%(i))
-
-        for i in range(0, len(wrong)):
-            self.assertEqual(wrong[i].GetHitCount(), 0, "Breakpoint %d has the wrong hit count"%(i))
-
-    def do_test_depths(self):
-        """This test uses a class variable in resolver.Resolver which gets set to 1 if we saw
-           compile unit and 2 if we only saw modules.  If the search depth is module, you get passed just
-           the modules with no comp_unit.  If the depth is comp_unit you get comp_units.  So we can use
-           this to test that our callback gets called at the right depth."""
-
-        target = self.make_target_and_import()
-        extra_args = self.make_extra_args()
-
-        file_list = lldb.SBFileSpecList()
-        module_list = lldb.SBFileSpecList()
-        module_list.Append(lldb.SBFileSpec("a.out"))
-
-        # Make a breakpoint that has no __get_depth__, check that that is converted to eSearchDepthModule:
-        bkpt = target.BreakpointCreateFromScript("resolver.Resolver", extra_args, module_list, file_list)
-        self.assertTrue(bkpt.GetNumLocations() > 0, "Resolver got no locations.")
-        self.expect("script print(resolver.Resolver.got_files)", substrs=["2"], msg="Was only passed modules")
-        
-        # Make a breakpoint that asks for modules, check that we didn't get any files:
-        bkpt = target.BreakpointCreateFromScript("resolver.ResolverModuleDepth", extra_args, module_list, file_list)
-        self.assertTrue(bkpt.GetNumLocations() > 0, "ResolverModuleDepth got no locations.")
-        self.expect("script print(resolver.Resolver.got_files)", substrs=["2"], msg="Was only passed modules")
-        
-        # Make a breakpoint that asks for compile units, check that we didn't get any files:
-        bkpt = target.BreakpointCreateFromScript("resolver.ResolverCUDepth", extra_args, module_list, file_list)
-        self.assertTrue(bkpt.GetNumLocations() > 0, "ResolverCUDepth got no locations.")
-        self.expect("script print(resolver.Resolver.got_files)", substrs=["1"], msg="Was passed compile units")
-
-        # Make a breakpoint that returns a bad value - we should convert that to "modules" so check that:
-        bkpt = target.BreakpointCreateFromScript("resolver.ResolverBadDepth", extra_args, module_list, file_list)
-        self.assertTrue(bkpt.GetNumLocations() > 0, "ResolverBadDepth got no locations.")
-        self.expect("script print(resolver.Resolver.got_files)", substrs=["2"], msg="Was only passed modules")
-
-        # Make a breakpoint that searches at function depth:
-        bkpt = target.BreakpointCreateFromScript("resolver.ResolverFuncDepth", extra_args, module_list, file_list)
-        self.assertTrue(bkpt.GetNumLocations() > 0, "ResolverFuncDepth got no locations.")
-        self.expect("script print(resolver.Resolver.got_files)", substrs=["3"], msg="Was only passed modules")
-        self.expect("script print(resolver.Resolver.func_list)", substrs=["break_on_me", "main", "test_func"], msg="Saw all the functions")
-
-    def do_test_cli(self):
-        target = self.make_target_and_import()
-
-        lldbutil.run_break_set_by_script(self, "resolver.Resolver", extra_options="-k symbol -v break_on_me")
-
-        # Make sure setting a resolver breakpoint doesn't pollute further breakpoint setting
-        # by checking the description of a regular file & line breakpoint to make sure it
-        # doesn't mention the Python Resolver function:
-        bkpt_no = lldbutil.run_break_set_by_file_and_line(self, "main.c", 12)
-        bkpt = target.FindBreakpointByID(bkpt_no)
-        strm = lldb.SBStream()
-        bkpt.GetDescription(strm, False)
-        used_resolver = "I am a python breakpoint resolver" in strm.GetData()
-        self.assertFalse(used_resolver, "Found the resolver description in the file & line breakpoint description.")
-
-        # Also make sure the breakpoint was where we expected:
-        bp_loc = bkpt.GetLocationAtIndex(0)
-        bp_sc = bp_loc.GetAddress().GetSymbolContext(lldb.eSymbolContextEverything)
-        bp_se = bp_sc.GetLineEntry()
-        self.assertEqual(bp_se.GetLine(), 12, "Got the right line number")
-        self.assertEqual(bp_se.GetFileSpec().GetFilename(), "main.c", "Got the right filename")
-        
-    def do_test_bad_options(self):
-        target = self.make_target_and_import()
-
-        self.expect("break set -P resolver.Resolver -k a_key", error = True, msg="Missing value at end", 
-           substrs=['Key: "a_key" missing value'])
-        self.expect("break set -P resolver.Resolver -v a_value", error = True, msg="Missing key at end", 
-           substrs=['Value: "a_value" missing matching key'])
-        self.expect("break set -P resolver.Resolver -v a_value -k a_key -v another_value", error = True, msg="Missing key among args", 
-           substrs=['Value: "a_value" missing matching key'])
-        self.expect("break set -P resolver.Resolver -k a_key -k a_key -v another_value", error = True, msg="Missing value among args", 
-           substrs=['Key: "a_key" missing value'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/main.c
deleted file mode 100644 (file)
index b91ccfc..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#include <stdio.h>
-
-int
-test_func()
-{
-  return printf("I am a test function.");
-}
-
-void
-break_on_me()
-{
-  printf("I was called.\n");
-}
-
-int
-main()
-{
-  break_on_me();
-  test_func();
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/resolver.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/resolver.py
deleted file mode 100644 (file)
index f3af7c0..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-import lldb
-
-class Resolver:
-  got_files = 0
-  func_list = []
-
-  def __init__(self, bkpt, extra_args, dict):
-      self.bkpt = bkpt
-      self.extra_args = extra_args
-        
-      Resolver.func_list = []
-      Resolver.got_files = 0
-
-  def __callback__(self, sym_ctx):
-      sym_name = "not_a_real_function_name"
-      sym_item = self.extra_args.GetValueForKey("symbol")
-      if sym_item.IsValid():
-          sym_name = sym_item.GetStringValue(1000)
-      else:
-          print("Didn't have a value for key 'symbol'")
-
-      if sym_ctx.compile_unit.IsValid():
-          Resolver.got_files = 1
-      else:
-          Resolver.got_files = 2
-      
-      if sym_ctx.function.IsValid():
-        Resolver.got_files = 3
-        func_name = sym_ctx.function.GetName()
-        Resolver.func_list.append(func_name)
-        if sym_name == func_name:
-          self.bkpt.AddLocation(sym_ctx.function.GetStartAddress())
-        return
-
-      if sym_ctx.module.IsValid():
-          sym = sym_ctx.module.FindSymbol(sym_name, lldb.eSymbolTypeCode)
-          if sym.IsValid():
-              self.bkpt.AddLocation(sym.GetStartAddress())
-
-  def get_short_help(self):
-      return "I am a python breakpoint resolver"
-
-class ResolverModuleDepth(Resolver):
-    def __get_depth__ (self):
-        return lldb.eSearchDepthModule
-
-class ResolverCUDepth(Resolver):
-    def __get_depth__ (self):
-        return lldb.eSearchDepthCompUnit
-
-class ResolverFuncDepth(Resolver):
-    def __get_depth__ (self):
-        return lldb.eSearchDepthFunction
-
-class ResolverBadDepth(Resolver):
-    def __get_depth__ (self):
-        return lldb.kLastSearchDepthKind + 1
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/TestBreakpointSerialization.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/TestBreakpointSerialization.py
deleted file mode 100644 (file)
index 4c6f32b..0000000
+++ /dev/null
@@ -1,375 +0,0 @@
-"""
-Test breakpoint serialization.
-"""
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class BreakpointSerialization(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @add_test_categories(['pyapi'])
-    def test_resolvers(self):
-        """Use Python APIs to test that we serialize resolvers."""
-        self.build()
-        self.setup_targets_and_cleanup()
-        self.do_check_resolvers()
-
-    def test_filters(self):
-        """Use Python APIs to test that we serialize search filters correctly."""
-        self.build()
-        self.setup_targets_and_cleanup()
-        self.do_check_filters()
-
-    def test_options(self):
-        """Use Python APIs to test that we serialize breakpoint options correctly."""
-        self.build()
-        self.setup_targets_and_cleanup()
-        self.do_check_options()
-
-    def test_appending(self):
-        """Use Python APIs to test that we serialize breakpoint options correctly."""
-        self.build()
-        self.setup_targets_and_cleanup()
-        self.do_check_appending()
-
-    def test_name_filters(self):
-        """Use python APIs to test that reading in by name works correctly."""
-        self.build()
-        self.setup_targets_and_cleanup()
-        self.do_check_names()
-        
-    def test_scripted_extra_args(self):
-        self.build()
-        self.setup_targets_and_cleanup()
-        self.do_check_extra_args()
-        
-    def setup_targets_and_cleanup(self):
-        def cleanup ():
-            self.RemoveTempFile(self.bkpts_file_path)
-
-            if self.orig_target.IsValid():
-                self.dbg.DeleteTarget(self.orig_target)
-                self.dbg.DeleteTarget(self.copy_target)
-
-        self.addTearDownHook(cleanup)
-        self.RemoveTempFile(self.bkpts_file_path)
-
-        exe = self.getBuildArtifact("a.out")
-
-        # Create the targets we are making breakpoints in and copying them to:
-        self.orig_target = self.dbg.CreateTarget(exe)
-        self.assertTrue(self.orig_target, VALID_TARGET)
-
-        self.copy_target = self.dbg.CreateTarget(exe)
-        self.assertTrue(self.copy_target, VALID_TARGET)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-        self.bkpts_file_path = self.getBuildArtifact("breakpoints.json")
-        self.bkpts_file_spec = lldb.SBFileSpec(self.bkpts_file_path)
-
-    def check_equivalence(self, source_bps, do_write = True):
-
-        error = lldb.SBError()
-
-        if (do_write):
-            error = self.orig_target.BreakpointsWriteToFile(self.bkpts_file_spec, source_bps)
-            self.assertTrue(error.Success(), "Failed writing breakpoints to file: %s."%(error.GetCString()))
-
-        copy_bps = lldb.SBBreakpointList(self.copy_target)
-        error = self.copy_target.BreakpointsCreateFromFile(self.bkpts_file_spec, copy_bps)
-        self.assertTrue(error.Success(), "Failed reading breakpoints from file: %s"%(error.GetCString()))
-
-        num_source_bps = source_bps.GetSize()
-        num_copy_bps = copy_bps.GetSize()
-        self.assertTrue(num_source_bps == num_copy_bps, "Didn't get same number of input and output breakpoints - orig: %d copy: %d"%(num_source_bps, num_copy_bps))
-
-        for i in range(0, num_source_bps):
-            source_bp = source_bps.GetBreakpointAtIndex(i)
-            source_desc = lldb.SBStream()
-            source_bp.GetDescription(source_desc, False)
-            source_text = source_desc.GetData()
-
-            # I am assuming here that the breakpoints will get written out in breakpoint ID order, and
-            # read back in ditto.  That is true right now, and I can't see any reason to do it differently
-            # but if we do we can go to writing the breakpoints one by one, or sniffing the descriptions to
-            # see which one is which.
-            copy_id = source_bp.GetID()
-            copy_bp = copy_bps.FindBreakpointByID(copy_id)
-            self.assertTrue(copy_bp.IsValid(), "Could not find copy breakpoint %d."%(copy_id))
-
-            copy_desc = lldb.SBStream()
-            copy_bp.GetDescription(copy_desc, False)
-            copy_text = copy_desc.GetData()
-
-            # These two should be identical.
-            # print ("Source text for %d is %s."%(i, source_text))
-            self.assertTrue (source_text == copy_text, "Source and dest breakpoints are not identical: \nsource: %s\ndest: %s"%(source_text, copy_text))
-
-    def do_check_resolvers(self):
-        """Use Python APIs to check serialization of breakpoint resolvers"""
-
-        empty_module_list = lldb.SBFileSpecList()
-        empty_cu_list = lldb.SBFileSpecList()
-        blubby_file_spec = lldb.SBFileSpec(os.path.join(self.getSourceDir(), "blubby.c"))
-
-        # It isn't actually important for these purposes that these breakpoint
-        # actually have locations.
-        source_bps = lldb.SBBreakpointList(self.orig_target)
-        source_bps.Append(self.orig_target.BreakpointCreateByLocation("blubby.c", 666))
-        # Make sure we do one breakpoint right:
-        self.check_equivalence(source_bps)
-        source_bps.Clear()
-
-        source_bps.Append(self.orig_target.BreakpointCreateByName("blubby", lldb.eFunctionNameTypeAuto, empty_module_list, empty_cu_list))
-        source_bps.Append(self.orig_target.BreakpointCreateByName("blubby", lldb.eFunctionNameTypeFull, empty_module_list,empty_cu_list))
-        source_bps.Append(self.orig_target.BreakpointCreateBySourceRegex("dont really care", blubby_file_spec))
-
-        # And some number greater than one:
-        self.check_equivalence(source_bps)
-
-    def do_check_filters(self):
-        """Use Python APIs to check serialization of breakpoint filters."""
-        module_list = lldb.SBFileSpecList()
-        module_list.Append(lldb.SBFileSpec("SomeBinary"))
-        module_list.Append(lldb.SBFileSpec("SomeOtherBinary"))
-
-        cu_list = lldb.SBFileSpecList()
-        cu_list.Append(lldb.SBFileSpec("SomeCU.c"))
-        cu_list.Append(lldb.SBFileSpec("AnotherCU.c"))
-        cu_list.Append(lldb.SBFileSpec("ThirdCU.c"))
-
-        blubby_file_spec = lldb.SBFileSpec(os.path.join(self.getSourceDir(), "blubby.c"))
-
-        # It isn't actually important for these purposes that these breakpoint
-        # actually have locations.
-        source_bps = lldb.SBBreakpointList(self.orig_target)
-        bkpt = self.orig_target.BreakpointCreateByLocation(blubby_file_spec, 666, 0, module_list)
-        source_bps.Append(bkpt)
-
-        # Make sure we do one right:
-        self.check_equivalence(source_bps)
-        source_bps.Clear()
-
-        bkpt = self.orig_target.BreakpointCreateByName("blubby", lldb.eFunctionNameTypeAuto, module_list, cu_list)
-        source_bps.Append(bkpt)
-        bkpt = self.orig_target.BreakpointCreateByName("blubby", lldb.eFunctionNameTypeFull, module_list, cu_list)
-        source_bps.Append(bkpt)
-        bkpt = self.orig_target.BreakpointCreateBySourceRegex("dont really care", blubby_file_spec)
-        source_bps.Append(bkpt)
-
-        # And some number greater than one:
-        self.check_equivalence(source_bps)
-
-    def do_check_options(self):
-        """Use Python APIs to check serialization of breakpoint options."""
-
-        empty_module_list = lldb.SBFileSpecList()
-        empty_cu_list = lldb.SBFileSpecList()
-        blubby_file_spec = lldb.SBFileSpec(os.path.join(self.getSourceDir(), "blubby.c"))
-
-        # It isn't actually important for these purposes that these breakpoint
-        # actually have locations.
-        source_bps = lldb.SBBreakpointList(self.orig_target)
-
-        bkpt = self.orig_target.BreakpointCreateByLocation(
-            lldb.SBFileSpec("blubby.c"), 666, 333, 0, lldb.SBFileSpecList())
-        bkpt.SetEnabled(False)
-        bkpt.SetOneShot(True)
-        bkpt.SetThreadID(10)
-        source_bps.Append(bkpt)
-
-        # Make sure we get one right:
-        self.check_equivalence(source_bps)
-        source_bps.Clear()
-
-        bkpt = self.orig_target.BreakpointCreateByName("blubby", lldb.eFunctionNameTypeAuto, empty_module_list, empty_cu_list)
-        bkpt.SetIgnoreCount(10)
-        bkpt.SetThreadName("grubby")
-        source_bps.Append(bkpt)
-
-        bkpt = self.orig_target.BreakpointCreateByName("blubby", lldb.eFunctionNameTypeAuto, empty_module_list, empty_cu_list)
-        bkpt.SetCondition("gonna remove this")
-        bkpt.SetCondition("")
-        source_bps.Append(bkpt)
-
-        bkpt = self.orig_target.BreakpointCreateByName("blubby", lldb.eFunctionNameTypeFull, empty_module_list,empty_cu_list)
-        bkpt.SetCondition("something != something_else")
-        bkpt.SetQueueName("grubby")
-        bkpt.AddName("FirstName")
-        bkpt.AddName("SecondName")
-        bkpt.SetScriptCallbackBody('\tprint("I am a function that prints.")\n\tprint("I don\'t do anything else")\n')
-        source_bps.Append(bkpt)
-
-        bkpt = self.orig_target.BreakpointCreateBySourceRegex("dont really care", blubby_file_spec)
-        cmd_list = lldb.SBStringList()
-        cmd_list.AppendString("frame var")
-        cmd_list.AppendString("thread backtrace")
-
-        bkpt.SetCommandLineCommands(cmd_list)
-        source_bps.Append(bkpt)
-
-        self.check_equivalence(source_bps)
-
-    def do_check_appending(self):
-        """Use Python APIs to check appending to already serialized options."""
-
-        empty_module_list = lldb.SBFileSpecList()
-        empty_cu_list = lldb.SBFileSpecList()
-        blubby_file_spec = lldb.SBFileSpec(os.path.join(self.getSourceDir(), "blubby.c"))
-
-        # It isn't actually important for these purposes that these breakpoint
-        # actually have locations.
-
-        all_bps = lldb.SBBreakpointList(self.orig_target)
-        source_bps = lldb.SBBreakpointList(self.orig_target)
-
-        bkpt = self.orig_target.BreakpointCreateByLocation(
-            lldb.SBFileSpec("blubby.c"), 666, 333, 0, lldb.SBFileSpecList())
-        bkpt.SetEnabled(False)
-        bkpt.SetOneShot(True)
-        bkpt.SetThreadID(10)
-        source_bps.Append(bkpt)
-        all_bps.Append(bkpt)
-
-        error = lldb.SBError()
-        error = self.orig_target.BreakpointsWriteToFile(self.bkpts_file_spec, source_bps)
-        self.assertTrue(error.Success(), "Failed writing breakpoints to file: %s."%(error.GetCString()))
-
-        source_bps.Clear()
-
-        bkpt = self.orig_target.BreakpointCreateByName("blubby", lldb.eFunctionNameTypeAuto, empty_module_list, empty_cu_list)
-        bkpt.SetIgnoreCount(10)
-        bkpt.SetThreadName("grubby")
-        source_bps.Append(bkpt)
-        all_bps.Append(bkpt)
-
-        bkpt = self.orig_target.BreakpointCreateByName("blubby", lldb.eFunctionNameTypeFull, empty_module_list,empty_cu_list)
-        bkpt.SetCondition("something != something_else")
-        bkpt.SetQueueName("grubby")
-        bkpt.AddName("FirstName")
-        bkpt.AddName("SecondName")
-
-        source_bps.Append(bkpt)
-        all_bps.Append(bkpt)
-
-        error = self.orig_target.BreakpointsWriteToFile(self.bkpts_file_spec, source_bps, True)
-        self.assertTrue(error.Success(), "Failed appending breakpoints to file: %s."%(error.GetCString()))
-
-        self.check_equivalence(all_bps)
-
-    def do_check_names(self):
-        bkpt = self.orig_target.BreakpointCreateByLocation(
-            lldb.SBFileSpec("blubby.c"), 666, 333, 0, lldb.SBFileSpecList())
-        good_bkpt_name = "GoodBreakpoint"
-        write_bps = lldb.SBBreakpointList(self.orig_target)
-        bkpt.AddName(good_bkpt_name)
-        write_bps.Append(bkpt)
-
-        error = lldb.SBError()
-        error = self.orig_target.BreakpointsWriteToFile(self.bkpts_file_spec, write_bps)
-        self.assertTrue(error.Success(), "Failed writing breakpoints to file: %s."%(error.GetCString()))
-
-        copy_bps = lldb.SBBreakpointList(self.copy_target)
-        names_list = lldb.SBStringList()
-        names_list.AppendString("NoSuchName")
-
-        error = self.copy_target.BreakpointsCreateFromFile(self.bkpts_file_spec, names_list, copy_bps)
-        self.assertTrue(error.Success(), "Failed reading breakpoints from file: %s"%(error.GetCString()))
-        self.assertTrue(copy_bps.GetSize() == 0, "Found breakpoints with a nonexistent name.")
-
-        names_list.AppendString(good_bkpt_name)
-        error = self.copy_target.BreakpointsCreateFromFile(self.bkpts_file_spec, names_list, copy_bps)
-        self.assertTrue(error.Success(), "Failed reading breakpoints from file: %s"%(error.GetCString()))
-        self.assertTrue(copy_bps.GetSize() == 1, "Found the matching breakpoint.")
-
-    def do_check_extra_args(self):
-
-        import side_effect
-        interp = self.dbg.GetCommandInterpreter()
-        error = lldb.SBError()
-
-        script_name = os.path.join(self.getSourceDir(), "resolver.py")
-
-        command = "command script import " + script_name
-        result = lldb.SBCommandReturnObject()
-        interp.HandleCommand(command, result)
-        self.assertTrue(result.Succeeded(), "com scr imp failed: %s"%(result.GetError()))
-
-        # First make sure a scripted breakpoint with no args works:
-        bkpt = self.orig_target.BreakpointCreateFromScript("resolver.Resolver", lldb.SBStructuredData(),
-                                                           lldb.SBFileSpecList(), lldb.SBFileSpecList())
-        self.assertTrue(bkpt.IsValid(), "Bkpt is valid")
-        write_bps = lldb.SBBreakpointList(self.orig_target)
-
-        error = self.orig_target.BreakpointsWriteToFile(self.bkpts_file_spec, write_bps)
-        self.assertTrue(error.Success(), "Failed writing breakpoints: %s"%(error.GetCString()))
-
-        side_effect.g_extra_args = None
-        copy_bps = lldb.SBBreakpointList(self.copy_target)
-        error = self.copy_target.BreakpointsCreateFromFile(self.bkpts_file_spec, copy_bps)
-        self.assertTrue(error.Success(), "Failed reading breakpoints: %s"%(error.GetCString()))
-
-        self.assertEqual(copy_bps.GetSize(), 1, "Got one breakpoint from file.")
-        no_keys = lldb.SBStringList()
-        side_effect.g_extra_args.GetKeys(no_keys)
-        self.assertEqual(no_keys.GetSize(), 0, "Should have no keys")
-
-        self.orig_target.DeleteAllBreakpoints()
-        self.copy_target.DeleteAllBreakpoints()
-
-        # Now try one with extra args:
-        
-        extra_args = lldb.SBStructuredData()
-        stream = lldb.SBStream()
-        stream.Print('{"first_arg" : "first_value", "second_arg" : "second_value"}')
-        extra_args.SetFromJSON(stream)
-        self.assertTrue(extra_args.IsValid(), "SBStructuredData is valid.")
-        
-        bkpt = self.orig_target.BreakpointCreateFromScript("resolver.Resolver",
-                                                           extra_args, lldb.SBFileSpecList(), lldb.SBFileSpecList())
-        self.assertTrue(bkpt.IsValid(), "Bkpt is valid")
-        write_bps = lldb.SBBreakpointList(self.orig_target)
-
-        error = self.orig_target.BreakpointsWriteToFile(self.bkpts_file_spec, write_bps)
-        self.assertTrue(error.Success(), "Failed writing breakpoints: %s"%(error.GetCString()))
-
-        orig_extra_args = side_effect.g_extra_args
-        self.assertTrue(orig_extra_args.IsValid(), "Extra args originally valid")
-
-        orig_keys = lldb.SBStringList()
-        orig_extra_args.GetKeys(orig_keys)
-        self.assertEqual(2, orig_keys.GetSize(), "Should have two keys")
-
-        side_effect.g_extra_args = None
-
-        copy_bps = lldb.SBBreakpointList(self.copy_target)
-        error = self.copy_target.BreakpointsCreateFromFile(self.bkpts_file_spec, copy_bps)
-        self.assertTrue(error.Success(), "Failed reading breakpoints: %s"%(error.GetCString()))
-
-        self.assertEqual(copy_bps.GetSize(), 1, "Got one breakpoint from file.")
-
-        copy_extra_args = side_effect.g_extra_args
-        copy_keys = lldb.SBStringList()
-        copy_extra_args.GetKeys(copy_keys)
-        self.assertEqual(2, copy_keys.GetSize(), "Copy should have two keys")
-
-        for idx in range(0, orig_keys.GetSize()):
-            key = orig_keys.GetStringAtIndex(idx)
-            copy_value = copy_extra_args.GetValueForKey(key).GetStringValue(100)
-
-            if key == "first_arg":
-                self.assertEqual(copy_value, "first_value")
-            elif key == "second_arg":
-                self.assertEqual(copy_value, "second_value")
-            else:
-                self.Fail("Unknown key: %s"%(key))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/main.c
deleted file mode 100644 (file)
index b1ed446..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-// This simple program is to demonstrate the capability of the lldb command
-// "breakpoint modify -i <count> breakpt-id" to set the number of times a
-// breakpoint is skipped before stopping.  Ignore count can also be set upon
-// breakpoint creation by 'breakpoint set ... -i <count>'.
-
-int a(int);
-int b(int);
-int c(int);
-
-int a(int val)
-{
-    if (val <= 1)
-        return b(val);
-    else if (val >= 3)
-        return c(val); // a(3) -> c(3) Find the call site of c(3).
-
-    return val;
-}
-
-int b(int val)
-{
-    return c(val);
-}
-
-int c(int val)
-{
-    return val + 3; // Find the line number of function "c" here.
-}
-
-int main (int argc, char const *argv[])
-{
-    int A1 = a(1);  // a(1) -> b(1) -> c(1)
-    printf("a(1) returns %d\n", A1);
-    
-    int B2 = b(2);  // b(2) -> c(2) Find the call site of b(2).
-    printf("b(2) returns %d\n", B2);
-    
-    int A3 = a(3);  // a(3) -> c(3) Find the call site of a(3).
-    printf("a(3) returns %d\n", A3);
-    
-    int C1 = c(5); // Find the call site of c in main.
-    printf ("c(5) returns %d\n", C1);
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/resolver.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/resolver.py
deleted file mode 100644 (file)
index c3a5af5..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-import lldb
-import side_effect
-
-class Resolver:
-  """This resolver class is just so I can read out the extra_args."""
-  
-  def __init__(self, bkpt, extra_args, dict):
-      self.bkpt = bkpt
-      side_effect.g_extra_args = extra_args
-    
-  def __callback__(self, sym_ctx):
-      """Doesn't actually do anything."""
-      return
-
-  def get_short_help(self):
-      return "I am a python breakpoint resolver that does nothing"
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/side_effect.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/side_effect.py
deleted file mode 100644 (file)
index 868901c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-g_extra_args = None
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/source_regexp/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/source_regexp/Makefile
deleted file mode 100644 (file)
index af0cd30..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c a.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/source_regexp/TestSourceRegexBreakpoints.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/source_regexp/TestSourceRegexBreakpoints.py
deleted file mode 100644 (file)
index 0409c78..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-"""
-Test lldb breakpoint setting by source regular expression.
-This test just tests the source file & function restrictions.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestSourceRegexBreakpoints(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_location(self):
-        self.build()
-        self.source_regex_locations()
-
-    def test_restrictions(self):
-        self.build()
-        self.source_regex_restrictions()
-
-    def source_regex_locations(self):
-        """ Test that restricting source expressions to files & to functions. """
-        # Create a target by the debugger.
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # First look just in main:
-        target_files = lldb.SBFileSpecList()
-        target_files.Append(lldb.SBFileSpec("a.c"))
-
-        func_names = lldb.SBStringList()
-        func_names.AppendString("a_func")
-
-        source_regex = "Set . breakpoint here"
-        main_break = target.BreakpointCreateBySourceRegex(
-            source_regex, lldb.SBFileSpecList(), target_files, func_names)
-        num_locations = main_break.GetNumLocations()
-        self.assertTrue(
-            num_locations == 1,
-            "a.c in a_func should give one breakpoint, got %d." %
-            (num_locations))
-
-        loc = main_break.GetLocationAtIndex(0)
-        self.assertTrue(loc.IsValid(), "Got a valid location.")
-        address = loc.GetAddress()
-        self.assertTrue(
-            address.IsValid(),
-            "Got a valid address from the location.")
-
-        a_func_line = line_number("a.c", "Set A breakpoint here")
-        line_entry = address.GetLineEntry()
-        self.assertTrue(line_entry.IsValid(), "Got a valid line entry.")
-        self.assertTrue(line_entry.line == a_func_line,
-                        "Our line number matches the one lldbtest found.")
-
-    def source_regex_restrictions(self):
-        """ Test that restricting source expressions to files & to functions. """
-        # Create a target by the debugger.
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # First look just in main:
-        target_files = lldb.SBFileSpecList()
-        target_files.Append(lldb.SBFileSpec("main.c"))
-        source_regex = "Set . breakpoint here"
-        main_break = target.BreakpointCreateBySourceRegex(
-            source_regex, lldb.SBFileSpecList(), target_files, lldb.SBStringList())
-
-        num_locations = main_break.GetNumLocations()
-        self.assertTrue(
-            num_locations == 2,
-            "main.c should have 2 matches, got %d." %
-            (num_locations))
-
-        # Now look in both files:
-        target_files.Append(lldb.SBFileSpec("a.c"))
-
-        main_break = target.BreakpointCreateBySourceRegex(
-            source_regex, lldb.SBFileSpecList(), target_files, lldb.SBStringList())
-
-        num_locations = main_break.GetNumLocations()
-        self.assertTrue(
-            num_locations == 4,
-            "main.c and a.c should have 4 matches, got %d." %
-            (num_locations))
-
-        # Now restrict it to functions:
-        func_names = lldb.SBStringList()
-        func_names.AppendString("main_func")
-        main_break = target.BreakpointCreateBySourceRegex(
-            source_regex, lldb.SBFileSpecList(), target_files, func_names)
-
-        num_locations = main_break.GetNumLocations()
-        self.assertTrue(
-            num_locations == 2,
-            "main_func in main.c and a.c should have 2 matches, got %d." %
-            (num_locations))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/source_regexp/a.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/source_regexp/a.c
deleted file mode 100644 (file)
index 056583f..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <stdio.h>
-
-#include "a.h"
-
-static int
-main_func(int input)
-{
-  return printf("Set B breakpoint here: %d", input);
-}
-
-int
-a_func(int input)
-{
-  input += 1; // Set A breakpoint here;
-  return main_func(input);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/source_regexp/a.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/source_regexp/a.h
deleted file mode 100644 (file)
index f578ac0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-int a_func(int);
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/source_regexp/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/source_regexp/main.c
deleted file mode 100644 (file)
index 9c8625e..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#include <stdio.h>
-#include "a.h"
-
-int
-main_func(int input)
-{
-  return printf("Set B breakpoint here: %d.\n", input);
-}
-
-int
-main()
-{
-  a_func(10);
-  main_func(10);
-  printf("Set a breakpoint here:\n");
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/Makefile
deleted file mode 100644 (file)
index 2c00681..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-CXX_SOURCES := main.cpp
-
-ifneq (,$(findstring icc,$(CC)))
-    CXXFLAGS_EXTRAS := -debug inline-debug-info
-endif
-
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py
deleted file mode 100644 (file)
index ea94fd3..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-"""
-Test that breakpoints do not affect stepping.
-Check for correct StopReason when stepping to the line with breakpoint
-which chould be eStopReasonBreakpoint in general,
-and eStopReasonPlanComplete when breakpoint's condition fails.
-"""
-
-
-import unittest2
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class StepOverBreakpointsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        TestBase.setUp(self)
-
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        src = lldb.SBFileSpec("main.cpp")
-
-        # Create a target by the debugger.
-        self.target = self.dbg.CreateTarget(exe)
-        self.assertTrue(self.target, VALID_TARGET)
-
-        # Setup four breakpoints, two of them with false condition
-        self.line1 = line_number('main.cpp', "breakpoint_1")
-        self.line4 = line_number('main.cpp', "breakpoint_4")
-
-        self.breakpoint1 = self.target.BreakpointCreateByLocation(src, self.line1)
-        self.assertTrue(
-            self.breakpoint1 and self.breakpoint1.GetNumLocations() == 1,
-            VALID_BREAKPOINT)
-
-        self.breakpoint2 = self.target.BreakpointCreateBySourceRegex("breakpoint_2", src)
-        self.breakpoint2.GetLocationAtIndex(0).SetCondition('false')
-
-        self.breakpoint3 = self.target.BreakpointCreateBySourceRegex("breakpoint_3", src)
-        self.breakpoint3.GetLocationAtIndex(0).SetCondition('false')
-
-        self.breakpoint4 = self.target.BreakpointCreateByLocation(src, self.line4)
-
-        # Start debugging
-        self.process = self.target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertIsNotNone(self.process, PROCESS_IS_VALID)
-        self.thread = lldbutil.get_one_thread_stopped_at_breakpoint(self.process, self.breakpoint1)
-        self.assertIsNotNone(self.thread, "Didn't stop at breakpoint 1.")
-
-    def test_step_instruction(self):
-        # Count instructions between breakpoint_1 and breakpoint_4
-        contextList = self.target.FindFunctions('main', lldb.eFunctionNameTypeAuto)
-        self.assertEquals(contextList.GetSize(), 1)
-        symbolContext = contextList.GetContextAtIndex(0)
-        function = symbolContext.GetFunction()
-        self.assertTrue(function)
-        instructions = function.GetInstructions(self.target)
-        addr_1 = self.breakpoint1.GetLocationAtIndex(0).GetAddress()
-        addr_4 = self.breakpoint4.GetLocationAtIndex(0).GetAddress()
-
-        # if third argument is true then the count will be the number of
-        # instructions on which a breakpoint can be set.
-        # start = addr_1, end = addr_4, canSetBreakpoint = True
-        steps_expected = instructions.GetInstructionsCount(addr_1, addr_4, True)
-        step_count = 0
-        # Step from breakpoint_1 to breakpoint_4
-        while True:
-            self.thread.StepInstruction(True)
-            step_count = step_count + 1
-            self.assertEquals(self.process.GetState(), lldb.eStateStopped)
-            self.assertTrue(self.thread.GetStopReason() == lldb.eStopReasonPlanComplete or
-                            self.thread.GetStopReason() == lldb.eStopReasonBreakpoint)
-            if (self.thread.GetStopReason() == lldb.eStopReasonBreakpoint) :
-                # we should not stop on breakpoint_2 and _3 because they have false condition
-                self.assertEquals(self.thread.GetFrameAtIndex(0).GetLineEntry().GetLine(), self.line4)
-                # breakpoint_2 and _3 should not affect step count
-                self.assertTrue(step_count >= steps_expected)
-                break
-
-        # Run the process until termination
-        self.process.Continue()
-        self.assertEquals(self.process.GetState(), lldb.eStateExited)
-
-    @skipIf(bugnumber="llvm.org/pr31972", hostoslist=["windows"])
-    def test_step_over(self):
-        #lldb.DBG.EnableLog("lldb", ["step","breakpoint"])
-
-        self.thread.StepOver()
-        # We should be stopped at the breakpoint_2 line with stop plan complete reason
-        self.assertEquals(self.process.GetState(), lldb.eStateStopped)
-        self.assertEquals(self.thread.GetStopReason(), lldb.eStopReasonPlanComplete)
-
-        self.thread.StepOver()
-        # We should be stopped at the breakpoint_3 line with stop plan complete reason
-        self.assertEquals(self.process.GetState(), lldb.eStateStopped)
-        self.assertEquals(self.thread.GetStopReason(), lldb.eStopReasonPlanComplete)
-
-        self.thread.StepOver()
-        # We should be stopped at the breakpoint_4
-        self.assertEquals(self.process.GetState(), lldb.eStateStopped)
-        self.assertEquals(self.thread.GetStopReason(), lldb.eStopReasonBreakpoint)
-        thread1 = lldbutil.get_one_thread_stopped_at_breakpoint(self.process, self.breakpoint4)
-        self.assertEquals(self.thread, thread1, "Didn't stop at breakpoint 4.")
-
-        # Check that stepping does not affect breakpoint's hit count
-        self.assertEquals(self.breakpoint1.GetHitCount(), 1)
-        self.assertEquals(self.breakpoint2.GetHitCount(), 0)
-        self.assertEquals(self.breakpoint3.GetHitCount(), 0)
-        self.assertEquals(self.breakpoint4.GetHitCount(), 1)
-
-        # Run the process until termination
-        self.process.Continue()
-        self.assertEquals(self.process.GetState(), lldb.eStateExited)
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/main.cpp
deleted file mode 100644 (file)
index 8cfd34b..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-
-int func() { return 1; }
-
-int
-main(int argc, char const *argv[])
-{
-    int a = 0;      // breakpoint_1
-    int b = func(); // breakpoint_2
-    a = b + func(); // breakpoint_3
-    return 0;       // breakpoint_4
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/completion/.categories b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/completion/.categories
deleted file mode 100644 (file)
index 3a3f4df..0000000
+++ /dev/null
@@ -1 +0,0 @@
-cmdline
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/completion/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/completion/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py
deleted file mode 100644 (file)
index 26c70c1..0000000
+++ /dev/null
@@ -1,431 +0,0 @@
-"""
-Test the lldb command line completion mechanism.
-"""
-
-
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbplatform
-from lldbsuite.test import lldbutil
-
-
-class CommandLineCompletionTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @classmethod
-    def classCleanup(cls):
-        """Cleanup the test byproducts."""
-        try:
-            os.remove("child_send.txt")
-            os.remove("child_read.txt")
-        except:
-            pass
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_at(self):
-        """Test that 'at' completes to 'attach '."""
-        self.complete_from_to('at', 'attach ')
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_de(self):
-        """Test that 'de' completes to 'detach '."""
-        self.complete_from_to('de', 'detach ')
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_frame_variable(self):
-        self.build()
-        self.main_source = "main.cpp"
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                          '// Break here', self.main_source_spec)
-        self.assertEquals(process.GetState(), lldb.eStateStopped)
-        # FIXME: This pulls in the debug information to make the completions work,
-        # but the completions should also work without.
-        self.runCmd("frame variable fooo")
-
-        self.complete_from_to('frame variable fo',
-                              'frame variable fooo')
-        self.complete_from_to('frame variable fooo.',
-                              'frame variable fooo.')
-        self.complete_from_to('frame variable fooo.dd',
-                              'frame variable fooo.dd')
-
-        self.complete_from_to('frame variable ptr_fooo->',
-                              'frame variable ptr_fooo->')
-        self.complete_from_to('frame variable ptr_fooo->dd',
-                              'frame variable ptr_fooo->dd')
-
-        self.complete_from_to('frame variable cont',
-                              'frame variable container')
-        self.complete_from_to('frame variable container.',
-                              'frame variable container.MemberVar')
-        self.complete_from_to('frame variable container.Mem',
-                              'frame variable container.MemberVar')
-
-        self.complete_from_to('frame variable ptr_cont',
-                              'frame variable ptr_container')
-        self.complete_from_to('frame variable ptr_container->',
-                              'frame variable ptr_container->MemberVar')
-        self.complete_from_to('frame variable ptr_container->Mem',
-                              'frame variable ptr_container->MemberVar')
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_process_attach_dash_dash_con(self):
-        """Test that 'process attach --con' completes to 'process attach --continue '."""
-        self.complete_from_to(
-            'process attach --con',
-            'process attach --continue ')
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_process_launch_arch(self):
-        self.complete_from_to('process launch --arch ',
-                              ['mips',
-                               'arm64'])
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_ambiguous_long_opt(self):
-        self.completions_match('breakpoint modify --th',
-                               ['--thread-id',
-                                '--thread-index',
-                                '--thread-name'])
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_plugin_load(self):
-        self.complete_from_to('plugin load ', [])
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_log_enable(self):
-        self.complete_from_to('log enable ll', ['lldb'])
-        self.complete_from_to('log enable dw', ['dwarf'])
-        self.complete_from_to('log enable lldb al', ['all'])
-        self.complete_from_to('log enable lldb sym', ['symbol'])
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_log_enable(self):
-        self.complete_from_to('log disable ll', ['lldb'])
-        self.complete_from_to('log disable dw', ['dwarf'])
-        self.complete_from_to('log disable lldb al', ['all'])
-        self.complete_from_to('log disable lldb sym', ['symbol'])
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_log_list(self):
-        self.complete_from_to('log list ll', ['lldb'])
-        self.complete_from_to('log list dw', ['dwarf'])
-        self.complete_from_to('log list ll', ['lldb'])
-        self.complete_from_to('log list lldb dwa', ['dwarf'])
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_quoted_command(self):
-        self.complete_from_to('"set',
-                              ['"settings" '])
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_quoted_arg_with_quoted_command(self):
-        self.complete_from_to('"settings" "repl',
-                              ['"replace" '])
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_quoted_arg_without_quoted_command(self):
-        self.complete_from_to('settings "repl',
-                              ['"replace" '])
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_single_quote_command(self):
-        self.complete_from_to("'set",
-                              ["'settings' "])
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_terminated_quote_command(self):
-        # This should not crash, but we don't get any
-        # reasonable completions from this.
-        self.complete_from_to("'settings'", [])
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_process_launch_arch_arm(self):
-        self.complete_from_to('process launch --arch arm',
-                              ['arm64'])
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_target_symbols_add_shlib(self):
-        # Doesn't seem to work, but at least it shouldn't crash.
-        self.complete_from_to('target symbols add --shlib ', [])
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_log_file(self):
-        # Complete in our source directory which contains a 'main.cpp' file.
-        src_dir =  os.path.dirname(os.path.realpath(__file__)) + '/'
-        self.complete_from_to('log enable lldb expr -f ' + src_dir,
-                              ['main.cpp'])
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_log_dir(self):
-        # Complete our source directory.
-        src_dir =  os.path.dirname(os.path.realpath(__file__))
-        self.complete_from_to('log enable lldb expr -f ' + src_dir,
-                              [src_dir + os.sep], turn_off_re_match=True)
-
-    # <rdar://problem/11052829>
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_infinite_loop_while_completing(self):
-        """Test that 'process print hello\' completes to itself and does not infinite loop."""
-        self.complete_from_to('process print hello\\', 'process print hello\\',
-                              turn_off_re_match=True)
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_watchpoint_co(self):
-        """Test that 'watchpoint co' completes to 'watchpoint command '."""
-        self.complete_from_to('watchpoint co', 'watchpoint command ')
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_watchpoint_command_space(self):
-        """Test that 'watchpoint command ' completes to ['add', 'delete', 'list']."""
-        self.complete_from_to(
-            'watchpoint command ', [
-                'add', 'delete', 'list'])
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_watchpoint_command_a(self):
-        """Test that 'watchpoint command a' completes to 'watchpoint command add '."""
-        self.complete_from_to(
-            'watchpoint command a',
-            'watchpoint command add ')
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_watchpoint_set_ex(self):
-        """Test that 'watchpoint set ex' completes to 'watchpoint set expression '."""
-        self.complete_from_to(
-            'watchpoint set ex',
-            'watchpoint set expression ')
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_watchpoint_set_var(self):
-        """Test that 'watchpoint set var' completes to 'watchpoint set variable '."""
-        self.complete_from_to('watchpoint set var', 'watchpoint set variable ')
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_help_fi(self):
-        """Test that 'help fi' completes to ['file', 'finish']."""
-        self.complete_from_to(
-            'help fi', [
-                'file', 'finish'])
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_help_watchpoint_s(self):
-        """Test that 'help watchpoint s' completes to 'help watchpoint set '."""
-        self.complete_from_to('help watchpoint s', 'help watchpoint set ')
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_settings_append_target_er(self):
-        """Test that 'settings append target.er' completes to 'settings append target.error-path'."""
-        self.complete_from_to(
-            'settings append target.er',
-            'settings append target.error-path')
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_settings_insert_after_target_en(self):
-        """Test that 'settings insert-after target.env' completes to 'settings insert-after target.env-vars'."""
-        self.complete_from_to(
-            'settings insert-after target.env',
-            'settings insert-after target.env-vars')
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_settings_insert_before_target_en(self):
-        """Test that 'settings insert-before target.env' completes to 'settings insert-before target.env-vars'."""
-        self.complete_from_to(
-            'settings insert-before target.env',
-            'settings insert-before target.env-vars')
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_settings_replace_target_ru(self):
-        """Test that 'settings replace target.ru' completes to 'settings replace target.run-args'."""
-        self.complete_from_to(
-            'settings replace target.ru',
-            'settings replace target.run-args')
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_settings_show_term(self):
-        self.complete_from_to(
-            'settings show term-',
-            'settings show term-width')
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_settings_list_term(self):
-        self.complete_from_to(
-            'settings list term-',
-            'settings list term-width')
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_settings_remove_term(self):
-        self.complete_from_to(
-            'settings remove term-',
-            'settings remove term-width')
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_settings_s(self):
-        """Test that 'settings s' completes to ['set', 'show']."""
-        self.complete_from_to(
-            'settings s', [
-                'set', 'show'])
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_settings_set_th(self):
-        """Test that 'settings set thread-f' completes to 'settings set thread-format'."""
-        self.complete_from_to('settings set thread-f', 'settings set thread-format')
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_settings_s_dash(self):
-        """Test that 'settings set --g' completes to 'settings set --global'."""
-        self.complete_from_to('settings set --g', 'settings set --global')
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_settings_clear_th(self):
-        """Test that 'settings clear thread-f' completes to 'settings clear thread-format'."""
-        self.complete_from_to(
-            'settings clear thread-f',
-            'settings clear thread-format')
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_settings_set_ta(self):
-        """Test that 'settings set ta' completes to 'settings set target.'."""
-        self.complete_from_to(
-            'settings set target.ma',
-            'settings set target.max-')
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_settings_set_target_exec(self):
-        """Test that 'settings set target.exec' completes to 'settings set target.exec-search-paths '."""
-        self.complete_from_to(
-            'settings set target.exec',
-            'settings set target.exec-search-paths')
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_settings_set_target_pr(self):
-        """Test that 'settings set target.pr' completes to [
-        'target.prefer-dynamic-value', 'target.process.']."""
-        self.complete_from_to('settings set target.pr',
-                              ['target.prefer-dynamic-value',
-                               'target.process.'])
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_settings_set_target_process(self):
-        """Test that 'settings set target.process' completes to 'settings set target.process.'."""
-        self.complete_from_to(
-            'settings set target.process',
-            'settings set target.process.')
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_settings_set_target_process_dot(self):
-        """Test that 'settings set target.process.t' completes to 'settings set target.process.thread.'."""
-        self.complete_from_to(
-            'settings set target.process.t',
-            'settings set target.process.thread.')
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_settings_set_target_process_thread_dot(self):
-        """Test that 'settings set target.process.thread.' completes to [
-        'target.process.thread.step-avoid-regexp', 'target.process.thread.trace-thread']."""
-        self.complete_from_to('settings set target.process.thread.',
-                              ['target.process.thread.step-avoid-regexp',
-                               'target.process.thread.trace-thread'])
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_target_space(self):
-        """Test that 'target ' completes to ['create', 'delete', 'list',
-        'modules', 'select', 'stop-hook', 'variable']."""
-        self.complete_from_to('target ',
-                              ['create',
-                               'delete',
-                               'list',
-                               'modules',
-                               'select',
-                               'stop-hook',
-                               'variable'])
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_target_create_dash_co(self):
-        """Test that 'target create --co' completes to 'target variable --core '."""
-        self.complete_from_to('target create --co', 'target create --core ')
-
-    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
-    def test_target_va(self):
-        """Test that 'target va' completes to 'target variable '."""
-        self.complete_from_to('target va', 'target variable ')
-
-    def test_command_argument_completion(self):
-        """Test completion of command arguments"""
-        self.complete_from_to("watchpoint set variable -", ["-w", "-s"])
-        self.complete_from_to('watchpoint set variable -w', 'watchpoint set variable -w ')
-        self.complete_from_to("watchpoint set variable --", ["--watch", "--size"])
-        self.complete_from_to("watchpoint set variable --w", "watchpoint set variable --watch")
-        self.complete_from_to('watchpoint set variable -w ', ['read', 'write', 'read_write'])
-        self.complete_from_to("watchpoint set variable --watch ", ["read", "write", "read_write"])
-        self.complete_from_to("watchpoint set variable --watch w", "watchpoint set variable --watch write")
-        self.complete_from_to('watchpoint set variable -w read_', 'watchpoint set variable -w read_write')
-        # Now try the same thing with a variable name (non-option argument) to
-        # test that getopts arg reshuffling doesn't confuse us.
-        self.complete_from_to("watchpoint set variable foo -", ["-w", "-s"])
-        self.complete_from_to('watchpoint set variable foo -w', 'watchpoint set variable foo -w ')
-        self.complete_from_to("watchpoint set variable foo --", ["--watch", "--size"])
-        self.complete_from_to("watchpoint set variable foo --w", "watchpoint set variable foo --watch")
-        self.complete_from_to('watchpoint set variable foo -w ', ['read', 'write', 'read_write'])
-        self.complete_from_to("watchpoint set variable foo --watch ", ["read", "write", "read_write"])
-        self.complete_from_to("watchpoint set variable foo --watch w", "watchpoint set variable foo --watch write")
-        self.complete_from_to('watchpoint set variable foo -w read_', 'watchpoint set variable foo -w read_write')
-
-    def test_completion_description_commands(self):
-        """Test descriptions of top-level command completions"""
-        self.check_completion_with_desc("", [
-            ["command", "Commands for managing custom LLDB commands."],
-            ["breakpoint", "Commands for operating on breakpoints (see 'help b' for shorthand.)"]
-        ])
-
-        self.check_completion_with_desc("pl", [
-            ["platform", "Commands to manage and create platforms."],
-            ["plugin", "Commands for managing LLDB plugins."]
-        ])
-
-        # Just check that this doesn't crash.
-        self.check_completion_with_desc("comman", [])
-        self.check_completion_with_desc("non-existent-command", [])
-
-    def test_completion_description_command_options(self):
-        """Test descriptions of command options"""
-        # Short options
-        self.check_completion_with_desc("breakpoint set -", [
-            ["-h", "Set the breakpoint on exception catcH."],
-            ["-w", "Set the breakpoint on exception throW."]
-        ])
-
-        # Long options.
-        self.check_completion_with_desc("breakpoint set --", [
-            ["--on-catch", "Set the breakpoint on exception catcH."],
-            ["--on-throw", "Set the breakpoint on exception throW."]
-        ])
-
-        # Ambiguous long options.
-        self.check_completion_with_desc("breakpoint set --on-", [
-            ["--on-catch", "Set the breakpoint on exception catcH."],
-            ["--on-throw", "Set the breakpoint on exception throW."]
-        ])
-
-        # Unknown long option.
-        self.check_completion_with_desc("breakpoint set --Z", [
-        ])
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24489")
-    def test_symbol_name(self):
-        self.build()
-        self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
-        self.complete_from_to('breakpoint set -n Fo',
-                              'breakpoint set -n Foo::Bar(int,\\ int)',
-                              turn_off_re_match=True)
-        # No completion for Qu because the candidate is
-        # (anonymous namespace)::Quux().
-        self.complete_from_to('breakpoint set -n Qu', '')
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/completion/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/completion/main.cpp
deleted file mode 100644 (file)
index eba81dc..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-class Foo
-{
-public:
-    int Bar(int x, int y)
-    {
-        return x + y;
-    }
-};
-
-namespace { int Quux (void) { return 0; } }
-
-struct Container { int MemberVar; };
-
-int main()
-{
-    Foo fooo;
-    Foo *ptr_fooo = &fooo;
-    fooo.Bar(1, 2);
-
-    Container container;
-    Container *ptr_container = &container;
-    int q = Quux();
-    return container.MemberVar = 3; // Break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/conditional_break/.lldb b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/conditional_break/.lldb
deleted file mode 100644 (file)
index 4be90ef..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-breakpoint set -n c
-command script import -r conditional_break.py
-breakpoint command add 1 -F "conditional_break.stop_if_called_from_a"
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/conditional_break/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/conditional_break/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/conditional_break/TestConditionalBreak.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/conditional_break/TestConditionalBreak.py
deleted file mode 100644 (file)
index cc48a63..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-"""
-Test conditionally break on a function and inspect its variables.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-# rdar://problem/8532131
-# lldb not able to digest the clang-generated debug info correctly with respect to function name
-#
-# This class currently fails for clang as well as llvm-gcc.
-
-
-class ConditionalBreakTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(['pyapi'])
-    def test_with_python(self):
-        """Exercise some thread and frame APIs to break if c() is called by a()."""
-        self.build()
-        self.do_conditional_break()
-
-    def test_with_command(self):
-        """Simulate a user using lldb commands to break on c() if called from a()."""
-        self.build()
-        self.simulate_conditional_break_by_user()
-
-    def do_conditional_break(self):
-        """Exercise some thread and frame APIs to break if c() is called by a()."""
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        breakpoint = target.BreakpointCreateByName("c", exe)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        STOPPED_DUE_TO_BREAKPOINT)
-
-        # Find the line number where a's parent frame function is c.
-        line = line_number(
-            'main.c',
-            "// Find the line number where c's parent frame is a here.")
-
-        # Suppose we are only interested in the call scenario where c()'s
-        # immediate caller is a() and we want to find out the value passed from
-        # a().
-        #
-        # The 10 in range(10) is just an arbitrary number, which means we would
-        # like to try for at most 10 times.
-        for j in range(10):
-            if self.TraceOn():
-                print("j is: ", j)
-            thread = lldbutil.get_one_thread_stopped_at_breakpoint(
-                process, breakpoint)
-            self.assertIsNotNone(
-                thread, "Expected one thread to be stopped at the breakpoint")
-
-            if thread.GetNumFrames() >= 2:
-                frame0 = thread.GetFrameAtIndex(0)
-                name0 = frame0.GetFunction().GetName()
-                frame1 = thread.GetFrameAtIndex(1)
-                name1 = frame1.GetFunction().GetName()
-                # lldbutil.print_stacktrace(thread)
-                self.assertTrue(name0 == "c", "Break on function c()")
-                if (name1 == "a"):
-                    # By design, we know that a() calls c() only from main.c:27.
-                    # In reality, similar logic can be used to find out the call
-                    # site.
-                    self.assertTrue(frame1.GetLineEntry().GetLine() == line,
-                                    "Immediate caller a() at main.c:%d" % line)
-
-                    # And the local variable 'val' should have a value of (int)
-                    # 3.
-                    val = frame1.FindVariable("val")
-                    self.assertEqual("int", val.GetTypeName())
-                    self.assertEqual("3", val.GetValue())
-                    break
-
-            process.Continue()
-
-    def simulate_conditional_break_by_user(self):
-        """Simulate a user using lldb commands to break on c() if called from a()."""
-
-        # Sourcing .lldb in the current working directory, which sets the main
-        # executable, sets the breakpoint on c(), and adds the callback for the
-        # breakpoint such that lldb only stops when the caller of c() is a().
-        # the "my" package that defines the date() function.
-        if self.TraceOn():
-            print("About to source .lldb")
-
-        if not self.TraceOn():
-            self.HideStdout()
-
-        # Separate out the "file " + self.getBuildArtifact("a.out") command from .lldb file, for the sake of
-        # remote testsuite.
-        self.runCmd("file " + self.getBuildArtifact("a.out"))
-        self.runCmd("command source .lldb")
-
-        self.runCmd("break list")
-
-        if self.TraceOn():
-            print("About to run.")
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.runCmd("break list")
-
-        if self.TraceOn():
-            print("Done running")
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped', 'stop reason = breakpoint'])
-
-        # The frame info for frame #0 points to a.out`c and its immediate caller
-        # (frame #1) points to a.out`a.
-
-        self.expect("frame info", "We should stop at c()",
-                    substrs=["a.out`c"])
-
-        # Select our parent frame as the current frame.
-        self.runCmd("frame select 1")
-        self.expect("frame info", "The immediate caller should be a()",
-                    substrs=["a.out`a"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/conditional_break/conditional_break.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/conditional_break/conditional_break.py
deleted file mode 100644 (file)
index 4f27464..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-import lldb
-
-
-def stop_if_called_from_a(frame, bp_loc, dict):
-
-    thread = frame.GetThread()
-    process = thread.GetProcess()
-    target = process.GetTarget()
-    dbg = target.GetDebugger()
-
-    # Perform synchronous interaction with the debugger.
-    old_async = dbg.GetAsync()
-    dbg.SetAsync(True)
-
-    # We check the call frames in order to stop only when the immediate caller
-    # of the leaf function c() is a().  If it's not the right caller, we ask the
-    # command interpreter to continue execution.
-
-    should_stop = True
-    if thread.GetNumFrames() >= 2:
-
-        if (thread.frames[0].function.name ==
-                'c' and thread.frames[1].function.name == 'a'):
-            should_stop = True
-        else:
-            should_stop = False
-
-    dbg.SetAsync(old_async)
-    return should_stop
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/conditional_break/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/conditional_break/main.c
deleted file mode 100644 (file)
index dc528a4..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-// This simple program is to demonstrate the capability of the lldb command
-// "breakpoint command add" to add a set of commands to a breakpoint to be
-// executed when the breakpoint is hit.
-//
-// In particular, we want to break within c(), but only if the immediate caller
-// is a().
-
-int a(int);
-int b(int);
-int c(int);
-
-int a(int val)
-{
-    if (val <= 1)
-        return b(val);
-    else if (val >= 3)
-        return c(val); // Find the line number where c's parent frame is a here.
-
-    return val;
-}
-
-int b(int val)
-{
-    return c(val);
-}
-
-int c(int val)
-{
-    return val + 3;
-}
-
-int main (int argc, char const *argv[])
-{
-    int A1 = a(1);  // a(1) -> b(1) -> c(1)
-    printf("a(1) returns %d\n", A1);
-    
-    int B2 = b(2);  // b(2) -> c(2)
-    printf("b(2) returns %d\n", B2);
-    
-    int A3 = a(3);  // a(3) -> c(3)
-    printf("a(3) returns %d\n", A3);
-    
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/.categories b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/.categories
deleted file mode 100644 (file)
index ea13548..0000000
+++ /dev/null
@@ -1 +0,0 @@
-darwin-log
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/basic/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/basic/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/basic/TestDarwinLogBasic.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/basic/TestDarwinLogBasic.py
deleted file mode 100644 (file)
index 6e6607a..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-"""
-Test basic DarwinLog functionality provided by the StructuredDataDarwinLog
-plugin.
-
-These tests are currently only supported when running against Darwin
-targets.
-"""
-
-# System imports
-
-# LLDB imports
-from lldbsuite.test import darwin_log
-from lldbsuite.test import decorators
-from lldbsuite.test import lldbtest
-
-
-class TestDarwinLogBasic(darwin_log.DarwinLogEventBasedTestBase):
-
-    mydir = lldbtest.TestBase.compute_mydir(__file__)
-
-    @decorators.add_test_categories(['pyapi'])
-    @decorators.skipUnlessDarwin
-    @decorators.expectedFailureAll(archs=["i386"], bugnumber="rdar://28655626")
-    @decorators.expectedFailureAll(bugnumber="rdar://30645203")
-    def test_SBStructuredData_gets_broadcasted(self):
-        """Exercise SBStructuredData API."""
-
-        # Run the test.
-        log_entries = self.do_test(None, max_entry_count=2)
-
-        # Validate that we received our two log entries.
-        self.assertEqual(len(log_entries), 1,
-                         "Expected one log entry to arrive via events.")
-        self.assertEqual(log_entries[0]['message'], "Hello, world",
-                         "Log message should match expected content.")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/basic/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/basic/main.c
deleted file mode 100644 (file)
index c69d0ab..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <os/log.h>
-#include <stdio.h>
-
-#include "../common/darwin_log_common.h"
-
-int main(int argc, char** argv)
-{
-    os_log_t logger = os_log_create("org.llvm.lldb.test", "basic-test");
-    if (!logger)
-        return 1;
-
-    // Note we cannot use the os_log() line as the breakpoint because, as of
-    // the initial writing of this test, we get multiple breakpoints for that
-    // line, which confuses the pexpect test logic.
-    printf("About to log\n"); // break here
-    os_log(logger, "Hello, world");
-
-    // Sleep, as the darwin log reporting doesn't always happen until a bit
-    // later.  We need the message to come out before the process terminates.
-    sleep(FINAL_WAIT_SECONDS);
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/common/darwin_log_common.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/common/darwin_log_common.h
deleted file mode 100644 (file)
index de923b9..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// The number of seconds to wait at the end of the test inferior before
-// exiting.  This delay is needed to ensure the logging infrastructure
-// has flushed out the message.  If we finished before all messages were
-// flushed, then the test will never see the unflushed messages, causing
-// some test logic to fail.
-#define FINAL_WAIT_SECONDS 5
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity-chain/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity-chain/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity-chain/TestDarwinLogFilterMatchActivityChain.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity-chain/TestDarwinLogFilterMatchActivityChain.py
deleted file mode 100644 (file)
index c1dfd15..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-"""
-Test basic DarwinLog functionality provided by the StructuredDataDarwinLog
-plugin.
-
-These tests are currently only supported when running against Darwin
-targets.
-"""
-
-
-import lldb
-
-from lldbsuite.test import decorators
-from lldbsuite.test import lldbtest
-from lldbsuite.test import darwin_log
-
-
-class TestDarwinLogFilterMatchActivityChain(darwin_log.DarwinLogTestBase):
-
-    mydir = lldbtest.TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        super(TestDarwinLogFilterMatchActivityChain, self).setUp()
-
-        # Source filename.
-        self.source = 'main.c'
-
-        # Output filename.
-        self.exe_name = self.getBuildArtifact("a.out")
-        self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
-
-        # Locate breakpoint.
-        self.line = lldbtest.line_number(self.source, '// break here')
-
-    def tearDown(self):
-        # Shut down the process if it's still running.
-        if self.child:
-            self.runCmd('process kill')
-            self.expect_prompt()
-            self.runCmd('quit')
-
-        # Let parent clean up
-        super(TestDarwinLogFilterMatchActivityChain, self).tearDown()
-
-    # ==========================================================================
-    # activity-chain filter tests
-    # ==========================================================================
-
-    @decorators.skipUnlessDarwin
-    def test_filter_accept_activity_chain_match(self):
-        """Test that fall-through reject, accept full-match activity chain works."""
-        self.do_test(
-            ["--no-match-accepts false",
-             "--filter \"accept activity-chain match "
-             "parent-activity:child-activity\""])
-
-        # We should only see the second log message as we only accept
-        # that activity.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    def test_filter_reject_activity_chain_partial_match(self):
-        """Test that fall-through reject, doesn't accept only partial match of activity-chain."""
-        self.do_test(
-            ["--no-match-accepts false",
-             # Match the second fully.
-             "--filter \"accept activity-chain match parent-activity:child-activity\"",
-             "--filter \"accept activity-chain match parent-ac\""])                      # Only partially match the first.
-
-        # We should only see the second log message as we only accept
-        # that activity.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    def test_filter_reject_activity_chain_full_match(self):
-        """Test that fall-through accept, reject match activity-chain works."""
-        self.do_test(
-            ["--no-match-accepts true",
-             "--filter \"reject activity-chain match parent-activity\""])
-
-        # We should only see the second log message as we rejected the first
-        # via activity-chain rejection.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    def test_filter_accept_activity_chain_second_rule(self):
-        """Test that fall-through reject, accept activity-chain on second rule works."""
-        self.do_test(
-            ["--no-match-accepts false",
-             "--filter \"accept activity-chain match non-existent\"",
-             "--filter \"accept activity-chain match parent-activity:child-activity\""])
-
-        # We should only see the second message since we reject by default,
-        # the first filter doesn't match any, and the second filter matches
-        # the activity-chain of the second log message.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity-chain/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity-chain/main.c
deleted file mode 100644 (file)
index fbe5106..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <os/activity.h>
-#include <os/log.h>
-#include <stdio.h>
-
-#include "../../../common/darwin_log_common.h"
-
-int main(int argc, char** argv)
-{
-    os_log_t logger_sub1 = os_log_create("org.llvm.lldb.test.sub1", "cat1");
-    os_log_t logger_sub2 = os_log_create("org.llvm.lldb.test.sub2", "cat2");
-    if (!logger_sub1 || !logger_sub2)
-        return 1;
-
-    // Note we cannot use the os_log() line as the breakpoint because, as of
-    // the initial writing of this test, we get multiple breakpoints for that
-    // line, which confuses the pexpect test logic.
-    printf("About to log\n"); // break here
-    os_activity_t parent_activity = os_activity_create("parent-activity",
-        OS_ACTIVITY_CURRENT, OS_ACTIVITY_FLAG_DEFAULT);
-    os_activity_apply(parent_activity, ^{
-        os_log(logger_sub1, "source-log-sub1-cat1");
-        os_activity_t child_activity = os_activity_create("child-activity",
-            OS_ACTIVITY_CURRENT, OS_ACTIVITY_FLAG_DEFAULT);
-        os_activity_apply(child_activity, ^{
-            os_log(logger_sub2, "source-log-sub2-cat2");
-            });
-        });
-
-    // Sleep, as the darwin log reporting doesn't always happen until a bit
-    // later.  We need the message to come out before the process terminates.
-    sleep(FINAL_WAIT_SECONDS);
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity/TestDarwinLogFilterMatchActivity.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity/TestDarwinLogFilterMatchActivity.py
deleted file mode 100644 (file)
index f2587b1..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-"""
-Test basic DarwinLog functionality provided by the StructuredDataDarwinLog
-plugin.
-
-These tests are currently only supported when running against Darwin
-targets.
-"""
-
-
-import lldb
-
-from lldbsuite.test import decorators
-from lldbsuite.test import lldbtest
-from lldbsuite.test import darwin_log
-
-
-class TestDarwinLogFilterMatchActivity(darwin_log.DarwinLogTestBase):
-
-    mydir = lldbtest.TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        super(TestDarwinLogFilterMatchActivity, self).setUp()
-
-        # Source filename.
-        self.source = 'main.c'
-
-        # Output filename.
-        self.exe_name = self.getBuildArtifact("a.out")
-        self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
-
-        # Locate breakpoint.
-        self.line = lldbtest.line_number(self.source, '// break here')
-
-    def tearDown(self):
-        # Shut down the process if it's still running.
-        if self.child:
-            self.runCmd('process kill')
-            self.expect_prompt()
-            self.runCmd('quit')
-
-        # Let parent clean up
-        super(TestDarwinLogFilterMatchActivity, self).tearDown()
-
-    # ==========================================================================
-    # activity filter tests
-    # ==========================================================================
-
-    @decorators.skipUnlessDarwin
-    def test_filter_accept_activity_match(self):
-        """Test that fall-through reject, accept match activity works."""
-        self.do_test(
-            ["--no-match-accepts false",
-             "--filter \"accept activity match child-activity\""]
-        )
-
-        # We should only see the second log message as we only accept
-        # that activity.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    def test_filter_reject_activity_partial_match(self):
-        """Test that fall-through reject, accept match activity via partial match does not accept."""
-        self.do_test(
-            ["--no-match-accepts false",
-             # Fully match second message.
-             "--filter \"accept activity match child-activity\"",
-             "--filter \"accept activity match parent-\""]         # Only partially match first message.
-        )
-
-        # We should only see the second log message as we only accept
-        # that activity.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    def test_filter_reject_activity_full_match(self):
-        """Test that fall-through accept, reject match activity works."""
-        self.do_test(
-            ["--no-match-accepts true",
-             "--filter \"reject activity match parent-activity\""]
-        )
-
-        # We should only see the second log message as we rejected the first
-        # via activity rejection.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    def test_filter_accept_activity_second_rule(self):
-        """Test that fall-through reject, accept regex activity on second rule works."""
-        self.do_test(
-            ["--no-match-accepts false",
-             "--filter \"accept activity match non-existent\"",
-             "--filter \"accept activity match child-activity\""
-             ]
-        )
-
-        # We should only see the second message since we reject by default,
-        # the first filter doesn't match any, and the second filter matches
-        # the activity of the second log message.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity/main.c
deleted file mode 100644 (file)
index fbe5106..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <os/activity.h>
-#include <os/log.h>
-#include <stdio.h>
-
-#include "../../../common/darwin_log_common.h"
-
-int main(int argc, char** argv)
-{
-    os_log_t logger_sub1 = os_log_create("org.llvm.lldb.test.sub1", "cat1");
-    os_log_t logger_sub2 = os_log_create("org.llvm.lldb.test.sub2", "cat2");
-    if (!logger_sub1 || !logger_sub2)
-        return 1;
-
-    // Note we cannot use the os_log() line as the breakpoint because, as of
-    // the initial writing of this test, we get multiple breakpoints for that
-    // line, which confuses the pexpect test logic.
-    printf("About to log\n"); // break here
-    os_activity_t parent_activity = os_activity_create("parent-activity",
-        OS_ACTIVITY_CURRENT, OS_ACTIVITY_FLAG_DEFAULT);
-    os_activity_apply(parent_activity, ^{
-        os_log(logger_sub1, "source-log-sub1-cat1");
-        os_activity_t child_activity = os_activity_create("child-activity",
-            OS_ACTIVITY_CURRENT, OS_ACTIVITY_FLAG_DEFAULT);
-        os_activity_apply(child_activity, ^{
-            os_log(logger_sub2, "source-log-sub2-cat2");
-            });
-        });
-
-    // Sleep, as the darwin log reporting doesn't always happen until a bit
-    // later.  We need the message to come out before the process terminates.
-    sleep(FINAL_WAIT_SECONDS);
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/category/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/category/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/category/TestDarwinLogFilterMatchCategory.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/category/TestDarwinLogFilterMatchCategory.py
deleted file mode 100644 (file)
index f65b6fc..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-"""
-Test basic DarwinLog functionality provided by the StructuredDataDarwinLog
-plugin.
-
-These tests are currently only supported when running against Darwin
-targets.
-"""
-
-
-import lldb
-
-from lldbsuite.test import decorators
-from lldbsuite.test import lldbtest
-from lldbsuite.test import darwin_log
-
-
-class TestDarwinLogFilterMatchCategory(darwin_log.DarwinLogTestBase):
-
-    mydir = lldbtest.TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        super(TestDarwinLogFilterMatchCategory, self).setUp()
-
-        # Source filename.
-        self.source = 'main.c'
-
-        # Output filename.
-        self.exe_name = self.getBuildArtifact("a.out")
-        self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
-
-        # Locate breakpoint.
-        self.line = lldbtest.line_number(self.source, '// break here')
-
-    def tearDown(self):
-        # Shut down the process if it's still running.
-        if self.child:
-            self.runCmd('process kill')
-            self.expect_prompt()
-            self.runCmd('quit')
-
-        # Let parent clean up
-        super(TestDarwinLogFilterMatchCategory, self).tearDown()
-
-    # ==========================================================================
-    # category filter tests
-    # ==========================================================================
-
-    @decorators.skipUnlessDarwin
-    def test_filter_accept_category_full_match(self):
-        """Test that fall-through reject, accept match single category works."""
-        self.do_test(
-            ["--no-match-accepts false",
-             "--filter \"accept category match cat2\""]
-        )
-
-        # We should only see the second log message as we only accept
-        # that category.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    def test_filter_reject_category_partial_match(self):
-        """Test that fall-through reject, accept regex category via partial match works."""
-        self.do_test(
-            ["--no-match-accepts false",
-             # Fully match the second message.
-             "--filter \"accept category match cat2\"",
-             "--filter \"accept category match at1\""]   # Only partially match first message.  Should not show up.
-        )
-
-        # We should only see the second log message as we only accept
-        # that category.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    def test_filter_reject_category_full_match(self):
-        """Test that fall-through accept, reject match category works."""
-        self.do_test(
-            ["--no-match-accepts true",
-             "--filter \"reject category match cat1\""]
-        )
-
-        # We should only see the second log message as we rejected the first
-        # via category rejection.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    def test_filter_accept_category_second_rule(self):
-        """Test that fall-through reject, accept match category on second rule works."""
-        self.do_test(
-            ["--no-match-accepts false",
-             "--filter \"accept category match non-existent\"",
-             "--filter \"accept category match cat2\""
-             ]
-        )
-
-        # We should only see the second message since we reject by default,
-        # the first filter doesn't match any, and the second filter matches
-        # the category of the second log message.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/category/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/category/main.c
deleted file mode 100644 (file)
index fbe5106..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <os/activity.h>
-#include <os/log.h>
-#include <stdio.h>
-
-#include "../../../common/darwin_log_common.h"
-
-int main(int argc, char** argv)
-{
-    os_log_t logger_sub1 = os_log_create("org.llvm.lldb.test.sub1", "cat1");
-    os_log_t logger_sub2 = os_log_create("org.llvm.lldb.test.sub2", "cat2");
-    if (!logger_sub1 || !logger_sub2)
-        return 1;
-
-    // Note we cannot use the os_log() line as the breakpoint because, as of
-    // the initial writing of this test, we get multiple breakpoints for that
-    // line, which confuses the pexpect test logic.
-    printf("About to log\n"); // break here
-    os_activity_t parent_activity = os_activity_create("parent-activity",
-        OS_ACTIVITY_CURRENT, OS_ACTIVITY_FLAG_DEFAULT);
-    os_activity_apply(parent_activity, ^{
-        os_log(logger_sub1, "source-log-sub1-cat1");
-        os_activity_t child_activity = os_activity_create("child-activity",
-            OS_ACTIVITY_CURRENT, OS_ACTIVITY_FLAG_DEFAULT);
-        os_activity_apply(child_activity, ^{
-            os_log(logger_sub2, "source-log-sub2-cat2");
-            });
-        });
-
-    // Sleep, as the darwin log reporting doesn't always happen until a bit
-    // later.  We need the message to come out before the process terminates.
-    sleep(FINAL_WAIT_SECONDS);
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/message/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/message/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/message/TestDarwinLogFilterMatchMessage.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/message/TestDarwinLogFilterMatchMessage.py
deleted file mode 100644 (file)
index 0d0378a..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-"""
-Test basic DarwinLog functionality provided by the StructuredDataDarwinLog
-plugin.
-
-These tests are currently only supported when running against Darwin
-targets.
-"""
-
-
-import lldb
-import re
-
-from lldbsuite.test import decorators
-from lldbsuite.test import lldbtest
-from lldbsuite.test import darwin_log
-
-
-class TestDarwinLogFilterMatchMessage(darwin_log.DarwinLogTestBase):
-
-    mydir = lldbtest.TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        super(TestDarwinLogFilterMatchMessage, self).setUp()
-
-        # Source filename.
-        self.source = 'main.c'
-
-        # Output filename.
-        self.exe_name = self.getBuildArtifact("a.out")
-        self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
-
-        # Locate breakpoint.
-        self.line = lldbtest.line_number(self.source, '// break here')
-
-        self.strict_sources = True
-
-        # Turn on process monitor logging while we work out issues.
-        self.enable_process_monitor_logging = True
-
-    def tearDown(self):
-        # Shut down the process if it's still running.
-        if self.child:
-            self.runCmd('process kill')
-            self.expect_prompt()
-            self.runCmd('quit')
-
-        # Let parent clean up
-        super(TestDarwinLogFilterMatchMessage, self).tearDown()
-
-    # ==========================================================================
-    # category filter tests
-    # ==========================================================================
-
-    EXPECT_REGEXES = [
-        re.compile(r"log message ([^-]+)-(\S+)"),
-        re.compile(r"exited with status")
-    ]
-
-    @decorators.skipUnlessDarwin
-    @decorators.expectedFailureAll(oslist=["macosx"],
-                                   bugnumber="llvm.org/pr30299")
-    def test_filter_accept_message_full_match(self):
-        """Test that fall-through reject, accept match whole message works."""
-        self.do_test(
-            ["--no-match-accepts false",
-             "--filter \"accept message match log message sub2-cat2\""],
-            expect_regexes=self.EXPECT_REGEXES
-        )
-
-        # We should only see the second log message as we only accept
-        # that message contents.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    @decorators.expectedFailureAll(oslist=["macosx"],
-                                   bugnumber="llvm.org/pr30299")
-    def test_filter_no_accept_message_partial_match(self):
-        """Test that fall-through reject, match message via partial content match doesn't accept."""
-        self.do_test(
-            ["--no-match-accepts false",
-             "--filter \"accept message match log message sub2-cat2\"",
-             "--filter \"accept message match sub1-cat1\""],
-            expect_regexes=self.EXPECT_REGEXES
-        )
-
-        # We should only see the second log message as the partial match on
-        # the first message should not pass.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    @decorators.expectedFailureAll(oslist=["macosx"],
-                                   bugnumber="llvm.org/pr30299")
-    def test_filter_reject_category_full_match(self):
-        """Test that fall-through accept, reject match message works."""
-        self.do_test(
-            ["--no-match-accepts true",
-             "--filter \"reject message match log message sub1-cat1\""],
-            expect_regexes=self.EXPECT_REGEXES
-        )
-
-        # We should only see the second log message as we rejected the first
-        # via message contents rejection.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    @decorators.expectedFailureAll(oslist=["macosx"],
-                                   bugnumber="llvm.org/pr30299")
-    def test_filter_accept_category_second_rule(self):
-        """Test that fall-through reject, accept match category on second rule works."""
-        self.do_test(
-            ["--no-match-accepts false",
-             "--filter \"accept message match non-existent\"",
-             "--filter \"accept message match log message sub2-cat2\""],
-            expect_regexes=self.EXPECT_REGEXES
-        )
-
-        # We should only see the second message since we reject by default,
-        # the first filter doesn't match any, and the second filter matches
-        # the category of the second log message.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/message/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/message/main.c
deleted file mode 100644 (file)
index b4b26c1..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <os/activity.h>
-#include <os/log.h>
-#include <stdio.h>
-
-#include "../../../common/darwin_log_common.h"
-
-int main(int argc, char** argv)
-{
-    os_log_t logger_sub1 = os_log_create("org.llvm.lldb.test.sub1", "cat1");
-    os_log_t logger_sub2 = os_log_create("org.llvm.lldb.test.sub2", "cat2");
-    if (!logger_sub1 || !logger_sub2)
-        return 1;
-
-    // Note we cannot use the os_log() line as the breakpoint because, as of
-    // the initial writing of this test, we get multiple breakpoints for that
-    // line, which confuses the pexpect test logic.
-    printf("About to log\n"); // break here
-    os_log(logger_sub1, "log message sub%d-cat%d", 1, 1);
-    os_log(logger_sub2, "log message sub%d-cat%d", 2, 2);
-
-    // Sleep, as the darwin log reporting doesn't always happen until a bit
-    // later.  We need the message to come out before the process terminates.
-    sleep(1);
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/subsystem/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/subsystem/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/subsystem/TestDarwinLogFilterMatchSubsystem.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/subsystem/TestDarwinLogFilterMatchSubsystem.py
deleted file mode 100644 (file)
index 6fd94fa..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-"""
-Test basic DarwinLog functionality provided by the StructuredDataDarwinLog
-plugin.
-
-These tests are currently only supported when running against Darwin
-targets.
-"""
-
-
-import lldb
-
-from lldbsuite.test import decorators
-from lldbsuite.test import lldbtest
-from lldbsuite.test import darwin_log
-
-
-class TestDarwinLogFilterMatchSubsystem(darwin_log.DarwinLogTestBase):
-
-    mydir = lldbtest.TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        super(TestDarwinLogFilterMatchSubsystem, self).setUp()
-
-        # Source filename.
-        self.source = 'main.c'
-
-        # Output filename.
-        self.exe_name = self.getBuildArtifact("a.out")
-        self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
-
-        # Locate breakpoint.
-        self.line = lldbtest.line_number(self.source, '// break here')
-
-    def tearDown(self):
-        # Shut down the process if it's still running.
-        if self.child:
-            self.runCmd('process kill')
-            self.expect_prompt()
-            self.runCmd('quit')
-
-        # Let parent clean up
-        super(TestDarwinLogFilterMatchSubsystem, self).tearDown()
-
-    # ==========================================================================
-    # subsystem filter tests
-    # ==========================================================================
-
-    @decorators.skipUnlessDarwin
-    def test_filter_accept_subsystem_full_match(self):
-        """Test that fall-through reject, accept match single subsystem works."""
-        self.do_test(
-            ["--no-match-accepts false",
-             "--filter \"accept subsystem match org.llvm.lldb.test.sub2\""]
-        )
-
-        # We should only see the second log message as we only accept
-        # that subsystem.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 0) and (
-                self.child.match.group(1) == "sub2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    def test_filter_reject_subsystem_partial_match(self):
-        """Test that fall-through reject, doesn't accept match subsystem via partial-match."""
-        self.do_test(
-            ["--no-match-accepts false",
-             # Fully match second message subsystem.
-             "--filter \"accept subsystem match org.llvm.lldb.test.sub2\"",
-             "--filter \"accept subsystem match sub1\""]                     # Only partially match first subsystem.
-        )
-
-        # We should only see the second log message as we only accept
-        # that subsystem.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 0) and (
-                self.child.match.group(1) == "sub2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    def test_filter_reject_subsystem_full_match(self):
-        """Test that fall-through accept, reject match subsystem works."""
-        self.do_test(
-            ["--no-match-accepts true",
-             "--filter \"reject subsystem match org.llvm.lldb.test.sub1\""]
-        )
-
-        # We should only see the second log message as we rejected the first
-        # via subsystem rejection.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 0) and (
-                self.child.match.group(1) == "sub2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    def test_filter_accept_subsystem_second_rule(self):
-        """Test that fall-through reject, accept match subsystem on second rule works."""
-        self.do_test(
-            ["--no-match-accepts false",
-             "--filter \"accept subsystem match non-existent\"",
-             "--filter \"accept subsystem match org.llvm.lldb.test.sub2\""
-             ]
-        )
-
-        # We should only see the second message since we reject by default,
-        # the first filter doesn't match any, and the second filter matches
-        # the subsystem of the second log message.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 0) and (
-                self.child.match.group(1) == "sub2"),
-            "first log line should not be present, second log line "
-            "should be")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/subsystem/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/subsystem/main.c
deleted file mode 100644 (file)
index fbe5106..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <os/activity.h>
-#include <os/log.h>
-#include <stdio.h>
-
-#include "../../../common/darwin_log_common.h"
-
-int main(int argc, char** argv)
-{
-    os_log_t logger_sub1 = os_log_create("org.llvm.lldb.test.sub1", "cat1");
-    os_log_t logger_sub2 = os_log_create("org.llvm.lldb.test.sub2", "cat2");
-    if (!logger_sub1 || !logger_sub2)
-        return 1;
-
-    // Note we cannot use the os_log() line as the breakpoint because, as of
-    // the initial writing of this test, we get multiple breakpoints for that
-    // line, which confuses the pexpect test logic.
-    printf("About to log\n"); // break here
-    os_activity_t parent_activity = os_activity_create("parent-activity",
-        OS_ACTIVITY_CURRENT, OS_ACTIVITY_FLAG_DEFAULT);
-    os_activity_apply(parent_activity, ^{
-        os_log(logger_sub1, "source-log-sub1-cat1");
-        os_activity_t child_activity = os_activity_create("child-activity",
-            OS_ACTIVITY_CURRENT, OS_ACTIVITY_FLAG_DEFAULT);
-        os_activity_apply(child_activity, ^{
-            os_log(logger_sub2, "source-log-sub2-cat2");
-            });
-        });
-
-    // Sleep, as the darwin log reporting doesn't always happen until a bit
-    // later.  We need the message to come out before the process terminates.
-    sleep(FINAL_WAIT_SECONDS);
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity-chain/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity-chain/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity-chain/TestDarwinLogFilterRegexActivityChain.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity-chain/TestDarwinLogFilterRegexActivityChain.py
deleted file mode 100644 (file)
index bec5a95..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-"""
-Test basic DarwinLog functionality provided by the StructuredDataDarwinLog
-plugin.
-
-These tests are currently only supported when running against Darwin
-targets.
-"""
-
-
-import lldb
-
-from lldbsuite.test import decorators
-from lldbsuite.test import lldbtest
-from lldbsuite.test import darwin_log
-
-
-class TestDarwinLogFilterRegexActivityChain(darwin_log.DarwinLogTestBase):
-
-    mydir = lldbtest.TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        super(TestDarwinLogFilterRegexActivityChain, self).setUp()
-
-        # Source filename.
-        self.source = 'main.c'
-
-        # Output filename.
-        self.exe_name = self.getBuildArtifact("a.out")
-        self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
-
-        # Locate breakpoint.
-        self.line = lldbtest.line_number(self.source, '// break here')
-
-    def tearDown(self):
-        # Shut down the process if it's still running.
-        if self.child:
-            self.runCmd('process kill')
-            self.expect_prompt()
-            self.runCmd('quit')
-
-        # Let parent clean up
-        super(TestDarwinLogFilterRegexActivityChain, self).tearDown()
-
-    # ==========================================================================
-    # activity-chain filter tests
-    # ==========================================================================
-
-    @decorators.skipUnlessDarwin
-    def test_filter_accept_activity_chain_full_match(self):
-        """Test that fall-through reject, accept full-match activity chain works."""
-        self.do_test(
-            ["--no-match-accepts false",
-             "--filter \"accept activity-chain regex "
-             "parent-activity:child-activity\""])
-
-        # We should only see the second log message as we only accept
-        # that activity.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    def test_filter_accept_activity_chain_partial_match(self):
-        """Test that fall-through reject, accept activity-chain via partial match works."""
-        self.do_test(
-            ["--no-match-accepts false",
-             "--filter \"accept activity-chain regex :child-activity\""])
-
-        # We should only see the second log message as we only accept
-        # that activity.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    def test_filter_reject_activity_chain_full_match(self):
-        """Test that fall-through accept, reject activity-chain works."""
-        self.do_test(
-            ["--no-match-accepts true",
-             "--filter \"reject activity-chain regex parent-activity:child-..tivity\""])
-
-        # We should only see the second log message as we rejected the first
-        # via activity-chain rejection.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat1"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    def test_filter_reject_activity_chain_partial_match(self):
-        """Test that fall-through accept, reject activity-chain by partial match works."""
-        self.do_test(
-            ["--no-match-accepts true",
-             "--filter \"reject activity-chain regex ^p[^:]+$\""])
-
-        # We should only see the second log message as we rejected the first
-        # via activity-chain rejection.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    def test_filter_accept_activity_chain_second_rule(self):
-        """Test that fall-through reject, accept activity-chain on second rule works."""
-        self.do_test(
-            ["--no-match-accepts false",
-             "--filter \"accept activity-chain regex non-existent\"",
-             "--filter \"accept activity-chain regex child-activity\""])
-
-        # We should only see the second message since we reject by default,
-        # the first filter doesn't match any, and the second filter matches
-        # the activity-chain of the second log message.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity-chain/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity-chain/main.c
deleted file mode 100644 (file)
index fbe5106..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <os/activity.h>
-#include <os/log.h>
-#include <stdio.h>
-
-#include "../../../common/darwin_log_common.h"
-
-int main(int argc, char** argv)
-{
-    os_log_t logger_sub1 = os_log_create("org.llvm.lldb.test.sub1", "cat1");
-    os_log_t logger_sub2 = os_log_create("org.llvm.lldb.test.sub2", "cat2");
-    if (!logger_sub1 || !logger_sub2)
-        return 1;
-
-    // Note we cannot use the os_log() line as the breakpoint because, as of
-    // the initial writing of this test, we get multiple breakpoints for that
-    // line, which confuses the pexpect test logic.
-    printf("About to log\n"); // break here
-    os_activity_t parent_activity = os_activity_create("parent-activity",
-        OS_ACTIVITY_CURRENT, OS_ACTIVITY_FLAG_DEFAULT);
-    os_activity_apply(parent_activity, ^{
-        os_log(logger_sub1, "source-log-sub1-cat1");
-        os_activity_t child_activity = os_activity_create("child-activity",
-            OS_ACTIVITY_CURRENT, OS_ACTIVITY_FLAG_DEFAULT);
-        os_activity_apply(child_activity, ^{
-            os_log(logger_sub2, "source-log-sub2-cat2");
-            });
-        });
-
-    // Sleep, as the darwin log reporting doesn't always happen until a bit
-    // later.  We need the message to come out before the process terminates.
-    sleep(FINAL_WAIT_SECONDS);
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity/TestDarwinLogFilterRegexActivity.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity/TestDarwinLogFilterRegexActivity.py
deleted file mode 100644 (file)
index 4a4c6a2..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-"""
-Test basic DarwinLog functionality provided by the StructuredDataDarwinLog
-plugin.
-
-These tests are currently only supported when running against Darwin
-targets.
-"""
-
-
-import lldb
-
-from lldbsuite.test import decorators
-from lldbsuite.test import lldbtest
-from lldbsuite.test import darwin_log
-
-
-class TestDarwinLogFilterRegexActivity(darwin_log.DarwinLogTestBase):
-
-    mydir = lldbtest.TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        super(TestDarwinLogFilterRegexActivity, self).setUp()
-
-        # Source filename.
-        self.source = 'main.c'
-
-        # Output filename.
-        self.exe_name = self.getBuildArtifact("a.out")
-        self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
-
-        # Locate breakpoint.
-        self.line = lldbtest.line_number(self.source, '// break here')
-
-    def tearDown(self):
-        # Shut down the process if it's still running.
-        if self.child:
-            self.runCmd('process kill')
-            self.expect_prompt()
-            self.runCmd('quit')
-
-        # Let parent clean up
-        super(TestDarwinLogFilterRegexActivity, self).tearDown()
-
-    # ==========================================================================
-    # activity filter tests
-    # ==========================================================================
-
-    @decorators.skipUnlessDarwin
-    def test_filter_accept_activity_full_match(self):
-        """Test that fall-through reject, accept regex full-match activity works."""
-        self.do_test(
-            ["--no-match-accepts false",
-             "--filter \"accept activity regex child-activity\""]
-        )
-
-        # We should only see the second log message as we only accept
-        # that activity.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    def test_filter_accept_activity_partial_match(self):
-        """Test that fall-through reject, regex accept activity via partial match works."""
-        self.do_test(
-            ["--no-match-accepts false",
-             "--filter \"accept activity regex child-.*\""]
-        )
-
-        # We should only see the second log message as we only accept
-        # that activity.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    def test_filter_reject_activity_full_match(self):
-        """Test that fall-through accept, reject regex activity works."""
-        self.do_test(
-            ["--no-match-accepts true",
-             "--filter \"reject activity regex parent-activity\""]
-        )
-
-        # We should only see the second log message as we rejected the first
-        # via activity rejection.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    def test_filter_reject_activity_partial_match(self):
-        """Test that fall-through accept, reject regex activity by partial match works."""
-        self.do_test(
-            ["--no-match-accepts true",
-             "--filter \"reject activity regex p.+-activity\""]
-        )
-
-        # We should only see the second log message as we rejected the first
-        # via activity rejection.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    def test_filter_accept_activity_second_rule(self):
-        """Test that fall-through reject, accept regex activity on second rule works."""
-        self.do_test(
-            ["--no-match-accepts false",
-             "--filter \"accept activity regex non-existent\"",
-             "--filter \"accept activity regex child-activity\""
-             ]
-        )
-
-        # We should only see the second message since we reject by default,
-        # the first filter doesn't match any, and the second filter matches
-        # the activity of the second log message.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity/main.c
deleted file mode 100644 (file)
index fbe5106..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <os/activity.h>
-#include <os/log.h>
-#include <stdio.h>
-
-#include "../../../common/darwin_log_common.h"
-
-int main(int argc, char** argv)
-{
-    os_log_t logger_sub1 = os_log_create("org.llvm.lldb.test.sub1", "cat1");
-    os_log_t logger_sub2 = os_log_create("org.llvm.lldb.test.sub2", "cat2");
-    if (!logger_sub1 || !logger_sub2)
-        return 1;
-
-    // Note we cannot use the os_log() line as the breakpoint because, as of
-    // the initial writing of this test, we get multiple breakpoints for that
-    // line, which confuses the pexpect test logic.
-    printf("About to log\n"); // break here
-    os_activity_t parent_activity = os_activity_create("parent-activity",
-        OS_ACTIVITY_CURRENT, OS_ACTIVITY_FLAG_DEFAULT);
-    os_activity_apply(parent_activity, ^{
-        os_log(logger_sub1, "source-log-sub1-cat1");
-        os_activity_t child_activity = os_activity_create("child-activity",
-            OS_ACTIVITY_CURRENT, OS_ACTIVITY_FLAG_DEFAULT);
-        os_activity_apply(child_activity, ^{
-            os_log(logger_sub2, "source-log-sub2-cat2");
-            });
-        });
-
-    // Sleep, as the darwin log reporting doesn't always happen until a bit
-    // later.  We need the message to come out before the process terminates.
-    sleep(FINAL_WAIT_SECONDS);
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/category/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/category/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/category/TestDarwinLogFilterRegexCategory.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/category/TestDarwinLogFilterRegexCategory.py
deleted file mode 100644 (file)
index 9633609..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-"""
-Test basic DarwinLog functionality provided by the StructuredDataDarwinLog
-plugin.
-
-These tests are currently only supported when running against Darwin
-targets.
-"""
-
-
-import lldb
-
-from lldbsuite.test import decorators
-from lldbsuite.test import lldbtest
-from lldbsuite.test import darwin_log
-
-
-class TestDarwinLogFilterRegexCategory(darwin_log.DarwinLogTestBase):
-
-    mydir = lldbtest.TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        super(TestDarwinLogFilterRegexCategory, self).setUp()
-
-        # Source filename.
-        self.source = 'main.c'
-
-        # Output filename.
-        self.exe_name = self.getBuildArtifact("a.out")
-        self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
-
-        # Locate breakpoint.
-        self.line = lldbtest.line_number(self.source, '// break here')
-
-    def tearDown(self):
-        # Shut down the process if it's still running.
-        if self.child:
-            self.runCmd('process kill')
-            self.expect_prompt()
-            self.runCmd('quit')
-
-        # Let parent clean up
-        super(TestDarwinLogFilterRegexCategory, self).tearDown()
-
-    # ==========================================================================
-    # category filter tests
-    # ==========================================================================
-
-    @decorators.skipUnlessDarwin
-    def test_filter_accept_category_full_match(self):
-        """Test that fall-through reject, accept regex single category works."""
-        self.do_test(
-            ["--no-match-accepts false",
-             "--filter \"accept category regex cat2\""]
-        )
-
-        # We should only see the second log message as we only accept
-        # that category.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    def test_filter_accept_category_partial_match(self):
-        """Test that fall-through reject, accept regex category via partial match works."""
-        self.do_test(
-            ["--no-match-accepts false",
-             "--filter \"accept category regex .+2\""]
-        )
-
-        # We should only see the second log message as we only accept
-        # that category.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    def test_filter_reject_category_full_match(self):
-        """Test that fall-through accept, reject regex category works."""
-        self.do_test(
-            ["--no-match-accepts true",
-             "--filter \"reject category regex cat1\""]
-        )
-
-        # We should only see the second log message as we rejected the first
-        # via category rejection.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    def test_filter_reject_category_partial_match(self):
-        """Test that fall-through accept, reject regex category by partial match works."""
-        self.do_test(
-            ["--no-match-accepts true",
-             "--filter \"reject category regex t1\""]
-        )
-
-        # We should only see the second log message as we rejected the first
-        # via category rejection.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    def test_filter_accept_category_second_rule(self):
-        """Test that fall-through reject, accept regex category on second rule works."""
-        self.do_test(
-            ["--no-match-accepts false",
-             "--filter \"accept category regex non-existent\"",
-             "--filter \"accept category regex cat2\""
-             ]
-        )
-
-        # We should only see the second message since we reject by default,
-        # the first filter doesn't match any, and the second filter matches
-        # the category of the second log message.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/category/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/category/main.c
deleted file mode 100644 (file)
index fbe5106..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <os/activity.h>
-#include <os/log.h>
-#include <stdio.h>
-
-#include "../../../common/darwin_log_common.h"
-
-int main(int argc, char** argv)
-{
-    os_log_t logger_sub1 = os_log_create("org.llvm.lldb.test.sub1", "cat1");
-    os_log_t logger_sub2 = os_log_create("org.llvm.lldb.test.sub2", "cat2");
-    if (!logger_sub1 || !logger_sub2)
-        return 1;
-
-    // Note we cannot use the os_log() line as the breakpoint because, as of
-    // the initial writing of this test, we get multiple breakpoints for that
-    // line, which confuses the pexpect test logic.
-    printf("About to log\n"); // break here
-    os_activity_t parent_activity = os_activity_create("parent-activity",
-        OS_ACTIVITY_CURRENT, OS_ACTIVITY_FLAG_DEFAULT);
-    os_activity_apply(parent_activity, ^{
-        os_log(logger_sub1, "source-log-sub1-cat1");
-        os_activity_t child_activity = os_activity_create("child-activity",
-            OS_ACTIVITY_CURRENT, OS_ACTIVITY_FLAG_DEFAULT);
-        os_activity_apply(child_activity, ^{
-            os_log(logger_sub2, "source-log-sub2-cat2");
-            });
-        });
-
-    // Sleep, as the darwin log reporting doesn't always happen until a bit
-    // later.  We need the message to come out before the process terminates.
-    sleep(FINAL_WAIT_SECONDS);
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/message/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/message/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/message/TestDarwinLogFilterRegexMessage.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/message/TestDarwinLogFilterRegexMessage.py
deleted file mode 100644 (file)
index 2cbdb4e..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-"""
-Test basic DarwinLog functionality provided by the StructuredDataDarwinLog
-plugin.
-
-These tests are currently only supported when running against Darwin
-targets.
-"""
-
-# System imports
-
-
-# LLDB imports
-import lldb
-
-from lldbsuite.test import decorators
-from lldbsuite.test import lldbtest
-from lldbsuite.test import darwin_log
-
-
-class TestDarwinLogFilterRegexMessage(darwin_log.DarwinLogEventBasedTestBase):
-
-    mydir = lldbtest.TestBase.compute_mydir(__file__)
-
-    @decorators.skipUnlessDarwin
-    @decorators.expectedFailureAll(oslist=["macosx"],
-                                   bugnumber="llvm.org/pr30299")
-    def test_filter_accept_message_full_match(self):
-        """Test that fall-through reject, accept regex whole message works."""
-        log_entries = self.do_test(
-            ["--no-match-accepts false",
-             # Note below, the four '\' characters are to get us two
-             # backslashes over on the gdb-remote side, which then
-             # becomes one as the cstr interprets it as an escape
-             # sequence.  This needs to be rationalized.  Initially I
-             # supported std::regex ECMAScript, which has the
-             # [[:digit:]] character classes and such.  That was much
-             # more tenable.  The backslashes have to travel through
-             # so many layers of escaping.  (And note if you take
-             # off the Python raw string marker here, you need to put
-             # in 8 backslashes to go to two on the remote side.)
-             r'--filter "accept message regex log message sub2-cat\\\\d+"'])
-
-        # We should have received at least one log entry.
-        self.assertIsNotNone(log_entries,
-                             "Log entry list should not be None.")
-        self.assertEqual(len(log_entries), 1,
-                         "Should receive one log entry.")
-        self.assertRegexpMatches(log_entries[0]["message"], r"sub2-cat2",
-                                 "First os_log call should have been skipped.")
-
-    @decorators.skipUnlessDarwin
-    @decorators.expectedFailureAll(oslist=["macosx"],
-                                   bugnumber="llvm.org/pr30299")
-    def test_filter_accept_message_partial_match(self):
-        """Test that fall-through reject, accept regex message via partial
-        match works."""
-        log_entries = self.do_test(
-            ["--no-match-accepts false",
-             "--filter \"accept message regex [^-]+2\""])
-
-        # We should only see the second log message as we only accept
-        # that message contents.
-        self.assertIsNotNone(log_entries,
-                             "Log entry list should not be None.")
-        self.assertEqual(len(log_entries), 1,
-                         "Should receive one log entry.")
-        self.assertRegexpMatches(log_entries[0]["message"], r"sub2-cat2",
-                                 "First os_log call should have been skipped.")
-
-    @decorators.skipUnlessDarwin
-    @decorators.expectedFailureAll(oslist=["macosx"],
-                                   bugnumber="llvm.org/pr30299")
-    def test_filter_reject_message_full_match(self):
-        """Test that fall-through accept, reject regex message works."""
-        log_entries = self.do_test(
-            ["--no-match-accepts true",
-             "--filter \"reject message regex log message sub1-cat1\""])
-
-        # We should only see the second log message as we rejected the first
-        # via message contents rejection.
-        self.assertIsNotNone(log_entries,
-                             "Log entry list should not be None.")
-        self.assertEqual(len(log_entries), 1,
-                         "Should receive one log entry.")
-        self.assertRegexpMatches(log_entries[0]["message"], r"sub2-cat2",
-                                 "First os_log call should have been skipped.")
-
-    @decorators.skipUnlessDarwin
-    @decorators.expectedFailureAll(oslist=["macosx"],
-                                   bugnumber="llvm.org/pr30299")
-    def test_filter_reject_message_partial_match(self):
-        """Test that fall-through accept, reject regex message by partial
-        match works."""
-        log_entries = self.do_test(
-            ["--no-match-accepts true",
-             "--filter \"reject message regex t1\""])
-
-        # We should only see the second log message as we rejected the first
-        # via partial message contents rejection.
-        self.assertIsNotNone(log_entries,
-                             "Log entry list should not be None.")
-        self.assertEqual(len(log_entries), 1,
-                         "Should receive one log entry.")
-        self.assertRegexpMatches(log_entries[0]["message"], r"sub2-cat2",
-                                 "First os_log call should have been skipped.")
-
-    @decorators.skipUnlessDarwin
-    @decorators.expectedFailureAll(oslist=["macosx"],
-                                   bugnumber="llvm.org/pr30299")
-    def test_filter_accept_message_second_rule(self):
-        """Test that fall-through reject, accept regex message on second rule
-         works."""
-        log_entries = self.do_test(
-            ["--no-match-accepts false",
-             "--filter \"accept message regex non-existent\"",
-             "--filter \"accept message regex cat2\""])
-
-        # We should only see the second message since we reject by default,
-        # the first filter doesn't match any, and the second filter matches
-        # the message of the second log message.
-        self.assertIsNotNone(log_entries,
-                             "Log entry list should not be None.")
-        self.assertEqual(len(log_entries), 1,
-                         "Should receive one log entry.")
-        self.assertRegexpMatches(log_entries[0]["message"], r"sub2-cat2",
-                                 "First os_log call should have been skipped.")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/message/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/message/main.c
deleted file mode 100644 (file)
index b0b4301..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <os/activity.h>
-#include <os/log.h>
-#include <stdio.h>
-
-#include "../../../common/darwin_log_common.h"
-
-int main(int argc, char** argv)
-{
-    os_log_t logger_sub1 = os_log_create("org.llvm.lldb.test.sub1", "cat1");
-    os_log_t logger_sub2 = os_log_create("org.llvm.lldb.test.sub2", "cat2");
-    if (!logger_sub1 || !logger_sub2)
-        return 1;
-
-    // Note we cannot use the os_log() line as the breakpoint because, as of
-    // the initial writing of this test, we get multiple breakpoints for that
-    // line, which confuses the pexpect test logic.
-    printf("About to log\n"); // break here
-    os_log(logger_sub1, "log message sub%d-cat%d", 1, 1);
-    os_log(logger_sub2, "log message sub%d-cat%d", 2, 2);
-
-    // Sleep, as the darwin log reporting doesn't always happen until a bit
-    // later.  We need the message to come out before the process terminates.
-    sleep(FINAL_WAIT_SECONDS);
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/subsystem/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/subsystem/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/subsystem/TestDarwinLogFilterRegexSubsystem.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/subsystem/TestDarwinLogFilterRegexSubsystem.py
deleted file mode 100644 (file)
index c5c4e98..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-"""
-Test basic DarwinLog functionality provided by the StructuredDataDarwinLog
-plugin.
-
-These tests are currently only supported when running against Darwin
-targets.
-"""
-
-
-import lldb
-
-from lldbsuite.test import decorators
-from lldbsuite.test import lldbtest
-from lldbsuite.test import darwin_log
-
-
-class TestDarwinLogFilterRegexSubsystem(darwin_log.DarwinLogTestBase):
-
-    mydir = lldbtest.TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        super(TestDarwinLogFilterRegexSubsystem, self).setUp()
-
-        # Source filename.
-        self.source = 'main.c'
-
-        # Output filename.
-        self.exe_name = self.getBuildArtifact("a.out")
-        self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
-
-        # Locate breakpoint.
-        self.line = lldbtest.line_number(self.source, '// break here')
-
-    def tearDown(self):
-        # Shut down the process if it's still running.
-        if self.child:
-            self.runCmd('process kill')
-            self.expect_prompt()
-            self.runCmd('quit')
-
-        # Let parent clean up
-        super(TestDarwinLogFilterRegexSubsystem, self).tearDown()
-
-    # ==========================================================================
-    # basic filter tests
-    # ==========================================================================
-
-    @decorators.skipUnlessDarwin
-    def test_fallthrough_reject(self):
-        """Test that a single fall-through reject regex rule rejects all logging."""
-        self.do_test(
-            ["--no-match-accepts false"]
-        )
-
-        # We should not match any log lines.
-        self.assertIsNotNone(self.child.match)
-        self.assertFalse((len(self.child.match.groups()) > 0) and
-                         (self.child.match.group(1) in ["sub1", "sub2"]),
-                         "log line should not have been received")
-
-    # ==========================================================================
-    # subsystem filter tests
-    # ==========================================================================
-
-    @decorators.skipUnlessDarwin
-    def test_filter_accept_subsystem_full_match(self):
-        """Test that fall-through reject, accept regex single subsystem works."""
-        self.do_test(
-            ["--no-match-accepts false",
-             "--filter \"accept subsystem regex org.llvm.lldb.test.sub2\""]
-        )
-
-        # We should only see the second log message as we only accept
-        # that subsystem.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 0) and (
-                self.child.match.group(1) == "sub2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    def test_filter_accept_subsystem_partial_match(self):
-        """Test that fall-through reject, accept regex subsystem via partial-match works."""
-        self.do_test(
-            ["--no-match-accepts false",
-             "--filter \"accept subsystem regex org.llvm.+.sub2\""]
-        )
-
-        # We should only see the second log message as we only accept
-        # that subsystem.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 0) and (
-                self.child.match.group(1) == "sub2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    def test_filter_reject_subsystem_full_match(self):
-        """Test that fall-through accept, reject regex subsystem works."""
-        self.do_test(
-            ["--no-match-accepts true",
-             "--filter \"reject subsystem regex org.llvm.lldb.test.sub1\""]
-        )
-
-        # We should only see the second log message as we rejected the first
-        # via subsystem rejection.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 0) and (
-                self.child.match.group(1) == "sub2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    def test_filter_reject_subsystem_partial_match(self):
-        """Test that fall-through accept, reject regex subsystem by partial match works."""
-        self.do_test(
-            ["--no-match-accepts true",
-             "--filter \"reject subsystem regex org.*sub1\""]
-        )
-
-        # We should only see the second log message as we rejected the first
-        # via subsystem rejection.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 0) and (
-                self.child.match.group(1) == "sub2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    def test_filter_accept_subsystem_second_rule(self):
-        """Test that fall-through reject, accept regex subsystem on second rule works."""
-        self.do_test(
-            ["--no-match-accepts false",
-             "--filter \"accept subsystem regex non-existent\"",
-             "--filter \"accept subsystem regex org.llvm.lldb.test.sub2\""
-             ]
-        )
-
-        # We should only see the second message since we reject by default,
-        # the first filter doesn't match any, and the second filter matches
-        # the subsystem of the second log message.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 0) and (
-                self.child.match.group(1) == "sub2"),
-            "first log line should not be present, second log line "
-            "should be")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/subsystem/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/subsystem/main.c
deleted file mode 100644 (file)
index fbe5106..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <os/activity.h>
-#include <os/log.h>
-#include <stdio.h>
-
-#include "../../../common/darwin_log_common.h"
-
-int main(int argc, char** argv)
-{
-    os_log_t logger_sub1 = os_log_create("org.llvm.lldb.test.sub1", "cat1");
-    os_log_t logger_sub2 = os_log_create("org.llvm.lldb.test.sub2", "cat2");
-    if (!logger_sub1 || !logger_sub2)
-        return 1;
-
-    // Note we cannot use the os_log() line as the breakpoint because, as of
-    // the initial writing of this test, we get multiple breakpoints for that
-    // line, which confuses the pexpect test logic.
-    printf("About to log\n"); // break here
-    os_activity_t parent_activity = os_activity_create("parent-activity",
-        OS_ACTIVITY_CURRENT, OS_ACTIVITY_FLAG_DEFAULT);
-    os_activity_apply(parent_activity, ^{
-        os_log(logger_sub1, "source-log-sub1-cat1");
-        os_activity_t child_activity = os_activity_create("child-activity",
-            OS_ACTIVITY_CURRENT, OS_ACTIVITY_FLAG_DEFAULT);
-        os_activity_apply(child_activity, ^{
-            os_log(logger_sub2, "source-log-sub2-cat2");
-            });
-        });
-
-    // Sleep, as the darwin log reporting doesn't always happen until a bit
-    // later.  We need the message to come out before the process terminates.
-    sleep(FINAL_WAIT_SECONDS);
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/format/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/format/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/format/TestDarwinLogMessageFormat.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/format/TestDarwinLogMessageFormat.py
deleted file mode 100644 (file)
index 687340e..0000000
+++ /dev/null
@@ -1,187 +0,0 @@
-"""
-Test DarwinLog log message formatting options provided by the
-StructuredDataDarwinLog plugin.
-
-These tests are currently only supported when running against Darwin
-targets.
-"""
-
-
-import lldb
-import re
-
-from lldbsuite.test import decorators
-from lldbsuite.test import lldbtest
-from lldbsuite.test import darwin_log
-
-
-class TestDarwinLogMessageFormat(darwin_log.DarwinLogTestBase):
-
-    mydir = lldbtest.TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        super(TestDarwinLogMessageFormat, self).setUp()
-
-        # Source filename.
-        self.source = 'main.c'
-
-        # Output filename.
-        self.exe_name = self.getBuildArtifact("a.out")
-        self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
-
-        # Locate breakpoint.
-        self.line = lldbtest.line_number(self.source, '// break here')
-
-    def tearDown(self):
-        # Shut down the process if it's still running.
-        if self.child:
-            self.runCmd('process kill')
-            self.expect_prompt()
-            self.runCmd('quit')
-
-        # Let parent clean up
-        super(TestDarwinLogMessageFormat, self).tearDown()
-
-    # ==========================================================================
-    # Test settings around log message formatting
-    # ==========================================================================
-
-    REGEXES = [
-        re.compile(r"\[([^]]+)\] This is the log message."),  # Match log
-                                                              # with header.
-        re.compile(r"This is the log message."),  # Match no-header content.
-        re.compile(r"exited with status")         # Fallback if no log emitted.
-    ]
-
-    @decorators.skipUnlessDarwin
-    def test_display_without_header_works(self):
-        """Test that turning off log message headers works as advertised."""
-        self.do_test([], expect_regexes=self.REGEXES)
-
-        # We should not match the first pattern as we shouldn't have header
-        # content.
-        self.assertIsNotNone(self.child.match)
-        self.assertFalse((len(self.child.match.groups()) > 0) and
-                         (self.child.match.group(1) != ""),
-                         "we should not have seen a header")
-
-    @decorators.skipUnlessDarwin
-    def test_display_with_header_works(self):
-        """Test that displaying any header works."""
-        self.do_test(
-            ["--timestamp-relative", "--subsystem", "--category",
-             "--activity-chain"],
-            expect_regexes=self.REGEXES,
-            settings_commands=[
-                "display-header true"
-            ])
-
-        # We should match the first pattern as we should have header
-        # content.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue((len(self.child.match.groups()) > 0) and
-                        (self.child.match.group(1) != ""),
-                        "we should have printed a header")
-
-    def assert_header_contains_timestamp(self, header):
-        fields = header.split(',')
-        self.assertGreater(len(fields), 0,
-                           "there should have been header content present")
-        self.assertRegexpMatches(fields[0],
-                                 r"^\d+:\d{2}:\d{2}.\d{9}$",
-                                 "time field should match expected format")
-
-    @decorators.skipUnlessDarwin
-    def test_header_timefield_only_works(self):
-        """Test that displaying a header with only the timestamp works."""
-        self.do_test(["--timestamp-relative"], expect_regexes=self.REGEXES)
-
-        # We should match the first pattern as we should have header
-        # content.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue((len(self.child.match.groups()) > 0) and
-                        (self.child.match.group(1) != ""),
-                        "we should have printed a header")
-        header = self.child.match.group(1)
-        self.assertEqual(len(header.split(',')), 1,
-                         "there should only be one header field")
-        self.assert_header_contains_timestamp(header)
-
-    @decorators.skipUnlessDarwin
-    def test_header_subsystem_only_works(self):
-        """Test that displaying a header with only the subsystem works."""
-        self.do_test(["--subsystem"], expect_regexes=self.REGEXES)
-
-        # We should match the first pattern as we should have header
-        # content.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue((len(self.child.match.groups()) > 0) and
-                        (self.child.match.group(1) != ""),
-                        "we should have printed a header")
-        header = self.child.match.group(1)
-        self.assertEqual(len(header.split(',')), 1,
-                         "there should only be one header field")
-        self.assertEquals(header,
-                          "subsystem=org.llvm.lldb.test.sub1")
-
-    @decorators.skipUnlessDarwin
-    def test_header_category_only_works(self):
-        """Test that displaying a header with only the category works."""
-        self.do_test(["--category"], expect_regexes=self.REGEXES)
-
-        # We should match the first pattern as we should have header
-        # content.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue((len(self.child.match.groups()) > 0) and
-                        (self.child.match.group(1) != ""),
-                        "we should have printed a header")
-        header = self.child.match.group(1)
-        self.assertEqual(len(header.split(',')), 1,
-                         "there should only be one header field")
-        self.assertEquals(header,
-                          "category=cat1")
-
-    @decorators.skipUnlessDarwin
-    def test_header_activity_chain_only_works(self):
-        """Test that displaying a header with only the activity chain works."""
-        self.do_test(["--activity-chain"], expect_regexes=self.REGEXES)
-
-        # We should match the first pattern as we should have header
-        # content.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue((len(self.child.match.groups()) > 0) and
-                        (self.child.match.group(1) != ""),
-                        "we should have printed a header")
-        header = self.child.match.group(1)
-        self.assertEqual(len(header.split(',')), 1,
-                         "there should only be one header field")
-        self.assertEquals(header,
-                          "activity-chain=parent-activity:child-activity")
-
-    # @decorators.skipUnlessDarwin
-    # def test_header_activity_no_chain_only_works(self):
-    #     """Test that displaying a header with only the activity works."""
-    #     self.do_test(
-    #         [],
-    #         expect_regexes=self.REGEXES,
-    #         settings_commands=[
-    #             "display-header true",
-    #             "format-include-timestamp false",
-    #             "format-include-activity true",
-    #             "format-include-category false",
-    #             "format-include-subsystem false",
-    #             "display-activity-chain false"
-    #         ])
-
-    #     # We should match the first pattern as we should have header
-    #     # content.
-    #     self.assertIsNotNone(self.child.match)
-    #     self.assertTrue((len(self.child.match.groups()) > 0) and
-    #                     (self.child.match.group(1) != ""),
-    #                     "we should have printed a header")
-    #     header = self.child.match.group(1)
-    #     self.assertEqual(len(header.split(',')), 1,
-    #                      "there should only be one header field")
-    #     self.assertEquals(header,
-    #                       "activity=child-activity")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/format/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/format/main.c
deleted file mode 100644 (file)
index 889a4e9..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <os/activity.h>
-#include <os/log.h>
-#include <stdio.h>
-
-#include "../common/darwin_log_common.h"
-
-int main(int argc, char** argv)
-{
-    os_log_t logger_sub1 = os_log_create("org.llvm.lldb.test.sub1", "cat1");
-    if (!logger_sub1)
-        return 1;
-
-    // Note we cannot use the os_log() line as the breakpoint because, as of
-    // the initial writing of this test, we get multiple breakpoints for that
-    // line, which confuses the pexpect test logic.
-    printf("About to log\n"); // break here
-    os_activity_t parent_activity = os_activity_create("parent-activity",
-                                                       OS_ACTIVITY_CURRENT, OS_ACTIVITY_FLAG_DEFAULT);
-    os_activity_apply(parent_activity, ^{
-        os_activity_t child_activity = os_activity_create("child-activity",
-                                                          OS_ACTIVITY_CURRENT, OS_ACTIVITY_FLAG_DEFAULT);
-        os_activity_apply(child_activity, ^{
-            os_log(logger_sub1, "This is the log message.");
-        });
-    });
-
-    // Sleep, as the darwin log reporting doesn't always happen until a bit
-    // later.  We need the message to come out before the process terminates.
-    sleep(FINAL_WAIT_SECONDS);
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/debug/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/debug/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/debug/TestDarwinLogSourceDebug.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/debug/TestDarwinLogSourceDebug.py
deleted file mode 100644 (file)
index 57a0276..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-"""
-Test DarwinLog "source include debug-level" functionality provided by the
-StructuredDataDarwinLog plugin.
-
-These tests are currently only supported when running against Darwin
-targets.
-"""
-
-
-import lldb
-
-from lldbsuite.test import decorators
-from lldbsuite.test import lldbtest
-from lldbsuite.test import darwin_log
-
-
-class TestDarwinLogSourceDebug(darwin_log.DarwinLogTestBase):
-
-    mydir = lldbtest.TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        super(TestDarwinLogSourceDebug, self).setUp()
-
-        # Source filename.
-        self.source = 'main.c'
-
-        # Output filename.
-        self.exe_name = self.getBuildArtifact("a.out")
-        self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
-
-        # Locate breakpoint.
-        self.line = lldbtest.line_number(self.source, '// break here')
-
-        # Indicate we want strict-sources behavior.
-        self.strict_sources = True
-
-    def tearDown(self):
-        # Shut down the process if it's still running.
-        if self.child:
-            self.runCmd('process kill')
-            self.expect_prompt()
-            self.runCmd('quit')
-
-        # Let parent clean up
-        super(TestDarwinLogSourceDebug, self).tearDown()
-
-    # ==========================================================================
-    # source include/exclude debug filter tests
-    # ==========================================================================
-
-    @decorators.skipUnlessDarwin
-    def test_source_default_exclude_debug(self):
-        """Test that default excluding of debug-level log messages works."""
-        self.do_test([])
-
-        # We should only see the second log message as the first is a
-        # debug-level message and we're not including debug-level messages.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    def test_source_explicitly_include_debug(self):
-        """Test that explicitly including debug-level log messages works."""
-        self.do_test(["--debug"])
-
-        # We should only see the second log message as the first is a
-        # debug-level message and we're not including debug-level messages.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue((len(self.child.match.groups()) > 1) and
-                        (self.child.match.group(2) == "cat1"),
-                        "first log line should be present since we're "
-                        "including debug-level log messages")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/debug/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/debug/main.c
deleted file mode 100644 (file)
index b3af8cb..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <os/log.h>
-#include <stdio.h>
-
-#include "../../common/darwin_log_common.h"
-
-int main(int argc, char** argv)
-{
-    os_log_t logger_sub1 = os_log_create("org.llvm.lldb.test.sub1", "cat1");
-    os_log_t logger_sub2 = os_log_create("org.llvm.lldb.test.sub2", "cat2");
-    if (!logger_sub1 || !logger_sub2)
-        return 1;
-
-    // Note we cannot use the os_log() line as the breakpoint because, as of
-    // the initial writing of this test, we get multiple breakpoints for that
-    // line, which confuses the pexpect test logic.
-    printf("About to log\n"); // break here
-    os_log_debug(logger_sub1, "source-log-sub1-cat1");
-    os_log(logger_sub2, "source-log-sub2-cat2");
-
-    // Sleep, as the darwin log reporting doesn't always happen until a bit
-    // later.  We need the message to come out before the process terminates.
-    sleep(FINAL_WAIT_SECONDS);
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/info/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/info/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/info/TestDarwinLogSourceInfo.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/info/TestDarwinLogSourceInfo.py
deleted file mode 100644 (file)
index 5a3eafa..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-"""
-Test DarwinLog "source include info-level" functionality provided by the
-StructuredDataDarwinLog plugin.
-
-These tests are currently only supported when running against Darwin
-targets.
-"""
-
-
-import lldb
-
-from lldbsuite.test import decorators
-from lldbsuite.test import lldbtest
-from lldbsuite.test import darwin_log
-
-
-class TestDarwinLogSourceInfo(darwin_log.DarwinLogTestBase):
-
-    mydir = lldbtest.TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        super(TestDarwinLogSourceInfo, self).setUp()
-
-        # Source filename.
-        self.source = 'main.c'
-
-        # Output filename.
-        self.exe_name = self.getBuildArtifact("a.out")
-        self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
-
-        # Locate breakpoint.
-        self.line = lldbtest.line_number(self.source, '// break here')
-
-        # Indicate we want strict-sources behavior.
-        self.strict_sources = True
-
-    def tearDown(self):
-        # Shut down the process if it's still running.
-        if self.child:
-            self.runCmd('process kill')
-            self.expect_prompt()
-            self.runCmd('quit')
-
-        # Let parent clean up
-        super(TestDarwinLogSourceInfo, self).tearDown()
-
-    # ==========================================================================
-    # source include/exclude debug filter tests
-    # ==========================================================================
-
-    @decorators.skipUnlessDarwin
-    @decorators.expectedFailureAll(bugnumber="rdar://27316264")
-    def test_source_exclude_info_level(self):
-        """Test that default excluding of info-level log messages works."""
-        self.do_test([])
-
-        # We should only see the second log message as the first is an
-        # info-level message and we're not including debug-level messages.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue(
-            (len(
-                self.child.match.groups()) > 1) and (
-                self.child.match.group(2) == "cat2"),
-            "first log line should not be present, second log line "
-            "should be")
-
-    @decorators.skipUnlessDarwin
-    def test_source_include_info_level(self):
-        """Test that explicitly including info-level log messages works."""
-        self.do_test(
-            ["--info"]
-        )
-
-        # We should only see the second log message as the first is a
-        # debug-level message and we're not including debug-level messages.
-        self.assertIsNotNone(self.child.match)
-        self.assertTrue((len(self.child.match.groups()) > 1) and
-                        (self.child.match.group(2) == "cat1"),
-                        "first log line should be present since we're "
-                        "including info-level log messages")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/info/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/info/main.c
deleted file mode 100644 (file)
index 3472a9b..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <os/log.h>
-#include <stdio.h>
-
-#include "../../common/darwin_log_common.h"
-
-int main(int argc, char** argv)
-{
-    os_log_t logger_sub1 = os_log_create("org.llvm.lldb.test.sub1", "cat1");
-    os_log_t logger_sub2 = os_log_create("org.llvm.lldb.test.sub2", "cat2");
-    if (!logger_sub1 || !logger_sub2)
-        return 1;
-
-    // Note we cannot use the os_log() line as the breakpoint because, as of
-    // the initial writing of this test, we get multiple breakpoints for that
-    // line, which confuses the pexpect test logic.
-    printf("About to log\n"); // break here
-    os_log_info(logger_sub1, "source-log-sub1-cat1");
-    os_log(logger_sub2, "source-log-sub2-cat2");
-
-    // Sleep, as the darwin log reporting doesn't always happen until a bit
-    // later.  We need the message to come out before the process terminates.
-    sleep(FINAL_WAIT_SECONDS);
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/.categories b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/.categories
deleted file mode 100644 (file)
index fe1da02..0000000
+++ /dev/null
@@ -1 +0,0 @@
-dataformatters
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/array_typedef/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/array_typedef/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/array_typedef/TestArrayTypedef.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/array_typedef/TestArrayTypedef.py
deleted file mode 100644 (file)
index 1f2914a..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class ArrayTypedefTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_array_typedef(self):
-        self.build()
-        lldbutil.run_to_source_breakpoint(self, "// break here",
-            lldb.SBFileSpec("main.cpp", False))
-        self.expect("expr str", substrs=['"abcd"'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/array_typedef/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/array_typedef/main.cpp
deleted file mode 100644 (file)
index 5c581b0..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-typedef char MCHAR;
-
-int main() {
-  MCHAR str[5] = "abcd";
-  return 0;  // break here
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/Makefile
deleted file mode 100644 (file)
index 8763401..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-OBJCXX_SOURCES := main.mm
-
-CFLAGS_EXTRAS := -w
-
-
-
-LD_EXTRAS := -framework Foundation
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py
deleted file mode 100644 (file)
index 25ecdef..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class DataFormatterBoolRefPtr(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    def test_boolrefptr_with_run_command(self):
-        """Test the formatters we use for BOOL& and BOOL* in Objective-C."""
-        self.build()
-        self.boolrefptr_data_formatter_commands()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.mm', '// Set break point at this line.')
-
-    def boolrefptr_data_formatter_commands(self):
-        """Test the formatters we use for BOOL& and BOOL* in Objective-C."""
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.mm", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type synth clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        isiOS = (lldbplatformutil.getPlatform() == 'ios' or lldbplatformutil.getPlatform() == 'watchos')
-
-        # Now check that we use the right summary for BOOL&
-        self.expect('frame variable yes_ref',
-                    substrs=['YES'])
-        self.expect('frame variable no_ref',
-                    substrs=['NO'])
-        if not(isiOS):
-            self.expect('frame variable unset_ref', substrs=['12'])
-
-        # Now check that we use the right summary for BOOL*
-        self.expect('frame variable yes_ptr',
-                    substrs=['YES'])
-        self.expect('frame variable no_ptr',
-                    substrs=['NO'])
-        if not(isiOS):
-            self.expect('frame variable unset_ptr', substrs=['12'])
-
-        # Now check that we use the right summary for BOOL
-        self.expect('frame variable yes',
-                    substrs=['YES'])
-        self.expect('frame variable no',
-                    substrs=['NO'])
-        if not(isiOS):
-            self.expect('frame variable unset', substrs=['12'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/main.mm b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/main.mm
deleted file mode 100644 (file)
index e63aa32..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-//===-- main.m ------------------------------------------------*- ObjC -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#import <Foundation/Foundation.h>
-
-int main (int argc, const char * argv[])
-{
-    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-
-       BOOL yes  = YES;
-       BOOL no = NO;
-    BOOL unset = 12;
-       
-       BOOL &yes_ref = yes;
-       BOOL &no_ref = no;
-       BOOL &unset_ref = unset;
-       
-       BOOL* yes_ptr = &yes;
-       BOOL* no_ptr = &no;
-       BOOL* unset_ptr = &unset;
-
-    [pool drain];// Set break point at this line.
-    return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/compactvectors/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/compactvectors/Makefile
deleted file mode 100644 (file)
index a537b99..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CXX_SOURCES := main.cpp
-LD_EXTRAS := -framework Accelerate
-include Makefile.rules
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/compactvectors/TestCompactVectors.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/compactvectors/TestCompactVectors.py
deleted file mode 100644 (file)
index 1734428..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class CompactVectorsFormattingTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    @skipUnlessDarwin
-    def test_with_run_command(self):
-        """Test that that file and class static variables display correctly."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type summary clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.expect(
-            'frame variable',
-            substrs=[
-                '(vFloat) valueFL = (1.25, 0, 0.25, 0)',
-                '(int16_t [8]) valueI16 = (1, 0, 4, 0, 0, 1, 0, 4)',
-                '(int32_t [4]) valueI32 = (1, 0, 4, 0)',
-                '(vDouble) valueDL = (1.25, 2.25)',
-                '(vUInt8) valueU8 = (0x01, 0x00, 0x04, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00)',
-                '(vUInt16) valueU16 = (1, 0, 4, 0, 0, 1, 0, 4)',
-                '(vUInt32) valueU32 = (1, 2, 3, 4)',
-                "(vSInt8) valueS8 = (1, 0, 4, 0, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0)",
-                '(vSInt16) valueS16 = (1, 0, 4, 0, 0, 1, 0, 4)',
-                '(vSInt32) valueS32 = (4, 3, 2, 1)',
-                '(vBool32) valueBool32 = (0, 1, 0, 1)'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/compactvectors/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/compactvectors/main.cpp
deleted file mode 100644 (file)
index f31d2a1..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
- //===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <Accelerate/Accelerate.h>
-
-int main()
-{
-       vFloat valueFL = {1.25,0,0.25,0};
-       vDouble valueDL = {1.25,2.25};
-       int16_t valueI16[8] = {1,0,4,0,0,1,0,4};
-       int32_t valueI32[4] = {1,0,4,0};
-       vUInt8 valueU8 = {1,0,4,0,0,1,0,4};
-       vUInt16 valueU16 = {1,0,4,0,0,1,0,4};
-       vUInt32 valueU32 = {1,2,3,4};
-       vSInt8 valueS8 = {1,0,4,0,0,1,0,4};
-       vSInt16 valueS16 = {1,0,4,0,0,1,0,4};
-       vSInt32 valueS32 = {4,3,2,1};
-       vBool32 valueBool32 = {false,true,false,true};
-       return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-advanced/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-advanced/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py
deleted file mode 100644 (file)
index 246ebb3..0000000
+++ /dev/null
@@ -1,326 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class AdvDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    def test_with_run_command(self):
-        """Test that that file and class static variables display correctly."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd(
-                "settings set target.max-children-count 256",
-                check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.runCmd("type summary add --summary-string \"pippo\" \"i_am_cool\"")
-
-        self.runCmd(
-            "type summary add --summary-string \"pluto\" -x \"i_am_cool[a-z]*\"")
-
-        self.expect("frame variable cool_boy",
-                    substrs=['pippo'])
-
-        self.expect("frame variable cooler_boy",
-                    substrs=['pluto'])
-
-        self.runCmd("type summary delete i_am_cool")
-
-        self.expect("frame variable cool_boy",
-                    substrs=['pluto'])
-
-        self.runCmd("type summary clear")
-
-        self.runCmd(
-            "type summary add --summary-string \"${var[]}\" -x \"int \\[[0-9]\\]")
-
-        self.expect("frame variable int_array",
-                    substrs=['1,2,3,4,5'])
-
-        # this will fail if we don't do [] as regex correctly
-        self.runCmd(
-            'type summary add --summary-string "${var[].integer}" "i_am_cool[]')
-
-        self.expect("frame variable cool_array",
-                    substrs=['1,1,1,1,6'])
-
-        self.runCmd("type summary clear")
-
-        self.runCmd(
-            "type summary add --summary-string \"${var[1-0]%x}\" \"int\"")
-
-        self.expect("frame variable iAmInt",
-                    substrs=['01'])
-
-        self.runCmd(
-            "type summary add --summary-string \"${var[0-1]%x}\" \"int\"")
-
-        self.expect("frame variable iAmInt",
-                    substrs=['01'])
-
-        self.runCmd("type summary clear")
-
-        self.runCmd("type summary add --summary-string \"${var[0-1]%x}\" int")
-        self.runCmd(
-            "type summary add --summary-string \"${var[0-31]%x}\" float")
-
-        self.expect("frame variable *pointer",
-                    substrs=['0x',
-                             '2'])
-
-        # check fix for <rdar://problem/11338654> LLDB crashes when using a
-        # "type summary" that uses bitfields with no format
-        self.runCmd("type summary add --summary-string \"${var[0-1]}\" int")
-        self.expect("frame variable iAmInt",
-                    substrs=['9 1'])
-
-        self.expect("frame variable cool_array[3].floating",
-                    substrs=['0x'])
-
-        self.runCmd(
-            "type summary add --summary-string \"low bits are ${*var[0-1]} tgt is ${*var}\" \"int *\"")
-
-        self.expect("frame variable pointer",
-                    substrs=['low bits are',
-                             'tgt is 6'])
-
-        self.expect(
-            "frame variable int_array --summary-string \"${*var[0-1]}\"",
-            substrs=['3'])
-
-        self.runCmd("type summary clear")
-
-        self.runCmd(
-            'type summary add --summary-string \"${var[0-1]}\" -x \"int \[[0-9]\]\"')
-
-        self.expect("frame variable int_array",
-                    substrs=['1,2'])
-
-        self.runCmd(
-            'type summary add --summary-string \"${var[0-1]}\" "int []"')
-
-        self.expect("frame variable int_array",
-                    substrs=['1,2'])
-
-        # Test the patterns are matched in reverse-chronological order.
-        self.runCmd(
-            'type summary add --summary-string \"${var[2-3]}\" "int []"')
-
-        self.expect("frame variable int_array",
-                    substrs=['3,4'])
-
-        self.runCmd("type summary clear")
-
-        self.runCmd("type summary add -c -x \"i_am_cool \[[0-9]\]\"")
-        self.runCmd("type summary add -c i_am_cool")
-
-        self.expect("frame variable cool_array",
-                    substrs=['[0]',
-                             '[1]',
-                             '[2]',
-                             '[3]',
-                             '[4]',
-                             'integer',
-                             'character',
-                             'floating'])
-
-        self.runCmd(
-            "type summary add --summary-string \"int = ${*var.int_pointer}, float = ${*var.float_pointer}\" IWrapPointers")
-
-        self.expect("frame variable wrapper",
-                    substrs=['int = 4',
-                             'float = 1.1'])
-
-        self.runCmd(
-            "type summary add --summary-string \"low bits = ${*var.int_pointer[2]}\" IWrapPointers -p")
-
-        self.expect("frame variable wrapper",
-                    substrs=['low bits = 1'])
-
-        self.expect("frame variable *wrap_pointer",
-                    substrs=['low bits = 1'])
-
-        self.runCmd("type summary clear")
-
-        self.expect(
-            "frame variable int_array --summary-string \"${var[0][0-2]%hex}\"",
-            substrs=[
-                '0x',
-                '7'])
-
-        self.runCmd("type summary clear")
-
-        self.runCmd(
-            "type summary add --summary-string \"${*var[].x[0-3]%hex} is a bitfield on a set of integers\" -x \"SimpleWithPointers \[[0-9]\]\"")
-
-        self.expect(
-            "frame variable couple --summary-string \"${*var.sp.x[0-2]} are low bits of integer ${*var.sp.x}. If I pretend it is an array I get ${var.sp.x[0-5]}\"",
-            substrs=[
-                '1 are low bits of integer 9.',
-                'If I pretend it is an array I get [9,'])
-
-        # if the summary has an error, we still display the value
-        self.expect(
-            "frame variable couple --summary-string \"${*var.sp.foo[0-2]\"",
-            substrs=[
-                '(Couple) couple = {',
-                'x = 0x',
-                'y = 0x',
-                'z = 0x',
-                's = 0x'])
-
-        self.runCmd(
-            "type summary add --summary-string \"${*var.sp.x[0-2]} are low bits of integer ${*var.sp.x}. If I pretend it is an array I get ${var.sp.x[0-5]}\" Couple")
-
-        self.expect("frame variable sparray",
-                    substrs=['[0x0000000f,0x0000000c,0x00000009]'])
-
-        # check that we can format a variable in a summary even if a format is
-        # defined for its datatype
-        self.runCmd("type format add -f hex int")
-        self.runCmd(
-            "type summary add --summary-string \"x=${var.x%d}\" Simple")
-
-        self.expect("frame variable a_simple_object",
-                    substrs=['x=3'])
-
-        self.expect("frame variable a_simple_object", matching=False,
-                    substrs=['0x0'])
-
-        # now check that the default is applied if we do not hand out a format
-        self.runCmd("type summary add --summary-string \"x=${var.x}\" Simple")
-
-        self.expect("frame variable a_simple_object", matching=False,
-                    substrs=['x=3'])
-
-        self.expect("frame variable a_simple_object", matching=True,
-                    substrs=['x=0x00000003'])
-
-        # check that we can correctly cap the number of children shown
-        self.runCmd("settings set target.max-children-count 5")
-
-        self.expect('frame variable a_long_guy', matching=True,
-                    substrs=['a_1',
-                             'b_1',
-                             'c_1',
-                             'd_1',
-                             'e_1',
-                             '...'])
-
-        # check that no further stuff is printed (not ALL values are checked!)
-        self.expect('frame variable a_long_guy', matching=False,
-                    substrs=['f_1',
-                             'g_1',
-                             'h_1',
-                             'i_1',
-                             'j_1',
-                             'q_1',
-                             'a_2',
-                             'f_2',
-                             't_2',
-                             'w_2'])
-
-        self.runCmd("settings set target.max-children-count 1")
-        self.expect('frame variable a_long_guy', matching=True,
-                    substrs=['a_1',
-                             '...'])
-        self.expect('frame variable a_long_guy', matching=False,
-                    substrs=['b_1',
-                             'c_1',
-                             'd_1',
-                             'e_1'])
-        self.expect('frame variable a_long_guy', matching=False,
-                    substrs=['f_1',
-                             'g_1',
-                             'h_1',
-                             'i_1',
-                             'j_1',
-                             'q_1',
-                             'a_2',
-                             'f_2',
-                             't_2',
-                             'w_2'])
-
-        self.runCmd("settings set target.max-children-count 30")
-        self.expect('frame variable a_long_guy', matching=True,
-                    substrs=['a_1',
-                             'b_1',
-                             'c_1',
-                             'd_1',
-                             'e_1',
-                             'z_1',
-                             'a_2',
-                             'b_2',
-                             'c_2',
-                             'd_2',
-                             '...'])
-        self.expect('frame variable a_long_guy', matching=False,
-                    substrs=['e_2',
-                             'n_2',
-                             'r_2',
-                             'i_2',
-                             'k_2',
-                             'o_2'])
-
-        # override the cap
-        self.expect(
-            'frame variable a_long_guy --show-all-children',
-            matching=True,
-            substrs=[
-                'a_1',
-                'b_1',
-                'c_1',
-                'd_1',
-                'e_1',
-                'z_1',
-                'a_2',
-                'b_2',
-                'c_2',
-                'd_2'])
-        self.expect(
-            'frame variable a_long_guy --show-all-children',
-            matching=True,
-            substrs=[
-                'e_2',
-                'n_2',
-                'r_2',
-                'i_2',
-                'k_2',
-                'o_2'])
-        self.expect(
-            'frame variable a_long_guy --show-all-children',
-            matching=False,
-            substrs=['...'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-advanced/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-advanced/main.cpp
deleted file mode 100644 (file)
index 6eabbb3..0000000
+++ /dev/null
@@ -1,173 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-
-struct i_am_cool
-{
-       int integer;
-       float floating;
-       char character;
-       i_am_cool(int I, float F, char C) :
-    integer(I), floating(F), character(C) {}
-       i_am_cool() : integer(1), floating(2), character('3') {}
-    
-};
-
-struct i_am_cooler
-{
-       i_am_cool first_cool;
-       i_am_cool second_cool;
-       float floating;
-       
-       i_am_cooler(int I1, int I2, float F1, float F2, char C1, char C2) :
-    first_cool(I1,F1,C1),
-    second_cool(I2,F2,C2),
-    floating((F1 + F2)/2) {}
-};
-
-struct IWrapPointers
-{
-    int* int_pointer;
-    float* float_pointer;
-       IWrapPointers() : int_pointer(new int(4)), float_pointer(new float(1.111)) {}
-};
-
-struct Simple
-{
-       int x;
-       float y;
-       char z;
-       Simple(int X, float Y, char Z) :
-       x(X),
-       y(Y),
-       z(Z)
-       {}
-};
-
-struct SimpleWithPointers
-{
-       int *x;
-       float *y;
-       char *z;
-       SimpleWithPointers(int X, float Y, char Z) :
-       x(new int (X)),
-       y(new float (Y)),
-       z(new char[2])
-       {
-          z[0] = Z;
-          z[1] = '\0';
-        }
-};
-
-struct Couple
-{
-       SimpleWithPointers sp;
-       Simple* s;
-       Couple(int X, float Y, char Z) : sp(X,Y,Z),
-       s(new Simple(X,Y,Z)) {}
-};
-
-struct VeryLong
-{
-    int a_1;
-    int b_1;
-    int c_1;
-    int d_1;
-    int e_1;
-    int f_1;
-    int g_1;
-    int h_1;
-    int i_1;
-    int j_1;
-    int k_1;
-    int l_1;
-    int m_1;
-    int n_1;
-    int o_1;
-    int p_1;
-    int q_1;
-    int r_1;
-    int s_1;
-    int t_1;
-    int u_1;
-    int v_1;
-    int w_1;
-    int x_1;
-    int y_1;
-    int z_1;
-    
-    int a_2;
-    int b_2;
-    int c_2;
-    int d_2;
-    int e_2;
-    int f_2;
-    int g_2;
-    int h_2;
-    int i_2;
-    int j_2;
-    int k_2;
-    int l_2;
-    int m_2;
-    int n_2;
-    int o_2;
-    int p_2;
-    int q_2;
-    int r_2;
-    int s_2;
-    int t_2;
-    int u_2;
-    int v_2;
-    int w_2;
-    int x_2;
-    int y_2;
-    int z_2;
-};
-
-int main (int argc, const char * argv[])
-{
-    
-    int iAmInt = 9;
-    
-    i_am_cool cool_boy(1,0.5,3);
-    i_am_cooler cooler_boy(1,2,0.1,0.2,'A','B');
-    
-       i_am_cool *cool_pointer = new i_am_cool(3,-3.141592,'E');
-    
-    i_am_cool cool_array[5];
-    
-    cool_array[3].floating = 5.25;
-    cool_array[4].integer = 6;
-    cool_array[2].character = 'Q';
-    
-    int int_array[] = {1,2,3,4,5};
-    
-    IWrapPointers wrapper;
-        
-    *int_array = -1;
-    
-    int* pointer = &cool_array[4].integer;
-    
-    IWrapPointers *wrap_pointer = &wrapper;
-    
-    Couple couple(9,9.99,'X');
-       
-       SimpleWithPointers sparray[] = 
-        {SimpleWithPointers(-1,-2,'3'),
-        SimpleWithPointers(-4,-5,'6'),
-        SimpleWithPointers(-7,-8,'9')};
-    
-    Simple a_simple_object(3,0.14,'E');
-    
-    VeryLong a_long_guy;
-    
-    return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-caching/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-caching/Makefile
deleted file mode 100644 (file)
index 224ecc3..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := a.c b.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-caching/TestDataFormatterCaching.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-caching/TestDataFormatterCaching.py
deleted file mode 100644 (file)
index 881913b..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class TestDataFormatterCaching(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_with_run_command(self):
-        """
-        Test that hardcoded summary formatter matches aren't improperly cached.
-        """
-        self.build()
-        target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
-            self, 'break here', lldb.SBFileSpec('a.c'))
-        valobj = self.frame().FindVariable('f')
-        self.assertEqual(valobj.GetValue(), '4')
-        bkpt_b = target.BreakpointCreateBySourceRegex('break here',
-                                                      lldb.SBFileSpec('b.c'))
-        lldbutil.continue_to_breakpoint(process, bkpt_b)
-        valobj = self.frame().FindVariable('f4')
-        self.assertEqual(valobj.GetSummary(), '(1, 2, 3, 4)')
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-caching/a.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-caching/a.c
deleted file mode 100644 (file)
index f2dde81..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-typedef float float4;
-
-int a();
-
-int main() {
-  float4 f = 4.0f;
-  // break here
-  return a(); 
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-caching/b.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-caching/b.c
deleted file mode 100644 (file)
index 0d37c54..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-typedef float float4 __attribute__((ext_vector_type(4)));
-void stop() {}
-int a() {
-  float4 f4 = {1, 2, 3, 4};
-  // break here
-  stop();
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-categories/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-categories/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py
deleted file mode 100644 (file)
index 07f7a53..0000000
+++ /dev/null
@@ -1,355 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class CategoriesDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    @expectedFlakeyNetBSD
-    def test_with_run_command(self):
-        """Test that that file and class static variables display correctly."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case (most of these categories do not
-        # exist anymore, but we just make sure we delete all of them)
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type category delete Category1', check=False)
-            self.runCmd('type category delete Category2', check=False)
-            self.runCmd('type category delete NewCategory', check=False)
-            self.runCmd("type category delete CircleCategory", check=False)
-            self.runCmd(
-                "type category delete RectangleStarCategory",
-                check=False)
-            self.runCmd("type category delete BaseCategory", check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        # Add a summary to a new category and check that it works
-        self.runCmd(
-            "type summary add Rectangle --summary-string \"ARectangle\" -w NewCategory")
-
-        self.expect("frame variable r1 r2 r3", matching=False,
-                    substrs=['r1 = ARectangle',
-                             'r2 = ARectangle',
-                             'r3 = ARectangle'])
-
-        self.runCmd("type category enable NewCategory")
-
-        self.expect("frame variable r1 r2 r3", matching=True,
-                    substrs=['r1 = ARectangle',
-                             'r2 = ARectangle',
-                             'r3 = ARectangle'])
-
-        # Disable the category and check that the old stuff is there
-        self.runCmd("type category disable NewCategory")
-
-        self.expect("frame variable r1 r2 r3",
-                    substrs=['r1 = {',
-                             'r2 = {',
-                             'r3 = {'])
-
-        # Re-enable the category and check that it works
-        self.runCmd("type category enable NewCategory")
-
-        self.expect("frame variable r1 r2 r3",
-                    substrs=['r1 = ARectangle',
-                             'r2 = ARectangle',
-                             'r3 = ARectangle'])
-
-        # Delete the category and the old stuff should be there
-        self.runCmd("type category delete NewCategory")
-
-        self.expect("frame variable r1 r2 r3",
-                    substrs=['r1 = {',
-                             'r2 = {',
-                             'r3 = {'])
-
-        # Add summaries to two different categories and check that we can
-        # switch
-        self.runCmd(
-            "type summary add --summary-string \"Width = ${var.w}, Height = ${var.h}\" Rectangle -w Category1")
-        self.runCmd("type summary add --python-script \"return 'Area = ' + str( int(valobj.GetChildMemberWithName('w').GetValue()) * int(valobj.GetChildMemberWithName('h').GetValue()) );\" Rectangle -w Category2")
-
-        # check that enable A B is the same as enable B enable A
-        self.runCmd("type category enable Category1 Category2")
-
-        self.expect("frame variable r1 r2 r3",
-                    substrs=['r1 = Width = ',
-                             'r2 = Width = ',
-                             'r3 = Width = '])
-
-        self.runCmd("type category disable Category1")
-
-        self.expect("frame variable r1 r2 r3",
-                    substrs=['r1 = Area = ',
-                             'r2 = Area = ',
-                             'r3 = Area = '])
-
-        # switch again
-
-        self.runCmd("type category enable Category1")
-
-        self.expect("frame variable r1 r2 r3",
-                    substrs=['r1 = Width = ',
-                             'r2 = Width = ',
-                             'r3 = Width = '])
-
-        # Re-enable the category and show that the preference is persisted
-        self.runCmd("type category disable Category2")
-        self.runCmd("type category enable Category2")
-
-        self.expect("frame variable r1 r2 r3",
-                    substrs=['r1 = Area = ',
-                             'r2 = Area = ',
-                             'r3 = Area = '])
-
-        # Now delete the favorite summary
-        self.runCmd("type summary delete Rectangle -w Category2")
-
-        self.expect("frame variable r1 r2 r3",
-                    substrs=['r1 = Width = ',
-                             'r2 = Width = ',
-                             'r3 = Width = '])
-
-        # Delete the summary from the default category (that does not have it)
-        self.runCmd("type summary delete Rectangle", check=False)
-
-        self.expect("frame variable r1 r2 r3",
-                    substrs=['r1 = Width = ',
-                             'r2 = Width = ',
-                             'r3 = Width = '])
-
-        # Now add another summary to another category and switch back and forth
-        self.runCmd("type category delete Category1 Category2")
-
-        self.runCmd(
-            "type summary add Rectangle -w Category1 --summary-string \"Category1\"")
-        self.runCmd(
-            "type summary add Rectangle -w Category2 --summary-string \"Category2\"")
-
-        self.runCmd("type category enable Category2")
-        self.runCmd("type category enable Category1")
-
-        self.runCmd("type summary list -w Category1")
-        self.expect("type summary list -w NoSuchCategoryHere",
-                    substrs=['no matching results found'])
-
-        self.expect("frame variable r1 r2 r3",
-                    substrs=['r1 = Category1',
-                             'r2 = Category1',
-                             'r3 = Category1'])
-
-        self.runCmd("type category disable Category1")
-
-        self.expect("frame variable r1 r2 r3",
-                    substrs=['r1 = Category2',
-                             'r2 = Category2',
-                             'r3 = Category2'])
-
-        # Check that re-enabling an enabled category works
-        self.runCmd("type category enable Category1")
-
-        self.expect("frame variable r1 r2 r3",
-                    substrs=['r1 = Category1',
-                             'r2 = Category1',
-                             'r3 = Category1'])
-
-        self.runCmd("type category delete Category1")
-        self.runCmd("type category delete Category2")
-
-        self.expect("frame variable r1 r2 r3",
-                    substrs=['r1 = {',
-                             'r2 = {',
-                             'r3 = {'])
-
-        # Check that multiple summaries can go into one category
-        self.runCmd(
-            "type summary add -w Category1 --summary-string \"Width = ${var.w}, Height = ${var.h}\" Rectangle")
-        self.runCmd(
-            "type summary add -w Category1 --summary-string \"Radius = ${var.r}\" Circle")
-
-        self.runCmd("type category enable Category1")
-
-        self.expect("frame variable r1 r2 r3",
-                    substrs=['r1 = Width = ',
-                             'r2 = Width = ',
-                             'r3 = Width = '])
-
-        self.expect("frame variable c1 c2 c3",
-                    substrs=['c1 = Radius = ',
-                             'c2 = Radius = ',
-                             'c3 = Radius = '])
-
-        self.runCmd("type summary delete Circle -w Category1")
-
-        self.expect("frame variable c1 c2 c3",
-                    substrs=['c1 = {',
-                             'c2 = {',
-                             'c3 = {'])
-
-        # Add a regex based summary to a category
-        self.runCmd(
-            "type summary add -w Category1 --summary-string \"Radius = ${var.r}\" -x Circle")
-
-        self.expect("frame variable r1 r2 r3",
-                    substrs=['r1 = Width = ',
-                             'r2 = Width = ',
-                             'r3 = Width = '])
-
-        self.expect("frame variable c1 c2 c3",
-                    substrs=['c1 = Radius = ',
-                             'c2 = Radius = ',
-                             'c3 = Radius = '])
-
-        # Delete it
-        self.runCmd("type summary delete Circle -w Category1")
-
-        self.expect("frame variable c1 c2 c3",
-                    substrs=['c1 = {',
-                             'c2 = {',
-                             'c3 = {'])
-
-        # Change a summary inside a category and check that the change is
-        # reflected
-        self.runCmd(
-            "type summary add Circle -w Category1 --summary-string \"summary1\"")
-
-        self.expect("frame variable c1 c2 c3",
-                    substrs=['c1 = summary1',
-                             'c2 = summary1',
-                             'c3 = summary1'])
-
-        self.runCmd(
-            "type summary add Circle -w Category1 --summary-string \"summary2\"")
-
-        self.expect("frame variable c1 c2 c3",
-                    substrs=['c1 = summary2',
-                             'c2 = summary2',
-                             'c3 = summary2'])
-
-        # Check that our order of priority works. Start by clearing categories
-        self.runCmd("type category delete Category1")
-
-        self.runCmd(
-            "type summary add Shape -w BaseCategory --summary-string \"AShape\"")
-        self.runCmd("type category enable BaseCategory")
-
-        self.expect("print (Shape*)&c1",
-                    substrs=['AShape'])
-        self.expect("print (Shape*)&r1",
-                    substrs=['AShape'])
-        self.expect("print (Shape*)c_ptr",
-                    substrs=['AShape'])
-        self.expect("print (Shape*)r_ptr",
-                    substrs=['AShape'])
-
-        self.runCmd(
-            "type summary add Circle -w CircleCategory --summary-string \"ACircle\"")
-        self.runCmd(
-            "type summary add Rectangle -w RectangleCategory --summary-string \"ARectangle\"")
-        self.runCmd("type category enable CircleCategory")
-
-        self.expect("frame variable c1",
-                    substrs=['ACircle'])
-        self.expect("frame variable c_ptr",
-                    substrs=['ACircle'])
-
-        self.runCmd(
-            "type summary add \"Rectangle *\" -w RectangleStarCategory --summary-string \"ARectangleStar\"")
-        self.runCmd("type category enable RectangleStarCategory")
-
-        self.expect("frame variable c1 r1 c_ptr r_ptr",
-                    substrs=['ACircle',
-                             'ARectangleStar'])
-
-        self.runCmd("type category enable RectangleCategory")
-
-        self.expect("frame variable c1 r1 c_ptr r_ptr",
-                    substrs=['ACircle',
-                             'ACircle',
-                             'ARectangle'])
-
-        # Check that abruptly deleting an enabled category does not crash us
-        self.runCmd("type category delete RectangleCategory")
-
-        self.expect("frame variable c1 r1 c_ptr r_ptr",
-                    substrs=['ACircle',
-                             '(Rectangle) r1 = ', 'w = 5', 'h = 6',
-                             'ACircle',
-                             'ARectangleStar'])
-
-        # check that list commands work
-        self.expect("type category list",
-                    substrs=['RectangleStarCategory (enabled)'])
-
-        self.expect("type summary list",
-                    substrs=['ARectangleStar'])
-
-        # Disable a category and check that it fallsback
-        self.runCmd("type category disable CircleCategory")
-
-        # check that list commands work
-        self.expect("type category list",
-                    substrs=['CircleCategory (disabled'])
-
-        self.expect("frame variable c1 r_ptr",
-                    substrs=['AShape',
-                             'ARectangleStar'])
-
-        # check that filters work into categories
-        self.runCmd(
-            "type filter add Rectangle --child w --category RectangleCategory")
-        self.runCmd("type category enable RectangleCategory")
-        self.runCmd(
-            "type summary add Rectangle --category RectangleCategory --summary-string \" \" -e")
-        self.expect('frame variable r2',
-                    substrs=['w = 9'])
-        self.runCmd("type summary add Rectangle --summary-string \" \" -e")
-        self.expect('frame variable r2', matching=False,
-                    substrs=['h = 16'])
-
-        # Now delete all categories
-        self.runCmd(
-            "type category delete CircleCategory RectangleStarCategory BaseCategory RectangleCategory")
-
-        # check that a deleted category with filter does not blow us up
-        self.expect('frame variable r2',
-                    substrs=['w = 9',
-                             'h = 16'])
-
-        # and also validate that one can print formatters for a language
-        self.expect(
-            'type summary list -l c++',
-            substrs=[
-                'vector',
-                'map',
-                'list',
-                'string'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-categories/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-categories/main.cpp
deleted file mode 100644 (file)
index e0e7c7a..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-
-struct Shape
-{
-       bool dummy;
-       Shape() : dummy(true) {}
-};
-
-struct Rectangle : public Shape {
-    int w;
-    int h;
-    Rectangle(int W = 3, int H = 5) : w(W), h(H) {}
-};
-
-struct Circle : public Shape {
-    int r;
-    Circle(int R = 6) : r(R) {}
-};
-
-int main (int argc, const char * argv[])
-{
-    Rectangle r1(5,6);
-    Rectangle r2(9,16);
-    Rectangle r3(4,4);
-    
-    Circle c1(5);
-    Circle c2(6);
-    Circle c3(7);
-    
-    Circle *c_ptr = new Circle(8);
-    Rectangle *r_ptr = new Rectangle(9,7);
-    
-    return 0; // Set break point at this line.
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-cpp/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-cpp/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
deleted file mode 100644 (file)
index 733c427..0000000
+++ /dev/null
@@ -1,294 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class CppDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    @skipIf(debug_info="gmodules",
-            bugnumber="https://bugs.llvm.org/show_bug.cgi?id=36048")
-    def test_with_run_command(self):
-        """Test that that file and class static variables display correctly."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        self.expect("frame variable",
-                    substrs=['(Speed) SPILookHex = 5.55'  # Speed by default is 5.55.
-                             ])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.runCmd("type format add -C yes -f x Speed BitField")
-        self.runCmd("type format add -C no -f c RealNumber")
-        self.runCmd("type format add -C no -f x Type2")
-        self.runCmd("type format add -C yes -f c Type1")
-
-        # The type format list should show our custom formats.
-        self.expect("type format list",
-                    substrs=['RealNumber',
-                             'Speed',
-                             'BitField',
-                             'Type1',
-                             'Type2'])
-
-        self.expect("frame variable",
-                    patterns=['\(Speed\) SPILookHex = 0x[0-9a-f]+'  # Speed should look hex-ish now.
-                              ])
-
-        # gcc4.2 on Mac OS X skips typedef chains in the DWARF output
-        if self.getCompiler() in ['clang', 'llvm-gcc']:
-            self.expect("frame variable",
-                        patterns=['\(SignalMask\) SMILookHex = 0x[0-9a-f]+'  # SignalMask should look hex-ish now.
-                                  ])
-            self.expect("frame variable", matching=False,
-                        patterns=['\(Type4\) T4ILookChar = 0x[0-9a-f]+'  # Type4 should NOT look hex-ish now.
-                                  ])
-
-        # Now let's delete the 'Speed' custom format.
-        self.runCmd("type format delete Speed")
-
-        # The type format list should not show 'Speed' at this point.
-        self.expect("type format list", matching=False,
-                    substrs=['Speed'])
-
-        # Delete type format for 'Speed', we should expect an error message.
-        self.expect("type format delete Speed", error=True,
-                    substrs=['no custom formatter for Speed'])
-
-        self.runCmd(
-            "type summary add --summary-string \"arr = ${var%s}\" -x \"char \\[[0-9]+\\]\" -v")
-
-        self.expect("frame variable strarr",
-                    substrs=['arr = "Hello world!"'])
-
-        self.runCmd("type summary clear")
-
-        self.runCmd(
-            "type summary add --summary-string \"ptr = ${var%s}\" \"char *\" -v")
-
-        self.expect("frame variable strptr",
-                    substrs=['ptr = "Hello world!"'])
-
-        self.runCmd(
-            "type summary add --summary-string \"arr = ${var%s}\" -x \"char \\[[0-9]+\\]\" -v")
-
-        self.expect("frame variable strarr",
-                    substrs=['arr = "Hello world!'])
-
-        # check that rdar://problem/10011145 (Standard summary format for
-        # char[] doesn't work as the result of "expr".) is solved
-        self.expect("p strarr",
-                    substrs=['arr = "Hello world!'])
-
-        self.expect("frame variable strptr",
-                    substrs=['ptr = "Hello world!"'])
-
-        self.expect("p strptr",
-                    substrs=['ptr = "Hello world!"'])
-
-        self.expect(
-            "p (char*)\"1234567890123456789012345678901234567890123456789012345678901234ABC\"",
-            substrs=[
-                '(char *) $',
-                ' = ptr = ',
-                ' "1234567890123456789012345678901234567890123456789012345678901234ABC"'])
-
-        self.runCmd("type summary add -c Point")
-
-        self.expect("frame variable iAmSomewhere",
-                    substrs=['x = 4',
-                             'y = 6'])
-
-        self.expect("type summary list",
-                    substrs=['Point',
-                             'one-line'])
-
-        self.runCmd("type summary add --summary-string \"y=${var.y%x}\" Point")
-
-        self.expect("frame variable iAmSomewhere",
-                    substrs=['y=0x'])
-
-        self.runCmd(
-            "type summary add --summary-string \"y=${var.y},x=${var.x}\" Point")
-
-        self.expect("frame variable iAmSomewhere",
-                    substrs=['y=6',
-                             'x=4'])
-
-        self.runCmd("type summary add --summary-string \"hello\" Point -e")
-
-        self.expect("type summary list",
-                    substrs=['Point',
-                             'show children'])
-
-        self.expect("frame variable iAmSomewhere",
-                    substrs=['hello',
-                             'x = 4',
-                             '}'])
-
-        self.runCmd(
-            "type summary add --summary-string \"Sign: ${var[31]%B} Exponent: ${var[23-30]%x} Mantissa: ${var[0-22]%u}\" ShowMyGuts")
-
-        self.expect("frame variable cool_pointer->floating",
-                    substrs=['Sign: true',
-                             'Exponent: 0x',
-                             '80'])
-
-        self.runCmd("type summary add --summary-string \"a test\" i_am_cool")
-
-        self.expect("frame variable cool_pointer",
-                    substrs=['a test'])
-
-        self.runCmd(
-            "type summary add --summary-string \"a test\" i_am_cool --skip-pointers")
-
-        self.expect("frame variable cool_pointer",
-                    substrs=['a test'],
-                    matching=False)
-
-        self.runCmd(
-            "type summary add --summary-string \"${var[1-3]}\" \"int [5]\"")
-
-        self.expect("frame variable int_array",
-                    substrs=['2',
-                             '3',
-                             '4'])
-
-        self.runCmd("type summary clear")
-
-        self.runCmd(
-            "type summary add --summary-string \"${var[0-2].integer}\" \"i_am_cool *\"")
-        self.runCmd(
-            "type summary add --summary-string \"${var[2-4].integer}\" \"i_am_cool [5]\"")
-
-        self.expect("frame variable cool_array",
-                    substrs=['1,1,6'])
-
-        self.expect("frame variable cool_pointer",
-                    substrs=['3,0,0'])
-
-        # test special symbols for formatting variables into summaries
-        self.runCmd(
-            "type summary add --summary-string \"cool object @ ${var%L}\" i_am_cool")
-        self.runCmd("type summary delete \"i_am_cool [5]\"")
-
-        # this test might fail if the compiler tries to store
-        # these values into registers.. hopefully this is not
-        # going to be the case
-        self.expect("frame variable cool_array",
-                    substrs=['[0] = cool object @ 0x',
-                             '[1] = cool object @ 0x',
-                             '[2] = cool object @ 0x',
-                             '[3] = cool object @ 0x',
-                             '[4] = cool object @ 0x'])
-
-        # test getting similar output by exploiting ${var} = 'type @ location'
-        # for aggregates
-        self.runCmd("type summary add --summary-string \"${var}\" i_am_cool")
-
-        # this test might fail if the compiler tries to store
-        # these values into registers.. hopefully this is not
-        # going to be the case
-        self.expect("frame variable cool_array",
-                    substrs=['[0] = i_am_cool @ 0x',
-                             '[1] = i_am_cool @ 0x',
-                             '[2] = i_am_cool @ 0x',
-                             '[3] = i_am_cool @ 0x',
-                             '[4] = i_am_cool @ 0x'])
-
-        # test getting same output by exploiting %T and %L together for
-        # aggregates
-        self.runCmd(
-            "type summary add --summary-string \"${var%T} @ ${var%L}\" i_am_cool")
-
-        # this test might fail if the compiler tries to store
-        # these values into registers.. hopefully this is not
-        # going to be the case
-        self.expect("frame variable cool_array",
-                    substrs=['[0] = i_am_cool @ 0x',
-                             '[1] = i_am_cool @ 0x',
-                             '[2] = i_am_cool @ 0x',
-                             '[3] = i_am_cool @ 0x',
-                             '[4] = i_am_cool @ 0x'])
-
-        self.runCmd("type summary add --summary-string \"goofy\" i_am_cool")
-        self.runCmd(
-            "type summary add --summary-string \"${var.second_cool%S}\" i_am_cooler")
-
-        self.expect("frame variable the_coolest_guy",
-                    substrs=['(i_am_cooler) the_coolest_guy = goofy'])
-
-        # check that unwanted type specifiers are removed
-        self.runCmd("type summary delete i_am_cool")
-        self.runCmd(
-            "type summary add --summary-string \"goofy\" \"class i_am_cool\"")
-        self.expect("frame variable the_coolest_guy",
-                    substrs=['(i_am_cooler) the_coolest_guy = goofy'])
-
-        self.runCmd("type summary delete i_am_cool")
-        self.runCmd(
-            "type summary add --summary-string \"goofy\" \"enum i_am_cool\"")
-        self.expect("frame variable the_coolest_guy",
-                    substrs=['(i_am_cooler) the_coolest_guy = goofy'])
-
-        self.runCmd("type summary delete i_am_cool")
-        self.runCmd(
-            "type summary add --summary-string \"goofy\" \"struct i_am_cool\"")
-        self.expect("frame variable the_coolest_guy",
-                    substrs=['(i_am_cooler) the_coolest_guy = goofy'])
-
-        # many spaces, but we still do the right thing
-        self.runCmd("type summary delete i_am_cool")
-        self.runCmd(
-            "type summary add --summary-string \"goofy\" \"union     i_am_cool\"")
-        self.expect("frame variable the_coolest_guy",
-                    substrs=['(i_am_cooler) the_coolest_guy = goofy'])
-
-        # but that not *every* specifier is removed
-        self.runCmd("type summary delete i_am_cool")
-        self.runCmd(
-            "type summary add --summary-string \"goofy\" \"wrong i_am_cool\"")
-        self.expect("frame variable the_coolest_guy", matching=False,
-                    substrs=['(i_am_cooler) the_coolest_guy = goofy'])
-
-        # check that formats are not sticking since that is the behavior we
-        # want
-        self.expect("frame variable iAmInt --format hex",
-                    substrs=['(int) iAmInt = 0x00000001'])
-        self.expect(
-            "frame variable iAmInt",
-            matching=False,
-            substrs=['(int) iAmInt = 0x00000001'])
-        self.expect("frame variable iAmInt", substrs=['(int) iAmInt = 1'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-cpp/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-cpp/main.cpp
deleted file mode 100644 (file)
index c591313..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-
-typedef float RealNumber; // should show as char
-typedef RealNumber Temperature; // should show as float
-typedef RealNumber Speed; // should show as hex
-
-typedef int Counter; // should show as int
-typedef int BitField; // should show as hex
-
-typedef BitField SignalMask; // should show as hex
-typedef BitField Modifiers; // should show as hex
-
-typedef Counter Accumulator; // should show as int
-
-typedef int Type1; // should show as char
-typedef Type1 Type2; // should show as hex
-typedef Type2 Type3; // should show as char
-typedef Type3 Type4; // should show as char
-
-typedef int ChildType; // should show as int
-typedef int AnotherChildType; // should show as int
-
-struct Point {
-    int x;
-    int y;
-    Point(int X = 3, int Y = 2) : x(X), y(Y) {}
-};
-
-typedef float ShowMyGuts;
-
-struct i_am_cool
-{
-       int integer;
-       ShowMyGuts floating;
-       char character;
-       i_am_cool(int I, ShowMyGuts F, char C) :
-    integer(I), floating(F), character(C) {}
-       i_am_cool() : integer(1), floating(2), character('3') {}
-    
-};
-
-struct i_am_cooler
-{
-       i_am_cool first_cool;
-       i_am_cool second_cool;
-       ShowMyGuts floating;
-       
-       i_am_cooler(int I1, int I2, float F1, float F2, char C1, char C2) :
-    first_cool(I1,F1,C1),
-    second_cool(I2,F2,C2),
-    floating((F1 + F2)/2) {}
-};
-
-struct IUseCharStar
-{
-       const char* pointer;
-       IUseCharStar() : pointer("Hello world") {}
-};
-
-int main (int argc, const char * argv[])
-{
-    
-    int iAmInt = 1;
-    const float& IAmFloat = float(2.45);
-
-    RealNumber RNILookChar = 3.14;
-    Temperature TMILookFloat = 4.97;
-    Speed SPILookHex = 5.55;
-    
-    Counter CTILookInt = 6;
-    BitField BFILookHex = 7;
-    SignalMask SMILookHex = 8;
-    Modifiers MFILookHex = 9;
-    
-    Accumulator* ACILookInt = new Accumulator(10);
-    
-    const Type1& T1ILookChar = 11;
-    Type2 T2ILookHex = 12;
-    Type3 T3ILookChar = 13;
-    Type4 T4ILookChar = 14;
-    
-    AnotherChildType AHILookInt = 15;
-    
-    Speed* SPPtrILookHex = new Speed(16);
-    
-    Point iAmSomewhere(4,6);
-    
-       i_am_cool *cool_pointer = (i_am_cool*)malloc(sizeof(i_am_cool)*3);
-       cool_pointer[0] = i_am_cool(3,-3.141592,'E');
-       cool_pointer[1] = i_am_cool(0,-3.141592,'E');
-       cool_pointer[2] = i_am_cool(0,-3.141592,'E');
-    
-    i_am_cool cool_array[5];
-    
-    cool_array[3].floating = 5.25;
-    cool_array[4].integer = 6;
-    cool_array[2].character = 'Q';
-    
-    int int_array[] = {1,2,3,4,5};
-    
-    IUseCharStar iEncapsulateCharStar;
-    
-    char  strarr[32] = "Hello world!";
-    char* strptr     = "Hello world!";
-    
-    i_am_cooler the_coolest_guy(1,2,3.14,6.28,'E','G');
-        
-    return 0; // Set break point at this line.
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-disabling/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-disabling/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-disabling/TestDataFormatterDisabling.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-disabling/TestDataFormatterDisabling.py
deleted file mode 100644 (file)
index 3df6027..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class DataFormatterDisablingTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24462, Data formatters have problems on Windows")
-    def test_with_run_command(self):
-        """Check that we can properly disable all data formatter categories."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type category enable *', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        #self.runCmd('type category enable system VectorTypes libcxx gnu-libstdc++ CoreGraphics CoreServices AppKit CoreFoundation objc default', check=False)
-
-        self.expect('type category list', substrs=['system', 'enabled', ])
-
-        self.expect("frame variable numbers",
-                    substrs=['[0] = 1', '[3] = 1234'])
-
-        self.expect('frame variable string1', substrs=['hello world'])
-
-        # now disable them all and check that nothing is formatted
-        self.runCmd('type category disable *')
-
-        self.expect("frame variable numbers", matching=False,
-                    substrs=['[0] = 1', '[3] = 1234'])
-
-        self.expect(
-            'frame variable string1',
-            matching=False,
-            substrs=['hello world'])
-
-        self.expect('type summary list', substrs=[
-                    'Category: system (disabled)'])
-
-        self.expect('type category list', substrs=['system', 'disabled', ])
-
-        # now enable and check that we are back to normal
-        self.runCmd("type category enable *")
-
-        self.expect('type category list', substrs=['system', 'enabled'])
-
-        self.expect("frame variable numbers",
-                    substrs=['[0] = 1', '[3] = 1234'])
-
-        self.expect('frame variable string1', substrs=['hello world'])
-
-        self.expect('type category list', substrs=['system', 'enabled'])
-
-        # last check - our cleanup will re-enable everything
-        self.runCmd('type category disable *')
-        self.expect('type category list', substrs=['system', 'disabled'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-disabling/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-disabling/main.cpp
deleted file mode 100644 (file)
index 9374642..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#include <vector>
-
-int main()
-{
-
-    const char* string1 = "hello world";
-
-    std::vector<int> numbers;
-    numbers.push_back(1);  
-    numbers.push_back(12);
-    numbers.push_back(123);
-    numbers.push_back(1234);
-    numbers.push_back(12345);
-    numbers.push_back(123456);
-    numbers.push_back(1234567); // Set break point at this line.
-        
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-enum-format/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-enum-format/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-enum-format/TestDataFormatterEnumFormat.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-enum-format/TestDataFormatterEnumFormat.py
deleted file mode 100644 (file)
index ca57442..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class EnumFormatTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    def test_with_run_command(self):
-        """Test that that file and class static variables display correctly."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        self.expect("frame variable",
-                    substrs=['(Foo) f = Case45',
-                             '(int) x = 1',
-                             '(int) y = 45',
-                             '(int) z = 43'
-                             ])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.runCmd("type format add --type Foo int")
-
-        # The type format list should show our custom formats.
-        self.expect("type format list -w default",
-                    substrs=['int: as type Foo'])
-
-        self.expect("frame variable",
-                    substrs=['(Foo) f = Case45',
-                             '(int) x = Case1',
-                             '(int) y = Case45',
-                             '(int) z = 43'
-                             ])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-enum-format/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-enum-format/main.cpp
deleted file mode 100644 (file)
index 6a8074f..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-enum Foo {
-       Case1 = 1,
-       Case2 = 2,
-       Case45 = 45
-};
-
-int main() {
-       Foo f = Case45;
-       int x = 1;
-       int y = 45;
-       int z = 43;
-       return 1; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-globals/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-globals/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py
deleted file mode 100644 (file)
index 72fe2fb..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class GlobalsDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    @skipIf(debug_info="gmodules",
-            bugnumber="https://bugs.llvm.org/show_bug.cgi?id=36048")
-    def test_with_run_command(self):
-        """Test that that file and class static variables display correctly."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.runCmd("type summary add --summary-string \"JustATest\" Point")
-
-        # Simply check we can get at global variables
-        self.expect("target variable g_point",
-                    substrs=['JustATest'])
-
-        self.expect("target variable g_point_pointer",
-                    substrs=['(Point *) g_point_pointer ='])
-
-        # Print some information about the variables
-        # (we ignore the actual values)
-        self.runCmd(
-            "type summary add --summary-string \"(x=${var.x},y=${var.y})\" Point")
-
-        self.expect("target variable g_point",
-                    substrs=['x=',
-                             'y='])
-
-        self.expect("target variable g_point_pointer",
-                    substrs=['(Point *) g_point_pointer ='])
-
-        # Test Python code on resulting SBValue
-        self.runCmd(
-            "type summary add --python-script \"return 'x=' + str(valobj.GetChildMemberWithName('x').GetValue());\" Point")
-
-        self.expect("target variable g_point",
-                    substrs=['x='])
-
-        self.expect("target variable g_point_pointer",
-                    substrs=['(Point *) g_point_pointer ='])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-globals/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-globals/main.cpp
deleted file mode 100644 (file)
index 0f922b3..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-
-struct Point {
-    int x;
-    int y;
-    Point(int X = 3, int Y = 2) : x(X), y(Y) {}
-};
-
-Point g_point(3,4);
-Point* g_point_pointer = new Point(7,5);
-
-int main (int argc, const char * argv[])
-{
-    return 0; // Set break point at this line.
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-named-summaries/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-named-summaries/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-named-summaries/TestDataFormatterNamedSummaries.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-named-summaries/TestDataFormatterNamedSummaries.py
deleted file mode 100644 (file)
index 4e4c196..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class NamedSummariesDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    def test_with_run_command(self):
-        """Test that that file and class static variables display correctly."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.runCmd(
-            "type summary add --summary-string \"AllUseIt: x=${var.x} {y=${var.y}} {z=${var.z}}\" --name AllUseIt")
-        self.runCmd(
-            "type summary add --summary-string \"First: x=${var.x} y=${var.y} dummy=${var.dummy}\" First")
-        self.runCmd(
-            "type summary add --summary-string \"Second: x=${var.x} y=${var.y%hex}\" Second")
-        self.runCmd(
-            "type summary add --summary-string \"Third: x=${var.x} z=${var.z}\" Third")
-
-        self.expect('type summary list', substrs=['AllUseIt'])
-
-        self.expect("frame variable first",
-                    substrs=['First: x=12'])
-
-        self.expect("frame variable first --summary AllUseIt",
-                    substrs=['AllUseIt: x=12'])
-
-        # We *DO NOT* remember the summary choice anymore
-        self.expect("frame variable first", matching=False,
-                    substrs=['AllUseIt: x=12'])
-        self.expect("frame variable first",
-                    substrs=['First: x=12'])
-
-        self.runCmd("thread step-over")  # 2
-
-        self.expect("frame variable first",
-                    substrs=['First: x=12'])
-
-        self.expect("frame variable first --summary AllUseIt",
-                    substrs=['AllUseIt: x=12',
-                             'y=34'])
-
-        self.expect("frame variable second --summary AllUseIt",
-                    substrs=['AllUseIt: x=65',
-                             'y=43.25'])
-
-        self.expect("frame variable third --summary AllUseIt",
-                    substrs=['AllUseIt: x=96',
-                             'z=',
-                             'E'])
-
-        self.runCmd("thread step-over")  # 3
-
-        self.expect("frame variable second",
-                    substrs=['Second: x=65',
-                             'y=0x'])
-
-        # <rdar://problem/11576143> decided that invalid summaries will raise an error
-        # instead of just defaulting to the base summary
-        self.expect(
-            "frame variable second --summary NoSuchSummary",
-            error=True,
-            substrs=['must specify a valid named summary'])
-
-        self.runCmd("thread step-over")
-
-        self.runCmd(
-            "type summary add --summary-string \"FirstAndFriends: x=${var.x} {y=${var.y}} {z=${var.z}}\" First --name FirstAndFriends")
-
-        self.expect("frame variable first",
-                    substrs=['FirstAndFriends: x=12',
-                             'y=34'])
-
-        self.runCmd("type summary delete First")
-
-        self.expect("frame variable first --summary FirstAndFriends",
-                    substrs=['FirstAndFriends: x=12',
-                             'y=34'])
-
-        self.expect("frame variable first", matching=True,
-                    substrs=['x = 12',
-                             'y = 34'])
-
-        self.runCmd("type summary delete FirstAndFriends")
-        self.expect("type summary delete NoSuchSummary", error=True)
-        self.runCmd("type summary delete AllUseIt")
-
-        self.expect("frame variable first", matching=False,
-                    substrs=['FirstAndFriends'])
-
-        self.runCmd("thread step-over")  # 4
-
-        self.expect("frame variable first", matching=False,
-                    substrs=['FirstAndFriends: x=12',
-                             'y=34'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-named-summaries/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-named-summaries/main.cpp
deleted file mode 100644 (file)
index 62ff7b2..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-
-struct First
-{
-    int x;
-    int y;
-    float dummy;
-    First(int X, int Y) :
-    x(X),
-    y(Y),
-    dummy(3.14)
-    {}
-};
-
-struct Second
-{
-    int x;
-    float y;
-    Second(int X, float Y) :
-    x(X),
-    y(Y)
-    {}
-};
-
-struct Third
-{
-    int x;
-    char z;
-    Third(int X, char Z) :
-    x(X),
-    z(Z)
-    {}
-};
-
-int main (int argc, const char * argv[])
-{
-    First first(12,34);
-    Second second(65,43.25);
-    Third *third = new Third(96,'E');
-    
-    first.dummy = 1; // Set break point at this line.
-    first.dummy = 2;
-    first.dummy = 3;
-    first.dummy = 4;
-    first.dummy = 5;
-    
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/.categories b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/.categories
deleted file mode 100644 (file)
index 72cf07c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-objc
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/Makefile
deleted file mode 100644 (file)
index 8b322ff..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-OBJC_SOURCES := main.m
-
-CFLAGS_EXTRAS := -w
-
-
-
-LD_EXTRAS := -framework Foundation
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/ObjCDataFormatterTestCase.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/ObjCDataFormatterTestCase.py
deleted file mode 100644 (file)
index c31af35..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-# encoding: utf-8
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjCDataFormatterTestCase(TestBase):
-
-   mydir = TestBase.compute_mydir(__file__)
-
-   def appkit_tester_impl(self, commands):
-      self.build()
-      self.appkit_common_data_formatters_command()
-      commands()
-
-   def appkit_common_data_formatters_command(self):
-      """Test formatters for AppKit classes."""
-      self.target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
-          self, '// Set break point at this line.',
-          lldb.SBFileSpec('main.m', False))
-
-      # The stop reason of the thread should be breakpoint.
-      self.expect(
-          "thread list",
-          STOPPED_DUE_TO_BREAKPOINT,
-          substrs=['stopped', 'stop reason = breakpoint'])
-
-      # This is the function to remove the custom formats in order to have a
-      # clean slate for the next test case.
-      def cleanup():
-         self.runCmd('type format clear', check=False)
-         self.runCmd('type summary clear', check=False)
-         self.runCmd('type synth clear', check=False)
-
-      # Execute the cleanup function during test case tear down.
-      self.addTearDownHook(cleanup)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCCF.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCCF.py
deleted file mode 100644 (file)
index 8671146..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-# encoding: utf-8
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-from ObjCDataFormatterTestCase import ObjCDataFormatterTestCase
-
-
-class ObjCDataFormatterCF(ObjCDataFormatterTestCase):
-
-    @skipUnlessDarwin
-    def test_coreframeworks_and_run_command(self):
-        """Test formatters for Core OSX frameworks."""
-        self.build()
-        self.target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
-            self, '// Set break point at this line.',
-            lldb.SBFileSpec('main.m', False))
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect(
-            "thread list",
-            STOPPED_DUE_TO_BREAKPOINT,
-            substrs=['stopped', 'stop reason = breakpoint'])
-
-        # check formatters for common Objective-C types
-        expect_strings = [
-            '(CFGregorianUnits) cf_greg_units = 1 years, 3 months, 5 days, 12 hours, 5 minutes 7 seconds',
-            '(CFRange) cf_range = location=4 length=4',
-            '(NSPoint) ns_point = (x = 4, y = 4)',
-            '(NSRange) ns_range = location=4, length=4',
-            '(NSRect) ns_rect = (origin = (x = 1, y = 1), size = (width = 5, height = 5))',
-            '(NSRectArray) ns_rect_arr = ((x = 1, y = 1), (width = 5, height = 5)), ...',
-            '(NSSize) ns_size = (width = 5, height = 7)',
-            '(CGSize) cg_size = (width = 1, height = 6)',
-            '(CGPoint) cg_point = (x = 2, y = 7)',
-            '(CGRect) cg_rect = (origin = (x = 1, y = 2), size = (width = 7, height = 7))',
-            '(Rect) rect = (t=4, l=8, b=4, r=7)',
-            '(Rect *) rect_ptr = (t=4, l=8, b=4, r=7)',
-            '(Point) point = (v=7, h=12)', '(Point *) point_ptr = (v=7, h=12)',
-            '1985', 'foo_selector_impl'
-        ]
-
-        if self.getArchitecture() in ['i386', 'x86_64']:
-            expect_strings.append('(HIPoint) hi_point = (x=7, y=12)')
-            expect_strings.append(
-                '(HIRect) hi_rect = origin=(x = 3, y = 5) size=(width = 4, height = 6)'
-            )
-            expect_strings.append(
-                '(RGBColor) rgb_color = red=3 green=56 blue=35')
-            expect_strings.append(
-                '(RGBColor *) rgb_color_ptr = red=3 green=56 blue=35')
-
-        self.expect("frame variable", substrs=expect_strings)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCExpr.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCExpr.py
deleted file mode 100644 (file)
index d27f0b9..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-# encoding: utf-8
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-from ObjCDataFormatterTestCase import ObjCDataFormatterTestCase
-
-
-class ObjCDataFormatterExpr(ObjCDataFormatterTestCase):
-
-    @skipUnlessDarwin
-    def test_expr_with_run_command(self):
-        """Test common cases of expression parser <--> formatters interaction."""
-        self.build()
-        self.target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
-            self, '// Set break point at this line.',
-            lldb.SBFileSpec('main.m', False))
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect(
-            "thread list",
-            STOPPED_DUE_TO_BREAKPOINT,
-            substrs=['stopped', 'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type synth clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        # check that the formatters are able to deal safely and correctly
-        # with ValueObjects that the expression parser returns
-        self.expect(
-            'expression ((id)@"Hello for long enough to avoid short string types")',
-            matching=False,
-            substrs=['Hello for long enough to avoid short string types'])
-
-        self.expect(
-            'expression -d run -- ((id)@"Hello for long enough to avoid short string types")',
-            substrs=['Hello for long enough to avoid short string types'])
-
-        self.expect('expr -d run -- label1', substrs=['Process Name'])
-
-        self.expect(
-            'expr -d run -- @"Hello for long enough to avoid short string types"',
-            substrs=['Hello for long enough to avoid short string types'])
-
-        self.expect(
-            'expr -d run --object-description -- @"Hello for long enough to avoid short string types"',
-            substrs=['Hello for long enough to avoid short string types'])
-        self.expect(
-            'expr -d run --object-description -- @"Hello"',
-            matching=False,
-            substrs=['@"Hello" Hello'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCKVO.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCKVO.py
deleted file mode 100644 (file)
index fae51ff..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-# encoding: utf-8
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-from ObjCDataFormatterTestCase import ObjCDataFormatterTestCase
-
-
-class ObjCDataFormatterKVO(ObjCDataFormatterTestCase):
-
-    @skipUnlessDarwin
-    def test_kvo_with_run_command(self):
-        """Test the behavior of formatters when KVO is in use."""
-        self.build()
-        self.target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
-            self, '// Set break point at this line.',
-            lldb.SBFileSpec('main.m', False))
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect(
-            "thread list",
-            STOPPED_DUE_TO_BREAKPOINT,
-            substrs=['stopped', 'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type synth clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        # as long as KVO is implemented by subclassing, this test should succeed
-        # we should be able to dynamically figure out that the KVO implementor class
-        # is a subclass of Molecule, and use the appropriate summary for it
-        self.runCmd("type summary add -s JustAMoleculeHere Molecule")
-        self.expect('frame variable molecule', substrs=['JustAMoleculeHere'])
-        self.runCmd("next")
-        self.expect("thread list", substrs=['stopped', 'step over'])
-        self.expect('frame variable molecule', substrs=['JustAMoleculeHere'])
-
-        self.runCmd("next")
-        # check that NSMutableDictionary's formatter is not confused when
-        # dealing with a KVO'd dictionary
-        self.expect(
-            'frame variable newMutableDictionary',
-            substrs=[
-                '(NSDictionary *) newMutableDictionary = ',
-                ' 21 key/value pairs'
-            ])
-
-        lldbutil.run_break_set_by_regexp(self, 'setAtoms')
-
-        self.runCmd("continue")
-        self.expect("frame variable _cmd", substrs=['setAtoms:'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSBundle.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSBundle.py
deleted file mode 100644 (file)
index 40acc19..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-# encoding: utf-8
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-from ObjCDataFormatterTestCase import ObjCDataFormatterTestCase
-
-
-class ObjCDataFormatterNSBundle(ObjCDataFormatterTestCase):
-
-    @skipUnlessDarwin
-    def test_nsbundle_with_run_command(self):
-        """Test formatters for NSBundle."""
-        self.appkit_tester_impl(self.nsbundle_data_formatter_commands)
-
-    def nsbundle_data_formatter_commands(self):
-        self.expect(
-            'frame variable bundle_string bundle_url main_bundle',
-            substrs=[
-                '(NSBundle *) bundle_string = ',
-                ' @"/System/Library/Frameworks/Accelerate.framework"',
-                '(NSBundle *) bundle_url = ',
-                ' @"/System/Library/Frameworks/Foundation.framework"',
-                '(NSBundle *) main_bundle = ', 'data-formatter-objc'
-            ])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSContainer.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSContainer.py
deleted file mode 100644 (file)
index 2bd22ff..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# encoding: utf-8
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-from ObjCDataFormatterTestCase import ObjCDataFormatterTestCase
-
-
-class ObjCDataFormatterNSContainer(ObjCDataFormatterTestCase):
-
-    @skipUnlessDarwin
-    def test_nscontainers_with_run_command(self):
-        """Test formatters for  NS container classes."""
-        self.appkit_tester_impl(self.nscontainers_data_formatter_commands)
-
-    def nscontainers_data_formatter_commands(self):
-        self.expect(
-            'frame variable newArray nsDictionary newDictionary nscfDictionary cfDictionaryRef newMutableDictionary cfarray_ref mutable_array_ref',
-            substrs=[
-                '(NSArray *) newArray = ', '@"50 elements"',
-                '(NSDictionary *) newDictionary = ', ' 12 key/value pairs',
-                '(NSDictionary *) newMutableDictionary = ',
-                ' 21 key/value pairs', '(NSDictionary *) nsDictionary = ',
-                ' 2 key/value pairs', '(CFDictionaryRef) cfDictionaryRef = ',
-                ' 3 key/value pairs', '(CFArrayRef) cfarray_ref = ',
-                '@"3 elements"', '(CFMutableArrayRef) mutable_array_ref = ',
-                '@"11 elements"'
-            ])
-
-        self.expect(
-            'frame variable iset1 iset2 imset',
-            substrs=['4 indexes', '512 indexes', '10 indexes'])
-
-        self.expect(
-            'frame variable binheap_ref',
-            substrs=['(CFBinaryHeapRef) binheap_ref = ', '@"21 items"'])
-
-        self.expect(
-            'expression -d run -- (NSArray*)[NSArray new]',
-            substrs=['@"0 elements"'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSData.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSData.py
deleted file mode 100644 (file)
index 37991dd..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-# encoding: utf-8
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-from ObjCDataFormatterTestCase import ObjCDataFormatterTestCase
-
-
-class ObjCDataFormatterNSData(ObjCDataFormatterTestCase):
-
-    @skipUnlessDarwin
-    def test_nsdata_with_run_command(self):
-        """Test formatters for  NSData."""
-        self.appkit_tester_impl(self.nsdata_data_formatter_commands)
-
-    def nsdata_data_formatter_commands(self):
-        self.expect(
-            'frame variable immutableData mutableData data_ref mutable_data_ref mutable_string_ref concreteData concreteMutableData',
-            substrs=[
-                '(NSData *) immutableData = ', ' 4 bytes',
-                '(NSData *) mutableData = ', ' 14 bytes',
-                '(CFDataRef) data_ref = ', '@"5 bytes"',
-                '(CFMutableDataRef) mutable_data_ref = ', '@"5 bytes"',
-                '(CFMutableStringRef) mutable_string_ref = ',
-                ' @"Wish ya knew"', '(NSData *) concreteData = ',
-                ' 100000 bytes', '(NSMutableData *) concreteMutableData = ',
-                ' 100000 bytes'
-            ])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSDate.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSDate.py
deleted file mode 100644 (file)
index a064dd7..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-# encoding: utf-8
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-from ObjCDataFormatterTestCase import ObjCDataFormatterTestCase
-
-
-class ObjCDataFormatterNSDate(ObjCDataFormatterTestCase):
-
-    @skipUnlessDarwin
-    def test_nsdata_with_run_command(self):
-        """Test formatters for  NSData."""
-        self.appkit_tester_impl(self.nsdata_data_formatter_commands)
-
-    def nsdata_data_formatter_commands(self):
-        self.expect(
-            'frame variable immutableData mutableData data_ref mutable_data_ref mutable_string_ref concreteData concreteMutableData',
-            substrs=[
-                '(NSData *) immutableData = ', ' 4 bytes',
-                '(NSData *) mutableData = ', ' 14 bytes',
-                '(CFDataRef) data_ref = ', '@"5 bytes"',
-                '(CFMutableDataRef) mutable_data_ref = ', '@"5 bytes"',
-                '(CFMutableStringRef) mutable_string_ref = ',
-                ' @"Wish ya knew"', '(NSData *) concreteData = ',
-                ' 100000 bytes', '(NSMutableData *) concreteMutableData = ',
-                ' 100000 bytes'
-            ])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSError.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSError.py
deleted file mode 100644 (file)
index df380ae..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-# encoding: utf-8
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-from ObjCDataFormatterTestCase import ObjCDataFormatterTestCase
-
-
-class ObjCDataFormatterNSError(ObjCDataFormatterTestCase):
-
-    @skipUnlessDarwin
-    def test_nserror_with_run_command(self):
-        """Test formatters for NSError."""
-        self.appkit_tester_impl(self.nserror_data_formatter_commands)
-
-    def nserror_data_formatter_commands(self):
-        self.expect(
-            'frame variable nserror', substrs=['domain: @"Foobar" - code: 12'])
-
-        self.expect(
-            'frame variable nserrorptr',
-            substrs=['domain: @"Foobar" - code: 12'])
-
-        self.expect(
-            'frame variable nserror->_userInfo', substrs=['2 key/value pairs'])
-
-        self.expect(
-            'frame variable nserror->_userInfo --ptr-depth 1 -d run-target',
-            substrs=['@"a"', '@"b"', "1", "2"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSURL.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSURL.py
deleted file mode 100644 (file)
index e84818e..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-# encoding: utf-8
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-from ObjCDataFormatterTestCase import ObjCDataFormatterTestCase
-
-
-class ObjCDataFormatterNSURL(ObjCDataFormatterTestCase):
-
-    @skipUnlessDarwin
-    def test_nsurl_with_run_command(self):
-        """Test formatters for NSURL."""
-        self.appkit_tester_impl(self.nsurl_data_formatter_commands)
-
-    def nsurl_data_formatter_commands(self):
-        self.expect(
-            'frame variable cfurl_ref cfchildurl_ref cfgchildurl_ref',
-            substrs=[
-                '(CFURLRef) cfurl_ref = ', '@"http://www.foo.bar',
-                'cfchildurl_ref = ', '@"page.html -- http://www.foo.bar',
-                '(CFURLRef) cfgchildurl_ref = ',
-                '@"?whatever -- http://www.foo.bar/page.html"'
-            ])
-
-        self.expect(
-            'frame variable nsurl nsurl2 nsurl3',
-            substrs=[
-                '(NSURL *) nsurl = ', '@"http://www.foo.bar',
-                '(NSURL *) nsurl2 =', '@"page.html -- http://www.foo.bar',
-                '(NSURL *) nsurl3 = ',
-                '@"?whatever -- http://www.foo.bar/page.html"'
-            ])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCPlain.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCPlain.py
deleted file mode 100644 (file)
index f438245..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-# encoding: utf-8
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-from ObjCDataFormatterTestCase import ObjCDataFormatterTestCase
-
-
-class ObjCDataFormatterNSPlain(ObjCDataFormatterTestCase):
-
-    @skipUnlessDarwin
-    def test_plain_objc_with_run_command(self):
-        """Test basic ObjC formatting behavior."""
-        self.build()
-        self.target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
-            self, '// Set break point at this line.',
-            lldb.SBFileSpec('main.m', False))
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect(
-            "thread list",
-            STOPPED_DUE_TO_BREAKPOINT,
-            substrs=['stopped', 'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type synth clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.runCmd("type summary add --summary-string \"${var%@}\" MyClass")
-
-        self.expect("frame variable object2", substrs=['MyOtherClass'])
-
-        self.expect("frame variable *object2", substrs=['MyOtherClass'])
-
-        # Now let's delete the 'MyClass' custom summary.
-        self.runCmd("type summary delete MyClass")
-
-        # The type format list should not show 'MyClass' at this point.
-        self.expect("type summary list", matching=False, substrs=['MyClass'])
-
-        self.runCmd("type summary add --summary-string \"a test\" MyClass")
-
-        self.expect(
-            "frame variable *object2",
-            substrs=['*object2 =', 'MyClass = a test', 'backup = '])
-
-        self.expect(
-            "frame variable object2", matching=False, substrs=['a test'])
-
-        self.expect("frame variable object", substrs=['a test'])
-
-        self.expect("frame variable *object", substrs=['a test'])
-
-        self.expect(
-            'frame variable myclass', substrs=['(Class) myclass = NSValue'])
-        self.expect(
-            'frame variable myclass2',
-            substrs=['(Class) myclass2 = ', 'NS', 'String'])
-        self.expect(
-            'frame variable myclass3', substrs=['(Class) myclass3 = Molecule'])
-        self.expect(
-            'frame variable myclass4',
-            substrs=['(Class) myclass4 = NSMutableArray'])
-        self.expect(
-            'frame variable myclass5', substrs=['(Class) myclass5 = nil'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjNSException.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjNSException.py
deleted file mode 100644 (file)
index 6265c05..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-# encoding: utf-8
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-from ObjCDataFormatterTestCase import ObjCDataFormatterTestCase
-
-
-class ObjCDataFormatterNSException(ObjCDataFormatterTestCase):
-
-    @skipUnlessDarwin
-    def test_nsexception_with_run_command(self):
-        """Test formatters for NSException."""
-        self.appkit_tester_impl(self.nsexception_data_formatter_commands)
-
-    def nsexception_data_formatter_commands(self):
-        self.expect(
-            'frame variable except0 except1 except2 except3',
-            substrs=[
-                '(NSException *) except0 = ',
-                '@"First"',
-                '(NSException *) except1 = ',
-                '@"Second"',
-                '(NSException *) except2 = ',
-                ' @"Third"',
-                '(NSException *) except3 = ',
-                ' @"Fourth"'
-            ])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/cmtime/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/cmtime/Makefile
deleted file mode 100644 (file)
index 143997c..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-OBJC_SOURCES := main.m
-
-CFLAGS_EXTRAS := -w
-
-LD_EXTRAS := -framework CoreMedia
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/cmtime/TestDataFormatterCMTime.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/cmtime/TestDataFormatterCMTime.py
deleted file mode 100644 (file)
index 4c3935c..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-# encoding: utf-8
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class CMTimeDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    def test_nsindexpath_with_run_command(self):
-        """Test formatters for CMTime."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"),
-                    CURRENT_EXECUTABLE_SET)
-
-        line = line_number('main.m', '// break here')
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.m", line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.expect(
-            "thread list",
-            STOPPED_DUE_TO_BREAKPOINT,
-            substrs=['stopped', 'stop reason = breakpoint'])
-
-        self.expect(
-            'frame variable t1',
-            substrs=[
-                '1 10th of a second', 'value = 1', 'timescale = 10',
-                'epoch = 0'
-            ])
-        self.expect(
-            'frame variable t2',
-            substrs=['10 seconds', 'value = 10', 'timescale = 1', 'epoch = 0'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/cmtime/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/cmtime/main.m
deleted file mode 100644 (file)
index ecf7648..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-//===-- main.m ------------------------------------------------*- ObjC -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#import <CoreMedia/CoreMedia.h>
-
-int main(int argc, const char **argv)
-{
-    @autoreleasepool
-    {
-        CMTime t1 = CMTimeMake(1, 10);
-        CMTime t2 = CMTimeMake(10, 1);
-
-        CMTimeShow(t1); // break here
-        CMTimeShow(t2);
-    }
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/main.m
deleted file mode 100644 (file)
index f0dc205..0000000
+++ /dev/null
@@ -1,632 +0,0 @@
-//===-- main.m ------------------------------------------------*- ObjC -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#import <Foundation/Foundation.h>
-
-#if defined(__APPLE__)
-#if defined(__arm__) || defined(__arm64__) || defined(__aarch64__)
-#define IOS
-#endif
-#endif
-
-#if defined(IOS)
-#import <Foundation/NSGeometry.h>
-#else
-#import <Carbon/Carbon.h>
-#endif
-
-@interface MyClass : NSObject
-{
-    int i;
-    char c;
-    float f; 
-}
-
-- (id)initWithInt: (int)x andFloat:(float)y andChar:(char)z;
-- (int)doIncrementByInt: (int)x;
-
-@end
-
-@interface MyOtherClass : MyClass
-{
-    int i2;
-    MyClass *backup;
-}
-- (id)initWithInt: (int)x andFloat:(float)y andChar:(char)z andOtherInt:(int)q;
-
-@end
-
-@implementation MyClass
-
-- (id)initWithInt: (int)x andFloat:(float)y andChar:(char)z
-{
-    self = [super init];
-    if (self) {
-        self->i = x;
-        self->f = y;
-        self->c = z;
-    }    
-    return self;
-}
-
-- (int)doIncrementByInt: (int)x
-{
-    self->i += x;
-    return self->i;
-}
-
-@end
-
-@implementation MyOtherClass
-
-- (id)initWithInt: (int)x andFloat:(float)y andChar:(char)z andOtherInt:(int)q
-{
-    self = [super initWithInt:x andFloat:y andChar:z];
-    if (self) {
-        self->i2 = q;
-        self->backup = [[MyClass alloc] initWithInt:x andFloat:y andChar:z];
-    }    
-    return self;
-}
-
-@end
-
-@interface Atom : NSObject {
-    float mass;
-}
--(void)setMass:(float)newMass;
--(float)mass;
-@end
-
-@interface Molecule : NSObject {
-    NSArray *atoms;
-}
--(void)setAtoms:(NSArray *)newAtoms;
--(NSArray *)atoms;
-@end
-
-@implementation  Atom
-
--(void)setMass:(float)newMass
-{
-    mass = newMass;
-}
--(float)mass
-{
-    return mass;
-}
-
-@end
-
-@implementation Molecule
-
--(void)setAtoms:(NSArray *)newAtoms
-{
-    atoms = newAtoms;
-}
--(NSArray *)atoms
-{
-    return atoms;
-}
-@end
-
-@interface My_KVO_Observer : NSObject
--(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change 
-       context:(void *)context;
-- (id) init;
-- (void) dealloc;
-@end
-
-@implementation My_KVO_Observer
--(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change 
-                      context:(void *)context {
-       // we do not really care about KVO'ing - do nothing
-       return;
-}
-- (id) init
-{
-    self = [super init]; 
-    return self;
-}
-
-- (void) dealloc
-{
-    [super dealloc];
-}
-@end
-
-int main (int argc, const char * argv[])
-{
-    
-    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-    
-    MyClass *object = [[MyClass alloc] initWithInt:1 andFloat:3.14 andChar: 'E'];
-    
-    [object doIncrementByInt:3];
-    
-    MyOtherClass *object2 = [[MyOtherClass alloc] initWithInt:2 andFloat:6.28 andChar: 'G' andOtherInt:-1];
-    
-    [object2 doIncrementByInt:3];
-    
-           NSNumber* num1 = [NSNumber numberWithInt:5];
-           NSNumber* num2 = [NSNumber numberWithFloat:3.14];
-           NSNumber* num3 = [NSNumber numberWithDouble:3.14];
-           NSNumber* num4 = [NSNumber numberWithUnsignedLongLong:0xFFFFFFFFFFFFFFFE];
-           NSNumber* num5 = [NSNumber numberWithChar:'A'];
-           NSNumber* num6 = [NSNumber numberWithUnsignedLongLong:0xFF];
-           NSNumber* num7 = [NSNumber numberWithLong:0x1E8480];
-           NSNumber* num8_Y = [NSNumber numberWithBool:YES];
-           NSNumber* num8_N = [NSNumber numberWithBool:NO];
-           NSNumber* num9 = [NSNumber numberWithShort:0x1E8480];
-           NSNumber* num_at1 = @12;
-           NSNumber* num_at2 = @-12;
-           NSNumber* num_at3 = @12.5;
-           NSNumber* num_at4 = @-12.5;
-
-           NSDecimalNumber* decimal_number = [NSDecimalNumber decimalNumberWithMantissa:123456 exponent:-10 isNegative:NO];
-           NSDecimalNumber* decimal_number_neg = [NSDecimalNumber decimalNumberWithMantissa:123456 exponent:10 isNegative:YES];
-           NSDecimalNumber* decimal_one = [NSDecimalNumber one];
-           NSDecimalNumber* decimal_zero = [NSDecimalNumber zero];
-           NSDecimalNumber* decimal_nan = [NSDecimalNumber notANumber];
-
-           NSString *str0 = [num6 stringValue];
-
-           NSString *str1 = [NSString stringWithCString:"A rather short ASCII NSString object is here" encoding:NSASCIIStringEncoding];
-
-           NSString *str2 = [NSString stringWithUTF8String:"A rather short UTF8 NSString object is here"];
-
-           NSString *str3 = @"A string made with the at sign is here";
-
-           NSString *str4 = [NSString stringWithFormat:@"This is string number %ld right here", (long)4];
-
-           NSRect ns_rect_4str = {{1,1},{5,5}};
-
-           NSString* str5 = NSStringFromRect(ns_rect_4str);
-
-           NSString* str6 = [@"/usr/doc/README.1ST" pathExtension];
-
-           const unichar myCharacters[] = {0x03C3,'x','x'};
-           NSString *str7 = [NSString stringWithCharacters: myCharacters
-                                                    length: sizeof myCharacters / sizeof *myCharacters];
-
-           NSString* str8 = [@"/usr/doc/file.hasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTime" pathExtension];
-
-           const unichar myOtherCharacters[] = {'a',' ', 'v','e','r','y',' ',
-               'm','u','c','h',' ','b','o','r','i','n','g',' ','t','a','s','k',
-               ' ','t','o',' ','w','r','i','t','e', ' ', 'a', ' ', 's', 't', 'r', 'i', 'n', 'g', ' ',
-               't','h','i','s',' ','w','a','y','!','!',0x03C3, 0};
-           NSString *str9 = [NSString stringWithCharacters: myOtherCharacters
-                                                    length: sizeof myOtherCharacters / sizeof *myOtherCharacters];
-
-           const unichar myNextCharacters[] = {0x03C3, 0x0000};
-
-           NSString *str10 = [NSString stringWithFormat:@"This is a Unicode string %S number %ld right here", myNextCharacters, (long)4];
-
-           NSString *str11 = NSStringFromClass([str10 class]);
-
-           NSString *label1 = @"Process Name: ";
-           NSString *label2 = @"Process Id: ";
-           NSString *processName = [[NSProcessInfo processInfo] processName];
-           NSString *processID = [NSString stringWithFormat:@"%d", [[NSProcessInfo processInfo] processIdentifier]];
-           NSString *str12 = [NSString stringWithFormat:@"%@ %@ %@ %@", label1, processName, label2, processID];
-
-           NSString *strA1 = [NSString stringWithCString:"A rather short ASCII NSString object is here" encoding:NSASCIIStringEncoding];
-
-           NSString *strA2 = [NSString stringWithUTF8String:"A rather short UTF8 NSString object is here"];
-
-           NSString *strA3 = @"A string made with the at sign is here";
-
-           NSString *strA4 = [NSString stringWithFormat:@"This is string number %ld right here", (long)4];
-
-           NSString* strA5 = NSStringFromRect(ns_rect_4str);
-
-           NSString* strA6 = [@"/usr/doc/README.1ST" pathExtension];
-
-           NSString *strA7 = [NSString stringWithCharacters: myCharacters
-                                                    length: sizeof myCharacters / sizeof *myCharacters];
-
-           NSString* strA8 = [@"/usr/doc/file.hasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTime" pathExtension];
-
-           NSString *strA9 = [NSString stringWithCharacters: myOtherCharacters
-                                                    length: sizeof myOtherCharacters / sizeof *myOtherCharacters];
-
-           NSString *strA10 = [NSString stringWithFormat:@"This is a Unicode string %S number %ld right here", myNextCharacters, (long)4];
-
-           NSString *strA11 = NSStringFromClass([str10 class]);
-
-           NSString *strA12 = [NSString stringWithFormat:@"%@ %@ %@ %@", label1, processName, label2, processID];
-
-           NSString *strB1 = [NSString stringWithCString:"A rather short ASCII NSString object is here" encoding:NSASCIIStringEncoding];
-
-           NSString *strB2 = [NSString stringWithUTF8String:"A rather short UTF8 NSString object is here"];
-
-           NSString *strB3 = @"A string made with the at sign is here";
-
-           NSString *strB4 = [NSString stringWithFormat:@"This is string number %ld right here", (long)4];
-
-           NSString* strB5 = NSStringFromRect(ns_rect_4str);
-
-           NSString* strB6 = [@"/usr/doc/README.1ST" pathExtension];
-
-           NSString *strB7 = [NSString stringWithCharacters: myCharacters
-                                                     length: sizeof myCharacters / sizeof *myCharacters];
-
-           NSString* strB8 = [@"/usr/doc/file.hasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTime" pathExtension];
-
-           NSString *strB9 = [NSString stringWithCharacters: myOtherCharacters
-                                                     length: sizeof myOtherCharacters / sizeof *myOtherCharacters];
-
-           NSString *strB10 = [NSString stringWithFormat:@"This is a Unicode string %S number %ld right here", myNextCharacters, (long)4];
-
-           NSString *strB11 = NSStringFromClass([str10 class]);
-
-           NSString *strB12 = [NSString stringWithFormat:@"%@ %@ %@ %@", label1, processName, label2, processID];
-
-           NSString *strC11 = NSStringFromClass([str10 class]);
-
-           NSString *strC12 = [NSString stringWithFormat:@"%@ %@ %@ %@", label1, processName, label2, processID];
-
-           NSString *strC1 = [NSString stringWithCString:"A rather short ASCII NSString object is here" encoding:NSASCIIStringEncoding];
-
-           NSString *strC2 = [NSString stringWithUTF8String:"A rather short UTF8 NSString object is here"];
-
-           NSString *strC3 = @"A string made with the at sign is here";
-
-           NSString *strC4 = [NSString stringWithFormat:@"This is string number %ld right here", (long)4];
-
-           NSString* strC5 = NSStringFromRect(ns_rect_4str);
-
-           NSString* strC6 = [@"/usr/doc/README.1ST" pathExtension];
-
-           NSString *strC7 = [NSString stringWithCharacters: myCharacters
-                                                     length: sizeof myCharacters / sizeof *myCharacters];
-
-           NSString* strC8 = [@"/usr/doc/file.hasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTime" pathExtension];
-
-           NSString *strC9 = [NSString stringWithCharacters: myOtherCharacters
-                                                     length: sizeof myOtherCharacters / sizeof *myOtherCharacters];
-
-           NSString *strC10 = [NSString stringWithFormat:@"This is a Unicode string %S number %ld right here", myNextCharacters, (long)4];
-
-           NSString *strD11 = NSStringFromClass([str10 class]);
-
-           NSString *strD12 = [NSString stringWithFormat:@"%@ %@ %@ %@", label1, processName, label2, processID];
-
-           NSString *eAcute = [NSString stringWithFormat: @"%C", 0x00E9];
-           NSString *randomHaziChar = [NSString stringWithFormat: @"%C", 0x9DC5];
-           NSString *japanese = @"色は匂へど散りぬるを";
-           NSString *italian = @"L'Italia è una Repubblica democratica, fondata sul lavoro. La sovranità appartiene al popolo, che la esercita nelle forme e nei limiti della Costituzione.";
-           NSString* french = @"Que veut cette horde d'esclaves, De traîtres, de rois conjurés?";
-           NSString* german = @"Über-Ich und aus den Ansprüchen der sozialen Umwelt";
-
-           void* data_set[3] = {str1,str2,str3};
-       
-               NSString *hebrew = [NSString stringWithString:@"לילה טוב"];
-
-           NSArray* newArray = [[NSMutableArray alloc] init];
-           [newArray addObject:str1];
-           [newArray addObject:str2];
-           [newArray addObject:str3];
-           [newArray addObject:str4];
-           [newArray addObject:str5];
-           [newArray addObject:str6];
-           [newArray addObject:str7];
-           [newArray addObject:str8];
-           [newArray addObject:str9];
-           [newArray addObject:str10];
-           [newArray addObject:str11];
-           [newArray addObject:str12];
-           [newArray addObject:strA1];
-           [newArray addObject:strA2];
-           [newArray addObject:strA3];
-           [newArray addObject:strA4];
-           [newArray addObject:strA5];
-           [newArray addObject:strA6];
-           [newArray addObject:strA7];
-           [newArray addObject:strA8];
-           [newArray addObject:strA9];
-           [newArray addObject:strA10];
-           [newArray addObject:strA11];
-           [newArray addObject:strA12];
-           [newArray addObject:strB1];
-           [newArray addObject:strB2];
-           [newArray addObject:strB3];
-           [newArray addObject:strB4];
-           [newArray addObject:strB5];
-           [newArray addObject:strB6];
-           [newArray addObject:strB7];
-           [newArray addObject:strB8];
-           [newArray addObject:strB9];
-           [newArray addObject:strB10];
-           [newArray addObject:strB11];
-           [newArray addObject:strB12];
-           [newArray addObject:strC1];
-           [newArray addObject:strC2];
-           [newArray addObject:strC3];
-           [newArray addObject:strC4];
-           [newArray addObject:strC5];
-           [newArray addObject:strC6];
-           [newArray addObject:strC7];
-           [newArray addObject:strC8];
-           [newArray addObject:strC9];
-           [newArray addObject:strC10];
-           [newArray addObject:strC11];
-           [newArray addObject:strC12];
-           [newArray addObject:strD11];
-           [newArray addObject:strD12];
-
-           NSDictionary* newDictionary = [[NSDictionary alloc] initWithObjects:newArray forKeys:newArray];
-           NSDictionary *newMutableDictionary = [[NSMutableDictionary alloc] init];
-           [newMutableDictionary setObject:@"foo" forKey:@"bar0"];
-           [newMutableDictionary setObject:@"foo" forKey:@"bar1"];
-           [newMutableDictionary setObject:@"foo" forKey:@"bar2"];
-           [newMutableDictionary setObject:@"foo" forKey:@"bar3"];
-           [newMutableDictionary setObject:@"foo" forKey:@"bar4"];
-           [newMutableDictionary setObject:@"foo" forKey:@"bar5"];
-           [newMutableDictionary setObject:@"foo" forKey:@"bar6"];
-           [newMutableDictionary setObject:@"foo" forKey:@"bar7"];
-           [newMutableDictionary setObject:@"foo" forKey:@"bar8"];
-           [newMutableDictionary setObject:@"foo" forKey:@"bar9"];
-           [newMutableDictionary setObject:@"foo" forKey:@"bar10"];
-           [newMutableDictionary setObject:@"foo" forKey:@"bar11"];
-           [newMutableDictionary setObject:@"foo" forKey:@"bar12"];
-           [newMutableDictionary setObject:@"foo" forKey:@"bar13"];
-           [newMutableDictionary setObject:@"foo" forKey:@"bar14"];
-           [newMutableDictionary setObject:@"foo" forKey:@"bar15"];
-           [newMutableDictionary setObject:@"foo" forKey:@"bar16"];
-           [newMutableDictionary setObject:@"foo" forKey:@"bar17"];
-           [newMutableDictionary setObject:@"foo" forKey:@"bar18"];
-           [newMutableDictionary setObject:@"foo" forKey:@"bar19"];
-           [newMutableDictionary setObject:@"foo" forKey:@"bar20"];
-
-           id cfKeys[2] = { @"foo", @"bar", @"baz", @"quux" };
-           id cfValues[2] = { @"foo", @"bar", @"baz", @"quux" };
-           NSDictionary *nsDictionary = CFBridgingRelease(CFDictionaryCreate(nil, (void *)cfKeys, (void *)cfValues, 2, nil, nil));
-           CFDictionaryRef cfDictionaryRef = CFDictionaryCreate(nil, (void *)cfKeys, (void *)cfValues, 3, nil, nil);
-
-           NSAttributedString* attrString = [[NSAttributedString alloc] initWithString:@"hello world from foo" attributes:newDictionary];
-           [attrString isEqual:nil];
-           NSAttributedString* mutableAttrString = [[NSMutableAttributedString alloc] initWithString:@"hello world from foo" attributes:newDictionary];
-           [mutableAttrString isEqual:nil];
-
-           NSString* mutableString = [[NSMutableString alloc] initWithString:@"foo"];
-           [mutableString insertString:@"foo said this string needs to be very long so much longer than whatever other string has been seen ever before by anyone of the mankind that of course this is still not long enough given what foo our friend foo our lovely dearly friend foo desired of us so i am adding more stuff here for the sake of it and for the joy of our friend who is named guess what just foo. hence, dear friend foo, stay safe, your string is now  long enough to accommodate your testing need and I will make sure that if not we extend it with even more fuzzy random meaningless words pasted one after the other from a long tiresome friday evening spent working in my office. my office mate went home but I am still randomly typing just for the fun of seeing what happens of the length of a Mutable String in Cocoa if it goes beyond one byte.. so be it, dear " atIndex:0];
-
-           NSString* mutableGetConst = [NSString stringWithCString:[mutableString cString]];
-
-           [mutableGetConst length];
-
-           NSData *immutableData = [[NSData alloc] initWithBytes:"HELLO" length:4];
-           NSData *mutableData = [[NSMutableData alloc] initWithBytes:"NODATA" length:6];
-
-           // No-copy versions of NSData initializers use NSConcreteData if over 2^16 elements are specified.
-           unsigned concreteLength = 100000;
-           void *zeroes1 = calloc(1, concreteLength);
-            // initWithBytesNoCopy takes ownership of the buffer.
-           NSData *concreteData = [[NSData alloc] initWithBytesNoCopy:zeroes1 length:concreteLength];
-           void *zeroes2 = calloc(1, concreteLength);
-           NSMutableData *concreteMutableData = [[NSMutableData alloc] initWithBytesNoCopy:zeroes2 length:concreteLength];
-
-           [mutableData appendBytes:"MOREDATA" length:8];
-
-           [immutableData length];
-           [mutableData length];
-
-           NSSet* nsset = [[NSSet alloc] initWithObjects:str1,str2,str3,nil];
-           NSSet *nsmutableset = [[NSMutableSet alloc] initWithObjects:str1,str2,str3,nil];
-           [nsmutableset addObject:str4];
-
-           CFDataRef data_ref = CFDataCreate(kCFAllocatorDefault, [immutableData bytes], 5);
-
-           CFMutableDataRef mutable_data_ref = CFDataCreateMutable(kCFAllocatorDefault, 8);
-           CFDataAppendBytes(mutable_data_ref, [mutableData bytes], 5);
-
-           CFMutableStringRef mutable_string_ref = CFStringCreateMutable(NULL,100);
-           CFStringAppend(mutable_string_ref, CFSTR("Wish ya knew"));
-
-           CFStringRef cfstring_ref = CFSTR("HELLO WORLD");
-
-           CFArrayRef cfarray_ref = CFArrayCreate(NULL, data_set, 3, NULL);
-           CFMutableArrayRef mutable_array_ref = CFArrayCreateMutable(NULL, 16, NULL);
-
-           CFArraySetValueAtIndex(mutable_array_ref, 0, str1);
-           CFArraySetValueAtIndex(mutable_array_ref, 1, str2);
-           CFArraySetValueAtIndex(mutable_array_ref, 2, str3);
-           CFArraySetValueAtIndex(mutable_array_ref, 3, str4);
-           CFArraySetValueAtIndex(mutable_array_ref, 0, str5); // replacing value at 0!!
-           CFArraySetValueAtIndex(mutable_array_ref, 4, str6);
-           CFArraySetValueAtIndex(mutable_array_ref, 5, str7);
-           CFArraySetValueAtIndex(mutable_array_ref, 6, str8);
-           CFArraySetValueAtIndex(mutable_array_ref, 7, str9);
-           CFArraySetValueAtIndex(mutable_array_ref, 8, str10);
-           CFArraySetValueAtIndex(mutable_array_ref, 9, str11);
-           CFArraySetValueAtIndex(mutable_array_ref, 10, str12);
-
-           CFBinaryHeapRef binheap_ref = CFBinaryHeapCreate(NULL, 15, &kCFStringBinaryHeapCallBacks, NULL);
-           CFBinaryHeapAddValue(binheap_ref, str1);
-           CFBinaryHeapAddValue(binheap_ref, str2);
-           CFBinaryHeapAddValue(binheap_ref, str3);
-           CFBinaryHeapAddValue(binheap_ref, str4);
-           CFBinaryHeapAddValue(binheap_ref, str5);
-           CFBinaryHeapAddValue(binheap_ref, str6);
-           CFBinaryHeapAddValue(binheap_ref, str7);
-           CFBinaryHeapAddValue(binheap_ref, str8);
-           CFBinaryHeapAddValue(binheap_ref, str9);
-           CFBinaryHeapAddValue(binheap_ref, str10);
-           CFBinaryHeapAddValue(binheap_ref, str11);
-           CFBinaryHeapAddValue(binheap_ref, str12);
-           CFBinaryHeapAddValue(binheap_ref, strA1);
-           CFBinaryHeapAddValue(binheap_ref, strB1);
-           CFBinaryHeapAddValue(binheap_ref, strC1);
-           CFBinaryHeapAddValue(binheap_ref, strA11);
-           CFBinaryHeapAddValue(binheap_ref, strB11);
-           CFBinaryHeapAddValue(binheap_ref, strC11);
-           CFBinaryHeapAddValue(binheap_ref, strB12);
-           CFBinaryHeapAddValue(binheap_ref, strC12);
-           CFBinaryHeapAddValue(binheap_ref, strA12);
-
-           CFURLRef cfurl_ref = CFURLCreateWithString(NULL, CFSTR("http://www.foo.bar/"), NULL);
-           CFURLRef cfchildurl_ref = CFURLCreateWithString(NULL, CFSTR("page.html"), cfurl_ref);
-           CFURLRef cfgchildurl_ref = CFURLCreateWithString(NULL, CFSTR("?whatever"), cfchildurl_ref);
-
-           NSDictionary *error_userInfo = @{@"a": @1, @"b" : @2};
-           NSError *nserror = [[NSError alloc] initWithDomain:@"Foobar" code:12 userInfo:error_userInfo];
-           NSError **nserrorptr = &nserror;
-
-           NSBundle* bundle_string = [[NSBundle alloc] initWithPath:@"/System/Library/Frameworks/Accelerate.framework"];
-           NSBundle* bundle_url = [[NSBundle alloc] initWithURL:[[NSURL alloc] initWithString:@"file://localhost/System/Library/Frameworks/Foundation.framework"]];
-
-           NSBundle* main_bundle = [NSBundle mainBundle];
-
-           NSArray* bundles = [NSBundle allBundles];
-
-           NSURL *nsurl0;
-
-           for (NSBundle* bundle in bundles)
-           {
-               nsurl0 = [bundle bundleURL];
-           }
-
-           NSException* except0 = [[NSException alloc] initWithName:@"TheGuyWhoHasNoName" reason:@"First" userInfo:nil];
-           NSException* except1 = [[NSException alloc] initWithName:@"TheGuyWhoHasNoName~1" reason:@"Second" userInfo:nil];
-           NSException* except2 = [[NSException alloc] initWithName:@"TheGuyWhoHasNoName`2" reason:@"Third" userInfo:nil];
-           NSException* except3 = [[NSException alloc] initWithName:@"TheGuyWhoHasNoName/3" reason:@"Fourth" userInfo:nil];
-
-           NSURL *nsurl = [[NSURL alloc] initWithString:@"http://www.foo.bar"];
-           NSURL *nsurl2 = [NSURL URLWithString:@"page.html" relativeToURL:nsurl];
-           NSURL *nsurl3 = [NSURL URLWithString:@"?whatever" relativeToURL:nsurl2];
-    
-               NSDate *date1 = [NSDate dateWithNaturalLanguageString:@"6pm April 10, 1985"];
-               NSDate *date2 = [NSDate dateWithNaturalLanguageString:@"12am January 1, 2011"];
-               NSDate *date3 = [NSDate date];
-               NSDate *date4 = [NSDate dateWithTimeIntervalSince1970:24*60*60];
-    NSDate *date5 = [NSDate dateWithTimeIntervalSinceReferenceDate: floor([[NSDate date] timeIntervalSinceReferenceDate])];
-
-               CFAbsoluteTime date1_abs = CFDateGetAbsoluteTime(date1);
-               CFAbsoluteTime date2_abs = CFDateGetAbsoluteTime(date2);
-               CFAbsoluteTime date3_abs = CFDateGetAbsoluteTime(date3);
-               CFAbsoluteTime date4_abs = CFDateGetAbsoluteTime(date4);
-               CFAbsoluteTime date5_abs = CFDateGetAbsoluteTime(date5);
-
-           NSIndexSet *iset1 = [[NSIndexSet alloc] initWithIndexesInRange:NSMakeRange(1, 4)];
-           NSIndexSet *iset2 = [[NSIndexSet alloc] initWithIndexesInRange:NSMakeRange(1, 512)];
-
-           NSMutableIndexSet *imset = [[NSMutableIndexSet alloc] init];
-           [imset addIndex:1936];
-           [imset addIndex:7];
-           [imset addIndex:9];
-           [imset addIndex:11];
-           [imset addIndex:24];
-           [imset addIndex:41];
-           [imset addIndex:58];
-           [imset addIndex:61];
-           [imset addIndex:62];
-           [imset addIndex:63];
-
-           CFTimeZoneRef cupertino = CFTimeZoneCreateWithName (
-                                                   NULL,
-                                                   CFSTR("PST"),
-                                                   YES);
-           CFTimeZoneRef home = CFTimeZoneCreateWithName (
-                                                   NULL,
-                                                   CFSTR("Europe/Rome"),
-                                                   YES);
-           CFTimeZoneRef europe = CFTimeZoneCreateWithName (
-                                                   NULL,
-                                                   CFSTR("CET"),
-                                                   YES);
-
-               NSTimeZone *cupertino_ns = [NSTimeZone timeZoneWithAbbreviation:@"PST"];
-               NSTimeZone *home_ns = [NSTimeZone timeZoneWithName:@"Europe/Rome"];
-               NSTimeZone *europe_ns = [NSTimeZone timeZoneWithAbbreviation:@"CET"];
-
-       CFGregorianUnits cf_greg_units = {1,3,5,12,5,7};
-       CFGregorianDate cf_greg_date = CFAbsoluteTimeGetGregorianDate(CFDateGetAbsoluteTime(date1), NULL);
-       CFRange cf_range = {4,4};
-       NSPoint ns_point = {4,4};
-       NSRange ns_range = {4,4};
-               
-       NSRect ns_rect = {{1,1},{5,5}};
-       NSRect* ns_rect_ptr = &ns_rect;
-       NSRectArray ns_rect_arr = &ns_rect;
-       NSSize ns_size = {5,7};
-       NSSize* ns_size_ptr = &ns_size;
-       
-       CGSize cg_size = {1,6};
-       CGPoint cg_point = {2,7};
-       CGRect cg_rect = {{1,2}, {7,7}};
-       
-#ifndef IOS
-       RGBColor rgb_color = {3,56,35};
-       RGBColor* rgb_color_ptr = &rgb_color;
-#endif
-       
-       Rect rect = {4,8,4,7};
-       Rect* rect_ptr = &rect;
-       
-       Point point = {7,12};
-       Point* point_ptr = &point;
-       
-#ifndef IOS
-       HIPoint hi_point = {7,12};
-       HIRect hi_rect = {{3,5},{4,6}};
-#endif
-       
-       SEL foo_selector = @selector(foo_selector_impl);
-       
-       CFMutableBitVectorRef mut_bv = CFBitVectorCreateMutable(NULL, 64);
-       CFBitVectorSetCount(mut_bv, 50);
-    CFBitVectorSetBitAtIndex(mut_bv, 0, 1);
-    CFBitVectorSetBitAtIndex(mut_bv, 1, 1);
-    CFBitVectorSetBitAtIndex(mut_bv, 2, 1);
-    CFBitVectorSetBitAtIndex(mut_bv, 5, 1);
-    CFBitVectorSetBitAtIndex(mut_bv, 6, 1);
-    CFBitVectorSetBitAtIndex(mut_bv, 8, 1);
-    CFBitVectorSetBitAtIndex(mut_bv, 10, 1);
-    CFBitVectorSetBitAtIndex(mut_bv, 11, 1);
-    CFBitVectorSetBitAtIndex(mut_bv, 16, 1);
-    CFBitVectorSetBitAtIndex(mut_bv, 17, 1);
-    CFBitVectorSetBitAtIndex(mut_bv, 19, 1);
-    CFBitVectorSetBitAtIndex(mut_bv, 20, 1);
-    CFBitVectorSetBitAtIndex(mut_bv, 22, 1);
-    CFBitVectorSetBitAtIndex(mut_bv, 24, 1);
-    CFBitVectorSetBitAtIndex(mut_bv, 28, 1);
-    CFBitVectorSetBitAtIndex(mut_bv, 29, 1);
-    CFBitVectorSetBitAtIndex(mut_bv, 30, 1);
-    CFBitVectorSetBitAtIndex(mut_bv, 30, 1);
-    CFBitVectorSetBitAtIndex(mut_bv, 31, 1);
-    CFBitVectorSetBitAtIndex(mut_bv, 34, 1);
-    CFBitVectorSetBitAtIndex(mut_bv, 35, 1);
-    CFBitVectorSetBitAtIndex(mut_bv, 37, 1);
-    CFBitVectorSetBitAtIndex(mut_bv, 39, 1);
-    CFBitVectorSetBitAtIndex(mut_bv, 40, 1);
-    CFBitVectorSetBitAtIndex(mut_bv, 41, 1);
-    CFBitVectorSetBitAtIndex(mut_bv, 43, 1);
-    CFBitVectorSetBitAtIndex(mut_bv, 47, 1);
-
-       Molecule *molecule = [Molecule new];
-
-       Class myclass = NSClassFromString(@"NSValue");
-       Class myclass2 = [str0 class];
-       Class myclass3 = [molecule class];
-       Class myclass4 = NSClassFromString(@"NSMutableArray");
-       Class myclass5 = [nil class];
-
-       NSArray *components = @[@"usr", @"blah", @"stuff"];
-       NSString *path = [NSString pathWithComponents: components];
-
-    [molecule addObserver:[My_KVO_Observer new] forKeyPath:@"atoms" options:0 context:NULL];     // Set break point at this line.
-    [newMutableDictionary addObserver:[My_KVO_Observer new] forKeyPath:@"weirdKeyToKVO" options:NSKeyValueObservingOptionNew context:NULL];
-
-    [molecule setAtoms:nil];
-    [molecule setAtoms:[NSMutableArray new]];
-
-    [pool drain];
-    return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/Makefile
deleted file mode 100644 (file)
index 8b322ff..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-OBJC_SOURCES := main.m
-
-CFLAGS_EXTRAS := -w
-
-
-
-LD_EXTRAS := -framework Foundation
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/TestDataFormatterNSIndexPath.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/TestDataFormatterNSIndexPath.py
deleted file mode 100644 (file)
index 12461ab..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-# encoding: utf-8
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class NSIndexPathDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def appkit_tester_impl(self, commands):
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type synth clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-        commands()
-
-    @skipUnlessDarwin
-    @expectedFailureAll(archs=['i386'], bugnumber="rdar://28656605")
-    @expectedFailureAll(archs=['armv7', 'armv7k', 'arm64_32'], bugnumber="rdar://problem/34561607") # NSIndexPath formatter isn't working for 32-bit arm
-    def test_nsindexpath_with_run_command(self):
-        """Test formatters for NSIndexPath."""
-        self.appkit_tester_impl(self.nsindexpath_data_formatter_commands)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.m', '// break here')
-
-    def nsindexpath_data_formatter_commands(self):
-        # check 'frame variable'
-        self.expect(
-            'frame variable --ptr-depth=1 -d run -- indexPath1',
-            substrs=['[0] = 1'])
-        self.expect(
-            'frame variable --ptr-depth=1 -d run -- indexPath2',
-            substrs=[
-                '[0] = 1',
-                '[1] = 2'])
-        self.expect(
-            'frame variable --ptr-depth=1 -d run -- indexPath3',
-            substrs=[
-                '[0] = 1',
-                '[1] = 2',
-                '[2] = 3'])
-        self.expect(
-            'frame variable --ptr-depth=1 -d run -- indexPath4',
-            substrs=[
-                '[0] = 1',
-                '[1] = 2',
-                '[2] = 3',
-                '[3] = 4'])
-        self.expect(
-            'frame variable --ptr-depth=1 -d run -- indexPath5',
-            substrs=[
-                '[0] = 1',
-                '[1] = 2',
-                '[2] = 3',
-                '[3] = 4',
-                '[4] = 5'])
-
-        # and 'expression'
-        self.expect(
-            'expression --ptr-depth=1 -d run -- indexPath1',
-            substrs=['[0] = 1'])
-        self.expect(
-            'expression --ptr-depth=1 -d run -- indexPath2',
-            substrs=[
-                '[0] = 1',
-                '[1] = 2'])
-        self.expect(
-            'expression --ptr-depth=1 -d run -- indexPath3',
-            substrs=[
-                '[0] = 1',
-                '[1] = 2',
-                '[2] = 3'])
-        self.expect('expression --ptr-depth=1 -d run -- indexPath4',
-                    substrs=['[0] = 1', '[1] = 2', '[2] = 3', '[3] = 4'])
-        self.expect(
-            'expression --ptr-depth=1 -d run -- indexPath5',
-            substrs=[
-                '[0] = 1',
-                '[1] = 2',
-                '[2] = 3',
-                '[3] = 4',
-                '[4] = 5'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/main.m
deleted file mode 100644 (file)
index e34cf52..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-//===-- main.m ------------------------------------------------*- ObjC -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#import <Foundation/Foundation.h>
-
-int main(int argc, const char **argv)
-{
-    @autoreleasepool
-    {
-        const NSUInteger values[] = { 1, 2, 3, 4, 5 };
-        
-        NSIndexPath* indexPath1 = [NSIndexPath indexPathWithIndexes:values length:1];
-        NSIndexPath* indexPath2 = [NSIndexPath indexPathWithIndexes:values length:2];
-        NSIndexPath* indexPath3 = [NSIndexPath indexPathWithIndexes:values length:3];
-        NSIndexPath* indexPath4 = [NSIndexPath indexPathWithIndexes:values length:4];
-        NSIndexPath* indexPath5 = [NSIndexPath indexPathWithIndexes:values length:5];
-        
-        NSLog(@"%@", indexPath1); // break here
-        NSLog(@"%@", indexPath2);
-        NSLog(@"%@", indexPath3);
-        NSLog(@"%@", indexPath4);
-        NSLog(@"%@", indexPath5);
-    }
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsstring/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsstring/Makefile
deleted file mode 100644 (file)
index 8b322ff..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-OBJC_SOURCES := main.m
-
-CFLAGS_EXTRAS := -w
-
-
-
-LD_EXTRAS := -framework Foundation
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsstring/TestDataFormatterNSString.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsstring/TestDataFormatterNSString.py
deleted file mode 100644 (file)
index 6480025..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-# encoding: utf-8
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class NSStringDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def appkit_tester_impl(self, commands):
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type synth clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-        commands()
-
-    @skipUnlessDarwin
-    @no_debug_info_test
-    def test_nsstring_with_run_command(self):
-        """Test formatters for NSString."""
-        self.appkit_tester_impl(self.nsstring_data_formatter_commands)
-
-    @skipUnlessDarwin
-    @no_debug_info_test
-    def test_rdar11106605_with_run_command(self):
-        """Check that Unicode characters come out of CFString summary correctly."""
-        self.appkit_tester_impl(self.rdar11106605_commands)
-
-    @skipUnlessDarwin
-    @no_debug_info_test
-    def test_nsstring_withNULS_with_run_command(self):
-        """Test formatters for NSString."""
-        self.appkit_tester_impl(self.nsstring_withNULs_commands)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.m', '// break here')
-
-    def rdar11106605_commands(self):
-        """Check that Unicode characters come out of CFString summary correctly."""
-        self.expect('frame variable italian', substrs=[
-                    'L\'Italia è una Repubblica democratica, fondata sul lavoro. La sovranità appartiene al popolo, che la esercita nelle forme e nei limiti della Costituzione.'])
-        self.expect('frame variable french', substrs=[
-                    'Que veut cette horde d\'esclaves, De traîtres, de rois conjurés?'])
-        self.expect('frame variable german', substrs=[
-                    'Über-Ich und aus den Ansprüchen der sozialen Umwelt'])
-        self.expect('frame variable japanese', substrs=['色は匂へど散りぬるを'])
-        self.expect('frame variable hebrew', substrs=['לילה טוב'])
-
-    def nsstring_data_formatter_commands(self):
-        self.expect('frame variable str0 str1 str2 str3 str4 str5 str6 str8 str9 str10 str11 label1 label2 processName str12',
-                    substrs=['(NSString *) str1 = ', ' @"A rather short ASCII NSString object is here"',
-                             # '(NSString *) str0 = ',' @"255"',
-                             '(NSString *) str1 = ', ' @"A rather short ASCII NSString object is here"',
-                             '(NSString *) str2 = ', ' @"A rather short UTF8 NSString object is here"',
-                             '(NSString *) str3 = ', ' @"A string made with the at sign is here"',
-                             '(NSString *) str4 = ', ' @"This is string number 4 right here"',
-                             '(NSString *) str5 = ', ' @"{{1, 1}, {5, 5}}"',
-                             '(NSString *) str6 = ', ' @"1ST"',
-                             '(NSString *) str8 = ', ' @"hasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTime',
-                             '(NSString *) str9 = ', ' @"a very much boring task to write a string this way!!',
-                             '(NSString *) str10 = ', ' @"This is a Unicode string σ number 4 right here"',
-                             '(NSString *) str11 = ', ' @"__NSCFString"',
-                             '(NSString *) label1 = ', ' @"Process Name: "',
-                             '(NSString *) label2 = ', ' @"Process Id: "',
-                             '(NSString *) str12 = ', ' @"Process Name:  a.out Process Id:'])
-        self.expect(
-            'frame variable attrString mutableAttrString mutableGetConst',
-            substrs=[
-                '(NSAttributedString *) attrString = ',
-                ' @"hello world from foo"',
-                '(NSAttributedString *) mutableAttrString = ',
-                ' @"hello world from foo"',
-                '(NSString *) mutableGetConst = ',
-                ' @"foo said this string needs to be very long so much longer than whatever other string has been seen ever before by anyone of the mankind that of course this is still not long enough given what foo our friend foo our lovely dearly friend foo desired of us so i am adding more stuff here for the sake of it and for the joy of our friend who is named guess what just foo. hence, dear friend foo, stay safe, your string is now  long enough to accommodate your testing need and I will make sure that if not we extend it with even more fuzzy random meaningless words pasted one after the other from a long tiresome friday evening spent working in my office. my office mate went home but I am still randomly typing just for the fun of seeing what happens of the length of a Mutable String in Cocoa if it goes beyond one byte.. so be it, dear foo"'])
-
-        self.expect('expr -d run-target -- path', substrs=['usr/blah/stuff'])
-        self.expect('frame variable path', substrs=['usr/blah/stuff'])
-
-    def nsstring_withNULs_commands(self):
-        """Check that the NSString formatter supports embedded NULs in the text"""
-        self.expect(
-            'po strwithNULs',
-            substrs=['a very much boring task to write'])
-        self.expect('expr [strwithNULs length]', substrs=['54'])
-        self.expect('frame variable strwithNULs', substrs=[
-                    '@"a very much boring task to write\\0a string this way!!'])
-        self.expect('po strwithNULs2', substrs=[
-                    'a very much boring task to write'])
-        self.expect('expr [strwithNULs2 length]', substrs=['52'])
-        self.expect('frame variable strwithNULs2', substrs=[
-                    '@"a very much boring task to write\\0a string this way!!'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsstring/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsstring/main.m
deleted file mode 100644 (file)
index b0d926f..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-//===-- main.m ------------------------------------------------*- ObjC -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#import <Foundation/Foundation.h>
-
-#if defined(__APPLE__)
-#if defined(__arm__) || defined(__arm64__) || defined(__aarch64__)
-#define IOS
-#endif
-#endif
-
-#if defined(IOS)
-#import <Foundation/NSGeometry.h>
-#else
-#import <Carbon/Carbon.h>
-#endif
-
-int main (int argc, const char * argv[])
-{
-    
-    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-
-           NSString *str0 = [[NSNumber numberWithUnsignedLongLong:0xFF] stringValue];
-           NSString *str1 = [NSString stringWithCString:"A rather short ASCII NSString object is here" encoding:NSASCIIStringEncoding];
-           NSString *str2 = [NSString stringWithUTF8String:"A rather short UTF8 NSString object is here"];
-           NSString *str3 = @"A string made with the at sign is here";
-           NSString *str4 = [NSString stringWithFormat:@"This is string number %ld right here", (long)4];
-           NSRect ns_rect_4str = {{1,1},{5,5}};
-           NSString* str5 = NSStringFromRect(ns_rect_4str);
-           NSString* str6 = [@"/usr/doc/README.1ST" pathExtension];
-           const unichar myCharacters[] = {0x03C3,'x','x'};
-           NSString *str7 = [NSString stringWithCharacters: myCharacters
-                                                    length: sizeof myCharacters / sizeof *myCharacters];
-           NSString* str8 = [@"/usr/doc/file.hasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTimehasVeryLongExtensionThisTime" pathExtension];
-           const unichar myOtherCharacters[] = {'a',' ', 'v','e','r','y',' ',
-               'm','u','c','h',' ','b','o','r','i','n','g',' ','t','a','s','k',
-               ' ','t','o',' ','w','r','i','t','e', ' ', 'a', ' ', 's', 't', 'r', 'i', 'n', 'g', ' ',
-               't','h','i','s',' ','w','a','y','!','!',0x03C3, 0};
-           NSString *str9 = [NSString stringWithCharacters: myOtherCharacters
-                                                    length: sizeof myOtherCharacters / sizeof *myOtherCharacters];
-           const unichar myNextCharacters[] = {0x03C3, 0x0000};
-           NSString *str10 = [NSString stringWithFormat:@"This is a Unicode string %S number %ld right here", myNextCharacters, (long)4];
-           NSString *str11 = NSStringFromClass([str10 class]);
-           NSString *label1 = @"Process Name: ";
-           NSString *label2 = @"Process Id: ";
-           NSString *processName = [[NSProcessInfo processInfo] processName];
-           NSString *processID = [NSString stringWithFormat:@"%d", [[NSProcessInfo processInfo] processIdentifier]];
-           NSString *str12 = [NSString stringWithFormat:@"%@ %@ %@ %@", label1, processName, label2, processID];
-           NSString *eAcute = [NSString stringWithFormat: @"%C", 0x00E9];
-           NSString *randomHaziChar = [NSString stringWithFormat: @"%C", 0x9DC5];
-           NSString *japanese = @"色は匂へど散りぬるを";
-           NSString *italian = @"L'Italia è una Repubblica democratica, fondata sul lavoro. La sovranità appartiene al popolo, che la esercita nelle forme e nei limiti della Costituzione.";
-           NSString* french = @"Que veut cette horde d'esclaves, De traîtres, de rois conjurés?";
-           NSString* german = @"Über-Ich und aus den Ansprüchen der sozialen Umwelt";
-           void* data_set[3] = {str1,str2,str3};
-      NSString *hebrew = [NSString stringWithString:@"לילה טוב"];
-
-           NSAttributedString* attrString = [[NSAttributedString alloc] initWithString:@"hello world from foo" attributes:[NSDictionary new]];
-           [attrString isEqual:nil];
-           NSAttributedString* mutableAttrString = [[NSMutableAttributedString alloc] initWithString:@"hello world from foo" attributes:[NSDictionary new]];
-           [mutableAttrString isEqual:nil];
-
-           NSString* mutableString = [[NSMutableString alloc] initWithString:@"foo"];
-           [mutableString insertString:@"foo said this string needs to be very long so much longer than whatever other string has been seen ever before by anyone of the mankind that of course this is still not long enough given what foo our friend foo our lovely dearly friend foo desired of us so i am adding more stuff here for the sake of it and for the joy of our friend who is named guess what just foo. hence, dear friend foo, stay safe, your string is now  long enough to accommodate your testing need and I will make sure that if not we extend it with even more fuzzy random meaningless words pasted one after the other from a long tiresome friday evening spent working in my office. my office mate went home but I am still randomly typing just for the fun of seeing what happens of the length of a Mutable String in Cocoa if it goes beyond one byte.. so be it, dear " atIndex:0];
-
-           NSString* mutableGetConst = [NSString stringWithCString:[mutableString cString]];
-
-           [mutableGetConst length];
-           CFMutableStringRef mutable_string_ref = CFStringCreateMutable(NULL,100);
-           CFStringAppend(mutable_string_ref, CFSTR("Wish ya knew"));
-           CFStringRef cfstring_ref = CFSTR("HELLO WORLD");
-
-       NSArray *components = @[@"usr", @"blah", @"stuff"];
-       NSString *path = [NSString pathWithComponents: components];
-
-  const unichar someOfTheseAreNUL[] = {'a',' ', 'v','e','r','y',' ',
-      'm','u','c','h',' ','b','o','r','i','n','g',' ','t','a','s','k',
-      ' ','t','o',' ','w','r','i','t','e', 0, 'a', ' ', 's', 't', 'r', 'i', 'n', 'g', ' ',
-      't','h','i','s',' ','w','a','y','!','!', 0x03C3, 0};
-  NSString *strwithNULs = [NSString stringWithCharacters: someOfTheseAreNUL
-                                           length: sizeof someOfTheseAreNUL / sizeof *someOfTheseAreNUL];
-
-  const unichar someOfTheseAreNUL2[] = {'a',' ', 'v','e','r','y',' ',
-      'm','u','c','h',' ','b','o','r','i','n','g',' ','t','a','s','k',
-      ' ','t','o',' ','w','r','i','t','e', 0, 'a', ' ', 's', 't', 'r', 'i', 'n', 'g', ' ',
-      't','h','i','s',' ','w','a','y','!','!'};
-  NSString *strwithNULs2 = [NSString stringWithCharacters: someOfTheseAreNUL2
-                                           length: sizeof someOfTheseAreNUL2 / sizeof *someOfTheseAreNUL2];
-
-    [pool drain]; // break here
-    return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-proper-plurals/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-proper-plurals/Makefile
deleted file mode 100644 (file)
index 8b322ff..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-OBJC_SOURCES := main.m
-
-CFLAGS_EXTRAS := -w
-
-
-
-LD_EXTRAS := -framework Foundation
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-proper-plurals/TestFormattersOneIsSingular.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-proper-plurals/TestFormattersOneIsSingular.py
deleted file mode 100644 (file)
index 4611e16..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class DataFormatterOneIsSingularTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    def test_one_is_singular_with_run_command(self):
-        """Test that 1 item is not as reported as 1 items."""
-        self.build()
-        self.oneness_data_formatter_commands()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.m', '// Set break point at this line.')
-
-    def oneness_data_formatter_commands(self):
-        """Test that 1 item is not as reported as 1 items."""
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type synth clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        # Now check that we are displaying Cocoa classes correctly
-        self.expect('frame variable key',
-                    substrs=['@"1 element"'])
-        self.expect('frame variable key', matching=False,
-                    substrs=['1 elements'])
-        self.expect('frame variable value',
-                    substrs=['@"1 element"'])
-        self.expect('frame variable value', matching=False,
-                    substrs=['1 elements'])
-        self.expect('frame variable dict',
-                    substrs=['1 key/value pair'])
-        self.expect('frame variable dict', matching=False,
-                    substrs=['1 key/value pairs'])
-        self.expect('frame variable imset',
-                    substrs=['1 index'])
-        self.expect('frame variable imset', matching=False,
-                    substrs=['1 indexes'])
-        self.expect('frame variable binheap_ref',
-                    substrs=['@"1 item"'])
-        self.expect('frame variable binheap_ref', matching=False,
-                    substrs=['1 items'])
-        self.expect('frame variable immutableData',
-                    substrs=['1 byte'])
-        self.expect('frame variable immutableData', matching=False,
-                    substrs=['1 bytes'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-proper-plurals/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-proper-plurals/main.m
deleted file mode 100644 (file)
index dc9e560..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-//===-- main.m ------------------------------------------------*- ObjC -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#import <Foundation/Foundation.h>
-
-int main (int argc, const char * argv[])
-{
-  NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-
-       NSArray* key = [NSArray arrayWithObjects:@"foo",nil];
-       NSArray* value = [NSArray arrayWithObjects:@"key",nil];
-       NSDictionary *dict = [NSDictionary dictionaryWithObjects:value forKeys:key];
-
-  NSMutableIndexSet *imset = [[NSMutableIndexSet alloc] init];
-  [imset addIndex:4];
-
-  CFBinaryHeapRef binheap_ref = CFBinaryHeapCreate(NULL, 15, &kCFStringBinaryHeapCallBacks, NULL);
-  CFBinaryHeapAddValue(binheap_ref, CFSTR("Hello world"));
-
-  NSData *immutableData = [[NSData alloc] initWithBytes:"HELLO" length:1];
-
-  [pool drain];// Set break point at this line.
-  return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-ptr-to-array/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-ptr-to-array/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-ptr-to-array/TestPtrToArrayFormatting.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-ptr-to-array/TestPtrToArrayFormatting.py
deleted file mode 100644 (file)
index b3c794f..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class PtrToArrayDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_with_run_command(self):
-        """Test that LLDB handles the clang typeclass Paren correctly."""
-        self.build()
-        self.data_formatter_commands()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    def data_formatter_commands(self):
-        """Test that LLDB handles the clang typeclass Paren correctly."""
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format delete hex', check=False)
-            self.runCmd('type summary clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.expect('p *(int (*)[3])foo',
-                    substrs=['(int [3]) $', '[0] = 1', '[1] = 2', '[2] = 3'])
-
-        self.expect('p *(int (*)[3])foo', matching=False,
-                    substrs=['01 00 00 00 02 00 00 00 03 00 00 00'])
-        self.expect('p *(int (*)[3])foo', matching=False,
-                    substrs=['0x000000030000000200000001'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-ptr-to-array/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-ptr-to-array/main.cpp
deleted file mode 100644 (file)
index 3343695..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-bool bar(int const *foo) {
-  return foo != 0; // Set break point at this line.
-}
-
-int main() {
-  int foo[] = {1,2,3};
-  return bar(foo);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-python-synth/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-python-synth/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py
deleted file mode 100644 (file)
index 5f908f7..0000000
+++ /dev/null
@@ -1,289 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class PythonSynthDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # llvm.org/pr20545 bogus output confuses buildbot parser
-    def test_with_run_command(self):
-        """Test data formatter commands."""
-        self.build()
-        self.data_formatter_commands()
-
-    def test_rdar10960550_with_run_command(self):
-        """Test data formatter commands."""
-        self.build()
-        self.rdar10960550_formatter_commands()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-        self.line2 = line_number('main.cpp',
-                                 '// Set cast break point at this line.')
-        self.line3 = line_number(
-            'main.cpp', '// Set second cast break point at this line.')
-
-    def data_formatter_commands(self):
-        """Test using Python synthetic children provider."""
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        process = self.dbg.GetSelectedTarget().GetProcess()
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type filter clear', check=False)
-            self.runCmd('type synth clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        # print the f00_1 variable without a synth
-        self.expect("frame variable f00_1",
-                    substrs=['a = 1',
-                             'b = 2',
-                             'r = 34'])
-
-        # now set up the synth
-        self.runCmd("script from fooSynthProvider import *")
-        self.runCmd("type synth add -l fooSynthProvider foo")
-        self.expect("type synthetic list foo", substrs=['fooSynthProvider'])
-
-        # note that the value of fake_a depends on target byte order
-        if process.GetByteOrder() == lldb.eByteOrderLittle:
-            fake_a_val = 0x02000000
-        else:
-            fake_a_val = 0x00000100
-
-        # check that we get the two real vars and the fake_a variables
-        self.expect("frame variable f00_1",
-                    substrs=['r = 34',
-                             'fake_a = %d' % fake_a_val,
-                             'a = 1'])
-
-        # check that we do not get the extra vars
-        self.expect("frame variable f00_1", matching=False,
-                    substrs=['b = 2'])
-
-        # check access to members by name
-        self.expect('frame variable f00_1.fake_a',
-                    substrs=['%d' % fake_a_val])
-
-        # check access to members by index
-        self.expect('frame variable f00_1[1]',
-                    substrs=['%d' % fake_a_val])
-
-        # put synthetic children in summary in several combinations
-        self.runCmd(
-            "type summary add --summary-string \"fake_a=${svar.fake_a}\" foo")
-        self.expect('frame variable f00_1',
-                    substrs=['fake_a=%d' % fake_a_val])
-        self.runCmd(
-            "type summary add --summary-string \"fake_a=${svar[1]}\" foo")
-        self.expect('frame variable f00_1',
-                    substrs=['fake_a=%d' % fake_a_val])
-
-        # clear the summary
-        self.runCmd("type summary delete foo")
-
-        # check that the caching does not span beyond the stopoint
-        self.runCmd("n")
-
-        if process.GetByteOrder() == lldb.eByteOrderLittle:
-            fake_a_val = 0x02000000
-        else:
-            fake_a_val = 0x00000200
-
-        self.expect("frame variable f00_1",
-                    substrs=['r = 34',
-                             'fake_a = %d' % fake_a_val,
-                             'a = 2'])
-
-        # check that altering the object also alters fake_a
-        self.runCmd("expr f00_1.a = 280")
-
-        if process.GetByteOrder() == lldb.eByteOrderLittle:
-            fake_a_val = 0x02000001
-        else:
-            fake_a_val = 0x00011800
-
-        self.expect("frame variable f00_1",
-                    substrs=['r = 34',
-                             'fake_a = %d' % fake_a_val,
-                             'a = 280'])
-
-        # check that expanding a pointer does the right thing
-        if process.GetByteOrder() == lldb.eByteOrderLittle:
-            fake_a_val = 0x0d000000
-        else:
-            fake_a_val = 0x00000c00
-
-        self.expect("frame variable --ptr-depth 1 f00_ptr",
-                    substrs=['r = 45',
-                             'fake_a = %d' % fake_a_val,
-                             'a = 12'])
-
-        # now add a filter.. it should fail
-        self.expect("type filter add foo --child b --child j", error=True,
-                    substrs=['cannot add'])
-
-        # we get the synth again..
-        self.expect('frame variable f00_1', matching=False,
-                    substrs=['b = 1',
-                             'j = 17'])
-        self.expect("frame variable --ptr-depth 1 f00_ptr",
-                    substrs=['r = 45',
-                             'fake_a = %d' % fake_a_val,
-                             'a = 12'])
-
-        # now delete the synth and add the filter
-        self.runCmd("type synth delete foo")
-        self.runCmd("type filter add foo --child b --child j")
-
-        self.expect('frame variable f00_1',
-                    substrs=['b = 2',
-                             'j = 18'])
-        self.expect("frame variable --ptr-depth 1 f00_ptr", matching=False,
-                    substrs=['r = 45',
-                             'fake_a = %d' % fake_a_val,
-                             'a = 12'])
-
-        # now add the synth and it should fail
-        self.expect("type synth add -l fooSynthProvider foo", error=True,
-                    substrs=['cannot add'])
-
-        # check the listing
-        self.expect('type synth list', matching=False,
-                    substrs=['foo',
-                             'Python class fooSynthProvider'])
-        self.expect('type filter list',
-                    substrs=['foo',
-                             '.b',
-                             '.j'])
-
-        # delete the filter, add the synth
-        self.runCmd("type filter delete foo")
-        self.runCmd("type synth add -l fooSynthProvider foo")
-
-        self.expect('frame variable f00_1', matching=False,
-                    substrs=['b = 2',
-                             'j = 18'])
-        self.expect("frame variable --ptr-depth 1 f00_ptr",
-                    substrs=['r = 45',
-                             'fake_a = %d' % fake_a_val,
-                             'a = 12'])
-
-        # check the listing
-        self.expect('type synth list',
-                    substrs=['foo',
-                             'Python class fooSynthProvider'])
-        self.expect('type filter list', matching=False,
-                    substrs=['foo',
-                             '.b',
-                             '.j'])
-
-        # delete the synth and check that we get good output
-        self.runCmd("type synth delete foo")
-
-        self.expect("frame variable f00_1",
-                    substrs=['a = 280',
-                             'b = 2',
-                             'j = 18'])
-
-        self.expect("frame variable f00_1", matching=False,
-                    substrs=['fake_a = '])
-
-    def rdar10960550_formatter_commands(self):
-        """Test that synthetic children persist stoppoints."""
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        # The second breakpoint is on a multi-line expression, so the comment
-        # can't be on the right line...
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line2, num_expected_locations=1, loc_exact=False)
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line3, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type filter clear', check=False)
-            self.runCmd('type synth clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.runCmd("command script import ./ftsp.py --allow-reload")
-        self.runCmd("type synth add -l ftsp.ftsp wrapint")
-
-        # we need to check that the VO is properly updated so that the same synthetic children are reused
-        # but their values change correctly across stop-points - in order to do this, self.runCmd("next")
-        # does not work because it forces a wipe of the stack frame - this is why we are using this more contrived
-        # mechanism to achieve our goal of preserving test_cast as a VO
-        test_cast = self.dbg.GetSelectedTarget().GetProcess(
-        ).GetSelectedThread().GetSelectedFrame().FindVariable('test_cast')
-
-        str_cast = str(test_cast)
-
-        if self.TraceOn():
-            print(str_cast)
-
-        self.assertTrue(str_cast.find('A') != -1, 'could not find A in output')
-        self.assertTrue(str_cast.find('B') != -1, 'could not find B in output')
-        self.assertTrue(str_cast.find('C') != -1, 'could not find C in output')
-        self.assertTrue(str_cast.find('D') != -1, 'could not find D in output')
-        self.assertTrue(
-            str_cast.find("4 = '\\0'") != -1,
-            'could not find item 4 == 0')
-
-        self.dbg.GetSelectedTarget().GetProcess().GetSelectedThread().StepOver()
-
-        str_cast = str(test_cast)
-
-        if self.TraceOn():
-            print(str_cast)
-
-        # we detect that all the values of the child objects have changed - but the counter-generated item
-        # is still fixed at 0 because it is cached - this would fail if update(self): in ftsp returned False
-        # or if synthetic children were not being preserved
-        self.assertTrue(str_cast.find('Q') != -1, 'could not find Q in output')
-        self.assertTrue(str_cast.find('X') != -1, 'could not find X in output')
-        self.assertTrue(str_cast.find('T') != -1, 'could not find T in output')
-        self.assertTrue(str_cast.find('F') != -1, 'could not find F in output')
-        self.assertTrue(
-            str_cast.find("4 = '\\0'") != -1,
-            'could not find item 4 == 0')
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-python-synth/fooSynthProvider.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-python-synth/fooSynthProvider.py
deleted file mode 100644 (file)
index 45fb004..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-import lldb
-
-
-class fooSynthProvider:
-
-    def __init__(self, valobj, dict):
-        self.valobj = valobj
-        self.int_type = valobj.GetType().GetBasicType(lldb.eBasicTypeInt)
-
-    def num_children(self):
-        return 3
-
-    def get_child_at_index(self, index):
-        if index == 0:
-            child = self.valobj.GetChildMemberWithName('a')
-        if index == 1:
-            child = self.valobj.CreateChildAtOffset('fake_a', 1, self.int_type)
-        if index == 2:
-            child = self.valobj.GetChildMemberWithName('r')
-        return child
-
-    def get_child_index(self, name):
-        if name == 'a':
-            return 0
-        if name == 'fake_a':
-            return 1
-        return 2
-
-    def update(self):
-        return True
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-python-synth/ftsp.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-python-synth/ftsp.py
deleted file mode 100644 (file)
index b96dbac..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-import lldb
-
-counter = 0
-
-
-class ftsp:
-
-    def __init__(self, valobj, dict):
-        self.valobj = valobj
-
-    def num_children(self):
-        if self.char.IsValid():
-            return 5
-        return 0
-
-    def get_child_index(self, name):
-        return 0
-
-    def get_child_at_index(self, index):
-        if index == 0:
-            return self.x.Cast(self.char)
-        if index == 4:
-            return self.valobj.CreateValueFromExpression(
-                str(index), '(char)(' + str(self.count) + ')')
-        return self.x.CreateChildAtOffset(str(index),
-                                          index,
-                                          self.char)
-
-    def update(self):
-        self.x = self.valobj.GetChildMemberWithName('x')
-        self.char = self.valobj.GetType().GetBasicType(lldb.eBasicTypeChar)
-        global counter
-        self.count = counter
-        counter = counter + 1
-        return True  # important: if we return False here, or fail to return, the test will fail
-
-
-def __lldb_init_module(debugger, dict):
-    global counter
-    counter = 0
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-python-synth/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-python-synth/main.cpp
deleted file mode 100644 (file)
index f45a2ab..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-struct foo
-{
-    int a;
-    int b;
-    int c;
-    int d;
-    int e;
-    int f;
-    int g;
-    int h;
-    int i;
-    int j;
-    int k;
-    int l;
-    int m;
-    int n;
-    int o;
-    int p;
-    int q;
-    int r;
-    
-    foo(int X) :
-    a(X),
-    b(X+1),
-    c(X+3),
-    d(X+5),
-    e(X+7),
-    f(X+9),
-    g(X+11),
-    h(X+13),
-    i(X+15),
-    j(X+17),
-    k(X+19),
-    l(X+21),
-    m(X+23),
-    n(X+25),
-    o(X+27),
-    p(X+29),
-    q(X+31),
-    r(X+33) {}
-};
-
-struct wrapint
-{
-    int x;
-    wrapint(int X) : x(X) {}
-};
-
-int main()
-{
-    foo f00_1(1);
-    foo *f00_ptr = new foo(12);
-    
-    f00_1.a++; // Set break point at this line.
-    
-    wrapint test_cast('A' +
-               256*'B' +
-               256*256*'C'+
-               256*256*256*'D');
-    // Set cast break point at this line.
-    test_cast.x = 'Q' +
-                      256*'X' +
-                      256*256*'T'+
-                      256*256*256*'F';
-    return 0;     // Set second cast break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-script/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-script/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-script/TestDataFormatterScript.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-script/TestDataFormatterScript.py
deleted file mode 100644 (file)
index 14387cd..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class ScriptDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_with_run_command(self):
-        """Test data formatter commands."""
-        self.build()
-        self.data_formatter_commands()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    def data_formatter_commands(self):
-        """Test that that file and class static variables display correctly."""
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        # Set the script here to ease the formatting
-        script = 'a = valobj.GetChildMemberWithName(\'integer\'); a_val = a.GetValue(); str = \'Hello from Python, \' + a_val + \' time\'; return str + (\'!\' if a_val == \'1\' else \'s!\');'
-
-        self.runCmd(
-            "type summary add i_am_cool --python-script \"%s\"" %
-            script)
-        self.expect('type summary list i_am_cool', substrs=[script])
-
-        self.expect("frame variable one",
-                    substrs=['Hello from Python',
-                             '1 time!'])
-
-        self.expect("frame variable two",
-                    substrs=['Hello from Python',
-                             '4 times!'])
-
-        self.runCmd("n")  # skip ahead to make values change
-
-        self.expect("frame variable three",
-                    substrs=['Hello from Python, 10 times!',
-                             'Hello from Python, 4 times!'])
-
-        self.runCmd("n")  # skip ahead to make values change
-
-        self.expect("frame variable two",
-                    substrs=['Hello from Python',
-                             '1 time!'])
-
-        script = 'a = valobj.GetChildMemberWithName(\'integer\'); a_val = a.GetValue(); str = \'int says \' + a_val; return str;'
-
-        # Check that changes in the script are immediately reflected
-        self.runCmd(
-            "type summary add i_am_cool --python-script \"%s\"" %
-            script)
-
-        self.expect("frame variable two",
-                    substrs=['int says 1'])
-
-        self.expect("frame variable twoptr",
-                    substrs=['int says 1'])
-
-        # Change the summary
-        self.runCmd(
-            "type summary add --summary-string \"int says ${var.integer}, and float says ${var.floating}\" i_am_cool")
-
-        self.expect("frame variable two",
-                    substrs=['int says 1',
-                             'and float says 2.71'])
-        # Try it for pointers
-        self.expect("frame variable twoptr",
-                    substrs=['int says 1',
-                             'and float says 2.71'])
-
-        # Force a failure for pointers
-        self.runCmd(
-            "type summary add i_am_cool -p --python-script \"%s\"" %
-            script)
-
-        self.expect("frame variable twoptr", matching=False,
-                    substrs=['and float says 2.71'])
-
-        script = 'return \'Python summary\''
-
-        self.runCmd(
-            "type summary add --name test_summary --python-script \"%s\"" %
-            script)
-
-        # attach the Python named summary to someone
-        self.expect("frame variable one --summary test_summary",
-                    substrs=['Python summary'])
-
-        # should not bind to the type
-        self.expect("frame variable two", matching=False,
-                    substrs=['Python summary'])
-
-        # and should not stick to the variable
-        self.expect("frame variable one", matching=False,
-                    substrs=['Python summary'])
-
-        self.runCmd(
-            "type summary add i_am_cool --summary-string \"Text summary\"")
-
-        # should be temporary only
-        self.expect("frame variable one", matching=False,
-                    substrs=['Python summary'])
-
-        # use the type summary
-        self.expect("frame variable two",
-                    substrs=['Text summary'])
-
-        self.runCmd("n")  # skip ahead to make values change
-
-        # both should use the type summary now
-        self.expect("frame variable one",
-                    substrs=['Text summary'])
-
-        self.expect("frame variable two",
-                    substrs=['Text summary'])
-
-        # disable type summary for pointers, and make a Python regex summary
-        self.runCmd(
-            "type summary add i_am_cool -p --summary-string \"Text summary\"")
-        self.runCmd("type summary add -x cool --python-script \"%s\"" % script)
-
-        # variables should stick to the type summary
-        self.expect("frame variable one",
-                    substrs=['Text summary'])
-
-        self.expect("frame variable two",
-                    substrs=['Text summary'])
-
-        # array and pointer should match the Python one
-        self.expect("frame variable twoptr",
-                    substrs=['Python summary'])
-
-        self.expect("frame variable array",
-                    substrs=['Python summary'])
-
-        # return pointers to the type summary
-        self.runCmd(
-            "type summary add i_am_cool --summary-string \"Text summary\"")
-
-        self.expect("frame variable one",
-                    substrs=['Text summary'])
-
-        self.expect("frame variable two",
-                    substrs=['Text summary'])
-
-        self.expect("frame variable twoptr",
-                    substrs=['Text summary'])
-
-        self.expect("frame variable array",
-                    substrs=['Python summary'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-script/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-script/main.cpp
deleted file mode 100644 (file)
index db60981..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-
-struct i_am_cool
-{
-       int integer;
-       float floating;
-       char character;
-       i_am_cool(int I, float F, char C) :
-    integer(I), floating(F), character(C) {}
-       i_am_cool() : integer(1), floating(2), character('3') {}
-    
-};
-
-struct i_am_cooler
-{
-       i_am_cool first_cool;
-       i_am_cool second_cool;
-       float floating;
-       
-       i_am_cooler(int I1, int I2, float F1, float F2, char C1, char C2) :
-    first_cool(I1,F1,C1),
-    second_cool(I2,F2,C2),
-    floating((F1 + F2)/2) {}
-};
-
-int main (int argc, const char * argv[])
-{
-    i_am_cool one(1,3.14,'E');
-    i_am_cool two(4,2.71,'G');
-    
-    i_am_cool* twoptr = &two;
-    
-    i_am_cool array[5];
-    
-    i_am_cooler three(10,4,1985,1/1/2011,'B','E'); // Set break point at this line.
-    
-    two.integer = 1;
-    
-    int dummy = 1;
-    
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/Makefile
deleted file mode 100644 (file)
index 6bfb97c..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-CXX_SOURCES := main.cpp
-USE_LIBSTDCPP := 0
-
-
-
-CXXFLAGS_EXTRAS := -O0
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py
deleted file mode 100644 (file)
index fa13e92..0000000
+++ /dev/null
@@ -1,184 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class SkipSummaryDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(
-        oslist=['freebsd'],
-        bugnumber="llvm.org/pr20548 fails to build on lab.llvm.org buildbot")
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24462, Data formatters have problems on Windows")
-    def test_with_run_command(self):
-        """Test data formatter commands."""
-        self.build()
-        self.data_formatter_commands()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    def data_formatter_commands(self):
-        """Test that that file and class static variables display correctly."""
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        #import lldbsuite.test.lldbutil as lldbutil
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        # Setup the summaries for this scenario
-        #self.runCmd("type summary add --summary-string \"${var._M_dataplus._M_p}\" std::string")
-        self.runCmd(
-            "type summary add --summary-string \"Level 1\" \"DeepData_1\"")
-        self.runCmd(
-            "type summary add --summary-string \"Level 2\" \"DeepData_2\" -e")
-        self.runCmd(
-            "type summary add --summary-string \"Level 3\" \"DeepData_3\"")
-        self.runCmd(
-            "type summary add --summary-string \"Level 4\" \"DeepData_4\"")
-        self.runCmd(
-            "type summary add --summary-string \"Level 5\" \"DeepData_5\"")
-
-        # Default case, just print out summaries
-        self.expect('frame variable',
-                    substrs=['(DeepData_1) data1 = Level 1',
-                             '(DeepData_2) data2 = Level 2 {',
-                             'm_child1 = Level 3',
-                             'm_child2 = Level 3',
-                             'm_child3 = Level 3',
-                             'm_child4 = Level 3',
-                             '}'])
-
-        # Skip the default (should be 1) levels of summaries
-        self.expect('frame variable --no-summary-depth',
-                    substrs=['(DeepData_1) data1 = {',
-                             'm_child1 = 0x',
-                             '}',
-                             '(DeepData_2) data2 = {',
-                             'm_child1 = Level 3',
-                             'm_child2 = Level 3',
-                             'm_child3 = Level 3',
-                             'm_child4 = Level 3',
-                             '}'])
-
-        # Now skip 2 levels of summaries
-        self.expect('frame variable --no-summary-depth=2',
-                    substrs=['(DeepData_1) data1 = {',
-                             'm_child1 = 0x',
-                             '}',
-                             '(DeepData_2) data2 = {',
-                             'm_child1 = {',
-                             'm_child1 = 0x',
-                             'Level 4',
-                             'm_child2 = {',
-                             'm_child3 = {',
-                             '}'])
-
-        # Check that no "Level 3" comes out
-        self.expect(
-            'frame variable data1.m_child1 --no-summary-depth=2',
-            matching=False,
-            substrs=['Level 3'])
-
-        # Now expand a pointer with 2 level of skipped summaries
-        self.expect('frame variable data1.m_child1 --no-summary-depth=2',
-                    substrs=['(DeepData_2 *) data1.m_child1 = 0x'])
-
-        # Deref and expand said pointer
-        self.expect('frame variable *data1.m_child1 --no-summary-depth=2',
-                    substrs=['(DeepData_2) *data1.m_child1 = {',
-                             'm_child2 = {',
-                             'm_child1 = 0x',
-                             'Level 4',
-                             '}'])
-
-        # Expand an expression, skipping 2 layers of summaries
-        self.expect(
-            'frame variable data1.m_child1->m_child2 --no-summary-depth=2',
-            substrs=[
-                '(DeepData_3) data1.m_child1->m_child2 = {',
-                'm_child2 = {',
-                'm_child1 = Level 5',
-                'm_child2 = Level 5',
-                'm_child3 = Level 5',
-                '}'])
-
-        # Expand same expression, skipping only 1 layer of summaries
-        self.expect(
-            'frame variable data1.m_child1->m_child2 --no-summary-depth=1',
-            substrs=[
-                '(DeepData_3) data1.m_child1->m_child2 = {',
-                'm_child1 = 0x',
-                'Level 4',
-                'm_child2 = Level 4',
-                '}'])
-
-        # Bad debugging info on SnowLeopard gcc (Apple Inc. build 5666).
-        # Skip the following tests if the condition is met.
-        if self.getCompiler().endswith('gcc') and not self.getCompiler().endswith('llvm-gcc'):
-            import re
-            gcc_version_output = system(
-                [[lldbutil.which(self.getCompiler()), "-v"]])[1]
-            #print("my output:", gcc_version_output)
-            for line in gcc_version_output.split(os.linesep):
-                m = re.search('\(Apple Inc\. build ([0-9]+)\)', line)
-                #print("line:", line)
-                if m:
-                    gcc_build = int(m.group(1))
-                    #print("gcc build:", gcc_build)
-                    if gcc_build >= 5666:
-                        # rdar://problem/9804600"
-                        self.skipTest(
-                            "rdar://problem/9804600 wrong namespace for std::string in debug info")
-
-        # Expand same expression, skipping 3 layers of summaries
-        self.expect(
-            'frame variable data1.m_child1->m_child2 --show-types --no-summary-depth=3',
-            substrs=[
-                '(DeepData_3) data1.m_child1->m_child2 = {',
-                'm_some_text = "Just a test"',
-                'm_child2 = {',
-                'm_some_text = "Just a test"'])
-
-        # Change summary and expand, first without --no-summary-depth then with
-        # --no-summary-depth
-        self.runCmd(
-            "type summary add --summary-string \"${var.m_some_text}\" DeepData_5")
-
-        self.expect('fr var data2.m_child4.m_child2.m_child2', substrs=[
-                    '(DeepData_5) data2.m_child4.m_child2.m_child2 = "Just a test"'])
-
-        self.expect(
-            'fr var data2.m_child4.m_child2.m_child2 --no-summary-depth',
-            substrs=[
-                '(DeepData_5) data2.m_child4.m_child2.m_child2 = {',
-                'm_some_text = "Just a test"',
-                '}'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/main.cpp
deleted file mode 100644 (file)
index 665c9fe..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-#include <string>
-
-struct DeepData_5
-{
-    std::string m_some_text;
-    DeepData_5() :
-    m_some_text("Just a test") {}
-};
-
-struct DeepData_4
-{
-    DeepData_5 m_child1;
-    DeepData_5 m_child2;
-    DeepData_5 m_child3;
-};
-
-struct DeepData_3
-{
-    DeepData_4& m_child1;
-    DeepData_4 m_child2;
-    
-    DeepData_3() : m_child1(* (new DeepData_4())), m_child2(DeepData_4()) {}
-};
-
-struct DeepData_2
-{
-    DeepData_3 m_child1;
-    DeepData_3 m_child2;
-    DeepData_3 m_child3;
-    DeepData_3 m_child4;    
-};
-
-struct DeepData_1
-{
-    DeepData_2 *m_child1;
-    
-    DeepData_1() :
-    m_child1(new DeepData_2())
-    {}
-};
-
-/*
- type summary add -f "${var._M_dataplus._M_p}" std::string
- type summary add -f "Level 1" "DeepData_1"
- type summary add -f "Level 2" "DeepData_2" -e
- type summary add -f "Level 3" "DeepData_3"
- type summary add -f "Level 4" "DeepData_4"
- type summary add -f "Level 5" "DeepData_5"
- */
-
-int main()
-{
-    DeepData_1 data1;
-    DeepData_2 data2;
-    
-    return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-smart-array/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-smart-array/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py
deleted file mode 100644 (file)
index 0f98eb3..0000000
+++ /dev/null
@@ -1,453 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class SmartArrayDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_with_run_command(self):
-        """Test data formatter commands."""
-        self.build()
-        self.data_formatter_commands()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    def data_formatter_commands(self):
-        """Test that that file and class static variables display correctly."""
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        process = self.dbg.GetSelectedTarget().GetProcess()
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-# check that we are not looping here
-        self.runCmd("type summary add --summary-string \"${var%V}\" SomeData")
-
-        self.expect("frame variable data",
-                    substrs=['SomeData @ 0x'])
-# ${var%s}
-        self.runCmd(
-            "type summary add --summary-string \"ptr = ${var%s}\" \"char *\"")
-
-        self.expect("frame variable strptr",
-                    substrs=['ptr = \"',
-                             'Hello world!'])
-
-        self.expect("frame variable other.strptr",
-                    substrs=['ptr = \"',
-                             'Nested Hello world!'])
-
-        self.runCmd(
-            "type summary add --summary-string \"arr = ${var%s}\" -x \"char \\[[0-9]+\\]\"")
-
-        self.expect("frame variable strarr",
-                    substrs=['arr = \"',
-                             'Hello world!'])
-
-        self.expect("frame variable other.strarr",
-                    substrs=['arr = \"',
-                             'Nested Hello world!'])
-
-        self.expect("p strarr",
-                    substrs=['arr = \"',
-                             'Hello world!'])
-
-        self.expect("p other.strarr",
-                    substrs=['arr = \"',
-                             'Nested Hello world!'])
-
-# ${var%c}
-        self.runCmd(
-            "type summary add --summary-string \"ptr = ${var%c}\" \"char *\"")
-
-        self.expect("frame variable strptr",
-                    substrs=['ptr = \"',
-                             'Hello world!'])
-
-        self.expect("frame variable other.strptr",
-                    substrs=['ptr = \"',
-                             'Nested Hello world!'])
-
-        self.expect("p strptr",
-                    substrs=['ptr = \"',
-                             'Hello world!'])
-
-        self.expect("p other.strptr",
-                    substrs=['ptr = \"',
-                             'Nested Hello world!'])
-
-        self.runCmd(
-            "type summary add --summary-string \"arr = ${var%c}\" -x \"char \\[[0-9]+\\]\"")
-
-        self.expect("frame variable strarr",
-                    substrs=['arr = \"',
-                             'Hello world!'])
-
-        self.expect("frame variable other.strarr",
-                    substrs=['arr = \"',
-                             'Nested Hello world!'])
-
-        self.expect("p strarr",
-                    substrs=['arr = \"',
-                             'Hello world!'])
-
-        self.expect("p other.strarr",
-                    substrs=['arr = \"',
-                             'Nested Hello world!'])
-
-# ${var%char[]}
-        self.runCmd(
-            "type summary add --summary-string \"arr = ${var%char[]}\" -x \"char \\[[0-9]+\\]\"")
-
-        self.expect("frame variable strarr",
-                    substrs=['arr = \"',
-                             'Hello world!'])
-
-        self.expect("frame variable other.strarr",
-                    substrs=['arr = ',
-                             'Nested Hello world!'])
-
-        self.expect("p strarr",
-                    substrs=['arr = \"',
-                             'Hello world!'])
-
-        self.expect("p other.strarr",
-                    substrs=['arr = ',
-                             'Nested Hello world!'])
-
-        self.runCmd(
-            "type summary add --summary-string \"ptr = ${var%char[]}\" \"char *\"")
-
-        self.expect("frame variable strptr",
-                    substrs=['ptr = \"',
-                             'Hello world!'])
-
-        self.expect("frame variable other.strptr",
-                    substrs=['ptr = \"',
-                             'Nested Hello world!'])
-
-        self.expect("p strptr",
-                    substrs=['ptr = \"',
-                             'Hello world!'])
-
-        self.expect("p other.strptr",
-                    substrs=['ptr = \"',
-                             'Nested Hello world!'])
-
-# ${var%a}
-        self.runCmd(
-            "type summary add --summary-string \"arr = ${var%a}\" -x \"char \\[[0-9]+\\]\"")
-
-        self.expect("frame variable strarr",
-                    substrs=['arr = \"',
-                             'Hello world!'])
-
-        self.expect("frame variable other.strarr",
-                    substrs=['arr = ',
-                             'Nested Hello world!'])
-
-        self.expect("p strarr",
-                    substrs=['arr = \"',
-                             'Hello world!'])
-
-        self.expect("p other.strarr",
-                    substrs=['arr = ',
-                             'Nested Hello world!'])
-
-        self.runCmd(
-            "type summary add --summary-string \"ptr = ${var%a}\" \"char *\"")
-
-        self.expect("frame variable strptr",
-                    substrs=['ptr = \"',
-                             'Hello world!'])
-
-        self.expect("frame variable other.strptr",
-                    substrs=['ptr = \"',
-                             'Nested Hello world!'])
-
-        self.expect("p strptr",
-                    substrs=['ptr = \"',
-                             'Hello world!'])
-
-        self.expect("p other.strptr",
-                    substrs=['ptr = \"',
-                             'Nested Hello world!'])
-
-        self.runCmd(
-            "type summary add --summary-string \"ptr = ${var[]%char[]}\" \"char *\"")
-
-# I do not know the size of the data, but you are asking for a full array slice..
-# use the ${var%char[]} to obtain a string as result
-        self.expect("frame variable strptr", matching=False,
-                    substrs=['ptr = \"',
-                             'Hello world!'])
-
-        self.expect("frame variable other.strptr", matching=False,
-                    substrs=['ptr = \"',
-                             'Nested Hello world!'])
-
-        self.expect("p strptr", matching=False,
-                    substrs=['ptr = \"',
-                             'Hello world!'])
-
-        self.expect("p other.strptr", matching=False,
-                    substrs=['ptr = \"',
-                             'Nested Hello world!'])
-
-# You asked an array-style printout...
-        self.runCmd(
-            "type summary add --summary-string \"ptr = ${var[0-1]%char[]}\" \"char *\"")
-
-        self.expect("frame variable strptr",
-                    substrs=['ptr = ',
-                             '[{H},{e}]'])
-
-        self.expect("frame variable other.strptr",
-                    substrs=['ptr = ',
-                             '[{N},{e}]'])
-
-        self.expect("p strptr",
-                    substrs=['ptr = ',
-                             '[{H},{e}]'])
-
-        self.expect("p other.strptr",
-                    substrs=['ptr = ',
-                             '[{N},{e}]'])
-
-# using [] is required here
-        self.runCmd(
-            "type summary add --summary-string \"arr = ${var%x}\" \"int [5]\"")
-
-        self.expect("frame variable intarr", matching=False, substrs=[
-                    '0x00000001,0x00000001,0x00000002,0x00000003,0x00000005'])
-
-        self.expect("frame variable other.intarr", matching=False, substrs=[
-                    '0x00000009,0x00000008,0x00000007,0x00000006,0x00000005'])
-
-        self.runCmd(
-            "type summary add --summary-string \"arr = ${var[]%x}\" \"int [5]\"")
-
-        self.expect(
-            "frame variable intarr",
-            substrs=[
-                'intarr = arr =',
-                '0x00000001,0x00000001,0x00000002,0x00000003,0x00000005'])
-
-        self.expect(
-            "frame variable other.intarr",
-            substrs=[
-                'intarr = arr =',
-                '0x00000009,0x00000008,0x00000007,0x00000006,0x00000005'])
-
-# printing each array item as an array
-        self.runCmd(
-            "type summary add --summary-string \"arr = ${var[]%uint32_t[]}\" \"int [5]\"")
-
-        self.expect(
-            "frame variable intarr",
-            substrs=[
-                'intarr = arr =',
-                '{0x00000001},{0x00000001},{0x00000002},{0x00000003},{0x00000005}'])
-
-        self.expect(
-            "frame variable other.intarr",
-            substrs=[
-                'intarr = arr = ',
-                '{0x00000009},{0x00000008},{0x00000007},{0x00000006},{0x00000005}'])
-
-# printing full array as an array
-        self.runCmd(
-            "type summary add --summary-string \"arr = ${var%uint32_t[]}\" \"int [5]\"")
-
-        self.expect(
-            "frame variable intarr",
-            substrs=[
-                'intarr = arr =',
-                '0x00000001,0x00000001,0x00000002,0x00000003,0x00000005'])
-
-        self.expect(
-            "frame variable other.intarr",
-            substrs=[
-                'intarr = arr =',
-                '0x00000009,0x00000008,0x00000007,0x00000006,0x00000005'])
-
-# printing each array item as an array
-        self.runCmd(
-            "type summary add --summary-string \"arr = ${var[]%float32[]}\" \"float [7]\"")
-
-        self.expect(
-            "frame variable flarr",
-            substrs=[
-                'flarr = arr =',
-                '{78.5},{77.25},{78},{76.125},{76.75},{76.875},{77}'])
-
-        self.expect(
-            "frame variable other.flarr",
-            substrs=[
-                'flarr = arr = ',
-                '{25.5},{25.25},{25.125},{26.75},{27.375},{27.5},{26.125}'])
-
-# printing full array as an array
-        self.runCmd(
-            "type summary add --summary-string \"arr = ${var%float32[]}\" \"float [7]\"")
-
-        self.expect("frame variable flarr",
-                    substrs=['flarr = arr =',
-                             '78.5,77.25,78,76.125,76.75,76.875,77'])
-
-        self.expect("frame variable other.flarr",
-                    substrs=['flarr = arr =',
-                             '25.5,25.25,25.125,26.75,27.375,27.5,26.125'])
-
-# using array smart summary strings for pointers should make no sense
-        self.runCmd(
-            "type summary add --summary-string \"arr = ${var%float32[]}\" \"float *\"")
-        self.runCmd(
-            "type summary add --summary-string \"arr = ${var%int32_t[]}\" \"int *\"")
-
-        self.expect("frame variable flptr", matching=False,
-                    substrs=['78.5,77.25,78,76.125,76.75,76.875,77'])
-
-        self.expect("frame variable intptr", matching=False,
-                    substrs=['1,1,2,3,5'])
-
-# use y and Y
-        self.runCmd(
-            "type summary add --summary-string \"arr = ${var%y}\" \"float [7]\"")
-        self.runCmd(
-            "type summary add --summary-string \"arr = ${var%y}\" \"int [5]\"")
-
-        if process.GetByteOrder() == lldb.eByteOrderLittle:
-            self.expect(
-                "frame variable flarr",
-                substrs=[
-                    'flarr = arr =',
-                    '00 00 9d 42,00 80 9a 42,00 00 9c 42,00 40 98 42,00 80 99 42,00 c0 99 42,00 00 9a 42'])
-        else:
-            self.expect(
-                "frame variable flarr",
-                substrs=[
-                    'flarr = arr =',
-                    '42 9d 00 00,42 9a 80 00,42 9c 00 00,42 98 40 00,42 99 80 00,42 99 c0 00,42 9a 00 00'])
-
-        if process.GetByteOrder() == lldb.eByteOrderLittle:
-            self.expect(
-                "frame variable other.flarr",
-                substrs=[
-                    'flarr = arr =',
-                    '00 00 cc 41,00 00 ca 41,00 00 c9 41,00 00 d6 41,00 00 db 41,00 00 dc 41,00 00 d1 41'])
-        else:
-            self.expect(
-                "frame variable other.flarr",
-                substrs=[
-                    'flarr = arr =',
-                    '41 cc 00 00,41 ca 00 00,41 c9 00 00,41 d6 00 00,41 db 00 00,41 dc 00 00,41 d1 00 00'])
-
-        if process.GetByteOrder() == lldb.eByteOrderLittle:
-            self.expect(
-                "frame variable intarr",
-                substrs=[
-                    'intarr = arr =',
-                    '01 00 00 00,01 00 00 00,02 00 00 00,03 00 00 00,05 00 00 00'])
-        else:
-            self.expect(
-                "frame variable intarr",
-                substrs=[
-                    'intarr = arr =',
-                    '00 00 00 01,00 00 00 01,00 00 00 02,00 00 00 03,00 00 00 05'])
-
-        if process.GetByteOrder() == lldb.eByteOrderLittle:
-            self.expect(
-                "frame variable other.intarr",
-                substrs=[
-                    'intarr = arr = ',
-                    '09 00 00 00,08 00 00 00,07 00 00 00,06 00 00 00,05 00 00 00'])
-        else:
-            self.expect(
-                "frame variable other.intarr",
-                substrs=[
-                    'intarr = arr = ',
-                    '00 00 00 09,00 00 00 08,00 00 00 07,00 00 00 06,00 00 00 05'])
-
-        self.runCmd(
-            "type summary add --summary-string \"arr = ${var%Y}\" \"float [7]\"")
-        self.runCmd(
-            "type summary add --summary-string \"arr = ${var%Y}\" \"int [5]\"")
-
-        if process.GetByteOrder() == lldb.eByteOrderLittle:
-            self.expect(
-                "frame variable flarr",
-                substrs=[
-                    'flarr = arr =',
-                    '00 00 9d 42', '00 80 9a 42', '00 00 9c 42', '00 40 98 42', '00 80 99 42', '00 c0 99 42', '00 00 9a 42'])
-        else:
-            self.expect(
-                "frame variable flarr",
-                substrs=[
-                    'flarr = arr =',
-                    '42 9d 00 00', '42 9a 80 00', '42 9c 00 00', '42 98 40 00', '42 99 80 00', '42 99 c0 00', '42 9a 00 00'])
-
-        if process.GetByteOrder() == lldb.eByteOrderLittle:
-            self.expect(
-                "frame variable other.flarr",
-                substrs=[
-                    'flarr = arr =',
-                    '00 00 cc 41', '00 00 ca 41', '00 00 c9 41', '00 00 d6 41', '00 00 db 41', '00 00 dc 41', '00 00 d1 41'])
-        else:
-            self.expect(
-                "frame variable other.flarr",
-                substrs=[
-                    'flarr = arr =',
-                    '41 cc 00 00', '41 ca 00 00', '41 c9 00 00', '41 d6 00 00', '41 db 00 00', '41 dc 00 00', '41 d1 00 00'])
-
-        if process.GetByteOrder() == lldb.eByteOrderLittle:
-            self.expect("frame variable intarr",
-                        substrs=['intarr = arr =',
-                                 '....,01 00 00 00',
-                                 '....,05 00 00 00'])
-        else:
-            self.expect("frame variable intarr",
-                        substrs=['intarr = arr =',
-                                 '....,00 00 00 01',
-                                 '....,00 00 00 05'])
-
-        if process.GetByteOrder() == lldb.eByteOrderLittle:
-            self.expect("frame variable other.intarr",
-                        substrs=['intarr = arr = ',
-                                 '09 00 00 00',
-                                 '....,07 00 00 00'])
-        else:
-            self.expect("frame variable other.intarr",
-                        substrs=['intarr = arr = ',
-                                 '00 00 00 09',
-                                 '....,00 00 00 07'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-smart-array/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-smart-array/main.cpp
deleted file mode 100644 (file)
index b9a517d..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <string.h>
-
-struct SomeData
-{
-    int x;
-};
-
-struct SomeOtherData
-{
-    char strarr[32];
-    char *strptr;
-    int intarr[5];
-    float flarr[7];
-    
-    SomeOtherData()
-    {
-        strcpy(strarr,"Nested Hello world!");
-        strptr = new char[128];
-        strcpy(strptr,"Nested Hello world!");
-        intarr[0] = 9;
-        intarr[1] = 8;
-        intarr[2] = 7;
-        intarr[3] = 6;
-        intarr[4] = 5;
-        
-        flarr[0] = 25.5;
-        flarr[1] = 25.25;
-        flarr[2] = 25.125;
-        flarr[3] = 26.75;
-        flarr[4] = 27.375;
-        flarr[5] = 27.5;
-        flarr[6] = 26.125;
-    }
-};
-
-int main (int argc, const char * argv[])
-{
-    char strarr[32] = "Hello world!";
-    char *strptr = NULL;
-    strptr = "Hello world!";
-    int intarr[5] = {1,1,2,3,5};
-    float flarr[7] = {78.5,77.25,78.0,76.125,76.75,76.875,77.0};
-    
-    SomeData data;
-    
-    SomeOtherData other;
-    
-    float* flptr = flarr;
-    int* intptr = intarr;
-    
-    return 0; // Set break point at this line.
-    
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile
deleted file mode 100644 (file)
index b016f00..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-CXX_SOURCES := main.cpp
-CXXFLAGS_EXTRAS := -std=c++11
-USE_LIBCPP := 1
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/TestLibCxxAtomic.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/TestLibCxxAtomic.py
deleted file mode 100644 (file)
index 48e77c1..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class LibCxxAtomicTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def get_variable(self, name):
-        var = self.frame().FindVariable(name)
-        var.SetPreferDynamicValue(lldb.eDynamicCanRunTarget)
-        var.SetPreferSyntheticValue(True)
-        return var
-
-    @skipIf(compiler=["gcc"])
-    @add_test_categories(["libc++"])
-    def test(self):
-        """Test that std::atomic as defined by libc++ is correctly printed by LLDB"""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        bkpt = self.target().FindBreakpointByID(
-            lldbutil.run_break_set_by_source_regexp(
-                self, "Set break point at this line."))
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        lldbutil.skip_if_library_missing(
-            self, self.target(), lldbutil.PrintableRegex("libc\+\+"))
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        s = self.get_variable('s')
-        i = self.get_variable('i')
-
-        if self.TraceOn():
-            print(s)
-        if self.TraceOn():
-            print(i)
-
-        self.assertTrue(i.GetValueAsUnsigned(0) == 5, "i == 5")
-        self.assertTrue(s.GetNumChildren() == 2, "s has two children")
-        self.assertTrue(
-            s.GetChildAtIndex(0).GetValueAsUnsigned(0) == 1,
-            "s.x == 1")
-        self.assertTrue(
-            s.GetChildAtIndex(1).GetValueAsUnsigned(0) == 2,
-            "s.y == 2")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/main.cpp
deleted file mode 100644 (file)
index 516331e..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-//===-- main.cpp --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <atomic>
-
-struct S {
-    int x = 1;
-    int y = 2;
-};
-
-int main ()
-{
-    std::atomic<S> s;
-    s.store(S());
-    std::atomic<int> i;
-    i.store(5);
-    
-    return 0; // Set break point at this line.
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/bitset/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/bitset/Makefile
deleted file mode 100644 (file)
index 680e1ab..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CXX_SOURCES := main.cpp
-
-USE_LIBCPP := 1
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/bitset/TestDataFormatterLibcxxBitset.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/bitset/TestDataFormatterLibcxxBitset.py
deleted file mode 100644 (file)
index 26f1972..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestDataFormatterLibcxxBitset(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        TestBase.setUp(self)
-
-        primes = [1]*300
-        primes[0] = primes[1] = 0
-        for i in range(2, len(primes)):
-            for j in range(2*i, len(primes), i):
-                primes[j] = 0
-        self.primes = primes
-
-    def check(self, name, size):
-        var = self.frame().FindVariable(name)
-        self.assertTrue(var.IsValid())
-        self.assertEqual(var.GetNumChildren(), size)
-        for i in range(size):
-            child = var.GetChildAtIndex(i)
-            self.assertEqual(child.GetValueAsUnsigned(), self.primes[i],
-                    "variable: %s, index: %d"%(name, size))
-
-    @add_test_categories(["libc++"])
-    def test_value(self):
-        """Test that std::bitset is displayed correctly"""
-        self.build()
-        lldbutil.run_to_source_breakpoint(self, '// break here',
-                lldb.SBFileSpec("main.cpp", False))
-
-        self.check("empty", 0)
-        self.check("small", 13)
-        self.check("large", 200)
-
-    @add_test_categories(["libc++"])
-    def test_ptr_and_ref(self):
-        """Test that ref and ptr to std::bitset is displayed correctly"""
-        self.build()
-        (_, process, _, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                'Check ref and ptr',
-                lldb.SBFileSpec("main.cpp", False))
-
-        self.check("ref", 13)
-        self.check("ptr", 13)
-
-        lldbutil.continue_to_breakpoint(process, bkpt)
-
-        self.check("ref", 200)
-        self.check("ptr", 200)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/bitset/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/bitset/main.cpp
deleted file mode 100644 (file)
index 2a1532a..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#include <bitset>
-#include <stdio.h>
-
-template<std::size_t N>
-void fill(std::bitset<N> &b) {
-  b.set();
-  b[0] = b[1] = false;
-  for (std::size_t i = 2; i < N; ++i) {
-    for (std::size_t j = 2*i; j < N; j+=i)
-      b[j] = false;
-  }
-}
-
-template<std::size_t N>
-void by_ref_and_ptr(std::bitset<N> &ref, std::bitset<N> *ptr) {
-    // Check ref and ptr
-    return;
-}
-
-int main() {
-  std::bitset<0> empty;
-  std::bitset<13> small;
-  fill(small);
-  std::bitset<200> large;
-  fill(large);
-  by_ref_and_ptr(small, &small); // break here
-  by_ref_and_ptr(large, &large);
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/forward_list/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/forward_list/Makefile
deleted file mode 100644 (file)
index 680e1ab..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CXX_SOURCES := main.cpp
-
-USE_LIBCPP := 1
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/forward_list/TestDataFormatterLibcxxForwardList.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/forward_list/TestDataFormatterLibcxxForwardList.py
deleted file mode 100644 (file)
index a9983dd..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestDataFormatterLibcxxForwardList(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        TestBase.setUp(self)
-        self.line = line_number('main.cpp', '// break here')
-        ns = 'ndk' if lldbplatformutil.target_is_android() else ''
-        self.namespace = 'std::__' + ns + '1'
-
-    @add_test_categories(["libc++"])
-    def test(self):
-        """Test that std::forward_list is displayed correctly"""
-        self.build()
-        lldbutil.run_to_source_breakpoint(self, '// break here',
-                lldb.SBFileSpec("main.cpp", False))
-
-        forward_list = self.namespace + '::forward_list'
-        self.expect("frame variable empty",
-                    substrs=[forward_list,
-                             'size=0',
-                             '{}'])
-
-        self.expect("frame variable one_elt",
-                    substrs=[forward_list,
-                             'size=1',
-                             '{',
-                             '[0] = 47',
-                             '}'])
-
-        self.expect("frame variable five_elts",
-                    substrs=[forward_list,
-                             'size=5',
-                             '{',
-                             '[0] = 1',
-                             '[1] = 22',
-                             '[2] = 333',
-                             '[3] = 4444',
-                             '[4] = 55555',
-                             '}'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/forward_list/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/forward_list/main.cpp
deleted file mode 100644 (file)
index 73abda6..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <forward_list>
-
-int main()
-{
-  std::forward_list<int> empty{}, one_elt{47}, five_elts{1,22,333,4444,55555};
-  return 0; // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/Makefile
deleted file mode 100644 (file)
index b016f00..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-CXX_SOURCES := main.cpp
-CXXFLAGS_EXTRAS := -std=c++11
-USE_LIBCPP := 1
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/TestLibCxxFunction.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/TestLibCxxFunction.py
deleted file mode 100644 (file)
index 9f0d3e4..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class LibCxxFunctionTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # Run frame var for a variable twice. Verify we do not hit the cache
-    # the first time but do the second time.
-    def run_frame_var_check_cache_use(self, variable, result_to_match, skip_find_function=False):
-        self.runCmd("log timers reset")
-        self.expect("frame variable " + variable,
-                    substrs=[variable + " =  " + result_to_match])
-        if not skip_find_function:
-          self.expect("log timers dump",
-                   substrs=["lldb_private::CompileUnit::FindFunction"])
-
-        self.runCmd("log timers reset")
-        self.expect("frame variable " + variable,
-                    substrs=[variable + " =  " + result_to_match])
-        self.expect("log timers dump",
-                   matching=False,
-                   substrs=["lldb_private::CompileUnit::FindFunction"])
-
-
-    @add_test_categories(["libc++"])
-    def test(self):
-        """Test that std::function as defined by libc++ is correctly printed by LLDB"""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        bkpt = self.target().FindBreakpointByID(
-            lldbutil.run_break_set_by_source_regexp(
-                self, "Set break point at this line."))
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        self.run_frame_var_check_cache_use("foo2_f", "Lambda in File main.cpp at Line 30")
-
-        lldbutil.continue_to_breakpoint(self.process(), bkpt)
-
-        self.run_frame_var_check_cache_use("add_num2_f", "Lambda in File main.cpp at Line 21")
-
-        lldbutil.continue_to_breakpoint(self.process(), bkpt)
-
-        self.run_frame_var_check_cache_use("f2", "Lambda in File main.cpp at Line 43")
-        self.run_frame_var_check_cache_use("f3", "Lambda in File main.cpp at Line 47", True)
-        # TODO reenable this case when std::function formatter supports
-        # general callable object case.
-        #self.run_frame_var_check_cache_use("f4", "Function in File main.cpp at Line 16")
-
-        # These cases won't hit the cache at all but also don't require
-        # an expensive lookup.
-        self.expect("frame variable f1",
-                    substrs=['f1 =  Function = foo(int, int)'])
-
-        self.expect("frame variable f5",
-                    substrs=['f5 =  Function = Bar::add_num(int) const'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/main.cpp
deleted file mode 100644 (file)
index d0c931d..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-//===-- main.cpp --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <functional>
-
-int foo(int x, int y) {
-  return x + y - 1;
-}
-
-struct Bar {
-   int operator()() {
-       return 66 ;
-   }
-   int add_num(int i) const { return i + 3 ; }
-   int add_num2(int i) {
-     std::function<int (int)> add_num2_f = [](int x) {
-         return x+1;
-      };
-
-      return add_num2_f(i); // Set break point at this line.
-   }
-} ;
-
-int foo2() {
-   auto f = [](int x) {
-       return x+1;
-   };
-
-   std::function<int (int)> foo2_f = f;
-
-   return foo2_f(10); // Set break point at this line.
-}
-
-int main (int argc, char *argv[])
-{
-  int acc = 42;
-  std::function<int (int,int)> f1 = foo;
-  std::function<int (int)> f2 = [acc,f1] (int x) -> int {
-    return x+f1(acc,x);
-  };
-
-  auto f = [](int x, int y) { return x + y; };
-  auto g = [](int x, int y) { return x * y; } ;
-  std::function<int (int,int)> f3 =  argc %2 ? f : g ;
-
-  Bar bar1 ;
-  std::function<int ()> f4( bar1 ) ;
-  std::function<int (const Bar&, int)> f5 = &Bar::add_num;
-
-  int foo2_result = foo2();
-  int bar_add_num2_result = bar1.add_num2(10);
-
-  return f1(acc,acc) + f2(acc) + f3(acc+1,acc+2) + f4() + f5(bar1, 10); // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/Makefile
deleted file mode 100644 (file)
index e78030c..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CXX_SOURCES := main.cpp
-CXXFLAGS_EXTRAS := -std=c++11
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/TestInitializerList.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/TestInitializerList.py
deleted file mode 100644 (file)
index 5fef10e..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class InitializerListTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfWindows  # libc++ not ported to Windows yet
-    @skipIf(compiler="gcc")
-    @expectedFailureAll(
-        oslist=["linux"],
-        bugnumber="fails on clang 3.5 and tot")
-    def test(self):
-        """Test that that file and class static variables display correctly."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        bkpt = self.target().FindBreakpointByID(
-            lldbutil.run_break_set_by_source_regexp(
-                self, "Set break point at this line."))
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        lldbutil.skip_if_library_missing(
-            self, self.target(), lldbutil.PrintableRegex("libc\+\+"))
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        self.expect("frame variable ili", substrs=['[1] = 2', '[4] = 5'])
-        self.expect("frame variable ils", substrs=[
-                    '[4] = "surprise it is a long string!! yay!!"'])
-
-        self.expect('image list', substrs=self.getLibcPlusPlusLibs())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/main.cpp
deleted file mode 100644 (file)
index 6e5fa43..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-//===-- main.cpp --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <string>
-#include <vector>
-#include <initializer_list>
-
-int main ()
-{
-    std::initializer_list<int> ili{1,2,3,4,5};
-    std::initializer_list<std::string> ils{"1","2","3","4","surprise it is a long string!! yay!!"};
-    
-    return 0; // Set break point at this line.
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/Makefile
deleted file mode 100644 (file)
index 564cbad..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CXX_SOURCES := main.cpp
-
-USE_LIBCPP := 1
-
-CXXFLAGS_EXTRAS := -O0
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/TestDataFormatterLibccIterator.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/TestDataFormatterLibccIterator.py
deleted file mode 100644 (file)
index 2ff3d63..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class LibcxxIteratorDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-        ns = 'ndk' if lldbplatformutil.target_is_android() else ''
-        self.namespace = 'std::__' + ns + '1'
-
-    @add_test_categories(["libc++"])
-    def test_with_run_command(self):
-        """Test that libc++ iterators format properly."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=-1)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type filter clear', check=False)
-            self.runCmd('type synth clear', check=False)
-            self.runCmd(
-                "settings set target.max-children-count 256",
-                check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.expect('frame variable ivI', substrs=['item = 3'])
-        self.expect('expr ivI', substrs=['item = 3'])
-
-        self.expect(
-            'frame variable iimI',
-            substrs=[
-                'first = 43981',
-                'second = 61681'])
-        self.expect('expr iimI', substrs=['first = 43981', 'second = 61681'])
-
-        self.expect(
-            'frame variable simI',
-            substrs=[
-                'first = "world"',
-                'second = 42'])
-        self.expect('expr simI', substrs=['first = "world"', 'second = 42'])
-
-        self.expect('frame variable svI', substrs=['item = "hello"'])
-        self.expect('expr svI', substrs=['item = "hello"'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/main.cpp
deleted file mode 100644 (file)
index 9d1cbfd..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#include <string>
-#include <map>
-#include <vector>
-
-typedef std::map<int, int> intint_map;
-typedef std::map<std::string, int> strint_map;
-
-typedef std::vector<int> int_vector;
-typedef std::vector<std::string> string_vector;
-
-typedef intint_map::iterator iimter;
-typedef strint_map::iterator simter;
-
-typedef int_vector::iterator ivter;
-typedef string_vector::iterator svter;
-
-int main()
-{
-       intint_map iim;
-       iim[0xABCD] = 0xF0F1;
-
-       strint_map sim;
-       sim["world"] = 42;
-
-       int_vector iv;
-       iv.push_back(3);
-
-       string_vector sv;
-       sv.push_back("hello");
-
-       iimter iimI = iim.begin();
-       simter simI = sim.begin();
-
-       ivter ivI = iv.begin();
-       svter svI = sv.begin();
-
-       return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/Makefile
deleted file mode 100644 (file)
index 564cbad..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CXX_SOURCES := main.cpp
-
-USE_LIBCPP := 1
-
-CXXFLAGS_EXTRAS := -O0
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py
deleted file mode 100644 (file)
index 3a2d006..0000000
+++ /dev/null
@@ -1,220 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class LibcxxListDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-        self.line2 = line_number('main.cpp',
-                                 '// Set second break point at this line.')
-        self.line3 = line_number('main.cpp',
-                                 '// Set third break point at this line.')
-        self.line4 = line_number('main.cpp',
-                                 '// Set fourth break point at this line.')
-
-    @add_test_categories(["libc++"])
-    @skipIf(debug_info="gmodules",
-            bugnumber="https://bugs.llvm.org/show_bug.cgi?id=36048")
-    def test_with_run_command(self):
-        """Test that that file and class static variables display correctly."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=-1)
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line2, num_expected_locations=-1)
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line3, num_expected_locations=-1)
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line4, num_expected_locations=-1)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        lldbutil.skip_if_library_missing(
-            self, self.target(), lldbutil.PrintableRegex("libc\+\+"))
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type filter clear', check=False)
-            self.runCmd('type synth clear', check=False)
-            self.runCmd(
-                "settings set target.max-children-count 256",
-                check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.runCmd("frame variable numbers_list --show-types")
-        self.runCmd(
-            "type summary add std::int_list std::string_list int_list string_list --summary-string \"list has ${svar%#} items\" -e")
-        self.runCmd("type format add -f hex int")
-
-        self.expect("frame variable numbers_list --raw", matching=False,
-                    substrs=['list has 0 items',
-                             '{}'])
-
-        self.expect("frame variable numbers_list",
-                    substrs=['list has 0 items',
-                             '{}'])
-
-        self.expect("p numbers_list",
-                    substrs=['list has 0 items',
-                             '{}'])
-
-        self.runCmd("n") # This gets up past the printf
-        self.runCmd("n") # Now advance over the first push_back.
-
-        self.expect("frame variable numbers_list",
-                    substrs=['list has 1 items',
-                             '[0] = ',
-                             '0x12345678'])
-
-        self.runCmd("n")
-        self.runCmd("n")
-        self.runCmd("n")
-
-        self.expect("frame variable numbers_list",
-                    substrs=['list has 4 items',
-                             '[0] = ',
-                             '0x12345678',
-                             '[1] =',
-                             '0x11223344',
-                             '[2] =',
-                             '0xbeeffeed',
-                             '[3] =',
-                             '0x00abba00'])
-
-        self.runCmd("n")
-        self.runCmd("n")
-
-        self.expect("frame variable numbers_list",
-                    substrs=['list has 6 items',
-                             '[0] = ',
-                             '0x12345678',
-                             '0x11223344',
-                             '0xbeeffeed',
-                             '0x00abba00',
-                             '[4] =',
-                             '0x0abcdef0',
-                             '[5] =',
-                             '0x0cab0cab'])
-
-        self.expect("p numbers_list",
-                    substrs=['list has 6 items',
-                             '[0] = ',
-                             '0x12345678',
-                             '0x11223344',
-                             '0xbeeffeed',
-                             '0x00abba00',
-                             '[4] =',
-                             '0x0abcdef0',
-                             '[5] =',
-                             '0x0cab0cab'])
-
-        # check access-by-index
-        self.expect("frame variable numbers_list[0]",
-                    substrs=['0x12345678'])
-        self.expect("frame variable numbers_list[1]",
-                    substrs=['0x11223344'])
-
-        self.runCmd("n")
-
-        self.expect("frame variable numbers_list",
-                    substrs=['list has 0 items',
-                             '{}'])
-
-        self.runCmd("n")
-        self.runCmd("n")
-        self.runCmd("n")
-        self.runCmd("n")
-
-        self.expect("frame variable numbers_list",
-                    substrs=['list has 4 items',
-                             '[0] = ', '1',
-                             '[1] = ', '2',
-                             '[2] = ', '3',
-                             '[3] = ', '4'])
-
-        ListPtr = self.frame().FindVariable("list_ptr")
-        self.assertTrue(ListPtr.GetChildAtIndex(
-            0).GetValueAsUnsigned(0) == 1, "[0] = 1")
-
-        # check that MightHaveChildren() gets it right
-        self.assertTrue(
-            self.frame().FindVariable("numbers_list").MightHaveChildren(),
-            "numbers_list.MightHaveChildren() says False for non empty!")
-
-        self.runCmd("type format delete int")
-
-        self.runCmd("c")
-
-        self.expect("frame variable text_list",
-                    substrs=['list has 3 items',
-                             '[0]', 'goofy',
-                             '[1]', 'is',
-                             '[2]', 'smart'])
-
-        # check that MightHaveChildren() gets it right
-        self.assertTrue(
-            self.frame().FindVariable("text_list").MightHaveChildren(),
-            "text_list.MightHaveChildren() says False for non empty!")
-
-        self.expect("p text_list",
-                    substrs=['list has 3 items',
-                             '\"goofy\"',
-                             '\"is\"',
-                             '\"smart\"'])
-
-        self.runCmd("n") # This gets us past the printf
-        self.runCmd("n")
-        self.runCmd("n")
-
-        # check access-by-index
-        self.expect("frame variable text_list[0]",
-                    substrs=['goofy'])
-        self.expect("frame variable text_list[3]",
-                    substrs=['!!!'])
-
-        self.runCmd("continue")
-
-        # check that the list provider correctly updates if elements move
-        countingList = self.frame().FindVariable("countingList")
-        countingList.SetPreferDynamicValue(True)
-        countingList.SetPreferSyntheticValue(True)
-
-        self.assertTrue(countingList.GetChildAtIndex(
-            0).GetValueAsUnsigned(0) == 3141, "list[0] == 3141")
-        self.assertTrue(countingList.GetChildAtIndex(
-            1).GetValueAsUnsigned(0) == 3141, "list[1] == 3141")
-
-        self.runCmd("continue")
-
-        self.assertTrue(
-            countingList.GetChildAtIndex(0).GetValueAsUnsigned(0) == 3141,
-            "uniqued list[0] == 3141")
-        self.assertTrue(
-            countingList.GetChildAtIndex(1).GetValueAsUnsigned(0) == 3142,
-            "uniqued list[1] == 3142")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/Makefile
deleted file mode 100644 (file)
index 564cbad..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CXX_SOURCES := main.cpp
-
-USE_LIBCPP := 1
-
-CXXFLAGS_EXTRAS := -O0
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/TestDataFormatterLibcxxListLoop.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/TestDataFormatterLibcxxListLoop.py
deleted file mode 100644 (file)
index 1678c51..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-"""
-Test that the debugger handles loops in std::list (which can appear as a result of e.g. memory
-corruption).
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class LibcxxListDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @add_test_categories(["libc++"])
-    @expectedFailureAndroid(bugnumber="llvm.org/pr32592")
-    def test_with_run_command(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target and target.IsValid(), "Target is valid")
-
-        file_spec = lldb.SBFileSpec("main.cpp", False)
-        breakpoint1 = target.BreakpointCreateBySourceRegex(
-            '// Set break point at this line.', file_spec)
-        self.assertTrue(breakpoint1 and breakpoint1.IsValid())
-        breakpoint2 = target.BreakpointCreateBySourceRegex(
-            '// Set second break point at this line.', file_spec)
-        self.assertTrue(breakpoint2 and breakpoint2.IsValid())
-
-        # Run the program, it should stop at breakpoint 1.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process and process.IsValid(), PROCESS_IS_VALID)
-        self.assertEqual(
-            len(lldbutil.get_threads_stopped_at_breakpoint(process, breakpoint1)), 1)
-
-        # verify our list is displayed correctly
-        self.expect(
-            "frame variable *numbers_list",
-            substrs=[
-                '[0] = 1',
-                '[1] = 2',
-                '[2] = 3',
-                '[3] = 4',
-                '[5] = 6'])
-
-        # Continue to breakpoint 2.
-        process.Continue()
-        self.assertTrue(process and process.IsValid(), PROCESS_IS_VALID)
-        self.assertEqual(
-            len(lldbutil.get_threads_stopped_at_breakpoint(process, breakpoint2)), 1)
-
-        # The list is now inconsistent. However, we should be able to get the first three
-        # elements at least (and most importantly, not crash).
-        self.expect(
-            "frame variable *numbers_list",
-            substrs=[
-                '[0] = 1',
-                '[1] = 2',
-                '[2] = 3'])
-
-        # Run to completion.
-        process.Continue()
-        self.assertEqual(process.GetState(), lldb.eStateExited, PROCESS_EXITED)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/main.cpp
deleted file mode 100644 (file)
index e07e938..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-// Evil hack: To simulate memory corruption, we want to fiddle with some internals of std::list.
-// Make those accessible to us.
-#define private public
-#define protected public
-
-#include <list>
-#include <stdio.h>
-#include <assert.h>
-
-typedef std::list<int> int_list;
-
-int main()
-{
-#ifdef LLDB_USING_LIBCPP
-    int_list *numbers_list = new int_list{1,2,3,4,5,6,7,8,9,10};
-
-    printf("// Set break point at this line.");
-
-#if _LIBCPP_VERSION >= 3800
-    auto *third_elem = numbers_list->__end_.__next_->__next_->__next_;
-    assert(third_elem->__as_node()->__value_ == 3);
-    auto *fifth_elem = third_elem->__next_->__next_;
-    assert(fifth_elem->__as_node()->__value_ == 5);
-#else
-    auto *third_elem = numbers_list->__end_.__next_->__next_->__next_;
-    assert(third_elem->__value_ == 3);
-    auto *fifth_elem = third_elem->__next_->__next_;
-    assert(fifth_elem->__value_ == 5);
-#endif
-    fifth_elem->__next_ = third_elem;
-#endif
-
-    // Any attempt to free the list will probably crash the program. Let's just leak it.
-    return 0; // Set second break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/main.cpp
deleted file mode 100644 (file)
index a3ef06b..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#include <string>
-#include <list>
-#include <stdio.h>
-
-typedef std::list<int> int_list;
-typedef std::list<std::string> string_list;
-
-int main()
-{
-    int_list numbers_list;
-    std::list<int>* list_ptr = &numbers_list;
-
-    printf("// Set break point at this line.");
-    (numbers_list.push_back(0x12345678));
-    (numbers_list.push_back(0x11223344));
-    (numbers_list.push_back(0xBEEFFEED));
-    (numbers_list.push_back(0x00ABBA00));
-    (numbers_list.push_back(0x0ABCDEF0));
-    (numbers_list.push_back(0x0CAB0CAB));
-    
-    numbers_list.clear();
-    
-    (numbers_list.push_back(1));
-    (numbers_list.push_back(2));
-    (numbers_list.push_back(3));
-    (numbers_list.push_back(4));
-    
-    string_list text_list;
-    (text_list.push_back(std::string("goofy")));
-    (text_list.push_back(std::string("is")));
-    (text_list.push_back(std::string("smart")));
-    
-    printf("// Set second break point at this line.");
-    (text_list.push_back(std::string("!!!"))); 
-    
-    std::list<int> countingList = {3141, 3142, 3142,3142,3142, 3142, 3142, 3141};
-    countingList.sort();
-    printf("// Set third break point at this line.");
-    countingList.unique();
-    printf("// Set fourth break point at this line.");
-    countingList.size();
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/Makefile
deleted file mode 100644 (file)
index 564cbad..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CXX_SOURCES := main.cpp
-
-USE_LIBCPP := 1
-
-CXXFLAGS_EXTRAS := -O0
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py
deleted file mode 100644 (file)
index d9da0c3..0000000
+++ /dev/null
@@ -1,324 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class LibcxxMapDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        TestBase.setUp(self)
-        ns = 'ndk' if lldbplatformutil.target_is_android() else ''
-        self.namespace = 'std::__' + ns + '1'
-
-    @add_test_categories(["libc++"])
-    def test_with_run_command(self):
-        """Test that that file and class static variables display correctly."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        bkpt = self.target().FindBreakpointByID(
-            lldbutil.run_break_set_by_source_regexp(
-                self, "Set break point at this line."))
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type filter clear', check=False)
-            self.runCmd('type synth clear', check=False)
-            self.runCmd(
-                "settings set target.max-children-count 256",
-                check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        ns = self.namespace
-        self.expect('p ii',
-                    substrs=['%s::map' % ns,
-                             'size=0',
-                             '{}'])
-        self.expect('frame var ii',
-                    substrs=['%s::map' % ns,
-                             'size=0',
-                             '{}'])
-
-        lldbutil.continue_to_breakpoint(self.process(), bkpt)
-
-        self.expect('p ii',
-                    substrs=['%s::map' % ns, 'size=2',
-                             '[0] = ',
-                             'first = 0',
-                             'second = 0',
-                             '[1] = ',
-                             'first = 1',
-                             'second = 1'])
-
-        self.expect('frame variable ii',
-                    substrs=['%s::map' % ns, 'size=2',
-                             '[0] = ',
-                             'first = 0',
-                             'second = 0',
-                             '[1] = ',
-                             'first = 1',
-                             'second = 1'])
-
-        lldbutil.continue_to_breakpoint(self.process(), bkpt)
-
-        self.expect('frame variable ii',
-                    substrs=['%s::map' % ns, 'size=4',
-                             '[2] = ',
-                             'first = 2',
-                             'second = 0',
-                             '[3] = ',
-                             'first = 3',
-                             'second = 1'])
-
-        lldbutil.continue_to_breakpoint(self.process(), bkpt)
-
-        self.expect("p ii",
-                    substrs=['%s::map' % ns, 'size=8',
-                             '[5] = ',
-                             'first = 5',
-                             'second = 0',
-                             '[7] = ',
-                             'first = 7',
-                             'second = 1'])
-
-        self.expect("frame var ii",
-                    substrs=['%s::map' % ns, 'size=8',
-                             '[5] = ',
-                             'first = 5',
-                             'second = 0',
-                             '[7] = ',
-                             'first = 7',
-                             'second = 1'])
-
-        # check access-by-index
-        self.expect("frame variable ii[0]",
-                    substrs=['first = 0',
-                             'second = 0'])
-        self.expect("frame variable ii[3]",
-                    substrs=['first =',
-                             'second ='])
-
-        # check that MightHaveChildren() gets it right
-        self.assertTrue(
-            self.frame().FindVariable("ii").MightHaveChildren(),
-            "ii.MightHaveChildren() says False for non empty!")
-
-        # check that the expression parser does not make use of
-        # synthetic children instead of running code
-        # TOT clang has a fix for this, which makes the expression command here succeed
-        # since this would make the test fail or succeed depending on clang version in use
-        # this is safer commented for the time being
-        # self.expect("expression ii[8]", matching=False, error=True,
-        #            substrs = ['1234567'])
-
-        self.runCmd("continue")
-
-        self.expect('frame variable ii',
-                    substrs=['%s::map' % ns, 'size=0',
-                             '{}'])
-
-        self.expect('frame variable si',
-                    substrs=['%s::map' % ns, 'size=0',
-                             '{}'])
-
-        self.runCmd("continue")
-
-        self.expect('frame variable si',
-                    substrs=['%s::map' % ns, 'size=1',
-                             '[0] = ',
-                             'first = \"zero\"',
-                             'second = 0'])
-
-        lldbutil.continue_to_breakpoint(self.process(), bkpt)
-
-        self.expect("frame variable si",
-                    substrs=['%s::map' % ns, 'size=4',
-                             '[0] = ',
-                             'first = \"zero\"',
-                             'second = 0',
-                             '[1] = ',
-                             'first = \"one\"',
-                             'second = 1',
-                             '[2] = ',
-                             'first = \"two\"',
-                             'second = 2',
-                             '[3] = ',
-                             'first = \"three\"',
-                             'second = 3'])
-
-        self.expect("p si",
-                    substrs=['%s::map' % ns, 'size=4',
-                             '[0] = ',
-                             'first = \"zero\"',
-                             'second = 0',
-                             '[1] = ',
-                             'first = \"one\"',
-                             'second = 1',
-                             '[2] = ',
-                             'first = \"two\"',
-                             'second = 2',
-                             '[3] = ',
-                             'first = \"three\"',
-                             'second = 3'])
-
-        # check that MightHaveChildren() gets it right
-        self.assertTrue(
-            self.frame().FindVariable("si").MightHaveChildren(),
-            "si.MightHaveChildren() says False for non empty!")
-
-        # check access-by-index
-        self.expect("frame variable si[0]",
-                    substrs=['first = ', 'one',
-                             'second = 1'])
-
-        # check that the expression parser does not make use of
-        # synthetic children instead of running code
-        # TOT clang has a fix for this, which makes the expression command here succeed
-        # since this would make the test fail or succeed depending on clang version in use
-        # this is safer commented for the time being
-        # self.expect("expression si[0]", matching=False, error=True,
-        #            substrs = ['first = ', 'zero'])
-
-        lldbutil.continue_to_breakpoint(self.process(), bkpt)
-
-        self.expect('frame variable si',
-                    substrs=['%s::map' % ns, 'size=0',
-                             '{}'])
-
-        lldbutil.continue_to_breakpoint(self.process(), bkpt)
-
-        self.expect('frame variable is',
-                    substrs=['%s::map' % ns, 'size=0',
-                             '{}'])
-
-        lldbutil.continue_to_breakpoint(self.process(), bkpt)
-
-        self.expect("frame variable is",
-                    substrs=['%s::map' % ns, 'size=4',
-                             '[0] = ',
-                             'second = \"goofy\"',
-                             'first = 85',
-                             '[1] = ',
-                             'second = \"is\"',
-                             'first = 1',
-                             '[2] = ',
-                             'second = \"smart\"',
-                             'first = 2',
-                             '[3] = ',
-                             'second = \"!!!\"',
-                             'first = 3'])
-
-        self.expect("p is",
-                    substrs=['%s::map' % ns, 'size=4',
-                             '[0] = ',
-                             'second = \"goofy\"',
-                             'first = 85',
-                             '[1] = ',
-                             'second = \"is\"',
-                             'first = 1',
-                             '[2] = ',
-                             'second = \"smart\"',
-                             'first = 2',
-                             '[3] = ',
-                             'second = \"!!!\"',
-                             'first = 3'])
-
-        # check that MightHaveChildren() gets it right
-        self.assertTrue(
-            self.frame().FindVariable("is").MightHaveChildren(),
-            "is.MightHaveChildren() says False for non empty!")
-
-        # check access-by-index
-        self.expect("frame variable is[0]",
-                    substrs=['first = ',
-                             'second ='])
-
-        # check that the expression parser does not make use of
-        # synthetic children instead of running code
-        # TOT clang has a fix for this, which makes the expression command here succeed
-        # since this would make the test fail or succeed depending on clang version in use
-        # this is safer commented for the time being
-        # self.expect("expression is[0]", matching=False, error=True,
-        #            substrs = ['first = ', 'goofy'])
-
-        lldbutil.continue_to_breakpoint(self.process(), bkpt)
-
-        self.expect('frame variable is',
-                    substrs=['%s::map' % ns, 'size=0',
-                             '{}'])
-
-        lldbutil.continue_to_breakpoint(self.process(), bkpt)
-
-        self.expect('frame variable ss',
-                    substrs=['%s::map' % ns, 'size=0',
-                             '{}'])
-
-        lldbutil.continue_to_breakpoint(self.process(), bkpt)
-
-        self.expect("frame variable ss",
-                    substrs=['%s::map' % ns, 'size=3',
-                             '[0] = ',
-                             'second = \"hello\"',
-                             'first = \"ciao\"',
-                             '[1] = ',
-                             'second = \"house\"',
-                             'first = \"casa\"',
-                             '[2] = ',
-                             'second = \"cat\"',
-                             'first = \"gatto\"'])
-
-        self.expect("p ss",
-                    substrs=['%s::map' % ns, 'size=3',
-                             '[0] = ',
-                             'second = \"hello\"',
-                             'first = \"ciao\"',
-                             '[1] = ',
-                             'second = \"house\"',
-                             'first = \"casa\"',
-                             '[2] = ',
-                             'second = \"cat\"',
-                             'first = \"gatto\"'])
-
-        # check that MightHaveChildren() gets it right
-        self.assertTrue(
-            self.frame().FindVariable("ss").MightHaveChildren(),
-            "ss.MightHaveChildren() says False for non empty!")
-
-        # check access-by-index
-        self.expect("frame variable ss[2]",
-                    substrs=['gatto', 'cat'])
-
-        # check that the expression parser does not make use of
-        # synthetic children instead of running code
-        # TOT clang has a fix for this, which makes the expression command here succeed
-        # since this would make the test fail or succeed depending on clang version in use
-        # this is safer commented for the time being
-        # self.expect("expression ss[3]", matching=False, error=True,
-        #            substrs = ['gatto'])
-
-        lldbutil.continue_to_breakpoint(self.process(), bkpt)
-
-        self.expect('frame variable ss',
-                    substrs=['%s::map' % ns, 'size=0',
-                             '{}'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/main.cpp
deleted file mode 100644 (file)
index da6eca9..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-#include <string>
-#include <map>
-
-#define intint_map std::map<int, int> 
-#define strint_map std::map<std::string, int> 
-#define intstr_map std::map<int, std::string> 
-#define strstr_map std::map<std::string, std::string> 
-
-int g_the_foo = 0;
-
-int thefoo_rw(int arg = 1)
-{
-       if (arg < 0)
-               arg = 0;
-       if (!arg)
-               arg = 1;
-       g_the_foo += arg;
-       return g_the_foo;
-}
-
-int main()
-{
-    intint_map ii;
-    
-    ii[0] = 0; // Set break point at this line.
-    ii[1] = 1;
-       thefoo_rw(1);  // Set break point at this line.
-    ii[2] = 0;
-    ii[3] = 1;
-       thefoo_rw(1);  // Set break point at this line.
-       ii[4] = 0;
-    ii[5] = 1;
-    ii[6] = 0;
-    ii[7] = 1;
-    thefoo_rw(1);  // Set break point at this line.
-    ii[85] = 1234567;
-
-    ii.clear();
-    
-    strint_map si;
-    thefoo_rw(1);  // Set break point at this line.
-       
-    si["zero"] = 0;
-       thefoo_rw(1);  // Set break point at this line.
-    si["one"] = 1;
-    si["two"] = 2;
-    si["three"] = 3;
-       thefoo_rw(1);  // Set break point at this line.
-    si["four"] = 4;
-
-    si.clear();
-    thefoo_rw(1);  // Set break point at this line.
-       
-    intstr_map is;
-    thefoo_rw(1);  // Set break point at this line.
-    is[85] = "goofy";
-    is[1] = "is";
-    is[2] = "smart";
-    is[3] = "!!!";
-    thefoo_rw(1);  // Set break point at this line.
-       
-    is.clear();
-    thefoo_rw(1);  // Set break point at this line.
-       
-    strstr_map ss;
-    thefoo_rw(1);  // Set break point at this line.
-       
-    ss["ciao"] = "hello";
-    ss["casa"] = "house";
-    ss["gatto"] = "cat";
-    thefoo_rw(1);  // Set break point at this line.
-    ss["a Mac.."] = "..is always a Mac!";
-    
-    ss.clear();
-    thefoo_rw(1);  // Set break point at this line.    
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/Makefile
deleted file mode 100644 (file)
index 564cbad..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CXX_SOURCES := main.cpp
-
-USE_LIBCPP := 1
-
-CXXFLAGS_EXTRAS := -O0
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/TestDataFormatterLibccMultiMap.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/TestDataFormatterLibccMultiMap.py
deleted file mode 100644 (file)
index 39adc04..0000000
+++ /dev/null
@@ -1,311 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class LibcxxMultiMapDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        TestBase.setUp(self)
-        ns = 'ndk' if lldbplatformutil.target_is_android() else ''
-        self.namespace = 'std::__' + ns + '1'
-
-    @add_test_categories(["libc++"])
-    def test_with_run_command(self):
-        """Test that that file and class static variables display correctly."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        bkpt = self.target().FindBreakpointByID(
-            lldbutil.run_break_set_by_source_regexp(
-                self, "Set break point at this line."))
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type filter clear', check=False)
-            self.runCmd('type synth clear', check=False)
-            self.runCmd(
-                "settings set target.max-children-count 256",
-                check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        multimap = self.namespace + "::multimap"
-        self.expect('frame variable ii',
-                    substrs=[multimap, 'size=0',
-                             '{}'])
-
-        lldbutil.continue_to_breakpoint(self.process(), bkpt)
-
-        self.expect('frame variable ii',
-                    substrs=[multimap, 'size=2',
-                             '[0] = ',
-                             'first = 0',
-                             'second = 0',
-                             '[1] = ',
-                             'first = 1',
-                             'second = 1'])
-
-        lldbutil.continue_to_breakpoint(self.process(), bkpt)
-
-        self.expect('frame variable ii',
-                    substrs=[multimap, 'size=4',
-                             '[2] = ',
-                             'first = 2',
-                             'second = 0',
-                             '[3] = ',
-                             'first = 3',
-                             'second = 1'])
-
-        lldbutil.continue_to_breakpoint(self.process(), bkpt)
-
-        self.expect("frame variable ii",
-                    substrs=[multimap, 'size=8',
-                             '[5] = ',
-                             'first = 5',
-                             'second = 0',
-                             '[7] = ',
-                             'first = 7',
-                             'second = 1'])
-
-        self.expect("p ii",
-                    substrs=[multimap, 'size=8',
-                             '[5] = ',
-                             'first = 5',
-                             'second = 0',
-                             '[7] = ',
-                             'first = 7',
-                             'second = 1'])
-
-        # check access-by-index
-        self.expect("frame variable ii[0]",
-                    substrs=['first = 0',
-                             'second = 0'])
-        self.expect("frame variable ii[3]",
-                    substrs=['first =',
-                             'second ='])
-
-        # check that MightHaveChildren() gets it right
-        self.assertTrue(
-            self.frame().FindVariable("ii").MightHaveChildren(),
-            "ii.MightHaveChildren() says False for non empty!")
-
-        # check that the expression parser does not make use of
-        # synthetic children instead of running code
-        # TOT clang has a fix for this, which makes the expression command here succeed
-        # since this would make the test fail or succeed depending on clang version in use
-        # this is safer commented for the time being
-        # self.expect("expression ii[8]", matching=False, error=True,
-        #            substrs = ['1234567'])
-
-        lldbutil.continue_to_breakpoint(self.process(), bkpt)
-
-        self.expect('frame variable ii',
-                    substrs=[multimap, 'size=0',
-                             '{}'])
-
-        self.expect('frame variable si',
-                    substrs=[multimap, 'size=0',
-                             '{}'])
-
-        lldbutil.continue_to_breakpoint(self.process(), bkpt)
-
-        self.expect('frame variable si',
-                    substrs=[multimap, 'size=1',
-                             '[0] = ',
-                             'first = \"zero\"',
-                             'second = 0'])
-
-        lldbutil.continue_to_breakpoint(self.process(), bkpt)
-
-        self.expect("frame variable si",
-                    substrs=[multimap, 'size=4',
-                             '[0] = ',
-                             'first = \"zero\"',
-                             'second = 0',
-                             '[1] = ',
-                             'first = \"one\"',
-                             'second = 1',
-                             '[2] = ',
-                             'first = \"two\"',
-                             'second = 2',
-                             '[3] = ',
-                             'first = \"three\"',
-                             'second = 3'])
-
-        self.expect("p si",
-                    substrs=[multimap, 'size=4',
-                             '[0] = ',
-                             'first = \"zero\"',
-                             'second = 0',
-                             '[1] = ',
-                             'first = \"one\"',
-                             'second = 1',
-                             '[2] = ',
-                             'first = \"two\"',
-                             'second = 2',
-                             '[3] = ',
-                             'first = \"three\"',
-                             'second = 3'])
-
-        # check that MightHaveChildren() gets it right
-        self.assertTrue(
-            self.frame().FindVariable("si").MightHaveChildren(),
-            "si.MightHaveChildren() says False for non empty!")
-
-        # check access-by-index
-        self.expect("frame variable si[0]",
-                    substrs=['first = ', 'one',
-                             'second = 1'])
-
-        # check that the expression parser does not make use of
-        # synthetic children instead of running code
-        # TOT clang has a fix for this, which makes the expression command here succeed
-        # since this would make the test fail or succeed depending on clang version in use
-        # this is safer commented for the time being
-        # self.expect("expression si[0]", matching=False, error=True,
-        #            substrs = ['first = ', 'zero'])
-
-        lldbutil.continue_to_breakpoint(self.process(), bkpt)
-
-        self.expect('frame variable si',
-                    substrs=[multimap, 'size=0',
-                             '{}'])
-
-        lldbutil.continue_to_breakpoint(self.process(), bkpt)
-
-        self.expect('frame variable is',
-                    substrs=[multimap, 'size=0',
-                             '{}'])
-
-        lldbutil.continue_to_breakpoint(self.process(), bkpt)
-
-        self.expect("frame variable is",
-                    substrs=[multimap, 'size=4',
-                             '[0] = ',
-                             'second = \"goofy\"',
-                             'first = 85',
-                             '[1] = ',
-                             'second = \"is\"',
-                             'first = 1',
-                             '[2] = ',
-                             'second = \"smart\"',
-                             'first = 2',
-                             '[3] = ',
-                             'second = \"!!!\"',
-                             'first = 3'])
-
-        self.expect("p is",
-                    substrs=[multimap, 'size=4',
-                             '[0] = ',
-                             'second = \"goofy\"',
-                             'first = 85',
-                             '[1] = ',
-                             'second = \"is\"',
-                             'first = 1',
-                             '[2] = ',
-                             'second = \"smart\"',
-                             'first = 2',
-                             '[3] = ',
-                             'second = \"!!!\"',
-                             'first = 3'])
-
-        # check that MightHaveChildren() gets it right
-        self.assertTrue(
-            self.frame().FindVariable("is").MightHaveChildren(),
-            "is.MightHaveChildren() says False for non empty!")
-
-        # check access-by-index
-        self.expect("frame variable is[0]",
-                    substrs=['first = ',
-                             'second ='])
-
-        # check that the expression parser does not make use of
-        # synthetic children instead of running code
-        # TOT clang has a fix for this, which makes the expression command here succeed
-        # since this would make the test fail or succeed depending on clang version in use
-        # this is safer commented for the time being
-        # self.expect("expression is[0]", matching=False, error=True,
-        #            substrs = ['first = ', 'goofy'])
-
-        lldbutil.continue_to_breakpoint(self.process(), bkpt)
-
-        self.expect('frame variable is',
-                    substrs=[multimap, 'size=0',
-                             '{}'])
-
-        lldbutil.continue_to_breakpoint(self.process(), bkpt)
-
-        self.expect('frame variable ss',
-                    substrs=[multimap, 'size=0',
-                             '{}'])
-
-        lldbutil.continue_to_breakpoint(self.process(), bkpt)
-
-        self.expect("frame variable ss",
-                    substrs=[multimap, 'size=3',
-                             '[0] = ',
-                             'second = \"hello\"',
-                             'first = \"ciao\"',
-                             '[1] = ',
-                             'second = \"house\"',
-                             'first = \"casa\"',
-                             '[2] = ',
-                             'second = \"cat\"',
-                             'first = \"gatto\"'])
-
-        self.expect("p ss",
-                    substrs=[multimap, 'size=3',
-                             '[0] = ',
-                             'second = \"hello\"',
-                             'first = \"ciao\"',
-                             '[1] = ',
-                             'second = \"house\"',
-                             'first = \"casa\"',
-                             '[2] = ',
-                             'second = \"cat\"',
-                             'first = \"gatto\"'])
-
-        # check that MightHaveChildren() gets it right
-        self.assertTrue(
-            self.frame().FindVariable("ss").MightHaveChildren(),
-            "ss.MightHaveChildren() says False for non empty!")
-
-        # check access-by-index
-        self.expect("frame variable ss[2]",
-                    substrs=['gatto', 'cat'])
-
-        # check that the expression parser does not make use of
-        # synthetic children instead of running code
-        # TOT clang has a fix for this, which makes the expression command here succeed
-        # since this would make the test fail or succeed depending on clang version in use
-        # this is safer commented for the time being
-        # self.expect("expression ss[3]", matching=False, error=True,
-        #            substrs = ['gatto'])
-
-        lldbutil.continue_to_breakpoint(self.process(), bkpt)
-
-        self.expect('frame variable ss',
-                    substrs=[multimap, 'size=0',
-                             '{}'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/main.cpp
deleted file mode 100644 (file)
index 27bdc0a..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-#include <string>
-#include <map>
-
-#define intint_map std::multimap<int, int> 
-#define strint_map std::multimap<std::string, int> 
-#define intstr_map std::multimap<int, std::string> 
-#define strstr_map std::multimap<std::string, std::string> 
-
-int g_the_foo = 0;
-
-int thefoo_rw(int arg = 1)
-{
-       if (arg < 0)
-               arg = 0;
-       if (!arg)
-               arg = 1;
-       g_the_foo += arg;
-       return g_the_foo;
-}
-
-int main()
-{
-    intint_map ii;
-    
-    ii.emplace(0,0); // Set break point at this line.
-    ii.emplace(1,1);
-       thefoo_rw(1);  // Set break point at this line.
-    ii.emplace(2,0);
-       ii.emplace(3,1);
-       thefoo_rw(1);  // Set break point at this line.
-       ii.emplace(4,0);
-       ii.emplace(5,1);
-       ii.emplace(6,0);
-       ii.emplace(7,1);
-    thefoo_rw(1);  // Set break point at this line.
-    ii.emplace(85,1234567);
-
-    ii.clear();
-    
-    strint_map si;
-    thefoo_rw(1);  // Set break point at this line.
-       
-    si.emplace("zero",0);
-       thefoo_rw(1);  // Set break point at this line.
-       si.emplace("one",1);
-       si.emplace("two",2);
-       si.emplace("three",3);
-       thefoo_rw(1);  // Set break point at this line.
-       si.emplace("four",4);
-
-    si.clear();
-    thefoo_rw(1);  // Set break point at this line.
-       
-    intstr_map is;
-    thefoo_rw(1);  // Set break point at this line.
-    is.emplace(85,"goofy");
-    is.emplace(1,"is");
-    is.emplace(2,"smart");
-    is.emplace(3,"!!!");
-    thefoo_rw(1);  // Set break point at this line.
-       
-    is.clear();
-    thefoo_rw(1);  // Set break point at this line.
-       
-    strstr_map ss;
-    thefoo_rw(1);  // Set break point at this line.
-       
-    ss.emplace("ciao","hello");
-    ss.emplace("casa","house");
-    ss.emplace("gatto","cat");
-    thefoo_rw(1);  // Set break point at this line.
-    ss.emplace("a Mac..","..is always a Mac!");
-    
-    ss.clear();
-    thefoo_rw(1);  // Set break point at this line.    
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/Makefile
deleted file mode 100644 (file)
index 564cbad..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CXX_SOURCES := main.cpp
-
-USE_LIBCPP := 1
-
-CXXFLAGS_EXTRAS := -O0
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py
deleted file mode 100644 (file)
index 621b22a..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class LibcxxMultiSetDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        TestBase.setUp(self)
-        ns = 'ndk' if lldbplatformutil.target_is_android() else ''
-        self.namespace = 'std::__' + ns + '1'
-
-    def getVariableType(self, name):
-        var = self.frame().FindVariable(name)
-        self.assertTrue(var.IsValid())
-        return var.GetType().GetCanonicalType().GetName()
-
-    def check_ii(self, var_name):
-        """ This checks the value of the bitset stored in ii at the call to by_ref_and_ptr.
-            We use this to make sure we get the same values for ii when we look at the object
-            directly, and when we look at a reference to the object. """
-        self.expect(
-            "frame variable " + var_name,
-            substrs=["size=7",
-                     "[2] = 2",
-                     "[3] = 3",
-                     "[6] = 6"])
-        self.expect("frame variable " + var_name + "[2]", substrs=[" = 2"])
-        self.expect(
-            "p " + var_name,
-            substrs=[
-                "size=7",
-                "[2] = 2",
-                "[3] = 3",
-                "[6] = 6"])
-
-    @add_test_categories(["libc++"])
-    def test_with_run_command(self):
-        """Test that that file and class static variables display correctly."""
-        self.build()
-        (self.target, process, _, bkpt) = lldbutil.run_to_source_breakpoint(
-            self, "Set break point at this line.", lldb.SBFileSpec("main.cpp", False))
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type filter clear', check=False)
-            self.runCmd('type synth clear', check=False)
-            self.runCmd(
-                "settings set target.max-children-count 256",
-                check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        ii_type = self.getVariableType("ii")
-        self.assertTrue(ii_type.startswith(self.namespace + "::multiset"),
-                        "Type: " + ii_type)
-
-        self.expect("frame variable ii", substrs=["size=0", "{}"])
-        lldbutil.continue_to_breakpoint(process, bkpt)
-        self.expect(
-            "frame variable ii",
-            substrs=[
-                "size=6",
-                "[0] = 0",
-                "[1] = 1",
-                "[2] = 2",
-                "[3] = 3",
-                "[4] = 4",
-                "[5] = 5"])
-        lldbutil.continue_to_breakpoint(process, bkpt)
-
-        self.check_ii("ii")
-
-        lldbutil.continue_to_breakpoint(process, bkpt)
-        self.expect("frame variable ii", substrs=["size=0", "{}"])
-        lldbutil.continue_to_breakpoint(process, bkpt)
-        self.expect("frame variable ii", substrs=["size=0", "{}"])
-        ss_type = self.getVariableType("ss")
-        self.assertTrue(ss_type.startswith(self.namespace + "::multiset"),
-                        "Type: " + ss_type)
-        self.expect("frame variable ss", substrs=["size=0", "{}"])
-        lldbutil.continue_to_breakpoint(process, bkpt)
-        self.expect(
-            "frame variable ss",
-            substrs=[
-                "size=2",
-                '[0] = "a"',
-                '[1] = "a very long string is right here"'])
-        lldbutil.continue_to_breakpoint(process, bkpt)
-        self.expect(
-            "frame variable ss",
-            substrs=[
-                "size=4",
-                '[2] = "b"',
-                '[3] = "c"',
-                '[0] = "a"',
-                '[1] = "a very long string is right here"'])
-        self.expect(
-            "p ss",
-            substrs=[
-                "size=4",
-                '[2] = "b"',
-                '[3] = "c"',
-                '[0] = "a"',
-                '[1] = "a very long string is right here"'])
-        self.expect("frame variable ss[2]", substrs=[' = "b"'])
-        lldbutil.continue_to_breakpoint(process, bkpt)
-        self.expect(
-            "frame variable ss",
-            substrs=[
-                "size=3",
-                '[0] = "a"',
-                '[1] = "a very long string is right here"',
-                '[2] = "c"'])
-
-    @add_test_categories(["libc++"])
-    def test_ref_and_ptr(self):
-        """Test that the data formatters work on ref and ptr."""
-        self.build()
-        (self.target, process, _, bkpt) = lldbutil.run_to_source_breakpoint(
-            self, "Stop here to check by ref and ptr.",
-            lldb.SBFileSpec("main.cpp", False))
-        # The reference should print just like the value:
-        self.check_ii("ref")
-
-        self.expect("frame variable ptr",
-                    substrs=["ptr =", "size=7"])
-        self.expect("expr ptr",
-                    substrs=["size=7"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/main.cpp
deleted file mode 100644 (file)
index dd3d8be..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-#include <string>
-#include <set>
-
-typedef std::multiset<int> intset;
-typedef std::multiset<std::string> stringset;
-
-int g_the_foo = 0;
-
-int thefoo_rw(int arg = 1)
-{
-       if (arg < 0)
-               arg = 0;
-       if (!arg)
-               arg = 1;
-       g_the_foo += arg;
-       return g_the_foo;
-}
-
-void by_ref_and_ptr(intset &ref, intset *ptr)
-{
-    // Stop here to check by ref and ptr
-    return;
-} 
-
-int main()
-{
-    intset ii;
-    thefoo_rw(1);  // Set break point at this line.
-       
-       ii.insert(0);
-       ii.insert(1);
-       ii.insert(2);
-       ii.insert(3);
-       ii.insert(4);
-       ii.insert(5);
-    thefoo_rw(1);  // Set break point at this line.
-
-       ii.insert(6);
-       thefoo_rw(1);  // Set break point at this line.
-
-        by_ref_and_ptr(ii, &ii);
-
-       ii.clear();
-       thefoo_rw(1);  // Set break point at this line.
-
-       stringset ss;
-       thefoo_rw(1);  // Set break point at this line.
-
-       ss.insert("a");
-       ss.insert("a very long string is right here");
-       thefoo_rw(1);  // Set break point at this line.
-
-       ss.insert("b");
-       ss.insert("c");
-       thefoo_rw(1);  // Set break point at this line.
-       
-       ss.erase("b");
-       thefoo_rw(1);  // Set break point at this line.
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/Makefile
deleted file mode 100644 (file)
index 23496eb..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CXX_SOURCES := main.cpp
-
-USE_LIBCPP := 1
-
-CXXFLAGS_EXTRAS := -std=c++17 -fno-exceptions
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/TestDataFormatterLibcxxOptional.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/TestDataFormatterLibcxxOptional.py
deleted file mode 100644 (file)
index f013d02..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class LibcxxOptionalDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(["libc++"])
-    ## We are skipping clang version less that 5.0 since this test requires -std=c++17
-    @skipIf(oslist=no_match(["macosx"]), compiler="clang", compiler_version=['<', '5.0'])
-    ## We are skipping gcc version less that 5.1 since this test requires -std=c++17
-    @skipIf(compiler="gcc", compiler_version=['<', '5.1'])
-
-    def test_with_run_command(self):
-        """Test that that file and class static variables display correctly."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        bkpt = self.target().FindBreakpointByID(
-            lldbutil.run_break_set_by_source_regexp(
-                self, "break here"))
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        self.runCmd( "frame variable has_optional" )
-
-        output = self.res.GetOutput()
-
-        ## The variable has_optional tells us if the test program
-        ## detected we have a sufficient libc++ version to support optional
-        ## false means we do not and therefore should skip the test
-        if output.find("(bool) has_optional = false") != -1 :
-           self.skipTest( "Optional not supported" ) 
-
-        lldbutil.continue_to_breakpoint(self.process(), bkpt)
-
-        self.expect("frame variable number_not_engaged",
-                    substrs=['Has Value=false'])
-
-        self.expect("frame variable number_engaged",
-                    substrs=['Has Value=true',
-                             'Value = 42',
-                             '}'])
-
-        self.expect("frame var numbers",
-                    substrs=['(optional_int_vect) numbers =  Has Value=true  {',
-                             'Value = size=4 {',
-                               '[0] = 1',
-                               '[1] = 2',
-                               '[2] = 3',
-                               '[3] = 4',
-                               '}',
-                             '}'])
-
-        self.expect("frame var ostring",
-                    substrs=['(optional_string) ostring =  Has Value=true  {',
-                        'Value = "hello"',
-                        '}'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/main.cpp
deleted file mode 100644 (file)
index 16bb98c..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#include <cstdio>
-#include <string>
-#include <vector>
-
-// If we have libc++ 4.0 or greater we should have <optional>
-// According to libc++ C++1z status page https://libcxx.llvm.org/cxx1z_status.html
-#if _LIBCPP_VERSION >= 4000
-#include <optional>
-#define HAVE_OPTIONAL 1
-#else
-#define HAVE_OPTIONAL 0
-#endif
-
-
-int main()
-{
-    bool has_optional = HAVE_OPTIONAL ;
-
-    printf( "%d\n", has_optional ) ; // break here
-
-#if HAVE_OPTIONAL == 1
-    using int_vect = std::vector<int> ;
-    using optional_int = std::optional<int> ;
-    using optional_int_vect = std::optional<int_vect> ;
-    using optional_string = std::optional<std::string> ;
-
-    optional_int number_not_engaged ;
-    optional_int number_engaged = 42 ;
-
-    printf( "%d\n", *number_engaged) ;
-
-    optional_int_vect numbers{{1,2,3,4}} ;
-
-    printf( "%d %d\n", numbers.value()[0], numbers.value()[1] ) ;
-
-    optional_string ostring = "hello" ;
-
-    printf( "%s\n", ostring->c_str() ) ;
-#endif
-
-    return 0; // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/queue/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/queue/Makefile
deleted file mode 100644 (file)
index 680e1ab..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CXX_SOURCES := main.cpp
-
-USE_LIBCPP := 1
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/queue/TestDataFormatterLibcxxQueue.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/queue/TestDataFormatterLibcxxQueue.py
deleted file mode 100644 (file)
index b163fa5..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestDataFormatterLibcxxQueue(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        TestBase.setUp(self)
-        ns = 'ndk' if lldbplatformutil.target_is_android() else ''
-        self.namespace = 'std::__' + ns + '1'
-
-    def check_variable(self, name):
-        var = self.frame().FindVariable(name)
-        self.assertTrue(var.IsValid())
-
-        queue = self.namespace + '::queue'
-        self.assertTrue(queue in var.GetTypeName())
-        self.assertEqual(var.GetNumChildren(), 5)
-        for i in range(5):
-            ch = var.GetChildAtIndex(i)
-            self.assertTrue(ch.IsValid())
-            self.assertEqual(ch.GetValueAsSigned(), i+1)
-
-    @expectedFailureAll(bugnumber="llvm.org/pr36109", debug_info="gmodules", triple=".*-android")
-    @add_test_categories(["libc++"])
-    def test(self):
-        """Test that std::queue is displayed correctly"""
-        self.build()
-        lldbutil.run_to_source_breakpoint(self, '// break here',
-                lldb.SBFileSpec("main.cpp", False))
-
-        self.check_variable('q1')
-        self.check_variable('q2')
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/queue/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/queue/main.cpp
deleted file mode 100644 (file)
index 449be8d..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#include <queue>
-#include <vector>
-
-using namespace std;
-
-int main() {
-  queue<int> q1{{1,2,3,4,5}};
-  queue<int, std::vector<int>> q2{{1,2,3,4,5}};
-  int ret = q1.size() + q2.size(); // break here
-  return ret;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/Makefile
deleted file mode 100644 (file)
index 564cbad..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CXX_SOURCES := main.cpp
-
-USE_LIBCPP := 1
-
-CXXFLAGS_EXTRAS := -O0
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py
deleted file mode 100644 (file)
index 738df85..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class LibcxxSetDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        TestBase.setUp(self)
-        ns = 'ndk' if lldbplatformutil.target_is_android() else ''
-        self.namespace = 'std::__' + ns + '1'
-
-    def getVariableType(self, name):
-        var = self.frame().FindVariable(name)
-        self.assertTrue(var.IsValid())
-        return var.GetType().GetCanonicalType().GetName()
-
-    def check_ii(self, var_name):
-        """ This checks the value of the bitset stored in ii at the call to by_ref_and_ptr.
-            We use this to make sure we get the same values for ii when we look at the object
-            directly, and when we look at a reference to the object. """
-        self.expect(
-            "frame variable " + var_name,
-            substrs=["size=7",
-                     "[2] = 2",
-                     "[3] = 3",
-                     "[6] = 6"])
-        self.expect("frame variable " + var_name + "[2]", substrs=[" = 2"])
-        self.expect(
-            "p " + var_name,
-            substrs=[
-                "size=7",
-                "[2] = 2",
-                "[3] = 3",
-                "[6] = 6"])
-
-    @add_test_categories(["libc++"])
-    def test_with_run_command(self):
-        """Test that that file and class static variables display correctly."""
-        self.build()
-        (self.target, process, _, bkpt) = lldbutil.run_to_source_breakpoint(
-            self, "Set break point at this line.", lldb.SBFileSpec("main.cpp", False))
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type filter clear', check=False)
-            self.runCmd('type synth clear', check=False)
-            self.runCmd(
-                "settings set target.max-children-count 256",
-                check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        ii_type = self.getVariableType("ii")
-        self.assertTrue(ii_type.startswith(self.namespace + "::set"),
-                        "Type: " + ii_type)
-
-        self.expect("frame variable ii", substrs=["size=0", "{}"])
-        lldbutil.continue_to_breakpoint(process, bkpt)
-        self.expect(
-            "frame variable ii",
-            substrs=["size=6",
-                     "[0] = 0",
-                     "[1] = 1",
-                     "[2] = 2",
-                     "[3] = 3",
-                     "[4] = 4",
-                     "[5] = 5"])
-        lldbutil.continue_to_breakpoint(process, bkpt)
-        self.check_ii("ii")
-
-        lldbutil.continue_to_breakpoint(process, bkpt)
-        self.expect("frame variable ii", substrs=["size=0", "{}"])
-        lldbutil.continue_to_breakpoint(process, bkpt)
-        self.expect("frame variable ii", substrs=["size=0", "{}"])
-
-        ss_type = self.getVariableType("ss")
-        self.assertTrue(ii_type.startswith(self.namespace + "::set"),
-                        "Type: " + ss_type)
-
-        self.expect("frame variable ss", substrs=["size=0", "{}"])
-        lldbutil.continue_to_breakpoint(process, bkpt)
-        self.expect(
-            "frame variable ss",
-            substrs=["size=2",
-                     '[0] = "a"',
-                     '[1] = "a very long string is right here"'])
-        lldbutil.continue_to_breakpoint(process, bkpt)
-        self.expect(
-            "frame variable ss",
-            substrs=["size=4",
-                     '[2] = "b"',
-                     '[3] = "c"',
-                     '[0] = "a"',
-                     '[1] = "a very long string is right here"'])
-        self.expect(
-            "p ss",
-            substrs=["size=4",
-                     '[2] = "b"',
-                     '[3] = "c"',
-                     '[0] = "a"',
-                     '[1] = "a very long string is right here"'])
-        self.expect("frame variable ss[2]", substrs=[' = "b"'])
-        lldbutil.continue_to_breakpoint(process, bkpt)
-        self.expect(
-            "frame variable ss",
-            substrs=["size=3",
-                     '[0] = "a"',
-                     '[1] = "a very long string is right here"',
-                     '[2] = "c"'])
-
-    @add_test_categories(["libc++"])
-    def test_ref_and_ptr(self):
-        """Test that the data formatters work on ref and ptr."""
-        self.build()
-        (self.target, process, _, bkpt) = lldbutil.run_to_source_breakpoint(
-            self, "Stop here to check by ref and ptr.",
-            lldb.SBFileSpec("main.cpp", False))
-        # The reference should print just like the value:
-        self.check_ii("ref")
-
-        self.expect("frame variable ptr",
-                    substrs=["ptr =", "size=7"])
-        self.expect("expr ptr",
-                    substrs=["size=7"])
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/main.cpp
deleted file mode 100644 (file)
index df39e97..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-#include <string>
-#include <set>
-
-typedef std::set<int> intset;
-typedef std::set<std::string> stringset;
-
-int g_the_foo = 0;
-
-int thefoo_rw(int arg = 1)
-{
-       if (arg < 0)
-               arg = 0;
-       if (!arg)
-               arg = 1;
-       g_the_foo += arg;
-       return g_the_foo;
-}
-
-void by_ref_and_ptr(intset &ref, intset *ptr)
-{
-    // Stop here to check by ref and ptr
-    return;
-} 
-
-int main()
-{
-    intset ii;
-    thefoo_rw(1);  // Set break point at this line.
-       
-       ii.insert(0);
-       ii.insert(1);
-       ii.insert(2);
-       ii.insert(3);
-       ii.insert(4);
-       ii.insert(5);
-    thefoo_rw(1);  // Set break point at this line.
-
-       ii.insert(6);
-       thefoo_rw(1);  // Set break point at this line.
-
-        by_ref_and_ptr(ii, &ii);
-
-       ii.clear();
-       thefoo_rw(1);  // Set break point at this line.
-
-       stringset ss;
-       thefoo_rw(1);  // Set break point at this line.
-
-       ss.insert("a");
-       ss.insert("a very long string is right here");
-       thefoo_rw(1);  // Set break point at this line.
-
-       ss.insert("b");
-       ss.insert("c");
-       thefoo_rw(1);  // Set break point at this line.
-       
-       ss.erase("b");
-       thefoo_rw(1);  // Set break point at this line.
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/Makefile
deleted file mode 100644 (file)
index c7c91da..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CXX_SOURCES := main.cpp
-
-USE_LIBCPP := 1
-
-CXXFLAGS_EXTRAS := -std=c++11 -O0
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py
deleted file mode 100644 (file)
index 8943b25..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-# coding=utf8
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class LibcxxStringDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-        ns = 'ndk' if lldbplatformutil.target_is_android() else ''
-        self.namespace = 'std::__' + ns + '1'
-
-    @add_test_categories(["libc++"])
-    @expectedFailureAll(bugnumber="llvm.org/pr36109", debug_info="gmodules", triple=".*-android")
-    def test_with_run_command(self):
-        """Test that that file and class static variables display correctly."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=-1)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type filter clear', check=False)
-            self.runCmd('type synth clear', check=False)
-            self.runCmd(
-                "settings set target.max-children-count 256",
-                check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        ns = self.namespace
-        self.expect(
-            "frame variable",
-            substrs=[
-                '(%s::wstring) wempty = L""'%ns,
-                '(%s::wstring) s = L"hello world! מזל טוב!"'%ns,
-                '(%s::wstring) S = L"!!!!"'%ns,
-                '(const wchar_t *) mazeltov = 0x',
-                'L"מזל טוב"',
-                '(%s::string) empty = ""'%ns,
-                '(%s::string) q = "hello world"'%ns,
-                '(%s::string) Q = "quite a long std::strin with lots of info inside it"'%ns,
-                '(%s::string) IHaveEmbeddedZeros = "a\\0b\\0c\\0d"'%ns,
-                '(%s::wstring) IHaveEmbeddedZerosToo = L"hello world!\\0てざ ル゜䋨ミ㠧槊 きゅへ狦穤襩 じゃ馩リョ 䤦監"'%ns,
-                '(%s::u16string) u16_string = u"ß水氶"'%ns,
-                # FIXME: This should have a 'u' prefix.
-                '(%s::u16string) u16_empty = ""'%ns,
-                '(%s::u32string) u32_string = U"🍄🍅🍆🍌"'%ns,
-                # FIXME: This should have a 'U' prefix.
-                '(%s::u32string) u32_empty = ""'%ns,
-                '(%s::basic_string<unsigned char, %s::char_traits<unsigned char>, '
-                '%s::allocator<unsigned char> >) uchar = "aaaaa"'%(ns,ns,ns),
-        ])
-
-        self.runCmd("n")
-
-        TheVeryLongOne = self.frame().FindVariable("TheVeryLongOne")
-        summaryOptions = lldb.SBTypeSummaryOptions()
-        summaryOptions.SetCapping(lldb.eTypeSummaryUncapped)
-        uncappedSummaryStream = lldb.SBStream()
-        TheVeryLongOne.GetSummary(uncappedSummaryStream, summaryOptions)
-        uncappedSummary = uncappedSummaryStream.GetData()
-        self.assertTrue(uncappedSummary.find("someText") > 0,
-                        "uncappedSummary does not include the full string")
-        summaryOptions.SetCapping(lldb.eTypeSummaryCapped)
-        cappedSummaryStream = lldb.SBStream()
-        TheVeryLongOne.GetSummary(cappedSummaryStream, summaryOptions)
-        cappedSummary = cappedSummaryStream.GetData()
-        self.assertTrue(
-            cappedSummary.find("someText") <= 0,
-            "cappedSummary includes the full string")
-
-        self.expect_expr("s", result_type=ns+"::wstring", result_summary='L"hello world! מזל טוב!"')
-
-        self.expect(
-            "frame variable",
-            substrs=[
-                '(%s::wstring) S = L"!!!!!"'%ns,
-                '(const wchar_t *) mazeltov = 0x',
-                'L"מזל טוב"',
-                '(%s::string) q = "hello world"'%ns,
-                '(%s::string) Q = "quite a long std::strin with lots of info inside it"'%ns,
-                '(%s::string) IHaveEmbeddedZeros = "a\\0b\\0c\\0d"'%ns,
-                '(%s::wstring) IHaveEmbeddedZerosToo = L"hello world!\\0てざ ル゜䋨ミ㠧槊 きゅへ狦穤襩 じゃ馩リョ 䤦監"'%ns,
-                '(%s::u16string) u16_string = u"ß水氶"'%ns,
-                '(%s::u32string) u32_string = U"🍄🍅🍆🍌"'%ns,
-                '(%s::u32string) u32_empty = ""'%ns,
-                '(%s::basic_string<unsigned char, %s::char_traits<unsigned char>, '
-                '%s::allocator<unsigned char> >) uchar = "aaaaa"'%(ns,ns,ns),
-        ])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/main.cpp
deleted file mode 100644 (file)
index afb56e6..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#include <string>
-
-int main()
-{
-    std::wstring wempty(L"");
-    std::wstring s(L"hello world! מזל טוב!");
-    std::wstring S(L"!!!!");
-    const wchar_t *mazeltov = L"מזל טוב";
-    std::string empty("");
-    std::string q("hello world");
-    std::string Q("quite a long std::strin with lots of info inside it");
-    std::string TheVeryLongOne("1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890someText1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890");
-    std::string IHaveEmbeddedZeros("a\0b\0c\0d",7);
-    std::wstring IHaveEmbeddedZerosToo(L"hello world!\0てざ ル゜䋨ミ㠧槊 きゅへ狦穤襩 じゃ馩リョ 䤦監", 38);
-    std::u16string u16_string(u"ß水氶");
-    std::u16string u16_empty(u"");
-    std::u32string u32_string(U"🍄🍅🍆🍌");
-    std::u32string u32_empty(U"");
-    std::basic_string<unsigned char> uchar(5, 'a');
-    S.assign(L"!!!!!"); // Set break point at this line.
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/Makefile
deleted file mode 100644 (file)
index 680e1ab..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CXX_SOURCES := main.cpp
-
-USE_LIBCPP := 1
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/TestDataFormatterLibcxxTuple.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/TestDataFormatterLibcxxTuple.py
deleted file mode 100644 (file)
index 57b7778..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestDataFormatterLibcxxTuple(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        TestBase.setUp(self)
-        self.line = line_number('main.cpp', '// break here')
-        ns = 'ndk' if lldbplatformutil.target_is_android() else ''
-        self.namespace = 'std::__' + ns + '1'
-
-    @add_test_categories(["libc++"])
-    def test(self):
-        """Test that std::tuple is displayed correctly"""
-        self.build()
-        lldbutil.run_to_source_breakpoint(self, '// break here',
-                lldb.SBFileSpec("main.cpp", False))
-
-        tuple_name = self.namespace + '::tuple'
-        self.expect("frame variable empty",
-                    substrs=[tuple_name,
-                             'size=0',
-                             '{}'])
-
-        self.expect("frame variable one_elt",
-                    substrs=[tuple_name,
-                             'size=1',
-                             '{',
-                             '[0] = 47',
-                             '}'])
-
-        self.expect("frame variable three_elts",
-                    substrs=[tuple_name,
-                             'size=3',
-                             '{',
-                             '[0] = 1',
-                             '[1] = 47',
-                             '[2] = "foo"',
-                             '}'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/main.cpp
deleted file mode 100644 (file)
index 1c0d0f2..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#include <tuple>
-#include <string>
-
-using namespace std;
-
-int main() {
-  tuple<> empty;
-  tuple<int> one_elt{47};
-  tuple<int, long, string> three_elts{1, 47l, "foo"};
-  return 0; // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/Makefile
deleted file mode 100644 (file)
index 913a52f..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-CXX_SOURCES := main.cpp
-
-# Work around "exception specification in declaration does not match previous
-# declaration" errors present in older libc++ releases. This error was fixed in
-# the 3.8 release.
-CFLAGS_EXTRAS := -fno-exceptions
-
-USE_LIBCPP := 1
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py
deleted file mode 100644 (file)
index 9566af0..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class LibcxxUnorderedDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        TestBase.setUp(self)
-        ns = 'ndk' if lldbplatformutil.target_is_android() else ''
-        self.namespace = 'std::__' + ns + '1'
-
-    @add_test_categories(["libc++"])
-    def test_with_run_command(self):
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_source_regexp(
-            self, "Set break point at this line.")
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type filter clear', check=False)
-            self.runCmd('type synth clear', check=False)
-            self.runCmd(
-                "settings set target.max-children-count 256",
-                check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        ns = self.namespace
-        self.look_for_content_and_continue(
-            "map", ['%s::unordered_map' %
-                    ns, 'size=5 {', 'hello', 'world', 'this', 'is', 'me'])
-
-        self.look_for_content_and_continue(
-            "mmap", ['%s::unordered_multimap' % ns, 'size=6 {', 'first = 3', 'second = "this"',
-                     'first = 2', 'second = "hello"'])
-
-        self.look_for_content_and_continue(
-            "iset", ['%s::unordered_set' %
-                     ns, 'size=5 {', '\[\d\] = 5', '\[\d\] = 3', '\[\d\] = 2'])
-
-        self.look_for_content_and_continue(
-            "sset", ['%s::unordered_set' % ns, 'size=5 {', '\[\d\] = "is"', '\[\d\] = "world"',
-                     '\[\d\] = "hello"'])
-
-        self.look_for_content_and_continue(
-            "imset", ['%s::unordered_multiset' % ns, 'size=6 {', '(\[\d\] = 3(\\n|.)+){3}',
-                      '\[\d\] = 2', '\[\d\] = 1'])
-
-        self.look_for_content_and_continue(
-            "smset", ['%s::unordered_multiset' % ns, 'size=5 {', '(\[\d\] = "is"(\\n|.)+){2}',
-                      '(\[\d\] = "world"(\\n|.)+){2}'])
-
-    def look_for_content_and_continue(self, var_name, patterns):
-        self.expect(("frame variable %s" % var_name), patterns=patterns)
-        self.expect(("frame variable %s" % var_name), patterns=patterns)
-        self.runCmd("continue")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/main.cpp
deleted file mode 100644 (file)
index 81a5763..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-#include <string>
-#include <unordered_map>
-#include <unordered_set>
-
-using std::string;
-
-#define intstr_map std::unordered_map<int, string> 
-#define intstr_mmap std::unordered_multimap<int, string> 
-
-#define int_set std::unordered_set<int> 
-#define str_set std::unordered_set<string> 
-#define int_mset std::unordered_multiset<int> 
-#define str_mset std::unordered_multiset<string> 
-
-int g_the_foo = 0;
-
-int thefoo_rw(int arg = 1)
-{
-       if (arg < 0)
-               arg = 0;
-       if (!arg)
-               arg = 1;
-       g_the_foo += arg;
-       return g_the_foo;
-}
-
-int main()
-{
-       intstr_map map;
-       map.emplace(1,"hello");
-       map.emplace(2,"world");
-       map.emplace(3,"this");
-       map.emplace(4,"is");
-       map.emplace(5,"me");
-       thefoo_rw();  // Set break point at this line.
-       
-       intstr_mmap mmap;
-       mmap.emplace(1,"hello");
-       mmap.emplace(2,"hello");
-       mmap.emplace(2,"world");
-       mmap.emplace(3,"this");
-       mmap.emplace(3,"this");
-       mmap.emplace(3,"this");
-       thefoo_rw();  // Set break point at this line.
-       
-       int_set iset;
-       iset.emplace(1);
-       iset.emplace(2);
-       iset.emplace(3);
-       iset.emplace(4);
-       iset.emplace(5);
-       thefoo_rw();  // Set break point at this line.
-       
-       str_set sset;
-       sset.emplace("hello");
-       sset.emplace("world");
-       sset.emplace("this");
-       sset.emplace("is");
-       sset.emplace("me");
-       thefoo_rw();  // Set break point at this line.
-       
-       int_mset imset;
-       imset.emplace(1);
-       imset.emplace(2);
-       imset.emplace(2);
-       imset.emplace(3);
-       imset.emplace(3);
-       imset.emplace(3);
-       thefoo_rw();  // Set break point at this line.
-       
-       str_mset smset;
-       smset.emplace("hello");
-       smset.emplace("world");
-       smset.emplace("world");
-       smset.emplace("is");
-       smset.emplace("is");
-       thefoo_rw();  // Set break point at this line.
-       
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/Makefile
deleted file mode 100644 (file)
index 7eeff74..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CXX_SOURCES := main.cpp
-
-USE_LIBCPP := 1
-
-CXXFLAGS_EXTRAS := -std=c++17
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/TestDataFormatterLibcxxVariant.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/TestDataFormatterLibcxxVariant.py
deleted file mode 100644 (file)
index a2a6b74..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class LibcxxVariantDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(["libc++"])
-    ## We are skipping clang version less that 5.0 since this test requires -std=c++17
-    @skipIf(oslist=no_match(["macosx"]), compiler="clang", compiler_version=['<', '5.0'])
-    ## We are skipping gcc version less that 5.1 since this test requires -std=c++17
-    @skipIf(compiler="gcc", compiler_version=['<', '5.1'])
-    ## std::get is unavailable for std::variant before macOS 10.14
-    @skipIf(macos_version=["<", "10.14"])
-
-    def test_with_run_command(self):
-        """Test that that file and class static variables display correctly."""
-        self.build()
-
-        (self.target, self.process, _, bkpt) = lldbutil.run_to_source_breakpoint(self, '// break here',
-                lldb.SBFileSpec("main.cpp", False))
-
-        self.runCmd( "frame variable has_variant" )
-
-        output = self.res.GetOutput()
-
-        ## The variable has_variant tells us if the test program
-        ## detected we have a sufficient libc++ version to support variant
-        ## false means we do not and therefore should skip the test
-        if output.find("(bool) has_variant = false") != -1 :
-            self.skipTest( "std::variant not supported" )
-
-        lldbutil.continue_to_breakpoint(self.process, bkpt)
-
-        self.expect("frame variable v1",
-                substrs=['v1 =  Active Type = int  {',
-                               'Value = 12',
-                               '}'])
-
-        self.expect("frame variable v1_ref",
-                substrs=['v1_ref =  Active Type = int : {',
-                               'Value = 12',
-                               '}'])
-
-        self.expect("frame variable v_v1",
-                substrs=['v_v1 =  Active Type = std::__1::variant<int, double, char>  {',
-                                 'Value =  Active Type = int  {',
-                                   'Value = 12',
-                                 '}',
-                               '}'])
-
-        lldbutil.continue_to_breakpoint(self.process, bkpt)
-
-        self.expect("frame variable v1",
-                substrs=['v1 =  Active Type = double  {',
-                               'Value = 2',
-                               '}'])
-
-        lldbutil.continue_to_breakpoint(self.process, bkpt)
-
-        self.expect("frame variable v2",
-                substrs=['v2 =  Active Type = double  {',
-                               'Value = 2',
-                               '}'])
-
-        self.expect("frame variable v3",
-                substrs=['v3 =  Active Type = char  {',
-                               'Value = \'A\'',
-                               '}'])
-
-        self.expect("frame variable v_no_value",
-                    substrs=['v_no_value =  No Value'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/main.cpp
deleted file mode 100644 (file)
index c0bc4ae..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-#include <cstdio>
-#include <string>
-#include <vector>
-
-// If we have libc++ 4.0 or greater we should have <variant>
-// According to libc++ C++1z status page https://libcxx.llvm.org/cxx1z_status.html
-#if _LIBCPP_VERSION >= 4000
-#include <variant>
-#define HAVE_VARIANT 1
-#else
-#define HAVE_VARIANT 0
-#endif
-
-struct S {
-  operator int() { throw 42; }
-} ;
-
-
-int main()
-{
-    bool has_variant = HAVE_VARIANT ;
-
-    printf( "%d\n", has_variant ) ; // break here
-
-#if HAVE_VARIANT == 1
-    std::variant<int, double, char> v1;
-    std::variant<int, double, char> &v1_ref = v1;
-    std::variant<int, double, char> v2;
-    std::variant<int, double, char> v3;
-    std::variant<std::variant<int,double,char>> v_v1 ;
-    std::variant<int, double, char> v_no_value;
-
-    v1 = 12; // v contains int
-    v_v1 = v1 ;
-    int i = std::get<int>(v1);
-    printf( "%d\n", i ); // break here
-
-    v2 = 2.0 ;
-    double d = std::get<double>(v2) ;
-    printf( "%f\n", d );
-
-    v3 = 'A' ;
-    char c = std::get<char>(v3) ;
-    printf( "%d\n", c );
-
-    // Checking v1 above and here to make sure we done maintain the incorrect
-    // state when we change its value.
-    v1 = 2.0;
-    d = std::get<double>(v1) ;
-    printf( "%f\n", d ); // break here
-
-     try {
-       v_no_value.emplace<0>(S());
-     } catch( ... ) {}
-
-     printf( "%zu\n", v_no_value.index() ) ;
-#endif
-
-    return 0; // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/Makefile
deleted file mode 100644 (file)
index d87cf7d..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CXX_SOURCES := main.cpp
-USE_LIBCPP := 1
-include Makefile.rules
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py
deleted file mode 100644 (file)
index 67e0629..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class LibcxxVBoolDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    @add_test_categories(["libc++"])
-    def test_with_run_command(self):
-        """Test that that file and class static variables display correctly."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=-1)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type filter clear', check=False)
-            self.runCmd('type synth clear', check=False)
-            self.runCmd(
-                "settings set target.max-children-count 256",
-                check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.expect(
-            "frame variable vBool",
-            substrs=[
-                'size=49',
-                '[0] = false',
-                '[1] = true',
-                '[18] = false',
-                '[27] = true',
-                '[36] = false',
-                '[47] = true',
-                '[48] = true'])
-
-        self.expect(
-            "expr vBool",
-            substrs=[
-                'size=49',
-                '[0] = false',
-                '[1] = true',
-                '[18] = false',
-                '[27] = true',
-                '[36] = false',
-                '[47] = true',
-                '[48] = true'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/main.cpp
deleted file mode 100644 (file)
index 026cfc8..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-#include <string>
-#include <vector>
-
-int main()
-{
-    std::vector<bool> vBool;
-
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-    
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(true);
-
-    printf ("size: %d", (int) vBool.size()); // Set break point at this line.
-    return 0; 
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/Makefile
deleted file mode 100644 (file)
index 564cbad..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CXX_SOURCES := main.cpp
-
-USE_LIBCPP := 1
-
-CXXFLAGS_EXTRAS := -O0
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py
deleted file mode 100644 (file)
index 649c0fe..0000000
+++ /dev/null
@@ -1,191 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class LibcxxVectorDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def check_numbers(self, var_name):
-        self.expect("frame variable " + var_name,
-                    substrs=[var_name + ' = size=7',
-                             '[0] = 1',
-                             '[1] = 12',
-                             '[2] = 123',
-                             '[3] = 1234',
-                             '[4] = 12345',
-                             '[5] = 123456',
-                             '[6] = 1234567',
-                             '}'])
-
-        self.expect("p " + var_name,
-                    substrs=['$', 'size=7',
-                             '[0] = 1',
-                             '[1] = 12',
-                             '[2] = 123',
-                             '[3] = 1234',
-                             '[4] = 12345',
-                             '[5] = 123456',
-                             '[6] = 1234567',
-                             '}'])
-
-        # check access-by-index
-        self.expect("frame variable " + var_name + "[0]",
-                    substrs=['1'])
-        self.expect("frame variable " + var_name + "[1]",
-                    substrs=['12'])
-        self.expect("frame variable " + var_name + "[2]",
-                    substrs=['123'])
-        self.expect("frame variable " + var_name + "[3]",
-                    substrs=['1234'])
-
-    @add_test_categories(["libc++"])
-    def test_with_run_command(self):
-        """Test that that file and class static variables display correctly."""
-        self.build()
-        (self.target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
-            self, "break here", lldb.SBFileSpec("main.cpp", False))
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type filter clear', check=False)
-            self.runCmd('type synth clear', check=False)
-            self.runCmd(
-                "settings set target.max-children-count 256",
-                check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        # empty vectors (and storage pointers SHOULD BOTH BE NULL..)
-        self.expect("frame variable numbers",
-                    substrs=['numbers = size=0'])
-
-        lldbutil.continue_to_breakpoint(process, bkpt)
-
-        # first value added
-        self.expect("frame variable numbers",
-                    substrs=['numbers = size=1',
-                             '[0] = 1',
-                             '}'])
-
-        # add some more data
-        lldbutil.continue_to_breakpoint(process, bkpt)
-
-        self.expect("frame variable numbers",
-                    substrs=['numbers = size=4',
-                             '[0] = 1',
-                             '[1] = 12',
-                             '[2] = 123',
-                             '[3] = 1234',
-                             '}'])
-
-        self.expect("p numbers",
-                    substrs=['$', 'size=4',
-                             '[0] = 1',
-                             '[1] = 12',
-                             '[2] = 123',
-                             '[3] = 1234',
-                             '}'])
-
-        # check access to synthetic children
-        self.runCmd(
-            "type summary add --summary-string \"item 0 is ${var[0]}\" std::int_vect int_vect")
-        self.expect('frame variable numbers',
-                    substrs=['item 0 is 1'])
-
-        self.runCmd(
-            "type summary add --summary-string \"item 0 is ${svar[0]}\" std::int_vect int_vect")
-        self.expect('frame variable numbers',
-                    substrs=['item 0 is 1'])
-        # move on with synths
-        self.runCmd("type summary delete std::int_vect")
-        self.runCmd("type summary delete int_vect")
-
-        # add some more data
-        lldbutil.continue_to_breakpoint(process, bkpt)
-
-        self.check_numbers("numbers")
-
-        # clear out the vector and see that we do the right thing once again
-        lldbutil.continue_to_breakpoint(process, bkpt)
-
-        self.expect("frame variable numbers",
-                    substrs=['numbers = size=0'])
-
-        lldbutil.continue_to_breakpoint(process, bkpt)
-
-        # first value added
-        self.expect("frame variable numbers",
-                    substrs=['numbers = size=1',
-                             '[0] = 7',
-                             '}'])
-
-        # check if we can display strings
-        self.expect("frame variable strings",
-                    substrs=['goofy',
-                             'is',
-                             'smart'])
-
-        self.expect("p strings",
-                    substrs=['goofy',
-                             'is',
-                             'smart'])
-
-        # test summaries based on synthetic children
-        self.runCmd(
-            "type summary add std::string_vect string_vect --summary-string \"vector has ${svar%#} items\" -e")
-        self.expect("frame variable strings",
-                    substrs=['vector has 3 items',
-                             'goofy',
-                             'is',
-                             'smart'])
-
-        self.expect("p strings",
-                    substrs=['vector has 3 items',
-                             'goofy',
-                             'is',
-                             'smart'])
-
-        lldbutil.continue_to_breakpoint(process, bkpt)
-
-        self.expect("frame variable strings",
-                    substrs=['vector has 4 items'])
-
-        # check access-by-index
-        self.expect("frame variable strings[0]",
-                    substrs=['goofy'])
-        self.expect("frame variable strings[1]",
-                    substrs=['is'])
-
-        lldbutil.continue_to_breakpoint(process, bkpt)
-
-        self.expect("frame variable strings",
-                    substrs=['vector has 0 items'])
-
-    @add_test_categories(["libc++"])
-    def test_ref_and_ptr(self):
-        """Test that that file and class static variables display correctly."""
-        self.build()
-        (self.target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
-            self, "Stop here to check by ref", lldb.SBFileSpec("main.cpp", False))
-
-        # The reference should display the same was as the value did
-        self.check_numbers("ref")
-
-        # The pointer should just show the right number of elements:
-
-        self.expect("frame variable ptr", substrs=['ptr =', ' size=7'])
-
-        self.expect("p ptr", substrs=['$', 'size=7'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/main.cpp
deleted file mode 100644 (file)
index 0e1dbe4..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#include <stdio.h>
-#include <string>
-#include <vector>
-typedef std::vector<int> int_vect;
-typedef std::vector<std::string> string_vect;
-
-template <class T>
-void by_ref_and_ptr(std::vector<T> &ref, std::vector<T> *ptr) {
-  // Stop here to check by ref
-  return;  
-}
-
-int main()
-{
-    int_vect numbers;
-    (numbers.push_back(1));  // break here
-    (numbers.push_back(12));  // break here
-    (numbers.push_back(123));
-    (numbers.push_back(1234));
-    (numbers.push_back(12345)); // break here
-    (numbers.push_back(123456));
-    (numbers.push_back(1234567));
-    by_ref_and_ptr(numbers, &numbers);
-    
-    printf("break here");
-    numbers.clear();
-    
-    (numbers.push_back(7)); // break here
-
-    string_vect strings;
-    (strings.push_back(std::string("goofy")));
-    (strings.push_back(std::string("is")));
-    (strings.push_back(std::string("smart")));
-    printf("break here");
-    (strings.push_back(std::string("!!!")));
-     
-    printf("break here");
-    strings.clear();
-    
-    return 0;  // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile
deleted file mode 100644 (file)
index c825977..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CXX_SOURCES := main.cpp
-
-CFLAGS_EXTRAS := -O0
-USE_LIBSTDCPP := 1
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py
deleted file mode 100644 (file)
index 52387a4..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class StdIteratorDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    @add_test_categories(["libstdcxx"])
-    def test_with_run_command(self):
-        """Test that libstdcpp iterators format properly."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=-1)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type filter clear', check=False)
-            self.runCmd('type synth clear', check=False)
-            self.runCmd(
-                "settings set target.max-children-count 256",
-                check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.expect('frame variable ivI', substrs=['item = 3'])
-        self.expect('expr ivI', substrs=['item = 3'])
-
-        self.expect(
-            'frame variable iimI',
-            substrs=[
-                'first = 0',
-                'second = 12'])
-        self.expect('expr iimI', substrs=['first = 0', 'second = 12'])
-
-        self.expect(
-            'frame variable simI',
-            substrs=[
-                'first = "world"',
-                'second = 42'])
-        self.expect('expr simI', substrs=['first = "world"', 'second = 42'])
-
-        self.expect('frame variable svI', substrs=['item = "hello"'])
-        self.expect('expr svI', substrs=['item = "hello"'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/main.cpp
deleted file mode 100644 (file)
index 7ddffd1..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#include <string>
-#include <map>
-#include <vector>
-
-typedef std::map<int, int> intint_map;
-typedef std::map<std::string, int> strint_map;
-
-typedef std::vector<int> int_vector;
-typedef std::vector<std::string> string_vector;
-
-typedef intint_map::iterator iimter;
-typedef strint_map::iterator simter;
-
-typedef int_vector::iterator ivter;
-typedef string_vector::iterator svter;
-
-int main()
-{
-    intint_map iim;
-       iim[0] = 12;
-       
-       strint_map sim;
-       sim["world"] = 42;
-    
-       int_vector iv;
-       iv.push_back(3);
-       
-       string_vector sv;
-       sv.push_back("hello");
-
-       iimter iimI = iim.begin();
-       simter simI = sim.begin();
-       
-       ivter ivI = iv.begin();
-       svter svI = sv.begin();
-
-    return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile
deleted file mode 100644 (file)
index c825977..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CXX_SOURCES := main.cpp
-
-CFLAGS_EXTRAS := -O0
-USE_LIBSTDCPP := 1
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py
deleted file mode 100644 (file)
index c65393f..0000000
+++ /dev/null
@@ -1,206 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class StdListDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers to break at for the different tests.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-        self.optional_line = line_number(
-            'main.cpp', '// Optional break point at this line.')
-        self.final_line = line_number(
-            'main.cpp', '// Set final break point at this line.')
-
-    @add_test_categories(["libstdcxx"])
-    def test_with_run_command(self):
-        """Test that that file and class static variables display correctly."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=-1)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type filter clear', check=False)
-            self.runCmd('type synth clear', check=False)
-            self.runCmd(
-                "settings set target.max-children-count 256",
-                check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.runCmd("frame variable numbers_list --show-types")
-
-        self.runCmd("type format add -f hex int")
-
-        self.expect("frame variable numbers_list --raw", matching=False,
-                    substrs=['size=0',
-                             '{}'])
-        self.expect(
-            "frame variable &numbers_list._M_impl._M_node --raw",
-            matching=False,
-            substrs=[
-                'size=0',
-                '{}'])
-
-        self.expect("frame variable numbers_list",
-                    substrs=['size=0',
-                             '{}'])
-
-        self.expect("p numbers_list",
-                    substrs=['size=0',
-                             '{}'])
-
-        self.runCmd("n")
-
-        self.expect("frame variable numbers_list",
-                    substrs=['size=1',
-                             '[0] = ',
-                             '0x12345678'])
-
-        self.runCmd("n")
-        self.runCmd("n")
-        self.runCmd("n")
-
-        self.expect("frame variable numbers_list",
-                    substrs=['size=4',
-                             '[0] = ',
-                             '0x12345678',
-                             '[1] =',
-                             '0x11223344',
-                             '[2] =',
-                             '0xbeeffeed',
-                             '[3] =',
-                             '0x00abba00'])
-
-        self.runCmd("n")
-        self.runCmd("n")
-
-        self.expect("frame variable numbers_list",
-                    substrs=['size=6',
-                             '[0] = ',
-                             '0x12345678',
-                             '0x11223344',
-                             '0xbeeffeed',
-                             '0x00abba00',
-                             '[4] =',
-                             '0x0abcdef0',
-                             '[5] =',
-                             '0x0cab0cab'])
-
-        self.expect("p numbers_list",
-                    substrs=['size=6',
-                             '[0] = ',
-                             '0x12345678',
-                             '0x11223344',
-                             '0xbeeffeed',
-                             '0x00abba00',
-                             '[4] =',
-                             '0x0abcdef0',
-                             '[5] =',
-                             '0x0cab0cab'])
-
-        # check access-by-index
-        self.expect("frame variable numbers_list[0]",
-                    substrs=['0x12345678'])
-        self.expect("frame variable numbers_list[1]",
-                    substrs=['0x11223344'])
-
-        # but check that expression does not rely on us
-        self.expect("expression numbers_list[0]", matching=False, error=True,
-                    substrs=['0x12345678'])
-
-        # check that MightHaveChildren() gets it right
-        self.assertTrue(
-            self.frame().FindVariable("numbers_list").MightHaveChildren(),
-            "numbers_list.MightHaveChildren() says False for non empty!")
-
-        self.runCmd("n")
-
-        self.expect("frame variable numbers_list",
-                    substrs=['size=0',
-                             '{}'])
-
-        self.runCmd("n")
-        self.runCmd("n")
-        self.runCmd("n")
-        self.runCmd("n")
-
-        self.expect("frame variable numbers_list",
-                    substrs=['size=4',
-                             '[0] = ', '1',
-                             '[1] = ', '2',
-                             '[2] = ', '3',
-                             '[3] = ', '4'])
-
-        self.runCmd("type format delete int")
-
-        self.runCmd("n")
-
-        self.expect("frame variable text_list",
-                    substrs=['size=0',
-                             '{}'])
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.final_line, num_expected_locations=-1)
-
-        self.runCmd("c", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        self.expect("frame variable text_list",
-                    substrs=['size=4',
-                             '[0]', 'goofy',
-                             '[1]', 'is',
-                             '[2]', 'smart',
-                             '[3]', '!!!'])
-
-        self.expect("p text_list",
-                    substrs=['size=4',
-                             '\"goofy\"',
-                             '\"is\"',
-                             '\"smart\"',
-                             '\"!!!\"'])
-
-        # check access-by-index
-        self.expect("frame variable text_list[0]",
-                    substrs=['goofy'])
-        self.expect("frame variable text_list[3]",
-                    substrs=['!!!'])
-
-        # but check that expression does not rely on us
-        self.expect("expression text_list[0]", matching=False, error=True,
-                    substrs=['goofy'])
-
-        # check that MightHaveChildren() gets it right
-        self.assertTrue(
-            self.frame().FindVariable("text_list").MightHaveChildren(),
-            "text_list.MightHaveChildren() says False for non empty!")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/main.cpp
deleted file mode 100644 (file)
index 191acdc..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <list>
-#include <string>
-
-typedef std::list<int> int_list;
-typedef std::list<std::string> string_list;
-
-int main()
-{
-    int_list numbers_list;
-    
-    numbers_list.push_back(0x12345678); // Set break point at this line.
-    numbers_list.push_back(0x11223344);
-    numbers_list.push_back(0xBEEFFEED);
-    numbers_list.push_back(0x00ABBA00);
-    numbers_list.push_back(0x0ABCDEF0);
-    numbers_list.push_back(0x0CAB0CAB);
-    
-    numbers_list.clear();
-    
-    numbers_list.push_back(1);
-    numbers_list.push_back(2);
-    numbers_list.push_back(3);
-    numbers_list.push_back(4);
-    
-    string_list text_list;
-    text_list.push_back(std::string("goofy")); // Optional break point at this line.
-    text_list.push_back(std::string("is"));
-    text_list.push_back(std::string("smart"));
-    
-    text_list.push_back(std::string("!!!"));
-        
-    return 0; // Set final break point at this line.
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/Makefile
deleted file mode 100644 (file)
index bf8e6b8..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-CXX_SOURCES := main.cpp
-
-USE_LIBSTDCPP := 1
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py
deleted file mode 100644 (file)
index 94d1b57..0000000
+++ /dev/null
@@ -1,331 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class StdMapDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    @add_test_categories(["libstdcxx"])
-    def test_with_run_command(self):
-        """Test that that file and class static variables display correctly."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_source_regexp(
-            self, "Set break point at this line.")
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type filter clear', check=False)
-            self.runCmd('type synth clear', check=False)
-            self.runCmd(
-                "settings set target.max-children-count 256",
-                check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.runCmd("frame variable ii --show-types")
-
-        self.runCmd(
-            "type summary add -x \"std::map<\" --summary-string \"map has ${svar%#} items\" -e")
-
-        self.expect('frame variable ii',
-                    substrs=['map has 0 items',
-                             '{}'])
-
-        self.runCmd("c")
-
-        self.expect('frame variable ii',
-                    substrs=['map has 2 items',
-                             '[0] = ',
-                             'first = 0',
-                             'second = 0',
-                             '[1] = ',
-                             'first = 1',
-                             'second = 1'])
-
-        self.runCmd("c")
-
-        self.expect('frame variable ii',
-                    substrs=['map has 4 items',
-                             '[2] = ',
-                             'first = 2',
-                             'second = 0',
-                             '[3] = ',
-                             'first = 3',
-                             'second = 1'])
-
-        self.runCmd("c")
-
-        self.expect("frame variable ii",
-                    substrs=['map has 9 items',
-                             '[5] = ',
-                             'first = 5',
-                             'second = 0',
-                             '[7] = ',
-                             'first = 7',
-                             'second = 1'])
-
-        self.expect("p ii",
-                    substrs=['map has 9 items',
-                             '[5] = ',
-                             'first = 5',
-                             'second = 0',
-                             '[7] = ',
-                             'first = 7',
-                             'second = 1'])
-
-        # check access-by-index
-        self.expect("frame variable ii[0]",
-                    substrs=['first = 0',
-                             'second = 0'])
-        self.expect("frame variable ii[3]",
-                    substrs=['first =',
-                             'second ='])
-
-        self.expect("frame variable ii[8]", matching=True,
-                    substrs=['1234567'])
-
-        # check that MightHaveChildren() gets it right
-        self.assertTrue(
-            self.frame().FindVariable("ii").MightHaveChildren(),
-            "ii.MightHaveChildren() says False for non empty!")
-
-        # check that the expression parser does not make use of
-        # synthetic children instead of running code
-        # TOT clang has a fix for this, which makes the expression command here succeed
-        # since this would make the test fail or succeed depending on clang version in use
-        # this is safer commented for the time being
-        # self.expect("expression ii[8]", matching=False, error=True,
-        #            substrs = ['1234567'])
-
-        self.runCmd("c")
-
-        self.expect('frame variable ii',
-                    substrs=['map has 0 items',
-                             '{}'])
-
-        self.runCmd("frame variable si --show-types")
-
-        self.expect('frame variable si',
-                    substrs=['map has 0 items',
-                             '{}'])
-
-        self.runCmd("c")
-
-        self.expect('frame variable si',
-                    substrs=['map has 1 items',
-                             '[0] = ',
-                             'first = \"zero\"',
-                             'second = 0'])
-
-        self.runCmd("c")
-
-        self.expect("frame variable si",
-                    substrs=['map has 5 items',
-                             '[0] = ',
-                             'first = \"zero\"',
-                             'second = 0',
-                             '[1] = ',
-                             'first = \"one\"',
-                             'second = 1',
-                             '[2] = ',
-                             'first = \"two\"',
-                             'second = 2',
-                             '[3] = ',
-                             'first = \"three\"',
-                             'second = 3',
-                             '[4] = ',
-                             'first = \"four\"',
-                             'second = 4'])
-
-        self.expect("p si",
-                    substrs=['map has 5 items',
-                             '[0] = ',
-                             'first = \"zero\"',
-                             'second = 0',
-                             '[1] = ',
-                             'first = \"one\"',
-                             'second = 1',
-                             '[2] = ',
-                             'first = \"two\"',
-                             'second = 2',
-                             '[3] = ',
-                             'first = \"three\"',
-                             'second = 3',
-                             '[4] = ',
-                             'first = \"four\"',
-                             'second = 4'])
-
-        # check access-by-index
-        self.expect("frame variable si[0]",
-                    substrs=['first = ', 'four',
-                             'second = 4'])
-
-        # check that MightHaveChildren() gets it right
-        self.assertTrue(
-            self.frame().FindVariable("si").MightHaveChildren(),
-            "si.MightHaveChildren() says False for non empty!")
-
-        # check that the expression parser does not make use of
-        # synthetic children instead of running code
-        # TOT clang has a fix for this, which makes the expression command here succeed
-        # since this would make the test fail or succeed depending on clang version in use
-        # this is safer commented for the time being
-        # self.expect("expression si[0]", matching=False, error=True,
-        #            substrs = ['first = ', 'zero'])
-
-        self.runCmd("c")
-
-        self.expect('frame variable si',
-                    substrs=['map has 0 items',
-                             '{}'])
-
-        self.runCmd("frame variable is --show-types")
-
-        self.expect('frame variable is',
-                    substrs=['map has 0 items',
-                             '{}'])
-
-        self.runCmd("c")
-
-        self.expect("frame variable is",
-                    substrs=['map has 4 items',
-                             '[0] = ',
-                             'second = \"goofy\"',
-                             'first = 85',
-                             '[1] = ',
-                             'second = \"is\"',
-                             'first = 1',
-                             '[2] = ',
-                             'second = \"smart\"',
-                             'first = 2',
-                             '[3] = ',
-                             'second = \"!!!\"',
-                             'first = 3'])
-
-        self.expect("p is",
-                    substrs=['map has 4 items',
-                             '[0] = ',
-                             'second = \"goofy\"',
-                             'first = 85',
-                             '[1] = ',
-                             'second = \"is\"',
-                             'first = 1',
-                             '[2] = ',
-                             'second = \"smart\"',
-                             'first = 2',
-                             '[3] = ',
-                             'second = \"!!!\"',
-                             'first = 3'])
-
-        # check access-by-index
-        self.expect("frame variable is[0]",
-                    substrs=['first = ',
-                             'second ='])
-
-        # check that MightHaveChildren() gets it right
-        self.assertTrue(
-            self.frame().FindVariable("is").MightHaveChildren(),
-            "is.MightHaveChildren() says False for non empty!")
-
-        # check that the expression parser does not make use of
-        # synthetic children instead of running code
-        # TOT clang has a fix for this, which makes the expression command here succeed
-        # since this would make the test fail or succeed depending on clang version in use
-        # this is safer commented for the time being
-        # self.expect("expression is[0]", matching=False, error=True,
-        #            substrs = ['first = ', 'goofy'])
-
-        self.runCmd("c")
-
-        self.expect('frame variable is',
-                    substrs=['map has 0 items',
-                             '{}'])
-
-        self.runCmd("frame variable ss --show-types")
-
-        self.expect('frame variable ss',
-                    substrs=['map has 0 items',
-                             '{}'])
-
-        self.runCmd("c")
-
-        self.expect("frame variable ss",
-                    substrs=['map has 4 items',
-                             '[0] = ',
-                             'second = \"hello\"',
-                             'first = \"ciao\"',
-                             '[1] = ',
-                             'second = \"house\"',
-                             'first = \"casa\"',
-                             '[2] = ',
-                             'second = \"cat\"',
-                             'first = \"gatto\"',
-                             '[3] = ',
-                             'second = \"..is always a Mac!\"',
-                             'first = \"a Mac..\"'])
-
-        self.expect("p ss",
-                    substrs=['map has 4 items',
-                             '[0] = ',
-                             'second = \"hello\"',
-                             'first = \"ciao\"',
-                             '[1] = ',
-                             'second = \"house\"',
-                             'first = \"casa\"',
-                             '[2] = ',
-                             'second = \"cat\"',
-                             'first = \"gatto\"',
-                             '[3] = ',
-                             'second = \"..is always a Mac!\"',
-                             'first = \"a Mac..\"'])
-
-        # check access-by-index
-        self.expect("frame variable ss[3]",
-                    substrs=['gatto', 'cat'])
-
-        # check that MightHaveChildren() gets it right
-        self.assertTrue(
-            self.frame().FindVariable("ss").MightHaveChildren(),
-            "ss.MightHaveChildren() says False for non empty!")
-
-        # check that the expression parser does not make use of
-        # synthetic children instead of running code
-        # TOT clang has a fix for this, which makes the expression command here succeed
-        # since this would make the test fail or succeed depending on clang version in use
-        # this is safer commented for the time being
-        # self.expect("expression ss[3]", matching=False, error=True,
-        #            substrs = ['gatto'])
-
-        self.runCmd("c")
-
-        self.expect('frame variable ss',
-                    substrs=['map has 0 items',
-                             '{}'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/main.cpp
deleted file mode 100644 (file)
index d5e5b21..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-#include <map>
-#include <string>
-
-#define intint_map std::map<int, int> 
-#define strint_map std::map<std::string, int> 
-#define intstr_map std::map<int, std::string> 
-#define strstr_map std::map<std::string, std::string> 
-
-
-int main()
-{
-    intint_map ii;
-    
-    ii[0] = 0; // Set break point at this line.
-    ii[1] = 1;
-    ii[2] = 0;// Set break point at this line.
-    ii[3] = 1;
-    ii[4] = 0;// Set break point at this line.
-    ii[5] = 1;
-    ii[6] = 0;
-    ii[7] = 1;
-    ii[85] = 1234567;
-    
-    ii.clear();// Set break point at this line.
-    
-    strint_map si;
-    
-    si["zero"] = 0;// Set break point at this line.
-    si["one"] = 1;// Set break point at this line.
-    si["two"] = 2;
-    si["three"] = 3;
-    si["four"] = 4;
-
-    si.clear();// Set break point at this line.
-    
-    intstr_map is;
-    
-    is[85] = "goofy";// Set break point at this line.
-    is[1] = "is";
-    is[2] = "smart";
-    is[3] = "!!!";
-    
-    is.clear();// Set break point at this line.
-    
-    strstr_map ss;
-    
-    ss["ciao"] = "hello";// Set break point at this line.
-    ss["casa"] = "house";
-    ss["gatto"] = "cat";
-    ss["a Mac.."] = "..is always a Mac!";
-    
-    ss.clear();// Set break point at this line.
-    
-    return 0;// Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/Makefile
deleted file mode 100644 (file)
index 654e4b1..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CXX_SOURCES := main.cpp
-
-CXXFLAGS := -O0
-USE_LIBSTDCPP := 1
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/TestDataFormatterStdSmartPtr.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/TestDataFormatterStdSmartPtr.py
deleted file mode 100644 (file)
index df213a0..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class StdSmartPtrDataFormatterTestCase(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(["libstdcxx"])
-    def test_with_run_command(self):
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_source_regexp(
-            self, "Set break point at this line.")
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped', 'stop reason = breakpoint'])
-
-        self.expect("frame variable nsp", substrs=['nsp = nullptr'])
-        self.expect("frame variable isp", substrs=['isp = 123'])
-        self.expect("frame variable ssp", substrs=['ssp = "foobar"'])
-
-        self.expect("frame variable nwp", substrs=['nwp = nullptr'])
-        self.expect("frame variable iwp", substrs=['iwp = 123'])
-        self.expect("frame variable swp", substrs=['swp = "foobar"'])
-
-        self.runCmd("continue")
-
-        self.expect("frame variable nsp", substrs=['nsp = nullptr'])
-        self.expect("frame variable isp", substrs=['isp = nullptr'])
-        self.expect("frame variable ssp", substrs=['ssp = nullptr'])
-
-        self.expect("frame variable nwp", substrs=['nwp = nullptr'])
-        self.expect("frame variable iwp", substrs=['iwp = nullptr'])
-        self.expect("frame variable swp", substrs=['swp = nullptr'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/main.cpp
deleted file mode 100644 (file)
index 7ba5087..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <memory>
-#include <string>
-
-int
-main()
-{
-    std::shared_ptr<char> nsp;
-    std::shared_ptr<int> isp(new int{123});
-    std::shared_ptr<std::string> ssp = std::make_shared<std::string>("foobar");
-
-    std::weak_ptr<char> nwp;
-    std::weak_ptr<int> iwp = isp;
-    std::weak_ptr<std::string> swp = ssp;
-
-    nsp.reset(); // Set break point at this line.
-    isp.reset();
-    ssp.reset();
-
-    return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile
deleted file mode 100644 (file)
index c825977..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CXX_SOURCES := main.cpp
-
-CFLAGS_EXTRAS := -O0
-USE_LIBSTDCPP := 1
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py
deleted file mode 100644 (file)
index fa0e4d1..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-# coding=utf8
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class StdStringDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    @add_test_categories(["libstdcxx"])
-    def test_with_run_command(self):
-        """Test that that file and class static variables display correctly."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=-1)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type filter clear', check=False)
-            self.runCmd('type synth clear', check=False)
-            self.runCmd(
-                "settings set target.max-children-count 256",
-                check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        var_wempty = self.frame().FindVariable('wempty')
-        var_s = self.frame().FindVariable('s')
-        var_S = self.frame().FindVariable('S')
-        var_mazeltov = self.frame().FindVariable('mazeltov')
-        var_empty = self.frame().FindVariable('empty')
-        var_q = self.frame().FindVariable('q')
-        var_Q = self.frame().FindVariable('Q')
-        var_uchar = self.frame().FindVariable('uchar')
-
-        # TODO: This is currently broken
-        # self.assertEqual(var_wempty.GetSummary(), 'L""', "wempty summary wrong")
-        self.assertEqual(
-            var_s.GetSummary(), 'L"hello world! מזל טוב!"',
-            "s summary wrong")
-        self.assertEqual(var_S.GetSummary(), 'L"!!!!"', "S summary wrong")
-        self.assertEqual(
-            var_mazeltov.GetSummary(), 'L"מזל טוב"',
-            "mazeltov summary wrong")
-        self.assertEqual(var_empty.GetSummary(), '""', "empty summary wrong")
-        self.assertEqual(
-            var_q.GetSummary(), '"hello world"',
-            "q summary wrong")
-        self.assertEqual(
-            var_Q.GetSummary(), '"quite a long std::strin with lots of info inside it"',
-            "Q summary wrong")
-        self.assertEqual(var_uchar.GetSummary(), '"aaaaa"', "u summary wrong")
-
-        self.runCmd("next")
-
-        self.assertEqual(
-            var_S.GetSummary(), 'L"!!!!!"',
-            "new S summary wrong")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/main.cpp
deleted file mode 100644 (file)
index 7351919..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#include <string>
-
-int main()
-{
-    std::wstring wempty(L"");
-    std::wstring s(L"hello world! מזל טוב!");
-    std::wstring S(L"!!!!");
-    const wchar_t *mazeltov = L"מזל טוב";
-    std::string empty("");
-    std::string q("hello world");
-    std::string Q("quite a long std::strin with lots of info inside it");
-    std::basic_string<unsigned char> uchar(5, 'a');
-    S.assign(L"!!!!!"); // Set break point at this line.
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/Makefile
deleted file mode 100644 (file)
index bf8e6b8..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-CXX_SOURCES := main.cpp
-
-USE_LIBSTDCPP := 1
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/TestDataFormatterStdTuple.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/TestDataFormatterStdTuple.py
deleted file mode 100644 (file)
index c71cffe..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class StdTupleDataFormatterTestCase(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(["libstdcxx"])
-    def test_with_run_command(self):
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_source_regexp(
-            self, "Set break point at this line.")
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped', 'stop reason = breakpoint'])
-
-        frame = self.frame()
-        self.assertTrue(frame.IsValid())
-
-        self.expect("frame variable ti", substrs=['[0] = 1'])
-        self.expect("frame variable ts", substrs=['[0] = "foobar"'])
-        self.expect("frame variable tt", substrs=['[0] = 1', '[1] = "baz"', '[2] = 2'])
-
-        self.assertEqual(1, frame.GetValueForVariablePath("ti[0]").GetValueAsUnsigned())
-        self.assertFalse(frame.GetValueForVariablePath("ti[1]").IsValid())
-
-        self.assertEqual('"foobar"', frame.GetValueForVariablePath("ts[0]").GetSummary())
-        self.assertFalse(frame.GetValueForVariablePath("ts[1]").IsValid())
-
-        self.assertEqual(1, frame.GetValueForVariablePath("tt[0]").GetValueAsUnsigned())
-        self.assertEqual('"baz"', frame.GetValueForVariablePath("tt[1]").GetSummary())
-        self.assertEqual(2, frame.GetValueForVariablePath("tt[2]").GetValueAsUnsigned())
-        self.assertFalse(frame.GetValueForVariablePath("tt[3]").IsValid())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/main.cpp
deleted file mode 100644 (file)
index 7247742..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <memory>
-#include <string>
-
-int main() {
-  std::tuple<int> ti{1};
-  std::tuple<std::string> ts{"foobar"};
-  std::tuple<int, std::string, int> tt{1, "baz", 2};
-  return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/Makefile
deleted file mode 100644 (file)
index bf8e6b8..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-CXX_SOURCES := main.cpp
-
-USE_LIBSTDCPP := 1
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/TestDataFormatterStdUniquePtr.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/TestDataFormatterStdUniquePtr.py
deleted file mode 100644 (file)
index 2ead4fa..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class StdUniquePtrDataFormatterTestCase(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(["libstdcxx"])
-    def test_with_run_command(self):
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_source_regexp(
-            self, "Set break point at this line.")
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped', 'stop reason = breakpoint'])
-
-        frame = self.frame()
-        self.assertTrue(frame.IsValid())
-
-        self.expect("frame variable nup", substrs=['nup = nullptr'])
-        self.expect("frame variable iup", substrs=['iup = 0x'])
-        self.expect("frame variable sup", substrs=['sup = 0x'])
-
-        self.expect("frame variable ndp", substrs=['ndp = nullptr'])
-        self.expect("frame variable idp", substrs=['idp = 0x', 'deleter = ', 'a = 1', 'b = 2'])
-        self.expect("frame variable sdp", substrs=['sdp = 0x', 'deleter = ', 'a = 3', 'b = 4'])
-
-        self.assertEqual(123, frame.GetValueForVariablePath("iup.object").GetValueAsUnsigned())
-        self.assertEqual(123, frame.GetValueForVariablePath("*iup").GetValueAsUnsigned())
-        self.assertFalse(frame.GetValueForVariablePath("iup.deleter").IsValid())
-
-        self.assertEqual('"foobar"', frame.GetValueForVariablePath("sup.object").GetSummary())
-        self.assertEqual('"foobar"', frame.GetValueForVariablePath("*sup").GetSummary())
-        self.assertFalse(frame.GetValueForVariablePath("sup.deleter").IsValid())
-
-        self.assertEqual(456, frame.GetValueForVariablePath("idp.object").GetValueAsUnsigned())
-        self.assertEqual(456, frame.GetValueForVariablePath("*idp").GetValueAsUnsigned())
-        self.assertEqual('"baz"', frame.GetValueForVariablePath("sdp.object").GetSummary())
-        self.assertEqual('"baz"', frame.GetValueForVariablePath("*sdp").GetSummary())
-
-        idp_deleter = frame.GetValueForVariablePath("idp.deleter")
-        self.assertTrue(idp_deleter.IsValid())
-        self.assertEqual(1, idp_deleter.GetChildMemberWithName("a").GetValueAsUnsigned())
-        self.assertEqual(2, idp_deleter.GetChildMemberWithName("b").GetValueAsUnsigned())
-
-        sdp_deleter = frame.GetValueForVariablePath("sdp.deleter")
-        self.assertTrue(sdp_deleter.IsValid())
-        self.assertEqual(3, sdp_deleter.GetChildMemberWithName("a").GetValueAsUnsigned())
-        self.assertEqual(4, sdp_deleter.GetChildMemberWithName("b").GetValueAsUnsigned())
-
-    @skipIfFreeBSD
-    @skipIfWindows  # libstdcpp not ported to Windows
-    @skipIfDarwin  # doesn't compile on Darwin
-    @skipIfwatchOS  # libstdcpp not ported to watchos
-    @add_test_categories(["libstdcxx"])
-    def test_recursive_unique_ptr(self):
-        # Tests that LLDB can handle when we have a loop in the unique_ptr
-        # reference chain and that it correctly handles the different options
-        # for the frame variable command in this case.
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_source_regexp(
-            self, "Set break point at this line.")
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped', 'stop reason = breakpoint'])
-
-        self.expect("frame variable f1->fp",
-                    substrs=['fp = 0x'])
-        self.expect("frame variable --ptr-depth=1 f1->fp",
-                    substrs=['data = 2', 'fp = 0x'])
-        self.expect("frame variable --ptr-depth=2 f1->fp",
-                    substrs=['data = 2', 'fp = 0x', 'data = 1'])
-
-        frame = self.frame()
-        self.assertTrue(frame.IsValid())
-        self.assertEqual(2, frame.GetValueForVariablePath("f1->fp.object.data").GetValueAsUnsigned())
-        self.assertEqual(2, frame.GetValueForVariablePath("f1->fp->data").GetValueAsUnsigned())
-        self.assertEqual(1, frame.GetValueForVariablePath("f1->fp.object.fp.object.data").GetValueAsUnsigned())
-        self.assertEqual(1, frame.GetValueForVariablePath("f1->fp->fp->data").GetValueAsUnsigned())
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/invalid/TestDataFormatterInvalidStdUniquePtr.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/invalid/TestDataFormatterInvalidStdUniquePtr.py
deleted file mode 100644 (file)
index 190cf78..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-import lldbsuite.test.lldbinline as lldbinline
-from lldbsuite.test.decorators import *
-
-lldbinline.MakeInlineTest(__file__, globals(), [no_debug_info_test])
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/invalid/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/invalid/main.cpp
deleted file mode 100644 (file)
index b12cab2..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// Test that we don't crash when trying to pretty-print structures that don't
-// have the layout our data formatters expect.
-namespace std {
-template<typename T, typename Deleter = void>
-class unique_ptr {};
-}
-
-int main() {
-  std::unique_ptr<int> U;
-  return 0; //% self.expect("frame variable U", substrs=["unique_ptr", "{}"])
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/main.cpp
deleted file mode 100644 (file)
index dd00727..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#include <memory>
-#include <string>
-
-struct Deleter {
-  void operator()(void *) {}
-
-  int a;
-  int b;
-};
-
-struct Foo {
-  int data;
-  std::unique_ptr<Foo> fp;
-};
-
-int main() {
-  std::unique_ptr<char> nup;
-  std::unique_ptr<int> iup(new int{123});
-  std::unique_ptr<std::string> sup(new std::string("foobar"));
-
-  std::unique_ptr<char, Deleter> ndp;
-  std::unique_ptr<int, Deleter> idp(new int{456}, Deleter{1, 2});
-  std::unique_ptr<std::string, Deleter> sdp(new std::string("baz"),
-                                            Deleter{3, 4});
-
-  std::unique_ptr<Foo> fp(new Foo{3});
-
-  // Set up a structure where we have a loop in the unique_ptr chain.
-  Foo* f1 = new Foo{1};
-  Foo* f2 = new Foo{2};
-  f1->fp.reset(f2);
-  f2->fp.reset(f1);
-
-  return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/Makefile
deleted file mode 100644 (file)
index c825977..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CXX_SOURCES := main.cpp
-
-CFLAGS_EXTRAS := -O0
-USE_LIBSTDCPP := 1
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py
deleted file mode 100644 (file)
index 5a767b3..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class StdVBoolDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    @add_test_categories(["libstdcxx"])
-    def test_with_run_command(self):
-        """Test that that file and class static variables display correctly."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=-1)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type filter clear', check=False)
-            self.runCmd('type synth clear', check=False)
-            self.runCmd(
-                "settings set target.max-children-count 256",
-                check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.expect(
-            "frame variable vBool",
-            substrs=[
-                'size=49',
-                '[0] = false',
-                '[1] = true',
-                '[18] = false',
-                '[27] = true',
-                '[36] = false',
-                '[47] = true',
-                '[48] = true'])
-
-        self.expect(
-            "expr vBool",
-            substrs=[
-                'size=49',
-                '[0] = false',
-                '[1] = true',
-                '[18] = false',
-                '[27] = true',
-                '[36] = false',
-                '[47] = true',
-                '[48] = true'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/main.cpp
deleted file mode 100644 (file)
index 73956dd..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-#include <vector>
-
-int main()
-{
-    std::vector<bool> vBool;
-
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-    
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(false);
-    vBool.push_back(true);
-    vBool.push_back(true);
-
-    return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/Makefile
deleted file mode 100644 (file)
index 654e4b1..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CXX_SOURCES := main.cpp
-
-CXXFLAGS := -O0
-USE_LIBSTDCPP := 1
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py
deleted file mode 100644 (file)
index 27cdf1e..0000000
+++ /dev/null
@@ -1,213 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class StdVectorDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    @add_test_categories(["libstdcxx"])
-    def test_with_run_command(self):
-        """Test that that file and class static variables display correctly."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_source_regexp(
-            self, "Set break point at this line.")
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type filter clear', check=False)
-            self.runCmd('type synth clear', check=False)
-            self.runCmd(
-                "settings set target.max-children-count 256",
-                check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        # empty vectors (and storage pointers SHOULD BOTH BE NULL..)
-        self.expect("frame variable numbers",
-                    substrs=['numbers = size=0'])
-
-        self.runCmd("c")
-
-        # first value added
-        self.expect("frame variable numbers",
-                    substrs=['numbers = size=1',
-                             '[0] = 1',
-                             '}'])
-
-        # add some more data
-        self.runCmd("c")
-
-        self.expect("frame variable numbers",
-                    substrs=['numbers = size=4',
-                             '[0] = 1',
-                             '[1] = 12',
-                             '[2] = 123',
-                             '[3] = 1234',
-                             '}'])
-
-        self.expect("p numbers",
-                    substrs=['$', 'size=4',
-                             '[0] = 1',
-                             '[1] = 12',
-                             '[2] = 123',
-                             '[3] = 1234',
-                             '}'])
-
-        # check access to synthetic children
-        self.runCmd(
-            "type summary add --summary-string \"item 0 is ${var[0]}\" std::int_vect int_vect")
-        self.expect('frame variable numbers',
-                    substrs=['item 0 is 1'])
-
-        self.runCmd(
-            "type summary add --summary-string \"item 0 is ${svar[0]}\" std::int_vect int_vect")
-        #import time
-        # time.sleep(19)
-        self.expect('frame variable numbers',
-                    substrs=['item 0 is 1'])
-        # move on with synths
-        self.runCmd("type summary delete std::int_vect")
-        self.runCmd("type summary delete int_vect")
-
-        # add some more data
-        self.runCmd("c")
-
-        self.expect("frame variable numbers",
-                    substrs=['numbers = size=7',
-                             '[0] = 1',
-                             '[1] = 12',
-                             '[2] = 123',
-                             '[3] = 1234',
-                             '[4] = 12345',
-                             '[5] = 123456',
-                             '[6] = 1234567',
-                             '}'])
-
-        self.expect("p numbers",
-                    substrs=['$', 'size=7',
-                             '[0] = 1',
-                             '[1] = 12',
-                             '[2] = 123',
-                             '[3] = 1234',
-                             '[4] = 12345',
-                             '[5] = 123456',
-                             '[6] = 1234567',
-                             '}'])
-
-        # check access-by-index
-        self.expect("frame variable numbers[0]",
-                    substrs=['1'])
-        self.expect("frame variable numbers[1]",
-                    substrs=['12'])
-        self.expect("frame variable numbers[2]",
-                    substrs=['123'])
-        self.expect("frame variable numbers[3]",
-                    substrs=['1234'])
-
-        # but check that expression does not rely on us
-        # (when expression gets to call into STL code correctly, we will have to find
-        # another way to check this)
-        self.expect("expression numbers[6]", matching=False, error=True,
-                    substrs=['1234567'])
-
-        # check that MightHaveChildren() gets it right
-        self.assertTrue(
-            self.frame().FindVariable("numbers").MightHaveChildren(),
-            "numbers.MightHaveChildren() says False for non empty!")
-
-        # clear out the vector and see that we do the right thing once again
-        self.runCmd("c")
-
-        self.expect("frame variable numbers",
-                    substrs=['numbers = size=0'])
-
-        self.runCmd("c")
-
-        # first value added
-        self.expect("frame variable numbers",
-                    substrs=['numbers = size=1',
-                             '[0] = 7',
-                             '}'])
-
-        # check if we can display strings
-        self.runCmd("c")
-
-        self.expect("frame variable strings",
-                    substrs=['goofy',
-                             'is',
-                             'smart'])
-
-        self.expect("p strings",
-                    substrs=['goofy',
-                             'is',
-                             'smart'])
-
-        # test summaries based on synthetic children
-        self.runCmd(
-            "type summary add std::string_vect string_vect --summary-string \"vector has ${svar%#} items\" -e")
-        self.expect("frame variable strings",
-                    substrs=['vector has 3 items',
-                             'goofy',
-                             'is',
-                             'smart'])
-
-        self.expect("p strings",
-                    substrs=['vector has 3 items',
-                             'goofy',
-                             'is',
-                             'smart'])
-
-        self.runCmd("c")
-
-        self.expect("frame variable strings",
-                    substrs=['vector has 4 items'])
-
-        # check access-by-index
-        self.expect("frame variable strings[0]",
-                    substrs=['goofy'])
-        self.expect("frame variable strings[1]",
-                    substrs=['is'])
-
-        # but check that expression does not rely on us
-        # (when expression gets to call into STL code correctly, we will have to find
-        # another way to check this)
-        self.expect("expression strings[0]", matching=False, error=True,
-                    substrs=['goofy'])
-
-        # check that MightHaveChildren() gets it right
-        self.assertTrue(
-            self.frame().FindVariable("strings").MightHaveChildren(),
-            "strings.MightHaveChildren() says False for non empty!")
-
-        self.runCmd("c")
-
-        self.expect("frame variable strings",
-                    substrs=['vector has 0 items'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/main.cpp
deleted file mode 100644 (file)
index 0109179..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#include <string>
-#include <vector>
-typedef std::vector<int> int_vect;
-typedef std::vector<std::string> string_vect;
-
-int main()
-{
-    int_vect numbers;
-    numbers.push_back(1);  // Set break point at this line.
-    numbers.push_back(12);  // Set break point at this line.
-    numbers.push_back(123);
-    numbers.push_back(1234);
-    numbers.push_back(12345);  // Set break point at this line.
-    numbers.push_back(123456);
-    numbers.push_back(1234567);
-    
-    numbers.clear();  // Set break point at this line.
-    
-    numbers.push_back(7);  // Set break point at this line.
-
-    string_vect strings;  // Set break point at this line.
-    strings.push_back(std::string("goofy"));
-    strings.push_back(std::string("is"));
-    strings.push_back(std::string("smart"));
-    
-    strings.push_back(std::string("!!!"));  // Set break point at this line.
-    
-    strings.clear();  // Set break point at this line.
-    
-    return 0;// Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synth/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synth/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synth/TestDataFormatterSynth.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synth/TestDataFormatterSynth.py
deleted file mode 100644 (file)
index 51d42fc..0000000
+++ /dev/null
@@ -1,217 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class SynthDataFormatterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    def test_with_run_command(self):
-        """Test that that file and class static variables display correctly."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type filter clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        # Pick some values and check that the basics work
-        self.runCmd("type filter add BagOfInts --child x --child z")
-        self.expect("frame variable int_bag",
-                    substrs=['x = 6',
-                             'z = 8'])
-
-        # Check we can still access the missing child by summary
-        self.runCmd(
-            "type summary add BagOfInts --summary-string \"y=${var.y}\"")
-        self.expect('frame variable int_bag',
-                    substrs=['y=7'])
-
-        # Even if we have synth children, the summary prevails
-        self.expect("frame variable int_bag", matching=False,
-                    substrs=['x = 6',
-                             'z = 8'])
-
-        # if we skip synth and summary show y
-        self.expect(
-            "frame variable int_bag --synthetic-type false --no-summary-depth=1",
-            substrs=[
-                'x = 6',
-                'y = 7',
-                'z = 8'])
-
-        # if we ask for raw output same happens
-        self.expect("frame variable int_bag --raw-output",
-                    substrs=['x = 6',
-                             'y = 7',
-                             'z = 8'])
-
-        # Summary+Synth must work together
-        self.runCmd(
-            "type summary add BagOfInts --summary-string \"x=${var.x}\" -e")
-        self.expect('frame variable int_bag',
-                    substrs=['x=6',
-                             'x = 6',
-                             'z = 8'])
-
-        # Same output, but using Python
-        self.runCmd(
-            "type summary add BagOfInts --python-script \"return 'x=%s' % valobj.GetChildMemberWithName('x').GetValue()\" -e")
-        self.expect('frame variable int_bag',
-                    substrs=['x=6',
-                             'x = 6',
-                             'z = 8'])
-
-        # If I skip summaries, still give me the artificial children
-        self.expect("frame variable int_bag --no-summary-depth=1",
-                    substrs=['x = 6',
-                             'z = 8'])
-
-        # Delete synth and check that the view reflects it immediately
-        self.runCmd("type filter delete BagOfInts")
-        self.expect("frame variable int_bag",
-                    substrs=['x = 6',
-                             'y = 7',
-                             'z = 8'])
-
-        # Add the synth again and check that it's honored deeper in the
-        # hierarchy
-        self.runCmd("type filter add BagOfInts --child x --child z")
-        self.expect('frame variable bag_bag',
-                    substrs=['x = x=69 {',
-                             'x = 69',
-                             'z = 71',
-                             'y = x=66 {',
-                             'x = 66',
-                             'z = 68'])
-        self.expect('frame variable bag_bag', matching=False,
-                    substrs=['y = 70',
-                             'y = 67'])
-
-        # Check that a synth can expand nested stuff
-        self.runCmd("type filter add BagOfBags --child x.y --child y.z")
-        self.expect('frame variable bag_bag',
-                    substrs=['x.y = 70',
-                             'y.z = 68'])
-
-        # ...even if we get -> and . wrong
-        self.runCmd("type filter add BagOfBags --child x.y --child \"y->z\"")
-        self.expect('frame variable bag_bag',
-                    substrs=['x.y = 70',
-                             'y->z = 68'])
-
-        # ...even bitfields
-        self.runCmd(
-            "type filter add BagOfBags --child x.y --child \"y->z[1-2]\"")
-        self.expect('frame variable bag_bag --show-types',
-                    substrs=['x.y = 70',
-                             '(int:2) y->z[1-2] = 2'])
-
-        # ...even if we format the bitfields
-        self.runCmd(
-            "type filter add BagOfBags --child x.y --child \"y->y[0-0]\"")
-        self.runCmd("type format add \"int:1\" -f bool")
-        self.expect('frame variable bag_bag --show-types',
-                    substrs=['x.y = 70',
-                             '(int:1) y->y[0-0] = true'])
-
-        # ...even if we use one-liner summaries
-        self.runCmd("type summary add -c BagOfBags")
-        self.expect('frame variable bag_bag', substrs=[
-                    '(BagOfBags) bag_bag = (x.y = 70, y->y[0-0] = true)'])
-
-        self.runCmd("type summary delete BagOfBags")
-
-        # now check we are dynamic (and arrays work)
-        self.runCmd(
-            "type filter add Plenty --child bitfield --child array[0] --child array[2]")
-        self.expect('frame variable plenty_of_stuff',
-                    substrs=['bitfield = 1',
-                             'array[0] = 5',
-                             'array[2] = 3'])
-
-        self.runCmd("n")
-        self.expect('frame variable plenty_of_stuff',
-                    substrs=['bitfield = 17',
-                             'array[0] = 5',
-                             'array[2] = 3'])
-
-        # skip synthetic children
-        self.expect('frame variable plenty_of_stuff --synthetic-type no',
-                    substrs=['some_values = 0x',
-                             'array = 0x',
-                             'array_size = 5'])
-
-        # check flat printing with synthetic children
-        self.expect('frame variable plenty_of_stuff --flat',
-                    substrs=['plenty_of_stuff.bitfield = 17',
-                             '*(plenty_of_stuff.array) = 5',
-                             '*(plenty_of_stuff.array) = 3'])
-
-        # check that we do not lose location information for our children
-        self.expect('frame variable plenty_of_stuff --location',
-                    substrs=['0x',
-                             ':   bitfield = 17'])
-
-        # check we work across pointer boundaries
-        self.expect('frame variable plenty_of_stuff.some_values --ptr-depth=1',
-                    substrs=['(BagOfInts *) plenty_of_stuff.some_values',
-                             'x = 5',
-                             'z = 7'])
-
-        # but not if we don't want to
-        self.runCmd("type filter add BagOfInts --child x --child z -p")
-        self.expect('frame variable plenty_of_stuff.some_values --ptr-depth=1',
-                    substrs=['(BagOfInts *) plenty_of_stuff.some_values',
-                             'x = 5',
-                             'y = 6',
-                             'z = 7'])
-
-        # check we're dynamic even if nested
-        self.runCmd("type filter add BagOfBags --child x.z")
-        self.expect('frame variable bag_bag',
-                    substrs=['x.z = 71'])
-
-        self.runCmd("n")
-        self.expect('frame variable bag_bag',
-                    substrs=['x.z = 12'])
-
-        self.runCmd(
-            'type summary add -e -s "I am always empty but have" EmptyStruct')
-        self.expect('frame variable es', substrs=[
-                    "I am always empty but have {}"])
-        self.runCmd('type summary add -e -h -s "I am really empty" EmptyStruct')
-        self.expect('frame variable es', substrs=["I am really empty"])
-        self.expect(
-            'frame variable es',
-            substrs=["I am really empty {}"],
-            matching=False)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synth/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synth/main.cpp
deleted file mode 100644 (file)
index acb9032..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-
-struct BagOfInts
-{
-    int x;
-    int y;
-    int z;
-    BagOfInts(int X) :
-    x(X),
-    y(X+1),
-    z(X+2) {}
-};
-
-struct BagOfFloats
-{
-    float x;
-    float y;
-    float z;
-    BagOfFloats(float X) :
-    x(X+0.334),
-    y(X+0.500),
-    z(X+0.667) {}
-};
-
-struct BagOfBags
-{
-    BagOfInts x;
-    BagOfInts y;
-    BagOfFloats z;
-    BagOfFloats q;
-    BagOfBags() : 
-    x('E'),
-    y('B'),
-    z(1.1),
-    q(20.11) {}
-};
-
-struct EmptyStruct {};
-
-struct Plenty
-{
-    BagOfInts *some_values;
-    int* array;
-    int array_size;
-    int bitfield;
-    
-    Plenty(int N, bool flagA, bool flagB) :
-    some_values(new BagOfInts(N)),
-    array(new int[N]),
-    array_size(N),
-    bitfield( (flagA ? 0x01 : 0x00) | (flagB ? 0x10 : 0x00) )
-    {
-        for (int j = 0; j < N; j++)
-            array[j] = N-j;
-    }
-};
-
-int main (int argc, const char * argv[])
-{
-    BagOfInts int_bag(6);
-    BagOfFloats float_bag(2.71);
-    
-    BagOfBags bag_bag;
-    EmptyStruct es;
-    
-    Plenty plenty_of_stuff(5,true,false);
-    
-    plenty_of_stuff.bitfield = 0x11; // Set break point at this line.
-    
-    bag_bag.x.z = 12;
-    
-    return 0;
-    
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthtype/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthtype/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthtype/TestDataFormatterSynthType.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthtype/TestDataFormatterSynthType.py
deleted file mode 100644 (file)
index 2c7d5b2..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class DataFormatterSynthTypeTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', 'break here')
-
-    @skipIfFreeBSD  # llvm.org/pr20545 bogus output confuses buildbot parser
-    def test_with_run_command(self):
-        """Test using Python synthetic children provider to provide a typename."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type filter clear', check=False)
-            self.runCmd('type synth clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.runCmd("script from myIntSynthProvider import *")
-        self.runCmd("type synth add -l myIntSynthProvider myInt")
-
-        self.expect('frame variable x', substrs=['ThisTestPasses'])
-        self.expect('frame variable y', substrs=['ThisTestPasses'])
-        self.expect('frame variable z', substrs=['ThisTestPasses'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthtype/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthtype/main.cpp
deleted file mode 100644 (file)
index accbf0a..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-class myInt {
-    private: int theValue;
-    public: myInt() : theValue(0) {}
-    public: myInt(int _x) : theValue(_x) {}
-    int val() { return theValue; }
-};
-
-class myArray {
-public:
-    int array[16];
-};
-
-class hasAnInt {
-    public:
-        myInt theInt;
-        hasAnInt() : theInt(42) {}  
-};
-
-myInt operator + (myInt x, myInt y) { return myInt(x.val() + y.val()); }
-
-int main() {
-    myInt x{3};
-    myInt y{4};
-    myInt z {x+y};
-    hasAnInt hi;
-    myArray ma;
-
-    return z.val(); // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthtype/myIntSynthProvider.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthtype/myIntSynthProvider.py
deleted file mode 100644 (file)
index fa47ca2..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-class myIntSynthProvider(object):
-
-    def __init__(self, valobj, dict):
-        self.valobj = valobj
-        self.val = self.valobj.GetChildMemberWithName("theValue")
-
-    def num_children(self):
-        return 0
-
-    def get_child_at_index(self, index):
-        return None
-
-    def get_child_index(self, name):
-        return None
-
-    def update(self):
-        return False
-
-    def has_children(self):
-        return False
-
-    def get_type_name(self):
-        return "ThisTestPasses"
-
-
-class myArraySynthProvider(object):
-
-    def __init__(self, valobj, dict):
-        self.valobj = valobj
-        self.array = self.valobj.GetChildMemberWithName("array")
-
-    def num_children(self, max_count):
-        if 16 < max_count:
-            return 16
-        return max_count
-
-    def get_child_at_index(self, index):
-        return None  # Keep it simple when this is not tested here.
-
-    def get_child_index(self, name):
-        return None  # Keep it simple when this is not tested here.
-
-    def has_children(self):
-        return True
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py
deleted file mode 100644 (file)
index fc7ffa0..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class DataFormatterSynthValueTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', 'break here')
-
-    @skipIfFreeBSD  # llvm.org/pr20545 bogus output confuses buildbot parser
-    def test_with_run_command(self):
-        """Test using Python synthetic children provider to provide a value."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type filter clear', check=False)
-            self.runCmd('type synth clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        x = self.frame().FindVariable("x")
-        x.SetPreferSyntheticValue(True)
-        y = self.frame().FindVariable("y")
-        y.SetPreferSyntheticValue(True)
-        z = self.frame().FindVariable("z")
-        z.SetPreferSyntheticValue(True)
-        q = self.frame().FindVariable("q")
-        z.SetPreferSyntheticValue(True)
-
-        x_val = x.GetValueAsUnsigned
-        y_val = y.GetValueAsUnsigned
-        z_val = z.GetValueAsUnsigned
-        q_val = q.GetValueAsUnsigned
-
-        if self.TraceOn():
-            print(
-                "x_val = %s; y_val = %s; z_val = %s; q_val = %s" %
-                (x_val(), y_val(), z_val(), q_val()))
-
-        self.assertFalse(x_val() == 3, "x == 3 before synthetics")
-        self.assertFalse(y_val() == 4, "y == 4 before synthetics")
-        self.assertFalse(z_val() == 7, "z == 7 before synthetics")
-        self.assertFalse(q_val() == 8, "q == 8 before synthetics")
-
-        # now set up the synth
-        self.runCmd("script from myIntSynthProvider import *")
-        self.runCmd("type synth add -l myIntSynthProvider myInt")
-        self.runCmd("type synth add -l myArraySynthProvider myArray")
-        self.runCmd("type synth add -l myIntSynthProvider myIntAndStuff")
-
-        if self.TraceOn():
-            print(
-                "x_val = %s; y_val = %s; z_val = %s; q_val = %s" %
-                (x_val(), y_val(), z_val(), q_val()))
-
-        self.assertTrue(x_val() == 3, "x != 3 after synthetics")
-        self.assertTrue(y_val() == 4, "y != 4 after synthetics")
-        self.assertTrue(z_val() == 7, "z != 7 after synthetics")
-        self.assertTrue(q_val() == 8, "q != 8 after synthetics")
-
-        self.expect("frame variable x", substrs=['3'])
-        self.expect(
-            "frame variable x",
-            substrs=['theValue = 3'],
-            matching=False)
-        self.expect("frame variable q", substrs=['8'])
-        self.expect(
-            "frame variable q",
-            substrs=['theValue = 8'],
-            matching=False)
-
-        # check that an aptly defined synthetic provider does not affect
-        # one-lining
-        self.expect(
-            "expression struct Struct { myInt theInt{12}; }; Struct()",
-            substrs=['(theInt = 12)'])
-
-        # check that we can use a synthetic value in a summary
-        self.runCmd("type summary add hasAnInt -s ${var.theInt}")
-        hi = self.frame().FindVariable("hi")
-        self.assertEqual(hi.GetSummary(), "42")
-
-        ma = self.frame().FindVariable("ma")
-        self.assertTrue(ma.IsValid())
-        self.assertEqual(ma.GetNumChildren(15), 15)
-        self.assertEqual(ma.GetNumChildren(16), 16)
-        self.assertEqual(ma.GetNumChildren(17), 16)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/main.cpp
deleted file mode 100644 (file)
index 1a5925a..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-class myInt {
-    private: int theValue;
-    public: myInt() : theValue(0) {}
-    public: myInt(int _x) : theValue(_x) {}
-    int val() { return theValue; }
-};
-
-class myIntAndStuff {
-private:
-  int theValue;
-  double theExtraFluff;
-public:
-  myIntAndStuff() : theValue(0), theExtraFluff(1.25) {}
-  myIntAndStuff(int _x) : theValue(_x), theExtraFluff(1.25) {}
-  int val() { return theValue; }
-};
-
-class myArray {
-public:
-    int array[16];
-};
-
-class hasAnInt {
-    public:
-        myInt theInt;
-        hasAnInt() : theInt(42) {}  
-};
-
-myInt operator + (myInt x, myInt y) { return myInt(x.val() + y.val()); }
-myInt operator + (myInt x, myIntAndStuff y) { return myInt(x.val() + y.val()); }
-
-int main() {
-    myInt x{3};
-    myInt y{4};
-    myInt z {x+y};
-    myIntAndStuff q {z.val()+1};
-    hasAnInt hi;
-    myArray ma;
-
-    return z.val(); // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/myIntSynthProvider.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/myIntSynthProvider.py
deleted file mode 100644 (file)
index 82da6f9..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-class myIntSynthProvider(object):
-
-    def __init__(self, valobj, dict):
-        self.valobj = valobj
-        self.val = self.valobj.GetChildMemberWithName("theValue")
-
-    def num_children(self):
-        return 0
-
-    def get_child_at_index(self, index):
-        return None
-
-    def get_child_index(self, name):
-        return None
-
-    def update(self):
-        return False
-
-    def has_children(self):
-        return False
-
-    def get_value(self):
-        return self.val
-
-
-class myArraySynthProvider(object):
-
-    def __init__(self, valobj, dict):
-        self.valobj = valobj
-        self.array = self.valobj.GetChildMemberWithName("array")
-
-    def num_children(self, max_count):
-        if 16 < max_count:
-            return 16
-        return max_count
-
-    def get_child_at_index(self, index):
-        return None  # Keep it simple when this is not tested here.
-
-    def get_child_index(self, name):
-        return None  # Keep it simple when this is not tested here.
-
-    def has_children(self):
-        return True
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/TestDumpDynamic.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/TestDumpDynamic.py
deleted file mode 100644 (file)
index 734e711..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-from __future__ import absolute_import
-
-from lldbsuite.test import lldbinline
-
-lldbinline.MakeInlineTest(
-    __file__, globals(), [
-        lldbinline.expectedFailureAll(
-            oslist=["windows"], bugnumber="llvm.org/pr24663")])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/main.cpp
deleted file mode 100644 (file)
index c59e9f0..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-class Base {
-public:
-  Base () = default;
-  virtual int func() { return 1; }
-  virtual ~Base() = default;
-};
-
-class Derived : public Base {
-private:
-  int m_derived_data;
-public:
-  Derived () : Base(), m_derived_data(0x0fedbeef) {}
-  virtual ~Derived() = default;
-  virtual int func() { return m_derived_data; }
-};
-
-int main (int argc, char const *argv[])
-{
-  Base *base = new Derived();
-    return 0; //% stream = lldb.SBStream()
-    //% base = self.frame().FindVariable("base")
-    //% base.SetPreferDynamicValue(lldb.eDynamicDontRunTarget)
-    //% base.GetDescription(stream)
-    //% if self.TraceOn(): print(stream.GetData())
-    //% self.assertTrue(stream.GetData().startswith("(Derived *"))
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/format-propagation/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/format-propagation/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/format-propagation/TestFormatPropagation.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/format-propagation/TestFormatPropagation.py
deleted file mode 100644 (file)
index 8994831..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-"""
-Check if changing Format on an SBValue correctly propagates that new format to children as it should
-"""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class FormatPropagationTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    # rdar://problem/14035604
-    def test_with_run_command(self):
-        """Check for an issue where capping does not work because the Target pointer appears to be changing behind our backs."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            pass
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        # extract the parent and the children
-        frame = self.frame()
-        parent = self.frame().FindVariable("f")
-        self.assertTrue(
-            parent is not None and parent.IsValid(),
-            "could not find f")
-        X = parent.GetChildMemberWithName("X")
-        self.assertTrue(X is not None and X.IsValid(), "could not find X")
-        Y = parent.GetChildMemberWithName("Y")
-        self.assertTrue(Y is not None and Y.IsValid(), "could not find Y")
-        # check their values now
-        self.assertTrue(X.GetValue() == "1", "X has an invalid value")
-        self.assertTrue(Y.GetValue() == "2", "Y has an invalid value")
-        # set the format on the parent
-        parent.SetFormat(lldb.eFormatHex)
-        self.assertTrue(
-            X.GetValue() == "0x00000001",
-            "X has not changed format")
-        self.assertTrue(
-            Y.GetValue() == "0x00000002",
-            "Y has not changed format")
-        # Step and check if the values make sense still
-        self.runCmd("next")
-        self.assertTrue(X.GetValue() == "0x00000004", "X has not become 4")
-        self.assertTrue(Y.GetValue() == "0x00000002", "Y has not stuck as hex")
-        # Check that children can still make their own choices
-        Y.SetFormat(lldb.eFormatDecimal)
-        self.assertTrue(X.GetValue() == "0x00000004", "X is still hex")
-        self.assertTrue(Y.GetValue() == "2", "Y has not been reset")
-        # Make a few more changes
-        parent.SetFormat(lldb.eFormatDefault)
-        X.SetFormat(lldb.eFormatHex)
-        Y.SetFormat(lldb.eFormatDefault)
-        self.assertTrue(
-            X.GetValue() == "0x00000004",
-            "X is not hex as it asked")
-        self.assertTrue(Y.GetValue() == "2", "Y is not defaulted")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/format-propagation/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/format-propagation/main.cpp
deleted file mode 100644 (file)
index 5822fbc..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-struct foo
-{
-       int X;
-       int Y;
-       foo(int a, int b) : X(a), Y(b) {}
-};
-
-int main()
-{
-       foo f(1,2);
-       f.X = 4; // Set break point at this line.
-       return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/frameformat_smallstruct/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/frameformat_smallstruct/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/frameformat_smallstruct/TestFrameFormatSmallStruct.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/frameformat_smallstruct/TestFrameFormatSmallStruct.py
deleted file mode 100644 (file)
index a6a61f1..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-"""
-Test that the user can input a format but it will not prevail over summary format's choices.
-"""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class FrameFormatSmallStructTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    def test_with_run_command(self):
-        """Test that the user can input a format but it will not prevail over summary format's choices."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        self.expect("thread list", substrs=['addPair(p=(x = 3, y = -3))'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/frameformat_smallstruct/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/frameformat_smallstruct/main.cpp
deleted file mode 100644 (file)
index a77f2c4..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-struct Pair {
-       int x;
-       int y;
-       
-       Pair(int _x, int _y) : x(_x), y(_y) {}  
-};
-
-int addPair(Pair p)
-{
-       return p.x + p.y; // Set break point at this line.
-}
-
-int main() {
-       Pair p1(3,-3);
-       return addPair(p1);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/hexcaps/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/hexcaps/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/hexcaps/TestDataFormatterHexCaps.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/hexcaps/TestDataFormatterHexCaps.py
deleted file mode 100644 (file)
index 80a02d0..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class DataFormatterHexCapsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    def test_with_run_command(self):
-        """Test that that file and class static variables display correctly."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format delete hex', check=False)
-            self.runCmd('type summary clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.runCmd("type format add -f uppercase int")
-
-        self.expect('frame variable mine',
-                    substrs=['mine = ',
-                             'first = 0x001122AA', 'second = 0x1122BB44'])
-
-        self.runCmd("type format add -f hex int")
-
-        self.expect('frame variable mine',
-                    substrs=['mine = ',
-                             'first = 0x001122aa', 'second = 0x1122bb44'])
-
-        self.runCmd("type format delete int")
-
-        self.runCmd(
-            "type summary add -s \"${var.first%X} and ${var.second%x}\" foo")
-
-        self.expect('frame variable mine',
-                    substrs=['(foo) mine = 0x001122AA and 0x1122bb44'])
-
-        self.runCmd(
-            "type summary add -s \"${var.first%X} and ${var.second%X}\" foo")
-        self.runCmd("next")
-        self.runCmd("next")
-        self.expect('frame variable mine',
-                    substrs=['(foo) mine = 0xAABBCCDD and 0x1122BB44'])
-
-        self.runCmd(
-            "type summary add -s \"${var.first%x} and ${var.second%X}\" foo")
-        self.expect('frame variable mine',
-                    substrs=['(foo) mine = 0xaabbccdd and 0x1122BB44'])
-        self.runCmd("next")
-        self.runCmd("next")
-        self.runCmd(
-            "type summary add -s \"${var.first%x} and ${var.second%x}\" foo")
-        self.expect('frame variable mine',
-                    substrs=['(foo) mine = 0xaabbccdd and 0xff00ff00'])
-        self.runCmd(
-            "type summary add -s \"${var.first%X} and ${var.second%X}\" foo")
-        self.expect('frame variable mine',
-                    substrs=['(foo) mine = 0xAABBCCDD and 0xFF00FF00'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/hexcaps/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/hexcaps/main.cpp
deleted file mode 100644 (file)
index fc4204b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <stdio.h>
-
-struct foo
-{
-    int first;
-    int second;
-};
-
-int main ()
-{
-    struct foo mine = {0x001122AA, 0x1122BB44};
-    printf("main.first = 0x%8.8x, main.second = 0x%8.8x\n", mine.first, mine.second);
-       mine.first = 0xAABBCCDD; // Set break point at this line.
-    printf("main.first = 0x%8.8x, main.second = 0x%8.8x\n", mine.first, mine.second);
-       mine.second = 0xFF00FF00;
-    printf("main.first = 0x%8.8x, main.second = 0x%8.8x\n", mine.first, mine.second);
-    return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/language_category_updates/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/language_category_updates/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/language_category_updates/TestDataFormatterLanguageCategoryUpdates.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/language_category_updates/TestDataFormatterLanguageCategoryUpdates.py
deleted file mode 100644 (file)
index 62bd058..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class LanguageCategoryUpdatesTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// break here')
-
-    def test_with_run_command(self):
-        """Test that LLDB correctly cleans caches when language categories change."""
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            if hasattr(
-                    self,
-                    'type_category') and hasattr(
-                    self,
-                    'type_specifier'):
-                self.type_category.DeleteTypeSummary(self.type_specifier)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        self.expect(
-            "frame variable",
-            substrs=[
-                '(S)',
-                'object',
-                '123',
-                '456'],
-            matching=True)
-
-        self.type_category = self.dbg.GetCategory(
-            lldb.eLanguageTypeC_plus_plus)
-        type_summary = lldb.SBTypeSummary.CreateWithSummaryString(
-            "this is an object of type S")
-        self.type_specifier = lldb.SBTypeNameSpecifier('S')
-        self.type_category.AddTypeSummary(self.type_specifier, type_summary)
-
-        self.expect(
-            "frame variable",
-            substrs=['this is an object of type S'],
-            matching=True)
-
-        self.type_category.DeleteTypeSummary(self.type_specifier)
-        self.expect(
-            "frame variable",
-            substrs=['this is an object of type S'],
-            matching=False)
-        self.expect(
-            "frame variable",
-            substrs=[
-                '(S)',
-                'object',
-                '123',
-                '456'],
-            matching=True)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/language_category_updates/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/language_category_updates/main.cpp
deleted file mode 100644 (file)
index 86ee8d5..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-struct S {
-  int x;
-  int y;
-  
-  S() : x(123), y(456) {}
-};
-
-int main() {
-  S object;
-  return 0; // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsarraysynth/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsarraysynth/Makefile
deleted file mode 100644 (file)
index 8b322ff..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-OBJC_SOURCES := main.m
-
-CFLAGS_EXTRAS := -w
-
-
-
-LD_EXTRAS := -framework Foundation
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsarraysynth/TestNSArraySynthetic.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsarraysynth/TestNSArraySynthetic.py
deleted file mode 100644 (file)
index 466eb5d..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class NSArraySyntheticTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.m', '// Set break point at this line.')
-
-    @skipUnlessDarwin
-    def test_rdar11086338_with_run_command(self):
-        """Test that NSArray reports its synthetic children properly."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type synth clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        # Now check that we are displaying Cocoa classes correctly
-        self.expect('frame variable arr',
-                    substrs=['@"6 elements"'])
-        self.expect('frame variable other_arr',
-                    substrs=['@"4 elements"'])
-        self.expect(
-            'frame variable arr --ptr-depth 1',
-            substrs=[
-                '@"6 elements"',
-                '[0] = 0x',
-                '[1] = 0x',
-                '[2] = 0x',
-                '[3] = 0x',
-                '[4] = 0x',
-                '[5] = 0x'])
-        self.expect(
-            'frame variable other_arr --ptr-depth 1',
-            substrs=[
-                '@"4 elements"',
-                '[0] = 0x',
-                '[1] = 0x',
-                '[2] = 0x',
-                '[3] = 0x'])
-        self.expect(
-            'frame variable arr --ptr-depth 1 -d no-run-target',
-            substrs=[
-                '@"6 elements"',
-                '@"hello"',
-                '@"world"',
-                '@"this"',
-                '@"is"',
-                '@"me"',
-                '@"http://www.apple.com'])
-        self.expect(
-            'frame variable other_arr --ptr-depth 1 -d no-run-target',
-            substrs=[
-                '@"4 elements"',
-                '(int)5',
-                '@"a string"',
-                '@"6 elements"'])
-        self.expect(
-            'frame variable other_arr --ptr-depth 2 -d no-run-target',
-            substrs=[
-                '@"4 elements"',
-                '@"6 elements" {',
-                '@"hello"',
-                '@"world"',
-                '@"this"',
-                '@"is"',
-                '@"me"',
-                '@"http://www.apple.com'])
-
-        self.assertTrue(
-            self.frame().FindVariable("arr").MightHaveChildren(),
-            "arr says it does not have children!")
-        self.assertTrue(
-            self.frame().FindVariable("other_arr").MightHaveChildren(),
-            "arr says it does not have children!")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsarraysynth/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsarraysynth/main.m
deleted file mode 100644 (file)
index e65ee6f..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-//===-- main.m ------------------------------------------------*- ObjC -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#import <Foundation/Foundation.h>
-
-int main (int argc, const char * argv[])
-{
-    
-    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-
-
-       NSMutableArray* arr = [[NSMutableArray alloc] init];
-       [arr addObject:@"hello"];
-       [arr addObject:@"world"];
-       [arr addObject:@"this"];
-       [arr addObject:@"is"];
-       [arr addObject:@"me"];
-       [arr addObject:[NSURL URLWithString:@"http://www.apple.com/"]];
-
-       NSDate *aDate = [NSDate distantFuture];
-       NSValue *aValue = [NSNumber numberWithInt:5];
-       NSString *aString = @"a string";
-
-       NSArray *other_arr = [NSArray arrayWithObjects:aDate, aValue, aString, arr, nil];
-
-    [pool drain];// Set break point at this line.
-    return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsdictionarysynth/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsdictionarysynth/Makefile
deleted file mode 100644 (file)
index 8b322ff..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-OBJC_SOURCES := main.m
-
-CFLAGS_EXTRAS := -w
-
-
-
-LD_EXTRAS := -framework Foundation
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsdictionarysynth/TestNSDictionarySynthetic.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsdictionarysynth/TestNSDictionarySynthetic.py
deleted file mode 100644 (file)
index b77d01a..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class NSDictionarySyntheticTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.m', '// Set break point at this line.')
-
-    @skipUnlessDarwin
-    def test_rdar11988289_with_run_command(self):
-        """Test that NSDictionary reports its synthetic children properly."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type synth clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        # Now check that we are displaying Cocoa classes correctly
-        self.expect('frame variable dictionary',
-                    substrs=['3 key/value pairs'])
-        self.expect('frame variable mutabledict',
-                    substrs=['4 key/value pairs'])
-        self.expect(
-            'frame variable dictionary --ptr-depth 1',
-            substrs=[
-                '3 key/value pairs',
-                '[0] = ',
-                'key = 0x',
-                'value = 0x',
-                '[1] = ',
-                '[2] = '])
-        self.expect(
-            'frame variable mutabledict --ptr-depth 1',
-            substrs=[
-                '4 key/value pairs',
-                '[0] = ',
-                'key = 0x',
-                'value = 0x',
-                '[1] = ',
-                '[2] = ',
-                '[3] = '])
-        self.expect(
-            'frame variable dictionary --ptr-depth 1 --dynamic-type no-run-target',
-            substrs=[
-                '3 key/value pairs',
-                '@"bar"',
-                '@"2 elements"',
-                '@"baz"',
-                '2 key/value pairs'])
-        self.expect(
-            'frame variable mutabledict --ptr-depth 1 --dynamic-type no-run-target',
-            substrs=[
-                '4 key/value pairs',
-                '(int)23',
-                '@"123"',
-                '@"http://www.apple.com"',
-                '@"sourceofstuff"',
-                '3 key/value pairs'])
-        self.expect(
-            'frame variable mutabledict --ptr-depth 2 --dynamic-type no-run-target',
-            substrs=[
-                '4 key/value pairs',
-                '(int)23',
-                '@"123"',
-                '@"http://www.apple.com"',
-                '@"sourceofstuff"',
-                '3 key/value pairs',
-                '@"bar"',
-                '@"2 elements"'])
-        self.expect(
-            'frame variable mutabledict --ptr-depth 3 --dynamic-type no-run-target',
-            substrs=[
-                '4 key/value pairs',
-                '(int)23',
-                '@"123"',
-                '@"http://www.apple.com"',
-                '@"sourceofstuff"',
-                '3 key/value pairs',
-                '@"bar"',
-                '@"2 elements"',
-                '(int)1',
-                '@"two"'])
-
-        self.assertTrue(
-            self.frame().FindVariable("dictionary").MightHaveChildren(),
-            "dictionary says it does not have children!")
-        self.assertTrue(
-            self.frame().FindVariable("mutabledict").MightHaveChildren(),
-            "mutable says it does not have children!")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsdictionarysynth/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsdictionarysynth/main.m
deleted file mode 100644 (file)
index 65faaea..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-//===-- main.m ------------------------------------------------*- ObjC -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#import <Foundation/Foundation.h>
-
-int main (int argc, const char * argv[])
-{
-    
-    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-
-
-       NSArray* keys = @[@"foo",@"bar",@"baz"];
-       NSArray* values = @[@"hello",@[@"X",@"Y"],@{@1 : @"one",@2 : @"two"}];
-       NSDictionary* dictionary = [NSDictionary dictionaryWithObjects:values forKeys:keys];
-       NSMutableDictionary* mutabledict = [NSMutableDictionary dictionaryWithCapacity:5];
-       [mutabledict setObject:@"123" forKey:@23];
-       [mutabledict setObject:[NSURL URLWithString:@"http://www.apple.com"] forKey:@"foobar"];
-       [mutabledict setObject:@[@"a",@12] forKey:@57];
-       [mutabledict setObject:dictionary forKey:@"sourceofstuff"];
-
-    [pool drain];// Set break point at this line.
-    return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nssetsynth/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nssetsynth/Makefile
deleted file mode 100644 (file)
index 8b322ff..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-OBJC_SOURCES := main.m
-
-CFLAGS_EXTRAS := -w
-
-
-
-LD_EXTRAS := -framework Foundation
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nssetsynth/TestNSSetSynthetic.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nssetsynth/TestNSSetSynthetic.py
deleted file mode 100644 (file)
index 2e8ca45..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class NSSetSyntheticTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.m', '// Set break point at this line.')
-
-    @skipUnlessDarwin
-    def test_rdar12529957_with_run_command(self):
-        """Test that NSSet reports its synthetic children properly."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type synth clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        # Now check that we are displaying Cocoa classes correctly
-        self.expect('frame variable set',
-                    substrs=['4 elements'])
-        self.expect('frame variable mutable',
-                    substrs=['9 elements'])
-        self.expect(
-            'frame variable set --ptr-depth 1 -d run -T',
-            substrs=[
-                '4 elements',
-                '[0]',
-                '[1]',
-                '[2]',
-                '[3]',
-                'hello',
-                'world',
-                '(int)1',
-                '(int)2'])
-        self.expect(
-            'frame variable mutable --ptr-depth 1 -d run -T',
-            substrs=[
-                '9 elements',
-                '(int)5',
-                '@"3 elements"',
-                '@"www.apple.com"',
-                '(int)3',
-                '@"world"',
-                '(int)4'])
-
-        self.runCmd("next")
-        self.expect('frame variable mutable',
-                    substrs=['0 elements'])
-
-        self.runCmd("next")
-        self.expect('frame variable mutable',
-                    substrs=['4 elements'])
-        self.expect(
-            'frame variable mutable --ptr-depth 1 -d run -T',
-            substrs=[
-                '4 elements',
-                '[0]',
-                '[1]',
-                '[2]',
-                '[3]',
-                'hello',
-                'world',
-                '(int)1',
-                '(int)2'])
-
-        self.runCmd("next")
-        self.expect('frame variable mutable',
-                    substrs=['4 elements'])
-        self.expect(
-            'frame variable mutable --ptr-depth 1 -d run -T',
-            substrs=[
-                '4 elements',
-                '[0]',
-                '[1]',
-                '[2]',
-                '[3]',
-                'hello',
-                'world',
-                '(int)1',
-                '(int)2'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nssetsynth/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nssetsynth/main.m
deleted file mode 100644 (file)
index 207e23f..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-//===-- main.m ------------------------------------------------*- ObjC -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#import <Foundation/Foundation.h>
-
-int main (int argc, const char * argv[])
-{
-    
-    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-
-       NSSet* set = [NSSet setWithArray:@[@1,@"hello",@2,@"world"]];
-       NSMutableSet* mutable = [NSMutableSet setWithCapacity:5];
-       [mutable addObject:@1];
-       [mutable addObject:@2];
-       [mutable addObject:@3];
-       [mutable addObject:@4];
-       [mutable addObject:@5];
-       [mutable addObject:[NSURL URLWithString:@"www.apple.com"]];
-       [mutable addObject:@[@1,@2,@3]];
-       [mutable unionSet:set];
-       [mutable removeAllObjects]; // Set break point at this line.
-       [mutable unionSet:set];
-       [mutable addObject:@1];
-
-    [pool drain];
-    return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ostypeformatting/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ostypeformatting/Makefile
deleted file mode 100644 (file)
index 8763401..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-OBJCXX_SOURCES := main.mm
-
-CFLAGS_EXTRAS := -w
-
-
-
-LD_EXTRAS := -framework Foundation
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ostypeformatting/TestFormattersOsType.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ostypeformatting/TestFormattersOsType.py
deleted file mode 100644 (file)
index c418008..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class DataFormatterOSTypeTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.mm', '// Set break point at this line.')
-
-    @skipUnlessDarwin
-    def test_ostype_with_run_command(self):
-        """Test the formatters we use for OSType."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.mm", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type synth clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        # Now check that we use the right summary for OSType
-        self.expect('frame variable',
-                    substrs=["'test'", "'best'"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ostypeformatting/main.mm b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ostypeformatting/main.mm
deleted file mode 100644 (file)
index 18d37b7..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-//===-- main.m ------------------------------------------------*- ObjC -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#import <Foundation/Foundation.h>
-
-int main (int argc, const char * argv[])
-{
-    
-    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-
-       OSType  a = 'test';
-       OSType b = 'best';
-       
-    [pool drain];// Set break point at this line.
-    return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/parray/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/parray/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/parray/TestPrintArray.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/parray/TestPrintArray.py
deleted file mode 100644 (file)
index c306264..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class PrintArrayTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_print_array(self):
-        """Test that expr -Z works"""
-        self.build()
-        self.printarray_data_formatter_commands()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', 'break here')
-
-    def printarray_data_formatter_commands(self):
-        """Test that expr -Z works"""
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type synth clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.expect(
-            'expr --element-count 3 -- data',
-            substrs=[
-                '[0] = 1',
-                '[1] = 3',
-                '[2] = 5'])
-        self.expect('expr data', substrs=['int *', '$', '0x'])
-        self.expect(
-            'expr -f binary --element-count 0 -- data',
-            substrs=[
-                'int *',
-                '$',
-                '0b'])
-        self.expect(
-            'expr -f hex --element-count 3 -- data',
-            substrs=[
-                '[0] = 0x',
-                '1',
-                '[1] = 0x',
-                '3',
-                '[2] = 0x',
-                '5'])
-        self.expect(
-            'expr -f binary --element-count 2 -- data',
-            substrs=[
-                'int *',
-                '$',
-                '0x',
-                '[0] = 0b',
-                '1',
-                '[1] = 0b',
-                '11'])
-        self.expect('parray 3 data', substrs=['[0] = 1', '[1] = 3', '[2] = 5'])
-        self.expect(
-            'parray `1 + 1 + 1` data',
-            substrs=[
-                '[0] = 1',
-                '[1] = 3',
-                '[2] = 5'])
-        self.expect(
-            'parray `data[1]` data',
-            substrs=[
-                '[0] = 1',
-                '[1] = 3',
-                '[2] = 5'])
-        self.expect(
-            'parray/x 3 data',
-            substrs=[
-                '[0] = 0x',
-                '1',
-                '[1] = 0x',
-                '3',
-                '[2] = 0x',
-                '5'])
-        self.expect(
-            'parray/x `data[1]` data',
-            substrs=[
-                '[0] = 0x',
-                '1',
-                '[1] = 0x',
-                '3',
-                '[2] = 0x',
-                '5'])
-
-        # check error conditions
-        self.expect(
-            'expr --element-count 10 -- 123',
-            error=True,
-            substrs=['expression cannot be used with --element-count as it does not refer to a pointer'])
-        self.expect(
-            'expr --element-count 10 -- (void*)123',
-            error=True,
-            substrs=['expression cannot be used with --element-count as it refers to a pointer to void'])
-        self.expect('parray data', error=True, substrs=[
-                    "invalid element count 'data'"])
-        self.expect(
-            'parray data data',
-            error=True,
-            substrs=["invalid element count 'data'"])
-        self.expect('parray', error=True, substrs=[
-                    'Not enough arguments provided'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/parray/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/parray/main.cpp
deleted file mode 100644 (file)
index 5d52383..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-//===-- main.cpp -------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <functional>
-#include <stdlib.h>
-
-template<typename ElemType>
-ElemType* alloc(size_t count, std::function<ElemType(size_t)> get)
-{
-  ElemType *elems = new ElemType[count];
-  for(size_t i = 0; i < count; i++)
-    elems[i] = get(i);
-  return elems;
-}
-
-int main (int argc, const char * argv[])
-{
-  int* data = alloc<int>(5, [] (size_t idx) -> int {
-    return 2 * idx + 1;
-  });
-  return 0; // break here
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/Makefile
deleted file mode 100644 (file)
index 8763401..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-OBJCXX_SOURCES := main.mm
-
-CFLAGS_EXTRAS := -w
-
-
-
-LD_EXTRAS := -framework Foundation
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/TestPrintObjectArray.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/TestPrintObjectArray.py
deleted file mode 100644 (file)
index 400607d..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class PrintObjectArrayTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    def test_print_array(self):
-        """Test that expr -O -Z works"""
-        self.build()
-        self.printarray_data_formatter_commands()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.mm', 'break here')
-
-    def printarray_data_formatter_commands(self):
-        """Test that expr -O -Z works"""
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.mm", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type synth clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.expect(
-            'expr --element-count 3 --object-description -- objects',
-            substrs=[
-                '3735928559',
-                '4276993775',
-                '3203398366',
-                'Hello',
-                'World',
-                'Two =',
-                '1 ='])
-        self.expect(
-            'poarray 3 objects',
-            substrs=[
-                '3735928559',
-                '4276993775',
-                '3203398366',
-                'Hello',
-                'World',
-                'Two =',
-                '1 ='])
-        self.expect(
-            'expr --element-count 3 --object-description --description-verbosity=full -- objects',
-            substrs=[
-                '[0] =',
-                '3735928559',
-                '4276993775',
-                '3203398366',
-                '[1] =',
-                'Hello',
-                'World',
-                '[2] =',
-                'Two =',
-                '1 ='])
-        self.expect(
-            'parray 3 objects',
-            substrs=[
-                '[0] = 0x',
-                '[1] = 0x',
-                '[2] = 0x'])
-        self.expect(
-            'expr --element-count 3 -d run -- objects',
-            substrs=[
-                '3 elements',
-                '2 elements',
-                '2 key/value pairs'])
-        self.expect(
-            'expr --element-count 3 -d run --ptr-depth=1 -- objects',
-            substrs=[
-                '3 elements',
-                '2 elements',
-                '2 key/value pairs',
-                '3735928559',
-                '4276993775',
-                '3203398366',
-                '"Hello"',
-                '"World"'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/main.mm b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/main.mm
deleted file mode 100644 (file)
index be822dd..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-//===-- main.cpp -------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#import <Foundation/Foundation.h>
-
-struct ThreeObjects
-{
-  id one;
-  id two;
-  id three;
-};
-
-int main()
-{
-  NSArray *array1 = @[@0xDEADBEEF, @0xFEEDBEEF, @0xBEEFFADE];
-  NSArray *array2 = @[@"Hello", @"World"];
-  NSDictionary *dictionary = @{@1: array2, @"Two": array2};
-  ThreeObjects *tobjects = new ThreeObjects();
-  tobjects->one = array1;
-  tobjects->two = array2;
-  tobjects->three = dictionary;
-  id* objects = (id*)tobjects;
-  return 0; // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ptr_ref_typedef/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ptr_ref_typedef/Makefile
deleted file mode 100644 (file)
index 83eb77e..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-CXX_SOURCES := main.cpp
-
-CFLAGS_EXTRAS := -std=c++11
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ptr_ref_typedef/TestPtrRef2Typedef.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ptr_ref_typedef/TestPtrRef2Typedef.py
deleted file mode 100644 (file)
index b0f7002..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class PtrRef2TypedefTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set breakpoint here')
-
-    def test_with_run_command(self):
-        """Test that a pointer/reference to a typedef is formatted as we want."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.runCmd('type summary add --cascade true -s "IntPointer" "int *"')
-        self.runCmd('type summary add --cascade true -s "IntLRef" "int &"')
-        self.runCmd('type summary add --cascade true -s "IntRRef" "int &&"')
-
-        self.expect(
-            "frame variable x",
-            substrs=[
-                '(Foo *) x = 0x',
-                'IntPointer'])
-        # note: Ubuntu 12.04 x86_64 build with gcc 4.8.2 is getting a
-        # const after the ref that isn't showing up on FreeBSD. This
-        # tweak changes the behavior so that the const is not part of
-        # the match.
-        self.expect(
-            "frame variable y", substrs=[
-                '(Foo &', ') y = 0x', 'IntLRef'])
-        self.expect(
-            "frame variable z", substrs=[
-                '(Foo &&', ') z = 0x', 'IntRRef'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ptr_ref_typedef/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ptr_ref_typedef/main.cpp
deleted file mode 100644 (file)
index 4520165..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-typedef int Foo;
-
-int main() {
-       int lval = 1;
-       Foo* x = &lval;
-       Foo& y = lval;
-       Foo&& z = 1;
-       return 0; // Set breakpoint here
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py
deleted file mode 100644 (file)
index 22ce744..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class PyObjectSynthProviderTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_print_array(self):
-        """Test that expr -Z works"""
-        self.build()
-        self.provider_data_formatter_commands()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', 'break here')
-
-    def provider_data_formatter_commands(self):
-        """Test that the PythonObjectSyntheticChildProvider helper class works"""
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type synth clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.runCmd('command script import provider.py')
-        self.runCmd(
-            'type synthetic add Foo --python-class provider.SyntheticChildrenProvider')
-        self.expect('frame variable f.Name', substrs=['"Enrico"'])
-        self.expect(
-            'frame variable f',
-            substrs=[
-                'ID = 123456',
-                'Name = "Enrico"',
-                'Rate = 1.25'])
-        self.expect(
-            'expression f',
-            substrs=[
-                'ID = 123456',
-                'Name = "Enrico"',
-                'Rate = 1.25'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/main.cpp
deleted file mode 100644 (file)
index 4e7c633..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- main.cpp -------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-struct Foo
-{
-  double x;
-  int y;
-  Foo() : x(3.1415), y(1234) {}
-};
-
-int main() {
-  Foo f;
-  return 0; // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/provider.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/provider.py
deleted file mode 100644 (file)
index c263190..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-import lldb
-import lldb.formatters
-import lldb.formatters.synth
-
-
-class SyntheticChildrenProvider(
-        lldb.formatters.synth.PythonObjectSyntheticChildProvider):
-
-    def __init__(self, value, internal_dict):
-        lldb.formatters.synth.PythonObjectSyntheticChildProvider.__init__(
-            self, value, internal_dict)
-
-    def make_children(self):
-        return [("ID", 123456),
-                ("Name", "Enrico"),
-                ("Rate", 1.25)]
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/refpointer-recursion/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/refpointer-recursion/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/refpointer-recursion/TestDataFormatterRefPtrRecursion.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/refpointer-recursion/TestDataFormatterRefPtrRecursion.py
deleted file mode 100644 (file)
index 1dc37c6..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-"""
-Test that ValueObjectPrinter does not cause an infinite loop when a reference to a struct that contains a pointer to itself is printed.
-"""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class DataFormatterRefPtrRecursionTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    def test_with_run_command(self):
-        """Test that ValueObjectPrinter does not cause an infinite loop when a reference to a struct that contains a pointer to itself is printed."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        self.expect("frame variable foo", substrs=[])
-        self.expect("frame variable foo --ptr-depth=1", substrs=['ID = 1'])
-        self.expect("frame variable foo --ptr-depth=2", substrs=['ID = 1'])
-        self.expect("frame variable foo --ptr-depth=3", substrs=['ID = 1'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/refpointer-recursion/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/refpointer-recursion/main.cpp
deleted file mode 100644 (file)
index 4b576bd..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-int _ID = 0;
-
-class Foo {
-       public:
-               Foo *next;
-               int ID;
-       
-       Foo () : next(0), ID(++_ID) {}
-};
-
-int evalFoo(Foo& foo)
-{
-       return foo.ID; // Set break point at this line.
-}
-
-int main() {
-       Foo f;
-       f.next = &f;
-       return evalFoo(f);
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/setvaluefromcstring/TestSetValueFromCString.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/setvaluefromcstring/TestSetValueFromCString.py
deleted file mode 100644 (file)
index e08667f..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(
-    __file__, globals(), [
-        decorators.skipIfFreeBSD, decorators.skipIfLinux,
-        decorators.skipIfNetBSD, decorators.skipIfWindows])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/setvaluefromcstring/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/setvaluefromcstring/main.m
deleted file mode 100644 (file)
index e66c6b1..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-//===-- main.m ---------------------------------------------------*- ObjC -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#import <Foundation/Foundation.h>
-
-int main() {
-    NSDictionary* dic = @{@1 : @2};
-    NSLog(@"hello world"); //% dic = self.frame().FindVariable("dic")
-    //% dic.SetPreferSyntheticValue(True)
-    //% dic.SetPreferDynamicValue(lldb.eDynamicCanRunTarget)
-    //% dic.SetValueFromCString("12")
-    return 0; //% dic = self.frame().FindVariable("dic")
-    //% self.assertTrue(dic.GetValueAsUnsigned() == 0xC, "failed to read what I wrote")
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/stringprinter/TestStringPrinter.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/stringprinter/TestStringPrinter.py
deleted file mode 100644 (file)
index c76b421..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(
-    __file__, globals(), [
-        decorators.expectedFailureAll(
-            oslist=["windows"], bugnumber="llvm.org/pr24772")])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/stringprinter/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/stringprinter/main.cpp
deleted file mode 100644 (file)
index 2631171..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <string>
-
-int main (int argc, char const *argv[])
-{
-    std::string stdstring("Hello\t\tWorld\nI am here\t\tto say hello\n"); //%self.addTearDownHook(lambda x: x.runCmd("setting set escape-non-printables true"))
-    const char* constcharstar = stdstring.c_str();
-    std::string longstring(
-"I am a very long string; in fact I am longer than any reasonable length that a string should be; quite long indeed; oh my, so many words; so many letters; this is kind of like writing a poem; except in real life all that is happening"
-" is just me producing a very very long set of words; there is text here, text there, text everywhere; it fills me with glee to see so much text; all around me it's just letters, and symbols, and other pleasant drawings that cause me"
-" a large amount of joy upon visually seeing them with my eyes; well, this is now a lot of letters, but it is still not enough for the purpose of the test I want to test, so maybe I should copy and paste this a few times, you know.."
-" for science, or something"
-      "I am a very long string; in fact I am longer than any reasonable length that a string should be; quite long indeed; oh my, so many words; so many letters; this is kind of like writing a poem; except in real life all that is happening"
-      " is just me producing a very very long set of words; there is text here, text there, text everywhere; it fills me with glee to see so much text; all around me it's just letters, and symbols, and other pleasant drawings that cause me"
-      " a large amount of joy upon visually seeing them with my eyes; well, this is now a lot of letters, but it is still not enough for the purpose of the test I want to test, so maybe I should copy and paste this a few times, you know.."
-      " for science, or something"
-            "I am a very long string; in fact I am longer than any reasonable length that a string should be; quite long indeed; oh my, so many words; so many letters; this is kind of like writing a poem; except in real life all that is happening"
-            " is just me producing a very very long set of words; there is text here, text there, text everywhere; it fills me with glee to see so much text; all around me it's just letters, and symbols, and other pleasant drawings that cause me"
-            " a large amount of joy upon visually seeing them with my eyes; well, this is now a lot of letters, but it is still not enough for the purpose of the test I want to test, so maybe I should copy and paste this a few times, you know.."
-            " for science, or something"
-      );
-    const char* longconstcharstar = longstring.c_str();
-    return 0;     //% if self.TraceOn(): self.runCmd('frame variable')
-      //% self.assertTrue(self.frame().FindVariable('stdstring').GetSummary() == '"Hello\\t\\tWorld\\nI am here\\t\\tto say hello\\n"')
-     //% self.assertTrue(self.frame().FindVariable('constcharstar').GetSummary() == '"Hello\\t\\tWorld\\nI am here\\t\\tto say hello\\n"')
-     //% self.runCmd("setting set escape-non-printables false")
-     //% self.assertTrue(self.frame().FindVariable('stdstring').GetSummary() == '"Hello\t\tWorld\nI am here\t\tto say hello\n"')
-     //% self.assertTrue(self.frame().FindVariable('constcharstar').GetSummary() == '"Hello\t\tWorld\nI am here\t\tto say hello\n"')
-    //% self.assertTrue(self.frame().FindVariable('longstring').GetSummary().endswith('"...'))
-    //% self.assertTrue(self.frame().FindVariable('longconstcharstar').GetSummary().endswith('"...'))
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/summary-string-onfail/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/summary-string-onfail/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/summary-string-onfail/Test-rdar-9974002.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/summary-string-onfail/Test-rdar-9974002.py
deleted file mode 100644 (file)
index 88ec1ff..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class Radar9974002DataFormatterTestCase(TestBase):
-
-    # test for rdar://problem/9974002 ()
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    def test_with_run_command(self):
-        """Test that that file and class static variables display correctly."""
-        self.build()
-        if "clang" in self.getCompiler() and "3.4" in self.getCompilerVersion():
-            self.skipTest(
-                "llvm.org/pr16214 -- clang emits partial DWARF for structures referenced via typedef")
-
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type summary clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.runCmd(
-            "type summary add -s \"${var.scalar} and ${var.pointer.first}\" container")
-
-        self.expect('frame variable mine',
-                    substrs=['mine = ',
-                             '1', '<parent is NULL>'])
-
-        self.runCmd(
-            "type summary add -s \"${var.scalar} and ${var.pointer}\" container")
-
-        self.expect('frame variable mine',
-                    substrs=['mine = ',
-                             '1', '0x000000'])
-
-        self.runCmd(
-            "type summary add -s \"${var.scalar} and ${var.pointer%S}\" container")
-
-        self.expect('frame variable mine',
-                    substrs=['mine = ',
-                             '1', '0x000000'])
-
-        self.runCmd("type summary add -s foo contained")
-
-        self.expect('frame variable mine',
-                    substrs=['mine = ',
-                             '1', 'foo'])
-
-        self.runCmd(
-            "type summary add -s \"${var.scalar} and ${var.pointer}\" container")
-
-        self.expect('frame variable mine',
-                    substrs=['mine = ',
-                             '1', 'foo'])
-
-        self.runCmd(
-            "type summary add -s \"${var.scalar} and ${var.pointer%V}\" container")
-
-        self.expect('frame variable mine',
-                    substrs=['mine = ',
-                             '1', '0x000000'])
-
-        self.runCmd(
-            "type summary add -s \"${var.scalar} and ${var.pointer.first}\" container")
-
-        self.expect('frame variable mine',
-                    substrs=['mine = ',
-                             '1', '<parent is NULL>'])
-
-        self.runCmd("type summary delete contained")
-        self.runCmd("n")
-
-        self.expect('frame variable mine',
-                    substrs=['mine = ',
-                             '1', '<parent is NULL>'])
-
-        self.runCmd(
-            "type summary add -s \"${var.scalar} and ${var.pointer}\" container")
-
-        self.expect('frame variable mine',
-                    substrs=['mine = ',
-                             '1', '0x000000'])
-
-        self.runCmd(
-            "type summary add -s \"${var.scalar} and ${var.pointer%S}\" container")
-
-        self.expect('frame variable mine',
-                    substrs=['mine = ',
-                             '1', '0x000000'])
-
-        self.runCmd("type summary add -s foo contained")
-
-        self.expect('frame variable mine',
-                    substrs=['mine = ',
-                             '1', 'foo'])
-
-        self.runCmd(
-            "type summary add -s \"${var.scalar} and ${var.pointer}\" container")
-
-        self.expect('frame variable mine',
-                    substrs=['mine = ',
-                             '1', 'foo'])
-
-        self.runCmd(
-            "type summary add -s \"${var.scalar} and ${var.pointer%V}\" container")
-
-        self.expect('frame variable mine',
-                    substrs=['mine = ',
-                             '1', '0x000000'])
-
-        self.runCmd(
-            "type summary add -s \"${var.scalar} and ${var.pointer.first}\" container")
-
-        self.expect('frame variable mine',
-                    substrs=['mine = ',
-                             '1', '<parent is NULL>'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/summary-string-onfail/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/summary-string-onfail/main.cpp
deleted file mode 100644 (file)
index 9d483eb..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <stdio.h>
-
-struct contained
-{
-    int first;
-    int second;
-};
-
-struct container
-{
-    int scalar;
-    struct contained *pointer;
-};
-
-int main ()
-{
-    struct container mine = {1, 0};
-    printf ("Mine's scalar is the only thing that is good: %d.\n", mine.scalar); // Set break point at this line.
-    return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthcapping/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthcapping/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthcapping/TestSyntheticCapping.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthcapping/TestSyntheticCapping.py
deleted file mode 100644 (file)
index 53df271..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-"""
-Check for an issue where capping does not work because the Target pointer appears to be changing behind our backs
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class SyntheticCappingTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    def test_with_run_command(self):
-        """Check for an issue where capping does not work because the Target pointer appears to be changing behind our backs."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        process = self.dbg.GetSelectedTarget().GetProcess()
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type filter clear', check=False)
-            self.runCmd('type synth clear', check=False)
-            self.runCmd(
-                "settings set target.max-children-count 256",
-                check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        # set up the synthetic children provider
-        self.runCmd("script from fooSynthProvider import *")
-        self.runCmd("type synth add -l fooSynthProvider foo")
-
-        # note that the value of fake_a depends on target byte order
-        if process.GetByteOrder() == lldb.eByteOrderLittle:
-            fake_a_val = 0x02000000
-        else:
-            fake_a_val = 0x00000100
-
-        # check that the synthetic children work, so we know we are doing the
-        # right thing
-        self.expect("frame variable f00_1",
-                    substrs=['r = 34',
-                             'fake_a = %d' % fake_a_val,
-                             'a = 1'])
-
-        # check that capping works
-        self.runCmd("settings set target.max-children-count 2", check=False)
-
-        self.expect("frame variable f00_1",
-                    substrs=['...',
-                             'fake_a = %d' % fake_a_val,
-                             'a = 1'])
-
-        self.expect("frame variable f00_1", matching=False,
-                    substrs=['r = 34'])
-
-        self.runCmd("settings set target.max-children-count 256", check=False)
-
-        self.expect("frame variable f00_1", matching=True,
-                    substrs=['r = 34'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthcapping/fooSynthProvider.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthcapping/fooSynthProvider.py
deleted file mode 100644 (file)
index 124eb5d..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-import lldb
-
-
-class fooSynthProvider:
-
-    def __init__(self, valobj, dict):
-        self.valobj = valobj
-        self.int_type = valobj.GetType().GetBasicType(lldb.eBasicTypeInt)
-
-    def num_children(self):
-        return 3
-
-    def get_child_at_index(self, index):
-        if index == 0:
-            child = self.valobj.GetChildMemberWithName('a')
-        if index == 1:
-            child = self.valobj.CreateChildAtOffset('fake_a', 1, self.int_type)
-        if index == 2:
-            child = self.valobj.GetChildMemberWithName('r')
-        return child
-
-    def get_child_index(self, name):
-        if name == 'a':
-            return 0
-        if name == 'fake_a':
-            return 1
-        return 2
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthcapping/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthcapping/main.cpp
deleted file mode 100644 (file)
index 90571b5..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-struct foo
-{
-    int a;
-    int b;
-    int c;
-    int d;
-    int e;
-    int f;
-    int g;
-    int h;
-    int i;
-    int j;
-    int k;
-    int l;
-    int m;
-    int n;
-    int o;
-    int p;
-    int q;
-    int r;
-    
-    foo(int X) :
-    a(X),
-    b(X+1),
-    c(X+3),
-    d(X+5),
-    e(X+7),
-    f(X+9),
-    g(X+11),
-    h(X+13),
-    i(X+15),
-    j(X+17),
-    k(X+19),
-    l(X+21),
-    m(X+23),
-    n(X+25),
-    o(X+27),
-    p(X+29),
-    q(X+31),
-    r(X+33) {}
-};
-
-struct wrapint
-{
-    int x;
-    wrapint(int X) : x(X) {}
-};
-
-int main()
-{
-    foo f00_1(1);
-    foo *f00_ptr = new foo(12);
-    
-    f00_1.a++; // Set break point at this line.
-    
-    wrapint test_cast('A' +
-               256*'B' +
-               256*256*'C'+
-               256*256*256*'D');
-    
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthupdate/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthupdate/Makefile
deleted file mode 100644 (file)
index 3767ff1..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-OBJC_SOURCES := main.m
-CFLAGS_EXTRAS := -w
-LD_EXTRAS := -framework Foundation
-
-include Makefile.rules
-
-clean::
-       rm -rf $(wildcard *.o *.d *.dSYM *.log)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthupdate/TestSyntheticFilterRecompute.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthupdate/TestSyntheticFilterRecompute.py
deleted file mode 100644 (file)
index e9e570e..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class SyntheticFilterRecomputingTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.m', '// Set break point at this line.')
-
-    @skipUnlessDarwin
-    def test_rdar12437442_with_run_command(self):
-        """Test that we update SBValues correctly as dynamic types change."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type synth clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        # Now run the bulk of the test
-        id_x = self.dbg.GetSelectedTarget().GetProcess(
-        ).GetSelectedThread().GetSelectedFrame().FindVariable("x")
-        id_x.SetPreferDynamicValue(lldb.eDynamicCanRunTarget)
-        id_x.SetPreferSyntheticValue(True)
-
-        if self.TraceOn():
-            self.runCmd("expr --dynamic-type run-target --ptr-depth 1 -- x")
-
-        self.assertTrue(
-            id_x.GetSummary() == '@"5 elements"',
-            "array does not get correct summary")
-
-        self.runCmd("next")
-        self.runCmd("frame select 0")
-
-        id_x = self.dbg.GetSelectedTarget().GetProcess(
-        ).GetSelectedThread().GetSelectedFrame().FindVariable("x")
-        id_x.SetPreferDynamicValue(lldb.eDynamicCanRunTarget)
-        id_x.SetPreferSyntheticValue(True)
-
-        if self.TraceOn():
-            self.runCmd("expr --dynamic-type run-target --ptr-depth 1 -- x")
-
-        self.assertTrue(
-            id_x.GetNumChildren() == 7,
-            "dictionary does not have 7 children")
-        id_x.SetPreferSyntheticValue(False)
-        self.assertFalse(
-            id_x.GetNumChildren() == 7,
-            "dictionary still looks synthetic")
-        id_x.SetPreferSyntheticValue(True)
-        self.assertTrue(
-            id_x.GetSummary() == "7 key/value pairs",
-            "dictionary does not get correct summary")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthupdate/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthupdate/main.m
deleted file mode 100644 (file)
index eb27ff9..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-//===-- main.m ------------------------------------------------*- ObjC -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#import <Foundation/Foundation.h>
-
-int main (int argc, const char * argv[])
-{
-    
-    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-
-    NSArray* foo = [NSArray arrayWithObjects:@1,@2,@3,@4,@5, nil];
-    NSDictionary *bar = @{@1 : @"one",@2 : @"two", @3 : @"three", @4 : @"four", @5 : @"five", @6 : @"six", @7 : @"seven"};
-    id x = foo;
-    x = bar; // Set break point at this line.
-
-    [pool drain];
-    return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_arg/TestTypeSummaryListArg.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_arg/TestTypeSummaryListArg.py
deleted file mode 100644 (file)
index e1dc52e..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TypeSummaryListArgumentTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    def test_type_summary_list_with_arg(self):
-        """Test that the 'type summary list' command handles command line arguments properly"""
-        self.expect(
-            'type summary list Foo',
-            substrs=[
-                'Category: default',
-                'Category: system'])
-        self.expect(
-            'type summary list char',
-            substrs=[
-                'char *',
-                'unsigned char'])
-
-        self.expect(
-            'type summary list -w default',
-            substrs=['system'],
-            matching=False)
-        self.expect(
-            'type summary list -w system unsigned',
-            substrs=[
-                'default',
-                '0-9'],
-            matching=False)
-        self.expect(
-            'type summary list -w system char',
-            substrs=['unsigned char *'],
-            matching=True)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_script/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_script/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_script/TestTypeSummaryListScript.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_script/TestTypeSummaryListScript.py
deleted file mode 100644 (file)
index 7d70ad3..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TypeSummaryListScriptTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_typesummarylist_script(self):
-        """Test data formatter commands."""
-        self.build()
-        self.data_formatter_commands()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', 'Break here')
-
-    def data_formatter_commands(self):
-        """Test printing out Python summary formatters."""
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type category delete TSLSFormatters', check=False)
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type filter clear', check=False)
-            self.runCmd('type synth clear', check=False)
-
-        self.addTearDownHook(cleanup)
-
-        self.runCmd("command script import tslsformatters.py")
-
-        self.expect(
-            "frame variable myStruct",
-            substrs=['A data formatter at work'])
-
-        self.expect('type summary list', substrs=['Struct_SummaryFormatter'])
-        self.expect(
-            'type summary list Struct',
-            substrs=['Struct_SummaryFormatter'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_script/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_script/main.cpp
deleted file mode 100644 (file)
index 2de3704..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#include <stdio.h>
-
-typedef struct Struct
-{
-  int one;
-  int two;
-} Struct;
-
-int
-main()
-{
-  Struct myStruct = {10, 20};
-  printf ("Break here: %d\n.", myStruct.one);
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_script/tslsformatters.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_script/tslsformatters.py
deleted file mode 100644 (file)
index 03fe17b..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-import lldb
-
-
-def Struct_SummaryFormatter(valobj, internal_dict):
-    return 'A data formatter at work'
-
-category = lldb.debugger.CreateCategory("TSLSFormatters")
-category.SetEnabled(True)
-summary = lldb.SBTypeSummary.CreateWithFunctionName(
-    "tslsformatters.Struct_SummaryFormatter", lldb.eTypeOptionCascade)
-spec = lldb.SBTypeNameSpecifier("Struct", False)
-category.AddTypeSummary(spec, summary)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/typedef_array/TestTypedefArray.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/typedef_array/TestTypedefArray.py
deleted file mode 100644 (file)
index 7e67f73..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(
-    __file__, globals(), [
-        decorators.expectedFailureAll(
-            compiler="gcc")])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/typedef_array/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/typedef_array/main.cpp
deleted file mode 100644 (file)
index cb6dc18..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-//===-- main.cpp --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-typedef int Foo;
-
-int main() {
-    // CHECK: (Foo [3]) array = {
-    // CHECK-NEXT: (Foo) [0] = 1
-    // CHECK-NEXT: (Foo) [1] = 2
-    // CHECK-NEXT: (Foo) [2] = 3
-    // CHECK-NEXT: }
-    Foo array[3] = {1,2,3};
-    return 0; //% self.filecheck("frame variable array --show-types --", 'main.cpp')
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/user-format-vs-summary/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/user-format-vs-summary/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/user-format-vs-summary/TestUserFormatVsSummary.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/user-format-vs-summary/TestUserFormatVsSummary.py
deleted file mode 100644 (file)
index ad4db01..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-"""
-Test that the user can input a format but it will not prevail over summary format's choices.
-"""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class UserFormatVSSummaryTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    def test_with_run_command(self):
-        """Test that the user can input a format but it will not prevail over summary format's choices."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        self.expect("frame variable p1", substrs=[
-                    '(Pair) p1 = (x = 3, y = -3)'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.runCmd('type summary add Pair -s "x=${var.x%d},y=${var.y%u}"')
-
-        self.expect("frame variable p1", substrs=[
-                    '(Pair) p1 = x=3,y=4294967293'])
-        self.expect(
-            "frame variable -f x p1",
-            substrs=['(Pair) p1 = x=0x00000003,y=0xfffffffd'],
-            matching=False)
-        self.expect(
-            "frame variable -f d p1",
-            substrs=['(Pair) p1 = x=3,y=-3'],
-            matching=False)
-        self.expect("frame variable p1", substrs=[
-                    '(Pair) p1 = x=3,y=4294967293'])
-
-        self.runCmd('type summary add Pair -s "x=${var.x%x},y=${var.y%u}"')
-
-        self.expect("frame variable p1", substrs=[
-                    '(Pair) p1 = x=0x00000003,y=4294967293'])
-        self.expect(
-            "frame variable -f d p1",
-            substrs=['(Pair) p1 = x=3,y=-3'],
-            matching=False)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/user-format-vs-summary/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/user-format-vs-summary/main.cpp
deleted file mode 100644 (file)
index b7ac006..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-struct Pair {
-       int x;
-       int y;
-       
-       Pair(int _x, int _y) : x(_x), y(_y) {}  
-};
-
-int main() {
-       Pair p1(3,-3);
-       return p1.x + p1.y; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/var-in-aggregate-misuse/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/var-in-aggregate-misuse/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/var-in-aggregate-misuse/TestVarInAggregateMisuse.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/var-in-aggregate-misuse/TestVarInAggregateMisuse.py
deleted file mode 100644 (file)
index c1ec60e..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class VarInAggregateMisuseTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    def test_with_run_command(self):
-        """Test that that file and class static variables display correctly."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type summary clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.runCmd(
-            "type summary add --summary-string \"SUMMARY SUCCESS ${var}\" Summarize")
-
-        self.expect('frame variable mine_ptr',
-                    substrs=['SUMMARY SUCCESS summarize_ptr_t @ '])
-
-        self.expect('frame variable *mine_ptr',
-                    substrs=['SUMMARY SUCCESS summarize_t @'])
-
-        self.runCmd(
-            "type summary add --summary-string \"SUMMARY SUCCESS ${var.first}\" Summarize")
-
-        self.expect('frame variable mine_ptr',
-                    substrs=['SUMMARY SUCCESS 10'])
-
-        self.expect('frame variable *mine_ptr',
-                    substrs=['SUMMARY SUCCESS 10'])
-
-        self.runCmd("type summary add --summary-string \"${var}\" Summarize")
-        self.runCmd(
-            "type summary add --summary-string \"${var}\" -e TwoSummarizes")
-
-        self.expect('frame variable',
-                    substrs=['(TwoSummarizes) twos = TwoSummarizes @ ',
-                             'first = summarize_t @ ',
-                             'second = summarize_t @ '])
-
-        self.runCmd(
-            "type summary add --summary-string \"SUMMARY SUCCESS ${var.first}\" Summarize")
-        self.expect('frame variable',
-                    substrs=['(TwoSummarizes) twos = TwoSummarizes @ ',
-                             'first = SUMMARY SUCCESS 1',
-                             'second = SUMMARY SUCCESS 3'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/var-in-aggregate-misuse/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/var-in-aggregate-misuse/main.cpp
deleted file mode 100644 (file)
index e35f7f3..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <stdio.h>
-struct Summarize
-{
-    int first;
-    int second;
-};
-
-typedef struct Summarize summarize_t;
-typedef summarize_t *summarize_ptr_t;
-
-summarize_t global_mine = {30, 40};
-
-struct TwoSummarizes
-{
-    summarize_t first;
-    summarize_t second;
-};
-
-int
-main()
-{
-    summarize_t mine = {10, 20};
-    summarize_ptr_t mine_ptr = &mine;
-    
-    TwoSummarizes twos = { {1,2}, {3,4} };
-    
-    printf ("Summarize: first: %d second: %d and address: 0x%p\n", mine.first, mine.second, mine_ptr); // Set break point at this line.
-    printf ("Global summarize: first: %d second: %d.\n", global_mine.first, global_mine.second);
-    return 0;
-}
-
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/varscript_formatting/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/varscript_formatting/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/varscript_formatting/TestDataFormatterVarScriptFormatting.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/varscript_formatting/TestDataFormatterVarScriptFormatting.py
deleted file mode 100644 (file)
index c7391f4..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class DataFormatterVarScriptFormatting(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', ' // Set breakpoint here.')
-
-    @skipIfFreeBSD  # llvm.org/pr20545 bogus output confuses buildbot parser
-    def test_with_run_command(self):
-        """Test using Python synthetic children provider."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type filter clear', check=False)
-            self.runCmd('type synth clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.runCmd("command script import helperfunc.py")
-        self.runCmd(
-            'type summary add -x "^something<.*>$" -s "T is a ${script.var:helperfunc.f}"')
-
-        self.expect("frame variable x", substrs=['T is a non-pointer type'])
-
-        self.expect("frame variable y", substrs=['T is a pointer type'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/varscript_formatting/helperfunc.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/varscript_formatting/helperfunc.py
deleted file mode 100644 (file)
index 75654e4..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-import lldb
-
-
-def f(value, d):
-    return "pointer type" if value.GetType().GetTemplateArgumentType(
-        0).IsPointerType() else "non-pointer type"
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/varscript_formatting/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/varscript_formatting/main.cpp
deleted file mode 100644 (file)
index e9a36f9..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-template <typename T>
-struct something {};
-
-int main() {
-    something<int> x;
-    something<void*> y;
-    return 0; // Set breakpoint here.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/vector-types/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/vector-types/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/vector-types/TestVectorTypesFormatting.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/vector-types/TestVectorTypesFormatting.py
deleted file mode 100644 (file)
index e4632af..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-"""
-Check that vector types format properly
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class VectorTypesFormattingTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// break here')
-
-    # rdar://problem/14035604
-    @skipIf(compiler='gcc')  # gcc don't have ext_vector_type extension
-    def test_with_run_command(self):
-        """Check that vector types format properly"""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            pass
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        pass  # my code never fails
-
-        v = self.frame().FindVariable("v")
-        v.SetPreferSyntheticValue(True)
-        v.SetFormat(lldb.eFormatVectorOfFloat32)
-
-        if self.TraceOn():
-            print(v)
-
-        self.assertTrue(
-            v.GetNumChildren() == 4,
-            "v as float32[] has 4 children")
-        self.assertTrue(v.GetChildAtIndex(0).GetData().float[
-                        0] == 1.25, "child 0 == 1.25")
-        self.assertTrue(v.GetChildAtIndex(1).GetData().float[
-                        0] == 1.25, "child 1 == 1.25")
-        self.assertTrue(v.GetChildAtIndex(2).GetData().float[
-                        0] == 2.50, "child 2 == 2.50")
-        self.assertTrue(v.GetChildAtIndex(3).GetData().float[
-                        0] == 2.50, "child 3 == 2.50")
-
-        self.expect("expr -f int16_t[] -- v",
-                    substrs=['(0, 16288, 0, 16288, 0, 16416, 0, 16416)'])
-        self.expect("expr -f uint128_t[] -- v",
-                    substrs=['(85236745249553456609335044694184296448)'])
-        self.expect(
-            "expr -f float32[] -- v",
-            substrs=['(1.25, 1.25, 2.5, 2.5)'])
-
-        oldValue = v.GetChildAtIndex(0).GetValue()
-        v.SetFormat(lldb.eFormatHex)
-        newValue = v.GetChildAtIndex(0).GetValue()
-        self.assertFalse(oldValue == newValue,
-                         "values did not change along with format")
-
-        v.SetFormat(lldb.eFormatVectorOfFloat32)
-        oldValueAgain = v.GetChildAtIndex(0).GetValue()
-        self.assertTrue(
-            oldValue == oldValueAgain,
-            "same format but different values")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/vector-types/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/vector-types/main.cpp
deleted file mode 100644 (file)
index 5470147..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-typedef float float4 __attribute__((ext_vector_type(4)));
-typedef  unsigned char vec __attribute__((ext_vector_type(16)));
-
-int main() {
-    float4 f4 = {1.25, 1.25, 2.50, 2.50};
-    vec v = (vec)f4;
-    return 0; // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/Makefile
deleted file mode 100644 (file)
index 3e7e139..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-C_SOURCES := main.c
-
-ifeq "$(OS)" ""
-    OS = $(shell uname -s)
-endif
-
-ifeq "$(OS)" "Darwin"
-    LD_EXTRAS = -Xlinker -dead_strip
-else
-    CFLAGS_EXTRAS += -fdata-sections -ffunction-sections
-    ifeq "$(OS)" "Windows_NT"
-        LD_EXTRAS = -Xlinker /OPT:REF
-    else
-        LD_EXTRAS = -Wl,--gc-sections
-    endif
-endif
-
-MAKE_DSYM := NO
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/TestDeadStrip.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/TestDeadStrip.py
deleted file mode 100644 (file)
index bc1f3f8..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-"""
-Test that breakpoint works correctly in the presence of dead-code stripping.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class DeadStripTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr44429")
-    def test(self):
-        """Test breakpoint works correctly with dead-code stripping."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break by function name f1 (live code).
-        lldbutil.run_break_set_by_symbol(
-            self, "f1", num_expected_locations=1, module_name="a.out")
-
-        # Break by function name f2 (dead code).
-        lldbutil.run_break_set_by_symbol(
-            self, "f2", num_expected_locations=0, module_name="a.out")
-
-        # Break by function name f3 (live code).
-        lldbutil.run_break_set_by_symbol(
-            self, "f3", num_expected_locations=1, module_name="a.out")
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint (breakpoint #1).
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'a.out`f1',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f 1", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        self.runCmd("continue")
-
-        # The stop reason of the thread should be breakpoint (breakpoint #3).
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'a.out`f3',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f 3", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/cmds.txt b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/cmds.txt
deleted file mode 100644 (file)
index f6fd045..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-b main.c:21
-b main.c:41
-lines -shlib a.out main.c
-c
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/main.c
deleted file mode 100644 (file)
index cde8c18..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-
-int f1 (char *s);
-int f2 (char *s);
-int f3 (char *s);
-
-
-// We want f1 to start on line 20
-int f1 (char *s)
-{
-    return printf("f1: %s\n", s);
-}
-
-
-
-
-
-// We want f2 to start on line 30, this should get stripped
-int f2 (char *s)
-{
-    return printf("f2: %s\n", s);
-}
-
-
-
-
-
-// We want f3 to start on line 40
-int f3 (char *s)
-{
-    return printf("f3: %s\n", s);
-}
-
-
-
-
-
-// We want main to start on line 50
-int main (int argc, const char * argv[])
-{
-    f1("carp");
-    f3("dong");
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/deleted-executable/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/deleted-executable/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/deleted-executable/TestDeletedExecutable.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/deleted-executable/TestDeletedExecutable.py
deleted file mode 100644 (file)
index ed17d9b..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-"""
-Test process attach when executable was deleted.
-"""
-
-
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestDeletedExecutable(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @skipIfWindows # cannot delete a running executable
-    @expectedFailureAll(oslist=["linux"],
-        triple=no_match('aarch64-.*-android'))
-        # determining the architecture of the process fails
-    @expectedFailureNetBSD
-    def test(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Use a file as a synchronization point between test and inferior.
-        pid_file_path = lldbutil.append_to_process_working_directory(self,
-            "token_pid_%d" % (int(os.getpid())))
-        self.addTearDownHook(
-            lambda: self.run_platform_command(
-                "rm %s" %
-                (pid_file_path)))
-
-        # Spawn a new process
-        popen = self.spawnSubprocess(exe, [pid_file_path])
-        self.addTearDownHook(self.cleanupSubprocesses)
-
-        # Wait until process has fully started up.
-        pid = lldbutil.wait_for_file_on_target(self, pid_file_path)
-
-        # Now we can safely remove the executable and test if we can attach.
-        os.remove(exe)
-
-        self.runCmd("process attach -p " + str(popen.pid))
-        self.runCmd("kill")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/deleted-executable/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/deleted-executable/main.cpp
deleted file mode 100644 (file)
index af00ac2..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#include <chrono>
-#include <fstream>
-#include <thread>
-
-int main(int argc, char const *argv[]) {
-    lldb_enable_attach();
-
-    {
-      // Create file to signal that this process has started up.
-      std::ofstream f;
-      f.open(argv[1]);
-    }
-
-    std::this_thread::sleep_for(std::chrono::seconds(60));
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/dynamic_value_child_count/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/dynamic_value_child_count/Makefile
deleted file mode 100644 (file)
index 2bba8e7..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := pass-to-base.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/dynamic_value_child_count/TestDynamicValueChildCount.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/dynamic_value_child_count/TestDynamicValueChildCount.py
deleted file mode 100644 (file)
index e7f9840..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-"""
-Test that dynamic values update their child count correctly
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class DynamicValueChildCountTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-        # Find the line number to break for main.c.
-
-        self.main_third_call_line = line_number(
-            'pass-to-base.cpp', '// Break here and check b has 0 children')
-        self.main_fourth_call_line = line_number(
-            'pass-to-base.cpp', '// Break here and check b still has 0 children')
-        self.main_fifth_call_line = line_number(
-            'pass-to-base.cpp', '// Break here and check b has one child now')
-        self.main_sixth_call_line = line_number(
-            'pass-to-base.cpp', '// Break here and check b has 0 children again')
-
-    @add_test_categories(['pyapi'])
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24663")
-    def test_get_dynamic_vals(self):
-        """Test fetching C++ dynamic values from pointers & references."""
-        """Get argument vals for the call stack when stopped on a breakpoint."""
-        self.build(dictionary=self.getBuildFlags())
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target from the debugger.
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Set up our breakpoints:
-
-        third_call_bpt = target.BreakpointCreateByLocation(
-            'pass-to-base.cpp', self.main_third_call_line)
-        self.assertTrue(third_call_bpt,
-                        VALID_BREAKPOINT)
-        fourth_call_bpt = target.BreakpointCreateByLocation(
-            'pass-to-base.cpp', self.main_fourth_call_line)
-        self.assertTrue(fourth_call_bpt,
-                        VALID_BREAKPOINT)
-        fifth_call_bpt = target.BreakpointCreateByLocation(
-            'pass-to-base.cpp', self.main_fifth_call_line)
-        self.assertTrue(fifth_call_bpt,
-                        VALID_BREAKPOINT)
-        sixth_call_bpt = target.BreakpointCreateByLocation(
-            'pass-to-base.cpp', self.main_sixth_call_line)
-        self.assertTrue(sixth_call_bpt,
-                        VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        PROCESS_STOPPED)
-
-        b = self.frame().FindVariable("b").GetDynamicValue(lldb.eDynamicCanRunTarget)
-        self.assertTrue(b.GetNumChildren() == 0, "b has 0 children")
-        self.runCmd("continue")
-        self.assertTrue(b.GetNumChildren() == 0, "b still has 0 children")
-        self.runCmd("continue")
-        self.assertTrue(b.GetNumChildren() != 0, "b now has 1 child")
-        self.runCmd("continue")
-        self.assertTrue(
-            b.GetNumChildren() == 0,
-            "b didn't go back to 0 children")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/dynamic_value_child_count/pass-to-base.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/dynamic_value_child_count/pass-to-base.cpp
deleted file mode 100644 (file)
index d9dd352..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#include <stdio.h>
-#include <memory>
-
-class BaseClass
-{
-public:
-    BaseClass();
-    virtual ~BaseClass() { }
-};
-
-class DerivedClass : public BaseClass
-{
-public:
-    DerivedClass();
-    virtual ~DerivedClass() { }
-protected:
-    int mem;
-};
-
-BaseClass::BaseClass()
-{
-}
-
-DerivedClass::DerivedClass() : BaseClass()
-{
-    mem = 101;
-}
-
-int
-main (int argc, char **argv)
-{
-  BaseClass *b = nullptr; // Break here and check b has 0 children
-  b = new DerivedClass();  // Break here and check b still has 0 children
-  b = nullptr;  // Break here and check b has one child now
-  return 0; // Break here and check b has 0 children again
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/exec/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/exec/Makefile
deleted file mode 100644 (file)
index afc5200..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-CXX_SOURCES := main.cpp
-
-all: secondprog
-
-include Makefile.rules
-
-secondprog: secondprog.cpp
-       $(MAKE) -f $(MAKEFILE_RULES) \
-               CXX_SOURCES=secondprog.cpp EXE=secondprog
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py
deleted file mode 100644 (file)
index 019df21..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-"""
-Test some lldb command abbreviations.
-"""
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ExecTestCase(TestBase):
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(archs=['i386'], bugnumber="rdar://28656532")
-    @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://problem/34559552") # this exec test has problems on ios systems
-    @expectedFailureNetBSD
-    @skipIfAsan # rdar://problem/43756823
-    @skipIfWindows
-    def test_hitting_exec (self):
-        self.do_test(False)
-
-    @expectedFailureAll(archs=['i386'], bugnumber="rdar://28656532")
-    @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://problem/34559552") # this exec test has problems on ios systems
-    @expectedFailureNetBSD
-    @skipIfAsan # rdar://problem/43756823
-    @skipIfWindows
-    def test_skipping_exec (self):
-        self.do_test(True)
-
-    def do_test(self, skip_exec):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        secondprog = self.getBuildArtifact("secondprog")
-
-        # Create the target
-        target = self.dbg.CreateTarget(exe)
-
-        # Create any breakpoints we need
-        breakpoint1 = target.BreakpointCreateBySourceRegex(
-            'Set breakpoint 1 here', lldb.SBFileSpec("main.cpp", False))
-        self.assertTrue(breakpoint1, VALID_BREAKPOINT)
-        breakpoint2 = target.BreakpointCreateBySourceRegex(
-            'Set breakpoint 2 here', lldb.SBFileSpec("secondprog.cpp", False))
-        self.assertTrue(breakpoint2, VALID_BREAKPOINT)
-
-        # Launch the process
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        if self.TraceOn():
-            self.runCmd("settings show target.process.stop-on-exec", check=False)
-        if skip_exec:
-            self.dbg.HandleCommand("settings set target.process.stop-on-exec false")
-            def cleanup():
-                self.runCmd("settings set target.process.stop-on-exec false",
-                            check=False)
-
-            # Execute the cleanup function during test case tear down.
-            self.addTearDownHook(cleanup)
-
-        # The stop reason of the thread should be breakpoint.
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        STOPPED_DUE_TO_BREAKPOINT)
-
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-        process, breakpoint1)
-        self.assertTrue(len(threads) == 1)
-
-        # We had a deadlock tearing down the TypeSystemMap on exec, but only if some
-        # expression had been evaluated.  So make sure we do that here so the teardown
-        # is not trivial.
-
-        thread = threads[0]
-        value = thread.frames[0].EvaluateExpression("1 + 2")
-        self.assertTrue(
-            value.IsValid(),
-            "Expression evaluated successfully")
-        int_value = value.GetValueAsSigned()
-        self.assertTrue(int_value == 3, "Expression got the right result.")
-
-        # Run and we should stop due to exec
-        process.Continue()
-
-        if not skip_exec:
-            self.assertFalse(process.GetState() == lldb.eStateExited,
-                             "Process should not have exited!")
-            self.assertTrue(process.GetState() == lldb.eStateStopped,
-                            "Process should be stopped at __dyld_start")
-
-            threads = lldbutil.get_stopped_threads(
-                process, lldb.eStopReasonExec)
-            self.assertTrue(
-                len(threads) == 1,
-                "We got a thread stopped for exec.")
-
-            # Run and we should stop at breakpoint in main after exec
-            process.Continue()
-
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-            process, breakpoint2)
-        if self.TraceOn():
-            for t in process.threads:
-                print(t)
-                if t.GetStopReason() != lldb.eStopReasonBreakpoint:
-                    self.runCmd("bt")
-        self.assertTrue(len(threads) == 1,
-                        "Stopped at breakpoint in exec'ed process.")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/exec/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/exec/main.cpp
deleted file mode 100644 (file)
index bec470f..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#define _POSIX_C_SOURCE 200809L
-
-#include <cstdio>
-#include <cstdlib>
-#include <cstring>
-#include <libgen.h>
-#include <string>
-#include <unistd.h>
-
-int main(int argc, char const **argv) {
-  char *buf = strdup(argv[0]); // Set breakpoint 1 here
-  std::string directory_name(::dirname(buf));
-
-  std::string other_program = directory_name + "/secondprog";
-  execve(other_program.c_str(), const_cast<char *const *>(argv), nullptr);
-  perror("execve");
-  abort();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/exec/secondprog.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/exec/secondprog.cpp
deleted file mode 100644 (file)
index 5653471..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#include <stdio.h>
-int main ()
-{
-  puts ("I am the second program."); // Set breakpoint 2 here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/fat_archives/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/fat_archives/Makefile
deleted file mode 100644 (file)
index 7fed83d..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-SRCDIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))/
-all: a.c clean
-               $(CC) -arch i386 -g -c $(SRCDIR)/a.c
-               ar -q liba-i386.a a.o
-               ranlib liba-i386.a
-               $(CC) -arch x86_64 -g -c $(SRCDIR)/a.c
-               ar -q liba-x86_64.a a.o
-               ranlib liba-x86_64.a
-               lipo -create -output liba.a liba-i386.a liba-x86_64.a
-               $(CC) -g -c $(SRCDIR)/main.c
-               $(CC) -o a.out main.o -L. -la
-
-clean:
-               rm -rf a.o a.out liba-i386.a liba-x86_64.a liba.a $(wildcard *un~ .*un~ main.o *.pyc)
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/fat_archives/TestFatArchives.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/fat_archives/TestFatArchives.py
deleted file mode 100644 (file)
index 5fa52d3..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-"""
-Test some lldb command abbreviations.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class FatArchiveTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @skipUnlessDarwin
-    def test_breakpoint_resolution_dwarf(self):
-        if self.getArchitecture() == 'x86_64':
-            self.build()
-            self.main()
-        else:
-            self.skipTest(
-                "This test requires x86_64 as the architecture for the inferior")
-
-    def main(self):
-        '''This test compiles a quick example by making a fat file (universal) full of
-        skinny .o files and makes sure we can use them to resolve breakpoints when doing
-        DWARF in .o file debugging. The only thing this test needs to do is to compile and
-        set a breakpoint in the target and verify any breakpoint locations have valid debug
-        info for the function, and source file and line.'''
-        exe = self.getBuildArtifact("a.out")
-
-        # Create the target
-        target = self.dbg.CreateTarget(exe)
-
-        # Create a breakpoint by name
-        breakpoint = target.BreakpointCreateByName('foo', exe)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Make sure the breakpoint resolves to a function, file and line
-        for bp_loc in breakpoint:
-            # Get a section offset address (lldb.SBAddress) from the breakpoint
-            # location
-            bp_loc_addr = bp_loc.GetAddress()
-            line_entry = bp_loc_addr.GetLineEntry()
-            function = bp_loc_addr.GetFunction()
-            self.assertTrue(
-                function.IsValid(),
-                "Verify breakpoint in fat BSD archive has valid function debug info")
-            self.assertTrue(
-                line_entry.GetFileSpec(),
-                "Verify breakpoint in fat BSD archive has source file information")
-            self.assertTrue(
-                line_entry.GetLine() != 0,
-                "Verify breakpoint in fat BSD archive has source line information")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/fat_archives/a.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/fat_archives/a.c
deleted file mode 100644 (file)
index c100f9a..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-int foo ()
-{
-    return 5;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/fat_archives/a.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/fat_archives/a.h
deleted file mode 100644 (file)
index a453664..0000000
+++ /dev/null
@@ -1 +0,0 @@
-int foo ();
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/fat_archives/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/fat_archives/main.c
deleted file mode 100644 (file)
index 328319d..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#include "a.h"
-#include <stdio.h>
-int main()
-{
-      printf ("%d\n", foo());
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/float-display/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/float-display/Makefile
deleted file mode 100644 (file)
index c9319d6..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-C_SOURCES := main.c
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/float-display/TestFloatDisplay.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/float-display/TestFloatDisplay.py
deleted file mode 100644 (file)
index 48e49ed..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(
-    __file__, globals(), [])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/float-display/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/float-display/main.c
deleted file mode 100644 (file)
index 7e89225..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-float f_neg3 = 1.234567 / 1e3;
-float f_neg4 = 1.234567 / 1e4;
-float f_neg5 = 1.234567 / 1e5;
-float f_neg6 = 1.234567 / 1e6;
-float f_neg7 = 1.234567 / 1e7;
-float f_neg8 = 1.234567 / 1e8;
-float f_neg20 = 1.234567 / 1e20;
-float f_neg30 = 1.234567 / 1e30;
-
-float f_3 = 1.234567 * 1e3;
-float f_4 = 1.234567 * 1e4;
-float f_5 = 1.234567 * 1e5;
-float f_6 = 1.234567 * 1e6;
-float f_7 = 1.234567 * 1e7;
-float f_8 = 1.234567 * 1e8;
-float f_20 = 1.234567 * 1e20;
-float f_30 = 1.234567 * 1e30;
-
-double d_neg3 = 1.234567 / 1e3;
-double d_neg4 = 1.234567 / 1e4;
-double d_neg5 = 1.234567 / 1e5;
-double d_neg6 = 1.234567 / 1e6;
-double d_neg7 = 1.234567 / 1e7;
-double d_neg8 = 1.234567 / 1e8;
-double d_neg20 = 1.234567 / 1e20;
-double d_neg30 = 1.234567 / 1e30;
-double d_neg50 = 1.234567 / 1e50;
-double d_neg250 = 1.234567 / 1e250;
-
-double d_3 = 1.234567 * 1e3;
-double d_4 = 1.234567 * 1e4;
-double d_5 = 1.234567 * 1e5;
-double d_6 = 1.234567 * 1e6;
-double d_7 = 1.234567 * 1e7;
-double d_8 = 1.234567 * 1e8;
-double d_20 = 1.234567 * 1e20;
-double d_30 = 1.234567 * 1e30;
-double d_50 = 1.234567 * 1e50;
-double d_250 = 1.234567 * 1e250;
-
-int main (int argc, char const *argv[]) {
-  //% # Default setting should be 6.
-  //% self.expect("frame variable f_neg3", substrs=["0.00123456"])
-  //% self.expect("frame variable f_neg4", substrs=["0.000123456"])
-  //% self.expect("frame variable f_neg5", substrs=["0.0000123456"])
-  //% self.expect("frame variable f_neg6", substrs=["0.00000123456"])
-  //% self.expect("frame variable f_neg7", substrs=["1.234567", "E-7"])
-  //% self.expect("frame variable f_neg8", substrs=["1.23456", "E-8"])
-  //% self.expect("frame variable f_neg20", substrs=["E-20"])
-  //% self.expect("frame variable f_neg30", substrs=["E-30"])
-  //% self.expect("frame variable f_3", substrs=["1234.56"])
-  //% self.expect("frame variable f_4", substrs=["12345.6"])
-  //% self.expect("frame variable f_5", substrs=["123456"])
-  //% self.expect("frame variable f_6", substrs=["123456"])
-  //% self.expect("frame variable f_7", substrs=["123456"])
-  //% self.expect("frame variable f_8", substrs=["123456"])
-  //% self.expect("frame variable f_20", substrs=["E+20"])
-  //% self.expect("frame variable f_30", substrs=["E+30"])
-  //% self.expect("frame variable d_neg3", substrs=["0.00123456"])
-  //% self.expect("frame variable d_neg4", substrs=["0.000123456"])
-  //% self.expect("frame variable d_neg5", substrs=["0.0000123456"])
-  //% self.expect("frame variable d_neg6", substrs=["0.00000123456"])
-  //% self.expect("frame variable d_neg7", substrs=["1.23456", "E-7"])
-  //% self.expect("frame variable d_neg8", substrs=["1.23456", "E-8"])
-  //% self.expect("frame variable d_neg20", substrs=["1.23456", "E-20"])
-  //% self.expect("frame variable d_neg30", substrs=["1.23456", "E-30"])
-  //% self.expect("frame variable d_neg50", substrs=["1.23456", "E-50"])
-  //% self.expect("frame variable d_neg250", substrs=["E-250"])
-  //% self.expect("frame variable d_3", substrs=["1234.56"])
-  //% self.expect("frame variable d_4", substrs=["12345.6"])
-  //% self.expect("frame variable d_5", substrs=["123456"])
-  //% self.expect("frame variable d_6", substrs=["1234567"])
-  //% self.expect("frame variable d_7", substrs=["1234567"])
-  //% self.expect("frame variable d_8", substrs=["1234567"])
-  //% self.expect("frame variable d_20", substrs=["1.23456", "E+20"])
-  //% self.expect("frame variable d_30", substrs=["1.23456", "E+30"])
-  //% self.expect("frame variable d_50", substrs=["1.23456", "E+50"])
-  //% self.expect("frame variable d_250", substrs=["1.23456", "E+250"])
-  //% # Now change the setting to print all the zeroes.
-  //% # Note that changing this setting should invalidate the data visualizer
-  //% # cache so that the new setting is used in the following calls.
-  //% self.runCmd("settings set target.max-zero-padding-in-float-format 9999")
-  //% self.expect("frame variable  f_neg3", substrs=["0.00123456"])
-  //% self.expect("frame variable  f_neg4", substrs=["0.000123456"])
-  //% self.expect("frame variable  f_neg5", substrs=["0.0000123456"])
-  //% self.expect("frame variable  f_neg6", substrs=["0.00000123456"])
-  //% self.expect("frame variable  f_neg7", substrs=["0.000000123456"])
-  //% self.expect("frame variable  f_neg8", substrs=["0.0000000123456"])
-  //% self.expect("frame variable  f_neg20", substrs=["0.0000000000000000000123456"])
-  //% self.expect("frame variable  f_neg30", substrs=["0.00000000000000000000000000000123456"])
-  //% self.expect("frame variable  f_3", substrs=["1234.56"])
-  //% self.expect("frame variable  f_4", substrs=["12345.6"])
-  //% self.expect("frame variable  f_5", substrs=["123456"])
-  //% self.expect("frame variable  f_6", substrs=["1234567"])
-  //% self.expect("frame variable  f_7", substrs=["1234567"])
-  //% self.expect("frame variable  f_8", substrs=["1234567"])
-  //% self.expect("frame variable  f_20", substrs=["E+20"])
-  //% self.expect("frame variable  f_30", substrs=["E+30"])
-  //% self.expect("frame variable  d_neg3", substrs=["0.00123456"])
-  //% self.expect("frame variable  d_neg4", substrs=["0.000123456"])
-  //% self.expect("frame variable  d_neg5", substrs=["0.0000123456"])
-  //% self.expect("frame variable  d_neg6", substrs=["0.00000123456"])
-  //% self.expect("frame variable  d_neg7", substrs=["0.000000123456"])
-  //% self.expect("frame variable  d_neg8", substrs=["0.0000000123456"])
-  //% self.expect("frame variable  d_neg20", substrs=["0.0000000000000000000123456"])
-  //% self.expect("frame variable  d_neg30", substrs=["0.000000000000000000000000000001234567"])
-  //% self.expect("frame variable  d_neg50", substrs=["0.0000000000000000000000000000000000000000000000000123456"])
-  //% self.expect("frame variable  d_neg250", substrs=["0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000123456"])
-  //% self.expect("frame variable  d_3", substrs=["1234.56"])
-  //% self.expect("frame variable  d_4", substrs=["12345.6"])
-  //% self.expect("frame variable  d_5", substrs=["123456"])
-  //% self.expect("frame variable  d_6", substrs=["1234567"])
-  //% self.expect("frame variable  d_7", substrs=["1234567"])
-  //% self.expect("frame variable  d_8", substrs=["1234567"])
-  //% # Positive numbers are not affected by this setting.
-  //% self.expect("frame variable  d_20", substrs=["1.23456", "E+20"])
-  //% self.expect("frame variable  d_30", substrs=["1.23456", "E+30"])
-  //% self.expect("frame variable  d_50", substrs=["1.23456", "E+50"])
-  //% self.expect("frame variable  d_250", substrs=["1.23456", "E+250"])
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestArmRegisterDefinition.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestArmRegisterDefinition.py
deleted file mode 100644 (file)
index 28424f0..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-from __future__ import print_function
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-from gdbclientutils import *
-
-class TestArmRegisterDefinition(GDBRemoteTestBase):
-
-    @skipIfXmlSupportMissing
-    @skipIfRemote
-    def test(self):
-        """
-        Test lldb's parsing of the <architecture> tag in the target.xml register
-        description packet.
-        """
-        class MyResponder(MockGDBServerResponder):
-
-            def qXferRead(self, obj, annex, offset, length):
-                if annex == "target.xml":
-                    return """<?xml version="1.0"?>
-                        <!DOCTYPE feature SYSTEM "gdb-target.dtd">
-                        <target>
-                        <architecture>arm</architecture>
-                        <feature name="org.gnu.gdb.arm.m-profile">
-                        <reg name="r0" bitsize="32" type="uint32" group="general"/>
-                        <reg name="r1" bitsize="32" type="uint32" group="general"/>
-                        <reg name="r2" bitsize="32" type="uint32" group="general"/>
-                        <reg name="r3" bitsize="32" type="uint32" group="general"/>
-                        <reg name="r4" bitsize="32" type="uint32" group="general"/>
-                        <reg name="r5" bitsize="32" type="uint32" group="general"/>
-                        <reg name="r6" bitsize="32" type="uint32" group="general"/>
-                        <reg name="r7" bitsize="32" type="uint32" group="general"/>
-                        <reg name="r8" bitsize="32" type="uint32" group="general"/>
-                        <reg name="r9" bitsize="32" type="uint32" group="general"/>
-                        <reg name="r10" bitsize="32" type="uint32" group="general"/>
-                        <reg name="r11" bitsize="32" type="uint32" group="general"/>
-                        <reg name="r12" bitsize="32" type="uint32" group="general"/>
-                        <reg name="sp" bitsize="32" type="data_ptr" group="general"/>
-                        <reg name="lr" bitsize="32" type="uint32" group="general"/>
-                        <reg name="pc" bitsize="32" type="code_ptr" group="general"/>
-                        <reg name="xpsr" bitsize="32" regnum="25" type="uint32" group="general"/>
-                        <reg name="MSP" bitsize="32" regnum="26" type="uint32" group="general"/>
-                        <reg name="PSP" bitsize="32" regnum="27" type="uint32" group="general"/>
-                        <reg name="PRIMASK" bitsize="32" regnum="28" type="uint32" group="general"/>
-                        <reg name="BASEPRI" bitsize="32" regnum="29" type="uint32" group="general"/>
-                        <reg name="FAULTMASK" bitsize="32" regnum="30" type="uint32" group="general"/>
-                        <reg name="CONTROL" bitsize="32" regnum="31" type="uint32" group="general"/>
-                        <reg name="FPSCR" bitsize="32" type="uint32" group="float"/>
-                        <reg name="s0" bitsize="32" type="float" group="float"/>
-                        <reg name="s1" bitsize="32" type="float" group="float"/>
-                        <reg name="s2" bitsize="32" type="float" group="float"/>
-                        <reg name="s3" bitsize="32" type="float" group="float"/>
-                        <reg name="s4" bitsize="32" type="float" group="float"/>
-                        <reg name="s5" bitsize="32" type="float" group="float"/>
-                        <reg name="s6" bitsize="32" type="float" group="float"/>
-                        <reg name="s7" bitsize="32" type="float" group="float"/>
-                        <reg name="s8" bitsize="32" type="float" group="float"/>
-                        <reg name="s9" bitsize="32" type="float" group="float"/>
-                        <reg name="s10" bitsize="32" type="float" group="float"/>
-                        <reg name="s11" bitsize="32" type="float" group="float"/>
-                        <reg name="s12" bitsize="32" type="float" group="float"/>
-                        <reg name="s13" bitsize="32" type="float" group="float"/>
-                        <reg name="s14" bitsize="32" type="float" group="float"/>
-                        <reg name="s15" bitsize="32" type="float" group="float"/>
-                        <reg name="s16" bitsize="32" type="float" group="float"/>
-                        <reg name="s17" bitsize="32" type="float" group="float"/>
-                        <reg name="s18" bitsize="32" type="float" group="float"/>
-                        <reg name="s19" bitsize="32" type="float" group="float"/>
-                        <reg name="s20" bitsize="32" type="float" group="float"/>
-                        <reg name="s21" bitsize="32" type="float" group="float"/>
-                        <reg name="s22" bitsize="32" type="float" group="float"/>
-                        <reg name="s23" bitsize="32" type="float" group="float"/>
-                        <reg name="s24" bitsize="32" type="float" group="float"/>
-                        <reg name="s25" bitsize="32" type="float" group="float"/>
-                        <reg name="s26" bitsize="32" type="float" group="float"/>
-                        <reg name="s27" bitsize="32" type="float" group="float"/>
-                        <reg name="s28" bitsize="32" type="float" group="float"/>
-                        <reg name="s29" bitsize="32" type="float" group="float"/>
-                        <reg name="s30" bitsize="32" type="float" group="float"/>
-                        <reg name="s31" bitsize="32" type="float" group="float"/>
-                        </feature>
-                        </target>""", False
-                else:
-                    return None, False
-
-            def readRegister(self, regnum):
-                return "E01"
-
-            def readRegisters(self):
-                return "20000000f8360020001000002fcb0008f8360020a0360020200c0020000000000000000000000000000000000000000000000000b87f0120b7d100082ed2000800000001b87f01200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
-
-            def haltReason(self):
-                return "S05"
-
-            def qfThreadInfo(self):
-                return "mdead"
-            
-            def qC(self):
-                return ""
-
-            def qSupported(self, client_supported):
-                return "PacketSize=4000;qXfer:memory-map:read-;QStartNoAckMode+;qXfer:threads:read+;hwbreak+;qXfer:features:read+"
-
-            def QThreadSuffixSupported(self):
-                return "OK"
-
-            def QListThreadsInStopReply(self):
-                return "OK"
-
-        self.server.responder = MyResponder()
-        if self.TraceOn():
-            self.runCmd("log enable gdb-remote packets")
-            self.addTearDownHook(
-                    lambda: self.runCmd("log disable gdb-remote packets"))
-
-        self.dbg.SetDefaultArchitecture("armv7em")
-        target = self.dbg.CreateTargetWithFileAndArch(None, None)
-
-        process = self.connect(target)
-
-        if self.TraceOn():
-            interp = self.dbg.GetCommandInterpreter()
-            result = lldb.SBCommandReturnObject()
-            interp.HandleCommand("target list", result)
-            print(result.GetOutput())
-
-        r0_valobj = process.GetThreadAtIndex(0).GetFrameAtIndex(0).FindRegister("r0")
-        self.assertEqual(r0_valobj.GetValueAsUnsigned(), 0x20)
-
-        pc_valobj = process.GetThreadAtIndex(0).GetFrameAtIndex(0).FindRegister("pc")
-        self.assertEqual(pc_valobj.GetValueAsUnsigned(), 0x0800d22e)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteClient.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteClient.py
deleted file mode 100644 (file)
index 8f0ed9a..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-import lldb
-import binascii
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-from gdbclientutils import *
-
-
-class TestGDBRemoteClient(GDBRemoteTestBase):
-
-    class gPacketResponder(MockGDBServerResponder):
-        def readRegisters(self):
-            return '0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
-
-    def setUp(self):
-        super(TestGDBRemoteClient, self).setUp()
-        self._initial_platform = lldb.DBG.GetSelectedPlatform()
-
-    def tearDown(self):
-        lldb.DBG.SetSelectedPlatform(self._initial_platform)
-        super(TestGDBRemoteClient, self).tearDown()
-
-    def test_connect(self):
-        """Test connecting to a remote gdb server"""
-        target = self.createTarget("a.yaml")
-        process = self.connect(target)
-        self.assertPacketLogContains(["qProcessInfo", "qfThreadInfo"])
-
-    def test_attach_fail(self):
-        error_msg = "mock-error-msg"
-
-        class MyResponder(MockGDBServerResponder):
-            # Pretend we don't have any process during the initial queries.
-            def qC(self):
-                return "E42"
-
-            def qfThreadInfo(self):
-                return "OK" # No threads.
-
-            # Then, when we are asked to attach, error out.
-            def vAttach(self, pid):
-                return "E42;" + binascii.hexlify(error_msg.encode()).decode()
-
-        self.server.responder = MyResponder()
-
-        target = self.dbg.CreateTarget("")
-        process = self.connect(target)
-        lldbutil.expect_state_changes(self, self.dbg.GetListener(), process, [lldb.eStateConnected])
-
-        error = lldb.SBError()
-        target.AttachToProcessWithID(lldb.SBListener(), 47, error)
-        self.assertEquals(error_msg, error.GetCString())
-
-    def test_read_registers_using_g_packets(self):
-        """Test reading registers using 'g' packets (default behavior)"""
-        self.dbg.HandleCommand(
-                "settings set plugin.process.gdb-remote.use-g-packet-for-reading true")
-        self.addTearDownHook(lambda: 
-                self.runCmd("settings set plugin.process.gdb-remote.use-g-packet-for-reading false"))
-        self.server.responder = self.gPacketResponder()
-        target = self.createTarget("a.yaml")
-        process = self.connect(target)
-
-        self.assertEquals(1, self.server.responder.packetLog.count("g"))
-        self.server.responder.packetLog = []
-        self.read_registers(process)
-        # Reading registers should not cause any 'p' packets to be exchanged.
-        self.assertEquals(
-                0, len([p for p in self.server.responder.packetLog if p.startswith("p")]))
-
-    def test_read_registers_using_p_packets(self):
-        """Test reading registers using 'p' packets"""
-        self.dbg.HandleCommand(
-                "settings set plugin.process.gdb-remote.use-g-packet-for-reading false")
-        target = self.createTarget("a.yaml")
-        process = self.connect(target)
-
-        self.read_registers(process)
-        self.assertFalse("g" in self.server.responder.packetLog)
-        self.assertGreater(
-                len([p for p in self.server.responder.packetLog if p.startswith("p")]), 0)
-
-    def test_write_registers_using_P_packets(self):
-        """Test writing registers using 'P' packets (default behavior)"""
-        self.server.responder = self.gPacketResponder()
-        target = self.createTarget("a.yaml")
-        process = self.connect(target)
-
-        self.write_registers(process)
-        self.assertEquals(0, len(
-                [p for p in self.server.responder.packetLog if p.startswith("G")]))
-        self.assertGreater(
-                len([p for p in self.server.responder.packetLog if p.startswith("P")]), 0)
-
-    def test_write_registers_using_G_packets(self):
-        """Test writing registers using 'G' packets"""
-
-        class MyResponder(self.gPacketResponder):
-            def readRegister(self, register):
-                # empty string means unsupported
-                return ""
-
-        self.server.responder = MyResponder()
-        target = self.createTarget("a.yaml")
-        process = self.connect(target)
-
-        self.write_registers(process)
-        self.assertEquals(0, len(
-                [p for p in self.server.responder.packetLog if p.startswith("P")]))
-        self.assertGreater(len(
-                [p for p in self.server.responder.packetLog if p.startswith("G")]), 0)
-
-    def read_registers(self, process):
-        self.for_each_gpr(
-                process, lambda r: self.assertEquals("0x00000000", r.GetValue()))
-
-    def write_registers(self, process):
-        self.for_each_gpr(
-                process, lambda r: r.SetValueFromCString("0x00000000"))
-
-    def for_each_gpr(self, process, operation):
-        registers = process.GetThreadAtIndex(0).GetFrameAtIndex(0).GetRegisters()
-        self.assertGreater(registers.GetSize(), 0)
-        regSet = registers[0]
-        numChildren = regSet.GetNumChildren()
-        self.assertGreater(numChildren, 0)
-        for i in range(numChildren):
-            operation(regSet.GetChildAtIndex(i))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteLoad.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteLoad.py
deleted file mode 100644 (file)
index f70c854..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-from gdbclientutils import *
-
-
-class TestGDBRemoteLoad(GDBRemoteTestBase):
-
-    def setUp(self):
-        super(TestGDBRemoteLoad, self).setUp()
-        self._initial_platform = lldb.DBG.GetSelectedPlatform()
-
-    def tearDown(self):
-        lldb.DBG.SetSelectedPlatform(self._initial_platform)
-        super(TestGDBRemoteLoad, self).tearDown()
-
-    def test_module_load_address(self):
-        """Test that setting the load address of a module uses virtual addresses"""
-        target = self.createTarget("a.yaml")
-        process = self.connect(target)
-        module = target.GetModuleAtIndex(0)
-        self.assertTrue(module.IsValid())
-        self.assertTrue(target.SetModuleLoadAddress(module, 0).Success())
-        address = target.ResolveLoadAddress(0x2001)
-        self.assertTrue(address.IsValid())
-        self.assertEqual(".data", address.GetSection().GetName())
-
-    def test_ram_load(self):
-        """Test loading an object file to a target's ram"""
-        target = self.createTarget("a.yaml")
-        process = self.connect(target)
-        self.dbg.HandleCommand("target modules load -l -s0")
-        self.assertPacketLogContains([
-                "M1000,4:c3c3c3c3",
-                "M1004,2:3232"
-                ])
-
-    @skipIfXmlSupportMissing
-    def test_flash_load(self):
-        """Test loading an object file to a target's flash memory"""
-
-        class Responder(MockGDBServerResponder):
-            def qSupported(self, client_supported):
-                return "PacketSize=3fff;QStartNoAckMode+;qXfer:memory-map:read+"
-
-            def qXferRead(self, obj, annex, offset, length):
-                if obj == "memory-map":
-                    return (self.MEMORY_MAP[offset:offset + length],
-                            offset + length < len(self.MEMORY_MAP))
-                return None, False
-
-            def other(self, packet):
-                if packet[0:11] == "vFlashErase":
-                    return "OK"
-                if packet[0:11] == "vFlashWrite":
-                    return "OK"
-                if packet == "vFlashDone":
-                    return "OK"
-                return ""
-
-            MEMORY_MAP = """<?xml version="1.0"?>
-<memory-map>
-  <memory type="ram" start="0x0" length="0x1000"/>
-  <memory type="flash" start="0x1000" length="0x1000">
-    <property name="blocksize">0x100</property>
-  </memory>
-  <memory type="ram" start="0x2000" length="0x1D400"/>
-</memory-map>
-"""
-
-        self.server.responder = Responder()
-        target = self.createTarget("a.yaml")
-        process = self.connect(target)
-        self.dbg.HandleCommand("target modules load -l -s0")
-        self.assertPacketLogContains([
-                "vFlashErase:1000,100",
-                "vFlashWrite:1000:\xc3\xc3\xc3\xc3",
-                "vFlashWrite:1004:\x32\x32",
-                "vFlashDone"
-                ])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestJLink6Armv7RegisterDefinition.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestJLink6Armv7RegisterDefinition.py
deleted file mode 100644 (file)
index f0113fd..0000000
+++ /dev/null
@@ -1,196 +0,0 @@
-from __future__ import print_function
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-from gdbclientutils import *
-
-class TestJLink6Armv7RegisterDefinition(GDBRemoteTestBase):
-
-    @skipIfXmlSupportMissing
-    @skipIfRemote
-    def test(self):
-        """
-        Test lldb's parsing of SEGGER J-Link v6.54 register
-        definition for a Cortex M-4 dev board, and the fact
-        that the J-Link only supports g/G for reading/writing
-        register AND the J-Link v6.54 doesn't provide anything
-        but the general purpose registers."""
-        class MyResponder(MockGDBServerResponder):
-
-            def qXferRead(self, obj, annex, offset, length):
-                if annex == "target.xml":
-                    return """<?xml version="1.0"?>
-<!-- Copyright (C) 2008 Free Software Foundation, Inc.
-
-     Copying and distribution of this file, with or without modification,
-     are permitted in any medium without royalty provided the copyright
-     notice and this notice are preserved.  -->
-
-<!DOCTYPE feature SYSTEM "gdb-target.dtd">
-<target version="1.0">
-  <architecture>arm</architecture>
-  <feature name="org.gnu.gdb.arm.m-profile">
-    <reg name="r0" bitsize="32" regnum="0" type="uint32" group="general"/>
-    <reg name="r1" bitsize="32" regnum="1" type="uint32" group="general"/>
-    <reg name="r2" bitsize="32" regnum="2" type="uint32" group="general"/>
-    <reg name="r3" bitsize="32" regnum="3" type="uint32" group="general"/>
-    <reg name="r4" bitsize="32" regnum="4" type="uint32" group="general"/>
-    <reg name="r5" bitsize="32" regnum="5" type="uint32" group="general"/>
-    <reg name="r6" bitsize="32" regnum="6" type="uint32" group="general"/>
-    <reg name="r7" bitsize="32" regnum="7" type="uint32" group="general"/>
-    <reg name="r8" bitsize="32" regnum="8" type="uint32" group="general"/>
-    <reg name="r9" bitsize="32" regnum="9" type="uint32" group="general"/>
-    <reg name="r10" bitsize="32" regnum="10" type="uint32" group="general"/>
-    <reg name="r11" bitsize="32" regnum="11" type="uint32" group="general"/>
-    <reg name="r12" bitsize="32" regnum="12" type="uint32" group="general"/>
-    <reg name="sp" bitsize="32" regnum="13" type="data_ptr" group="general"/>
-    <reg name="lr" bitsize="32" regnum="14" type="uint32" group="general"/>
-    <reg name="pc" bitsize="32" regnum="15" type="code_ptr" group="general"/>
-    <reg name="xpsr" bitsize="32" regnum="25" type="uint32" group="general"/>
-  </feature>
-  <feature name="org.gnu.gdb.arm.m-system">
-    <reg name="msp" bitsize="32" regnum="26" type="uint32" group="general"/>
-    <reg name="psp" bitsize="32" regnum="27" type="uint32" group="general"/>
-    <reg name="primask" bitsize="32" regnum="28" type="uint32" group="general"/>
-    <reg name="basepri" bitsize="32" regnum="29" type="uint32" group="general"/>
-    <reg name="faultmask" bitsize="32" regnum="30" type="uint32" group="general"/>
-    <reg name="control" bitsize="32" regnum="31" type="uint32" group="general"/>
-  </feature>
-  <feature name="org.gnu.gdb.arm.m-float">
-    <reg name="fpscr" bitsize="32" regnum="32" type="uint32" group="float"/>
-    <reg name="s0" bitsize="32" regnum="33" type="float" group="float"/>
-    <reg name="s1" bitsize="32" regnum="34" type="float" group="float"/>
-    <reg name="s2" bitsize="32" regnum="35" type="float" group="float"/>
-    <reg name="s3" bitsize="32" regnum="36" type="float" group="float"/>
-    <reg name="s4" bitsize="32" regnum="37" type="float" group="float"/>
-    <reg name="s5" bitsize="32" regnum="38" type="float" group="float"/>
-    <reg name="s6" bitsize="32" regnum="39" type="float" group="float"/>
-    <reg name="s7" bitsize="32" regnum="40" type="float" group="float"/>
-    <reg name="s8" bitsize="32" regnum="41" type="float" group="float"/>
-    <reg name="s9" bitsize="32" regnum="42" type="float" group="float"/>
-    <reg name="s10" bitsize="32" regnum="43" type="float" group="float"/>
-    <reg name="s11" bitsize="32" regnum="44" type="float" group="float"/>
-    <reg name="s12" bitsize="32" regnum="45" type="float" group="float"/>
-    <reg name="s13" bitsize="32" regnum="46" type="float" group="float"/>
-    <reg name="s14" bitsize="32" regnum="47" type="float" group="float"/>
-    <reg name="s15" bitsize="32" regnum="48" type="float" group="float"/>
-    <reg name="s16" bitsize="32" regnum="49" type="float" group="float"/>
-    <reg name="s17" bitsize="32" regnum="50" type="float" group="float"/>
-    <reg name="s18" bitsize="32" regnum="51" type="float" group="float"/>
-    <reg name="s19" bitsize="32" regnum="52" type="float" group="float"/>
-    <reg name="s20" bitsize="32" regnum="53" type="float" group="float"/>
-    <reg name="s21" bitsize="32" regnum="54" type="float" group="float"/>
-    <reg name="s22" bitsize="32" regnum="55" type="float" group="float"/>
-    <reg name="s23" bitsize="32" regnum="56" type="float" group="float"/>
-    <reg name="s24" bitsize="32" regnum="57" type="float" group="float"/>
-    <reg name="s25" bitsize="32" regnum="58" type="float" group="float"/>
-    <reg name="s26" bitsize="32" regnum="59" type="float" group="float"/>
-    <reg name="s27" bitsize="32" regnum="60" type="float" group="float"/>
-    <reg name="s28" bitsize="32" regnum="61" type="float" group="float"/>
-    <reg name="s29" bitsize="32" regnum="62" type="float" group="float"/>
-    <reg name="s30" bitsize="32" regnum="63" type="float" group="float"/>
-    <reg name="s31" bitsize="32" regnum="64" type="float" group="float"/>
-    <reg name="d0" bitsize="64" regnum="65" type="ieee_double" group="float"/>
-    <reg name="d1" bitsize="64" regnum="66" type="ieee_double" group="float"/>
-    <reg name="d2" bitsize="64" regnum="67" type="ieee_double" group="float"/>
-    <reg name="d3" bitsize="64" regnum="68" type="ieee_double" group="float"/>
-    <reg name="d4" bitsize="64" regnum="69" type="ieee_double" group="float"/>
-    <reg name="d5" bitsize="64" regnum="70" type="ieee_double" group="float"/>
-    <reg name="d6" bitsize="64" regnum="71" type="ieee_double" group="float"/>
-    <reg name="d7" bitsize="64" regnum="72" type="ieee_double" group="float"/>
-    <reg name="d8" bitsize="64" regnum="73" type="ieee_double" group="float"/>
-    <reg name="d9" bitsize="64" regnum="74" type="ieee_double" group="float"/>
-    <reg name="d10" bitsize="64" regnum="75" type="ieee_double" group="float"/>
-    <reg name="d11" bitsize="64" regnum="76" type="ieee_double" group="float"/>
-    <reg name="d12" bitsize="64" regnum="77" type="ieee_double" group="float"/>
-    <reg name="d13" bitsize="64" regnum="78" type="ieee_double" group="float"/>
-    <reg name="d14" bitsize="64" regnum="79" type="ieee_double" group="float"/>
-    <reg name="d15" bitsize="64" regnum="80" type="ieee_double" group="float"/>
-  </feature>
-</target>""", False
-                else:
-                    return None, False
-
-            def readRegister(self, regnum):
-                return "E01"
-
-            # Initial r1 bytes, in little-endian order
-            r1_bytes = "01000000"
-
-            ## readRegisters only provides reg values up through xpsr (0x61000000)
-            ## it doesn't send up any of the exception registers or floating point
-            ## registers that the above register xml describes.
-            def readRegisters(self):
-                return "00000000" + self.r1_bytes + "010000000100000001000000000000008c080020a872012000000000a0790120000000008065012041ad0008a0720120692a00089e26000800000061"
-
-            ## the J-Link accepts a register write packet with just the GPRs
-            ## defined.
-            def writeRegisters(self, registers_hex):
-                # Check that lldb returns the full 704 hex-byte register context, 
-                # or the 136 hex-byte general purpose register reg ctx.
-                if len(registers_hex) != 704 and len(register_hex) != 136:
-                    return "E06"
-                if registers_hex.startswith("0000000044332211010000000100000001000000000000008c080020a872012000000000a0790120000000008065012041ad0008a0720120692a00089e26000800000061"):
-                    self.r1_bytes = "44332211"
-                    return "OK"
-                else:
-                    return "E07"
-
-            def haltReason(self):
-                return "S05"
-
-            def qfThreadInfo(self):
-                return "mdead"
-            
-            def qC(self):
-                return ""
-
-            def qSupported(self, client_supported):
-                return "PacketSize=4000;qXfer:memory-map:read-;QStartNoAckMode+;hwbreak+;qXfer:features:read+"
-
-            def QThreadSuffixSupported(self):
-                return "OK"
-
-            def QListThreadsInStopReply(self):
-                return "OK"
-
-        self.server.responder = MyResponder()
-        if self.TraceOn():
-            self.runCmd("log enable gdb-remote packets")
-            self.addTearDownHook(
-                    lambda: self.runCmd("log disable gdb-remote packets"))
-
-        self.dbg.SetDefaultArchitecture("armv7em")
-        target = self.dbg.CreateTargetWithFileAndArch(None, None)
-
-        process = self.connect(target)
-
-        if self.TraceOn():
-            interp = self.dbg.GetCommandInterpreter()
-            result = lldb.SBCommandReturnObject()
-            interp.HandleCommand("target list", result)
-            print(result.GetOutput())
-
-        r1_valobj = process.GetThreadAtIndex(0).GetFrameAtIndex(0).FindRegister("r1")
-        self.assertEqual(r1_valobj.GetValueAsUnsigned(), 1)
-
-        pc_valobj = process.GetThreadAtIndex(0).GetFrameAtIndex(0).FindRegister("pc")
-        self.assertEqual(pc_valobj.GetValueAsUnsigned(), 0x0800269e)
-
-        xpsr_valobj = process.GetThreadAtIndex(0).GetFrameAtIndex(0).FindRegister("xpsr")
-        self.assertEqual(xpsr_valobj.GetValueAsUnsigned(), 0x61000000)
-
-        msp_valobj = process.GetThreadAtIndex(0).GetFrameAtIndex(0).FindRegister("msp")
-        err = msp_valobj.GetError()
-        self.assertTrue(err.Fail(), "lldb should not be able to fetch the msp register")
-
-        val = b'\x11\x22\x33\x44'
-        error = lldb.SBError()
-        data = lldb.SBData()
-        data.SetData(error, val, lldb.eByteOrderBig, 4)
-        self.assertEqual(r1_valobj.SetData(data, error), True)
-        self.assertTrue(error.Success())
-
-        r1_valobj = process.GetThreadAtIndex(0).GetFrameAtIndex(0).FindRegister("r1")
-        self.assertEqual(r1_valobj.GetValueAsUnsigned(), 0x11223344)
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestNestedRegDefinitions.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestNestedRegDefinitions.py
deleted file mode 100644 (file)
index 4407e86..0000000
+++ /dev/null
@@ -1,238 +0,0 @@
-from __future__ import print_function
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-from gdbclientutils import *
-
-class TestNestedRegDefinitions(GDBRemoteTestBase):
-
-    @skipIfXmlSupportMissing
-    @skipIfRemote
-    def test(self):
-        """
-        Test lldb's parsing of the <architecture> tag in the target.xml register
-        description packet.
-        """
-        class MyResponder(MockGDBServerResponder):
-
-            def qXferRead(self, obj, annex, offset, length):
-                if annex == "target.xml":
-                    return """<?xml version="1.0"?><!DOCTYPE target SYSTEM "gdb-target.dtd"><target><architecture>i386:x86-64</architecture><xi:include href="i386-64bit.xml"/></target>""", False
-
-                if annex == "i386-64bit.xml":
-                    return """<?xml version="1.0"?>
-<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
-
-     Copying and distribution of this file, with or without modification,
-     are permitted in any medium without royalty provided the copyright
-     notice and this notice are preserved.  -->
-
-<!-- I386 64bit -->
-
-<!DOCTYPE target SYSTEM "gdb-target.dtd">
-<feature name="org.gnu.gdb.i386.64bit">
-  <xi:include href="i386-64bit-core.xml"/>
-  <xi:include href="i386-64bit-sse.xml"/>
-</feature>""", False
-
-                if annex == "i386-64bit-core.xml":
-                    return """<?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
-
-     Copying and distribution of this file, with or without modification,
-     are permitted in any medium without royalty provided the copyright
-     notice and this notice are preserved.  -->
-
-<!DOCTYPE feature SYSTEM "gdb-target.dtd">
-<feature name="org.gnu.gdb.i386.core">
-  <flags id="i386_eflags" size="4">
-    <field name="CF" start="0" end="0"/>
-    <field name="" start="1" end="1"/>
-    <field name="PF" start="2" end="2"/>
-    <field name="AF" start="4" end="4"/>
-    <field name="ZF" start="6" end="6"/>
-    <field name="SF" start="7" end="7"/>
-    <field name="TF" start="8" end="8"/>
-    <field name="IF" start="9" end="9"/>
-    <field name="DF" start="10" end="10"/>
-    <field name="OF" start="11" end="11"/>
-    <field name="NT" start="14" end="14"/>
-    <field name="RF" start="16" end="16"/>
-    <field name="VM" start="17" end="17"/>
-    <field name="AC" start="18" end="18"/>
-    <field name="VIF" start="19" end="19"/>
-    <field name="VIP" start="20" end="20"/>
-    <field name="ID" start="21" end="21"/>
-  </flags>
-
-  <reg name="rax" bitsize="64" type="int64"/>
-  <reg name="rbx" bitsize="64" type="int64"/>
-  <reg name="rcx" bitsize="64" type="int64"/>
-  <reg name="rdx" bitsize="64" type="int64"/>
-  <reg name="rsi" bitsize="64" type="int64"/>
-  <reg name="rdi" bitsize="64" type="int64"/>
-  <reg name="rbp" bitsize="64" type="data_ptr"/>
-  <reg name="rsp" bitsize="64" type="data_ptr"/>
-  <reg name="r8" bitsize="64" type="int64"/>
-  <reg name="r9" bitsize="64" type="int64"/>
-  <reg name="r10" bitsize="64" type="int64"/>
-  <reg name="r11" bitsize="64" type="int64"/>
-  <reg name="r12" bitsize="64" type="int64"/>
-  <reg name="r13" bitsize="64" type="int64"/>
-  <reg name="r14" bitsize="64" type="int64"/>
-  <reg name="r15" bitsize="64" type="int64"/>
-
-  <reg name="rip" bitsize="64" type="code_ptr"/>
-  <reg name="eflags" bitsize="32" type="i386_eflags"/>
-  <reg name="cs" bitsize="32" type="int32"/>
-  <reg name="ss" bitsize="32" type="int32"/>
-  <reg name="ds" bitsize="32" type="int32"/>
-  <reg name="es" bitsize="32" type="int32"/>
-  <reg name="fs" bitsize="32" type="int32"/>
-  <reg name="gs" bitsize="32" type="int32"/>
-
-  <reg name="st0" bitsize="80" type="i387_ext"/>
-  <reg name="st1" bitsize="80" type="i387_ext"/>
-  <reg name="st2" bitsize="80" type="i387_ext"/>
-  <reg name="st3" bitsize="80" type="i387_ext"/>
-  <reg name="st4" bitsize="80" type="i387_ext"/>
-  <reg name="st5" bitsize="80" type="i387_ext"/>
-  <reg name="st6" bitsize="80" type="i387_ext"/>
-  <reg name="st7" bitsize="80" type="i387_ext"/>
-
-  <reg name="fctrl" bitsize="32" type="int" group="float"/>
-  <reg name="fstat" bitsize="32" type="int" group="float"/>
-  <reg name="ftag" bitsize="32" type="int" group="float"/>
-  <reg name="fiseg" bitsize="32" type="int" group="float"/>
-  <reg name="fioff" bitsize="32" type="int" group="float"/>
-  <reg name="foseg" bitsize="32" type="int" group="float"/>
-  <reg name="fooff" bitsize="32" type="int" group="float"/>
-  <reg name="fop" bitsize="32" type="int" group="float"/>
-</feature>""", False
-
-                if annex == "i386-64bit-sse.xml":
-                    return """<?xml version="1.0"?>
-<!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
-
-     Copying and distribution of this file, with or without modification,
-     are permitted in any medium without royalty provided the copyright
-     notice and this notice are preserved.  -->
-
-<!DOCTYPE feature SYSTEM "gdb-target.dtd">
-<feature name="org.gnu.gdb.i386.64bit.sse">
-  <vector id="v4f" type="ieee_single" count="4"/>
-  <vector id="v2d" type="ieee_double" count="2"/>
-  <vector id="v16i8" type="int8" count="16"/>
-  <vector id="v8i16" type="int16" count="8"/>
-  <vector id="v4i32" type="int32" count="4"/>
-  <vector id="v2i64" type="int64" count="2"/>
-  <union id="vec128">
-    <field name="v4_float" type="v4f"/>
-    <field name="v2_double" type="v2d"/>
-    <field name="v16_int8" type="v16i8"/>
-    <field name="v8_int16" type="v8i16"/>
-    <field name="v4_int32" type="v4i32"/>
-    <field name="v2_int64" type="v2i64"/>
-    <field name="uint128" type="uint128"/>
-  </union>
-  <flags id="i386_mxcsr" size="4">
-    <field name="IE" start="0" end="0"/>
-    <field name="DE" start="1" end="1"/>
-    <field name="ZE" start="2" end="2"/>
-    <field name="OE" start="3" end="3"/>
-    <field name="UE" start="4" end="4"/>
-    <field name="PE" start="5" end="5"/>
-    <field name="DAZ" start="6" end="6"/>
-    <field name="IM" start="7" end="7"/>
-    <field name="DM" start="8" end="8"/>
-    <field name="ZM" start="9" end="9"/>
-    <field name="OM" start="10" end="10"/>
-    <field name="UM" start="11" end="11"/>
-    <field name="PM" start="12" end="12"/>
-    <field name="FZ" start="15" end="15"/>
-  </flags>
-
-  <reg name="xmm0" bitsize="128" type="vec128" regnum="40"/>
-  <reg name="xmm1" bitsize="128" type="vec128"/>
-  <reg name="xmm2" bitsize="128" type="vec128"/>
-  <reg name="xmm3" bitsize="128" type="vec128"/>
-  <reg name="xmm4" bitsize="128" type="vec128"/>
-  <reg name="xmm5" bitsize="128" type="vec128"/>
-  <reg name="xmm6" bitsize="128" type="vec128"/>
-  <reg name="xmm7" bitsize="128" type="vec128"/>
-  <reg name="xmm8" bitsize="128" type="vec128"/>
-  <reg name="xmm9" bitsize="128" type="vec128"/>
-  <reg name="xmm10" bitsize="128" type="vec128"/>
-  <reg name="xmm11" bitsize="128" type="vec128"/>
-  <reg name="xmm12" bitsize="128" type="vec128"/>
-  <reg name="xmm13" bitsize="128" type="vec128"/>
-  <reg name="xmm14" bitsize="128" type="vec128"/>
-  <reg name="xmm15" bitsize="128" type="vec128"/>
-
-  <reg name="mxcsr" bitsize="32" type="i386_mxcsr" group="vector"/>
-</feature>""", False
-
-                return None, False
-
-            def readRegister(self, regnum):
-                return ""
-
-            def readRegisters(self):
-                return "0600000000000000c0b7c00080fffffff021c60080ffffff1a00000000000000020000000000000078b7c00080ffffff203f8ca090ffffff103f8ca090ffffff3025990a80ffffff809698000000000070009f0a80ffffff020000000000000000eae10080ffffff00000000000000001822d74f1a00000078b7c00080ffffff0e12410080ffff004602000008000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007f0300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000801f0000"
-
-            def haltReason(self):
-                return "T02thread:dead;threads:dead;"
-
-            def qfThreadInfo(self):
-                return "mdead"
-            
-            def qC(self):
-                return ""
-
-            def qSupported(self, client_supported):
-                return "PacketSize=4000;qXfer:features:read+"
-
-            def QThreadSuffixSupported(self):
-                return "OK"
-
-            def QListThreadsInStopReply(self):
-                return "OK"
-
-        self.server.responder = MyResponder()
-        if self.TraceOn():
-            self.runCmd("log enable gdb-remote packets")
-            self.addTearDownHook(
-                    lambda: self.runCmd("log disable gdb-remote packets"))
-
-        target = self.dbg.CreateTargetWithFileAndArch(None, None)
-
-        process = self.connect(target)
-
-        if self.TraceOn():
-            interp = self.dbg.GetCommandInterpreter()
-            result = lldb.SBCommandReturnObject()
-            interp.HandleCommand("target list", result)
-            print(result.GetOutput())
-
-        rip_valobj = process.GetThreadAtIndex(0).GetFrameAtIndex(0).FindRegister("rip")
-        self.assertEqual(rip_valobj.GetValueAsUnsigned(), 0x00ffff800041120e)
-
-        r15_valobj = process.GetThreadAtIndex(0).GetFrameAtIndex(0).FindRegister("r15")
-        self.assertEqual(r15_valobj.GetValueAsUnsigned(), 0xffffff8000c0b778)
-
-        mxcsr_valobj = process.GetThreadAtIndex(0).GetFrameAtIndex(0).FindRegister("mxcsr")
-        self.assertEqual(mxcsr_valobj.GetValueAsUnsigned(), 0x00001f80)
-
-        gpr_reg_set_name = process.GetThreadAtIndex(0).GetFrameAtIndex(0).GetRegisters().GetValueAtIndex(0).GetName()
-        self.assertEqual(gpr_reg_set_name, "general")
-
-        float_reg_set_name = process.GetThreadAtIndex(0).GetFrameAtIndex(0).GetRegisters().GetValueAtIndex(1).GetName()
-        self.assertEqual(float_reg_set_name, "float")
-
-        vector_reg_set_name = process.GetThreadAtIndex(0).GetFrameAtIndex(0).GetRegisters().GetValueAtIndex(2).GetName()
-        self.assertEqual(vector_reg_set_name, "vector")
-
-        if self.TraceOn():
-            print("rip is 0x%x" % rip_valobj.GetValueAsUnsigned())
-            print("r15 is 0x%x" % r15_valobj.GetValueAsUnsigned())
-            print("mxcsr is 0x%x" % mxcsr_valobj.GetValueAsUnsigned())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestNoGPacketSupported.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestNoGPacketSupported.py
deleted file mode 100644 (file)
index 6a17173..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-from __future__ import print_function
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-from gdbclientutils import *
-
-
-# This test case is testing three things:
-#
-#  1. three register values will be provided in the ? stop packet (T11) -
-#     registers 0 ("rax"), 1 ("rbx"), and 3 ("rip")
-#  2. ReadRegister packet will provide the value of register 2 ("rsi")
-#  3. The "g" read-all-registers packet is not supported; p must be used
-#     to get the value of register 2 ("rsi")
-#
-# Forcing lldb to use the expedited registers in the stop packet and
-# marking it an error to request that register value is to prevent
-# performance regressions.
-# 
-# Some gdb RSP stubs only implement p/P, they do not support g/G.
-# lldb must be able to work with either.
-
-class TestNoGPacketSupported(GDBRemoteTestBase):
-
-    @skipIfXmlSupportMissing
-    def test(self):
-        class MyResponder(MockGDBServerResponder):
-            def haltReason(self):
-                return "T02thread:1ff0d;threads:1ff0d;thread-pcs:000000010001bc00;00:7882773ce0ffffff;01:1122334455667788;03:00bc010001000000;"
-
-            def threadStopInfo(self, threadnum):
-                return "T02thread:1ff0d;threads:1ff0d;thread-pcs:000000010001bc00;00:7882773ce0ffffff;01:1122334455667788;03:00bc010001000000;"
-
-            def writeRegisters(self):
-                return "E02"
-
-            def readRegisters(self):
-                return "E01"
-
-            def readRegister(self, regnum):
-                # lldb will try sending "p0" to see if the p packet is supported,
-                # give a bogus value; in theory lldb could use this value in the
-                # register context and that would be valid behavior.
-
-                # notably, don't give values for registers 1 & 3 -- lldb should
-                # get those from the ? stop packet ("T11") and it is a pref regression
-                # if lldb is asking for these register values.
-                if regnum == 0:
-                    return "5555555555555555"
-                if regnum == 2:
-                    return "c04825ebfe7f0000" # 0x00007ffeeb2548c0
-
-                return "E03"
-
-            def writeRegister(self, regnum):
-                return "OK"
-
-            def qXferRead(self, obj, annex, offset, length):
-                if annex == "target.xml":
-                    return """<?xml version="1.0"?>
-                        <target version="1.0">
-                          <architecture>i386:x86-64</architecture>
-                          <feature name="org.gnu.gdb.i386.core">
-                            <reg name="rax" bitsize="64" regnum="0" type="code_ptr" group="general"/>
-                            <reg name="rbx" bitsize="64" regnum="1" type="code_ptr" group="general"/>
-                            <reg name="rsi" bitsize="64" regnum="2" type="code_ptr" group="general"/>
-                            <reg name="rip" bitsize="64" regnum="3" type="code_ptr" group="general" altname="pc" generic="pc"/>
-                          </feature>
-                        </target>""", False
-                else:
-                    return None, False
-
-        self.server.responder = MyResponder()
-        target = self.dbg.CreateTarget('')
-        if self.TraceOn():
-          self.runCmd("log enable gdb-remote packets")
-          self.addTearDownHook(
-                lambda: self.runCmd("log disable gdb-remote packets"))
-        process = self.connect(target)
-
-        thread = process.GetThreadAtIndex(0)
-        frame = thread.GetFrameAtIndex(0)
-        rax = frame.FindRegister("rax").GetValueAsUnsigned()
-        rbx = frame.FindRegister("rbx").GetValueAsUnsigned()
-        rsi = frame.FindRegister("rsi").GetValueAsUnsigned()
-        pc = frame.GetPC()
-        rip = frame.FindRegister("rip").GetValueAsUnsigned()
-
-        if self.TraceOn():
-            print("Register values: rax == 0x%x, rbx == 0x%x, rsi == 0x%x, pc == 0x%x, rip == 0x%x" % (rax, rbx, rsi, pc, rip))
-
-        self.assertEqual(rax, 0xffffffe03c778278)
-        self.assertEqual(rbx, 0x8877665544332211)
-        self.assertEqual(rsi, 0x00007ffeeb2548c0)
-        self.assertEqual(pc, 0x10001bc00)
-        self.assertEqual(rip, 0x10001bc00)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestNoWatchpointSupportInfo.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestNoWatchpointSupportInfo.py
deleted file mode 100644 (file)
index 3bf22d3..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-from __future__ import print_function
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-from gdbclientutils import *
-
-class TestNoWatchpointSupportInfo(GDBRemoteTestBase):
-
-    @skipIfXmlSupportMissing
-    @skipIfRemote
-    def test(self):
-        """
-        Test lldb's parsing of the <architecture> tag in the target.xml register
-        description packet.
-        """
-        class MyResponder(MockGDBServerResponder):
-
-            def haltReason(self):
-                return "T02thread:1ff0d;thread-pcs:10001bc00;"
-
-            def threadStopInfo(self, threadnum):
-                if threadnum == 0x1ff0d:
-                    return "T02thread:1ff0d;thread-pcs:10001bc00;"
-                return ""
-
-            def setBreakpoint(self, packet):
-                if packet.startswith("Z2,"):
-                    return "OK"
-
-            def qXferRead(self, obj, annex, offset, length):
-                if annex == "target.xml":
-                    return """<?xml version="1.0"?>
-                        <target version="1.0">
-                          <architecture>i386:x86-64</architecture>
-                          <feature name="org.gnu.gdb.i386.core">
-                            <reg name="rip" bitsize="64" regnum="0" type="code_ptr" group="general"/>
-                          </feature>
-                        </target>""", False
-                else:
-                    return None, False
-
-        self.server.responder = MyResponder()
-        if self.TraceOn():
-            self.runCmd("log enable gdb-remote packets")
-            self.addTearDownHook(
-                lambda: self.runCmd("log disable gdb-remote packets"))
-        self.dbg.SetDefaultArchitecture("x86_64")
-        target = self.dbg.CreateTargetWithFileAndArch(None, None)
-
-        process = self.connect(target)
-
-        if self.TraceOn():
-            interp = self.dbg.GetCommandInterpreter()
-            result = lldb.SBCommandReturnObject()
-            interp.HandleCommand("target list", result)
-            print(result.GetOutput())
-
-       
-        err = lldb.SBError()
-        wp = target.WatchAddress(0x100, 8, False, True, err)
-        if self.TraceOn() and (err.Fail() or wp.IsValid == False):
-            strm = lldb.SBStream()
-            err.GetDescription(strm)
-            print("watchpoint failed: %s" % strm.GetData())
-        self.assertTrue(wp.IsValid())
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestPlatformClient.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestPlatformClient.py
deleted file mode 100644 (file)
index 2da8dd5..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-import lldb
-import binascii
-import os
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-from gdbclientutils import *
-
-def hexlify(string):
-    return binascii.hexlify(string.encode()).decode()
-
-class TestPlatformClient(GDBRemoteTestBase):
-
-    def test_process_list_with_all_users(self):
-        """Test connecting to a remote linux platform"""
-
-        class MyResponder(MockGDBServerResponder):
-            def __init__(self):
-                MockGDBServerResponder.__init__(self)
-                self.currentQsProc = 0
-                self.all_users = False
-
-            def qfProcessInfo(self, packet):
-                if "all_users:1" in packet:
-                    self.all_users = True
-                    name = hexlify("/a/test_process")
-                    args = "-".join(map(hexlify,
-                                        ["/system/bin/sh", "-c", "/data/local/tmp/lldb-server"]))
-                    return "pid:10;ppid:1;uid:2;gid:3;euid:4;egid:5;name:" + name + ";args:" + args + ";"
-                else:
-                    self.all_users = False
-                    return "E04"
-
-            def qsProcessInfo(self):
-                if self.all_users:
-                    if self.currentQsProc == 0:
-                        self.currentQsProc = 1
-                        name = hexlify("/b/another_test_process")
-                        # This intentionally has a badly encoded argument
-                        args = "X".join(map(hexlify,
-                                            ["/system/bin/ls", "--help"]))
-                        return "pid:11;ppid:2;uid:3;gid:4;euid:5;egid:6;name:" + name + ";args:" + args + ";"
-                    elif self.currentQsProc == 1:
-                        self.currentQsProc = 0
-                        return "E04"
-                else:
-                    return "E04"
-
-        self.server.responder = MyResponder()
-
-        try:
-            self.runCmd("platform select remote-linux")
-            self.runCmd("platform connect connect://localhost:%d" %
-                        self.server.port)
-            self.assertTrue(self.dbg.GetSelectedPlatform().IsConnected())
-            self.expect("platform process list -x",
-                        substrs=["2 matching processes were found", "test_process", "another_test_process"])
-            self.expect("platform process list -xv",
-                        substrs=[
-                            "PID    PARENT USER       GROUP      EFF USER   EFF GROUP  TRIPLE                         ARGUMENTS",
-                            "10     1      2          3          4          5                                         /system/bin/sh -c /data/local/tmp/lldb-server",
-                            "11     2      3          4          5          6"])
-            self.expect("platform process list -xv", substrs=["/system/bin/ls"], matching=False)
-            self.expect("platform process list",
-                        error=True,
-                        substrs=["error: no processes were found on the \"remote-linux\" platform"])
-        finally:
-            self.dbg.GetSelectedPlatform().DisconnectRemote()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestRecognizeBreakpoint.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestRecognizeBreakpoint.py
deleted file mode 100644 (file)
index 44e2cfa..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-from gdbclientutils import *
-
-
-class TestRecognizeBreakpoint(GDBRemoteTestBase):
-    """ This tests the case where the gdb-remote server doesn't support any
-        of the thread-info packets, and just tells which thread got the stop
-        signal with:
-              T05thread:01;
-        There was a bug in lldb that we would set the stop reason from this 
-        packet too early - before we had updated the thread list.  So when we
-        later updated the thread list, we would throw away this info.  Normally
-        we would be able to reconstruct it from the thread info, but not if the
-        stub doesn't support it """
-             
-    @skipIfXmlSupportMissing
-    def test(self):
-        class MyResponder(MockGDBServerResponder):
-            def __init__(self):
-                MockGDBServerResponder.__init__(self)
-                self.thread_info_count = 0
-                self.after_cont = False
-                self.current_thread = 0
-                
-            def cont(self):
-                # Simulate process stopping due to a breakpoint:
-                self.after_cont = True
-                return "T05thread:01;"
-
-            def vCont(self, packet):
-                self.after_cont = True
-                return "T05thread:01;"
-            
-            def haltReason(self):
-                return "T02thread:01;"
-
-            def threadStopInfo(self, num):
-                return ""
-
-            def QThreadSuffixSupported(self):
-                return ""
-
-            def QListThreadsInStopReply(self):
-                return ""
-
-            def setBreakpoint(self, packet):
-                return "OK"
-            
-            def qfThreadInfo(self):
-                return "m1"
-
-            def qsThreadInfo(self):
-                if (self.thread_info_count % 2) == 0:
-                    str = "m2"
-                else:
-                    str = "l"
-                self.thread_info_count += 1
-                return str
-
-            def readRegisters(self):
-                if self.after_cont and self.current_thread == 1:
-                    return "c01e990080ffffff"
-                else:
-                    return "badcfe10325476980"
-            
-            def readRegister(self, regno):
-                return ""
-            
-            def qXferRead(self, obj, annex, offset, length):
-                if annex == "target.xml":
-                    return """<?xml version="1.0"?>
-                        <target version="1.0">
-                          <architecture>i386:x86-64</architecture>
-                          <feature name="org.gnu.gdb.i386.core">
-                            <reg name="rip" bitsize="64" regnum="0" type="code_ptr" group="general"/>
-                          </feature>
-                        </target>""", False
-                else:
-                    return None, False
-
-            def selectThread(self, op, thread):
-                if op != 'g':
-                    return ''
-                
-                self.current_thread = thread
-                return "OK"
-            
-            def other (self, packet):
-                if packet == "vCont?":
-                    return "vCont;c;C;s;S"
-                return ''
-                
-        python_os_plugin_path = os.path.join(self.getSourceDir(),
-                                             'operating_system_2.py')
-        command ="settings set target.process.python-os-plugin-path '{}'".format(
-            python_os_plugin_path)
-        self.runCmd(command)
-
-        self.server.responder = MyResponder()
-        target = self.dbg.CreateTarget("")
-        process = self.connect(target)
-
-        bkpt = target.BreakpointCreateByAddress(0xffffff8000991ec0)
-        self.assertEqual(bkpt.GetNumLocations(), 1, "Fake breakpoint was resolved.")
-
-        # Get the initial stop, and we should have two threads.
-        num_threads = len(process.threads)
-        self.assertEqual(num_threads, 2, "Got two threads")
-
-        thread_0 = process.threads[0]
-        self.assertEqual(thread_0.GetStopReason(), 1, "Thread_0 stopped for no reason")
-        self.assertEqual(thread_0.GetName(), "one", "Thread_0 is called one")
-        
-        thread_1 = process.threads[1]
-        self.assertEqual(thread_1.GetStopReason(), 5, "Thread_0 stopped for SIGSTOP")
-        self.assertEqual(thread_1.GetName(), "two", "Thread_0 is called two")
-        
-        # Now continue and we will fake hitting a breakpoint.
-        process.Continue()
-
-        self.assertEqual(process.GetState(),lldb.eStateStopped, "Process is stopped")
-        num_threads = len(process.threads)
-
-        num_threads = len(process.threads)
-        self.assertEqual(num_threads, 2, "Got two threads")
-
-        thread_0 = process.threads[0]
-        self.assertEqual(thread_0.GetStopReason(), 1, "Thread_0 stopped for no reason")
-        self.assertEqual(thread_0.GetName(), "one", "Thread_0 is called one")
-        
-        thread_1 = process.threads[1]
-        self.assertEqual(thread_1.GetStopReason(), 3, "Thread_0 stopped for SIGTRAP")
-        self.assertEqual(thread_1.GetName(), "three", "Thread_0 is called three")
-
-        self.assertTrue(thread_1.IsValid(), "Thread_1 is valid")
-        self.assertEqual(thread_1.GetStopReason(), lldb.eStopReasonBreakpoint, "Stopped at breakpoint")
-        
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestRegDefinitionInParts.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestRegDefinitionInParts.py
deleted file mode 100644 (file)
index c4ba19c..0000000
+++ /dev/null
@@ -1,160 +0,0 @@
-from __future__ import print_function
-import lldb
-import time
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-from gdbclientutils import *
-
-class TestRegDefinitionInParts(GDBRemoteTestBase):
-
-    @skipIfXmlSupportMissing
-    @skipIfRemote
-    def test(self):
-        """
-        Test that lldb correctly fetches the target definition file
-        in multiple chunks if the remote server only provides the 
-        content in small parts, and the small parts it provides is
-        smaller than the maximum packet size that it declared at
-        the start of the debug session.  qemu does this.
-        """
-        class MyResponder(MockGDBServerResponder):
-
-            def qXferRead(self, obj, annex, offset, length):
-                if annex == "target.xml":
-                    return """<?xml version="1.0"?>
-                              <!DOCTYPE feature SYSTEM "gdb-target.dtd">
-                              <target version="1.0">
-                              <architecture>i386:x86-64</architecture>
-                              <xi:include href="i386-64bit-core.xml"/>
-                              </target>""", False
-
-                if annex == "i386-64bit-core.xml" and offset == 0:
-                    return """<?xml version="1.0"?>
-<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
-
-     Copying and distribution of this file, with or without modification,
-     are permitted in any medium without royalty provided the copyright
-     notice and this notice are preserved.  -->
-
-<!DOCTYPE feature SYSTEM "gdb-target.dtd">
-<feature name="org.gnu.gdb.i386.core">
-  <flags id="i386_eflags" size="4">
-    <field name="CF" start="0" end="0"/>
-    <field name="" start="1" end="1"/>
-    <field name="PF" start="2" end="2"/>
-    <field name="AF" start="4" end="4"/>
-    <field name="ZF" start="6" end="6"/>
-    <field name="SF" start="7" end="7"/>
-    <field name="TF" start="8" end="8"/>
-    <field name="IF" start="9" end="9"/>
-    <field name="DF" start="10" end="10"/>
-    <field name="OF" start="11" end="11"/>
-    <field name="NT" start="14" end="14"/>
-    <field name="RF" start="16" end="16"/>
-    <field name="VM" start="17" end="17"/>
-    <field name="AC" start="18" end="18"/>
-    <field name="VIF" start="19" end="19"/>
-    <field name="VIP" start="20" end="20"/>
-    <field name="ID" start="21" end="21"/>
-  </flags>
-
-  <reg name="rax" bitsize="64" type="int64"/>
-  <reg name="rbx" bitsize="64" type="int64"/>
-  <reg name="rcx" bitsize="64" type="int64"/>
-  <reg name="rdx" bitsize="64" type="int64"/>
-  <reg name="rsi" bitsize="64" type="int64"/>
-  <reg name="rdi" bitsize="64" type="int64"/>
-  <reg name="rbp" bitsize="64" type="data_ptr"/>
-  <reg name="rsp" bitsize="64" type="data_ptr"/>
-  <reg name="r8" bitsize="64" type="int64"/>
-  <reg name="r9" bitsize="64" type="int64"/>
-  <reg name="r10" bitsize="64" type="int64"/>
-  <reg name="r11" bitsize="64" type="int64"/>
-  <reg name="r12" bitsize="64" type="int64"/>
-  <reg name="r13" bitsize="64" type="int64"/>
-  <reg name="r14" bitsize="64" type="int64"/>
-  <reg name="r15" bitsize="64" type="int64"/>
-
-  <reg name="rip" bitsize="64" type="code_ptr"/>
-  <reg name="eflags" bitsize="32" type="i386_eflags"/>
-  <reg name="cs" bitsize="32" type="int32"/>
-  <reg name="ss" bitsize="32" ty""", True
-
-                if annex == "i386-64bit-core.xml" and offset == 2045:
-                    return """pe="int32"/>
-  <reg name="ds" bitsize="32" type="int32"/>
-  <reg name="es" bitsize="32" type="int32"/>
-  <reg name="fs" bitsize="32" type="int32"/>
-  <reg name="gs" bitsize="32" type="int32"/>
-
-  <reg name="st0" bitsize="80" type="i387_ext"/>
-  <reg name="st1" bitsize="80" type="i387_ext"/>
-  <reg name="st2" bitsize="80" type="i387_ext"/>
-  <reg name="st3" bitsize="80" type="i387_ext"/>
-  <reg name="st4" bitsize="80" type="i387_ext"/>
-  <reg name="st5" bitsize="80" type="i387_ext"/>
-  <reg name="st6" bitsize="80" type="i387_ext"/>
-  <reg name="st7" bitsize="80" type="i387_ext"/>
-
-  <reg name="fctrl" bitsize="32" type="int" group="float"/>
-  <reg name="fstat" bitsize="32" type="int" group="float"/>
-  <reg name="ftag" bitsize="32" type="int" group="float"/>
-  <reg name="fiseg" bitsize="32" type="int" group="float"/>
-  <reg name="fioff" bitsize="32" type="int" group="float"/>
-  <reg name="foseg" bitsize="32" type="int" group="float"/>
-  <reg name="fooff" bitsize="32" type="int" group="float"/>
-  <reg name="fop" bitsize="32" type="int" group="float"/>
-</feature>""", False
-
-                return None, False
-
-            def readRegister(self, regnum):
-                return ""
-
-            def readRegisters(self):
-                return "0600000000000000c0b7c00080fffffff021c60080ffffff1a00000000000000020000000000000078b7c00080ffffff203f8ca090ffffff103f8ca090ffffff3025990a80ffffff809698000000000070009f0a80ffffff020000000000000000eae10080ffffff00000000000000001822d74f1a00000078b7c00080ffffff0e12410080ffff004602000011111111222222223333333300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007f0300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000801f0000"
-
-            def haltReason(self):
-                return "T02thread:dead;threads:dead;"
-
-            def qfThreadInfo(self):
-                return "mdead"
-            
-            def qC(self):
-                return ""
-
-            def qSupported(self, client_supported):
-                return "PacketSize=1000;qXfer:features:read+"
-
-            def QThreadSuffixSupported(self):
-                return "OK"
-
-            def QListThreadsInStopReply(self):
-                return "OK"
-
-        self.server.responder = MyResponder()
-        if self.TraceOn():
-            self.runCmd("log enable gdb-remote packets")
-            time.sleep(10)
-            self.addTearDownHook(
-                    lambda: self.runCmd("log disable gdb-remote packets"))
-
-        target = self.dbg.CreateTargetWithFileAndArch(None, None)
-
-        process = self.connect(target)
-
-        if self.TraceOn():
-            interp = self.dbg.GetCommandInterpreter()
-            result = lldb.SBCommandReturnObject()
-            interp.HandleCommand("target list", result)
-            print(result.GetOutput())
-
-        rip_valobj = process.GetThreadAtIndex(0).GetFrameAtIndex(0).FindRegister("rip")
-        self.assertEqual(rip_valobj.GetValueAsUnsigned(), 0x00ffff800041120e)
-
-        ss_valobj = process.GetThreadAtIndex(0).GetFrameAtIndex(0).FindRegister("ss")
-        self.assertEqual(ss_valobj.GetValueAsUnsigned(), 0x22222222)
-
-        if self.TraceOn():
-            print("rip is 0x%x" % rip_valobj.GetValueAsUnsigned())
-            print("ss is 0x%x" % ss_valobj.GetValueAsUnsigned())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestRestartBug.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestRestartBug.py
deleted file mode 100644 (file)
index 142861a..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-from __future__ import print_function
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-from gdbclientutils import *
-
-
-class TestRestartBug(GDBRemoteTestBase):
-
-    @expectedFailureAll(bugnumber="llvm.org/pr24530")
-    def test(self):
-        """
-        Test auto-continue behavior when a process is interrupted to deliver
-        an "asynchronous" packet. This simulates the situation when a process
-        stops on its own just as lldb client is about to interrupt it. The
-        client should not auto-continue in this case, unless the user has
-        explicitly requested that we ignore signals of this type.
-        """
-        class MyResponder(MockGDBServerResponder):
-            continueCount = 0
-
-            def setBreakpoint(self, packet):
-                return "OK"
-
-            def interrupt(self):
-                # Simulate process stopping due to a raise(SIGINT) just as lldb
-                # is about to interrupt it.
-                return "T02reason:signal"
-
-            def cont(self):
-                self.continueCount += 1
-                if self.continueCount == 1:
-                    # No response, wait for the client to interrupt us.
-                    return None
-                return "W00" # Exit
-
-        self.server.responder = MyResponder()
-        target = self.createTarget("a.yaml")
-        process = self.connect(target)
-        self.dbg.SetAsync(True)
-        process.Continue()
-
-        # resume the process and immediately try to set another breakpoint. When using the remote
-        # stub, this will trigger a request to stop the process.  Make sure we
-        # do not lose this signal.
-        bkpt = target.BreakpointCreateByAddress(0x1234)
-        self.assertTrue(bkpt.IsValid())
-        self.assertEqual(bkpt.GetNumLocations(), 1)
-
-        event = lldb.SBEvent()
-        while self.dbg.GetListener().WaitForEvent(2, event):
-            if self.TraceOn():
-                print("Process changing state to:",
-                    self.dbg.StateAsCString(process.GetStateFromEvent(event)))
-            if process.GetStateFromEvent(event) == lldb.eStateExited:
-                break
-
-        # We should get only one continue packet as the client should not
-        # auto-continue after setting the breakpoint.
-        self.assertEqual(self.server.responder.continueCount, 1)
-        # And the process should end up in the stopped state.
-        self.assertEqual(process.GetState(), lldb.eStateStopped)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestStopPCs.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestStopPCs.py
deleted file mode 100644 (file)
index c86d3e7..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-from gdbclientutils import *
-
-
-class TestStopPCs(GDBRemoteTestBase):
-
-    @skipIfXmlSupportMissing
-    def test(self):
-        class MyResponder(MockGDBServerResponder):
-            def haltReason(self):
-                return "T02thread:1ff0d;threads:1ff0d,2ff0d;thread-pcs:10001bc00,10002bc00;"
-
-            def threadStopInfo(self, threadnum):
-                if threadnum == 0x1ff0d:
-                    return "T02thread:1ff0d;threads:1ff0d,2ff0d;thread-pcs:10001bc00,10002bc00;"
-                if threadnum == 0x2ff0d:
-                    return "T00thread:2ff0d;threads:1ff0d,2ff0d;thread-pcs:10001bc00,10002bc00;"
-
-            def qXferRead(self, obj, annex, offset, length):
-                if annex == "target.xml":
-                    return """<?xml version="1.0"?>
-                        <target version="1.0">
-                          <architecture>i386:x86-64</architecture>
-                          <feature name="org.gnu.gdb.i386.core">
-                            <reg name="rip" bitsize="64" regnum="0" type="code_ptr" group="general"/>
-                          </feature>
-                        </target>""", False
-                else:
-                    return None, False
-
-        self.server.responder = MyResponder()
-        target = self.dbg.CreateTarget('')
-        if self.TraceOn():
-          self.runCmd("log enable gdb-remote packets")
-          self.addTearDownHook(
-                lambda: self.runCmd("log disable gdb-remote packets"))
-        process = self.connect(target)
-
-        self.assertEqual(process.GetNumThreads(), 2)
-        th0 = process.GetThreadAtIndex(0)
-        th1 = process.GetThreadAtIndex(1)
-        self.assertEqual(th0.GetThreadID(), 0x1ff0d)
-        self.assertEqual(th1.GetThreadID(), 0x2ff0d)
-        self.assertEqual(th0.GetFrameAtIndex(0).GetPC(), 0x10001bc00)
-        self.assertEqual(th1.GetFrameAtIndex(0).GetPC(), 0x10002bc00)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestTargetXMLArch.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestTargetXMLArch.py
deleted file mode 100644 (file)
index 20e575a..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-from __future__ import print_function
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-from gdbclientutils import *
-
-class MyResponder(MockGDBServerResponder):
-    def qXferRead(self, obj, annex, offset, length):
-        if annex == "target.xml":
-            return """<?xml version="1.0"?>
-                <target version="1.0">
-                  <architecture>i386:x86-64</architecture>
-                  <feature name="org.gnu.gdb.i386.core">
-
-                 <flags id="i386_eflags" size="4">
-                 <field name="CF" start="0" end="0"/>
-                 <field name="" start="1" end="1"/>
-                 <field name="PF" start="2" end="2"/>
-                 <field name="AF" start="4" end="4"/>
-                 <field name="ZF" start="6" end="6"/>
-                 <field name="SF" start="7" end="7"/>
-                 <field name="TF" start="8" end="8"/>
-                 <field name="IF" start="9" end="9"/>
-                 <field name="DF" start="10" end="10"/>
-                 <field name="OF" start="11" end="11"/>
-                 <field name="NT" start="14" end="14"/>
-                 <field name="RF" start="16" end="16"/>
-                 <field name="VM" start="17" end="17"/>
-                 <field name="AC" start="18" end="18"/>
-                 <field name="VIF" start="19" end="19"/>
-                 <field name="VIP" start="20" end="20"/>
-                 <field name="ID" start="21" end="21"/>
-                 </flags>
-
-                    <reg name="rax" bitsize="64" regnum="0" type="int" group="general"/>
-                    <reg name="rbx" bitsize="64" regnum="1" type="int" group="general"/>
-                    <reg name="rcx" bitsize="64" regnum="2" type="int" group="general"/>
-                    <reg name="rdx" bitsize="64" regnum="3" type="int" group="general"/>
-                    <reg name="rsi" bitsize="64" regnum="4" type="int" group="general"/>
-                    <reg name="rdi" bitsize="64" regnum="5" type="int" group="general"/>
-                    <reg name="rbp" bitsize="64" regnum="6" type="data_ptr" group="general"/>
-                    <reg name="rsp" bitsize="64" regnum="7" type="data_ptr" group="general"/>
-                    <reg name="r8" bitsize="64"  regnum="8" type="int" group="general"/>
-                    <reg name="r9" bitsize="64"  regnum="9" type="int" group="general"/>
-                    <reg name="r10" bitsize="64" regnum="10" type="int" group="general"/>
-                    <reg name="r11" bitsize="64" regnum="11" type="int" group="general"/>
-                    <reg name="r12" bitsize="64" regnum="12" type="int" group="general"/>
-                    <reg name="r13" bitsize="64" regnum="13" type="int" group="general"/>
-                    <reg name="r14" bitsize="64" regnum="14" type="int" group="general"/>
-                    <reg name="r15" bitsize="64" regnum="15" type="int" group="general"/>
-                    <reg name="rip" bitsize="64" regnum="16" type="code_ptr" group="general"/>
-                    <reg name="eflags" bitsize="32" regnum="17" type="i386_eflags" group="general"/>
-
-                    <reg name="cs" bitsize="32" regnum="18" type="int" group="general"/>
-                    <reg name="ss" bitsize="32" regnum="19" type="int" group="general"/>
-                    <reg name="ds" bitsize="32" regnum="20" type="int" group="general"/>
-                    <reg name="es" bitsize="32" regnum="21" type="int" group="general"/>
-                    <reg name="fs" bitsize="32" regnum="22" type="int" group="general"/>
-                    <reg name="gs" bitsize="32" regnum="23" type="int" group="general"/>
-
-                    <reg name="st0" bitsize="80" regnum="24" type="i387_ext" group="float"/>
-                    <reg name="st1" bitsize="80" regnum="25" type="i387_ext" group="float"/>
-                    <reg name="st2" bitsize="80" regnum="26" type="i387_ext" group="float"/>
-                    <reg name="st3" bitsize="80" regnum="27" type="i387_ext" group="float"/>
-                    <reg name="st4" bitsize="80" regnum="28" type="i387_ext" group="float"/>
-                    <reg name="st5" bitsize="80" regnum="29" type="i387_ext" group="float"/>
-                    <reg name="st6" bitsize="80" regnum="30" type="i387_ext" group="float"/>
-                    <reg name="st7" bitsize="80" regnum="31" type="i387_ext" group="float"/>
-
-                    <reg name="fctrl" bitsize="32" regnum="32" type="int" group="float"/>
-                    <reg name="fstat" bitsize="32" regnum="33" type="int" group="float"/>
-                    <reg name="ftag"  bitsize="32" regnum="34" type="int" group="float"/>
-                    <reg name="fiseg" bitsize="32" regnum="35" type="int" group="float"/>
-                    <reg name="fioff" bitsize="32" regnum="36" type="int" group="float"/>
-                    <reg name="foseg" bitsize="32" regnum="37" type="int" group="float"/>
-                    <reg name="fooff" bitsize="32" regnum="38" type="int" group="float"/>
-                    <reg name="fop"   bitsize="32" regnum="39" type="int" group="float"/>
-                  </feature>
-                </target>""", False
-        else:
-            return None, False
-
-    def qC(self):
-        return "QC1"
-
-    def haltReason(self):
-        return "T05thread:00000001;06:9038d60f00700000;07:98b4062680ffffff;10:c0d7bf1b80ffffff;"
-
-    def readRegister(self, register):
-        regs = {0x0: "00b0060000610000",
-                0xa: "68fe471c80ffffff",
-                0xc: "60574a1c80ffffff",
-                0xd: "18f3042680ffffff",
-                0xe: "be8a4d7142000000",
-                0xf: "50df471c80ffffff",
-                0x10: "c0d7bf1b80ffffff" }
-        if register in regs:
-            return regs[register]
-        else:
-            return "0000000000000000"
-
-class TestTargetXMLArch(GDBRemoteTestBase):
-
-    @skipIfXmlSupportMissing
-    @expectedFailureAll(archs=["i386"])
-    @skipIfRemote
-    def test(self):
-        """
-        Test lldb's parsing of the <architecture> tag in the target.xml register
-        description packet.
-        """
-        self.server.responder = MyResponder()
-        interp = self.dbg.GetCommandInterpreter()
-        result = lldb.SBCommandReturnObject()
-        if self.TraceOn():
-            self.runCmd("log enable gdb-remote packets")
-            self.addTearDownHook(
-                    lambda: self.runCmd("log disable gdb-remote packets"))
-
-        target = self.dbg.CreateTarget('')
-        self.assertEqual('', target.GetTriple())
-        process = self.connect(target)
-        if self.TraceOn():
-            interp.HandleCommand("target list", result)
-            print(result.GetOutput())
-        self.assertTrue(target.GetTriple().startswith('x86_64-unknown-unknown'))
-
-    @skipIfXmlSupportMissing
-    @skipIfRemote
-    def test_register_augmentation(self):
-        """
-        Test that we correctly associate the register info with the eh_frame
-        register numbers.
-        """
-
-        target = self.createTarget("basic_eh_frame.yaml")
-        self.server.responder = MyResponder()
-
-        process = self.connect(target)
-        lldbutil.expect_state_changes(self, self.dbg.GetListener(), process,
-                [lldb.eStateStopped])
-        self.filecheck("image show-unwind -n foo", __file__,
-            "--check-prefix=UNWIND")
-# UNWIND: eh_frame UnwindPlan:
-# UNWIND: row[0]:    0: CFA=rsp+128 => rip=[CFA-8]
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestThreadSelectionBug.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestThreadSelectionBug.py
deleted file mode 100644 (file)
index 0902202..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-from gdbclientutils import *
-
-
-class TestThreadSelectionBug(GDBRemoteTestBase):
-    def test(self):
-        class MyResponder(MockGDBServerResponder):
-            def cont(self):
-                # Simulate process stopping due to a raise(SIGINT)
-                return "T01reason:signal"
-
-        self.server.responder = MyResponder()
-        target = self.createTarget("a.yaml")
-        process = self.connect(target)
-        python_os_plugin_path = os.path.join(self.getSourceDir(),
-                                             'operating_system.py')
-        command = "settings set target.process.python-os-plugin-path '{}'".format(
-            python_os_plugin_path)
-        self.dbg.HandleCommand(command)
-
-        self.assertTrue(process, PROCESS_IS_VALID)
-        self.assertEqual(process.GetNumThreads(), 3)
-
-        # Verify our OS plug-in threads showed up
-        thread = process.GetThreadByID(0x1)
-        self.assertTrue(
-            thread.IsValid(),
-            "Make sure there is a thread 0x1 after we load the python OS plug-in")
-        thread = process.GetThreadByID(0x2)
-        self.assertTrue(
-            thread.IsValid(),
-            "Make sure there is a thread 0x2 after we load the python OS plug-in")
-        thread = process.GetThreadByID(0x3)
-        self.assertTrue(
-            thread.IsValid(),
-            "Make sure there is a thread 0x3 after we load the python OS plug-in")
-
-        # Verify that a thread other than 3 is selected.
-        thread = process.GetSelectedThread()
-        self.assertNotEqual(thread.GetThreadID(), 0x3)
-
-        # Verify that we select the thread backed by physical thread 1, rather
-        # than virtual thread 1. The mapping comes from the OS plugin, where we
-        # specified that thread 3 is backed by real thread 1.
-        process.Continue()
-        thread = process.GetSelectedThread()
-        self.assertEqual(thread.GetThreadID(), 0x3)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestWriteMemory.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestWriteMemory.py
deleted file mode 100644 (file)
index b7f19a1..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-from gdbclientutils import *
-
-
-class TestWriteMemory(GDBRemoteTestBase):
-
-    def setUp(self):
-        super(TestWriteMemory, self).setUp()
-        self._initial_platform = lldb.DBG.GetSelectedPlatform()
-
-    def tearDown(self):
-        lldb.DBG.SetSelectedPlatform(self._initial_platform)
-        super(TestWriteMemory, self).tearDown()
-
-
-    def test(self):
-
-        class MyResponder(MockGDBServerResponder):
-            def setBreakpoint(self, packet):
-                return "OK"
-
-        self.server.responder = MyResponder()
-        target = self.dbg.CreateTargetWithFileAndTargetTriple('', 'x86_64-pc-linux')
-        process = self.connect(target)
-
-        bp = target.BreakpointCreateByAddress(0x1000)
-        self.assertTrue(bp.IsValid())
-        self.assertEqual(bp.GetNumLocations(), 1)
-        bp.SetEnabled(True)
-        self.assertTrue(bp.IsEnabled())
-
-        err = lldb.SBError()
-        data = str("\x01\x02\x03\x04")
-        result = process.WriteMemory(0x1000, data, err)
-        self.assertEqual(result, 4)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/a.yaml b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/a.yaml
deleted file mode 100644 (file)
index f4e9ff5..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-!ELF
-FileHeader:
-  Class:           ELFCLASS32
-  Data:            ELFDATA2LSB
-  Type:            ET_EXEC
-  Machine:         EM_ARM
-Sections:
-  - Name:            .text
-    Type:            SHT_PROGBITS
-    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
-    Address:         0x1000
-    AddressAlign:    0x4
-    Content:         "c3c3c3c3"
-  - Name:            .data
-    Type:            SHT_PROGBITS
-    Flags:           [ SHF_ALLOC ]
-    Address:         0x2000
-    AddressAlign:    0x4
-    Content:         "3232"
-ProgramHeaders:
-  - Type: PT_LOAD
-    Flags: [ PF_X, PF_R ]
-    VAddr: 0x1000
-    PAddr: 0x1000
-    Align: 0x4
-    Sections:
-      - Section: .text
-  - Type: PT_LOAD
-    Flags: [ PF_R, PF_W ]
-    VAddr: 0x2000
-    PAddr: 0x1004
-    Align: 0x4
-    Sections:
-      - Section: .data
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/basic_eh_frame.yaml b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/basic_eh_frame.yaml
deleted file mode 100644 (file)
index 384b9b9..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
---- !ELF
-FileHeader:
-  Class:           ELFCLASS64
-  Data:            ELFDATA2LSB
-  Type:            ET_EXEC
-  Machine:         EM_X86_64
-  Entry:           0x0000000000401000
-Sections:
-  - Name:            .text
-    Type:            SHT_PROGBITS
-    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
-    Address:         0x0000000000401000
-    AddressAlign:    0x0000000000000001
-    Content:         C3
-  - Name:            .eh_frame
-    Type:            SHT_PROGBITS
-    Flags:           [ SHF_ALLOC ]
-    Address:         0x0000000000402000
-    AddressAlign:    0x0000000000000008
-    Content:         1800000000000000017A5200017810011B0C070890010E80010000001000000020000000DCEFFFFF0100000000000000
-Symbols:
-  - Name:            .text
-    Type:            STT_SECTION
-    Section:         .text
-    Value:           0x0000000000401000
-  - Name:            .eh_frame
-    Type:            STT_SECTION
-    Section:         .eh_frame
-    Value:           0x0000000000402000
-  - Name:            _start
-    Binding:         STB_GLOBAL
-  - Name:            __bss_start
-    Section:         .eh_frame
-    Binding:         STB_GLOBAL
-    Value:           0x0000000000404000
-  - Name:            foo
-    Section:         .text
-    Binding:         STB_GLOBAL
-    Value:           0x0000000000401000
-  - Name:            _edata
-    Section:         .eh_frame
-    Binding:         STB_GLOBAL
-    Value:           0x0000000000404000
-  - Name:            _end
-    Section:         .eh_frame
-    Binding:         STB_GLOBAL
-    Value:           0x0000000000404000
-...
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/gdbclientutils.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/gdbclientutils.py
deleted file mode 100644 (file)
index 392aeba..0000000
+++ /dev/null
@@ -1,534 +0,0 @@
-import os
-import os.path
-import threading
-import socket
-import lldb
-import binascii
-import traceback
-from lldbsuite.support import seven
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbtest_config
-
-
-def checksum(message):
-    """
-    Calculate the GDB server protocol checksum of the message.
-
-    The GDB server protocol uses a simple modulo 256 sum.
-    """
-    check = 0
-    for c in message:
-        check += ord(c)
-    return check % 256
-
-
-def frame_packet(message):
-    """
-    Create a framed packet that's ready to send over the GDB connection
-    channel.
-
-    Framing includes surrounding the message between $ and #, and appending
-    a two character hex checksum.
-    """
-    return "$%s#%02x" % (message, checksum(message))
-
-
-def escape_binary(message):
-    """
-    Escape the binary message using the process described in the GDB server
-    protocol documentation.
-
-    Most bytes are sent through as-is, but $, #, and { are escaped by writing
-    a { followed by the original byte mod 0x20.
-    """
-    out = ""
-    for c in message:
-        d = ord(c)
-        if d in (0x23, 0x24, 0x7d):
-            out += chr(0x7d)
-            out += chr(d ^ 0x20)
-        else:
-            out += c
-    return out
-
-
-def hex_encode_bytes(message):
-    """
-    Encode the binary message by converting each byte into a two-character
-    hex string.
-    """
-    out = ""
-    for c in message:
-        out += "%02x" % ord(c)
-    return out
-
-
-def hex_decode_bytes(hex_bytes):
-    """
-    Decode the hex string into a binary message by converting each two-character
-    hex string into a single output byte.
-    """
-    out = ""
-    hex_len = len(hex_bytes)
-    while i < hex_len - 1:
-        out += chr(int(hex_bytes[i:i + 2]), 16)
-        i += 2
-    return out
-
-
-class MockGDBServerResponder:
-    """
-    A base class for handling client packets and issuing server responses for
-    GDB tests.
-
-    This handles many typical situations, while still allowing subclasses to
-    completely customize their responses.
-
-    Most subclasses will be interested in overriding the other() method, which
-    handles any packet not recognized in the common packet handling code.
-    """
-
-    registerCount = 40
-    packetLog = None
-
-    def __init__(self):
-        self.packetLog = []
-
-    def respond(self, packet):
-        """
-        Return the unframed packet data that the server should issue in response
-        to the given packet received from the client.
-        """
-        self.packetLog.append(packet)
-        if packet is MockGDBServer.PACKET_INTERRUPT:
-            return self.interrupt()
-        if packet == "c":
-            return self.cont()
-        if packet.startswith("vCont;c"):
-            return self.vCont(packet)
-        if packet[0] == "g":
-            return self.readRegisters()
-        if packet[0] == "G":
-            # Gxxxxxxxxxxx
-            # Gxxxxxxxxxxx;thread:1234;
-            return self.writeRegisters(packet[1:].split(';')[0])
-        if packet[0] == "p":
-            regnum = packet[1:].split(';')[0]
-            return self.readRegister(int(regnum, 16))
-        if packet[0] == "P":
-            register, value = packet[1:].split("=")
-            return self.writeRegister(int(register, 16), value)
-        if packet[0] == "m":
-            addr, length = [int(x, 16) for x in packet[1:].split(',')]
-            return self.readMemory(addr, length)
-        if packet[0] == "M":
-            location, encoded_data = packet[1:].split(":")
-            addr, length = [int(x, 16) for x in location.split(',')]
-            return self.writeMemory(addr, encoded_data)
-        if packet[0:7] == "qSymbol":
-            return self.qSymbol(packet[8:])
-        if packet[0:10] == "qSupported":
-            return self.qSupported(packet[11:].split(";"))
-        if packet == "qfThreadInfo":
-            return self.qfThreadInfo()
-        if packet == "qsThreadInfo":
-            return self.qsThreadInfo()
-        if packet == "qC":
-            return self.qC()
-        if packet == "QEnableErrorStrings":
-            return self.QEnableErrorStrings()
-        if packet == "?":
-            return self.haltReason()
-        if packet == "s":
-            return self.haltReason()
-        if packet[0] == "H":
-            return self.selectThread(packet[1], int(packet[2:], 16))
-        if packet[0:6] == "qXfer:":
-            obj, read, annex, location = packet[6:].split(":")
-            offset, length = [int(x, 16) for x in location.split(',')]
-            data, has_more = self.qXferRead(obj, annex, offset, length)
-            if data is not None:
-                return self._qXferResponse(data, has_more)
-            return ""
-        if packet.startswith("vAttach;"):
-            pid = packet.partition(';')[2]
-            return self.vAttach(int(pid, 16))
-        if packet[0] == "Z":
-            return self.setBreakpoint(packet)
-        if packet.startswith("qThreadStopInfo"):
-            threadnum = int (packet[15:], 16)
-            return self.threadStopInfo(threadnum)
-        if packet == "QThreadSuffixSupported":
-            return self.QThreadSuffixSupported()
-        if packet == "QListThreadsInStopReply":
-            return self.QListThreadsInStopReply()
-        if packet.startswith("qMemoryRegionInfo:"):
-            return self.qMemoryRegionInfo()
-        if packet == "qQueryGDBServer":
-            return self.qQueryGDBServer()
-        if packet == "qHostInfo":
-            return self.qHostInfo()
-        if packet == "qGetWorkingDir":
-            return self.qGetWorkingDir()
-        if packet == "qsProcessInfo":
-            return self.qsProcessInfo()
-        if packet.startswith("qfProcessInfo"):
-            return self.qfProcessInfo(packet)
-
-        return self.other(packet)
-
-    def qsProcessInfo(self):
-        return "E04"
-
-    def qfProcessInfo(self, packet):
-        return "E04"
-
-    def qGetWorkingDir(self):
-        return "2f"
-
-    def qHostInfo(self):
-        return "ptrsize:8;endian:little;"
-
-    def qQueryGDBServer(self):
-        return "E04"
-
-    def interrupt(self):
-        raise self.UnexpectedPacketException()
-
-    def cont(self):
-        raise self.UnexpectedPacketException()
-
-    def vCont(self, packet):
-        raise self.UnexpectedPacketException()
-
-    def readRegisters(self):
-        return "00000000" * self.registerCount
-
-    def readRegister(self, register):
-        return "00000000"
-
-    def writeRegisters(self, registers_hex):
-        return "OK"
-
-    def writeRegister(self, register, value_hex):
-        return "OK"
-
-    def readMemory(self, addr, length):
-        return "00" * length
-
-    def writeMemory(self, addr, data_hex):
-        return "OK"
-
-    def qSymbol(self, symbol_args):
-        return "OK"
-
-    def qSupported(self, client_supported):
-        return "qXfer:features:read+;PacketSize=3fff;QStartNoAckMode+"
-
-    def qfThreadInfo(self):
-        return "l"
-
-    def qsThreadInfo(self):
-        return "l"
-
-    def qC(self):
-        return "QC0"
-
-    def QEnableErrorStrings(self):
-        return "OK"
-
-    def haltReason(self):
-        # SIGINT is 2, return type is 2 digit hex string
-        return "S02"
-
-    def qXferRead(self, obj, annex, offset, length):
-        return None, False
-
-    def _qXferResponse(self, data, has_more):
-        return "%s%s" % ("m" if has_more else "l", escape_binary(data))
-
-    def vAttach(self, pid):
-        raise self.UnexpectedPacketException()
-
-    def selectThread(self, op, thread_id):
-        return "OK"
-
-    def setBreakpoint(self, packet):
-        raise self.UnexpectedPacketException()
-
-    def threadStopInfo(self, threadnum):
-        return ""
-
-    def other(self, packet):
-        # empty string means unsupported
-        return ""
-
-    def QThreadSuffixSupported(self):
-        return ""
-
-    def QListThreadsInStopReply(self):
-        return ""
-
-    def qMemoryRegionInfo(self):
-        return ""
-
-    """
-    Raised when we receive a packet for which there is no default action.
-    Override the responder class to implement behavior suitable for the test at
-    hand.
-    """
-    class UnexpectedPacketException(Exception):
-        pass
-
-
-class MockGDBServer:
-    """
-    A simple TCP-based GDB server that can test client behavior by receiving
-    commands and issuing custom-tailored responses.
-
-    Responses are generated via the .responder property, which should be an
-    instance of a class based on MockGDBServerResponder.
-    """
-
-    responder = None
-    port = 0
-    _socket = None
-    _client = None
-    _thread = None
-    _receivedData = None
-    _receivedDataOffset = None
-    _shouldSendAck = True
-
-    def __init__(self, port = 0):
-        self.responder = MockGDBServerResponder()
-        self.port = port
-        self._socket = socket.socket()
-
-    def start(self):
-        # Block until the socket is up, so self.port is available immediately.
-        # Then start a thread that waits for a client connection.
-        addr = ("127.0.0.1", self.port)
-        self._socket.bind(addr)
-        self.port = self._socket.getsockname()[1]
-        self._socket.listen(1)
-        self._thread = threading.Thread(target=self._run)
-        self._thread.start()
-
-    def stop(self):
-        self._socket.close()
-        self._thread.join()
-        self._thread = None
-
-    def _run(self):
-        # For testing purposes, we only need to worry about one client
-        # connecting just one time.
-        try:
-            # accept() is stubborn and won't fail even when the socket is
-            # shutdown, so we'll use a timeout
-            self._socket.settimeout(20.0)
-            client, client_addr = self._socket.accept()
-            self._client = client
-            # The connected client inherits its timeout from self._socket,
-            # but we'll use a blocking socket for the client
-            self._client.settimeout(None)
-        except:
-            return
-        self._shouldSendAck = True
-        self._receivedData = ""
-        self._receivedDataOffset = 0
-        data = None
-        while True:
-            try:
-                data = seven.bitcast_to_string(self._client.recv(4096))
-                if data is None or len(data) == 0:
-                    break
-                self._receive(data)
-            except Exception as e:
-                print("An exception happened when receiving the response from the gdb server. Closing the client...")
-                traceback.print_exc()
-                self._client.close()
-                break
-
-    def _receive(self, data):
-        """
-        Collects data, parses and responds to as many packets as exist.
-        Any leftover data is kept for parsing the next time around.
-        """
-        self._receivedData += data
-        try:
-            packet = self._parsePacket()
-            while packet is not None:
-                self._handlePacket(packet)
-                packet = self._parsePacket()
-        except self.InvalidPacketException:
-            self._client.close()
-
-    def _parsePacket(self):
-        """
-        Reads bytes from self._receivedData, returning:
-        - a packet's contents if a valid packet is found
-        - the PACKET_ACK unique object if we got an ack
-        - None if we only have a partial packet
-
-        Raises an InvalidPacketException if unexpected data is received
-        or if checksums fail.
-
-        Once a complete packet is found at the front of self._receivedData,
-        its data is removed form self._receivedData.
-        """
-        data = self._receivedData
-        i = self._receivedDataOffset
-        data_len = len(data)
-        if data_len == 0:
-            return None
-        if i == 0:
-            # If we're looking at the start of the received data, that means
-            # we're looking for the start of a new packet, denoted by a $.
-            # It's also possible we'll see an ACK here, denoted by a +
-            if data[0] == '+':
-                self._receivedData = data[1:]
-                return self.PACKET_ACK
-            if ord(data[0]) == 3:
-                self._receivedData = data[1:]
-                return self.PACKET_INTERRUPT
-            if data[0] == '$':
-                i += 1
-            else:
-                raise self.InvalidPacketException(
-                        "Unexpected leading byte: %s" % data[0])
-
-        # If we're looking beyond the start of the received data, then we're
-        # looking for the end of the packet content, denoted by a #.
-        # Note that we pick up searching from where we left off last time
-        while i < data_len and data[i] != '#':
-            i += 1
-
-        # If there isn't enough data left for a checksum, just remember where
-        # we left off so we can pick up there the next time around
-        if i > data_len - 3:
-            self._receivedDataOffset = i
-            return None
-
-        # If we have enough data remaining for the checksum, extract it and
-        # compare to the packet contents
-        packet = data[1:i]
-        i += 1
-        try:
-            check = int(data[i:i + 2], 16)
-        except ValueError:
-            raise self.InvalidPacketException("Checksum is not valid hex")
-        i += 2
-        if check != checksum(packet):
-            raise self.InvalidPacketException(
-                    "Checksum %02x does not match content %02x" %
-                    (check, checksum(packet)))
-        # remove parsed bytes from _receivedData and reset offset so parsing
-        # can start on the next packet the next time around
-        self._receivedData = data[i:]
-        self._receivedDataOffset = 0
-        return packet
-
-    def _handlePacket(self, packet):
-        if packet is self.PACKET_ACK:
-            # Ignore ACKs from the client. For the future, we can consider
-            # adding validation code to make sure the client only sends ACKs
-            # when it's supposed to.
-            return
-        response = ""
-        # We'll handle the ack stuff here since it's not something any of the
-        # tests will be concerned about, and it'll get turned off quickly anyway.
-        if self._shouldSendAck:
-            self._client.sendall(seven.bitcast_to_bytes('+'))
-        if packet == "QStartNoAckMode":
-            self._shouldSendAck = False
-            response = "OK"
-        elif self.responder is not None:
-            # Delegate everything else to our responder
-            response = self.responder.respond(packet)
-        # Handle packet framing since we don't want to bother tests with it.
-        if response is not None:
-            framed = frame_packet(response)
-            self._client.sendall(seven.bitcast_to_bytes(framed))
-
-    PACKET_ACK = object()
-    PACKET_INTERRUPT = object()
-
-    class InvalidPacketException(Exception):
-        pass
-
-class GDBRemoteTestBase(TestBase):
-    """
-    Base class for GDB client tests.
-
-    This class will setup and start a mock GDB server for the test to use.
-    It also provides assertPacketLogContains, which simplifies the checking
-    of packets sent by the client.
-    """
-
-    NO_DEBUG_INFO_TESTCASE = True
-    mydir = TestBase.compute_mydir(__file__)
-    server = None
-
-    def setUp(self):
-        TestBase.setUp(self)
-        self.server = MockGDBServer()
-        self.server.start()
-
-    def tearDown(self):
-        # TestBase.tearDown will kill the process, but we need to kill it early
-        # so its client connection closes and we can stop the server before
-        # finally calling the base tearDown.
-        if self.process() is not None:
-            self.process().Kill()
-        self.server.stop()
-        TestBase.tearDown(self)
-
-    def createTarget(self, yaml_path):
-        """
-        Create a target by auto-generating the object based on the given yaml
-        instructions.
-
-        This will track the generated object so it can be automatically removed
-        during tearDown.
-        """
-        yaml_base, ext = os.path.splitext(yaml_path)
-        obj_path = self.getBuildArtifact(yaml_base)
-        self.yaml2obj(yaml_path, obj_path)
-        return self.dbg.CreateTarget(obj_path)
-
-    def connect(self, target):
-        """
-        Create a process by connecting to the mock GDB server.
-
-        Includes assertions that the process was successfully created.
-        """
-        listener = self.dbg.GetListener()
-        error = lldb.SBError()
-        url = "connect://localhost:%d" % self.server.port
-        process = target.ConnectRemote(listener, url, "gdb-remote", error)
-        self.assertTrue(error.Success(), error.description)
-        self.assertTrue(process, PROCESS_IS_VALID)
-        return process
-
-    def assertPacketLogContains(self, packets):
-        """
-        Assert that the mock server's packet log contains the given packets.
-
-        The packet log includes all packets sent by the client and received
-        by the server.  This fuction makes it easy to verify that the client
-        sent the expected packets to the server.
-
-        The check does not require that the packets be consecutive, but does
-        require that they are ordered in the log as they ordered in the arg.
-        """
-        i = 0
-        j = 0
-        log = self.server.responder.packetLog
-
-        while i < len(packets) and j < len(log):
-            if log[j] == packets[i]:
-                i += 1
-            j += 1
-        if i < len(packets):
-            self.fail(u"Did not receive: %s\nLast 10 packets:\n\t%s" %
-                    (packets[i], u'\n\t'.join(log)))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/operating_system.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/operating_system.py
deleted file mode 100644 (file)
index 83180c5..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-import lldb
-
-
-class OperatingSystemPlugIn(object):
-    """Class that provides data for an instance of a LLDB 'OperatingSystemPython' plug-in class"""
-
-    def __init__(self, process):
-        '''Initialization needs a valid.SBProcess object.
-
-        This plug-in will get created after a live process is valid and has stopped for the first time.
-        '''
-        self.process = None
-        self.registers = None
-        self.threads = None
-        if isinstance(process, lldb.SBProcess) and process.IsValid():
-            self.process = process
-            self.threads = None  # Will be an dictionary containing info for each thread
-
-    def get_target(self):
-        return self.process.target
-
-    def get_thread_info(self):
-        if not self.threads:
-            self.threads = [{
-                'tid': 0x1,
-                'name': 'one',
-                'queue': 'queue1',
-                'state': 'stopped',
-                'stop_reason': 'none'
-            }, {
-                'tid': 0x2,
-                'name': 'two',
-                'queue': 'queue2',
-                'state': 'stopped',
-                'stop_reason': 'none'
-            }, {
-                'tid': 0x3,
-                'name': 'three',
-                'queue': 'queue3',
-                'state': 'stopped',
-                'stop_reason': 'sigstop',
-                'core': 0
-            }]
-        return self.threads
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/operating_system_2.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/operating_system_2.py
deleted file mode 100644 (file)
index 91b2ffe..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-import lldb
-
-
-class OperatingSystemPlugIn(object):
-    """Class that provides data for an instance of a LLDB 'OperatingSystemPython' plug-in class
-       This version stops once with threads 0x111 and 0x222, then stops a second time with threads
-       0x111 and 0x333."""
-
-    def __init__(self, process):
-        '''Initialization needs a valid.SBProcess object.
-
-        This plug-in will get created after a live process is valid and has stopped for the first time.
-        '''
-        self.process = None
-        self.registers = None
-        self.threads = None
-        self.times_called = 0
-        if isinstance(process, lldb.SBProcess) and process.IsValid():
-            self.process = process
-            self.threads = None  # Will be an dictionary containing info for each thread
-
-    def get_target(self):
-        return self.process.target
-
-    def get_thread_info(self):
-        self.times_called += 1
-
-        if self.times_called == 1:
-            self.threads = [{
-                'tid': 0x111,
-                'name': 'one',
-                'queue': 'queue1',
-                'state': 'stopped',
-                'stop_reason': 'none',
-                'core': 1
-            }, {
-                'tid': 0x222,
-                'name': 'two',
-                'queue': 'queue2',
-                'state': 'stopped',
-                'stop_reason': 'none',
-                'core': 0
-            }]
-        else:
-            self.threads = [{
-                'tid': 0x111,
-                'name': 'one',
-                'queue': 'queue1',
-                'state': 'stopped',
-                'stop_reason': 'none',
-                'core': 1
-            }, {
-                'tid': 0x333,
-                'name': 'three',
-                'queue': 'queue3',
-                'state': 'stopped',
-                'stop_reason': 'none',
-                'core': 0
-            }]
-        return self.threads
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/history/TestHistoryRecall.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/history/TestHistoryRecall.py
deleted file mode 100644 (file)
index 557b4a4..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-"""
-Make sure the !N and !-N commands work properly.
-"""
-
-
-
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbtest import *
-
-
-class TestHistoryRecall(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # If your test case doesn't stress debug info, the
-    # set this to true.  That way it won't be run once for
-    # each debug info format.
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_history_recall(self):
-        """Test the !N and !-N functionality of the command interpreter."""
-        self.sample_test()
-
-    def sample_test(self):
-        interp = self.dbg.GetCommandInterpreter()
-        result = lldb.SBCommandReturnObject()
-        interp.HandleCommand("command history", result, True)
-        interp.HandleCommand("platform list", result, True)
-
-        interp.HandleCommand("!0", result, False)
-        self.assertTrue(result.Succeeded(), "!0 command did not work: %s"%(result.GetError()))
-        self.assertTrue("command history" in result.GetOutput(), "!0 didn't rerun command history")
-
-        interp.HandleCommand("!-1", result, False)
-        self.assertTrue(result.Succeeded(), "!-1 command did not work: %s"%(result.GetError()))
-        self.assertTrue("host:" in result.GetOutput(), "!-1 didn't rerun platform list.")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-assert/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-assert/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-assert/TestInferiorAssert.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-assert/TestInferiorAssert.py
deleted file mode 100644 (file)
index 36fdc86..0000000
+++ /dev/null
@@ -1,315 +0,0 @@
-"""Test that lldb functions correctly after the inferior has asserted."""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test import lldbutil
-from lldbsuite.test import lldbplatformutil
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-
-
-class AssertingInferiorTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows")
-    @expectedFailureAll(
-        oslist=["linux"],
-        archs=["arm"],
-        bugnumber="llvm.org/pr25338")
-    @expectedFailureAll(bugnumber="llvm.org/pr26592", triple='^mips')
-    @expectedFailureNetBSD
-    def test_inferior_asserting(self):
-        """Test that lldb reliably catches the inferior asserting (command)."""
-        self.build()
-        self.inferior_asserting()
-
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows")
-    @expectedFailureAndroid(
-        api_levels=list(
-            range(
-                16 +
-                1)))  # b.android.com/179836
-    def test_inferior_asserting_register(self):
-        """Test that lldb reliably reads registers from the inferior after asserting (command)."""
-        self.build()
-        self.inferior_asserting_registers()
-
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows")
-    @expectedFailureAll(
-        oslist=["linux"],
-        archs=[
-            "aarch64",
-            "arm"],
-        triple=no_match(".*-android"),
-        bugnumber="llvm.org/pr25338")
-    @expectedFailureAll(bugnumber="llvm.org/pr26592", triple='^mips')
-    @expectedFailureNetBSD
-    def test_inferior_asserting_disassemble(self):
-        """Test that lldb reliably disassembles frames after asserting (command)."""
-        self.build()
-        self.inferior_asserting_disassemble()
-
-    @add_test_categories(['pyapi'])
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows")
-    def test_inferior_asserting_python(self):
-        """Test that lldb reliably catches the inferior asserting (Python API)."""
-        self.build()
-        self.inferior_asserting_python()
-
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows")
-    @expectedFailureAll(
-        oslist=["linux"],
-        archs=["arm"],
-        triple=no_match(".*-android"),
-        bugnumber="llvm.org/pr25338")
-    @expectedFailureAll(bugnumber="llvm.org/pr26592", triple='^mips')
-    @expectedFailureNetBSD
-    def test_inferior_asserting_expr(self):
-        """Test that the lldb expression interpreter can read from the inferior after asserting (command)."""
-        self.build()
-        self.inferior_asserting_expr()
-
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows")
-    @expectedFailureAll(
-        oslist=["linux"],
-        archs=["arm"],
-        triple=no_match(".*-android"),
-        bugnumber="llvm.org/pr25338")
-    @expectedFailureAll(bugnumber="llvm.org/pr26592", triple='^mips')
-    @expectedFailureNetBSD
-    def test_inferior_asserting_step(self):
-        """Test that lldb functions correctly after stepping through a call to assert()."""
-        self.build()
-        self.inferior_asserting_step()
-
-    def set_breakpoint(self, line):
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", line, num_expected_locations=1, loc_exact=True)
-
-    def check_stop_reason(self):
-        matched = lldbplatformutil.match_android_device(
-            self.getArchitecture(), valid_api_levels=list(range(1, 16 + 1)))
-        if matched:
-            # On android until API-16 the abort() call ended in a sigsegv
-            # instead of in a sigabrt
-            stop_reason = 'stop reason = signal SIGSEGV'
-        else:
-            stop_reason = 'stop reason = signal SIGABRT'
-
-        # The stop reason of the thread should be an abort signal or exception.
-        self.expect("thread list", STOPPED_DUE_TO_ASSERT,
-                    substrs=['stopped',
-                             stop_reason])
-
-        return stop_reason
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number of the call to assert.
-        self.line = line_number('main.c', '// Assert here.')
-
-    def inferior_asserting(self):
-        """Inferior asserts upon launching; lldb should catch the event and stop."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-        stop_reason = self.check_stop_reason()
-
-        # And it should report a backtrace that includes the assert site.
-        self.expect("thread backtrace all",
-                    substrs=[stop_reason, 'main', 'argc', 'argv'])
-
-        # And it should report the correct line number.
-        self.expect("thread backtrace all",
-                    substrs=[stop_reason,
-                             'main.c:%d' % self.line])
-
-    def inferior_asserting_python(self):
-        """Inferior asserts upon launching; lldb should catch the event and stop."""
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now launch the process, and do not stop at entry point.
-        # Both argv and envp are null.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        if process.GetState() != lldb.eStateStopped:
-            self.fail("Process should be in the 'stopped' state, "
-                      "instead the actual state is: '%s'" %
-                      lldbutil.state_type_to_str(process.GetState()))
-
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonSignal)
-        if not thread:
-            self.fail("Fail to stop the thread upon assert")
-
-        if self.TraceOn():
-            lldbutil.print_stacktrace(thread)
-
-    def inferior_asserting_registers(self):
-        """Test that lldb can read registers after asserting."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.check_stop_reason()
-
-        # lldb should be able to read from registers from the inferior after
-        # asserting.
-        lldbplatformutil.check_first_register_readable(self)
-
-    def inferior_asserting_disassemble(self):
-        """Test that lldb can disassemble frames after asserting."""
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Launch the process, and do not stop at the entry point.
-        target.LaunchSimple(None, None, self.get_process_working_directory())
-        self.check_stop_reason()
-
-        process = target.GetProcess()
-        self.assertTrue(process.IsValid(), "current process is valid")
-
-        thread = process.GetThreadAtIndex(0)
-        self.assertTrue(thread.IsValid(), "current thread is valid")
-
-        lastframeID = thread.GetFrameAtIndex(
-            thread.GetNumFrames() - 1).GetFrameID()
-
-        isi386Arch = False
-        if "i386" in self.getArchitecture():
-            isi386Arch = True
-
-        # lldb should be able to disassemble frames from the inferior after
-        # asserting.
-        for frame in thread:
-            self.assertTrue(frame.IsValid(), "current frame is valid")
-
-            self.runCmd("frame select " +
-                        str(frame.GetFrameID()), RUN_SUCCEEDED)
-
-            # Don't expect the function name to be in the disassembly as the assert
-            # function might be a no-return function where the PC is past the end
-            # of the function and in the next function. We also can't back the PC up
-            # because we don't know how much to back it up by on targets with opcodes
-            # that have differing sizes
-            pc_backup_offset = 1
-            if frame.GetFrameID() == 0:
-                pc_backup_offset = 0
-            if isi386Arch:
-                if lastframeID == frame.GetFrameID():
-                    pc_backup_offset = 0
-            self.expect(
-                "disassemble -a %s" %
-                (frame.GetPC() -
-                 pc_backup_offset),
-                substrs=['<+0>: '])
-
-    def check_expr_in_main(self, thread):
-        depth = thread.GetNumFrames()
-        for i in range(depth):
-            frame = thread.GetFrameAtIndex(i)
-            self.assertTrue(frame.IsValid(), "current frame is valid")
-            if self.TraceOn():
-                print(
-                    "Checking if function %s is main" %
-                    frame.GetFunctionName())
-
-            if 'main' == frame.GetFunctionName():
-                frame_id = frame.GetFrameID()
-                self.runCmd("frame select " + str(frame_id), RUN_SUCCEEDED)
-                self.expect("p argc", substrs=['(int)', ' = 1'])
-                self.expect("p hello_world", substrs=['Hello'])
-                self.expect("p argv[0]", substrs=['a.out'])
-                self.expect("p null_ptr", substrs=['= 0x0'])
-                return True
-        return False
-
-    def inferior_asserting_expr(self):
-        """Test that the lldb expression interpreter can read symbols after asserting."""
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Launch the process, and do not stop at the entry point.
-        target.LaunchSimple(None, None, self.get_process_working_directory())
-        self.check_stop_reason()
-
-        process = target.GetProcess()
-        self.assertTrue(process.IsValid(), "current process is valid")
-
-        thread = process.GetThreadAtIndex(0)
-        self.assertTrue(thread.IsValid(), "current thread is valid")
-
-        # The lldb expression interpreter should be able to read from addresses
-        # of the inferior after a call to assert().
-        self.assertTrue(
-            self.check_expr_in_main(thread),
-            "cannot find 'main' in the backtrace")
-
-    def inferior_asserting_step(self):
-        """Test that lldb functions correctly after stepping through a call to assert()."""
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Launch the process, and do not stop at the entry point.
-        self.set_breakpoint(self.line)
-        target.LaunchSimple(None, None, self.get_process_working_directory())
-
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['main.c:%d' % self.line,
-                             'stop reason = breakpoint'])
-
-        self.runCmd("next")
-        stop_reason = self.check_stop_reason()
-
-        # lldb should be able to read from registers from the inferior after
-        # asserting.
-        if "x86_64" in self.getArchitecture():
-            self.expect("register read rbp", substrs=['rbp = 0x'])
-        if "i386" in self.getArchitecture():
-            self.expect("register read ebp", substrs=['ebp = 0x'])
-
-        process = target.GetProcess()
-        self.assertTrue(process.IsValid(), "current process is valid")
-
-        thread = process.GetThreadAtIndex(0)
-        self.assertTrue(thread.IsValid(), "current thread is valid")
-
-        # The lldb expression interpreter should be able to read from addresses
-        # of the inferior after a call to assert().
-        self.assertTrue(
-            self.check_expr_in_main(thread),
-            "cannot find 'main' in the backtrace")
-
-        # And it should report the correct line number.
-        self.expect("thread backtrace all",
-                    substrs=[stop_reason,
-                             'main.c:%d' % self.line])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-assert/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-assert/main.c
deleted file mode 100644 (file)
index ad2ca56..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-#include <assert.h>
-
-const char *hello_world = "Hello, assertion!";
-
-int main(int argc, const char* argv[])
-{
-    int *null_ptr = 0;
-    printf("%s\n", hello_world);
-    assert(null_ptr); // Assert here.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-changed/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-changed/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-changed/TestInferiorChanged.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-changed/TestInferiorChanged.py
deleted file mode 100644 (file)
index 95cdfb5..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-"""Test lldb reloads the inferior after it was changed during the session."""
-
-
-
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import configuration
-from lldbsuite.test import lldbutil
-
-
-class ChangedInferiorTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIf(hostoslist=["windows"])
-    @no_debug_info_test
-    def test_inferior_crashing(self):
-        """Test lldb reloads the inferior after it was changed during the session."""
-        self.build()
-        self.inferior_crashing()
-        self.cleanup()
-        # lldb needs to recognize the inferior has changed. If lldb needs to check the
-        # new module timestamp, make sure it is not the same as the old one, so add a
-        # 1 second delay.
-        time.sleep(1)
-        d = {'C_SOURCES': 'main2.c'}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.inferior_not_crashing()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number of the crash.
-        self.line1 = line_number('main.c', '// Crash here.')
-        self.line2 = line_number('main2.c', '// Not crash here.')
-
-    def inferior_crashing(self):
-        """Inferior crashes upon launching; lldb should catch the event and stop."""
-        self.exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + self.exe, CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # We should have one crashing thread
-        self.assertEqual(
-            len(lldbutil.get_crashed_threads(self, self.dbg.GetSelectedTarget().GetProcess())),
-            1,
-            STOPPED_DUE_TO_EXC_BAD_ACCESS)
-
-        # And it should report the correct line number.
-        self.expect("thread backtrace all", substrs=['main.c:%d' % self.line1])
-
-    def inferior_not_crashing(self):
-        """Test lldb reloads the inferior after it was changed during the session."""
-        self.runCmd("process kill")
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.runCmd("process status")
-
-        self.assertNotEqual(
-            len(lldbutil.get_crashed_threads(self, self.dbg.GetSelectedTarget().GetProcess())),
-            1,
-            "Inferior changed, but lldb did not perform a reload")
-
-        # Break inside the main.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main2.c", self.line2, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        self.runCmd("frame variable int_ptr")
-        self.expect("frame variable *int_ptr",
-                    substrs=['= 7'])
-        self.expect("expression *int_ptr",
-                    substrs=['= 7'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-changed/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-changed/main.c
deleted file mode 100644 (file)
index ec4824a..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-int main(int argc, const char* argv[])
-{
-    int *null_ptr = 0;
-    printf("Hello, segfault!\n");
-    printf("Now crash %d\n", *null_ptr); // Crash here.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-changed/main2.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-changed/main2.c
deleted file mode 100644 (file)
index a3c68f0..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-//===-- main2.c -------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-#include <stdlib.h>
-
-int main(int argc, const char* argv[])
-{
-    int *int_ptr = (int *)malloc(sizeof(int));
-    *int_ptr = 7;
-    printf("Hello, world!\n");
-    printf("Now not crash %d\n", *int_ptr); // Not crash here.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashing.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashing.py
deleted file mode 100644 (file)
index ee17ecc..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-"""Test that lldb functions correctly after the inferior has crashed."""
-
-
-
-import lldb
-from lldbsuite.test import lldbutil
-from lldbsuite.test import lldbplatformutil
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-
-
-class CrashingInferiorTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
-    @expectedFailureNetBSD
-    def test_inferior_crashing(self):
-        """Test that lldb reliably catches the inferior crashing (command)."""
-        self.build()
-        self.inferior_crashing()
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
-    def test_inferior_crashing_register(self):
-        """Test that lldb reliably reads registers from the inferior after crashing (command)."""
-        self.build()
-        self.inferior_crashing_registers()
-
-    @add_test_categories(['pyapi'])
-    def test_inferior_crashing_python(self):
-        """Test that lldb reliably catches the inferior crashing (Python API)."""
-        self.build()
-        self.inferior_crashing_python()
-
-    def test_inferior_crashing_expr(self):
-        """Test that the lldb expression interpreter can read from the inferior after crashing (command)."""
-        self.build()
-        self.inferior_crashing_expr()
-
-    def set_breakpoint(self, line):
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", line, num_expected_locations=1, loc_exact=True)
-
-    def check_stop_reason(self):
-        # We should have one crashing thread
-        self.assertEqual(
-            len(lldbutil.get_crashed_threads(self, self.dbg.GetSelectedTarget().GetProcess())),
-            1,
-            STOPPED_DUE_TO_EXC_BAD_ACCESS)
-
-    def get_api_stop_reason(self):
-        return lldb.eStopReasonException
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number of the crash.
-        self.line = line_number('main.c', '// Crash here.')
-
-    def inferior_crashing(self):
-        """Inferior crashes upon launching; lldb should catch the event and stop."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-        # The exact stop reason depends on the platform
-        if self.platformIsDarwin():
-            stop_reason = 'stop reason = EXC_BAD_ACCESS'
-        elif self.getPlatform() == "linux" or self.getPlatform() == "freebsd":
-            stop_reason = 'stop reason = signal SIGSEGV'
-        else:
-            stop_reason = 'stop reason = invalid address'
-        self.expect("thread list", STOPPED_DUE_TO_EXC_BAD_ACCESS,
-                    substrs=['stopped',
-                             stop_reason])
-
-        # And it should report the correct line number.
-        self.expect("thread backtrace all",
-                    substrs=[stop_reason,
-                             'main.c:%d' % self.line])
-
-    def inferior_crashing_python(self):
-        """Inferior crashes upon launching; lldb should catch the event and stop."""
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now launch the process, and do not stop at entry point.
-        # Both argv and envp are null.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        if process.GetState() != lldb.eStateStopped:
-            self.fail("Process should be in the 'stopped' state, "
-                      "instead the actual state is: '%s'" %
-                      lldbutil.state_type_to_str(process.GetState()))
-
-        threads = lldbutil.get_crashed_threads(self, process)
-        self.assertEqual(
-            len(threads),
-            1,
-            "Failed to stop the thread upon bad access exception")
-
-        if self.TraceOn():
-            lldbutil.print_stacktrace(threads[0])
-
-    def inferior_crashing_registers(self):
-        """Test that lldb can read registers after crashing."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.check_stop_reason()
-
-        # lldb should be able to read from registers from the inferior after
-        # crashing.
-        lldbplatformutil.check_first_register_readable(self)
-
-    def inferior_crashing_expr(self):
-        """Test that the lldb expression interpreter can read symbols after crashing."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.check_stop_reason()
-
-        # The lldb expression interpreter should be able to read from addresses
-        # of the inferior after a crash.
-        self.expect("p argc",
-                    startstr='(int) $0 = 1')
-
-        self.expect("p hello_world",
-                    substrs=['Hello'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashingStep.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashingStep.py
deleted file mode 100644 (file)
index afb8c23..0000000
+++ /dev/null
@@ -1,228 +0,0 @@
-"""Test that lldb steps correctly after the inferior has crashed."""
-
-
-import lldb
-from lldbsuite.test import lldbutil
-from lldbsuite.test import lldbplatformutil
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-
-
-class CrashingInferiorStepTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
-    @expectedFailureNetBSD
-    def test_inferior_crashing(self):
-        """Test that lldb reliably catches the inferior crashing (command)."""
-        self.build()
-        self.inferior_crashing()
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
-    def test_inferior_crashing_register(self):
-        """Test that lldb reliably reads registers from the inferior after crashing (command)."""
-        self.build()
-        self.inferior_crashing_registers()
-
-    @add_test_categories(['pyapi'])
-    def test_inferior_crashing_python(self):
-        """Test that lldb reliably catches the inferior crashing (Python API)."""
-        self.build()
-        self.inferior_crashing_python()
-
-    def test_inferior_crashing_expr(self):
-        """Test that the lldb expression interpreter can read from the inferior after crashing (command)."""
-        self.build()
-        self.inferior_crashing_expr()
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
-    def test_inferior_crashing_step(self):
-        """Test that stepping after a crash behaves correctly."""
-        self.build()
-        self.inferior_crashing_step()
-
-    @skipIfTargetAndroid()  # debuggerd interferes with this test on Android
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
-    def test_inferior_crashing_step_after_break(self):
-        """Test that lldb functions correctly after stepping through a crash."""
-        self.build()
-        self.inferior_crashing_step_after_break()
-
-    # Inferior exits after stepping after a segfault. This is working as
-    # intended IMHO.
-    @skipIfLinux
-    @skipIfFreeBSD
-    @expectedFailureNetBSD
-    def test_inferior_crashing_expr_step_and_expr(self):
-        """Test that lldb expressions work before and after stepping after a crash."""
-        self.build()
-        self.inferior_crashing_expr_step_expr()
-
-    def set_breakpoint(self, line):
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", line, num_expected_locations=1, loc_exact=True)
-
-    def check_stop_reason(self):
-        # We should have one crashing thread
-        self.assertEqual(
-            len(
-                lldbutil.get_crashed_threads(
-                    self,
-                    self.dbg.GetSelectedTarget().GetProcess())), 1,
-            STOPPED_DUE_TO_EXC_BAD_ACCESS)
-
-    def get_api_stop_reason(self):
-        return lldb.eStopReasonException
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number of the crash.
-        self.line = line_number('main.c', '// Crash here.')
-
-    def inferior_crashing(self):
-        """Inferior crashes upon launching; lldb should catch the event and stop."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-        # The exact stop reason depends on the platform
-        if self.platformIsDarwin():
-            stop_reason = 'stop reason = EXC_BAD_ACCESS'
-        elif self.getPlatform() == "linux" or self.getPlatform() == "freebsd":
-            stop_reason = 'stop reason = signal SIGSEGV'
-        else:
-            stop_reason = 'stop reason = invalid address'
-        self.expect(
-            "thread list",
-            STOPPED_DUE_TO_EXC_BAD_ACCESS,
-            substrs=['stopped', stop_reason])
-
-        # And it should report the correct line number.
-        self.expect(
-            "thread backtrace all",
-            substrs=[stop_reason, 'main.c:%d' % self.line])
-
-    def inferior_crashing_python(self):
-        """Inferior crashes upon launching; lldb should catch the event and stop."""
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now launch the process, and do not stop at entry point.
-        # Both argv and envp are null.
-        process = target.LaunchSimple(None, None,
-                                      self.get_process_working_directory())
-
-        if process.GetState() != lldb.eStateStopped:
-            self.fail("Process should be in the 'stopped' state, "
-                      "instead the actual state is: '%s'" %
-                      lldbutil.state_type_to_str(process.GetState()))
-
-        threads = lldbutil.get_crashed_threads(self, process)
-        self.assertEqual(
-            len(threads), 1,
-            "Failed to stop the thread upon bad access exception")
-
-        if self.TraceOn():
-            lldbutil.print_stacktrace(threads[0])
-
-    def inferior_crashing_registers(self):
-        """Test that lldb can read registers after crashing."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.check_stop_reason()
-
-        # lldb should be able to read from registers from the inferior after
-        # crashing.
-        lldbplatformutil.check_first_register_readable(self)
-
-    def inferior_crashing_expr(self):
-        """Test that the lldb expression interpreter can read symbols after crashing."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.check_stop_reason()
-
-        # The lldb expression interpreter should be able to read from addresses
-        # of the inferior after a crash.
-        self.expect("p argc", startstr='(int) $0 = 1')
-
-        self.expect("p hello_world", substrs=['Hello'])
-
-    def inferior_crashing_step(self):
-        """Test that lldb functions correctly after stepping through a crash."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        self.set_breakpoint(self.line)
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.expect(
-            "thread list",
-            STOPPED_DUE_TO_BREAKPOINT,
-            substrs=['main.c:%d' % self.line, 'stop reason = breakpoint'])
-
-        self.runCmd("next")
-        self.check_stop_reason()
-
-        # The lldb expression interpreter should be able to read from addresses
-        # of the inferior after a crash.
-        self.expect("p argv[0]", substrs=['a.out'])
-        self.expect("p null_ptr", substrs=['= 0x0'])
-
-        # lldb should be able to read from registers from the inferior after
-        # crashing.
-        lldbplatformutil.check_first_register_readable(self)
-
-        # And it should report the correct line number.
-        self.expect("thread backtrace all", substrs=['main.c:%d' % self.line])
-
-    @expectedFailureNetBSD
-    def inferior_crashing_step_after_break(self):
-        """Test that lldb behaves correctly when stepping after a crash."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.check_stop_reason()
-
-        expected_state = 'exited'  # Provide the exit code.
-        if self.platformIsDarwin():
-            # TODO: Determine why 'next' and 'continue' have no effect after a
-            # crash.
-            expected_state = 'stopped'
-
-        self.expect("next", substrs=['Process', expected_state])
-
-        if expected_state == 'exited':
-            self.expect(
-                "thread list",
-                error=True,
-                substrs=['Process must be launched'])
-        else:
-            self.check_stop_reason()
-
-    def inferior_crashing_expr_step_expr(self):
-        """Test that lldb expressions work before and after stepping after a crash."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.check_stop_reason()
-
-        # The lldb expression interpreter should be able to read from addresses
-        # of the inferior after a crash.
-        self.expect("p argv[0]", substrs=['a.out'])
-
-        self.runCmd("next")
-        self.check_stop_reason()
-
-        # The lldb expression interpreter should be able to read from addresses
-        # of the inferior after a crash.
-        self.expect("p argv[0]", substrs=['a.out'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/main.c
deleted file mode 100644 (file)
index 3423ea4..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-const char *hello_world = "Hello, segfault!";
-
-int main(int argc, const char* argv[])
-{
-    int *null_ptr = 0;
-    printf("%s\n", hello_world);
-    printf("Now crash %d\n", *null_ptr); // Crash here.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/Makefile
deleted file mode 100644 (file)
index eb07d2f..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-C_SOURCES := main.c
-
-CFLAGS_EXTRAS := -fomit-frame-pointer
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
deleted file mode 100644 (file)
index 3044e5e..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-"""Test that lldb functions correctly after the inferior has crashed while in a recursive routine."""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbplatformutil
-from lldbsuite.test import lldbutil
-
-
-class CrashingRecursiveInferiorTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
-    @expectedFailureNetBSD
-    def test_recursive_inferior_crashing(self):
-        """Test that lldb reliably catches the inferior crashing (command)."""
-        self.build()
-        self.recursive_inferior_crashing()
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
-    def test_recursive_inferior_crashing_register(self):
-        """Test that lldb reliably reads registers from the inferior after crashing (command)."""
-        self.build()
-        self.recursive_inferior_crashing_registers()
-
-    @add_test_categories(['pyapi'])
-    def test_recursive_inferior_crashing_python(self):
-        """Test that lldb reliably catches the inferior crashing (Python API)."""
-        self.build()
-        self.recursive_inferior_crashing_python()
-
-    def test_recursive_inferior_crashing_expr(self):
-        """Test that the lldb expression interpreter can read from the inferior after crashing (command)."""
-        self.build()
-        self.recursive_inferior_crashing_expr()
-
-    def set_breakpoint(self, line):
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", line, num_expected_locations=1, loc_exact=True)
-
-    def check_stop_reason(self):
-        # We should have one crashing thread
-        self.assertEqual(
-            len(lldbutil.get_crashed_threads(self, self.dbg.GetSelectedTarget().GetProcess())),
-            1,
-            STOPPED_DUE_TO_EXC_BAD_ACCESS)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number of the crash.
-        self.line = line_number('main.c', '// Crash here.')
-
-    def recursive_inferior_crashing(self):
-        """Inferior crashes upon launching; lldb should catch the event and stop."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The exact stop reason depends on the platform
-        if self.platformIsDarwin():
-            stop_reason = 'stop reason = EXC_BAD_ACCESS'
-        elif self.getPlatform() == "linux" or self.getPlatform() == "freebsd":
-            stop_reason = 'stop reason = signal SIGSEGV'
-        else:
-            stop_reason = 'stop reason = invalid address'
-        self.expect("thread list", STOPPED_DUE_TO_EXC_BAD_ACCESS,
-                    substrs=['stopped',
-                             stop_reason])
-
-        # And it should report a backtrace that includes main and the crash
-        # site.
-        self.expect(
-            "thread backtrace all",
-            substrs=[
-                stop_reason,
-                'main',
-                'argc',
-                'argv',
-                'recursive_function'])
-
-        # And it should report the correct line number.
-        self.expect("thread backtrace all",
-                    substrs=[stop_reason,
-                             'main.c:%d' % self.line])
-
-    def recursive_inferior_crashing_python(self):
-        """Inferior crashes upon launching; lldb should catch the event and stop."""
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now launch the process, and do not stop at entry point.
-        # Both argv and envp are null.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        if process.GetState() != lldb.eStateStopped:
-            self.fail("Process should be in the 'stopped' state, "
-                      "instead the actual state is: '%s'" %
-                      lldbutil.state_type_to_str(process.GetState()))
-
-        threads = lldbutil.get_crashed_threads(self, process)
-        self.assertEqual(
-            len(threads),
-            1,
-            "Failed to stop the thread upon bad access exception")
-
-        if self.TraceOn():
-            lldbutil.print_stacktrace(threads[0])
-
-    def recursive_inferior_crashing_registers(self):
-        """Test that lldb can read registers after crashing."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.check_stop_reason()
-
-        # lldb should be able to read from registers from the inferior after
-        # crashing.
-        lldbplatformutil.check_first_register_readable(self)
-
-    def recursive_inferior_crashing_expr(self):
-        """Test that the lldb expression interpreter can read symbols after crashing."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.check_stop_reason()
-
-        # The lldb expression interpreter should be able to read from addresses
-        # of the inferior after a crash.
-        self.expect("p i",
-                    startstr='(int) $0 =')
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferiorStep.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferiorStep.py
deleted file mode 100644 (file)
index e63172f..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-"""Test that lldb steps correctly after the inferior has crashed while in a recursive routine."""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbplatformutil
-from lldbsuite.test import lldbutil
-
-
-class CrashingRecursiveInferiorStepTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
-    def test_recursive_inferior_crashing_step(self):
-        """Test that stepping after a crash behaves correctly."""
-        self.build()
-        self.recursive_inferior_crashing_step()
-
-    @skipIfTargetAndroid()  # debuggerd interferes with this test on Android
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
-    def test_recursive_inferior_crashing_step_after_break(self):
-        """Test that lldb functions correctly after stepping through a crash."""
-        self.build()
-        self.recursive_inferior_crashing_step_after_break()
-
-    # Inferior exits after stepping after a segfault. This is working as
-    # intended IMHO.
-    @skipIfLinux
-    @skipIfFreeBSD
-    @expectedFailureNetBSD
-    def test_recursive_inferior_crashing_expr_step_and_expr(self):
-        """Test that lldb expressions work before and after stepping after a crash."""
-        self.build()
-        self.recursive_inferior_crashing_expr_step_expr()
-
-    def set_breakpoint(self, line):
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", line, num_expected_locations=1, loc_exact=True)
-
-    def check_stop_reason(self):
-        # We should have one crashing thread
-        self.assertEqual(
-            len(
-                lldbutil.get_crashed_threads(
-                    self,
-                    self.dbg.GetSelectedTarget().GetProcess())), 1,
-            STOPPED_DUE_TO_EXC_BAD_ACCESS)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number of the crash.
-        self.line = line_number('main.c', '// Crash here.')
-
-    def recursive_inferior_crashing_step(self):
-        """Test that lldb functions correctly after stepping through a crash."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        self.set_breakpoint(self.line)
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.expect(
-            "thread list",
-            STOPPED_DUE_TO_BREAKPOINT,
-            substrs=['main.c:%d' % self.line, 'stop reason = breakpoint'])
-
-        self.runCmd("next")
-        self.check_stop_reason()
-
-        # The lldb expression interpreter should be able to read from addresses
-        # of the inferior after a crash.
-        self.expect("p i", substrs=['(int) $0 ='])
-
-        # lldb should be able to read from registers from the inferior after
-        # crashing.
-        lldbplatformutil.check_first_register_readable(self)
-
-        # And it should report the correct line number.
-        self.expect("thread backtrace all", substrs=['main.c:%d' % self.line])
-
-    def recursive_inferior_crashing_step_after_break(self):
-        """Test that lldb behaves correctly when stepping after a crash."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.check_stop_reason()
-
-        expected_state = 'exited'  # Provide the exit code.
-        if self.platformIsDarwin():
-            # TODO: Determine why 'next' and 'continue' have no effect after a
-            # crash.
-            expected_state = 'stopped'
-
-        self.expect("next", substrs=['Process', expected_state])
-
-        if expected_state == 'exited':
-            self.expect(
-                "thread list",
-                error=True,
-                substrs=['Process must be launched'])
-        else:
-            self.check_stop_reason()
-
-    def recursive_inferior_crashing_expr_step_expr(self):
-        """Test that lldb expressions work before and after stepping after a crash."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.check_stop_reason()
-
-        # The lldb expression interpreter should be able to read from addresses
-        # of the inferior after a crash.
-        self.expect("p null", startstr='(char *) $0 = 0x0')
-
-        self.runCmd("next")
-
-        # The lldb expression interpreter should be able to read from addresses
-        # of the inferior after a step.
-        self.expect("p null", startstr='(char *) $1 = 0x0')
-
-        self.check_stop_reason()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/main.c
deleted file mode 100644 (file)
index 25e6e8d..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-void recursive_function(int i)
-{
-    if (i < 10)
-    {
-        recursive_function(i + 1);
-    }
-    else
-    {
-        char *null=0;
-        *null = 0; // Crash here.
-    }
-}
-
-int main(int argc, char *argv[])
-{
-    recursive_function(0);
-    return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inline-stepping/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inline-stepping/Makefile
deleted file mode 100644 (file)
index 362b89d..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-CXX_SOURCES := calling.cpp
-
-ifneq (,$(findstring icc,$(CC)))
-    CXXFLAGS_EXTRAS := -debug inline-debug-info
-endif
-
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inline-stepping/TestInlineStepping.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inline-stepping/TestInlineStepping.py
deleted file mode 100644 (file)
index 40e29e6..0000000
+++ /dev/null
@@ -1,330 +0,0 @@
-"""Test stepping over and into inlined functions."""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestInlineStepping(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(['pyapi'])
-    @expectedFailureAll(
-        compiler="icc",
-        bugnumber="# Not really a bug.  ICC combines two inlined functions.")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr32343")
-    @expectedFailureAll(archs=["aarch64"], oslist=["linux"],
-                        bugnumber="llvm.org/pr44057")
-    def test_with_python_api(self):
-        """Test stepping over and into inlined functions."""
-        self.build()
-        self.inline_stepping()
-
-    @add_test_categories(['pyapi'])
-    def test_step_over_with_python_api(self):
-        """Test stepping over and into inlined functions."""
-        self.build()
-        self.inline_stepping_step_over()
-
-    @add_test_categories(['pyapi'])
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr32343")
-    def test_step_in_template_with_python_api(self):
-        """Test stepping in to templated functions."""
-        self.build()
-        self.step_in_template()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers that we will step to in main:
-        self.main_source = "calling.cpp"
-        self.source_lines = {}
-        functions = [
-            'caller_ref_1',
-            'caller_ref_2',
-            'inline_ref_1',
-            'inline_ref_2',
-            'called_by_inline_ref',
-            'caller_trivial_1',
-            'caller_trivial_2',
-            'inline_trivial_1',
-            'inline_trivial_2',
-            'called_by_inline_trivial']
-        for name in functions:
-            self.source_lines[name] = line_number(
-                self.main_source, "// In " + name + ".")
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-
-    def do_step(self, step_type, destination_line_entry, test_stack_depth):
-        expected_stack_depth = self.thread.GetNumFrames()
-        if step_type == "into":
-            expected_stack_depth += 1
-            self.thread.StepInto()
-        elif step_type == "out":
-            expected_stack_depth -= 1
-            self.thread.StepOut()
-        elif step_type == "over":
-            self.thread.StepOver()
-        else:
-            self.fail("Unrecognized step type: " + step_type)
-
-        threads = lldbutil.get_stopped_threads(
-            self.process, lldb.eStopReasonPlanComplete)
-        if len(threads) != 1:
-            destination_description = lldb.SBStream()
-            destination_line_entry.GetDescription(destination_description)
-            self.fail(
-                "Failed to stop due to step " +
-                step_type +
-                " operation stepping to: " +
-                destination_description.GetData())
-
-        self.thread = threads[0]
-
-        stop_line_entry = self.thread.GetFrameAtIndex(0).GetLineEntry()
-        self.assertTrue(
-            stop_line_entry.IsValid(),
-            "Stop line entry was not valid.")
-
-        # Don't use the line entry equal operator because we don't care about
-        # the column number.
-        stop_at_right_place = (stop_line_entry.GetFileSpec() == destination_line_entry.GetFileSpec(
-        ) and stop_line_entry.GetLine() == destination_line_entry.GetLine())
-        if not stop_at_right_place:
-            destination_description = lldb.SBStream()
-            destination_line_entry.GetDescription(destination_description)
-
-            actual_description = lldb.SBStream()
-            stop_line_entry.GetDescription(actual_description)
-
-            self.fail(
-                "Step " +
-                step_type +
-                " stopped at wrong place: expected: " +
-                destination_description.GetData() +
-                " got: " +
-                actual_description.GetData() +
-                ".")
-
-        real_stack_depth = self.thread.GetNumFrames()
-
-        if test_stack_depth and real_stack_depth != expected_stack_depth:
-            destination_description = lldb.SBStream()
-            destination_line_entry.GetDescription(destination_description)
-            self.fail(
-                "Step %s to %s got wrong number of frames, should be: %d was: %d." %
-                (step_type,
-                 destination_description.GetData(),
-                 expected_stack_depth,
-                 real_stack_depth))
-
-    def run_step_sequence(self, step_sequence):
-        """This function takes a list of duples instructing how to run the program.  The first element in each duple is
-           a source pattern for the target location, and the second is the operation that will take you from the current
-           source location to the target location.  It will then run all the steps in the sequence.
-           It will check that you arrived at the expected source location at each step, and that the stack depth changed
-           correctly for the operation in the sequence."""
-
-        target_line_entry = lldb.SBLineEntry()
-        target_line_entry.SetFileSpec(self.main_source_spec)
-
-        test_stack_depth = True
-        # Work around for <rdar://problem/16363195>, the darwin unwinder seems flakey about whether it duplicates the first frame
-        # or not, which makes counting stack depth unreliable.
-        if self.platformIsDarwin():
-            test_stack_depth = False
-
-        for step_pattern in step_sequence:
-            step_stop_line = line_number(self.main_source, step_pattern[0])
-            target_line_entry.SetLine(step_stop_line)
-            self.do_step(step_pattern[1], target_line_entry, test_stack_depth)
-
-    def inline_stepping(self):
-        """Use Python APIs to test stepping over and hitting breakpoints."""
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        break_1_in_main = target.BreakpointCreateBySourceRegex(
-            '// Stop here and step over to set up stepping over.', self.main_source_spec)
-        self.assertTrue(break_1_in_main, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        self.process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(self.process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-            self.process, break_1_in_main)
-
-        if len(threads) != 1:
-            self.fail("Failed to stop at first breakpoint in main.")
-
-        self.thread = threads[0]
-
-        # Step over the inline_value = 0 line to get us to inline_trivial_1 called from main.  Doing it this way works
-        # around a bug in lldb where the breakpoint on the containing line of an inlined function with no return value
-        # gets set past the insertion line in the function.
-        # Then test stepping over a simple inlined function.  Note, to test all the parts of the inlined stepping
-        # the calls inline_stepping_1 and inline_stepping_2 should line up at the same address, that way we will test
-        # the "virtual" stepping.
-        # FIXME: Put in a check to see if that is true and warn if it is not.
-
-        step_sequence = [["// At inline_trivial_1 called from main.", "over"],
-                         ["// At first call of caller_trivial_1 in main.", "over"]]
-        self.run_step_sequence(step_sequence)
-
-        # Now step from caller_ref_1 all the way into called_by_inline_trivial
-
-        step_sequence = [["// In caller_trivial_1.", "into"],
-                         ["// In caller_trivial_2.", "into"],
-                         ["// In inline_trivial_1.", "into"],
-                         ["// In inline_trivial_2.", "into"],
-                         ["// At caller_by_inline_trivial in inline_trivial_2.", "over"],
-                         ["// In called_by_inline_trivial.", "into"]]
-        self.run_step_sequence(step_sequence)
-
-        # Now run to the inline_trivial_1 just before the immediate step into
-        # inline_trivial_2:
-
-        break_2_in_main = target.BreakpointCreateBySourceRegex(
-            '// At second call of caller_trivial_1 in main.', self.main_source_spec)
-        self.assertTrue(break_2_in_main, VALID_BREAKPOINT)
-
-        threads = lldbutil.continue_to_breakpoint(
-            self.process, break_2_in_main)
-        self.assertTrue(
-            len(threads) == 1,
-            "Successfully ran to call site of second caller_trivial_1 call.")
-        self.thread = threads[0]
-
-        step_sequence = [["// In caller_trivial_1.", "into"],
-                         ["// In caller_trivial_2.", "into"],
-                         ["// In inline_trivial_1.", "into"]]
-        self.run_step_sequence(step_sequence)
-
-        # Then call some trivial function, and make sure we end up back where
-        # we were in the inlined call stack:
-
-        frame = self.thread.GetFrameAtIndex(0)
-        before_line_entry = frame.GetLineEntry()
-        value = frame.EvaluateExpression("function_to_call()")
-        after_line_entry = frame.GetLineEntry()
-
-        self.assertTrue(
-            before_line_entry.GetLine() == after_line_entry.GetLine(),
-            "Line entry before and after function calls are the same.")
-
-        # Now make sure stepping OVER in the middle of the stack works, and
-        # then check finish from the inlined frame:
-
-        step_sequence = [["// At increment in inline_trivial_1.", "over"],
-                         ["// At increment in caller_trivial_2.", "out"]]
-        self.run_step_sequence(step_sequence)
-
-        # Now run to the place in main just before the first call to
-        # caller_ref_1:
-
-        break_3_in_main = target.BreakpointCreateBySourceRegex(
-            '// At first call of caller_ref_1 in main.', self.main_source_spec)
-        self.assertTrue(break_3_in_main, VALID_BREAKPOINT)
-
-        threads = lldbutil.continue_to_breakpoint(
-            self.process, break_3_in_main)
-        self.assertTrue(
-            len(threads) == 1,
-            "Successfully ran to call site of first caller_ref_1 call.")
-        self.thread = threads[0]
-
-        step_sequence = [["// In caller_ref_1.", "into"],
-                         ["// In caller_ref_2.", "into"],
-                         ["// In inline_ref_1.", "into"],
-                         ["// In inline_ref_2.", "into"],
-                         ["// In called_by_inline_ref.", "into"],
-                         ["// In inline_ref_2.", "out"],
-                         ["// In inline_ref_1.", "out"],
-                         ["// At increment in inline_ref_1.", "over"],
-                         ["// In caller_ref_2.", "out"],
-                         ["// At increment in caller_ref_2.", "over"]]
-        self.run_step_sequence(step_sequence)
-
-    def inline_stepping_step_over(self):
-        """Use Python APIs to test stepping over and hitting breakpoints."""
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        break_1_in_main = target.BreakpointCreateBySourceRegex(
-            '// At second call of caller_ref_1 in main.', self.main_source_spec)
-        self.assertTrue(break_1_in_main, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        self.process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(self.process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-            self.process, break_1_in_main)
-
-        if len(threads) != 1:
-            self.fail("Failed to stop at first breakpoint in main.")
-
-        self.thread = threads[0]
-
-        step_sequence = [["// In caller_ref_1.", "into"],
-                         ["// In caller_ref_2.", "into"],
-                         ["// At increment in caller_ref_2.", "over"]]
-        self.run_step_sequence(step_sequence)
-
-    def step_in_template(self):
-        """Use Python APIs to test stepping in to templated functions."""
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        break_1_in_main = target.BreakpointCreateBySourceRegex(
-            '// Call max_value template', self.main_source_spec)
-        self.assertTrue(break_1_in_main, VALID_BREAKPOINT)
-
-        break_2_in_main = target.BreakpointCreateBySourceRegex(
-            '// Call max_value specialized', self.main_source_spec)
-        self.assertTrue(break_2_in_main, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        self.process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(self.process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-            self.process, break_1_in_main)
-
-        if len(threads) != 1:
-            self.fail("Failed to stop at first breakpoint in main.")
-
-        self.thread = threads[0]
-
-        step_sequence = [["// In max_value template", "into"]]
-        self.run_step_sequence(step_sequence)
-
-        threads = lldbutil.continue_to_breakpoint(
-            self.process, break_2_in_main)
-        self.assertEqual(
-            len(threads),
-            1,
-            "Successfully ran to call site of second caller_trivial_1 call.")
-        self.thread = threads[0]
-
-        step_sequence = [["// In max_value specialized", "into"]]
-        self.run_step_sequence(step_sequence)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inline-stepping/calling.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/inline-stepping/calling.cpp
deleted file mode 100644 (file)
index 9982fbf..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-#include <algorithm>
-#include <cstdio>
-#include <string>
-
-inline int inline_ref_1 (int &value) __attribute__((always_inline));
-inline int inline_ref_2 (int &value) __attribute__((always_inline));
-
-int caller_ref_1 (int &value);
-int caller_ref_2 (int &value);
-
-int called_by_inline_ref (int &value);
-
-inline void inline_trivial_1 () __attribute__((always_inline));
-inline void inline_trivial_2 () __attribute__((always_inline));
-
-void caller_trivial_1 ();
-void caller_trivial_2 ();
-
-void called_by_inline_trivial ();
-
-static int inline_value;
-
-int 
-function_to_call ()
-{
-    return inline_value;
-}
-
-int
-caller_ref_1 (int &value)
-{
-    int increment = caller_ref_2(value); // In caller_ref_1.
-    value += increment; // At increment in caller_ref_1.
-    return value;
-}
-
-int
-caller_ref_2 (int &value)
-{
-    int increment = inline_ref_1 (value); // In caller_ref_2.
-    value += increment;  // At increment in caller_ref_2.
-    return value;
-}
-
-int
-called_by_inline_ref (int &value)
-{
-    value += 1; // In called_by_inline_ref.
-    return value;
-}
-
-int
-inline_ref_1 (int &value)
-{
-    int increment = inline_ref_2(value); // In inline_ref_1.
-    value += increment; // At increment in inline_ref_1.
-    return value;
-}
-
-int
-inline_ref_2 (int &value)
-{
-    int increment = called_by_inline_ref (value);  // In inline_ref_2.
-    value += 1; // At increment in inline_ref_2.
-    return value; 
-}
-
-void
-caller_trivial_1 ()
-{
-    caller_trivial_2(); // In caller_trivial_1.
-    inline_value += 1; 
-}
-
-void
-caller_trivial_2 ()
-{
-    inline_trivial_1 (); // In caller_trivial_2.
-    inline_value += 1;  // At increment in caller_trivial_2.
-}
-
-void
-called_by_inline_trivial ()
-{
-    inline_value += 1; // In called_by_inline_trivial.
-}
-
-void
-inline_trivial_1 ()
-{
-    inline_trivial_2(); // In inline_trivial_1.
-    inline_value += 1;  // At increment in inline_trivial_1.
-}
-
-void
-inline_trivial_2 ()
-{
-    inline_value += 1; // In inline_trivial_2.
-    called_by_inline_trivial (); // At caller_by_inline_trivial in inline_trivial_2.
-}
-
-template<typename T> T
-max_value(const T& lhs, const T& rhs)
-{
-    return std::max(lhs, rhs); // In max_value template
-}
-
-template<> std::string
-max_value(const std::string& lhs, const std::string& rhs)
-{
-    return (lhs.size() > rhs.size()) ? lhs : rhs; // In max_value specialized
-}
-
-int
-main (int argc, char **argv)
-{
-    
-    inline_value = 0;    // Stop here and step over to set up stepping over.
-
-    inline_trivial_1 ();    // At inline_trivial_1 called from main.
-
-    caller_trivial_1();     // At first call of caller_trivial_1 in main.
-    
-    caller_trivial_1();     // At second call of caller_trivial_1 in main.
-    
-    caller_ref_1 (argc); // At first call of caller_ref_1 in main.
-    
-    caller_ref_1 (argc); // At second call of caller_ref_1 in main. 
-    
-    function_to_call (); // Make sure debug info for this function gets generated.
-    
-    max_value(123, 456);                                // Call max_value template
-    max_value(std::string("abc"), std::string("0022")); // Call max_value specialized
-
-    return 0;            // About to return from main.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/Makefile
deleted file mode 100644 (file)
index 357b1f8..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-C_SOURCES := main.c
-
-all: a.out simple
-
-include Makefile.rules
-
-simple:
-       $(MAKE) -f $(MAKEFILE_RULES) \
-               C_SOURCES=simple.c EXE=simple
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/TestJITLoaderGDB.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/TestJITLoaderGDB.py
deleted file mode 100644 (file)
index 4bd4150..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-"""Test for the JITLoaderGDB interface"""
-
-
-import unittest2
-import os
-import lldb
-from lldbsuite.test import lldbutil
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-
-file_index = 0
-
-class JITLoaderGDBTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipTestIfFn(
-        lambda: "Skipped because the test crashes the test runner",
-        bugnumber="llvm.org/pr24702")
-    @unittest2.expectedFailure("llvm.org/pr24702")
-    def test_bogus_values(self):
-        """Test that we handle inferior misusing the GDB JIT interface"""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # launch the process, do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # The inferior will now pass bogus values over the interface. Make sure
-        # we don't crash.
-
-        self.assertEqual(process.GetState(), lldb.eStateExited)
-        self.assertEqual(process.GetExitStatus(), 0)
-
-    def gen_log_file(self):
-        global file_index
-        ++file_index
-        logfile = os.path.join(
-            self.getBuildDir(),
-            "jitintgdb-" + self.getArchitecture() + "-" +
-                str(file_index) + ".txt")
-
-        def cleanup():
-            if os.path.exists(logfile):
-                os.unlink(logfile)
-        self.addTearDownHook(cleanup)
-        return logfile
-
-    def test_jit_int_default(self):
-        self.expect("settings show plugin.jit-loader.gdb.enable",
-                    substrs=["plugin.jit-loader.gdb.enable (enum) = default"])
-
-    @skipIfWindows # This test fails on Windows during C code build
-    def test_jit_int_on(self):
-        """Tests interface with 'enable' settings 'on'"""
-        self.build()
-        exe = self.getBuildArtifact("simple")
-
-        logfile = self.gen_log_file()
-        self.runCmd("log enable -f %s lldb jit" % (logfile))
-        self.runCmd("settings set plugin.jit-loader.gdb.enable on")
-        def cleanup():
-            self.runCmd("log disable lldb")
-            self.runCmd("settings set plugin.jit-loader.gdb.enable default")
-        self.addTearDownHook(cleanup)
-
-        # launch the process
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        self.assertEqual(process.GetState(), lldb.eStateExited)
-        self.assertEqual(process.GetExitStatus(), 0)
-
-        logcontent = ""
-        if os.path.exists(logfile):
-            logcontent = open(logfile).read()
-        self.assertIn(
-            "SetJITBreakpoint setting JIT breakpoint", logcontent)
-
-    @skipIfWindows # This test fails on Windows during C code build
-    def test_jit_int_off(self):
-        """Tests interface with 'enable' settings 'off'"""
-        self.build()
-        exe = self.getBuildArtifact("simple")
-
-        logfile = self.gen_log_file()
-        self.runCmd("log enable -f %s lldb jit" % (logfile))
-        self.runCmd("settings set plugin.jit-loader.gdb.enable off")
-        def cleanup():
-            self.runCmd("log disable lldb")
-            self.runCmd("settings set plugin.jit-loader.gdb.enable default")
-        self.addTearDownHook(cleanup)
-
-        # launch the process
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        self.assertEqual(process.GetState(), lldb.eStateExited)
-        self.assertEqual(process.GetExitStatus(), 0)
-
-        if os.path.exists(logfile):
-            logcontent = open(logfile).read()
-            self.assertNotIn(
-              "SetJITBreakpoint setting JIT breakpoint", logcontent)
-        else:
-            self.assertTrue(false)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/main.c
deleted file mode 100644 (file)
index 6a8ec50..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#include <inttypes.h>
-
-// GDB JIT interface
-enum JITAction { JIT_NOACTION, JIT_REGISTER_FN, JIT_UNREGISTER_FN };
-
-struct JITCodeEntry
-{
-    struct JITCodeEntry* next;
-    struct JITCodeEntry* prev;
-    const char *symfile_addr;
-    uint64_t symfile_size;
-};
-
-struct JITDescriptor
-{
-    uint32_t version;
-    uint32_t action_flag;
-    struct JITCodeEntry* relevant_entry;
-    struct JITCodeEntry* first_entry;
-};
-
-struct JITDescriptor __jit_debug_descriptor = { 1, JIT_NOACTION, 0, 0 };
-
-void __jit_debug_register_code()
-{
-}
-// end GDB JIT interface
-
-struct JITCodeEntry entry;
-
-int main()
-{
-    // Create a code entry with a bogus size
-    entry.next = entry.prev = 0;
-    entry.symfile_addr = (char *)&entry;
-    entry.symfile_size = (uint64_t)47<<32;
-
-    __jit_debug_descriptor.relevant_entry = __jit_debug_descriptor.first_entry = &entry;
-    __jit_debug_descriptor.action_flag = JIT_REGISTER_FN;
-
-    __jit_debug_register_code();
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/simple.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/simple.c
deleted file mode 100644 (file)
index 77b1a2a..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <inttypes.h>
-
-// GDB JIT interface stub
-struct
-{
-    uint32_t version;
-    uint32_t action_flag;
-    void* relevant_entry;
-    void* first_entry;
-} __jit_debug_descriptor = { 1, 0, 0, 0 };
-
-void __jit_debug_register_code()
-{
-}
-// end GDB JIT interface stub
-
-int main()
-{
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/lazy-loading/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/lazy-loading/Makefile
deleted file mode 100644 (file)
index 3d0b98f..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-CXX_SOURCES := main.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/lazy-loading/TestLazyLoading.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/lazy-loading/TestLazyLoading.py
deleted file mode 100644 (file)
index dddd4dc..0000000
+++ /dev/null
@@ -1,236 +0,0 @@
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-"""
-This test ensures that we only create Clang AST nodes in our module AST
-when we actually need them.
-
-All tests in this file behave like this:
-  1. Use LLDB to do something (expression evaluation, breakpoint setting, etc.).
-  2. Check that certain Clang AST nodes were not loaded during the previous
-     step.
-"""
-
-class TestCase(TestBase):
-
-    NO_DEBUG_INFO_TESTCASE = True
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-      TestBase.setUp(self)
-      # Only build this test once.
-      self.build()
-
-    # Clang declaration kind we are looking for.
-    class_decl_kind = "CXXRecordDecl"
-    # FIXME: This shouldn't be a CXXRecordDecl, but that's how we model
-    # structs in Clang.
-    struct_decl_kind = "CXXRecordDecl"
-
-    # The decls we use in this program in the format that
-    # decl_in_line and decl_completed_in_line expect (which is a pair of
-    # node type and the unqualified declaration name.
-    struct_first_member_decl = [struct_decl_kind, "StructFirstMember"]
-    struct_behind_ptr_decl = [struct_decl_kind, "StructBehindPointer"]
-    struct_behind_ref_decl = [struct_decl_kind, "StructBehindRef"]
-    struct_member_decl = [struct_decl_kind, "StructMember"]
-    some_struct_decl = [struct_decl_kind, "SomeStruct"]
-    other_struct_decl = [struct_decl_kind, "OtherStruct"]
-    class_in_namespace_decl = [class_decl_kind, "ClassInNamespace"]
-    class_we_enter_decl = [class_decl_kind, "ClassWeEnter"]
-    class_member_decl = [struct_decl_kind, "ClassMember"]
-    unused_class_member_decl = [struct_decl_kind, "UnusedClassMember"]
-    unused_class_member_ptr_decl = [struct_decl_kind, "UnusedClassMemberPtr"]
-
-    def assert_no_decls_loaded(self):
-        """
-        Asserts that no known declarations in this test are loaded
-        into the module's AST.
-        """
-        self.assert_decl_not_loaded(self.struct_first_member_decl)
-        self.assert_decl_not_loaded(self.struct_behind_ptr_decl)
-        self.assert_decl_not_loaded(self.struct_behind_ref_decl)
-        self.assert_decl_not_loaded(self.struct_member_decl)
-        self.assert_decl_not_loaded(self.some_struct_decl)
-        self.assert_decl_not_loaded(self.other_struct_decl)
-        self.assert_decl_not_loaded(self.class_in_namespace_decl)
-        self.assert_decl_not_loaded(self.class_member_decl)
-        self.assert_decl_not_loaded(self.unused_class_member_decl)
-
-    def get_ast_dump(self):
-        """Returns the dumped Clang AST of the module as a string"""
-        res = lldb.SBCommandReturnObject()
-        ci = self.dbg.GetCommandInterpreter()
-        ci.HandleCommand('target modules dump ast a.out', res)
-        self.assertTrue(res.Succeeded())
-        return res.GetOutput()
-
-    def decl_in_line(self, line, decl):
-        """
-        Returns true iff the given line declares the given Clang decl.
-        The line is expected to be in the form of Clang's AST dump.
-        """
-        line = line.rstrip() + "\n"
-        decl_kind = "-" + decl[0] + " "
-        # Either the decl is somewhere in the line or at the end of
-        # the line.
-        decl_name = " " + decl[1] + " "
-        decl_name_eol = " " + decl[1] + "\n"
-        if not decl_kind in line:
-          return False
-        return decl_name in line or decl_name_eol in line
-
-    def decl_completed_in_line(self, line, decl):
-        """
-        Returns true iff the given line declares the given Clang decl and
-        the decl was completed (i.e., it has no undeserialized declarations
-        in it).
-        """
-        return self.decl_in_line(line, decl) and not "<undeserialized declarations>" in line
-
-    # The following asserts are used for checking if certain Clang declarations
-    # were loaded or not since the target was created.
-
-    def assert_decl_loaded(self, decl):
-        """
-        Asserts the given decl is currently loaded.
-        Note: This test is about checking that types/declarations are not
-        loaded. If this assert fails it is usually fine to turn it into a
-        assert_decl_not_loaded or assert_decl_not_completed assuming LLDB's
-        functionality has not suffered by not loading this declaration.
-        """
-        ast = self.get_ast_dump()
-        found = False
-        for line in ast.splitlines():
-          if self.decl_in_line(line, decl):
-            found = True
-            self.assertTrue(self.decl_completed_in_line(line, decl),
-                            "Should have called assert_decl_not_completed")
-        self.assertTrue(found, "Declaration no longer loaded " + str(decl) +
-            ".\nAST:\n" + ast)
-
-    def assert_decl_not_completed(self, decl):
-        """
-        Asserts that the given decl is currently not completed in the module's
-        AST. It may be loaded but then can can only contain undeserialized
-        declarations.
-        """
-        ast = self.get_ast_dump()
-        found = False
-        for line in ast.splitlines():
-          error_msg = "Unexpected completed decl: '" + line + "'.\nAST:\n" + ast
-          self.assertFalse(self.decl_completed_in_line(line, decl), error_msg)
-
-    def assert_decl_not_loaded(self, decl):
-        """
-        Asserts that the given decl is currently not loaded in the module's
-        AST.
-        """
-        ast = self.get_ast_dump()
-        found = False
-        for line in ast.splitlines():
-          error_msg = "Unexpected loaded decl: '" + line + "'\nAST:\n" + ast
-          self.assertFalse(self.decl_in_line(line, decl), error_msg)
-
-
-    def clean_setup(self, location):
-        """
-        Runs to the line with the source line with the given location string
-        and ensures that our module AST is empty.
-        """
-        lldbutil.run_to_source_breakpoint(self,
-            "// Location: " + location, lldb.SBFileSpec("main.cpp"))
-        # Make sure no declarations are loaded initially.
-        self.assert_no_decls_loaded()
-
-    @add_test_categories(["dwarf"])
-    def test_arithmetic_expression_in_main(self):
-        """ Runs a simple arithmetic expression which should load nothing. """
-        self.clean_setup(location="multiple locals function")
-
-        self.expect("expr 1 + (int)2.0", substrs=['(int) $0'])
-
-        # This should not have loaded any decls.
-        self.assert_no_decls_loaded()
-
-    @add_test_categories(["dwarf"])
-    def test_printing_local_variable_in_other_struct_func(self):
-        """
-        Prints a local variable and makes sure no unrelated types are loaded.
-        """
-        self.clean_setup(location="other struct function")
-
-        self.expect("expr other_struct_var", substrs=['(OtherStruct) $0'])
-        # The decl we run on was loaded.
-        self.assert_decl_loaded(self.other_struct_decl)
-
-        # This should not have loaded anything else.
-        self.assert_decl_not_loaded(self.some_struct_decl)
-        self.assert_decl_not_loaded(self.class_in_namespace_decl)
-
-    @add_test_categories(["dwarf"])
-    def test_printing_struct_with_multiple_locals(self):
-        """
-        Prints a local variable and checks that we don't load other local
-        variables.
-        """
-        self.clean_setup(location="multiple locals function")
-
-        self.expect("expr struct_var", substrs=['(SomeStruct) $0'])
-
-        # We loaded SomeStruct and its member types for printing.
-        self.assert_decl_loaded(self.some_struct_decl)
-        self.assert_decl_loaded(self.struct_behind_ptr_decl)
-        self.assert_decl_loaded(self.struct_behind_ref_decl)
-
-        # FIXME: We don't use these variables, but we seem to load all local
-        # local variables.
-        self.assert_decl_not_completed(self.other_struct_decl)
-        self.assert_decl_not_completed(self.class_in_namespace_decl)
-
-    @add_test_categories(["dwarf"])
-    def test_addr_of_struct(self):
-        """
-        Prints the address of a local variable (which is a struct).
-        """
-        self.clean_setup(location="multiple locals function")
-
-        self.expect("expr &struct_var", substrs=['(SomeStruct *) $0'])
-
-        # We loaded SomeStruct.
-        self.assert_decl_loaded(self.some_struct_decl)
-
-        # The member declarations should not be completed.
-        self.assert_decl_not_completed(self.struct_behind_ptr_decl)
-        self.assert_decl_not_completed(self.struct_behind_ref_decl)
-
-        # FIXME: The first member was behind a pointer so it shouldn't be
-        # completed. Somehow LLDB really wants to load the first member, so
-        # that is why have it defined here.
-        self.assert_decl_loaded(self.struct_first_member_decl)
-
-        # FIXME: We don't use these variables, but we seem to load all local
-        # local variables.
-        self.assert_decl_not_completed(self.other_struct_decl)
-        self.assert_decl_not_completed(self.class_in_namespace_decl)
-
-    @add_test_categories(["dwarf"])
-    def test_class_function_access_member(self):
-        self.clean_setup(location="class function")
-
-        self.expect("expr member", substrs=['(ClassMember) $0'])
-
-        # We loaded the current class we touched.
-        self.assert_decl_loaded(self.class_we_enter_decl)
-        # We loaded the unused members of this class.
-        self.assert_decl_loaded(self.unused_class_member_decl)
-        self.assert_decl_not_completed(self.unused_class_member_ptr_decl)
-        # We loaded the member we used.
-        self.assert_decl_loaded(self.class_member_decl)
-
-        # This should not have loaded anything else.
-        self.assert_decl_not_loaded(self.other_struct_decl)
-        self.assert_decl_not_loaded(self.some_struct_decl)
-        self.assert_decl_not_loaded(self.class_in_namespace_decl)
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/lazy-loading/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/lazy-loading/main.cpp
deleted file mode 100644 (file)
index 34d62b4..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-//----------------------------------------------------------------------------//
-// Struct loading declarations.
-
-struct StructFirstMember { int i; };
-struct StructBehindPointer { int i; };
-struct StructBehindRef { int i; };
-struct StructMember { int i; };
-
-StructBehindRef struct_instance;
-
-struct SomeStruct {
-  StructFirstMember *first;
-  StructBehindPointer *ptr;
-  StructMember member;
-  StructBehindRef &ref = struct_instance;
-};
-
-struct OtherStruct {
-  int member_int;
-};
-
-//----------------------------------------------------------------------------//
-// Class loading declarations.
-
-struct ClassMember { int i; };
-struct UnusedClassMember { int i; };
-struct UnusedClassMemberPtr { int i; };
-
-namespace NS {
-class ClassInNamespace {
-  int i;
-};
-class ClassWeEnter {
-public:
-  int dummy; // Prevent bug where LLDB always completes first member.
-  ClassMember member;
-  UnusedClassMember unused_member;
-  UnusedClassMemberPtr *unused_member_ptr;
-  int enteredFunction() {
-    return member.i; // Location: class function
-  }
-};
-};
-
-//----------------------------------------------------------------------------//
-// Function we can stop in.
-
-int functionWithOtherStruct() {
-  OtherStruct other_struct_var;
-  other_struct_var.member_int++; // Location: other struct function
-  return other_struct_var.member_int;
-}
-
-int functionWithMultipleLocals() {
-  SomeStruct struct_var;
-  OtherStruct other_struct_var;
-  NS::ClassInNamespace namespace_class;
-  other_struct_var.member_int++; // Location: multiple locals function
-  return other_struct_var.member_int;
-}
-
-int main(int argc, char **argv) {
-  NS::ClassWeEnter c;
-  c.enteredFunction();
-
-  functionWithOtherStruct();
-  functionWithMultipleLocals();
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/.categories b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/.categories
deleted file mode 100644 (file)
index c00c258..0000000
+++ /dev/null
@@ -1 +0,0 @@
-basic_process
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile
deleted file mode 100644 (file)
index 00054aa..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-LD_EXTRAS := -L. -lloadunload_d
-CXX_SOURCES := main.cpp
-USE_LIBDL := 1
-
-a.out: lib_b lib_a lib_c lib_d hidden_lib_d
-
-include Makefile.rules
-
-lib_a: lib_b
-       $(MAKE) -f $(MAKEFILE_RULES) \
-               DYLIB_ONLY=YES DYLIB_CXX_SOURCES=a.cpp DYLIB_NAME=loadunload_a \
-               LD_EXTRAS="-L. -lloadunload_b"
-
-lib_b:
-       $(MAKE) -f $(MAKEFILE_RULES) \
-               DYLIB_ONLY=YES DYLIB_CXX_SOURCES=b.cpp DYLIB_NAME=loadunload_b
-
-lib_c:
-       $(MAKE) -f $(MAKEFILE_RULES) \
-               DYLIB_ONLY=YES DYLIB_CXX_SOURCES=c.cpp DYLIB_NAME=loadunload_c
-
-lib_d:
-       $(MAKE) -f $(MAKEFILE_RULES) \
-               DYLIB_ONLY=YES DYLIB_CXX_SOURCES=d.cpp DYLIB_NAME=loadunload_d
-ifeq ($(OS),Darwin)
-       install_name_tool -id @executable_path/libloadunload_d.dylib libloadunload_d.dylib
-endif
-
-hidden_lib_d:
-       mkdir -p hidden
-       $(MAKE) VPATH=$(SRCDIR)/hidden -C hidden -f $(MAKEFILE_RULES) \
-               DYLIB_ONLY=YES DYLIB_CXX_SOURCES=d.cpp DYLIB_NAME=loadunload_d
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py
deleted file mode 100644 (file)
index ae0934c..0000000
+++ /dev/null
@@ -1,452 +0,0 @@
-"""
-Test that breakpoint by symbol name works correctly with dynamic libs.
-"""
-
-from __future__ import print_function
-
-
-import os
-import re
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-@skipIfWindows  # Windows doesn't have dlopen and friends, dynamic libraries work differently
-class LoadUnloadTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        self.setup_test()
-        # Invoke the default build rule.
-        self.build()
-        # Find the line number to break for main.cpp.
-        self.line = line_number(
-            'main.cpp',
-            '// Set break point at this line for test_lldb_process_load_and_unload_commands().')
-        self.line_d_function = line_number(
-            'd.cpp', '// Find this line number within d_dunction().')
-
-    def setup_test(self):
-        lldbutil.mkdir_p(self.getBuildArtifact("hidden"))
-        if not self.platformIsDarwin():
-            if not lldb.remote_platform and "LD_LIBRARY_PATH" in os.environ:
-                self.runCmd(
-                    "settings set target.env-vars " +
-                    self.dylibPath +
-                    "=" +
-                    os.environ["LD_LIBRARY_PATH"] +
-                    ":" +
-                    self.getBuildDir())
-            else:
-                if lldb.remote_platform:
-                    wd = lldb.remote_platform.GetWorkingDirectory()
-                else:
-                    wd = self.getBuildDir()
-                self.runCmd(
-                    "settings set target.env-vars " +
-                    self.dylibPath +
-                    "=" +
-                    wd)
-
-    def copy_shlibs_to_remote(self, hidden_dir=False):
-        """ Copies the shared libs required by this test suite to remote.
-        Does nothing in case of non-remote platforms.
-        """
-        if lldb.remote_platform:
-            ext = 'so'
-            if self.platformIsDarwin():
-                ext = 'dylib'
-
-            shlibs = ['libloadunload_a.' + ext, 'libloadunload_b.' + ext,
-                      'libloadunload_c.' + ext, 'libloadunload_d.' + ext]
-            wd = lldb.remote_platform.GetWorkingDirectory()
-            cwd = os.getcwd()
-            for f in shlibs:
-                err = lldb.remote_platform.Put(
-                    lldb.SBFileSpec(self.getBuildArtifact(f)),
-                    lldb.SBFileSpec(os.path.join(wd, f)))
-                if err.Fail():
-                    raise RuntimeError(
-                        "Unable copy '%s' to '%s'.\n>>> %s" %
-                        (f, wd, err.GetCString()))
-            if hidden_dir:
-                shlib = 'libloadunload_d.' + ext
-                hidden_dir = os.path.join(wd, 'hidden')
-                hidden_file = os.path.join(hidden_dir, shlib)
-                err = lldb.remote_platform.MakeDirectory(hidden_dir)
-                if err.Fail():
-                    raise RuntimeError(
-                        "Unable to create a directory '%s'." % hidden_dir)
-                err = lldb.remote_platform.Put(
-                    lldb.SBFileSpec(os.path.join('hidden', shlib)),
-                    lldb.SBFileSpec(hidden_file))
-                if err.Fail():
-                    raise RuntimeError(
-                        "Unable copy 'libloadunload_d.so' to '%s'.\n>>> %s" %
-                        (wd, err.GetCString()))
-
-    def setSvr4Support(self, enabled):
-        self.runCmd(
-            "settings set plugin.process.gdb-remote.use-libraries-svr4 {enabled}".format(
-                enabled="true" if enabled else "false"
-            )
-        )
-
-    # libloadunload_d.so does not appear in the image list because executable
-    # dependencies are resolved relative to the debuggers PWD. Bug?
-    @expectedFailureAll(oslist=["linux"])
-    @skipIfFreeBSD  # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
-    @not_remote_testsuite_ready
-    @skipIfWindows  # Windows doesn't have dlopen and friends, dynamic libraries work differently
-    @expectedFailureNetBSD
-    def test_modules_search_paths(self):
-        """Test target modules list after loading a different copy of the library libd.dylib, and verifies that it works with 'target modules search-paths add'."""
-        if self.platformIsDarwin():
-            dylibName = 'libloadunload_d.dylib'
-        else:
-            dylibName = 'libloadunload_d.so'
-
-        # The directory with the dynamic library we did not link to.
-        new_dir = os.path.join(self.getBuildDir(), "hidden")
-
-        old_dylib = os.path.join(self.getBuildDir(), dylibName)
-        new_dylib = os.path.join(new_dir, dylibName)
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        self.expect("target modules list",
-                    substrs=[old_dylib])
-        # self.expect("target modules list -t 3",
-        #    patterns = ["%s-[^-]*-[^-]*" % self.getArchitecture()])
-        # Add an image search path substitution pair.
-        self.runCmd(
-            "target modules search-paths add %s %s" %
-            (self.getBuildDir(), new_dir))
-
-        self.expect("target modules search-paths list",
-                    substrs=[self.getBuildDir(), new_dir])
-
-        self.expect(
-            "target modules search-paths query %s" %
-            self.getBuildDir(),
-            "Image search path successfully transformed",
-            substrs=[new_dir])
-
-        # Obliterate traces of libd from the old location.
-        os.remove(old_dylib)
-        # Inform (DY)LD_LIBRARY_PATH of the new path, too.
-        env_cmd_string = "settings set target.env-vars " + self.dylibPath + "=" + new_dir
-        if self.TraceOn():
-            print("Set environment to: ", env_cmd_string)
-        self.runCmd(env_cmd_string)
-        self.runCmd("settings show target.env-vars")
-
-        remove_dyld_path_cmd = "settings remove target.env-vars " + self.dylibPath
-        self.addTearDownHook(
-            lambda: self.dbg.HandleCommand(remove_dyld_path_cmd))
-
-        self.runCmd("run")
-
-        self.expect(
-            "target modules list",
-            "LLDB successfully locates the relocated dynamic library",
-            substrs=[new_dylib])
-
-    # libloadunload_d.so does not appear in the image list because executable
-    # dependencies are resolved relative to the debuggers PWD. Bug?
-    @expectedFailureAll(oslist=["linux"])
-    @skipIfFreeBSD  # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
-    @expectedFailureAndroid  # wrong source file shows up for hidden library
-    @skipIfWindows  # Windows doesn't have dlopen and friends, dynamic libraries work differently
-    @skipIfDarwinEmbedded
-    @expectedFailureNetBSD
-    def test_dyld_library_path(self):
-        """Test (DY)LD_LIBRARY_PATH after moving libd.dylib, which defines d_function, somewhere else."""
-        self.copy_shlibs_to_remote(hidden_dir=True)
-
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Shut off ANSI color usage so we don't get ANSI escape sequences
-        # mixed in with stop locations.
-        self.dbg.SetUseColor(False)
-
-        if self.platformIsDarwin():
-            dylibName = 'libloadunload_d.dylib'
-            dsymName = 'libloadunload_d.dylib.dSYM'
-        else:
-            dylibName = 'libloadunload_d.so'
-
-        # The directory to relocate the dynamic library and its debugging info.
-        special_dir = "hidden"
-        if lldb.remote_platform:
-            wd = lldb.remote_platform.GetWorkingDirectory()
-        else:
-            wd = self.getBuildDir()
-
-        old_dir = wd
-        new_dir = os.path.join(wd, special_dir)
-        old_dylib = os.path.join(old_dir, dylibName)
-
-        remove_dyld_path_cmd = "settings remove target.env-vars " \
-                               + self.dylibPath
-        self.addTearDownHook(
-            lambda: self.dbg.HandleCommand(remove_dyld_path_cmd))
-
-        # For now we don't track (DY)LD_LIBRARY_PATH, so the old
-        # library will be in the modules list.
-        self.expect("target modules list",
-                    substrs=[os.path.basename(old_dylib)],
-                    matching=True)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "d.cpp", self.line_d_function, num_expected_locations=1)
-        # After run, make sure the non-hidden library is picked up.
-        self.expect("run", substrs=["return", "700"])
-
-        self.runCmd("continue")
-
-        # Add the hidden directory first in the search path.
-        env_cmd_string = ("settings set target.env-vars %s=%s" %
-                          (self.dylibPath, new_dir))
-        if not self.platformIsDarwin():
-            env_cmd_string += ":" + wd
-        self.runCmd(env_cmd_string)
-
-        # This time, the hidden library should be picked up.
-        self.expect("run", substrs=["return", "12345"])
-
-    @expectedFailureAll(
-        bugnumber="llvm.org/pr25805",
-        hostoslist=["windows"],
-        triple='.*-android')
-    @skipIfFreeBSD  # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
-    @skipIfWindows  # Windows doesn't have dlopen and friends, dynamic libraries work differently
-    def test_lldb_process_load_and_unload_commands(self):
-        self.setSvr4Support(False)
-        self.run_lldb_process_load_and_unload_commands()
-
-    @expectedFailureAll(
-        bugnumber="llvm.org/pr25805",
-        hostoslist=["windows"],
-        triple='.*-android')
-    @skipIfFreeBSD  # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
-    @skipIfWindows  # Windows doesn't have dlopen and friends, dynamic libraries work differently
-    def test_lldb_process_load_and_unload_commands_with_svr4(self):
-        self.setSvr4Support(True)
-        self.run_lldb_process_load_and_unload_commands()
-
-    def run_lldb_process_load_and_unload_commands(self):
-        """Test that lldb process load/unload command work correctly."""
-        self.copy_shlibs_to_remote()
-
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break at main.cpp before the call to dlopen().
-        # Use lldb's process load command to load the dylib, instead.
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        ctx = self.platformContext
-        dylibName = ctx.shlib_prefix + 'loadunload_a.' + ctx.shlib_extension
-        localDylibPath = self.getBuildArtifact(dylibName)
-        if lldb.remote_platform:
-            wd = lldb.remote_platform.GetWorkingDirectory()
-            remoteDylibPath = lldbutil.join_remote_paths(wd, dylibName)
-        else:
-            remoteDylibPath = localDylibPath
-
-        # Make sure that a_function does not exist at this point.
-        self.expect(
-            "image lookup -n a_function",
-            "a_function should not exist yet",
-            error=True,
-            matching=False,
-            patterns=["1 match found"])
-
-        # Use lldb 'process load' to load the dylib.
-        self.expect(
-            "process load %s --install=%s" % (localDylibPath, remoteDylibPath),
-            "%s loaded correctly" % dylibName,
-            patterns=[
-                'Loading "%s".*ok' % re.escape(localDylibPath),
-                'Image [0-9]+ loaded'])
-
-        # Search for and match the "Image ([0-9]+) loaded" pattern.
-        output = self.res.GetOutput()
-        pattern = re.compile("Image ([0-9]+) loaded")
-        for l in output.split(os.linesep):
-            #print("l:", l)
-            match = pattern.search(l)
-            if match:
-                break
-        index = match.group(1)
-
-        # Now we should have an entry for a_function.
-        self.expect(
-            "image lookup -n a_function",
-            "a_function should now exist",
-            patterns=[
-                "1 match found .*%s" %
-                dylibName])
-
-        # Use lldb 'process unload' to unload the dylib.
-        self.expect(
-            "process unload %s" %
-            index,
-            "%s unloaded correctly" %
-            dylibName,
-            patterns=[
-                "Unloading .* with index %s.*ok" %
-                index])
-
-        self.runCmd("process continue")
-
-    @skipIfFreeBSD  # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
-    def test_load_unload(self):
-        self.setSvr4Support(False)
-        self.run_load_unload()
-
-    @skipIfFreeBSD  # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
-    def test_load_unload_with_svr4(self):
-        self.setSvr4Support(True)
-        self.run_load_unload()
-
-    def run_load_unload(self):
-        """Test breakpoint by name works correctly with dlopen'ing."""
-        self.copy_shlibs_to_remote()
-
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break by function name a_function (not yet loaded).
-        lldbutil.run_break_set_by_symbol(
-            self, "a_function", num_expected_locations=0)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint and at a_function.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'a_function',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        # Issue the 'contnue' command.  We should stop agaian at a_function.
-        # The stop reason of the thread should be breakpoint and at a_function.
-        self.runCmd("continue")
-
-        # rdar://problem/8508987
-        # The a_function breakpoint should be encountered twice.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'a_function',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 2.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 2'])
-
-    @skipIfFreeBSD  # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
-    @skipIfWindows  # Windows doesn't have dlopen and friends, dynamic libraries work differently
-    @expectedFailureAll(archs="aarch64", oslist="linux",
-                        bugnumber="https://bugs.llvm.org/show_bug.cgi?id=27806")
-    def test_step_over_load(self):
-        self.setSvr4Support(False)
-        self.run_step_over_load()
-
-    @skipIfFreeBSD  # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
-    @skipIfWindows  # Windows doesn't have dlopen and friends, dynamic libraries work differently
-    @expectedFailureAll(archs="aarch64", oslist="linux",
-                        bugnumber="https://bugs.llvm.org/show_bug.cgi?id=27806")
-    def test_step_over_load_with_svr4(self):
-        self.setSvr4Support(True)
-        self.run_step_over_load()
-
-    def run_step_over_load(self):
-        """Test stepping over code that loads a shared library works correctly."""
-        self.copy_shlibs_to_remote()
-
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break by function name a_function (not yet loaded).
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint and at a_function.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        self.runCmd(
-            "thread step-over",
-            "Stepping over function that loads library")
-
-        # The stop reason should be step end.
-        self.expect("thread list", "step over succeeded.",
-                    substrs=['stopped',
-                             'stop reason = step over'])
-
-    # We can't find a breakpoint location for d_init before launching because
-    # executable dependencies are resolved relative to the debuggers PWD. Bug?
-    @expectedFailureAll(oslist=["linux"], triple=no_match('aarch64-.*-android'))
-    @skipIfFreeBSD  # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
-    @skipIfWindows  # Windows doesn't have dlopen and friends, dynamic libraries work differently
-    @expectedFailureNetBSD
-    def test_static_init_during_load(self):
-        """Test that we can set breakpoints correctly in static initializers"""
-        self.copy_shlibs_to_remote()
-
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        a_init_bp_num = lldbutil.run_break_set_by_symbol(
-            self, "a_init", num_expected_locations=0)
-        b_init_bp_num = lldbutil.run_break_set_by_symbol(
-            self, "b_init", num_expected_locations=0)
-        d_init_bp_num = lldbutil.run_break_set_by_symbol(
-            self, "d_init", num_expected_locations=1)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'd_init',
-                             'stop reason = breakpoint %d' % d_init_bp_num])
-
-        self.runCmd("continue")
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'b_init',
-                             'stop reason = breakpoint %d' % b_init_bp_num])
-        self.expect("thread backtrace",
-                    substrs=['b_init',
-                             'dlopen',
-                             'main'])
-
-        self.runCmd("continue")
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'a_init',
-                             'stop reason = breakpoint %d' % a_init_bp_num])
-        self.expect("thread backtrace",
-                    substrs=['a_init',
-                             'dlopen',
-                             'main'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/a.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/a.cpp
deleted file mode 100644 (file)
index ec34f9b..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- a.c -----------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-extern int b_function ();
-
-int a_init()
-{
-    return 234;
-}
-
-int a_global = a_init();
-
-extern "C" int
-a_function ()
-{
-    return b_function ();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/b.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/b.cpp
deleted file mode 100644 (file)
index 9db9384..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-//===-- b.c -----------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-int b_init()
-{
-    return 345;
-}
-
-int b_global = b_init();
-
-int
-b_function ()
-{
-    return 500;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/c.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/c.cpp
deleted file mode 100644 (file)
index cf0c146..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-//===-- c.c -----------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-extern "C" int
-c_function ()
-{
-    return 600;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/cmds.txt b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/cmds.txt
deleted file mode 100644 (file)
index 1e4b198..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-breakpoint set -n a_function
-run
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/d.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/d.cpp
deleted file mode 100644 (file)
index a2135c5..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-//===-- c.c -----------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-int d_init()
-{
-    return 123;
-}
-
-int d_global = d_init();
-
-int
-d_function ()
-{ // Find this line number within d_dunction().
-    return 700;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/hidden/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/hidden/Makefile
deleted file mode 100644 (file)
index 17fe658..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-LIB_PREFIX := loadunload_
-
-DYLIB_NAME := $(LIB_PREFIX)d
-DYLIB_CXX_SOURCES := d.cpp
-DYLIB_ONLY := YES
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/hidden/d.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/hidden/d.cpp
deleted file mode 100644 (file)
index d03d3c9..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-//===-- c.c -----------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-int d_init()
-{
-    return 456;
-}
-
-int d_global = d_init();
-
-int
-d_function ()
-{ // Find this line number within d_dunction().
-    return 12345;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/main.cpp
deleted file mode 100644 (file)
index 815f030..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-#include <dlfcn.h>
-#include <limits.h>
-#include <string.h>
-#include <unistd.h>
-#include <libgen.h>
-#include <stdlib.h>
-
-int
-main (int argc, char const *argv[])
-{
-#if defined (__APPLE__)
-    const char *a_name = "@executable_path/libloadunload_a.dylib";
-    const char *c_name = "@executable_path/libloadunload_c.dylib";
-#else
-    const char *a_name = "libloadunload_a.so";
-    const char *c_name = "libloadunload_c.so";
-#endif
-    void *a_dylib_handle = NULL;
-    void *c_dylib_handle = NULL;
-    int (*a_function) (void);
-
-    a_dylib_handle = dlopen (a_name, RTLD_NOW); // Set break point at this line for test_lldb_process_load_and_unload_commands().
-    if (a_dylib_handle == NULL)
-    {
-        fprintf (stderr, "%s\n", dlerror());
-        exit (1);
-    }
-
-    a_function = (int (*) ()) dlsym (a_dylib_handle, "a_function");
-    if (a_function == NULL)
-    {
-        fprintf (stderr, "%s\n", dlerror());
-        exit (2);
-    }
-    printf ("First time around, got: %d\n", a_function ());
-    dlclose (a_dylib_handle);
-
-    c_dylib_handle = dlopen (c_name, RTLD_NOW);
-    if (c_dylib_handle == NULL)
-    {
-        fprintf (stderr, "%s\n", dlerror());
-        exit (3);
-    }
-    a_function = (int (*) ()) dlsym (c_dylib_handle, "c_function");
-    if (a_function == NULL)
-    {
-        fprintf (stderr, "%s\n", dlerror());
-        exit (4);
-    }
-
-    a_dylib_handle = dlopen (a_name, RTLD_NOW);
-    if (a_dylib_handle == NULL)
-    {
-        fprintf (stderr, "%s\n", dlerror());
-        exit (5);
-    }
-
-    a_function = (int (*) ()) dlsym (a_dylib_handle, "a_function");
-    if (a_function == NULL)
-    {
-        fprintf (stderr, "%s\n", dlerror());
-        exit (6);
-    }
-    printf ("Second time around, got: %d\n", a_function ());
-    dlclose (a_dylib_handle);
-
-    int d_function(void);
-    printf ("d_function returns: %d\n", d_function());
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/.categories b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/.categories
deleted file mode 100644 (file)
index c00c258..0000000
+++ /dev/null
@@ -1 +0,0 @@
-basic_process
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/Makefile
deleted file mode 100644 (file)
index 814a960..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-CXX_SOURCES := main.cpp
-USE_LIBDL := 1
-
-all: hidden_lib a.out
-
-include Makefile.rules
-
-hidden_lib:
-       $(MAKE) VPATH=$(SRCDIR)/hidden -C hidden -f $(MAKEFILE_RULES) \
-       DYLIB_ONLY=YES DYLIB_CXX_SOURCES=d.cpp DYLIB_NAME=loadunload
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/TestLoadUsingPaths.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/TestLoadUsingPaths.py
deleted file mode 100644 (file)
index 0adb3d0..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-"""
-Test that SBProcess.LoadImageUsingPaths works correctly.
-"""
-
-
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-@skipIfWindows  # The Windows platform doesn't implement DoLoadImage.
-class LoadUsingPathsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Make the hidden directory in the build hierarchy:
-        lldbutil.mkdir_p(self.getBuildArtifact("hidden"))
-
-        # Invoke the default build rule.
-        self.build()
-
-        ext = 'so'
-        if self.platformIsDarwin():
-            ext = 'dylib'
-        self.lib_name = 'libloadunload.' + ext
-
-        self.wd = os.path.realpath(self.getBuildDir())
-        self.hidden_dir = os.path.join(self.wd, 'hidden')
-        self.hidden_lib = os.path.join(self.hidden_dir, self.lib_name)
-
-    @skipIfFreeBSD  # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
-    @not_remote_testsuite_ready
-    @skipIfWindows  # Windows doesn't have dlopen and friends, dynamic libraries work differently
-    @expectedFlakeyNetBSD
-    def test_load_using_paths(self):
-        """Test that we can load a module by providing a set of search paths."""
-        if self.platformIsDarwin():
-            dylibName = 'libloadunload_d.dylib'
-        else:
-            dylibName = 'libloadunload_d.so'
-
-        # The directory with the dynamic library we did not link to.
-        path_dir = os.path.join(self.getBuildDir(), "hidden")
-
-        (target, process, thread,
-         _) = lldbutil.run_to_source_breakpoint(self,
-                                                "Break here to do the load using paths",
-                                                lldb.SBFileSpec("main.cpp"))
-        error = lldb.SBError()
-        lib_spec = lldb.SBFileSpec(self.lib_name)
-        paths = lldb.SBStringList()
-        paths.AppendString(self.wd)
-        paths.AppendString(os.path.join(self.wd, "no_such_dir"))
-
-        out_spec = lldb.SBFileSpec()
-
-        # First try with no correct directories on the path, and make sure that doesn't blow up:
-        token = process.LoadImageUsingPaths(lib_spec, paths, out_spec, error)
-        self.assertEqual(token, lldb.LLDB_INVALID_IMAGE_TOKEN, "Only looked on the provided path.")
-
-        # Now add the correct dir to the paths list and try again:
-        paths.AppendString(self.hidden_dir)
-        token = process.LoadImageUsingPaths(lib_spec, paths, out_spec, error)
-
-        self.assertNotEqual(token, lldb.LLDB_INVALID_IMAGE_TOKEN, "Got a valid token")
-        self.assertEqual(out_spec, lldb.SBFileSpec(self.hidden_lib), "Found the expected library")
-
-        # Make sure this really is in the image list:
-        loaded_module = target.FindModule(out_spec)
-
-        self.assertTrue(loaded_module.IsValid(), "The loaded module is in the image list.")
-
-        # Now see that we can call a function in the loaded module.
-        value = thread.frames[0].EvaluateExpression("d_function()", lldb.SBExpressionOptions())
-        self.assertTrue(value.GetError().Success(), "Got a value from the expression")
-        ret_val = value.GetValueAsSigned()
-        self.assertEqual(ret_val, 12345, "Got the right value")
-
-        # Make sure the token works to unload it:
-        process.UnloadImage(token)
-
-        # Make sure this really is no longer in the image list:
-        loaded_module = target.FindModule(out_spec)
-
-        self.assertFalse(loaded_module.IsValid(), "The unloaded module is no longer in the image list.")
-
-        # Make sure a relative path also works:
-        paths.Clear()
-        paths.AppendString(os.path.join(self.wd, "no_such_dir"))
-        paths.AppendString(self.wd)
-        relative_spec = lldb.SBFileSpec(os.path.join("hidden", self.lib_name))
-
-        out_spec = lldb.SBFileSpec()
-        token = process.LoadImageUsingPaths(relative_spec, paths, out_spec, error)
-
-        self.assertNotEqual(token, lldb.LLDB_INVALID_IMAGE_TOKEN, "Got a valid token with relative path")
-        self.assertEqual(out_spec, lldb.SBFileSpec(self.hidden_lib), "Found the expected library with relative path")
-
-        process.UnloadImage(token)
-
-        # Make sure the presence of an empty path doesn't mess anything up:
-        paths.Clear()
-        paths.AppendString("")
-        paths.AppendString(os.path.join(self.wd, "no_such_dir"))
-        paths.AppendString(self.wd)
-        relative_spec = lldb.SBFileSpec(os.path.join("hidden", self.lib_name))
-
-        out_spec = lldb.SBFileSpec()
-        token = process.LoadImageUsingPaths(relative_spec, paths, out_spec, error)
-
-        self.assertNotEqual(token, lldb.LLDB_INVALID_IMAGE_TOKEN, "Got a valid token with included empty path")
-        self.assertEqual(out_spec, lldb.SBFileSpec(self.hidden_lib), "Found the expected library with included empty path")
-
-        process.UnloadImage(token)
-
-
-
-        # Finally, passing in an absolute path should work like the basename:
-        # This should NOT work because we've taken hidden_dir off the paths:
-        abs_spec = lldb.SBFileSpec(os.path.join(self.hidden_dir, self.lib_name))
-
-        token = process.LoadImageUsingPaths(lib_spec, paths, out_spec, error)
-        self.assertEqual(token, lldb.LLDB_INVALID_IMAGE_TOKEN, "Only looked on the provided path.")
-
-        # But it should work when we add the dir:
-        # Now add the correct dir to the paths list and try again:
-        paths.AppendString(self.hidden_dir)
-        token = process.LoadImageUsingPaths(lib_spec, paths, out_spec, error)
-
-        self.assertNotEqual(token, lldb.LLDB_INVALID_IMAGE_TOKEN, "Got a valid token")
-        self.assertEqual(out_spec, lldb.SBFileSpec(self.hidden_lib), "Found the expected library")
-
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/hidden/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/hidden/Makefile
deleted file mode 100644 (file)
index 5e22c8a..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-DYLIB_NAME := loadunload
-DYLIB_CXX_SOURCES := d.cpp
-DYLIB_ONLY := YES
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/hidden/d.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/hidden/d.cpp
deleted file mode 100644 (file)
index d03d3c9..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-//===-- c.c -----------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-int d_init()
-{
-    return 456;
-}
-
-int d_global = d_init();
-
-int
-d_function ()
-{ // Find this line number within d_dunction().
-    return 12345;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/main.cpp
deleted file mode 100644 (file)
index 432774d..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-int
-main (int argc, char const *argv[])
-{
-    printf("Break here to do the load using paths.");
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/longjmp/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/longjmp/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/longjmp/TestLongjmp.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/longjmp/TestLongjmp.py
deleted file mode 100644 (file)
index fa7ffa6..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-"""
-Test the use of setjmp/longjmp for non-local goto operations in a single-threaded inferior.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class LongjmpTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfDarwin  # llvm.org/pr16769: LLDB on Mac OS X dies in function ReadRegisterBytes in GDBRemoteRegisterContext.cpp
-    @skipIfFreeBSD  # llvm.org/pr17214
-    @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr20231")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
-    @expectedFlakeyNetBSD
-    def test_step_out(self):
-        """Test stepping when the inferior calls setjmp/longjmp, in particular, thread step-out."""
-        self.build()
-        self.step_out()
-
-    @skipIfDarwin  # llvm.org/pr16769: LLDB on Mac OS X dies in function ReadRegisterBytes in GDBRemoteRegisterContext.cpp
-    @skipIfFreeBSD  # llvm.org/pr17214
-    @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr20231")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
-    @skipIfNetBSD
-    def test_step_over(self):
-        """Test stepping when the inferior calls setjmp/longjmp, in particular, thread step-over a longjmp."""
-        self.build()
-        self.step_over()
-
-    @skipIfDarwin  # llvm.org/pr16769: LLDB on Mac OS X dies in function ReadRegisterBytes in GDBRemoteRegisterContext.cpp
-    @skipIfFreeBSD  # llvm.org/pr17214
-    @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr20231")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
-    @expectedFlakeyNetBSD
-    def test_step_back_out(self):
-        """Test stepping when the inferior calls setjmp/longjmp, in particular, thread step-out after thread step-in."""
-        self.build()
-        self.step_back_out()
-
-    def start_test(self, symbol):
-        exe = self.getBuildArtifact("a.out")
-
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break in main().
-        lldbutil.run_break_set_by_symbol(
-            self, symbol, num_expected_locations=-1)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped', 'stop reason = breakpoint'])
-
-    def check_status(self):
-        # Note: Depending on the generated mapping of DWARF to assembly,
-        # the process may have stopped or exited.
-        self.expect("process status", PROCESS_STOPPED,
-                    patterns=['Process .* exited with status = 0'])
-
-    def step_out(self):
-        self.start_test("do_jump")
-        self.runCmd("thread step-out", RUN_SUCCEEDED)
-        self.check_status()
-
-    def step_over(self):
-        self.start_test("do_jump")
-        self.runCmd("thread step-over", RUN_SUCCEEDED)
-        self.runCmd("thread step-over", RUN_SUCCEEDED)
-        self.check_status()
-
-    def step_back_out(self):
-        self.start_test("main")
-
-        self.runCmd("thread step-over", RUN_SUCCEEDED)
-        self.runCmd("thread step-in", RUN_SUCCEEDED)
-        self.runCmd("thread step-out", RUN_SUCCEEDED)
-        self.check_status()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/longjmp/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/longjmp/main.c
deleted file mode 100644 (file)
index ce1af70..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <setjmp.h>
-#include <stdio.h>
-#include <time.h>
-
-jmp_buf j;
-
-void do_jump(void)
-{
-    // We can't let the compiler know this will always happen or it might make
-    // optimizations that break our test.
-    if (!clock())
-        longjmp(j, 1); // non-local goto
-}
-
-int main (void)
-{
-    if (setjmp(j) == 0)
-        do_jump();
-    else
-        return 0; // destination of longjmp
-
-    return 1;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory-region/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory-region/Makefile
deleted file mode 100644 (file)
index 31f2d5e..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
-
-clean::
-       rm -rf $(wildcard *.o *.d *.dSYM)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory-region/TestMemoryRegion.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory-region/TestMemoryRegion.py
deleted file mode 100644 (file)
index 283cc94..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-"""
-Test the 'memory region' command.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class MemoryCommandRegion(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        TestBase.setUp(self)
-        # Find the line number to break for main.c.
-        self.line = line_number(
-            'main.cpp',
-            '// Run here before printing memory regions')
-
-    def test(self):
-        self.build()
-
-        # Set breakpoint in main and run
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        interp = self.dbg.GetCommandInterpreter()
-        result = lldb.SBCommandReturnObject()
-
-        # Test that the first 'memory region' command prints the usage.
-        interp.HandleCommand("memory region", result)
-        self.assertFalse(result.Succeeded())
-        self.assertRegexpMatches(result.GetError(), "Usage: memory region ADDR")
-
-        # Now let's print the memory region starting at 0 which should always work.
-        interp.HandleCommand("memory region 0x0", result)
-        self.assertTrue(result.Succeeded())
-        self.assertRegexpMatches(result.GetOutput(), "\\[0x0+-")
-
-        # Keep printing memory regions until we printed all of them.
-        while True:
-            interp.HandleCommand("memory region", result)
-            if not result.Succeeded():
-                break
-
-        # Now that we reached the end, 'memory region' should again print the usage.
-        interp.HandleCommand("memory region", result)
-        self.assertFalse(result.Succeeded())
-        self.assertRegexpMatches(result.GetError(), "Usage: memory region ADDR")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory-region/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory-region/main.cpp
deleted file mode 100644 (file)
index 116c10a..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <iostream>
-
-int main (int argc, char const **argv) {
-  std::cout << "Program with sections" << std::endl;
-  return 0; // Run here before printing memory regions
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory/cache/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory/cache/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory/cache/TestMemoryCache.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory/cache/TestMemoryCache.py
deleted file mode 100644 (file)
index 8a15234..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-"""
-Test the MemoryCache L1 flush.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class MemoryCacheTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    @skipIfWindows # This is flakey on Windows: llvm.org/pr38373
-    def test_memory_cache(self):
-        """Test the MemoryCache class with a sequence of 'memory read' and 'memory write' operations."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break in main() after the variables are assigned values.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped', 'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        # Read a chunk of memory containing &my_ints[0]. The number of bytes read
-        # must be greater than m_L2_cache_line_byte_size to make sure the L1
-        # cache is used.
-        self.runCmd('memory read -f d -c 201 `&my_ints - 100`')
-
-        # Check the value of my_ints[0] is the same as set in main.cpp.
-        line = self.res.GetOutput().splitlines()[100]
-        self.assertTrue(0x00000042 == int(line.split(':')[1], 0))
-
-        # Change the value of my_ints[0] in memory.
-        self.runCmd("memory write -s 4 `&my_ints` AA")
-
-        # Re-read the chunk of memory. The cache line should have been
-        # flushed because of the 'memory write'.
-        self.runCmd('memory read -f d -c 201 `&my_ints - 100`')
-
-        # Check the value of my_ints[0] have been updated correctly.
-        line = self.res.GetOutput().splitlines()[100]
-        self.assertTrue(0x000000AA == int(line.split(':')[1], 0))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory/cache/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory/cache/main.cpp
deleted file mode 100644 (file)
index d47107c..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-int main ()
-{
-    int my_ints[] = {0x42};
-    return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory/find/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory/find/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory/find/TestMemoryFind.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory/find/TestMemoryFind.py
deleted file mode 100644 (file)
index 66d4366..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-"""
-Test the 'memory find' command.
-"""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.decorators import *
-
-
-class MemoryFindTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line = line_number('main.cpp', '// break here')
-
-    def test_memory_find(self):
-        """Test the 'memory find' command."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break in main() after the variables are assigned values.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped', 'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        # Test the memory find commands.
-
-        self.expect(
-            'memory find -s "in const" `stringdata` `stringdata+(int)strlen(stringdata)`',
-            substrs=[
-                'data found at location: 0x',
-                '69 6e 20 63',
-                'in const'])
-
-        self.expect(
-            'memory find -e "(uint8_t)0x22" `&bytedata[0]` `&bytedata[15]`',
-            substrs=[
-                'data found at location: 0x',
-                '22 33 44 55 66'])
-
-        self.expect(
-            'memory find -e "(uint8_t)0x22" `&bytedata[0]` `&bytedata[2]`',
-            substrs=['data not found within the range.'])
-
-        self.expect('memory find -s "nothere" `stringdata` `stringdata+5`',
-                    substrs=['data not found within the range.'])
-
-        self.expect('memory find -s "nothere" `stringdata` `stringdata+10`',
-                    substrs=['data not found within the range.'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory/find/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory/find/main.cpp
deleted file mode 100644 (file)
index 5f4545d..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-#include <stdint.h>
-
-int main (int argc, char const *argv[])
-{
-    const char* stringdata = "hello world; I like to write text in const char pointers";
-    uint8_t bytedata[] = {0xAA,0xBB,0xCC,0xDD,0xEE,0xFF,0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x88,0x99};
-    return 0; // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory/read/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory/read/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory/read/TestMemoryRead.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory/read/TestMemoryRead.py
deleted file mode 100644 (file)
index 72d55df..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-"""
-Test the 'memory read' command.
-"""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class MemoryReadTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    def test_memory_read(self):
-        """Test the 'memory read' command with plain and vector formats."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break in main() after the variables are assigned values.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped', 'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        # Test the memory read commands.
-
-        # (lldb) memory read -f d -c 1 `&argc`
-        # 0x7fff5fbff9a0: 1
-        self.runCmd("memory read -f d -c 1 `&argc`")
-
-        # Find the starting address for variable 'argc' to verify later that the
-        # '--format uint32_t[] --size 4 --count 4' option increments the address
-        # correctly.
-        line = self.res.GetOutput().splitlines()[0]
-        items = line.split(':')
-        address = int(items[0], 0)
-        argc = int(items[1], 0)
-        self.assertTrue(address > 0 and argc == 1)
-
-        # (lldb) memory read --format uint32_t[] --size 4 --count 4 `&argc`
-        # 0x7fff5fbff9a0: {0x00000001}
-        # 0x7fff5fbff9a4: {0x00000000}
-        # 0x7fff5fbff9a8: {0x0ec0bf27}
-        # 0x7fff5fbff9ac: {0x215db505}
-        self.runCmd(
-            "memory read --format uint32_t[] --size 4 --count 4 `&argc`")
-        lines = self.res.GetOutput().splitlines()
-        for i in range(4):
-            if i == 0:
-                # Verify that the printout for argc is correct.
-                self.assertTrue(
-                    argc == int(
-                        lines[i].split(':')[1].strip(' {}'), 0))
-            addr = int(lines[i].split(':')[0], 0)
-            # Verify that the printout for addr is incremented correctly.
-            self.assertTrue(addr == (address + i * 4))
-
-        # (lldb) memory read --format char[] --size 7 --count 1 `&my_string`
-        # 0x7fff5fbff990: {abcdefg}
-        self.expect(
-            "memory read --format char[] --size 7 --count 1 `&my_string`",
-            substrs=['abcdefg'])
-
-        # (lldb) memory read --format 'hex float' --size 16 `&argc`
-        # 0x7fff5fbff5b0: error: unsupported byte size (16) for hex float
-        # format
-        self.expect(
-            "memory read --format 'hex float' --size 16 `&argc`",
-            substrs=['unsupported byte size (16) for hex float format'])
-
-        self.expect(
-            "memory read --format 'float' --count 1 --size 8 `&my_double`",
-            substrs=['1234.'])
-
-        # (lldb) memory read --format 'float' --count 1 --size 20 `&my_double`
-        # 0x7fff5fbff598: error: unsupported byte size (20) for float format
-        self.expect(
-            "memory read --format 'float' --count 1 --size 20 `&my_double`",
-            substrs=['unsupported byte size (20) for float format'])
-
-        self.expect('memory read --type int --count 5 `&my_ints[0]`',
-                    substrs=['(int) 0x', '2', '4', '6', '8', '10'])
-
-        self.expect(
-            'memory read --type int --count 5 --format hex `&my_ints[0]`',
-            substrs=[
-                '(int) 0x',
-                '0x',
-                '0a'])
-
-        self.expect(
-            'memory read --type int --count 5 --offset 5 `&my_ints[0]`',
-            substrs=[
-                '(int) 0x',
-                '12',
-                '14',
-                '16',
-                '18',
-                '20'])
-
-        # the gdb format specifier and the size in characters for
-        # the returned values including the 0x prefix.
-        variations = [['b', 4], ['h', 6], ['w', 10], ['g', 18]]
-        for v in variations:
-          formatter = v[0]
-          expected_object_length = v[1]
-          self.runCmd(
-              "memory read --gdb-format 4%s &my_uint64s" % formatter)
-          lines = self.res.GetOutput().splitlines()
-          objects_read = []
-          for l in lines:
-              objects_read.extend(l.split(':')[1].split())
-          # Check that we got back 4 0x0000 etc bytes
-          for o in objects_read:
-              self.assertTrue (len(o) == expected_object_length)
-          self.assertTrue(len(objects_read) == 4)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory/read/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/memory/read/main.cpp
deleted file mode 100644 (file)
index 3c1ab5e..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-#include <stdint.h>
-
-int main (int argc, char const *argv[])
-{
-    char my_string[] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 0};
-    double my_double = 1234.5678;
-    int my_ints[] = {2,4,6,8,10,12,14,16,18,20,22};
-    uint64_t my_uint64s[] = {0, 1, 2, 3, 4, 5, 6, 7};
-    printf("my_string=%s\n", my_string); // Set break point at this line.
-    printf("my_double=%g\n", my_double);
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/Makefile
deleted file mode 100644 (file)
index f27f57a..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-OBJC_SOURCES := main.m
-UI_FRAMEWORK = AppKit
-
-ifneq ("$(SDKROOT)", "")
-       ifeq (,$(findstring macOS,$(SDKROOT)))
-               ifeq (,$(findstring MacOS,$(SDKROOT)))
-                       UI_FRAMEWORK = UIKit
-               endif
-       endif
-endif
-
-LD_EXTRAS = -lobjc -framework Foundation -framework $(UI_FRAMEWORK)
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/TestMTCSimple.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/TestMTCSimple.py
deleted file mode 100644 (file)
index e3751e0..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-"""
-Tests basic Main Thread Checker support (detecting a main-thread-only violation).
-"""
-
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbplatformutil import *
-import json
-
-
-class MTCSimpleTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    def test(self):
-        self.mtc_dylib_path = findMainThreadCheckerDylib()
-        if self.mtc_dylib_path == "":
-            self.skipTest("This test requires libMainThreadChecker.dylib")
-
-        self.build()
-        self.mtc_tests()
-
-    @skipIf(archs=['i386'])
-    def mtc_tests(self):
-        self.assertTrue(self.mtc_dylib_path != "")
-
-        # Load the test
-        exe = self.getBuildArtifact("a.out")
-        self.expect("file " + exe, patterns=["Current executable set to .*a.out"])
-
-        self.runCmd("env DYLD_INSERT_LIBRARIES=%s" % self.mtc_dylib_path)
-        self.runCmd("run")
-
-        process = self.dbg.GetSelectedTarget().process
-        thread = process.GetSelectedThread()
-        frame = thread.GetSelectedFrame()
-
-        view = "NSView" if lldbplatformutil.getPlatform() == "macosx" else "UIView"
-
-        self.expect("thread info",
-                    substrs=['stop reason = -[' + view +
-                             ' superview] must be used from main thread only'])
-
-        self.expect(
-            "thread info -s",
-            substrs=["instrumentation_class", "api_name", "class_name", "selector", "description"])
-        self.assertEqual(thread.GetStopReason(), lldb.eStopReasonInstrumentation)
-        output_lines = self.res.GetOutput().split('\n')
-        json_line = '\n'.join(output_lines[2:])
-        data = json.loads(json_line)
-        self.assertEqual(data["instrumentation_class"], "MainThreadChecker")
-        self.assertEqual(data["api_name"], "-[" + view + " superview]")
-        self.assertEqual(data["class_name"], view)
-        self.assertEqual(data["selector"], "superview")
-        self.assertEqual(data["description"], "-[" + view + " superview] must be used from main thread only")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/main.m
deleted file mode 100644 (file)
index a967dee..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#import <Foundation/Foundation.h>
-#if __has_include(<AppKit/AppKit.h>)
-#import <AppKit/AppKit.h>
-#define XXView NSView
-#else
-#import <UIKit/UIKit.h>
-#define XXView UIView
-#endif
-
-int main() {
-  XXView *view = [[XXView alloc] init];
-  dispatch_group_t g = dispatch_group_create();
-  dispatch_group_enter(g);
-  [NSThread detachNewThreadWithBlock:^{
-    @autoreleasepool {
-      [view superview];
-    }
-    dispatch_group_leave(g);
-  }];
-  dispatch_group_wait(g, DISPATCH_TIME_FOREVER);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/multidebugger_commands/TestMultipleDebuggersCommands.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/multidebugger_commands/TestMultipleDebuggersCommands.py
deleted file mode 100644 (file)
index 8459507..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-"""
-Test that commands do not try and hold on to stale CommandInterpreters in a multiple debuggers scenario
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class MultipleDebuggersCommandsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    def test_multipledebuggers_commands(self):
-        """Test that commands do not try and hold on to stale CommandInterpreters in a multiple debuggers scenario"""
-        source_init_files = False
-        magic_text = "The following commands may relate to 'env'"
-
-        debugger_1 = lldb.SBDebugger.Create(source_init_files)
-        interpreter_1 = debugger_1.GetCommandInterpreter()
-
-        retobj = lldb.SBCommandReturnObject()
-        interpreter_1.HandleCommand("apropos env", retobj)
-        self.assertTrue(
-            magic_text in str(retobj),
-            "[interpreter_1]: the output does not contain the correct words")
-
-        if self.TraceOn():
-            print(str(retobj))
-
-        lldb.SBDebugger.Destroy(debugger_1)
-
-        # now do this again with a different debugger - we shouldn't crash
-
-        debugger_2 = lldb.SBDebugger.Create(source_init_files)
-        interpreter_2 = debugger_2.GetCommandInterpreter()
-
-        retobj = lldb.SBCommandReturnObject()
-        interpreter_2.HandleCommand("apropos env", retobj)
-        self.assertTrue(
-            magic_text in str(retobj),
-            "[interpreter_2]: the output does not contain the correct words")
-
-        if self.TraceOn():
-            print(str(retobj))
-
-        lldb.SBDebugger.Destroy(debugger_2)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/multiword-commands/TestMultiWordCommands.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/multiword-commands/TestMultiWordCommands.py
deleted file mode 100644 (file)
index 80b144f..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-"""
-Test multiword commands ('platform' in this case).
-"""
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-
-class MultiwordCommandsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    def test_ambiguous_subcommand(self):
-        self.expect("platform s", error=True,
-                    substrs=["ambiguous command 'platform s'. Possible completions:",
-                             "\tselect\n",
-                             "\tshell\n",
-                             "\tsettings\n"])
-
-    @no_debug_info_test
-    def test_empty_subcommand(self):
-        self.expect("platform \"\"", error=True, substrs=["Need to specify a non-empty subcommand."])
-
-    @no_debug_info_test
-    def test_help(self):
-        # <multiword> help brings up help.
-        self.expect("platform help",
-                    substrs=["Commands to manage and create platforms.",
-                             "Syntax: platform [",
-                             "The following subcommands are supported:",
-                             "connect",
-                             "Select the current platform"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/non-overlapping-index-variable-i/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/non-overlapping-index-variable-i/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/non-overlapping-index-variable-i/TestIndexVariable.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/non-overlapping-index-variable-i/TestIndexVariable.py
deleted file mode 100644 (file)
index d5424c0..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-"""Test evaluating expressions which ref. index variable 'i' which just goes
-from out of scope to in scope when stopped at the breakpoint."""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class NonOverlappingIndexVariableCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        TestBase.setUp(self)
-        self.source = 'main.cpp'
-        self.line_to_break = line_number(
-            self.source, '// Set breakpoint here.')
-
-    # rdar://problem/9890530
-    def test_eval_index_variable(self):
-        """Test expressions of variable 'i' which appears in two for loops."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"),
-                    CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            self.source,
-            self.line_to_break,
-            num_expected_locations=1,
-            loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        self.runCmd('frame variable i')
-        self.runCmd('expr i')
-        self.runCmd('expr ptr[0]->point.x')
-        self.runCmd('expr ptr[0]->point.y')
-        self.runCmd('expr ptr[i]->point.x')
-        self.runCmd('expr ptr[i]->point.y')
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/non-overlapping-index-variable-i/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/non-overlapping-index-variable-i/main.cpp
deleted file mode 100644 (file)
index 2b8406a..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-class Point {
-public:
-    int x;
-    int y;
-    Point(int a, int b):
-        x(a),
-        y(b)
-    {}
-};
-
-class Data {
-public:
-    int id;
-    Point point;
-    Data(int i):
-        id(i),
-        point(0, 0)
-    {}
-};
-
-int main(int argc, char const *argv[]) {
-    Data *data[1000];
-    Data **ptr = data;
-    for (int i = 0; i < 1000; ++i) {
-        ptr[i] = new Data(i);
-        ptr[i]->point.x = i;
-        ptr[i]->point.y = i+1;
-    }
-
-    for (int i = 0; i < 1000; ++i) {
-        bool dump = argc > 1; // Set breakpoint here.
-                              // Evaluate a couple of expressions (2*1000 = 2000 exprs):
-                              // expr ptr[i]->point.x
-                              // expr ptr[i]->point.y
-    }
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py
deleted file mode 100644 (file)
index 1ad90e4..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-"""
-Test lldb 'image list' on object files across multiple architectures.
-This exercises classes like ObjectFileELF and their support for opening
-foreign-architecture object files.
-"""
-
-
-
-import os.path
-import re
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestImageListMultiArchitecture(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    @skipIfRemote
-    def test_image_list_shows_multiple_architectures(self):
-        """Test that image list properly shows the correct architecture for a set of different architecture object files."""
-        images = {
-            "hello-freebsd-10.0-x86_64-clang-3.3": re.compile(r"x86_64-(\*)?-freebsd10.0(-unknown)? x86_64"),
-            "hello-freebsd-10.0-x86_64-gcc-4.7.3": re.compile(r"x86_64-(\*)?-freebsd10.0(-unknown)? x86_64"),
-            "hello-netbsd-6.1-x86_64-gcc-4.5.3": re.compile(r"x86_64-(\*)?-netbsd6.1.4(-unknown)? x86_64"),
-            "hello-ubuntu-14.04-x86_64-gcc-4.8.2": re.compile(r"x86_64-(\*)?-linux(-unknown)? x86_64"),
-            "hello-ubuntu-14.04-x86_64-clang-3.5pre": re.compile(r"x86_64-(\*)?-linux(-unknown)? x86_64"),
-        }
-
-        for image_name in images:
-            file_name = os.path.abspath(
-                os.path.join(
-                    os.path.dirname(__file__),
-                    "bin",
-                    image_name))
-            expected_triple_and_arch_regex = images[image_name]
-
-            self.runCmd("file {}".format(file_name))
-            self.match("image list -t -A", [expected_triple_and_arch_regex])
-        # Revert to the host platform after all of this is done
-        self.runCmd("platform select host")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello-freebsd-10.0-x86_64-clang-3.3 b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello-freebsd-10.0-x86_64-clang-3.3
deleted file mode 100644 (file)
index cea3236..0000000
Binary files a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello-freebsd-10.0-x86_64-clang-3.3 and /dev/null differ
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello-freebsd-10.0-x86_64-gcc-4.7.3 b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello-freebsd-10.0-x86_64-gcc-4.7.3
deleted file mode 100644 (file)
index 38f43f8..0000000
Binary files a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello-freebsd-10.0-x86_64-gcc-4.7.3 and /dev/null differ
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello-netbsd-6.1-x86_64-gcc-4.5.3 b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello-netbsd-6.1-x86_64-gcc-4.5.3
deleted file mode 100644 (file)
index 6d53132..0000000
Binary files a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello-netbsd-6.1-x86_64-gcc-4.5.3 and /dev/null differ
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello-ubuntu-14.04-x86_64-clang-3.5pre b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello-ubuntu-14.04-x86_64-clang-3.5pre
deleted file mode 100644 (file)
index 8bdcf4d..0000000
Binary files a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello-ubuntu-14.04-x86_64-clang-3.5pre and /dev/null differ
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello-ubuntu-14.04-x86_64-gcc-4.8.2 b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello-ubuntu-14.04-x86_64-gcc-4.8.2
deleted file mode 100644 (file)
index 01efbb0..0000000
Binary files a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello-ubuntu-14.04-x86_64-gcc-4.8.2 and /dev/null differ
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello-unknown-kalimba_arch4-kcc-36 b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello-unknown-kalimba_arch4-kcc-36
deleted file mode 100644 (file)
index 8e4dd8c..0000000
Binary files a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello-unknown-kalimba_arch4-kcc-36 and /dev/null differ
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello-unknown-kalimba_arch5-kcc-39 b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello-unknown-kalimba_arch5-kcc-39
deleted file mode 100644 (file)
index f80268a..0000000
Binary files a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello-unknown-kalimba_arch5-kcc-39 and /dev/null differ
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello.c
deleted file mode 100644 (file)
index 8c80400..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <stdio.h>
-
-int main(int argc, char **argv)
-{
-       printf("Hello, world\n");
-       return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/object-file/bin/hello.cpp
deleted file mode 100644 (file)
index 8c80400..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <stdio.h>
-
-int main(int argc, char **argv)
-{
-       printf("Hello, world\n");
-       return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/param_entry_vals/basic_entry_values_x86_64/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/param_entry_vals/basic_entry_values_x86_64/Makefile
deleted file mode 100644 (file)
index db8fa57..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-CXXFLAGS_EXTRAS := -O2 -glldb -Xclang -femit-debug-entry-values
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/param_entry_vals/basic_entry_values_x86_64/TestBasicEntryValuesX86_64.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/param_entry_vals/basic_entry_values_x86_64/TestBasicEntryValuesX86_64.py
deleted file mode 100644 (file)
index e0285e6..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-from lldbsuite.test import lldbplatformutil
-
-supported_platforms = ["linux"]
-supported_platforms.extend(lldbplatformutil.getDarwinOSTriples())
-
-lldbinline.MakeInlineTest(__file__, globals(),
-        [decorators.skipUnlessPlatform(supported_platforms),
-         decorators.skipIf(compiler="clang", compiler_version=['<', '10.0']),
-         decorators.skipUnlessArch('x86_64'),
-         decorators.skipUnlessHasCallSiteInfo,
-         decorators.skipIf(dwarf_version=['<', '4'])])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/param_entry_vals/basic_entry_values_x86_64/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/param_entry_vals/basic_entry_values_x86_64/main.cpp
deleted file mode 100644 (file)
index 9aac6e9..0000000
+++ /dev/null
@@ -1,248 +0,0 @@
-// Note: This test requires the SysV AMD64 ABI to be in use, and requires
-// compiler support for DWARF entry values.
-
-// Inhibit dead-arg-elim by using 'x'.
-template<typename T> __attribute__((noinline)) void use(T x) {
-  asm volatile (""
-      /* Outputs */  :
-      /* Inputs */   : "g"(x)
-      /* Clobbers */ :
-  );
-}
-
-// Destroy %rsi in the current frame.
-#define DESTROY_RSI \
-  asm volatile ("xorq %%rsi, %%rsi" \
-      /* Outputs */  : \
-      /* Inputs */   : \
-      /* Clobbers */ : "rsi" \
-  );
-
-// Destroy %rbx in the current frame.
-#define DESTROY_RBX \
-  asm volatile ("xorq %%rbx, %%rbx" \
-      /* Outputs */  : \
-      /* Inputs */   : \
-      /* Clobbers */ : "rbx" \
-  );
-
-struct S1 {
-  int field1 = 123;
-  int *field2 = &field1;
-};
-
-__attribute__((noinline))
-void func1(int &sink, int x) {
-  use(x);
-
-  // Destroy 'x' in the current frame.
-  DESTROY_RSI;
-
-  // NOTE: Currently, we do not generate DW_OP_entry_value for the 'x',
-  // since it gets copied into a register that is not callee saved,
-  // and we can not guarantee that its value has not changed.
-
-  ++sink;
-
-  // Destroy 'sink' in the current frame.
-  DESTROY_RBX;
-
-  //% self.filecheck("image lookup -va $pc", "main.cpp", "-check-prefix=FUNC1-DESC")
-  // FUNC1-DESC: name = "sink", type = "int &", location = DW_OP_entry_value(DW_OP_reg5 RDI)
-}
-
-__attribute__((noinline))
-void func2(int &sink, int x) {
-  use(x);
-
-  // Destroy 'x' in the current frame.
-  DESTROY_RSI;
-
-  //% self.filecheck("expr x", "main.cpp", "-check-prefix=FUNC2-EXPR-FAIL", expect_cmd_failure=True)
-  // FUNC2-EXPR-FAIL: couldn't get the value of variable x: variable not available
-
-  ++sink;
-
-  // Destroy 'sink' in the current frame.
-  DESTROY_RBX;
-
-  //% self.filecheck("expr sink", "main.cpp", "-check-prefix=FUNC2-EXPR")
-  // FUNC2-EXPR: ${{.*}} = 2
-}
-
-__attribute__((noinline))
-void func3(int &sink, int *p) {
-  use(p);
-
-  // Destroy 'p' in the current frame.
-  DESTROY_RSI;
-
-  //% self.filecheck("expr *p", "main.cpp", "-check-prefix=FUNC3-EXPR")
-  // FUNC3-EXPR: (int) ${{.*}} = 123
-
-  ++sink;
-}
-
-__attribute__((noinline))
-void func4_amb(int &sink, int x) {
-  use(x);
-
-  // Destroy 'x' in the current frame.
-  DESTROY_RSI;
-
-  //% self.filecheck("expr x", "main.cpp", "-check-prefix=FUNC4-EXPR-FAIL", expect_cmd_failure=True)
-  // FUNC4-EXPR-FAIL: couldn't get the value of variable x: variable not available
-
-  ++sink;
-
-  // Destroy 'sink' in the current frame.
-  DESTROY_RBX;
-
-  //% self.filecheck("expr sink", "main.cpp", "-check-prefix=FUNC4-EXPR", expect_cmd_failure=True)
-  // FUNC4-EXPR: couldn't get the value of variable sink: Could not evaluate DW_OP_entry_value.
-}
-
-__attribute__((noinline))
-void func5_amb() {}
-
-__attribute__((noinline))
-void func6(int &sink, int x) {
-  if (sink > 0)
-    func4_amb(sink, x); /* tail (taken) */
-  else
-    func5_amb(); /* tail */
-}
-
-__attribute__((noinline))
-void func7(int &sink, int x) {
-  //% self.filecheck("bt", "main.cpp", "-check-prefix=FUNC7-BT")
-  // FUNC7-BT: func7
-  // FUNC7-BT-NEXT: [inlined] func8_inlined
-  // FUNC7-BT-NEXT: [inlined] func9_inlined
-  // FUNC7-BT-NEXT: func10
-  use(x);
-
-  // Destroy 'x' in the current frame.
-  DESTROY_RSI;
-
-  //% self.filecheck("expr x", "main.cpp", "-check-prefix=FUNC7-EXPR-FAIL", expect_cmd_failure=True)
-  // FUNC7-EXPR-FAIL: couldn't get the value of variable x: variable not available
-
-  ++sink;
-
-  // Destroy 'sink' in the current frame.
-  DESTROY_RBX;
-
-  //% self.filecheck("expr sink", "main.cpp", "-check-prefix=FUNC7-EXPR")
-  // FUNC7-EXPR: ${{.*}} = 4
-}
-
-__attribute__((always_inline))
-void func8_inlined(int &sink, int x) {
-  func7(sink, x);
-}
-
-__attribute__((always_inline))
-void func9_inlined(int &sink, int x) {
-  func8_inlined(sink, x);
-}
-
-__attribute__((noinline, disable_tail_calls))
-void func10(int &sink, int x) {
-  func9_inlined(sink, x);
-}
-
-__attribute__((noinline))
-void func11_tailcalled(int &sink, int x) {
-  //% self.filecheck("bt", "main.cpp", "-check-prefix=FUNC11-BT")
-  // FUNC11-BT: func11_tailcalled{{.*}}
-  // FUNC11-BT-NEXT: func12{{.*}} [artificial]
-  use(x);
-
-  // Destroy 'x' in the current frame.
-  DESTROY_RSI;
-
-  //% self.filecheck("expr x", "main.cpp", "-check-prefix=FUNC11-EXPR-FAIL", expect_cmd_failure=True)
-  // FUNC11-EXPR-FAIL: couldn't get the value of variable x: variable not available
-
-  ++sink;
-
-  // Destroy 'sink' in the current frame.
-  DESTROY_RBX;
-
-  //% self.filecheck("expr sink", "main.cpp", "-check-prefix=FUNC11-EXPR")
-  // FUNC11-EXPR: ${{.*}} = 5
-}
-
-__attribute__((noinline))
-void func12(int &sink, int x) {
-  func11_tailcalled(sink, x);
-}
-
-__attribute__((noinline))
-void func13(int &sink, int x) {
-  //% self.filecheck("bt", "main.cpp", "-check-prefix=FUNC13-BT")
-  // FUNC13-BT: func13{{.*}}
-  // FUNC13-BT-NEXT: func14{{.*}}
-  use(x);
-
-  // Destroy 'x' in the current frame.
-  DESTROY_RSI;
-
-  //% self.filecheck("expr x", "main.cpp", "-check-prefix=FUNC13-EXPR-FAIL", expect_cmd_failure=True)
-  // FUNC13-EXPR-FAIL: couldn't get the value of variable x: variable not available
-
-  use(sink);
-
-  // Destroy 'sink' in the current frame.
-  DESTROY_RBX;
-
-  //% self.filecheck("expr sink", "main.cpp", "-check-prefix=FUNC13-EXPR")
-  // FUNC13-EXPR: ${{.*}} = 5
-}
-
-__attribute__((noinline, disable_tail_calls))
-void func14(int &sink, void (*target_no_tailcall)(int &, int)) {
-  // Move the call target into a register that won't get clobbered. Do this
-  // by calling the same indirect target twice, and hoping that regalloc is
-  // 'smart' enough to stash the call target in a non-clobbered register.
-  //
-  // llvm.org/PR43926 tracks work in the compiler to emit call targets which
-  // describe non-clobbered values.
-  target_no_tailcall(sink, 123);
-  target_no_tailcall(sink, 123);
-}
-
-__attribute__((disable_tail_calls))
-int main() {
-  int sink = 0;
-  S1 s1;
-
-  // Test location dumping for DW_OP_entry_value.
-  func1(sink, 123);
-
-  // Test evaluation of "DW_OP_constu" in the parent frame.
-  func2(sink, 123);
-
-  // Test evaluation of "DW_OP_fbreg -24, DW_OP_deref" in the parent frame.
-  // Disabled for now, see: llvm.org/PR43343
-#if 0
-  func3(sink, s1.field2);
-#endif
-
-  // The sequences `main -> func4 -> func{5,6}_amb -> sink` are both plausible.
-  // Test that lldb doesn't attempt to guess which one occurred: entry value
-  // evaluation should fail.
-  func6(sink, 123);
-
-  // Test that evaluation can "see through" inlining.
-  func10(sink, 123);
-
-  // Test that evaluation can "see through" tail calls.
-  func12(sink, 123);
-
-  // Test that evaluation can "see through" an indirect tail call.
-  func14(sink, func13);
-
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py
deleted file mode 100644 (file)
index 5c21622..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-"""
-Test some lldb command abbreviations.
-"""
-
-
-import lldb
-import os
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestPaths(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    def test_paths(self):
-        '''Test to make sure no file names are set in the lldb.SBFileSpec objects returned by lldb.SBHostOS.GetLLDBPath() for paths that are directories'''
-        dir_path_types = [lldb.ePathTypeLLDBShlibDir,
-                          lldb.ePathTypeSupportExecutableDir,
-                          lldb.ePathTypeHeaderDir,
-                          lldb.ePathTypePythonDir,
-                          lldb.ePathTypeLLDBSystemPlugins,
-                          lldb.ePathTypeLLDBUserPlugins,
-                          lldb.ePathTypeLLDBTempSystemDir,
-                          lldb.ePathTypeClangDir]
-
-        for path_type in dir_path_types:
-            f = lldb.SBHostOS.GetLLDBPath(path_type)
-            # No directory path types should have the filename set
-            self.assertTrue(f.GetFilename() is None)
-
-    @no_debug_info_test
-    def test_directory_doesnt_end_with_slash(self):
-        current_directory_spec = lldb.SBFileSpec(os.path.curdir)
-        current_directory_string = current_directory_spec.GetDirectory()
-        self.assertNotEqual(current_directory_string[-1:], '/')
-
-    @skipUnlessPlatform(["windows"])
-    @no_debug_info_test
-    def test_windows_double_slash(self):
-        '''Test to check the path with double slash is handled correctly '''
-        # Create a path and see if lldb gets the directory and file right
-        fspec = lldb.SBFileSpec("C:\\dummy1\\dummy2//unknown_file", True)
-        self.assertEqual(
-            os.path.normpath(
-                fspec.GetDirectory()),
-            os.path.normpath("C:/dummy1/dummy2"))
-        self.assertEqual(fspec.GetFilename(), "unknown_file")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/plugins/command_plugin/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/plugins/command_plugin/Makefile
deleted file mode 100644 (file)
index 3119c37..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-DYLIB_CXX_SOURCES := plugin.cpp
-DYLIB_NAME := plugin
-DYLIB_ONLY := YES
-MAKE_DSYM := NO
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/plugins/command_plugin/TestPluginCommands.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/plugins/command_plugin/TestPluginCommands.py
deleted file mode 100644 (file)
index e81d407..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-"""
-Test that plugins that load commands work correctly.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class PluginCommandTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        TestBase.setUp(self)
-        self.generateSource('plugin.cpp')
-
-    @skipIfNoSBHeaders
-    # Requires a compatible arch and platform to link against the host's built
-    # lldb lib.
-    @skipIfHostIncompatibleWithRemote
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
-    @no_debug_info_test
-    def test_load_plugin(self):
-        """Test that plugins that load commands work correctly."""
-
-        plugin_name = "plugin"
-        if sys.platform.startswith("darwin"):
-            plugin_lib_name = "lib%s.dylib" % plugin_name
-        else:
-            plugin_lib_name = "lib%s.so" % plugin_name
-
-        # Invoke the library build rule.
-        self.buildLibrary("plugin.cpp", plugin_name)
-
-        debugger = lldb.SBDebugger.Create()
-
-        retobj = lldb.SBCommandReturnObject()
-
-        retval = debugger.GetCommandInterpreter().HandleCommand(
-            "plugin load %s" % self.getBuildArtifact(plugin_lib_name), retobj)
-
-        retobj.Clear()
-
-        retval = debugger.GetCommandInterpreter().HandleCommand(
-            "plugin_loaded_command child abc def ghi", retobj)
-
-        if self.TraceOn():
-            print(retobj.GetOutput())
-
-        self.expect(retobj, substrs=['abc def ghi'], exe=False)
-
-        retobj.Clear()
-
-        # check that abbreviations work correctly in plugin commands.
-        retval = debugger.GetCommandInterpreter().HandleCommand(
-            "plugin_loaded_ ch abc def ghi", retobj)
-
-        if self.TraceOn():
-            print(retobj.GetOutput())
-
-        self.expect(retobj, substrs=['abc def ghi'], exe=False)
-
-    @no_debug_info_test
-    def test_invalid_plugin_invocation(self):
-        self.expect("plugin load a b",
-                    error=True, startstr="error: 'plugin load' requires one argument")
-        self.expect("plugin load",
-                    error=True, startstr="error: 'plugin load' requires one argument")
-
-    @no_debug_info_test
-    def test_invalid_plugin_target(self):
-        self.expect("plugin load ThisIsNotAValidPluginName",
-                    error=True, startstr="error: no such file")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/plugins/command_plugin/plugin.cpp.template b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/plugins/command_plugin/plugin.cpp.template
deleted file mode 100644 (file)
index 1667c0d..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-//===-- plugin.cpp -------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-/*
-An example plugin for LLDB that provides a new foo command with a child subcommand
-Compile this into a dylib foo.dylib and load by placing in appropriate locations on disk or
-by typing plugin load foo.dylib at the LLDB command line
-*/
-
-%include_SB_APIs%
-
-namespace lldb {
-    bool
-    PluginInitialize (lldb::SBDebugger debugger);
-}
-
-class ChildCommand : public lldb::SBCommandPluginInterface
-{
-public:
-    virtual bool
-    DoExecute (lldb::SBDebugger debugger,
-               char** command,
-               lldb::SBCommandReturnObject &result)
-    {
-        if (command)
-        {
-            const char* arg = *command;
-            while (arg)
-            {
-                result.Printf("%s ",arg);
-                arg = *(++command);
-            }
-            result.Printf("\n");
-            return true;
-        }
-        return false;
-    }
-    
-};
-
-bool
-lldb::PluginInitialize (lldb::SBDebugger debugger)
-{
-    lldb::SBCommandInterpreter interpreter = debugger.GetCommandInterpreter();
-    lldb::SBCommand foo = interpreter.AddMultiwordCommand("plugin_loaded_command",NULL);
-    foo.AddCommand("child",new ChildCommand(),"a child of plugin_loaded_command");
-    return true;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/Makefile
deleted file mode 100644 (file)
index c9319d6..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-C_SOURCES := main.c
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py
deleted file mode 100644 (file)
index 5c4b420..0000000
+++ /dev/null
@@ -1,195 +0,0 @@
-"""
-Test that the Python operating system plugin works correctly
-"""
-
-
-
-import os
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class PluginPythonOSPlugin(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_python_os_plugin(self):
-        """Test that the Python operating system plugin works correctly"""
-        self.build()
-        self.run_python_os_funcionality()
-
-    def run_python_os_step(self):
-        """Test that the Python operating system plugin works correctly when single stepping a virtual thread"""
-        self.build()
-        self.run_python_os_step()
-
-    def verify_os_thread_registers(self, thread):
-        frame = thread.GetFrameAtIndex(0)
-        registers = frame.GetRegisters().GetValueAtIndex(0)
-        reg_value = thread.GetThreadID() + 1
-        for reg in registers:
-            self.assertTrue(
-                reg.GetValueAsUnsigned() == reg_value,
-                "Verify the registers contains the correct value")
-            reg_value = reg_value + 1
-
-    def run_python_os_funcionality(self):
-        """Test that the Python operating system plugin works correctly"""
-
-        # Set debugger into synchronous mode
-        self.dbg.SetAsync(False)
-
-        # Create a target by the debugger.
-        exe = self.getBuildArtifact("a.out")
-        python_os_plugin_path = os.path.join(self.getSourceDir(),
-                                             "operating_system.py")
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Set breakpoints inside and outside methods that take pointers to the
-        # containing struct.
-        lldbutil.run_break_set_by_source_regexp(self, "// Set breakpoint here")
-
-        # Register our shared libraries for remote targets so they get
-        # automatically uploaded
-        arguments = None
-        environment = None
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            arguments, environment, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Make sure there are no OS plug-in created thread when we first stop
-        # at our breakpoint in main
-        thread = process.GetThreadByID(0x111111111)
-        self.assertFalse(
-            thread.IsValid(),
-            "Make sure there is no thread 0x111111111 before we load the python OS plug-in")
-        thread = process.GetThreadByID(0x222222222)
-        self.assertFalse(
-            thread.IsValid(),
-            "Make sure there is no thread 0x222222222 before we load the python OS plug-in")
-        thread = process.GetThreadByID(0x333333333)
-        self.assertFalse(
-            thread.IsValid(),
-            "Make sure there is no thread 0x333333333 before we load the python OS plug-in")
-
-        # Now load the python OS plug-in which should update the thread list and we should have
-        # OS plug-in created threads with the IDs: 0x111111111, 0x222222222,
-        # 0x333333333
-        command = "settings set target.process.python-os-plugin-path '%s'" % python_os_plugin_path
-        self.dbg.HandleCommand(command)
-
-        # Verify our OS plug-in threads showed up
-        thread = process.GetThreadByID(0x111111111)
-        self.assertTrue(
-            thread.IsValid(),
-            "Make sure there is a thread 0x111111111 after we load the python OS plug-in")
-        self.verify_os_thread_registers(thread)
-        thread = process.GetThreadByID(0x222222222)
-        self.assertTrue(
-            thread.IsValid(),
-            "Make sure there is a thread 0x222222222 after we load the python OS plug-in")
-        self.verify_os_thread_registers(thread)
-        thread = process.GetThreadByID(0x333333333)
-        self.assertTrue(
-            thread.IsValid(),
-            "Make sure there is a thread 0x333333333 after we load the python OS plug-in")
-        self.verify_os_thread_registers(thread)
-
-        # Now clear the OS plug-in path to make the OS plug-in created threads
-        # dissappear
-        self.dbg.HandleCommand(
-            "settings clear target.process.python-os-plugin-path")
-
-        # Verify the threads are gone after unloading the python OS plug-in
-        thread = process.GetThreadByID(0x111111111)
-        self.assertFalse(
-            thread.IsValid(),
-            "Make sure there is no thread 0x111111111 after we unload the python OS plug-in")
-        thread = process.GetThreadByID(0x222222222)
-        self.assertFalse(
-            thread.IsValid(),
-            "Make sure there is no thread 0x222222222 after we unload the python OS plug-in")
-        thread = process.GetThreadByID(0x333333333)
-        self.assertFalse(
-            thread.IsValid(),
-            "Make sure there is no thread 0x333333333 after we unload the python OS plug-in")
-
-    def run_python_os_step(self):
-        """Test that the Python operating system plugin works correctly and allows single stepping of a virtual thread that is backed by a real thread"""
-
-        # Set debugger into synchronous mode
-        self.dbg.SetAsync(False)
-
-        # Create a target by the debugger.
-        exe = self.getBuildArtifact("a.out")
-        python_os_plugin_path = os.path.join(self.getSourceDir(),
-                                             "operating_system2.py")
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Set breakpoints inside and outside methods that take pointers to the
-        # containing struct.
-        lldbutil.run_break_set_by_source_regexp(self, "// Set breakpoint here")
-
-        # Register our shared libraries for remote targets so they get
-        # automatically uploaded
-        arguments = None
-        environment = None
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            arguments, environment, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Make sure there are no OS plug-in created thread when we first stop
-        # at our breakpoint in main
-        thread = process.GetThreadByID(0x111111111)
-        self.assertFalse(
-            thread.IsValid(),
-            "Make sure there is no thread 0x111111111 before we load the python OS plug-in")
-
-        # Now load the python OS plug-in which should update the thread list and we should have
-        # OS plug-in created threads with the IDs: 0x111111111, 0x222222222,
-        # 0x333333333
-        command = "settings set target.process.python-os-plugin-path '%s'" % python_os_plugin_path
-        self.dbg.HandleCommand(command)
-
-        # Verify our OS plug-in threads showed up
-        thread = process.GetThreadByID(0x111111111)
-        self.assertTrue(
-            thread.IsValid(),
-            "Make sure there is a thread 0x111111111 after we load the python OS plug-in")
-
-        frame = thread.GetFrameAtIndex(0)
-        self.assertTrue(
-            frame.IsValid(),
-            "Make sure we get a frame from thread 0x111111111")
-        line_entry = frame.GetLineEntry()
-
-        self.assertTrue(
-            line_entry.GetFileSpec().GetFilename() == 'main.c',
-            "Make sure we stopped on line 5 in main.c")
-        self.assertTrue(
-            line_entry.GetLine() == 5,
-            "Make sure we stopped on line 5 in main.c")
-
-        # Now single step thread 0x111111111 and make sure it does what we need
-        # it to
-        thread.StepOver()
-
-        frame = thread.GetFrameAtIndex(0)
-        self.assertTrue(
-            frame.IsValid(),
-            "Make sure we get a frame from thread 0x111111111")
-        line_entry = frame.GetLineEntry()
-
-        self.assertTrue(
-            line_entry.GetFileSpec().GetFilename() == 'main.c',
-            "Make sure we stepped from line 5 to line 6 in main.c")
-        self.assertTrue(line_entry.GetLine() == 6,
-                        "Make sure we stepped from line 5 to line 6 in main.c")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/main.c
deleted file mode 100644 (file)
index faa6dd5..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <stdio.h>
-
-int main (int argc, char const *argv[], char const *envp[])
-{
-    puts("stop here"); // Set breakpoint here
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/operating_system.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/operating_system.py
deleted file mode 100644 (file)
index 394c24b..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-#!/usr/bin/python
-
-import lldb
-import struct
-
-
-class OperatingSystemPlugIn(object):
-    """Class that provides data for an instance of a LLDB 'OperatingSystemPython' plug-in class"""
-
-    def __init__(self, process):
-        '''Initialization needs a valid.SBProcess object.
-
-        This plug-in will get created after a live process is valid and has stopped for the
-        first time.'''
-        self.process = None
-        self.registers = None
-        self.threads = None
-        if isinstance(process, lldb.SBProcess) and process.IsValid():
-            self.process = process
-            self.threads = None  # Will be an dictionary containing info for each thread
-
-    def get_target(self):
-        # NOTE: Don't use "lldb.target" when trying to get your target as the "lldb.target"
-        # tracks the current target in the LLDB command interpreter which isn't the
-        # correct thing to use for this plug-in.
-        return self.process.target
-
-    def create_thread(self, tid, context):
-        if tid == 0x444444444:
-            thread_info = {
-                'tid': tid,
-                'name': 'four',
-                'queue': 'queue4',
-                'state': 'stopped',
-                'stop_reason': 'none'}
-            self.threads.append(thread_info)
-            return thread_info
-        return None
-
-    def get_thread_info(self):
-        if not self.threads:
-            # The sample dictionary below shows the values that can be returned for a thread
-            # tid => thread ID (mandatory)
-            # name => thread name (optional key/value pair)
-            # queue => thread dispatch queue name (optional key/value pair)
-            # state => thred state (mandatory, set to 'stopped' for now)
-            # stop_reason => thread stop reason. (mandatory, usually set to 'none')
-            #  Possible values include:
-            #   'breakpoint' if the thread is stopped at a breakpoint
-            #   'none' thread is just stopped because the process is stopped
-            #   'trace' the thread just single stepped
-            #   The usual value for this while threads are in memory is 'none'
-            # register_data_addr => the address of the register data in memory (optional key/value pair)
-            #   Specifying this key/value pair for a thread will avoid a call to get_register_data()
-            #   and can be used when your registers are in a thread context structure that is contiguous
-            #   in memory. Don't specify this if your register layout in memory doesn't match the layout
-            # described by the dictionary returned from a call to the
-            # get_register_info() method.
-            self.threads = [{'tid': 0x111111111,
-                             'name': 'one',
-                             'queue': 'queue1',
-                             'state': 'stopped',
-                             'stop_reason': 'breakpoint'},
-                            {'tid': 0x222222222,
-                             'name': 'two',
-                             'queue': 'queue2',
-                             'state': 'stopped',
-                             'stop_reason': 'none'},
-                            {'tid': 0x333333333,
-                             'name': 'three',
-                             'queue': 'queue3',
-                             'state': 'stopped',
-                             'stop_reason': 'trace'}]
-        return self.threads
-
-    def get_register_info(self):
-        if self.registers is None:
-            self.registers = dict()
-            self.registers['sets'] = ['GPR']
-            self.registers['registers'] = [
-                {'name': 'rax', 'bitsize': 64, 'offset': 0, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 0, 'dwarf': 0},
-                {'name': 'rbx', 'bitsize': 64, 'offset': 8, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 3, 'dwarf': 3},
-                {'name': 'rcx', 'bitsize': 64, 'offset': 16, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 2, 'dwarf': 2, 'generic': 'arg4', 'alt-name': 'arg4', },
-                {'name': 'rdx', 'bitsize': 64, 'offset': 24, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 1, 'dwarf': 1, 'generic': 'arg3', 'alt-name': 'arg3', },
-                {'name': 'rdi', 'bitsize': 64, 'offset': 32, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 5, 'dwarf': 5, 'generic': 'arg1', 'alt-name': 'arg1', },
-                {'name': 'rsi', 'bitsize': 64, 'offset': 40, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 4, 'dwarf': 4, 'generic': 'arg2', 'alt-name': 'arg2', },
-                {'name': 'rbp', 'bitsize': 64, 'offset': 48, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 6, 'dwarf': 6, 'generic': 'fp', 'alt-name': 'fp', },
-                {'name': 'rsp', 'bitsize': 64, 'offset': 56, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 7, 'dwarf': 7, 'generic': 'sp', 'alt-name': 'sp', },
-                {'name': 'r8', 'bitsize': 64, 'offset': 64, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 8, 'dwarf': 8, 'generic': 'arg5', 'alt-name': 'arg5', },
-                {'name': 'r9', 'bitsize': 64, 'offset': 72, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 9, 'dwarf': 9, 'generic': 'arg6', 'alt-name': 'arg6', },
-                {'name': 'r10', 'bitsize': 64, 'offset': 80, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 10, 'dwarf': 10},
-                {'name': 'r11', 'bitsize': 64, 'offset': 88, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 11, 'dwarf': 11},
-                {'name': 'r12', 'bitsize': 64, 'offset': 96, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 12, 'dwarf': 12},
-                {'name': 'r13', 'bitsize': 64, 'offset': 104, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 13, 'dwarf': 13},
-                {'name': 'r14', 'bitsize': 64, 'offset': 112, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 14, 'dwarf': 14},
-                {'name': 'r15', 'bitsize': 64, 'offset': 120, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 15, 'dwarf': 15},
-                {'name': 'rip', 'bitsize': 64, 'offset': 128, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 16, 'dwarf': 16, 'generic': 'pc', 'alt-name': 'pc'},
-                {'name': 'rflags', 'bitsize': 64, 'offset': 136, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'generic': 'flags', 'alt-name': 'flags'},
-                {'name': 'cs', 'bitsize': 64, 'offset': 144, 'encoding': 'uint', 'format': 'hex', 'set': 0},
-                {'name': 'fs', 'bitsize': 64, 'offset': 152, 'encoding': 'uint', 'format': 'hex', 'set': 0},
-                {'name': 'gs', 'bitsize': 64, 'offset': 160, 'encoding': 'uint', 'format': 'hex', 'set': 0},
-            ]
-        return self.registers
-
-    def get_register_data(self, tid):
-        return struct.pack(
-            '21Q',
-            tid + 1,
-            tid + 2,
-            tid + 3,
-            tid + 4,
-            tid + 5,
-            tid + 6,
-            tid + 7,
-            tid + 8,
-            tid + 9,
-            tid + 10,
-            tid + 11,
-            tid + 12,
-            tid + 13,
-            tid + 14,
-            tid + 15,
-            tid + 16,
-            tid + 17,
-            tid + 18,
-            tid + 19,
-            tid + 20,
-            tid + 21)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/operating_system2.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/operating_system2.py
deleted file mode 100644 (file)
index 438538c..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-#!/usr/bin/python
-
-import lldb
-import struct
-
-
-class OperatingSystemPlugIn(object):
-    """Class that provides data for an instance of a LLDB 'OperatingSystemPython' plug-in class"""
-
-    def __init__(self, process):
-        '''Initialization needs a valid.SBProcess object.
-
-        This plug-in will get created after a live process is valid and has stopped for the
-        first time.'''
-        self.process = None
-        self.registers = None
-        self.threads = None
-        if isinstance(process, lldb.SBProcess) and process.IsValid():
-            self.process = process
-            self.threads = None  # Will be an dictionary containing info for each thread
-
-    def get_target(self):
-        # NOTE: Don't use "lldb.target" when trying to get your target as the "lldb.target"
-        # tracks the current target in the LLDB command interpreter which isn't the
-        # correct thing to use for this plug-in.
-        return self.process.target
-
-    def create_thread(self, tid, context):
-        if tid == 0x444444444:
-            thread_info = {
-                'tid': tid,
-                'name': 'four',
-                'queue': 'queue4',
-                'state': 'stopped',
-                'stop_reason': 'none'}
-            self.threads.append(thread_info)
-            return thread_info
-        return None
-
-    def get_thread_info(self):
-        if not self.threads:
-            # The sample dictionary below shows the values that can be returned for a thread
-            # tid => thread ID (mandatory)
-            # name => thread name (optional key/value pair)
-            # queue => thread dispatch queue name (optional key/value pair)
-            # state => thred state (mandatory, set to 'stopped' for now)
-            # stop_reason => thread stop reason. (mandatory, usually set to 'none')
-            #  Possible values include:
-            #   'breakpoint' if the thread is stopped at a breakpoint
-            #   'none' thread is just stopped because the process is stopped
-            #   'trace' the thread just single stepped
-            #   The usual value for this while threads are in memory is 'none'
-            # register_data_addr => the address of the register data in memory (optional key/value pair)
-            #   Specifying this key/value pair for a thread will avoid a call to get_register_data()
-            #   and can be used when your registers are in a thread context structure that is contiguous
-            #   in memory. Don't specify this if your register layout in memory doesn't match the layout
-            # described by the dictionary returned from a call to the
-            # get_register_info() method.
-            self.threads = [
-                {'tid': 0x111111111, 'core': 0}
-            ]
-        return self.threads
-
-    def get_register_info(self):
-        if self.registers is None:
-            self.registers = dict()
-            self.registers['sets'] = ['GPR']
-            self.registers['registers'] = [
-                {'name': 'rax', 'bitsize': 64, 'offset': 0, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 0, 'dwarf': 0},
-                {'name': 'rbx', 'bitsize': 64, 'offset': 8, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 3, 'dwarf': 3},
-                {'name': 'rcx', 'bitsize': 64, 'offset': 16, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 2, 'dwarf': 2, 'generic': 'arg4', 'alt-name': 'arg4', },
-                {'name': 'rdx', 'bitsize': 64, 'offset': 24, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 1, 'dwarf': 1, 'generic': 'arg3', 'alt-name': 'arg3', },
-                {'name': 'rdi', 'bitsize': 64, 'offset': 32, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 5, 'dwarf': 5, 'generic': 'arg1', 'alt-name': 'arg1', },
-                {'name': 'rsi', 'bitsize': 64, 'offset': 40, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 4, 'dwarf': 4, 'generic': 'arg2', 'alt-name': 'arg2', },
-                {'name': 'rbp', 'bitsize': 64, 'offset': 48, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 6, 'dwarf': 6, 'generic': 'fp', 'alt-name': 'fp', },
-                {'name': 'rsp', 'bitsize': 64, 'offset': 56, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 7, 'dwarf': 7, 'generic': 'sp', 'alt-name': 'sp', },
-                {'name': 'r8', 'bitsize': 64, 'offset': 64, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 8, 'dwarf': 8, 'generic': 'arg5', 'alt-name': 'arg5', },
-                {'name': 'r9', 'bitsize': 64, 'offset': 72, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 9, 'dwarf': 9, 'generic': 'arg6', 'alt-name': 'arg6', },
-                {'name': 'r10', 'bitsize': 64, 'offset': 80, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 10, 'dwarf': 10},
-                {'name': 'r11', 'bitsize': 64, 'offset': 88, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 11, 'dwarf': 11},
-                {'name': 'r12', 'bitsize': 64, 'offset': 96, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 12, 'dwarf': 12},
-                {'name': 'r13', 'bitsize': 64, 'offset': 104, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 13, 'dwarf': 13},
-                {'name': 'r14', 'bitsize': 64, 'offset': 112, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 14, 'dwarf': 14},
-                {'name': 'r15', 'bitsize': 64, 'offset': 120, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 15, 'dwarf': 15},
-                {'name': 'rip', 'bitsize': 64, 'offset': 128, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 16, 'dwarf': 16, 'generic': 'pc', 'alt-name': 'pc'},
-                {'name': 'rflags', 'bitsize': 64, 'offset': 136, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'generic': 'flags', 'alt-name': 'flags'},
-                {'name': 'cs', 'bitsize': 64, 'offset': 144, 'encoding': 'uint', 'format': 'hex', 'set': 0},
-                {'name': 'fs', 'bitsize': 64, 'offset': 152, 'encoding': 'uint', 'format': 'hex', 'set': 0},
-                {'name': 'gs', 'bitsize': 64, 'offset': 160, 'encoding': 'uint', 'format': 'hex', 'set': 0},
-            ]
-        return self.registers
-
-    def get_register_data(self, tid):
-        return struct.pack(
-            '21Q',
-            tid + 1,
-            tid + 2,
-            tid + 3,
-            tid + 4,
-            tid + 5,
-            tid + 6,
-            tid + 7,
-            tid + 8,
-            tid + 9,
-            tid + 10,
-            tid + 11,
-            tid + 12,
-            tid + 13,
-            tid + 14,
-            tid + 15,
-            tid + 16,
-            tid + 17,
-            tid + 18,
-            tid + 19,
-            tid + 20,
-            tid + 21)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py
deleted file mode 100644 (file)
index c2746bf..0000000
+++ /dev/null
@@ -1,379 +0,0 @@
-"""
-Test basics of linux core file debugging.
-"""
-
-from __future__ import division, print_function
-
-import shutil
-import struct
-import os
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class LinuxCoreTestCase(TestBase):
-    NO_DEBUG_INFO_TESTCASE = True
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    _i386_pid = 32306
-    _x86_64_pid = 32259
-    _s390x_pid = 1045
-    _mips64_n64_pid = 25619
-    _mips64_n32_pid = 3670
-    _mips_o32_pid = 3532
-    _ppc64le_pid = 28147
-
-    _i386_regions = 4
-    _x86_64_regions = 5
-    _s390x_regions = 2
-    _mips_regions = 5
-    _ppc64le_regions = 2
-
-    def setUp(self):
-        super(LinuxCoreTestCase, self).setUp()
-        self._initial_platform = lldb.DBG.GetSelectedPlatform()
-
-    def tearDown(self):
-        lldb.DBG.SetSelectedPlatform(self._initial_platform)
-        super(LinuxCoreTestCase, self).tearDown()
-
-    @skipIf(triple='^mips')
-    @skipIfLLVMTargetMissing("X86")
-    def test_i386(self):
-        """Test that lldb can read the process information from an i386 linux core file."""
-        self.do_test("linux-i386", self._i386_pid, self._i386_regions, "a.out")
-
-    @skipIfLLVMTargetMissing("Mips")
-    def test_mips_o32(self):
-        """Test that lldb can read the process information from an MIPS O32 linux core file."""
-        self.do_test("linux-mipsel-gnuabio32", self._mips_o32_pid,
-                self._mips_regions, "linux-mipsel-gn")
-
-    @skipIfLLVMTargetMissing("Mips")
-    def test_mips_n32(self):
-        """Test that lldb can read the process information from an MIPS N32 linux core file """
-        self.do_test("linux-mips64el-gnuabin32", self._mips64_n32_pid,
-                self._mips_regions, "linux-mips64el-")
-
-    @skipIfLLVMTargetMissing("Mips")
-    def test_mips_n64(self):
-        """Test that lldb can read the process information from an MIPS N64 linux core file """
-        self.do_test("linux-mips64el-gnuabi64", self._mips64_n64_pid,
-                self._mips_regions, "linux-mips64el-")
-
-    @skipIf(triple='^mips')
-    @skipIfLLVMTargetMissing("PowerPC")
-    def test_ppc64le(self):
-        """Test that lldb can read the process information from an ppc64le linux core file."""
-        self.do_test("linux-ppc64le", self._ppc64le_pid, self._ppc64le_regions,
-                "linux-ppc64le.ou")
-
-    @skipIf(triple='^mips')
-    @skipIfLLVMTargetMissing("X86")
-    def test_x86_64(self):
-        """Test that lldb can read the process information from an x86_64 linux core file."""
-        self.do_test("linux-x86_64", self._x86_64_pid, self._x86_64_regions,
-        "a.out")
-
-    @skipIf(triple='^mips')
-    @skipIfLLVMTargetMissing("SystemZ")
-    def test_s390x(self):
-        """Test that lldb can read the process information from an s390x linux core file."""
-        self.do_test("linux-s390x", self._s390x_pid, self._s390x_regions,
-        "a.out")
-
-    @skipIf(triple='^mips')
-    @skipIfLLVMTargetMissing("X86")
-    def test_same_pid_running(self):
-        """Test that we read the information from the core correctly even if we have a running
-        process with the same PID around"""
-        exe_file = self.getBuildArtifact("linux-x86_64-pid.out")
-        core_file = self.getBuildArtifact("linux-x86_64-pid.core")
-        shutil.copyfile("linux-x86_64.out", exe_file)
-        shutil.copyfile("linux-x86_64.core", core_file)
-        with open(core_file, "r+b") as f:
-            # These are offsets into the NT_PRSTATUS and NT_PRPSINFO structures in the note
-            # segment of the core file. If you update the file, these offsets may need updating
-            # as well. (Notes can be viewed with readelf --notes.)
-            for pid_offset in [0x1c4, 0x320]:
-                f.seek(pid_offset)
-                self.assertEqual(
-                    struct.unpack(
-                        "<I",
-                        f.read(4))[0],
-                    self._x86_64_pid)
-
-                # We insert our own pid, and make sure the test still
-                # works.
-                f.seek(pid_offset)
-                f.write(struct.pack("<I", os.getpid()))
-        self.do_test(self.getBuildArtifact("linux-x86_64-pid"), os.getpid(),
-                self._x86_64_regions, "a.out")
-
-    @skipIf(triple='^mips')
-    @skipIfLLVMTargetMissing("X86")
-    def test_two_cores_same_pid(self):
-        """Test that we handle the situation if we have two core files with the same PID
-        around"""
-        alttarget = self.dbg.CreateTarget("altmain.out")
-        altprocess = alttarget.LoadCore("altmain.core")
-        self.assertTrue(altprocess, PROCESS_IS_VALID)
-        self.assertEqual(altprocess.GetNumThreads(), 1)
-        self.assertEqual(altprocess.GetProcessID(), self._x86_64_pid)
-
-        altframe = altprocess.GetSelectedThread().GetFrameAtIndex(0)
-        self.assertEqual(altframe.GetFunctionName(), "_start")
-        self.assertEqual(
-            altframe.GetLineEntry().GetLine(),
-            line_number(
-                "altmain.c",
-                "Frame _start"))
-
-        error = lldb.SBError()
-        F = altprocess.ReadCStringFromMemory(
-            altframe.FindVariable("F").GetValueAsUnsigned(), 256, error)
-        self.assertTrue(error.Success())
-        self.assertEqual(F, "_start")
-
-        # without destroying this process, run the test which opens another core file with the
-        # same pid
-        self.do_test("linux-x86_64", self._x86_64_pid, self._x86_64_regions,
-                "a.out")
-
-    @skipIf(triple='^mips')
-    @skipIfLLVMTargetMissing("X86")
-    def test_FPR_SSE(self):
-        # check x86_64 core file
-        target = self.dbg.CreateTarget(None)
-        self.assertTrue(target, VALID_TARGET)
-        process = target.LoadCore("linux-fpr_sse_x86_64.core")
-
-        values = {}
-        values["fctrl"] = "0x037f"
-        values["fstat"] = "0x0000"
-        values["ftag"] = "0x00ff"
-        values["fop"] = "0x0000"
-        values["fiseg"] = "0x00000000"
-        values["fioff"] = "0x0040011e"
-        values["foseg"] = "0x00000000"
-        values["fooff"] = "0x00000000"
-        values["mxcsr"] = "0x00001f80"
-        values["mxcsrmask"] = "0x0000ffff"
-        values["st0"] = "{0x99 0xf7 0xcf 0xfb 0x84 0x9a 0x20 0x9a 0xfd 0x3f}"
-        values["st1"] = "{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0xff 0x3f}"
-        values["st2"] = "{0xfe 0x8a 0x1b 0xcd 0x4b 0x78 0x9a 0xd4 0x00 0x40}"
-        values["st3"] = "{0xac 0x79 0xcf 0xd1 0xf7 0x17 0x72 0xb1 0xfe 0x3f}"
-        values["st4"] = "{0xbc 0xf0 0x17 0x5c 0x29 0x3b 0xaa 0xb8 0xff 0x3f}"
-        values["st5"] = "{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0xff 0x3f}"
-        values["st6"] = "{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}"
-        values["st7"] = "{0x35 0xc2 0x68 0x21 0xa2 0xda 0x0f 0xc9 0x00 0x40}"
-        values["xmm0"] = "{0x29 0x31 0x64 0x46 0x29 0x31 0x64 0x46 0x29 0x31 0x64 0x46 0x29 0x31 0x64 0x46}"
-        values["xmm1"] = "{0x9c 0xed 0x86 0x64 0x9c 0xed 0x86 0x64 0x9c 0xed 0x86 0x64 0x9c 0xed 0x86 0x64}"
-        values["xmm2"] = "{0x07 0xc2 0x1f 0xd7 0x07 0xc2 0x1f 0xd7 0x07 0xc2 0x1f 0xd7 0x07 0xc2 0x1f 0xd7}"
-        values["xmm3"] = "{0xa2 0x20 0x48 0x25 0xa2 0x20 0x48 0x25 0xa2 0x20 0x48 0x25 0xa2 0x20 0x48 0x25}"
-        values["xmm4"] = "{0xeb 0x5a 0xa8 0xc4 0xeb 0x5a 0xa8 0xc4 0xeb 0x5a 0xa8 0xc4 0xeb 0x5a 0xa8 0xc4}"
-        values["xmm5"] = "{0x49 0x41 0x20 0x0b 0x49 0x41 0x20 0x0b 0x49 0x41 0x20 0x0b 0x49 0x41 0x20 0x0b}"
-        values["xmm6"] = "{0xf8 0xf1 0x8b 0x4f 0xf8 0xf1 0x8b 0x4f 0xf8 0xf1 0x8b 0x4f 0xf8 0xf1 0x8b 0x4f}"
-        values["xmm7"] = "{0x13 0xf1 0x30 0xcd 0x13 0xf1 0x30 0xcd 0x13 0xf1 0x30 0xcd 0x13 0xf1 0x30 0xcd}"
-
-        for regname, value in values.items():
-            self.expect("register read {}".format(regname), substrs=["{} = {}".format(regname, value)])
-
-
-        # now check i386 core file
-        target = self.dbg.CreateTarget(None)
-        self.assertTrue(target, VALID_TARGET)
-        process = target.LoadCore("linux-fpr_sse_i386.core")
-
-        values["fioff"] = "0x080480cc"
-
-        for regname, value in values.items():
-            self.expect("register read {}".format(regname), substrs=["{} = {}".format(regname, value)])
-
-    @skipIf(triple='^mips')
-    @skipIfLLVMTargetMissing("X86")
-    def test_i386_sysroot(self):
-        """Test that lldb can find the exe for an i386 linux core file using the sysroot."""
-
-        # Copy linux-i386.out to tmp_sysroot/home/labath/test/a.out (since it was compiled as
-        # /home/labath/test/a.out)
-        tmp_sysroot = os.path.join(self.getBuildDir(), "lldb_i386_mock_sysroot")
-        executable = os.path.join(tmp_sysroot, "home", "labath", "test", "a.out")
-        lldbutil.mkdir_p(os.path.dirname(executable))
-        shutil.copyfile("linux-i386.out", executable)
-
-        # Set sysroot and load core
-        self.runCmd("platform select remote-linux --sysroot '%s'" % tmp_sysroot)
-        target = self.dbg.CreateTarget(None)
-        self.assertTrue(target, VALID_TARGET)
-        process = target.LoadCore("linux-i386.core")
-
-        # Check that we found a.out from the sysroot
-        self.check_all(process, self._i386_pid, self._i386_regions, "a.out")
-
-        self.dbg.DeleteTarget(target)
-
-    @skipIf(triple='^mips')
-    @skipIfLLVMTargetMissing("ARM")
-    def test_arm_core(self):
-        # check 32 bit ARM core file
-        target = self.dbg.CreateTarget(None)
-        self.assertTrue(target, VALID_TARGET)
-        process = target.LoadCore("linux-arm.core")
-
-        values = {}
-        values["r0"] = "0x00000000"
-        values["r1"] = "0x00000001"
-        values["r2"] = "0x00000002"
-        values["r3"] = "0x00000003"
-        values["r4"] = "0x00000004"
-        values["r5"] = "0x00000005"
-        values["r6"] = "0x00000006"
-        values["r7"] = "0x00000007"
-        values["r8"] = "0x00000008"
-        values["r9"] = "0x00000009"
-        values["r10"] = "0x0000000a"
-        values["r11"] = "0x0000000b"
-        values["r12"] = "0x0000000c"
-        values["sp"] = "0x0000000d"
-        values["lr"] = "0x0000000e"
-        values["pc"] = "0x0000000f"
-        values["cpsr"] = "0x00000010"
-        for regname, value in values.items():
-            self.expect("register read {}".format(regname), substrs=["{} = {}".format(regname, value)])
-
-    def check_memory_regions(self, process, region_count):
-        region_list = process.GetMemoryRegions()
-        self.assertEqual(region_list.GetSize(), region_count)
-
-        region = lldb.SBMemoryRegionInfo()
-
-        # Check we have the right number of regions.
-        self.assertEqual(region_list.GetSize(), region_count)
-
-        # Check that getting a region beyond the last in the list fails.
-        self.assertFalse(
-            region_list.GetMemoryRegionAtIndex(
-                region_count, region))
-
-        # Check each region is valid.
-        for i in range(region_list.GetSize()):
-            # Check we can actually get this region.
-            self.assertTrue(region_list.GetMemoryRegionAtIndex(i, region))
-
-            # Every region in the list should be mapped.
-            self.assertTrue(region.IsMapped())
-
-            # Test the address at the start of a region returns it's enclosing
-            # region.
-            begin_address = region.GetRegionBase()
-            region_at_begin = lldb.SBMemoryRegionInfo()
-            error = process.GetMemoryRegionInfo(begin_address, region_at_begin)
-            self.assertEqual(region, region_at_begin)
-
-            # Test an address in the middle of a region returns it's enclosing
-            # region.
-            middle_address = (region.GetRegionBase() +
-                              region.GetRegionEnd()) // 2
-            region_at_middle = lldb.SBMemoryRegionInfo()
-            error = process.GetMemoryRegionInfo(
-                middle_address, region_at_middle)
-            self.assertEqual(region, region_at_middle)
-
-            # Test the address at the end of a region returns it's enclosing
-            # region.
-            end_address = region.GetRegionEnd() - 1
-            region_at_end = lldb.SBMemoryRegionInfo()
-            error = process.GetMemoryRegionInfo(end_address, region_at_end)
-            self.assertEqual(region, region_at_end)
-
-            # Check that quering the end address does not return this region but
-            # the next one.
-            next_region = lldb.SBMemoryRegionInfo()
-            error = process.GetMemoryRegionInfo(
-                region.GetRegionEnd(), next_region)
-            self.assertNotEqual(region, next_region)
-            self.assertEqual(
-                region.GetRegionEnd(),
-                next_region.GetRegionBase())
-
-        # Check that query beyond the last region returns an unmapped region
-        # that ends at LLDB_INVALID_ADDRESS
-        last_region = lldb.SBMemoryRegionInfo()
-        region_list.GetMemoryRegionAtIndex(region_count - 1, last_region)
-        end_region = lldb.SBMemoryRegionInfo()
-        error = process.GetMemoryRegionInfo(
-            last_region.GetRegionEnd(), end_region)
-        self.assertFalse(end_region.IsMapped())
-        self.assertEqual(
-            last_region.GetRegionEnd(),
-            end_region.GetRegionBase())
-        self.assertEqual(end_region.GetRegionEnd(), lldb.LLDB_INVALID_ADDRESS)
-
-    def check_state(self, process):
-        with open(os.devnull) as devnul:
-            # sanitize test output
-            self.dbg.SetOutputFileHandle(devnul, False)
-            self.dbg.SetErrorFileHandle(devnul, False)
-
-            self.assertTrue(process.is_stopped)
-
-            # Process.Continue
-            error = process.Continue()
-            self.assertFalse(error.Success())
-            self.assertTrue(process.is_stopped)
-
-            # Thread.StepOut
-            thread = process.GetSelectedThread()
-            thread.StepOut()
-            self.assertTrue(process.is_stopped)
-
-            # command line
-            self.dbg.HandleCommand('s')
-            self.assertTrue(process.is_stopped)
-            self.dbg.HandleCommand('c')
-            self.assertTrue(process.is_stopped)
-
-            # restore file handles
-            self.dbg.SetOutputFileHandle(None, False)
-            self.dbg.SetErrorFileHandle(None, False)
-
-    def check_stack(self, process, pid, thread_name):
-        thread = process.GetSelectedThread()
-        self.assertTrue(thread)
-        self.assertEqual(thread.GetThreadID(), pid)
-        self.assertEqual(thread.GetName(), thread_name)
-        backtrace = ["bar", "foo", "_start"]
-        self.assertEqual(thread.GetNumFrames(), len(backtrace))
-        for i in range(len(backtrace)):
-            frame = thread.GetFrameAtIndex(i)
-            self.assertTrue(frame)
-            self.assertEqual(frame.GetFunctionName(), backtrace[i])
-            self.assertEqual(frame.GetLineEntry().GetLine(),
-                             line_number("main.c", "Frame " + backtrace[i]))
-            self.assertEqual(
-                frame.FindVariable("F").GetValueAsUnsigned(), ord(
-                    backtrace[i][0]))
-
-    def check_all(self, process, pid, region_count, thread_name):
-        self.assertTrue(process, PROCESS_IS_VALID)
-        self.assertEqual(process.GetNumThreads(), 1)
-        self.assertEqual(process.GetProcessID(), pid)
-
-        self.check_state(process)
-
-        self.check_stack(process, pid, thread_name)
-
-        self.check_memory_regions(process, region_count)
-
-    def do_test(self, filename, pid, region_count, thread_name):
-        target = self.dbg.CreateTarget(filename + ".out")
-        process = target.LoadCore(filename + ".core")
-
-        self.check_all(process, pid, region_count, thread_name)
-
-        self.dbg.DeleteTarget(target)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/altmain.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/altmain.c
deleted file mode 100644 (file)
index da49a00..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-void _start(void)
-{
-    const char *F = "_start";
-    char *boom = (char *)0;
-    *boom = 47; // Frame _start
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/altmain.out b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/altmain.out
deleted file mode 100755 (executable)
index 2fddf3e..0000000
Binary files a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/altmain.out and /dev/null differ
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/fpr_sse.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/fpr_sse.cpp
deleted file mode 100644 (file)
index e6826fc..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-// fpr_sse_x86_64.core was generated with:
-// ./make-core.sh fpr_sse.cpp
-//
-// fpr_sse_i386.core was generated with:
-//   export CFLAGS=-m32
-//   ./make-core.sh fpr_sse.cpp
-
-void _start(void) {
-  __asm__("fldpi;"
-          "fldz;"
-          "fld1;"
-          "fldl2e;"
-          "fldln2;"
-          "fldl2t;"
-          "fld1;"
-          "fldlg2;");
-
-  unsigned int values[8] = {
-      0x46643129, 0x6486ed9c, 0xd71fc207, 0x254820a2,
-      0xc4a85aeb, 0x0b204149, 0x4f8bf1f8, 0xcd30f113,
-  };
-
-  __asm__("vbroadcastss %0, %%xmm0;"
-          "vbroadcastss %1, %%xmm1;"
-          "vbroadcastss %2, %%xmm2;"
-          "vbroadcastss %3, %%xmm3;"
-          "vbroadcastss %4, %%xmm4;"
-          "vbroadcastss %5, %%xmm5;"
-          "vbroadcastss %6, %%xmm6;"
-          "vbroadcastss %7, %%xmm7;"
-
-          ::"m"(values[0]),
-          "m"(values[1]), "m"(values[2]), "m"(values[3]), "m"(values[4]),
-          "m"(values[5]), "m"(values[6]), "m"(values[7]));
-
-  volatile int *a = 0;
-  *a = 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/gcore/TestGCore.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/gcore/TestGCore.py
deleted file mode 100644 (file)
index ca863d2..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-"""
-Test signal reporting when debugging with linux core files.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class GCoreTestCase(TestBase):
-    NO_DEBUG_INFO_TESTCASE = True
-
-    mydir = TestBase.compute_mydir(__file__)
-    def setUp(self):
-        super(GCoreTestCase, self).setUp()
-        self._initial_platform = lldb.DBG.GetSelectedPlatform()
-
-    def tearDown(self):
-        lldb.DBG.SetSelectedPlatform(self._initial_platform)
-        super(GCoreTestCase, self).tearDown()
-
-    _i386_pid = 5586
-    _x86_64_pid = 5669
-
-    @skipIf(oslist=['windows'])
-    @skipIf(triple='^mips')
-    def test_i386(self):
-        """Test that lldb can read the process information from an i386 linux core file."""
-        self.do_test("linux-i386", self._i386_pid)
-
-    @skipIf(oslist=['windows'])
-    @skipIf(triple='^mips')
-    def test_x86_64(self):
-        """Test that lldb can read the process information from an x86_64 linux core file."""
-        self.do_test("linux-x86_64", self._x86_64_pid)
-
-    def do_test(self, filename, pid):
-        target = self.dbg.CreateTarget("")
-        process = target.LoadCore(filename + ".core")
-        self.assertTrue(process, PROCESS_IS_VALID)
-        self.assertEqual(process.GetNumThreads(), 3)
-        self.assertEqual(process.GetProcessID(), pid)
-
-        for thread in process:
-            reason = thread.GetStopReason()
-            self.assertEqual(reason, lldb.eStopReasonSignal)
-            signal = thread.GetStopReasonDataAtIndex(1)
-            # Check we got signal 19 (SIGSTOP)
-            self.assertEqual(signal, 19)
-
-        self.dbg.DeleteTarget(target)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/gcore/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/gcore/main.cpp
deleted file mode 100644 (file)
index a8e5f34..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// This test verifies the correct handling of child thread exits.
-
-#include "pseudo_barrier.h"
-#include <thread>
-#include <csignal>
-
-pseudo_barrier_t g_barrier1;
-pseudo_barrier_t g_barrier2;
-
-void *
-thread1 ()
-{
-  // Synchronize with the main thread.
-  pseudo_barrier_wait(g_barrier1);
-
-  // Synchronize with the main thread and thread2.
-  pseudo_barrier_wait(g_barrier2);
-
-  // Return
-  return NULL;
-}
-
-void *
-thread2 ()
-{
-
-  // Synchronize with thread1 and the main thread.
-  pseudo_barrier_wait(g_barrier2); // Should not reach here.
-
-  // Return
-  return NULL;
-}
-
-int main ()
-{
-
-  pseudo_barrier_init(g_barrier1, 2);
-  pseudo_barrier_init(g_barrier2, 3);
-
-  // Create a thread.
-  std::thread thread_1(thread1);
-
-  // Wait for thread1 to start.
-  pseudo_barrier_wait(g_barrier1);
-
-  // Wait for thread1 to start.
-  std::thread thread_2(thread2);
-
-  // Thread 2 is waiting for another thread to reach the barrier.
-  // This should have for ever. (So we can run gcore against this process.)
-  thread_2.join();
-
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/gcore/main.mk b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/gcore/main.mk
deleted file mode 100755 (executable)
index 566938c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-ENABLE_THREADS := YES
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/gcore/make-core.sh b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/gcore/make-core.sh
deleted file mode 100755 (executable)
index b6979c7..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-#! /bin/sh
-
-linux_check_ptrace_scope()
-{
-    if grep -q '1' </proc/sys/kernel/yama/ptrace_scope; then
-        cat <<EOF
-Your system prevents the use of PTRACE to attach to non-child processes. The core file
-cannot be generated.  Please reset /proc/sys/kernel/yama/ptrace_scope to 0 (requires root
-privileges) to enable core generation via gcore.
-EOF
-        exit 1
-    fi
-}
-
-set -e -x
-
-OS=$(uname -s)
-if [ "$OS" = Linux ]; then
-    linux_check_ptrace_scope
-fi
-
-rm -f a.out
-make -f main.mk
-
-cat <<EOF
-Executable file is in a.out.
-Core file will be saved as core.<pid>.
-EOF
-
-stack_size=`ulimit -s`
-
-# Decrease stack size to 16k => smaller core files.
-# gcore won't run with the smaller stack
-ulimit -Ss 16
-
-core_dump_filter=`cat /proc/self/coredump_filter`
-echo 0 > /proc/self/coredump_filter
-
-./a.out &
-
-pid=$!
-
-echo $core_dump_filter > /proc/self/coredump_filter
-
-# Reset stack size as so there's enough space to run gcore.
-ulimit -s $stack_size
-
-echo "Sleeping for 5 seconds to wait for $pid"
-
-sleep 5
-echo "Taking core from process $pid"
-
-gcore -o core $pid
-
-echo "Killing process $pid"
-kill -9 $pid
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-i386.out b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-i386.out
deleted file mode 100755 (executable)
index 3cdd4ee..0000000
Binary files a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-i386.out and /dev/null differ
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-mips64el-gnuabi64.out b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-mips64el-gnuabi64.out
deleted file mode 100755 (executable)
index a230aa4..0000000
Binary files a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-mips64el-gnuabi64.out and /dev/null differ
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-mips64el-gnuabin32.out b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-mips64el-gnuabin32.out
deleted file mode 100755 (executable)
index d1293a7..0000000
Binary files a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-mips64el-gnuabin32.out and /dev/null differ
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-mipsel-gnuabio32.out b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-mipsel-gnuabio32.out
deleted file mode 100755 (executable)
index dc809c8..0000000
Binary files a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-mipsel-gnuabio32.out and /dev/null differ
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-ppc64le.out b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-ppc64le.out
deleted file mode 100755 (executable)
index 05c69fd..0000000
Binary files a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-ppc64le.out and /dev/null differ
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-s390x.out b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-s390x.out
deleted file mode 100755 (executable)
index 640fbdc..0000000
Binary files a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-s390x.out and /dev/null differ
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-x86_64.out b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-x86_64.out
deleted file mode 100755 (executable)
index 842402f..0000000
Binary files a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/linux-x86_64.out and /dev/null differ
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/main.c
deleted file mode 100644 (file)
index f5bde41..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-static void bar(char *boom)
-{
-    char F = 'b';
-    *boom = 47; // Frame bar
-}
-
-static void foo(char *boom, void (*boomer)(char *))
-{
-    char F = 'f';
-    boomer(boom); // Frame foo
-}
-
-void _start(void)
-{
-    char F = '_';
-    foo(0, bar); // Frame _start
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/make-core.sh b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/make-core.sh
deleted file mode 100755 (executable)
index 9dd83f1..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-#! /bin/sh
-
-linux_check_core_pattern()
-{
-    if grep -q '^|' </proc/sys/kernel/core_pattern; then
-        cat <<EOF
-Your system uses a crash report tool ($(cat /proc/sys/kernel/core_pattern)). Core files
-will not be generated.  Please reset /proc/sys/kernel/core_pattern (requires root
-privileges) to enable core generation.
-EOF
-        exit 1
-    fi
-}
-
-OS=$(uname -s)
-case "$OS" in
-FreeBSD)
-    core_pattern=$(sysctl -n kern.corefile)
-    ;;
-Linux)
-    core_pattern=$(cat /proc/sys/kernel/core_pattern)
-    ;;
-*)
-    echo "OS $OS not supported" >&2
-    exit 1
-    ;;
-esac
-
-set -e -x
-
-file=$1
-if [ -z "$file" ]; then
-    cat <<EOF
-Please supply the main source file as the first argument.
-EOF
-    exit 1
-fi
-
-if [ "$OS" = Linux ]; then
-    linux_check_core_pattern
-fi
-
-ulimit -c 1000
-real_limit=$(ulimit -c)
-if [ $real_limit -lt 100 ]; then
-    cat <<EOF
-Unable to increase the core file limit. Core file may be truncated!
-To fix this, increase HARD core file limit (ulimit -H -c 1000). This may require root
-privileges.
-EOF
-fi
-
-${CC:-cc} -nostdlib -static -g $CFLAGS "$file" -o a.out
-
-cat <<EOF
-Executable file is in a.out.
-Core file will be saved according to pattern $core_pattern.
-EOF
-
-ulimit -s 8 # Decrease stack size to 8k => smaller core files.
-exec ./a.out
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/thread_crash/TestLinuxCoreThreads.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/thread_crash/TestLinuxCoreThreads.py
deleted file mode 100644 (file)
index 4be7ebe..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-"""
-Test signal reporting when debugging with linux core files.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class LinuxCoreThreadsTestCase(TestBase):
-    NO_DEBUG_INFO_TESTCASE = True
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        super(LinuxCoreThreadsTestCase, self).setUp()
-        self._initial_platform = lldb.DBG.GetSelectedPlatform()
-
-    def tearDown(self):
-        lldb.DBG.SetSelectedPlatform(self._initial_platform)
-        super(LinuxCoreThreadsTestCase, self).tearDown()
-
-    _i386_pid = 5193
-    _x86_64_pid = 5222
-
-    # Thread id for the failing thread.
-    _i386_tid = 5195
-    _x86_64_tid = 5250
-
-    @skipIf(oslist=['windows'])
-    @skipIf(triple='^mips')
-    def test_i386(self):
-        """Test that lldb can read the process information from an i386 linux core file."""
-        self.do_test("linux-i386", self._i386_pid, self._i386_tid)
-
-    @skipIf(oslist=['windows'])
-    @skipIf(triple='^mips')
-    def test_x86_64(self):
-        """Test that lldb can read the process information from an x86_64 linux core file."""
-        self.do_test("linux-x86_64", self._x86_64_pid, self._x86_64_tid)
-
-    def do_test(self, filename, pid, tid):
-        target = self.dbg.CreateTarget("")
-        process = target.LoadCore(filename + ".core")
-        self.assertTrue(process, PROCESS_IS_VALID)
-        self.assertEqual(process.GetNumThreads(), 3)
-        self.assertEqual(process.GetProcessID(), pid)
-
-        for thread in process:
-            # Verify that if we try to read memory from a PT_LOAD that has
-            # p_filesz of zero that we don't get bytes from the next section
-            # that actually did have bytes. The addresses below were found by
-            # dumping the program headers of linux-i386.core and
-            # linux-x86_64.core and verifying that they had a p_filesz of zero.
-            mem_err = lldb.SBError()
-            if process.GetAddressByteSize() == 4:
-                bytes_read = process.ReadMemory(0x8048000, 4, mem_err)
-            else:
-                bytes_read = process.ReadMemory(0x400000, 4, mem_err)
-            self.assertEqual(bytes_read, None)
-            reason = thread.GetStopReason()
-            if( thread.GetThreadID() == tid ):
-                self.assertEqual(reason, lldb.eStopReasonSignal)
-                signal = thread.GetStopReasonDataAtIndex(1)
-                # Check we got signal 4 (SIGILL)
-                self.assertEqual(signal, 4)
-            else:
-                signal = thread.GetStopReasonDataAtIndex(1)
-                # Check we got no signal on the other threads
-                self.assertEqual(signal, 0)
-
-        self.dbg.DeleteTarget(target)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/thread_crash/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/thread_crash/main.cpp
deleted file mode 100644 (file)
index dd83558..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// This test verifies the correct handling of child thread exits.
-
-#include "pseudo_barrier.h"
-#include <thread>
-#include <csignal>
-
-pseudo_barrier_t g_barrier1;
-pseudo_barrier_t g_barrier2;
-
-void *
-thread1 ()
-{
-  // Synchronize with the main thread.
-  pseudo_barrier_wait(g_barrier1);
-
-  // Synchronize with the main thread and thread2.
-  pseudo_barrier_wait(g_barrier2);
-
-  // Return
-  return NULL; // Should not reach here. (thread2 should raise SIGILL)
-}
-
-void *
-thread2 ()
-{
-  raise(SIGILL); // Raise SIGILL
-
-  // Synchronize with thread1 and the main thread.
-  pseudo_barrier_wait(g_barrier2); // Should not reach here.
-
-  // Return
-  return NULL;
-}
-
-int main ()
-{
-  pseudo_barrier_init(g_barrier1, 2);
-  pseudo_barrier_init(g_barrier2, 3);
-
-  // Create a thread.
-  std::thread thread_1(thread1);
-
-  // Wait for thread1 to start.
-  pseudo_barrier_wait(g_barrier1);
-
-  // Create another thread.
-  std::thread thread_2(thread2);
-
-  // Wait for thread2 to start.
-  // Second thread should crash but first thread and main thread may reach here.
-  pseudo_barrier_wait(g_barrier2);
-
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/thread_crash/main.mk b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/thread_crash/main.mk
deleted file mode 100755 (executable)
index 566938c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-ENABLE_THREADS := YES
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/thread_crash/make-core.sh b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/thread_crash/make-core.sh
deleted file mode 100755 (executable)
index ea263c8..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-#! /bin/sh
-
-linux_check_core_pattern()
-{
-    if grep -q '^|' </proc/sys/kernel/core_pattern; then
-        cat <<EOF
-Your system uses a crash report tool ($(cat /proc/sys/kernel/core_pattern)). Core files
-will not be generated.  Please reset /proc/sys/kernel/core_pattern (requires root
-privileges) to enable core generation.
-EOF
-        exit 1
-    fi
-}
-
-OS=$(uname -s)
-case "$OS" in
-FreeBSD)
-    core_pattern=$(sysctl -n kern.corefile)
-    ;;
-Linux)
-    core_pattern=$(cat /proc/sys/kernel/core_pattern)
-    ;;
-*)
-    echo "OS $OS not supported" >&2
-    exit 1
-    ;;
-esac
-
-set -e -x
-
-if [ "$OS" = Linux ]; then
-    linux_check_core_pattern
-fi
-
-ulimit -c 1000
-real_limit=$(ulimit -c)
-if [ $real_limit -lt 100 ]; then
-    cat <<EOF
-Unable to increase the core file limit. Core file may be truncated!
-To fix this, increase HARD core file limit (ulimit -H -c 1000). This may require root
-privileges.
-EOF
-fi
-
-rm -f a.out
-make -f main.mk
-
-cat <<EOF
-Executable file is in a.out.
-Core file will be saved according to pattern $core_pattern.
-EOF
-
-# Save stack size and core_dump_filter
-stack_size=`ulimit -s`
-ulimit -Ss 32 # Decrease stack size to 32k => smaller core files.
-
-core_dump_filter=`cat /proc/self/coredump_filter`
-echo 0 > /proc/self/coredump_filter
-
-exec ./a.out
-
-# Reset stack size and core_dump_filter
-echo core_dump_filter > /proc/self/coredump_filter
-ulimit -s $stack_size
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/mach-core/TestMachCore.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/mach-core/TestMachCore.py
deleted file mode 100644 (file)
index 7680b55..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-"""
-Test basics of mach core file debugging.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class MachCoreTestCase(TestBase):
-    NO_DEBUG_INFO_TESTCASE = True
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        super(MachCoreTestCase, self).setUp()
-        self._initial_platform = lldb.DBG.GetSelectedPlatform()
-
-    def tearDown(self):
-        lldb.DBG.SetSelectedPlatform(self._initial_platform)
-        super(MachCoreTestCase, self).tearDown()
-
-    # This was originally marked as expected failure on Windows, but it has
-    # started timing out instead, so the expectedFailure attribute no longer
-    # correctly tracks it: llvm.org/pr37371
-    @skipIfWindows
-    def test_selected_thread(self):
-        """Test that the right thread is selected after a core is loaded."""
-        # Create core form YAML.
-        self.yaml2obj("test.core.yaml", self.getBuildArtifact("test.core"))
-
-        # Set debugger into synchronous mode
-        self.dbg.SetAsync(False)
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget("")
-
-        # Load OS plugin.
-        python_os_plugin_path = os.path.join(self.getSourceDir(),
-                                             'operating_system.py')
-        command = "settings set target.process.python-os-plugin-path '{}'".format(
-            python_os_plugin_path)
-        self.dbg.HandleCommand(command)
-
-        # Load core.
-        process = target.LoadCore(self.getBuildArtifact("test.core"))
-        self.assertTrue(process, PROCESS_IS_VALID)
-        self.assertEqual(process.GetNumThreads(), 3)
-
-        # Verify our OS plug-in threads showed up
-        thread = process.GetThreadByID(0x111111111)
-        self.assertTrue(thread.IsValid(
-        ), "Make sure there is a thread 0x111111111 after we load the python OS plug-in"
-                        )
-        thread = process.GetThreadByID(0x222222222)
-        self.assertTrue(thread.IsValid(
-        ), "Make sure there is a thread 0x222222222 after we load the python OS plug-in"
-                        )
-        thread = process.GetThreadByID(0x333333333)
-        self.assertTrue(thread.IsValid(
-        ), "Make sure there is a thread 0x333333333 after we load the python OS plug-in"
-                        )
-
-        # Verify that the correct thread is selected
-        thread = process.GetSelectedThread()
-        self.assertEqual(thread.GetThreadID(), 0x333333333)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/mach-core/operating_system.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/mach-core/operating_system.py
deleted file mode 100644 (file)
index 95a5bdc..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-import lldb
-
-
-class OperatingSystemPlugIn(object):
-    """Class that provides data for an instance of a LLDB 'OperatingSystemPython' plug-in class"""
-
-    def __init__(self, process):
-        '''Initialization needs a valid.SBProcess object.
-
-        This plug-in will get created after a live process is valid and has stopped for the first time.
-        '''
-        self.process = None
-        self.registers = None
-        self.threads = None
-        if isinstance(process, lldb.SBProcess) and process.IsValid():
-            self.process = process
-            self.threads = None  # Will be an dictionary containing info for each thread
-
-    def get_target(self):
-        return self.process.target
-
-    def get_thread_info(self):
-        if not self.threads:
-            self.threads = [{
-                'tid': 0x111111111,
-                'name': 'one',
-                'queue': 'queue1',
-                'state': 'stopped',
-                'stop_reason': 'none'
-            }, {
-                'tid': 0x222222222,
-                'name': 'two',
-                'queue': 'queue2',
-                'state': 'stopped',
-                'stop_reason': 'none'
-            }, {
-                'tid': 0x333333333,
-                'name': 'three',
-                'queue': 'queue3',
-                'state': 'stopped',
-                'stop_reason': 'sigstop',
-                'core': 0
-            }]
-        return self.threads
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/mach-core/test.core.yaml b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/mach-core/test.core.yaml
deleted file mode 100644 (file)
index 84ce54e..0000000
+++ /dev/null
@@ -1,853 +0,0 @@
---- !mach-o
-FileHeader:      
-  magic:           0xFEEDFACF
-  cputype:         0x01000007
-  cpusubtype:      0x00000003
-  filetype:        0x00000004
-  ncmds:           59
-  sizeofcmds:      4384
-  flags:           0x00000000
-  reserved:        0x00000000
-LoadCommands:    
-  - cmd:             LC_THREAD
-    cmdsize:         208
-    PayloadBytes:    
-      - 0x04
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x2A
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x01
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x80
-      - 0xF7
-      - 0xBF
-      - 0xEF
-      - 0xFE
-      - 0x7F
-      - 0x00
-      - 0x00
-      - 0x20
-      - 0xF6
-      - 0xBF
-      - 0xEF
-      - 0xFE
-      - 0x7F
-      - 0x00
-      - 0x00
-      - 0x01
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x10
-      - 0xF6
-      - 0xBF
-      - 0xEF
-      - 0xFE
-      - 0x7F
-      - 0x00
-      - 0x00
-      - 0xF0
-      - 0xF5
-      - 0xBF
-      - 0xEF
-      - 0xFE
-      - 0x7F
-      - 0x00
-      - 0x00
-      - 0xF0
-      - 0xF5
-      - 0xBF
-      - 0xEF
-      - 0xFE
-      - 0x7F
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0xFF
-      - 0xFF
-      - 0xFF
-      - 0xFF
-      - 0xC8
-      - 0xB0
-      - 0x70
-      - 0xA7
-      - 0xFF
-      - 0x7F
-      - 0x00
-      - 0x00
-      - 0xD0
-      - 0xB0
-      - 0x70
-      - 0xA7
-      - 0xFF
-      - 0x7F
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0xA0
-      - 0x0F
-      - 0x00
-      - 0x00
-      - 0x01
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x46
-      - 0x02
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x2B
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x06
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x04
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x03
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x00
-      - 0x10
-      - 0x00
-      - 0x02
-      - 0xA7
-      - 0xFF
-      - 0x7F
-      - 0x00
-      - 0x00
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          4294967296
-    vmsize:          4096
-    fileoff:         8192
-    filesize:        4096
-    maxprot:         5
-    initprot:        5
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          4294971392
-    vmsize:          4096
-    fileoff:         12288
-    filesize:        4096
-    maxprot:         1
-    initprot:        1
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          4294975488
-    vmsize:          307200
-    fileoff:         16384
-    filesize:        307200
-    maxprot:         5
-    initprot:        5
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          4295282688
-    vmsize:          12288
-    fileoff:         323584
-    filesize:        12288
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          4295294976
-    vmsize:          217088
-    fileoff:         335872
-    filesize:        217088
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          4295512064
-    vmsize:          110592
-    fileoff:         552960
-    filesize:        110592
-    maxprot:         1
-    initprot:        1
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          4295622656
-    vmsize:          8192
-    fileoff:         663552
-    filesize:        8192
-    maxprot:         1
-    initprot:        1
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          4295630848
-    vmsize:          8192
-    fileoff:         671744
-    filesize:        8192
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          4295639040
-    vmsize:          4096
-    fileoff:         679936
-    filesize:        4096
-    maxprot:         1
-    initprot:        1
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          4295643136
-    vmsize:          4096
-    fileoff:         684032
-    filesize:        4096
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          4295651328
-    vmsize:          24576
-    fileoff:         688128
-    filesize:        24576
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          4295684096
-    vmsize:          24576
-    fileoff:         712704
-    filesize:        24576
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          4295712768
-    vmsize:          4096
-    fileoff:         737280
-    filesize:        4096
-    maxprot:         1
-    initprot:        1
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          4295716864
-    vmsize:          8192
-    fileoff:         741376
-    filesize:        8192
-    maxprot:         1
-    initprot:        1
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          4296015872
-    vmsize:          1048576
-    fileoff:         749568
-    filesize:        1048576
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          4297064448
-    vmsize:          1048576
-    fileoff:         1798144
-    filesize:        1048576
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          4298113024
-    vmsize:          1048576
-    fileoff:         2846720
-    filesize:        1048576
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          4303355904
-    vmsize:          8388608
-    fileoff:         3895296
-    filesize:        8388608
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140732912369664
-    vmsize:          8388608
-    fileoff:         12283904
-    filesize:        8388608
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140734252867584
-    vmsize:          811999232
-    fileoff:         20672512
-    filesize:        811999232
-    maxprot:         5
-    initprot:        5
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735863480320
-    vmsize:          20553728
-    fileoff:         832671744
-    filesize:        20553728
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735884034048
-    vmsize:          2097152
-    fileoff:         853225472
-    filesize:        2097152
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735886131200
-    vmsize:          2097152
-    fileoff:         855322624
-    filesize:        2097152
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735888228352
-    vmsize:          2097152
-    fileoff:         857419776
-    filesize:        2097152
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735890325504
-    vmsize:          2097152
-    fileoff:         859516928
-    filesize:        2097152
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735892422656
-    vmsize:          2097152
-    fileoff:         861614080
-    filesize:        2097152
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735894519808
-    vmsize:          2097152
-    fileoff:         863711232
-    filesize:        2097152
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735896616960
-    vmsize:          2097152
-    fileoff:         865808384
-    filesize:        2097152
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735898714112
-    vmsize:          2097152
-    fileoff:         867905536
-    filesize:        2097152
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735900811264
-    vmsize:          2097152
-    fileoff:         870002688
-    filesize:        2097152
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735902908416
-    vmsize:          10485760
-    fileoff:         872099840
-    filesize:        10485760
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735913394176
-    vmsize:          4194304
-    fileoff:         882585600
-    filesize:        4194304
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735917588480
-    vmsize:          2097152
-    fileoff:         886779904
-    filesize:        2097152
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735919685632
-    vmsize:          2097152
-    fileoff:         888877056
-    filesize:        2097152
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735921782784
-    vmsize:          4194304
-    fileoff:         890974208
-    filesize:        4194304
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735925977088
-    vmsize:          4194304
-    fileoff:         895168512
-    filesize:        4194304
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735930171392
-    vmsize:          6291456
-    fileoff:         899362816
-    filesize:        6291456
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735936462848
-    vmsize:          2097152
-    fileoff:         905654272
-    filesize:        2097152
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735938560000
-    vmsize:          2097152
-    fileoff:         907751424
-    filesize:        2097152
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735940657152
-    vmsize:          2097152
-    fileoff:         909848576
-    filesize:        2097152
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735942754304
-    vmsize:          2097152
-    fileoff:         911945728
-    filesize:        2097152
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735944851456
-    vmsize:          6291456
-    fileoff:         914042880
-    filesize:        6291456
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735951142912
-    vmsize:          2097152
-    fileoff:         920334336
-    filesize:        2097152
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735953240064
-    vmsize:          4194304
-    fileoff:         922431488
-    filesize:        4194304
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735957434368
-    vmsize:          2097152
-    fileoff:         926625792
-    filesize:        2097152
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735959531520
-    vmsize:          2097152
-    fileoff:         928722944
-    filesize:        2097152
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735961628672
-    vmsize:          20971520
-    fileoff:         930820096
-    filesize:        20971520
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735982600192
-    vmsize:          6291456
-    fileoff:         951791616
-    filesize:        6291456
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735988891648
-    vmsize:          2097152
-    fileoff:         958083072
-    filesize:        2097152
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735990988800
-    vmsize:          2097152
-    fileoff:         960180224
-    filesize:        2097152
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735993085952
-    vmsize:          2097152
-    fileoff:         962277376
-    filesize:        2097152
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735995183104
-    vmsize:          2097152
-    fileoff:         964374528
-    filesize:        2097152
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735997280256
-    vmsize:          2097152
-    fileoff:         966471680
-    filesize:        2097152
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140735999377408
-    vmsize:          2097152
-    fileoff:         968568832
-    filesize:        2097152
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140736001474560
-    vmsize:          1302528
-    fileoff:         970665984
-    filesize:        1302528
-    maxprot:         3
-    initprot:        3
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140736937222144
-    vmsize:          219267072
-    fileoff:         971968512
-    filesize:        219267072
-    maxprot:         1
-    initprot:        1
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140737486258176
-    vmsize:          4096
-    fileoff:         1191235584
-    filesize:        4096
-    maxprot:         1
-    initprot:        1
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         ''
-    vmaddr:          140737487028224
-    vmsize:          4096
-    fileoff:         1191239680
-    filesize:        4096
-    maxprot:         5
-    initprot:        5
-    nsects:          0
-    flags:           0
-...
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py
deleted file mode 100644 (file)
index 62b6c80..0000000
+++ /dev/null
@@ -1,463 +0,0 @@
-"""
-Test basics of Minidump debugging.
-"""
-
-from six import iteritems
-
-import shutil
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class MiniDumpNewTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    _linux_x86_64_pid = 29917
-    _linux_x86_64_not_crashed_pid = 29939
-    _linux_x86_64_not_crashed_pid_offset = 0xD967
-
-    def setUp(self):
-        super(MiniDumpNewTestCase, self).setUp()
-        self._initial_platform = lldb.DBG.GetSelectedPlatform()
-
-    def tearDown(self):
-        lldb.DBG.SetSelectedPlatform(self._initial_platform)
-        super(MiniDumpNewTestCase, self).tearDown()
-
-    def process_from_yaml(self, yaml_file):
-        minidump_path = self.getBuildArtifact(os.path.basename(yaml_file) + ".dmp")
-        self.yaml2obj(yaml_file, minidump_path)
-        self.target = self.dbg.CreateTarget(None)
-        self.process = self.target.LoadCore(minidump_path)
-        return self.process
-
-    def check_state(self):
-        with open(os.devnull) as devnul:
-            # sanitize test output
-            self.dbg.SetOutputFileHandle(devnul, False)
-            self.dbg.SetErrorFileHandle(devnul, False)
-
-            self.assertTrue(self.process.is_stopped)
-
-            # Process.Continue
-            error = self.process.Continue()
-            self.assertFalse(error.Success())
-            self.assertTrue(self.process.is_stopped)
-
-            # Thread.StepOut
-            thread = self.process.GetSelectedThread()
-            thread.StepOut()
-            self.assertTrue(self.process.is_stopped)
-
-            # command line
-            self.dbg.HandleCommand('s')
-            self.assertTrue(self.process.is_stopped)
-            self.dbg.HandleCommand('c')
-            self.assertTrue(self.process.is_stopped)
-
-            # restore file handles
-            self.dbg.SetOutputFileHandle(None, False)
-            self.dbg.SetErrorFileHandle(None, False)
-
-    def test_loadcore_error_status(self):
-        """Test the SBTarget.LoadCore(core, error) overload."""
-        minidump_path = self.getBuildArtifact("linux-x86_64.dmp")
-        self.yaml2obj("linux-x86_64.yaml", minidump_path)
-        self.target = self.dbg.CreateTarget(None)
-        error = lldb.SBError()
-        self.process = self.target.LoadCore(minidump_path, error)
-        self.assertTrue(self.process, PROCESS_IS_VALID)
-        self.assertTrue(error.Success())
-
-    def test_loadcore_error_status_failure(self):
-        """Test the SBTarget.LoadCore(core, error) overload."""
-        self.target = self.dbg.CreateTarget(None)
-        error = lldb.SBError()
-        self.process = self.target.LoadCore("non-existent.dmp", error)
-        self.assertFalse(self.process, PROCESS_IS_VALID)
-        self.assertTrue(error.Fail())
-
-    def test_process_info_in_minidump(self):
-        """Test that lldb can read the process information from the Minidump."""
-        self.process_from_yaml("linux-x86_64.yaml")
-        self.assertTrue(self.process, PROCESS_IS_VALID)
-        self.assertEqual(self.process.GetNumThreads(), 1)
-        self.assertEqual(self.process.GetProcessID(), self._linux_x86_64_pid)
-        self.check_state()
-
-    def test_memory_region_name(self):
-        self.process_from_yaml("regions-linux-map.yaml")
-        result = lldb.SBCommandReturnObject()
-        addr_region_name_pairs = [
-            ("0x400d9000", "/system/bin/app_process"),
-            ("0x400db000", "/system/bin/app_process"),
-            ("0x400dd000", "/system/bin/linker"),
-            ("0x400ed000", "/system/bin/linker"),
-            ("0x400ee000", "/system/bin/linker"),
-            ("0x400fb000", "/system/lib/liblog.so"),
-            ("0x400fc000", "/system/lib/liblog.so"),
-            ("0x400fd000", "/system/lib/liblog.so"),
-            ("0x400ff000", "/system/lib/liblog.so"),
-            ("0x40100000", "/system/lib/liblog.so"),
-            ("0x40101000", "/system/lib/libc.so"),
-            ("0x40122000", "/system/lib/libc.so"),
-            ("0x40123000", "/system/lib/libc.so"),
-            ("0x40167000", "/system/lib/libc.so"),
-            ("0x40169000", "/system/lib/libc.so"),
-        ]
-        ci = self.dbg.GetCommandInterpreter()
-        for (addr, region_name) in addr_region_name_pairs:
-            command = 'memory region ' + addr
-            ci.HandleCommand(command, result, False)
-            message = 'Ensure memory "%s" shows up in output for "%s"' % (
-                region_name, command)
-            self.assertTrue(region_name in result.GetOutput(), message)
-
-    def test_thread_info_in_minidump(self):
-        """Test that lldb can read the thread information from the Minidump."""
-        self.process_from_yaml("linux-x86_64.yaml")
-        self.check_state()
-        # This process crashed due to a segmentation fault in its
-        # one and only thread.
-        self.assertEqual(self.process.GetNumThreads(), 1)
-        thread = self.process.GetThreadAtIndex(0)
-        self.assertEqual(thread.GetStopReason(), lldb.eStopReasonSignal)
-        stop_description = thread.GetStopDescription(256)
-        self.assertTrue("SIGSEGV" in stop_description)
-
-    def test_stack_info_in_minidump(self):
-        """Test that we can see a trivial stack in a breakpad-generated Minidump."""
-        # target create linux-x86_64 -c linux-x86_64.dmp
-        self.dbg.CreateTarget("linux-x86_64")
-        self.target = self.dbg.GetSelectedTarget()
-        self.process = self.target.LoadCore("linux-x86_64.dmp")
-        self.check_state()
-        self.assertEqual(self.process.GetNumThreads(), 1)
-        self.assertEqual(self.process.GetProcessID(), self._linux_x86_64_pid)
-        thread = self.process.GetThreadAtIndex(0)
-        # frame #0: linux-x86_64`crash()
-        # frame #1: linux-x86_64`_start
-        self.assertEqual(thread.GetNumFrames(), 2)
-        frame = thread.GetFrameAtIndex(0)
-        self.assertTrue(frame.IsValid())
-        self.assertTrue(frame.GetModule().IsValid())
-        pc = frame.GetPC()
-        eip = frame.FindRegister("pc")
-        self.assertTrue(eip.IsValid())
-        self.assertEqual(pc, eip.GetValueAsUnsigned())
-
-    def test_snapshot_minidump_dump_requested(self):
-        """Test that if we load a snapshot minidump file (meaning the process
-        did not crash) with exception code "DUMP_REQUESTED" there is no stop reason."""
-        # target create -c linux-x86_64_not_crashed.dmp
-        self.dbg.CreateTarget(None)
-        self.target = self.dbg.GetSelectedTarget()
-        self.process = self.target.LoadCore("linux-x86_64_not_crashed.dmp")
-        self.check_state()
-        self.assertEqual(self.process.GetNumThreads(), 1)
-        thread = self.process.GetThreadAtIndex(0)
-        self.assertEqual(thread.GetStopReason(), lldb.eStopReasonNone)
-        stop_description = thread.GetStopDescription(256)
-        self.assertEqual(stop_description, "")
-
-    def test_snapshot_minidump_null_exn_code(self):
-        """Test that if we load a snapshot minidump file (meaning the process
-        did not crash) with exception code zero there is no stop reason."""
-        self.process_from_yaml("linux-x86_64_null_signal.yaml")
-        self.check_state()
-        self.assertEqual(self.process.GetNumThreads(), 1)
-        thread = self.process.GetThreadAtIndex(0)
-        self.assertEqual(thread.GetStopReason(), lldb.eStopReasonNone)
-        stop_description = thread.GetStopDescription(256)
-        self.assertEqual(stop_description, "")
-
-    def check_register_unsigned(self, set, name, expected):
-        reg_value = set.GetChildMemberWithName(name)
-        self.assertTrue(reg_value.IsValid(),
-                        'Verify we have a register named "%s"' % (name))
-        self.assertEqual(reg_value.GetValueAsUnsigned(), expected,
-                         'Verify "%s" == %i' % (name, expected))
-
-    def check_register_string_value(self, set, name, expected, format):
-        reg_value = set.GetChildMemberWithName(name)
-        self.assertTrue(reg_value.IsValid(),
-                        'Verify we have a register named "%s"' % (name))
-        if format is not None:
-            reg_value.SetFormat(format)
-        self.assertEqual(reg_value.GetValue(), expected,
-                         'Verify "%s" has string value "%s"' % (name,
-                                                                expected))
-
-    def test_arm64_registers(self):
-        """Test ARM64 registers from a breakpad created minidump."""
-        self.process_from_yaml("arm64-macos.yaml")
-        self.check_state()
-        self.assertEqual(self.process.GetNumThreads(), 1)
-        thread = self.process.GetThreadAtIndex(0)
-        self.assertEqual(thread.GetStopReason(), lldb.eStopReasonNone)
-        stop_description = thread.GetStopDescription(256)
-        self.assertEqual(stop_description, "")
-        registers = thread.GetFrameAtIndex(0).GetRegisters()
-        # Verify the GPR registers are all correct
-        # Verify x0 - x31 register values
-        gpr = registers.GetValueAtIndex(0)
-        for i in range(32):
-            v = i+1 | i+2 << 32 | i+3 << 48
-            w = i+1
-            self.check_register_unsigned(gpr, 'x%i' % (i), v)
-            self.check_register_unsigned(gpr, 'w%i' % (i), w)
-        # Verify arg1 - arg8 register values
-        for i in range(1, 9):
-            v = i | i+1 << 32 | i+2 << 48
-            self.check_register_unsigned(gpr, 'arg%i' % (i), v)
-        i = 29
-        v = i+1 | i+2 << 32 | i+3 << 48
-        self.check_register_unsigned(gpr, 'fp', v)
-        i = 30
-        v = i+1 | i+2 << 32 | i+3 << 48
-        self.check_register_unsigned(gpr, 'lr', v)
-        i = 31
-        v = i+1 | i+2 << 32 | i+3 << 48
-        self.check_register_unsigned(gpr, 'sp', v)
-        self.check_register_unsigned(gpr, 'pc', 0x1000)
-        self.check_register_unsigned(gpr, 'cpsr', 0x11223344)
-        self.check_register_unsigned(gpr, 'psr', 0x11223344)
-
-        # Verify the FPR registers are all correct
-        fpr = registers.GetValueAtIndex(1)
-        for i in range(32):
-            v = "0x"
-            d = "0x"
-            s = "0x"
-            h = "0x"
-            for j in range(i+15, i-1, -1):
-                v += "%2.2x" % (j)
-            for j in range(i+7, i-1, -1):
-                d += "%2.2x" % (j)
-            for j in range(i+3, i-1, -1):
-                s += "%2.2x" % (j)
-            for j in range(i+1, i-1, -1):
-                h += "%2.2x" % (j)
-            self.check_register_string_value(fpr, "v%i" % (i), v,
-                                             lldb.eFormatHex)
-            self.check_register_string_value(fpr, "d%i" % (i), d,
-                                             lldb.eFormatHex)
-            self.check_register_string_value(fpr, "s%i" % (i), s,
-                                             lldb.eFormatHex)
-            self.check_register_string_value(fpr, "h%i" % (i), h,
-                                             lldb.eFormatHex)
-        self.check_register_unsigned(gpr, 'fpsr', 0x55667788)
-        self.check_register_unsigned(gpr, 'fpcr', 0x99aabbcc)
-
-    def verify_arm_registers(self, apple=False):
-        """
-            Verify values of all ARM registers from a breakpad created
-            minidump.
-        """
-        if apple:
-            self.process_from_yaml("arm-macos.yaml")
-        else:
-            self.process_from_yaml("arm-linux.yaml")
-        self.check_state()
-        self.assertEqual(self.process.GetNumThreads(), 1)
-        thread = self.process.GetThreadAtIndex(0)
-        self.assertEqual(thread.GetStopReason(), lldb.eStopReasonNone)
-        stop_description = thread.GetStopDescription(256)
-        self.assertEqual(stop_description, "")
-        registers = thread.GetFrameAtIndex(0).GetRegisters()
-        # Verify the GPR registers are all correct
-        # Verify x0 - x31 register values
-        gpr = registers.GetValueAtIndex(0)
-        for i in range(1, 16):
-            self.check_register_unsigned(gpr, 'r%i' % (i), i+1)
-        # Verify arg1 - arg4 register values
-        for i in range(1, 5):
-            self.check_register_unsigned(gpr, 'arg%i' % (i), i)
-        if apple:
-            self.check_register_unsigned(gpr, 'fp', 0x08)
-        else:
-            self.check_register_unsigned(gpr, 'fp', 0x0c)
-        self.check_register_unsigned(gpr, 'lr', 0x0f)
-        self.check_register_unsigned(gpr, 'sp', 0x0e)
-        self.check_register_unsigned(gpr, 'pc', 0x10)
-        self.check_register_unsigned(gpr, 'cpsr', 0x11223344)
-
-        # Verify the FPR registers are all correct
-        fpr = registers.GetValueAtIndex(1)
-        # Check d0 - d31
-        self.check_register_unsigned(gpr, 'fpscr', 0x55667788aabbccdd)
-        for i in range(32):
-            value = (i+1) | (i+1) << 8 | (i+1) << 32 | (i+1) << 48
-            self.check_register_unsigned(fpr, "d%i" % (i), value)
-        # Check s0 - s31
-        for i in range(32):
-            i_val = (i >> 1) + 1
-            if i & 1:
-                value = "%#8.8x" % (i_val | i_val << 16)
-            else:
-                value = "%#8.8x" % (i_val | i_val << 8)
-            self.check_register_string_value(fpr, "s%i" % (i), value,
-                                             lldb.eFormatHex)
-        # Check q0 - q15
-        for i in range(15):
-            a = i * 2 + 1
-            b = a + 1
-            value = ("0x00%2.2x00%2.2x0000%2.2x%2.2x"
-                     "00%2.2x00%2.2x0000%2.2x%2.2x") % (b, b, b, b, a, a, a, a)
-            self.check_register_string_value(fpr, "q%i" % (i), value,
-                                             lldb.eFormatHex)
-
-    def test_linux_arm_registers(self):
-        """Test Linux ARM registers from a breakpad created minidump.
-
-           The frame pointer is R11 for linux.
-        """
-        self.verify_arm_registers(apple=False)
-
-    def test_apple_arm_registers(self):
-        """Test Apple ARM registers from a breakpad created minidump.
-
-           The frame pointer is R7 for linux.
-        """
-        self.verify_arm_registers(apple=True)
-
-    def do_test_deeper_stack(self, binary, core, pid):
-        target = self.dbg.CreateTarget(binary)
-        process = target.LoadCore(core)
-        thread = process.GetThreadAtIndex(0)
-
-        self.assertEqual(process.GetProcessID(), pid)
-
-        expected_stack = {1: 'bar', 2: 'foo', 3: '_start'}
-        self.assertGreaterEqual(thread.GetNumFrames(), len(expected_stack))
-        for index, name in iteritems(expected_stack):
-            frame = thread.GetFrameAtIndex(index)
-            self.assertTrue(frame.IsValid())
-            function_name = frame.GetFunctionName()
-            self.assertTrue(name in function_name)
-
-    @skipIfLLVMTargetMissing("X86")
-    def test_deeper_stack_in_minidump(self):
-        """Test that we can examine a more interesting stack in a Minidump."""
-        # Launch with the Minidump, and inspect the stack.
-        # target create linux-x86_64_not_crashed -c linux-x86_64_not_crashed.dmp
-        self.do_test_deeper_stack("linux-x86_64_not_crashed",
-                                  "linux-x86_64_not_crashed.dmp",
-                                  self._linux_x86_64_not_crashed_pid)
-
-    def do_change_pid_in_minidump(self, core, newcore, offset, oldpid, newpid):
-        """ This assumes that the minidump is breakpad generated on Linux -
-        meaning that the PID in the file will be an ascii string part of
-        /proc/PID/status which is written in the file
-        """
-        shutil.copyfile(core, newcore)
-        with open(newcore, "rb+") as f:
-            f.seek(offset)
-            currentpid = f.read(5).decode('utf-8')
-            self.assertEqual(currentpid, oldpid)
-
-            f.seek(offset)
-            if len(newpid) < len(oldpid):
-                newpid += " " * (len(oldpid) - len(newpid))
-            newpid += "\n"
-            f.write(newpid.encode('utf-8'))
-
-    def test_deeper_stack_in_minidump_with_same_pid_running(self):
-        """Test that we read the information from the core correctly even if we
-        have a running process with the same PID"""
-        new_core = self.getBuildArtifact("linux-x86_64_not_crashed-pid.dmp")
-        self.do_change_pid_in_minidump("linux-x86_64_not_crashed.dmp",
-                                       new_core,
-                                       self._linux_x86_64_not_crashed_pid_offset,
-                                       str(self._linux_x86_64_not_crashed_pid),
-                                       str(os.getpid()))
-        self.do_test_deeper_stack("linux-x86_64_not_crashed", new_core, os.getpid())
-
-    def test_two_cores_same_pid(self):
-        """Test that we handle the situation if we have two core files with the same PID """
-        new_core = self.getBuildArtifact("linux-x86_64_not_crashed-pid.dmp")
-        self.do_change_pid_in_minidump("linux-x86_64_not_crashed.dmp",
-                                       new_core,
-                                       self._linux_x86_64_not_crashed_pid_offset,
-                                       str(self._linux_x86_64_not_crashed_pid),
-                                       str(self._linux_x86_64_pid))
-        self.do_test_deeper_stack("linux-x86_64_not_crashed",
-                                  new_core, self._linux_x86_64_pid)
-        self.test_stack_info_in_minidump()
-
-    def test_local_variables_in_minidump(self):
-        """Test that we can examine local variables in a Minidump."""
-        # Launch with the Minidump, and inspect a local variable.
-        # target create linux-x86_64_not_crashed -c linux-x86_64_not_crashed.dmp
-        self.target = self.dbg.CreateTarget("linux-x86_64_not_crashed")
-        self.process = self.target.LoadCore("linux-x86_64_not_crashed.dmp")
-        self.check_state()
-        thread = self.process.GetThreadAtIndex(0)
-        frame = thread.GetFrameAtIndex(1)
-        value = frame.EvaluateExpression('x')
-        self.assertEqual(value.GetValueAsSigned(), 3)
-
-    def test_memory_regions_in_minidump(self):
-        """Test memory regions from a Minidump"""
-        self.process_from_yaml("regions-linux-map.yaml")
-        self.check_state()
-
-        regions_count = 19
-        region_info_list = self.process.GetMemoryRegions()
-        self.assertEqual(region_info_list.GetSize(), regions_count)
-
-        def check_region(index, start, end, read, write, execute, mapped, name):
-            region_info = lldb.SBMemoryRegionInfo()
-            self.assertTrue(
-                self.process.GetMemoryRegionInfo(start, region_info).Success())
-            self.assertEqual(start, region_info.GetRegionBase())
-            self.assertEqual(end, region_info.GetRegionEnd())
-            self.assertEqual(read, region_info.IsReadable())
-            self.assertEqual(write, region_info.IsWritable())
-            self.assertEqual(execute, region_info.IsExecutable())
-            self.assertEqual(mapped, region_info.IsMapped())
-            self.assertEqual(name, region_info.GetName())
-
-            # Ensure we have the same regions as SBMemoryRegionInfoList contains.
-            if index >= 0 and index < regions_count:
-                region_info_from_list = lldb.SBMemoryRegionInfo()
-                self.assertTrue(region_info_list.GetMemoryRegionAtIndex(
-                    index, region_info_from_list))
-                self.assertEqual(region_info_from_list, region_info)
-
-        a = "/system/bin/app_process"
-        b = "/system/bin/linker"
-        c = "/system/lib/liblog.so"
-        d = "/system/lib/libc.so"
-        n = None
-        max_int = 0xffffffffffffffff
-
-        # Test address before the first entry comes back with nothing mapped up
-        # to first valid region info
-        check_region(-1, 0x00000000, 0x400d9000, False, False, False, False, n)
-        check_region( 0, 0x400d9000, 0x400db000, True,  False, True,  True,  a)
-        check_region( 1, 0x400db000, 0x400dc000, True,  False, False, True,  a)
-        check_region( 2, 0x400dc000, 0x400dd000, True,  True,  False, True,  n)
-        check_region( 3, 0x400dd000, 0x400ec000, True,  False, True,  True,  b)
-        check_region( 4, 0x400ec000, 0x400ed000, True,  False, False, True,  n)
-        check_region( 5, 0x400ed000, 0x400ee000, True,  False, False, True,  b)
-        check_region( 6, 0x400ee000, 0x400ef000, True,  True,  False, True,  b)
-        check_region( 7, 0x400ef000, 0x400fb000, True,  True,  False, True,  n)
-        check_region( 8, 0x400fb000, 0x400fc000, True,  False, True,  True,  c)
-        check_region( 9, 0x400fc000, 0x400fd000, True,  True,  True,  True,  c)
-        check_region(10, 0x400fd000, 0x400ff000, True,  False, True,  True,  c)
-        check_region(11, 0x400ff000, 0x40100000, True,  False, False, True,  c)
-        check_region(12, 0x40100000, 0x40101000, True,  True,  False, True,  c)
-        check_region(13, 0x40101000, 0x40122000, True,  False, True,  True,  d)
-        check_region(14, 0x40122000, 0x40123000, True,  True,  True,  True,  d)
-        check_region(15, 0x40123000, 0x40167000, True,  False, True,  True,  d)
-        check_region(16, 0x40167000, 0x40169000, True,  False, False, True,  d)
-        check_region(17, 0x40169000, 0x4016b000, True,  True,  False, True,  d)
-        check_region(18, 0x4016b000, 0x40176000, True,  True,  False, True,  n)
-        check_region(-1, 0x40176000, max_int,    False, False, False, False, n)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpUUID.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpUUID.py
deleted file mode 100644 (file)
index ca0ad5f..0000000
+++ /dev/null
@@ -1,195 +0,0 @@
-"""
-Test basics of Minidump debugging.
-"""
-
-from six import iteritems
-
-
-import lldb
-import os
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class MiniDumpUUIDTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        super(MiniDumpUUIDTestCase, self).setUp()
-        self._initial_platform = lldb.DBG.GetSelectedPlatform()
-
-    def tearDown(self):
-        lldb.DBG.SetSelectedPlatform(self._initial_platform)
-        super(MiniDumpUUIDTestCase, self).tearDown()
-
-    def verify_module(self, module, verify_path, verify_uuid):
-        uuid = module.GetUUIDString()
-        self.assertEqual(verify_path, module.GetFileSpec().fullpath)
-        self.assertEqual(verify_uuid, uuid)
-
-    def get_minidump_modules(self, yaml_file):
-        minidump_path = self.getBuildArtifact(os.path.basename(yaml_file) + ".dmp")
-        self.yaml2obj(yaml_file, minidump_path)
-        self.target = self.dbg.CreateTarget(None)
-        self.process = self.target.LoadCore(minidump_path)
-        return self.target.modules
-
-    def test_zero_uuid_modules(self):
-        """
-            Test multiple modules having a MINIDUMP_MODULE.CvRecord that is valid,
-            but contains a PDB70 value whose age is zero and whose UUID values are
-            all zero. Prior to a fix all such modules would be duplicated to the
-            first one since the UUIDs claimed to be valid and all zeroes. Now we
-            ensure that the UUID is not valid for each module and that we have
-            each of the modules in the target after loading the core
-        """
-        modules = self.get_minidump_modules("linux-arm-zero-uuids.yaml")
-        self.assertEqual(2, len(modules))
-        self.verify_module(modules[0], "/file/does/not/exist/a", None)
-        self.verify_module(modules[1], "/file/does/not/exist/b", None)
-
-    def test_uuid_modules_no_age(self):
-        """
-            Test multiple modules having a MINIDUMP_MODULE.CvRecord that is valid,
-            and contains a PDB70 value whose age is zero and whose UUID values are
-            valid. Ensure we decode the UUID and don't include the age field in the UUID.
-        """
-        modules = self.get_minidump_modules("linux-arm-uuids-no-age.yaml")
-        modules = self.target.modules
-        self.assertEqual(2, len(modules))
-        self.verify_module(modules[0], "/tmp/a", "01020304-0506-0708-090A-0B0C0D0E0F10")
-        self.verify_module(modules[1], "/tmp/b", "0A141E28-323C-4650-5A64-6E78828C96A0")
-
-    def test_uuid_modules_no_age_apple(self):
-        """
-            Test multiple modules having a MINIDUMP_MODULE.CvRecord that is valid,
-            and contains a PDB70 value whose age is zero and whose UUID values are
-            valid. Ensure we decode the UUID and don't include the age field in the UUID.
-            Also ensure that the first uint32_t is byte swapped, along with the next
-            two uint16_t values. Breakpad incorrectly byte swaps these values when it
-            saves Darwin minidump files.
-        """
-        modules = self.get_minidump_modules("macos-arm-uuids-no-age.yaml")
-        modules = self.target.modules
-        self.assertEqual(2, len(modules))
-        self.verify_module(modules[0], "/tmp/a", "04030201-0605-0807-090A-0B0C0D0E0F10")
-        self.verify_module(modules[1], "/tmp/b", "281E140A-3C32-5046-5A64-6E78828C96A0")
-
-    def test_uuid_modules_with_age(self):
-        """
-            Test multiple modules having a MINIDUMP_MODULE.CvRecord that is valid,
-            and contains a PDB70 value whose age is valid and whose UUID values are
-            valid. Ensure we decode the UUID and include the age field in the UUID.
-        """
-        modules = self.get_minidump_modules("linux-arm-uuids-with-age.yaml")
-        self.assertEqual(2, len(modules))
-        self.verify_module(modules[0], "/tmp/a", "01020304-0506-0708-090A-0B0C0D0E0F10-10101010")
-        self.verify_module(modules[1], "/tmp/b", "0A141E28-323C-4650-5A64-6E78828C96A0-20202020")
-
-    def test_uuid_modules_elf_build_id_16(self):
-        """
-            Test multiple modules having a MINIDUMP_MODULE.CvRecord that is valid,
-            and contains a ELF build ID whose value is valid and is 16 bytes long.
-        """
-        modules = self.get_minidump_modules("linux-arm-uuids-elf-build-id-16.yaml")
-        self.assertEqual(2, len(modules))
-        self.verify_module(modules[0], "/tmp/a", "01020304-0506-0708-090A-0B0C0D0E0F10")
-        self.verify_module(modules[1], "/tmp/b", "0A141E28-323C-4650-5A64-6E78828C96A0")
-
-    def test_uuid_modules_elf_build_id_20(self):
-        """
-            Test multiple modules having a MINIDUMP_MODULE.CvRecord that is valid,
-            and contains a ELF build ID whose value is valid and is 20 bytes long.
-        """
-        modules = self.get_minidump_modules("linux-arm-uuids-elf-build-id-20.yaml")
-        self.assertEqual(2, len(modules))
-        self.verify_module(modules[0], "/tmp/a", "01020304-0506-0708-090A-0B0C0D0E0F10-11121314")
-        self.verify_module(modules[1], "/tmp/b", "0A141E28-323C-4650-5A64-6E78828C96A0-AAB4BEC8")
-
-    def test_uuid_modules_elf_build_id_zero(self):
-        """
-            Test multiple modules having a MINIDUMP_MODULE.CvRecord that is valid,
-            and contains a ELF build ID whose value is all zero.
-        """
-        modules = self.get_minidump_modules("linux-arm-uuids-elf-build-id-zero.yaml")
-        self.assertEqual(2, len(modules))
-        self.verify_module(modules[0], "/not/exist/a", None)
-        self.verify_module(modules[1], "/not/exist/b", None)
-
-    def test_uuid_modules_elf_build_id_same(self):
-        """
-            Test multiple modules having a MINIDUMP_MODULE.CvRecord that is
-            valid, and contains a ELF build ID whose value is the same. There
-            is an assert in the PlaceholderObjectFile that was firing when we
-            encountered this which was crashing the process that was checking
-            if PlaceholderObjectFile.m_base was the same as the address this
-            fake module was being loaded at. We need to ensure we don't crash
-            in such cases and that we add both modules even though they have
-            the same UUID.
-        """
-        modules = self.get_minidump_modules("linux-arm-same-uuids.yaml")
-        self.assertEqual(2, len(modules))
-        self.verify_module(modules[0], "/file/does/not/exist/a",
-                           '11223344-1122-3344-1122-334411223344-11223344')
-        self.verify_module(modules[1], "/file/does/not/exist/b",
-                           '11223344-1122-3344-1122-334411223344-11223344')
-
-    @expectedFailureAll(oslist=["windows"])
-    def test_partial_uuid_match(self):
-        """
-            Breakpad has been known to create minidump files using CvRecord in each
-            module whose signature is set to PDB70 where the UUID only contains the
-            first 16 bytes of a 20 byte ELF build ID. Code was added to
-            ProcessMinidump.cpp to deal with this and allows partial UUID matching.
-
-            This test verifies that if we have a minidump with a 16 byte UUID, that
-            we are able to associate a symbol file with a 20 byte UUID only if the
-            first 16 bytes match. In this case we will see the path from the file
-            we found in the test directory and the 20 byte UUID from the actual
-            file, not the 16 byte shortened UUID from the minidump.
-        """
-        so_path = self.getBuildArtifact("libuuidmatch.so")
-        self.yaml2obj("libuuidmatch.yaml", so_path)
-        cmd = 'settings set target.exec-search-paths "%s"' % (os.path.dirname(so_path))
-        self.dbg.HandleCommand(cmd)
-        modules = self.get_minidump_modules("linux-arm-partial-uuids-match.yaml")
-        self.assertEqual(1, len(modules))
-        self.verify_module(modules[0], so_path,
-                           "7295E17C-6668-9E05-CBB5-DEE5003865D5-5267C116")
-
-    def test_partial_uuid_mismatch(self):
-        """
-            Breakpad has been known to create minidump files using CvRecord in each
-            module whose signature is set to PDB70 where the UUID only contains the
-            first 16 bytes of a 20 byte ELF build ID. Code was added to
-            ProcessMinidump.cpp to deal with this and allows partial UUID matching.
-
-            This test verifies that if we have a minidump with a 16 byte UUID, that
-            we are not able to associate a symbol file with a 20 byte UUID only if
-            any of the first 16 bytes do not match. In this case we will see the UUID
-            from the minidump file and the path from the minidump file.
-        """
-        so_path = self.getBuildArtifact("libuuidmismatch.so")
-        self.yaml2obj("libuuidmismatch.yaml", so_path)
-        cmd = 'settings set target.exec-search-paths "%s"' % (os.path.dirname(so_path))
-        self.dbg.HandleCommand(cmd)
-        modules = self.get_minidump_modules("linux-arm-partial-uuids-mismatch.yaml")
-        self.assertEqual(1, len(modules))
-        self.verify_module(modules[0],
-                           "/invalid/path/on/current/system/libuuidmismatch.so",
-                           "7295E17C-6668-9E05-CBB5-DEE5003865D5")
-
-    def test_relative_module_name(self):
-        old_cwd = os.getcwd()
-        self.addTearDownHook(lambda: os.chdir(old_cwd))
-        os.chdir(self.getBuildDir())
-        name = "file-with-a-name-unlikely-to-exist-in-the-current-directory.so"
-        open(name, "a").close()
-        modules = self.get_minidump_modules(
-                self.getSourcePath("relative_module_name.yaml"))
-        self.assertEqual(1, len(modules))
-        self.verify_module(modules[0], name, None)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/arm-linux.yaml b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/arm-linux.yaml
deleted file mode 100644 (file)
index 072b4de..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
---- !minidump
-Streams:         
-  - Type:            SystemInfo
-    Processor Arch:  ARM
-    Platform ID:     Linux
-    CSD Version:     ABC123
-    CPU:             
-      CPUID:           0x00000000
-  - Type:            MiscInfo
-    Content:         00000000010000007B000000000000000000000000000000
-  - Type:            ThreadList
-    Threads:         
-      - Thread Id:       0x00001000
-        Context:         060000400100000002000000030000000400000005000000060000000700000008000000090000000A0000000B0000000C0000000D0000000E0000000F0000001000000044332211DDCCBBAA887766550101000001000100020200000200020003030000030003000404000004000400050500000500050006060000060006000707000007000700080800000800080009090000090009000A0A00000A000A000B0B00000B000B000C0C00000C000C000D0D00000D000D000E0E00000E000E000F0F00000F000F0010100000100010001111000011001100121200001200120013130000130013001414000014001400151500001500150016160000160016001717000017001700181800001800180019190000190019001A1A00001A001A001B1B00001B001B001C1C00001C001C001D1D00001D001D001E1E00001E001E001F1F00001F001F0020200000200020000000000001000100020002000300030004000400050005000600060007000700
-        Stack:           
-          Start of Memory Range: 0x0000000000000000
-          Content:         ''
-...
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/arm-macos.yaml b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/arm-macos.yaml
deleted file mode 100644 (file)
index b194492..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
---- !minidump
-Streams:         
-  - Type:            SystemInfo
-    Processor Arch:  ARM
-    Platform ID:     MacOSX
-    CSD Version:     ABC123
-    CPU:             
-      CPUID:           0x00000000
-  - Type:            MiscInfo
-    Content:         00000000010000007B000000000000000000000000000000
-  - Type:            ThreadList
-    Threads:         
-      - Thread Id:       0x00001000
-        Context:         060000400100000002000000030000000400000005000000060000000700000008000000090000000A0000000B0000000C0000000D0000000E0000000F0000001000000044332211DDCCBBAA887766550101000001000100020200000200020003030000030003000404000004000400050500000500050006060000060006000707000007000700080800000800080009090000090009000A0A00000A000A000B0B00000B000B000C0C00000C000C000D0D00000D000D000E0E00000E000E000F0F00000F000F0010100000100010001111000011001100121200001200120013130000130013001414000014001400151500001500150016160000160016001717000017001700181800001800180019190000190019001A1A00001A001A001B1B00001B001B001C1C00001C001C001D1D00001D001D001E1E00001E001E001F1F00001F001F0020200000200020000000000001000100020002000300030004000400050005000600060007000700
-        Stack:           
-          Start of Memory Range: 0x0000000000000000
-          Content:         ''
-...
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/arm64-macos.yaml b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/arm64-macos.yaml
deleted file mode 100644 (file)
index 70817f1..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
---- !minidump
-Streams:         
-  - Type:            SystemInfo
-    Processor Arch:  BP_ARM64
-    Platform ID:     MacOSX
-    CSD Version:     '15E216'
-    CPU:             
-      CPUID:           0x00000000
-  - Type:            MiscInfo
-    Content:         00000000010000007B000000000000000000000000000000
-  - Type:            ThreadList
-    Threads:         
-      - Thread Id:       0x00001000
-        Context:         060000800000000001000000020003000200000003000400030000000400050004000000050006000500000006000700060000000700080007000000080009000800000009000A00090000000A000B000A0000000B000C000B0000000C000D000C0000000D000E000D0000000E000F000E0000000F0010000F00000010001100100000001100120011000000120013001200000013001400130000001400150014000000150016001500000016001700160000001700180017000000180019001800000019001A00190000001A001B001A0000001B001C001B0000001C001D001C0000001D001E001D0000001E001F001E0000001F0020001F00000020002100200000002100220000100000000000004433221188776655CCBBAA99000102030405060708090A0B0C0D0E0F0102030405060708090A0B0C0D0E0F1002030405060708090A0B0C0D0E0F1011030405060708090A0B0C0D0E0F1011120405060708090A0B0C0D0E0F1011121305060708090A0B0C0D0E0F1011121314060708090A0B0C0D0E0F1011121314150708090A0B0C0D0E0F1011121314151608090A0B0C0D0E0F1011121314151617090A0B0C0D0E0F1011121314151617180A0B0C0D0E0F101112131415161718190B0C0D0E0F101112131415161718191A0C0D0E0F101112131415161718191A1B0D0E0F101112131415161718191A1B1C0E0F101112131415161718191A1B1C1D0F101112131415161718191A1B1C1D1E101112131415161718191A1B1C1D1E1F1112131415161718191A1B1C1D1E1F2012131415161718191A1B1C1D1E1F2021131415161718191A1B1C1D1E1F2021221415161718191A1B1C1D1E1F2021222315161718191A1B1C1D1E1F2021222324161718191A1B1C1D1E1F2021222324251718191A1B1C1D1E1F2021222324252618191A1B1C1D1E1F2021222324252627191A1B1C1D1E1F2021222324252627281A1B1C1D1E1F202122232425262728291B1C1D1E1F202122232425262728292A1C1D1E1F202122232425262728292A2B1D1E1F202122232425262728292A2B2C1E1F202122232425262728292A2B2C2D1F202122232425262728292A2B2C2D2E
-        Stack:           
-          Start of Memory Range: 0x0000000000000000
-          Content:         ''
-...
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/install_breakpad.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/install_breakpad.cpp
deleted file mode 100644 (file)
index c34ac17..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#include "client/linux/handler/exception_handler.h"
-
-static bool dumpCallback(const google_breakpad::MinidumpDescriptor &descriptor,
-                         void *context, bool succeeded) {
-  return succeeded;
-}
-
-google_breakpad::ExceptionHandler *eh;
-
-void InstallBreakpad() {
-  google_breakpad::MinidumpDescriptor descriptor("/tmp");
-  eh = new google_breakpad::ExceptionHandler(descriptor, NULL, dumpCallback,
-                                             NULL, true, -1);
-}
-
-void WriteMinidump() { eh->WriteMinidump(); }
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/libuuidmatch.yaml b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/libuuidmatch.yaml
deleted file mode 100644 (file)
index 3610694..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
---- !ELF
-FileHeader:      
-  Class:           ELFCLASS32
-  Data:            ELFDATA2LSB
-  Type:            ET_DYN
-  Machine:         EM_ARM
-  Flags:           [ EF_ARM_SOFT_FLOAT, EF_ARM_EABI_VER5 ]
-Sections:        
-  - Name:            .note.gnu.build-id
-    Type:            SHT_NOTE
-    Flags:           [ SHF_ALLOC ]
-    Address:         0x0000000000000114
-    AddressAlign:    0x0000000000000004
-    Content:         040000001400000003000000474E55007295E17C66689E05CBB5DEE5003865D55267C116
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/libuuidmismatch.yaml b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/libuuidmismatch.yaml
deleted file mode 100644 (file)
index 5fef636..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
---- !ELF
-FileHeader:      
-  Class:           ELFCLASS32
-  Data:            ELFDATA2LSB
-  Type:            ET_DYN
-  Machine:         EM_ARM
-  Flags:           [ EF_ARM_SOFT_FLOAT, EF_ARM_EABI_VER5 ]
-Sections:        
-  - Name:            .note.gnu.build-id
-    Type:            SHT_NOTE
-    Flags:           [ SHF_ALLOC ]
-    Address:         0x0000000000000114
-    AddressAlign:    0x0000000000000004
-    Content:         040000001400000003000000474E55008295E17C66689E05CBB5DEE5003865D55267C116
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-partial-uuids-match.yaml b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-partial-uuids-match.yaml
deleted file mode 100644 (file)
index edb0001..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
---- !minidump
-Streams:         
-  - Type:            SystemInfo
-    Processor Arch:  ARM
-    Platform ID:     Linux
-    CSD Version:     '15E216'
-    CPU:             
-      CPUID:           0x00000000
-  - Type:            ModuleList
-    Modules:         
-      - Base of Image:   0x0000000000001000
-        Size of Image:   0x00001000
-        Module Name:     '/invalid/path/on/current/system/libuuidmatch.so'
-        CodeView Record: 525344537295E17C66689E05CBB5DEE5003865D50000000000
-...
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-partial-uuids-mismatch.yaml b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-partial-uuids-mismatch.yaml
deleted file mode 100644 (file)
index 0b56a96..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
---- !minidump
-Streams:         
-  - Type:            SystemInfo
-    Processor Arch:  ARM
-    Platform ID:     Linux
-    CSD Version:     '15E216'
-    CPU:             
-      CPUID:           0x00000000
-  - Type:            ModuleList
-    Modules:         
-      - Base of Image:   0x0000000000001000
-        Size of Image:   0x00001000
-        Module Name:     '/invalid/path/on/current/system/libuuidmismatch.so'
-        CodeView Record: 525344537295E17C66689E05CBB5DEE5003865D50000000000
-...
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-same-uuids.yaml b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-same-uuids.yaml
deleted file mode 100644 (file)
index 21c5220..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
---- !minidump
-Streams:
-  - Type:            SystemInfo
-    Processor Arch:  AMD64
-    Platform ID:     Linux
-    CSD Version:     '15E216'
-    CPU:
-      Vendor ID:       GenuineIntel
-      Version Info:    0x00000000
-      Feature Info:    0x00000000
-  - Type:            ModuleList
-    Modules:
-      - Base of Image:   0x0000000000001000
-        Size of Image:   0x00001000
-        Module Name:     '/file/does/not/exist/a'
-        CodeView Record: '52534453112233441122334411223344112233441122334411'
-      - Base of Image:   0x0000000000003000
-        Size of Image:   0x00001000
-        Module Name:     '/file/does/not/exist/b'
-        CodeView Record: '52534453112233441122334411223344112233441122334411'
-...
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-uuids-elf-build-id-16.yaml b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-uuids-elf-build-id-16.yaml
deleted file mode 100644 (file)
index f4c18b9..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
---- !minidump
-Streams:         
-  - Type:            SystemInfo
-    Processor Arch:  ARM
-    Platform ID:     Linux
-    CSD Version:     '15E216'
-    CPU:             
-      CPUID:           0x00000000
-  - Type:            ModuleList
-    Modules:         
-      - Base of Image:   0x0000000000001000
-        Size of Image:   0x00001000
-        Module Name:     '/tmp/a'
-        CodeView Record: 4C4570420102030405060708090A0B0C0D0E0F10
-      - Base of Image:   0x0000000000001000
-        Size of Image:   0x00001000
-        Module Name:     '/tmp/b'
-        CodeView Record: 4C4570420A141E28323C46505A646E78828C96A0
-...
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-uuids-elf-build-id-20.yaml b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-uuids-elf-build-id-20.yaml
deleted file mode 100644 (file)
index e3c170f..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
---- !minidump
-Streams:         
-  - Type:            SystemInfo
-    Processor Arch:  ARM
-    Platform ID:     Linux
-    CSD Version:     '15E216'
-    CPU:             
-      CPUID:           0x00000000
-  - Type:            ModuleList
-    Modules:         
-      - Base of Image:   0x0000000000001000
-        Size of Image:   0x00001000
-        Module Name:     '/tmp/a'
-        CodeView Record: 4C4570420102030405060708090A0B0C0D0E0F1011121314
-      - Base of Image:   0x0000000000001000
-        Size of Image:   0x00001000
-        Module Name:     '/tmp/b'
-        CodeView Record: 4C4570420A141E28323C46505A646E78828C96A0AAB4BEC8
-...
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-uuids-elf-build-id-zero.yaml b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-uuids-elf-build-id-zero.yaml
deleted file mode 100644 (file)
index 5bde77e..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
---- !minidump
-Streams:         
-  - Type:            SystemInfo
-    Processor Arch:  ARM
-    Platform ID:     Linux
-    CSD Version:     '15E216'
-    CPU:             
-      CPUID:           0x00000000
-  - Type:            ModuleList
-    Modules:         
-      - Base of Image:   0x0000000000001000
-        Size of Image:   0x00001000
-        Module Name:     '/not/exist/a'
-        CodeView Record: 4C45704200000000000000000000000000000000
-      - Base of Image:   0x0000000000001000
-        Size of Image:   0x00001000
-        Module Name:     '/not/exist/b'
-        CodeView Record: 4C45704200000000000000000000000000000000
-...
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-uuids-no-age.yaml b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-uuids-no-age.yaml
deleted file mode 100644 (file)
index 7b80fd5..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
---- !minidump
-Streams:         
-  - Type:            SystemInfo
-    Processor Arch:  ARM
-    Platform ID:     Linux
-    CSD Version:     '15E216'
-    CPU:             
-      CPUID:           0x00000000
-  - Type:            ModuleList
-    Modules:         
-      - Base of Image:   0x0000000000001000
-        Size of Image:   0x00001000
-        Module Name:     '/tmp/a'
-        CodeView Record: 525344530102030405060708090A0B0C0D0E0F100000000000
-      - Base of Image:   0x0000000000001000
-        Size of Image:   0x00001000
-        Module Name:     '/tmp/b'
-        CodeView Record: 525344530A141E28323C46505A646E78828C96A00000000000
-...
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-uuids-with-age.yaml b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-uuids-with-age.yaml
deleted file mode 100644 (file)
index 083b313..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
---- !minidump
-Streams:         
-  - Type:            SystemInfo
-    Processor Arch:  ARM
-    Platform ID:     Linux
-    CSD Version:     '15E216'
-    CPU:             
-      CPUID:           0x00000000
-  - Type:            ModuleList
-    Modules:         
-      - Base of Image:   0x0000000000001000
-        Size of Image:   0x00001000
-        Module Name:     '/tmp/a'
-        CodeView Record: 525344530102030405060708090A0B0C0D0E0F101010101000
-      - Base of Image:   0x0000000000001000
-        Size of Image:   0x00001000
-        Module Name:     '/tmp/b'
-        CodeView Record: 525344530A141E28323C46505A646E78828C96A02020202000
-...
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-zero-uuids.yaml b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-zero-uuids.yaml
deleted file mode 100644 (file)
index 7ca887c..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
---- !minidump
-Streams:         
-  - Type:            SystemInfo
-    Processor Arch:  AMD64
-    Platform ID:     Linux
-    CSD Version:     '15E216'
-    CPU:             
-      Vendor ID:       GenuineIntel
-      Version Info:    0x00000000
-      Feature Info:    0x00000000
-  - Type:            ModuleList
-    Modules:         
-      - Base of Image:   0x0000000000001000
-        Size of Image:   0x00001000
-        Module Name:     '/file/does/not/exist/a'
-        CodeView Record: '52534453000000000000000000000000000000000000000000'
-      - Base of Image:   0x0000000000001000
-        Size of Image:   0x00001000
-        Module Name:     '/file/does/not/exist/b'
-        CodeView Record: '52534453000000000000000000000000000000000000000000'
-...
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64 b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64
deleted file mode 100755 (executable)
index 078d9c8..0000000
Binary files a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64 and /dev/null differ
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64.cpp
deleted file mode 100644 (file)
index 61d3149..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-void crash() {
-  volatile int *a = (int *)(nullptr);
-  *a = 1;
-}
-
-extern "C" void _start();
-void InstallBreakpad();
-
-void _start() {
-  InstallBreakpad();
-  crash();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64.dmp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64.dmp
deleted file mode 100644 (file)
index e2ae724..0000000
Binary files a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64.dmp and /dev/null differ
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64.yaml b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64.yaml
deleted file mode 100644 (file)
index 21ea3ba..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
---- !minidump
-Streams:         
-  - Type:            ThreadList
-    Threads:         
-      - Thread Id:       0x000074DD
-        Context:         0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000B0010000000000033000000000000000000000002020100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040109600000000000100000000000000000000000000000068E7D0C8FF7F000068E7D0C8FF7F000097E6D0C8FF7F000010109600000000000000000000000000020000000000000088E4D0C8FF7F0000603FFF85C77F0000F00340000000000080E7D0C8FF7F000000000000000000000000000000000000E0034000000000007F0300000000000000000000000000000000000000000000801F0000FFFF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF252525252525252525252525252525250000000000000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-        Stack:           
-          Start of Memory Range: 0x00007FFFC8D0E000
-          Content:               DEADBEEFBAADF00D
-  - Type:            ModuleList
-    Modules:         
-      - Base of Image:   0x0000000000400000
-        Size of Image:   0x00001000
-        Module Name:     '/tmp/test/linux-x86_64'
-        CodeView Record: 4C457042E35C283BC327C28762DB788BF5A4078BE2351448
-  - Type:            Exception
-    Thread ID:       0x000074DD
-    Exception Record:
-      Exception Code:  0x0000000B
-    Thread Context:  00000000
-  - Type:            SystemInfo
-    Processor Arch:  AMD64
-    Processor Level: 6
-    Processor Revision: 15876
-    Number of Processors: 40
-    Platform ID:     Linux
-    CSD Version:     'Linux 3.13.0-91-generic'
-    CPU:             
-      Vendor ID:       GenuineIntel
-      Version Info:    0x00000000
-      Feature Info:    0x00000000
-  - Type:            LinuxProcStatus
-    Text:             |
-      Name:    linux-x86_64
-      State:   t (tracing stop)
-      Tgid:    29917
-      Ngid:    0
-      Pid:     29917
-      PPid:    29370
-      TracerPid:       29918
-      Uid:     1001    1001    1001    1001
-      Gid:     1001    1001    1001    1001
-
-...
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64_not_crashed b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64_not_crashed
deleted file mode 100755 (executable)
index 8b38cdb..0000000
Binary files a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64_not_crashed and /dev/null differ
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64_not_crashed.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64_not_crashed.cpp
deleted file mode 100644 (file)
index 070c565..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-void InstallBreakpad();
-void WriteMinidump();
-
-int global = 42;
-
-int bar(int x) {
-  WriteMinidump();
-  int y = 4 * x + global;
-  return y;
-}
-
-int foo(int x) {
-  int y = 2 * bar(3 * x);
-  return y;
-}
-
-extern "C" void _start();
-
-void _start() {
-  InstallBreakpad();
-  foo(1);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64_not_crashed.dmp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64_not_crashed.dmp
deleted file mode 100644 (file)
index ad4b61a..0000000
Binary files a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64_not_crashed.dmp and /dev/null differ
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64_null_signal.yaml b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64_null_signal.yaml
deleted file mode 100644 (file)
index 93b3fd0..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
---- !minidump
-Streams:
-  - Type:            ThreadList
-    Threads:
-      - Thread Id:       0x00002177
-        Context:         0000
-        Stack:
-          Start of Memory Range: 0x00007FFE2F689000
-          Content:         00000000
-  - Type:            Exception
-    Thread ID:       0x00002177
-    Exception Record:
-      Exception Code:  0x00000000
-      Exception Address: 0x0000000000400582
-    Thread Context:  0000
-  - Type:            SystemInfo
-    Processor Arch:  AMD64
-    Platform ID:     Linux
-  - Type:            LinuxProcStatus
-    Text:             |
-      Name:    busyloop
-      Umask:   0002
-      State:   t (tracing stop)
-      Pid:     8567
-...
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/macos-arm-uuids-no-age.yaml b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/macos-arm-uuids-no-age.yaml
deleted file mode 100644 (file)
index 57e291e..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
---- !minidump
-Streams:         
-  - Type:            SystemInfo
-    Processor Arch:  AMD64
-    Platform ID:     MacOSX
-    CSD Version:     '15E216'
-    CPU:             
-      Vendor ID:       GenuineIntel
-      Version Info:    0x00000000
-      Feature Info:    0x00000000
-  - Type:            ModuleList
-    Modules:         
-      - Base of Image:   0x0000000000001000
-        Size of Image:   0x00001000
-        Module Name:     '/tmp/a'
-        CodeView Record: 525344530102030405060708090A0B0C0D0E0F100000000000
-      - Base of Image:   0x0000000000001000
-        Size of Image:   0x00001000
-        Module Name:     '/tmp/b'
-        CodeView Record: 525344530A141E28323C46505A646E78828C96A00000000000
-...
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/makefile.txt b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/makefile.txt
deleted file mode 100644 (file)
index 79a95d6..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-# This makefile aims to make the binaries as small as possible, for us not to
-# upload huge binary blobs in the repo.
-# The binary should have debug symbols because stack unwinding doesn't work
-# correctly using the information in the Minidump only. Also we want to evaluate
-# local variables, etc.
-# Breakpad compiles as a static library, so statically linking againts it
-# makes the binary huge.
-# Dynamically linking to it does improve things, but we are still #include-ing
-# breakpad headers (which is a lot of source code for which we generate debug
-# symbols)
-# So, install_breakpad.cpp does the #include-ing and defines a global function
-# "InstallBreakpad" that does all the exception handler registration.
-# We compile install_breakpad to object file and then link it, alongside the
-# static libbreakpad, into a shared library.
-# Then the binaries dynamically link to that lib.
-# The other optimisation is not using the standard library (hence the _start
-# instead of main). We only link dynamically to some standard libraries.
-# This way we have a tiny binary (~8K) that has debug symbols and uses breakpad
-# to generate a Minidump when the binary crashes/requests such.
-#
-CC=g++
-FLAGS=-g --std=c++11
-INCLUDE=-I$HOME/breakpad/src/src/
-LINK=-L. -lbreakpad -lpthread -nostdlib -lc -lstdc++ -lgcc_s -fno-exceptions
-all:
-       $(CC) $(FLAGS) -fPIC -c install_breakpad.cpp $(INCLUDE) -o install_breakpad.o
-       ld -shared install_breakpad.o libbreakpad_client.a -o libbreakpad.so
-       $(CC) $(FLAGS) -o linux-x86_64 linux-x86_64.cpp $(LINK)
-       $(CC) $(FLAGS) -o linux-x86_64_not_crashed linux-x86_64_not_crashed.cpp $(LINK)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/regions-linux-map.yaml b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/regions-linux-map.yaml
deleted file mode 100644 (file)
index 3c0961e..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
---- !minidump
-Streams:         
-  - Type:            SystemInfo
-    Processor Arch:  ARM64
-    Platform ID:     Linux
-    CSD Version:     '15E216'
-    CPU:             
-      CPUID:           0x00000000
-  - Type:            MiscInfo
-    Content:         00000000010000007B000000000000000000000000000000
-  - Type:            LinuxMaps
-    Text:             |
-      400d9000-400db000 r-xp 00000000 b3:04 227        /system/bin/app_process
-      400db000-400dc000 r--p 00001000 b3:04 227        /system/bin/app_process
-      400dc000-400dd000 rw-p 00000000 00:00 0 
-      400dd000-400ec000 r-xp 00000000 b3:04 300        /system/bin/linker
-      400ec000-400ed000 r--p 00000000 00:00 0 
-      400ed000-400ee000 r--p 0000f000 b3:04 300        /system/bin/linker
-      400ee000-400ef000 rw-p 00010000 b3:04 300        /system/bin/linker
-      400ef000-400fb000 rw-p 00000000 00:00 0 
-      400fb000-400fc000 r-xp 00000000 b3:04 1096       /system/lib/liblog.so
-      400fc000-400fd000 rwxp 00001000 b3:04 1096       /system/lib/liblog.so
-      400fd000-400ff000 r-xp 00002000 b3:04 1096       /system/lib/liblog.so
-      400ff000-40100000 r--p 00003000 b3:04 1096       /system/lib/liblog.so
-      40100000-40101000 rw-p 00004000 b3:04 1096       /system/lib/liblog.so
-      40101000-40122000 r-xp 00000000 b3:04 955        /system/lib/libc.so
-      40122000-40123000 rwxp 00021000 b3:04 955        /system/lib/libc.so
-      40123000-40167000 r-xp 00022000 b3:04 955        /system/lib/libc.so
-      40167000-40169000 r--p 00065000 b3:04 955        /system/lib/libc.so
-      40169000-4016b000 rw-p 00067000 b3:04 955        /system/lib/libc.so
-      4016b000-40176000 rw-p 00000000 00:00 0 
-
-...
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/relative_module_name.yaml b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/relative_module_name.yaml
deleted file mode 100644 (file)
index 23f2b49..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
---- !minidump
-Streams:         
-  - Type:            SystemInfo
-    Processor Arch:  AMD64
-    Platform ID:     Linux
-    CSD Version:     '15E216'
-    CPU:             
-      Vendor ID:       GenuineIntel
-      Version Info:    0x00000000
-      Feature Info:    0x00000000
-  - Type:            ModuleList
-    Modules:         
-      - Base of Image:   0x0000000000001000
-        Size of Image:   0x00001000
-        Module Name:     'file-with-a-name-unlikely-to-exist-in-the-current-directory.so'
-        CodeView Record: ''
-...
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/Makefile
deleted file mode 100644 (file)
index 65e9dd2..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py
deleted file mode 100644 (file)
index c3301fb..0000000
+++ /dev/null
@@ -1,176 +0,0 @@
-"""
-Test basics of mini dump debugging.
-"""
-
-from six import iteritems
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class MiniDumpTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_process_info_in_mini_dump(self):
-        """Test that lldb can read the process information from the minidump."""
-        # target create -c fizzbuzz_no_heap.dmp
-        self.dbg.CreateTarget("")
-        self.target = self.dbg.GetSelectedTarget()
-        self.process = self.target.LoadCore("fizzbuzz_no_heap.dmp")
-        self.assertTrue(self.process, PROCESS_IS_VALID)
-        self.assertEqual(self.process.GetNumThreads(), 1)
-        self.assertEqual(self.process.GetProcessID(), 4440)
-
-    def test_thread_info_in_mini_dump(self):
-        """Test that lldb can read the thread information from the minidump."""
-        # target create -c fizzbuzz_no_heap.dmp
-        self.dbg.CreateTarget("")
-        self.target = self.dbg.GetSelectedTarget()
-        self.process = self.target.LoadCore("fizzbuzz_no_heap.dmp")
-        # This process crashed due to an access violation (0xc0000005) in its
-        # one and only thread.
-        self.assertEqual(self.process.GetNumThreads(), 1)
-        thread = self.process.GetThreadAtIndex(0)
-        self.assertEqual(thread.GetStopReason(), lldb.eStopReasonException)
-        stop_description = thread.GetStopDescription(256)
-        self.assertTrue("0xc0000005" in stop_description)
-
-    def test_modules_in_mini_dump(self):
-        """Test that lldb can read the list of modules from the minidump."""
-        # target create -c fizzbuzz_no_heap.dmp
-        self.dbg.CreateTarget("")
-        self.target = self.dbg.GetSelectedTarget()
-        self.process = self.target.LoadCore("fizzbuzz_no_heap.dmp")
-        self.assertTrue(self.process, PROCESS_IS_VALID)
-        expected_modules = [
-            {
-                'filename' : r"C:\Users\amccarth\Documents\Visual Studio 2013\Projects\fizzbuzz\Debug/fizzbuzz.exe",
-                'uuid' : '0F45B791-9A96-46F9-BF8F-2D6076EA421A-00000011',
-            },
-            {
-                'filename' : r"C:\Windows\SysWOW64/ntdll.dll",
-                'uuid' : 'BBB0846A-402C-4052-A16B-67650BBFE6B0-00000002',
-            },
-            {
-                'filename' : r"C:\Windows\SysWOW64/kernel32.dll",
-                'uuid' : 'E5CB7E1B-005E-4113-AB98-98D6913B52D8-00000002',
-            },
-            {
-                'filename' : r"C:\Windows\SysWOW64/KERNELBASE.dll",
-                'uuid' : '0BF95241-CB0D-4BD4-AC5D-186A6452E522-00000001',
-            },
-            {
-                'filename' : r"C:\Windows\System32/MSVCP120D.dll",
-                'uuid' : '3C05516E-57E7-40EB-8D3F-9722C5BD80DD-00000001',
-            },
-            {
-                'filename' : r"C:\Windows\System32/MSVCR120D.dll",
-                'uuid' : '6382FB86-46C4-4046-AE42-8D97B3F91FF2-00000001',
-            },
-        ]
-        self.assertEqual(self.target.GetNumModules(), len(expected_modules))
-        for module, expected in zip(self.target.modules, expected_modules):
-            self.assertTrue(module.IsValid())
-            self.assertEqual(module.file.fullpath, expected['filename'])
-            self.assertEqual(module.GetUUIDString(), expected['uuid'])
-
-    def test_breakpad_uuid_matching(self):
-        """Test that the uuid computation algorithms in minidump and breakpad
-        files match."""
-        self.target = self.dbg.CreateTarget("")
-        self.process = self.target.LoadCore("fizzbuzz_no_heap.dmp")
-        self.assertTrue(self.process, PROCESS_IS_VALID)
-        self.expect("target symbols add fizzbuzz.syms", substrs=["symbol file",
-            "fizzbuzz.syms", "has been added to", "fizzbuzz.exe"]),
-        self.assertTrue(self.target.modules[0].FindSymbol("main"))
-
-    @skipIfLLVMTargetMissing("X86")
-    def test_stack_info_in_mini_dump(self):
-        """Test that we can see a trivial stack in a VS-generate mini dump."""
-        # target create -c fizzbuzz_no_heap.dmp
-        self.dbg.CreateTarget("")
-        self.target = self.dbg.GetSelectedTarget()
-        self.process = self.target.LoadCore("fizzbuzz_no_heap.dmp")
-        self.assertEqual(self.process.GetNumThreads(), 1)
-        thread = self.process.GetThreadAtIndex(0)
-
-        pc_list = [ 0x00164d14, 0x00167c79, 0x00167e6d, 0x7510336a, 0x77759882, 0x77759855]
-
-        self.assertEqual(thread.GetNumFrames(), len(pc_list))
-        for i in range(len(pc_list)):
-            frame = thread.GetFrameAtIndex(i)
-            self.assertTrue(frame.IsValid())
-            self.assertEqual(frame.GetPC(), pc_list[i])
-            self.assertTrue(frame.GetModule().IsValid())
-
-    @skipUnlessWindows # Minidump saving works only on windows
-    def test_deeper_stack_in_mini_dump(self):
-        """Test that we can examine a more interesting stack in a mini dump."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        core = self.getBuildArtifact("core.dmp")
-        try:
-            # Set a breakpoint and capture a mini dump.
-            target = self.dbg.CreateTarget(exe)
-            breakpoint = target.BreakpointCreateByName("bar")
-            process = target.LaunchSimple(
-                None, None, self.get_process_working_directory())
-            self.assertEqual(process.GetState(), lldb.eStateStopped)
-            self.assertTrue(process.SaveCore(core))
-            self.assertTrue(os.path.isfile(core))
-            self.assertTrue(process.Kill().Success())
-
-            # Launch with the mini dump, and inspect the stack.
-            target = self.dbg.CreateTarget(None)
-            process = target.LoadCore(core)
-            thread = process.GetThreadAtIndex(0)
-
-            expected_stack = {0: 'bar', 1: 'foo', 2: 'main'}
-            self.assertGreaterEqual(thread.GetNumFrames(), len(expected_stack))
-            for index, name in iteritems(expected_stack):
-                frame = thread.GetFrameAtIndex(index)
-                self.assertTrue(frame.IsValid())
-                function_name = frame.GetFunctionName()
-                self.assertTrue(name in function_name)
-
-        finally:
-            # Clean up the mini dump file.
-            self.assertTrue(self.dbg.DeleteTarget(target))
-            if (os.path.isfile(core)):
-                os.unlink(core)
-
-    @skipUnlessWindows # Minidump saving works only on windows
-    def test_local_variables_in_mini_dump(self):
-        """Test that we can examine local variables in a mini dump."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        core = self.getBuildArtifact("core.dmp")
-        try:
-            # Set a breakpoint and capture a mini dump.
-            target = self.dbg.CreateTarget(exe)
-            breakpoint = target.BreakpointCreateByName("bar")
-            process = target.LaunchSimple(
-                None, None, self.get_process_working_directory())
-            self.assertEqual(process.GetState(), lldb.eStateStopped)
-            self.assertTrue(process.SaveCore(core))
-            self.assertTrue(os.path.isfile(core))
-            self.assertTrue(process.Kill().Success())
-
-            # Launch with the mini dump, and inspect a local variable.
-            target = self.dbg.CreateTarget(None)
-            process = target.LoadCore(core)
-            thread = process.GetThreadAtIndex(0)
-            frame = thread.GetFrameAtIndex(0)
-            value = frame.EvaluateExpression('x')
-            self.assertEqual(value.GetValueAsSigned(), 3)
-
-        finally:
-            # Clean up the mini dump file.
-            self.assertTrue(self.dbg.DeleteTarget(target))
-            if (os.path.isfile(core)):
-                os.unlink(core)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/fizzbuzz.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/fizzbuzz.cpp
deleted file mode 100644 (file)
index 295d4a1..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-// A sample program for getting minidumps on Windows.
-
-#include <iostream>
-
-bool
-fizz(int x)
-{
-    return x % 3 == 0;
-}
-
-bool
-buzz(int x)
-{
-    return x % 5 == 0;
-}
-
-int
-main()
-{
-    int *buggy = 0;
-
-    for (int i = 1; i <= 100; ++i)
-    {
-        if (fizz(i)) std::cout << "fizz";
-        if (buzz(i)) std::cout << "buzz";
-        if (!fizz(i) && !buzz(i)) std::cout << i;
-        std::cout << '\n';
-    }
-
-    return *buggy;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/fizzbuzz.syms b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/fizzbuzz.syms
deleted file mode 100644 (file)
index cab06c1..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-MODULE windows x86 0F45B7919A9646F9BF8F2D6076EA421A11 fizzbuzz.pdb\r
-PUBLIC 1000 0 main\r
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/fizzbuzz_no_heap.dmp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/fizzbuzz_no_heap.dmp
deleted file mode 100644 (file)
index 19008c9..0000000
Binary files a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/fizzbuzz_no_heap.dmp and /dev/null differ
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/main.cpp
deleted file mode 100644 (file)
index 4037ea5..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-int global = 42;
-
-int
-bar(int x)
-{
-  int y = 4*x + global;
-  return y;
-}
-
-int
-foo(int x)
-{
-  int y = 2*bar(3*x);
-  return y;
-}
-
-int
-main()
-{
-  return 0 * foo(1);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/1lwp_SIGSEGV.aarch64 b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/1lwp_SIGSEGV.aarch64
deleted file mode 100755 (executable)
index de0208c..0000000
Binary files a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/1lwp_SIGSEGV.aarch64 and /dev/null differ
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/1lwp_SIGSEGV.amd64 b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/1lwp_SIGSEGV.amd64
deleted file mode 100755 (executable)
index 56fa077..0000000
Binary files a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/1lwp_SIGSEGV.amd64 and /dev/null differ
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/1lwp_SIGSEGV.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/1lwp_SIGSEGV.c
deleted file mode 100644 (file)
index 972e967..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-static void bar(char *boom) {
-  char F = 'b';
-  *boom = 47; // Frame bar
-}
-
-static void foo(char *boom, void (*boomer)(char *)) {
-  char F = 'f';
-  boomer(boom); // Frame foo
-}
-
-void main(void) {
-  char F = 'm';
-  foo(0, bar); // Frame main
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.aarch64 b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.aarch64
deleted file mode 100755 (executable)
index 8781f03..0000000
Binary files a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.aarch64 and /dev/null differ
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.amd64 b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.amd64
deleted file mode 100755 (executable)
index 32a4985..0000000
Binary files a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.amd64 and /dev/null differ
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.c
deleted file mode 100644 (file)
index fcbfa8a..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-#include <lwp.h>
-#include <stddef.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <signal.h>
-
-volatile int sem = 0;
-
-static void bar() {
-  char F = 'b';
-  sem = 1;
-  while (1) continue; // Frame bar
-}
-
-static void foo(void (*boomer)()) {
-  char F = 'f';
-  boomer(); // Frame foo
-}
-
-static void lwp_main(void *unused) {
-  char F = 'l';
-  foo(bar); // Frame lwp_main
-}
-
-int main(int argc, char **argv) {
-  ucontext_t uc;
-  lwpid_t lid;
-  static const size_t ssize = 16 * 1024;
-  void *stack;
-
-  stack = malloc(ssize);
-  _lwp_makecontext(&uc, lwp_main, NULL, NULL, stack, ssize);
-  _lwp_create(&uc, 0, &lid);
-  while (sem != 1) continue;
-  kill(getpid(), SIGSEGV);
-  _lwp_wait(lid, NULL);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_t2_SIGSEGV.aarch64 b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_t2_SIGSEGV.aarch64
deleted file mode 100755 (executable)
index 89394a7..0000000
Binary files a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_t2_SIGSEGV.aarch64 and /dev/null differ
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_t2_SIGSEGV.amd64 b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_t2_SIGSEGV.amd64
deleted file mode 100755 (executable)
index d304de1..0000000
Binary files a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_t2_SIGSEGV.amd64 and /dev/null differ
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_t2_SIGSEGV.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_t2_SIGSEGV.c
deleted file mode 100644 (file)
index 1cd8663..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#include <lwp.h>
-#include <stddef.h>
-#include <stdlib.h>
-
-static void bar(char *boom) {
-  char F = 'b';
-  *boom = 47; // Frame bar
-}
-
-static void foo(char *boom, void (*boomer)(char *)) {
-  char F = 'f';
-  boomer(boom); // Frame foo
-}
-
-void lwp_main(void *unused) {
-  char F = 'l';
-  foo(0, bar); // Frame lwp_main
-}
-
-int main(int argc, char **argv) {
-  ucontext_t uc;
-  lwpid_t lid;
-  static const size_t ssize = 16 * 1024;
-  void *stack;
-
-  stack = malloc(ssize);
-  _lwp_makecontext(&uc, lwp_main, NULL, NULL, stack, ssize);
-  _lwp_create(&uc, 0, &lid);
-  _lwp_wait(lid, NULL);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/GNUmakefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/GNUmakefile
deleted file mode 100644 (file)
index 62c719d..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-ARCH = $(shell uname -m)
-PROGRAMS = 1lwp_SIGSEGV 2lwp_t2_SIGSEGV 2lwp_process_SIGSEGV
-EXECS = $(patsubst %,%.$(ARCH),$(PROGRAMS))
-CORES = $(patsubst %,%.core,$(EXECS))
-
-all: $(CORES) $(EXECS)
-clean:
-       rm -f $(CORES) $(EXECS)
-
-%.core: %
-       sysctl -w proc.$$$$.corename=$@; ulimit -s 16; ! ./$<
-%.$(ARCH): %.c
-       $(CC) -o $@ -g $<
-
-.PHONY: all clean
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/TestNetBSDCore.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/TestNetBSDCore.py
deleted file mode 100644 (file)
index 067b04d..0000000
+++ /dev/null
@@ -1,237 +0,0 @@
-"""
-Test NetBSD core file debugging.
-"""
-
-from __future__ import division, print_function
-
-import signal
-import os
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class NetBSDCoreCommonTestCase(TestBase):
-    NO_DEBUG_INFO_TESTCASE = True
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        super(NetBSDCoreCommonTestCase, self).setUp()
-        self._initial_platform = lldb.DBG.GetSelectedPlatform()
-
-    def tearDown(self):
-        lldb.DBG.SetSelectedPlatform(self._initial_platform)
-        super(NetBSDCoreCommonTestCase, self).tearDown()
-
-    def check_memory_regions(self, process, region_count):
-        region_list = process.GetMemoryRegions()
-        self.assertEqual(region_list.GetSize(), region_count)
-
-        region = lldb.SBMemoryRegionInfo()
-
-        # Check we have the right number of regions.
-        self.assertEqual(region_list.GetSize(), region_count)
-
-        # Check that getting a region beyond the last in the list fails.
-        self.assertFalse(
-            region_list.GetMemoryRegionAtIndex(
-                region_count, region))
-
-        # Check each region is valid.
-        for i in range(region_list.GetSize()):
-            # Check we can actually get this region.
-            self.assertTrue(region_list.GetMemoryRegionAtIndex(i, region))
-
-            # Every region in the list should be mapped.
-            self.assertTrue(region.IsMapped())
-
-            # Test the address at the start of a region returns it's enclosing
-            # region.
-            begin_address = region.GetRegionBase()
-            region_at_begin = lldb.SBMemoryRegionInfo()
-            error = process.GetMemoryRegionInfo(begin_address, region_at_begin)
-            self.assertEqual(region, region_at_begin)
-
-            # Test an address in the middle of a region returns it's enclosing
-            # region.
-            middle_address = (region.GetRegionBase() +
-                              region.GetRegionEnd()) // 2
-            region_at_middle = lldb.SBMemoryRegionInfo()
-            error = process.GetMemoryRegionInfo(
-                middle_address, region_at_middle)
-            self.assertEqual(region, region_at_middle)
-
-            # Test the address at the end of a region returns it's enclosing
-            # region.
-            end_address = region.GetRegionEnd() - 1
-            region_at_end = lldb.SBMemoryRegionInfo()
-            error = process.GetMemoryRegionInfo(end_address, region_at_end)
-            self.assertEqual(region, region_at_end)
-
-            # Check that quering the end address does not return this region but
-            # the next one.
-            next_region = lldb.SBMemoryRegionInfo()
-            error = process.GetMemoryRegionInfo(
-                region.GetRegionEnd(), next_region)
-            self.assertNotEqual(region, next_region)
-            self.assertEqual(
-                region.GetRegionEnd(),
-                next_region.GetRegionBase())
-
-        # Check that query beyond the last region returns an unmapped region
-        # that ends at LLDB_INVALID_ADDRESS
-        last_region = lldb.SBMemoryRegionInfo()
-        region_list.GetMemoryRegionAtIndex(region_count - 1, last_region)
-        end_region = lldb.SBMemoryRegionInfo()
-        error = process.GetMemoryRegionInfo(
-            last_region.GetRegionEnd(), end_region)
-        self.assertFalse(end_region.IsMapped())
-        self.assertEqual(
-            last_region.GetRegionEnd(),
-            end_region.GetRegionBase())
-        self.assertEqual(end_region.GetRegionEnd(), lldb.LLDB_INVALID_ADDRESS)
-
-    def check_state(self, process):
-        with open(os.devnull) as devnul:
-            # sanitize test output
-            self.dbg.SetOutputFileHandle(devnul, False)
-            self.dbg.SetErrorFileHandle(devnul, False)
-
-            self.assertTrue(process.is_stopped)
-
-            # Process.Continue
-            error = process.Continue()
-            self.assertFalse(error.Success())
-            self.assertTrue(process.is_stopped)
-
-            # Thread.StepOut
-            thread = process.GetSelectedThread()
-            thread.StepOut()
-            self.assertTrue(process.is_stopped)
-
-            # command line
-            self.dbg.HandleCommand('s')
-            self.assertTrue(process.is_stopped)
-            self.dbg.HandleCommand('c')
-            self.assertTrue(process.is_stopped)
-
-            # restore file handles
-            self.dbg.SetOutputFileHandle(None, False)
-            self.dbg.SetErrorFileHandle(None, False)
-
-    def check_backtrace(self, thread, filename, backtrace):
-        self.assertGreaterEqual(thread.GetNumFrames(), len(backtrace))
-        src = filename.rpartition('.')[0] + '.c'
-        for i in range(len(backtrace)):
-            frame = thread.GetFrameAtIndex(i)
-            self.assertTrue(frame)
-            if not backtrace[i].startswith('_'):
-                self.assertEqual(frame.GetFunctionName(), backtrace[i])
-                self.assertEqual(frame.GetLineEntry().GetLine(),
-                                 line_number(src, "Frame " + backtrace[i]))
-                self.assertEqual(
-                    frame.FindVariable("F").GetValueAsUnsigned(), ord(
-                        backtrace[i][0]))
-
-    def do_test(self, filename, pid, region_count):
-        target = self.dbg.CreateTarget(filename)
-        process = target.LoadCore(filename + ".core")
-
-        self.assertTrue(process, PROCESS_IS_VALID)
-        self.assertEqual(process.GetNumThreads(), self.THREAD_COUNT)
-        self.assertEqual(process.GetProcessID(), pid)
-
-        self.check_state(process)
-
-        self.check_stack(process, pid, filename)
-
-        self.check_memory_regions(process, region_count)
-
-        self.dbg.DeleteTarget(target)
-
-
-class NetBSD1LWPCoreTestCase(NetBSDCoreCommonTestCase):
-    THREAD_COUNT = 1
-
-    def check_stack(self, process, pid, filename):
-        thread = process.GetSelectedThread()
-        self.assertTrue(thread)
-        self.assertEqual(thread.GetThreadID(), 1)
-        self.assertEqual(thread.GetStopReason(), lldb.eStopReasonSignal)
-        self.assertEqual(thread.GetStopReasonDataCount(), 1)
-        self.assertEqual(thread.GetStopReasonDataAtIndex(0), signal.SIGSEGV)
-        backtrace = ["bar", "foo", "main"]
-        self.check_backtrace(thread, filename, backtrace)
-
-    @skipIfLLVMTargetMissing("AArch64")
-    def test_aarch64(self):
-        """Test single-threaded aarch64 core dump."""
-        self.do_test("1lwp_SIGSEGV.aarch64", pid=8339, region_count=32)
-
-    @skipIfLLVMTargetMissing("X86")
-    def test_amd64(self):
-        """Test single-threaded amd64 core dump."""
-        self.do_test("1lwp_SIGSEGV.amd64", pid=693, region_count=21)
-
-
-class NetBSD2LWPT2CoreTestCase(NetBSDCoreCommonTestCase):
-    THREAD_COUNT = 2
-
-    def check_stack(self, process, pid, filename):
-        thread = process.GetSelectedThread()
-        self.assertTrue(thread)
-        self.assertEqual(thread.GetThreadID(), 2)
-        self.assertEqual(thread.GetStopReason(), lldb.eStopReasonSignal)
-        self.assertEqual(thread.GetStopReasonDataCount(), 1)
-        self.assertEqual(thread.GetStopReasonDataAtIndex(0), signal.SIGSEGV)
-        backtrace = ["bar", "foo", "lwp_main"]
-        self.check_backtrace(thread, filename, backtrace)
-
-        # thread 1 should have no signal
-        thread = process.GetThreadByID(1)
-        self.assertEqual(thread.GetStopReason(), lldb.eStopReasonSignal)
-        self.assertEqual(thread.GetStopReasonDataCount(), 1)
-        self.assertEqual(thread.GetStopReasonDataAtIndex(0), 0)
-
-    @skipIfLLVMTargetMissing("AArch64")
-    def test_aarch64(self):
-        """Test double-threaded aarch64 core dump where thread 2 is signalled."""
-        self.do_test("2lwp_t2_SIGSEGV.aarch64", pid=14142, region_count=31)
-
-    @skipIfLLVMTargetMissing("X86")
-    def test_amd64(self):
-        """Test double-threaded amd64 core dump where thread 2 is signalled."""
-        self.do_test("2lwp_t2_SIGSEGV.amd64", pid=622, region_count=24)
-
-
-class NetBSD2LWPProcessSigCoreTestCase(NetBSDCoreCommonTestCase):
-    THREAD_COUNT = 2
-
-    def check_stack(self, process, pid, filename):
-        thread = process.GetSelectedThread()
-        self.assertTrue(thread)
-        self.assertEqual(thread.GetThreadID(), 2)
-        self.assertEqual(thread.GetStopReason(), lldb.eStopReasonSignal)
-        self.assertEqual(thread.GetStopReasonDataCount(), 1)
-        self.assertEqual(thread.GetStopReasonDataAtIndex(0), signal.SIGSEGV)
-        backtrace = ["bar", "foo", "lwp_main"]
-        self.check_backtrace(thread, filename, backtrace)
-
-        # thread 1 should have the same signal
-        thread = process.GetThreadByID(1)
-        self.assertEqual(thread.GetStopReason(), lldb.eStopReasonSignal)
-        self.assertEqual(thread.GetStopReasonDataCount(), 1)
-        self.assertEqual(thread.GetStopReasonDataAtIndex(0), signal.SIGSEGV)
-
-    @skipIfLLVMTargetMissing("AArch64")
-    def test_aarch64(self):
-        """Test double-threaded aarch64 core dump where process is signalled."""
-        self.do_test("2lwp_process_SIGSEGV.aarch64", pid=1403, region_count=30)
-
-    @skipIfLLVMTargetMissing("X86")
-    def test_amd64(self):
-        """Test double-threaded amd64 core dump where process is signalled."""
-        self.do_test("2lwp_process_SIGSEGV.amd64", pid=665, region_count=24)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/wow64_minidump/TestWow64MiniDump.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/wow64_minidump/TestWow64MiniDump.py
deleted file mode 100644 (file)
index cbfc852..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-"""
-Test basics of a mini dump taken of a 32-bit process running in WoW64
-
-WoW64 is the subsystem that lets 32-bit processes run in 64-bit Windows.  If you
-capture a mini dump of a process running under WoW64 with a 64-bit debugger, you
-end up with a dump of the WoW64 layer.  In that case, LLDB must do extra work to
-get the 32-bit register contexts.
-"""
-
-from six import iteritems
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class Wow64MiniDumpTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_wow64_mini_dump(self):
-        """Test that lldb can read the process information from the minidump."""
-        # target create -c fizzbuzz_wow64.dmp
-        target = self.dbg.CreateTarget("")
-        process = target.LoadCore("fizzbuzz_wow64.dmp")
-        self.assertTrue(process, PROCESS_IS_VALID)
-        self.assertEqual(process.GetNumThreads(), 1)
-        self.assertEqual(process.GetProcessID(), 0x1E9C)
-
-    def test_thread_info_in_wow64_mini_dump(self):
-        """Test that lldb can read the thread information from the minidump."""
-        # target create -c fizzbuzz_wow64.dmp
-        target = self.dbg.CreateTarget("")
-        process = target.LoadCore("fizzbuzz_wow64.dmp")
-        # This process crashed due to an access violation (0xc0000005), but the
-        # minidump doesn't have an exception record--perhaps the crash handler
-        # ate it.
-        # TODO:  See if we can recover the exception information from the TEB,
-        # which, according to Windbg, has a pointer to an exception list.
-
-        # In the dump, none of the threads are stopped, so we cannot use
-        # lldbutil.get_stopped_thread.
-        thread = process.GetThreadAtIndex(0)
-        self.assertEqual(thread.GetStopReason(), lldb.eStopReasonNone)
-
-    def test_stack_info_in_wow64_mini_dump(self):
-        """Test that we can see a trivial stack in a VS-generate mini dump."""
-        # target create -c fizzbuzz_no_heap.dmp
-        target = self.dbg.CreateTarget("")
-        process = target.LoadCore("fizzbuzz_wow64.dmp")
-        self.assertGreaterEqual(process.GetNumThreads(), 1)
-        # This process crashed due to an access violation (0xc0000005), but the
-        # minidump doesn't have an exception record--perhaps the crash handler
-        # ate it.
-        # TODO:  See if we can recover the exception information from the TEB,
-        # which, according to Windbg, has a pointer to an exception list.
-
-        # In the dump, none of the threads are stopped, so we cannot use
-        # lldbutil.get_stopped_thread.
-        thread = process.GetThreadAtIndex(0)
-        # The crash is in main, so there should be at least one frame on the
-        # stack.
-        self.assertGreaterEqual(thread.GetNumFrames(), 1)
-        frame = thread.GetFrameAtIndex(0)
-        self.assertTrue(frame.IsValid())
-        pc = frame.GetPC()
-        eip = frame.FindRegister("pc")
-        self.assertTrue(eip.IsValid())
-        self.assertEqual(pc, eip.GetValueAsUnsigned())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/wow64_minidump/fizzbuzz.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/wow64_minidump/fizzbuzz.cpp
deleted file mode 100644 (file)
index 295d4a1..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-// A sample program for getting minidumps on Windows.
-
-#include <iostream>
-
-bool
-fizz(int x)
-{
-    return x % 3 == 0;
-}
-
-bool
-buzz(int x)
-{
-    return x % 5 == 0;
-}
-
-int
-main()
-{
-    int *buggy = 0;
-
-    for (int i = 1; i <= 100; ++i)
-    {
-        if (fizz(i)) std::cout << "fizz";
-        if (buzz(i)) std::cout << "buzz";
-        if (!fizz(i) && !buzz(i)) std::cout << i;
-        std::cout << '\n';
-    }
-
-    return *buggy;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/wow64_minidump/fizzbuzz_wow64.dmp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/wow64_minidump/fizzbuzz_wow64.dmp
deleted file mode 100644 (file)
index 3d97186..0000000
Binary files a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/wow64_minidump/fizzbuzz_wow64.dmp and /dev/null differ
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/pre_run_dylibs/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/pre_run_dylibs/Makefile
deleted file mode 100644 (file)
index 032f9cd..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-DYLIB_NAME := unlikely_name
-DYLIB_CXX_SOURCES := foo.cpp
-CXX_SOURCES := main.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/pre_run_dylibs/TestPreRunDylibs.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/pre_run_dylibs/TestPreRunDylibs.py
deleted file mode 100644 (file)
index 1ac18a7..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-
-import unittest2
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.decorators import *
-
-class TestPreRunLibraries(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @skipIf(oslist=no_match(['darwin','macos']))
-    def test(self):
-        """Test that we find directly linked dylib pre-run."""
-
-        self.build()
-        target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
-        self.assertTrue(target, VALID_TARGET)
-
-        # I don't know what the name of a shared library
-        # extension is in general, so instead of using FindModule,
-        # I'll iterate through the module and do a basename match.
-        found_it = False
-        for module in target.modules:
-            file_name = module.GetFileSpec().GetFilename()
-            if file_name.find("unlikely_name") != -1:
-                found_it = True
-                break
-
-        self.assertTrue(found_it, "Couldn't find unlikely_to_occur_name in loaded libraries.")
-
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/pre_run_dylibs/foo.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/pre_run_dylibs/foo.cpp
deleted file mode 100644 (file)
index 8dad0a2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "foo.h"
-
-int call_foo1() { return foo1(); }
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/pre_run_dylibs/foo.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/pre_run_dylibs/foo.h
deleted file mode 100644 (file)
index 060b91f..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-LLDB_TEST_API inline int foo1() { return 1; } // !BR1
-
-LLDB_TEST_API inline int foo2() { return 2; } // !BR2
-
-LLDB_TEST_API extern int call_foo1();
-LLDB_TEST_API extern int call_foo2();
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/pre_run_dylibs/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/pre_run_dylibs/main.cpp
deleted file mode 100644 (file)
index c9295a5..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#include "foo.h"
-
-int call_foo2() { return foo2(); }
-
-int
-main() // !BR_main
-{
-  return call_foo1() + call_foo2();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/process_group/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/process_group/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/process_group/TestChangeProcessGroup.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/process_group/TestChangeProcessGroup.py
deleted file mode 100644 (file)
index fe541c7..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-"""Test that we handle inferiors which change their process group"""
-
-
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ChangeProcessGroupTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break for main.c.
-        self.line = line_number('main.c', '// Set breakpoint here')
-
-    @skipIfFreeBSD  # Times out on FreeBSD llvm.org/pr23731
-    @skipIfWindows  # setpgid call does not exist on Windows
-    @expectedFailureAndroid("http://llvm.org/pr23762", api_levels=[16])
-    @expectedFailureNetBSD
-    def test_setpgid(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Use a file as a synchronization point between test and inferior.
-        pid_file_path = lldbutil.append_to_process_working_directory(self,
-            "pid_file_%d" % (int(time.time())))
-        self.addTearDownHook(
-            lambda: self.run_platform_command(
-                "rm %s" %
-                (pid_file_path)))
-
-        popen = self.spawnSubprocess(exe, [pid_file_path])
-        self.addTearDownHook(self.cleanupSubprocesses)
-
-        pid = lldbutil.wait_for_file_on_target(self, pid_file_path)
-
-        # make sure we cleanup the forked child also
-        def cleanupChild():
-            if lldb.remote_platform:
-                lldb.remote_platform.Kill(int(pid))
-            else:
-                if os.path.exists("/proc/" + pid):
-                    os.kill(int(pid), signal.SIGKILL)
-        self.addTearDownHook(cleanupChild)
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        listener = lldb.SBListener("my.attach.listener")
-        error = lldb.SBError()
-        process = target.AttachToProcessWithID(listener, int(pid), error)
-        self.assertTrue(error.Success() and process, PROCESS_IS_VALID)
-
-        # set a breakpoint just before the setpgid() call
-        lldbutil.run_break_set_by_file_and_line(
-            self, 'main.c', self.line, num_expected_locations=-1)
-
-        thread = process.GetSelectedThread()
-
-        # release the child from its loop
-        value = thread.GetSelectedFrame().EvaluateExpression("release_child_flag = 1")
-        self.assertTrue(value.IsValid() and value.GetValueAsUnsigned(0) == 1)
-        process.Continue()
-
-        # make sure the child's process group id is different from its pid
-        value = thread.GetSelectedFrame().EvaluateExpression("(int)getpgid(0)")
-        self.assertTrue(value.IsValid())
-        self.assertNotEqual(value.GetValueAsUnsigned(0), int(pid))
-
-        # step over the setpgid() call
-        thread.StepOver()
-        self.assertEqual(thread.GetStopReason(), lldb.eStopReasonPlanComplete)
-
-        # verify that the process group has been set correctly
-        # this also checks that we are still in full control of the child
-        value = thread.GetSelectedFrame().EvaluateExpression("(int)getpgid(0)")
-        self.assertTrue(value.IsValid())
-        self.assertEqual(value.GetValueAsUnsigned(0), int(pid))
-
-        # run to completion
-        process.Continue()
-        self.assertEqual(process.GetState(), lldb.eStateExited)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/process_group/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/process_group/main.c
deleted file mode 100644 (file)
index 7e986bb..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/wait.h>
-
-volatile int release_child_flag = 0;
-
-int main(int argc, char const *argv[])
-{
-    pid_t child = fork();
-    if (child == -1)
-    {
-        perror("fork");
-        return 1;
-    }
-
-    if (child > 0)
-    { // parent
-        if (argc < 2)
-        {
-            fprintf(stderr, "Need pid filename.\n");
-            return 2;
-        }
-
-        // Let the test suite know the child's pid.
-        FILE *pid_file = fopen(argv[1], "w");
-        if (pid_file == NULL)
-        {
-            perror("fopen");
-            return 3;
-        }
-
-        fprintf(pid_file, "%d\n", child);
-        if (fclose(pid_file) == EOF)
-        {
-            perror("fclose");
-            return 4;
-        }
-
-        // And wait for the child to finish it's work.
-        int status = 0;
-        pid_t wpid = wait(&status);
-        if (wpid == -1)
-        {
-            perror("wait");
-            return 5;
-        }
-        if (wpid != child)
-        {
-            fprintf(stderr, "wait() waited for wrong child\n");
-            return 6;
-        }
-        if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
-        {
-            fprintf(stderr, "child did not exit correctly\n");
-            return 7;
-        }
-    }
-    else
-    { // child
-        lldb_enable_attach();
-
-        while (! release_child_flag) // Wait for debugger to attach
-            sleep(1);
-
-        printf("Child's previous process group is: %d\n", getpgid(0));
-        setpgid(0, 0); // Set breakpoint here
-        printf("Child's process group set to: %d\n", getpgid(0));
-    }
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/process_save_core/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/process_save_core/Makefile
deleted file mode 100644 (file)
index 65e9dd2..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/process_save_core/TestProcessSaveCore.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/process_save_core/TestProcessSaveCore.py
deleted file mode 100644 (file)
index d561af0..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-"""
-Test saving a core file (or mini dump).
-"""
-
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ProcessSaveCoreTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @not_remote_testsuite_ready
-    @skipUnlessWindows
-    def test_cannot_save_core_unless_process_stopped(self):
-        """Test that SaveCore fails if the process isn't stopped."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        core = self.getBuildArtifact("core.dmp")
-        target = self.dbg.CreateTarget(exe)
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertNotEqual(process.GetState(), lldb.eStateStopped)
-        error = process.SaveCore(core)
-        self.assertTrue(error.Fail())
-
-    @not_remote_testsuite_ready
-    @skipUnlessWindows
-    def test_save_windows_mini_dump(self):
-        """Test that we can save a Windows mini dump."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        core = self.getBuildArtifact("core.dmp")
-        try:
-            target = self.dbg.CreateTarget(exe)
-            breakpoint = target.BreakpointCreateByName("bar")
-            process = target.LaunchSimple(
-                None, None, self.get_process_working_directory())
-            self.assertEqual(process.GetState(), lldb.eStateStopped)
-            self.assertTrue(process.SaveCore(core))
-            self.assertTrue(os.path.isfile(core))
-            self.assertTrue(process.Kill().Success())
-
-            # To verify, we'll launch with the mini dump, and ensure that we see
-            # the executable in the module list.
-            target = self.dbg.CreateTarget(None)
-            process = target.LoadCore(core)
-            files = [
-                target.GetModuleAtIndex(i).GetFileSpec() for i in range(
-                    0, target.GetNumModules())]
-            paths = [
-                os.path.join(
-                    f.GetDirectory(),
-                    f.GetFilename()) for f in files]
-            self.assertTrue(exe in paths)
-
-        finally:
-            # Clean up the mini dump file.
-            self.assertTrue(self.dbg.DeleteTarget(target))
-            if (os.path.isfile(core)):
-                os.unlink(core)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/process_save_core/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/process_save_core/main.cpp
deleted file mode 100644 (file)
index 4037ea5..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-int global = 42;
-
-int
-bar(int x)
-{
-  int y = 4*x + global;
-  return y;
-}
-
-int
-foo(int x)
-{
-  int y = 2*bar(3*x);
-  return y;
-}
-
-int
-main()
-{
-  return 0 * foo(1);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/ptr_refs/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/ptr_refs/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/ptr_refs/TestPtrRefs.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/ptr_refs/TestPtrRefs.py
deleted file mode 100644 (file)
index 8ca2639..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-"""
-Test the ptr_refs tool on Darwin
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestPtrRefs(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    def test_ptr_refs(self):
-        """Test format string functionality."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        main_file_spec = lldb.SBFileSpec('main.c')
-        breakpoint = target.BreakpointCreateBySourceRegex(
-            'break', main_file_spec)
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Frame #0 should be on self.line1 and the break condition should hold.
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint condition")
-
-        frame = thread.GetFrameAtIndex(0)
-
-        self.dbg.HandleCommand("script import lldb.macosx.heap")
-        self.expect("ptr_refs my_ptr", substrs=["malloc", "stack"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/ptr_refs/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/ptr_refs/main.c
deleted file mode 100644 (file)
index f46862e..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-struct referent {
-    const char *p;
-};
-
-int main (int argc, char const *argv[])
-{
-    const char *my_ptr = strdup("hello");
-    struct referent *r = malloc(sizeof(struct referent));
-    r->p = my_ptr;
-
-    printf("%p\n", r); // break here
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/recursion/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/recursion/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/recursion/TestValueObjectRecursion.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/recursion/TestValueObjectRecursion.py
deleted file mode 100644 (file)
index e949f1a..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-"""
-Test lldb data formatter subsystem.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class ValueObjectRecursionTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    def test_with_run_command(self):
-        """Test that deeply nested ValueObjects still work."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        root = self.frame().FindVariable("root")
-        child = root.GetChildAtIndex(1)
-        if self.TraceOn():
-            print(root)
-            print(child)
-        for i in range(0, 15000):
-            child = child.GetChildAtIndex(1)
-        if self.TraceOn():
-            print(child)
-        self.assertTrue(
-            child.IsValid(),
-            "could not retrieve the deep ValueObject")
-        self.assertTrue(
-            child.GetChildAtIndex(0).IsValid(),
-            "the deep ValueObject has no value")
-        self.assertTrue(
-            child.GetChildAtIndex(0).GetValueAsUnsigned() != 0,
-            "the deep ValueObject has a zero value")
-        self.assertTrue(
-            child.GetChildAtIndex(1).GetValueAsUnsigned() != 0,
-            "the deep ValueObject has no next")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/recursion/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/recursion/main.cpp
deleted file mode 100644 (file)
index bd5278a..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-
-struct node;
-struct node {
-       int value;
-       node* next;
-       node () : value(1),next(NULL) {}
-       node (int v) : value(v), next(NULL) {}
-};
-
-void make_tree(node* root, int count)
-{
-       int countdown=1;
-       if (!root)
-               return;
-       root->value = countdown;
-       while (count > 0)
-       {
-               root->next = new node(++countdown);
-               root = root->next;
-               count--;
-       }
-}
-
-int main (int argc, const char * argv[])
-{
-       node root(1);
-       make_tree(&root,25000);
-       return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/rerun/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/rerun/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/rerun/TestRerun.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/rerun/TestRerun.py
deleted file mode 100644 (file)
index d2e5701..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-"""
-Test that argdumper is a viable launching strategy.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestRerun(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        self.runCmd("target create %s" % exe)
-
-        # Create the target
-        target = self.dbg.CreateTarget(exe)
-
-        # Create any breakpoints we need
-        breakpoint = target.BreakpointCreateBySourceRegex(
-            'break here', lldb.SBFileSpec("main.cpp", False))
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        self.runCmd("process launch 1 2 3")
-
-        process = self.process()
-        thread = lldbutil.get_one_thread_stopped_at_breakpoint(
-            process, breakpoint)
-        self.assertIsNotNone(
-            thread, "Process should be stopped at a breakpoint in main")
-        self.assertTrue(thread.IsValid(), "Stopped thread is not valid")
-
-        self.expect("frame variable argv[1]", substrs=['1'])
-        self.expect("frame variable argv[2]", substrs=['2'])
-        self.expect("frame variable argv[3]", substrs=['3'])
-
-        # Let program exit
-        self.runCmd("continue")
-
-        # Re-run with no args and make sure we still run with 1 2 3 as arguments as
-        # they should have been stored in "target.run-args"
-        self.runCmd("process launch")
-
-        process = self.process()
-        thread = lldbutil.get_one_thread_stopped_at_breakpoint(
-            process, breakpoint)
-
-        self.assertIsNotNone(
-            thread, "Process should be stopped at a breakpoint in main")
-        self.assertTrue(thread.IsValid(), "Stopped thread is not valid")
-
-        self.expect("frame variable argv[1]", substrs=['1'])
-        self.expect("frame variable argv[2]", substrs=['2'])
-        self.expect("frame variable argv[3]", substrs=['3'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/rerun/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/rerun/main.cpp
deleted file mode 100644 (file)
index cbef8d1..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-int 
-main (int argc, char const **argv)
-{
-    return 0; // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/return-value/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/return-value/Makefile
deleted file mode 100644 (file)
index 138642c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := call-func.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py
deleted file mode 100644 (file)
index a5439b1..0000000
+++ /dev/null
@@ -1,279 +0,0 @@
-"""
-Test getting return-values correctly when stepping out
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ReturnValueTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def affected_by_pr33042(self):
-        return ("clang" in self.getCompiler() and self.getArchitecture() ==
-            "aarch64" and self.getPlatform() == "linux")
-
-    def affected_by_pr44132(self):
-        return (self.getArchitecture() == "aarch64" and self.getPlatform() == "linux")
-
-    # ABIMacOSX_arm can't fetch simple values inside a structure
-    def affected_by_radar_34562999(self):
-        return (self.getArchitecture() == 'armv7' or self.getArchitecture() == 'armv7k') and self.platformIsDarwin()
-
-    @expectedFailureAll(oslist=["freebsd"], archs=["i386"])
-    @expectedFailureAll(oslist=["macosx"], archs=["i386"], bugnumber="<rdar://problem/28719652>")
-    @expectedFailureAll(
-        oslist=["linux"],
-        compiler="clang",
-        compiler_version=[
-            "<=",
-            "3.6"],
-        archs=["i386"])
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
-    @add_test_categories(['pyapi'])
-    def test_with_python(self):
-        """Test getting return values from stepping out."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        (self.target, self.process, thread, inner_sint_bkpt) = lldbutil.run_to_name_breakpoint(self, "inner_sint", exe_name = exe)
-
-        error = lldb.SBError()
-
-        # inner_sint returns the variable value, so capture that here:
-        in_int = thread.GetFrameAtIndex(0).FindVariable(
-            "value").GetValueAsSigned(error)
-        self.assertTrue(error.Success())
-
-        thread.StepOut()
-
-        self.assertTrue(self.process.GetState() == lldb.eStateStopped)
-        self.assertTrue(thread.GetStopReason() == lldb.eStopReasonPlanComplete)
-
-        frame = thread.GetFrameAtIndex(0)
-        fun_name = frame.GetFunctionName()
-        self.assertTrue(fun_name == "outer_sint(int)")
-
-        return_value = thread.GetStopReturnValue()
-        self.assertTrue(return_value.IsValid())
-
-        ret_int = return_value.GetValueAsSigned(error)
-        self.assertTrue(error.Success())
-        self.assertTrue(in_int == ret_int)
-
-        # Run again and we will stop in inner_sint the second time outer_sint is called.
-        # Then test stepping out two frames at once:
-
-        thread_list = lldbutil.continue_to_breakpoint(self.process, inner_sint_bkpt)
-        self.assertTrue(len(thread_list) == 1)
-        thread = thread_list[0]
-
-        # We are done with the inner_sint breakpoint:
-        self.target.BreakpointDelete(inner_sint_bkpt.GetID())
-
-        frame = thread.GetFrameAtIndex(1)
-        fun_name = frame.GetFunctionName()
-        self.assertTrue(fun_name == "outer_sint(int)")
-        in_int = frame.FindVariable("value").GetValueAsSigned(error)
-        self.assertTrue(error.Success())
-
-        thread.StepOutOfFrame(frame)
-
-        self.assertTrue(self.process.GetState() == lldb.eStateStopped)
-        self.assertTrue(thread.GetStopReason() == lldb.eStopReasonPlanComplete)
-        frame = thread.GetFrameAtIndex(0)
-        fun_name = frame.GetFunctionName()
-        self.assertTrue(fun_name == "main")
-
-        ret_value = thread.GetStopReturnValue()
-        self.assertTrue(return_value.IsValid())
-        ret_int = ret_value.GetValueAsSigned(error)
-        self.assertTrue(error.Success())
-        self.assertTrue(2 * in_int == ret_int)
-
-        # Now try some simple returns that have different types:
-        inner_float_bkpt = self.target.BreakpointCreateByName(
-            "inner_float(float)", exe)
-        self.assertTrue(inner_float_bkpt, VALID_BREAKPOINT)
-        self.process.Continue()
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint(
-            self.process, inner_float_bkpt)
-        self.assertTrue(len(thread_list) == 1)
-        thread = thread_list[0]
-
-        self.target.BreakpointDelete(inner_float_bkpt.GetID())
-
-        frame = thread.GetFrameAtIndex(0)
-        in_value = frame.FindVariable("value")
-        in_float = float(in_value.GetValue())
-        thread.StepOut()
-
-        self.assertTrue(self.process.GetState() == lldb.eStateStopped)
-        self.assertTrue(thread.GetStopReason() == lldb.eStopReasonPlanComplete)
-
-        frame = thread.GetFrameAtIndex(0)
-        fun_name = frame.GetFunctionName()
-        self.assertTrue(fun_name == "outer_float(float)")
-
-        #return_value = thread.GetStopReturnValue()
-        #self.assertTrue(return_value.IsValid())
-        #return_float = float(return_value.GetValue())
-
-        #self.assertTrue(in_float == return_float)
-
-        if not self.affected_by_radar_34562999() and not self.affected_by_pr44132():
-            self.return_and_test_struct_value("return_one_int")
-            self.return_and_test_struct_value("return_two_int")
-            self.return_and_test_struct_value("return_three_int")
-            self.return_and_test_struct_value("return_four_int")
-            if not self.affected_by_pr33042():
-                self.return_and_test_struct_value("return_five_int")
-
-            self.return_and_test_struct_value("return_two_double")
-            self.return_and_test_struct_value("return_one_double_two_float")
-            self.return_and_test_struct_value("return_one_int_one_float_one_int")
-
-            self.return_and_test_struct_value("return_one_pointer")
-            self.return_and_test_struct_value("return_two_pointer")
-            self.return_and_test_struct_value("return_one_float_one_pointer")
-            self.return_and_test_struct_value("return_one_int_one_pointer")
-            self.return_and_test_struct_value("return_three_short_one_float")
-
-            self.return_and_test_struct_value("return_one_int_one_double")
-            self.return_and_test_struct_value("return_one_int_one_double_one_int")
-            self.return_and_test_struct_value(
-                "return_one_short_one_double_one_short")
-            self.return_and_test_struct_value("return_one_float_one_int_one_float")
-            self.return_and_test_struct_value("return_two_float")
-            # I am leaving out the packed test until we have a way to tell CLANG
-            # about alignment when reading DWARF for packed types.
-            #self.return_and_test_struct_value ("return_one_int_one_double_packed")
-            self.return_and_test_struct_value("return_one_int_one_long")
-
-    @expectedFailureAll(oslist=["freebsd"], archs=["i386"])
-    @expectedFailureAll(oslist=["macosx"], archs=["i386"], bugnumber="<rdar://problem/28719652>")
-    @expectedFailureAll(
-        oslist=["linux"],
-        compiler="clang",
-        compiler_version=[
-            "<=",
-            "3.6"],
-        archs=["i386"])
-    @expectedFailureAll(compiler=["gcc"], archs=["x86_64", "i386"])
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
-    @skipIfDarwinEmbedded # <rdar://problem/33976032> ABIMacOSX_arm64 doesn't get structs this big correctly
-    def test_vector_values(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        error = lldb.SBError()
-
-        self.target = self.dbg.CreateTarget(exe)
-        self.assertTrue(self.target, VALID_TARGET)
-
-        main_bktp = self.target.BreakpointCreateByName("main", exe)
-        self.assertTrue(main_bktp, VALID_BREAKPOINT)
-
-        self.process = self.target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertEqual(len(lldbutil.get_threads_stopped_at_breakpoint(
-            self.process, main_bktp)), 1)
-
-        self.return_and_test_struct_value("return_vector_size_float32_8")
-        self.return_and_test_struct_value("return_vector_size_float32_16")
-        if not self.affected_by_pr44132():
-            self.return_and_test_struct_value("return_vector_size_float32_32")
-        self.return_and_test_struct_value("return_ext_vector_size_float32_2")
-        self.return_and_test_struct_value("return_ext_vector_size_float32_4")
-        if not self.affected_by_pr44132():
-            self.return_and_test_struct_value("return_ext_vector_size_float32_8")
-
-    # limit the nested struct and class tests to only x86_64
-    @skipIf(archs=no_match(['x86_64']))
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
-    def test_for_cpp_support(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        (self.target, self.process, thread, inner_sint_bkpt) = lldbutil.run_to_name_breakpoint(self, "inner_sint", exe_name = exe)
-
-        error = lldb.SBError()
-
-        self.target = self.dbg.CreateTarget(exe)
-        self.assertTrue(self.target, VALID_TARGET)
-
-        main_bktp = self.target.BreakpointCreateByName("main", exe)
-        self.assertTrue(main_bktp, VALID_BREAKPOINT)
-
-        self.process = self.target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertEqual(len(lldbutil.get_threads_stopped_at_breakpoint(
-            self.process, main_bktp)), 1)
-        # nested struct tests
-        self.return_and_test_struct_value("return_nested_one_float_three_base")
-        self.return_and_test_struct_value("return_double_nested_one_float_one_nested")
-        self.return_and_test_struct_value("return_nested_float_struct")
-        # class test
-        self.return_and_test_struct_value("return_base_class_one_char")
-        self.return_and_test_struct_value("return_nested_class_float_and_base")
-        self.return_and_test_struct_value("return_double_nested_class_float_and_nested")
-        self.return_and_test_struct_value("return_base_class")
-        self.return_and_test_struct_value("return_derived_class")
-
-    @skipIf(compiler="clang", compiler_version=['<', '7.0'])
-    def return_and_test_struct_value(self, func_name):
-        """Pass in the name of the function to return from - takes in value, returns value."""
-
-        # Set the breakpoint, run to it, finish out.
-        bkpt = self.target.BreakpointCreateByName(func_name)
-        self.assertTrue(bkpt.GetNumResolvedLocations() > 0)
-
-        self.process.Continue()
-
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint(
-            self.process, bkpt)
-
-        self.assertTrue(len(thread_list) == 1)
-        thread = thread_list[0]
-
-        self.target.BreakpointDelete(bkpt.GetID())
-
-        in_value = thread.GetFrameAtIndex(0).FindVariable("value")
-
-        self.assertTrue(in_value.IsValid())
-        num_in_children = in_value.GetNumChildren()
-
-        # This is a little hokey, but if we don't get all the children now, then
-        # once we've stepped we won't be able to get them?
-
-        for idx in range(0, num_in_children):
-            in_child = in_value.GetChildAtIndex(idx)
-            in_child_str = in_child.GetValue()
-
-        thread.StepOut()
-
-        self.assertTrue(self.process.GetState() == lldb.eStateStopped)
-        self.assertTrue(thread.GetStopReason() == lldb.eStopReasonPlanComplete)
-
-        # Assuming all these functions step out to main.  Could figure out the caller dynamically
-        # if that would add something to the test.
-        frame = thread.GetFrameAtIndex(0)
-        fun_name = frame.GetFunctionName()
-        self.assertTrue(fun_name == "main")
-
-        frame = thread.GetFrameAtIndex(0)
-        ret_value = thread.GetStopReturnValue()
-
-        self.assertTrue(ret_value.IsValid())
-
-        num_ret_children = ret_value.GetNumChildren()
-        self.assertTrue(num_in_children == num_ret_children)
-        for idx in range(0, num_ret_children):
-            in_child = in_value.GetChildAtIndex(idx)
-            ret_child = ret_value.GetChildAtIndex(idx)
-            in_child_str = in_child.GetValue()
-            ret_child_str = ret_child.GetValue()
-
-            self.assertEqual(in_child_str, ret_child_str)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/return-value/call-func.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/return-value/call-func.cpp
deleted file mode 100644 (file)
index c538e84..0000000
+++ /dev/null
@@ -1,607 +0,0 @@
-// Some convenient things to return:
-static char *g_first_pointer = "I am the first";
-static char *g_second_pointer = "I am the second";
-
-// First we have some simple functions that return standard types, ints, floats and doubles.
-// We have a function calling a function in a few cases to test that if you stop in the
-// inner function then do "up/fin" you get the return value from the outer-most frame.
-
-int 
-inner_sint (int value)
-{
-  return value;
-}
-
-int
-outer_sint (int value)
-{
-  int outer_value = 2 * inner_sint (value);
-  return outer_value;
-}
-
-float
-inner_float (float value)
-{
-  return value;
-}
-
-float 
-outer_float (float value)
-{
-  float outer_value = 2 * inner_float(value);
-  return outer_value;
-}
-
-double 
-return_double (double value)
-{
-  return value;
-}
-
-long double 
-return_long_double (long double value)
-{
-  return value;
-}
-
-char *
-return_pointer (char *value)
-{
-  return value;
-}
-
-struct one_int
-{
-  int one_field;
-};
-
-struct one_int
-return_one_int (struct one_int value)
-{
-  return value;
-}
-
-struct two_int
-{
-  int first_field;
-  int second_field;
-};
-
-struct two_int
-return_two_int (struct two_int value)
-{
-  return value;
-}
-
-struct three_int
-{
-  int first_field;
-  int second_field;
-  int third_field;
-};
-
-struct three_int
-return_three_int (struct three_int value)
-{
-  return value;
-}
-
-struct four_int
-{
-  int first_field;
-  int second_field;
-  int third_field;
-  int fourth_field;
-};
-
-struct four_int
-return_four_int (struct four_int value)
-{
-  return value;
-}
-
-struct five_int
-{
-  int first_field;
-  int second_field;
-  int third_field;
-  int fourth_field;
-  int fifth_field;
-};
-
-struct five_int
-return_five_int (struct five_int value)
-{
-  return value;
-}
-
-struct one_int_one_double
-{
-  int first_field;
-  double second_field;
-};
-
-struct one_int_one_double
-return_one_int_one_double (struct one_int_one_double value)
-{
-  return value;
-}
-
-struct one_int_one_double_one_int
-{
-  int one_field;
-  double second_field;
-  int third_field;
-};
-
-struct one_int_one_double_one_int
-return_one_int_one_double_one_int (struct one_int_one_double_one_int value)
-{
-  return value;
-}
-
-struct one_short_one_double_one_short
-{
-  int one_field;
-  double second_field;
-  int third_field;
-};
-
-struct one_short_one_double_one_short
-return_one_short_one_double_one_short (struct one_short_one_double_one_short value)
-{
-  return value;
-}
-
-struct three_short_one_float
-{
-  short one_field;
-  short second_field;
-  short third_field;
-  float fourth_field;
-};
-
-struct three_short_one_float
-return_three_short_one_float (struct three_short_one_float value)
-{
-  return value;
-}
-
-struct one_int_one_float_one_int
-{
-  int one_field;
-  float second_field;
-  int third_field;
-};
-
-struct one_int_one_float_one_int
-return_one_int_one_float_one_int (struct one_int_one_float_one_int value)
-{
-  return value;
-}
-
-struct one_float_one_int_one_float
-{
-  float one_field;
-  int second_field;
-  float third_field;
-};
-
-struct one_float_one_int_one_float
-return_one_float_one_int_one_float (struct one_float_one_int_one_float value)
-{
-  return value;
-}
-
-struct one_double_two_float
-{
-  double one_field;
-  float second_field;
-  float third_field;
-};
-
-struct one_double_two_float
-return_one_double_two_float (struct one_double_two_float value)
-{
-  return value;
-}
-
-struct two_double
-{
-  double first_field;
-  double second_field;
-};
-
-struct two_double
-return_two_double (struct two_double value)
-{
-  return value;
-}
-
-struct two_float
-{
-  float first_field;
-  float second_field;
-};
-
-struct two_float
-return_two_float (struct two_float value)
-{
-  return value;
-}
-
-struct one_int_one_double_packed
-{
-  int first_field;
-  double second_field;
-} __attribute__((__packed__));
-
-struct one_int_one_double_packed
-return_one_int_one_double_packed (struct one_int_one_double_packed value)
-{
-  return value;
-}
-
-struct one_int_one_long
-{
-  int first_field;
-  long second_field;
-};
-
-struct one_int_one_long
-return_one_int_one_long (struct one_int_one_long value)
-{
-  return value;
-}
-
-struct one_pointer
-{
-  char *first_field;
-};
-
-struct one_pointer
-return_one_pointer (struct one_pointer value)
-{
-  return value;
-}
-
-struct two_pointer
-{
-  char *first_field;
-  char *second_field;
-};
-
-struct two_pointer
-return_two_pointer (struct two_pointer value)
-{
-  return value;
-}
-
-struct one_float_one_pointer
-{
-  float first_field;
-  char *second_field;
-};
-
-struct one_float_one_pointer
-return_one_float_one_pointer (struct one_float_one_pointer value)
-{
-  return value;
-}
-
-struct one_int_one_pointer
-{
-  int first_field;
-  char *second_field;
-};
-
-struct one_int_one_pointer
-return_one_int_one_pointer (struct one_int_one_pointer value)
-{
-  return value;
-}
-
-struct base_one_char {
-  char c;
-};
-
-struct nested_one_float_three_base {
-  float f;
-  struct base_one_char b1;
-  struct base_one_char b2;
-  struct base_one_char b3;
-}; // returned in RAX for both SysV and Windows
-
-struct nested_one_float_three_base
-return_nested_one_float_three_base (struct nested_one_float_three_base value)
-{
-  return value;
-}
-
-struct double_nested_one_float_one_nested {
-  float f;
-  struct nested_one_float_three_base ns;
-}; // SysV-ABI: returned in XMM0 + RAX
-// Windows-ABI: returned in memory
-
-struct double_nested_one_float_one_nested
-return_double_nested_one_float_one_nested(struct double_nested_one_float_one_nested value)
-{
-  return value;
-}
-
-struct base_float_struct {
-  float f1;
-  float f2;
-};
-
-struct nested_float_struct {
-  double d;
-  struct base_float_struct bfs;
-}; // SysV-ABI: return in xmm0 + xmm1
-// Windows-ABI: returned in memory
-
-struct nested_float_struct
-return_nested_float_struct (struct nested_float_struct value)
-{
-  return value;
-}
-
-struct six_double_three_int {
-  double d1;  // 8
-  double d2;  // 8
-  int i1;   // 4
-  double d3;  // 8
-  double d4;  // 8
-  int i2;   // 4
-  double d5;  // 8
-  double d6;  // 8
-  int i3;   // 4
-}; // returned in memeory on both SysV and Windows
-
-struct six_double_three_int
-return_six_double_three_int (struct six_double_three_int value) {
-  return value;
-}
-
-typedef float vector_size_float32_8 __attribute__((__vector_size__(8)));
-typedef float vector_size_float32_16 __attribute__((__vector_size__(16)));
-typedef float vector_size_float32_32 __attribute__((__vector_size__(32)));
-
-typedef float ext_vector_size_float32_2 __attribute__((ext_vector_type(2)));
-typedef float ext_vector_size_float32_4 __attribute__((ext_vector_type(4)));
-typedef float ext_vector_size_float32_8 __attribute__((ext_vector_type(8)));
-
-vector_size_float32_8
-return_vector_size_float32_8 (vector_size_float32_8 value)
-{
-    return value;
-}
-
-vector_size_float32_16
-return_vector_size_float32_16 (vector_size_float32_16 value)
-{
-    return value;
-}
-
-vector_size_float32_32
-return_vector_size_float32_32 (vector_size_float32_32 value)
-{
-    return value;
-}
-
-ext_vector_size_float32_2
-return_ext_vector_size_float32_2 (ext_vector_size_float32_2 value)
-{
-    return value;
-}
-
-ext_vector_size_float32_4
-return_ext_vector_size_float32_4 (ext_vector_size_float32_4 value)
-{
-    return value;
-}
-
-ext_vector_size_float32_8
-return_ext_vector_size_float32_8 (ext_vector_size_float32_8 value)
-{
-    return value;
-}
-
-class base_class_one_char {
-public:
-  char c = '!';
-}; // returned in RAX for both ABI
-
-base_class_one_char
-return_base_class_one_char(base_class_one_char value) {
-  return value;
-}
-
-class nested_class_float_and_base {
-public:
-  float f = 0.1;
-  base_class_one_char b;
-}; // returned in RAX for both ABI
-
-nested_class_float_and_base
-return_nested_class_float_and_base(nested_class_float_and_base value) {
-  return value;
-}
-
-class double_nested_class_float_and_nested {
-public:
-  float f = 0.2;
-  nested_class_float_and_base n;
-}; // SysV-ABI: returned in XMM0 + RAX
-// Windows-ABI: returned in memory
-
-double_nested_class_float_and_nested
-return_double_nested_class_float_and_nested(
-    double_nested_class_float_and_nested value) {
-  return value;
-}
-
-class base_class {
-public:
-  base_class() {
-    c = 'a';
-    c2 = 'b';
-  }
-private:
-  char c;
-protected:
-  char c2;
-}; // returned in RAX for both ABI
-
-base_class
-return_base_class(base_class value) {
-  return value;
-}
-
-class sub_class : base_class {
-public:
-  sub_class() {
-    c2 = '&';
-    i = 10;
-  }
-private:
-  int i;
-}; // size 8; should be returned in RAX
-// Since it's in register, lldb won't be able to get the
-// fields in base class, expected to fail.
-
-sub_class
-return_sub_class(sub_class value) {
-  return value;
-}
-
-class abstract_class {
-public:
-  virtual char getChar() = 0;
-private:
-  int i = 8;
-protected:
-  char c = '!';
-};
-
-class derived_class : abstract_class {
-public:
-  derived_class() {
-    c = '?';
-  }
-  char getChar() {
-    return this->c;
-  }
-private:
-  char c2 = '$';
-}; // size: 16; contains non POD member, returned in memory
-
-derived_class
-return_derived_class(derived_class value) {
-  return value;
-}
-
-int 
-main ()
-{
-  int first_int = 123456;
-  int second_int = 234567;
-
-  outer_sint (first_int);
-  outer_sint (second_int);
-
-  float first_float_value = 12.34;
-  float second_float_value = 23.45;
-
-  outer_float (first_float_value);
-  outer_float (second_float_value);
-
-  double double_value = -23.45;
-
-  return_double (double_value);
-
-  return_pointer(g_first_pointer);
-
-  long double long_double_value = -3456789.987654321;
-
-  return_long_double (long_double_value);
-
-  // Okay, now the structures:
-  return_one_int ((struct one_int) {10});
-  return_two_int ((struct two_int) {10, 20});
-  return_three_int ((struct three_int) {10, 20, 30});
-  return_four_int ((struct four_int) {10, 20, 30, 40});
-  return_five_int ((struct five_int) {10, 20, 30, 40, 50});
-
-  return_two_double ((struct two_double) {10.0, 20.0});
-  return_one_double_two_float ((struct one_double_two_float) {10.0, 20.0, 30.0});
-  return_one_int_one_float_one_int ((struct one_int_one_float_one_int) {10, 20.0, 30});
-
-  return_one_pointer ((struct one_pointer) {g_first_pointer});
-  return_two_pointer ((struct two_pointer) {g_first_pointer, g_second_pointer});
-  return_one_float_one_pointer ((struct one_float_one_pointer) {10.0, g_first_pointer});
-  return_one_int_one_pointer ((struct one_int_one_pointer) {10, g_first_pointer});
-  return_three_short_one_float ((struct three_short_one_float) {10, 20, 30, 40.0});
-
-  return_one_int_one_double ((struct one_int_one_double) {10, 20.0});
-  return_one_int_one_double_one_int ((struct one_int_one_double_one_int) {10, 20.0, 30});
-  return_one_short_one_double_one_short ((struct one_short_one_double_one_short) {10, 20.0, 30});
-  return_one_float_one_int_one_float ((struct one_float_one_int_one_float) {10.0, 20, 30.0});
-  return_two_float ((struct two_float) { 10.0, 20.0});
-  return_one_int_one_double_packed ((struct one_int_one_double_packed) {10, 20.0});
-  return_one_int_one_long ((struct one_int_one_long) {10, 20});
-
-  return_nested_one_float_three_base((struct nested_one_float_three_base) {
-                                        10.0,
-                                        (struct base_one_char) {
-                                          'x'
-                                        },
-                                        (struct base_one_char) {
-                                          'y'
-                                        },
-                                        (struct base_one_char) {
-                                          'z'
-                                        }
-                                      });
-  return_double_nested_one_float_one_nested((struct double_nested_one_float_one_nested) {
-                                              10.0,
-                                              (struct nested_one_float_three_base) {
-                                                20.0,
-                                                (struct base_one_char) {
-                                                  'x'
-                                                },
-                                                (struct base_one_char) {
-                                                  'y'
-                                                },
-                                                (struct base_one_char) {
-                                                  'z'
-                                                }
-                                              }});
-  return_nested_float_struct((struct nested_float_struct) {
-                                10.0,
-                                (struct base_float_struct) {
-                                  20.0,
-                                  30.0
-                                }});
-  return_six_double_three_int((struct six_double_three_int) {
-                                10.0, 20.0, 1, 30.0, 40.0, 2, 50.0, 60.0, 3});
-
-  return_base_class_one_char(base_class_one_char());
-  return_nested_class_float_and_base(nested_class_float_and_base());
-  return_double_nested_class_float_and_nested(double_nested_class_float_and_nested());
-  return_base_class(base_class());
-  // this is expected to fail
-  return_sub_class(sub_class());
-  return_derived_class(derived_class());
-
-  return_vector_size_float32_8 (( vector_size_float32_8 ){1.5, 2.25});
-  return_vector_size_float32_16 (( vector_size_float32_16 ){1.5, 2.25, 4.125, 8.0625});
-  return_vector_size_float32_32 (( vector_size_float32_32 ){1.5, 2.25, 4.125, 8.0625, 7.89, 8.52, 6.31, 9.12});
-
-  return_ext_vector_size_float32_2 ((ext_vector_size_float32_2){ 16.5, 32.25});
-  return_ext_vector_size_float32_4 ((ext_vector_size_float32_4){ 16.5, 32.25, 64.125, 128.0625});
-  return_ext_vector_size_float32_8 ((ext_vector_size_float32_8){ 16.5, 32.25, 64.125, 128.0625, 1.59, 3.57, 8.63, 9.12 });
-
-  return 0; 
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/set-data/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/set-data/Makefile
deleted file mode 100644 (file)
index 37dd8f4..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-OBJC_SOURCES := main.m
-
-
-
-LD_EXTRAS := -framework Foundation
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/set-data/TestSetData.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/set-data/TestSetData.py
deleted file mode 100644 (file)
index 5b0a7bd..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-"""
-Set the contents of variables and registers using raw data
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class SetDataTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    def test_set_data(self):
-        """Test setting the contents of variables and registers using raw data."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("br s -p First")
-        self.runCmd("br s -p Second")
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.expect("p myFoo.x", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['2'])
-
-        process = self.dbg.GetSelectedTarget().GetProcess()
-        frame = process.GetSelectedThread().GetFrameAtIndex(0)
-
-        x = frame.FindVariable("myFoo").GetChildMemberWithName("x")
-
-        my_data = lldb.SBData.CreateDataFromSInt32Array(
-            lldb.eByteOrderLittle, 8, [4])
-        err = lldb.SBError()
-
-        self.assertTrue(x.SetData(my_data, err))
-
-        self.runCmd("continue")
-
-        self.expect("p myFoo.x", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['4'])
-
-        frame = process.GetSelectedThread().GetFrameAtIndex(0)
-
-        x = frame.FindVariable("string")
-
-        if process.GetAddressByteSize() == 8:
-            my_data = lldb.SBData.CreateDataFromUInt64Array(
-                process.GetByteOrder(), 8, [0])
-        else:
-            my_data = lldb.SBData.CreateDataFromUInt32Array(
-                process.GetByteOrder(), 4, [0])
-
-        err = lldb.SBError()
-
-        self.assertTrue(x.SetData(my_data, err))
-
-        self.expect(
-            "fr var -d run-target string",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                'NSString *',
-                'nil'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/set-data/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/set-data/main.m
deleted file mode 100644 (file)
index e1e69dc..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#import <Foundation/Foundation.h>
-
-int main ()
-{
-    @autoreleasepool
-    {
-        struct foo {
-            int x;
-            int y;
-        } myFoo;
-
-        myFoo.x = 2;
-        myFoo.y = 3;    // First breakpoint
-
-        NSString *string = [NSString stringWithFormat:@"%s", "Hello world!"];
-
-        NSLog(@"%d %@", myFoo.x, string); // Second breakpoint
-    }
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/show_location/TestShowLocationDwarf5.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/show_location/TestShowLocationDwarf5.py
deleted file mode 100644 (file)
index 1d4bc6f..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-
-# This test checks that source code location is shown correctly
-# when DWARF5 debug information is used.
-
-class TestTargetSourceMap(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIf(archs="aarch64", oslist="linux",
-            bugnumber="https://bugs.llvm.org/show_bug.cgi?id=44180")
-    def test_source_map(self):
-        # Set the target soure map to map "./" to the current test directory.
-        yaml_path = os.path.join(self.getSourceDir(), "a.yaml")
-        yaml_base, ext = os.path.splitext(yaml_path)
-        obj_path = self.getBuildArtifact(yaml_base)
-        self.yaml2obj(yaml_path, obj_path)
-
-        def cleanup():
-            if os.path.exists(obj_path):
-                os.unlink(obj_path)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        # Create a target with the object file we just created from YAML
-        target = self.dbg.CreateTarget(obj_path)
-
-        # Check we are able to show the locations properly.
-        self.expect("b main", VALID_BREAKPOINT_LOCATION,
-                    substrs=['main + 13 at test.cpp:2:3, address = 0x000000000040052d'])
-
-        self.expect("b foo", VALID_BREAKPOINT_LOCATION,
-                    substrs=['foo() + 4 at test.cpp:6:1, address = 0x0000000000400534'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/show_location/a.yaml b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/show_location/a.yaml
deleted file mode 100644 (file)
index 27b119d..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-# This file is a shorten version of the output
-# produced with the following invocations and input:
-# ./clang test.cpp -g -gdwarf-5 -o test.exe
-# ./obj2yaml test.exe > test.yaml
-#
-# // test.cpp
-# int main() {
-#   return 0;
-# }
-# 
-# void foo() {
-# }
-
---- !ELF
-FileHeader:      
-  Class:           ELFCLASS64
-  Data:            ELFDATA2LSB
-  Type:            ET_EXEC
-  Machine:         EM_X86_64
-  Entry:           0x0000000000400440
-Sections:        
-  - Name:            .text
-    Type:            SHT_PROGBITS
-    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
-    Address:         0x0000000000400440
-    AddressAlign:    0x0000000000000010
-    Content:         31ED4989D15E4889E24883E4F0505449C7C0B005400048C7C14005400048C7C720054000E8B7FFFFFFF4660F1F44000055B820204000483D202040004889E57417B8000000004885C0740D5DBF20204000FFE00F1F4400005DC3660F1F440000BE20204000554881EE202040004889E548C1FE034889F048C1E83F4801C648D1FE7415B8000000004885C0740B5DBF20204000FFE00F1F005DC3660F1F440000803D391B0000007517554889E5E87EFFFFFFC605271B0000015DC30F1F440000F3C30F1F4000662E0F1F840000000000554889E55DEB89660F1F840000000000554889E531C0C745FC000000005DC390554889E55DC3662E0F1F840000000000415741564189FF415541544C8D25B618000055488D2DB6180000534989F64989D54C29E54883EC0848C1FD03E87FFEFFFF4885ED742031DB0F1F8400000000004C89EA4C89F64489FF41FF14DC4883C3014839EB75EA4883C4085B5D415C415D415E415FC390662E0F1F840000000000F3C3
-  - Name:            .debug_str_offsets
-    Type:            SHT_PROGBITS
-    AddressAlign:    0x0000000000000001
-    Content:         200000000500000000000000230000002C0000004A0000004F000000530000005B000000
-  - Name:            .debug_str
-    Type:            SHT_PROGBITS
-    Flags:           [ SHF_MERGE, SHF_STRINGS ]
-    AddressAlign:    0x0000000000000001
-    Content:         636C616E672076657273696F6E20382E302E3020287472756E6B203334313935382900746573742E637070002F686F6D652F756D622F4C4C564D2F6275696C645F6C6C64622F62696E006D61696E00696E74005F5A33666F6F7600666F6F00
-  - Name:            .debug_abbrev
-    Type:            SHT_PROGBITS
-    AddressAlign:    0x0000000000000001
-    Content:         011101252513050325721710171B25110112060000022E0011011206401803253A0B3B0B49133F190000032E001101120640186E2503253A0B3B0B3F19000004240003253E0B0B0B000000
-  - Name:            .debug_info
-    Type:            SHT_PROGBITS
-    AddressAlign:    0x0000000000000001
-    Content:         50000000050001080000000001000400010800000000000000022005400000000000160000000220054000000000000F00000001560301014F000000033005400000000000060000000156050601050404050400
-  - Name:            .debug_macinfo
-    Type:            SHT_PROGBITS
-    AddressAlign:    0x0000000000000001
-    Content:         '00'
-  - Name:            .debug_line
-    Type:            SHT_PROGBITS
-    AddressAlign:    0x0000000000000001
-    Content:         70000000050008004C000000010101FB0E0D00010101010000000100000101011F010000000003011F020F051E021E00000000FD7C0F2E46BA561F7BDA351B04E677091E00000000FD7C0F2E46BA561F7BDA351B04E6770900090220054000000000000105030AC905003F05010A4B0202000101
-  - Name:            .debug_line_str
-    Type:            SHT_PROGBITS
-    Flags:           [ SHF_MERGE, SHF_STRINGS ]
-    AddressAlign:    0x0000000000000001
-    Content:         2F686F6D652F756D622F4C4C564D2F6275696C645F6C6C64622F62696E00746573742E63707000
-...
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/TestSendSignal.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/TestSendSignal.py
deleted file mode 100644 (file)
index ca268af..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-"""Test that lldb command 'process signal SIGUSR1' to send a signal to the inferior works."""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class SendSignalTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line = line_number('main.c', 'Put breakpoint here')
-
-    @expectedFailureAll(
-        oslist=['freebsd'],
-        bugnumber="llvm.org/pr23318: does not report running state")
-    @expectedFailureNetBSD(bugnumber='llvm.org/pr43959')
-    @skipIfWindows  # Windows does not support signals
-    def test_with_run_command(self):
-        """Test that lldb command 'process signal SIGUSR1' sends a signal to the inferior process."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create a breakpoint on main.c by name 'c'.
-        breakpoint = target.BreakpointCreateByLocation('main.c', self.line)
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        # Get the breakpoint location from breakpoint after we verified that,
-        # indeed, it has one location.
-        location = breakpoint.GetLocationAtIndex(0)
-        self.assertTrue(location and
-                        location.IsEnabled(),
-                        VALID_BREAKPOINT_LOCATION)
-
-        # Now launch the process, no arguments & do not stop at entry point.
-        launch_info = lldb.SBLaunchInfo([exe])
-        launch_info.SetWorkingDirectory(self.get_process_working_directory())
-
-        process_listener = lldb.SBListener("signal_test_listener")
-        launch_info.SetListener(process_listener)
-        error = lldb.SBError()
-        process = target.Launch(launch_info, error)
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        self.runCmd("process handle -n False -p True -s True SIGUSR1")
-
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(thread.IsValid(), "We hit the first breakpoint.")
-
-        # After resuming the process, send it a SIGUSR1 signal.
-
-        self.setAsync(True)
-
-        self.assertTrue(
-            process_listener.IsValid(),
-            "Got a good process listener")
-
-        # Disable our breakpoint, we don't want to hit it anymore...
-        breakpoint.SetEnabled(False)
-
-        # Now continue:
-        process.Continue()
-
-        # If running remote test, there should be a connected event
-        if lldb.remote_platform:
-            self.match_state(process_listener, lldb.eStateConnected)
-
-        self.match_state(process_listener, lldb.eStateRunning)
-
-        # Now signal the process, and make sure it stops:
-        process.Signal(lldbutil.get_signal_number('SIGUSR1'))
-
-        self.match_state(process_listener, lldb.eStateStopped)
-
-        # Now make sure the thread was stopped with a SIGUSR1:
-        threads = lldbutil.get_stopped_threads(process, lldb.eStopReasonSignal)
-        self.assertTrue(len(threads) == 1, "One thread stopped for a signal.")
-        thread = threads[0]
-
-        self.assertTrue(
-            thread.GetStopReasonDataCount() >= 1,
-            "There was data in the event.")
-        self.assertTrue(
-            thread.GetStopReasonDataAtIndex(0) == lldbutil.get_signal_number('SIGUSR1'),
-            "The stop signal was SIGUSR1")
-
-    def match_state(self, process_listener, expected_state):
-        num_seconds = 5
-        broadcaster = self.process().GetBroadcaster()
-        event_type_mask = lldb.SBProcess.eBroadcastBitStateChanged
-        event = lldb.SBEvent()
-        got_event = process_listener.WaitForEventForBroadcasterWithType(
-            num_seconds, broadcaster, event_type_mask, event)
-        self.assertTrue(got_event, "Got an event")
-        state = lldb.SBProcess.GetStateFromEvent(event)
-        self.assertTrue(state == expected_state,
-                        "It was the %s state." %
-                        lldb.SBDebugger_StateAsCString(expected_state))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-abrt/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-abrt/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-abrt/TestHandleAbort.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-abrt/TestHandleAbort.py
deleted file mode 100644 (file)
index 5f3eb31..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-"""Test that we can unwind out of a SIGABRT handler"""
-
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class HandleAbortTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @skipIfWindows  # signals do not exist on Windows
-    @expectedFailureNetBSD
-    def test_inferior_handle_sigabrt(self):
-        """Inferior calls abort() and handles the resultant SIGABRT.
-           Stopped at a breakpoint in the handler, verify that the backtrace
-           includes the function that called abort()."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # launch
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-        self.assertEqual(process.GetState(), lldb.eStateStopped)
-        signo = process.GetUnixSignals().GetSignalNumberFromName("SIGABRT")
-
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonSignal)
-        self.assertTrue(
-            thread and thread.IsValid(),
-            "Thread should be stopped due to a signal")
-        self.assertTrue(
-            thread.GetStopReasonDataCount() >= 1,
-            "There should be data in the event.")
-        self.assertEqual(thread.GetStopReasonDataAtIndex(0),
-                         signo, "The stop signal should be SIGABRT")
-
-        # Continue to breakpoint in abort handler
-        bkpt = target.FindBreakpointByID(
-            lldbutil.run_break_set_by_source_regexp(self, "Set a breakpoint here"))
-        threads = lldbutil.continue_to_breakpoint(process, bkpt)
-        self.assertEqual(len(threads), 1, "Expected single thread")
-        thread = threads[0]
-
-        # Expect breakpoint in 'handler'
-        frame = thread.GetFrameAtIndex(0)
-        self.assertEqual(frame.GetDisplayFunctionName(), "handler", "Unexpected break?")
-
-        # Expect that unwinding should find 'abort_caller'
-        foundFoo = False
-        for frame in thread:
-            if frame.GetDisplayFunctionName() == "abort_caller":
-                foundFoo = True
-
-        self.assertTrue(foundFoo, "Unwinding did not find func that called abort")
-
-        # Continue until we exit.
-        process.Continue()
-        self.assertEqual(process.GetState(), lldb.eStateExited)
-        self.assertEqual(process.GetExitStatus(), 0)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-abrt/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-abrt/main.c
deleted file mode 100644 (file)
index c2daea1..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-void handler(int sig)
-{
-    printf("Set a breakpoint here.\n");
-    exit(0);
-}
-
-void abort_caller() {
-    abort();
-}
-
-int main()
-{
-    if (signal(SIGABRT, handler) == SIG_ERR)
-    {
-        perror("signal");
-        return 1;
-    }
-
-    abort_caller();
-    return 2;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/TestHandleSegv.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/TestHandleSegv.py
deleted file mode 100644 (file)
index 30ae201..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-"""Test that we can debug inferiors that handle SIGSEGV by themselves"""
-
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class HandleSegvTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfWindows  # signals do not exist on Windows
-    @skipIfDarwin
-    @expectedFailureNetBSD
-    def test_inferior_handle_sigsegv(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # launch
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-        self.assertEqual(process.GetState(), lldb.eStateStopped)
-        signo = process.GetUnixSignals().GetSignalNumberFromName("SIGSEGV")
-
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonSignal)
-        self.assertTrue(
-            thread and thread.IsValid(),
-            "Thread should be stopped due to a signal")
-        self.assertTrue(
-            thread.GetStopReasonDataCount() >= 1,
-            "There was data in the event.")
-        self.assertEqual(thread.GetStopReasonDataAtIndex(0),
-                         signo, "The stop signal was SIGSEGV")
-
-        # Continue until we exit.
-        process.Continue()
-        self.assertEqual(process.GetState(), lldb.eStateExited)
-        self.assertEqual(process.GetExitStatus(), 0)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/main.c
deleted file mode 100644 (file)
index 27d9b8e..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#include <sys/mman.h>
-#include <signal.h>
-#include <stdio.h>
-#include <unistd.h>
-
-enum {
-    kMmapSize = 0x1000,
-    kMagicValue = 47,
-};
-
-void *address;
-volatile sig_atomic_t signaled = 0;
-
-void handler(int sig)
-{
-    signaled = 1;
-    if (munmap(address, kMmapSize) != 0)
-    {
-        perror("munmap");
-        _exit(5);
-    }
-
-    void* newaddr = mmap(address, kMmapSize, PROT_READ | PROT_WRITE,
-            MAP_ANON | MAP_FIXED | MAP_PRIVATE, -1, 0);
-    if (newaddr != address)
-    {
-        fprintf(stderr, "Newly mmaped address (%p) does not equal old address (%p).\n",
-                newaddr, address);
-        _exit(6);
-    }
-    *(int*)newaddr = kMagicValue;
-}
-
-int main()
-{
-    if (signal(SIGSEGV, handler) == SIG_ERR)
-    {
-        perror("signal");
-        return 1;
-    }
-
-    address = mmap(NULL, kMmapSize, PROT_NONE, MAP_ANON | MAP_PRIVATE, -1, 0);
-    if (address == MAP_FAILED)
-    {
-        perror("mmap");
-        return 2;
-    }
-
-    // This should first trigger a segfault. Our handler will make the memory readable and write
-    // the magic value into memory.
-    if (*(int*)address != kMagicValue)
-        return 3;
-
-    if (! signaled)
-        return 4;
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/main.c
deleted file mode 100644 (file)
index 77e7605..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#include <signal.h>
-#include <stdio.h>
-#include <unistd.h>
-
-void handler_usr1 (int i)
-{
-  puts ("got signal usr1");
-}
-
-void handler_alrm (int i)
-{
-  puts ("got signal ALRM");
-}
-
-int main ()
-{
-  int i = 0;
-
-  signal (SIGUSR1, handler_usr1);
-  signal (SIGALRM, handler_alrm);
-
-  puts ("Put breakpoint here");
-
-  while (i++ < 20)
-     sleep (1);
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/raise/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/raise/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/raise/TestRaise.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/raise/TestRaise.py
deleted file mode 100644 (file)
index 70271e4..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-"""Test that we handle inferiors that send signals to themselves"""
-
-
-
-import lldb
-import re
-from lldbsuite.test.lldbplatformutil import getDarwinOSTriples
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-@skipIfWindows  # signals do not exist on Windows
-class RaiseTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @skipIfNetBSD  # Hangs on NetBSD
-    def test_sigstop(self):
-        self.build()
-        self.signal_test('SIGSTOP', False)
-        # passing of SIGSTOP is not correctly handled, so not testing that
-        # scenario: https://llvm.org/bugs/show_bug.cgi?id=23574
-
-    @skipIfDarwin  # darwin does not support real time signals
-    @skipIfTargetAndroid()
-    def test_sigsigrtmin(self):
-        self.build()
-        self.signal_test('SIGRTMIN', True)
-
-    @skipIfNetBSD  # Hangs on NetBSD
-    def test_sigtrap(self):
-        self.build()
-        self.signal_test('SIGTRAP', True)
-
-    def launch(self, target, signal):
-        # launch the process, do not stop at entry point.
-        process = target.LaunchSimple(
-            [signal], None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-        self.assertEqual(process.GetState(), lldb.eStateStopped)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "Thread should be stopped due to a breakpoint")
-        return process
-
-    def set_handle(self, signal, pass_signal, stop_at_signal, notify_signal):
-        return_obj = lldb.SBCommandReturnObject()
-        self.dbg.GetCommandInterpreter().HandleCommand(
-            "process handle %s -p %s -s %s -n %s" %
-            (signal, pass_signal, stop_at_signal, notify_signal), return_obj)
-        self.assertTrue(
-            return_obj.Succeeded(),
-            "Setting signal handling failed")
-
-    def signal_test(self, signal, test_passing):
-        """Test that we handle inferior raising signals"""
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-        lldbutil.run_break_set_by_symbol(self, "main")
-
-        # launch
-        process = self.launch(target, signal)
-        signo = process.GetUnixSignals().GetSignalNumberFromName(signal)
-
-        # retrieve default signal disposition
-        return_obj = lldb.SBCommandReturnObject()
-        self.dbg.GetCommandInterpreter().HandleCommand(
-            "process handle %s " % signal, return_obj)
-        match = re.match(
-            'NAME *PASS *STOP *NOTIFY.*(false|true) *(false|true) *(false|true)',
-            return_obj.GetOutput(),
-            re.IGNORECASE | re.DOTALL)
-        if not match:
-            self.fail('Unable to retrieve default signal disposition.')
-        default_pass = match.group(1)
-        default_stop = match.group(2)
-        default_notify = match.group(3)
-
-        # Make sure we stop at the signal
-        self.set_handle(signal, "false", "true", "true")
-        process.Continue()
-        self.assertEqual(process.GetState(), lldb.eStateStopped)
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonSignal)
-        self.assertTrue(
-            thread.IsValid(),
-            "Thread should be stopped due to a signal")
-        self.assertTrue(
-            thread.GetStopReasonDataCount() >= 1,
-            "There was data in the event.")
-        self.assertEqual(thread.GetStopReasonDataAtIndex(0), signo,
-                         "The stop signal was %s" % signal)
-
-        # Continue until we exit.
-        process.Continue()
-        self.assertEqual(process.GetState(), lldb.eStateExited)
-        self.assertEqual(process.GetExitStatus(), 0)
-
-        # launch again
-        process = self.launch(target, signal)
-
-        # Make sure we do not stop at the signal. We should still get the
-        # notification.
-        self.set_handle(signal, "false", "false", "true")
-        self.expect(
-            "process continue",
-            substrs=[
-                "stopped and restarted",
-                signal])
-        self.assertEqual(process.GetState(), lldb.eStateExited)
-        self.assertEqual(process.GetExitStatus(), 0)
-
-        # launch again
-        process = self.launch(target, signal)
-
-        # Make sure we do not stop at the signal, and we do not get the
-        # notification.
-        self.set_handle(signal, "false", "false", "false")
-        self.expect(
-            "process continue",
-            substrs=["stopped and restarted"],
-            matching=False)
-        self.assertEqual(process.GetState(), lldb.eStateExited)
-        self.assertEqual(process.GetExitStatus(), 0)
-
-        if not test_passing:
-            # reset signal handling to default
-            self.set_handle(signal, default_pass, default_stop, default_notify)
-            return
-
-        # launch again
-        process = self.launch(target, signal)
-
-        # Make sure we stop at the signal
-        self.set_handle(signal, "true", "true", "true")
-        process.Continue()
-        self.assertEqual(process.GetState(), lldb.eStateStopped)
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonSignal)
-        self.assertTrue(
-            thread.IsValid(),
-            "Thread should be stopped due to a signal")
-        self.assertTrue(
-            thread.GetStopReasonDataCount() >= 1,
-            "There was data in the event.")
-        self.assertEqual(
-            thread.GetStopReasonDataAtIndex(0),
-            process.GetUnixSignals().GetSignalNumberFromName(signal),
-            "The stop signal was %s" %
-            signal)
-
-        # Continue until we exit. The process should receive the signal.
-        process.Continue()
-        self.assertEqual(process.GetState(), lldb.eStateExited)
-        self.assertEqual(process.GetExitStatus(), signo)
-
-        # launch again
-        process = self.launch(target, signal)
-
-        # Make sure we do not stop at the signal. We should still get the notification. Process
-        # should receive the signal.
-        self.set_handle(signal, "true", "false", "true")
-        self.expect(
-            "process continue",
-            substrs=[
-                "stopped and restarted",
-                signal])
-        self.assertEqual(process.GetState(), lldb.eStateExited)
-        self.assertEqual(process.GetExitStatus(), signo)
-
-        # launch again
-        process = self.launch(target, signal)
-
-        # Make sure we do not stop at the signal, and we do not get the notification. Process
-        # should receive the signal.
-        self.set_handle(signal, "true", "false", "false")
-        self.expect(
-            "process continue",
-            substrs=["stopped and restarted"],
-            matching=False)
-        self.assertEqual(process.GetState(), lldb.eStateExited)
-        self.assertEqual(process.GetExitStatus(), signo)
-
-        # reset signal handling to default
-        self.set_handle(signal, default_pass, default_stop, default_notify)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/raise/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/signal/raise/main.c
deleted file mode 100644 (file)
index 4203fe5..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-#include <signal.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-
-void handler(int signo)
-{
-    _exit(signo);
-}
-
-int main (int argc, char *argv[])
-{
-    if (signal(SIGTRAP, handler) == SIG_ERR)
-    {
-        perror("signal(SIGTRAP)");
-        return 1;
-    }
-#ifndef __APPLE__
-    // Real time signals not supported on apple platforms.
-    if (signal(SIGRTMIN, handler) == SIG_ERR)
-    {
-        perror("signal(SIGRTMIN)");
-        return 1;
-    }
-#endif
-
-    if (argc < 2)
-    {
-        puts("Please specify a signal to raise");
-        return 1;
-    }
-
-    if (strcmp(argv[1], "SIGSTOP") == 0)
-        raise(SIGSTOP);
-    else if (strcmp(argv[1], "SIGTRAP") == 0)
-        raise(SIGTRAP);
-#ifndef __APPLE__
-    else if (strcmp(argv[1], "SIGRTMIN") == 0)
-        raise(SIGRTMIN);
-#endif
-    else
-    {
-        printf("Unknown signal: %s\n", argv[1]);
-        return 1;
-    }
-
-    return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/source-map/TestTargetSourceMap.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/source-map/TestTargetSourceMap.py
deleted file mode 100644 (file)
index 80c4877..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-
-
-class TestTargetSourceMap(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    def test_source_map(self):
-        """Test target.source-map' functionality."""
-        # Set the target soure map to map "./" to the current test directory
-        src_dir = self.getSourceDir()
-        src_path = os.path.join(src_dir, "main.c")
-        yaml_path = os.path.join(src_dir, "a.yaml")
-        yaml_base, ext = os.path.splitext(yaml_path)
-        obj_path = self.getBuildArtifact("main.o")
-        self.yaml2obj(yaml_path, obj_path)
-
-        # Create a target with the object file we just created from YAML
-        target = self.dbg.CreateTarget(obj_path)
-
-        # Set a breakpoint before we remap source and verify that it fails
-        bp = target.BreakpointCreateByLocation(src_path, 2)
-        self.assertTrue(bp.GetNumLocations() == 0,
-                        "make sure no breakpoints were resolved without map")
-        src_map_cmd = 'settings set target.source-map . "%s"' % (src_dir)
-        self.dbg.HandleCommand(src_map_cmd)
-
-        # Set a breakpoint after we remap source and verify that it succeeds
-        bp = target.BreakpointCreateByLocation(src_path, 2)
-        self.assertTrue(bp.GetNumLocations() == 1,
-                        "make sure breakpoint was resolved with map")
-
-        # Now make sure that we can actually FIND the source file using this
-        # remapping:
-        retval = lldb.SBCommandReturnObject()
-        self.dbg.GetCommandInterpreter().HandleCommand("source list -f main.c -l 2", retval)
-        self.assertTrue(retval.Succeeded(), "source list didn't succeed.")
-        self.assertTrue(retval.GetOutput() != None, "We got no ouput from source list")
-        self.assertTrue("return" in retval.GetOutput(), "We didn't find the source file...")
-        
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/source-map/Trivial/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/source-map/Trivial/main.c
deleted file mode 100644 (file)
index 9219072..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-int main()
-{
-  return 0;
-}
-int main () {
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/source-map/a.yaml b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/source-map/a.yaml
deleted file mode 100644 (file)
index d14e9a3..0000000
+++ /dev/null
@@ -1,410 +0,0 @@
---- !mach-o
-FileHeader:      
-  magic:           0xFEEDFACF
-  cputype:         0x01000007
-  cpusubtype:      0x00000003
-  filetype:        0x00000001
-  ncmds:           4
-  sizeofcmds:      1160
-  flags:           0x00002000
-  reserved:        0x00000000
-LoadCommands:    
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         1032
-    segname:         ''
-    vmaddr:          0
-    vmsize:          744
-    fileoff:         1192
-    filesize:        744
-    maxprot:         7
-    initprot:        7
-    nsects:          12
-    flags:           0
-    Sections:        
-      - sectname:        __text
-        segname:         __TEXT
-        addr:            0x0000000000000000
-        size:            22
-        offset:          0x000004A8
-        align:           4
-        reloff:          0x00000000
-        nreloc:          0
-        flags:           0x80000400
-        reserved1:       0x00000000
-        reserved2:       0x00000000
-        reserved3:       0x00000000
-      - sectname:        __debug_str
-        segname:         __DWARF
-        addr:            0x0000000000000016
-        size:            108
-        offset:          0x000004BE
-        align:           0
-        reloff:          0x00000000
-        nreloc:          0
-        flags:           0x02000000
-        reserved1:       0x00000000
-        reserved2:       0x00000000
-        reserved3:       0x00000000
-      - sectname:        __debug_abbrev
-        segname:         __DWARF
-        addr:            0x0000000000000082
-        size:            83
-        offset:          0x0000052A
-        align:           0
-        reloff:          0x00000000
-        nreloc:          0
-        flags:           0x02000000
-        reserved1:       0x00000000
-        reserved2:       0x00000000
-        reserved3:       0x00000000
-      - sectname:        __debug_info
-        segname:         __DWARF
-        addr:            0x00000000000000D5
-        size:            126
-        offset:          0x0000057D
-        align:           0
-        reloff:          0x00000790
-        nreloc:          2
-        flags:           0x02000000
-        reserved1:       0x00000000
-        reserved2:       0x00000000
-        reserved3:       0x00000000
-      - sectname:        __debug_macinfo
-        segname:         __DWARF
-        addr:            0x0000000000000153
-        size:            1
-        offset:          0x000005FB
-        align:           0
-        reloff:          0x00000000
-        nreloc:          0
-        flags:           0x02000000
-        reserved1:       0x00000000
-        reserved2:       0x00000000
-        reserved3:       0x00000000
-      - sectname:        __apple_names
-        segname:         __DWARF
-        addr:            0x0000000000000154
-        size:            60
-        offset:          0x000005FC
-        align:           0
-        reloff:          0x00000000
-        nreloc:          0
-        flags:           0x02000000
-        reserved1:       0x00000000
-        reserved2:       0x00000000
-        reserved3:       0x00000000
-      - sectname:        __apple_objc
-        segname:         __DWARF
-        addr:            0x0000000000000190
-        size:            36
-        offset:          0x00000638
-        align:           0
-        reloff:          0x00000000
-        nreloc:          0
-        flags:           0x02000000
-        reserved1:       0x00000000
-        reserved2:       0x00000000
-        reserved3:       0x00000000
-      - sectname:        __apple_namespac
-        segname:         __DWARF
-        addr:            0x00000000000001B4
-        size:            36
-        offset:          0x0000065C
-        align:           0
-        reloff:          0x00000000
-        nreloc:          0
-        flags:           0x02000000
-        reserved1:       0x00000000
-        reserved2:       0x00000000
-        reserved3:       0x00000000
-      - sectname:        __apple_types
-        segname:         __DWARF
-        addr:            0x00000000000001D8
-        size:            102
-        offset:          0x00000680
-        align:           0
-        reloff:          0x00000000
-        nreloc:          0
-        flags:           0x02000000
-        reserved1:       0x00000000
-        reserved2:       0x00000000
-        reserved3:       0x00000000
-      - sectname:        __compact_unwind
-        segname:         __LD
-        addr:            0x0000000000000240
-        size:            32
-        offset:          0x000006E8
-        align:           3
-        reloff:          0x000007A0
-        nreloc:          1
-        flags:           0x02000000
-        reserved1:       0x00000000
-        reserved2:       0x00000000
-        reserved3:       0x00000000
-      - sectname:        __eh_frame
-        segname:         __TEXT
-        addr:            0x0000000000000260
-        size:            64
-        offset:          0x00000708
-        align:           3
-        reloff:          0x00000000
-        nreloc:          0
-        flags:           0x6800000B
-        reserved1:       0x00000000
-        reserved2:       0x00000000
-        reserved3:       0x00000000
-      - sectname:        __debug_line
-        segname:         __DWARF
-        addr:            0x00000000000002A0
-        size:            72
-        offset:          0x00000748
-        align:           0
-        reloff:          0x000007A8
-        nreloc:          1
-        flags:           0x02000000
-        reserved1:       0x00000000
-        reserved2:       0x00000000
-        reserved3:       0x00000000
-  - cmd:             LC_BUILD_VERSION
-    cmdsize:         24
-    platform:        1
-    minos:           658944
-    sdk:             658944
-    ntools:          0
-  - cmd:             LC_SYMTAB
-    cmdsize:         24
-    symoff:          1968
-    nsyms:           1
-    stroff:          1984
-    strsize:         8
-  - cmd:             LC_DYSYMTAB
-    cmdsize:         80
-    ilocalsym:       0
-    nlocalsym:       0
-    iextdefsym:      0
-    nextdefsym:      1
-    iundefsym:       1
-    nundefsym:       0
-    tocoff:          0
-    ntoc:            0
-    modtaboff:       0
-    nmodtab:         0
-    extrefsymoff:    0
-    nextrefsyms:     0
-    indirectsymoff:  0
-    nindirectsyms:   0
-    extreloff:       0
-    nextrel:         0
-    locreloff:       0
-    nlocrel:         0
-LinkEditData:    
-  NameList:        
-    - n_strx:          1
-      n_type:          0x0F
-      n_sect:          1
-      n_desc:          0
-      n_value:         0
-  StringTable:     
-    - ''
-    - _main
-    - ''
-DWARF:           
-  debug_str:       
-    - 'Apple LLVM version 10.0.1 (clang-1001.0.37.3)'
-    - './Trivial/main.c'
-    - '.'
-    - main
-    - int
-    - argc
-    - argv
-    - char
-  debug_abbrev:    
-    - Code:            0x00000001
-      Tag:             DW_TAG_compile_unit
-      Children:        DW_CHILDREN_yes
-      Attributes:      
-        - Attribute:       DW_AT_producer
-          Form:            DW_FORM_strp
-        - Attribute:       DW_AT_language
-          Form:            DW_FORM_data2
-        - Attribute:       DW_AT_name
-          Form:            DW_FORM_strp
-        - Attribute:       DW_AT_stmt_list
-          Form:            DW_FORM_sec_offset
-        - Attribute:       DW_AT_comp_dir
-          Form:            DW_FORM_strp
-        - Attribute:       DW_AT_low_pc
-          Form:            DW_FORM_addr
-        - Attribute:       DW_AT_high_pc
-          Form:            DW_FORM_data4
-    - Code:            0x00000002
-      Tag:             DW_TAG_subprogram
-      Children:        DW_CHILDREN_yes
-      Attributes:      
-        - Attribute:       DW_AT_low_pc
-          Form:            DW_FORM_addr
-        - Attribute:       DW_AT_high_pc
-          Form:            DW_FORM_data4
-        - Attribute:       DW_AT_frame_base
-          Form:            DW_FORM_exprloc
-        - Attribute:       DW_AT_name
-          Form:            DW_FORM_strp
-        - Attribute:       DW_AT_decl_file
-          Form:            DW_FORM_data1
-        - Attribute:       DW_AT_decl_line
-          Form:            DW_FORM_data1
-        - Attribute:       DW_AT_prototyped
-          Form:            DW_FORM_flag_present
-        - Attribute:       DW_AT_type
-          Form:            DW_FORM_ref4
-        - Attribute:       DW_AT_external
-          Form:            DW_FORM_flag_present
-    - Code:            0x00000003
-      Tag:             DW_TAG_formal_parameter
-      Children:        DW_CHILDREN_no
-      Attributes:      
-        - Attribute:       DW_AT_location
-          Form:            DW_FORM_exprloc
-        - Attribute:       DW_AT_name
-          Form:            DW_FORM_strp
-        - Attribute:       DW_AT_decl_file
-          Form:            DW_FORM_data1
-        - Attribute:       DW_AT_decl_line
-          Form:            DW_FORM_data1
-        - Attribute:       DW_AT_type
-          Form:            DW_FORM_ref4
-    - Code:            0x00000004
-      Tag:             DW_TAG_base_type
-      Children:        DW_CHILDREN_no
-      Attributes:      
-        - Attribute:       DW_AT_name
-          Form:            DW_FORM_strp
-        - Attribute:       DW_AT_encoding
-          Form:            DW_FORM_data1
-        - Attribute:       DW_AT_byte_size
-          Form:            DW_FORM_data1
-    - Code:            0x00000005
-      Tag:             DW_TAG_pointer_type
-      Children:        DW_CHILDREN_no
-      Attributes:      
-        - Attribute:       DW_AT_type
-          Form:            DW_FORM_ref4
-    - Code:            0x00000006
-      Tag:             DW_TAG_const_type
-      Children:        DW_CHILDREN_no
-      Attributes:      
-        - Attribute:       DW_AT_type
-          Form:            DW_FORM_ref4
-  debug_info:      
-    - Length:          
-        TotalLength:     122
-      Version:         4
-      AbbrOffset:      0
-      AddrSize:        8
-      Entries:         
-        - AbbrCode:        0x00000001
-          Values:          
-            - Value:           0x0000000000000000
-            - Value:           0x000000000000000C
-            - Value:           0x000000000000002E
-            - Value:           0x0000000000000000
-            - Value:           0x000000000000003F
-            - Value:           0x0000000000000000
-            - Value:           0x0000000000000016
-        - AbbrCode:        0x00000002
-          Values:          
-            - Value:           0x0000000000000000
-            - Value:           0x0000000000000016
-            - Value:           0x0000000000000001
-              BlockData:       
-                - 0x56
-            - Value:           0x0000000000000054
-            - Value:           0x0000000000000001
-            - Value:           0x0000000000000001
-            - Value:           0x0000000000000001
-            - Value:           0x0000000000000060
-            - Value:           0x0000000000000001
-        - AbbrCode:        0x00000003
-          Values:          
-            - Value:           0x0000000000000002
-              BlockData:       
-                - 0x91
-                - 0x78
-            - Value:           0x000000000000005D
-            - Value:           0x0000000000000001
-            - Value:           0x0000000000000001
-            - Value:           0x0000000000000060
-        - AbbrCode:        0x00000003
-          Values:          
-            - Value:           0x0000000000000002
-              BlockData:       
-                - 0x91
-                - 0x70
-            - Value:           0x0000000000000062
-            - Value:           0x0000000000000001
-            - Value:           0x0000000000000001
-            - Value:           0x0000000000000067
-        - AbbrCode:        0x00000000
-          Values:          []
-        - AbbrCode:        0x00000004
-          Values:          
-            - Value:           0x0000000000000059
-            - Value:           0x0000000000000005
-            - Value:           0x0000000000000004
-        - AbbrCode:        0x00000005
-          Values:          
-            - Value:           0x000000000000006C
-        - AbbrCode:        0x00000005
-          Values:          
-            - Value:           0x0000000000000071
-        - AbbrCode:        0x00000006
-          Values:          
-            - Value:           0x0000000000000076
-        - AbbrCode:        0x00000004
-          Values:          
-            - Value:           0x0000000000000067
-            - Value:           0x0000000000000006
-            - Value:           0x0000000000000001
-        - AbbrCode:        0x00000000
-          Values:          []
-  debug_line:      
-    - Length:          
-        TotalLength:     68
-      Version:         4
-      PrologueLength:  40
-      MinInstLength:   1
-      MaxOpsPerInst:   1
-      DefaultIsStmt:   1
-      LineBase:        251
-      LineRange:       14
-      OpcodeBase:      13
-      StandardOpcodeLengths: [ 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1 ]
-      IncludeDirs:     
-        - './Trivial'
-      Files:           
-        - Name:            main.c
-          DirIdx:          1
-          ModTime:         0
-          Length:          0
-      Opcodes:         
-        - Opcode:          DW_LNS_extended_op
-          ExtLen:          9
-          SubOpcode:       DW_LNE_set_address
-          Data:            0
-        - Opcode:          DW_LNS_copy
-          Data:            0
-        - Opcode:          DW_LNS_set_column
-          Data:            3
-        - Opcode:          DW_LNS_set_prologue_end
-          Data:            3
-        - Opcode:          DW_LNS_const_add_pc
-          Data:            3
-        - Opcode:          0x3D
-          Data:            3
-        - Opcode:          DW_LNS_advance_pc
-          Data:            2
-        - Opcode:          DW_LNS_extended_op
-          ExtLen:          1
-          SubOpcode:       DW_LNE_end_sequence
-          Data:            2
-...
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/stats_api/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/stats_api/Makefile
deleted file mode 100644 (file)
index c9319d6..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-C_SOURCES := main.c
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/stats_api/TestStatisticsAPI.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/stats_api/TestStatisticsAPI.py
deleted file mode 100644 (file)
index d4903b5..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-# Test the SBAPI for GetStatistics()
-
-import json
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestStatsAPI(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_stats_api(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-
-        # Test enabling/disabling stats
-        self.assertFalse(target.GetCollectingStats())
-        target.SetCollectingStats(True)
-        self.assertTrue(target.GetCollectingStats())
-        target.SetCollectingStats(False)
-        self.assertFalse(target.GetCollectingStats())
-
-        # Test the function to get the statistics in JSON'ish.
-        stats = target.GetStatistics()
-        stream = lldb.SBStream()
-        res = stats.GetAsJSON(stream)
-        stats_json = sorted(json.loads(stream.GetData()))
-        self.assertEqual(len(stats_json), 4)
-        self.assertTrue("Number of expr evaluation failures" in stats_json)
-        self.assertTrue("Number of expr evaluation successes" in stats_json)
-        self.assertTrue("Number of frame var failures" in stats_json)
-        self.assertTrue("Number of frame var successes" in stats_json)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/stats_api/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/stats_api/main.c
deleted file mode 100644 (file)
index 03b2213..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-int main(void) {
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/Makefile
deleted file mode 100644 (file)
index 374e58b..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-C_SOURCES := with-debug.c without-debug.c
-
-include Makefile.rules
-
-without-debug.o: without-debug.c
-       $(CC) $(CFLAGS_NO_DEBUG) -c $<
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py
deleted file mode 100644 (file)
index 629efb5..0000000
+++ /dev/null
@@ -1,152 +0,0 @@
-"""
-Test thread step-in, step-over and step-out work with the "Avoid no debug" option.
-"""
-
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class StepAvoidsNoDebugTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(['pyapi'])
-    def test_step_out_with_python(self):
-        """Test stepping out using avoid-no-debug with dsyms."""
-        self.build()
-        self.get_to_starting_point()
-        self.do_step_out_past_nodebug()
-
-    @add_test_categories(['pyapi'])
-    @decorators.expectedFailureAll(
-        compiler="gcc", bugnumber="llvm.org/pr28549")
-    @decorators.expectedFailureAll(
-        compiler="clang",
-        compiler_version=[
-            ">=",
-            "3.9"],
-        archs=["i386"],
-        bugnumber="llvm.org/pr28549")
-    def test_step_over_with_python(self):
-        """Test stepping over using avoid-no-debug with dwarf."""
-        self.build()
-        self.get_to_starting_point()
-        self.do_step_over_past_nodebug()
-
-    @add_test_categories(['pyapi'])
-    @decorators.expectedFailureAll(
-        compiler="gcc", bugnumber="llvm.org/pr28549")
-    @decorators.expectedFailureAll(
-        compiler="clang",
-        compiler_version=[
-            ">=",
-            "3.9"],
-        archs=["i386"],
-        bugnumber="llvm.org/pr28549")
-    @expectedFailureAll(oslist=["ios", "tvos", "bridgeos"], bugnumber="<rdar://problem/34026777>")  # lldb doesn't step past last source line in function on arm64
-    @expectedFailureAll(archs=["aarch64"], oslist=["linux"],
-                        bugnumber="llvm.org/pr44057")
-    def test_step_in_with_python(self):
-        """Test stepping in using avoid-no-debug with dwarf."""
-        self.build()
-        self.get_to_starting_point()
-        self.do_step_in_past_nodebug()
-
-    def setUp(self):
-        TestBase.setUp(self)
-        self.main_source = "with-debug.c"
-        self.main_source_spec = lldb.SBFileSpec("with-debug.c")
-        self.dbg.HandleCommand(
-            "settings set target.process.thread.step-out-avoid-nodebug true")
-
-    def tearDown(self):
-        self.dbg.HandleCommand(
-            "settings set target.process.thread.step-out-avoid-nodebug false")
-        TestBase.tearDown(self)
-
-    def hit_correct_line(self, pattern):
-        target_line = line_number(self.main_source, pattern)
-        self.assertTrue(
-            target_line != 0,
-            "Could not find source pattern " +
-            pattern)
-        cur_line = self.thread.frames[0].GetLineEntry().GetLine()
-        self.assertTrue(
-            cur_line == target_line,
-            "Stepped to line %d instead of expected %d with pattern '%s'." %
-            (cur_line,
-             target_line,
-             pattern))
-
-    def hit_correct_function(self, pattern):
-        name = self.thread.frames[0].GetFunctionName()
-        self.assertTrue(
-            pattern in name, "Got to '%s' not the expected function '%s'." %
-            (name, pattern))
-
-    def get_to_starting_point(self):
-        exe = self.getBuildArtifact("a.out")
-        error = lldb.SBError()
-
-        self.target = self.dbg.CreateTarget(exe)
-        self.assertTrue(self.target, VALID_TARGET)
-
-        inner_bkpt = self.target.BreakpointCreateBySourceRegex(
-            "Stop here and step out of me", self.main_source_spec)
-        self.assertTrue(inner_bkpt, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        self.process = self.target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(self.process, PROCESS_IS_VALID)
-
-        # Now finish, and make sure the return value is correct.
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-            self.process, inner_bkpt)
-        self.assertTrue(len(threads) == 1, "Stopped at inner breakpoint.")
-        self.thread = threads[0]
-
-    def do_step_out_past_nodebug(self):
-        # The first step out takes us to the called_from_nodebug frame, just to make sure setting
-        # step-out-avoid-nodebug doesn't change the behavior in frames with
-        # debug info.
-        self.thread.StepOut()
-        self.hit_correct_line(
-            "intermediate_return_value = called_from_nodebug_actual(some_value)")
-        self.thread.StepOut()
-        self.hit_correct_line(
-            "int return_value = no_debug_caller(5, called_from_nodebug)")
-
-    def do_step_over_past_nodebug(self):
-        self.thread.StepOver()
-        self.hit_correct_line(
-            "intermediate_return_value = called_from_nodebug_actual(some_value)")
-        self.thread.StepOver()
-        self.hit_correct_line("return intermediate_return_value")
-        self.thread.StepOver()
-        # Note, lldb doesn't follow gdb's distinction between "step-out" and "step-over/step-in"
-        # when exiting a frame.  In all cases we leave the pc at the point where we exited the
-        # frame.  In gdb, step-over/step-in move to the end of the line they stepped out to.
-        # If we ever change this we will need to fix this test.
-        self.hit_correct_line(
-            "int return_value = no_debug_caller(5, called_from_nodebug)")
-
-    def do_step_in_past_nodebug(self):
-        self.thread.StepInto()
-        self.hit_correct_line(
-            "intermediate_return_value = called_from_nodebug_actual(some_value)")
-        self.thread.StepInto()
-        self.hit_correct_line("return intermediate_return_value")
-        self.thread.StepInto()
-        # Note, lldb doesn't follow gdb's distinction between "step-out" and "step-over/step-in"
-        # when exiting a frame.  In all cases we leave the pc at the point where we exited the
-        # frame.  In gdb, step-over/step-in move to the end of the line they stepped out to.
-        # If we ever change this we will need to fix this test.
-        self.hit_correct_line(
-            "int return_value = no_debug_caller(5, called_from_nodebug)")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/with-debug.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/with-debug.c
deleted file mode 100644 (file)
index c7ac309..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#include <stdio.h>
-
-typedef int (*debug_callee) (int);
-
-extern int no_debug_caller (int, debug_callee);
-
-int
-called_from_nodebug_actual(int some_value)
-{
-  int return_value = 0;
-  return_value  = printf ("Length: %d.\n", some_value);
-  return return_value; // Stop here and step out of me
-}
-
-int
-called_from_nodebug(int some_value)
-{
-  int intermediate_return_value = 0;
-  intermediate_return_value = called_from_nodebug_actual(some_value);
-  return intermediate_return_value;
-}
-
-int
-main()
-{
-  int return_value = no_debug_caller(5, called_from_nodebug);
-  printf ("I got: %d.\n", return_value);
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/without-debug.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/without-debug.c
deleted file mode 100644 (file)
index d71d74a..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-typedef int (*debug_callee) (int);
-
-int
-no_debug_caller_intermediate(int input, debug_callee callee)
-{
-  int return_value = 0;
-  return_value = callee(input);
-  return return_value;
-}
-
-int
-no_debug_caller (int input, debug_callee callee)
-{
-  int return_value = 0;
-  return_value = no_debug_caller_intermediate (input, callee);
-  return return_value;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/Steps.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/Steps.py
deleted file mode 100644 (file)
index 4133cbb..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-import lldb
-
-class StepWithChild:
-    def __init__(self, thread_plan):
-        self.thread_plan = thread_plan
-        self.child_thread_plan = self.queue_child_thread_plan()
-
-    def explains_stop(self, event):
-        return False
-
-    def should_stop(self, event):
-        if not self.child_thread_plan.IsPlanComplete():
-            return False
-
-        self.thread_plan.SetPlanComplete(True)
-
-        return True
-
-    def should_step(self):
-        return False
-
-    def queue_child_thread_plan(self):
-        return None
-
-class StepOut(StepWithChild):
-    def __init__(self, thread_plan, dict):
-        StepWithChild.__init__(self, thread_plan)
-
-    def queue_child_thread_plan(self):
-        return self.thread_plan.QueueThreadPlanForStepOut(0)
-
-class StepScripted(StepWithChild):
-    def __init__(self, thread_plan, dict):
-        StepWithChild.__init__(self, thread_plan)
-
-    def queue_child_thread_plan(self):
-        return self.thread_plan.QueueThreadPlanForStepScripted("Steps.StepOut")
-
-# This plan does a step-over until a variable changes value.
-class StepUntil(StepWithChild):
-    def __init__(self, thread_plan, args_data, dict):
-        self.frame = thread_plan.GetThread().frames[0]
-        self.target = thread_plan.GetThread().GetProcess().GetTarget()
-        func_entry = args_data.GetValueForKey("variable_name")
-        
-        if not func_entry.IsValid():
-            print("Did not get a valid entry for variable_name")
-        func_name = func_entry.GetStringValue(100)
-
-        self.value = self.frame.FindVariable(func_name)
-        if self.value.GetError().Fail():
-            print("Failed to get foo value: %s"%(self.value.GetError().GetCString()))
-        else:
-            print("'foo' value: %d"%(self.value.GetValueAsUnsigned()))
-
-        StepWithChild.__init__(self, thread_plan)
-
-
-    def queue_child_thread_plan(self):
-        le = self.frame.GetLineEntry()
-        start_addr = le.GetStartAddress() 
-        start = start_addr.GetLoadAddress(self.target)
-        end = le.GetEndAddress().GetLoadAddress(self.target)
-        return self.thread_plan.QueueThreadPlanForStepOverRange(start_addr,
-                                                                end - start)
-
-    def should_stop(self, event):
-        if not self.child_thread_plan.IsPlanComplete():
-            return False
-
-        # If we've stepped out of this frame, stop.
-        if not self.frame.IsValid():
-            return True
-
-        if not self.value.IsValid():
-            return True
-
-        print("Got next value: %d"%(self.value.GetValueAsUnsigned()))
-        if not self.value.GetValueDidChange():
-            self.child_thread_plan = self.queue_child_thread_plan()
-            return False
-        else:
-            return True
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/TestStepScripted.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/TestStepScripted.py
deleted file mode 100644 (file)
index eb1b582..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-"""
-Tests stepping with scripted thread plans.
-"""
-
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbtest import *
-
-class StepScriptedTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        TestBase.setUp(self)
-        self.main_source_file = lldb.SBFileSpec("main.c")
-        self.runCmd("command script import Steps.py")
-
-    def test_standard_step_out(self):
-        """Tests stepping with the scripted thread plan laying over a standard 
-        thread plan for stepping out."""
-        self.build()
-        self.step_out_with_scripted_plan("Steps.StepOut")
-
-    def test_scripted_step_out(self):
-        """Tests stepping with the scripted thread plan laying over an another 
-        scripted thread plan for stepping out."""
-        self.build()
-        self.step_out_with_scripted_plan("Steps.StepScripted")
-
-    def step_out_with_scripted_plan(self, name):
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                                                            "Set a breakpoint here",
-                                                                            self.main_source_file)
-
-        frame = thread.GetFrameAtIndex(0)
-        self.assertEqual("foo", frame.GetFunctionName())
-
-        err = thread.StepUsingScriptedThreadPlan(name)
-        self.assertTrue(err.Success(), err.GetCString())
-
-        frame = thread.GetFrameAtIndex(0)
-        self.assertEqual("main", frame.GetFunctionName())
-
-
-    def test_misspelled_plan_name(self):
-        """Test that we get a useful error if we misspell the plan class name"""
-        self.build()
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                                                            "Set a breakpoint here",
-                                                                            self.main_source_file)
-        stop_id = process.GetStopID()
-        # Pass a non-existent class for the plan class:
-        err = thread.StepUsingScriptedThreadPlan("NoSuchModule.NoSuchPlan")
-        
-        # Make sure we got a good error:
-        self.assertTrue(err.Fail(), "We got a failure state")
-        msg = err.GetCString()
-        self.assertTrue("NoSuchModule.NoSuchPlan" in msg, "Mentioned missing class")
-        
-        # Make sure we didn't let the process run:
-        self.assertEqual(stop_id, process.GetStopID(), "Process didn't run")
-        
-    def test_checking_variable(self):
-        """Test that we can call SBValue API's from a scripted thread plan - using SBAPI's to step"""
-        self.do_test_checking_variable(False)
-        
-    def test_checking_variable_cli(self):
-        """Test that we can call SBValue API's from a scripted thread plan - using cli to step"""
-        self.do_test_checking_variable(True)
-        
-    def do_test_checking_variable(self, use_cli):
-        self.build()
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                                                            "Set a breakpoint here",
-                                                                            self.main_source_file)
-
-        frame = thread.GetFrameAtIndex(0)
-        self.assertEqual("foo", frame.GetFunctionName())
-        foo_val = frame.FindVariable("foo")
-        self.assertTrue(foo_val.GetError().Success(), "Got the foo variable")
-        self.assertEqual(foo_val.GetValueAsUnsigned(), 10, "foo starts at 10")
-
-        if use_cli:
-            result = lldb.SBCommandReturnObject()
-            self.dbg.GetCommandInterpreter().HandleCommand(
-                "thread step-scripted -C Steps.StepUntil -k variable_name -v foo",
-                result)
-            self.assertTrue(result.Succeeded())
-        else:
-            args_data = lldb.SBStructuredData()
-            data = lldb.SBStream()
-            data.Print('{"variable_name" : "foo"}')
-            error = args_data.SetFromJSON(data)
-            self.assertTrue(error.Success(), "Made the args_data correctly")
-
-            err = thread.StepUsingScriptedThreadPlan("Steps.StepUntil", args_data, True)
-            self.assertTrue(err.Success(), err.GetCString())
-
-        # We should not have exited:
-        self.assertEqual(process.GetState(), lldb.eStateStopped, "We are stopped")
-        
-        # We should still be in foo:
-        self.assertEqual("foo", frame.GetFunctionName())
-
-        # And foo should have changed:
-        self.assertTrue(foo_val.GetValueDidChange(), "Foo changed")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/main.c
deleted file mode 100644 (file)
index bfd8a35..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <stdio.h>
-
-void foo() {
-  int foo = 10; 
-  printf("%d\n", foo); // Set a breakpoint here. 
-  foo = 20;
-  printf("%d\n", foo);
-}
-
-int main() {
-  foo();
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq1/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq1/Makefile
deleted file mode 100644 (file)
index 666a6c3..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CXX_SOURCES := main.cpp
-
-CXXFLAGS_EXTRAS := -g -O2 -glldb
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq1/TestAmbiguousTailCallSeq1.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq1/TestAmbiguousTailCallSeq1.py
deleted file mode 100644 (file)
index fbd6296..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__, globals(),
-        [decorators.skipUnlessHasCallSiteInfo,
-         decorators.skipIf(dwarf_version=['<', '4'])])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq1/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq1/main.cpp
deleted file mode 100644 (file)
index b59c063..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-volatile int x;
-
-void __attribute__((noinline)) sink() {
-  x++; //% self.filecheck("bt", "main.cpp")
-  // CHECK-NOT: func{{[23]}}_amb
-}
-
-void __attribute__((noinline)) func3_amb() { sink(); /* tail */ }
-
-void __attribute__((noinline)) func2_amb() { sink(); /* tail */ }
-
-void __attribute__((noinline)) func1() {
-  if (x > 0)
-    func2_amb(); /* tail */
-  else
-    func3_amb(); /* tail */
-}
-
-int __attribute__((disable_tail_calls)) main(int argc, char **) {
-  // The sequences `main -> func1 -> f{2,3}_amb -> sink` are both plausible. Test
-  // that lldb doesn't attempt to guess which one occurred.
-  func1();
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2/Makefile
deleted file mode 100644 (file)
index 666a6c3..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CXX_SOURCES := main.cpp
-
-CXXFLAGS_EXTRAS := -g -O2 -glldb
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2/TestAmbiguousTailCallSeq2.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2/TestAmbiguousTailCallSeq2.py
deleted file mode 100644 (file)
index fbd6296..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__, globals(),
-        [decorators.skipUnlessHasCallSiteInfo,
-         decorators.skipIf(dwarf_version=['<', '4'])])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2/main.cpp
deleted file mode 100644 (file)
index 21c8919..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-volatile int x;
-
-void __attribute__((noinline)) sink() {
-  x++; //% self.filecheck("bt", "main.cpp")
-  // CHECK-NOT: func{{[23]}}
-}
-
-void func2();
-
-void __attribute__((noinline)) func1() {
-  if (x < 1)
-    func2();
-  else
-    sink();
-}
-
-void __attribute__((noinline)) func2() {
-  if (x < 1)
-    sink();
-  else
-    func1();
-}
-
-int main() {
-  // Tail recursion creates ambiguous execution histories.
-  x = 0;
-  func1();
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_call_site/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_call_site/Makefile
deleted file mode 100644 (file)
index 666a6c3..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CXX_SOURCES := main.cpp
-
-CXXFLAGS_EXTRAS := -g -O2 -glldb
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_call_site/TestDisambiguateCallSite.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_call_site/TestDisambiguateCallSite.py
deleted file mode 100644 (file)
index fbd6296..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__, globals(),
-        [decorators.skipUnlessHasCallSiteInfo,
-         decorators.skipIf(dwarf_version=['<', '4'])])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_call_site/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_call_site/main.cpp
deleted file mode 100644 (file)
index d4578c6..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-volatile int x;
-
-void __attribute__((noinline)) sink() {
-  x++; //% self.filecheck("bt", "main.cpp", "-implicit-check-not=artificial")
-  // CHECK: frame #0: 0x{{[0-9a-f]+}} a.out`sink() at main.cpp:[[@LINE-1]]:4 [opt]
-  // CHECK-NEXT: func2{{.*}} [opt] [artificial]
-  // CHECK-NEXT: main{{.*}} [opt]
-}
-
-void __attribute__((noinline)) func2() {
-  sink(); /* tail */
-}
-
-void __attribute__((noinline)) func1() { sink(); /* tail */ }
-
-int __attribute__((disable_tail_calls)) main(int argc, char **) {
-  // The sequences `main -> f{1,2} -> sink` are both plausible. Test that
-  // return-pc call site info allows lldb to pick the correct sequence.
-  func2();
-  if (argc == 100)
-    func1();
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_paths_to_common_sink/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_paths_to_common_sink/Makefile
deleted file mode 100644 (file)
index 666a6c3..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CXX_SOURCES := main.cpp
-
-CXXFLAGS_EXTRAS := -g -O2 -glldb
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_paths_to_common_sink/TestDisambiguatePathsToCommonSink.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_paths_to_common_sink/TestDisambiguatePathsToCommonSink.py
deleted file mode 100644 (file)
index fbd6296..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__, globals(),
-        [decorators.skipUnlessHasCallSiteInfo,
-         decorators.skipIf(dwarf_version=['<', '4'])])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_paths_to_common_sink/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_paths_to_common_sink/main.cpp
deleted file mode 100644 (file)
index 6284ef4..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-volatile int x;
-
-void __attribute__((noinline)) sink2() {
-  x++; //% self.filecheck("bt", "main.cpp", "-check-prefix=FROM-FUNC1")
-  // FROM-FUNC1: frame #0: 0x{{[0-9a-f]+}} a.out`sink{{.*}} at main.cpp:[[@LINE-1]]:{{.*}} [opt]
-  // FROM-FUNC1-NEXT: sink({{.*}} [opt]
-  // FROM-FUNC1-NEXT: func1{{.*}} [opt] [artificial]
-  // FROM-FUNC1-NEXT: main{{.*}} [opt]
-}
-
-void __attribute__((noinline)) sink(bool called_from_main) {
-  if (called_from_main) {
-    x++; //% self.filecheck("bt", "main.cpp", "-check-prefix=FROM-MAIN")
-    // FROM-MAIN: frame #0: 0x{{[0-9a-f]+}} a.out`sink{{.*}} at main.cpp:[[@LINE-1]]:{{.*}} [opt]
-    // FROM-MAIN-NEXT: main{{.*}} [opt]
-  } else {
-    sink2();
-  }
-}
-
-void __attribute__((noinline)) func1() { sink(false); /* tail */ }
-
-int __attribute__((disable_tail_calls)) main(int argc, char **) {
-  // When func1 tail-calls sink, make sure that the former appears in the
-  // backtrace.
-  sink(true);
-  func1();
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_tail_call_seq/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_tail_call_seq/Makefile
deleted file mode 100644 (file)
index 666a6c3..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CXX_SOURCES := main.cpp
-
-CXXFLAGS_EXTRAS := -g -O2 -glldb
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_tail_call_seq/TestDisambiguateTailCallSeq.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_tail_call_seq/TestDisambiguateTailCallSeq.py
deleted file mode 100644 (file)
index fbd6296..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__, globals(),
-        [decorators.skipUnlessHasCallSiteInfo,
-         decorators.skipIf(dwarf_version=['<', '4'])])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_tail_call_seq/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_tail_call_seq/main.cpp
deleted file mode 100644 (file)
index 7816385..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-volatile int x;
-
-void __attribute__((noinline)) sink() {
-  x++; //% self.filecheck("bt", "main.cpp", "-implicit-check-not=artificial")
-  // CHECK: frame #0: 0x{{[0-9a-f]+}} a.out`sink() at main.cpp:[[@LINE-1]]:4 [opt]
-  // CHECK-NEXT: func3{{.*}} [opt] [artificial]
-  // CHECK-NEXT: func1{{.*}} [opt] [artificial]
-  // CHECK-NEXT: main{{.*}} [opt]
-}
-
-void __attribute__((noinline)) func3() { sink(); /* tail */ }
-
-void __attribute__((noinline)) func2() { sink(); /* tail */ }
-
-void __attribute__((noinline)) func1() { func3(); /* tail */ }
-
-int __attribute__((disable_tail_calls)) main(int argc, char **) {
-  // The sequences `main -> func1 -> f{2,3} -> sink` are both plausible. Test
-  // that lldb picks the latter sequence.
-  func1();
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/inlining_and_tail_calls/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/inlining_and_tail_calls/Makefile
deleted file mode 100644 (file)
index 666a6c3..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CXX_SOURCES := main.cpp
-
-CXXFLAGS_EXTRAS := -g -O2 -glldb
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/inlining_and_tail_calls/TestInliningAndTailCalls.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/inlining_and_tail_calls/TestInliningAndTailCalls.py
deleted file mode 100644 (file)
index fbd6296..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__, globals(),
-        [decorators.skipUnlessHasCallSiteInfo,
-         decorators.skipIf(dwarf_version=['<', '4'])])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/inlining_and_tail_calls/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/inlining_and_tail_calls/main.cpp
deleted file mode 100644 (file)
index a592d51..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-volatile int x;
-
-void __attribute__((noinline)) tail_call_sink() {
-  x++; //% self.filecheck("bt", "main.cpp", "-check-prefix=TAIL-CALL-SINK")
-  // TAIL-CALL-SINK: frame #0: 0x{{[0-9a-f]+}} a.out`tail_call_sink() at main.cpp:[[@LINE-1]]:4 [opt]
-  // TAIL-CALL-SINK-NEXT: func3{{.*}} [opt] [artificial]
-  // TAIL-CALL-SINK-NEXT: main{{.*}} [opt]
-
-  // TODO: The backtrace should include inlinable_function_which_tail_calls.
-}
-
-void __attribute__((always_inline)) inlinable_function_which_tail_calls() {
-  tail_call_sink();
-}
-
-void __attribute__((noinline)) func3() {
-  inlinable_function_which_tail_calls();
-}
-
-void __attribute__((always_inline)) inline_sink() {
-  x++; //% self.filecheck("bt", "main.cpp", "-check-prefix=INLINE-SINK")
-  // INLINE-SINK: frame #0: 0x{{[0-9a-f]+}} a.out`func2() [inlined] inline_sink() at main.cpp:[[@LINE-1]]:4 [opt]
-  // INLINE-SINK-NEXT: func2{{.*}} [opt]
-  // INLINE-SINK-NEXT: func1{{.*}} [opt] [artificial]
-  // INLINE-SINK-NEXT: main{{.*}} [opt]
-}
-
-void __attribute__((noinline)) func2() { inline_sink(); /* inlined */ }
-
-void __attribute__((noinline)) func1() { func2(); /* tail */ }
-
-int __attribute__((disable_tail_calls)) main() {
-  // First, call a function that tail-calls a function, which itself inlines
-  // a third function.
-  func1();
-
-  // Next, call a function which contains an inlined tail-call.
-  func3();
-
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/Makefile
deleted file mode 100644 (file)
index 666a6c3..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CXX_SOURCES := main.cpp
-
-CXXFLAGS_EXTRAS := -g -O2 -glldb
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/TestTailCallFrameSBAPI.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/TestTailCallFrameSBAPI.py
deleted file mode 100644 (file)
index e597b8d..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-"""
-Test SB API support for identifying artificial (tail call) frames.
-"""
-
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-
-class TestTailCallFrameSBAPI(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIf(compiler="clang", compiler_version=['<', '8.0'])
-    @skipIf(dwarf_version=['<', '4'])
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr26265")
-    def test_tail_call_frame_sbapi(self):
-        self.build()
-        self.do_test()
-
-    def do_test(self):
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        breakpoint = target.BreakpointCreateBySourceRegex("break here",
-                lldb.SBFileSpec("main.cpp"))
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        error = lldb.SBError()
-        launch_info = lldb.SBLaunchInfo(None)
-        process = target.Launch(launch_info, error)
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Did we hit our breakpoint?
-        threads = lldbutil.get_threads_stopped_at_breakpoint(process,
-                breakpoint)
-        self.assertEqual(
-            len(threads), 1,
-            "There should be a thread stopped at our breakpoint")
-
-        self.assertEqual(breakpoint.GetHitCount(), 1)
-
-        thread = threads[0]
-
-        # Here's what we expect to see in the backtrace:
-        #   frame #0: ... a.out`sink() at main.cpp:13:4 [opt]
-        #   frame #1: ... a.out`func3() at main.cpp:14:1 [opt] [artificial]
-        #   frame #2: ... a.out`func2() at main.cpp:18:62 [opt]
-        #   frame #3: ... a.out`func1() at main.cpp:18:85 [opt] [artificial]
-        #   frame #4: ... a.out`main at main.cpp:23:3 [opt]
-        names = ["sink", "func3", "func2", "func1", "main"]
-        artificiality = [False, True, False, True, False]
-        for idx, (name, is_artificial) in enumerate(zip(names, artificiality)):
-            frame = thread.GetFrameAtIndex(idx)
-
-            # Use a relaxed substring check because function dislpay names are
-            # platform-dependent. E.g we see "void sink(void)" on Windows, but
-            # "sink()" on Darwin. This seems like a bug -- just work around it
-            # for now.
-            self.assertTrue(name in frame.GetDisplayFunctionName())
-            self.assertEqual(frame.IsArtificial(), is_artificial)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/main.cpp
deleted file mode 100644 (file)
index 5a2775b..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-volatile int x;
-
-void __attribute__((noinline)) sink() {
-  x++; /* break here */
-}
-
-void __attribute__((noinline)) func3() { sink(); /* tail */ }
-
-void __attribute__((disable_tail_calls, noinline)) func2() { func3(); /* regular */ }
-
-void __attribute__((noinline)) func1() { func2(); /* tail */ }
-
-int __attribute__((disable_tail_calls)) main() {
-  func1(); /* regular */
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_message/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_message/Makefile
deleted file mode 100644 (file)
index 666a6c3..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CXX_SOURCES := main.cpp
-
-CXXFLAGS_EXTRAS := -g -O2 -glldb
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_message/TestArtificialFrameStepOutMessage.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_message/TestArtificialFrameStepOutMessage.py
deleted file mode 100644 (file)
index fbd6296..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__, globals(),
-        [decorators.skipUnlessHasCallSiteInfo,
-         decorators.skipIf(dwarf_version=['<', '4'])])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_message/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_message/main.cpp
deleted file mode 100644 (file)
index df43bcc..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-volatile int x;
-
-void __attribute__((noinline)) sink() {
-  x++; //% self.filecheck("finish", "main.cpp", "-implicit-check-not=artificial")
-  // CHECK: stop reason = step out
-  // CHECK-NEXT: Stepped out past: frame #1: 0x{{[0-9a-f]+}} a.out`func3{{.*}} [opt] [artificial]
-  // CHECK: frame #0: 0x{{[0-9a-f]+}} a.out`func2{{.*}} [opt]
-}
-
-void __attribute__((noinline)) func3() { sink(); /* tail */ }
-
-void __attribute__((disable_tail_calls, noinline)) func2() { func3(); /* regular */ }
-
-void __attribute__((noinline)) func1() { func2(); /* tail */ }
-
-int __attribute__((disable_tail_calls)) main() {
-  func1(); /* regular */
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/Makefile
deleted file mode 100644 (file)
index 666a6c3..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CXX_SOURCES := main.cpp
-
-CXXFLAGS_EXTRAS := -g -O2 -glldb
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/TestSteppingOutWithArtificialFrames.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/TestSteppingOutWithArtificialFrames.py
deleted file mode 100644 (file)
index 24fc2ba..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-"""
-Test SB API support for identifying artificial (tail call) frames.
-"""
-
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-
-class TestArtificialFrameThreadStepOut1(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    # If your test case doesn't stress debug info, the
-    # set this to true.  That way it won't be run once for
-    # each debug info format.
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def prepare_thread(self):
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        breakpoint = target.BreakpointCreateBySourceRegex("break here",
-                lldb.SBFileSpec("main.cpp"))
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        error = lldb.SBError()
-        launch_info = lldb.SBLaunchInfo(None)
-        process = target.Launch(launch_info, error)
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Did we hit our breakpoint?
-        threads = lldbutil.get_threads_stopped_at_breakpoint(process,
-                breakpoint)
-        self.assertEqual(
-            len(threads), 1,
-            "There should be a thread stopped at our breakpoint")
-
-        self.assertEqual(breakpoint.GetHitCount(), 1)
-
-        thread = threads[0]
-
-        # Here's what we expect to see in the backtrace:
-        #   frame #0: ... a.out`sink() at main.cpp:13:4 [opt]
-        #   frame #1: ... a.out`func3() at main.cpp:14:1 [opt] [artificial]
-        #   frame #2: ... a.out`func2() at main.cpp:18:62 [opt]
-        #   frame #3: ... a.out`func1() at main.cpp:18:85 [opt] [artificial]
-        #   frame #4: ... a.out`main at main.cpp:23:3 [opt]
-        return thread
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr26265")
-    def test_stepping_out_past_artificial_frame(self):
-        self.build()
-        thread = self.prepare_thread()
-
-        # Frame #0's ancestor is artificial. Stepping out should move to
-        # frame #2, because we behave as-if artificial frames were not present.
-        thread.StepOut()
-        frame2 = thread.GetSelectedFrame()
-        self.assertEqual(frame2.GetDisplayFunctionName(), "func2()")
-        self.assertFalse(frame2.IsArtificial())
-
-        # Ditto: stepping out of frame #2 should move to frame #4.
-        thread.StepOut()
-        frame4 = thread.GetSelectedFrame()
-        self.assertEqual(frame4.GetDisplayFunctionName(), "main")
-        self.assertFalse(frame2.IsArtificial())
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr26265")
-    def test_return_past_artificial_frame(self):
-        self.build()
-        thread = self.prepare_thread()
-
-        value = lldb.SBValue()
-
-        # Frame #0's ancestor is artificial. Returning from frame #0 should move
-        # to frame #2.
-        thread.ReturnFromFrame(thread.GetSelectedFrame(), value)
-        frame2 = thread.GetSelectedFrame()
-        self.assertEqual(frame2.GetDisplayFunctionName(), "func2()")
-        self.assertFalse(frame2.IsArtificial())
-
-        # Ditto: stepping out of frame #2 should move to frame #4.
-        thread.ReturnFromFrame(thread.GetSelectedFrame(), value)
-        frame4 = thread.GetSelectedFrame()
-        self.assertEqual(frame4.GetDisplayFunctionName(), "main")
-        self.assertFalse(frame2.IsArtificial())
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/main.cpp
deleted file mode 100644 (file)
index 4a64703..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-volatile int x;
-
-void __attribute__((noinline)) sink() {
-  x++; // break here
-}
-
-void __attribute__((noinline)) func3() { sink(); /* tail */ }
-
-void __attribute__((disable_tail_calls, noinline)) func2() { func3(); /* regular */ }
-
-void __attribute__((noinline)) func1() { func2(); /* tail */ }
-
-int __attribute__((disable_tail_calls)) main() {
-  func1(); /* regular */
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/unambiguous_sequence/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/unambiguous_sequence/Makefile
deleted file mode 100644 (file)
index 666a6c3..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CXX_SOURCES := main.cpp
-
-CXXFLAGS_EXTRAS := -g -O2 -glldb
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/unambiguous_sequence/TestUnambiguousTailCalls.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/unambiguous_sequence/TestUnambiguousTailCalls.py
deleted file mode 100644 (file)
index fbd6296..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__, globals(),
-        [decorators.skipUnlessHasCallSiteInfo,
-         decorators.skipIf(dwarf_version=['<', '4'])])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/unambiguous_sequence/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/unambiguous_sequence/main.cpp
deleted file mode 100644 (file)
index edfe597..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-volatile int x;
-
-void __attribute__((noinline)) sink() {
-  x++; //% self.filecheck("bt", "main.cpp", "-implicit-check-not=artificial")
-  // CHECK: frame #0: 0x{{[0-9a-f]+}} a.out`sink() at main.cpp:[[@LINE-1]]:4 [opt]
-  // CHECK-NEXT: frame #1: 0x{{[0-9a-f]+}} a.out`func3{{.*}} [opt] [artificial]
-  // CHECK-NEXT: frame #2: 0x{{[0-9a-f]+}} a.out`func2{{.*}} [opt]
-  // CHECK-NEXT: frame #3: 0x{{[0-9a-f]+}} a.out`func1{{.*}} [opt] [artificial]
-  // CHECK-NEXT: frame #4: 0x{{[0-9a-f]+}} a.out`main{{.*}} [opt]
-}
-
-void __attribute__((noinline)) func3() { sink(); /* tail */ }
-
-void __attribute__((disable_tail_calls, noinline)) func2() { func3(); /* regular */ }
-
-void __attribute__((noinline)) func1() { func2(); /* tail */ }
-
-int __attribute__((disable_tail_calls)) main() {
-  func1(); /* regular */
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/target-new-solib-notifications/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/target-new-solib-notifications/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/target-new-solib-notifications/TestModuleLoadedNotifys.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/target-new-solib-notifications/TestModuleLoadedNotifys.py
deleted file mode 100644 (file)
index b3db5f7..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-"""
-Test how many times newly loaded binaries are notified;
-they should be delivered in batches instead of one-by-one.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class ModuleLoadedNotifysTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    # DyanmicLoaderDarwin should batch up notifications about
-    # newly added/removed libraries.  Other DynamicLoaders may
-    # not be written this way.
-    @skipUnlessDarwin
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line = line_number('main.cpp', '// breakpoint')
-
-    def test_launch_notifications(self):
-        """Test that lldb broadcasts newly loaded libraries in batches."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.dbg.SetAsync(False)
-
-        listener = self.dbg.GetListener()
-        listener.StartListeningForEventClass(
-            self.dbg,
-            lldb.SBTarget.GetBroadcasterClassName(),
-            lldb.SBTarget.eBroadcastBitModulesLoaded | lldb.SBTarget.eBroadcastBitModulesUnloaded)
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # break on main
-        breakpoint = target.BreakpointCreateByName('main', 'a.out')
-
-        event = lldb.SBEvent()
-        # CreateTarget() generated modules-loaded events; consume them & toss
-        while listener.GetNextEvent(event):
-            True
-
-        error = lldb.SBError()
-        process = target.Launch(listener,
-                                None,      # argv
-                                None,      # envp
-                                None,      # stdin_path
-                                None,      # stdout_path
-                                None,      # stderr_path
-                                None,      # working directory
-                                0,         # launch flags
-                                False,     # Stop at entry
-                                error)     # error
-
-        self.assertTrue(
-            process.GetState() == lldb.eStateStopped,
-            PROCESS_STOPPED)
-
-        total_solibs_added = 0
-        total_solibs_removed = 0
-        total_modules_added_events = 0
-        total_modules_removed_events = 0
-        while listener.GetNextEvent(event):
-            if lldb.SBTarget.EventIsTargetEvent(event):
-                if event.GetType() == lldb.SBTarget.eBroadcastBitModulesLoaded:
-                    solib_count = lldb.SBTarget.GetNumModulesFromEvent(event)
-                    total_modules_added_events += 1
-                    total_solibs_added += solib_count
-                    if self.TraceOn():
-                        # print all of the binaries that have been added
-                        added_files = []
-                        i = 0
-                        while i < solib_count:
-                            module = lldb.SBTarget.GetModuleAtIndexFromEvent(i, event)
-                            added_files.append(module.GetFileSpec().GetFilename())
-                            i = i + 1
-                        print("Loaded files: %s" % (', '.join(added_files)))
-
-                if event.GetType() == lldb.SBTarget.eBroadcastBitModulesUnloaded:
-                    solib_count = lldb.SBTarget.GetNumModulesFromEvent(event)
-                    total_modules_removed_events += 1
-                    total_solibs_removed += solib_count
-                    if self.TraceOn():
-                        # print all of the binaries that have been removed
-                        removed_files = []
-                        i = 0
-                        while i < solib_count:
-                            module = lldb.SBTarget.GetModuleAtIndexFromEvent(i, event)
-                            removed_files.append(module.GetFileSpec().GetFilename())
-                            i = i + 1
-                        print("Unloaded files: %s" % (', '.join(removed_files)))
-        
-
-        # This is testing that we get back a small number of events with the loaded 
-        # binaries in batches.  Check that we got back more than 1 solib per event.  
-        # In practice on Darwin today, we get back two events for a do-nothing c 
-        # program: a.out and dyld, and then all the rest of the system libraries.
-
-        avg_solibs_added_per_event = int(float(total_solibs_added) / float(total_modules_added_events))
-        self.assertGreater(avg_solibs_added_per_event, 1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/target-new-solib-notifications/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/target-new-solib-notifications/main.cpp
deleted file mode 100644 (file)
index 00130c9..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <stdio.h>
-int main ()
-{
-  puts("running"); // breakpoint here
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/target_var/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/target_var/Makefile
deleted file mode 100644 (file)
index 806c967..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-include Makefile.rules
-
-a.out: globals.ll
-       $(CC) $(CFLAGS) -g -c $^ -o globals.o
-       $(LD) $(LDFLAGS) -g globals.o -o $@
-
-clean::
-       rm -rf globals.o a.out *.dSYM
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/target_var/TestTargetVar.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/target_var/TestTargetVar.py
deleted file mode 100644 (file)
index f8c2a69..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-"""
-Test that target var can resolve complex DWARF expressions.
-"""
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class targetCommandTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    @skipIfDarwinEmbedded           # needs x86_64
-    @skipIf(debug_info="gmodules")  # not relevant
-    @skipIf(compiler="clang", compiler_version=['<', '7.0'])
-    def testTargetVarExpr(self):
-        self.build()
-        lldbutil.run_to_name_breakpoint(self, 'main')
-        self.expect("target variable i", substrs=['i', '42'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/target_var/globals.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/target_var/globals.c
deleted file mode 100644 (file)
index 2661928..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-int i = 42;
-int *p = &i;
-
-int main() {
-  return *p;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/target_var/globals.ll b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/target_var/globals.ll
deleted file mode 100644 (file)
index 192d4e1..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-source_filename = "globals.c"
-target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-apple-macosx10.14.0"
-
-@i = global i32 42, align 4
-@p = global i32* @i, align 8, !dbg !0, !dbg !6
-
-; Function Attrs: noinline nounwind optnone ssp uwtable
-define i32 @main() #0 !dbg !15 {
-entry:
-  %retval = alloca i32, align 4
-  store i32 0, i32* %retval, align 4
-  %0 = load i32*, i32** @p, align 8, !dbg !18
-  %1 = load i32, i32* %0, align 4, !dbg !18
-  ret i32 %1, !dbg !18
-}
-
-attributes #0 = { noinline nounwind optnone ssp uwtable }
-
-!llvm.dbg.cu = !{!2}
-!llvm.module.flags = !{!10, !11, !12, !13}
-!llvm.ident = !{!14}
-
-!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression(DW_OP_deref))
-!1 = distinct !DIGlobalVariable(name: "i", scope: !2, file: !3, line: 1, type: !9, isLocal: false, isDefinition: true)
-!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, emissionKind: FullDebug, globals: !5)
-!3 = !DIFile(filename: "globals.c", directory: "/")
-!4 = !{}
-!5 = !{!0, !6}
-!6 = !DIGlobalVariableExpression(var: !7, expr: !DIExpression())
-!7 = distinct !DIGlobalVariable(name: "p", scope: !2, file: !3, line: 2, type: !8, isLocal: false, isDefinition: true)
-!8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !9, size: 64)
-!9 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
-!10 = !{i32 2, !"Dwarf Version", i32 4}
-!11 = !{i32 2, !"Debug Info Version", i32 3}
-!12 = !{i32 1, !"wchar_size", i32 4}
-!13 = !{i32 7, !"PIC Level", i32 2}
-!14 = !{!"clang version 8.0.0 (trunk 340838) (llvm/trunk 340843)"}
-!15 = distinct !DISubprogram(name: "main", scope: !3, file: !3, line: 4, type: !16, isLocal: false, isDefinition: true, scopeLine: 4, isOptimized: false, unit: !2, retainedNodes: !4)
-!16 = !DISubroutineType(types: !17)
-!17 = !{!9}
-!18 = !DILocation(line: 5, scope: !15)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/testid/TestTestId.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/testid/TestTestId.py
deleted file mode 100644 (file)
index b3d3317..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-"""
-Add a test to verify our test instance returns something non-None for
-an id(). Other parts of the test running infrastructure are counting on this.
-"""
-
-from lldbsuite.test.lldbtest import TestBase
-
-class TestIdTestCase(TestBase):
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_id_exists(self):
-        self.assertIsNotNone(self.id(), "Test instance should have an id()")
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/Makefile
deleted file mode 100644 (file)
index cd092b7..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-CXXFLAGS_EXTRAS := -std=c++11
-CXX_SOURCES := ParallelTask.cpp
-ENABLE_THREADS := YES
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/ParallelTask.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/ParallelTask.cpp
deleted file mode 100644 (file)
index 8e0f76f..0000000
+++ /dev/null
@@ -1,152 +0,0 @@
-#include <cstdint>
-#include <thread>
-#include <vector>
-#include <queue>
-#include <functional>
-#include <future>
-#include <iostream>
-#include <cassert>
-
-class TaskPoolImpl
-{
-public:
-    TaskPoolImpl(uint32_t num_threads) :
-        m_stop(false)
-    {
-        for (uint32_t i = 0; i < num_threads; ++i)
-            m_threads.emplace_back(Worker, this);
-    }
-
-    ~TaskPoolImpl()
-    {
-        Stop();
-    }
-
-    template<typename F, typename... Args>
-    std::future<typename std::result_of<F(Args...)>::type>
-    AddTask(F&& f, Args&&... args)
-    {
-        auto task = std::make_shared<std::packaged_task<typename std::result_of<F(Args...)>::type()>>(
-            std::bind(std::forward<F>(f), std::forward<Args>(args)...));
-
-        std::unique_lock<std::mutex> lock(m_tasks_mutex);
-        assert(!m_stop && "Can't add task to TaskPool after it is stopped");
-        m_tasks.emplace([task](){ (*task)(); });
-        lock.unlock();
-        m_tasks_cv.notify_one();
-
-        return task->get_future();
-    }
-
-    void
-    Stop()
-    {
-        std::unique_lock<std::mutex> lock(m_tasks_mutex);
-        m_stop = true;
-        m_tasks_mutex.unlock();
-        m_tasks_cv.notify_all();
-        for (auto& t : m_threads)
-            t.join();
-    }
-
-private:
-    static void
-    Worker(TaskPoolImpl* pool)
-    {
-        while (true)
-        {
-            std::unique_lock<std::mutex> lock(pool->m_tasks_mutex);
-            if (pool->m_tasks.empty())
-                pool->m_tasks_cv.wait(lock, [pool](){ return !pool->m_tasks.empty() || pool->m_stop; });
-            if (pool->m_tasks.empty())
-                break;
-
-            std::function<void()> f = pool->m_tasks.front();
-            pool->m_tasks.pop();
-            lock.unlock();
-
-            f();
-        }
-    }
-
-    std::queue<std::function<void()>> m_tasks;
-    std::mutex                        m_tasks_mutex;
-    std::condition_variable           m_tasks_cv;
-    bool                              m_stop;
-    std::vector<std::thread>          m_threads;
-};
-
-class TaskPool
-{
-public:
-    // Add a new task to the thread pool and return a std::future belongs for the newly created task.
-    // The caller of this function have to wait on the future for this task to complete.
-    template<typename F, typename... Args>
-    static std::future<typename std::result_of<F(Args...)>::type>
-    AddTask(F&& f, Args&&... args)
-    {
-        return GetImplementation().AddTask(std::forward<F>(f), std::forward<Args>(args)...);
-    }
-
-    // Run all of the specified tasks on the thread pool and wait until all of them are finished
-    // before returning
-    template<typename... T>
-    static void
-    RunTasks(T&&... t)
-    {
-        RunTaskImpl<T...>::Run(std::forward<T>(t)...);
-    }
-
-private:
-    static TaskPoolImpl&
-    GetImplementation()
-    {
-        static TaskPoolImpl g_task_pool_impl(std::thread::hardware_concurrency());
-        return g_task_pool_impl;
-    }
-
-    template<typename... T>
-    struct RunTaskImpl;
-};
-
-template<typename H, typename... T>
-struct TaskPool::RunTaskImpl<H, T...>
-{
-    static void
-    Run(H&& h, T&&... t)
-    {
-        auto f = AddTask(std::forward<H>(h));
-        RunTaskImpl<T...>::Run(std::forward<T>(t)...);
-        f.wait();
-    }
-};
-
-template<>
-struct TaskPool::RunTaskImpl<>
-{
-    static void
-    Run() {}
-};
-
-int main()
-{
-    std::vector<std::future<uint32_t>> tasks;
-    for (int i = 0; i < 100000; ++i)
-    {
-        tasks.emplace_back(TaskPool::AddTask([](int i){
-            uint32_t s = 0;
-            for (int j = 0; j <= i; ++j)
-                s += j;
-            return s;
-        },
-        i));
-    }
-
-    for (auto& it : tasks)  // Set breakpoint here
-        it.wait();
-
-    TaskPool::RunTasks(
-        []() { return 1; },
-        []() { return "aaaa"; }
-    );
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/TestBacktraceAll.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/TestBacktraceAll.py
deleted file mode 100644 (file)
index 870b6b2..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-"""
-Test regression for Bug 25251.
-"""
-
-import unittest2
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class BacktraceAllTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number for our breakpoint.
-        self.breakpoint = line_number(
-            'ParallelTask.cpp', '// Set breakpoint here')
-
-    # The android-arm compiler can't compile the inferior
-    @skipIfTargetAndroid(archs=["arm"])
-    # because of an issue around std::future.
-    # TODO: Change the test to don't depend on std::future<T>
-    def test(self):
-        """Test breakpoint handling after a thread join."""
-        self.build(dictionary=self.getBuildFlags())
-
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # This should create a breakpoint
-        lldbutil.run_break_set_by_file_and_line(
-            self, "ParallelTask.cpp", self.breakpoint, num_expected_locations=-1)
-
-        # The breakpoint list should show 1 location.
-        self.expect(
-            "breakpoint list -f",
-            "Breakpoint location shown correctly",
-            substrs=[
-                "1: file = 'ParallelTask.cpp', line = %d, exact_match = 0" %
-                self.breakpoint])
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This should not result in a segmentation fault
-        self.expect("thread backtrace all", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=["stop reason = breakpoint 1."])
-
-        # Run to completion
-        self.runCmd("continue")
-
-if __name__ == '__main__':
-    import atexit
-    lldb.SBDebugger.Initialize()
-    atexit.register(lambda: lldb.SBDebugger.Terminate())
-    unittest2.main()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_limit/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_limit/Makefile
deleted file mode 100644 (file)
index 5fd720c..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-CXXFLAGS_EXTRAS := -std=c++11
-CXX_SOURCES := main.cpp
-ENABLE_THREADS := YES
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_limit/TestBacktraceLimit.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_limit/TestBacktraceLimit.py
deleted file mode 100644 (file)
index 6dbb3e3..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-"""
-Test that the target.process.thread.max-backtrace-depth setting works.
-"""
-
-import unittest2
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class BacktraceLimitSettingTest(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_backtrace_depth(self):
-        """Test that the max-backtrace-depth setting limits backtraces."""
-        self.build()
-        self.main_source_file = lldb.SBFileSpec("main.cpp")
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                "Set a breakpoint here", self.main_source_file)
-        interp = self.dbg.GetCommandInterpreter()
-        result = lldb.SBCommandReturnObject()
-        interp.HandleCommand("settings set target.process.thread.max-backtrace-depth 30", result)
-        self.assertEqual(True, result.Succeeded())
-        self.assertEqual(30, thread.GetNumFrames())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_limit/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_limit/main.cpp
deleted file mode 100644 (file)
index eca1ead..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-int bottom () { 
-  return 1;  // Set a breakpoint here
-} 
-int foo(int in) { 
-  if (in > 0)
-    return foo(--in) + 5; 
-  else
-    return bottom();
-}
-int main()
-{
-   return foo(500);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/break_after_join/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/break_after_join/Makefile
deleted file mode 100644 (file)
index 566938c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-ENABLE_THREADS := YES
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py
deleted file mode 100644 (file)
index 391f9d9..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-"""
-Test number of threads.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class BreakpointAfterJoinTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number for our breakpoint.
-        self.breakpoint = line_number('main.cpp', '// Set breakpoint here')
-
-    @expectedFailureAll(
-        oslist=["linux"],
-        bugnumber="llvm.org/pr15824 thread states not properly maintained")
-    @expectedFailureAll(
-        oslist=lldbplatformutil.getDarwinOSTriples(),
-        bugnumber="llvm.org/pr15824 thread states not properly maintained and <rdar://problem/28557237>")
-    @expectedFailureAll(
-        oslist=["freebsd"],
-        bugnumber="llvm.org/pr18190 thread states not properly maintained")
-    @expectedFailureNetBSD
-    def test(self):
-        """Test breakpoint handling after a thread join."""
-        self.build(dictionary=self.getBuildFlags())
-
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # This should create a breakpoint in the main thread.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.breakpoint, num_expected_locations=1)
-
-        # The breakpoint list should show 1 location.
-        self.expect(
-            "breakpoint list -f",
-            "Breakpoint location shown correctly",
-            substrs=[
-                "1: file = 'main.cpp', line = %d, exact_match = 0, locations = 1" %
-                self.breakpoint])
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Get the target process
-        target = self.dbg.GetSelectedTarget()
-        process = target.GetProcess()
-
-        # The exit probably occurred during breakpoint handling, but it isn't
-        # guaranteed.  The main thing we're testing here is that the debugger
-        # handles this cleanly is some way.
-
-        # Get the number of threads
-        num_threads = process.GetNumThreads()
-
-        # Make sure we see at least six threads
-        self.assertTrue(
-            num_threads >= 6,
-            'Number of expected threads and actual threads do not match.')
-
-        # Make sure all threads are stopped
-        for i in range(0, num_threads):
-            self.assertTrue(
-                process.GetThreadAtIndex(i).IsStopped(),
-                "Thread {0} didn't stop during breakpoint.".format(i))
-
-        # Run to completion
-        self.runCmd("continue")
-
-        # If the process hasn't exited, collect some information
-        if process.GetState() != lldb.eStateExited:
-            self.runCmd("thread list")
-            self.runCmd("process status")
-
-        # At this point, the inferior process should have exited.
-        self.assertTrue(
-            process.GetState() == lldb.eStateExited,
-            PROCESS_EXITED)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/break_after_join/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/break_after_join/main.cpp
deleted file mode 100644 (file)
index a589d97..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// This test is intended to create a situation in which one thread will exit
-// while a breakpoint is being handled in another thread.  This may not always
-// happen because it's possible that the exiting thread will exit before the
-// breakpoint is hit.  The test case should be flexible enough to treat that
-// as success.
-
-#include "pseudo_barrier.h"
-#include <chrono>
-#include <thread>
-
-volatile int g_test = 0;
-
-// A barrier to synchronize all the threads.
-pseudo_barrier_t g_barrier1;
-
-// A barrier to keep the threads from exiting until after the breakpoint has
-// been passed.
-pseudo_barrier_t g_barrier2;
-
-void *
-break_thread_func ()
-{
-    // Wait until all the threads are running
-    pseudo_barrier_wait(g_barrier1);
-
-    // Wait for the join thread to join
-    std::this_thread::sleep_for(std::chrono::microseconds(50));
-
-    // Do something
-    g_test++;       // Set breakpoint here
-
-    // Synchronize after the breakpoint
-    pseudo_barrier_wait(g_barrier2);
-
-    // Return
-    return NULL;
-}
-
-void *
-wait_thread_func ()
-{
-    // Wait until the entire first group of threads is running
-    pseudo_barrier_wait(g_barrier1);
-
-    // Wait until the breakpoint has been passed
-    pseudo_barrier_wait(g_barrier2);
-
-    // Return
-    return NULL;
-}
-
-void *
-join_thread_func (void *input)
-{
-    std::thread *thread_to_join = (std::thread *)input;
-
-    // Sync up with the rest of the threads.
-    pseudo_barrier_wait(g_barrier1);
-
-    // Join the other thread
-    thread_to_join->join();
-
-    // Return
-    return NULL;
-}
-
-int main ()
-{
-    // The first barrier waits for the non-joining threads to start.
-    // This thread will also participate in that barrier.
-    // The idea here is to guarantee that the joining thread will be
-    // last in the internal list maintained by the debugger.
-    pseudo_barrier_init(g_barrier1, 5);
-
-    // The second barrier keeps the waiting threads around until the breakpoint
-    // has been passed.
-    pseudo_barrier_init(g_barrier2, 4);
-
-    // Create a thread to hit the breakpoint
-    std::thread thread_1(break_thread_func);
-
-    // Create more threads to slow the debugger down during processing.
-    std::thread thread_2(wait_thread_func);
-    std::thread thread_3(wait_thread_func);
-    std::thread thread_4(wait_thread_func);
-
-    // Create a thread to join the breakpoint thread
-    std::thread thread_5(join_thread_func, &thread_1);
-
-    // Wait for the threads to finish
-    thread_5.join();  // implies thread_1 is already finished
-    thread_4.join();
-    thread_3.join();
-    thread_2.join();
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/Makefile
deleted file mode 100644 (file)
index c33ae56..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-CXX_SOURCES := main.cpp
-
-ENABLE_THREADS := YES
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentBreakpointDelayBreakpointOneSignal.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentBreakpointDelayBreakpointOneSignal.py
deleted file mode 100644 (file)
index a0c1da8..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentBreakpointDelayBreakpointOneSignal(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # timing out on buildbot
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    @expectedFailureNetBSD
-    def test(self):
-        """Test two threads that trigger a breakpoint (one with a 1 second delay) and one signal thread. """
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_breakpoint_threads=1,
-                               num_delay_breakpoint_threads=1,
-                               num_signal_threads=1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentBreakpointOneDelayBreakpointThreads.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentBreakpointOneDelayBreakpointThreads.py
deleted file mode 100644 (file)
index bcee1c5..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentBreakpointOneDelayBreakpointThreads(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # timing out on buildbot
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    def test(self):
-        """Test threads that trigger a breakpoint where one thread has a 1 second delay. """
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_breakpoint_threads=1,
-                               num_delay_breakpoint_threads=1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentBreakpointsDelayedBreakpointOneWatchpoint.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentBreakpointsDelayedBreakpointOneWatchpoint.py
deleted file mode 100644 (file)
index dfe2cb7..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentBreakpointsDelayedBreakpointOneWatchpoint(
-        ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # timing out on buildbot
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    @add_test_categories(["watchpoint"])
-    def test(self):
-        """Test a breakpoint, a delayed breakpoint, and one watchpoint thread. """
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_breakpoint_threads=1,
-                               num_delay_breakpoint_threads=1,
-                               num_watchpoint_threads=1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithBreak.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithBreak.py
deleted file mode 100644 (file)
index 9083c38..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentCrashWithBreak(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # timing out on buildbot
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    def test(self):
-        """ Test a thread that crashes while another thread hits a breakpoint."""
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_crash_threads=1, num_breakpoint_threads=1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithSignal.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithSignal.py
deleted file mode 100644 (file)
index 37795be..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentCrashWithSignal(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # timing out on buildbot
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    def test(self):
-        """ Test a thread that crashes while another thread generates a signal."""
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_crash_threads=1, num_signal_threads=1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpoint.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpoint.py
deleted file mode 100644 (file)
index 13f5b4a..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentCrashWithWatchpoint(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # timing out on buildbot
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    @add_test_categories(["watchpoint"])
-    def test(self):
-        """ Test a thread that crashes while another thread hits a watchpoint."""
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_crash_threads=1, num_watchpoint_threads=1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpointBreakpointSignal.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpointBreakpointSignal.py
deleted file mode 100644 (file)
index 3de0850..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentCrashWithWatchpointBreakpointSignal(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # timing out on buildbot
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    @add_test_categories(["watchpoint"])
-    def test(self):
-        """ Test a thread that crashes while other threads generate a signal and hit a watchpoint and breakpoint. """
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_crash_threads=1,
-                               num_breakpoint_threads=1,
-                               num_signal_threads=1,
-                               num_watchpoint_threads=1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelaySignalBreak.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelaySignalBreak.py
deleted file mode 100644 (file)
index af9c6c9..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentDelaySignalBreak(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # timing out on buildbot
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    def test(self):
-        """Test (1-second delay) signal and a breakpoint in multiple threads."""
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(
-            num_breakpoint_threads=1,
-            num_delay_signal_threads=1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelaySignalWatch.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelaySignalWatch.py
deleted file mode 100644 (file)
index 91358f3..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentDelaySignalWatch(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # timing out on buildbot
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    @add_test_categories(["watchpoint"])
-    def test(self):
-        """Test a watchpoint and a (1 second delay) signal in multiple threads."""
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(
-            num_delay_signal_threads=1,
-            num_watchpoint_threads=1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelayWatchBreak.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelayWatchBreak.py
deleted file mode 100644 (file)
index 8f7a8ba..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentDelayWatchBreak(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # timing out on buildbot
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    @add_test_categories(["watchpoint"])
-    def test(self):
-        """Test (1-second delay) watchpoint and a breakpoint in multiple threads."""
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(
-            num_breakpoint_threads=1,
-            num_delay_watchpoint_threads=1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelayedCrashWithBreakpointSignal.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelayedCrashWithBreakpointSignal.py
deleted file mode 100644 (file)
index 9c1ac90..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentDelayedCrashWithBreakpointSignal(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # timing out on buildbot
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    def test(self):
-        """ Test a thread with a delayed crash while other threads generate a signal and hit a breakpoint. """
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_delay_crash_threads=1,
-                               num_breakpoint_threads=1,
-                               num_signal_threads=1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelayedCrashWithBreakpointWatchpoint.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelayedCrashWithBreakpointWatchpoint.py
deleted file mode 100644 (file)
index 12344ff..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentDelayedCrashWithBreakpointWatchpoint(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # timing out on buildbot
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    @add_test_categories(["watchpoint"])
-    def test(self):
-        """ Test a thread with a delayed crash while other threads hit a watchpoint and a breakpoint. """
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_delay_crash_threads=1,
-                               num_breakpoint_threads=1,
-                               num_watchpoint_threads=1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyBreakpoints.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyBreakpoints.py
deleted file mode 100644 (file)
index bbbfbdb..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentManyBreakpoints(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    @skipIfOutOfTreeDebugserver
-    def test(self):
-        """Test 100 breakpoints from 100 threads."""
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_breakpoint_threads=100)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyCrash.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyCrash.py
deleted file mode 100644 (file)
index 0530728..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentManyCrash(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    @skipIfOutOfTreeDebugserver
-    def test(self):
-        """Test 100 threads that cause a segfault."""
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_crash_threads=100)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManySignals.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManySignals.py
deleted file mode 100644 (file)
index ec06227..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentManySignals(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    # This test is flaky on Darwin.
-    @skipIfDarwin
-    @expectedFailureNetBSD
-    @skipIfOutOfTreeDebugserver
-    def test(self):
-        """Test 100 signals from 100 threads."""
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_signal_threads=100)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyWatchpoints.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyWatchpoints.py
deleted file mode 100644 (file)
index 2274fbb..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentManyWatchpoints(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    @add_test_categories(["watchpoint"])
-    @skipIfOutOfTreeDebugserver
-    def test(self):
-        """Test 100 watchpoints from 100 threads."""
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_watchpoint_threads=100)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentNWatchNBreak.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentNWatchNBreak.py
deleted file mode 100644 (file)
index 2c5205f..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentNWatchNBreak(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # timing out on buildbot
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    @add_test_categories(["watchpoint"])
-    def test(self):
-        """Test with 5 watchpoint and breakpoint threads."""
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_watchpoint_threads=5,
-                               num_breakpoint_threads=5)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalBreak.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalBreak.py
deleted file mode 100644 (file)
index 6c18cb2..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentSignalBreak(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # timing out on buildbot
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    def test(self):
-        """Test signal and a breakpoint in multiple threads."""
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_breakpoint_threads=1, num_signal_threads=1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalDelayBreak.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalDelayBreak.py
deleted file mode 100644 (file)
index e1779b4..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentSignalDelayBreak(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # timing out on buildbot
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    @expectedFailureNetBSD
-    def test(self):
-        """Test signal and a (1 second delay) breakpoint in multiple threads."""
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(
-            num_delay_breakpoint_threads=1,
-            num_signal_threads=1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalDelayWatch.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalDelayWatch.py
deleted file mode 100644 (file)
index d932d5f..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentSignalDelayWatch(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # timing out on buildbot
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    @expectedFailureNetBSD
-    @add_test_categories(["watchpoint"])
-    def test(self):
-        """Test a (1 second delay) watchpoint and a signal in multiple threads."""
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(
-            num_signal_threads=1,
-            num_delay_watchpoint_threads=1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalNWatchNBreak.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalNWatchNBreak.py
deleted file mode 100644 (file)
index 3b005e5..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentSignalNWatchNBreak(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # timing out on buildbot
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    @expectedFailureNetBSD
-    @add_test_categories(["watchpoint"])
-    def test(self):
-        """Test one signal thread with 5 watchpoint and breakpoint threads."""
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_signal_threads=1,
-                               num_watchpoint_threads=5,
-                               num_breakpoint_threads=5)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalWatch.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalWatch.py
deleted file mode 100644 (file)
index 6cf26ae..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentSignalWatch(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # timing out on buildbot
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    @add_test_categories(["watchpoint"])
-    def test(self):
-        """Test a watchpoint and a signal in multiple threads."""
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_signal_threads=1, num_watchpoint_threads=1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalWatchBreak.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalWatchBreak.py
deleted file mode 100644 (file)
index 38a5125..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentSignalWatchBreak(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # timing out on buildbot
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    @expectedFailureNetBSD
-    @add_test_categories(["watchpoint"])
-    def test(self):
-        """Test a signal/watchpoint/breakpoint in multiple threads."""
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_signal_threads=1,
-                               num_watchpoint_threads=1,
-                               num_breakpoint_threads=1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointThreads.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointThreads.py
deleted file mode 100644 (file)
index 5ddc15b..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentTwoBreakpointThreads(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # timing out on buildbot
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    def test(self):
-        """Test two threads that trigger a breakpoint. """
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_breakpoint_threads=2)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneDelaySignal.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneDelaySignal.py
deleted file mode 100644 (file)
index 07f99b0..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentTwoBreakpointsOneDelaySignal(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # timing out on buildbot
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    @expectedFailureNetBSD
-    def test(self):
-        """Test two threads that trigger a breakpoint and one (1 second delay) signal thread. """
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(
-            num_breakpoint_threads=2,
-            num_delay_signal_threads=1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneSignal.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneSignal.py
deleted file mode 100644 (file)
index 1ad1c59..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentTwoBreakpointsOneSignal(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # timing out on buildbot
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    @expectedFailureNetBSD
-    def test(self):
-        """Test two threads that trigger a breakpoint and one signal thread. """
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_breakpoint_threads=2, num_signal_threads=1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneWatchpoint.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneWatchpoint.py
deleted file mode 100644 (file)
index 47e973a..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentTwoBreakpointsOneWatchpoint(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # timing out on buildbot
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    @add_test_categories(["watchpoint"])
-    def test(self):
-        """Test two threads that trigger a breakpoint and one watchpoint thread. """
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(
-            num_breakpoint_threads=2,
-            num_watchpoint_threads=1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointThreads.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointThreads.py
deleted file mode 100644 (file)
index bdc6f8e..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentTwoWatchpointThreads(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # timing out on buildbot
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    @add_test_categories(["watchpoint"])
-    def test(self):
-        """Test two threads that trigger a watchpoint. """
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_watchpoint_threads=2)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneBreakpoint.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneBreakpoint.py
deleted file mode 100644 (file)
index 163f76d..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentTwoWatchpointsOneBreakpoint(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # timing out on buildbot
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    @add_test_categories(["watchpoint"])
-    def test(self):
-        """Test two threads that trigger a watchpoint and one breakpoint thread. """
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(
-            num_watchpoint_threads=2,
-            num_breakpoint_threads=1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneDelayBreakpoint.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneDelayBreakpoint.py
deleted file mode 100644 (file)
index 1ec5e06..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentTwoWatchpointsOneDelayBreakpoint(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # timing out on buildbot
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    @add_test_categories(["watchpoint"])
-    def test(self):
-        """Test two threads that trigger a watchpoint and one (1 second delay) breakpoint thread. """
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(
-            num_watchpoint_threads=2,
-            num_delay_breakpoint_threads=1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneSignal.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneSignal.py
deleted file mode 100644 (file)
index 8f044ba..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentTwoWatchpointsOneSignal(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # timing out on buildbot
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    @expectedFailureNetBSD
-    @add_test_categories(["watchpoint"])
-    def test(self):
-        """Test two threads that trigger a watchpoint and one signal thread. """
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_watchpoint_threads=2, num_signal_threads=1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentWatchBreak.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentWatchBreak.py
deleted file mode 100644 (file)
index 4a41808..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentWatchBreak(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # timing out on buildbot
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    @add_test_categories(["watchpoint"])
-    def test(self):
-        """Test watchpoint and a breakpoint in multiple threads."""
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(
-            num_breakpoint_threads=1,
-            num_watchpoint_threads=1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentWatchBreakDelay.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentWatchBreakDelay.py
deleted file mode 100644 (file)
index 2bc0839..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentWatchBreakDelay(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # timing out on buildbot
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    @add_test_categories(["watchpoint"])
-    def test(self):
-        """Test watchpoint and a (1 second delay) breakpoint in multiple threads."""
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(
-            num_delay_breakpoint_threads=1,
-            num_watchpoint_threads=1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentWatchpointDelayWatchpointOneBreakpoint.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentWatchpointDelayWatchpointOneBreakpoint.py
deleted file mode 100644 (file)
index dce84fe..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentWatchpointDelayWatchpointOneBreakpoint(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # timing out on buildbot
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    @add_test_categories(["watchpoint"])
-    def test(self):
-        """Test two threads that trigger a watchpoint (one with a 1 second delay) and one breakpoint thread. """
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_watchpoint_threads=1,
-                               num_delay_watchpoint_threads=1,
-                               num_breakpoint_threads=1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentWatchpointWithDelayWatchpointThreads.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentWatchpointWithDelayWatchpointThreads.py
deleted file mode 100644 (file)
index 87b8ea0..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.concurrent_base import ConcurrentEventsBase
-from lldbsuite.test.lldbtest import TestBase
-
-
-@skipIfWindows
-class ConcurrentWatchpointWithDelayWatchpointThreads(ConcurrentEventsBase):
-
-    mydir = ConcurrentEventsBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # timing out on buildbot
-    # Atomic sequences are not supported yet for MIPS in LLDB.
-    @skipIf(triple='^mips')
-    @add_test_categories(["watchpoint"])
-    def test(self):
-        """Test two threads that trigger a watchpoint where one thread has a 1 second delay. """
-        self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_watchpoint_threads=1,
-                               num_delay_watchpoint_threads=1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/main.cpp
deleted file mode 100644 (file)
index 33ec8ad..0000000
+++ /dev/null
@@ -1,187 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// This test is intended to create a situation in which multiple events
-// (breakpoints, watchpoints, crashes, and signal generation/delivery) happen
-// from multiple threads. The test expects the debugger to set a breakpoint on
-// the main thread (before any worker threads are spawned) and modify variables
-// which control the number of threads that are spawned for each action.
-
-#include "pseudo_barrier.h"
-#include <vector>
-using namespace std;
-
-#include <pthread.h>
-
-#include <signal.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-typedef std::vector<std::pair<unsigned, void*(*)(void*)> > action_counts;
-typedef std::vector<pthread_t> thread_vector;
-
-pseudo_barrier_t g_barrier;
-int g_breakpoint = 0;
-int g_sigusr1_count = 0;
-uint32_t g_watchme;
-
-struct action_args {
-  int delay;
-};
-
-// Perform any extra actions required by thread 'input' arg
-void do_action_args(void *input) {
-    if (input) {
-      action_args *args = static_cast<action_args*>(input);
-      sleep(args->delay);
-    }
-}
-
-void *
-breakpoint_func (void *input)
-{
-    // Wait until all threads are running
-    pseudo_barrier_wait(g_barrier);
-    do_action_args(input);
-
-    // Do something
-    g_breakpoint++;       // Set breakpoint here
-    return 0;
-}
-
-void *
-signal_func (void *input) {
-    // Wait until all threads are running
-    pseudo_barrier_wait(g_barrier);
-    do_action_args(input);
-
-    // Send a user-defined signal to the current process
-    //kill(getpid(), SIGUSR1);
-    // Send a user-defined signal to the current thread
-    pthread_kill(pthread_self(), SIGUSR1);
-
-    return 0;
-}
-
-void *
-watchpoint_func (void *input) {
-    pseudo_barrier_wait(g_barrier);
-    do_action_args(input);
-
-    g_watchme = 1;     // watchpoint triggers here
-    return 0;
-}
-
-void *
-crash_func (void *input) {
-    pseudo_barrier_wait(g_barrier);
-    do_action_args(input);
-
-    int *a = 0;
-    *a = 5; // crash happens here
-    return 0;
-}
-
-void sigusr1_handler(int sig) {
-    if (sig == SIGUSR1)
-        g_sigusr1_count += 1; // Break here in signal handler
-}
-
-/// Register a simple function for to handle signal
-void register_signal_handler(int signal, void (*handler)(int))
-{
-    sigset_t empty_sigset;
-    sigemptyset(&empty_sigset);
-
-    struct sigaction action;
-    action.sa_sigaction = 0;
-    action.sa_mask = empty_sigset;
-    action.sa_flags = 0;
-    action.sa_handler = handler;
-    sigaction(SIGUSR1, &action, 0);
-}
-
-void start_threads(thread_vector& threads,
-                   action_counts& actions,
-                   void* args = 0) {
-    action_counts::iterator b = actions.begin(), e = actions.end();
-    for(action_counts::iterator i = b; i != e; ++i) {
-        for(unsigned count = 0; count < i->first; ++count) {
-            pthread_t t;
-            pthread_create(&t, 0, i->second, args);
-            threads.push_back(t);
-        }
-    }
-}
-
-int dotest()
-{
-    g_watchme = 0;
-
-    // Actions are triggered immediately after the thread is spawned
-    unsigned num_breakpoint_threads = 1;
-    unsigned num_watchpoint_threads = 0;
-    unsigned num_signal_threads = 1;
-    unsigned num_crash_threads = 0;
-
-    // Actions below are triggered after a 1-second delay
-    unsigned num_delay_breakpoint_threads = 0;
-    unsigned num_delay_watchpoint_threads = 0;
-    unsigned num_delay_signal_threads = 0;
-    unsigned num_delay_crash_threads = 0;
-
-    register_signal_handler(SIGUSR1, sigusr1_handler); // Break here and adjust num_[breakpoint|watchpoint|signal|crash]_threads
-
-    unsigned total_threads = num_breakpoint_threads \
-                             + num_watchpoint_threads \
-                             + num_signal_threads \
-                             + num_crash_threads \
-                             + num_delay_breakpoint_threads \
-                             + num_delay_watchpoint_threads \
-                             + num_delay_signal_threads \
-                             + num_delay_crash_threads;
-
-    // Don't let either thread do anything until they're both ready.
-    pseudo_barrier_init(g_barrier, total_threads);
-
-    action_counts actions;
-    actions.push_back(std::make_pair(num_breakpoint_threads, breakpoint_func));
-    actions.push_back(std::make_pair(num_watchpoint_threads, watchpoint_func));
-    actions.push_back(std::make_pair(num_signal_threads, signal_func));
-    actions.push_back(std::make_pair(num_crash_threads, crash_func));
-
-    action_counts delay_actions;
-    delay_actions.push_back(std::make_pair(num_delay_breakpoint_threads, breakpoint_func));
-    delay_actions.push_back(std::make_pair(num_delay_watchpoint_threads, watchpoint_func));
-    delay_actions.push_back(std::make_pair(num_delay_signal_threads, signal_func));
-    delay_actions.push_back(std::make_pair(num_delay_crash_threads, crash_func));
-
-    // Create threads that handle instant actions
-    thread_vector threads;
-    start_threads(threads, actions);
-
-    // Create threads that handle delayed actions
-    action_args delay_arg;
-    delay_arg.delay = 1;
-    start_threads(threads, delay_actions, &delay_arg);
-
-    // Join all threads
-    typedef std::vector<pthread_t>::iterator thread_iterator;
-    for(thread_iterator t = threads.begin(); t != threads.end(); ++t)
-        pthread_join(*t, 0);
-
-    return 0;
-}
-
-int main ()
-{
-    dotest();
-    return 0; // Break here and verify one thread is active.
-}
-
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/Makefile
deleted file mode 100644 (file)
index 3d0b98f..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-CXX_SOURCES := main.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py
deleted file mode 100644 (file)
index 3394bb2..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-"""
-Test that step-inst over a crash behaves correctly.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class CrashDuringStepTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        TestBase.setUp(self)
-        self.breakpoint = line_number('main.cpp', '// Set breakpoint here')
-
-    # IO error due to breakpoint at invalid address
-    @expectedFailureAll(triple=re.compile('^mips'))
-    def test_step_inst_with(self):
-        """Test thread creation during step-inst handling."""
-        self.build(dictionary=self.getBuildFlags())
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target and target.IsValid(), "Target is valid")
-
-        self.bp_num = lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.breakpoint, num_expected_locations=1)
-
-        # Run the program.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process and process.IsValid(), PROCESS_IS_VALID)
-
-        # The stop reason should be breakpoint.
-        self.assertEqual(
-            process.GetState(),
-            lldb.eStateStopped,
-            PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(thread.IsValid(), STOPPED_DUE_TO_BREAKPOINT)
-
-        # Keep stepping until the inferior crashes
-        while process.GetState() == lldb.eStateStopped and not lldbutil.is_thread_crashed(self, thread):
-            thread.StepInstruction(False)
-
-        self.assertEqual(
-            process.GetState(),
-            lldb.eStateStopped,
-            PROCESS_STOPPED)
-        self.assertTrue(
-            lldbutil.is_thread_crashed(
-                self,
-                thread),
-            "Thread has crashed")
-        process.Kill()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/main.cpp
deleted file mode 100644 (file)
index 34cccf4..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-void (*crash)() = nullptr;
-
-int main()
-{
-    crash(); // Set breakpoint here
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/Makefile
deleted file mode 100644 (file)
index 566938c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-ENABLE_THREADS := YES
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
deleted file mode 100644 (file)
index 59fb3b6..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-"""
-Test thread creation after process attach.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class CreateAfterAttachTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # Hangs.  May be the same as Linux issue llvm.org/pr16229 but
-    # not yet investigated.  Revisit once required functionality
-    # is implemented for FreeBSD.
-    # Occasionally hangs on Windows, may be same as other issues.
-    @skipIfWindows
-    @skipIfiOSSimulator
-    @expectedFailureNetBSD
-    def test_create_after_attach_with_popen(self):
-        """Test thread creation after process attach."""
-        self.build(dictionary=self.getBuildFlags(use_cpp11=False))
-        self.create_after_attach(use_fork=False)
-
-    @skipIfFreeBSD  # Hangs. Revisit once required functionality is implemented
-    # for FreeBSD.
-    @skipIfRemote
-    @skipIfWindows  # Windows doesn't have fork.
-    @skipIfiOSSimulator
-    @expectedFailureNetBSD
-    def test_create_after_attach_with_fork(self):
-        """Test thread creation after process attach."""
-        self.build(dictionary=self.getBuildFlags(use_cpp11=False))
-        self.create_after_attach(use_fork=True)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers for our breakpoints.
-        self.break_1 = line_number('main.cpp', '// Set first breakpoint here')
-        self.break_2 = line_number('main.cpp', '// Set second breakpoint here')
-        self.break_3 = line_number('main.cpp', '// Set third breakpoint here')
-
-    def create_after_attach(self, use_fork):
-        """Test thread creation after process attach."""
-
-        exe = self.getBuildArtifact("a.out")
-
-        # Spawn a new process
-        if use_fork:
-            pid = self.forkSubprocess(exe)
-        else:
-            popen = self.spawnSubprocess(exe)
-            pid = popen.pid
-        self.addTearDownHook(self.cleanupSubprocesses)
-
-        # Attach to the spawned process
-        self.runCmd("process attach -p " + str(pid))
-
-        target = self.dbg.GetSelectedTarget()
-
-        process = target.GetProcess()
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # This should create a breakpoint in the main thread.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.break_1, num_expected_locations=1)
-
-        # This should create a breakpoint in the second child thread.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.break_2, num_expected_locations=1)
-
-        # This should create a breakpoint in the first child thread.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.break_3, num_expected_locations=1)
-
-        # Note:  With std::thread, we cannot rely on particular thread numbers.  Using
-        # std::thread may cause the program to spin up a thread pool (and it does on
-        # Windows), so the thread numbers are non-deterministic.
-
-        # Run to the first breakpoint
-        self.runCmd("continue")
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             '* thread #',
-                             'main',
-                             'stop reason = breakpoint'])
-
-        # Change a variable to escape the loop
-        self.runCmd("expression main_thread_continue = 1")
-
-        # Run to the second breakpoint
-        self.runCmd("continue")
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             '* thread #',
-                             'thread_2_func',
-                             'stop reason = breakpoint'])
-
-        # Change a variable to escape the loop
-        self.runCmd("expression child_thread_continue = 1")
-
-        # Run to the third breakpoint
-        self.runCmd("continue")
-
-        # The stop reason of the thread should be breakpoint.
-        # Thread 3 may or may not have already exited.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             '* thread #',
-                             'thread_1_func',
-                             'stop reason = breakpoint'])
-
-        # Run to completion
-        self.runCmd("continue")
-
-        # At this point, the inferior process should have exited.
-        self.assertTrue(
-            process.GetState() == lldb.eStateExited,
-            PROCESS_EXITED)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/main.cpp
deleted file mode 100644 (file)
index d8f06e5..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-#include <stdio.h>
-#include <chrono>
-#include <thread>
-
-using std::chrono::microseconds;
-
-volatile int g_thread_2_continuing = 0;
-
-void *
-thread_1_func (void *input)
-{
-    // Waiting to be released by the debugger.
-    while (!g_thread_2_continuing) // Another thread will change this value
-    {
-        std::this_thread::sleep_for(microseconds(1));
-    }
-
-    // Return
-    return NULL;  // Set third breakpoint here
-}
-
-void *
-thread_2_func (void *input)
-{
-    // Waiting to be released by the debugger.
-    int child_thread_continue = 0;
-    while (!child_thread_continue) // The debugger will change this value
-    {
-        std::this_thread::sleep_for(microseconds(1));  // Set second breakpoint here
-    }
-
-    // Release thread 1
-    g_thread_2_continuing = 1;
-
-    // Return
-    return NULL;
-}
-
-int main(int argc, char const *argv[])
-{
-    lldb_enable_attach();
-
-    // Create a new thread
-    std::thread thread_1(thread_1_func, nullptr);
-
-    // Waiting to be attached by the debugger.
-    int main_thread_continue = 0;
-    while (!main_thread_continue) // The debugger will change this value
-    {
-        std::this_thread::sleep_for(microseconds(1));  // Set first breakpoint here
-    }
-
-    // Create another new thread
-    std::thread thread_2(thread_2_func, nullptr);
-
-    // Wait for the threads to finish.
-    thread_1.join();
-    thread_2.join();
-
-    printf("Exiting now\n");
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_during_step/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_during_step/Makefile
deleted file mode 100644 (file)
index 566938c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-ENABLE_THREADS := YES
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_during_step/TestCreateDuringStep.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_during_step/TestCreateDuringStep.py
deleted file mode 100644 (file)
index fa8c943..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-"""
-Test number of threads.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class CreateDuringStepTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(
-        oslist=["linux"],
-        bugnumber="llvm.org/pr15824 thread states not properly maintained")
-    @expectedFailureAll(
-        oslist=lldbplatformutil.getDarwinOSTriples(),
-        bugnumber="llvm.org/pr15824 thread states not properly maintained, <rdar://problem/28557237>")
-    @expectedFailureAll(
-        oslist=["freebsd"],
-        bugnumber="llvm.org/pr18190 thread states not properly maintained")
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly")
-    @expectedFailureNetBSD
-    def test_step_inst(self):
-        """Test thread creation during step-inst handling."""
-        self.build(dictionary=self.getBuildFlags())
-        self.create_during_step_base(
-            "thread step-inst -m all-threads",
-            'stop reason = instruction step')
-
-    @expectedFailureAll(
-        oslist=["linux"],
-        bugnumber="llvm.org/pr15824 thread states not properly maintained")
-    @expectedFailureAll(
-        oslist=lldbplatformutil.getDarwinOSTriples(),
-        bugnumber="llvm.org/pr15824 thread states not properly maintained, <rdar://problem/28557237>")
-    @expectedFailureAll(
-        oslist=["freebsd"],
-        bugnumber="llvm.org/pr18190 thread states not properly maintained")
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly")
-    @expectedFailureNetBSD
-    def test_step_over(self):
-        """Test thread creation during step-over handling."""
-        self.build(dictionary=self.getBuildFlags())
-        self.create_during_step_base(
-            "thread step-over -m all-threads",
-            'stop reason = step over')
-
-    @expectedFailureAll(
-        oslist=["linux"],
-        bugnumber="llvm.org/pr15824 thread states not properly maintained")
-    @expectedFailureAll(
-        oslist=lldbplatformutil.getDarwinOSTriples(),
-        bugnumber="<rdar://problem/28574077>")
-    @expectedFailureAll(
-        oslist=["freebsd"],
-        bugnumber="llvm.org/pr18190 thread states not properly maintained")
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly")
-    @expectedFailureNetBSD
-    def test_step_in(self):
-        """Test thread creation during step-in handling."""
-        self.build(dictionary=self.getBuildFlags())
-        self.create_during_step_base(
-            "thread step-in -m all-threads",
-            'stop reason = step in')
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers to break and continue.
-        self.breakpoint = line_number('main.cpp', '// Set breakpoint here')
-        self.continuepoint = line_number('main.cpp', '// Continue from here')
-
-    def create_during_step_base(self, step_cmd, step_stop_reason):
-        """Test thread creation while using step-in."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Get the target process
-        target = self.dbg.GetSelectedTarget()
-
-        # This should create a breakpoint in the stepping thread.
-        self.bkpt = target.BreakpointCreateByLocation("main.cpp", self.breakpoint)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        process = target.GetProcess()
-
-        # The stop reason of the thread should be breakpoint.
-        stepping_thread = lldbutil.get_one_thread_stopped_at_breakpoint(process, self.bkpt)
-        self.assertTrue(stepping_thread.IsValid(), "We stopped at the right breakpoint")
-
-        # Get the number of threads
-        num_threads = process.GetNumThreads()
-
-        # Make sure we see only two threads
-        self.assertTrue(
-            num_threads == 2,
-            'Number of expected threads and actual threads do not match.')
-
-        # Get the thread objects
-        thread1 = process.GetThreadAtIndex(0)
-        thread2 = process.GetThreadAtIndex(1)
-
-        current_line = self.breakpoint
-        # Keep stepping until we've reached our designated continue point
-        while current_line != self.continuepoint:
-            if stepping_thread != process.GetSelectedThread():
-                process.SetSelectedThread(stepping_thread)
-
-            self.runCmd(step_cmd)
-
-            frame = stepping_thread.GetFrameAtIndex(0)
-            current_line = frame.GetLineEntry().GetLine()
-
-            # Make sure we're still where we thought we were
-            self.assertTrue(
-                current_line >= self.breakpoint,
-                "Stepped to unexpected line, " +
-                str(current_line))
-            self.assertTrue(
-                current_line <= self.continuepoint,
-                "Stepped to unexpected line, " +
-                str(current_line))
-
-        # Update the number of threads
-        num_threads = process.GetNumThreads()
-
-        # Check to see that we increased the number of threads as expected
-        self.assertTrue(
-            num_threads == 3,
-            'Number of expected threads and actual threads do not match after thread exit.')
-
-        stop_reason = stepping_thread.GetStopReason()
-        self.assertEqual(stop_reason, lldb.eStopReasonPlanComplete, "Stopped for plan completion")
-
-        # Run to completion
-        self.runCmd("process continue")
-
-        # At this point, the inferior process should have exited.
-        self.assertTrue(
-            process.GetState() == lldb.eStateExited,
-            PROCESS_EXITED)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_during_step/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_during_step/main.cpp
deleted file mode 100644 (file)
index d09bdb0..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// This test is intended to create a situation in which one thread will be
-// created while the debugger is stepping in another thread.
-
-#include "pseudo_barrier.h"
-#include <thread>
-
-#define do_nothing()
-
-pseudo_barrier_t g_barrier;
-
-volatile int g_thread_created = 0;
-volatile int g_test = 0;
-
-void *
-step_thread_func ()
-{
-    g_test = 0;         // Set breakpoint here
-
-    while (!g_thread_created)
-        g_test++;
-
-    // One more time to provide a continue point
-    g_test++;           // Continue from here
-
-    // Return
-    return NULL;
-}
-
-void *
-create_thread_func (void *input)
-{
-    std::thread *step_thread = (std::thread*)input;
-
-    // Wait until the main thread knows this thread is started.
-    pseudo_barrier_wait(g_barrier);
-
-    // Wait until the other thread is done.
-    step_thread->join();
-
-    // Return
-    return NULL;
-}
-
-int main ()
-{
-    // Use a simple count to simulate a barrier.
-    pseudo_barrier_init(g_barrier, 2);
-
-    // Create a thread to hit the breakpoint.
-    std::thread thread_1(step_thread_func);
-
-    // Wait until the step thread is stepping
-    while (g_test < 1)
-        do_nothing();
-
-    // Create a thread to exit while we're stepping.
-    std::thread thread_2(create_thread_func, &thread_1);
-
-    // Wait until that thread is started
-    pseudo_barrier_wait(g_barrier);
-
-    // Let the stepping thread know the other thread is there
-    g_thread_created = 1;
-
-    // Wait for the threads to finish.
-    thread_2.join();
-    thread_1.join();
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/Makefile
deleted file mode 100644 (file)
index 566938c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-ENABLE_THREADS := YES
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py
deleted file mode 100644 (file)
index 130abfe..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-"""
-Test number of threads.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ExitDuringBreakpointTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number for our breakpoint.
-        self.breakpoint = line_number('main.cpp', '// Set breakpoint here')
-
-    def test(self):
-        """Test thread exit during breakpoint handling."""
-        self.build(dictionary=self.getBuildFlags())
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # This should create a breakpoint in the main thread.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.breakpoint, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Get the target process
-        target = self.dbg.GetSelectedTarget()
-        process = target.GetProcess()
-
-        # The exit probably occurred during breakpoint handling, but it isn't
-        # guaranteed.  The main thing we're testing here is that the debugger
-        # handles this cleanly is some way.
-
-        # Get the number of threads
-        num_threads = process.GetNumThreads()
-
-        # Make sure we see at least five threads
-        self.assertTrue(
-            num_threads >= 5,
-            'Number of expected threads and actual threads do not match.')
-
-        # Run to completion
-        self.runCmd("continue")
-
-        # At this point, the inferior process should have exited.
-        self.assertTrue(
-            process.GetState() == lldb.eStateExited,
-            PROCESS_EXITED)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/main.cpp
deleted file mode 100644 (file)
index ec28678..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// This test is intended to create a situation in which one thread will exit
-// while a breakpoint is being handled in another thread.  This may not always
-// happen because it's possible that the exiting thread will exit before the
-// breakpoint is hit.  The test case should be flexible enough to treat that
-// as success.
-
-#include "pseudo_barrier.h"
-#include <chrono>
-#include <thread>
-
-volatile int g_test = 0;
-
-// A barrier to synchronize all the threads except the one that will exit.
-pseudo_barrier_t g_barrier1;
-
-// A barrier to synchronize all the threads including the one that will exit.
-pseudo_barrier_t g_barrier2;
-
-// A barrier to keep the first group of threads from exiting until after the
-// breakpoint has been passed.
-pseudo_barrier_t g_barrier3;
-
-void *
-break_thread_func ()
-{
-    // Wait until the entire first group of threads is running
-    pseudo_barrier_wait(g_barrier1);
-
-    // Wait for the exiting thread to start
-    pseudo_barrier_wait(g_barrier2);
-
-    // Do something
-    g_test++;       // Set breakpoint here
-
-    // Synchronize after the breakpoint
-    pseudo_barrier_wait(g_barrier3);
-
-    // Return
-    return NULL;
-}
-
-void *
-wait_thread_func ()
-{
-    // Wait until the entire first group of threads is running
-    pseudo_barrier_wait(g_barrier1);
-
-    // Wait for the exiting thread to start
-    pseudo_barrier_wait(g_barrier2);
-
-    // Wait until the breakpoint has been passed
-    pseudo_barrier_wait(g_barrier3);
-
-    // Return
-    return NULL;
-}
-
-void *
-exit_thread_func ()
-{
-    // Sync up with the rest of the threads.
-    pseudo_barrier_wait(g_barrier2);
-
-    // Try to make sure this thread doesn't exit until the breakpoint is hit.
-    std::this_thread::sleep_for(std::chrono::microseconds(1));
-
-    // Return
-    return NULL;
-}
-
-int main ()
-{
-
-    // The first barrier waits for the non-exiting threads to start.
-    // This thread will also participate in that barrier.
-    // The idea here is to guarantee that the exiting thread will be
-    // last in the internal list maintained by the debugger.
-    pseudo_barrier_init(g_barrier1, 5);
-
-    // The second break synchronizes thread execution with the breakpoint.
-    pseudo_barrier_init(g_barrier2, 5);
-
-    // The third barrier keeps the waiting threads around until the breakpoint
-    // has been passed.
-    pseudo_barrier_init(g_barrier3, 4);
-
-    // Create a thread to hit the breakpoint
-    std::thread thread_1(break_thread_func);
-
-    // Create more threads to slow the debugger down during processing.
-    std::thread thread_2(wait_thread_func);
-    std::thread thread_3(wait_thread_func);
-    std::thread thread_4(wait_thread_func);
-
-    // Wait for all these threads to get started.
-    pseudo_barrier_wait(g_barrier1);
-
-    // Create a thread to exit during the breakpoint
-    std::thread thread_5(exit_thread_func);
-
-    // Wait for the threads to finish
-    thread_5.join();
-    thread_4.join();
-    thread_3.join();
-    thread_2.join();
-    thread_1.join();
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/Makefile
deleted file mode 100644 (file)
index ebecfbf..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-ENABLE_THREADS := YES
-CXX_SOURCES := main.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/TestExitDuringStep.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/TestExitDuringStep.py
deleted file mode 100644 (file)
index d35bd45..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-"""
-Test number of threads.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ExitDuringStepTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD  # llvm.org/pr21411: test is hanging
-    @skipIfWindows # This is flakey on Windows: llvm.org/pr38373
-    def test(self):
-        """Test thread exit during step handling."""
-        self.build(dictionary=self.getBuildFlags())
-        self.exit_during_step_base(
-            "thread step-inst -m all-threads",
-            'stop reason = instruction step',
-            True)
-
-    @skipIfFreeBSD  # llvm.org/pr21411: test is hanging
-    @skipIfWindows # This is flakey on Windows: llvm.org/pr38373
-    def test_step_over(self):
-        """Test thread exit during step-over handling."""
-        self.build(dictionary=self.getBuildFlags())
-        self.exit_during_step_base(
-            "thread step-over -m all-threads",
-            'stop reason = step over',
-            False)
-
-    @skipIfFreeBSD  # llvm.org/pr21411: test is hanging
-    @skipIfWindows # This is flakey on Windows: llvm.org/pr38373
-    def test_step_in(self):
-        """Test thread exit during step-in handling."""
-        self.build(dictionary=self.getBuildFlags())
-        self.exit_during_step_base(
-            "thread step-in -m all-threads",
-            'stop reason = step in',
-            False)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers to break and continue.
-        self.breakpoint = line_number('main.cpp', '// Set breakpoint here')
-        self.continuepoint = line_number('main.cpp', '// Continue from here')
-
-    def exit_during_step_base(self, step_cmd, step_stop_reason, by_instruction):
-        """Test thread exit during step handling."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # This should create a breakpoint in the main thread.
-        self.bp_num = lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.breakpoint, num_expected_locations=1)
-
-        # The breakpoint list should show 1 location.
-        self.expect(
-            "breakpoint list -f",
-            "Breakpoint location shown correctly",
-            substrs=[
-                "1: file = 'main.cpp', line = %d, exact_match = 0, locations = 1" %
-                self.breakpoint])
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Get the target process
-        target = self.dbg.GetSelectedTarget()
-        process = target.GetProcess()
-
-        num_threads = process.GetNumThreads()
-        # Make sure we see all three threads
-        self.assertGreaterEqual(
-            num_threads,
-            3,
-            'Number of expected threads and actual threads do not match.')
-
-        stepping_thread = lldbutil.get_one_thread_stopped_at_breakpoint_id(
-            process, self.bp_num)
-        self.assertIsNotNone(
-            stepping_thread,
-            "Could not find a thread stopped at the breakpoint")
-
-        current_line = self.breakpoint
-        stepping_frame = stepping_thread.GetFrameAtIndex(0)
-        self.assertEqual(
-            current_line,
-            stepping_frame.GetLineEntry().GetLine(),
-            "Starting line for stepping doesn't match breakpoint line.")
-
-        # Keep stepping until we've reached our designated continue point
-        while current_line != self.continuepoint:
-            # Since we're using the command interpreter to issue the thread command
-            # (on the selected thread) we need to ensure the selected thread is the
-            # stepping thread.
-            if stepping_thread != process.GetSelectedThread():
-                process.SetSelectedThread(stepping_thread)
-
-            self.runCmd(step_cmd)
-
-            frame = stepping_thread.GetFrameAtIndex(0)
-
-            current_line = frame.GetLineEntry().GetLine()
-
-            if by_instruction and current_line == 0:
-                continue
-
-            self.assertGreaterEqual(
-                current_line,
-                self.breakpoint,
-                "Stepped to unexpected line, " +
-                str(current_line))
-            self.assertLessEqual(
-                current_line,
-                self.continuepoint,
-                "Stepped to unexpected line, " +
-                str(current_line))
-
-        self.runCmd("thread list")
-
-        # Update the number of threads
-        new_num_threads = process.GetNumThreads()
-
-        # Check to see that we reduced the number of threads as expected
-        self.assertEqual(
-            new_num_threads,
-            num_threads - 1,
-            'Number of threads did not reduce by 1 after thread exit.')
-
-        self.expect("thread list", 'Process state is stopped due to step',
-                    substrs=['stopped',
-                             step_stop_reason])
-
-        # Run to completion
-        self.runCmd("continue")
-
-        # At this point, the inferior process should have exited.
-        self.assertEqual(process.GetState(), lldb.eStateExited, PROCESS_EXITED)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/main.cpp
deleted file mode 100644 (file)
index 0e2ae00..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// This test is intended to create a situation in which one thread will exit
-// while the debugger is stepping in another thread.
-
-#include "pseudo_barrier.h"
-#include <thread>
-
-#define do_nothing()
-
-// A barrier to synchronize thread start.
-pseudo_barrier_t g_barrier;
-
-volatile int g_thread_exited = 0;
-
-volatile int g_test = 0;
-
-void *
-step_thread_func ()
-{
-    // Wait until both threads are started.
-    pseudo_barrier_wait(g_barrier);
-
-    g_test = 0;         // Set breakpoint here
-
-    while (!g_thread_exited)
-        g_test++;
-
-    // One more time to provide a continue point
-    g_test++;           // Continue from here
-
-    // Return
-    return NULL;
-}
-
-void *
-exit_thread_func ()
-{
-    // Wait until both threads are started.
-    pseudo_barrier_wait(g_barrier);
-
-    // Wait until the other thread is stepping.
-    while (g_test == 0)
-      do_nothing();
-
-    // Return
-    return NULL;
-}
-
-int main ()
-{
-    // Synchronize thread start so that doesn't happen during stepping.
-    pseudo_barrier_init(g_barrier, 2);
-
-    // Create a thread to hit the breakpoint.
-    std::thread thread_1(step_thread_func);
-
-    // Create a thread to exit while we're stepping.
-    std::thread thread_2(exit_thread_func);
-
-    // Wait for the exit thread to finish.
-    thread_2.join();
-
-    // Let the stepping thread know the other thread is gone.
-    g_thread_exited = 1;
-
-    // Wait for the stepping thread to finish.
-    thread_1.join();
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/jump/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/jump/Makefile
deleted file mode 100644 (file)
index 6e962b9..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-ENABLE_THREADS := YES
-CXX_SOURCES := main.cpp other.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/jump/TestThreadJump.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/jump/TestThreadJump.py
deleted file mode 100644 (file)
index 2035435..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-"""
-Test jumping to different places.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ThreadJumpTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test(self):
-        """Test thread jump handling."""
-        self.build(dictionary=self.getBuildFlags())
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Find the line numbers for our breakpoints.
-        self.mark1 = line_number('main.cpp', '// 1st marker')
-        self.mark2 = line_number('main.cpp', '// 2nd marker')
-        self.mark3 = line_number('main.cpp', '// 3rd marker')
-        self.mark4 = line_number('main.cpp', '// 4th marker')
-        self.mark5 = line_number('other.cpp', '// other marker')
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.mark3, num_expected_locations=1)
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint 1.
-        self.expect(
-            "thread list",
-            STOPPED_DUE_TO_BREAKPOINT + " 1",
-            substrs=[
-                'stopped',
-                'main.cpp:{}'.format(
-                    self.mark3),
-                'stop reason = breakpoint 1'])
-
-        # Try the int path, force it to return 'a'
-        self.do_min_test(self.mark3, self.mark1, "i", "4")
-        # Try the int path, force it to return 'b'
-        self.do_min_test(self.mark3, self.mark2, "i", "5")
-        # Try the double path, force it to return 'a'
-        self.do_min_test(self.mark4, self.mark1, "j", "7")
-        # Expected to fail on powerpc64le architecture
-        if not self.isPPC64le():
-            # Try the double path, force it to return 'b'
-            self.do_min_test(self.mark4, self.mark2, "j", "8")
-
-        # Try jumping to another function in a different file.
-        self.runCmd(
-            "thread jump --file other.cpp --line %i --force" %
-            self.mark5)
-        self.expect("process status",
-                    substrs=["at other.cpp:%i" % self.mark5])
-
-        # Try jumping to another function (without forcing)
-        self.expect(
-            "j main.cpp:%i" %
-            self.mark1,
-            COMMAND_FAILED_AS_EXPECTED,
-            error=True,
-            substrs=["error"])
-
-    def do_min_test(self, start, jump, var, value):
-        # jump to the start marker
-        self.runCmd("j %i" % start)
-        self.runCmd("thread step-in")                   # step into the min fn
-        # jump to the branch we're interested in
-        self.runCmd("j %i" % jump)
-        self.runCmd("thread step-out")                  # return out
-        self.runCmd("thread step-over")                 # assign to the global
-        self.expect("expr %s" % var, substrs=[value])  # check it
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/jump/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/jump/main.cpp
deleted file mode 100644 (file)
index e0580bd..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// This test verifies the correct handling of program counter jumps.
-
-int otherfn();
-
-template<typename T>
-T min(T a, T b)
-{
-    if (a < b)
-    {
-        return a; // 1st marker
-    } else {
-        return b; // 2nd marker
-    }
-}
-
-int main ()
-{
-    int i;
-    double j;
-    int min_i_a = 4, min_i_b = 5;
-    double min_j_a = 7.0, min_j_b = 8.0;
-    i = min(min_i_a, min_i_b); // 3rd marker
-    j = min(min_j_a, min_j_b); // 4th marker
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/jump/other.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/jump/other.cpp
deleted file mode 100644 (file)
index 3ce9ad6..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-//===-- other.cpp -----------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-int otherfn()
-{
-    return 4; // other marker
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/multi_break/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/multi_break/Makefile
deleted file mode 100644 (file)
index 566938c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-ENABLE_THREADS := YES
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py
deleted file mode 100644 (file)
index 20645fb..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-"""
-Test number of threads.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class MultipleBreakpointTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number for our breakpoint.
-        self.breakpoint = line_number('main.cpp', '// Set breakpoint here')
-
-    @expectedFailureAll(
-        oslist=["linux"],
-        bugnumber="llvm.org/pr15824 thread states not properly maintained")
-    @expectedFailureAll(
-        oslist=lldbplatformutil.getDarwinOSTriples(),
-        bugnumber="llvm.org/pr15824 thread states not properly maintained and <rdar://problem/28557237>")
-    @expectedFailureAll(
-        oslist=["freebsd"],
-        bugnumber="llvm.org/pr18190 thread states not properly maintained")
-    @skipIfWindows # This is flakey on Windows: llvm.org/pr24668, llvm.org/pr38373
-    @expectedFailureNetBSD
-    def test(self):
-        """Test simultaneous breakpoints in multiple threads."""
-        self.build(dictionary=self.getBuildFlags())
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # This should create a breakpoint in the main thread.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.breakpoint, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        # The breakpoint may be hit in either thread 2 or thread 3.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Get the target process
-        target = self.dbg.GetSelectedTarget()
-        process = target.GetProcess()
-
-        # Get the number of threads
-        num_threads = process.GetNumThreads()
-
-        # Make sure we see all three threads
-        self.assertTrue(
-            num_threads >= 3,
-            'Number of expected threads and actual threads do not match.')
-
-        # Get the thread objects
-        thread1 = process.GetThreadAtIndex(0)
-        thread2 = process.GetThreadAtIndex(1)
-        thread3 = process.GetThreadAtIndex(2)
-
-        # Make sure both threads are stopped
-        self.assertTrue(
-            thread1.IsStopped(),
-            "Primary thread didn't stop during breakpoint")
-        self.assertTrue(
-            thread2.IsStopped(),
-            "Secondary thread didn't stop during breakpoint")
-        self.assertTrue(
-            thread3.IsStopped(),
-            "Tertiary thread didn't stop during breakpoint")
-
-        # Delete the first breakpoint then continue
-        self.runCmd("breakpoint delete 1")
-
-        # Run to completion
-        self.runCmd("continue")
-
-        # At this point, the inferior process should have exited.
-        self.assertTrue(
-            process.GetState() == lldb.eStateExited,
-            PROCESS_EXITED)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/multi_break/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/multi_break/main.cpp
deleted file mode 100644 (file)
index 5f884d7..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// This test is intended to create a situation in which a breakpoint will be
-// hit in two threads at nearly the same moment.  The expected result is that
-// the breakpoint in the second thread will be hit while the breakpoint handler
-// in the first thread is trying to stop all threads.
-
-#include "pseudo_barrier.h"
-#include <thread>
-
-pseudo_barrier_t g_barrier;
-
-volatile int g_test = 0;
-
-void *
-thread_func ()
-{
-    // Wait until both threads are running
-    pseudo_barrier_wait(g_barrier);
-
-    // Do something
-    g_test++;       // Set breakpoint here
-
-    // Return
-    return NULL;
-}
-
-int main ()
-{
-    // Don't let either thread do anything until they're both ready.
-    pseudo_barrier_init(g_barrier, 2);
-
-    // Create two threads
-    std::thread thread_1(thread_func);
-    std::thread thread_2(thread_func);
-
-    // Wait for the threads to finish
-    thread_1.join();
-    thread_2.join();
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/num_threads/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/num_threads/Makefile
deleted file mode 100644 (file)
index 566938c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-ENABLE_THREADS := YES
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/num_threads/TestNumThreads.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/num_threads/TestNumThreads.py
deleted file mode 100644 (file)
index cfd2941..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-"""
-Test number of threads.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class NumberOfThreadsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers for our break points.
-        self.thread3_notify_all_line = line_number('main.cpp', '// Set thread3 break point on notify_all at this line.')
-        self.thread3_before_lock_line = line_number('main.cpp', '// thread3-before-lock')
-
-    def test_number_of_threads(self):
-        """Test number of threads."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # This should create a breakpoint with 1 location.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.thread3_notify_all_line, num_expected_locations=1)
-
-        # The breakpoint list should show 1 location.
-        self.expect(
-            "breakpoint list -f",
-            "Breakpoint location shown correctly",
-            substrs=[
-                "1: file = 'main.cpp', line = %d, exact_match = 0, locations = 1" %
-                self.thread3_notify_all_line])
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # Stopped once.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=["stop reason = breakpoint 1."])
-
-        # Get the target process
-        target = self.dbg.GetSelectedTarget()
-        process = target.GetProcess()
-
-        # Get the number of threads
-        num_threads = process.GetNumThreads()
-
-        # Using std::thread may involve extra threads, so we assert that there are
-        # at least 4 rather than exactly 4.
-        self.assertTrue(
-            num_threads >= 13,
-            'Number of expected threads and actual threads do not match.')
-
-    @skipIfDarwin # rdar://33462362
-    @skipIfWindows # This is flakey on Windows: llvm.org/pr37658, llvm.org/pr38373
-    @expectedFailureNetBSD
-    def test_unique_stacks(self):
-        """Test backtrace unique with multiple threads executing the same stack."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Set a break point on the thread3 notify all (should get hit on threads 4-13).
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.thread3_before_lock_line, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # Stopped once.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=["stop reason = breakpoint 1."])
-
-        process = self.process()
-
-        # Get the number of threads
-        num_threads = process.GetNumThreads()
-
-        # Using std::thread may involve extra threads, so we assert that there are
-        # at least 10 thread3's rather than exactly 10.
-        self.assertTrue(
-            num_threads >= 10,
-            'Number of expected threads and actual threads do not match.')
-
-        # Attempt to walk each of the thread's executing the thread3 function to
-        # the same breakpoint.
-        def is_thread3(thread):
-            for frame in thread:
-                if "thread3" in frame.GetFunctionName(): return True
-            return False
-
-        expect_threads = ""
-        for i in range(num_threads):
-            thread = process.GetThreadAtIndex(i)
-            self.assertTrue(thread.IsValid())
-            if not is_thread3(thread):
-                continue
-
-            # If we aren't stopped out the thread breakpoint try to resume.
-            if thread.GetStopReason() != lldb.eStopReasonBreakpoint:
-                self.runCmd("thread continue %d"%(i+1))
-            self.assertEqual(thread.GetStopReason(), lldb.eStopReasonBreakpoint)
-
-            expect_threads += " #%d"%(i+1)
-
-        # Construct our expected back trace string
-        expect_string = "10 thread(s)%s" % (expect_threads)
-
-        # Now that we are stopped, we should have 10 threads waiting in the
-        # thread3 function. All of these threads should show as one stack.
-        self.expect("thread backtrace unique",
-                    "Backtrace with unique stack shown correctly",
-                    substrs=[expect_string,
-                        "main.cpp:%d"%self.thread3_before_lock_line])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/num_threads/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/num_threads/main.cpp
deleted file mode 100644 (file)
index fdc060d..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-#include "pseudo_barrier.h"
-#include <condition_variable>
-#include <mutex>
-#include <thread>
-#include <vector>
-
-std::mutex mutex;
-std::condition_variable cond;
-pseudo_barrier_t thread3_barrier;
-
-void *
-thread3(void *input)
-{
-    pseudo_barrier_wait(thread3_barrier);
-
-    int dummy = 47; // thread3-before-lock
-
-    std::unique_lock<std::mutex> lock(mutex); 
-    cond.notify_all(); // Set thread3 break point on notify_all at this line.
-    return NULL;
-}
-
-void *
-thread2(void *input)
-{
-    std::unique_lock<std::mutex> lock(mutex);
-    cond.notify_all(); // release main thread
-    cond.wait(lock);
-    return NULL;
-}
-
-void *
-thread1(void *input)
-{
-    std::thread thread_2(thread2, nullptr);
-    thread_2.join();
-
-    return NULL;
-}
-
-int main()
-{
-    std::unique_lock<std::mutex> lock(mutex);
-
-    std::thread thread_1(thread1, nullptr);
-    cond.wait(lock); // wait for thread2
-
-    pseudo_barrier_init(thread3_barrier, 10);
-
-    std::vector<std::thread> thread_3s;
-    for (int i = 0; i < 10; i++) {
-      thread_3s.push_back(std::thread(thread3, nullptr));
-    }
-
-    cond.wait(lock); // wait for thread_3s
-
-    lock.unlock();
-
-    thread_1.join();
-    for (auto &t : thread_3s){
-        t.join();
-    }
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/state/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/state/Makefile
deleted file mode 100644 (file)
index 3d0b98f..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-CXX_SOURCES := main.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py
deleted file mode 100644 (file)
index 6093808..0000000
+++ /dev/null
@@ -1,326 +0,0 @@
-"""
-Test thread states.
-"""
-
-
-
-import unittest2
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ThreadStateTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(
-        oslist=["linux"],
-        bugnumber="llvm.org/pr15824 thread states not properly maintained")
-    @skipIfDarwin # llvm.org/pr15824 thread states not properly maintained and <rdar://problem/28557237>
-    @expectedFailureAll(
-        oslist=["freebsd"],
-        bugnumber="llvm.org/pr18190 thread states not properly maintained")
-    @expectedFailureNetBSD
-    def test_state_after_breakpoint(self):
-        """Test thread state after breakpoint."""
-        self.build(dictionary=self.getBuildFlags(use_cpp11=False))
-        self.thread_state_after_breakpoint_test()
-
-    @skipIfDarwin  # 'llvm.org/pr23669', cause Python crash randomly
-    @expectedFailureAll(
-        oslist=lldbplatformutil.getDarwinOSTriples(),
-        bugnumber="llvm.org/pr23669")
-    @expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr15824")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24660")
-    def test_state_after_continue(self):
-        """Test thread state after continue."""
-        self.build(dictionary=self.getBuildFlags(use_cpp11=False))
-        self.thread_state_after_continue_test()
-
-    @skipIfDarwin  # 'llvm.org/pr23669', cause Python crash randomly
-    @expectedFailureDarwin('llvm.org/pr23669')
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24660")
-    @expectedFailureNetBSD
-    # thread states not properly maintained
-    @unittest2.expectedFailure("llvm.org/pr16712")
-    def test_state_after_expression(self):
-        """Test thread state after expression."""
-        self.build(dictionary=self.getBuildFlags(use_cpp11=False))
-        self.thread_state_after_expression_test()
-
-    # thread states not properly maintained
-    @unittest2.expectedFailure("llvm.org/pr15824 and <rdar://problem/28557237>")
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly")
-    @skipIfDarwin # llvm.org/pr15824 thread states not properly maintained and <rdar://problem/28557237>
-    @expectedFailureNetBSD
-    def test_process_state(self):
-        """Test thread states (comprehensive)."""
-        self.build(dictionary=self.getBuildFlags(use_cpp11=False))
-        self.thread_states_test()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers for our breakpoints.
-        self.break_1 = line_number('main.cpp', '// Set first breakpoint here')
-        self.break_2 = line_number('main.cpp', '// Set second breakpoint here')
-
-    def thread_state_after_breakpoint_test(self):
-        """Test thread state after breakpoint."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # This should create a breakpoint in the main thread.
-        bp = lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.break_1, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # Get the target process
-        target = self.dbg.GetSelectedTarget()
-        process = target.GetProcess()
-
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertIsNotNone(thread)
-
-        # Make sure the thread is in the stopped state.
-        self.assertTrue(
-            thread.IsStopped(),
-            "Thread state isn't \'stopped\' during breakpoint 1.")
-        self.assertFalse(thread.IsSuspended(),
-                         "Thread state is \'suspended\' during breakpoint 1.")
-
-        # Kill the process
-        self.runCmd("process kill")
-
-    def wait_for_running_event(self, process):
-        listener = self.dbg.GetListener()
-        if lldb.remote_platform:
-            lldbutil.expect_state_changes(
-                self, listener, process, [
-                    lldb.eStateConnected])
-        lldbutil.expect_state_changes(
-            self, listener, process, [
-                lldb.eStateRunning])
-
-    def thread_state_after_continue_test(self):
-        """Test thread state after continue."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # This should create a breakpoint in the main thread.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.break_1, num_expected_locations=1)
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.break_2, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # Get the target process
-        target = self.dbg.GetSelectedTarget()
-        process = target.GetProcess()
-
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertIsNotNone(thread)
-
-        # Continue, the inferior will go into an infinite loop waiting for
-        # 'g_test' to change.
-        self.dbg.SetAsync(True)
-        self.runCmd("continue")
-        self.wait_for_running_event(process)
-
-        # Check the thread state. It should be running.
-        self.assertFalse(
-            thread.IsStopped(),
-            "Thread state is \'stopped\' when it should be running.")
-        self.assertFalse(
-            thread.IsSuspended(),
-            "Thread state is \'suspended\' when it should be running.")
-
-        # Go back to synchronous interactions
-        self.dbg.SetAsync(False)
-
-        # Kill the process
-        self.runCmd("process kill")
-
-    def thread_state_after_expression_test(self):
-        """Test thread state after expression."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # This should create a breakpoint in the main thread.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.break_1, num_expected_locations=1)
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.break_2, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # Get the target process
-        target = self.dbg.GetSelectedTarget()
-        process = target.GetProcess()
-
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertIsNotNone(thread)
-
-        # Get the inferior out of its loop
-        self.runCmd("expression g_test = 1")
-
-        # Check the thread state
-        self.assertTrue(
-            thread.IsStopped(),
-            "Thread state isn't \'stopped\' after expression evaluation.")
-        self.assertFalse(
-            thread.IsSuspended(),
-            "Thread state is \'suspended\' after expression evaluation.")
-
-        # Let the process run to completion
-        self.runCmd("process continue")
-
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly")
-    @skipIfDarwin # llvm.org/pr15824 thread states not properly maintained and <rdar://problem/28557237>
-    @no_debug_info_test
-    def test_process_interrupt(self):
-        """Test process interrupt and continue."""
-        self.build(dictionary=self.getBuildFlags(use_cpp11=False))
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # This should create a breakpoint in the main thread.
-        bpno = lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.break_1, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # Get the target process
-        target = self.dbg.GetSelectedTarget()
-        process = target.GetProcess()
-
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertIsNotNone(thread)
-
-        # Remove the breakpoint to avoid the single-step-over-bkpt dance in the
-        # "continue" below
-        self.assertTrue(target.BreakpointDelete(bpno))
-
-        # Continue, the inferior will go into an infinite loop waiting for
-        # 'g_test' to change.
-        self.dbg.SetAsync(True)
-        self.runCmd("continue")
-        self.wait_for_running_event(process)
-
-        # Go back to synchronous interactions
-        self.dbg.SetAsync(False)
-
-        # Stop the process
-        self.runCmd("process interrupt")
-
-        self.assertEqual(thread.GetStopReason(), lldb.eStopReasonSignal)
-
-        # Get the inferior out of its loop
-        self.runCmd("expression g_test = 1")
-
-        # Run to completion
-        self.runCmd("continue")
-
-    def thread_states_test(self):
-        """Test thread states (comprehensive)."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # This should create a breakpoint in the main thread.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.break_1, num_expected_locations=1)
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.break_2, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # Get the target process
-        target = self.dbg.GetSelectedTarget()
-        process = target.GetProcess()
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertIsNotNone(thread)
-
-        # Make sure the thread is in the stopped state.
-        self.assertTrue(
-            thread.IsStopped(),
-            "Thread state isn't \'stopped\' during breakpoint 1.")
-        self.assertFalse(thread.IsSuspended(),
-                         "Thread state is \'suspended\' during breakpoint 1.")
-
-        # Continue, the inferior will go into an infinite loop waiting for
-        # 'g_test' to change.
-        self.dbg.SetAsync(True)
-        self.runCmd("continue")
-        self.wait_for_running_event(process)
-
-        # Check the thread state. It should be running.
-        self.assertFalse(
-            thread.IsStopped(),
-            "Thread state is \'stopped\' when it should be running.")
-        self.assertFalse(
-            thread.IsSuspended(),
-            "Thread state is \'suspended\' when it should be running.")
-
-        # Go back to synchronous interactions
-        self.dbg.SetAsync(False)
-
-        # Stop the process
-        self.runCmd("process interrupt")
-
-        self.assertEqual(thread.GetState(), lldb.eStopReasonSignal)
-
-        # Check the thread state
-        self.assertTrue(
-            thread.IsStopped(),
-            "Thread state isn't \'stopped\' after process stop.")
-        self.assertFalse(thread.IsSuspended(),
-                         "Thread state is \'suspended\' after process stop.")
-
-        # Get the inferior out of its loop
-        self.runCmd("expression g_test = 1")
-
-        # Check the thread state
-        self.assertTrue(
-            thread.IsStopped(),
-            "Thread state isn't \'stopped\' after expression evaluation.")
-        self.assertFalse(
-            thread.IsSuspended(),
-            "Thread state is \'suspended\' after expression evaluation.")
-
-        self.assertEqual(thread.GetState(), lldb.eStopReasonSignal)
-
-        # Run to breakpoint 2
-        self.runCmd("continue")
-
-        self.assertEqual(thread.GetState(), lldb.eStopReasonBreakpoint)
-
-        # Make sure both threads are stopped
-        self.assertTrue(
-            thread.IsStopped(),
-            "Thread state isn't \'stopped\' during breakpoint 2.")
-        self.assertFalse(thread.IsSuspended(),
-                         "Thread state is \'suspended\' during breakpoint 2.")
-
-        # Run to completion
-        self.runCmd("continue")
-
-        # At this point, the inferior process should have exited.
-        self.assertEqual(process.GetState(), lldb.eStateExited, PROCESS_EXITED)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/state/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/state/main.cpp
deleted file mode 100644 (file)
index 63b5049..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// This test is intended to verify that thread states are properly maintained
-// when transitional actions are performed in the debugger.  Most of the logic
-// is in the test script.  This program merely provides places where the test
-// can create the intended states.
-
-#include <chrono>
-#include <thread>
-
-volatile int g_test = 0;
-
-int addSomething(int a)
-{
-    return a + g_test;
-}
-
-int doNothing()
-{
-    int temp = 0;   // Set first breakpoint here
-
-    while (!g_test && temp < 5)
-    {
-        ++temp;
-        std::this_thread::sleep_for(std::chrono::seconds(2));
-    }
-
-    return temp;    // Set second breakpoint here
-}
-
-int main ()
-{
-    int result = doNothing();
-
-    int i = addSomething(result);
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_out/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_out/Makefile
deleted file mode 100644 (file)
index c46619c..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CXX_SOURCES := main.cpp
-ENABLE_THREADS := YES
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_out/TestThreadStepOut.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_out/TestThreadStepOut.py
deleted file mode 100644 (file)
index 2d9632e..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-"""
-Test stepping out from a function in a multi-threaded program.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ThreadStepOutTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # Test occasionally times out on the Linux build bot
-    @skipIfLinux
-    @expectedFailureAll(
-        oslist=["linux"],
-        bugnumber="llvm.org/pr23477 Test occasionally times out on the Linux build bot")
-    @expectedFailureAll(
-        oslist=["freebsd"],
-        bugnumber="llvm.org/pr18066 inferior does not exit")
-    @skipIfWindows # This test will hang on windows llvm.org/pr21753
-    @expectedFailureAll(oslist=["windows"])
-    @expectedFailureNetBSD
-    def test_step_single_thread(self):
-        """Test thread step out on one thread via command interpreter. """
-        self.build(dictionary=self.getBuildFlags())
-        self.step_out_test(self.step_out_single_thread_with_cmd)
-
-    # Test occasionally times out on the Linux build bot
-    @skipIfLinux
-    @expectedFailureAll(
-        oslist=["linux"],
-        bugnumber="llvm.org/pr23477 Test occasionally times out on the Linux build bot")
-    @expectedFailureAll(
-        oslist=["freebsd"],
-        bugnumber="llvm.org/pr19347 2nd thread stops at breakpoint")
-    @skipIfWindows # This test will hang on windows llvm.org/pr21753
-    @expectedFailureAll(oslist=["windows"])
-    @expectedFailureAll(oslist=["watchos"], archs=['armv7k'], bugnumber="rdar://problem/34674488") # stop reason is trace when it should be step-out
-    @expectedFailureNetBSD
-    def test_step_all_threads(self):
-        """Test thread step out on all threads via command interpreter. """
-        self.build(dictionary=self.getBuildFlags())
-        self.step_out_test(self.step_out_all_threads_with_cmd)
-
-    # Test occasionally times out on the Linux build bot
-    @skipIfLinux
-    @expectedFailureAll(
-        oslist=["linux"],
-        bugnumber="llvm.org/pr23477 Test occasionally times out on the Linux build bot")
-    @expectedFailureAll(
-        oslist=["freebsd"],
-        bugnumber="llvm.org/pr19347 2nd thread stops at breakpoint")
-    @skipIfWindows # This test will hang on windows llvm.org/pr21753
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24681")
-    @expectedFailureNetBSD
-    def test_python(self):
-        """Test thread step out on one thread via Python API (dwarf)."""
-        self.build(dictionary=self.getBuildFlags())
-        self.step_out_test(self.step_out_with_python)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number for our breakpoint.
-        self.bkpt_string = '// Set breakpoint here'
-        self.breakpoint = line_number('main.cpp', self.bkpt_string)       
-
-        if "gcc" in self.getCompiler() or self.isIntelCompiler() or self.getArchitecture() in ['arm64', 'arm64e']:
-            self.step_out_destination = line_number(
-                'main.cpp', '// Expect to stop here after step-out (icc and gcc; arm64)')
-        else:
-            self.step_out_destination = line_number(
-                'main.cpp', '// Expect to stop here after step-out (clang)')
-
-    def step_out_single_thread_with_cmd(self):
-        self.step_out_with_cmd("this-thread")
-        self.expect(
-            "thread backtrace all",
-            "Thread location after step out is correct",
-            substrs=[
-                "main.cpp:%d" %
-                self.step_out_destination,
-                "main.cpp:%d" %
-                self.breakpoint])
-
-    def step_out_all_threads_with_cmd(self):
-        self.step_out_with_cmd("all-threads")
-        self.expect(
-            "thread backtrace all",
-            "Thread location after step out is correct",
-            substrs=[
-                "main.cpp:%d" %
-                self.step_out_destination])
-
-    def step_out_with_cmd(self, run_mode):
-        self.runCmd("thread select %d" % self.step_out_thread.GetIndexID())
-        self.runCmd("thread step-out -m %s" % run_mode)
-        self.expect("process status", "Expected stop reason to be step-out",
-                    substrs=["stop reason = step out"])
-
-        self.expect(
-            "thread list",
-            "Selected thread did not change during step-out",
-            substrs=[
-                "* thread #%d" %
-                self.step_out_thread.GetIndexID()])
-
-    def step_out_with_python(self):
-        self.step_out_thread.StepOut()
-
-        reason = self.step_out_thread.GetStopReason()
-        self.assertEqual(
-            lldb.eStopReasonPlanComplete,
-            reason,
-            "Expected thread stop reason 'plancomplete', but got '%s'" %
-            lldbutil.stop_reason_to_str(reason))
-
-        # Verify location after stepping out
-        frame = self.step_out_thread.GetFrameAtIndex(0)
-        desc = lldbutil.get_description(frame.GetLineEntry())
-        expect = "main.cpp:%d" % self.step_out_destination
-        self.assertTrue(
-            expect in desc, "Expected %s but thread stopped at %s" %
-            (expect, desc))
-
-    def step_out_test(self, step_out_func):
-        """Test single thread step out of a function."""
-        (self.inferior_target, self.inferior_process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
-            self, self.bkpt_string, lldb.SBFileSpec('main.cpp'), only_one_thread = False)
-
-        # We hit the breakpoint on at least one thread.  If we hit it on both threads
-        # simultaneously, we can try the step out.  Otherwise, suspend the thread
-        # that hit the breakpoint, and continue till the second thread hits
-        # the breakpoint:
-
-        (breakpoint_threads, other_threads) = ([], [])
-        lldbutil.sort_stopped_threads(self.inferior_process,
-                                      breakpoint_threads=breakpoint_threads,
-                                      other_threads=other_threads)
-        if len(breakpoint_threads) == 1:
-            success = thread.Suspend()
-            self.assertTrue(success, "Couldn't suspend a thread")
-            bkpt_threads = lldbutil.continue_to_breakpoint(bkpt)
-            self.assertEqual(len(bkpt_threads), 1, "Second thread stopped")
-            success = thread.Resume()
-            self.assertTrue(success, "Couldn't resume a thread")
-
-        self.step_out_thread = breakpoint_threads[0]
-
-        # Step out of thread stopped at breakpoint
-        step_out_func()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_out/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_out/main.cpp
deleted file mode 100644 (file)
index e7754d0..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// This test is intended to create a situation in which two threads are stopped
-// at a breakpoint and the debugger issues a step-out command.
-
-#include "pseudo_barrier.h"
-#include <thread>
-
-pseudo_barrier_t g_barrier;
-
-volatile int g_test = 0;
-
-void step_out_of_here() {
-  g_test += 5; // Set breakpoint here
-}
-
-void *
-thread_func ()
-{
-    // Wait until both threads are running
-    pseudo_barrier_wait(g_barrier);
-
-    // Do something
-    step_out_of_here(); // Expect to stop here after step-out (clang)
-
-    // Return
-    return NULL;  // Expect to stop here after step-out (icc and gcc; arm64)
-}
-
-int main ()
-{
-    // Don't let either thread do anything until they're both ready.
-    pseudo_barrier_init(g_barrier, 2);
-
-    // Create two threads
-    std::thread thread_1(thread_func);
-    std::thread thread_2(thread_func);
-
-    // Wait for the threads to finish
-    thread_1.join();
-    thread_2.join();
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_until/.categories b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_until/.categories
deleted file mode 100644 (file)
index c00c258..0000000
+++ /dev/null
@@ -1 +0,0 @@
-basic_process
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_until/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_until/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_until/TestStepUntil.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_until/TestStepUntil.py
deleted file mode 100644 (file)
index dd48eba..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-"""Test stepping over vrs. hitting breakpoints & subsequent stepping in various forms."""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class StepUntilTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers that we will step to in main:
-        self.main_source = "main.c"
-        self.less_than_two = line_number('main.c', 'Less than 2')
-        self.greater_than_two = line_number('main.c', 'Greater than or equal to 2.')
-        self.back_out_in_main = line_number('main.c', 'Back out in main')
-
-    def do_until (self, args, until_lines, expected_linenum):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        main_source_spec = lldb.SBFileSpec(self.main_source)
-        break_before = target.BreakpointCreateBySourceRegex(
-            'At the start',
-            main_source_spec)
-        self.assertTrue(break_before, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            args, None, self.get_process_working_directory())
-
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-            process, break_before)
-
-        if len(threads) != 1:
-            self.fail("Failed to stop at first breakpoint in main.")
-
-        thread = threads[0]
-        return thread
-
-        thread = self.common_setup(None)
-
-        cmd_interp = self.dbg.GetCommandInterpreter()
-        ret_obj = lldb.SBCommandReturnObject()
-
-        cmd_line = "thread until"
-        for line_num in until_lines:
-            cmd_line += " %d"%(line_num)
-
-        cmd_interp.HandleCommand(cmd_line, ret_obj)
-        self.assertTrue(ret_obj.Succeeded(), "'%s' failed: %s."%(cmd_line, ret_obj.GetError()))
-
-        frame = thread.frames[0]
-        line = frame.GetLineEntry().GetLine()
-        self.assertEqual(line, expected_linenum, 'Did not get the expected stop line number')
-
-    def test_hitting_one (self):
-        """Test thread step until - targeting one line and hitting it."""
-        self.do_until(None, [self.less_than_two], self.less_than_two)
-
-    def test_targetting_two_hitting_first (self):
-        """Test thread step until - targeting two lines and hitting one."""
-        self.do_until(["foo", "bar", "baz"], [self.less_than_two, self.greater_than_two], self.greater_than_two)
-
-    def test_targetting_two_hitting_second (self):
-        """Test thread step until - targeting two lines and hitting the other one."""
-        self.do_until(None, [self.less_than_two, self.greater_than_two], self.less_than_two)
-
-    def test_missing_one (self):
-        """Test thread step until - targeting one line and missing it."""
-        self.do_until(["foo", "bar", "baz"], [self.less_than_two], self.back_out_in_main)
-
-
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_until/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_until/main.c
deleted file mode 100644 (file)
index e0b4d8a..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <stdio.h>
-
-void call_me(int argc)
-{
-  printf ("At the start, argc: %d.\n", argc);
-
-  if (argc < 2)
-    printf("Less than 2.\n");
-  else
-    printf("Greater than or equal to 2.\n");
-}
-
-int
-main(int argc, char **argv)
-{
-  call_me(argc);
-  printf("Back out in main.\n");
-
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/Makefile
deleted file mode 100644 (file)
index ebecfbf..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-ENABLE_THREADS := YES
-CXX_SOURCES := main.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/TestThreadExit.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/TestThreadExit.py
deleted file mode 100644 (file)
index 6bd55e1..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-"""
-Test number of threads.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class ThreadExitTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers for our breakpoints.
-        self.break_1 = line_number('main.cpp', '// Set first breakpoint here')
-        self.break_2 = line_number('main.cpp', '// Set second breakpoint here')
-        self.break_3 = line_number('main.cpp', '// Set third breakpoint here')
-        self.break_4 = line_number('main.cpp', '// Set fourth breakpoint here')
-
-    @skipIfWindows # This is flakey on Windows: llvm.org/pr38373
-    def test(self):
-        """Test thread exit handling."""
-        self.build(dictionary=self.getBuildFlags())
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # This should create a breakpoint with 1 location.
-        bp1_id = lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.break_1, num_expected_locations=1)
-        bp2_id = lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.break_2, num_expected_locations=1)
-        bp3_id = lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.break_3, num_expected_locations=1)
-        bp4_id = lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.break_4, num_expected_locations=1)
-
-        # The breakpoint list should show 1 locations.
-        self.expect(
-            "breakpoint list -f",
-            "Breakpoint location shown correctly",
-            substrs=[
-                "1: file = 'main.cpp', line = %d, exact_match = 0, locations = 1" %
-                self.break_1,
-                "2: file = 'main.cpp', line = %d, exact_match = 0, locations = 1" %
-                self.break_2,
-                "3: file = 'main.cpp', line = %d, exact_match = 0, locations = 1" %
-                self.break_3,
-                "4: file = 'main.cpp', line = %d, exact_match = 0, locations = 1" %
-                self.break_4])
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-        # Get the target process
-        target = self.dbg.GetSelectedTarget()
-        process = target.GetProcess()
-
-        stopped_thread = lldbutil.get_one_thread_stopped_at_breakpoint_id(
-            process, bp1_id)
-        self.assertIsNotNone(stopped_thread,
-                             "Process is not stopped at breakpoint 1")
-
-        # Get the number of threads
-        num_threads = process.GetNumThreads()
-        self.assertGreaterEqual(
-            num_threads,
-            2,
-            'Number of expected threads and actual threads do not match at breakpoint 1.')
-
-        # Run to the second breakpoint
-        self.runCmd("continue")
-        stopped_thread = lldbutil.get_one_thread_stopped_at_breakpoint_id(
-            process, bp2_id)
-        self.assertIsNotNone(stopped_thread,
-                             "Process is not stopped at breakpoint 2")
-
-        # Update the number of threads
-        new_num_threads = process.GetNumThreads()
-        self.assertEqual(
-            new_num_threads,
-            num_threads + 1,
-            'Number of expected threads did not increase by 1 at bp 2.')
-
-        # Run to the third breakpoint
-        self.runCmd("continue")
-        stopped_thread = lldbutil.get_one_thread_stopped_at_breakpoint_id(
-            process, bp3_id)
-        self.assertIsNotNone(stopped_thread,
-                             "Process is not stopped at breakpoint 3")
-
-        # Update the number of threads
-        new_num_threads = process.GetNumThreads()
-        self.assertEqual(
-            new_num_threads,
-            num_threads,
-            'Number of expected threads is not equal to original number of threads at bp 3.')
-
-        # Run to the fourth breakpoint
-        self.runCmd("continue")
-        stopped_thread = lldbutil.get_one_thread_stopped_at_breakpoint_id(
-            process, bp4_id)
-        self.assertIsNotNone(stopped_thread,
-                             "Process is not stopped at breakpoint 4")
-
-        # Update the number of threads
-        new_num_threads = process.GetNumThreads()
-        self.assertEqual(
-            new_num_threads,
-            num_threads - 1,
-            'Number of expected threads did not decrease by 1 at bp 4.')
-
-        # Run to completion
-        self.runCmd("continue")
-
-        # At this point, the inferior process should have exited.
-        self.assertEqual(process.GetState(), lldb.eStateExited, PROCESS_EXITED)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/main.cpp
deleted file mode 100644 (file)
index 7510dd3..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// This test verifies the correct handling of child thread exits.
-
-#include "pseudo_barrier.h"
-#include <thread>
-
-pseudo_barrier_t g_barrier1;
-pseudo_barrier_t g_barrier2;
-pseudo_barrier_t g_barrier3;
-
-void *
-thread1 ()
-{
-    // Synchronize with the main thread.
-    pseudo_barrier_wait(g_barrier1);
-
-    // Synchronize with the main thread and thread2.
-    pseudo_barrier_wait(g_barrier2);
-
-    // Return
-    return NULL;                                      // Set second breakpoint here
-}
-
-void *
-thread2 ()
-{
-    // Synchronize with thread1 and the main thread.
-    pseudo_barrier_wait(g_barrier2);
-
-    // Synchronize with the main thread.
-    pseudo_barrier_wait(g_barrier3);
-
-    // Return
-    return NULL;
-}
-
-int main ()
-{
-    pseudo_barrier_init(g_barrier1, 2);
-    pseudo_barrier_init(g_barrier2, 3);
-    pseudo_barrier_init(g_barrier3, 2);
-
-    // Create a thread.
-    std::thread thread_1(thread1);
-
-    // Wait for thread1 to start.
-    pseudo_barrier_wait(g_barrier1);
-
-    // Create another thread.
-    std::thread thread_2(thread2);  // Set first breakpoint here
-
-    // Wait for thread2 to start.
-    pseudo_barrier_wait(g_barrier2);
-
-    // Wait for the first thread to finish
-    thread_1.join();
-
-    // Synchronize with the remaining thread
-    int dummy = 47;                   // Set third breakpoint here
-    pseudo_barrier_wait(g_barrier3);
-
-    // Wait for the second thread to finish
-    thread_2.join();
-
-    return 0;                                         // Set fourth breakpoint here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/Makefile
deleted file mode 100644 (file)
index c46619c..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CXX_SOURCES := main.cpp
-ENABLE_THREADS := YES
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py
deleted file mode 100644 (file)
index e5505e1..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-"""
-Test that we obey thread conditioned breakpoints.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-def set_thread_id(thread, breakpoint):
-    id = thread.id
-    breakpoint.SetThreadID(id)
-
-def set_thread_name(thread, breakpoint):
-    breakpoint.SetThreadName("main-thread")
-
-class ThreadSpecificBreakTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @add_test_categories(['pyapi'])
-
-    @expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], archs=['armv7', 'armv7k'], bugnumber='rdar://problem/34563920') # armv7 ios problem - breakpoint with tid qualifier isn't working
-    def test_thread_id(self):
-        self.do_test(set_thread_id)
-
-    @skipUnlessDarwin
-    @expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], archs=['armv7', 'armv7k'], bugnumber='rdar://problem/34563920') # armv7 ios problem - breakpoint with tid qualifier isn't working
-    def test_thread_name(self):
-        self.do_test(set_thread_name)
-
-    def do_test(self, setter_method):
-        """Test that we obey thread conditioned breakpoints."""
-        self.build()
-        main_source_spec = lldb.SBFileSpec("main.cpp")
-        (target, process, main_thread, main_breakpoint) = lldbutil.run_to_source_breakpoint(self,
-                "Set main breakpoint here", main_source_spec)
-
-        thread_breakpoint = target.BreakpointCreateBySourceRegex(
-            "Set thread-specific breakpoint here", main_source_spec)
-        self.assertGreater(
-            thread_breakpoint.GetNumLocations(),
-            0,
-            "thread breakpoint has no locations associated with it.")
-
-        # Set the thread-specific breakpoint to stop only on the main thread
-        # before the secondary thread has a chance to execute it.  The main
-        # thread joins the secondary thread, and then the main thread will
-        # execute the code at the breakpoint.  If the thread-specific
-        # breakpoint works, the next stop will be on the main thread.
-        setter_method(main_thread, thread_breakpoint)
-
-        process.Continue()
-        next_stop_state = process.GetState()
-        self.assertEqual(
-            next_stop_state,
-            lldb.eStateStopped,
-            "We should have stopped at the thread breakpoint.")
-        stopped_threads = lldbutil.get_threads_stopped_at_breakpoint(
-            process, thread_breakpoint)
-        self.assertEqual(
-            len(stopped_threads),
-            1,
-            "thread breakpoint stopped at unexpected number of threads")
-        self.assertEqual(
-            stopped_threads[0].GetThreadID(),
-            main_thread.GetThreadID(),
-            "thread breakpoint stopped at the wrong thread")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/main.cpp
deleted file mode 100644 (file)
index 03e93bd..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#include <chrono>
-#include <thread>
-
-void
-thread_function ()
-{
-    // Set thread-specific breakpoint here.
-    std::this_thread::sleep_for(std::chrono::milliseconds(20));
-    // On Windows, a sleep_for of less than about 16 ms effectively calls
-    // Sleep(0).  The MS standard thread implementation uses a system thread
-    // pool, which can deadlock on a Sleep(0), hanging not only the secondary
-    // thread but the entire test.  I increased the delay to 20 ms to ensure
-    // Sleep is called with a delay greater than 0.  The deadlock potential
-    // is described here:
-    // https://docs.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-sleep#remarks
-}
-
-int 
-main ()
-{
-    // Set main breakpoint here.
-
-    #ifdef __APPLE__
-    pthread_setname_np("main-thread");
-    #endif
-
-    std::thread t(thread_function);
-    t.join();
-
-    thread_function();
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/Makefile
deleted file mode 100644 (file)
index c46619c..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CXX_SOURCES := main.cpp
-ENABLE_THREADS := YES
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py
deleted file mode 100644 (file)
index 126ad9e..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-"""
-Test that we obey thread conditioned breakpoints and expression
-conditioned breakpoints simultaneously
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ThreadSpecificBreakPlusConditionTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # test frequently times out or hangs
-    @skipIf(oslist=['windows', 'freebsd'])
-    @skipIfDarwin
-    # hits break in another thread in testrun
-    @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr18522')
-    @add_test_categories(['pyapi'])
-    @expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], archs=['armv7', 'armv7k'], bugnumber='rdar://problem/34563348') # Two threads seem to end up with the same my_value when built for armv7.
-    @expectedFailureNetBSD
-    def test_python(self):
-        """Test that we obey thread conditioned breakpoints."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        main_source_spec = lldb.SBFileSpec("main.cpp")
-
-        # Set a breakpoint in the thread body, and make it active for only the
-        # first thread.
-        break_thread_body = target.BreakpointCreateBySourceRegex(
-            "Break here in thread body.", main_source_spec)
-        self.assertTrue(
-            break_thread_body.IsValid() and break_thread_body.GetNumLocations() > 0,
-            "Failed to set thread body breakpoint.")
-
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-            process, break_thread_body)
-
-        victim_thread = threads[0]
-
-        # Pick one of the threads, and change the breakpoint so it ONLY stops for this thread,
-        # but add a condition that it won't stop for this thread's my_value.  The other threads
-        # pass the condition, so they should stop, but if the thread-specification is working
-        # they should not stop.  So nobody should hit the breakpoint anymore, and we should
-        # just exit cleanly.
-
-        frame = victim_thread.GetFrameAtIndex(0)
-        value = frame.FindVariable("my_value").GetValueAsSigned(0)
-        self.assertTrue(
-            value > 0 and value < 11,
-            "Got a reasonable value for my_value.")
-
-        cond_string = "my_value != %d" % (value)
-
-        break_thread_body.SetThreadID(victim_thread.GetThreadID())
-        break_thread_body.SetCondition(cond_string)
-
-        process.Continue()
-
-        next_stop_state = process.GetState()
-        self.assertTrue(
-            next_stop_state == lldb.eStateExited,
-            "We should have not hit the breakpoint again.")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/main.cpp
deleted file mode 100644 (file)
index af8ab84..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#include <chrono>
-#include <thread>
-#include <vector>
-
-void *
-thread_function (void *thread_marker)
-{
-    int keep_going = 1; 
-    int my_value = *((int *)thread_marker);
-    int counter = 0;
-
-    while (counter < 20)
-    {
-        counter++; // Break here in thread body.
-        std::this_thread::sleep_for(std::chrono::microseconds(10));
-    }
-    return NULL;
-}
-
-
-int 
-main ()
-{
-    std::vector<std::thread> threads;
-
-    int thread_value = 0;
-    int i;
-
-    for (i = 0; i < 10; i++)
-    {
-        thread_value += 1;
-        threads.push_back(std::thread(thread_function, &thread_value));
-    }
-
-    for (i = 0; i < 10; i++)
-        threads[i].join();
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/basic/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/basic/Makefile
deleted file mode 100644 (file)
index 07133cf..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-C_SOURCES := main.c
-CFLAGS_EXTRAS := -fsanitize=thread -g
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/basic/TestTsanBasic.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/basic/TestTsanBasic.py
deleted file mode 100644 (file)
index 1b71de5..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-"""
-Tests basic ThreadSanitizer support (detecting a data race).
-"""
-
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-import lldbsuite.test.lldbutil as lldbutil
-import json
-
-
-class TsanBasicTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(
-        oslist=["linux"],
-        bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)")
-    @expectedFailureNetBSD
-    @skipIfFreeBSD  # llvm.org/pr21136 runtimes not yet available by default
-    @skipIfRemote
-    @skipUnlessThreadSanitizer
-    def test(self):
-        self.build()
-        self.tsan_tests()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        self.line_malloc = line_number('main.c', '// malloc line')
-        self.line_thread1 = line_number('main.c', '// thread1 line')
-        self.line_thread2 = line_number('main.c', '// thread2 line')
-
-    def tsan_tests(self):
-        exe = self.getBuildArtifact("a.out")
-        self.expect(
-            "file " + exe,
-            patterns=["Current executable set to .*a.out"])
-
-        self.runCmd("run")
-
-        stop_reason = self.dbg.GetSelectedTarget().process.GetSelectedThread().GetStopReason()
-        if stop_reason == lldb.eStopReasonExec:
-            # On OS X 10.10 and older, we need to re-exec to enable
-            # interceptors.
-            self.runCmd("continue")
-
-        # the stop reason of the thread should be breakpoint.
-        self.expect("thread list", "A data race should be detected",
-                    substrs=['stopped', 'stop reason = Data race detected'])
-
-        self.assertEqual(
-            self.dbg.GetSelectedTarget().process.GetSelectedThread().GetStopReason(),
-            lldb.eStopReasonInstrumentation)
-
-        # test that the TSan dylib is present
-        self.expect(
-            "image lookup -n __tsan_get_current_report",
-            "__tsan_get_current_report should be present",
-            substrs=['1 match found'])
-
-        # We should be stopped in __tsan_on_report
-        process = self.dbg.GetSelectedTarget().process
-        thread = process.GetSelectedThread()
-        frame = thread.GetSelectedFrame()
-        self.assertTrue("__tsan_on_report" in frame.GetFunctionName())
-
-        # The stopped thread backtrace should contain either line1 or line2
-        # from main.c.
-        found = False
-        for i in range(0, thread.GetNumFrames()):
-            frame = thread.GetFrameAtIndex(i)
-            if frame.GetLineEntry().GetFileSpec().GetFilename() == "main.c":
-                if frame.GetLineEntry().GetLine() == self.line_thread1:
-                    found = True
-                if frame.GetLineEntry().GetLine() == self.line_thread2:
-                    found = True
-        self.assertTrue(found)
-
-        self.expect(
-            "thread info -s",
-            "The extended stop info should contain the TSan provided fields",
-            substrs=[
-                "instrumentation_class",
-                "description",
-                "mops"])
-
-        output_lines = self.res.GetOutput().split('\n')
-        json_line = '\n'.join(output_lines[2:])
-        data = json.loads(json_line)
-        self.assertEqual(data["instrumentation_class"], "ThreadSanitizer")
-        self.assertEqual(data["issue_type"], "data-race")
-        self.assertEqual(len(data["mops"]), 2)
-
-        backtraces = thread.GetStopReasonExtendedBacktraces(
-            lldb.eInstrumentationRuntimeTypeAddressSanitizer)
-        self.assertEqual(backtraces.GetSize(), 0)
-
-        backtraces = thread.GetStopReasonExtendedBacktraces(
-            lldb.eInstrumentationRuntimeTypeThreadSanitizer)
-        self.assertTrue(backtraces.GetSize() >= 2)
-
-        # First backtrace is a memory operation
-        thread = backtraces.GetThreadAtIndex(0)
-        found = False
-        for i in range(0, thread.GetNumFrames()):
-            frame = thread.GetFrameAtIndex(i)
-            if frame.GetLineEntry().GetFileSpec().GetFilename() == "main.c":
-                if frame.GetLineEntry().GetLine() == self.line_thread1:
-                    found = True
-                if frame.GetLineEntry().GetLine() == self.line_thread2:
-                    found = True
-        self.assertTrue(found)
-
-        # Second backtrace is a memory operation
-        thread = backtraces.GetThreadAtIndex(1)
-        found = False
-        for i in range(0, thread.GetNumFrames()):
-            frame = thread.GetFrameAtIndex(i)
-            if frame.GetLineEntry().GetFileSpec().GetFilename() == "main.c":
-                if frame.GetLineEntry().GetLine() == self.line_thread1:
-                    found = True
-                if frame.GetLineEntry().GetLine() == self.line_thread2:
-                    found = True
-        self.assertTrue(found)
-
-        self.runCmd("continue")
-
-        # the stop reason of the thread should be a SIGABRT.
-        self.expect("thread list", "We should be stopped due a SIGABRT",
-                    substrs=['stopped', 'stop reason = signal SIGABRT'])
-
-        # test that we're in pthread_kill now (TSan abort the process)
-        self.expect("thread list", "We should be stopped in pthread_kill",
-                    substrs=['pthread_kill'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/basic/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/basic/main.c
deleted file mode 100644 (file)
index 108ae74..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <pthread.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-char *pointer;
-
-void *f1(void *p) {
-    pointer[0] = 'x'; // thread1 line
-    return NULL;
-}
-
-void *f2(void *p) {
-    pointer[0] = 'y'; // thread2 line
-    return NULL;
-}
-
-int main (int argc, char const *argv[])
-{
-    pointer = (char *)malloc(10); // malloc line
-
-    pthread_t t1, t2;
-    pthread_create(&t1, NULL, f1, NULL);
-    pthread_create(&t2, NULL, f2, NULL);
-
-    pthread_join(t1, NULL);
-    pthread_join(t2, NULL);
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/Makefile
deleted file mode 100644 (file)
index 5f67197..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CXX_SOURCES := main.cpp
-CFLAGS_EXTRAS := -fsanitize=thread -g
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/TestTsanCPPGlobalLocation.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/TestTsanCPPGlobalLocation.py
deleted file mode 100644 (file)
index 407126d..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-"""
-Tests that TSan correctly reports the filename and line number of a racy global C++ variable.
-"""
-
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-import lldbsuite.test.lldbutil as lldbutil
-import json
-
-
-class TsanCPPGlobalLocationTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(
-        oslist=["linux"],
-        bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)")
-    @expectedFailureNetBSD
-    @skipIfFreeBSD  # llvm.org/pr21136 runtimes not yet available by default
-    @skipIfRemote
-    @skipUnlessThreadSanitizer
-    def test(self):
-        self.build()
-        self.tsan_tests()
-
-    def tsan_tests(self):
-        exe = self.getBuildArtifact("a.out")
-        self.expect(
-            "file " + exe,
-            patterns=["Current executable set to .*a.out"])
-
-        self.runCmd("run")
-
-        stop_reason = self.dbg.GetSelectedTarget().process.GetSelectedThread().GetStopReason()
-        if stop_reason == lldb.eStopReasonExec:
-            # On OS X 10.10 and older, we need to re-exec to enable
-            # interceptors.
-            self.runCmd("continue")
-
-        # the stop reason of the thread should be breakpoint.
-        self.expect("thread list", "A data race should be detected",
-                    substrs=['stopped', 'stop reason = Data race detected'])
-
-        self.expect(
-            "thread info -s",
-            "The extended stop info should contain the TSan provided fields",
-            substrs=[
-                "instrumentation_class",
-                "description",
-                "mops"])
-
-        output_lines = self.res.GetOutput().split('\n')
-        json_line = '\n'.join(output_lines[2:])
-        data = json.loads(json_line)
-        self.assertEqual(data["instrumentation_class"], "ThreadSanitizer")
-        self.assertEqual(data["issue_type"], "data-race")
-
-        self.assertTrue(data["location_filename"].endswith("/main.cpp"))
-        self.assertEqual(
-            data["location_line"],
-            line_number(
-                'main.cpp',
-                '// global variable'))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/main.cpp
deleted file mode 100644 (file)
index 04735ef..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <pthread.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-long my_global_variable;  // global variable
-
-void *f1(void *p) {
-    my_global_variable = 42;
-    return NULL;
-}
-
-void *f2(void *p) {
-    my_global_variable = 43;
-    return NULL;
-}
-
-int main (int argc, char const *argv[])
-{
-    pthread_t t1;
-    pthread_create(&t1, NULL, f1, NULL);
-
-    pthread_t t2;
-    pthread_create(&t2, NULL, f2, NULL);
-
-    pthread_join(t1, NULL);
-    pthread_join(t2, NULL);
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/global_location/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/global_location/Makefile
deleted file mode 100644 (file)
index 07133cf..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-C_SOURCES := main.c
-CFLAGS_EXTRAS := -fsanitize=thread -g
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/global_location/TestTsanGlobalLocation.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/global_location/TestTsanGlobalLocation.py
deleted file mode 100644 (file)
index 7bfd90b..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-"""
-Tests that TSan correctly reports the filename and line number of a racy global variable.
-"""
-
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-import lldbsuite.test.lldbutil as lldbutil
-import json
-
-
-class TsanGlobalLocationTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(
-        oslist=["linux"],
-        bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)")
-    @expectedFailureNetBSD
-    @skipIfFreeBSD  # llvm.org/pr21136 runtimes not yet available by default
-    @skipIfRemote
-    @skipUnlessThreadSanitizer
-    def test(self):
-        self.build()
-        self.tsan_tests()
-
-    def tsan_tests(self):
-        exe = self.getBuildArtifact("a.out")
-        self.expect(
-            "file " + exe,
-            patterns=["Current executable set to .*a.out"])
-
-        self.runCmd("run")
-
-        stop_reason = self.dbg.GetSelectedTarget().process.GetSelectedThread().GetStopReason()
-        if stop_reason == lldb.eStopReasonExec:
-            # On OS X 10.10 and older, we need to re-exec to enable
-            # interceptors.
-            self.runCmd("continue")
-
-        # the stop reason of the thread should be breakpoint.
-        self.expect("thread list", "A data race should be detected",
-                    substrs=['stopped', 'stop reason = Data race detected'])
-
-        self.expect(
-            "thread info -s",
-            "The extended stop info should contain the TSan provided fields",
-            substrs=[
-                "instrumentation_class",
-                "description",
-                "mops"])
-
-        output_lines = self.res.GetOutput().split('\n')
-        json_line = '\n'.join(output_lines[2:])
-        data = json.loads(json_line)
-        self.assertEqual(data["instrumentation_class"], "ThreadSanitizer")
-        self.assertEqual(data["issue_type"], "data-race")
-
-        self.assertTrue(data["location_filename"].endswith("/main.c"))
-        self.assertEqual(
-            data["location_line"],
-            line_number(
-                'main.c',
-                '// global variable'))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/global_location/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/global_location/main.c
deleted file mode 100644 (file)
index 4c88d9f..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <pthread.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-long my_global_variable;  // global variable
-
-void *f1(void *p) {
-    my_global_variable = 42;
-    return NULL;
-}
-
-void *f2(void *p) {
-    my_global_variable = 43;
-    return NULL;
-}
-
-int main (int argc, char const *argv[])
-{
-    pthread_t t1;
-    pthread_create(&t1, NULL, f1, NULL);
-
-    pthread_t t2;
-    pthread_create(&t2, NULL, f2, NULL);
-
-    pthread_join(t1, NULL);
-    pthread_join(t2, NULL);
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/multiple/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/multiple/Makefile
deleted file mode 100644 (file)
index 07133cf..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-C_SOURCES := main.c
-CFLAGS_EXTRAS := -fsanitize=thread -g
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/multiple/TestTsanMultiple.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/multiple/TestTsanMultiple.py
deleted file mode 100644 (file)
index b40f950..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-"""
-Test ThreadSanitizer when multiple different issues are found.
-"""
-
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-import lldbsuite.test.lldbutil as lldbutil
-import json
-
-
-class TsanMultipleTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(
-        oslist=["linux"],
-        bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)")
-    @expectedFailureNetBSD
-    @skipIfFreeBSD  # llvm.org/pr21136 runtimes not yet available by default
-    @skipIfRemote
-    @skipUnlessThreadSanitizer
-    def test(self):
-        self.build()
-        self.tsan_tests()
-
-    def tsan_tests(self):
-        exe = self.getBuildArtifact("a.out")
-        self.expect(
-            "file " + exe,
-            patterns=["Current executable set to .*a.out"])
-
-        self.runCmd("env TSAN_OPTIONS=abort_on_error=0")
-
-        self.runCmd("run")
-
-        stop_reason = self.dbg.GetSelectedTarget().process.GetSelectedThread().GetStopReason()
-        if stop_reason == lldb.eStopReasonExec:
-            # On OS X 10.10 and older, we need to re-exec to enable
-            # interceptors.
-            self.runCmd("continue")
-
-        report_count = 0
-        while self.dbg.GetSelectedTarget().process.GetSelectedThread(
-        ).GetStopReason() == lldb.eStopReasonInstrumentation:
-            report_count += 1
-
-            stop_description = self.dbg.GetSelectedTarget(
-            ).process.GetSelectedThread().GetStopDescription(100)
-
-            self.assertTrue(
-                (stop_description == "Data race detected") or
-                (stop_description == "Use of deallocated memory detected") or
-                (stop_description == "Thread leak detected") or
-                (stop_description == "Use of an uninitialized or destroyed mutex detected") or
-                (stop_description == "Unlock of an unlocked mutex (or by a wrong thread) detected")
-            )
-
-            self.expect(
-                "thread info -s",
-                "The extended stop info should contain the TSan provided fields",
-                substrs=[
-                    "instrumentation_class",
-                    "description",
-                    "mops"])
-
-            output_lines = self.res.GetOutput().split('\n')
-            json_line = '\n'.join(output_lines[2:])
-            data = json.loads(json_line)
-            self.assertEqual(data["instrumentation_class"], "ThreadSanitizer")
-
-            backtraces = self.dbg.GetSelectedTarget().process.GetSelectedThread(
-            ).GetStopReasonExtendedBacktraces(lldb.eInstrumentationRuntimeTypeThreadSanitizer)
-            self.assertTrue(backtraces.GetSize() >= 1)
-
-            self.runCmd("continue")
-
-        self.assertEqual(
-            self.dbg.GetSelectedTarget().process.GetState(),
-            lldb.eStateExited,
-            PROCESS_EXITED)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/multiple/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/multiple/main.m
deleted file mode 100644 (file)
index d15bdaa..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#import <Foundation/Foundation.h>
-#import <pthread.h>
-
-long my_global;
-
-void *Thread1(void *arg) {
-    my_global = 42;
-    return NULL;
-}
-
-void *Thread2(void *arg) {
-    my_global = 144;
-    return NULL;
-}
-
-void TestDataRace1() {
-    pthread_t t1, t2;
-    pthread_create(&t1, NULL, Thread1, NULL);
-    pthread_create(&t2, NULL, Thread2, NULL);
-    
-    pthread_join(t1, NULL);
-    pthread_join(t2, NULL);
-}
-
-void TestInvalidMutex() {
-    pthread_mutex_t m = {0};
-    pthread_mutex_lock(&m);
-    
-    pthread_mutex_init(&m, NULL);
-    pthread_mutex_lock(&m);
-    pthread_mutex_unlock(&m);
-    pthread_mutex_destroy(&m);
-    pthread_mutex_lock(&m);
-}
-
-void TestMutexWrongLock() {
-    pthread_mutex_t m = {0};
-    pthread_mutex_init(&m, NULL);
-    pthread_mutex_unlock(&m);
-}
-
-long some_global;
-
-void TestDataRaceBlocks1() {
-    dispatch_queue_t q = dispatch_queue_create("my.queue", DISPATCH_QUEUE_CONCURRENT);
-    
-    for (int i = 0; i < 2; i++) {
-        dispatch_async(q, ^{
-            some_global++;  // race 1
-            
-            usleep(100000);  // force the blocks to be on different threads
-        });
-    }
-    
-    usleep(100000);
-    dispatch_barrier_sync(q, ^{ });
-}
-
-void TestDataRaceBlocks2() {
-    dispatch_queue_t q = dispatch_queue_create("my.queue2", DISPATCH_QUEUE_CONCURRENT);
-    
-    char *c;
-    
-    c = malloc((rand() % 1000) + 10);
-    for (int i = 0; i < 2; i++) {
-        dispatch_async(q, ^{
-            c[0] = 'x';  // race 2
-            fprintf(stderr, "tid: %p\n", pthread_self());
-            usleep(100000);  // force the blocks to be on different threads
-        });
-    }
-    dispatch_barrier_sync(q, ^{ });
-    
-    free(c);
-}
-
-void TestUseAfterFree() {
-    char *c;
-    
-    c = malloc((rand() % 1000) + 10);
-    free(c);
-    c[0] = 'x';
-}
-
-void TestRacePipe() {
-    dispatch_queue_t q = dispatch_queue_create("my.queue3", DISPATCH_QUEUE_CONCURRENT);
-    
-    int a[2];
-    pipe(a);
-    int fd = a[0];
-    
-    for (int i = 0; i < 2; i++) {
-        dispatch_async(q, ^{
-            write(fd, "abc", 3);
-            usleep(100000);  // force the blocks to be on different threads
-        });
-        dispatch_async(q, ^{
-            close(fd);
-            usleep(100000);
-        });
-    }
-    
-    dispatch_barrier_sync(q, ^{ });
-}
-
-void TestThreadLeak() {
-    pthread_t t1;
-    pthread_create(&t1, NULL, Thread1, NULL);
-}
-
-int main(int argc, const char * argv[]) {
-    TestDataRace1();
-    
-    TestInvalidMutex();
-    
-    TestMutexWrongLock();
-    
-    TestDataRaceBlocks1();
-    
-    TestDataRaceBlocks2();
-    
-    TestUseAfterFree();
-    
-    TestRacePipe();
-    
-    TestThreadLeak();
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/Makefile
deleted file mode 100644 (file)
index 07133cf..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-C_SOURCES := main.c
-CFLAGS_EXTRAS := -fsanitize=thread -g
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/TestTsanThreadLeak.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/TestTsanThreadLeak.py
deleted file mode 100644 (file)
index 09704e4..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-"""
-Tests ThreadSanitizer's support to detect a leaked thread.
-"""
-
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class TsanThreadLeakTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(
-        oslist=["linux"],
-        bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)")
-    @expectedFailureNetBSD
-    @skipIfFreeBSD  # llvm.org/pr21136 runtimes not yet available by default
-    @skipIfRemote
-    @skipUnlessThreadSanitizer
-    def test(self):
-        self.build()
-        self.tsan_tests()
-
-    def tsan_tests(self):
-        exe = self.getBuildArtifact("a.out")
-        self.expect(
-            "file " + exe,
-            patterns=["Current executable set to .*a.out"])
-
-        self.runCmd("run")
-
-        stop_reason = self.dbg.GetSelectedTarget().process.GetSelectedThread().GetStopReason()
-        if stop_reason == lldb.eStopReasonExec:
-            # On OS X 10.10 and older, we need to re-exec to enable
-            # interceptors.
-            self.runCmd("continue")
-
-        # the stop reason of the thread should be breakpoint.
-        self.expect("thread list", "A thread leak should be detected",
-                    substrs=['stopped', 'stop reason = Thread leak detected'])
-
-        self.assertEqual(
-            self.dbg.GetSelectedTarget().process.GetSelectedThread().GetStopReason(),
-            lldb.eStopReasonInstrumentation)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/main.c
deleted file mode 100644 (file)
index 0c3a2cf..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <pthread.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-void *f1(void *p) {
-    printf("hello\n");
-    return NULL;
-}
-
-int main (int argc, char const *argv[])
-{
-    pthread_t t1;
-    pthread_create(&t1, NULL, f1, NULL);
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/Makefile
deleted file mode 100644 (file)
index 07133cf..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-C_SOURCES := main.c
-CFLAGS_EXTRAS := -fsanitize=thread -g
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/TestTsanThreadNumbers.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/TestTsanThreadNumbers.py
deleted file mode 100644 (file)
index 61870ea..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-"""
-Tests that TSan and LLDB have correct thread numbers.
-"""
-
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-import lldbsuite.test.lldbutil as lldbutil
-import json
-
-
-class TsanThreadNumbersTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(
-        oslist=["linux"],
-        bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)")
-    @expectedFailureNetBSD
-    @skipIfFreeBSD  # llvm.org/pr21136 runtimes not yet available by default
-    @skipIfRemote
-    @skipUnlessThreadSanitizer
-    def test(self):
-        self.build()
-        self.tsan_tests()
-
-    def tsan_tests(self):
-        exe = self.getBuildArtifact("a.out")
-        self.expect(
-            "file " + exe,
-            patterns=["Current executable set to .*a.out"])
-
-        self.runCmd("run")
-
-        stop_reason = self.dbg.GetSelectedTarget().process.GetSelectedThread().GetStopReason()
-        if stop_reason == lldb.eStopReasonExec:
-            # On OS X 10.10 and older, we need to re-exec to enable
-            # interceptors.
-            self.runCmd("continue")
-
-        # the stop reason of the thread should be breakpoint.
-        self.expect("thread list", "A data race should be detected",
-                    substrs=['stopped', 'stop reason = Data race detected'])
-
-        self.assertEqual(
-            self.dbg.GetSelectedTarget().process.GetSelectedThread().GetStopReason(),
-            lldb.eStopReasonInstrumentation)
-
-        report_thread_id = self.dbg.GetSelectedTarget(
-        ).process.GetSelectedThread().GetIndexID()
-
-        self.expect(
-            "thread info -s",
-            "The extended stop info should contain the TSan provided fields",
-            substrs=[
-                "instrumentation_class",
-                "description",
-                "mops"])
-
-        output_lines = self.res.GetOutput().split('\n')
-        json_line = '\n'.join(output_lines[2:])
-        data = json.loads(json_line)
-        self.assertEqual(data["instrumentation_class"], "ThreadSanitizer")
-        self.assertEqual(data["issue_type"], "data-race")
-        self.assertEqual(len(data["mops"]), 2)
-
-        self.assertEqual(data["mops"][0]["thread_id"], report_thread_id)
-
-        other_thread_id = data["mops"][1]["thread_id"]
-        self.assertTrue(other_thread_id != report_thread_id)
-        other_thread = self.dbg.GetSelectedTarget(
-        ).process.GetThreadByIndexID(other_thread_id)
-        self.assertTrue(other_thread.IsValid())
-
-        self.runCmd("thread select %d" % other_thread_id)
-
-        self.expect(
-            "thread backtrace",
-            "The other thread should be stopped in f1 or f2",
-            substrs=[
-                "a.out",
-                "main.c"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/main.c
deleted file mode 100644 (file)
index 5bc8213..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <pthread.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-char *pointer;
-
-void *nothing(void *p) {
-    return NULL;
-}
-
-void *f1(void *p) {
-    pointer[0] = 'x';
-    sleep(100);
-    return NULL;
-}
-
-void *f2(void *p) {
-    pointer[0] = 'y';
-    sleep(100);
-    return NULL;
-}
-
-int main (int argc, char const *argv[])
-{
-    pointer = (char *)malloc(10);
-
-    for (int i = 0; i < 3; i++) {
-        pthread_t t;
-        pthread_create(&t, NULL, nothing, NULL);
-        pthread_join(t, NULL);
-    }
-
-    pthread_t t1;
-    pthread_create(&t1, NULL, f1, NULL);
-
-    for (int i = 0; i < 3; i++) {
-        pthread_t t;
-        pthread_create(&t, NULL, nothing, NULL);
-        pthread_join(t, NULL);
-    }
-
-    pthread_t t2;
-    pthread_create(&t2, NULL, f2, NULL);
-
-    pthread_join(t1, NULL);
-    pthread_join(t2, NULL);
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tty/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tty/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tty/TestTerminal.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tty/TestTerminal.py
deleted file mode 100644 (file)
index bf5f120..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-"""
-Test lldb command aliases.
-"""
-
-from __future__ import print_function
-
-
-import unittest2
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class LaunchInTerminalTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # Darwin is the only platform that I know of that supports optionally launching
-    # a program in a separate terminal window. It would be great if other platforms
-    # added support for this.
-    @skipUnlessDarwin
-    # If the test is being run under sudo, the spawned terminal won't retain that elevated
-    # privilege so it can't open the socket to talk back to the test case
-    @unittest2.skipIf(hasattr(os, 'geteuid') and os.geteuid()
-                      == 0, "test cannot be run as root")
-    # Do we need to disable this test if the testsuite is being run on a remote system?
-    # This env var is only defined when the shell is running in a local mac
-    # terminal window
-    @unittest2.skipUnless(
-        'TERM_PROGRAM' in os.environ,
-        "test must be run on local system")
-    @no_debug_info_test
-    def test_launch_in_terminal(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        launch_info = lldb.SBLaunchInfo(["-lAF", "/tmp/"])
-        launch_info.SetLaunchFlags(
-            lldb.eLaunchFlagLaunchInTTY | lldb.eLaunchFlagCloseTTYOnExit)
-        error = lldb.SBError()
-        process = target.Launch(launch_info, error)
-        print("Error was: %s."%(error.GetCString()))
-        self.assertTrue(
-            error.Success(),
-            "Make sure launch happened successfully in a terminal window")
-        # Running in synchronous mode our process should have run and already
-        # exited by the time target.Launch() returns
-        self.assertTrue(process.GetState() == lldb.eStateExited)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tty/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/tty/main.c
deleted file mode 100644 (file)
index 71c854b..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <stdio.h>
-
-int
-main(int argc, char** argv)
-{
-  for (int i = 0; i < argc; i++) {
-    printf("%d: %s.\n", i, argv[i]);
-  }
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/type_completion/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/type_completion/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/type_completion/TestTypeCompletion.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/type_completion/TestTypeCompletion.py
deleted file mode 100644 (file)
index fb0b109..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-"""
-Check that types only get completed when necessary.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TypeCompletionTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(
-        compiler="icc",
-        bugnumber="often fails with 'NameAndAddress should be valid.")
-    # Fails with gcc 4.8.1 with llvm.org/pr15301 LLDB prints incorrect sizes
-    # of STL containers
-    def test_with_run_command(self):
-        """Check that types only get completed when necessary."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_source_regexp(
-            self, "// Set break point at this line.")
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type category enable -l c++', check=False)
-
-        self.runCmd('type category disable -l c++', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        p_vector = self.dbg.GetSelectedTarget().GetProcess(
-        ).GetSelectedThread().GetSelectedFrame().FindVariable('p')
-        p_type = p_vector.GetType()
-        self.assertFalse(
-            p_type.IsTypeComplete(),
-            'vector<T> complete but it should not be')
-
-        self.runCmd("continue")
-
-        p_vector = self.dbg.GetSelectedTarget().GetProcess(
-        ).GetSelectedThread().GetSelectedFrame().FindVariable('p')
-        p_type = p_vector.GetType()
-        self.assertFalse(
-            p_type.IsTypeComplete(),
-            'vector<T> complete but it should not be')
-
-        self.runCmd("continue")
-
-        self.runCmd("frame variable p --show-types")
-
-        p_vector = self.dbg.GetSelectedTarget().GetProcess(
-        ).GetSelectedThread().GetSelectedFrame().FindVariable('p')
-        p_type = p_vector.GetType()
-        self.assertTrue(
-            p_type.IsTypeComplete(),
-            'vector<T> should now be complete')
-        name_address_type = p_type.GetTemplateArgumentType(0)
-        self.assertTrue(
-            name_address_type.IsValid(),
-            'NameAndAddress should be valid')
-        self.assertFalse(
-            name_address_type.IsTypeComplete(),
-            'NameAndAddress complete but it should not be')
-
-        self.runCmd("continue")
-
-        self.runCmd("frame variable guy --show-types")
-
-        p_vector = self.dbg.GetSelectedTarget().GetProcess(
-        ).GetSelectedThread().GetSelectedFrame().FindVariable('p')
-        p_type = p_vector.GetType()
-        self.assertTrue(
-            p_type.IsTypeComplete(),
-            'vector<T> should now be complete')
-        name_address_type = p_type.GetTemplateArgumentType(0)
-        self.assertTrue(
-            name_address_type.IsValid(),
-            'NameAndAddress should be valid')
-        self.assertTrue(
-            name_address_type.IsTypeComplete(),
-            'NameAndAddress should now be complete')
-        field0 = name_address_type.GetFieldAtIndex(0)
-        self.assertTrue(
-            field0.IsValid(),
-            'NameAndAddress::m_name should be valid')
-        string = field0.GetType().GetPointeeType()
-        self.assertTrue(string.IsValid(), 'CustomString should be valid')
-        self.assertFalse(string.IsTypeComplete(),
-                         'CustomString complete but it should not be')
-
-        self.runCmd("continue")
-
-        p_vector = self.dbg.GetSelectedTarget().GetProcess(
-        ).GetSelectedThread().GetSelectedFrame().FindVariable('p')
-        p_type = p_vector.GetType()
-        self.assertTrue(
-            p_type.IsTypeComplete(),
-            'vector<T> should now be complete')
-        name_address_type = p_type.GetTemplateArgumentType(0)
-        self.assertTrue(
-            name_address_type.IsValid(),
-            'NameAndAddress should be valid')
-        self.assertTrue(
-            name_address_type.IsTypeComplete(),
-            'NameAndAddress should now be complete')
-        field0 = name_address_type.GetFieldAtIndex(0)
-        self.assertTrue(
-            field0.IsValid(),
-            'NameAndAddress::m_name should be valid')
-        string = field0.GetType().GetPointeeType()
-        self.assertTrue(string.IsValid(), 'CustomString should be valid')
-        self.assertFalse(string.IsTypeComplete(),
-                         'CustomString complete but it should not be')
-
-        self.runCmd('type category enable -l c++', check=False)
-        self.runCmd('frame variable guy --show-types --ptr-depth=1')
-
-        p_vector = self.dbg.GetSelectedTarget().GetProcess(
-        ).GetSelectedThread().GetSelectedFrame().FindVariable('p')
-        p_type = p_vector.GetType()
-        self.assertTrue(
-            p_type.IsTypeComplete(),
-            'vector<T> should now be complete')
-        name_address_type = p_type.GetTemplateArgumentType(0)
-        self.assertTrue(
-            name_address_type.IsValid(),
-            'NameAndAddress should be valid')
-        self.assertTrue(
-            name_address_type.IsTypeComplete(),
-            'NameAndAddress should now be complete')
-        field0 = name_address_type.GetFieldAtIndex(0)
-        self.assertTrue(
-            field0.IsValid(),
-            'NameAndAddress::m_name should be valid')
-        string = field0.GetType().GetPointeeType()
-        self.assertTrue(string.IsValid(), 'CustomString should be valid')
-        self.assertTrue(
-            string.IsTypeComplete(),
-            'CustomString should now be complete')
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/type_completion/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/type_completion/main.cpp
deleted file mode 100644 (file)
index a361df0..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <string.h>
-#include <vector>
-#include <iostream>
-
-class CustomString
-{
-public:
-  CustomString (const char* buffer) :
-    m_buffer(nullptr)
-  {
-    if (buffer)
-    {
-      auto l = strlen(buffer);
-      m_buffer = new char[1 + l];
-      strcpy(m_buffer, buffer);
-    }
-  }
-  
-  ~CustomString ()
-  {
-    delete[] m_buffer;
-  }
-  
-  const char*
-  GetBuffer ()
-  {
-    return m_buffer;
-  }
-  
-private:
-  char *m_buffer;
-};
-
-class NameAndAddress
-       {
-       public:
-               CustomString& GetName() { return *m_name; }
-               CustomString& GetAddress() { return *m_address; }
-               NameAndAddress(const char* N, const char* A) : m_name(new CustomString(N)), m_address(new CustomString(A))
-               {
-               }
-               ~NameAndAddress()
-               {
-               }
-               
-       private:
-               CustomString* m_name;
-               CustomString* m_address;
-};
-
-typedef std::vector<NameAndAddress> People;
-
-int main (int argc, const char * argv[])
-{
-       People p;
-       p.push_back(NameAndAddress("Enrico","123 Main Street"));
-       p.push_back(NameAndAddress("Foo","10710 Johnson Avenue")); // Set break point at this line.
-       p.push_back(NameAndAddress("Arpia","6956 Florey Street"));
-       p.push_back(NameAndAddress("Apple","1 Infinite Loop")); // Set break point at this line.
-       p.push_back(NameAndAddress("Richard","9500 Gilman Drive"));
-       p.push_back(NameAndAddress("Bar","3213 Windsor Rd"));
-
-       for (int j = 0; j<p.size(); j++)
-       {
-               NameAndAddress guy = p[j];
-               std::cout << "Person " << j << " is named " << guy.GetName().GetBuffer() << " and lives at " << guy.GetAddress().GetBuffer() << std::endl; // Set break point at this line.
-       }
-
-       return 0;
-       
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/Makefile
deleted file mode 100644 (file)
index 8763401..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-OBJCXX_SOURCES := main.mm
-
-CFLAGS_EXTRAS := -w
-
-
-
-LD_EXTRAS := -framework Foundation
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/TestTypeLookup.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/TestTypeLookup.py
deleted file mode 100644 (file)
index 2257fd6..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-"""
-Test type lookup command.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TypeLookupTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.mm', '// break here')
-
-    @skipUnlessDarwin
-    @skipIf(archs=['i386'])
-    def test_type_lookup(self):
-        """Test type lookup command."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.mm", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        self.expect(
-            'type lookup NoSuchType',
-            substrs=['@interface'],
-            matching=False)
-        self.expect('type lookup NSURL', substrs=['NSURL'])
-        self.expect('type lookup NSArray', substrs=['NSArray'])
-        self.expect('type lookup NSObject', substrs=['NSObject', 'isa'])
-        self.expect('type lookup PleaseDontBeARealTypeThatExists', substrs=[
-                    "no type was found matching 'PleaseDontBeARealTypeThatExists'"])
-        self.expect('type lookup MyCPPClass', substrs=['setF', 'float getF'])
-        self.expect('type lookup MyClass', substrs=['setF', 'float getF'])
-        self.expect('type lookup MyObjCClass', substrs=['@interface MyObjCClass', 'int x', 'int y'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/main.mm b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/main.mm
deleted file mode 100644 (file)
index 7b005a2..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-//===-- main.mm -----------------------------------------------*- ObjC -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#import <Foundation/Foundation.h>
-
-class MyCPPClass {
-public:
-    MyCPPClass(float f) : f(f) {}
-    
-    float setF(float f) {
-      float oldf = this->f;
-      this->f = f;
-      return oldf;
-    }
-    
-    float getF() {
-      return f;
-    }
-private:
-    float f;
-};
-
-typedef MyCPPClass MyClass;
-
-@interface MyObjCClass : NSObject {
-  int x;
-}
-- (id)init;
-- (int)read;
-@end
-
-@implementation MyObjCClass {
-  int y;
-}
-- (id)init {
-  if (self = [super init]) {
-    self->x = 12;
-    self->y = 24;
-  }
-  return self;
-}
-- (int)read {
-  return self->x + self->y;
-}
-@end
-
-int main (int argc, const char * argv[])
-{
-  MyClass my_cpp(3.1415);
-  return 0; // break here
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/basic/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/basic/Makefile
deleted file mode 100644 (file)
index b27db90..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-C_SOURCES := main.c
-CFLAGS_EXTRAS := -fsanitize=undefined -g
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/basic/TestUbsanBasic.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/basic/TestUbsanBasic.py
deleted file mode 100644 (file)
index 76fdb33..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-"""
-Tests basic UndefinedBehaviorSanitizer support (detecting an alignment error).
-"""
-
-import os
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-import lldbsuite.test.lldbutil as lldbutil
-import json
-
-
-class UbsanBasicTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessUndefinedBehaviorSanitizer
-    def test(self):
-        self.build()
-        self.ubsan_tests()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        self.line_align = line_number('main.c', '// align line')
-
-    def ubsan_tests(self):
-        # Load the test
-        exe = self.getBuildArtifact("a.out")
-        self.expect(
-            "file " + exe,
-            patterns=["Current executable set to .*a.out"])
-
-        self.runCmd("run")
-
-        process = self.dbg.GetSelectedTarget().process
-        thread = process.GetSelectedThread()
-        frame = thread.GetSelectedFrame()
-
-        # the stop reason of the thread should be breakpoint.
-        self.expect("thread list", "A ubsan issue should be detected",
-                    substrs=['stopped', 'stop reason ='])
-
-        stop_reason = thread.GetStopReason()
-        self.assertEqual(stop_reason, lldb.eStopReasonInstrumentation)
-
-        # test that the UBSan dylib is present
-        self.expect(
-            "image lookup -n __ubsan_on_report",
-            "__ubsan_on_report should be present",
-            substrs=['1 match found'])
-
-        # We should be stopped in __ubsan_on_report
-        self.assertTrue("__ubsan_on_report" in frame.GetFunctionName())
-
-        # The stopped thread backtrace should contain either 'align line'
-        found = False
-        for i in range(thread.GetNumFrames()):
-            frame = thread.GetFrameAtIndex(i)
-            if frame.GetLineEntry().GetFileSpec().GetFilename() == "main.c":
-                if frame.GetLineEntry().GetLine() == self.line_align:
-                    found = True
-        self.assertTrue(found)
-
-        backtraces = thread.GetStopReasonExtendedBacktraces(
-            lldb.eInstrumentationRuntimeTypeUndefinedBehaviorSanitizer)
-        self.assertTrue(backtraces.GetSize() == 1)
-
-        self.expect(
-            "thread info -s",
-            "The extended stop info should contain the UBSan provided fields",
-            substrs=[
-                "instrumentation_class",
-                "memory_address",
-                "description",
-                "filename",
-                "line",
-                "col"])
-
-        output_lines = self.res.GetOutput().split('\n')
-        json_line = '\n'.join(output_lines[2:])
-        data = json.loads(json_line)
-
-        self.assertEqual(data["instrumentation_class"], "UndefinedBehaviorSanitizer")
-        self.assertEqual(data["description"], "misaligned-pointer-use")
-        self.assertEqual(os.path.basename(data["filename"]), "main.c")
-        self.assertEqual(data["line"], self.line_align)
-
-        self.runCmd("continue")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/basic/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/basic/main.c
deleted file mode 100644 (file)
index 4991fc0..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-int main() {
-  int data[4];
-  return *(int *)(((char *)&data[0]) + 2); // align line
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/user-expression/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/user-expression/Makefile
deleted file mode 100644 (file)
index b27db90..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-C_SOURCES := main.c
-CFLAGS_EXTRAS := -fsanitize=undefined -g
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/user-expression/TestUbsanUserExpression.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/user-expression/TestUbsanUserExpression.py
deleted file mode 100644 (file)
index 68f8c03..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-"""
-Test that hitting a UBSan issue while running user expression doesn't break the evaluation.
-"""
-
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class UbsanUserExpressionTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessUndefinedBehaviorSanitizer
-    def test(self):
-        self.build()
-        self.ubsan_tests()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        self.line_breakpoint = line_number('main.c', '// breakpoint line')
-
-    def ubsan_tests(self):
-        # Load the test
-        exe = self.getBuildArtifact("a.out")
-        self.expect(
-            "file " + exe,
-            patterns=["Current executable set to .*a.out"])
-
-        self.runCmd("breakpoint set -f main.c -l %d" % self.line_breakpoint)
-
-        self.runCmd("run")
-
-        process = self.dbg.GetSelectedTarget().process
-        thread = process.GetSelectedThread()
-        frame = thread.GetSelectedFrame()
-
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped', 'stop reason = breakpoint'])
-
-        self.expect("p foo()", substrs=["(int) $0 = 42"])
-
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped', 'stop reason = breakpoint'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/user-expression/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/user-expression/main.c
deleted file mode 100644 (file)
index 4786aaa..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-int foo() {
-  int data[4];
-  int x = *(int *)(((char *)&data[0]) + 2);
-  return 42;
-}
-
-int main() {
-  return 0; // breakpoint line
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/ehframe/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/ehframe/Makefile
deleted file mode 100644 (file)
index 493ea3f..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-C_SOURCES := main.c
-
-CFLAGS ?= -g -fomit-frame-pointer
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/ehframe/TestEhFrameUnwind.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/ehframe/TestEhFrameUnwind.py
deleted file mode 100644 (file)
index 905543f..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-"""
-Test that we can backtrace correctly from Non ABI functions on the stack
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class EHFrameBasedUnwind(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessPlatform(['linux'])
-    @skipIf(archs=["aarch64", "arm", "i386", "i686"])
-    def test(self):
-        """Test that we can backtrace correctly from Non ABI  functions on the stack"""
-        self.build()
-        self.setTearDownCleanup()
-
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-
-        self.assertTrue(target, VALID_TARGET)
-
-        lldbutil.run_break_set_by_symbol(self, "func")
-
-        process = target.LaunchSimple(
-            ["abc", "xyz"], None, self.get_process_working_directory())
-
-        if not process:
-            self.fail("SBTarget.Launch() failed")
-
-        if process.GetState() != lldb.eStateStopped:
-            self.fail("Process should be in the 'stopped' state, "
-                      "instead the actual state is: '%s'" %
-                      lldbutil.state_type_to_str(process.GetState()))
-
-        stacktraces = lldbutil.print_stacktraces(process, string_buffer=True)
-        self.expect(stacktraces, exe=False,
-                    substrs=['(int)argc=3'])
-
-        self.runCmd("thread step-inst")
-
-        stacktraces = lldbutil.print_stacktraces(process, string_buffer=True)
-        self.expect(stacktraces, exe=False,
-                    substrs=['(int)argc=3'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/ehframe/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/ehframe/main.c
deleted file mode 100644 (file)
index 46de1ef..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-void func() {
-
-#ifdef __powerpc64__
-  __asm__ (
-    "mflr 0;"
-    "std 0,16(1);"
-    "addi 1,1,-24;"
-    "mr 31,1;"
-    ".cfi_def_cfa_offset 24;"
-    "addi 0,0,0;"
-    "addi 1,1,24;"
-    "ld 0,16(1);"
-    ".cfi_def_cfa_offset 0;"
-  );
-#elif !defined __mips__
-       __asm__ (
-               "pushq $0x10;"
-               ".cfi_def_cfa_offset 16;"
-               "jmp label;"
-               "movq $0x48, %rax;"
-"label: subq $0x38, %rax;"
-               "movq $0x48, %rcx;"
-               "movq $0x48, %rdx;"
-               "movq $0x48, %rax;"
-               "popq %rax;"
-       );
-#elif __mips64
-   __asm__ (
-    "daddiu $sp,$sp,-16;"
-    ".cfi_def_cfa_offset 16;"
-    "sd $ra,8($sp);"
-    ".cfi_offset 31, -8;"
-    "daddiu $ra,$zero,0;"
-    "ld $ra,8($sp);"
-    "daddiu $sp, $sp,16;"
-    ".cfi_restore 31;"
-    ".cfi_def_cfa_offset 0;"
-   );
-#else
-   // For MIPS32
-   __asm__ (
-    "addiu $sp,$sp,-8;"
-    ".cfi_def_cfa_offset 8;"
-    "sw $ra,4($sp);"
-    ".cfi_offset 31, -4;"
-    "addiu $ra,$zero,0;"
-    "lw $ra,4($sp);"
-    "addiu $sp,$sp,8;"
-    ".cfi_restore 31;"
-    ".cfi_def_cfa_offset 0;"
-   );
-#endif
-}
-
-int main(int argc, char const *argv[])
-{
-       func();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/Makefile
deleted file mode 100644 (file)
index 36cf5a2..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-C_SOURCES := main.c
-
-CFLAGS ?= -g -Os
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py
deleted file mode 100644 (file)
index 1086a34..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-"""
-Test that we can backtrace correctly with 'noreturn' functions on the stack
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class NoreturnUnwind(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfWindows  # clang-cl does not support gcc style attributes.
-    # clang does not preserve LR in noreturn functions, making unwinding impossible
-    @skipIf(compiler="clang", archs=['arm'], oslist=['linux'])
-    @expectedFailureAll(bugnumber="llvm.org/pr33452", triple='^mips')
-    @expectedFailureNetBSD
-    def test(self):
-        """Test that we can backtrace correctly with 'noreturn' functions on the stack"""
-        self.build()
-        self.setTearDownCleanup()
-
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        if not process:
-            self.fail("SBTarget.Launch() failed")
-
-        if process.GetState() != lldb.eStateStopped:
-            self.fail("Process should be in the 'stopped' state, "
-                      "instead the actual state is: '%s'" %
-                      lldbutil.state_type_to_str(process.GetState()))
-
-        thread = process.GetThreadAtIndex(0)
-        abort_frame_number = 0
-        for f in thread.frames:
-            # Some C libraries mangle the abort symbol into __GI_abort.
-            if f.GetFunctionName() in ["abort", "__GI_abort"]:
-                break
-            abort_frame_number = abort_frame_number + 1
-
-        if self.TraceOn():
-            print("Backtrace once we're stopped:")
-            for f in thread.frames:
-                print("  %d %s" % (f.GetFrameID(), f.GetFunctionName()))
-
-        # I'm going to assume that abort() ends up calling/invoking another
-        # function before halting the process.  In which case if abort_frame_number
-        # equals 0, we didn't find abort() in the backtrace.
-        if abort_frame_number == len(thread.frames):
-            self.fail("Unable to find abort() in backtrace.")
-
-        func_c_frame_number = abort_frame_number + 1
-        if thread.GetFrameAtIndex(
-                func_c_frame_number).GetFunctionName() != "func_c":
-            self.fail("Did not find func_c() above abort().")
-
-        # This depends on whether we see the func_b inlined function in the backtrace
-        # or not.  I'm not interested in testing that aspect of the backtrace here
-        # right now.
-
-        if thread.GetFrameAtIndex(
-                func_c_frame_number +
-                1).GetFunctionName() == "func_b":
-            func_a_frame_number = func_c_frame_number + 2
-        else:
-            func_a_frame_number = func_c_frame_number + 1
-
-        if thread.GetFrameAtIndex(
-                func_a_frame_number).GetFunctionName() != "func_a":
-            self.fail("Did not find func_a() above func_c().")
-
-        main_frame_number = func_a_frame_number + 1
-
-        if thread.GetFrameAtIndex(
-                main_frame_number).GetFunctionName() != "main":
-            self.fail("Did not find main() above func_a().")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/main.c
deleted file mode 100644 (file)
index 4f6525f..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-static void func_a (void) __attribute__((noinline));
-static void func_b (void) __attribute__((noreturn));
-static void func_c (void) __attribute__((noinline));
-
-static void
-func_c (void)
-{
-       abort ();
-}
-
-static void
-func_b (void)
-{
-       func_c ();
-       while (1)
-        ;
-}
-
-static void
-func_a (void)
-{
-       func_b ();
-}
-
-int
-main (int argc, char *argv[])
-{
-       func_a ();
-
-       return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/module-end/TestNoReturnModuleEnd.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/module-end/TestNoReturnModuleEnd.py
deleted file mode 100644 (file)
index cce485b..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-"""
-Test that we properly display the backtrace when a noreturn function happens to
-be at the end of the stack.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestNoreturnModuleEnd(TestBase):
-    NO_DEBUG_INFO_TESTCASE = True
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        super(TestNoreturnModuleEnd, self).setUp()
-        self._initial_platform = lldb.DBG.GetSelectedPlatform()
-
-    def tearDown(self):
-        lldb.DBG.SetSelectedPlatform(self._initial_platform)
-        super(TestNoreturnModuleEnd, self).tearDown()
-
-    def test(self):
-        target = self.dbg.CreateTarget("test.out")
-        process = target.LoadCore("test.core")
-        self.assertTrue(process.IsValid(), PROCESS_IS_VALID)
-        self.assertEqual(process.GetNumThreads(), 1)
-
-        thread = process.GetSelectedThread()
-        self.assertTrue(thread.IsValid())
-
-        backtrace = [
-            ["func2", 3],
-            ["func1", 8],
-            ["_start", 8],
-        ]
-        self.assertEqual(thread.GetNumFrames(), len(backtrace))
-        for i in range(len(backtrace)):
-            frame = thread.GetFrameAtIndex(i)
-            self.assertTrue(frame.IsValid())
-            symbol = frame.GetSymbol()
-            self.assertTrue(symbol.IsValid())
-            self.assertEqual(symbol.GetName(), backtrace[i][0])
-            function_start = symbol.GetStartAddress().GetLoadAddress(target)
-            self.assertEquals(function_start + backtrace[i][1], frame.GetPC())
-
-        self.dbg.DeleteTarget(target)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/module-end/a.s b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/module-end/a.s
deleted file mode 100644 (file)
index 119465c..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-# compile this with:
-# as a.s -o a.o --32 && ld a.o -m elf_i386
-# generate core file with:
-# ulimit -s 12 && ./a.out
-
-.text
-
-.globl func2
-.type func2, @function
-func2:
-  pushl %ebp
-  movl  %esp, %ebp
-  movl  0,    %eax
-  popl  %ebp
-  ret
-.size func2, .-func2
-
-.globl _start
-.type _start, @function
-_start:
-  pushl %ebp
-  movl  %esp, %ebp
-  call  func1
-  popl  %ebp
-  ret
-.size _start, .-_start
-
-.globl func1
-.type func1, @function
-func1:
-  pushl %ebp
-  movl  %esp, %ebp
-  call  func2
-.size func1, .-func1
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/module-end/test.out b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/module-end/test.out
deleted file mode 100755 (executable)
index 141c61e..0000000
Binary files a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/module-end/test.out and /dev/null differ
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py
deleted file mode 100644 (file)
index bf19cac..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-"""
-Test that we can backtrace correctly with 'sigtramp' functions on the stack
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class SigtrampUnwind(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    # On different platforms the "_sigtramp" and "__kill" frames are likely to be different.
-    # This test could probably be adapted to run on linux/*bsd easily enough.
-    @skipUnlessDarwin
-    @expectedFailureAll(oslist=["ios", "watchos", "tvos", "bridgeos"], bugnumber="<rdar://problem/34006863>")  # lldb skips 1 frame on arm64 above _sigtramp
-    def test(self):
-        """Test that we can backtrace correctly with _sigtramp on the stack"""
-        self.build()
-        self.setTearDownCleanup()
-
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        lldbutil.run_break_set_by_file_and_line(self, "main.c", line_number(
-            'main.c', '// Set breakpoint here'), num_expected_locations=1)
-
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        if not process:
-            self.fail("SBTarget.Launch() failed")
-
-        if process.GetState() != lldb.eStateStopped:
-            self.fail("Process should be in the 'stopped' state, "
-                      "instead the actual state is: '%s'" %
-                      lldbutil.state_type_to_str(process.GetState()))
-
-        self.expect(
-            "pro handle  -n false -p true -s false SIGUSR1",
-            "Have lldb pass SIGUSR1 signals",
-            substrs=[
-                "SIGUSR1",
-                "true",
-                "false",
-                "false"])
-
-        lldbutil.run_break_set_by_symbol(
-            self,
-            "handler",
-            num_expected_locations=1,
-            module_name="a.out")
-
-        self.runCmd("continue")
-
-        thread = process.GetThreadAtIndex(0)
-
-        found_handler = False
-        found_sigtramp = False
-        found_kill = False
-        found_main = False
-
-        for f in thread.frames:
-            if f.GetFunctionName() == "handler":
-                found_handler = True
-            if f.GetFunctionName() == "_sigtramp":
-                found_sigtramp = True
-            if f.GetFunctionName() == "__kill":
-                found_kill = True
-            if f.GetFunctionName() == "main":
-                found_main = True
-
-        if self.TraceOn():
-            print("Backtrace once we're stopped:")
-            for f in thread.frames:
-                print("  %d %s" % (f.GetFrameID(), f.GetFunctionName()))
-
-        if not found_handler:
-            self.fail("Unable to find handler() in backtrace.")
-
-        if not found_sigtramp:
-            self.fail("Unable to find _sigtramp() in backtrace.")
-
-        if not found_kill:
-            self.fail("Unable to find kill() in backtrace.")
-
-        if not found_main:
-            self.fail("Unable to find main() in backtrace.")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/main.c
deleted file mode 100644 (file)
index aaa03e7..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#include <stdlib.h>
-#include <signal.h>
-#include <stdio.h>
-#include <unistd.h>
-
-void handler (int in)
-{
-    puts ("in handler routine");
-    while (1)
-        ;
-}
-
-void
-foo ()
-{
-    puts ("in foo ()");
-    kill (getpid(), SIGUSR1);
-}
-int main ()
-{
-    puts ("in main");           // Set breakpoint here
-    signal (SIGUSR1, handler);
-    puts ("signal handler set up");
-    foo();
-    puts ("exiting");
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/standard/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/standard/Makefile
deleted file mode 100644 (file)
index 22f1051..0000000
+++ /dev/null
@@ -1 +0,0 @@
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/standard/TestStandardUnwind.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/standard/TestStandardUnwind.py
deleted file mode 100644 (file)
index 032b9e1..0000000
+++ /dev/null
@@ -1,175 +0,0 @@
-"""
-Test that we can backtrace correctly from standard functions.
-
-This test suit is a collection of automatically generated tests from the source files in the
-directory. Please DON'T add individual test cases to this file.
-
-To add a new test case to this test suit please create a simple C/C++ application and put the
-source file into the directory of the test cases. The test suit will automatically pick the
-file up and generate a test case from it in run time (with name test_standard_unwind_<file_name>
-after escaping some special characters).
-"""
-
-from __future__ import print_function
-
-
-import unittest2
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-test_source_dirs = ["."]
-
-
-class StandardUnwindTest(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    def standard_unwind_tests(self):
-        # The following variables have to be defined for each architecture and OS we testing for:
-        # base_function_names: List of function names where we accept that the stack unwinding is
-        #                      correct if they are on the stack. It should include the bottom most
-        #                      function on the stack and a list of functions where we know we can't
-        #                      unwind for any reason (list of expected failure functions)
-        # no_step_function_names: The list of functions where we don't want to step through
-        #                         instruction by instruction for any reason. (A valid reason is if
-        #                         it is impossible to step through a function instruction by
-        #                         instruction because it is special for some reason.) For these
-        # functions we will immediately do a step-out when we hit them.
-
-        triple = self.dbg.GetSelectedPlatform().GetTriple()
-        if re.match("arm-.*-.*-android", triple):
-            base_function_names = [
-                "_start",                # Base function on the stack
-                "__memcpy_base",         # Function reached by a fall through from the previous function
-                "__memcpy_base_aligned",
-                # Function reached by a fall through from the previous function
-            ]
-            no_step_function_names = [
-                "__sync_fetch_and_add_4",  # Calls into a special SO where we can't set a breakpoint
-                "pthread_mutex_lock",
-                # Uses ldrex and strex what interferes with the software single
-                # stepping
-                "pthread_mutex_unlock",
-                # Uses ldrex and strex what interferes with the software single
-                # stepping
-                "pthread_once",
-                # Uses ldrex and strex what interferes with the software single
-                # stepping
-            ]
-        elif re.match("aarch64-.*-.*-android", triple):
-            base_function_names = [
-                "do_arm64_start",         # Base function on the stack
-            ]
-            no_step_function_names = [
-                None,
-                "__cxa_guard_acquire",
-                # Uses ldxr and stxr what interferes with the software single
-                # stepping
-                "__cxa_guard_release",
-                # Uses ldxr and stxr what interferes with the software single
-                # stepping
-                "pthread_mutex_lock",
-                # Uses ldxr and stxr what interferes with the software single
-                # stepping
-                "pthread_mutex_unlock",
-                # Uses ldxr and stxr what interferes with the software single
-                # stepping
-                "pthread_once",
-                # Uses ldxr and stxr what interferes with the software single
-                # stepping
-            ]
-        else:
-            self.skipTest("No expectations for the current architecture")
-
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        target.BreakpointCreateByName("main")
-
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process is not None, "SBTarget.Launch() failed")
-        self.assertEqual(
-            process.GetState(),
-            lldb.eStateStopped,
-            "The process didn't hit main")
-
-        index = 0
-        while process.GetState() == lldb.eStateStopped:
-            index += 1
-            if process.GetNumThreads() > 1:
-                # In case of a multi threaded inferior if one of the thread is stopped in a blocking
-                # syscall and we try to step it then
-                # SBThread::StepInstruction() will block forever
-                self.skipTest(
-                    "Multi threaded inferiors are not supported by this test")
-
-            thread = process.GetThreadAtIndex(0)
-
-            if self.TraceOn():
-                print("INDEX: %u" % index)
-                for f in thread.frames:
-                    print(f)
-
-            if thread.GetFrameAtIndex(0).GetFunctionName() is not None:
-                found_main = False
-                for f in thread.frames:
-                    if f.GetFunctionName() in base_function_names:
-                        found_main = True
-                        break
-                self.assertTrue(found_main,
-                                "Main function isn't found on the backtrace")
-
-            if thread.GetFrameAtIndex(
-                    0).GetFunctionName() in no_step_function_names:
-                thread.StepOut()
-            else:
-                thread.StepInstruction(False)
-
-# Collect source files in the specified directories
-test_source_files = set([])
-for d in test_source_dirs:
-    if os.path.isabs(d):
-        dirname = d
-    else:
-        dirname = os.path.join(os.path.dirname(__file__), d)
-
-    for root, _, files in os.walk(dirname):
-        test_source_files = test_source_files | set(
-            os.path.abspath(os.path.join(root, f)) for f in files)
-
-# Generate test cases based on the collected source files
-for f in test_source_files:
-    if f.endswith(".cpp") or f.endswith(".c"):
-        @skipIfWindows
-        @add_test_categories(["dwarf"])
-        def test_function_dwarf(self, f=f):
-            if f.endswith(".cpp"):
-                d = {'CXX_SOURCES': f}
-            elif f.endswith(".c"):
-                d = {'C_SOURCES': f}
-
-            # If we can't compile the inferior just skip the test instead of failing it.
-            # It makes the test suit more robust when testing on several different architecture
-            # avoid the hassle of skipping tests manually.
-            try:
-                self.buildDwarf(dictionary=d)
-                self.setTearDownCleanup(d)
-            except:
-                if self.TraceOn():
-                    print(sys.exc_info()[0])
-                self.skipTest("Inferior not supported")
-            self.standard_unwind_tests()
-
-        test_name = "test_unwind_" + str(f)
-        for c in ".=()/\\":
-            test_name = test_name.replace(c, '_')
-
-        test_function_dwarf.__name__ = test_name
-        setattr(
-            StandardUnwindTest,
-            test_function_dwarf.__name__,
-            test_function_dwarf)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/standard/hand_written/divmod.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/standard/hand_written/divmod.cpp
deleted file mode 100644 (file)
index b2da92e..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-//===-- divmod.cpp ----------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-int
-main(int argc, char const *argv[])
-{
-    signed long long a = 123456789, b = 12, c = a / b, d = a % b;
-    unsigned long long e = 123456789, f = 12, g = e / f, h = e % f;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/standard/hand_written/fprintf.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/standard/hand_written/fprintf.cpp
deleted file mode 100644 (file)
index f8be1aa..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <cstdio>
-
-int
-main(int argc, char const *argv[])
-{
-    fprintf(stderr, "%d %p %s\n", argc, argv, argv[0]);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/standard/hand_written/new_delete.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/unwind/standard/hand_written/new_delete.cpp
deleted file mode 100644 (file)
index b609ea3..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-int
-main(int argc, char const *argv[])
-{
-    int* p = new int;
-    delete p;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/value_md5_crash/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/value_md5_crash/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/value_md5_crash/TestValueMD5Crash.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/value_md5_crash/TestValueMD5Crash.py
deleted file mode 100644 (file)
index 04f25c5..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-"""
-Verify that the hash computing logic for ValueObject's values can't crash us.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ValueMD5CrashTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// break here')
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24663")
-    def test_with_run_command(self):
-        """Verify that the hash computing logic for ValueObject's values can't crash us."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        value = self.frame().FindVariable("a")
-        value.SetPreferDynamicValue(lldb.eDynamicCanRunTarget)
-
-        v = value.GetValue()
-        type_name = value.GetTypeName()
-        self.assertTrue(type_name == "B *", "a is a B*")
-
-        self.runCmd("next")
-        self.runCmd("process kill")
-
-        # now the process is dead, and value needs updating
-        v = value.GetValue()
-
-        # if we are here, instead of crashed, the test succeeded
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/value_md5_crash/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/value_md5_crash/main.cpp
deleted file mode 100644 (file)
index b641049..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-class A {
-public:
-    virtual int foo() { return 1; }
-    virtual ~A () = default;
-    A() = default;
-};
-
-class B : public A {
-public:
-    virtual int foo() { return 2; }
-    virtual ~B () = default;
-    B() = default;
-};
-
-int main() {
-    A* a = new B();
-    a->foo();  // break here
-    return 0;  // break here
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/var_path/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/var_path/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/var_path/TestVarPath.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/var_path/TestVarPath.py
deleted file mode 100644 (file)
index faab8a7..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-"""
-Make sure the getting a variable path works and doesn't crash.
-"""
-
-
-
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbtest import *
-
-
-class TestVarPath(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # If your test case doesn't stress debug info, the
-    # set this to true.  That way it won't be run once for
-    # each debug info format.
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_frame_var(self):
-        self.build()
-        self.do_test()
-
-    def verify_point(self, frame, var_name, var_typename, x_value, y_value):
-        v = frame.GetValueForVariablePath(var_name)
-        self.assertTrue(v.GetError().Success(), "Make sure we find '%s'" % (var_name))
-        self.assertTrue(v.GetType().GetName() == var_typename, 
-                        "Make sure '%s' has type '%s'" % (var_name, var_typename))
-
-        if '*' in var_typename:
-            valid_prefix = var_name + '->'
-            invalid_prefix = var_name + '.'
-        else:
-            valid_prefix = var_name + '.'
-            invalid_prefix = var_name + '->'
-
-        valid_x_path = valid_prefix + 'x'
-        valid_y_path = valid_prefix + 'y'
-        invalid_x_path = invalid_prefix + 'x'
-        invalid_y_path = invalid_prefix + 'y'
-        invalid_m_path = invalid_prefix + 'm'
-
-        v = frame.GetValueForVariablePath(valid_x_path)
-        self.assertTrue(v.GetError().Success(), "Make sure we find '%s'" % (valid_x_path))
-        self.assertTrue(v.GetValue() == str(x_value), "Make sure '%s' has a value of %i" % (valid_x_path, x_value))
-        self.assertTrue(v.GetType().GetName() == "int", "Make sure '%s' has type 'int'" % (valid_x_path))
-        v = frame.GetValueForVariablePath(invalid_x_path)
-        self.assertTrue(v.GetError().Fail(), "Make sure we don't find '%s'" % (invalid_x_path))
-
-        v = frame.GetValueForVariablePath(valid_y_path)
-        self.assertTrue(v.GetError().Success(), "Make sure we find '%s'" % (valid_y_path))
-        self.assertTrue(v.GetValue() == str(y_value), "Make sure '%s' has a value of %i" % (valid_y_path, y_value))
-        self.assertTrue(v.GetType().GetName() == "int", "Make sure '%s' has type 'int'" % (valid_y_path))
-        v = frame.GetValueForVariablePath(invalid_y_path)
-        self.assertTrue(v.GetError().Fail(), "Make sure we don't find '%s'" % (invalid_y_path))
-
-        v = frame.GetValueForVariablePath(invalid_m_path)
-        self.assertTrue(v.GetError().Fail(), "Make sure we don't find '%s'" % (invalid_m_path))
-
-    def do_test(self):
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
-            self, "// Set a breakpoint here", lldb.SBFileSpec("main.cpp"))
-
-        frame = thread.GetFrameAtIndex(0)
-        v = frame.GetValueForVariablePath('no_such_variable')
-        self.assertTrue(v.GetError().Fail(), "Make sure we don't find 'no_such_variable'")
-
-        # Test an instance
-        self.verify_point(frame, 'pt', 'Point', 1, 2)
-        # Test a pointer
-        self.verify_point(frame, 'pt_ptr', 'Point *', 3030, 4040)
-        # Test using a pointer as an array
-        self.verify_point(frame, 'pt_ptr[-1]', 'Point', 1010, 2020)
-        self.verify_point(frame, 'pt_ptr[0]', 'Point', 3030, 4040)
-        self.verify_point(frame, 'pt_ptr[1]', 'Point', 5050, 6060)
-        # Test arrays
-        v = frame.GetValueForVariablePath('points')
-        self.assertTrue(v.GetError().Success(), 
-                        "Make sure we find 'points'")
-        self.verify_point(frame, 'points[0]', 'Point', 1010, 2020)
-        self.verify_point(frame, 'points[1]', 'Point', 3030, 4040)
-        self.verify_point(frame, 'points[2]', 'Point', 5050, 6060)
-        # Test a reference
-        self.verify_point(frame, 'pt_ref', 'Point &', 1, 2)
-        v = frame.GetValueForVariablePath('pt_sp')
-        self.assertTrue(v.GetError().Success(), "Make sure we find 'pt_sp'")
-        # Make sure we don't crash when looking for non existant child
-        # in type with synthetic children. This used to cause a crash.
-        v = frame.GetValueForVariablePath('pt_sp->not_valid_child')
-        self.assertTrue(v.GetError().Fail(), 
-                        "Make sure we don't find 'pt_sp->not_valid_child'")
-
-
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/var_path/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/var_path/main.cpp
deleted file mode 100644 (file)
index 0ea19cf..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#include <memory>
-
-struct Point {
-  int x, y;
-};
-
-int main() {
-  Point pt = { 1, 2 };
-  Point points[] = {{1010,2020}, {3030,4040}, {5050,6060}};
-  Point *pt_ptr = &points[1];
-  Point &pt_ref = pt;
-  std::shared_ptr<Point> pt_sp(new Point{111,222});
-  return 0; // Set a breakpoint here
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/wrong_commands/.categories b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/wrong_commands/.categories
deleted file mode 100644 (file)
index 3a3f4df..0000000
+++ /dev/null
@@ -1 +0,0 @@
-cmdline
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/wrong_commands/TestWrongCommands.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/wrong_commands/TestWrongCommands.py
deleted file mode 100644 (file)
index c722840..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-"""
-Test how lldb reacts to wrong commands
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class UnknownCommandTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    def test_ambiguous_command(self):
-        command_interpreter = self.dbg.GetCommandInterpreter()
-        self.assertTrue(command_interpreter, VALID_COMMAND_INTERPRETER)
-        result = lldb.SBCommandReturnObject()
-
-        command_interpreter.HandleCommand("g", result)
-        self.assertFalse(result.Succeeded())
-        self.assertRegexpMatches(result.GetError(), "Ambiguous command 'g'. Possible matches:")
-        self.assertRegexpMatches(result.GetError(), "gui")
-        self.assertRegexpMatches(result.GetError(), "gdb-remote")
-        self.assertEquals(1, result.GetError().count("gdb-remote"))
-
-    @no_debug_info_test
-    def test_unknown_command(self):
-        command_interpreter = self.dbg.GetCommandInterpreter()
-        self.assertTrue(command_interpreter, VALID_COMMAND_INTERPRETER)
-        result = lldb.SBCommandReturnObject()
-
-        command_interpreter.HandleCommand("qbert", result)
-        self.assertFalse(result.Succeeded())
-        self.assertEquals(result.GetError(), "error: 'qbert' is not a valid command.\n")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/iohandler/completion/TestIOHandlerCompletion.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/iohandler/completion/TestIOHandlerCompletion.py
deleted file mode 100644 (file)
index 610bf01..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-"""
-Test completion in our IOHandlers.
-"""
-
-import os
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.lldbpexpect import PExpectTest
-
-class IOHandlerCompletionTest(PExpectTest):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # PExpect uses many timeouts internally and doesn't play well
-    # under ASAN on a loaded machine..
-    @skipIfAsan
-    @skipIfEditlineSupportMissing
-    def test_completion(self):
-        self.launch(dimensions=(100,500))
-
-        # Start tab completion, go to the next page and then display all with 'a'.
-        self.child.send("\t\ta")
-        self.child.expect_exact("register")
-
-        # Try tab completing regi to register.
-        self.child.send("regi\t")
-        self.child.expect_exact(self.PROMPT + "register")
-        self.child.send("\n")
-        self.expect_prompt()
-
-        # Try tab completing directories and files. Also tests the partial
-        # completion where LLDB shouldn't print a space after the directory
-        # completion (as it didn't completed the full token).
-        dir_without_slashes = os.path.realpath(os.path.dirname(__file__)).rstrip("/")
-        self.child.send("file " + dir_without_slashes + "\t")
-        self.child.expect_exact("iohandler/completion/")
-        # If we get a correct partial completion without a trailing space, then this
-        # should complete the current test file.
-        self.child.send("TestIOHandler\t")
-        self.child.expect_exact("TestIOHandlerCompletion.py")
-        self.child.send("\n")
-        self.expect_prompt()
-
-        # Start tab completion and abort showing more commands with 'n'.
-        self.child.send("\t")
-        self.child.expect_exact("More (Y/n/a)")
-        self.child.send("n")
-        self.expect_prompt()
-
-        # Shouldn't crash or anything like that.
-        self.child.send("regoinvalid\t")
-        self.expect_prompt()
-
-        self.quit()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/iohandler/completion/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/iohandler/completion/main.c
deleted file mode 100644 (file)
index 03350dd..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-int main(int argc, char **argv) {
-  lldb_enable_attach();
-  int to_complete = 0;
-  return to_complete;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/iohandler/unicode/TestUnicode.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/iohandler/unicode/TestUnicode.py
deleted file mode 100644 (file)
index c8ff9a6..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- coding: utf-8 -*-
-"""
-Test unicode handling in LLDB.
-"""
-
-import os
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.lldbpexpect import PExpectTest
-
-class TestCase(PExpectTest):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # PExpect uses many timeouts internally and doesn't play well
-    # under ASAN on a loaded machine..
-    @skipIfAsan
-    def test_unicode_input(self):
-        self.launch()
-
-        # Send some unicode input to LLDB.
-        # We should get back that this is an invalid command with our character as UTF-8.
-        self.expect(u'\u1234', substrs=[u"error: '\u1234' is not a valid command.".encode('utf-8')])
-
-        self.quit()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/README.txt b/gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/README.txt
deleted file mode 100644 (file)
index 0f1ae7f..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-Tests in this directory are intentionally setup to
-fail, error, timeout, etc. to verify that the buildbots
-pick up errors.  The tests in this directory will be
-parked/removed/renamed after verifying they trigger
-as expected.
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/TestExpectedTimeout.py.park b/gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/TestExpectedTimeout.py.park
deleted file mode 100644 (file)
index 67db814..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-"""Tests that a timeout is detected by the testbot."""
-from __future__ import print_function
-
-import time
-
-import lldbsuite.test.lldbtest as lldbtest
-
-
-class ExpectedTimeoutTestCase(lldbtest.TestBase):
-    """Forces test timeout."""
-    mydir = lldbtest.TestBase.compute_mydir(__file__)
-
-    @lldbtest.expectedFailureAll()
-    def test_buildbot_sees_expected_timeout(self):
-        """Tests that expected timeout logic kicks in and is picked up."""
-        while True:
-            try:
-                time.sleep(1)
-            except:
-                print("ignoring exception during sleep")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/TestFail.py.park b/gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/TestFail.py.park
deleted file mode 100644 (file)
index fcdba39..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-"""Tests that a FAIL is detected by the testbot."""
-
-
-import lldbsuite.test.lldbtest as lldbtest
-
-
-class FailTestCase(lldbtest.TestBase):
-    """Forces test failure."""
-    mydir = lldbtest.TestBase.compute_mydir(__file__)
-
-    def test_buildbot_catches_failure(self):
-        """Issues a failing test assertion."""
-        self.assertTrue(
-            False,
-            "This will always fail, buildbot should flag this.")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/TestInvalidDecorator.py.park b/gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/TestInvalidDecorator.py.park
deleted file mode 100644 (file)
index d5c8c58..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-from lldbsuite.test import lldbtest
-from lldbsuite.test import decorators
-
-
-class NonExistentDecoratorTestCase(lldbtest.TestBase):
-
-    mydir = lldbtest.TestBase.compute_mydir(__file__)
-
-    @decorators.nonExistentDecorator(bugnumber="yt/1300")
-    def test(self):
-        """Verify non-existent decorators are picked up by test runner."""
-        pass
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/TestRerunFail.py.park b/gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/TestRerunFail.py.park
deleted file mode 100644 (file)
index 8d1fc95..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-"""Tests that a flakey fail is rerun, and will pass on the rerun.
-Run this test with --rerun-all-issues specified to test that
-the tests fail on the first run, then pass on the second.
-Do not mark them as flakey as, at this time, flakey tests will
-run twice, thus causing the second run to succeed."""
-
-
-import rerun_base
-
-import lldbsuite.test.lldbtest as lldbtest
-
-
-class RerunFailTestCase(rerun_base.RerunBaseTestCase):
-    """Forces test failure on first run, success on rerun."""
-    @lldbtest.no_debug_info_test
-    def test_buildbot_catches_failure(self):
-        """Issues a failing test assertion."""
-        if self.should_generate_issue():
-            self.assertTrue(
-                False,
-                "This will fail on the first call, succeed on rerun, and "
-                "alternate thereafter.")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/TestRerunFileLevelTimeout.py.park b/gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/TestRerunFileLevelTimeout.py.park
deleted file mode 100644 (file)
index 9422624..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-"""Tests that a timeout is detected by the testbot."""
-from __future__ import print_function
-
-import atexit
-import time
-
-from lldbsuite.test import decorators
-import rerun_base
-
-
-class RerunTimeoutTestCase(rerun_base.RerunBaseTestCase):
-    def maybe_do_timeout(self):
-        # Do the timeout here if we're going to time out.
-        if self.should_generate_issue():
-            # We time out this time.
-            while True:
-                try:
-                    time.sleep(1)
-                except:
-                    print("ignoring exception during sleep")
-
-        # call parent
-        super(RerunTimeoutTestCase, self).tearDown()
-
-    @decorators.no_debug_info_test
-    def test_timeout_file_level_timeout_rerun_succeeds(self):
-        """Tests that file-level timeout is cleared on rerun."""
-
-        # This test just needs to pass.  It is the exit hook (outside
-        # the test method) that will time out.
-
-        # Add the exit handler that will time out the first time around.
-        atexit.register(RerunTimeoutTestCase.maybe_do_timeout, self)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/TestRerunInline.py.park b/gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/TestRerunInline.py.park
deleted file mode 100644 (file)
index 4c50495..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-"""Tests that the rerun mechanism respects lldbinline-created tests.
-
-The current implementation of this test is expected to fail both on
-the initial run and on the rerun, assuming --rerun-all-issues is provided
-to the dotest.py run.
-
-This test could be improved by doing something in the test inferior
-C++ program that could look for the "should an issue be raised" marker
-file, and then really pass on the rerun.
-"""
-import lldbsuite.test.lldbinline as lldbinline
-
-lldbinline.MakeInlineTest(__file__, globals())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/TestRerunTimeout.py.park b/gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/TestRerunTimeout.py.park
deleted file mode 100644 (file)
index a8f5542..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-"""Tests that a timeout is detected by the testbot."""
-from __future__ import print_function
-
-import time
-
-import lldbsuite.test.decorators as decorators
-import rerun_base
-
-
-class RerunTimeoutTestCase(rerun_base.RerunBaseTestCase):
-    @decorators.no_debug_info_test
-    def test_timeout_rerun_succeeds(self):
-        """Tests that the timeout logic kicks in and that this timeout is picked up."""
-        if not self.should_generate_issue():
-            # We pass this time.
-            return
-
-        # We time out this time.
-        while True:
-            # noinspection PyBroadException
-            try:
-                time.sleep(1)
-            except:
-                print("ignoring exception during sleep")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/TestSignal.py.park b/gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/TestSignal.py.park
deleted file mode 100644 (file)
index 5a34c09..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-"""Tests that an exceptional exit is detected by the testbot."""
-
-
-import os
-import signal
-import time
-
-import lldbsuite.test.lldbtest as lldbtest
-
-
-class ExceptionalExitTestCase(lldbtest.TestBase):
-    """Forces exceptional exit."""
-    mydir = lldbtest.TestBase.compute_mydir(__file__)
-
-    @lldbtest.skipIfWindows
-    def test_buildbot_catches_exceptional_exit(self):
-        """Force process to die with exceptional exit."""
-
-        # Sleep for a couple seconds
-        try:
-            time.sleep(5)
-        except:
-            pass
-
-        os.kill(os.getpid(), signal.SIGKILL)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/TestSignalOutsideTestMethod.py.park b/gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/TestSignalOutsideTestMethod.py.park
deleted file mode 100644 (file)
index 425c5fe..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-"""Tests that an exceptional exit is detected by the testbot."""
-
-
-import atexit
-import os
-import signal
-import time
-
-import lldbsuite.test.lldbtest as lldbtest
-
-
-class ExceptionalExitOutOfTestMethodTestCase(lldbtest.TestBase):
-    """Forces exceptional exit."""
-    mydir = lldbtest.TestBase.compute_mydir(__file__)
-
-    @lldbtest.skipIfWindows
-    def test_buildbot_catches_exceptional_exit(self):
-        pass
-
-def cleanup():
-        os.kill(os.getpid(), signal.SIGKILL)
-
-atexit.register(cleanup)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/TestTimeout.py.park b/gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/TestTimeout.py.park
deleted file mode 100644 (file)
index ba7be45..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-"""Tests that a timeout is detected by the testbot."""
-from __future__ import print_function
-
-import time
-
-import lldbsuite.test.lldbtest as lldbtest
-
-
-class TimeoutTestCase(lldbtest.TestBase):
-    """Forces test timeout."""
-    mydir = lldbtest.TestBase.compute_mydir(__file__)
-
-    def test_buildbot_catches_timeout(self):
-        """Tests that timeout logic kicks in and is picked up."""
-        while True:
-            try:
-                time.sleep(1)
-            except:
-                print("ignoring exception during sleep")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/disable.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/disable.py
deleted file mode 100755 (executable)
index 6d1f93e..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env python
-"""Renames *.py files to *.py.park."""
-import os
-import sys
-
-
-def main():
-    """Drives the main script behavior."""
-    script_dir = os.path.dirname(os.path.realpath(__file__))
-    for filename in os.listdir(script_dir):
-        basename, extension = os.path.splitext(filename)
-        if basename.startswith("Test") and extension == '.py':
-            source_path = os.path.join(script_dir, filename)
-            dest_path = source_path + ".park"
-            sys.stdout.write("renaming {} to {}\n".format(
-                source_path, dest_path))
-            os.rename(source_path, dest_path)
-
-if __name__ == "__main__":
-    main()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/enable.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/enable.py
deleted file mode 100755 (executable)
index eb19276..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env python
-"""Renames *.py.park files to *.py."""
-import os
-import sys
-
-
-def main():
-    """Drives the main script behavior."""
-    script_dir = os.path.dirname(os.path.realpath(__file__))
-    for filename in os.listdir(script_dir):
-        basename, extension = os.path.splitext(filename)
-        if basename.startswith("Test") and extension == '.park':
-            source_path = os.path.join(script_dir, filename)
-            dest_path = os.path.join(script_dir, basename)
-            sys.stdout.write("renaming {} to {}\n".format(
-                source_path, dest_path))
-            os.rename(source_path, dest_path)
-
-if __name__ == "__main__":
-    main()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/inline_rerun_inferior.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/inline_rerun_inferior.cpp
deleted file mode 100644 (file)
index 6d1e023..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-//===-- main.cpp --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-typedef int Foo;
-
-int main() {
-    Foo array[3] = {1,2,3};
-    return 0; //% self.expect("frame variable array --show-types --", substrs = ['(Foo [3]) wrong_type_here = {','(Foo) [0] = 1','(Foo) [1] = 2','(Foo) [2] = 3'])
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/rerun_base.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/issue_verification/rerun_base.py
deleted file mode 100644 (file)
index 909b93b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-
-import os
-
-import lldbsuite.test.lldbtest as lldbtest
-
-
-# pylint: disable=too-few-public-methods
-class RerunBaseTestCase(lldbtest.TestBase):
-    """Forces test failure."""
-    mydir = lldbtest.TestBase.compute_mydir(__file__)
-
-    def should_generate_issue(self):
-        """Returns whether a test issue should be generated.
-
-        @returns True on the first and every other call via a given
-        test method.
-        """
-        should_pass_filename = "{}.{}.succeed-marker".format(
-            __file__, self.id())
-        fail = not os.path.exists(should_pass_filename)
-        if fail:
-            # Create the marker so that next call to this passes.
-            open(should_pass_filename, 'w').close()
-        else:
-            # Delete the marker so next time we fail.
-            os.remove(should_pass_filename)
-        return fail
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/anonymous/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/anonymous/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/anonymous/TestAnonymous.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/anonymous/TestAnonymous.py
deleted file mode 100644 (file)
index 69e23e3..0000000
+++ /dev/null
@@ -1,170 +0,0 @@
-"""Test that anonymous structs/unions are transparent to member access"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class AnonymousTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIf(
-        compiler="icc",
-        bugnumber="llvm.org/pr15036: LLDB generates an incorrect AST layout for an anonymous struct when DWARF is generated by ICC")
-    def test_expr_nest(self):
-        self.build()
-        self.common_setup(self.line0)
-
-        # These should display correctly.
-        self.expect("expression n->foo.d", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=["= 4"])
-
-        self.expect("expression n->b", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=["= 2"])
-
-    def test_expr_child(self):
-        self.build()
-        self.common_setup(self.line1)
-
-        # These should display correctly.
-        self.expect("expression c->foo.d", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=["= 4"])
-
-        self.expect(
-            "expression c->grandchild.b",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=["= 2"])
-
-    @skipIf(
-        compiler="icc",
-        bugnumber="llvm.org/pr15036: This particular regression was introduced by r181498")
-    def test_expr_grandchild(self):
-        self.build()
-        self.common_setup(self.line2)
-
-        # These should display correctly.
-        self.expect("expression g.child.foo.d", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=["= 4"])
-
-        self.expect("expression g.child.b", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=["= 2"])
-
-    def test_expr_parent(self):
-        self.build()
-        if "clang" in self.getCompiler() and "3.4" in self.getCompilerVersion():
-            self.skipTest(
-                "llvm.org/pr16214 -- clang emits partial DWARF for structures referenced via typedef")
-        self.common_setup(self.line2)
-
-        # These should display correctly.
-        self.expect("expression pz", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=["(type_z *) $", " = 0x0000"])
-
-        self.expect("expression z.y", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=["(type_y) $", "dummy = 2"])
-
-    def test_expr_null(self):
-        self.build()
-        self.common_setup(self.line2)
-
-        # This should fail because pz is 0, but it succeeds on OS/X.
-        # This fails on Linux with an upstream error "Couldn't dematerialize struct", as does "p *n" with "int *n = 0".
-        # Note that this can also trigger llvm.org/pr15036 when run
-        # interactively at the lldb command prompt.
-        self.expect("expression *(type_z *)pz", error=True)
-
-    def test_child_by_name(self):
-        self.build()
-
-        # Set debugger into synchronous mode
-        self.dbg.SetAsync(False)
-
-        # Create a target
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        break_in_main = target.BreakpointCreateBySourceRegex(
-            '// Set breakpoint 2 here.', lldb.SBFileSpec(self.source))
-        self.assertTrue(break_in_main, VALID_BREAKPOINT)
-
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-            process, break_in_main)
-        if len(threads) != 1:
-            self.fail("Failed to stop at breakpoint in main.")
-
-        thread = threads[0]
-        frame = thread.frames[0]
-
-        if not frame.IsValid():
-            self.fail("Failed to get frame 0.")
-
-        var_n = frame.FindVariable("n")
-        if not var_n.IsValid():
-            self.fail("Failed to get the variable 'n'")
-
-        elem_a = var_n.GetChildMemberWithName("a")
-        if not elem_a.IsValid():
-            self.fail("Failed to get the element a in n")
-
-        error = lldb.SBError()
-        value = elem_a.GetValueAsSigned(error, 1000)
-        if not error.Success() or value != 0:
-            self.fail("failed to get the correct value for element a in n")
-
-    def test_nest_flat(self):
-        self.build()
-        self.common_setup(self.line2)
-
-        # These should display correctly.
-        self.expect('frame variable n --flat',
-                    substrs=['n.a = 0',
-                             'n.b = 2',
-                             'n.foo.c = 0',
-                             'n.foo.d = 4'])
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers to break in main.c.
-        self.source = 'main.c'
-        self.line0 = line_number(self.source, '// Set breakpoint 0 here.')
-        self.line1 = line_number(self.source, '// Set breakpoint 1 here.')
-        self.line2 = line_number(self.source, '// Set breakpoint 2 here.')
-
-    def common_setup(self, line):
-
-        # Set debugger into synchronous mode
-        self.dbg.SetAsync(False)
-
-        # Create a target
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Set breakpoints inside and outside methods that take pointers to the
-        # containing struct.
-        lldbutil.run_break_set_by_file_and_line(
-            self, self.source, line, num_expected_locations=1, loc_exact=True)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/anonymous/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/anonymous/main.c
deleted file mode 100644 (file)
index 58ac85b..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-#include <stdio.h>
-
-struct anonymous_nest {
-  struct {
-    struct {
-      int a;
-      int b;
-    }; // anonymous
-    struct {
-      int c;
-      int d;
-    } foo;
-  }; // anonymous
-};
-
-struct anonymous_child {
-  struct {
-    struct {
-      int a;
-      int b;
-    } grandchild;
-    struct {
-      int c;
-      int d;
-    } foo;
-  }; // anonymous
-};
-
-struct anonymous_grandchild {
-  struct {
-    struct {
-      int a;
-      int b;
-    }; // anonymous
-    struct {
-      int c;
-      int d;
-    } foo;
-  } child;
-};
-
-int processor_nest (struct anonymous_nest *n)
-{
-  return n->foo.d + n->b; // Set breakpoint 0 here.
-}
-
-int processor_child (struct anonymous_child *c)
-{
-  return c->foo.d + c->grandchild.b; // Set breakpoint 1 here.
-}
-
-int processor_grandchild (struct anonymous_grandchild *g)
-{
-  return g->child.foo.d + g->child.b;
-}
-
-
-
-typedef struct {
-    int dummy;
-} type_y;
-
-typedef struct {
-    type_y y;
-} type_z;
-
-
-
-int main()
-{
-  struct anonymous_nest n = { 0, 2, 0, 4 };
-  struct anonymous_child c = { 0, 2, 0, 4 };
-  struct anonymous_grandchild g = { 0, 2, 0, 4 };
-  type_z *pz = 0;
-  type_z z = {{2}};
-
-  printf("%d\n", processor_nest(&n));
-  printf("%d\n", processor_child(&c));
-  printf("%d\n", processor_grandchild(&g)); // Set breakpoint 2 here.
-
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/array_types/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/array_types/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/array_types/TestArrayTypes.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/array_types/TestArrayTypes.py
deleted file mode 100644 (file)
index cc9ae8e..0000000
+++ /dev/null
@@ -1,228 +0,0 @@
-"""Test breakpoint by file/line number; and list variables with array types."""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ArrayTypesTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line = line_number('main.c', '// Set break point at this line.')
-
-    def test_and_run_command(self):
-        """Test 'frame variable var_name' on some variables with array types."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", self.line, num_expected_locations=1, loc_exact=False)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The test suite sometimes shows that the process has exited without stopping.
-        #
-        # CC=clang ./dotest.py -v -t array_types
-        # ...
-        # Process 76604 exited with status = 0 (0x00000000)
-        self.runCmd("process status")
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=['resolved, hit count = 1'])
-
-        # Issue 'variable list' command on several array-type variables.
-
-        self.expect(
-            "frame variable --show-types strings",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            startstr='(char *[4])',
-            substrs=[
-                '(char *) [0]',
-                '(char *) [1]',
-                '(char *) [2]',
-                '(char *) [3]',
-                'Hello',
-                'Hola',
-                'Bonjour',
-                'Guten Tag'])
-
-        self.expect(
-            "frame variable --show-types --raw -- char_16",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                '(char) [0]',
-                '(char) [15]'])
-
-        self.expect(
-            "frame variable --show-types ushort_matrix",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            startstr='(unsigned short [2][3])')
-
-        self.expect(
-            "frame variable --show-types long_6",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            startstr='(long [6])')
-
-    @expectedFailureNetBSD
-    @add_test_categories(['pyapi'])
-    def test_and_python_api(self):
-        """Use Python APIs to inspect variables with array types."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        breakpoint = target.BreakpointCreateByLocation("main.c", self.line)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Sanity check the print representation of breakpoint.
-        bp = str(breakpoint)
-        self.expect(bp, msg="Breakpoint looks good", exe=False,
-                    substrs=["file = 'main.c'",
-                             "line = %d" % self.line,
-                             "locations = 1"])
-        self.expect(
-            bp,
-            msg="Breakpoint is not resolved as yet",
-            exe=False,
-            matching=False,
-            substrs=["resolved = 1"])
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Sanity check the print representation of process.
-        proc = str(process)
-        self.expect(proc, msg="Process looks good", exe=False,
-                    substrs=["state = stopped",
-                              "executable = a.out"])
-
-        # The stop reason of the thread should be breakpoint.
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertIsNotNone(thread)
-
-        # Sanity check the print representation of thread.
-        thr = str(thread)
-        # TODO(zturner): Whether the TID is printed in hex or decimal should be controlled by a setting,
-        # and this test should read the value of the setting.  This check is currently hardcoded to
-        # match the check in Core/FormatEntity.cpp in the function FormatEntity::Format() for
-        # the Entry::Type::ThreadID case of the switch statement.
-        if self.getPlatform() == "linux" or self.getPlatform() == "freebsd":
-            tidstr = "tid = %u" % thread.GetThreadID()
-        else:
-            tidstr = "tid = 0x%4.4x" % thread.GetThreadID()
-        self.expect(
-            thr,
-            "Thread looks good with stop reason = breakpoint",
-            exe=False,
-            substrs=[tidstr])
-
-        # The breakpoint should have a hit count of 1.
-        self.assertEqual(breakpoint.GetHitCount(), 1, BREAKPOINT_HIT_ONCE)
-
-        # The breakpoint should be resolved by now.
-        bp = str(breakpoint)
-        self.expect(bp, "Breakpoint looks good and is resolved", exe=False,
-                    substrs=["file = 'main.c'",
-                             "line = %d" % self.line,
-                             "locations = 1"])
-
-        # Sanity check the print representation of frame.
-        frame = thread.GetFrameAtIndex(0)
-        frm = str(frame)
-        self.expect(
-            frm,
-            "Frame looks good with correct index %d" %
-            frame.GetFrameID(),
-            exe=False,
-            substrs=[
-                "#%d" %
-                frame.GetFrameID()])
-
-        # Lookup the "strings" string array variable and sanity check its print
-        # representation.
-        variable = frame.FindVariable("strings")
-        var = str(variable)
-        self.expect(
-            var,
-            "Variable for 'strings' looks good with correct name",
-            exe=False,
-            substrs=[
-                "%s" %
-                variable.GetName()])
-        self.DebugSBValue(variable)
-        self.assertTrue(variable.GetNumChildren() == 4,
-                        "Variable 'strings' should have 4 children")
-        byte_size = variable.GetByteSize()
-        self.assertTrue(byte_size >= 4*4 and byte_size <= 1024)
-
-        child3 = variable.GetChildAtIndex(3)
-        self.DebugSBValue(child3)
-        self.assertTrue(child3.GetSummary() == '"Guten Tag"',
-                        'strings[3] == "Guten Tag"')
-
-        # Lookup the "char_16" char array variable.
-        variable = frame.FindVariable("char_16")
-        self.DebugSBValue(variable)
-        self.assertTrue(variable.GetNumChildren() == 16,
-                        "Variable 'char_16' should have 16 children")
-
-        # Lookup the "ushort_matrix" ushort[] array variable.
-        # Notice the pattern of int(child0_2.GetValue(), 0).  We pass a
-        # base of 0 so that the proper radix is determined based on the contents
-        # of the string.  Same applies to long().
-        variable = frame.FindVariable("ushort_matrix")
-        self.DebugSBValue(variable)
-        self.assertTrue(variable.GetNumChildren() == 2,
-                        "Variable 'ushort_matrix' should have 2 children")
-        child0 = variable.GetChildAtIndex(0)
-        self.DebugSBValue(child0)
-        self.assertTrue(child0.GetNumChildren() == 3,
-                        "Variable 'ushort_matrix[0]' should have 3 children")
-        child0_2 = child0.GetChildAtIndex(2)
-        self.DebugSBValue(child0_2)
-        self.assertTrue(int(child0_2.GetValue(), 0) == 3,
-                        "ushort_matrix[0][2] == 3")
-
-        # Lookup the "long_6" char array variable.
-        variable = frame.FindVariable("long_6")
-        self.DebugSBValue(variable)
-        self.assertTrue(variable.GetNumChildren() == 6,
-                        "Variable 'long_6' should have 6 children")
-        child5 = variable.GetChildAtIndex(5)
-        self.DebugSBValue(child5)
-        self.assertTrue(int(child5.GetValue(), 0) == 6,
-                        "long_6[5] == 6")
-
-        # Last, check that "long_6" has a value type of eValueTypeVariableLocal
-        # and "argc" has eValueTypeVariableArgument.
-        from lldbsuite.test.lldbutil import value_type_to_str
-        self.assertTrue(
-            variable.GetValueType() == lldb.eValueTypeVariableLocal,
-            "Variable 'long_6' should have '%s' value type." %
-            value_type_to_str(
-                lldb.eValueTypeVariableLocal))
-        argc = frame.FindVariable("argc")
-        self.DebugSBValue(argc)
-        self.assertTrue(argc.GetValueType() == lldb.eValueTypeVariableArgument,
-                        "Variable 'argc' should have '%s' value type." %
-                        value_type_to_str(lldb.eValueTypeVariableArgument))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/array_types/cmds.txt b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/array_types/cmds.txt
deleted file mode 100644 (file)
index 8feebe2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-break main.c:42
-continue
-var
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/array_types/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/array_types/main.c
deleted file mode 100644 (file)
index eda7dc3..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-int main (int argc, char const *argv[])
-{
-    struct point_tag {
-        int x;
-        int y;
-    };
-
-    struct rect_tag {
-        struct point_tag bottom_left;
-        struct point_tag top_right;
-    };
-    char char_16[16] = "Hello World\n";
-    char *strings[] = { "Hello", "Hola", "Bonjour", "Guten Tag" };
-    char char_matrix[3][3] = {{'a', 'b', 'c' }, {'d', 'e', 'f' }, {'g', 'h', 'i' }};
-    char char_matrix_matrix[3][2][3] =
-    {   {{'a', 'b', 'c' }, {'d', 'e', 'f' }},
-        {{'A', 'B', 'C' }, {'D', 'E', 'F' }},
-        {{'1', '2', '3' }, {'4', '5', '6' }}};
-    short short_4[4] = { 1,2,3,4 };
-    short short_matrix[1][2] = { {1,2} };
-    unsigned short ushort_4[4] = { 1,2,3,4 };
-    unsigned short ushort_matrix[2][3] = {
-        { 1, 2, 3},
-        {11,22,33}
-    };
-    int int_2[2] = { 1, 2 };
-    unsigned int uint_2[2] = { 1, 2 };
-    long long_6[6] = { 1, 2, 3, 4, 5, 6 };
-    unsigned long ulong_6[6] = { 1, 2, 3, 4, 5, 6 };
-    struct point_tag points_2[2] = {
-        {1,2},
-        {3,4}
-    };
-    struct point_tag points_2_4_matrix[2][4] = { // Set break point at this line. 
-        {{ 1, 2}, { 3, 4}, { 5, 6}, { 7, 8}},
-        {{11,22}, {33,44}, {55,66}, {77,88}}
-    };
-    struct rect_tag rects_2[2] = {
-        {{1,2}, {3,4}},
-        {{5,6}, {7,8}}
-    };
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
deleted file mode 100644 (file)
index 7b28a32..0000000
+++ /dev/null
@@ -1,220 +0,0 @@
-"""Show bitfields and check that they display correctly."""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class BitfieldsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line = line_number('main.c', '// Set break point at this line.')
-
-    # BitFields exhibit crashes in record layout on Windows
-    # (http://llvm.org/pr21800)
-    @skipIfWindows
-    def test_and_run_command(self):
-        """Test 'frame variable ...' on a variable with bitfields."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break inside the main.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        # This should display correctly.
-        self.expect(
-            "frame variable --show-types bits",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                '(uint32_t:1) b1 = 1',
-                '(uint32_t:2) b2 = 3',
-                '(uint32_t:3) b3 = 7',
-                '(uint32_t) b4 = 15',
-                '(uint32_t:5) b5 = 31',
-                '(uint32_t:6) b6 = 63',
-                '(uint32_t:7) b7 = 127',
-                '(uint32_t:4) four = 15'])
-
-        # And so should this.
-        # rdar://problem/8348251
-        self.expect(
-            "frame variable --show-types",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                '(uint32_t:1) b1 = 1',
-                '(uint32_t:2) b2 = 3',
-                '(uint32_t:3) b3 = 7',
-                '(uint32_t) b4 = 15',
-                '(uint32_t:5) b5 = 31',
-                '(uint32_t:6) b6 = 63',
-                '(uint32_t:7) b7 = 127',
-                '(uint32_t:4) four = 15'])
-
-        self.expect("expr (bits.b1)", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['uint32_t', '1'])
-        self.expect("expr (bits.b2)", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['uint32_t', '3'])
-        self.expect("expr (bits.b3)", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['uint32_t', '7'])
-        self.expect("expr (bits.b4)", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['uint32_t', '15'])
-        self.expect("expr (bits.b5)", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['uint32_t', '31'])
-        self.expect("expr (bits.b6)", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['uint32_t', '63'])
-        self.expect("expr (bits.b7)", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['uint32_t', '127'])
-        self.expect("expr (bits.four)", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['uint32_t', '15'])
-
-        self.expect(
-            "frame variable --show-types more_bits",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                '(uint32_t:3) a = 3',
-                '(uint8_t:1) b = \'\\0\'',
-                '(uint8_t:1) c = \'\\x01\'',
-                '(uint8_t:1) d = \'\\0\''])
-
-        self.expect("expr (more_bits.a)", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['uint32_t', '3'])
-        self.expect("expr (more_bits.b)", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['uint8_t', '\\0'])
-        self.expect("expr (more_bits.c)", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['uint8_t', '\\x01'])
-        self.expect("expr (more_bits.d)", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['uint8_t', '\\0'])
-
-        self.expect("expr (packed.a)", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['char', "'a'"])
-        self.expect("expr (packed.b)", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['uint32_t', "10"])
-        self.expect("expr/x (packed.c)", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['uint32_t', "7112233"])
-
-        for bit in range(1,18):
-            expected = "1" if bit in [1, 5, 7, 13] else "0"
-            self.expect("expr even_more_bits.b" + str(bit), VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['uint8_t', expected])
-
-        for bit in [3, 10, 14]:
-            self.expect("expr even_more_bits.b" + str(bit) + " = 1", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['uint8_t', "1"])
-
-        self.expect(
-            "frame variable --show-types even_more_bits",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                '(uint8_t:1) b1 = \'\\x01\'',
-                '(uint8_t:1) b2 = \'\\0\'',
-                '(uint8_t:1) b3 = \'\\x01\'',
-                '(uint8_t:1) b4 = \'\\0\'',
-                '(uint8_t:1) b5 = \'\\x01\'',
-                '(uint8_t:1) b6 = \'\\0\'',
-                '(uint8_t:1) b7 = \'\\x01\'',
-                '(uint8_t:1) b8 = \'\\0\'',
-                '(uint8_t:1) b9 = \'\\0\'',
-                '(uint8_t:1) b10 = \'\\x01\'',
-                '(uint8_t:1) b12 = \'\\0\'',
-                '(uint8_t:1) b13 = \'\\x01\'',
-                '(uint8_t:1) b14 = \'\\x01\'',
-                '(uint8_t:1) b15 = \'\\0\'',
-                '(uint8_t:1) b16 = \'\\0\'',
-                '(uint8_t:1) b17 = \'\\0\'',
-                ])
-
-        self.expect("v/x large_packed", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=["a = 0x0000000cbbbbaaaa", "b = 0x0000000dffffeee"])
-
-
-    @add_test_categories(['pyapi'])
-    # BitFields exhibit crashes in record layout on Windows
-    # (http://llvm.org/pr21800)
-    @skipIfWindows
-    def test_and_python_api(self):
-        """Use Python APIs to inspect a bitfields variable."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        breakpoint = target.BreakpointCreateByLocation("main.c", self.line)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertIsNotNone(thread)
-
-        # The breakpoint should have a hit count of 1.
-        self.assertEqual(breakpoint.GetHitCount(), 1, BREAKPOINT_HIT_ONCE)
-
-        # Lookup the "bits" variable which contains 8 bitfields.
-        frame = thread.GetFrameAtIndex(0)
-        bits = frame.FindVariable("bits")
-        self.DebugSBValue(bits)
-        self.assertTrue(
-            bits.GetTypeName() == 'Bits',
-            "bits.GetTypeName() == 'Bits'")
-        self.assertTrue(
-            bits.GetNumChildren() == 10,
-            "bits.GetNumChildren() == 10")
-        test_compiler = self.getCompiler()
-        self.assertTrue(bits.GetByteSize() == 32, "bits.GetByteSize() == 32")
-
-        # Notice the pattern of int(b1.GetValue(), 0).  We pass a base of 0
-        # so that the proper radix is determined based on the contents of the
-        # string.
-        b1 = bits.GetChildMemberWithName("b1")
-        self.DebugSBValue(b1)
-        self.assertTrue(b1.GetName() == "b1" and
-                        b1.GetTypeName() == "uint32_t:1" and
-                        b1.IsInScope() and
-                        int(b1.GetValue(), 0) == 1,
-                        'bits.b1 has type uint32_t:1, is in scope, and == 1')
-
-        b7 = bits.GetChildMemberWithName("b7")
-        self.DebugSBValue(b7)
-        self.assertTrue(b7.GetName() == "b7" and
-                        b7.GetTypeName() == "uint32_t:7" and
-                        b7.IsInScope() and
-                        int(b7.GetValue(), 0) == 127,
-                        'bits.b7 has type uint32_t:7, is in scope, and == 127')
-
-        four = bits.GetChildMemberWithName("four")
-        self.DebugSBValue(four)
-        self.assertTrue(four.GetName() == "four" and
-                        four.GetTypeName() == "uint32_t:4" and
-                        four.IsInScope() and
-                        int(four.GetValue(), 0) == 15,
-                        'bits.four has type uint32_t:4, is in scope, and == 15')
-
-        # Now kill the process, and we are done.
-        rc = target.GetProcess().Kill()
-        self.assertTrue(rc.Success())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/main.c
deleted file mode 100644 (file)
index be3a1af..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdint.h>
-#include <stdio.h>
-#include <string.h>
-
-int main (int argc, char const *argv[])
-{
-    struct Bits
-    {
-        uint32_t    : 1, // Unnamed bitfield
-                    b1 : 1,
-                    b2 : 2,
-                    : 2, // Unnamed bitfield
-                    b3 : 3,
-                    : 2, // Unnamed bitfield (this will get removed)
-                    b4 __attribute__ ((aligned(16))),
-                    b5 : 5,
-                    b6 : 6,
-                    b7 : 7,
-                    four : 4;
-    };
-
-    printf("%lu", sizeof(struct Bits));
-
-    struct Bits bits;
-    int i;
-    for (i=0; i<(1<<1); i++)
-        bits.b1 = i;        //// break $source:$line
-    for (i=0; i<(1<<2); i++)
-        bits.b2 = i;        //// break $source:$line
-    for (i=0; i<(1<<3); i++)
-        bits.b3 = i;        //// break $source:$line
-    for (i=0; i<(1<<4); i++)
-        bits.b4 = i;        //// break $source:$line
-    for (i=0; i<(1<<5); i++)
-        bits.b5 = i;        //// break $source:$line
-    for (i=0; i<(1<<6); i++)
-        bits.b6 = i;        //// break $source:$line
-    for (i=0; i<(1<<7); i++)
-        bits.b7 = i;        //// break $source:$line
-    for (i=0; i<(1<<4); i++)
-        bits.four = i;      //// break $source:$line
-
-    struct MoreBits
-    {
-        uint32_t    a : 3;
-        uint8_t       : 1;
-        uint8_t     b : 1;
-        uint8_t     c : 1;
-        uint8_t     d : 1;
-    };
-
-    struct MoreBits more_bits;
-
-    more_bits.a = 3;
-    more_bits.b = 0;
-    more_bits.c = 1;
-    more_bits.d = 0;
-
-    struct EvenMoreBits
-    {
-        uint8_t b1  : 1, b2  : 1, b3  : 1, b4  : 1, b5  : 1, b6  : 1,
-                b7  : 1, b8  : 1, b9  : 1, b10 : 1, b11 : 1, b12 : 1,
-                b13 : 1, b14 : 1, b15 : 1, b16 : 1, b17 : 1;
-    };
-
-    struct EvenMoreBits even_more_bits;
-    memset(&even_more_bits, 0, sizeof(even_more_bits));
-    even_more_bits.b1 = 1;
-    even_more_bits.b5 = 1;
-    even_more_bits.b7 = 1;
-    even_more_bits.b13 = 1;
-
-#pragma pack(1)
-    struct PackedBits
-    {
-        char a;
-       uint32_t b : 5,
-                 c : 27;
-    };
-#pragma pack()  
-    struct PackedBits packed;
-    packed.a = 'a';
-    packed.b = 10;
-    packed.c = 0x7112233;
-
-    struct LargePackedBits {
-        uint64_t a: 36;
-        uint64_t b: 36;
-    } __attribute__((packed));
-
-    struct LargePackedBits large_packed =
-      (struct LargePackedBits){ 0xcbbbbaaaa, 0xdffffeeee };
-    
-    return 0;               //// Set break point at this line.
-
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/blocks/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/blocks/Makefile
deleted file mode 100644 (file)
index 57083c9..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-C_SOURCES := main.c
-CFLAGS_EXTRAS := -fblocks
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/blocks/TestBlocks.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/blocks/TestBlocks.py
deleted file mode 100644 (file)
index cd82d15..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-"""Test that lldb can invoke blocks and access variables inside them"""
-
-
-
-import unittest2
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class BlocksTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    lines = []
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers to break at.
-        self.lines.append(line_number('main.c', '// Set breakpoint 0 here.'))
-        self.lines.append(line_number('main.c', '// Set breakpoint 1 here.'))
-
-    def launch_common(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        self.is_started = False
-
-        # Break inside the foo function which takes a bar_ptr argument.
-        for line in self.lines:
-            lldbutil.run_break_set_by_file_and_line(
-                self, "main.c", line, num_expected_locations=1, loc_exact=True)
-
-        self.wait_for_breakpoint()
-
-    @skipUnlessDarwin
-    def test_expr(self):
-        self.launch_common()
-
-        self.expect("expression a + b", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=["= 7"])
-
-        self.expect("expression c", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=["= 1"])
-
-        self.wait_for_breakpoint()
-
-        # This should display correctly.
-        self.expect("expression (int)neg (-12)", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=["= 12"])
-
-    @skipUnlessDarwin
-    def test_define(self):
-        self.launch_common()
-
-        self.runCmd(
-            "expression int (^$add)(int, int) = ^int(int a, int b) { return a + b; };")
-        self.expect(
-            "expression $add(2,3)",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[" = 5"])
-
-        self.runCmd("expression int $a = 3")
-        self.expect(
-            "expression int (^$addA)(int) = ^int(int b) { return $a + b; };",
-            "Proper error is reported on capture",
-            error=True)
-
-    def wait_for_breakpoint(self):
-        if not self.is_started:
-            self.is_started = True
-            self.runCmd("process launch", RUN_SUCCEEDED)
-        else:
-            self.runCmd("process continue", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/blocks/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/blocks/main.c
deleted file mode 100644 (file)
index 415e6c6..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#include <stdio.h>
-
-int main()
-{
-    int c = 1;
-
-    int (^add)(int, int) = ^int(int a, int b)
-    {
-        return a + b + c; // Set breakpoint 0 here.
-    };
-
-    int (^neg)(int) = ^int(int a)
-    {
-        return -a;
-    };
-
-    printf("%d\n", add(3, 4));
-    printf("%d\n", neg(-5)); // Set breakpoint 1 here.
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Makefile
deleted file mode 100644 (file)
index 59778ab..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-LD_EXTRAS := -L. -LOne -l$(LIB_PREFIX)One -LTwo -l$(LIB_PREFIX)Two
-C_SOURCES := main.c
-
-include Makefile.rules
-
-.PHONY:
-a.out: lib_One lib_Two
-
-lib_%:
-       $(MAKE) VPATH=$(SRCDIR)/$* -I $(SRCDIR) -f $(SRCDIR)/$*.mk
-
-clean::
-       $(MAKE) -f $(SRCDIR)/One.mk clean
-       $(MAKE) -f $(SRCDIR)/Two.mk clean
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One.mk b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One.mk
deleted file mode 100644 (file)
index 18f3725..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-DYLIB_NAME := One
-DYLIB_C_SOURCES := One.c OneConstant.c
-DYLIB_ONLY := YES
-
-include Makefile.rules
-
-OneConstant.o: OneConstant.c
-       $(CC) $(CFLAGS_NO_DEBUG) -c $< -o $@
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One/One.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One/One.c
deleted file mode 100644 (file)
index 6bd729f..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#include "One.h"
-#include <stdio.h>
-
-void one() {
-  printf("One\n"); // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One/One.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One/One.h
deleted file mode 100644 (file)
index aae2757..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#ifndef ONE_H
-#define ONE_H
-LLDB_TEST_API void one();
-#endif
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One/OneConstant.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One/OneConstant.c
deleted file mode 100644 (file)
index 8255c2f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-int __attribute__ ((visibility("hidden"))) conflicting_symbol = 11111;
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/TestConflictingSymbol.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/TestConflictingSymbol.py
deleted file mode 100644 (file)
index 9d088e3..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-"""Test that conflicting symbols in different shared libraries work correctly"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestConflictingSymbols(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        TestBase.setUp(self)
-        lldbutil.mkdir_p(self.getBuildArtifact("One"))
-        lldbutil.mkdir_p(self.getBuildArtifact("Two"))
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24489")
-    @expectedFailureNetBSD
-    def test_conflicting_symbols(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Register our shared libraries for remote targets so they get
-        # automatically uploaded
-        environment = self.registerSharedLibrariesWithTarget(
-            target, ['One', 'Two'])
-
-        lldbutil.run_break_set_by_source_regexp(self, '// break here',
-                extra_options='-f One.c', num_expected_locations=-2)
-        lldbutil.run_break_set_by_source_regexp(self, '// break here',
-                extra_options='-f Two.c', num_expected_locations=-2)
-        lldbutil.run_break_set_by_source_regexp(self, '// break here',
-                extra_options='-f main.c', num_expected_locations=1)
-
-        process = target.LaunchSimple(
-            None, environment, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        # This should display correctly.
-        self.expect(
-            "expr (unsigned long long)conflicting_symbol",
-            "Symbol from One should be found",
-            substrs=[
-                "11111"])
-
-        self.runCmd("continue", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        self.expect(
-            "expr (unsigned long long)conflicting_symbol",
-            "Symbol from Two should be found",
-            substrs=[
-                "22222"])
-
-        self.runCmd("continue", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        self.expect(
-            "expr (unsigned long long)conflicting_symbol",
-            "An error should be printed when symbols can't be ordered",
-            error=True,
-            substrs=[
-                "Multiple internal symbols"])
-
-    @expectedFailureAll(bugnumber="llvm.org/pr35043")
-    @skipIfWindows # This test is "passing" on Windows, but it is a false positive.
-    def test_shadowed(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Register our shared libraries for remote targets so they get
-        # automatically uploaded
-        environment = self.registerSharedLibrariesWithTarget(
-            target, ['One', 'Two'])
-
-        lldbutil.run_break_set_by_source_regexp(self, '// break here',
-                extra_options='-f main.c', num_expected_locations=1)
-
-        process = target.LaunchSimple(
-            None, environment, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # As we are shadowing the conflicting symbol, there should be no
-        # ambiguity in this expression.
-        self.expect(
-            "expr int conflicting_symbol = 474747; conflicting_symbol",
-            substrs=[ "474747"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two.mk b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two.mk
deleted file mode 100644 (file)
index 79b256a..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-DYLIB_NAME := Two
-DYLIB_C_SOURCES := Two.c TwoConstant.c
-DYLIB_ONLY := YES
-
-include Makefile.rules
-
-TwoConstant.o: TwoConstant.c
-       $(CC) $(CFLAGS_NO_DEBUG) -c $< -o $@
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two/Two.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two/Two.c
deleted file mode 100644 (file)
index 8d8d668..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#include "Two.h"
-#include <stdio.h>
-
-void two() {
-  printf("Two\n"); // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two/Two.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two/Two.h
deleted file mode 100644 (file)
index 450fe5a..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#ifndef TWO_H
-#define TWO_H
-LLDB_TEST_API void two();
-#endif
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two/TwoConstant.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two/TwoConstant.c
deleted file mode 100644 (file)
index 9fc7c4b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-int __attribute__ ((visibility("hidden"))) conflicting_symbol = 22222;
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/main.c
deleted file mode 100644 (file)
index 4dcd443..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#include "One/One.h"
-#include "Two/Two.h"
-
-#include <stdio.h>
-
-int main() {
-  one();
-  two();
-  printf("main\n"); // break here
-  return(0); 
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/Makefile
deleted file mode 100644 (file)
index 325be90..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-C_SOURCES := main.c functions.c
-
-CFLAGS_EXTRAS := -O3
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/TestConstVariables.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/TestConstVariables.py
deleted file mode 100644 (file)
index 59fa6bc..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-"""Check that compiler-generated constant values work correctly"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ConstVariableTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(
-        oslist=["freebsd", "linux"],
-        compiler="clang", compiler_version=["<", "3.5"])
-    @expectedFailureAll(
-        oslist=["freebsd", "linux"],
-        compiler="clang", compiler_version=["=", "3.7"])
-    @expectedFailureAll(
-        oslist=["freebsd", "linux"],
-        compiler="clang", compiler_version=["=", "3.8"])
-    @expectedFailureAll(oslist=["freebsd", "linux"], compiler="icc")
-    @expectedFailureAll(archs=['mips', 'mipsel', 'mips64', 'mips64el'])
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows")
-    @expectedFailureNetBSD
-    def test_and_run_command(self):
-        """Test interpreted and JITted expressions on constant values."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break inside the main.
-        lldbutil.run_break_set_by_symbol(
-            self, "main", num_expected_locations=1)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        self.runCmd("next")
-        self.runCmd("next")
-
-        # Try frame variable.
-        self.expect("frame variable index", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['(int32_t) index = 512'])
-
-        # Try an interpreted expression.
-        self.expect("expr (index + 512)", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['1024'])
-
-        # Try a JITted expression.
-        self.expect(
-            "expr (int)getpid(); (index - 256)",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=['256'])
-
-        self.runCmd("kill")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/functions.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/functions.c
deleted file mode 100644 (file)
index c9ea638..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#include <stdio.h>
-
-void foo()
-{
-  printf("foo()\n");
-}
-
-int bar()
-{
-  int ret = 3;
-  printf("bar()->%d\n", ret);
-  return ret;
-}
-
-void baaz(int i)
-{
-  printf("baaz(%d)\n", i);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/main.c
deleted file mode 100644 (file)
index 50a924e..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#include <stdint.h>
-#include <stdio.h>
-
-extern int foo();
-extern int bar();
-extern int baaz(int i);
-
-int main()
-{
-  int32_t index;
-
-  foo();
-
-  index = 512;
-
-  if (bar())
-  {
-    printf("COMPILER PLEASE STOP HERE\n");
-    index = 256;
-  }
-
-  baaz(index);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/enum_types/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/enum_types/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
deleted file mode 100644 (file)
index af9b6fb..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-"""Look up enum type information and check for correct display."""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.decorators import *
-
-
-class EnumTypesTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line = line_number('main.c', '// Set break point at this line.')
-
-    def test(self):
-        """Test 'image lookup -t days' and check for correct display and enum value printing."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_to_source_breakpoint(
-            self, '// Breakpoint for bitfield', lldb.SBFileSpec("main.c"))
-
-        self.expect("fr var a", DATA_TYPES_DISPLAYED_CORRECTLY,
-                    patterns=[' = A$'])
-        self.expect("fr var b", DATA_TYPES_DISPLAYED_CORRECTLY,
-                    patterns=[' = B$'])
-        self.expect("fr var c", DATA_TYPES_DISPLAYED_CORRECTLY,
-                    patterns=[' = C$'])
-        self.expect("fr var ab", DATA_TYPES_DISPLAYED_CORRECTLY,
-                    patterns=[' = AB$'])
-        self.expect("fr var ac", DATA_TYPES_DISPLAYED_CORRECTLY,
-                    patterns=[' = A | C$'])
-        self.expect("fr var all", DATA_TYPES_DISPLAYED_CORRECTLY,
-                    patterns=[' = ALL$'])
-        # Test that an enum that doesn't match the heuristic we use in
-        # ClangASTContext::DumpEnumValue, gets printed as a raw integer.
-        self.expect("fr var omega", DATA_TYPES_DISPLAYED_CORRECTLY,
-                    patterns=[' = 7$'])
-        # Test the behavior in case have a variable of a type considered
-        # 'bitfield' by the heuristic, but the value isn't actually fully
-        # covered by the enumerators.
-        self.expect("p (enum bitfield)nonsense", DATA_TYPES_DISPLAYED_CORRECTLY,
-                    patterns=[' = B | C | 0x10$'])
-
-        # Break inside the main.
-        bkpt_id = lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", self.line, num_expected_locations=1, loc_exact=True)
-        self.runCmd("c", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        # Look up information about the 'days' enum type.
-        # Check for correct display.
-        self.expect("image lookup -t days", DATA_TYPES_DISPLAYED_CORRECTLY,
-                    substrs=['enum days {',
-                             'Monday',
-                             'Tuesday',
-                             'Wednesday',
-                             'Thursday',
-                             'Friday',
-                             'Saturday',
-                             'Sunday',
-                             'kNumDays',
-                             '}'])
-
-        enum_values = ['-4',
-                       'Monday',
-                       'Tuesday',
-                       'Wednesday',
-                       'Thursday',
-                       'Friday',
-                       'Saturday',
-                       'Sunday',
-                       'kNumDays',
-                       '5']
-
-        # Make sure a pointer to an anonymous enum type does crash LLDB and displays correctly using
-        # frame variable and expression commands
-        self.expect(
-            'frame variable f.op',
-            DATA_TYPES_DISPLAYED_CORRECTLY,
-            substrs=[
-                'ops *',
-                'f.op'],
-            patterns=['0x0+$'])
-        self.expect(
-            'frame variable *f.op',
-            DATA_TYPES_DISPLAYED_CORRECTLY,
-            substrs=[
-                'ops',
-                '*f.op',
-                '<parent is NULL>'])
-        self.expect(
-            'expr f.op',
-            DATA_TYPES_DISPLAYED_CORRECTLY,
-            substrs=[
-                'ops *',
-                '$'],
-            patterns=['0x0+$'])
-        self.expect(
-            'expr *f.op',
-            DATA_TYPES_DISPLAYED_CORRECTLY,
-            substrs=['error:'],
-            error=True)
-
-        bkpt = self.target().FindBreakpointByID(bkpt_id)
-        for enum_value in enum_values:
-            self.expect(
-                "frame variable day",
-                'check for valid enumeration value',
-                substrs=[enum_value])
-            lldbutil.continue_to_breakpoint(self.process(), bkpt)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/enum_types/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/enum_types/main.c
deleted file mode 100644 (file)
index 675af5e..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-#include <stdio.h>
-
-// Forward declare an enumeration (only works in C, not C++)
-typedef enum ops ops;
-
-struct foo {
-       ops *op;
-};
-
-int main (int argc, char const *argv[])
-{
-    enum bitfield {
-        None = 0,
-        A = 1 << 0,
-        B = 1 << 1,
-        C = 1 << 2,
-        AB = A | B,
-        ALL = A | B | C,
-    };
-
-    enum non_bitfield {
-        Alpha = 3,
-        Beta = 4
-    };
-
-    enum days {
-        Monday = -3,
-        Tuesday,
-        Wednesday,
-        Thursday,
-        Friday,
-        Saturday,
-        Sunday,
-        kNumDays
-    };
-
-    enum bitfield a = A, b = B, c = C, ab = AB, ac = A | C, all = ALL;
-    int nonsense = a + b + c + ab + ac + all;
-    enum non_bitfield omega = Alpha | Beta;
-
-    enum days day;
-    struct foo f;
-    f.op = NULL; // Breakpoint for bitfield
-    for (day = Monday - 1; day <= kNumDays + 1; day++)
-    {
-        printf("day as int is %i\n", (int)day); // Set break point at this line.
-    }
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/find_struct_type/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/find_struct_type/Makefile
deleted file mode 100644 (file)
index c9319d6..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-C_SOURCES := main.c
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/find_struct_type/TestFindStructTypes.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/find_struct_type/TestFindStructTypes.py
deleted file mode 100644 (file)
index 90d8530..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-"""
-Make sure FindTypes finds struct types with the struct prefix.
-"""
-
-
-
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbtest import *
-
-
-class TestFindTypesOnStructType(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # If your test case doesn't stress debug info, the
-    # set this to true.  That way it won't be run once for
-    # each debug info format.
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_find_types_struct_type(self):
-        """Make sure FindTypes actually finds 'struct typename' not just 'typename'."""
-        self.build()
-        self.do_test()
-
-    def do_test(self):
-        """Make sure FindTypes actually finds 'struct typename' not just 'typename'."""
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Make sure this works with struct
-        type_list = target.FindTypes("struct mytype")
-        self.assertEqual(type_list.GetSize(), 1, "Found one instance of the type with struct")
-
-        # Make sure this works without the struct:
-        type_list = target.FindTypes("mytype")
-        self.assertEqual(type_list.GetSize(), 1, "Found one instance of the type without struct")
-
-        # Make sure it works with union
-        type_list = target.FindTypes("union myunion")
-        self.assertEqual(type_list.GetSize(), 1, "Found one instance of the type with union")
-
-        # Make sure this works without the union:
-        type_list = target.FindTypes("myunion")
-        self.assertEqual(type_list.GetSize(), 1, "Found one instance of the type without union")
-
-        # Make sure it works with typedef
-        type_list = target.FindTypes("typedef MyType")
-        self.assertEqual(type_list.GetSize(), 1, "Found one instance of the type with typedef")
-
-        # Make sure this works without the typedef:
-        type_list = target.FindTypes("MyType")
-        self.assertEqual(type_list.GetSize(), 1, "Found one instance of the type without typedef")
-
-
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/find_struct_type/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/find_struct_type/main.c
deleted file mode 100644 (file)
index fa009af..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-struct mytype {
-  int c;
-  int d;
-};
-
-union myunion {
-  int num;
-  char *str;
-};
-
-typedef struct mytype MyType;
-
-int main()
-{
-  struct mytype v;
-  MyType *v_ptr = &v;
-
-  union myunion u = {5};
-  v.c = u.num;
-  v.d = 10;
-  return v.c + v.d;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/forward/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/forward/Makefile
deleted file mode 100644 (file)
index 472e733..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c foo.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/forward/README.txt b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/forward/README.txt
deleted file mode 100644 (file)
index b7b66f7..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-This example has a function call in foo.c named "foo" that takes a forward
-declaration to "struct bar" and uses it as a pointer argument. In main.c
-we have a real declaration for "struct bar". We want to be able to find the
-real definition of "struct bar" when we are stopped in foo in foo.c such that
-when we stop in "foo" we see the contents of the "bar_ptr".
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/forward/TestForwardDeclaration.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/forward/TestForwardDeclaration.py
deleted file mode 100644 (file)
index 9ea1361..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-"""Test that forward declaration of a data structure gets resolved correctly."""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class ForwardDeclarationTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def do_test(self, dictionary=None):
-        """Display *bar_ptr when stopped on a function with forward declaration of struct bar."""
-        self.build(dictionary=dictionary)
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break inside the foo function which takes a bar_ptr argument.
-        lldbutil.run_break_set_by_symbol(
-            self, "foo", num_expected_locations=1, sym_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        # This should display correctly.
-        # Note that the member fields of a = 1 and b = 2 is by design.
-        self.expect(
-            "frame variable --show-types *bar_ptr",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                '(bar) *bar_ptr = ',
-                '(int) a = 1',
-                '(int) b = 2'])
-
-        # And so should this.
-        self.expect(
-            "expression --show-types -- *bar_ptr",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                '(bar)',
-                '(int) a = 1',
-                '(int) b = 2'])
-
-    def test(self):
-        self.do_test()
-
-    @no_debug_info_test
-    @skipIfDarwin
-    @skipIf(compiler=no_match("clang"))
-    @skipIf(compiler_version=["<", "7.0"])
-    def test_debug_names(self):
-        """Test that we are able to find complete types when using DWARF v5
-        accelerator tables"""
-        self.do_test(dict(CFLAGS_EXTRAS="-mllvm -accel-tables=Dwarf"))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/forward/foo.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/forward/foo.c
deleted file mode 100644 (file)
index 2e050e7..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <stdio.h>
-#include "foo.h"
-
-int 
-foo (struct bar *bar_ptr)
-{
-    return printf ("bar_ptr = %p\n", bar_ptr);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/forward/foo.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/forward/foo.h
deleted file mode 100644 (file)
index 3040927..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-
-struct bar;
-
-int foo (struct bar *bar_ptr);
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/forward/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/forward/main.c
deleted file mode 100644 (file)
index 6f9787c..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#include <stdio.h>
-#include "foo.h"
-
-struct bar
-{
-    int a;
-    int b;
-};
-
-int
-main (int argc, char const *argv[])
-{
-    struct bar b= { 1, 2 };
-    
-    foo (&b);
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/function_types/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/function_types/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/function_types/TestFunctionTypes.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/function_types/TestFunctionTypes.py
deleted file mode 100644 (file)
index 3753eab..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-"""Test variable with function ptr type and that break on the function works."""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class FunctionTypesTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line = line_number('main.c', '// Set break point at this line.')
-
-    def test(self):
-        """Test 'callback' has function ptr type, then break on the function."""
-        self.build()
-        self.runToBreakpoint()
-
-        # Check that the 'callback' variable display properly.
-        self.expect(
-            "frame variable --show-types callback",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            startstr='(int (*)(const char *)) callback =')
-
-        # And that we can break on the callback function.
-        lldbutil.run_break_set_by_symbol(
-            self,
-            "string_not_empty",
-            num_expected_locations=1,
-            sym_exact=True)
-        self.runCmd("continue")
-
-        # Check that we do indeed stop on the string_not_empty function.
-        self.expect("process status", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['a.out`string_not_empty',
-                             'stop reason = breakpoint'])
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
-    @expectedFailureNetBSD
-    def test_pointers(self):
-        """Test that a function pointer to 'printf' works and can be called."""
-        self.build()
-        self.runToBreakpoint()
-
-        self.expect("expr string_not_empty",
-                    substrs=['(int (*)(const char *)) $0 = ', '(a.out`'])
-
-        if self.platformIsDarwin():
-            regexps = ['lib.*\.dylib`printf']
-        else:
-            regexps = ['printf']
-        self.expect("expr (int (*)(const char*, ...))printf",
-                    substrs=['(int (*)(const char *, ...)) $1 = '],
-                    patterns=regexps)
-
-        self.expect("expr $1(\"Hello world\\n\")",
-                    startstr='(int) $2 = 12')
-
-    def runToBreakpoint(self):
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break inside the main.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/function_types/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/function_types/main.c
deleted file mode 100644 (file)
index f8710f6..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-int string_not_empty (const char *s)
-{
-    if (s && s[0])
-        return 1;
-    return 0;
-}
-
-int main (int argc, char const *argv[])
-{
-    int (*callback)(const char *) = string_not_empty;
-
-    return callback(0); // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/Makefile
deleted file mode 100644 (file)
index 7b94b65..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-C_SOURCES := main.c
-
-DYLIB_NAME := a
-DYLIB_C_SOURCES := a.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py
deleted file mode 100644 (file)
index 690d1ab..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-"""Show global variables and check that they do indeed have global scopes."""
-
-
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class GlobalVariablesTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.source = 'main.c'
-        self.line = line_number(
-            self.source, '// Set break point at this line.')
-        self.shlib_names = ["a"]
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24764")
-    def test_without_process(self):
-        """Test that static initialized variables can be inspected without
-        process."""
-        self.build()
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
-
-        self.assertTrue(target, VALID_TARGET)
-        self.expect("target variable g_ptr", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['(int *)'])
-        self.expect("target variable *g_ptr", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['42'])
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24764")
-    @expectedFailureNetBSD
-    def test_c_global_variables(self):
-        """Test 'frame variable --scope --no-args' which omits args and shows scopes."""
-        self.build()
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
-        self.assertTrue(target, VALID_TARGET)
-
-        # Break inside the main.
-        lldbutil.run_break_set_by_file_and_line(
-            self, self.source, self.line, num_expected_locations=1, loc_exact=True)
-
-        # Register our shared libraries for remote targets so they get
-        # automatically uploaded
-        environment = self.registerSharedLibrariesWithTarget(
-            target, self.shlib_names)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, environment, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        # Test that the statically initialized variable can also be
-        # inspected *with* a process.
-        self.expect("target variable g_ptr", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['(int *)'])
-        self.expect("target variable *g_ptr", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['42'])
-
-        # Check that GLOBAL scopes are indicated for the variables.
-        self.expect(
-            "frame variable --show-types --scope --show-globals --no-args",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                'STATIC: (const int) g_file_static_int = 2',
-                'STATIC: (const char *) g_func_static_cstr',
-                'GLOBAL: (const char *) g_file_global_cstr',
-                '"g_file_global_cstr"',
-                'GLOBAL: (int) g_file_global_int = 42',
-                'GLOBAL: (int) g_common_1 = 21',
-                'GLOBAL: (int *) g_ptr',
-                'STATIC: (const char *) g_file_static_cstr',
-                '"g_file_static_cstr"'
-            ])
-
-        # 'frame variable' should support address-of operator.
-        self.runCmd("frame variable &g_file_global_int")
-
-        # Exercise the 'target variable' command to display globals in a.c
-        # file.
-        self.expect("target variable g_a", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['g_a', '123'])
-        self.expect(
-            "target variable g_marked_spot.x",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                'g_marked_spot.x',
-                '20'])
-
-        # rdar://problem/9747668
-        # runCmd: target variable g_marked_spot.y
-        # output: (int) g_marked_spot.y = <a.o[0x214] can't be resolved,  in not currently loaded.
-        #         >
-        self.expect(
-            "target variable g_marked_spot.y",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                'g_marked_spot.y',
-                '21'])
-        self.expect(
-            "target variable g_marked_spot.y",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            matching=False,
-            substrs=["can't be resolved"])
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/a.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/a.c
deleted file mode 100644 (file)
index ce3e6f9..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-//===-- a.c -----------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-int g_a = 123;
-struct Point {
-    int x;
-    int y;
-};
-struct Point g_marked_spot = { 20, 21 };
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/cmds.txt b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/cmds.txt
deleted file mode 100644 (file)
index 6906a07..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-break main.c:5
-continue
-var -global g_a -global g_global_int
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/main.c
deleted file mode 100644 (file)
index ea54eb9..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-int g_common_1; // Not initialized on purpose to cause it to be undefined external in .o file
-int g_file_global_int = 42;
-static const int g_file_static_int = 2;
-const char *g_file_global_cstr = "g_file_global_cstr";
-static const char *g_file_static_cstr = "g_file_static_cstr";
-int *g_ptr = &g_file_global_int;
-
-extern int g_a;
-int main (int argc, char const *argv[])
-{
-    g_common_1 = g_file_global_int / g_file_static_int;
-    static const char *g_func_static_cstr = "g_func_static_cstr";
-    printf ("%s %s\n", g_file_global_cstr, g_file_static_cstr);
-    return g_file_global_int + g_a + g_common_1 + *g_ptr; // Set break point at this line.  //// break $source:$line; continue; var -global g_a -global g_global_int
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/inlines/TestRedefinitionsInInlines.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/inlines/TestRedefinitionsInInlines.py
deleted file mode 100644 (file)
index 311c5ec..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__,
-                          globals(),
-                          [decorators.expectedFailureAll(compiler="clang",
-                                                         compiler_version=["<",
-                                                                           "3.5"],
-                                                         bugnumber="llvm.org/pr27845")])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/inlines/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/inlines/main.c
deleted file mode 100644 (file)
index 8fe4918..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#include <stdio.h>
-
-inline void test1(int) __attribute__ ((always_inline));
-inline void test2(int) __attribute__ ((always_inline));
-
-void test2(int b) {
-    printf("test2(%d)\n", b); //% self.expect("expression b", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["42"])
-    {
-      int c = b * 2;
-      printf("c=%d\n", c); //% self.expect("expression b", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["42"])
-                           //% self.expect("expression c", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["84"])
-    }
-}
-
-void test1(int a) {
-    printf("test1(%d)\n",  a);
-    test2(a+1);//% self.runCmd("step")
-               //% self.expect("expression b", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["24"])
-}
-
-int main() {
-    test2(42);
-    test1(23);
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/local_types/TestUseClosestType.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/local_types/TestUseClosestType.py
deleted file mode 100644 (file)
index 2b8307a..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-"""
-If there is a definition of a type in the current
-Execution Context's CU, then we should use that type
-even if there are other definitions of the type in other
-CU's.  Assert that that is true.
-"""
-
-
-
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-
-
-class TestUseClosestType(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @expectedFailureAll(bugnumber="<rdar://problem/53262085>")
-    def test_use_in_expr(self):
-        """Use the shadowed type directly, see if we get a conflicting type definition."""
-        self.build()
-        self.main_source_file = lldb.SBFileSpec("main.c")
-        self.expr_test()
-
-    def run_and_check_expr(self, num_children, child_type):
-        frame = self.thread.GetFrameAtIndex(0)
-        result = frame.EvaluateExpression("struct Foo *$mine = (struct Foo *) malloc(sizeof(struct Foo)); $mine")
-        self.assertTrue(result.GetError().Success(), "Failed to parse an expression using a multiply defined type: %s"%(result.GetError().GetCString()), )
-        self.assertEqual(result.GetTypeName(), "struct Foo *", "The result has the right typename.")
-        self.assertEqual(result.GetNumChildren(), num_children, "Got the right number of children")
-        self.assertEqual(result.GetChildAtIndex(0).GetTypeName(), child_type, "Got the right type.")
-
-    def expr_test(self):
-        """ Run to a breakpoint in main.c, check that an expression referring to Foo gets the
-            local three int version.  Then run to a breakpoint in other.c and check that an
-            expression referring to Foo gets the two char* version. """
-        
-        (target, process, self.thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                   "Set a breakpoint in main", self.main_source_file)
-
-        self.run_and_check_expr(3, "int")
-        lldbutil.run_to_source_breakpoint(self, "Set a breakpoint in other", lldb.SBFileSpec("other.c"))
-        self.run_and_check_expr(2, "char *")
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/local_types/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/local_types/main.c
deleted file mode 100644 (file)
index 321facf..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-extern int callme(int input);
-
-struct Foo {
-  int a;
-  int b;
-  int c;
-};
-
-int
-main(int argc, char **argv)
-{
-  // Set a breakpoint in main
-  struct Foo mine = {callme(argc), 10, 20};
-  return mine.a;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/local_types/other.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/local_types/other.c
deleted file mode 100644 (file)
index 24b72d4..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-struct Foo {
-  char *ptr1;
-  char *ptr2;
-};
-
-int
-callme(int input)
-{
-  struct Foo myFoo = { "string one", "Set a breakpoint in other"};
-  return myFoo.ptr1[0] + myFoo.ptr2[0] + input;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/local_variables/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/local_variables/Makefile
deleted file mode 100644 (file)
index d3998ee..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-C_SOURCES := main.c
-
-CFLAGS_EXTRAS := -O1
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/local_variables/TestLocalVariables.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/local_variables/TestLocalVariables.py
deleted file mode 100644 (file)
index 381292a..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-"""Show local variables and check that they can be inspected.
-
-This test was added after we made a change in clang to normalize
-DW_OP_constu(X < 32) to DW_OP_litX which broke the debugger because
-it didn't read the value as an unsigned.
-"""
-
-
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class LocalVariablesTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.source = 'main.c'
-        self.line = line_number(
-            self.source, '// Set break point at this line.')
-
-    @skipIfWindows
-    def test_c_local_variables(self):
-        """Test local variable value."""
-        self.build()
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
-        self.assertTrue(target, VALID_TARGET)
-
-        # Break inside the main.
-        lldbutil.run_break_set_by_file_and_line(
-            self, self.source, self.line, num_expected_locations=1, loc_exact=True)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        self.expect("frame variable i", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['(unsigned int) i = 10'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/local_variables/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/local_variables/main.c
deleted file mode 100644 (file)
index 2ab579a..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <stdio.h>
-
-void bar(unsigned i)
-{
-  printf("%d\n", i);
-}
-
-void foo(unsigned j)
-{
-  unsigned i = j;
-  bar(i);
-  i = 10;
-  bar(i); // Set break point at this line.
-}
-
-int main(int argc, char** argv)
-{
-  foo(argc);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/modules/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/modules/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/modules/TestCModules.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/modules/TestCModules.py
deleted file mode 100644 (file)
index 948e8be..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-"""Test that importing modules in C works as expected."""
-
-
-
-import os
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class CModulesTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD
-    @expectedFailureAll(
-        oslist=["linux"],
-        bugnumber="http://llvm.org/pr23456 'fopen' has unknown return type")
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows")
-    @skipIf(macos_version=["<", "10.12"])
-    @expectedFailureNetBSD
-    def test_expr(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break inside the foo function which takes a bar_ptr argument.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        # Enable logging of the imported AST.
-        log_file = os.path.join(self.getBuildDir(), "lldb-ast-log.txt")
-        self.runCmd("log enable lldb ast -f '%s'" % log_file)
-
-        self.expect(
-            "expr -l objc++ -- @import Darwin; 3",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                "int",
-                "3"])
-
-        # This expr command imports __sFILE with definition
-        # (FILE is a typedef to __sFILE.)
-        self.expect(
-            "expr *fopen(\"/dev/zero\", \"w\")",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                "FILE",
-                "_close"])
-
-        # Check that the AST log contains exactly one definition of __sFILE.
-        f = open(log_file)
-        log_lines = f.readlines()
-        f.close()
-        os.remove(log_file)
-        self.assertEqual(" ".join(log_lines).count("struct __sFILE definition"),
-                         1)
-
-        self.expect("expr *myFile", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=["a", "5", "b", "9"])
-
-        self.expect(
-            "expr MIN((uint64_t)2, (uint64_t)3)",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                "uint64_t",
-                "2"])
-
-        self.expect("expr stdin", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=["(FILE *)", "0x"])
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line = line_number('main.c', '// Set breakpoint 0 here.')
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/modules/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/modules/main.c
deleted file mode 100644 (file)
index df321a7..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <stdlib.h>
-
-int printf(const char * __restrict format, ...);
-
-typedef struct {
-    int a;
-    int b;
-} MYFILE;
-
-int main()
-{
-    MYFILE *myFile = malloc(sizeof(MYFILE));
-
-    myFile->a = 5;
-    myFile->b = 9;
-
-    printf("%d\n", myFile->a + myFile->b); // Set breakpoint 0 here.
-
-    free(myFile);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/offsetof/TestOffsetof.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/offsetof/TestOffsetof.py
deleted file mode 100644 (file)
index cdfbaae..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__, globals(), [decorators.no_debug_info_test])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/offsetof/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/offsetof/main.c
deleted file mode 100644 (file)
index cbb4a14..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#include <stdint.h>
-
-struct Foo {
-  int8_t a;
-  int16_t b;
-};
-
-int main (int argc, char const *argv[]) {
-    struct Foo f;
-    return f.a; //% self.expect("expr offsetof(Foo, a)", substrs = ['= 0'])
-                //% self.expect("expr offsetof(Foo, b)", substrs = ['= 2'])
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/recurse/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/recurse/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/recurse/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/recurse/main.c
deleted file mode 100644 (file)
index 1159669..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <stdint.h>
-#include <stdio.h>
-
-uint32_t
-recurse_crash (uint32_t depth)
-{
-    if (depth > 0)
-        return recurse_crash (depth - 1);
-    return 0;
-}
-
-int
-main (int argc, char const *argv[])
-{
-    // If we have more than one argument, then it should a depth to recurse to.
-    // If we have just the program name as an argument, use UINT32_MAX so we
-    // eventually crash the program by overflowing the stack
-    uint32_t depth = UINT32_MAX;
-    if (argc > 1)
-    {
-        char *end = NULL;
-        depth = strtoul (argv[1], &end, 0);
-        if (end == NULL || *end != '\0')
-            depth = UINT32_MAX;
-    }
-    recurse_crash (depth);
-    return 0;
-}
\ No newline at end of file
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/Makefile
deleted file mode 100644 (file)
index e4d42f6..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-C_SOURCES := test.c
-
-CFLAGS_EXTRAS := -O1 -D_FORTIFY_SOURCE=0
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/TestRegisterVariables.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/TestRegisterVariables.py
deleted file mode 100644 (file)
index af0ad2a..0000000
+++ /dev/null
@@ -1,204 +0,0 @@
-"""Check that compiler-generated register values work correctly"""
-
-from __future__ import print_function
-
-import re
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-# This method attempts to figure out if a given variable
-# is in a register.
-#
-# Return:
-#   True if the value has a readable value and is in a register
-#   False otherwise
-
-
-def is_variable_in_register(frame, var_name):
-    # Ensure we can lookup the variable.
-    var = frame.FindVariable(var_name)
-    # print("\nchecking {}...".format(var_name))
-    if var is None or not var.IsValid():
-        # print("{} cannot be found".format(var_name))
-        return False
-
-    # Check that we can get its value.  If not, this
-    # may be a variable that is just out of scope at this point.
-    value = var.GetValue()
-    # print("checking value...")
-    if value is None:
-        # print("value is invalid")
-        return False
-    # else:
-        # print("value is {}".format(value))
-
-    # We have a variable and we can get its value.  The variable is in
-    # a register if we cannot get an address for it, assuming it is
-    # not a struct pointer.  (This is an approximation - compilers can
-    # do other things with spitting up a value into multiple parts of
-    # multiple registers, but what we're verifying here is much more
-    # than it was doing before).
-    var_addr = var.GetAddress()
-    # print("checking address...")
-    if var_addr.IsValid():
-        # We have an address, it must not be in a register.
-        # print("var {} is not in a register: has a valid address {}".format(var_name, var_addr))
-        return False
-    else:
-        # We don't have an address but we can read the value.
-        # It is likely stored in a register.
-        # print("var {} is in a register (we don't have an address for it)".format(var_name))
-        return True
-
-
-def is_struct_pointer_in_register(frame, var_name, trace):
-    # Ensure we can lookup the variable.
-    var = frame.FindVariable(var_name)
-    if trace:
-        print("\nchecking {}...".format(var_name))
-
-    if var is None or not var.IsValid():
-        # print("{} cannot be found".format(var_name))
-        return False
-
-    # Check that we can get its value.  If not, this
-    # may be a variable that is just out of scope at this point.
-    value = var.GetValue()
-    # print("checking value...")
-    if value is None:
-        if trace:
-            print("value is invalid")
-        return False
-    else:
-        if trace:
-             print("value is {}".format(value))
-
-    var_loc = var.GetLocation()
-    if trace:
-        print("checking location: {}".format(var_loc))
-    if var_loc is None or var_loc.startswith("0x"):
-        # The frame var is not in a register but rather a memory location.
-        # print("frame var {} is not in a register".format(var_name))
-        return False
-    else:
-        # print("frame var {} is in a register".format(var_name))
-        return True
-
-
-def re_expr_equals(val_type, val):
-    # Match ({val_type}) ${sum_digits} = {val}
-    return re.compile(r'\(' + val_type + '\) \$\d+ = ' + str(val))
-
-
-class RegisterVariableTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(compiler="clang", compiler_version=['<', '3.5'])
-    @expectedFailureAll(compiler="gcc", compiler_version=[
-            '>=', '4.8.2'], archs=["i386"])
-    @expectedFailureAll(compiler="gcc", compiler_version=[
-            '<', '4.9'], archs=["x86_64"])
-    def test_and_run_command(self):
-        """Test expressions on register values."""
-
-        # This test now ensures that each probable
-        # register variable location is actually a register, and
-        # if so, whether we can print out the variable there.
-        # It only requires one of them to be handled in a non-error
-        # way.
-        register_variables_count = 0
-
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break inside the main.
-        lldbutil.run_break_set_by_source_regexp(
-            self, "break", num_expected_locations=3)
-
-        ####################
-        # First breakpoint
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        # Try some variables that should be visible
-        frame = self.dbg.GetSelectedTarget().GetProcess(
-        ).GetSelectedThread().GetSelectedFrame()
-        if is_variable_in_register(frame, 'a'):
-            register_variables_count += 1
-            self.expect("expr a", VARIABLES_DISPLAYED_CORRECTLY,
-                        patterns=[re_expr_equals('int', 2)])
-
-        if is_struct_pointer_in_register(frame, 'b', self.TraceOn()):
-            register_variables_count += 1
-            self.expect("expr b->m1", VARIABLES_DISPLAYED_CORRECTLY,
-                        patterns=[re_expr_equals('int', 3)])
-
-        #####################
-        # Second breakpoint
-
-        self.runCmd("continue")
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        # Try some variables that should be visible
-        frame = self.dbg.GetSelectedTarget().GetProcess(
-        ).GetSelectedThread().GetSelectedFrame()
-        if is_struct_pointer_in_register(frame, 'b', self.TraceOn()):
-            register_variables_count += 1
-            self.expect("expr b->m2", VARIABLES_DISPLAYED_CORRECTLY,
-                        patterns=[re_expr_equals('int', 5)])
-
-        if is_variable_in_register(frame, 'c'):
-            register_variables_count += 1
-            self.expect("expr c", VARIABLES_DISPLAYED_CORRECTLY,
-                        patterns=[re_expr_equals('int', 5)])
-
-        #####################
-        # Third breakpoint
-
-        self.runCmd("continue")
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        # Try some variables that should be visible
-        frame = self.dbg.GetSelectedTarget().GetProcess(
-        ).GetSelectedThread().GetSelectedFrame()
-        if is_variable_in_register(frame, 'f'):
-            register_variables_count += 1
-            self.expect("expr f", VARIABLES_DISPLAYED_CORRECTLY,
-                        patterns=[re_expr_equals('float', '3.1')])
-
-        # Validate that we verified at least one register variable
-        self.assertTrue(
-            register_variables_count > 0,
-            "expected to verify at least one variable in a register")
-        # print("executed {} expressions with values in registers".format(register_variables_count))
-
-        self.runCmd("kill")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/test.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/test.c
deleted file mode 100644 (file)
index 2c69039..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#include <stdio.h>
-
-#if defined(__arm__) || defined(__aarch64__) || defined (__mips__) || defined(__powerpc64__)
-// Clang does not accept regparm attribute on these platforms.
-// Fortunately, the default calling convention passes arguments in registers
-// anyway.
-#define REGPARM(N)
-#else
-#define REGPARM(N) __attribute__((regparm(N)))
-#endif
-
-struct bar {
-  int m1;
-  int m2;
-};
-
-void f1(int a, struct bar *b) __attribute__((noinline)) REGPARM(2);
-void f1(int a, struct bar *b)
-{
-  b->m2 = b->m1 + a; // set breakpoint here
-}
-
-void f2(struct bar *b) __attribute__((noinline)) REGPARM(1);
-void f2(struct bar *b)
-{
-  int c = b->m2;
-  printf("%d\n", c); // set breakpoint here
-}
-
-float f3() __attribute__((noinline));
-float f3() {
-  return 3.14f;
-}
-
-int main()
-{
-  struct bar myBar = { 3, 4 };
-  f1(2, &myBar);
-  f2(&myBar);
-
-  float f = f3();
-  printf("%f\n", f); // set breakpoint here
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/set_values/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/set_values/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/set_values/TestSetValues.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/set_values/TestSetValues.py
deleted file mode 100644 (file)
index f16d554..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-"""Test settings and readings of program variables."""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class SetValuesTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers to break inside main().
-        self.line1 = line_number('main.c', '// Set break point #1.')
-        self.line2 = line_number('main.c', '// Set break point #2.')
-        self.line3 = line_number('main.c', '// Set break point #3.')
-        self.line4 = line_number('main.c', '// Set break point #4.')
-        self.line5 = line_number('main.c', '// Set break point #5.')
-
-    def test(self):
-        """Test settings and readings of program variables."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Set breakpoints on several places to set program variables.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", self.line1, num_expected_locations=1, loc_exact=True)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", self.line2, num_expected_locations=1, loc_exact=True)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", self.line3, num_expected_locations=1, loc_exact=True)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", self.line4, num_expected_locations=1, loc_exact=True)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", self.line5, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        # main.c:15
-        # Check that 'frame variable --show-types' displays the correct data
-        # type and value.
-        self.expect(
-            "frame variable --show-types",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            startstr="(char) i = 'a'")
-
-        # Now set variable 'i' and check that it is correctly displayed.
-        self.runCmd("expression i = 'b'")
-        self.expect(
-            "frame variable --show-types",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            startstr="(char) i = 'b'")
-
-        self.runCmd("continue")
-
-        # main.c:36
-        # Check that 'frame variable --show-types' displays the correct data
-        # type and value.
-        self.expect(
-            "frame variable --show-types",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            patterns=["\((short unsigned int|unsigned short)\) i = 33"])
-
-        # Now set variable 'i' and check that it is correctly displayed.
-        self.runCmd("expression i = 333")
-        self.expect(
-            "frame variable --show-types",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            patterns=["\((short unsigned int|unsigned short)\) i = 333"])
-
-        self.runCmd("continue")
-
-        # main.c:57
-        # Check that 'frame variable --show-types' displays the correct data
-        # type and value.
-        self.expect(
-            "frame variable --show-types",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            startstr="(long) i = 33")
-
-        # Now set variable 'i' and check that it is correctly displayed.
-        self.runCmd("expression i = 33333")
-        self.expect(
-            "frame variable --show-types",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            startstr="(long) i = 33333")
-
-        self.runCmd("continue")
-
-        # main.c:78
-        # Check that 'frame variable --show-types' displays the correct data
-        # type and value.
-        self.expect(
-            "frame variable --show-types",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            startstr="(double) i = 2.25")
-
-        # Now set variable 'i' and check that it is correctly displayed.
-        self.runCmd("expression i = 1.5")
-        self.expect(
-            "frame variable --show-types",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            startstr="(double) i = 1.5")
-
-        self.runCmd("continue")
-
-        # main.c:85
-        # Check that 'frame variable --show-types' displays the correct data
-        # type and value.
-        self.expect(
-            "frame variable --show-types",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            startstr="(long double) i = 2.25")
-
-        # Now set variable 'i' and check that it is correctly displayed.
-        self.runCmd("expression i = 1.5")
-        self.expect(
-            "frame variable --show-types",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            startstr="(long double) i = 1.5")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/set_values/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/set_values/main.c
deleted file mode 100644 (file)
index 64bc95f..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-void set_char(void)
-{
-    char i = 'a';
-    printf("before (char) i = %c\n", i);
-    printf("after  (char) i = %c\n", i);    // Set break point #1. //// break $source:$line
-}
-
-void set_uchar(void)
-{
-    unsigned char i = 'a';
-    printf("before (unsigned char) i = %c\n", i);
-    printf("after  (unsigned char) i = %c\n", i);   //// break $source:$line
-}
-
-void set_short(void)
-{
-    short i = 33;
-    printf("before (short) i = %i\n", i);
-    printf("after  (short) i = %i\n", i);   //// break $source:$line
-}
-
-void set_ushort(void)
-{
-    unsigned short i = 33;
-    printf("before (unsigned short) i = %i\n", i);
-    printf("after  (unsigned short) i = %i\n", i);  // Set break point #2. //// break $source:$line
-}
-
-void set_int(void)
-{
-    int i = 33;
-    printf("before (int) i = %i\n", i);
-    printf("after  (int) i = %i\n", i); //// break $source:$line
-}
-
-void set_uint(void)
-{
-    unsigned int i = 33;
-    printf("before (unsigned int) i = %u\n", i);
-    printf("after  (unsigned int) i = %u\n", i);    //// break $source:$line
-}
-
-void set_long(void)
-{
-    long i = 33;
-    printf("before (long) i = %li\n", i);
-    printf("after  (long) i = %li\n", i);   // Set break point #3. //// break $source:$line
-}
-
-void set_ulong(void)
-{
-    unsigned long i = 33;
-    printf("before (unsigned long) i = %lu\n", i);
-    printf("after  (unsigned long) i = %lu\n", i);  //// break $source:$line
-}
-
-void set_float(void)
-{
-    float i = 2.25;
-    printf("before (float) i = %g\n", i);
-    printf("after  (float) i = %g\n", i);   //// break $source:$line
-}
-
-void set_double(void)
-{
-    double i = 2.25;
-    printf("before (double) i = %g\n", i);
-    printf("after  (double) i = %g\n", i);  // Set break point #4. //// break $source:$line
-}
-
-void set_long_double(void)
-{
-    long double i = 2.25;
-    printf("before (long double) i = %Lg\n", i);
-    printf("after  (long double) i = %Lg\n", i);    // Set break point #5. //// break $source:$line
-}
-
-void set_point (void)
-{
-    struct point_tag {
-        int x;
-        int y;
-    };
-    struct point_tag points_2[2] = {
-        {1,2},
-        {3,4}
-    };
-}
-
-int main (int argc, char const *argv[])
-{
-    // Continue to the breakpoint in set_char()
-    set_char();         //// continue; var i; val -set 99 1
-    set_uchar();        //// continue; var i; val -set 99 2
-    set_short();        //// continue; var i; val -set -42 3
-    set_ushort();       //// continue; var i; val -set 42 4
-    set_int();          //// continue; var i; val -set -42 5
-    set_uint();         //// continue; var i; val -set 42 6
-    set_long();         //// continue; var i; val -set -42 7
-    set_ulong();        //// continue; var i; val -set 42 8
-    set_float();        //// continue; var i; val -set 123.456 9
-    set_double();       //// continue; var i; val -set 123.456 10
-    set_long_double();  //// continue; var i; val -set 123.456 11
-    set_point ();       //// continue
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/Makefile
deleted file mode 100644 (file)
index 5e26f27..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-DYLIB_NAME := foo
-DYLIB_C_SOURCES := foo.c
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/TestSharedLib.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/TestSharedLib.py
deleted file mode 100644 (file)
index 789939b..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-"""Test that types defined in shared libraries work correctly."""
-
-
-
-import unittest2
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class SharedLibTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def common_test_expr(self, preload_symbols):
-        if "clang" in self.getCompiler() and "3.4" in self.getCompilerVersion():
-            self.skipTest(
-                "llvm.org/pr16214 -- clang emits partial DWARF for structures referenced via typedef")
-
-        self.build()
-        self.common_setup(preload_symbols)
-
-        # This should display correctly.
-        self.expect(
-            "expression --show-types -- *my_foo_ptr",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                "(foo)",
-                "(sub_foo)",
-                "other_element = 3"])
-
-        self.expect(
-            "expression GetMeASubFoo(my_foo_ptr)",
-            startstr="(sub_foo *) $")
-
-    @expectedFailureNetBSD
-    def test_expr(self):
-        """Test that types work when defined in a shared library and forward-declared in the main executable"""
-        self.common_test_expr(True)
-
-    @expectedFailureNetBSD
-    def test_expr_no_preload(self):
-        """Test that types work when defined in a shared library and forward-declared in the main executable, but with preloading disabled"""
-        self.common_test_expr(False)
-
-    @unittest2.expectedFailure("llvm.org/PR36712")
-    def test_frame_variable(self):
-        """Test that types work when defined in a shared library and forward-declared in the main executable"""
-        self.build()
-        self.common_setup()
-
-        # This should display correctly.
-        self.expect(
-            "frame variable --show-types -- *my_foo_ptr",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                "(foo)",
-                "(sub_foo)",
-                "other_element = 3"])
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.source = 'main.c'
-        self.line = line_number(self.source, '// Set breakpoint 0 here.')
-        self.shlib_names = ["foo"]
-
-    def common_setup(self, preload_symbols = True):
-        # Run in synchronous mode
-        self.dbg.SetAsync(False)
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
-        self.assertTrue(target, VALID_TARGET)
-
-        self.runCmd("settings set target.preload-symbols " + str(preload_symbols).lower())
-
-        # Break inside the foo function which takes a bar_ptr argument.
-        lldbutil.run_break_set_by_file_and_line(
-            self, self.source, self.line, num_expected_locations=1, loc_exact=True)
-
-        # Register our shared libraries for remote targets so they get
-        # automatically uploaded
-        environment = self.registerSharedLibrariesWithTarget(
-            target, self.shlib_names)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, environment, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/foo.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/foo.c
deleted file mode 100644 (file)
index 6431bc4..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#include "foo.h"
-#include <stdlib.h>
-
-struct foo
-{
-  struct sub_foo sub_element;
-  int    other_element;
-};
-
-struct foo *
-GetMeAFoo()
-{
-  struct foo *ret_val = (struct foo *) malloc (sizeof (struct foo));
-  ret_val->other_element = 3;
-  return ret_val;
-}
-
-struct sub_foo *
-GetMeASubFoo (struct foo *in_foo)
-{
-  return &(in_foo->sub_element);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/foo.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/foo.h
deleted file mode 100644 (file)
index 78b9e3f..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-struct foo;
-
-struct sub_foo
-{
-  int sub_1;
-  char *sub_2;
-};
-
-LLDB_TEST_API struct foo *GetMeAFoo();
-LLDB_TEST_API struct sub_foo *GetMeASubFoo(struct foo *in_foo);
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/main.c
deleted file mode 100644 (file)
index b4377de..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <stdio.h>
-#include "foo.h"
-
-int 
-main ()
-{
-  struct foo *my_foo_ptr;
-  my_foo_ptr = GetMeAFoo();
-  
-  printf ("My sub foo has: %d.\n", GetMeASubFoo(my_foo_ptr)->sub_1); // Set breakpoint 0 here.
-
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/Makefile
deleted file mode 100644 (file)
index f3285de..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-DYLIB_NAME := foo
-DYLIB_C_SOURCES := foo.c
-C_SOURCES := main.c
-
-SPLIT_DEBUG_SYMBOLS = YES
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
deleted file mode 100644 (file)
index 8858f67..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-"""Test that types defined in shared libraries with stripped symbols work correctly."""
-
-
-
-import unittest2
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class SharedLibStrippedTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(oslist=["windows"])
-    def test_expr(self):
-        """Test that types work when defined in a shared library and forwa/d-declared in the main executable"""
-        if "clang" in self.getCompiler() and "3.4" in self.getCompilerVersion():
-            self.skipTest(
-                "llvm.org/pr16214 -- clang emits partial DWARF for structures referenced via typedef")
-
-        self.build()
-        self.common_setup()
-
-        # This should display correctly.
-        self.expect(
-            "expression --show-types -- *my_foo_ptr",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                "(foo)",
-                "(sub_foo)",
-                "other_element = 3"])
-
-    @expectedFailureAll(oslist=["windows"])
-    @unittest2.expectedFailure("llvm.org/PR36712")
-    def test_frame_variable(self):
-        """Test that types work when defined in a shared library and forward-declared in the main executable"""
-        self.build()
-        self.common_setup()
-
-        # This should display correctly.
-        self.expect(
-            "frame variable --show-types -- *my_foo_ptr",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                "(foo)",
-                "(sub_foo)",
-                "other_element = 3"])
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.source = 'main.c'
-        self.line = line_number(self.source, '// Set breakpoint 0 here.')
-        self.shlib_names = ["foo"]
-
-    def common_setup(self):
-        # Run in synchronous mode
-        self.dbg.SetAsync(False)
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
-        self.assertTrue(target, VALID_TARGET)
-
-        # Break inside the foo function which takes a bar_ptr argument.
-        lldbutil.run_break_set_by_file_and_line(
-            self, self.source, self.line, num_expected_locations=1, loc_exact=True)
-
-        # Register our shared libraries for remote targets so they get
-        # automatically uploaded
-        environment = self.registerSharedLibrariesWithTarget(
-            target, self.shlib_names)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, environment, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/foo.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/foo.c
deleted file mode 100644 (file)
index 6431bc4..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#include "foo.h"
-#include <stdlib.h>
-
-struct foo
-{
-  struct sub_foo sub_element;
-  int    other_element;
-};
-
-struct foo *
-GetMeAFoo()
-{
-  struct foo *ret_val = (struct foo *) malloc (sizeof (struct foo));
-  ret_val->other_element = 3;
-  return ret_val;
-}
-
-struct sub_foo *
-GetMeASubFoo (struct foo *in_foo)
-{
-  return &(in_foo->sub_element);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/foo.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/foo.h
deleted file mode 100644 (file)
index 78b3c12..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-struct foo;
-
-struct sub_foo
-{
-  int sub_1;
-  char *sub_2;
-};
-
-struct foo *GetMeAFoo();
-struct sub_foo *GetMeASubFoo (struct foo *in_foo);
-
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/main.c
deleted file mode 100644 (file)
index b4377de..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <stdio.h>
-#include "foo.h"
-
-int 
-main ()
-{
-  struct foo *my_foo_ptr;
-  my_foo_ptr = GetMeAFoo();
-  
-  printf ("My sub foo has: %d.\n", GetMeASubFoo(my_foo_ptr)->sub_1); // Set breakpoint 0 here.
-
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/step-target/.categories b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/step-target/.categories
deleted file mode 100644 (file)
index c00c258..0000000
+++ /dev/null
@@ -1 +0,0 @@
-basic_process
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/step-target/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/step-target/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py
deleted file mode 100644 (file)
index 7665b2f..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-"""Test the 'step target' feature."""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestStepTarget(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers that we will step to in main:
-        self.main_source = "main.c"
-        self.end_line = line_number(self.main_source, "All done")
-
-    @add_test_categories(['pyapi'])
-    def get_to_start(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-
-        break_in_main = target.BreakpointCreateBySourceRegex(
-            'Break here to try targetted stepping', self.main_source_spec)
-        self.assertTrue(break_in_main, VALID_BREAKPOINT)
-        self.assertGreater(break_in_main.GetNumLocations(), 0, "Has locations.")
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-            process, break_in_main)
-
-        if len(threads) != 1:
-            self.fail("Failed to stop at first breakpoint in main.")
-
-        thread = threads[0]
-        return thread
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr32343")
-    def test_with_end_line(self):
-        """Test stepping over vrs. hitting breakpoints & subsequent stepping in various forms."""
-
-        thread = self.get_to_start()
-
-        error = lldb.SBError()
-        thread.StepInto("lotsOfArgs", self.end_line, error)
-        frame = thread.frames[0]
-
-        self.assertEqual(frame.name, "lotsOfArgs", "Stepped to lotsOfArgs.")
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr32343")
-    def test_with_end_line_bad_name(self):
-        """Test stepping over vrs. hitting breakpoints & subsequent stepping in various forms."""
-
-        thread = self.get_to_start()
-
-        error = lldb.SBError()
-        thread.StepInto("lotsOfArgssss", self.end_line, error)
-        frame = thread.frames[0]
-        self.assertEqual(frame.line_entry.line, self.end_line,
-            "Stepped to the block end.")
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr32343")
-    def test_with_end_line_deeper(self):
-        """Test stepping over vrs. hitting breakpoints & subsequent stepping in various forms."""
-
-        thread = self.get_to_start()
-
-        error = lldb.SBError()
-        thread.StepInto("modifyInt", self.end_line, error)
-        frame = thread.frames[0]
-        self.assertEqual(frame.name, "modifyInt", "Stepped to modifyInt.")
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr32343")
-    def test_with_command_and_block(self):
-        """Test stepping over vrs. hitting breakpoints & subsequent stepping in various forms."""
-
-        thread = self.get_to_start()
-
-        result = lldb.SBCommandReturnObject()
-        self.dbg.GetCommandInterpreter().HandleCommand(
-            'thread step-in -t "lotsOfArgs" -e block', result)
-        self.assertTrue(
-            result.Succeeded(),
-            "thread step-in command succeeded.")
-
-        frame = thread.frames[0]
-        self.assertEqual(frame.name, "lotsOfArgs", "Stepped to lotsOfArgs.")
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr32343")
-    def test_with_command_and_block_and_bad_name(self):
-        """Test stepping over vrs. hitting breakpoints & subsequent stepping in various forms."""
-
-        thread = self.get_to_start()
-
-        result = lldb.SBCommandReturnObject()
-        self.dbg.GetCommandInterpreter().HandleCommand(
-            'thread step-in -t "lotsOfArgsssss" -e block', result)
-        self.assertTrue(
-            result.Succeeded(),
-            "thread step-in command succeeded.")
-
-        frame = thread.frames[0]
-
-        self.assertEqual(frame.name, "main", "Stepped back out to main.")
-        # end_line is set to the line after the containing block.  Check that
-        # we got there:
-        self.assertEqual(frame.line_entry.line, self.end_line,
-            "Got out of the block")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/step-target/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/step-target/main.c
deleted file mode 100644 (file)
index 86a26c4..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#include <stdio.h>
-
-void
-lotsOfArgs
-(
-  int firstArg,
-  int secondArg,
-  int thirdArg,
-  int fourthArg
-)
-{
-  printf ("First: %d Second: %d Third: %d Fourth: %d.\n",
-          firstArg,
-          secondArg,
-          thirdArg,
-          fourthArg);
-}
-
-int
-modifyInt(int incoming)
-{
-  return incoming % 2;
-}
-
-int
-main (int argc, char **argv)
-{
-  if (argc > 0)
-    {
-      int var_makes_block = argc + 1;
-      printf ("Break here to try targetted stepping.\n");
-      lotsOfArgs(var_makes_block,
-                 modifyInt(20),
-                 30,
-                 modifyInt(40));
-      printf ("Done calling lotsOfArgs.");
-    }
-  printf ("All done.\n");
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/step_over_no_deadlock/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/step_over_no_deadlock/Makefile
deleted file mode 100644 (file)
index 4b3467b..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-CXX_SOURCES := locking.cpp
-CXXFLAGS_EXTRAS := -std=c++11
-ENABLE_THREADS := YES
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/step_over_no_deadlock/TestStepOverDoesntBlock.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/step_over_no_deadlock/TestStepOverDoesntBlock.py
deleted file mode 100644 (file)
index 988d90a..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-"""
-Test that step over will let other threads run when necessary
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class StepOverDoesntDeadlockTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_step_over(self):
-        """Test that when step over steps over a function it lets other threads run."""
-        self.build()
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                                                            "without running the first thread at least somewhat",
-                                                                            lldb.SBFileSpec("locking.cpp"))
-        # This is just testing that the step over actually completes.
-        # If the test fails this step never return, so failure is really
-        # signaled by the test timing out.
-        
-        thread.StepOver()
-        state = process.GetState()
-        self.assertEqual(state, lldb.eStateStopped)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/step_over_no_deadlock/locking.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/step_over_no_deadlock/locking.cpp
deleted file mode 100644 (file)
index 8288a66..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-#include <stdio.h>
-#include <thread>
-#include <mutex>
-#include <condition_variable>
-
-std::mutex contended_mutex;
-
-std::mutex control_mutex;
-std::condition_variable  control_condition;
-
-std::mutex thread_started_mutex;
-std::condition_variable  thread_started_condition;
-
-// This function runs in a thread.  The locking dance is to make sure that 
-// by the time the main thread reaches the pthread_join below, this thread
-// has for sure acquired the contended_mutex.  So then the call_me_to_get_lock
-// function will block trying to get the mutex, and only succeed once it
-// signals this thread, then lets it run to wake up from the cond_wait and
-// release the mutex.
-
-void
-lock_acquirer_1 (void)
-{
-  std::unique_lock<std::mutex> contended_lock(contended_mutex);
-  
-  // Grab this mutex, that will ensure that the main thread
-  // is in its cond_wait for it (since that's when it drops the mutex.
-
-  thread_started_mutex.lock();
-  thread_started_mutex.unlock();
-
-  // Now signal the main thread that it can continue, we have the contended lock
-  // so the call to call_me_to_get_lock won't make any progress till  this
-  // thread gets a chance to run.
-
-  std::unique_lock<std::mutex> control_lock(control_mutex);
-
-  thread_started_condition.notify_all();
-
-  control_condition.wait(control_lock);
-
-}
-
-int
-call_me_to_get_lock (int ret_val)
-{
-  control_condition.notify_all();
-  contended_mutex.lock();
-  return ret_val;
-}
-
-int
-get_int() {
-  return 567;
-}
-
-int main ()
-{
-  std::unique_lock<std::mutex> thread_started_lock(thread_started_mutex);
-
-  std::thread thread_1(lock_acquirer_1);
-
-  thread_started_condition.wait(thread_started_lock);
-
-  control_mutex.lock();
-  control_mutex.unlock();
-
-  // Break here.  At this point the other thread will have the contended_mutex,
-  // and be sitting in its cond_wait for the control condition.  So there is
-  // no way that our by-hand calling of call_me_to_get_lock will proceed
-  // without running the first thread at least somewhat.
-
-  int result = call_me_to_get_lock(get_int());
-  thread_1.join();
-
-  return 0;
-
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/stepping/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/stepping/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/stepping/TestStepAndBreakpoints.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/stepping/TestStepAndBreakpoints.py
deleted file mode 100644 (file)
index c20e443..0000000
+++ /dev/null
@@ -1,296 +0,0 @@
-"""Test stepping over vrs. hitting breakpoints & subsequent stepping in various forms."""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestCStepping(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers that we will step to in main:
-        self.main_source = "main.c"
-
-    @add_test_categories(['pyapi', 'basic_process'])
-    @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr17932')
-    @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr14437")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24777")
-    @expectedFailureNetBSD
-    def test_and_python_api(self):
-        """Test stepping over vrs. hitting breakpoints & subsequent stepping in various forms."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-
-        breakpoints_to_disable = []
-
-        break_1_in_main = target.BreakpointCreateBySourceRegex(
-            '// frame select 2, thread step-out while stopped at .c.1..',
-            self.main_source_spec)
-        self.assertTrue(break_1_in_main, VALID_BREAKPOINT)
-        breakpoints_to_disable.append(break_1_in_main)
-
-        break_in_a = target.BreakpointCreateBySourceRegex(
-            '// break here to stop in a before calling b', self.main_source_spec)
-        self.assertTrue(break_in_a, VALID_BREAKPOINT)
-        breakpoints_to_disable.append(break_in_a)
-
-        break_in_b = target.BreakpointCreateBySourceRegex(
-            '// thread step-out while stopped at .c.2..', self.main_source_spec)
-        self.assertTrue(break_in_b, VALID_BREAKPOINT)
-        breakpoints_to_disable.append(break_in_b)
-
-        break_in_c = target.BreakpointCreateBySourceRegex(
-            '// Find the line number of function .c. here.', self.main_source_spec)
-        self.assertTrue(break_in_c, VALID_BREAKPOINT)
-        breakpoints_to_disable.append(break_in_c)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-            process, break_1_in_main)
-
-        if len(threads) != 1:
-            self.fail("Failed to stop at first breakpoint in main.")
-
-        thread = threads[0]
-
-        # Get the stop id and for fun make sure it increases:
-        old_stop_id = process.GetStopID()
-
-        # Now step over, which should cause us to hit the breakpoint in "a"
-        thread.StepOver()
-
-        # The stop reason of the thread should be breakpoint.
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-            process, break_in_a)
-        if len(threads) != 1:
-            self.fail("Failed to stop at breakpoint in a.")
-
-        # Check that the stop ID increases:
-        new_stop_id = process.GetStopID()
-        self.assertTrue(
-            new_stop_id > old_stop_id,
-            "Stop ID increases monotonically.")
-
-        thread = threads[0]
-
-        # Step over, and we should hit the breakpoint in b:
-        thread.StepOver()
-
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-            process, break_in_b)
-        if len(threads) != 1:
-            self.fail("Failed to stop at breakpoint in b.")
-        thread = threads[0]
-
-        # Now try running some function, and make sure that we still end up in the same place
-        # and with the same stop reason.
-        frame = thread.GetFrameAtIndex(0)
-        current_line = frame.GetLineEntry().GetLine()
-        current_file = frame.GetLineEntry().GetFileSpec()
-        current_bp = []
-        current_bp.append(thread.GetStopReasonDataAtIndex(0))
-        current_bp.append(thread.GetStopReasonDataAtIndex(1))
-
-        stop_id_before_expression = process.GetStopID()
-        stop_id_before_including_expressions = process.GetStopID(True)
-
-        frame.EvaluateExpression("(int) printf (print_string)")
-
-        frame = thread.GetFrameAtIndex(0)
-        self.assertTrue(
-            current_line == frame.GetLineEntry().GetLine(),
-            "The line stayed the same after expression.")
-        self.assertTrue(
-            current_file == frame.GetLineEntry().GetFileSpec(),
-            "The file stayed the same after expression.")
-        self.assertTrue(
-            thread.GetStopReason() == lldb.eStopReasonBreakpoint,
-            "We still say we stopped for a breakpoint.")
-        self.assertTrue(thread.GetStopReasonDataAtIndex(0) == current_bp[
-                        0] and thread.GetStopReasonDataAtIndex(1) == current_bp[1], "And it is the same breakpoint.")
-
-        # Also make sure running the expression didn't change the public stop id
-        # but did change if we are asking for expression stops as well.
-        stop_id_after_expression = process.GetStopID()
-        stop_id_after_including_expressions = process.GetStopID(True)
-
-        self.assertTrue(
-            stop_id_before_expression == stop_id_after_expression,
-            "Expression calling doesn't change stop ID")
-
-        self.assertTrue(
-            stop_id_after_including_expressions > stop_id_before_including_expressions,
-            "Stop ID including expressions increments over expression call.")
-
-        # Do the same thing with an expression that's going to crash, and make
-        # sure we are still unchanged.
-
-        frame.EvaluateExpression("((char *) 0)[0] = 'a'")
-
-        frame = thread.GetFrameAtIndex(0)
-        self.assertTrue(
-            current_line == frame.GetLineEntry().GetLine(),
-            "The line stayed the same after expression.")
-        self.assertTrue(
-            current_file == frame.GetLineEntry().GetFileSpec(),
-            "The file stayed the same after expression.")
-        self.assertTrue(
-            thread.GetStopReason() == lldb.eStopReasonBreakpoint,
-            "We still say we stopped for a breakpoint.")
-        self.assertTrue(thread.GetStopReasonDataAtIndex(0) == current_bp[
-                        0] and thread.GetStopReasonDataAtIndex(1) == current_bp[1], "And it is the same breakpoint.")
-
-        # Now continue and make sure we just complete the step:
-        # Disable all our breakpoints first - sometimes the compiler puts two line table entries in for the
-        # breakpoint a "b" and we don't want to hit that.
-        for bkpt in breakpoints_to_disable:
-            bkpt.SetEnabled(False)
-
-        process.Continue()
-
-        self.assertTrue(thread.GetFrameAtIndex(0).GetFunctionName() == "a")
-        self.assertTrue(thread.GetStopReason() == lldb.eStopReasonPlanComplete)
-
-        # And one more time should get us back to main:
-        process.Continue()
-
-        self.assertTrue(thread.GetFrameAtIndex(0).GetFunctionName() == "main")
-        self.assertTrue(thread.GetStopReason() == lldb.eStopReasonPlanComplete)
-
-        # Now make sure we can call a function, break in the called function,
-        # then have "continue" get us back out again:
-        frame = thread.GetFrameAtIndex(0)
-        frame = thread.GetFrameAtIndex(0)
-        current_line = frame.GetLineEntry().GetLine()
-        current_file = frame.GetLineEntry().GetFileSpec()
-
-        break_in_b.SetEnabled(True)
-        options = lldb.SBExpressionOptions()
-        options.SetIgnoreBreakpoints(False)
-        options.SetFetchDynamicValue(False)
-        options.SetUnwindOnError(False)
-        frame.EvaluateExpression("b (4)", options)
-
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-            process, break_in_b)
-
-        if len(threads) != 1:
-            self.fail("Failed to stop at breakpoint in b when calling b.")
-        thread = threads[0]
-
-        # So do a step over here to make sure we can still do that:
-
-        thread.StepOver()
-
-        # See that we are still in b:
-        func_name = thread.GetFrameAtIndex(0).GetFunctionName()
-        self.assertTrue(
-            func_name == "b",
-            "Should be in 'b', were in %s" %
-            (func_name))
-
-        # Okay, now if we continue, we will finish off our function call and we
-        # should end up back in "a" as if nothing had happened:
-        process.Continue()
-
-        self.assertTrue(thread.GetFrameAtIndex(
-            0).GetLineEntry().GetLine() == current_line)
-        self.assertTrue(thread.GetFrameAtIndex(
-            0).GetLineEntry().GetFileSpec() == current_file)
-
-        # Now we are going to test step in targeting a function:
-
-        break_in_b.SetEnabled(False)
-
-        break_before_complex_1 = target.BreakpointCreateBySourceRegex(
-            '// Stop here to try step in targeting b.', self.main_source_spec)
-        self.assertTrue(break_before_complex_1, VALID_BREAKPOINT)
-
-        break_before_complex_2 = target.BreakpointCreateBySourceRegex(
-            '// Stop here to try step in targeting complex.', self.main_source_spec)
-        self.assertTrue(break_before_complex_2, VALID_BREAKPOINT)
-
-        break_before_complex_3 = target.BreakpointCreateBySourceRegex(
-            '// Stop here to step targeting b and hitting breakpoint.', self.main_source_spec)
-        self.assertTrue(break_before_complex_3, VALID_BREAKPOINT)
-
-        break_before_complex_4 = target.BreakpointCreateBySourceRegex(
-            '// Stop here to make sure bogus target steps over.', self.main_source_spec)
-        self.assertTrue(break_before_complex_4, VALID_BREAKPOINT)
-
-        threads = lldbutil.continue_to_breakpoint(
-            process, break_before_complex_1)
-        self.assertTrue(len(threads) == 1)
-        thread = threads[0]
-        break_before_complex_1.SetEnabled(False)
-
-        thread.StepInto("b")
-        self.assertTrue(thread.GetFrameAtIndex(0).GetFunctionName() == "b")
-
-        # Now continue out and stop at the next call to complex.  This time
-        # step all the way into complex:
-        threads = lldbutil.continue_to_breakpoint(
-            process, break_before_complex_2)
-        self.assertTrue(len(threads) == 1)
-        thread = threads[0]
-        break_before_complex_2.SetEnabled(False)
-
-        thread.StepInto("complex")
-        self.assertTrue(thread.GetFrameAtIndex(
-            0).GetFunctionName() == "complex")
-
-        # Now continue out and stop at the next call to complex.  This time
-        # enable breakpoints in a and c and then step targeting b:
-        threads = lldbutil.continue_to_breakpoint(
-            process, break_before_complex_3)
-        self.assertTrue(len(threads) == 1)
-        thread = threads[0]
-        break_before_complex_3.SetEnabled(False)
-
-        break_at_start_of_a = target.BreakpointCreateByName('a')
-        break_at_start_of_c = target.BreakpointCreateByName('c')
-
-        thread.StepInto("b")
-        threads = lldbutil.get_stopped_threads(
-            process, lldb.eStopReasonBreakpoint)
-
-        self.assertTrue(len(threads) == 1)
-        thread = threads[0]
-        stop_break_id = thread.GetStopReasonDataAtIndex(0)
-        self.assertTrue(stop_break_id == break_at_start_of_a.GetID()
-                        or stop_break_id == break_at_start_of_c.GetID())
-
-        break_at_start_of_a.SetEnabled(False)
-        break_at_start_of_c.SetEnabled(False)
-
-        process.Continue()
-        self.assertTrue(thread.GetFrameAtIndex(0).GetFunctionName() == "b")
-
-        # Now continue out and stop at the next call to complex.  This time
-        # enable breakpoints in a and c and then step targeting b:
-        threads = lldbutil.continue_to_breakpoint(
-            process, break_before_complex_4)
-        self.assertTrue(len(threads) == 1)
-        thread = threads[0]
-        break_before_complex_4.SetEnabled(False)
-
-        thread.StepInto("NoSuchFunction")
-        self.assertTrue(thread.GetFrameAtIndex(0).GetFunctionName() == "main")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/stepping/TestThreadStepping.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/stepping/TestThreadStepping.py
deleted file mode 100644 (file)
index 43ed10d..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-"""
-Test thread stepping features in combination with frame select.
-"""
-
-
-
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class ThreadSteppingTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to of function 'c'.
-        self.line1 = line_number(
-            'main.c', '// Find the line number of function "c" here.')
-        self.line2 = line_number(
-            'main.c', '// frame select 2, thread step-out while stopped at "c(1)"')
-        self.line3 = line_number(
-            'main.c', '// thread step-out while stopped at "c(2)"')
-        self.line4 = line_number(
-            'main.c', '// frame select 1, thread step-out while stopped at "c(3)"')
-
-    def test_step_out_with_run_command(self):
-        """Exercise thread step-out and frame select followed by thread step-out."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Create a breakpoint inside function 'c'.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", self.line1, num_expected_locations=1, loc_exact=True)
-
-        # Now run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The process should be stopped at this point.
-        self.expect("process status", PROCESS_STOPPED,
-                    patterns=['Process .* stopped'])
-
-        # The frame #0 should correspond to main.c:32, the executable statement
-        # in function name 'c'.  And frame #3 should point to main.c:37.
-        self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=["stop reason = breakpoint"],
-                    patterns=["frame #0.*main.c:%d" % self.line1,
-                              "frame #3.*main.c:%d" % self.line2])
-
-        # We want to move the pc to frame #3.  This can be accomplished by
-        # 'frame select 2', followed by 'thread step-out'.
-        self.runCmd("frame select 2")
-        self.runCmd("thread step-out")
-        self.expect("thread backtrace", STEP_OUT_SUCCEEDED,
-                    substrs=["stop reason = step out"],
-                    patterns=["frame #0.*main.c:%d" % self.line2])
-
-        # Let's move on to a single step-out case.
-        self.runCmd("process continue")
-
-        # The process should be stopped at this point.
-        self.expect("process status", PROCESS_STOPPED,
-                    patterns=['Process .* stopped'])
-        self.runCmd("thread step-out")
-        self.expect("thread backtrace", STEP_OUT_SUCCEEDED,
-                    substrs=["stop reason = step out"],
-                    patterns=["frame #0.*main.c:%d" % self.line3])
-
-        # Do another frame selct, followed by thread step-out.
-        self.runCmd("process continue")
-
-        # The process should be stopped at this point.
-        self.expect("process status", PROCESS_STOPPED,
-                    patterns=['Process .* stopped'])
-        self.runCmd("frame select 1")
-        self.runCmd("thread step-out")
-        self.expect("thread backtrace", STEP_OUT_SUCCEEDED,
-                    substrs=["stop reason = step out"],
-                    patterns=["frame #0.*main.c:%d" % self.line4])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/stepping/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/stepping/main.c
deleted file mode 100644 (file)
index fce61bf..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-int a(int);
-int b(int);
-int c(int);
-const char *print_string = "aaaaaaaaaa\n";
-
-int a(int val)
-{
-    int return_value = val;  // basic break at the start of b
-
-    if (val <= 1)
-    {
-        return_value =  b(val); // break here to stop in a before calling b
-    }
-    else if (val >= 3)
-    {
-        return_value = c(val);
-    }
-
-    return return_value;
-}
-
-int b(int val)
-{
-    int rc = c(val); // thread step-out while stopped at "c(2)"
-    return rc;
-}
-
-int c(int val)
-{
-    return val + 3; // Find the line number of function "c" here.
-}
-
-int complex (int first, int second, int third)
-{
-    return first + second + third;  // Step in targeting complex should stop here
-}
-
-int main (int argc, char const *argv[])
-{
-    int A1 = a(1); // frame select 2, thread step-out while stopped at "c(1)"
-    printf("a(1) returns %d\n", A1);
-    
-    int B2 = b(2);
-    printf("b(2) returns %d\n", B2);
-    
-    int A3 = a(3); // frame select 1, thread step-out while stopped at "c(3)"
-    printf("a(3) returns %d\n", A3);
-    
-    int A4 = complex (a(1), b(2), c(3)); // Stop here to try step in targeting b.
-
-    int A5 = complex (a(2), b(3), c(4)); // Stop here to try step in targeting complex.
-
-    int A6 = complex (a(4), b(5), c(6)); // Stop here to step targeting b and hitting breakpoint.
-
-    int A7 = complex (a(5), b(6), c(7)); // Stop here to make sure bogus target steps over.
-
-    printf ("I am using print_string: %s.\n", print_string);
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/strings/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/strings/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/strings/TestCStrings.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/strings/TestCStrings.py
deleted file mode 100644 (file)
index 597a247..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-"""
-Tests that C strings work as expected in expressions
-"""
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class CStringsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_with_run_command(self):
-        """Tests that C strings work as expected in expressions"""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        line = line_number('main.c', '// breakpoint 1')
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("process launch", RUN_SUCCEEDED)
-
-        self.expect("expression -- a[2]",
-                    patterns=["\((const )?char\) \$0 = 'c'"])
-
-        self.expect("expression -- z[2]",
-                    startstr="(const char) $1 = 'x'")
-
-        # On Linux, the expression below will test GNU indirect function calls.
-        self.expect("expression -- (int)strlen(\"hello\")",
-                    startstr="(int) $2 = 5")
-
-        self.expect("expression -- \"world\"[2]",
-                    startstr="(const char) $3 = 'r'")
-
-        self.expect("expression -- \"\"[0]",
-                    startstr="(const char) $4 = '\\0'")
-
-        self.expect("expr --raw -- \"hello\"",
-                    substrs=['[0] = \'h\'',
-                             '[5] = \'\\0\''])
-
-        self.expect("p \"hello\"",
-                    substrs=['[6]) $', 'hello'])
-
-        self.expect("p (char*)\"hello\"",
-                    substrs=['(char *) $', ' = 0x',
-                             'hello'])
-
-        self.expect("p (int)strlen(\"\")",
-                    substrs=['(int) $', ' = 0'])
-
-        self.expect("expression !z",
-                    substrs=['false'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/strings/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/strings/main.c
deleted file mode 100644 (file)
index 3e7ead0..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-//===-- main.c ----------------------------------------------------*- C -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <stdio.h>
-
-int main()
-{
-  const char a[] = "abcde";
-  const char *z = "vwxyz";
-  
-  printf("%s %s", a, z); // breakpoint 1
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/struct_types/TestStructTypes.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/struct_types/TestStructTypes.py
deleted file mode 100644 (file)
index c8308c1..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__, globals())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/struct_types/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/struct_types/main.c
deleted file mode 100644 (file)
index 356f139..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-struct things_to_sum {
-    int a;
-    int b;
-    int c;
-};
-
-int sum_things(struct things_to_sum tts)
-{
-    return tts.a + tts.b + tts.c;
-}
-
-int main (int argc, char const *argv[])
-{
-    struct point_tag {
-        int x;
-        int y;
-        char padding[0];
-    }; //% self.expect("frame variable pt.padding[0]", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["pt.padding[0] = "])
-       //% self.expect("frame variable pt.padding[1]", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["pt.padding[1] = "])
-       //% self.expect("expression -- (pt.padding[0])", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["(char)", " = "])
-       //% self.expect("image lookup -t point_tag", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['padding[]'])
-
-    struct {} empty;
-    //% self.expect("frame variable empty", substrs = ["empty = {}"])
-    //% self.expect("expression -- sizeof(empty)", substrs = ["= 0"])
-
-    struct rect_tag {
-        struct point_tag bottom_left;
-        struct point_tag top_right;
-    };
-    struct point_tag pt = { 2, 3, {} };
-    struct rect_tag rect = {{1, 2, {}}, {3, 4, {}}};
-    struct things_to_sum tts = { 2, 3, 4 };
-
-    int sum = sum_things(tts); //% self.expect("expression -- &pt == (struct point_tag*)0", substrs = ['false'])
-                               //% self.expect("expression -- sum_things(tts)", substrs = ['9'])
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/Makefile
deleted file mode 100644 (file)
index b26ce5c..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-C_SOURCES := main.c
-
-DYLIB_NAME := a
-DYLIB_C_SOURCES := a.c
-
-ENABLE_THREADS := YES
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py
deleted file mode 100644 (file)
index b1fd2b8..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-"""Test that thread-local storage can be read correctly."""
-
-
-
-import unittest2
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TlsGlobalTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        TestBase.setUp(self)
-
-        if self.getPlatform() == "freebsd" or self.getPlatform() == "linux":
-            # LD_LIBRARY_PATH must be set so the shared libraries are found on
-            # startup
-            if "LD_LIBRARY_PATH" in os.environ:
-                self.runCmd(
-                    "settings set target.env-vars " +
-                    self.dylibPath +
-                    "=" +
-                    os.environ["LD_LIBRARY_PATH"] +
-                    ":" +
-                    self.getBuildDir())
-            else:
-                self.runCmd("settings set target.env-vars " +
-                            self.dylibPath + "=" + self.getBuildDir())
-            self.addTearDownHook(
-                lambda: self.runCmd(
-                    "settings remove target.env-vars " +
-                    self.dylibPath))
-
-    # TLS works differently on Windows, this would need to be implemented
-    # separately.
-    @skipIfWindows
-    @expectedFailureAll(
-        bugnumber="llvm.org/pr28392",
-        oslist=no_match(
-            lldbplatformutil.getDarwinOSTriples()))
-    def test(self):
-        """Test thread-local storage."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-        if self.platformIsDarwin():
-            self.registerSharedLibrariesWithTarget(target, ['liba.dylib'])
-
-        line1 = line_number('main.c', '// thread breakpoint')
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", line1, num_expected_locations=1, loc_exact=True)
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.runCmd("process status", "Get process status")
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # BUG: sometimes lldb doesn't change threads to the stopped thread.
-        # (unrelated to this test).
-        self.runCmd("thread select 2", "Change thread")
-
-        # Check that TLS evaluates correctly within the thread.
-        self.expect("expr var_static", VARIABLES_DISPLAYED_CORRECTLY,
-                    patterns=["\(int\) \$.* = 88"])
-        self.expect("expr var_shared", VARIABLES_DISPLAYED_CORRECTLY,
-                    patterns=["\(int\) \$.* = 66"])
-
-        # Continue on the main thread
-        line2 = line_number('main.c', '// main breakpoint')
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", line2, num_expected_locations=1, loc_exact=True)
-        self.runCmd("continue", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.runCmd("process status", "Get process status")
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # BUG: sometimes lldb doesn't change threads to the stopped thread.
-        # (unrelated to this test).
-        self.runCmd("thread select 1", "Change thread")
-
-        # Check that TLS evaluates correctly within the main thread.
-        self.expect("expr var_static", VARIABLES_DISPLAYED_CORRECTLY,
-                    patterns=["\(int\) \$.* = 44"])
-        self.expect("expr var_shared", VARIABLES_DISPLAYED_CORRECTLY,
-                    patterns=["\(int\) \$.* = 33"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/a.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/a.c
deleted file mode 100644 (file)
index 0080396..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-//===-- a.c -----------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <unistd.h>
-
-__thread int var_shared = 33;
-
-int
-touch_shared()
-{
-    return var_shared;
-}
-
-void shared_check()
-{
-       var_shared *= 2;
-       usleep(1); // shared thread breakpoint
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/main.c
deleted file mode 100644 (file)
index c9c1e68..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-#include <pthread.h>
-#include <unistd.h>
-
-void shared_check();
-// On some OS's (darwin) you must actually access a thread local variable
-// before you can read it
-int
-touch_shared();
-
-// Create some TLS storage within the static executable.
-__thread int var_static = 44;
-
-void *fn_static(void *param)
-{
-       var_static *= 2;
-       shared_check();
-       usleep(1); // thread breakpoint
-       for(;;)
-               usleep(1);
-}
-
-int main (int argc, char const *argv[])
-{
-       pthread_t handle;
-       pthread_create(&handle, NULL, &fn_static, NULL);
-        touch_shared();
-        for (; var_static;)
-        {
-            usleep(1); // main breakpoint
-        }
-
-        return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/typedef/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/typedef/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/typedef/Testtypedef.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/typedef/Testtypedef.py
deleted file mode 100644 (file)
index cbbb636..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-"""Look up type information for typedefs of same name at different lexical scope and check for correct display."""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TypedefTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(compiler="clang", bugnumber="llvm.org/pr19238")
-    @expectedFailureAll(
-        oslist=["freebsd"],
-        bugnumber="llvm.org/pr25626 expectedFailureClang fails on FreeBSD")
-    def test_typedef(self):
-        """Test 'image lookup -t a' and check for correct display at different scopes."""
-        self.build()
-        self.image_lookup_for_multiple_typedefs()
-
-    def image_lookup_for_multiple_typedefs(self):
-        """Test 'image lookup -t a' at different scopes and check for correct display."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-        typearray = (
-            "float",
-            "float",
-            "char",
-            "double *",
-            "float",
-            "int",
-            "double",
-            "float",
-            "float")
-        arraylen = len(typearray) + 1
-        for i in range(1, arraylen):
-            loc_line = line_number(
-                'main.c', '// Set break point ' + str(i) + '.')
-            lldbutil.run_break_set_by_file_and_line(
-                self, "main.c", loc_line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        for t in typearray:
-            self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                        substrs=['stopped', 'stop reason = breakpoint'])
-            self.expect("image lookup -t a", DATA_TYPES_DISPLAYED_CORRECTLY,
-                        substrs=['name = "' + t + '"'])
-            self.runCmd("continue")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/typedef/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/typedef/main.c
deleted file mode 100644 (file)
index 467612e..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-void test()
-{
-    typedef double * a;
-    a b = 0; // Set break point 4.
-}
-int main (int argc, char const *argv[])
-{
-    typedef float a;
-    int i = 0; // Set break point 1.
-    i++;
-    a floatvariable = 2.7; // Set break point 2.
-    {
-        typedef char a;
-        i++;
-        a charvariable = 'a'; // Set break point 3.
-        test();
-    }
-    {
-        int c = 0;
-        c++; // Set break point 5.
-        for(i = 0 ; i < 1 ; i++)
-        {
-            typedef int a;
-            a b;
-            b = 7; // Set break point 6.
-        }
-        for(i = 0 ; i < 1 ; i++)
-        {
-            typedef double a;
-            a b;
-            b = 3.14; // Set break point 7.
-        }
-        c = 1; // Set break point 8.
-    }
-    floatvariable = 2.5;
-    floatvariable = 2.8; // Set break point 9.
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/unicode/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/unicode/Makefile
deleted file mode 100644 (file)
index a40a666..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-C_SOURCES := main.c
-CFLAGS_EXTRAS := -finput-charset=UTF-8 -fextended-identifiers -std=c99
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/unicode/TestUnicodeSymbols.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/unicode/TestUnicodeSymbols.py
deleted file mode 100644 (file)
index 9eb25e4..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-# coding=utf8
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.decorators import *
-
-
-class TestUnicodeSymbols(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIf(compiler="clang", compiler_version=['<', '7.0'])
-    def test_union_members(self):
-        self.build()
-        spec = lldb.SBModuleSpec()
-        spec.SetFileSpec(lldb.SBFileSpec(self.getBuildArtifact("a.out")))
-        module = lldb.SBModule(spec)
-        self.assertTrue(module.IsValid())
-        mytype = module.FindFirstType("foobár")
-        self.assertTrue(mytype.IsValid())
-        self.assertTrue(mytype.IsPointerType())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/unicode/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/unicode/main.c
deleted file mode 100644 (file)
index ae44dd0..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-typedef void *foob\u00E1r;
-foob\u00E1r X = 0;
-int main() {
-  return (long)X;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/unions/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/unions/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/unions/TestUnionMembers.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/unions/TestUnionMembers.py
deleted file mode 100644 (file)
index 4965df2..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class TestUnionMembers(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_union_members(self):
-        self._load_exe()
-
-        # Set breakpoints
-        bp = self.target.BreakpointCreateBySourceRegex(
-            "Break here", self.src_file_spec)
-        self.assertTrue(
-            bp.IsValid() and bp.GetNumLocations() >= 1,
-            VALID_BREAKPOINT)
-
-        # Launch the process
-        self.process = self.target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID)
-        self.assertTrue(
-            self.process.GetState() == lldb.eStateStopped,
-            PROCESS_STOPPED)
-
-        thread = lldbutil.get_stopped_thread(
-            self.process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(thread.IsValid())
-        frame = thread.GetSelectedFrame()
-        self.assertTrue(frame.IsValid())
-
-        val = frame.EvaluateExpression("u")
-        self.assertTrue(val.IsValid())
-        val = frame.EvaluateExpression("u.s")
-        self.assertTrue(val.IsValid())
-        self.assertEqual(val.GetNumChildren(), 2)
-
-    def _load_exe(self):
-        self.build()
-
-        src_file = os.path.join(self.getSourceDir(), "main.c")
-        self.src_file_spec = lldb.SBFileSpec(src_file)
-        self.assertTrue(self.src_file_spec.IsValid(), "breakpoint file")
-
-        # Get the path of the executable
-        exe_path = self.getBuildArtifact("a.out")
-
-        # Load the executable
-        self.target = self.dbg.CreateTarget(exe_path)
-        self.assertTrue(self.target.IsValid(), VALID_TARGET)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/unions/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/unions/main.c
deleted file mode 100644 (file)
index 2c6a7d1..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#include <stdint.h>
-
-union S
-{
-    int32_t n;     // occupies 4 bytes
-    uint16_t s[2]; // occupies 4 bytes
-    uint8_t c;     // occupies 1 byte
-};                 // the whole union occupies 4 bytes
-
-int main()
-{
-  union S u;
-
-  u.s[0] = 1234;
-  u.s[1] = 4321;
-
-  return 0; // Break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/vla/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/vla/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/vla/TestVLA.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/vla/TestVLA.py
deleted file mode 100644 (file)
index 09439e2..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class TestVLA(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIf(compiler="clang", compiler_version=['<', '8.0'])
-    def test_variable_list(self):
-        self.build()
-        _, process, _, _ = lldbutil.run_to_source_breakpoint(
-            self, "break here", lldb.SBFileSpec('main.c'))
-
-        # Make sure no helper expressions show up in frame variable.
-        var_opts = lldb.SBVariablesOptions()
-        var_opts.SetIncludeArguments(False)
-        var_opts.SetIncludeLocals(True)
-        var_opts.SetInScopeOnly(True)
-        var_opts.SetIncludeStatics(False)
-        var_opts.SetIncludeRuntimeSupportValues(False)
-        var_opts.SetUseDynamic(lldb.eDynamicCanRunTarget)
-        all_locals = self.frame().GetVariables(var_opts)
-        for value in all_locals:
-            self.assertFalse("vla_expr" in value.name)
-
-    @decorators.skipIf(compiler="clang", compiler_version=['<', '8.0'])
-    def test_vla(self):
-        self.build()
-        _, process, _, _ = lldbutil.run_to_source_breakpoint(
-            self, "break here", lldb.SBFileSpec('main.c'))
-
-        def test(a, array):
-            for i in range(a):
-                self.expect("fr v vla[%d]"%i, substrs=["int", "%d"%(a-i)])
-                self.expect("expr vla[%d]"%i, substrs=["int", "%d"%(a-i)])
-            self.expect("fr v vla", substrs=array)
-            self.expect("expr vla", error=True, substrs=["incomplete"])
-
-        test(2, ["int []", "[0] = 2, [1] = 1"])
-        process.Continue()
-        test(4, ["int []", "[0] = 4, [1] = 3, [2] = 2, [3] = 1"])
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/vla/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/vla/main.c
deleted file mode 100644 (file)
index ba9cc18..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-void pause() {}
-
-int foo(int a) {
-  int vla[a];
-
-  for (int i = 0; i < a; ++i)
-    vla[i] = a-i;
-
-  pause(); // break here
-  return vla[a-1];
-}
-
-int main (void) {
-  return foo(2) + foo(4);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/Makefile
deleted file mode 100644 (file)
index 4c053a0..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# There is no guaranteed order in which the linker will order these
-# files, so we just have a lot of them to make it unlikely that we hit
-# the right one first by pure luck.
-
-CXX_SOURCES := main.cpp a.cpp b.cpp c.cpp d.cpp e.cpp f.cpp g.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/TestCPPAccelerator.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/TestCPPAccelerator.py
deleted file mode 100644 (file)
index 3705e95..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class CPPAcceleratorTableTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    @skipIf(debug_info=no_match(["dwarf"]))
-    def test(self):
-        """Test that type lookups fail early (performance)"""
-        self.build()
-        logfile = self.getBuildArtifact('dwarf.log')
-        self.expect('log enable dwarf lookups -f' + logfile)
-        target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
-            self, 'break here', lldb.SBFileSpec('main.cpp'))
-        # Pick one from the middle of the list to have a high chance
-        # of it not being in the first file looked at.
-        self.expect('frame variable inner_d')
-
-        log = open(logfile, 'r')
-        n = 0
-        for line in log:
-            if re.findall(r'[abcdefg]\.o: FindByNameAndTag\(\)', line):
-                self.assertTrue("d.o" in line)
-                n += 1
-
-        self.assertEqual(n, 1, log)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/a.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/a.cpp
deleted file mode 100644 (file)
index d9f758e..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "source.h"
-CLASS(A)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/b.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/b.cpp
deleted file mode 100644 (file)
index a0cdffa..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "source.h"
-CLASS(B)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/c.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/c.cpp
deleted file mode 100644 (file)
index 1bd7172..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "source.h"
-CLASS(C)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/d.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/d.cpp
deleted file mode 100644 (file)
index e43c2ad..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "source.h"
-CLASS(D)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/e.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/e.cpp
deleted file mode 100644 (file)
index a3008f7..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "source.h"
-CLASS(E)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/f.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/f.cpp
deleted file mode 100644 (file)
index 77df296..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "source.h"
-CLASS(F)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/g.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/g.cpp
deleted file mode 100644 (file)
index e144691..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "source.h"
-CLASS(G)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/main.cpp
deleted file mode 100644 (file)
index b7eb252..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#define CLASS(NAME)                             \
-  class NAME {                                  \
-  public:                                       \
-    struct Inner;                               \
-    Inner *i = nullptr;                         \
-  };                                            \
-NAME::Inner &getInner##NAME();
-
-CLASS(A)
-CLASS(B)
-CLASS(C)
-CLASS(D)
-CLASS(E)
-CLASS(F)
-CLASS(G)
-
-int main()
-{
-  A::Inner &inner_a = getInnerA();
-  B::Inner &inner_b = getInnerB();
-  C::Inner &inner_c = getInnerC();
-  D::Inner &inner_d = getInnerD();
-  E::Inner &inner_e = getInnerE();
-  F::Inner &inner_f = getInnerF();
-  G::Inner &inner_g = getInnerG();
-
-  return 0; // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/source.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/source.h
deleted file mode 100644 (file)
index 214e7da..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#define CLASS(NAME)                             \
-  class NAME {                                  \
-    public:                                     \
-    class Inner {                               \
-      int j = #NAME[0];                         \
-    };                                          \
-    Inner *i = nullptr;                         \
-  };                                            \
-                                                \
-  static NAME::Inner inner;                     \
-  static NAME obj;                              \
-  NAME::Inner &getInner##NAME() { return inner; }
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/auto/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/auto/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/auto/TestCPPAuto.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/auto/TestCPPAuto.py
deleted file mode 100644 (file)
index fe3a832..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-"""
-Tests that auto types work
-"""
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class CPPAutoTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(
-        compiler="gcc",
-        bugnumber="GCC generates incomplete debug info")
-    @expectedFailureAll(oslist=['windows'], bugnumber="llvm.org/pr26339")
-    @expectedFailureNetBSD
-    def test_with_run_command(self):
-        """Test that auto types work in the expression parser"""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        line = line_number('main.cpp', '// break here')
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", line, num_expected_locations=-1, loc_exact=False)
-
-        self.runCmd("process launch", RUN_SUCCEEDED)
-
-        self.expect('expr auto f = 123456; f', substrs=['int', '123456'])
-        self.expect(
-            'expr struct Test { int x; int y; Test() : x(123), y(456) {} }; auto t = Test(); t',
-            substrs=[
-                'Test',
-                '123',
-                '456'])
-        self.expect(
-            'expr auto s = helloworld; s',
-            substrs=[
-                'string',
-                'hello world'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/auto/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/auto/main.cpp
deleted file mode 100644 (file)
index d411af6..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <string>
-
-int main()
-{
-  std::string helloworld("hello world");
-
-  // Ensure std::string copy constructor is present in the binary, as we will
-  // use it in an expression.
-  std::string other = helloworld;
-
-  return 0; // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/bitfields/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/bitfields/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/bitfields/TestCppBitfields.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/bitfields/TestCppBitfields.py
deleted file mode 100644 (file)
index 1b362e6..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-"""Show bitfields and check that they display correctly."""
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class CppBitfieldsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    # BitFields exhibit crashes in record layout on Windows
-    # (http://llvm.org/pr21800)
-    @skipIfWindows
-    def test_and_run_command(self):
-        """Test 'frame variable ...' on a variable with bitfields."""
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self, '// Set break point at this line.',
-          lldb.SBFileSpec("main.cpp", False))
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        self.expect("expr (lba.a)", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['unsigned int', '2'])
-        self.expect("expr (lbb.b)", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['unsigned int', '3'])
-        self.expect("expr (lbc.c)", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['unsigned int', '4'])
-        self.expect("expr (lbd.a)", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['unsigned int', '5'])
-        self.expect("expr (clang_example.f.a)", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['uint64_t', '1'])
-
-        self.expect(
-            "frame variable --show-types lba",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                '(int:32)  = ',
-                '(unsigned int:20) a = 2',
-                ])
-
-        self.expect(
-            "frame variable --show-types lbb",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                '(unsigned int:1) a = 1',
-                '(int:31)  =',
-                '(unsigned int:20) b = 3',
-                ])
-
-        self.expect(
-            "frame variable --show-types lbc",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                '(int:22)  =',
-                '(unsigned int:1) a = 1',
-                '(unsigned int:1) b = 0',
-                '(unsigned int:5) c = 4',
-                '(unsigned int:1) d = 1',
-                '(int:2)  =',
-                '(unsigned int:20) e = 20',
-                ])
-
-        self.expect(
-            "frame variable --show-types lbd",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                '(char [3]) arr = "ab"',
-                '(int:32)  =',
-                '(unsigned int:20) a = 5',
-                ])
-
-        self.expect(
-            "frame variable --show-types clang_example",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                   '(int:22)  =',
-                   '(uint64_t:1) a = 1',
-                   '(uint64_t:1) b = 0',
-                   '(uint64_t:1) c = 1',
-                   '(uint64_t:1) d = 0',
-                   '(uint64_t:1) e = 1',
-                   '(uint64_t:1) f = 0',
-                   '(uint64_t:1) g = 1',
-                   '(uint64_t:1) h = 0',
-                   '(uint64_t:1) i = 1',
-                   '(uint64_t:1) j = 0',
-                   '(uint64_t:1) k = 1',
-                ])
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/bitfields/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/bitfields/main.cpp
deleted file mode 100644 (file)
index e43bf8c..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-#include <stdint.h>
-
-int main(int argc, char const *argv[]) {
-  struct LargeBitsA {
-    unsigned int : 30, a : 20;
-  } lba;
-
-  struct LargeBitsB {
-    unsigned int a : 1, : 11, : 12, b : 20;
-  } lbb;
-
-  struct LargeBitsC {
-    unsigned int : 13, : 9, a : 1, b : 1, c : 5, d : 1, e : 20;
-  } lbc;
-
-  struct LargeBitsD {
-    char arr[3];
-    unsigned int : 30, a : 20;
-  } lbd;
-
-  // This case came up when debugging clang and models RecordDeclBits
-  struct BitExampleFromClangDeclContext {
-    class fields {
-      uint64_t : 13;
-      uint64_t : 9;
-
-      uint64_t a: 1;
-      uint64_t b: 1;
-      uint64_t c: 1;
-      uint64_t d: 1;
-      uint64_t e: 1;
-      uint64_t f: 1;
-      uint64_t g: 1;
-      uint64_t h: 1;
-      uint64_t i: 1;
-      uint64_t j: 1;
-      uint64_t k: 1;
-
-      // In order to reproduce the crash for this case we need the
-      // members of fields to stay private :-(
-      friend struct BitExampleFromClangDeclContext;
-    };
-
-    union {
-      struct fields f;
-    };
-
-    BitExampleFromClangDeclContext() {
-  f.a = 1;
-  f.b = 0;
-  f.c = 1;
-  f.d = 0;
-  f.e = 1;
-  f.f = 0;
-  f.g = 1;
-  f.h = 0;
-  f.i = 1;
-  f.j = 0;
-  f.k = 1;
-    } 
-  } clang_example;
-
-  lba.a = 2;
-
-  lbb.a = 1;
-  lbb.b = 3;
-
-  lbc.a = 1;
-  lbc.b = 0;
-  lbc.c = 4;
-  lbc.d = 1;
-  lbc.e = 20;
-
-  lbd.arr[0] = 'a';
-  lbd.arr[1] = 'b';
-  lbd.arr[2] = '\0';
-  lbd.a = 5;
-
-
-  return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/bool/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/bool/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/bool/TestCPPBool.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/bool/TestCPPBool.py
deleted file mode 100644 (file)
index 27ea773..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-"""
-Tests that bool types work
-"""
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class CPPBoolTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_with_run_command(self):
-        """Test that bool types work in the expression parser"""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        line = line_number('main.cpp', '// breakpoint 1')
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", line, num_expected_locations=-1, loc_exact=False)
-
-        self.runCmd("process launch", RUN_SUCCEEDED)
-
-        self.expect("expression -- bool second_bool = my_bool; second_bool",
-                    startstr="(bool) $0 = false")
-
-        self.expect("expression -- my_bool = true",
-                    startstr="(bool) $1 = true")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/bool/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/bool/main.cpp
deleted file mode 100644 (file)
index a14cc69..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <stdio.h>
-
-int main()
-{
-  bool my_bool = false;
-
-  printf("%s\n", my_bool ? "true" : "false"); // breakpoint 1
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/Makefile
deleted file mode 100644 (file)
index 6afea39..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := nested.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py
deleted file mode 100644 (file)
index 32c9748..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-"""
-Test lldb breakpoint command for CPP methods & functions in a namespace.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class CPPBreakpointCommandsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def make_breakpoint(self, name, type, expected_num_locations):
-        bkpt = self.target.BreakpointCreateByName(name,
-                                                  type,
-                                                  self.a_out_module,
-                                                  self.nested_comp_unit)
-        num_locations = bkpt.GetNumLocations()
-        self.assertTrue(
-            num_locations == expected_num_locations,
-            "Wrong number of locations for '%s', expected: %d got: %d" %
-            (name,
-             expected_num_locations,
-             num_locations))
-        return bkpt
-
-    def test_cpp_breakpoint_cmds(self):
-        """Test a sequence of breakpoint command add, list, and delete."""
-        self.build()
-
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target from the debugger.
-
-        self.target = self.dbg.CreateTarget(exe)
-        self.assertTrue(self.target, VALID_TARGET)
-
-        self.a_out_module = lldb.SBFileSpecList()
-        self.a_out_module.Append(lldb.SBFileSpec(exe))
-
-        self.nested_comp_unit = lldb.SBFileSpecList()
-        self.nested_comp_unit.Append(lldb.SBFileSpec("nested.cpp"))
-
-        # First provide ONLY the method name.  This should get everybody...
-        self.make_breakpoint("Function",
-                             lldb.eFunctionNameTypeAuto,
-                             5)
-
-        # Now add the Baz class specifier.  This should get the version contained in Bar,
-        # AND the one contained in ::
-        self.make_breakpoint("Baz::Function",
-                             lldb.eFunctionNameTypeAuto,
-                             2)
-
-        # Then add the Bar::Baz specifier.  This should get the version
-        # contained in Bar only
-        self.make_breakpoint("Bar::Baz::Function",
-                             lldb.eFunctionNameTypeAuto,
-                             1)
-
-        self.make_breakpoint("Function",
-                             lldb.eFunctionNameTypeMethod,
-                             3)
-
-        self.make_breakpoint("Baz::Function",
-                             lldb.eFunctionNameTypeMethod,
-                             2)
-
-        self.make_breakpoint("Bar::Baz::Function",
-                             lldb.eFunctionNameTypeMethod,
-                             1)
-
-        self.make_breakpoint("Function",
-                             lldb.eFunctionNameTypeBase,
-                             2)
-
-        self.make_breakpoint("Bar::Function",
-                             lldb.eFunctionNameTypeBase,
-                             1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/nested.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/nested.cpp
deleted file mode 100644 (file)
index 7406496..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#include <stdio.h>
-
-namespace Foo
-{
-  namespace Bar
-  {
-    class Baz
-    {
-    public:
-      Baz (int value):m_value(value) {}
-      int Function () 
-      {
-        printf ("%s returning: %d.\n", __FUNCTION__, m_value);
-        return m_value + 1;
-      }
-    private:
-      int m_value;
-    };
-
-    class Baz2
-    {
-    public:
-      Baz2 (int value):m_value(value) {}
-      int Function () 
-      {
-        printf ("%s returning: %d.\n", __FUNCTION__, m_value);
-        return m_value + 2;
-      }
-    private:
-      int m_value;
-    };
-
-    static int bar_value = 20;
-    int Function ()
-    {
-      printf ("%s returning: %d.\n", __FUNCTION__, bar_value);
-      return bar_value + 3;
-    }
-  }
-}
-
-class Baz
-{
-public:
-    Baz (int value):m_value(value) {}
-    int Function () 
-    {
-        printf ("%s returning: %d.\n", __FUNCTION__, m_value);
-        return m_value + 4;
-    }
-private:
-    int m_value;
-};
-
-int
-Function ()
-{
-    printf ("I am a global function, I return 333.\n");
-    return 333;
-}
-
-int main ()
-{
-  Foo::Bar::Baz mine(200);
-  Foo::Bar::Baz2 mine2(300);
-  ::Baz bare_baz (500);
-
-  printf ("Yup, got %d from Baz.\n", mine.Function());
-  printf ("Yup, got %d from Baz.\n", mine2.Function());
-  printf ("Yup, got %d from Baz.\n", bare_baz.Function());  
-  printf ("And  got %d from Bar.\n", Foo::Bar::Function());
-  printf ("And  got %d from ::.\n", ::Function());
-
-  return 0;
-
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/Makefile
deleted file mode 100644 (file)
index dc53622..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CXX_SOURCES = main.cpp a.cpp
-CFLAGS_EXTRAS = $(MANDATORY_CXXMODULE_BUILD_CFLAGS)
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/TestBreakpointInMemberFuncWNonPrimitiveParams.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/TestBreakpointInMemberFuncWNonPrimitiveParams.py
deleted file mode 100644 (file)
index 1e46f73..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-"""
-This is a regression test for an assert that happens while setting a breakpoint.
-The root cause of the assert was attempting to add a ParmVarDecl to a CXXRecordDecl
-when it should have been added to a CXXMethodDecl.
-
-We can reproduce with a module build and setting a breakpoint in a member function
-of a class with a non-primitive type as a parameter.
-"""
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestBreakpointInMemberFuncWNonPrimitiveParams(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(["gmodules"])
-    def test_breakpint_in_member_func_w_non_primitie_params(self):
-        self.build()
-
-        (self.target, self.process, _, bkpt) = lldbutil.run_to_source_breakpoint(self, '// break here',
-                lldb.SBFileSpec("main.cpp", False))
-
-        self.runCmd("b a.cpp:11");
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/a.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/a.cpp
deleted file mode 100644 (file)
index 64e142c..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#include "a.h"
-
-bool A::b(int x) {
-  if (x)
-    return true;
-
-  return false;
-}
-
-bool B::member_func_a(A a) {
-  return a.b(10); // We will try and add a breakpoint here which
-                  // trigger an assert since we will attempt to
-                  // to add ParamVarDecl a to CXXRecordDecl A
-};
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/a.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/a.h
deleted file mode 100644 (file)
index cb31d3e..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-struct A {
-  bool b(int x);
-};
-
-struct B {
-  bool member_func_a(A a);
-};
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/main.cpp
deleted file mode 100644 (file)
index 779ef04..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#include "a.h"
-#include <cstdio>
-
-bool foo() {
-  A a1;
-  B b1;
-
-  return b1.member_func_a(a1); // break here
-}
-
-int main() {
-  int x = 0;
-
-  return foo();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/module.modulemap b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/module.modulemap
deleted file mode 100644 (file)
index bbd9d67..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-module A {
-  header "a.h"
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/call-function/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/call-function/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/call-function/TestCallCPPFunction.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/call-function/TestCallCPPFunction.py
deleted file mode 100644 (file)
index b6274b3..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-"""
-Tests calling a function by basename
-"""
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class CallCPPFunctionTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        TestBase.setUp(self)
-        self.line = line_number('main.cpp', '// breakpoint')
-
-    def test_with_run_command(self):
-        """Test calling a function by basename"""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("process launch", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list",
-                    STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped', 'stop reason = breakpoint'])
-
-        self.expect("expression -- a_function_to_call()",
-                    startstr="(int) $0 = 0")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/call-function/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/call-function/main.cpp
deleted file mode 100644 (file)
index 61a5e9d..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#include <stdio.h>
-
-int a_function_to_call()
-{ 
-    return 0;
-}
-
-int main()
-{
-    printf("%d\n", a_function_to_call()); // breakpoint
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/chained-calls/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/chained-calls/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/chained-calls/TestCppChainedCalls.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/chained-calls/TestCppChainedCalls.py
deleted file mode 100644 (file)
index 080c051..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestCppChainedCalls(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_with_run_command(self):
-        self.build()
-
-        # Get main source file
-        src_file = "main.cpp"
-        src_file_spec = lldb.SBFileSpec(src_file)
-        self.assertTrue(src_file_spec.IsValid(), "Main source file")
-
-        # Get the path of the executable
-        exe_path = self.getBuildArtifact("a.out")
-
-        # Load the executable
-        target = self.dbg.CreateTarget(exe_path)
-        self.assertTrue(target.IsValid(), VALID_TARGET)
-
-        # Break on main function
-        main_breakpoint = target.BreakpointCreateBySourceRegex(
-            "break here", src_file_spec)
-        self.assertTrue(
-            main_breakpoint.IsValid() and main_breakpoint.GetNumLocations() >= 1,
-            VALID_BREAKPOINT)
-
-        # Launch the process
-        args = None
-        env = None
-        process = target.LaunchSimple(
-            args, env, self.get_process_working_directory())
-        self.assertTrue(process.IsValid(), PROCESS_IS_VALID)
-
-        # Get the thread of the process
-        self.assertTrue(
-            process.GetState() == lldb.eStateStopped,
-            PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-
-        # Get frame for current thread
-        frame = thread.GetSelectedFrame()
-
-        # Test chained calls
-        test_result = frame.EvaluateExpression("get(set(true))")
-        self.assertTrue(
-            test_result.IsValid() and test_result.GetValue() == "true",
-            "get(set(true)) = true")
-
-        test_result = frame.EvaluateExpression("get(set(false))")
-        self.assertTrue(
-            test_result.IsValid() and test_result.GetValue() == "false",
-            "get(set(false)) = false")
-
-        test_result = frame.EvaluateExpression("get(t & f)")
-        self.assertTrue(
-            test_result.IsValid() and test_result.GetValue() == "false",
-            "get(t & f) = false")
-
-        test_result = frame.EvaluateExpression("get(f & t)")
-        self.assertTrue(
-            test_result.IsValid() and test_result.GetValue() == "false",
-            "get(f & t) = false")
-
-        test_result = frame.EvaluateExpression("get(t & t)")
-        self.assertTrue(
-            test_result.IsValid() and test_result.GetValue() == "true",
-            "get(t & t) = true")
-
-        test_result = frame.EvaluateExpression("get(f & f)")
-        self.assertTrue(
-            test_result.IsValid() and test_result.GetValue() == "false",
-            "get(f & f) = false")
-
-        test_result = frame.EvaluateExpression("get(t & f)")
-        self.assertTrue(
-            test_result.IsValid() and test_result.GetValue() == "false",
-            "get(t & f) = false")
-
-        test_result = frame.EvaluateExpression("get(f) && get(t)")
-        self.assertTrue(
-            test_result.IsValid() and test_result.GetValue() == "false",
-            "get(f) && get(t) = false")
-
-        test_result = frame.EvaluateExpression("get(f) && get(f)")
-        self.assertTrue(
-            test_result.IsValid() and test_result.GetValue() == "false",
-            "get(f) && get(t) = false")
-
-        test_result = frame.EvaluateExpression("get(t) && get(t)")
-        self.assertTrue(
-            test_result.IsValid() and test_result.GetValue() == "true",
-            "get(t) && get(t) = true")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/chained-calls/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/chained-calls/main.cpp
deleted file mode 100644 (file)
index a888c3f..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-class Bool {
-public:
-    Bool operator&(const Bool other)
-    {
-        Bool result;
-        result.value = value && other.value;
-        return result;
-    }
-
-    bool value;
-};
-
-bool get(Bool object)
-{
-    return object.value;
-}
-
-Bool set(bool value)
-{
-    Bool result;
-    result.value = value;
-    return result;
-}
-
-int main()
-{
-    Bool t = set(true);
-    Bool f = set(false);
-    get(t);
-    get(f);
-    get(t & f);
-    return 0; // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/char1632_t/.categories b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/char1632_t/.categories
deleted file mode 100644 (file)
index fe1da02..0000000
+++ /dev/null
@@ -1 +0,0 @@
-dataformatters
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/char1632_t/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/char1632_t/Makefile
deleted file mode 100644 (file)
index 64fd6ef..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CXX_SOURCES := main.cpp
-CFLAGS :=-g -O0 -std=c++11
-
-clean: OBJECTS+=$(wildcard main.d.*)
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/char1632_t/TestChar1632T.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/char1632_t/TestChar1632T.py
deleted file mode 100644 (file)
index 986d9e5..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-# coding=utf8
-"""
-Test that the C++11 support for char16_t and char32_t works correctly.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class Char1632TestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break for main.cpp.
-        self.source = 'main.cpp'
-        self.lines = [line_number(self.source, '// breakpoint1'),
-                      line_number(self.source, '// breakpoint2')]
-
-    @expectedFailureAll(
-        compiler="icc",
-        bugnumber="ICC (13.1) does not emit the DW_TAG_base_type for char16_t and char32_t.")
-    def test(self):
-        """Test that the C++11 support for char16_t and char32_t works correctly."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Set breakpoints
-        for line in self.lines:
-            lldbutil.run_break_set_by_file_and_line(self, "main.cpp", line)
-
-        # Now launch the process, and do not stop at entry point and stop at
-        # breakpoint1
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        if not process:
-            self.fail("SBTarget.Launch() failed")
-
-        if self.TraceOn():
-            self.runCmd("frame variable")
-
-        # Check that we correctly report the const types
-        self.expect(
-            "frame variable cs16 cs32",
-            substrs=[
-                '(const char16_t *) cs16 = ',
-                '(const char32_t *) cs32 = ',
-                'u"hello world ྒྙྐ"',
-                'U"hello world ྒྙྐ"'])
-
-        # Check that we correctly report the non-const types
-        self.expect(
-            "frame variable s16 s32",
-            substrs=[
-                '(char16_t *) s16 = ',
-                '(char32_t *) s32 = ',
-                'u"ﺸﺵۻ"',
-                'U"ЕЙРГЖО"'])
-
-        # Check that we correctly report the array types
-        self.expect(
-            "frame variable as16 as32",
-            patterns=[
-                '\(char16_t \[[0-9]+\]\) as16 = ',
-                '\(char32_t \[[0-9]+\]\) as32 = '],
-            substrs=[
-                'u"ﺸﺵۻ"',
-                'U"ЕЙРГЖО"'])
-
-        self.runCmd("next")  # step to after the string is nullified
-
-        # check that we don't crash on NULL
-        self.expect("frame variable s32",
-                    substrs=['(char32_t *) s32 = 0x00000000'])
-
-        # continue and hit breakpoint2
-        self.runCmd("continue")
-
-        # check that the new strings show
-        self.expect(
-            "frame variable s16 s32",
-            substrs=[
-                '(char16_t *) s16 = 0x',
-                '(char32_t *) s32 = ',
-                '"色ハ匂ヘト散リヌルヲ"',
-                '"෴"'])
-
-        # check the same as above for arrays
-        self.expect(
-            "frame variable as16 as32",
-            patterns=[
-                '\(char16_t \[[0-9]+\]\) as16 = ',
-                '\(char32_t \[[0-9]+\]\) as32 = '],
-            substrs=[
-                '"色ハ匂ヘト散リヌルヲ"',
-                '"෴"'])
-
-        # check that zero values are properly handles
-        self.expect('frame variable cs16_zero', substrs=["U+0000 u'\\0'"])
-        self.expect(
-            'frame variable cs32_zero',
-            substrs=["U+0x00000000 U'\\0'"])
-        self.expect('expression cs16_zero', substrs=["U+0000 u'\\0'"])
-        self.expect('expression cs32_zero', substrs=["U+0x00000000 U'\\0'"])
-
-        # Check that we can run expressions that return charN_t
-        self.expect("expression u'a'", substrs=['(char16_t) $', "61 u'a'"])
-        self.expect("expression U'a'", substrs=['(char32_t) $', "61 U'a'"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/char1632_t/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/char1632_t/main.cpp
deleted file mode 100644 (file)
index 8cd0cfc..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <assert.h>
-#include <string>
-
-#define UASZ 64
-
-template<class T, int N>
-void copy_char_seq (T (&arr)[N], const T* src)
-{
-    size_t src_len = std::char_traits<T>::length(src);
-    assert(src_len < N);
-
-    std::char_traits<T>::copy(arr, src, src_len);
-    arr[src_len] = 0;
-}
-
-int main (int argc, char const *argv[])
-{
-    char16_t as16[UASZ];
-    char32_t as32[UASZ];
-    auto cs16_zero = (char16_t)0;
-    auto cs32_zero = (char32_t)0;
-    auto cs16 = u"hello world ྒྙྐ";
-    auto cs32 = U"hello world ྒྙྐ";
-    char16_t *s16 = (char16_t *)u"ﺸﺵۻ";
-    char32_t *s32 = (char32_t *)U"ЕЙРГЖО";
-    copy_char_seq(as16, s16);
-    copy_char_seq(as32, s32);
-    s32 = nullptr; // breakpoint1
-    s32 = (char32_t *)U"෴";
-    s16 = (char16_t *)u"色ハ匂ヘト散リヌルヲ";
-    copy_char_seq(as16, s16);
-    copy_char_seq(as32, s32);
-    s32 = nullptr; // breakpoint2
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/char8_t/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/char8_t/Makefile
deleted file mode 100644 (file)
index e7c9938..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CXX_SOURCES := main.cpp
-CXXFLAGS_EXTRAS := -std=c++2a -fchar8_t
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/char8_t/TestCxxChar8_t.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/char8_t/TestCxxChar8_t.py
deleted file mode 100644 (file)
index e7f2c1a..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-# coding=utf8
-"""
-Test that C++ supports char8_t correctly.
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class CxxChar8_tTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIf(compiler="clang", compiler_version=['<', '7.0'])
-    def test(self):
-        """Test that C++ supports char8_t correctly."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # FIXME: We should be able to test this with target variable, but the
-        # data formatter output is broken.
-        lldbutil.run_break_set_by_symbol(self, 'main')
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.expect(
-            "frame variable a", substrs=["(char8_t)", "0x61 u8'a'"])
-
-        self.expect(
-            "frame variable ab", substrs=['(const char8_t *)' , 'u8"你好"'])
-
-        self.expect(
-            "frame variable abc", substrs=['(char8_t [9])', 'u8"你好"'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/char8_t/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/char8_t/main.cpp
deleted file mode 100644 (file)
index b73ba0c..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-char8_t a  = u8'a';
-const char8_t* ab = u8"你好";
-char8_t abc[9] = u8"你好";
-
-int main (int argc, char const *argv[]) { return 0; }
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/class-template-parameter-pack/TestClassTemplateParameterPack.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/class-template-parameter-pack/TestClassTemplateParameterPack.py
deleted file mode 100644 (file)
index 7e67f73..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(
-    __file__, globals(), [
-        decorators.expectedFailureAll(
-            compiler="gcc")])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/class-template-parameter-pack/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/class-template-parameter-pack/main.cpp
deleted file mode 100644 (file)
index 9278d01..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-template <class T, int... Args> struct C {
-  T member;
-  bool isSixteenThirtyTwo() { return false; }
-};
-
-template <> struct C<int, 16> {
-  int member;
-  bool isSixteenThirtyTwo() { return false; }
-};
-
-template <> struct C<int, 16, 32> : C<int, 16> {
-  bool isSixteenThirtyTwo() { return true; }
-};
-
-template <class T, typename... Args> struct D {
-  T member;
-  bool isIntBool() { return false; }
-};
-
-template <> struct D<int, int> {
-  int member;
-  bool isIntBool() { return false; }
-};
-
-template <> struct D<int, int, bool> : D<int, int> {
-  bool isIntBool() { return true; }
-};
-
-int main (int argc, char const *argv[])
-{
-    C<int,16,32> myC;
-    C<int,16> myLesserC;
-    myC.member = 64;
-    (void)C<int,16,32>().isSixteenThirtyTwo();
-    (void)C<int,16>().isSixteenThirtyTwo();
-    (void)(myC.member != 64);   //% self.expect("expression -- myC", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["64"])
-                                //% self.expect("expression -- myLesserC.isSixteenThirtyTwo()", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["false"])
-                                //% self.expect("expression -- myC.isSixteenThirtyTwo()", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["true"])
-
-                                // Disabling until we do template lookup correctly: http://lists.llvm.org/pipermail/lldb-commits/Week-of-Mon-20180507/040689.html
-                                //#% self.expect("expression -- C<int, 16>().isSixteenThirtyTwo()", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["false"])
-                                //#% self.expect("expression -- C<int, 16, 32>().isSixteenThirtyTwo()", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["true"])
-   
-    D<int,int,bool> myD;
-    D<int,int> myLesserD;
-    myD.member = 64;
-    (void)D<int,int,bool>().isIntBool();
-    (void)D<int,int>().isIntBool();
-    return myD.member != 64;   //% self.expect("expression -- myD", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["64"])
-                                //% self.expect("expression -- myLesserD.isIntBool()", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["false"])
-                                //% self.expect("expression -- myD.isIntBool()", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["true"])
-
-                                // See comment above.
-                                //#% self.expect("expression -- D<int, int>().isIntBool()", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["false"])
-                                //#% self.expect("expression -- D<int, int, bool>().isIntBool()", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["true"])
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/class_static/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/class_static/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/class_static/TestStaticVariables.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/class_static/TestStaticVariables.py
deleted file mode 100644 (file)
index 7c019e0..0000000
+++ /dev/null
@@ -1,173 +0,0 @@
-"""
-Test display and Python APIs on file and class static variables.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class StaticVariableTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    def test_with_run_command(self):
-        """Test that file and class static variables display correctly."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Global variables are no longer displayed with the "frame variable"
-        # command.
-        self.expect(
-            'target variable A::g_points',
-            VARIABLES_DISPLAYED_CORRECTLY,
-            patterns=['\(PointType \[[1-9]*\]\) A::g_points = {'])
-        self.expect('target variable g_points', VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['(PointType [2]) g_points'])
-
-        # On Mac OS X, gcc 4.2 emits the wrong debug info for A::g_points.
-        # A::g_points is an array of two elements.
-        if self.platformIsDarwin() or self.getPlatform() == "linux":
-            self.expect(
-                "target variable A::g_points[1].x",
-                VARIABLES_DISPLAYED_CORRECTLY,
-                startstr="(int) A::g_points[1].x = 11")
-
-    @expectedFailureAll(
-        compiler=["gcc"],
-        bugnumber="Compiler emits incomplete debug info")
-    @expectedFailureAll(
-        compiler=["clang"],
-        compiler_version=["<", "3.9"],
-        bugnumber='llvm.org/pr20550')
-    def test_with_run_command_complete(self):
-        """
-        Test that file and class static variables display correctly with
-        complete debug information.
-        """
-        self.build()
-        target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
-        self.assertTrue(target, VALID_TARGET)
-
-        # Global variables are no longer displayed with the "frame variable"
-        # command.
-        self.expect(
-            'target variable A::g_points',
-            VARIABLES_DISPLAYED_CORRECTLY,
-            patterns=[
-                '\(PointType \[[1-9]*\]\) A::g_points = {', '(x = 1, y = 2)',
-                '(x = 11, y = 22)'
-            ])
-
-        # Ensure that we take the context into account and only print
-        # A::g_points.
-        self.expect(
-            'target variable A::g_points',
-            VARIABLES_DISPLAYED_CORRECTLY,
-            matching=False,
-            patterns=['(x = 3, y = 4)', '(x = 33, y = 44)'])
-
-        # Finally, ensure that we print both points when not specifying a
-        # context.
-        self.expect(
-            'target variable g_points',
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                '(PointType [2]) g_points', '(x = 1, y = 2)',
-                '(x = 11, y = 22)', '(x = 3, y = 4)', '(x = 33, y = 44)'
-            ])
-
-    @expectedFailureAll(
-        compiler=["gcc"],
-        bugnumber="Compiler emits incomplete debug info")
-    @expectedFailureAll(
-        compiler=["clang"],
-        compiler_version=["<", "3.9"],
-        bugnumber='llvm.org/pr20550')
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24764")
-    @add_test_categories(['pyapi'])
-    def test_with_python_api(self):
-        """Test Python APIs on file and class static variables."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        breakpoint = target.BreakpointCreateByLocation("main.cpp", self.line)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertIsNotNone(thread)
-
-        # Get the SBValue of 'A::g_points' and 'g_points'.
-        frame = thread.GetFrameAtIndex(0)
-
-        # arguments =>     False
-        # locals =>        False
-        # statics =>       True
-        # in_scope_only => False
-        valList = frame.GetVariables(False, False, True, False)
-
-        for val in valList:
-            self.DebugSBValue(val)
-            name = val.GetName()
-            self.assertTrue(name in ['g_points', 'A::g_points'])
-            if name == 'g_points':
-                self.assertTrue(
-                    val.GetValueType() == lldb.eValueTypeVariableStatic)
-                self.assertEqual(val.GetNumChildren(), 2)
-            elif name == 'A::g_points':
-                self.assertTrue(
-                    val.GetValueType() == lldb.eValueTypeVariableGlobal)
-                self.assertEqual(val.GetNumChildren(), 2)
-                child1 = val.GetChildAtIndex(1)
-                self.DebugSBValue(child1)
-                child1_x = child1.GetChildAtIndex(0)
-                self.DebugSBValue(child1_x)
-                self.assertTrue(child1_x.GetTypeName() == 'int' and
-                                child1_x.GetValue() == '11')
-
-        # SBFrame.FindValue() should also work.
-        val = frame.FindValue("A::g_points", lldb.eValueTypeVariableGlobal)
-        self.DebugSBValue(val)
-        self.assertTrue(val.GetName() == 'A::g_points')
-
-        # Also exercise the "parameter" and "local" scopes while we are at it.
-        val = frame.FindValue("argc", lldb.eValueTypeVariableArgument)
-        self.DebugSBValue(val)
-        self.assertTrue(val.GetName() == 'argc')
-
-        val = frame.FindValue("argv", lldb.eValueTypeVariableArgument)
-        self.DebugSBValue(val)
-        self.assertTrue(val.GetName() == 'argv')
-
-        val = frame.FindValue("hello_world", lldb.eValueTypeVariableLocal)
-        self.DebugSBValue(val)
-        self.assertTrue(val.GetName() == 'hello_world')
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/class_static/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/class_static/main.cpp
deleted file mode 100644 (file)
index 319a05a..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// I made this example after noting that I was unable to display an unsized
-// static class array. It turns out that gcc 4.2 will emit DWARF that correctly
-// describes the PointType, but it will incorrectly emit debug info for the
-// "g_points" array where the following things are wrong:
-//  - the DW_TAG_array_type won't have a subrange info
-//  - the DW_TAG_variable for "g_points" won't have a valid byte size, so even
-//    though we know the size of PointType, we can't infer the actual size
-//    of the array by dividing the size of the variable by the number of
-//    elements.
-
-#include <stdio.h>
-
-typedef struct PointType
-{
-    int x, y;
-} PointType;
-
-class A
-{
-public:
-    static PointType g_points[];
-};
-
-PointType A::g_points[] = 
-{
-    {    1,    2 },
-    {   11,   22 }
-};
-
-static PointType g_points[] = 
-{
-    {    3,    4 },
-    {   33,   44 }
-};
-
-int
-main (int argc, char const *argv[])
-{
-    const char *hello_world = "Hello, world!";
-    printf ("A::g_points[1].x = %i\n", A::g_points[1].x); // Set break point at this line.
-    printf ("::g_points[1].x = %i\n", g_points[1].x);
-    printf ("%s\n", hello_world);
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypes.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypes.py
deleted file mode 100644 (file)
index 45d6443..0000000
+++ /dev/null
@@ -1,224 +0,0 @@
-"""Test breakpoint on a class constructor; and variable list the this object."""
-
-
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ClassTypesTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break for main.cpp.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    def test_with_run_command(self):
-        """Test 'frame variable this' when stopped on a class constructor."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break on the ctor function of class C.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=-1)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The test suite sometimes shows that the process has exited without stopping.
-        #
-        # CC=clang ./dotest.py -v -t class_types
-        # ...
-        # Process 76604 exited with status = 0 (0x00000000)
-        self.runCmd("process status")
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        # We should be stopped on the ctor function of class C.
-        self.expect(
-            "frame variable --show-types this",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                'C *',
-                ' this = '])
-
-    @add_test_categories(['pyapi'])
-    def test_with_python_api(self):
-        """Use Python APIs to create a breakpoint by (filespec, line)."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        filespec = target.GetExecutable()
-        self.assertTrue(filespec, VALID_FILESPEC)
-
-        fsDir = os.path.normpath(filespec.GetDirectory())
-        fsFile = filespec.GetFilename()
-
-        self.assertTrue(fsDir == os.path.dirname(self.getBuildArtifact())
-                        and fsFile == "a.out",
-                        "FileSpec matches the executable")
-
-        bpfilespec = lldb.SBFileSpec("main.cpp", False)
-
-        breakpoint = target.BreakpointCreateByLocation(bpfilespec, self.line)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Verify the breakpoint just created.
-        self.expect(str(breakpoint), BREAKPOINT_CREATED, exe=False,
-                    substrs=['main.cpp',
-                             str(self.line)])
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        if not process:
-            self.fail("SBTarget.Launch() failed")
-
-        if process.GetState() != lldb.eStateStopped:
-            self.fail("Process should be in the 'stopped' state, "
-                      "instead the actual state is: '%s'" %
-                      lldbutil.state_type_to_str(process.GetState()))
-
-        # The stop reason of the thread should be breakpoint.
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertIsNotNone(thread)
-
-        # The filename of frame #0 should be 'main.cpp' and the line number
-        # should be 93.
-        self.expect("%s:%d" % (lldbutil.get_filenames(thread)[0],
-                               lldbutil.get_line_numbers(thread)[0]),
-                    "Break correctly at main.cpp:%d" % self.line, exe=False,
-                    startstr="main.cpp:")
-        # clang compiled code reported main.cpp:94?
-        # startstr = "main.cpp:93")
-
-        # We should be stopped on the breakpoint with a hit count of 1.
-        self.assertTrue(breakpoint.GetHitCount() == 1, BREAKPOINT_HIT_ONCE)
-
-        process.Continue()
-
-    def test_with_expr_parser(self):
-        """Test 'frame variable this' and 'expr this' when stopped inside a constructor."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # rdar://problem/8516141
-        # Is this a case of clang (116.1) generating bad debug info?
-        #
-        # Break on the ctor function of class C.
-        # self.expect("breakpoint set -M C", BREAKPOINT_CREATED,
-        #    startstr = "Breakpoint created: 1: name = 'C'")
-
-        # Make the test case more robust by using line number to break,
-        # instead.
-        lldbutil.run_break_set_by_file_and_line(
-            self, None, self.line, num_expected_locations=-1)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        # Continue on inside the ctor() body...
-        self.runCmd("register read pc")
-        self.runCmd("thread step-over")
-
-        # Verify that 'frame variable this' gets the data type correct.
-        self.expect("frame variable this", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['C *'])
-
-        # Verify that frame variable --show-types this->m_c_int behaves
-        # correctly.
-        self.runCmd("register read pc")
-        self.runCmd("expr m_c_int")
-        self.expect(
-            "frame variable --show-types this->m_c_int",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            startstr='(int) this->m_c_int = 66')
-
-        # Verify that 'expression this' gets the data type correct.
-        self.expect("expression this", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['C *'])
-
-        # rdar://problem/8430916
-        # expr this->m_c_int returns an incorrect value
-        #
-        # Verify that expr this->m_c_int behaves correctly.
-        self.expect("expression this->m_c_int", VARIABLES_DISPLAYED_CORRECTLY,
-                    patterns=['\(int\) \$[0-9]+ = 66'])
-
-    def test_with_constructor_name(self):
-        """Test 'frame variable this' and 'expr this' when stopped inside a constructor."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        filespec = target.GetExecutable()
-        self.assertTrue(filespec, VALID_FILESPEC)
-
-        fsDir = os.path.normpath(filespec.GetDirectory())
-        fsFile = filespec.GetFilename()
-
-        self.assertTrue(fsDir == os.path.dirname(self.getBuildArtifact())
-                        and fsFile == "a.out",
-                        "FileSpec matches the executable")
-
-        bpfilespec = lldb.SBFileSpec("main.cpp", False)
-
-        breakpoint = target.BreakpointCreateByLocation(bpfilespec, self.line)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Verify the breakpoint just created.
-        self.expect(str(breakpoint), BREAKPOINT_CREATED, exe=False,
-                    substrs=['main.cpp',
-                             str(self.line)])
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        if not process:
-            self.fail("SBTarget.Launch() failed")
-
-        if process.GetState() != lldb.eStateStopped:
-            self.fail("Process should be in the 'stopped' state, "
-                      "instead the actual state is: '%s'" %
-                      lldbutil.state_type_to_str(process.GetState()))
-
-        # The stop reason of the thread should be breakpoint.
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertIsNotNone(thread)
-
-        frame = thread.frames[0]
-        self.assertTrue(frame.IsValid(), "Got a valid frame.")
-
-        self.assertTrue("C::C" in frame.name,
-                        "Constructor name includes class name.")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypesDisassembly.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypesDisassembly.py
deleted file mode 100644 (file)
index ad187d0..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-"""
-Test the lldb disassemble command on each call frame when stopped on C's ctor.
-"""
-
-from __future__ import print_function
-
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class IterateFrameAndDisassembleTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_and_run_command(self):
-        """Disassemble each call frame when stopped on C's constructor."""
-        self.build()
-        self.breakOnCtor()
-
-        raw_output = self.res.GetOutput()
-        frameRE = re.compile(r"""
-                              ^\s\sframe        # heading for the frame info,
-                              .*                # wildcard, and
-                              0x[0-9a-f]{16}    # the frame pc, and
-                              \sa.out`(.+)      # module`function, and
-                              \s\+\s            # the rest ' + ....'
-                              """, re.VERBOSE)
-        for line in raw_output.split(os.linesep):
-            match = frameRE.search(line)
-            if match:
-                function = match.group(1)
-                #print("line:", line)
-                #print("function:", function)
-                self.runCmd("disassemble -n '%s'" % function)
-
-    @add_test_categories(['pyapi'])
-    def test_and_python_api(self):
-        """Disassemble each call frame when stopped on C's constructor."""
-        self.build()
-        self.breakOnCtor()
-
-        # Now use the Python API to get at each function on the call stack and
-        # disassemble it.
-        target = self.dbg.GetSelectedTarget()
-        process = target.GetProcess()
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertIsNotNone(thread)
-        depth = thread.GetNumFrames()
-        for i in range(depth - 1):
-            frame = thread.GetFrameAtIndex(i)
-            function = frame.GetFunction()
-            # Print the function header.
-            if self.TraceOn():
-                print()
-                print(function)
-            if function:
-                # Get all instructions for this function and print them out.
-                insts = function.GetInstructions(target)
-                for inst in insts:
-                    # We could simply do 'print inst' to print out the disassembly.
-                    # But we want to print to stdout only if self.TraceOn() is
-                    # True.
-                    disasm = str(inst)
-                    if self.TraceOn():
-                        print(disasm)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break for main.cpp.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    def breakOnCtor(self):
-        """Setup/run the program so it stops on C's constructor."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break on the ctor function of class C.
-        bpno = lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=-1)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint %d.' % (bpno)])
-
-        # This test was failing because we fail to put the C:: in front of constructore.
-        # We should maybe make another testcase to cover that specifically, but we shouldn't
-        # fail this whole testcase for an inessential issue.
-        # We should be stopped on the ctor function of class C.
-        # self.expect("thread backtrace", BACKTRACE_DISPLAYED_CORRECTLY,
-        #  substrs = ['C::C'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/cmds.txt b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/cmds.txt
deleted file mode 100644 (file)
index 1c7ef9f..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-b main.cpp:97
-c
-var
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/main.cpp
deleted file mode 100644 (file)
index 179f217..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-class Conversion
-{
-public:
-    Conversion (int i) :
-      m_i (i)
-      {}
-
-    operator bool()
-    {
-        return m_i != 0;
-    }
-    
-private:
-    int m_i;
-};
-
-class A
-{
-public:
-    A(int i=0):
-        m_a_int(i),
-        m_aa_int(i+1)
-    {
-    }
-
-    //virtual
-    ~A()
-    {
-    }
-
-    int
-    GetInteger() const
-    {
-        return m_a_int;
-    }
-    void
-    SetInteger(int i)
-    {
-        m_a_int = i;
-    }
-
-protected:
-    int m_a_int;
-    int m_aa_int;
-};
-
-class B : public A
-{
-public:
-    B(int ai, int bi) :
-        A(ai),
-        m_b_int(bi)
-    {
-    }
-
-    //virtual
-    ~B()
-    {
-    }
-
-    int
-    GetIntegerB() const
-    {
-        return m_b_int;
-    }
-    void
-    SetIntegerB(int i)
-    {
-        m_b_int = i;
-    }
-
-protected:
-    int m_b_int;
-};
-
-#include <cstdio>
-class C : public B
-{
-public:
-    C(int ai, int bi, int ci) :
-        B(ai, bi),
-        m_c_int(ci)
-    {
-      std::printf("Within C::ctor() m_c_int=%d\n", m_c_int); // Set break point at this line.
-    }
-
-    //virtual
-    ~C()
-    {
-    }
-
-    int
-    GetIntegerC() const
-    {
-        return m_c_int;
-    }
-    void
-    SetIntegerC(int i)
-    {
-        m_c_int = i;
-    }
-
-protected:
-    int m_c_int;
-};
-
-int
-main (int argc, char const *argv[])
-{
-    A a(12);
-    B b(22,33);
-    C c(44,55,66);
-    Conversion conv(1);
-    if (conv)
-        return b.GetIntegerB() - a.GetInteger() + c.GetInteger();
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py
deleted file mode 100644 (file)
index f08c0dc..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__, globals(), [])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp
deleted file mode 100644 (file)
index c244e1b..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <stdio.h>
-
-class foo {
-public:
-  template <class T> T func(T x) const {
-    return x+2; //% self.expect("expr 2+3", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["5"])
-  }
-};
-
-int i;
-
-int main() {
-  return foo().func(i);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/diamond/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/diamond/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/diamond/TestDiamond.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/diamond/TestDiamond.py
deleted file mode 100644 (file)
index c1d0d23..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-"""
-Tests that bool types work
-"""
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class CPPTestDiamondInheritance(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_with_run_command(self):
-        """Test that virtual base classes work in when SBValue objects are used to explore the variable value"""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-        self.set_breakpoint(line_number('main.cpp', '// breakpoint 1'))
-        self.set_breakpoint(line_number('main.cpp', '// breakpoint 2'))
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertIsNotNone(thread)
-        frame = thread.GetFrameAtIndex(0)
-        j1 = frame.FindVariable("j1")
-        j1_Derived1 = j1.GetChildAtIndex(0)
-        j1_Derived2 = j1.GetChildAtIndex(1)
-        j1_Derived1_VBase = j1_Derived1.GetChildAtIndex(0)
-        j1_Derived2_VBase = j1_Derived2.GetChildAtIndex(0)
-        j1_Derived1_VBase_m_value = j1_Derived1_VBase.GetChildAtIndex(0)
-        j1_Derived2_VBase_m_value = j1_Derived2_VBase.GetChildAtIndex(0)
-        self.assertTrue(
-            j1_Derived1_VBase.GetLoadAddress() == j1_Derived2_VBase.GetLoadAddress(),
-            "ensure virtual base class is the same between Derived1 and Derived2")
-        self.assertTrue(j1_Derived1_VBase_m_value.GetValueAsUnsigned(
-            1) == j1_Derived2_VBase_m_value.GetValueAsUnsigned(2), "ensure m_value in VBase is the same")
-        self.assertTrue(frame.FindVariable("d").GetChildAtIndex(0).GetChildAtIndex(
-            0).GetValueAsUnsigned(0) == 12345, "ensure Derived2 from j1 is correct")
-        thread.StepOver()
-        self.assertTrue(frame.FindVariable("d").GetChildAtIndex(0).GetChildAtIndex(
-            0).GetValueAsUnsigned(0) == 12346, "ensure Derived2 from j2 is correct")
-
-    def set_breakpoint(self, line):
-        # Some compilers (for example GCC 4.4.7 and 4.6.1) emit multiple locations for the statement with the ternary
-        # operator in the test program, while others emit only 1.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", line, num_expected_locations=-1, loc_exact=False)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/diamond/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/diamond/main.cpp
deleted file mode 100644 (file)
index 31329b2..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-static int g_next_value = 12345;
-
-class VBase
-{
-public:
-    VBase() : m_value(g_next_value++) {}
-    virtual ~VBase() {}
-    void Print() 
-    {
-        printf("%p: %s\n%p: m_value = 0x%8.8x\n", this, __PRETTY_FUNCTION__, &m_value, m_value);
-    }
-    int m_value;
-};
-
-class Derived1 : public virtual VBase
-{
-public:
-    Derived1() {};
-    void Print ()
-    {
-        printf("%p: %s\n", this, __PRETTY_FUNCTION__);
-        VBase::Print();
-    }
-
-};
-
-class Derived2 : public virtual VBase
-{
-public:
-    Derived2() {};
-    
-    void Print ()
-    {
-        printf("%p: %s\n", this, __PRETTY_FUNCTION__);
-        VBase::Print();
-    }
-};
-
-class Joiner1 : public Derived1, public Derived2
-{
-public:
-    Joiner1() : 
-        m_joiner1(3456), 
-        m_joiner2(6789) {}
-    void Print ()
-    {
-        printf("%p: %s \n%p: m_joiner1 = 0x%8.8x\n%p: m_joiner2 = 0x%8.8x\n",
-               this,
-               __PRETTY_FUNCTION__,
-               &m_joiner1,
-               m_joiner1,
-               &m_joiner2,
-               m_joiner2);
-        Derived1::Print();
-        Derived2::Print();
-    }
-    int m_joiner1;
-    int m_joiner2;
-};
-
-class Joiner2 : public Derived2
-{
-    int m_stuff[32];
-};
-
-int main(int argc, const char * argv[])
-{
-    Joiner1 j1;
-    Joiner2 j2;
-    j1.Print();
-    j2.Print();
-    Derived2 *d = &j1;
-    d = &j2;  // breakpoint 1
-    return 0; // breakpoint 2
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value-same-basename/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value-same-basename/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value-same-basename/TestDynamicValueSameBase.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value-same-basename/TestDynamicValueSameBase.py
deleted file mode 100644 (file)
index 546fd11..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-"""
-Make sure if we have two classes with the same base name the
-dynamic value calculator doesn't confuse them
-"""
-
-
-
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbtest import *
-
-
-class DynamicValueSameBaseTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # If your test case doesn't stress debug info, the
-    # set this to true.  That way it won't be run once for
-    # each debug info format.
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_same_basename_this(self):
-        """Test that the we use the full name to resolve dynamic types."""
-        self.build()
-        self.main_source_file = lldb.SBFileSpec("main.cpp")
-        self.sample_test()
-
-    def sample_test(self):
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                   "Break here to get started", self.main_source_file)
-
-        # Set breakpoints in the two class methods and run to them:
-        namesp_bkpt = target.BreakpointCreateBySourceRegex("namesp function did something.", self.main_source_file)
-        self.assertEqual(namesp_bkpt.GetNumLocations(), 1, "Namespace breakpoint invalid")
-
-        virtual_bkpt = target.BreakpointCreateBySourceRegex("Virtual function did something.", self.main_source_file)
-        self.assertEqual(virtual_bkpt.GetNumLocations(), 1, "Virtual breakpoint invalid")
-
-        threads = lldbutil.continue_to_breakpoint(process, namesp_bkpt)
-        self.assertEqual(len(threads), 1, "Didn't stop at namespace breakpoint")
-
-        frame = threads[0].frame[0]
-        namesp_this = frame.FindVariable("this", lldb.eDynamicCanRunTarget)
-        # Clang specifies the type of this as "T *", gcc as "T * const". This
-        # erases the difference.
-        namesp_type = namesp_this.GetType().GetUnqualifiedType()
-        self.assertEqual(namesp_type.GetName(), "namesp::Virtual *", "Didn't get the right dynamic type")
-
-        threads = lldbutil.continue_to_breakpoint(process, virtual_bkpt)
-        self.assertEqual(len(threads), 1, "Didn't stop at virtual breakpoint")
-
-        frame = threads[0].frame[0]
-        virtual_this = frame.FindVariable("this", lldb.eDynamicCanRunTarget)
-        virtual_type = virtual_this.GetType().GetUnqualifiedType()
-        self.assertEqual(virtual_type.GetName(), "Virtual *", "Didn't get the right dynamic type")
-
-
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value-same-basename/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value-same-basename/main.cpp
deleted file mode 100644 (file)
index 38e46c0..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#include <stdio.h>
-
-namespace namesp
-{
-  class Virtual {
-  public:
-    virtual void doSomething() {
-      printf ("namesp function did something.\n");
-    }
-  }; 
-}
-
-class Virtual {
-  public:
-  virtual void doSomething() {
-    printf("Virtual function did something.\n");
-  }
-};
-
-int
-main()
-{
-  namesp::Virtual my_outer;
-  Virtual my_virtual;
-
-  // Break here to get started
-  my_outer.doSomething();
-  my_virtual.doSomething();
-
-  return 0;
-}
-    
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/Makefile
deleted file mode 100644 (file)
index 2bba8e7..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := pass-to-base.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestCppValueCast.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestCppValueCast.py
deleted file mode 100644 (file)
index 609dd60..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-"""
-Test lldb Python API SBValue::Cast(SBType) for C++ types.
-"""
-
-from __future__ import print_function
-
-
-import unittest2
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class CppValueCastTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIf(bugnumber="llvm.org/PR36714")
-    @add_test_categories(['pyapi'])
-    def test_value_cast_with_virtual_inheritance(self):
-        """Test SBValue::Cast(SBType) API for C++ types with virtual inheritance."""
-        self.build(dictionary=self.d_virtual)
-        self.setTearDownCleanup(dictionary=self.d_virtual)
-        self.do_sbvalue_cast(self.exe_name)
-
-    @add_test_categories(['pyapi'])
-    def test_value_cast_with_regular_inheritance(self):
-        """Test SBValue::Cast(SBType) API for C++ types with regular inheritance."""
-        self.build(dictionary=self.d_regular)
-        self.setTearDownCleanup(dictionary=self.d_regular)
-        self.do_sbvalue_cast(self.exe_name)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-        # Find the line number to break for main.c.
-        self.source = 'sbvalue-cast.cpp'
-        self.line = line_number(self.source, '// Set breakpoint here.')
-        self.exe_name = self.testMethodName
-        self.d_virtual = {
-            'CXX_SOURCES': self.source,
-            'EXE': self.exe_name,
-            'CFLAGS_EXTRAS': '-DDO_VIRTUAL_INHERITANCE'}
-        self.d_regular = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}
-
-    def do_sbvalue_cast(self, exe_name):
-        """Test SBValue::Cast(SBType) API for C++ types."""
-        exe = self.getBuildArtifact(exe_name)
-
-        # Create a target from the debugger.
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Set up our breakpoints:
-
-        breakpoint = target.BreakpointCreateByLocation(self.source, self.line)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        PROCESS_STOPPED)
-
-        # Find DerivedA and DerivedB types.
-        typeA = target.FindFirstType('DerivedA')
-        typeB = target.FindFirstType('DerivedB')
-        self.DebugSBType(typeA)
-        self.DebugSBType(typeB)
-        self.assertTrue(typeA)
-        self.assertTrue(typeB)
-        error = lldb.SBError()
-
-        # First stop is for DerivedA instance.
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-            process, breakpoint)
-        self.assertTrue(len(threads) == 1)
-        thread = threads[0]
-        frame0 = thread.GetFrameAtIndex(0)
-
-        tellerA = frame0.FindVariable('teller', lldb.eNoDynamicValues)
-        self.DebugSBValue(tellerA)
-        self.assertTrue(tellerA.GetChildMemberWithName(
-            'm_base_val').GetValueAsUnsigned(error, 0) == 20)
-
-        if self.TraceOn():
-            for child in tellerA:
-                print("child name:", child.GetName())
-                print(child)
-
-        # Call SBValue.Cast() to obtain instanceA.
-        instanceA = tellerA.Cast(typeA.GetPointerType())
-        self.DebugSBValue(instanceA)
-
-        # Iterate through all the children and print their values.
-        if self.TraceOn():
-            for child in instanceA:
-                print("child name:", child.GetName())
-                print(child)
-        a_member_val = instanceA.GetChildMemberWithName('m_a_val')
-        self.DebugSBValue(a_member_val)
-        self.assertTrue(a_member_val.GetValueAsUnsigned(error, 0) == 10)
-
-        # Second stop is for DerivedB instance.
-        threads = lldbutil.continue_to_breakpoint(process, breakpoint)
-        self.assertTrue(len(threads) == 1)
-        thread = threads[0]
-        frame0 = thread.GetFrameAtIndex(0)
-
-        tellerB = frame0.FindVariable('teller', lldb.eNoDynamicValues)
-        self.DebugSBValue(tellerB)
-        self.assertTrue(tellerB.GetChildMemberWithName(
-            'm_base_val').GetValueAsUnsigned(error, 0) == 12)
-
-        if self.TraceOn():
-            for child in tellerB:
-                print("child name:", child.GetName())
-                print(child)
-
-        # Call SBValue.Cast() to obtain instanceB.
-        instanceB = tellerB.Cast(typeB.GetPointerType())
-        self.DebugSBValue(instanceB)
-
-        # Iterate through all the children and print their values.
-        if self.TraceOn():
-            for child in instanceB:
-                print("child name:", child.GetName())
-                print(child)
-        b_member_val = instanceB.GetChildMemberWithName('m_b_val')
-        self.DebugSBValue(b_member_val)
-        self.assertTrue(b_member_val.GetValueAsUnsigned(error, 0) == 36)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestDynamicValue.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestDynamicValue.py
deleted file mode 100644 (file)
index c3d7dfb..0000000
+++ /dev/null
@@ -1,249 +0,0 @@
-"""
-Use lldb Python API to test dynamic values in C++
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class DynamicValueTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-        # Find the line number to break for main.c.
-
-        self.do_something_line = line_number(
-            'pass-to-base.cpp', '// Break here in doSomething.')
-        self.main_first_call_line = line_number(
-            'pass-to-base.cpp',
-            '// Break here and get real addresses of myB and otherB.')
-        self.main_second_call_line = line_number(
-            'pass-to-base.cpp', '// Break here and get real address of reallyA.')
-
-    @add_test_categories(['pyapi'])
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24663")
-    def test_get_dynamic_vals(self):
-        """Test fetching C++ dynamic values from pointers & references."""
-        self.build(dictionary=self.getBuildFlags())
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target from the debugger.
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Set up our breakpoints:
-
-        do_something_bpt = target.BreakpointCreateByLocation(
-            'pass-to-base.cpp', self.do_something_line)
-        self.assertTrue(do_something_bpt,
-                        VALID_BREAKPOINT)
-
-        first_call_bpt = target.BreakpointCreateByLocation(
-            'pass-to-base.cpp', self.main_first_call_line)
-        self.assertTrue(first_call_bpt,
-                        VALID_BREAKPOINT)
-
-        second_call_bpt = target.BreakpointCreateByLocation(
-            'pass-to-base.cpp', self.main_second_call_line)
-        self.assertTrue(second_call_bpt,
-                        VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        PROCESS_STOPPED)
-
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-            process, first_call_bpt)
-        self.assertTrue(len(threads) == 1)
-        thread = threads[0]
-
-        frame = thread.GetFrameAtIndex(0)
-
-        # Now find the dynamic addresses of myB and otherB so we can compare them
-        # with the dynamic values we get in doSomething:
-
-        use_dynamic = lldb.eDynamicCanRunTarget
-        no_dynamic = lldb.eNoDynamicValues
-
-        myB = frame.FindVariable('myB', no_dynamic)
-        self.assertTrue(myB)
-        myB_loc = int(myB.GetLocation(), 16)
-
-        otherB = frame.FindVariable('otherB', no_dynamic)
-        self.assertTrue(otherB)
-        otherB_loc = int(otherB.GetLocation(), 16)
-
-        # Okay now run to doSomething:
-
-        threads = lldbutil.continue_to_breakpoint(process, do_something_bpt)
-        self.assertTrue(len(threads) == 1)
-        thread = threads[0]
-
-        frame = thread.GetFrameAtIndex(0)
-
-        # Get "this" using FindVariable:
-
-        this_static = frame.FindVariable('this', no_dynamic)
-        this_dynamic = frame.FindVariable('this', use_dynamic)
-        self.examine_value_object_of_this_ptr(
-            this_static, this_dynamic, myB_loc)
-
-        # Now make sure that the "GetDynamicValue" works:
-        # This doesn't work currently because we can't get dynamic values from
-        # ConstResult objects.
-        fetched_dynamic_value = this_static.GetDynamicValue(use_dynamic)
-        self.examine_value_object_of_this_ptr(
-            this_static, fetched_dynamic_value, myB_loc)
-
-        # And conversely that the GetDynamicValue() interface also works:
-        fetched_static_value = this_dynamic.GetStaticValue()
-        self.examine_value_object_of_this_ptr(
-            fetched_static_value, this_dynamic, myB_loc)
-
-        # Get "this" using FindValue, make sure that works too:
-        this_static = frame.FindValue(
-            'this', lldb.eValueTypeVariableArgument, no_dynamic)
-        this_dynamic = frame.FindValue(
-            'this', lldb.eValueTypeVariableArgument, use_dynamic)
-        self.examine_value_object_of_this_ptr(
-            this_static, this_dynamic, myB_loc)
-
-        # Get "this" using the EvaluateExpression:
-        this_static = frame.EvaluateExpression('this', False)
-        this_dynamic = frame.EvaluateExpression('this', True)
-        self.examine_value_object_of_this_ptr(
-            this_static, this_dynamic, myB_loc)
-
-        # The "frame var" code uses another path to get into children, so let's
-        # make sure that works as well:
-
-        self.expect(
-            'frame var -d run-target --ptr-depth=2 --show-types anotherA.m_client_A',
-            'frame var finds its way into a child member',
-            patterns=['\(B \*\)'])
-
-        # Now make sure we also get it right for a reference as well:
-
-        anotherA_static = frame.FindVariable('anotherA', False)
-        self.assertTrue(anotherA_static)
-        anotherA_static_addr = int(anotherA_static.GetValue(), 16)
-
-        anotherA_dynamic = frame.FindVariable('anotherA', True)
-        self.assertTrue(anotherA_dynamic)
-        anotherA_dynamic_addr = int(anotherA_dynamic.GetValue(), 16)
-        anotherA_dynamic_typename = anotherA_dynamic.GetTypeName()
-        self.assertTrue(anotherA_dynamic_typename.find('B') != -1)
-
-        self.assertTrue(anotherA_dynamic_addr < anotherA_static_addr)
-
-        anotherA_m_b_value_dynamic = anotherA_dynamic.GetChildMemberWithName(
-            'm_b_value', True)
-        self.assertTrue(anotherA_m_b_value_dynamic)
-        anotherA_m_b_val = int(anotherA_m_b_value_dynamic.GetValue(), 10)
-        self.assertTrue(anotherA_m_b_val == 300)
-
-        anotherA_m_b_value_static = anotherA_static.GetChildMemberWithName(
-            'm_b_value', True)
-        self.assertFalse(anotherA_m_b_value_static)
-
-        # Okay, now continue again, and when we hit the second breakpoint in
-        # main
-
-        threads = lldbutil.continue_to_breakpoint(process, second_call_bpt)
-        self.assertTrue(len(threads) == 1)
-        thread = threads[0]
-
-        frame = thread.GetFrameAtIndex(0)
-        reallyA_value = frame.FindVariable('reallyA', False)
-        self.assertTrue(reallyA_value)
-        reallyA_loc = int(reallyA_value.GetLocation(), 16)
-
-        # Finally continue to doSomething again, and make sure we get the right value for anotherA,
-        # which this time around is just an "A".
-
-        threads = lldbutil.continue_to_breakpoint(process, do_something_bpt)
-        self.assertTrue(len(threads) == 1)
-        thread = threads[0]
-
-        frame = thread.GetFrameAtIndex(0)
-        anotherA_value = frame.FindVariable('anotherA', True)
-        self.assertTrue(anotherA_value)
-        anotherA_loc = int(anotherA_value.GetValue(), 16)
-        self.assertTrue(anotherA_loc == reallyA_loc)
-        self.assertTrue(anotherA_value.GetTypeName().find('B') == -1)
-
-    def examine_value_object_of_this_ptr(
-            self, this_static, this_dynamic, dynamic_location):
-        # Get "this" as its static value
-        self.assertTrue(this_static)
-        this_static_loc = int(this_static.GetValue(), 16)
-
-        # Get "this" as its dynamic value
-
-        self.assertTrue(this_dynamic)
-        this_dynamic_typename = this_dynamic.GetTypeName()
-        self.assertTrue(this_dynamic_typename.find('B') != -1)
-        this_dynamic_loc = int(this_dynamic.GetValue(), 16)
-
-        # Make sure we got the right address for "this"
-
-        self.assertTrue(this_dynamic_loc == dynamic_location)
-
-        # And that the static address is greater than the dynamic one
-
-        self.assertTrue(this_static_loc > this_dynamic_loc)
-
-        # Now read m_b_value which is only in the dynamic value:
-
-        use_dynamic = lldb.eDynamicCanRunTarget
-        no_dynamic = lldb.eNoDynamicValues
-
-        this_dynamic_m_b_value = this_dynamic.GetChildMemberWithName(
-            'm_b_value', use_dynamic)
-        self.assertTrue(this_dynamic_m_b_value)
-
-        m_b_value = int(this_dynamic_m_b_value.GetValue(), 0)
-        self.assertTrue(m_b_value == 10)
-
-        # Make sure it is not in the static version
-
-        this_static_m_b_value = this_static.GetChildMemberWithName(
-            'm_b_value', no_dynamic)
-        self.assertFalse(this_static_m_b_value)
-
-        # Okay, now let's make sure that we can get the dynamic type of a child
-        # element:
-
-        contained_auto_ptr = this_dynamic.GetChildMemberWithName(
-            'm_client_A', use_dynamic)
-        self.assertTrue(contained_auto_ptr)
-        contained_b = contained_auto_ptr.GetChildMemberWithName(
-            '_M_ptr', use_dynamic)
-        if not contained_b:
-            contained_b = contained_auto_ptr.GetChildMemberWithName(
-                '__ptr_', use_dynamic)
-        self.assertTrue(contained_b)
-
-        contained_b_static = contained_auto_ptr.GetChildMemberWithName(
-            '_M_ptr', no_dynamic)
-        if not contained_b_static:
-            contained_b_static = contained_auto_ptr.GetChildMemberWithName(
-                '__ptr_', no_dynamic)
-        self.assertTrue(contained_b_static)
-
-        contained_b_addr = int(contained_b.GetValue(), 16)
-        contained_b_static_addr = int(contained_b_static.GetValue(), 16)
-
-        self.assertTrue(contained_b_addr < contained_b_static_addr)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/pass-to-base.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/pass-to-base.cpp
deleted file mode 100644 (file)
index 2bccf33..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-#include <stdio.h>
-#include <memory>
-
-class Extra
-{
-public:
-  Extra (int in_one, int in_two) : m_extra_one(in_one), m_extra_two(in_two) {}
-
-private:
-  int m_extra_one;
-  int m_extra_two;
-};
-
-class A
-{
-public:
-  A(int value) : m_a_value (value) {}
-  A(int value, A* client_A) : m_a_value (value), m_client_A (client_A) {}
-
-  virtual ~A() {}
-
-  virtual void
-  doSomething (A &anotherA)
-  {
-    printf ("In A %p doing something with %d.\n", this, m_a_value);
-    int tmp_value = anotherA.Value();
-    printf ("Also have another A at %p: %d.\n", &anotherA, tmp_value); // Break here in doSomething.
-  }
-
-  int 
-  Value()
-  {
-    return m_a_value;
-  }
-
-private:
-  int m_a_value;
-  std::auto_ptr<A> m_client_A;
-};
-
-class B : public Extra, public virtual A
-{
-public:
-  B (int b_value, int a_value) : Extra(b_value, a_value), A(a_value), m_b_value(b_value) {}
-  B (int b_value, int a_value, A *client_A) : Extra(b_value, a_value), A(a_value, client_A), m_b_value(b_value) {}
-
-  virtual ~B () {}
-
-private:
-  int m_b_value;
-};
-
-static A* my_global_A_ptr;
-
-int
-main (int argc, char **argv)
-{
-  my_global_A_ptr = new B (100, 200);
-  B myB (10, 20, my_global_A_ptr);
-  B *second_fake_A_ptr = new B (150, 250);
-  B otherB (300, 400, second_fake_A_ptr);
-
-  myB.doSomething(otherB); // Break here and get real addresses of myB and otherB.
-
-  A reallyA (500);
-  myB.doSomething (reallyA);  // Break here and get real address of reallyA.
-
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/sbvalue-cast.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/sbvalue-cast.cpp
deleted file mode 100644 (file)
index 9e03594..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-//===-- sbvalue-cast.cpp ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#ifdef DO_VIRTUAL_INHERITANCE
-#define VIRTUAL virtual
-#else
-#define VIRTUAL 
-#endif
-
-#include <stdio.h>
-
-class Base
-{
-public:
-    Base(int val) : m_base_val (val) {}
-    virtual ~Base() {}
-
-    virtual void
-    forcast(int input) {
-        int future_val = m_base_val + input * 1;
-        printf("Forcasting %d\n", future_val);
-    }
-
-protected:
-    int m_base_val;
-};
-
-class DerivedA : public VIRTUAL Base
-{
-public:
-    DerivedA(int val) : Base(val*2), m_a_val(val) {
-        printf("DerivedA::ctor()->\n");
-        printf("m_base_val=%d\n", m_base_val);
-        printf("m_a_val=%d\n", m_a_val);
-    }
-    virtual ~DerivedA() {}
-
-private:
-    int m_a_val;
-};
-
-class DerivedB : public VIRTUAL Base
-{
-public:
-    DerivedB(int val) : Base(val), m_b_val(val*3) {
-        printf("DerivedB::ctor()->\n");
-        printf("m_base_val=%d\n", m_base_val);
-        printf("m_b_val=%d\n", m_b_val);
-    }
-    virtual ~DerivedB() {}
-    
-    virtual void
-    forcast(int input) {
-        int future_val = m_b_val + input * 2;
-        printf("Forcasting %d\n", future_val);
-    }
-
-private:
-    int m_b_val;
-};
-
-int
-main(int argc, char **argv)
-{
-       DerivedA* dA = new DerivedA(10);
-       DerivedB* dB = new DerivedB(12);
-       Base *array[2] = {dA, dB};
-    Base *teller = NULL;
-    for (int i = 0; i < 2; ++i) {
-        teller = array[i];
-        teller->forcast(i); // Set breakpoint here.
-    }
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/Makefile
deleted file mode 100644 (file)
index a02c72a..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-CXX_SOURCES := main.cpp
-
-CXXFLAGS_EXTRAS := -std=c++11
-
-clean: OBJECTS+=$(wildcard main.d.*)
-
-
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/TestCPP11EnumTypes.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/TestCPP11EnumTypes.py
deleted file mode 100644 (file)
index c58f700..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-"""Look up enum type information and check for correct display."""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class CPP11EnumTypesTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr36527')
-    @skipIf(dwarf_version=['<', '4'])
-    def test_int8_t(self):
-        """Test C++11 enumeration class types as int8_t types."""
-        self.build(
-            dictionary={
-                'CFLAGS_EXTRAS': '"-DSIGNED_ENUM_CLASS_TYPE=int8_t"'})
-        self.image_lookup_for_enum_type(True)
-
-    @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr36527')
-    @skipIf(dwarf_version=['<', '4'])
-    def test_int16_t(self):
-        """Test C++11 enumeration class types as int16_t types."""
-        self.build(
-            dictionary={
-                'CFLAGS_EXTRAS': '"-DSIGNED_ENUM_CLASS_TYPE=int16_t"'})
-        self.image_lookup_for_enum_type(True)
-
-    @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr36527')
-    @skipIf(dwarf_version=['<', '4'])
-    def test_int32_t(self):
-        """Test C++11 enumeration class types as int32_t types."""
-        self.build(
-            dictionary={
-                'CFLAGS_EXTRAS': '"-DSIGNED_ENUM_CLASS_TYPE=int32_t"'})
-        self.image_lookup_for_enum_type(True)
-
-    @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr36527')
-    @skipIf(dwarf_version=['<', '4'])
-    def test_int64_t(self):
-        """Test C++11 enumeration class types as int64_t types."""
-        self.build(
-            dictionary={
-                'CFLAGS_EXTRAS': '"-DSIGNED_ENUM_CLASS_TYPE=int64_t"'})
-        self.image_lookup_for_enum_type(True)
-
-    @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr36527')
-    @skipIf(dwarf_version=['<', '4'])
-    def test_uint8_t(self):
-        """Test C++11 enumeration class types as uint8_t types."""
-        self.build(
-            dictionary={
-                'CFLAGS_EXTRAS': '"-DUNSIGNED_ENUM_CLASS_TYPE=uint8_t"'})
-        self.image_lookup_for_enum_type(False)
-
-    @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr36527')
-    @skipIf(dwarf_version=['<', '4'])
-    def test_uint16_t(self):
-        """Test C++11 enumeration class types as uint16_t types."""
-        self.build(
-            dictionary={
-                'CFLAGS_EXTRAS': '"-DUNSIGNED_ENUM_CLASS_TYPE=uint16_t"'})
-        self.image_lookup_for_enum_type(False)
-
-    @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr36527')
-    @skipIf(dwarf_version=['<', '4'])
-    def test_uint32_t(self):
-        """Test C++11 enumeration class types as uint32_t types."""
-        self.build(
-            dictionary={
-                'CFLAGS_EXTRAS': '"-DUNSIGNED_ENUM_CLASS_TYPE=uint32_t"'})
-        self.image_lookup_for_enum_type(False)
-
-    @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr36527')
-    @skipIf(dwarf_version=['<', '4'])
-    def test_uint64_t(self):
-        """Test C++11 enumeration class types as uint64_t types."""
-        self.build(
-            dictionary={
-                'CFLAGS_EXTRAS': '"-DUNSIGNED_ENUM_CLASS_TYPE=uint64_t"'})
-        self.image_lookup_for_enum_type(False)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    def image_lookup_for_enum_type(self, is_signed):
-        """Test C++11 enumeration class types."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break inside the main.
-        bkpt_id = lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        # Look up information about the 'DayType' enum type.
-        # Check for correct display.
-        self.expect("image lookup -t DayType", DATA_TYPES_DISPLAYED_CORRECTLY,
-                    patterns=['enum( struct| class) DayType {'],
-                    substrs=['Monday',
-                             'Tuesday',
-                             'Wednesday',
-                             'Thursday',
-                             'Friday',
-                             'Saturday',
-                             'Sunday',
-                             'kNumDays',
-                             '}'])
-
-        if is_signed:
-            enum_values = ['-4',
-                           'Monday',
-                           'Tuesday',
-                           'Wednesday',
-                           'Thursday',
-                           'Friday',
-                           'Saturday',
-                           'Sunday',
-                           'kNumDays',
-                           '5']
-        else:
-            enum_values = ['199',
-                           'Monday',
-                           'Tuesday',
-                           'Wednesday',
-                           'Thursday',
-                           'Friday',
-                           'Saturday',
-                           'Sunday',
-                           'kNumDays',
-                           '208']
-
-        bkpt = self.target().FindBreakpointByID(bkpt_id)
-        for enum_value in enum_values:
-            self.expect(
-                "frame variable day",
-                'check for valid enumeration value',
-                substrs=[enum_value])
-            lldbutil.continue_to_breakpoint(self.process(), bkpt)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/main.cpp
deleted file mode 100644 (file)
index e00fc2d..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-#include <stdint.h>
-
-
-int main (int argc, char const *argv[])
-{
-#ifdef SIGNED_ENUM_CLASS_TYPE
-    typedef SIGNED_ENUM_CLASS_TYPE enum_integer_t;
-    enum class DayType : enum_integer_t {
-        Monday = -3,
-        Tuesday,
-        Wednesday,
-        Thursday,
-        Friday,
-        Saturday,
-        Sunday,
-        kNumDays
-    };
-    enum_integer_t day_value;
-#else
-    typedef UNSIGNED_ENUM_CLASS_TYPE enum_integer_t;
-    enum class DayType : enum_integer_t {
-        Monday = 200,
-        Tuesday,
-        Wednesday,
-        Thursday,
-        Friday,
-        Saturday,
-        Sunday,
-        kNumDays
-    };
-    enum_integer_t day_value;
-#endif
-
-    for (day_value = (enum_integer_t)DayType::Monday - 1; day_value <= (enum_integer_t)DayType::kNumDays + 1; ++day_value)
-    {
-        DayType day = (DayType)day_value;
-        printf("day as int is %i\n", (int)day); // Set break point at this line.
-    }
-    return 0; // Break here for char tests
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/exceptions/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/exceptions/Makefile
deleted file mode 100644 (file)
index edb53da..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := exceptions.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py
deleted file mode 100644 (file)
index e888958..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-"""
-Test lldb exception breakpoint command for CPP.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class CPPBreakpointTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        self.source = 'exceptions.cpp'
-        self.catch_line = line_number(
-            self.source, '// This is the line you should stop at for catch')
-
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24538, clang-cl does not support throw or catch")
-    @expectedFailureNetBSD
-    def test(self):
-        """Test lldb exception breakpoint command for CPP."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target from the debugger.
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        exception_bkpt = target.BreakpointCreateForException(
-            lldb.eLanguageTypeC_plus_plus, True, True)
-        self.assertTrue(exception_bkpt, "Made an exception breakpoint")
-
-        # Now run, and make sure we hit our breakpoint:
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, "Got a valid process")
-
-        stopped_threads = []
-        stopped_threads = lldbutil.get_threads_stopped_at_breakpoint(
-            process, exception_bkpt)
-        self.assertTrue(
-            len(stopped_threads) == 1,
-            "Stopped at our exception breakpoint.")
-        thread = stopped_threads[0]
-        # Make sure our throw function is still above us on the stack:
-
-        frame_functions = lldbutil.get_function_names(thread)
-        self.assertTrue(
-            frame_functions.count("throws_exception_on_even(int)") == 1,
-            "Our throw function is still on the stack.")
-
-        # Okay we hit our exception throw breakpoint, now make sure we get our catch breakpoint.
-        # One potential complication is that we might hit a couple of the exception breakpoints in getting out of the throw.
-        # so loop till we don't see the throws function on the stack.  We should stop one more time for our exception breakpoint
-        # and that should be the catch...
-
-        while frame_functions.count("throws_exception_on_even(int)") == 1:
-            stopped_threads = lldbutil.continue_to_breakpoint(
-                process, exception_bkpt)
-            self.assertTrue(len(stopped_threads) == 1)
-
-            thread = stopped_threads[0]
-            frame_functions = lldbutil.get_function_names(thread)
-
-        self.assertTrue(
-            frame_functions.count("throws_exception_on_even(int)") == 0,
-            "At catch our throw function is off the stack")
-        self.assertTrue(
-            frame_functions.count("intervening_function(int)") == 0,
-            "At catch our intervening function is off the stack")
-        self.assertTrue(
-            frame_functions.count("catches_exception(int)") == 1,
-            "At catch our catch function is on the stack")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/exceptions/exceptions.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/exceptions/exceptions.cpp
deleted file mode 100644 (file)
index 150d420..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#include <exception>
-#include <stdio.h>
-
-int throws_exception_on_even (int value);
-int intervening_function (int value);
-int catches_exception (int value);
-
-int
-catches_exception (int value)
-{
-    try
-    {
-        return intervening_function(value); // This is the line you should stop at for catch
-    }
-    catch (int value)
-    {
-        return value;  
-    }
-}
-
-int 
-intervening_function (int value)
-{
-    return throws_exception_on_even (2 * value);
-}
-
-int
-throws_exception_on_even (int value)
-{
-    printf ("Mod two works: %d.\n", value%2);
-    if (value % 2 == 0)
-        throw 30;
-    else
-        return value;
-}
-
-int 
-main ()
-{
-    catches_exception (10); // Stop here
-    return 5;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/extern_c/TestExternCSymbols.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/extern_c/TestExternCSymbols.py
deleted file mode 100644 (file)
index b1b7e17..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__, globals(), lldbinline.expectedFailureAll(oslist=["windows"]))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/extern_c/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/extern_c/main.cpp
deleted file mode 100644 (file)
index 4776901..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <stdio.h>
-#include <stdint.h>
-
-extern "C"
-{
-   int foo();
-};
-
-int foo()
-{
-    puts("foo");
-    return 2;
-}
-
-int main (int argc, char const *argv[], char const *envp[])
-{          
-    foo();
-    return 0; //% self.expect("expression -- foo()", substrs = ['2'])
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py
deleted file mode 100644 (file)
index 6352b68..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-"""
-Tests that frame variable looks into anonymous unions
-"""
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class FrameVariableAnonymousUnionsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_with_run_command(self):
-        """Tests that frame variable looks into anonymous unions"""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        line = line_number('main.cpp', '// break here')
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", line, num_expected_locations=-1, loc_exact=False)
-
-        self.runCmd("process launch", RUN_SUCCEEDED)
-
-        process = self.dbg.GetSelectedTarget().GetProcess()
-
-        if process.GetByteOrder() == lldb.eByteOrderLittle:
-            self.expect('frame variable -f x i', substrs=['ffffff41'])
-        else:
-            self.expect('frame variable -f x i', substrs=['41ffff00'])
-
-        self.expect('frame variable c', substrs=["'A"])
-
-        self.expect('frame variable x', matching=False, substrs=['3'])
-        self.expect('frame variable y', matching=False, substrs=["'B'"])
-        self.expect('frame variable z', matching=False, substrs=['14'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/main.cpp
deleted file mode 100644 (file)
index 2489506..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-int main() {
-  union {
-    int i;
-    char c;
-  };
-  struct {
-    int x;
-    char y;
-    short z;
-  } s{3,'B',14};
-  i = 0xFFFFFF00;
-  c = 'A';
-  return c; // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/function-template-parameter-pack/TestFunctionTemplateParameterPack.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/function-template-parameter-pack/TestFunctionTemplateParameterPack.py
deleted file mode 100644 (file)
index b90f746..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-# https://bugs.llvm.org/show_bug.cgi?id=35920
-# This test stresses expression evaluation support for template functions.
-# Currently the support is rudimentary, and running this test causes assertion
-# failures in clang. This test cannot be XFAIL'ed because the test harness
-# treats assertion failures as unexpected events. For now, the test must be
-# skipped.
-lldbinline.MakeInlineTest(
-    __file__, globals(), [
-        decorators.skipIf])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/function-template-parameter-pack/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/function-template-parameter-pack/main.cpp
deleted file mode 100644 (file)
index eea2830..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-template <class T> int staticSizeof() {
-  return sizeof(T);
-}
-
-template <class T1, class T2, class... Ts> int staticSizeof() {
-  return staticSizeof<T2, Ts...>() + sizeof(T1);
-}
-
-int main (int argc, char const *argv[])
-{
-  int sz = staticSizeof<long, int, char>();
-  return staticSizeof<long, int, char>() != sz; //% self.expect("expression -- sz == staticSizeof<long, int, char>()", "staticSizeof<long, int, char> worked", substrs = ["true"])
-                                  //% self.expect("expression -- sz == staticSizeof<long, int>() + sizeof(char)", "staticSizeof<long, int> worked", substrs = ["true"])
-                                  //% self.expect("expression -- sz == staticSizeof<long>() + sizeof(int) + sizeof(char)", "staticSizeof<long> worked", substrs = ["true"])
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/function_refs/TestFunctionRefs.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/function_refs/TestFunctionRefs.py
deleted file mode 100644 (file)
index 293e913..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__, globals(),
-                          lldbinline.expectedFailureAll(oslist=["windows"]))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/function_refs/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/function_refs/main.cpp
deleted file mode 100644 (file)
index a57b086..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-// This is plagiarized from lit/SymbolFile/NativePDB/function-types-builtin.cpp.
-void nullary() {}
-
-template<typename Arg>
-void unary(Arg) { }
-
-template<typename A1, typename A2>
-void binary(A1, A2) { }
-
-int varargs(int, int, ...) { return 0; }
-
-auto &ref = unary<bool>;
-auto &ref2 = unary<volatile int*>;
-auto &ref3 = varargs;
-auto binp = &binary<int*, const int*>;
-auto &binr = binary<int*, const int*>;
-auto null = &nullary;
-int main(int argc, char **argv) {
-//% self.expect("target var ref", substrs=["(void (&)(bool))", "ref = 0x",
-//%             "&::ref = <no summary available>"])
-//% self.expect("target var ref2",
-//%              substrs=["(void (&)(volatile int *))", "ref2 = 0x"])
-//% self.expect("target var ref3",
-//%              substrs=["(int (&)(int, int, ...))", "ref3 = 0x"])
-//% self.expect("target var binp",
-//%              substrs=["(void (*)(int *, const int *))", "binp = 0x"])
-//% self.expect("target var binr",
-//%              substrs=["(void (&)(int *, const int *))", "binr = 0x"])
-//% self.expect("target var null",
-//%              substrs=["(void (*)())", "null = 0x"])
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/global_operators/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/global_operators/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/global_operators/TestCppGlobalOperators.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/global_operators/TestCppGlobalOperators.py
deleted file mode 100644 (file)
index 4ead709..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-"""
-Test that global operators are found and evaluated.
-"""
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestCppGlobalOperators(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def prepare_executable_and_get_frame(self):
-        self.build()
-
-        # Get main source file
-        src_file = "main.cpp"
-        src_file_spec = lldb.SBFileSpec(src_file)
-        self.assertTrue(src_file_spec.IsValid(), "Main source file")
-
-        # Get the path of the executable
-        exe_path = self.getBuildArtifact("a.out")
-
-        # Load the executable
-        target = self.dbg.CreateTarget(exe_path)
-        self.assertTrue(target.IsValid(), VALID_TARGET)
-
-        # Break on main function
-        main_breakpoint = target.BreakpointCreateBySourceRegex(
-            "// break here", src_file_spec)
-        self.assertTrue(
-            main_breakpoint.IsValid() and main_breakpoint.GetNumLocations() >= 1,
-            VALID_BREAKPOINT)
-
-        # Launch the process
-        args = None
-        env = None
-        process = target.LaunchSimple(
-            args, env, self.get_process_working_directory())
-        self.assertTrue(process.IsValid(), PROCESS_IS_VALID)
-
-        # Get the thread of the process
-        self.assertTrue(
-            process.GetState() == lldb.eStateStopped,
-            PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-
-        return thread.GetSelectedFrame()
-
-    def test_equals_operator(self):
-        frame = self.prepare_executable_and_get_frame()
-
-        test_result = frame.EvaluateExpression("operator==(s1, s2)")
-        self.assertTrue(
-            test_result.IsValid() and test_result.GetValue() == "false",
-            "operator==(s1, s2) = false")
-
-        test_result = frame.EvaluateExpression("operator==(s1, s3)")
-        self.assertTrue(
-            test_result.IsValid() and test_result.GetValue() == "true",
-            "operator==(s1, s3) = true")
-
-        test_result = frame.EvaluateExpression("operator==(s2, s3)")
-        self.assertTrue(
-            test_result.IsValid() and test_result.GetValue() == "false",
-            "operator==(s2, s3) = false")
-
-    def do_new_test(self, frame, expr, expected_value_name):
-        """Evaluate a new expression, and check its result"""
-
-        expected_value = frame.FindValue(
-            expected_value_name, lldb.eValueTypeVariableGlobal)
-        self.assertTrue(expected_value.IsValid())
-
-        expected_value_addr = expected_value.AddressOf()
-        self.assertTrue(expected_value_addr.IsValid())
-
-        got = frame.EvaluateExpression(expr)
-        self.assertTrue(got.IsValid())
-        self.assertEqual(
-            got.GetValueAsUnsigned(),
-            expected_value_addr.GetValueAsUnsigned())
-        got_type = got.GetType()
-        self.assertTrue(got_type.IsPointerType())
-        self.assertEqual(got_type.GetPointeeType().GetName(), "Struct")
-
-    def test_operator_new(self):
-        frame = self.prepare_executable_and_get_frame()
-
-        self.do_new_test(frame, "new Struct()", "global_new_buf")
-        self.do_new_test(frame, "new(new_tag) Struct()", "tagged_new_buf")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/global_operators/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/global_operators/main.cpp
deleted file mode 100644 (file)
index c6dafd2..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#include <new>
-
-struct new_tag_t
-{
-};
-new_tag_t new_tag;
-
-struct Struct {
-       int value;
-};
-
-bool operator==(const Struct &a, const Struct &b) {
-       return a.value == b.value;
-}
-
-typedef char buf_t[sizeof(Struct)];
-buf_t global_new_buf, tagged_new_buf;
-
-// This overrides global operator new
-// This function and the following does not actually allocate memory. We are merely
-// trying to make sure it is getting called.
-void *
-operator new(std::size_t count)
-{
-    return &global_new_buf;
-}
-
-// A custom allocator
-void *
-operator new(std::size_t count, const new_tag_t &)
-{
-    return &tagged_new_buf;
-}
-
-int main() {
-       Struct s1, s2, s3;
-       s1.value = 3;
-       s2.value = 5;
-       s3.value = 3;
-       return 0; // break here
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/global_variables/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/global_variables/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/global_variables/TestCPPGlobalVariables.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/global_variables/TestCPPGlobalVariables.py
deleted file mode 100644 (file)
index 4870247..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-"""Test that C++ global variables can be inspected by name and also their mangled name."""
-
-
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class GlobalVariablesCppTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        TestBase.setUp(self)
-        self.source = lldb.SBFileSpec('main.cpp')
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24764")
-    def test(self):
-        self.build()
-
-        (target, _, _, _) = lldbutil.run_to_source_breakpoint(self, "// Set break point at this line.", self.source)
-        
-        # Check that we can access g_file_global_int by its name
-        self.expect("target variable g_file_global_int", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['42'])
-        self.expect("target variable abc::g_file_global_int", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['42'])
-        self.expect("target variable xyz::g_file_global_int", VARIABLES_DISPLAYED_CORRECTLY,
-                    error=True, substrs=['can\'t find global variable'])
-
-        # Check that we can access g_file_global_int by its mangled name
-        addr = target.EvaluateExpression("&abc::g_file_global_int").GetValueAsUnsigned()
-        self.assertTrue(addr != 0)
-        mangled = lldb.SBAddress(addr, target).GetSymbol().GetMangledName()
-        self.assertTrue(mangled != None)
-        gv = target.FindFirstGlobalVariable(mangled)
-        self.assertTrue(gv.IsValid())
-        self.assertEqual(gv.GetName(), "abc::g_file_global_int")
-        self.assertEqual(gv.GetValueAsUnsigned(), 42)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/global_variables/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/global_variables/main.cpp
deleted file mode 100644 (file)
index 0a16418..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-namespace abc {
-       int g_file_global_int = 42;
-}
-
-int main (int argc, char const *argv[])
-{
-    return abc::g_file_global_int; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/TestGModules.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/TestGModules.py
deleted file mode 100644 (file)
index 69d0463..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-import lldbsuite.test.lldbinline as lldbinline
-from lldbsuite.test.decorators import *
-
-lldbinline.MakeInlineTest(__file__, globals(), [
-    expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr36107",
-        debug_info="gmodules")])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/a.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/a.h
deleted file mode 100644 (file)
index 7384f23..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#include "memory.h"
-
-class MemoryBuffer { int buffer = 42; };
-
-struct SrcBuffer {
-  my_std::unique_ptr<MemoryBuffer> Buffer;
-};
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/b.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/b.h
deleted file mode 100644 (file)
index b777e8e..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#include "a.h"
-#include "memory.h"
-
-class Module {
-  my_std::unique_ptr<MemoryBuffer> MBptr;
-};
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/main.cpp
deleted file mode 100644 (file)
index df75261..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#include "b.h"
-
-int main(int argc, const char * argv[])
-{
-    Module m;
-    // Test that the type Module which contains a field that is a
-    // template instantiation can be fully resolved.
-    return 0; //% self.assertTrue(self.frame().FindVariable('m').GetChildAtIndex(0).GetChildAtIndex(0).GetChildAtIndex(0).GetName() == 'buffer', 'find template specializations in imported modules')
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/memory.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/memory.h
deleted file mode 100644 (file)
index 1d59dc0..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef MEMORY_H
-#define MEMORY_H
-namespace my_std {
-  template<class T> class unique_ptr {
-    T t;
-  };
-}
-#endif
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/module.modulemap b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/module.modulemap
deleted file mode 100644 (file)
index 2f05073..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-module A {
-  header "a.h"
-}
-
-module B {
-  header "b.h"
-}
-
-module std {
-  header "memory.h"
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/Makefile
deleted file mode 100644 (file)
index a98dca6..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-PCH_CXX_SOURCE = pch.h
-CXX_SOURCES = main.cpp
-CFLAGS_EXTRAS := $(MODULE_DEBUG_INFO_FLAGS)
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py
deleted file mode 100644 (file)
index 20207c5..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-import lldb
-import os
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestWithGmodulesDebugInfo(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIf(bugnumber="llvm.org/pr36146", oslist=["linux"], archs=["i386"])
-    @add_test_categories(["gmodules"])
-    def test_specialized_typedef_from_pch(self):
-        self.build()
-
-        src_file = os.path.join(self.getSourceDir(), "main.cpp")
-        src_file_spec = lldb.SBFileSpec(src_file)
-        self.assertTrue(src_file_spec.IsValid(), "breakpoint file")
-
-        # Get the path of the executable
-        exe_path = self.getBuildArtifact("a.out")
-
-        # Load the executable
-        target = self.dbg.CreateTarget(exe_path)
-        self.assertTrue(target.IsValid(), VALID_TARGET)
-
-        # Break on interesting line
-        breakpoint = target.BreakpointCreateBySourceRegex(
-            "break here", src_file_spec)
-        self.assertTrue(
-            breakpoint.IsValid() and breakpoint.GetNumLocations() >= 1,
-            VALID_BREAKPOINT)
-
-        # Launch the process
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process.IsValid(), PROCESS_IS_VALID)
-
-        # Get the thread of the process
-        self.assertTrue(process.GetState() == lldb.eStateStopped)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint condition")
-
-        # Get frame for current thread
-        frame = thread.frames[0]
-
-        testValue = frame.EvaluateExpression("test")
-        self.assertTrue(
-            testValue.GetError().Success(),
-            "Test expression value invalid: %s" %
-            (testValue.GetError().GetCString()))
-        self.assertTrue(
-            testValue.GetTypeName() == "IntContainer",
-            "Test expression type incorrect")
-
-        memberValue = testValue.GetChildMemberWithName("storage")
-        self.assertTrue(
-            memberValue.GetError().Success(),
-            "Member value missing or invalid: %s" %
-            (testValue.GetError().GetCString()))
-        self.assertTrue(
-            memberValue.GetTypeName() == "int",
-            "Member type incorrect")
-        self.assertEqual(
-            42,
-            memberValue.GetValueAsSigned(),
-            "Member value incorrect")
-
-        testValue = frame.EvaluateExpression("bar")
-        self.assertTrue(
-            testValue.GetError().Success(),
-            "Test expression value invalid: %s" %
-            (testValue.GetError().GetCString()))
-        self.assertTrue(
-            testValue.GetTypeName() == "Foo::Bar",
-            "Test expression type incorrect")
-
-        memberValue = testValue.GetChildMemberWithName("i")
-        self.assertTrue(
-            memberValue.GetError().Success(),
-            "Member value missing or invalid: %s" %
-            (testValue.GetError().GetCString()))
-        self.assertTrue(
-            memberValue.GetTypeName() == "int",
-            "Member type incorrect")
-        self.assertEqual(
-            123,
-            memberValue.GetValueAsSigned(),
-            "Member value incorrect")
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/main.cpp
deleted file mode 100644 (file)
index 588a3a8..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-class Foo::Bar { int i = 123; };
-
-int main(int argc, const char * argv[])
-{
-    IntContainer test(42);
-    Foo::Bar bar;
-    return 0; // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/pch.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/pch.h
deleted file mode 100644 (file)
index dba4fee..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-template<typename T>
-class GenericContainer {
-  private:
-    T storage;
-
-  public:
-    GenericContainer(T value) {
-      storage = value;
-    };
-};
-
-typedef GenericContainer<int> IntContainer;
-
-struct Foo {
-  class Bar;
-  Bar *bar;
-};
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/Makefile
deleted file mode 100644 (file)
index 769920c..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-CXX_SOURCES = main.cpp length.cpp a.cpp
-
-CFLAGS_LIMIT = -c $(CXXFLAGS)
-CFLAGS_NO_LIMIT = -c $(CXXFLAGS)
-
-ifneq (,$(findstring clang,$(CC)))
-  CFLAGS_LIMIT += -flimit-debug-info
-  CFLAGS_NO_LIMIT += -fno-limit-debug-info
-endif
-
-all: limit nolimit
-
-limit: main.o length_limit.o a.o
-       $(CXX) main.o length_limit.o a.o -o limit $(LDFLAGS)
-
-nolimit: main.o length_nolimit.o a.o
-       $(CXX) main.o length_nolimit.o a.o -o nolimit $(LDFLAGS)
-
-main.o: main.cpp
-       $(CXX) $(CFLAGS_LIMIT) $(SRCDIR)/main.cpp -o main.o
-
-length_limit.o: length.cpp
-       $(CXX) $(CFLAGS_LIMIT) $(SRCDIR)/length.cpp -o length_limit.o
-
-length_nolimit.o: length.cpp
-       $(CXX) $(CFLAGS_NO_LIMIT) $(SRCDIR)/length.cpp -o length_nolimit.o
-
-a.o: a.cpp
-       $(CXX) $(CFLAGS_NO_DEBUG) -c $(SRCDIR)/a.cpp -o a.o
-
-clean: OBJECTS += limit nolimit length_limit.o length_nolimit.o length_limit.dwo length_nolimit.dwo
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py
deleted file mode 100644 (file)
index 7ce2e34..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestCppIncompleteTypes(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIf(compiler="gcc")
-    def test_limit_debug_info(self):
-        self.build()
-        frame = self.get_test_frame('limit')
-
-        value_f = frame.EvaluateExpression("f")
-        self.assertTrue(
-            value_f.IsValid(),
-            "'expr f' results in a valid SBValue object")
-        self.assertTrue(value_f.GetError().Success(), "'expr f' is successful")
-
-        value_a = frame.EvaluateExpression("a")
-        self.assertTrue(
-            value_a.IsValid(),
-            "'expr a' results in a valid SBValue object")
-        self.assertTrue(value_a.GetError().Success(), "'expr a' is successful")
-
-    @skipIf(compiler="gcc")
-    # Clang on Windows asserts in external record layout in this case.
-    @skipIfWindows
-    def test_partial_limit_debug_info(self):
-        self.build()
-        frame = self.get_test_frame('nolimit')
-
-        value_f = frame.EvaluateExpression("f")
-        self.assertTrue(
-            value_f.IsValid(),
-            "'expr f' results in a valid SBValue object")
-        self.assertTrue(value_f.GetError().Success(), "'expr f' is successful")
-
-        value_a = frame.EvaluateExpression("a")
-        self.assertTrue(
-            value_a.IsValid(),
-            "'expr a' results in a valid SBValue object")
-        self.assertTrue(value_a.GetError().Success(), "'expr a' is successful")
-
-    def get_test_frame(self, exe):
-        # Get main source file
-        src_file = "main.cpp"
-        src_file_spec = lldb.SBFileSpec(src_file)
-
-        (target, process, thread, main_breakpoint) = lldbutil.run_to_source_breakpoint(self,
-                "break here", src_file_spec, exe_name = exe)
-        # Get frame for current thread
-        return thread.GetSelectedFrame()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/a.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/a.cpp
deleted file mode 100644 (file)
index 36b374b..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-
-#include "a.h"
-
-A::A () { }
-
-int
-A::length ()
-{
-  return 123;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/a.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/a.h
deleted file mode 100644 (file)
index 13e9496..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef __A_H__
-#define __A_H__
-
-class A
-{
-public:
-  A();
-  virtual int length();
-};
-
-#endif
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/length.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/length.cpp
deleted file mode 100644 (file)
index 90a3b64..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-
-#include "length.h"
-
-int
-length (A &a)
-{
-  return a.length();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/length.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/length.h
deleted file mode 100644 (file)
index 96df4f0..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef __LENGTH_H__
-#define __LENGTH_H__
-
-#include "a.h"
-
-int length (A &a);
-
-#endif
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/main.cpp
deleted file mode 100644 (file)
index ad324c9..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-
-#include "length.h"
-
-class Foo {
-public:
-    A a;
-};
-
-class MyA : public A {
-};
-
-int main()
-{
-    Foo f;
-    MyA a;
-
-    return length(a); // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/inlines/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/inlines/Makefile
deleted file mode 100644 (file)
index 055e318..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := inlines.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/inlines/TestInlines.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/inlines/TestInlines.py
deleted file mode 100644 (file)
index 5f77d8f..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-"""Test variable lookup when stopped in inline functions."""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class InlinesTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line = line_number(
-            'inlines.cpp',
-            '// Set break point at this line.')
-
-    @expectedFailureAll("llvm.org/pr26710", oslist=["linux"], compiler="gcc")
-    def test(self):
-        """Test that local variables are visible in expressions."""
-        self.build()
-        self.runToBreakpoint()
-
-        # Check that 'frame variable' finds a variable
-        self.expect(
-            "frame variable inner_input",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            startstr='(int) inner_input =')
-
-        # Check that 'expr' finds a variable
-        self.expect("expr inner_input", VARIABLES_DISPLAYED_CORRECTLY,
-                    startstr='(int) $0 =')
-
-    def runToBreakpoint(self):
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break inside the main.
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            "inlines.cpp",
-            self.line,
-            num_expected_locations=2,
-            loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/inlines/inlines.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/inlines/inlines.cpp
deleted file mode 100644 (file)
index 822d88e..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-#include <stdio.h>
-#include "inlines.h"
-
-#define INLINE_ME __inline__ __attribute__((always_inline))
-
-int
-not_inlined_2 (int input)
-{
-  printf ("Called in not_inlined_2 with : %d.\n", input);
-  return input;
-}
-
-int 
-not_inlined_1 (int input)
-{
-  printf ("Called in not_inlined_1 with %d.\n", input);
-  return not_inlined_2(input);
-}
-  
-INLINE_ME int
-inner_inline (int inner_input, int mod_value)
-{
-  int inner_result;
-  inner_result = inner_input % mod_value;
-  printf ("Returning: %d.\n", inner_result);
-  return not_inlined_1 (inner_result); // Set break point at this line.
-}
-
-INLINE_ME int
-outer_inline (int outer_input)
-{
-  int outer_result;
-
-  outer_result = inner_inline (outer_input, outer_input % 3);
-  return outer_result;
-}
-
-int
-main (int argc, char **argv)
-{
-  printf ("Starting...\n");
-
-  int (*func_ptr) (int);
-  func_ptr = outer_inline;
-
-  outer_inline (argc);
-
-  func_ptr (argc);
-
-  return 0;
-}
-
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/inlines/inlines.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/inlines/inlines.h
deleted file mode 100644 (file)
index 265d7b4..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-int inner_inline (int inner_input, int mod_value);
-int outer_inline (int outer_input);
-int not_inlined_2 (int input);
-int not_inlined_1 (int input);
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/lambdas/TestLambdas.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/lambdas/TestLambdas.py
deleted file mode 100644 (file)
index c8308c1..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__, globals())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/lambdas/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/lambdas/main.cpp
deleted file mode 100644 (file)
index 5870c87..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <stdio.h>
-
-int main (int argc, char const *argv[])
-{
-    printf("Stop here\n"); //% self.runCmd("expression auto $add = [](int first, int second) { return first + second; }")
-                           //% self.expect("expression $add(2,3)", substrs = ['= 5'])
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/Makefile
deleted file mode 100644 (file)
index ba7e015..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-CXX_SOURCES = main.cpp derived.cpp base.cpp
-
-CFLAGS_EXTRAS := $(LIMIT_DEBUG_INFO_FLAGS)
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/TestWithLimitDebugInfo.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/TestWithLimitDebugInfo.py
deleted file mode 100644 (file)
index ae50d3d..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestWithLimitDebugInfo(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIf(debug_info=no_match(["dwarf"]))
-    def test_limit_debug_info(self):
-        self.build()
-
-        src_file = os.path.join(self.getSourceDir(), "main.cpp")
-        src_file_spec = lldb.SBFileSpec(src_file)
-        self.assertTrue(src_file_spec.IsValid(), "breakpoint file")
-
-        # Get the path of the executable
-        exe_path = self.getBuildArtifact("a.out")
-
-        # Load the executable
-        target = self.dbg.CreateTarget(exe_path)
-        self.assertTrue(target.IsValid(), VALID_TARGET)
-
-        # Break on main function
-        breakpoint = target.BreakpointCreateBySourceRegex(
-            "break here", src_file_spec)
-        self.assertTrue(
-            breakpoint.IsValid() and breakpoint.GetNumLocations() >= 1,
-            VALID_BREAKPOINT)
-
-        # Launch the process
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process.IsValid(), PROCESS_IS_VALID)
-
-        # Get the thread of the process
-        self.assertTrue(
-            process.GetState() == lldb.eStateStopped,
-            PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        thread.StepInto()
-
-        # Get frame for current thread
-        frame = thread.GetSelectedFrame()
-
-        v1 = frame.EvaluateExpression("1")
-        self.assertTrue(
-            v1.IsValid(),
-            "'expr 1' results in a valid SBValue object")
-        self.assertTrue(
-            v1.GetError().Success(),
-            "'expr 1' succeeds without an error.")
-
-        v2 = frame.EvaluateExpression("this")
-        self.assertTrue(
-            v2.IsValid(),
-            "'expr this' results in a valid SBValue object")
-        self.assertTrue(
-            v2.GetError().Success(),
-            "'expr this' succeeds without an error.")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/base.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/base.cpp
deleted file mode 100644 (file)
index 4023bdb..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#include "base.h"
-
-void FooNS::bar() {
-    x = 54321;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/base.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/base.h
deleted file mode 100644 (file)
index d3a0957..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-class FooNS
-{
-public:
-    virtual void bar();
-    virtual char baz() = 0;
-
-protected:
-    int x;
-};
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/derived.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/derived.cpp
deleted file mode 100644 (file)
index 9d77359..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#include "derived.h"
-
-char Foo::baz() {
-    return (char)(x&0xff);
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/derived.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/derived.h
deleted file mode 100644 (file)
index 46b3f83..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "base.h"
-
-class Foo : public FooNS
-{
-public:
-    Foo() {
-        a = 12345;
-    }
-
-    char baz() override;
-    int a;
-};
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/main.cpp
deleted file mode 100644 (file)
index 64e0349..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#include "derived.h"
-
-int main() {
-    Foo f; // break here
-    f.bar();
-    return f.baz();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/llvm-style/TestLLVMStyle.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/llvm-style/TestLLVMStyle.py
deleted file mode 100644 (file)
index c8308c1..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__, globals())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/llvm-style/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/llvm-style/main.cpp
deleted file mode 100644 (file)
index 048eeb2..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace n {
-    struct D {
-        int i;
-        static int anInt() { return 2; }
-        int dump() { return i; }
-    };
-
-    class C {
-    public:
-        int foo(D *D);
-    };
-}
-
-using namespace n;
-
-int C::foo(D* D) {
-    return D->dump(); //% self.expect("expression -- D->dump()", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["int", "2"])
-                      //% self.expect("expression -- D::anInt()", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["int", "2"])
-
-}
-
-int main (int argc, char const *argv[])
-{
-    D myD { D::anInt() };
-    C().foo(&myD);
-    return 0; 
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/Makefile
deleted file mode 100644 (file)
index 82f96b6..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES = main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/TestMembersAndLocalsWithSameName.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/TestMembersAndLocalsWithSameName.py
deleted file mode 100644 (file)
index a0dcbf0..0000000
+++ /dev/null
@@ -1,285 +0,0 @@
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class TestMembersAndLocalsWithSameName(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_when_stopped_in_method(self):
-        self._load_exe()
-
-        # Set breakpoints
-        bp1 = self.target.BreakpointCreateBySourceRegex(
-            "Break 1", self.src_file_spec)
-        self.assertTrue(
-            bp1.IsValid() and bp1.GetNumLocations() >= 1,
-            VALID_BREAKPOINT)
-        bp2 = self.target.BreakpointCreateBySourceRegex(
-            "Break 2", self.src_file_spec)
-        self.assertTrue(
-            bp2.IsValid() and bp2.GetNumLocations() >= 1,
-            VALID_BREAKPOINT)
-        bp3 = self.target.BreakpointCreateBySourceRegex(
-            "Break 3", self.src_file_spec)
-        self.assertTrue(
-            bp3.IsValid() and bp3.GetNumLocations() >= 1,
-            VALID_BREAKPOINT)
-        bp4 = self.target.BreakpointCreateBySourceRegex(
-            "Break 4", self.src_file_spec)
-        self.assertTrue(
-            bp4.IsValid() and bp4.GetNumLocations() >= 1,
-            VALID_BREAKPOINT)
-
-        # Launch the process
-        self.process = self.target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID)
-
-        self.assertTrue(
-            self.process.GetState() == lldb.eStateStopped,
-            PROCESS_STOPPED)
-
-        self._test_globals()
-
-        self.process.Continue()
-        self.assertTrue(
-            self.process.GetState() == lldb.eStateStopped,
-            PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(
-            self.process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(thread.IsValid())
-        frame = thread.GetSelectedFrame()
-        self.assertTrue(frame.IsValid())
-
-        val = frame.EvaluateExpression("a")
-        self.assertTrue(val.IsValid())
-        self.assertEqual(val.GetValueAsUnsigned(), 12345)
-
-        val = frame.EvaluateExpression("b")
-        self.assertTrue(val.IsValid())
-        self.assertEqual(val.GetValueAsUnsigned(), 54321)
-
-        val = frame.EvaluateExpression("c")
-        self.assertTrue(val.IsValid())
-        self.assertEqual(val.GetValueAsUnsigned(), 34567)
-
-        self.process.Continue()
-        self.assertTrue(
-            self.process.GetState() == lldb.eStateStopped,
-            PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(
-            self.process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(thread.IsValid())
-        frame = thread.GetSelectedFrame()
-        self.assertTrue(frame.IsValid())
-
-        val = frame.EvaluateExpression("a")
-        self.assertTrue(val.IsValid())
-        self.assertEqual(val.GetValueAsUnsigned(), 10001)
-
-        val = frame.EvaluateExpression("b")
-        self.assertTrue(val.IsValid())
-        self.assertEqual(val.GetValueAsUnsigned(), 10002)
-
-        val = frame.EvaluateExpression("c")
-        self.assertTrue(val.IsValid())
-        self.assertEqual(val.GetValueAsUnsigned(), 10003)
-
-        self.process.Continue()
-        self.assertTrue(
-            self.process.GetState() == lldb.eStateStopped,
-            PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(
-            self.process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(thread.IsValid())
-        frame = thread.GetSelectedFrame()
-        self.assertTrue(frame.IsValid())
-
-        val = frame.EvaluateExpression("a")
-        self.assertTrue(val.IsValid())
-        self.assertEqual(val.GetValueAsUnsigned(), 1)
-
-        val = frame.EvaluateExpression("b")
-        self.assertTrue(val.IsValid())
-        self.assertEqual(val.GetValueAsUnsigned(), 2)
-
-        val = frame.EvaluateExpression("c")
-        self.assertTrue(val.IsValid())
-        self.assertEqual(val.GetValueAsUnsigned(), 778899)
-
-    def test_when_stopped_in_function(self):
-        self._load_exe()
-
-        # Set breakpoints
-        bp1 = self.target.BreakpointCreateBySourceRegex(
-            "Break 1", self.src_file_spec)
-        self.assertTrue(
-            bp1.IsValid() and bp1.GetNumLocations() >= 1,
-            VALID_BREAKPOINT)
-        bp5 = self.target.BreakpointCreateBySourceRegex(
-            "Break 5", self.src_file_spec)
-        self.assertTrue(
-            bp5.IsValid() and bp5.GetNumLocations() >= 1,
-            VALID_BREAKPOINT)
-        bp6 = self.target.BreakpointCreateBySourceRegex(
-            "Break 6", self.src_file_spec)
-        self.assertTrue(
-            bp6.IsValid() and bp6.GetNumLocations() >= 1,
-            VALID_BREAKPOINT)
-        bp7 = self.target.BreakpointCreateBySourceRegex(
-            "Break 7", self.src_file_spec)
-        self.assertTrue(
-            bp7.IsValid() and bp7.GetNumLocations() >= 1,
-            VALID_BREAKPOINT)
-
-        # Launch the process
-        self.process = self.target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID)
-
-        self.assertTrue(
-            self.process.GetState() == lldb.eStateStopped,
-            PROCESS_STOPPED)
-
-        self._test_globals()
-
-        self.process.Continue()
-        self.assertTrue(
-            self.process.GetState() == lldb.eStateStopped,
-            PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(
-            self.process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(thread.IsValid())
-        frame = thread.GetSelectedFrame()
-        self.assertTrue(frame.IsValid())
-
-        self.enable_expression_log()
-        val = frame.EvaluateExpression("a")
-        self.disable_expression_log_and_check_for_locals(['a'])
-        self.assertTrue(val.IsValid())
-        self.assertEqual(val.GetValueAsUnsigned(), 12345)
-
-        val = frame.EvaluateExpression("b")
-        self.assertTrue(val.IsValid())
-        self.assertEqual(val.GetValueAsUnsigned(), 54321)
-
-        val = frame.EvaluateExpression("c")
-        self.assertTrue(val.IsValid())
-        self.assertEqual(val.GetValueAsUnsigned(), 34567)
-
-        self.process.Continue()
-        self.assertTrue(
-            self.process.GetState() == lldb.eStateStopped,
-            PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(
-            self.process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(thread.IsValid())
-        frame = thread.GetSelectedFrame()
-        self.assertTrue(frame.IsValid())
-
-        val = frame.EvaluateExpression("a")
-        self.assertTrue(val.IsValid())
-        self.assertEqual(val.GetValueAsUnsigned(), 10001)
-
-        val = frame.EvaluateExpression("b")
-        self.assertTrue(val.IsValid())
-        self.assertEqual(val.GetValueAsUnsigned(), 10002)
-
-        val = frame.EvaluateExpression("c")
-        self.assertTrue(val.IsValid())
-        self.assertEqual(val.GetValueAsUnsigned(), 10003)
-
-        self.enable_expression_log()
-        val = frame.EvaluateExpression("c-b")
-        self.disable_expression_log_and_check_for_locals(['c','b'])
-        self.assertTrue(val.IsValid())
-        self.assertEqual(val.GetValueAsUnsigned(), 1)
-
-        self.process.Continue()
-        self.assertTrue(
-            self.process.GetState() == lldb.eStateStopped,
-            PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(
-            self.process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(thread.IsValid())
-        frame = thread.GetSelectedFrame()
-        self.assertTrue(frame.IsValid())
-
-        val = frame.EvaluateExpression("a")
-        self.assertTrue(val.IsValid())
-        self.assertEqual(val.GetValueAsUnsigned(), 1)
-
-        val = frame.EvaluateExpression("b")
-        self.assertTrue(val.IsValid())
-        self.assertEqual(val.GetValueAsUnsigned(), 2)
-
-        val = frame.EvaluateExpression("c")
-        self.assertTrue(val.IsValid())
-        self.assertEqual(val.GetValueAsUnsigned(), 778899)
-
-        self.enable_expression_log()
-        val = frame.EvaluateExpression("a+b")
-        self.disable_expression_log_and_check_for_locals(['a','b'])
-        self.assertTrue(val.IsValid())
-        self.assertEqual(val.GetValueAsUnsigned(), 3)
-
-
-    def _load_exe(self):
-        self.build()
-
-        cwd = os.getcwd()
-
-        src_file = os.path.join(cwd, "main.cpp")
-        self.src_file_spec = lldb.SBFileSpec(src_file)
-        self.assertTrue(self.src_file_spec.IsValid(), "breakpoint file")
-
-        # Get the path of the executable
-        exe_path = self.getBuildArtifact("a.out")
-
-        # Load the executable
-        self.target = self.dbg.CreateTarget(exe_path)
-        self.assertTrue(self.target.IsValid(), VALID_TARGET)
-
-    def _test_globals(self):
-        thread = lldbutil.get_stopped_thread(
-            self.process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(thread.IsValid())
-        frame = thread.GetSelectedFrame()
-        self.assertTrue(frame.IsValid())
-
-        self.enable_expression_log()
-        val = frame.EvaluateExpression("a")
-        self.disable_expression_log_and_check_for_locals([])
-        self.assertTrue(val.IsValid())
-        self.assertEqual(val.GetValueAsUnsigned(), 112233)
-
-        val = frame.EvaluateExpression("b")
-        self.assertTrue(val.IsValid())
-        self.assertEqual(val.GetValueAsUnsigned(), 445566)
-
-        val = frame.EvaluateExpression("c")
-        self.assertTrue(val.IsValid())
-        self.assertEqual(val.GetValueAsUnsigned(), 778899)
-
-    def enable_expression_log(self):
-        log_file = os.path.join(self.getBuildDir(), "expr.log")
-        self.runCmd("log enable  -f '%s' lldb expr" % (log_file))
-
-    def disable_expression_log_and_check_for_locals(self, variables):
-        log_file = os.path.join(self.getBuildDir(), "expr.log")
-        self.runCmd("log disable lldb expr")
-        local_var_regex = re.compile(r".*__lldb_local_vars::(.*);")
-        matched = []
-        with open(log_file, 'r') as log:
-            for line in log:
-                if line.find('LLDB_BODY_START') != -1:
-                    break
-                m = re.match(local_var_regex, line)
-                if m:
-                    self.assertIn(m.group(1), variables)
-                    matched.append(m.group(1))
-        self.assertEqual([item for item in variables if item not in matched],
-                         [])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/main.cpp
deleted file mode 100644 (file)
index baf08f6..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-namespace NN
-{
-  int a = 778899;
-  int b = 665544;
-  int c = 445566;
-}
-
-class A
-{
-public:
-  A();
-  int Method(int a, int b);
-
-private:
-  int a, b;
-};
-
-A::A() : a(10), b(100) { }
-
-int a = 112233;
-int b = 445566;
-int c = 778899;
-
-int
-A::Method(int a, int b)
-{
-    {
-        int a = 12345;
-        int b = 54321;
-        int c = 34567;
-        this->a = a + b + this->b; // Break 2
-    }
-
-    {
-        using namespace NN;
-        int a = 10001;
-        int b = 10002;
-        int c = 10003;
-        this->a = a + b + this->b; // Break 3
-    }
-
-    return this->a + this->b + a + b; // Break 4
-}
-
-int
-Function(int a, int b)
-{
-    int A;
-
-    {
-        int a = 12345;
-        int b = 54321;
-        int c = 34567;
-        A = a + b + c; // Break 5
-    }
-
-    {
-        using namespace NN;
-        int a = 10001;
-        int b = 10002;
-        int c = 10003;
-        A = a + b + c; // Break 6
-    }
-
-    return A + a + b; // Break 7
-}
-
-int
-main()
-{
-    A obj;
-    return obj.Method(1, 2) + Function(1, 2); // Break 1
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/Inputs/Bar.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/Inputs/Bar.h
deleted file mode 100644 (file)
index 3d9a88c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-struct Bar { int success; };
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/Inputs/Foo.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/Inputs/Foo.h
deleted file mode 100644 (file)
index 1fe02e8..0000000
+++ /dev/null
@@ -1 +0,0 @@
-struct Foo {};
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/Inputs/module.modulemap b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/Inputs/module.modulemap
deleted file mode 100644 (file)
index 4221d0f..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-module Foo {
-  header "Foo.h"
-}
-
-module Bar {
-  header "Bar.h"
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/Makefile
deleted file mode 100644 (file)
index 3dff43b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CXX_SOURCES := main.cpp
-CXXFLAGS_EXTRAS = $(MANDATORY_MODULE_BUILD_CFLAGS) -I$(BUILDDIR)/include
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/TestCXXModulesImport.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/TestCXXModulesImport.py
deleted file mode 100644 (file)
index e7f98c6..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-"""Test that importing modules in C++ works as expected."""
-
-
-import unittest2
-import lldb
-import shutil
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class CXXModulesImportTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def build(self):
-        include = self.getBuildArtifact('include')
-        lldbutil.mkdir_p(include)
-        for f in ['Foo.h', 'Bar.h', 'module.modulemap']:
-            shutil.copyfile(self.getSourcePath(os.path.join('Inputs', f)),
-                            os.path.join(include, f))
-        super(CXXModulesImportTestCase, self).build()
-    
-    @skipUnlessDarwin
-    @skipIf(macos_version=["<", "10.12"])
-    def test_expr(self):
-        self.build()
-        target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
-            self, 'break here', lldb.SBFileSpec('main.cpp'))
-
-        self.expect("expr -l Objective-C++ -- @import Bar")
-        self.expect("expr -- Bar()", substrs = ["success"])
-        self.expect("expr -l Objective-C++ -- @import THIS_MODULE_DOES_NOT_EXIST",
-                    error=True)
-
-    @skipUnlessDarwin
-    @skipIf(macos_version=["<", "10.12"])
-    def test_expr_failing_import(self):
-        self.build()
-        shutil.rmtree(self.getBuildArtifact('include'))
-        target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
-            self, 'break here', lldb.SBFileSpec('main.cpp'))
-
-        self.expect("expr -l Objective-C++ -- @import Bar", error=True)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/main.cpp
deleted file mode 100644 (file)
index a6acf9a..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#include "Foo.h"
-
-int main(int argc, char **argv) {
-  Foo foo;
-  // break here.
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/Makefile
deleted file mode 100644 (file)
index 638974f..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp ns.cpp ns2.cpp ns3.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py
deleted file mode 100644 (file)
index 2221755..0000000
+++ /dev/null
@@ -1,236 +0,0 @@
-"""
-Test the printing of anonymous and named namespace variables.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class NamespaceBreakpointTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(bugnumber="llvm.org/pr28548", compiler="gcc")
-    @expectedFailureAll(oslist=["windows"])
-    def test_breakpoints_func_auto(self):
-        """Test that we can set breakpoints correctly by basename to find all functions whose basename is "func"."""
-        self.build()
-
-        names = [
-            "func()",
-            "func(int)",
-            "A::B::func()",
-            "A::func()",
-            "A::func(int)"]
-
-        # Create a target by the debugger.
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-        module_list = lldb.SBFileSpecList()
-        module_list.Append(lldb.SBFileSpec(exe, False))
-        cu_list = lldb.SBFileSpecList()
-        # Set a breakpoint by name "func" which should pick up all functions
-        # whose basename is "func"
-        bp = target.BreakpointCreateByName(
-            "func", lldb.eFunctionNameTypeAuto, module_list, cu_list)
-        for bp_loc in bp:
-            name = bp_loc.GetAddress().GetFunction().GetName()
-            self.assertTrue(
-                name in names,
-                "make sure breakpoint locations are correct for 'func' with eFunctionNameTypeAuto")
-
-    @expectedFailureAll(bugnumber="llvm.org/pr28548", compiler="gcc")
-    def test_breakpoints_func_full(self):
-        """Test that we can set breakpoints correctly by fullname to find all functions whose fully qualified name is "func"
-           (no namespaces)."""
-        self.build()
-
-        names = ["func()", "func(int)"]
-
-        # Create a target by the debugger.
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-        module_list = lldb.SBFileSpecList()
-        module_list.Append(lldb.SBFileSpec(exe, False))
-        cu_list = lldb.SBFileSpecList()
-
-        # Set a breakpoint by name "func" whose fullly qualified named matches "func" which
-        # should pick up only functions whose basename is "func" and has no
-        # containing context
-        bp = target.BreakpointCreateByName(
-            "func", lldb.eFunctionNameTypeFull, module_list, cu_list)
-        for bp_loc in bp:
-            name = bp_loc.GetAddress().GetFunction().GetName()
-            self.assertTrue(
-                name in names,
-                "make sure breakpoint locations are correct for 'func' with eFunctionNameTypeFull")
-
-    def test_breakpoints_a_func_full(self):
-        """Test that we can set breakpoints correctly by fullname to find all functions whose fully qualified name is "A::func"."""
-        self.build()
-
-        names = ["A::func()", "A::func(int)"]
-
-        # Create a target by the debugger.
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-        module_list = lldb.SBFileSpecList()
-        module_list.Append(lldb.SBFileSpec(exe, False))
-        cu_list = lldb.SBFileSpecList()
-
-        # Set a breakpoint by name "A::func" whose fullly qualified named matches "A::func" which
-        # should pick up only functions whose basename is "func" and is
-        # contained in the "A" namespace
-        bp = target.BreakpointCreateByName(
-            "A::func", lldb.eFunctionNameTypeFull, module_list, cu_list)
-        for bp_loc in bp:
-            name = bp_loc.GetAddress().GetFunction().GetName()
-            self.assertTrue(
-                name in names,
-                "make sure breakpoint locations are correct for 'A::func' with eFunctionNameTypeFull")
-
-
-class NamespaceTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers for declarations of namespace variables i and
-        # j.
-        self.line_var_i = line_number(
-            'main.cpp', '// Find the line number for anonymous namespace variable i.')
-        self.line_var_j = line_number(
-            'main.cpp', '// Find the line number for named namespace variable j.')
-        # And the line number to break at.
-        self.line_break = line_number('main.cpp',
-                                      '// Set break point at this line.')
-        # Break inside do {} while and evaluate value
-        self.line_break_ns1 = line_number('main.cpp', '// Evaluate ns1::value')
-        self.line_break_ns2 = line_number('main.cpp', '// Evaluate ns2::value')
-
-    def runToBkpt(self, command):
-        self.runCmd(command, RUN_SUCCEEDED)
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-    # rdar://problem/8668674
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24764")
-    def test_with_run_command(self):
-        """Test that anonymous and named namespace variables display correctly."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            "main.cpp",
-            self.line_break_ns1,
-            num_expected_locations=1,
-            loc_exact=True)
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            "main.cpp",
-            self.line_break_ns2,
-            num_expected_locations=1,
-            loc_exact=True)
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            "main.cpp",
-            self.line_break,
-            num_expected_locations=1,
-            loc_exact=True)
-
-        self.runToBkpt("run")
-        # Evaluate ns1::value
-        self.expect("expression -- value", startstr="(int) $0 = 100")
-
-        self.runToBkpt("continue")
-        # Evaluate ns2::value
-        self.expect("expression -- value", startstr="(int) $1 = 200")
-
-        self.runToBkpt("continue")
-        # On Mac OS X, gcc 4.2 emits the wrong debug info with respect to
-        # types.
-        slist = ['(int) a = 12', 'anon_uint', 'a_uint', 'b_uint', 'y_uint']
-        if self.platformIsDarwin() and self.getCompiler() in [
-                'clang', 'llvm-gcc']:
-            slist = ['(int) a = 12',
-                     '::my_uint_t', 'anon_uint = 0',
-                     '(A::uint_t) a_uint = 1',
-                     '(A::B::uint_t) b_uint = 2',
-                     '(Y::uint_t) y_uint = 3']
-
-        # 'frame variable' displays the local variables with type information.
-        self.expect('frame variable', VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=slist)
-
-        # 'frame variable' with basename 'i' should work.
-        self.expect(
-            "frame variable --show-declaration --show-globals i",
-            startstr="main.cpp:%d: (int) (anonymous namespace)::i = 3" %
-            self.line_var_i)
-        # main.cpp:12: (int) (anonymous namespace)::i = 3
-
-        # 'frame variable' with basename 'j' should work, too.
-        self.expect(
-            "frame variable --show-declaration --show-globals j",
-            startstr="main.cpp:%d: (int) A::B::j = 4" %
-            self.line_var_j)
-        # main.cpp:19: (int) A::B::j = 4
-
-        # 'frame variable' should support address-of operator.
-        self.runCmd("frame variable &i")
-
-        # 'frame variable' with fully qualified name 'A::B::j' should work.
-        self.expect("frame variable A::B::j", VARIABLES_DISPLAYED_CORRECTLY,
-                    startstr='(int) A::B::j = 4',
-                    patterns=[' = 4'])
-
-        # So should the anonymous namespace case.
-        self.expect(
-            "frame variable '(anonymous namespace)::i'",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            startstr='(int) (anonymous namespace)::i = 3',
-            patterns=[' = 3'])
-
-        # rdar://problem/8660275
-        # test/namespace: 'expression -- i+j' not working
-        # This has been fixed.
-        self.expect("expression -- i + j",
-                    startstr="(int) $2 = 7")
-        # (int) $2 = 7
-
-        self.runCmd("expression -- i")
-        self.runCmd("expression -- j")
-
-        # rdar://problem/8668674
-        # expression command with fully qualified namespace for a variable does
-        # not work
-        self.expect("expression -- ::i", VARIABLES_DISPLAYED_CORRECTLY,
-                    patterns=[' = 3'])
-        self.expect("expression -- A::B::j", VARIABLES_DISPLAYED_CORRECTLY,
-                    patterns=[' = 4'])
-
-        # expression command with function in anonymous namespace
-        self.expect("expression -- myanonfunc(3)",
-                    patterns=[' = 6'])
-
-        # global namespace qualification with function in anonymous namespace
-        self.expect("expression -- ::myanonfunc(4)",
-                    patterns=[' = 8'])
-
-        self.expect("p myanonfunc",
-                    patterns=['\(anonymous namespace\)::myanonfunc\(int\)'])
-
-        self.expect("p variadic_sum", patterns=[
-                    '\(anonymous namespace\)::variadic_sum\(int, ...\)'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespaceLookup.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespaceLookup.py
deleted file mode 100644 (file)
index 5526a14..0000000
+++ /dev/null
@@ -1,314 +0,0 @@
-"""
-Test the printing of anonymous and named namespace variables.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class NamespaceLookupTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Break inside different scopes and evaluate value
-        self.line_break_global_scope = line_number(
-            'ns.cpp', '// BP_global_scope')
-        self.line_break_file_scope = line_number('ns2.cpp', '// BP_file_scope')
-        self.line_break_ns_scope = line_number('ns2.cpp', '// BP_ns_scope')
-        self.line_break_nested_ns_scope = line_number(
-            'ns2.cpp', '// BP_nested_ns_scope')
-        self.line_break_nested_ns_scope_after_using = line_number(
-            'ns2.cpp', '// BP_nested_ns_scope_after_using')
-        self.line_break_before_using_directive = line_number(
-            'ns3.cpp', '// BP_before_using_directive')
-        self.line_break_after_using_directive = line_number(
-            'ns3.cpp', '// BP_after_using_directive')
-
-    def runToBkpt(self, command):
-        self.runCmd(command, RUN_SUCCEEDED)
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-    @expectedFailureAll(
-        oslist=["freebsd"],
-        bugnumber="llvm.org/pr25819")
-    @skipIfWindows # This is flakey on Windows: llvm.org/pr38373
-    def test_scope_lookup_with_run_command(self):
-        """Test scope lookup of functions in lldb."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            "ns.cpp",
-            self.line_break_global_scope,
-            num_expected_locations=1,
-            loc_exact=False)
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            "ns2.cpp",
-            self.line_break_ns_scope,
-            num_expected_locations=1,
-            loc_exact=False)
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            "ns2.cpp",
-            self.line_break_nested_ns_scope,
-            num_expected_locations=1,
-            loc_exact=False)
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            "ns2.cpp",
-            self.line_break_nested_ns_scope_after_using,
-            num_expected_locations=1,
-            loc_exact=False)
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            "ns3.cpp",
-            self.line_break_before_using_directive,
-            num_expected_locations=1,
-            loc_exact=False)
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            "ns3.cpp",
-            self.line_break_after_using_directive,
-            num_expected_locations=1,
-            loc_exact=False)
-
-        # Run to BP_global_scope at global scope
-        self.runToBkpt("run")
-        # Evaluate func() - should call ::func()
-        self.expect("expr -- func()", startstr="(int) $0 = 1")
-        # Evaluate A::B::func() - should call A::B::func()
-        self.expect("expr -- A::B::func()", startstr="(int) $1 = 4")
-        # Evaluate func(10) - should call ::func(int)
-        self.expect("expr -- func(10)", startstr="(int) $2 = 11")
-        # Evaluate ::func() - should call A::func()
-        self.expect("expr -- ::func()", startstr="(int) $3 = 1")
-        # Evaluate A::foo() - should call A::foo()
-        self.expect("expr -- A::foo()", startstr="(int) $4 = 42")
-
-        # Continue to BP_ns_scope at ns scope
-        self.runToBkpt("continue")
-        # Evaluate func(10) - should call A::func(int)
-        self.expect("expr -- func(10)", startstr="(int) $5 = 13")
-        # Evaluate B::func() - should call B::func()
-        self.expect("expr -- B::func()", startstr="(int) $6 = 4")
-        # Evaluate func() - should call A::func()
-        self.expect("expr -- func()", startstr="(int) $7 = 3")
-
-        # Continue to BP_nested_ns_scope at nested ns scope
-        self.runToBkpt("continue")
-        # Evaluate func() - should call A::B::func()
-        self.expect("expr -- func()", startstr="(int) $8 = 4")
-        # Evaluate A::func() - should call A::func()
-        self.expect("expr -- A::func()", startstr="(int) $9 = 3")
-
-        # Evaluate func(10) - should call A::func(10)
-        # NOTE: Under the rules of C++, this test would normally get an error
-        # because A::B::func() hides A::func(), but lldb intentionally
-        # disobeys these rules so that the intended overload can be found
-        # by only removing duplicates if they have the same type.
-        self.expect("expr -- func(10)", startstr="(int) $10 = 13")
-
-        # Continue to BP_nested_ns_scope_after_using at nested ns scope after
-        # using declaration
-        self.runToBkpt("continue")
-        # Evaluate A::func(10) - should call A::func(int)
-        self.expect("expr -- A::func(10)", startstr="(int) $11 = 13")
-
-        # Continue to BP_before_using_directive at global scope before using
-        # declaration
-        self.runToBkpt("continue")
-        # Evaluate ::func() - should call ::func()
-        self.expect("expr -- ::func()", startstr="(int) $12 = 1")
-        # Evaluate B::func() - should call B::func()
-        self.expect("expr -- B::func()", startstr="(int) $13 = 4")
-
-        # Continue to BP_after_using_directive at global scope after using
-        # declaration
-        self.runToBkpt("continue")
-        # Evaluate ::func() - should call ::func()
-        self.expect("expr -- ::func()", startstr="(int) $14 = 1")
-        # Evaluate B::func() - should call B::func()
-        self.expect("expr -- B::func()", startstr="(int) $15 = 4")
-
-    @unittest2.expectedFailure("lldb scope lookup of functions bugs")
-    def test_function_scope_lookup_with_run_command(self):
-        """Test scope lookup of functions in lldb."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            "ns.cpp",
-            self.line_break_global_scope,
-            num_expected_locations=1,
-            loc_exact=False)
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            "ns2.cpp",
-            self.line_break_ns_scope,
-            num_expected_locations=1,
-            loc_exact=False)
-
-        # Run to BP_global_scope at global scope
-        self.runToBkpt("run")
-        # Evaluate foo() - should call ::foo()
-        # FIXME: lldb finds Y::foo because lookup for variables is done
-        # before functions.
-        self.expect("expr -- foo()", startstr="(int) $0 = 42")
-        # Evaluate ::foo() - should call ::foo()
-        # FIXME: lldb finds Y::foo because lookup for variables is done
-        # before functions and :: is ignored.
-        self.expect("expr -- ::foo()", startstr="(int) $1 = 42")
-
-        # Continue to BP_ns_scope at ns scope
-        self.runToBkpt("continue")
-        # Evaluate foo() - should call A::foo()
-        # FIXME: lldb finds Y::foo because lookup for variables is done
-        # before functions.
-        self.expect("expr -- foo()", startstr="(int) $2 = 42")
-
-    @unittest2.expectedFailure("lldb file scope lookup bugs")
-    @skipIfWindows # This is flakey on Windows: llvm.org/pr38373
-    def test_file_scope_lookup_with_run_command(self):
-        """Test file scope lookup in lldb."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            "ns2.cpp",
-            self.line_break_file_scope,
-            num_expected_locations=1,
-            loc_exact=False)
-
-        # Run to BP_file_scope at file scope
-        self.runToBkpt("run")
-        # Evaluate func() - should call static ns2.cpp:func()
-        # FIXME: This test fails because lldb doesn't know about file scopes so
-        # finds the global ::func().
-        self.expect("expr -- func()", startstr="(int) $0 = 2")
-
-    @skipIfWindows # This is flakey on Windows: llvm.org/pr38373
-    def test_scope_lookup_before_using_with_run_command(self):
-        """Test scope lookup before using in lldb."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            "ns3.cpp",
-            self.line_break_before_using_directive,
-            num_expected_locations=1,
-            loc_exact=False)
-
-        # Run to BP_before_using_directive at global scope before using
-        # declaration
-        self.runToBkpt("run")
-        # Evaluate func() - should call ::func()
-        self.expect("expr -- func()", startstr="(int) $0 = 1")
-
-    # NOTE: this test may fail on older systems that don't emit import
-    # entries in DWARF - may need to add checks for compiler versions here.
-    @skipIf(
-        compiler="gcc",
-        oslist=["linux"],
-        debug_info=["dwo"])  # Skip to avoid crash
-    @expectedFailureAll(
-        oslist=["freebsd"],
-        bugnumber="llvm.org/pr25819")
-    def test_scope_after_using_directive_lookup_with_run_command(self):
-        """Test scope lookup after using directive in lldb."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            "ns3.cpp",
-            self.line_break_after_using_directive,
-            num_expected_locations=1,
-            loc_exact=False)
-
-        # Run to BP_after_using_directive at global scope after using
-        # declaration
-        self.runToBkpt("run")
-        # Evaluate func2() - should call A::func2()
-        self.expect("expr -- func2()", startstr="(int) $0 = 3")
-
-    @unittest2.expectedFailure(
-        "lldb scope lookup after using declaration bugs")
-    # NOTE: this test may fail on older systems that don't emit import
-    # emtries in DWARF - may need to add checks for compiler versions here.
-    def test_scope_after_using_declaration_lookup_with_run_command(self):
-        """Test scope lookup after using declaration in lldb."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            "ns2.cpp",
-            self.line_break_nested_ns_scope_after_using,
-            num_expected_locations=1,
-            loc_exact=False)
-
-        # Run to BP_nested_ns_scope_after_using at nested ns scope after using
-        # declaration
-        self.runToBkpt("run")
-        # Evaluate func() - should call A::func()
-        self.expect("expr -- func()", startstr="(int) $0 = 3")
-
-    @unittest2.expectedFailure("lldb scope lookup ambiguity after using bugs")
-    def test_scope_ambiguity_after_using_lookup_with_run_command(self):
-        """Test scope lookup ambiguity after using in lldb."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            "ns3.cpp",
-            self.line_break_after_using_directive,
-            num_expected_locations=1,
-            loc_exact=False)
-
-        # Run to BP_after_using_directive at global scope after using
-        # declaration
-        self.runToBkpt("run")
-        # Evaluate func() - should get error: ambiguous
-        # FIXME: This test fails because lldb removes duplicates if they have
-        # the same type.
-        self.expect("expr -- func()", startstr="error")
-
-    @expectedFailureAll(
-        oslist=["freebsd"],
-        bugnumber="llvm.org/pr25819")
-    def test_scope_lookup_shadowed_by_using_with_run_command(self):
-        """Test scope lookup shadowed by using in lldb."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            "ns2.cpp",
-            self.line_break_nested_ns_scope,
-            num_expected_locations=1,
-            loc_exact=False)
-
-        # Run to BP_nested_ns_scope at nested ns scope
-        self.runToBkpt("run")
-        # Evaluate func(10) - should call A::func(10)
-        # NOTE: Under the rules of C++, this test would normally get an error
-        # because A::B::func() shadows A::func(), but lldb intentionally
-        # disobeys these rules so that the intended overload can be found
-        # by only removing duplicates if they have the same type.
-        self.expect("expr -- func(10)", startstr="(int) $0 = 13")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/cmds.txt b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/cmds.txt
deleted file mode 100644 (file)
index 76bb1bc..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-b main.cpp:54
-c
-var
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/main.cpp
deleted file mode 100644 (file)
index 22c0309..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <cstdarg>
-#include <cstdlib>
-#include "ns.h"
-
-namespace {
-    typedef unsigned int my_uint_t;
-    int i; // Find the line number for anonymous namespace variable i.
-
-    int myanonfunc (int a)
-    {
-        return a + a;
-    }
-
-    int
-    variadic_sum (int arg_count...)
-    {
-        int sum = 0;
-        std::va_list args;
-        va_start(args, arg_count);
-
-        for (int i = 0; i < arg_count; i++)
-            sum += va_arg(args, int);
-
-        va_end(args);
-        return sum;
-    }
-}
-
-namespace A {
-    typedef unsigned int uint_t;
-    namespace B {
-        typedef unsigned int uint_t;
-        int j; // Find the line number for named namespace variable j.
-        int myfunc (int a);
-        int myfunc2(int a)
-        {
-             return a + 2;
-        }
-        float myfunc (float f)
-        {
-            return f - 2.0;
-        }
-    }
-}
-
-namespace Y
-{
-    typedef unsigned int uint_t;
-    using A::B::j;
-    int foo;
-}
-
-using A::B::j;          // using declaration
-
-namespace Foo = A::B;   // namespace alias
-
-using Foo::myfunc;      // using declaration
-
-using namespace Foo;    // using directive
-
-namespace A {
-    namespace B {
-        using namespace Y;
-        int k;
-    }
-}
-
-namespace ns1 {
-    int value = 100;
-}
-
-namespace ns2 {
-    int value = 200;
-}
-
-void test_namespace_scopes() {
-    do {
-        using namespace ns1;
-        printf("ns1::value = %d\n", value); // Evaluate ns1::value
-    } while(0);
-    
-    do {
-        using namespace ns2;
-        printf("ns2::value = %d\n", value); // Evaluate ns2::value
-    } while(0);
-}
-
-int Foo::myfunc(int a)
-{
-    test_namespace_scopes();    
-
-    ::my_uint_t anon_uint = 0;
-    A::uint_t a_uint = 1;
-    B::uint_t b_uint = 2;
-    Y::uint_t y_uint = 3;
-    i = 3;
-    j = 4;
-    printf("::i=%d\n", ::i);
-    printf("A::B::j=%d\n", A::B::j);
-    printf("variadic_sum=%d\n", variadic_sum(3, 1, 2, 3));
-    myanonfunc(3);
-    return myfunc2(3) + j + i + a + 2 + anon_uint + a_uint + b_uint + y_uint; // Set break point at this line.
-}
-
-int
-main (int argc, char const *argv[])
-{
-    test_lookup_at_global_scope();
-    test_lookup_at_file_scope();
-    A::test_lookup_at_ns_scope();
-    A::B::test_lookup_at_nested_ns_scope();
-    A::B::test_lookup_at_nested_ns_scope_after_using();
-    test_lookup_before_using_directive();
-    test_lookup_after_using_directive();
-    return Foo::myfunc(12);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/ns.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/ns.cpp
deleted file mode 100644 (file)
index 481a986..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-//===-- ns.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "ns.h"
-
-int foo()
-{
-  std::printf("global foo()\n");
-  return 42;
-}
-int func()
-{
-  std::printf("global func()\n");
-  return 1;
-}
-int func(int a)
-{
-  std::printf("global func(int)\n");
-  return a + 1;
-}
-void test_lookup_at_global_scope()
-{
-  // BP_global_scope
-  std::printf("at global scope: foo() = %d\n", foo()); // eval foo(), exp: 42
-  std::printf("at global scope: func() = %d\n", func()); // eval func(), exp: 1
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/ns.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/ns.h
deleted file mode 100644 (file)
index d04b45a..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-//===-- ns.h ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <cstdio>
-
-void test_lookup_at_global_scope();
-void test_lookup_at_file_scope();
-void test_lookup_before_using_directive();
-void test_lookup_after_using_directive();
-int func(int a);
-namespace A {
-int foo();
-int func(int a);
-inline int func() {
-  std::printf("A::func()\n");
-  return 3;
-}
-inline int func2() {
-  std::printf("A::func2()\n");
-  return 3;
-}
-void test_lookup_at_ns_scope();
-namespace B {
-int func();
-void test_lookup_at_nested_ns_scope();
-void test_lookup_at_nested_ns_scope_after_using();
-} // namespace B
-} // namespace A
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/ns2.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/ns2.cpp
deleted file mode 100644 (file)
index 9aae5d0..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-//===-- ns2.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "ns.h"
-
-static int func()
-{
-  std::printf("static m2.cpp func()\n");
-  return 2;
-}
-void test_lookup_at_file_scope()
-{
-  // BP_file_scope
-  std::printf("at file scope: func() = %d\n", func()); // eval func(), exp: 2
-  std::printf("at file scope: func(10) = %d\n", func(10)); // eval func(10), exp: 11
-}
-namespace A {
-    namespace B {
-        int func()
-        {
-          std::printf("A::B::func()\n");
-          return 4;
-        }
-        void test_lookup_at_nested_ns_scope()
-        {
-            // BP_nested_ns_scope
-            std::printf("at nested ns scope: func() = %d\n", func()); // eval func(), exp: 4
-
-            //printf("func(10) = %d\n", func(10)); // eval func(10), exp: 13
-            // NOTE: Under the rules of C++, this test would normally get an error
-            // because A::B::func() hides A::func(), but lldb intentionally
-            // disobeys these rules so that the intended overload can be found
-            // by only removing duplicates if they have the same type.
-        }
-        void test_lookup_at_nested_ns_scope_after_using()
-        {
-            // BP_nested_ns_scope_after_using
-            using A::func;
-            std::printf("at nested ns scope after using: func() = %d\n", func()); // eval func(), exp: 3
-        }
-    }
-}
-int A::foo()
-{
-  std::printf("A::foo()\n");
-  return 42;
-}
-int A::func(int a)
-{
-  std::printf("A::func(int)\n");
-  return a + 3;
-}
-void A::test_lookup_at_ns_scope()
-{
-  // BP_ns_scope
-  std::printf("at nested ns scope: func() = %d\n", func()); // eval func(), exp: 3
-  std::printf("at nested ns scope: func(10) = %d\n", func(10)); // eval func(10), exp: 13
-  std::printf("at nested ns scope: foo() = %d\n", foo()); // eval foo(), exp: 42
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/ns3.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/ns3.cpp
deleted file mode 100644 (file)
index 0f7a505..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-//===-- ns3.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "ns.h"
-extern int func();
-
-// Note: the following function must be before the using.
-void test_lookup_before_using_directive()
-{
-  // BP_before_using_directive
-  std::printf("before using directive: func() = %d\n", func()); // eval func(), exp: 1
-}
-using namespace A;
-void test_lookup_after_using_directive()
-{
-  // BP_after_using_directive
-  //printf("func() = %d\n", func()); // eval func(), exp: error, amiguous
-  std::printf("after using directive: func2() = %d\n", func2()); // eval func2(), exp: 3
-  std::printf("after using directive: ::func() = %d\n", ::func()); // eval ::func(), exp: 1
-  std::printf("after using directive: B::func() = %d\n", B::func()); // eval B::func(), exp: 4
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/TestNamespaceConflicts.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/TestNamespaceConflicts.py
deleted file mode 100644 (file)
index c8308c1..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__, globals())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/main.cpp
deleted file mode 100644 (file)
index 0349365..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace n {
-    struct D {
-        int i;
-        static int anInt() { return 2; }
-        int dump() { return i; }
-    };
-}
-
-using namespace n;
-
-int foo(D* D) {
-    return D->dump(); //% self.expect("expression -- D->dump()", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["int", "2"])
-}
-
-int main (int argc, char const *argv[])
-{
-    D myD { D::anInt() };
-    foo(&myD);
-    return 0; 
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/Makefile
deleted file mode 100644 (file)
index fc9165f..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-LD_EXTRAS := -L. -la -lb
-CXX_SOURCES := main.cpp
-
-a.out: liba libb
-
-include Makefile.rules
-
-liba:
-       $(MAKE) -f $(MAKEFILE_RULES) \
-               DYLIB_ONLY=YES DYLIB_NAME=a DYLIB_CXX_SOURCES=a.cpp
-
-libb:
-       $(MAKE) -f $(MAKEFILE_RULES) \
-               DYLIB_ONLY=YES DYLIB_NAME=b DYLIB_CXX_SOURCES=b.cpp
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/TestNamespaceDefinitions.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/TestNamespaceDefinitions.py
deleted file mode 100644 (file)
index e96a9fb..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-"""Test that forward declarations don't cause bogus conflicts in namespaced types"""
-
-
-
-import unittest2
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class NamespaceDefinitionsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(
-        bugnumber="llvm.org/pr28948",
-        compiler="gcc",
-        compiler_version=[
-            "<",
-            "4.9"])
-    @expectedFailureAll(
-        bugnumber="llvm.org/pr28948",
-        oslist=['linux'], compiler="gcc", archs=['arm','aarch64'])
-    @expectedFailureAll(oslist=["windows"])
-    @expectedFailureNetBSD
-    def test_expr(self):
-        self.build()
-        self.common_setup()
-
-        self.expect(
-            "expression -- Foo::MyClass()",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=['thing = '])
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.source = 'main.cpp'
-        self.line = line_number(self.source, '// Set breakpoint here')
-        self.shlib_names = ["a", "b"]
-
-    def common_setup(self):
-        # Run in synchronous mode
-        self.dbg.SetAsync(False)
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
-        self.assertTrue(target, VALID_TARGET)
-
-        # Break inside the foo function which takes a bar_ptr argument.
-        lldbutil.run_break_set_by_file_and_line(
-            self, self.source, self.line, num_expected_locations=1, loc_exact=True)
-
-        # Register our shared libraries for remote targets so they get
-        # automatically uploaded
-        environment = self.registerSharedLibrariesWithTarget(
-            target, self.shlib_names)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, environment, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/a.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/a.cpp
deleted file mode 100644 (file)
index 2795b20..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-//===-- a.cpp ---------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "foo.h"
-
-class ThingInside {
-  int a;
-};
-
-Foo::MyClass a_class;
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/b.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/b.cpp
deleted file mode 100644 (file)
index b676865..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-//===-- b.cpp ---------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "foo.h"
-
-Foo::MyClass b_class;
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/foo.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/foo.h
deleted file mode 100644 (file)
index a2c64ab..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-//===-- foo.h ---------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-class ThingInside;
-
-namespace Foo {
-  class MyClass {
-  ThingInside *thing;
-  public:
-    MyClass() { }
-  };
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/main.cpp
deleted file mode 100644 (file)
index 8703cd9..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <stdio.h>
-
-int
-main (int argc, char const *argv[])
-{
-    return 0; // Set breakpoint here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/nested-class-other-compilation-unit/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/nested-class-other-compilation-unit/Makefile
deleted file mode 100644 (file)
index 020dce7..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp other.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/nested-class-other-compilation-unit/TestNestedClassWithParentInAnotherCU.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/nested-class-other-compilation-unit/TestNestedClassWithParentInAnotherCU.py
deleted file mode 100644 (file)
index 5b590d6..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-"""
-Test that the expression evaluator can access members of nested classes even if
-the parents of the nested classes were imported from another compilation unit.
-"""
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestNestedClassWithParentInAnotherCU(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_nested_class_with_parent_in_another_cu(self):
-        self.main_source_file = lldb.SBFileSpec("main.cpp")
-        self.build()
-        (_, _, thread, _) = lldbutil.run_to_source_breakpoint(self, "// break here", self.main_source_file)
-        frame = thread.GetSelectedFrame()
-        # Parse the DIEs of the parent classes and the nested classes from
-        # other.cpp's CU.
-        warmup_result = frame.EvaluateExpression("b")
-        self.assertTrue(warmup_result.IsValid())
-        # Inspect fields of the nested classes. This will reuse the types that
-        # were parsed during the evaluation above. By accessing a chain of
-        # fields, we try to verify that all the DIEs, reused types and
-        # declaration contexts were wired properly into lldb's parser's state.
-        expr_result = frame.EvaluateExpression("a.y.oY_inner.oX_inner")
-        self.assertTrue(expr_result.IsValid())
-        self.assertEqual(expr_result.GetValue(), "42")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/nested-class-other-compilation-unit/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/nested-class-other-compilation-unit/main.cpp
deleted file mode 100644 (file)
index 8a6e6ff..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#include "shared.h"
-
-struct WrapperA {
-  OuterY::Inner<unsigned int> y;
-};
-
-int main() {
-  // WrapperA refers to the Inner and Outer class DIEs from this CU.
-  WrapperA a;
-  // WrapperB refers to the Inner and Outer DIEs from the other.cpp CU.
-  // It is important that WrapperB is only forward-declared in shared.h.
-  WrapperB* b = foo();
-
-  // Evaluating 'b' here will parse other.cpp's DIEs for all
-  // the Inner and Outer classes from shared.h.
-  //
-  // Evaluating 'a' here will find and reuse the already-parsed
-  // versions of the Inner and Outer classes. In the associated test
-  // we make sure that we can still resolve all the types properly
-  // by evaluating 'a.y.oY_inner.oX_inner'.
-  return 0;  // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/nested-class-other-compilation-unit/other.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/nested-class-other-compilation-unit/other.cpp
deleted file mode 100644 (file)
index 71a9579..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#include "shared.h"
-
-struct WrapperB {
-  OuterY y;
-  OuterX x;
-};
-
-WrapperB* foo() {
-  return new WrapperB();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/nested-class-other-compilation-unit/shared.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/nested-class-other-compilation-unit/shared.h
deleted file mode 100644 (file)
index 627f49a..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-struct OuterX {
-  template<typename T>
-  struct Inner {
-    int oX_inner = 42;
-  };
-};
-
-struct OuterY {
-  template<typename T>
-  struct Inner {
-    typename OuterX::Inner<T> oY_inner;
-  };
-};
-
-struct WrapperB;
-
-WrapperB* foo();
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/nsimport/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/nsimport/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/nsimport/TestCppNsImport.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/nsimport/TestCppNsImport.py
deleted file mode 100644 (file)
index f42d194..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-"""
-Tests imported namespaces in C++.
-"""
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestCppNsImport(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_with_run_command(self):
-        """Tests imported namespaces in C++."""
-        self.build()
-
-        # Get main source file
-        src_file = os.path.join(self.getSourceDir(), "main.cpp")
-        src_file_spec = lldb.SBFileSpec(src_file)
-        self.assertTrue(src_file_spec.IsValid(), "Main source file")
-
-        # Get the path of the executable
-        exe_path = self.getBuildArtifact("a.out")
-
-        # Load the executable
-        target = self.dbg.CreateTarget(exe_path)
-        self.assertTrue(target.IsValid(), VALID_TARGET)
-
-        # Break on main function
-        break_0 = target.BreakpointCreateBySourceRegex(
-            "// break 0", src_file_spec)
-        self.assertTrue(
-            break_0.IsValid() and break_0.GetNumLocations() >= 1,
-            VALID_BREAKPOINT)
-        break_1 = target.BreakpointCreateBySourceRegex(
-            "// break 1", src_file_spec)
-        self.assertTrue(
-            break_1.IsValid() and break_1.GetNumLocations() >= 1,
-            VALID_BREAKPOINT)
-
-        # Launch the process
-        args = None
-        env = None
-        process = target.LaunchSimple(
-            args, env, self.get_process_working_directory())
-        self.assertTrue(process.IsValid(), PROCESS_IS_VALID)
-
-        # Get the thread of the process
-        self.assertTrue(
-            process.GetState() == lldb.eStateStopped,
-            PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-
-        # Get current fream of the thread at the breakpoint
-        frame = thread.GetSelectedFrame()
-
-        # Test imported namespaces
-        test_result = frame.EvaluateExpression("n")
-        self.assertTrue(
-            test_result.IsValid() and test_result.GetValueAsSigned() == 1,
-            "n = 1")
-
-        test_result = frame.EvaluateExpression("N::n")
-        self.assertTrue(
-            test_result.IsValid() and test_result.GetValueAsSigned() == 1,
-            "N::n = 1")
-
-        test_result = frame.EvaluateExpression("nested")
-        self.assertTrue(
-            test_result.IsValid() and test_result.GetValueAsSigned() == 3,
-            "nested = 3")
-
-        test_result = frame.EvaluateExpression("anon")
-        self.assertTrue(
-            test_result.IsValid() and test_result.GetValueAsSigned() == 2,
-            "anon = 2")
-
-        test_result = frame.EvaluateExpression("global")
-        self.assertTrue(
-            test_result.IsValid() and test_result.GetValueAsSigned() == 4,
-            "global = 4")
-
-        test_result = frame.EvaluateExpression("fun_var")
-        self.assertTrue(
-            test_result.IsValid() and test_result.GetValueAsSigned() == 9,
-            "fun_var = 9")
-
-        test_result = frame.EvaluateExpression("Fun::fun_var")
-        self.assertTrue(
-            test_result.IsValid() and test_result.GetValueAsSigned() == 0,
-            "Fun::fun_var = 0")
-
-        test_result = frame.EvaluateExpression("not_imported")
-        self.assertTrue(
-            test_result.IsValid() and test_result.GetValueAsSigned() == 35,
-            "not_imported = 35")
-
-        # Currently there is no way to distinguish between "::imported" and "imported" in ClangExpressionDeclMap so this fails
-        #test_result = frame.EvaluateExpression("::imported")
-        #self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 89, "::imported = 89")
-
-        test_result = frame.EvaluateExpression("Imported::imported")
-        self.assertTrue(
-            test_result.IsValid() and test_result.GetValueAsSigned() == 99,
-            "Imported::imported = 99")
-
-        test_result = frame.EvaluateExpression("imported")
-        self.assertTrue(
-            test_result.IsValid() and test_result.GetValueAsSigned() == 99,
-            "imported = 99")
-
-        test_result = frame.EvaluateExpression("single")
-        self.assertTrue(
-            test_result.IsValid() and test_result.GetValueAsSigned() == 3,
-            "single = 3")
-
-        # Continue to second breakpoint
-        process.Continue()
-
-        # Get the thread of the process
-        self.assertTrue(
-            process.GetState() == lldb.eStateStopped,
-            PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-
-        # Get current fream of the thread at the breakpoint
-        frame = thread.GetSelectedFrame()
-
-        # Test function inside namespace
-        test_result = frame.EvaluateExpression("fun_var")
-        self.assertTrue(
-            test_result.IsValid() and test_result.GetValueAsSigned() == 5,
-            "fun_var = 5")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/nsimport/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/nsimport/main.cpp
deleted file mode 100644 (file)
index e125eba..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-namespace N
-{
-    int n;
-}
-
-namespace
-{
-    int anon;
-}
-
-namespace Nested
-{
-    namespace
-    {
-        int nested;
-    }
-}
-
-namespace Global
-{
-    int global;
-}
-
-namespace Fun
-{
-    int fun_var;
-    int fun()
-    {
-        fun_var = 5;
-        return 0; // break 1
-    }
-}
-
-namespace Single
-{
-    int single = 3;
-}
-
-namespace NotImportedBefore
-{
-    int not_imported = 45;
-}
-
-using namespace Global;
-
-int not_imported = 35;
-int fun_var = 9;
-
-namespace NotImportedAfter
-{
-    int not_imported = 55;
-}
-
-namespace Imported
-{
-    int imported = 99;
-}
-
-int imported = 89;
-
-int main()
-{
-    using namespace N;
-    using namespace Nested;
-    using namespace Imported;
-    using Single::single;
-    n = 1;
-    anon = 2;
-    nested = 3;
-    global = 4;
-    return Fun::fun(); // break 0
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/offsetof/TestOffsetofCpp.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/offsetof/TestOffsetofCpp.py
deleted file mode 100644 (file)
index cdfbaae..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__, globals(), [decorators.no_debug_info_test])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/offsetof/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/offsetof/main.cpp
deleted file mode 100644 (file)
index ab379f8..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#include <cstdint>
-
-class Base {
-  int32_t a;
-};
-class Class1 : Base {
-public:
-  int32_t b;
-};
-
-class EmptyBase {
-};
-class Class2 : EmptyBase {
-public:
-  int32_t b;
-};
-
-int main(int argc, char **argv) {
-  Class1 c1;
-  Class2 c2;
-  //% self.expect("expr offsetof(Base, a)", substrs=["= 0"])
-  //% self.expect("expr offsetof(Class1, b)", substrs=["= 4"])
-  //% self.expect("expr offsetof(Class2, b)", substrs=["= 0"])
-  return c1.b + c2.b;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/operator-overload/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/operator-overload/Makefile
deleted file mode 100644 (file)
index 80b3ee0..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CXX_SOURCES = a.cpp b.cpp
-
-include Makefile.rules
-
-a.o: a.cpp
-       $(CC) $(CFLAGS_NO_DEBUG) -c $< -o $@
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/operator-overload/TestOperatorOverload.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/operator-overload/TestOperatorOverload.py
deleted file mode 100644 (file)
index f541a66..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestOperatorOverload(TestBase):
-  mydir = TestBase.compute_mydir(__file__)
-
-  def test_overload(self):
-    self.build()
-    (target, process, thread,
-      main_breakpoint) = lldbutil.run_to_source_breakpoint(self,
-        "break here", lldb.SBFileSpec("b.cpp"))
-    frame = thread.GetSelectedFrame()
-    value = frame.EvaluateExpression("x == nil")
-    self.assertTrue(str(value.GetError())
-      .find("comparison between NULL and non-pointer ('Tinky' and NULL)")
-        != -1)
-    self.assertTrue(str(value.GetError())
-      .find("invalid operands to binary expression ('Tinky' and")
-        != -1)
-    self.assertFalse(value.GetError().Success())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/operator-overload/a.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/operator-overload/a.cpp
deleted file mode 100644 (file)
index 77b2f6a..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-class Patatino {
-public:
-  double _blah;
-  Patatino(int blah) : _blah(blah) {}
-};
-
-bool operator==(const Patatino& a, const Patatino& b) {
-  return a._blah < b._blah;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/operator-overload/b.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/operator-overload/b.cpp
deleted file mode 100644 (file)
index c0eb29b..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-class Tinky {
-public:
-  int _meh;
-  Tinky(int meh) : _meh(meh) {}
-};
-
-int main(void) {
-  Tinky x(12);
-  return 0; // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/operators/TestCppOperators.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/operators/TestCppOperators.py
deleted file mode 100644 (file)
index c8308c1..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__, globals())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/operators/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/operators/main.cpp
deleted file mode 100644 (file)
index 892d0ba..0000000
+++ /dev/null
@@ -1,181 +0,0 @@
-#include <cstdlib>
-
-int side_effect = 0;
-
-struct B { int dummy = 2324; };
-struct C {
-  void *operator new(size_t size) { C* r = ::new C; r->custom_new = true; return r; }
-  void *operator new[](size_t size) { C* r = static_cast<C*>(std::malloc(size)); r->custom_new = true; return r; }
-  void operator delete(void *p) { std::free(p); side_effect = 1; }
-  void operator delete[](void *p) { std::free(p); side_effect = 2; }
-
-  bool custom_new = false;
-  B b;
-  B* operator->() { return &b; }
-  int operator->*(int) { return 2; }
-  int operator+(int) { return 44; }
-  int operator+=(int) { return 42; }
-  int operator++(int) { return 123; }
-  int operator++() { return 1234; }
-  int operator-(int) { return 34; }
-  int operator-=(int) { return 32; }
-  int operator--() { return 321; }
-  int operator--(int) { return 4321; }
-
-  int operator*(int) { return 51; }
-  int operator*=(int) { return 52; }
-  int operator%(int) { return 53; }
-  int operator%=(int) { return 54; }
-  int operator/(int) { return 55; }
-  int operator/=(int) { return 56; }
-  int operator^(int) { return 57; }
-  int operator^=(int) { return 58; }
-
-  int operator|(int) { return 61; }
-  int operator|=(int) { return 62; }
-  int operator||(int) { return 63; }
-  int operator&(int) { return 64; }
-  int operator&=(int) { return 65; }
-  int operator&&(int) { return 66; }
-
-  int operator~() { return 71; }
-  int operator!() { return 72; }
-  int operator!=(int) { return 73; }
-  int operator=(int) { return 74; }
-  int operator==(int) { return 75; }
-
-  int operator<(int) { return 81; }
-  int operator<<(int) { return 82; }
-  int operator<=(int) { return 83; }
-  int operator<<=(int) { return 84; }
-  int operator>(int) { return 85; }
-  int operator>>(int) { return 86; }
-  int operator>=(int) { return 87; }
-  int operator>>=(int) { return 88; }
-
-  int operator,(int) { return 2012; }
-  int operator&() { return 2013; }
-
-  int operator()(int) { return 91; }
-  int operator[](int) { return 92; }
-
-  operator int() { return 11; }
-  operator long() { return 12; }
-
-  // Make sure this doesn't collide with
-  // the real operator int.
-  int operatorint() { return 13; }
-  int operatornew() { return 14; }
-};
-
-int main(int argc, char **argv) {
-  C c;
-  int result = c->dummy;
-  result = c->*4;
-  result += c+1;
-  result += c+=1;
-  result += c++;
-  result += ++c;
-  result += c-1;
-  result += c-=1;
-  result += c--;
-  result += --c;
-
-  result += c * 4;
-  result += c *= 4;
-  result += c % 4;
-  result += c %= 4;
-  result += c / 4;
-  result += c /= 4;
-  result += c ^ 4;
-  result += c ^= 4;
-
-  result += c | 4;
-  result += c |= 4;
-  result += c || 4;
-  result += c & 4;
-  result += c &= 4;
-  result += c && 4;
-
-  result += ~c;
-  result += !c;
-  result += c!=1;
-  result += c=2;
-  result += c==2;
-
-  result += c<2;
-  result += c<<2;
-  result += c<=2;
-  result += c<<=2;
-  result += c>2;
-  result += c>>2;
-  result += c>=2;
-  result += c>>=2;
-
-  result += (c , 2);
-  result += &c;
-
-  result += c(1);
-  result += c[1];
-
-  result += static_cast<int>(c);
-  result += static_cast<long>(c);
-  result += c.operatorint();
-  result += c.operatornew();
-
-  C *c2 = new C();
-  C *c3 = new C[3];
-
-  //% self.expect("expr c->dummy", endstr=" 2324\n")
-  //% self.expect("expr c->*2", endstr=" 2\n")
-  //% self.expect("expr c + 44", endstr=" 44\n")
-  //% self.expect("expr c += 42", endstr=" 42\n")
-  //% self.expect("expr c++", endstr=" 123\n")
-  //% self.expect("expr ++c", endstr=" 1234\n")
-  //% self.expect("expr c - 34", endstr=" 34\n")
-  //% self.expect("expr c -= 32", endstr=" 32\n")
-  //% self.expect("expr c--", endstr=" 4321\n")
-  //% self.expect("expr --c", endstr=" 321\n")
-  //% self.expect("expr c * 3", endstr=" 51\n")
-  //% self.expect("expr c *= 3", endstr=" 52\n")
-  //% self.expect("expr c % 3", endstr=" 53\n")
-  //% self.expect("expr c %= 3", endstr=" 54\n")
-  //% self.expect("expr c / 3", endstr=" 55\n")
-  //% self.expect("expr c /= 3", endstr=" 56\n")
-  //% self.expect("expr c ^ 3", endstr=" 57\n")
-  //% self.expect("expr c ^= 3", endstr=" 58\n")
-  //% self.expect("expr c | 3", endstr=" 61\n")
-  //% self.expect("expr c |= 3", endstr=" 62\n")
-  //% self.expect("expr c || 3", endstr=" 63\n")
-  //% self.expect("expr c & 3", endstr=" 64\n")
-  //% self.expect("expr c &= 3", endstr=" 65\n")
-  //% self.expect("expr c && 3", endstr=" 66\n")
-  //% self.expect("expr ~c", endstr=" 71\n")
-  //% self.expect("expr !c", endstr=" 72\n")
-  //% self.expect("expr c!=1", endstr=" 73\n")
-  //% self.expect("expr c=1", endstr=" 74\n")
-  //% self.expect("expr c==1", endstr=" 75\n")
-  //% self.expect("expr c<1", endstr=" 81\n")
-  //% self.expect("expr c<<1", endstr=" 82\n")
-  //% self.expect("expr c<=1", endstr=" 83\n")
-  //% self.expect("expr c<<=1", endstr=" 84\n")
-  //% self.expect("expr c>1", endstr=" 85\n")
-  //% self.expect("expr c>>1", endstr=" 86\n")
-  //% self.expect("expr c>=1", endstr=" 87\n")
-  //% self.expect("expr c>>=1", endstr=" 88\n")
-  //% self.expect("expr c,1", endstr=" 2012\n")
-  //% self.expect("expr &c", endstr=" 2013\n")
-  //% self.expect("expr c(1)", endstr=" 91\n")
-  //% self.expect("expr c[1]", endstr=" 92\n")
-  //% self.expect("expr static_cast<int>(c)", endstr=" 11\n")
-  //% self.expect("expr static_cast<long>(c)", endstr=" 12\n")
-  //% self.expect("expr c.operatorint()", endstr=" 13\n")
-  //% self.expect("expr c.operatornew()", endstr=" 14\n")
-  //% self.expect("expr (new C)->custom_new", endstr=" true\n")
-  //% self.expect("expr (new struct C[1])->custom_new", endstr=" true\n")
-  //% self.expect("expr delete c2; side_effect", endstr=" = 1\n")
-  //% self.expect("expr delete[] c3; side_effect", endstr=" = 2\n")
-  delete c2;
-  delete[] c3;
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/overloaded-functions/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/overloaded-functions/Makefile
deleted file mode 100644 (file)
index 1185ed0..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp static-a.cpp static-b.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/overloaded-functions/TestOverloadedFunctions.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/overloaded-functions/TestOverloadedFunctions.py
deleted file mode 100644 (file)
index ad969ef..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-"""
-Tests that functions with the same name are resolved correctly.
-"""
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class OverloadedFunctionsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        TestBase.setUp(self)
-        self.line = line_number('main.cpp', '// breakpoint')
-
-    def test_with_run_command(self):
-        """Test that functions with the same name are resolved correctly"""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("process launch", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list",
-                    STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped', 'stop reason = breakpoint'])
-
-        self.expect("expression -- Dump(myB)",
-                    startstr="(int) $0 = 2")
-
-        self.expect("expression -- Static()",
-                    startstr="(int) $1 = 1")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/overloaded-functions/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/overloaded-functions/main.cpp
deleted file mode 100644 (file)
index 250e2cd..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#include <stdio.h>
-
-struct A {
-    int aa;
-    char ab;
-};
-
-struct B {
-    int ba;
-    int bb;
-};
-
-struct C {
-    int ca;
-    int cb;
-};
-
-int Dump (A &a)
-{
-    return 1;
-}
-
-int Dump (B &b)
-{
-    return 2;
-}
-
-int Dump (C &c)
-{
-    return 3;
-}
-
-extern int CallStaticA();
-extern int CallStaticB();
-
-int main()
-{
-    A myA;
-    B myB;
-    C myC;
-
-    printf("%d\n", CallStaticA() + CallStaticB()); // breakpoint
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/overloaded-functions/static-a.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/overloaded-functions/static-a.cpp
deleted file mode 100644 (file)
index 7250fa4..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-static int Static()
-{
-  return 1;
-}
-
-int CallStaticA()
-{
-  return Static();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/overloaded-functions/static-b.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/overloaded-functions/static-b.cpp
deleted file mode 100644 (file)
index 90a20f6..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-static int Static()
-{
-  return 1;
-}
-
-int CallStaticB()
-{
-  return Static();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/printf/TestPrintf.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/printf/TestPrintf.py
deleted file mode 100644 (file)
index 10e400f..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-from lldbsuite.test import lldbinline, lldbplatformutil
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(
-    __file__, globals(), [
-        decorators.expectedFailureAll(
-            bugnumber="llvm.org/PR36715",
-            oslist=lldbplatformutil.getDarwinOSTriples()+['windows'])])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/printf/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/printf/main.cpp
deleted file mode 100644 (file)
index 27395eb..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-class PrintfContainer {
-public:
-    int printf() {
-        return 0;
-    }
-};
-
-int main() {
-    PrintfContainer().printf(); //% self.expect("expression -- printf(\"Hello\\n\")", substrs = ['6'])
-    return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/rvalue-references/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/rvalue-references/Makefile
deleted file mode 100644 (file)
index e891bb2..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-CXX_SOURCES := main.cpp
-
-CXXFLAGS_EXTRAS := -std=c++11
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/rvalue-references/TestRvalueReferences.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/rvalue-references/TestRvalueReferences.py
deleted file mode 100644 (file)
index 5e31d93..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-"""
-Tests that rvalue references are supported in C++
-"""
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class RvalueReferencesTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # rdar://problem/11479676
-    @expectedFailureAll(
-        compiler="icc",
-        bugnumber="ICC (13.1, 14-beta) do not emit DW_TAG_rvalue_reference_type.")
-    def test_with_run_command(self):
-        """Test that rvalues are supported in the C++ expression parser"""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        self.set_breakpoint(line_number('main.cpp', '// breakpoint 1'))
-        self.set_breakpoint(line_number('main.cpp', '// breakpoint 2'))
-
-        self.runCmd("process launch", RUN_SUCCEEDED)
-
-        # Note that clang as of r187480 doesn't emit DW_TAG_const_type, unlike gcc 4.8.1
-        # With gcc 4.8.1, lldb reports the type as (int &&const)
-        self.expect("frame variable i",
-                    startstr="(int &&",
-                    substrs=["i = 0x", "&i = 3"])
-
-        self.expect("expression -- i",
-                    startstr="(int) ",
-                    substrs=["3"])
-
-        self.expect("breakpoint delete 1")
-
-        self.runCmd("process continue")
-
-        self.expect("expression -- foo(2)")
-
-        self.expect("expression -- int &&j = 3; foo(j)",
-                    error=True)
-
-        self.expect("expression -- int &&k = 6; k",
-                    startstr="(int) $1 = 6")
-
-    def set_breakpoint(self, line):
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", line, num_expected_locations=1, loc_exact=True)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/rvalue-references/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/rvalue-references/main.cpp
deleted file mode 100644 (file)
index 6da34c7..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#include <stdio.h>
-
-void foo (int &&i)
-{
-  printf("%d\n", i); // breakpoint 1
-}
-
-int main()
-{
-  foo(3);
-  return 0; // breakpoint 2
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/scope/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/scope/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/scope/TestCppScope.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/scope/TestCppScope.py
deleted file mode 100644 (file)
index 213e7fb..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-"""
-Test scopes in C++.
-"""
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestCppScopes(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24764")
-    def test_all_but_c(self):
-        self.do_test(False)
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24764")
-    def test_c(self):
-        self.do_test(True)
-
-    def do_test(self, test_c):
-        self.build()
-
-        # Get main source file
-        src_file = os.path.join(self.getSourceDir(), "main.cpp")
-        src_file_spec = lldb.SBFileSpec(src_file)
-        self.assertTrue(src_file_spec.IsValid(), "Main source file")
-
-        # Get the path of the executable
-        exe_path = self.getBuildArtifact("a.out")
-
-        # Load the executable
-        target = self.dbg.CreateTarget(exe_path)
-        self.assertTrue(target.IsValid(), VALID_TARGET)
-
-        # Break on main function
-        main_breakpoint = target.BreakpointCreateBySourceRegex(
-            "// break here", src_file_spec)
-        self.assertTrue(
-            main_breakpoint.IsValid() and main_breakpoint.GetNumLocations() >= 1,
-            VALID_BREAKPOINT)
-
-        # Launch the process
-        args = None
-        env = None
-        process = target.LaunchSimple(
-            args, env, self.get_process_working_directory())
-        self.assertTrue(process.IsValid(), PROCESS_IS_VALID)
-
-        # Get the thread of the process
-        self.assertTrue(
-            process.GetState() == lldb.eStateStopped,
-            PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-
-        # Get current fream of the thread at the breakpoint
-        frame = thread.GetSelectedFrame()
-
-        # Test result for scopes of variables
-
-        global_variables = frame.GetVariables(True, True, True, False)
-        global_variables_assert = {
-            'A::a': 1111,
-            'B::a': 2222,
-            'C::a': 3333,
-            '::a': 4444,
-            'a': 4444
-        }
-
-        self.assertTrue(
-            global_variables.GetSize() == 4,
-            "target variable returns all variables")
-        for variable in global_variables:
-            name = variable.GetName()
-            self.assertTrue(
-                name in global_variables_assert,
-                "target variable returns wrong variable " + name)
-
-        for name in global_variables_assert:
-            if name is "C::a" and not test_c:
-                continue
-            if name is not "C::a" and test_c:
-                continue
-
-            value = frame.EvaluateExpression(name)
-            assert_value = global_variables_assert[name]
-            self.assertTrue(
-                value.IsValid() and value.GetValueAsSigned() == assert_value,
-                name + " = " + str(assert_value))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/scope/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/scope/main.cpp
deleted file mode 100644 (file)
index da5d7ed..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-class A {
-public:
-    static int a;
-    int b;
-};
-
-class B {
-public:
-    static int a;
-    int b;
-};
-
-struct C {
-    static int a;
-};
-
-int A::a = 1111;
-int B::a = 2222;
-int C::a = 3333;
-int a = 4444;
-
-int main() // break here
-{
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/signed_types/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/signed_types/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/signed_types/TestSignedTypes.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/signed_types/TestSignedTypes.py
deleted file mode 100644 (file)
index f61cd64..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-"""
-Test that variables with signed types display correctly.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class SignedTypesTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.source = 'main.cpp'
-        self.line = line_number(
-            self.source, '// Set break point at this line.')
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24489")
-    def test(self):
-        """Test that variables with signed types display correctly."""
-        self.build()
-
-        # Run in synchronous mode
-        self.dbg.SetAsync(False)
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
-        self.assertTrue(target, VALID_TARGET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, self.source, self.line, num_expected_locations=1, loc_exact=True)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped', 'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        # Execute the puts().
-        self.runCmd("thread step-over")
-
-        # Test that signed types display correctly.
-        self.expect(
-            "frame variable --show-types --no-args",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            patterns=[
-                "\((short int|short)\) the_signed_short = 99",
-                "\((signed char|char)\) the_signed_char = 'c'"],
-            substrs=[
-                "(int) the_signed_int = 99",
-                "(long) the_signed_long = 99",
-                "(long long) the_signed_long_long = 99"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/signed_types/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/signed_types/main.cpp
deleted file mode 100644 (file)
index 4f180bb..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-int main (int argc, char const *argv[])
-{
-    char the_char = 'c';
-    short the_short = 'c';
-    wchar_t the_wchar_t = 'c';
-    int the_int = 'c';
-    long the_long = 'c';
-    long long the_long_long = 'c';
-
-    signed char the_signed_char = 'c';
-    signed short the_signed_short = 'c';
-    signed int the_signed_int = 'c';
-    signed long the_signed_long = 'c';
-    signed long long the_signed_long_long = 'c';
-    puts("");    // Set break point at this line.
-    return  the_char        - the_signed_char +
-            the_short       - the_signed_short +
-            the_int         - the_signed_int +
-            the_long        - the_signed_long +
-            the_long_long   - the_signed_long_long; //// break $source:$line; c
-    //// var the_int
-    //// val -set 22 1
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/static_members/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/static_members/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/static_members/TestCPPStaticMembers.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/static_members/TestCPPStaticMembers.py
deleted file mode 100644 (file)
index 4e02ebe..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-"""
-Tests that C++ member and static variables have correct layout and scope.
-"""
-
-
-
-import unittest2
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class CPPStaticMembersTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @unittest2.expectedFailure  # llvm.org/pr15401
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
-    def test_with_run_command(self):
-        """Test that member variables have the correct layout, scope and qualifiers when stopped inside and outside C++ methods"""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        self.set_breakpoint(line_number('main.cpp', '// breakpoint 1'))
-        self.set_breakpoint(line_number('main.cpp', '// breakpoint 2'))
-
-        self.runCmd("process launch", RUN_SUCCEEDED)
-        self.expect("expression my_a.access()",
-                    startstr="(long) $0 = 10")
-
-        self.expect("expression my_a.m_a",
-                    startstr="(short) $1 = 1")
-
-        # Note: SymbolFileDWARF::ParseChildMembers doesn't call
-        # AddFieldToRecordType, consistent with clang's AST layout.
-        self.expect("expression my_a.s_d",
-                    startstr="(int) $2 = 4")
-
-        self.expect("expression my_a.s_b",
-                    startstr="(long) $3 = 2")
-
-        self.expect("expression A::s_b",
-                    startstr="(long) $4 = 2")
-
-        # should not be available in global scope
-        self.expect("expression s_d",
-                    startstr="error: use of undeclared identifier 's_d'")
-
-        self.runCmd("process continue")
-        self.expect("expression m_c",
-                    startstr="(char) $5 = \'\\x03\'")
-
-        self.expect("expression s_b",
-                    startstr="(long) $6 = 2")
-
-        self.runCmd("process continue")
-
-    def set_breakpoint(self, line):
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", line, num_expected_locations=1, loc_exact=False)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/static_members/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/static_members/main.cpp
deleted file mode 100644 (file)
index ab8ae1b..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <stdio.h>
-
-struct A
-{
-    short m_a;
-    static long s_b;
-    char m_c;
-    static int s_d;
-
-    long access() {
-        return m_a + s_b + m_c + s_d; // breakpoint 2
-    }
-};
-
-long A::s_b = 2;
-int A::s_d = 4;
-
-int main()
-{
-    A my_a;
-    my_a.m_a = 1;
-    my_a.m_c = 3;
-
-    my_a.access(); // breakpoint 1 
-    return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/static_methods/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/static_methods/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/static_methods/TestCPPStaticMethods.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/static_methods/TestCPPStaticMethods.py
deleted file mode 100644 (file)
index 4b42267..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-"""
-Tests expressions that distinguish between static and non-static methods.
-"""
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class CPPStaticMethodsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        TestBase.setUp(self)
-        self.line = line_number('main.cpp', '// Break at this line')
-
-    def test_with_run_command(self):
-        """Test that static methods are properly distinguished from regular methods"""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("process launch", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list",
-                    STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped', 'stop reason = breakpoint'])
-
-        self.expect("expression -- A::getStaticValue()",
-                    startstr="(int) $0 = 5")
-
-        self.expect("expression -- my_a.getMemberValue()",
-                    startstr="(int) $1 = 3")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/static_methods/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/static_methods/main.cpp
deleted file mode 100644 (file)
index 4c57e09..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <stdio.h>
-
-class A
-{
-public:
-  static int getStaticValue();
-  int getMemberValue();
-  int a;
-};
-
-int A::getStaticValue()
-{
-  return 5;
-} 
-
-int A::getMemberValue()
-{
-  return a;
-}
-
-int main()
-{
-  A my_a;
-
-  my_a.a = 3;
-
-  printf("%d\n", A::getStaticValue()); // Break at this line
-  printf("%d\n", my_a.getMemberValue());
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/std-function-step-into-callable/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/std-function-step-into-callable/Makefile
deleted file mode 100644 (file)
index b016f00..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-CXX_SOURCES := main.cpp
-CXXFLAGS_EXTRAS := -std=c++11
-USE_LIBCPP := 1
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/std-function-step-into-callable/TestStdFunctionStepIntoCallable.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/std-function-step-into-callable/TestStdFunctionStepIntoCallable.py
deleted file mode 100644 (file)
index d667321..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-"""
-Test stepping into std::function
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class LibCxxFunctionSteppingIntoCallableTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @add_test_categories(["libc++"])
-    def test(self):
-        """Test that std::function as defined by libc++ is correctly printed by LLDB"""
-        self.build()
-
-        self.main_source = "main.cpp"
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-        self.source_foo_line = line_number(
-            self.main_source, '// Source foo start line')
-        self.source_lambda_f2_line = line_number(
-            self.main_source, '// Source lambda used by f2 start line')
-        self.source_lambda_f3_line = line_number(
-            self.main_source, '// Source lambda used by f3 start line')
-        self.source_bar_operator_line = line_number(
-            self.main_source, '// Source Bar::operator()() start line')
-        self.source_bar_add_num_line = line_number(
-            self.main_source, '// Source Bar::add_num start line')
-        self.source_main_invoking_f1 = line_number(
-            self.main_source, '// Source main invoking f1')
-
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
-            self, "// Set break point at this line.", self.main_source_spec)
-
-        thread.StepInto()
-        self.assertEqual( thread.GetFrameAtIndex(0).GetLineEntry().GetLine(), self.source_main_invoking_f1 ) ;
-        self.assertEqual( thread.GetFrameAtIndex(0).GetLineEntry().GetFileSpec().GetFilename(), self.main_source) ;
-
-        thread.StepInto()
-        self.assertEqual( thread.GetFrameAtIndex(0).GetLineEntry().GetLine(), self.source_foo_line ) ;
-        self.assertEqual( thread.GetFrameAtIndex(0).GetLineEntry().GetFileSpec().GetFilename(), self.main_source) ;
-        process.Continue()
-
-        thread.StepInto()
-        self.assertEqual( thread.GetFrameAtIndex(0).GetLineEntry().GetLine(), self.source_lambda_f2_line ) ;
-        self.assertEqual( thread.GetFrameAtIndex(0).GetLineEntry().GetFileSpec().GetFilename(), self.main_source) ;
-        process.Continue()
-
-        thread.StepInto()
-        self.assertEqual( thread.GetFrameAtIndex(0).GetLineEntry().GetLine(), self.source_lambda_f3_line ) ;
-        self.assertEqual( thread.GetFrameAtIndex(0).GetLineEntry().GetFileSpec().GetFilename(), self.main_source) ;
-        process.Continue()
-
-        # TODO reenable this case when std::function formatter supports
-        # general callable object case.
-        #thread.StepInto()
-        #self.assertEqual( thread.GetFrameAtIndex(0).GetLineEntry().GetLine(), self.source_bar_operator_line ) ;
-        #self.assertEqual( thread.GetFrameAtIndex(0).GetLineEntry().GetFileSpec().GetFilename(), self.main_source) ;
-        #process.Continue()
-
-        thread.StepInto()
-        self.assertEqual( thread.GetFrameAtIndex(0).GetLineEntry().GetLine(), self.source_bar_add_num_line ) ;
-        self.assertEqual( thread.GetFrameAtIndex(0).GetLineEntry().GetFileSpec().GetFilename(), self.main_source) ;
-        process.Continue()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/std-function-step-into-callable/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/std-function-step-into-callable/main.cpp
deleted file mode 100644 (file)
index ebbb05e..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#include <functional>
-
-int foo(int x, int y) {
-  return x + y - 1; // Source foo start line
-}
-
-struct Bar {
-   int operator()() {
-       return 66 ; // Source Bar::operator()() start line
-   }
-   int add_num(int i) const { return i + 3 ; } // Source Bar::add_num start line
-   int num_ = 0 ;
-} ;
-
-int main (int argc, char *argv[])
-{
-  int acc = 42;
-  std::function<int (int,int)> f1 = foo;
-  std::function<int (int)> f2 = [acc,f1] (int x) -> int {
-    return x+f1(acc,x); // Source lambda used by f2 start line
-  };
-
-  auto f = [](int x, int y) { return x + y; }; // Source lambda used by f3 start line
-  auto g = [](int x, int y) { return x * y; } ;
-  std::function<int (int,int)> f3 =  argc %2 ? f : g ;
-
-  Bar bar1 ;
-  std::function<int ()> f4( bar1 ) ;
-  std::function<int (const Bar&, int)> f5 = &Bar::add_num;
-  std::function<int(Bar const&)> f_mem = &Bar::num_;
-
-  return f_mem(bar1) +     // Set break point at this line.
-         f1(acc,acc) +     // Source main invoking f1
-         f2(acc) +         // Set break point at this line.
-         f3(acc+1,acc+2) + // Set break point at this line.
-         // TODO reenable this case when std::function formatter supports
-         // general callable object case.
-         //f4() +            // Set break point at this line.
-         f5(bar1, 10);     // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/Makefile
deleted file mode 100644 (file)
index a4b03ae..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CXX_SOURCES := main.cpp
-CFLAGS := -g -O0
-
-clean: OBJECTS+=$(wildcard main.d.*)
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/TestSTL.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/TestSTL.py
deleted file mode 100644 (file)
index 341b205..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-"""
-Test some expressions involving STL data types.
-"""
-
-
-
-import unittest2
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class STLTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.source = 'main.cpp'
-        self.line = line_number(
-            self.source, '// Set break point at this line.')
-
-    @skipIf
-    @expectedFailureAll(bugnumber="llvm.org/PR36713")
-    def test(self):
-        """Test some expressions involving STL data types."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # The following two lines, if uncommented, will enable loggings.
-        #self.ci.HandleCommand("log enable -f /tmp/lldb.log lldb default", res)
-        # self.assertTrue(res.Succeeded())
-
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # Stop at 'std::string hello_world ("Hello World!");'.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['main.cpp:%d' % self.line,
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        # Now try some expressions....
-
-        self.runCmd(
-            'expr for (int i = 0; i < hello_world.length(); ++i) { (void)printf("%c\\n", hello_world[i]); }')
-
-        self.expect('expr associative_array.size()',
-                    substrs=[' = 3'])
-        self.expect('expr associative_array.count(hello_world)',
-                    substrs=[' = 1'])
-        self.expect('expr associative_array[hello_world]',
-                    substrs=[' = 1'])
-        self.expect('expr associative_array["hello"]',
-                    substrs=[' = 2'])
-
-    @expectedFailureAll(
-        compiler="icc",
-        bugnumber="ICC (13.1, 14-beta) do not emit DW_TAG_template_type_parameter.")
-    @add_test_categories(['pyapi'])
-    def test_SBType_template_aspects(self):
-        """Test APIs for getting template arguments from an SBType."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Create the breakpoint inside function 'main'.
-        breakpoint = target.BreakpointCreateByLocation(self.source, self.line)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Get Frame #0.
-        self.assertTrue(process.GetState() == lldb.eStateStopped)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint condition")
-        frame0 = thread.GetFrameAtIndex(0)
-
-        # Get the type for variable 'associative_array'.
-        associative_array = frame0.FindVariable('associative_array')
-        self.DebugSBValue(associative_array)
-        self.assertTrue(associative_array, VALID_VARIABLE)
-        map_type = associative_array.GetType()
-        self.DebugSBType(map_type)
-        self.assertTrue(map_type, VALID_TYPE)
-        num_template_args = map_type.GetNumberOfTemplateArguments()
-        self.assertTrue(num_template_args > 0)
-
-        # We expect the template arguments to contain at least 'string' and
-        # 'int'.
-        expected_types = {'string': False, 'int': False}
-        for i in range(num_template_args):
-            t = map_type.GetTemplateArgumentType(i)
-            self.DebugSBType(t)
-            self.assertTrue(t, VALID_TYPE)
-            name = t.GetName()
-            if 'string' in name:
-                expected_types['string'] = True
-            elif 'int' == name:
-                expected_types['int'] = True
-
-        # Check that both entries of the dictionary have 'True' as the value.
-        self.assertTrue(all(expected_types.values()))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/TestStdCXXDisassembly.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/TestStdCXXDisassembly.py
deleted file mode 100644 (file)
index 49aa16c..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-"""
-Test the lldb disassemble command on lib stdc++.
-"""
-
-from __future__ import print_function
-
-
-import unittest2
-import os
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.decorators import *
-
-class StdCXXDisassembleTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    @skipIfWindows
-    @expectedFailureNetBSD
-    def test_stdcxx_disasm(self):
-        """Do 'disassemble' on each and every 'Code' symbol entry from the std c++ lib."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # rdar://problem/8543077
-        # test/stl: clang built binaries results in the breakpoint locations = 3,
-        # is this a problem with clang generated debug info?
-        #
-        # Break on line 13 of main.cpp.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # Now let's get the target as well as the process objects.
-        target = self.dbg.GetSelectedTarget()
-        process = target.GetProcess()
-
-        # The process should be in a 'stopped' state.
-        self.expect(str(process), STOPPED_DUE_TO_BREAKPOINT, exe=False,
-                    substrs=["a.out",
-                             "stopped"])
-
-        # Disassemble the functions on the call stack.
-        self.runCmd("thread backtrace")
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertIsNotNone(thread)
-        depth = thread.GetNumFrames()
-        for i in range(depth - 1):
-            frame = thread.GetFrameAtIndex(i)
-            function = frame.GetFunction()
-            if function.GetName():
-                self.runCmd("disassemble -n '%s'" % function.GetName())
-
-        lib_stdcxx = "FAILHORRIBLYHERE"
-        # Iterate through the available modules, looking for stdc++ library...
-        for i in range(target.GetNumModules()):
-            module = target.GetModuleAtIndex(i)
-            fs = module.GetFileSpec()
-            if (fs.GetFilename().startswith("libstdc++")
-                    or fs.GetFilename().startswith("libc++")):
-                lib_stdcxx = str(fs)
-                break
-
-        # At this point, lib_stdcxx is the full path to the stdc++ library and
-        # module is the corresponding SBModule.
-
-        self.expect(lib_stdcxx, "Libraray StdC++ is located", exe=False,
-                    substrs=["lib"])
-
-        self.runCmd("image dump symtab '%s'" % lib_stdcxx)
-        raw_output = self.res.GetOutput()
-        # Now, look for every 'Code' symbol and feed its load address into the
-        # command: 'disassemble -s load_address -e end_address', where the
-        # end_address is taken from the next consecutive 'Code' symbol entry's
-        # load address.
-        #
-        # The load address column comes after the file address column, with both
-        # looks like '0xhhhhhhhh', i.e., 8 hexadecimal digits.
-        codeRE = re.compile(r"""
-                             \ Code\ {9}      # ' Code' followed by 9 SPCs,
-                             0x[0-9a-f]{16}   # the file address column, and
-                             \                # a SPC, and
-                             (0x[0-9a-f]{16}) # the load address column, and
-                             .*               # the rest.
-                             """, re.VERBOSE)
-        # Maintain a start address variable; if we arrive at a consecutive Code
-        # entry, then the load address of the that entry is fed as the end
-        # address to the 'disassemble -s SA -e LA' command.
-        SA = None
-        for line in raw_output.split(os.linesep):
-            match = codeRE.search(line)
-            if match:
-                LA = match.group(1)
-                if self.TraceOn():
-                    print("line:", line)
-                    print("load address:", LA)
-                    print("SA:", SA)
-                if SA and LA:
-                    if int(LA, 16) > int(SA, 16):
-                        self.runCmd("disassemble -s %s -e %s" % (SA, LA))
-                SA = LA
-            else:
-                # This entry is not a Code entry.  Reset SA = None.
-                SA = None
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/cmds.txt b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/cmds.txt
deleted file mode 100644 (file)
index 9c9c2e3..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-b main.cpp:6
-continue
-var
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/main.cpp
deleted file mode 100644 (file)
index 8989519..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <cstdio>
-#include <iostream>
-#include <string>
-#include <map>
-int main (int argc, char const *argv[])
-{
-    std::string hello_world ("Hello World!");
-    std::cout << hello_world << std::endl;
-    std::cout << hello_world.length() << std::endl;
-    std::cout << hello_world[11] << std::endl;
-
-    std::map<std::string, int> associative_array;
-    std::cout << "size of upon construction associative_array: " << associative_array.size() << std::endl;
-    associative_array[hello_world] = 1;
-    associative_array["hello"] = 2;
-    associative_array["world"] = 3;
-
-    std::cout << "size of associative_array: " << associative_array.size() << std::endl;
-    printf("associative_array[\"hello\"]=%d\n", associative_array["hello"]);
-
-    printf("before returning....\n"); // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/symbols/TestSymbols.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/symbols/TestSymbols.py
deleted file mode 100644 (file)
index af362f5..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(
-    __file__, globals(), [
-        decorators.expectedFailureAll(
-            oslist=["windows"], bugnumber="llvm.org/pr24764")])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/symbols/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/symbols/main.cpp
deleted file mode 100644 (file)
index cbd3ab2..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-void *D = 0;
-
-class D {
-    static int i;
-};
-
-int D::i = 3;
-
-namespace errno {
-    int j = 4;
-};
-
-int twice(int n)
-{
-    return n * 2; //% self.expect("expression -- D::i", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["int", "3"])
-                  //% self.expect("expression -- D", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["void"])
-                  //% self.expect("expression -- errno::j", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["int", "4"])
-}
-
-const char getAChar()
-{
-    const char D[] = "Hello world";
-    return D[0];  //% self.expect("expression -- D::i", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["int", "3"])
-                  //% self.expect("expression -- D", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["char", "Hello"])
-}
-
-int main (int argc, char const *argv[])
-{
-    int six = twice(3);
-    return 0; 
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/template-function/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/template-function/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/template-function/TestTemplateFunctions.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/template-function/TestTemplateFunctions.py
deleted file mode 100644 (file)
index 6c9a0ac..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-"""
-Test that we can call C++ template fucntions.
-"""
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TemplateFunctionsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def do_test_template_function(self, add_cast):
-        self.build()
-        (_, _, thread, _) = lldbutil.run_to_name_breakpoint(self, "main")
-        frame = thread.GetSelectedFrame()
-        expr = "foo(42)"
-        if add_cast:
-            expr = "(int)" + expr
-        expr_result = frame.EvaluateExpression(expr)
-        self.assertTrue(expr_result.IsValid())
-        self.assertEqual(expr_result.GetValue(), "42")
-
-    @skipIfWindows
-    def test_template_function_with_cast(self):
-        self.do_test_template_function(True)
-
-    @skipIfWindows
-    @expectedFailureAll(debug_info=["dwarf", "gmodules", "dwo"])
-    def test_template_function_without_cast(self):
-        self.do_test_template_function(False)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/template-function/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/template-function/main.cpp
deleted file mode 100644 (file)
index 035e645..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-template<typename T>
-int foo(T t1) {
-        return int(t1);
-}
-
-int main() {
-        return foo(42);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/template/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/template/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/template/TestTemplateArgs.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/template/TestTemplateArgs.py
deleted file mode 100644 (file)
index 0813270..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-"""
-Test that C++ template classes that have integer parameters work correctly.
-
-We must reconstruct the types correctly so the template types are correct
-and display correctly, and also make sure the expression parser works and
-is able the find all needed functions when evaluating expressions
-"""
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TemplateArgsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def prepareProcess(self):
-        self.build()
-
-        # Create a target by the debugger.
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Set breakpoints inside and outside methods that take pointers to the
-        # containing struct.
-        line = line_number('main.cpp', '// Breakpoint 1')
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", line, num_expected_locations=1, loc_exact=True)
-
-        arguments = None
-        environment = None
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            arguments, environment, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Get the thread of the process
-        self.assertTrue(
-            process.GetState() == lldb.eStateStopped,
-            PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-
-        # Get frame for current thread
-        return thread.GetSelectedFrame()
-
-    def test_integer_args(self):
-        frame = self.prepareProcess()
-
-        testpos = frame.FindVariable('testpos')
-        self.assertTrue(
-            testpos.IsValid(),
-            'make sure we find a local variabble named "testpos"')
-        self.assertTrue(testpos.GetType().GetName() == 'TestObj<1>')
-
-        expr_result = frame.EvaluateExpression("testpos.getArg()")
-        self.assertTrue(
-            expr_result.IsValid(),
-            'got a valid expression result from expression "testpos.getArg()"')
-        self.assertTrue(expr_result.GetValue() == "1", "testpos.getArg() == 1")
-        self.assertTrue(
-            expr_result.GetType().GetName() == "int",
-            'expr_result.GetType().GetName() == "int"')
-
-        testneg = frame.FindVariable('testneg')
-        self.assertTrue(
-            testneg.IsValid(),
-            'make sure we find a local variabble named "testneg"')
-        self.assertTrue(testneg.GetType().GetName() == 'TestObj<-1>')
-
-        expr_result = frame.EvaluateExpression("testneg.getArg()")
-        self.assertTrue(
-            expr_result.IsValid(),
-            'got a valid expression result from expression "testneg.getArg()"')
-        self.assertTrue(
-            expr_result.GetValue() == "-1",
-            "testneg.getArg() == -1")
-        self.assertTrue(
-            expr_result.GetType().GetName() == "int",
-            'expr_result.GetType().GetName() == "int"')
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24489")
-    def test_template_template_args(self):
-        frame = self.prepareProcess()
-
-        c1 = frame.FindVariable('c1')
-        self.assertTrue(
-            c1.IsValid(),
-            'make sure we find a local variabble named "c1"')
-        self.assertTrue(c1.GetType().GetName() == 'C<float, T1>')
-        f1 = c1.GetChildMemberWithName("V").GetChildAtIndex(0).GetChildMemberWithName("f")
-        self.assertTrue(f1.GetType().GetName() == 'float')
-        self.assertTrue(f1.GetValue() == '1.5')
-
-        c2 = frame.FindVariable('c2')
-        self.assertTrue(
-            c2.IsValid(),
-            'make sure we find a local variabble named "c2"')
-        self.assertTrue(c2.GetType().GetName() == 'C<double, T1, T2>')
-        f2 = c2.GetChildMemberWithName("V").GetChildAtIndex(0).GetChildMemberWithName("f")
-        self.assertTrue(f2.GetType().GetName() == 'double')
-        self.assertTrue(f2.GetValue() == '1.5')
-        f3 = c2.GetChildMemberWithName("V").GetChildAtIndex(1).GetChildMemberWithName("f")
-        self.assertTrue(f3.GetType().GetName() == 'double')
-        self.assertTrue(f3.GetValue() == '2.5')
-        f4 = c2.GetChildMemberWithName("V").GetChildAtIndex(1).GetChildMemberWithName("i")
-        self.assertTrue(f4.GetType().GetName() == 'int')
-        self.assertTrue(f4.GetValue() == '42')
-
-    # Gcc does not generate the necessary DWARF attribute for enum template
-    # parameters.
-    @expectedFailureAll(bugnumber="llvm.org/pr28354", compiler="gcc")
-    @skipIf(dwarf_version=['<', '4'])
-    def test_enum_args(self):
-        frame = self.prepareProcess()
-
-        # Make sure "member" can be displayed and also used in an expression
-        # correctly
-        member = frame.FindVariable('member')
-        self.assertTrue(
-            member.IsValid(),
-            'make sure we find a local variabble named "member"')
-        self.assertTrue(member.GetType().GetName() ==
-                        'EnumTemplate<EnumType::Member>')
-
-        expr_result = frame.EvaluateExpression("member.getMember()")
-        self.assertTrue(
-            expr_result.IsValid(),
-            'got a valid expression result from expression "member.getMember()"')
-        self.assertTrue(
-            expr_result.GetValue() == "123",
-            "member.getMember() == 123")
-        self.assertTrue(
-            expr_result.GetType().GetName() == "int",
-            'expr_result.GetType().GetName() == "int"')
-
-        # Make sure "subclass" can be displayed and also used in an expression
-        # correctly
-        subclass = frame.FindVariable('subclass')
-        self.assertTrue(
-            subclass.IsValid(),
-            'make sure we find a local variabble named "subclass"')
-        self.assertTrue(subclass.GetType().GetName() ==
-                        'EnumTemplate<EnumType::Subclass>')
-
-        expr_result = frame.EvaluateExpression("subclass.getMember()")
-        self.assertTrue(
-            expr_result.IsValid(),
-            'got a valid expression result from expression "subclass.getMember()"')
-        self.assertTrue(
-            expr_result.GetValue() == "246",
-            "subclass.getMember() == 246")
-        self.assertTrue(
-            expr_result.GetType().GetName() == "int",
-            'expr_result.GetType().GetName() == "int"')
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/template/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/template/main.cpp
deleted file mode 100644 (file)
index 445a34f..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <tuple>
-
-template <int Arg>
-class TestObj
-{
-public:
-  int getArg()
-  {
-    return Arg;
-  }
-};
-
-//----------------------------------------------------------------------
-// Define a template class that we can specialize with an enumeration
-//----------------------------------------------------------------------
-enum class EnumType
-{
-    Member,
-    Subclass
-};
-
-template <EnumType Arg> class EnumTemplate;
-                                          
-//----------------------------------------------------------------------
-// Specialization for use when "Arg" is "EnumType::Member"
-//----------------------------------------------------------------------
-template <>
-class EnumTemplate<EnumType::Member> 
-{
-public:
-    EnumTemplate(int m) :
-        m_member(m)
-    {
-    }
-
-    int getMember() const
-    {
-        return m_member;
-    }
-
-protected:
-    int m_member;
-};
-
-//----------------------------------------------------------------------
-// Specialization for use when "Arg" is "EnumType::Subclass"
-//----------------------------------------------------------------------
-template <>
-class EnumTemplate<EnumType::Subclass> : 
-    public EnumTemplate<EnumType::Member> 
-{
-public:
-    EnumTemplate(int m) : EnumTemplate<EnumType::Member>(m)
-    {
-    }    
-};
-
-template <typename FLOAT> struct T1 { FLOAT f = 1.5; };
-template <typename FLOAT> struct T2 { FLOAT f = 2.5; int i = 42; };
-template <typename FLOAT, template <typename> class ...Args> class C { std::tuple<Args<FLOAT>...> V; };
-
-int main(int argc, char **argv)
-{
-  TestObj<1> testpos;
-  TestObj<-1> testneg;
-  EnumTemplate<EnumType::Member> member(123);
-  EnumTemplate<EnumType::Subclass> subclass(123*2);
-  C<float, T1> c1;
-  C<double, T1, T2> c2;
-  return testpos.getArg() - testneg.getArg() + member.getMember()*2 - subclass.getMember(); // Breakpoint 1
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/this/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/this/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/this/TestCPPThis.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/this/TestCPPThis.py
deleted file mode 100644 (file)
index ab95627..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-"""
-Tests that C++ member and static variables are available where they should be.
-"""
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class CPPThisTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # rdar://problem/9962849
-    @expectedFailureAll(
-        compiler="gcc",
-        bugnumber="llvm.org/pr15439 The 'this' pointer isn't available during expression evaluation when stopped in an inlined member function")
-    @expectedFailureAll(
-        compiler="icc",
-        bugnumber="ICC doesn't emit correct DWARF inline debug info for inlined member functions.")
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows")
-    @expectedFailureNetBSD
-    def test_with_run_command(self):
-        """Test that the appropriate member variables are available when stopped in C++ static, inline, and const methods"""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        self.set_breakpoint(line_number('main.cpp', '// breakpoint 1'))
-        self.set_breakpoint(line_number('main.cpp', '// breakpoint 2'))
-        self.set_breakpoint(line_number('main.cpp', '// breakpoint 3'))
-        self.set_breakpoint(line_number('main.cpp', '// breakpoint 4'))
-
-        self.runCmd("process launch", RUN_SUCCEEDED)
-
-        self.expect("expression -- m_a = 2",
-                    startstr="(int) $0 = 2")
-
-        self.runCmd("process continue")
-
-        # This would be disallowed if we enforced const.  But we don't.
-        self.expect("expression -- m_a = 2",
-                    startstr="(int) $1 = 2")
-
-        self.expect("expression -- (int)getpid(); m_a",
-                    startstr="(int) $2 = 2")
-
-        self.runCmd("process continue")
-
-        self.expect("expression -- s_a",
-                    startstr="(int) $3 = 5")
-
-        self.runCmd("process continue")
-
-        self.expect("expression -- m_a",
-                    startstr="(int) $4 = 2")
-
-    def set_breakpoint(self, line):
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", line, num_expected_locations=1, loc_exact=False)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/this/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/this/main.cpp
deleted file mode 100644 (file)
index 4026de0..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <stdio.h>
-
-template <class T> class A
-{
-public:
-  void accessMember(T a);
-  T accessMemberConst() const;
-  static int accessStaticMember();
-
-  void accessMemberInline(T a) __attribute__ ((always_inline))
-  {
-    m_a = a; // breakpoint 4
-  }
-
-  T m_a;
-  static int s_a;
-};
-
-template <class T> int A<T>::s_a = 5;
-
-template <class T> void A<T>::accessMember(T a)
-{
-  m_a = a; // breakpoint 1
-}
-
-template <class T> T A<T>::accessMemberConst() const
-{
-  return m_a; // breakpoint 2
-}
-
-template <class T> int A<T>::accessStaticMember()
-{
-  return s_a; // breakpoint 3
-} 
-
-int main()
-{
-  A<int> my_a;
-
-  my_a.accessMember(3);
-  my_a.accessMemberConst();
-  A<int>::accessStaticMember();
-  my_a.accessMemberInline(5);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/thread_local/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/thread_local/Makefile
deleted file mode 100644 (file)
index 3d0b98f..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-CXX_SOURCES := main.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/thread_local/TestThreadLocal.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/thread_local/TestThreadLocal.py
deleted file mode 100644 (file)
index 5152c00..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__, globals(),
-                          lldbinline.expectedFailureAll(oslist=[
-                              "windows", "linux", "netbsd"]))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/thread_local/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/thread_local/main.cpp
deleted file mode 100644 (file)
index 1855b7c..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-int storage = 45;
-thread_local int tl_global_int = 123;
-thread_local int *tl_global_ptr = &storage;
-
-int main(int argc, char **argv) {
-  //% self.expect("expr tl_local_int", error=True, substrs=["couldn't get the value of variable tl_local_int"])
-  //% self.expect("expr *tl_local_ptr", error=True, substrs=["couldn't get the value of variable tl_local_ptr"])
-  thread_local int tl_local_int = 321;
-  thread_local int *tl_local_ptr = nullptr;
-  tl_local_ptr = &tl_local_int;
-  tl_local_int++;
-  //% self.expect("expr tl_local_int + 1", substrs=["int", "= 323"])
-  //% self.expect("expr *tl_local_ptr + 2", substrs=["int", "= 324"])
-  //% self.expect("expr tl_global_int", substrs=["int", "= 123"])
-  //% self.expect("expr *tl_global_ptr", substrs=["int", "= 45"])
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/trivial_abi/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/trivial_abi/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/trivial_abi/TestTrivialABI.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/trivial_abi/TestTrivialABI.py
deleted file mode 100644 (file)
index 2a8a78a..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-"""
-Test that we work properly with classes with the trivial_abi attribute
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestTrivialABI(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @skipUnlessSupportedTypeAttribute("trivial_abi")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr37995")
-    @expectedFailureAll(archs=["aarch64"], oslist=["linux"],
-                        bugnumber="llvm.org/pr44161")
-    def test_call_trivial(self):
-        """Test that we can print a variable & call a function with a trivial ABI class."""
-        self.build()
-        self.main_source_file = lldb.SBFileSpec("main.cpp")
-        self.expr_test(True)
-
-    @skipUnlessSupportedTypeAttribute("trivial_abi")
-    # fixed for SysV-x86_64 ABI, but not Windows-x86_64
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr36870")
-    @expectedFailureAll(archs=["aarch64"], oslist=["linux"],
-                        bugnumber="llvm.org/pr44161")
-    @expectedFailureAll(archs=["arm64", "arm64e"], bugnumber="<rdar://problem/57844240>")
-    def test_call_nontrivial(self):
-        """Test that we can print a variable & call a function on the same class w/o the trivial ABI marker."""
-        self.build()
-        self.main_source_file = lldb.SBFileSpec("main.cpp")
-        self.expr_test(False)
-
-    def check_value(self, test_var, ivar_value):
-        self.assertTrue(test_var.GetError().Success(), "Invalid valobj: %s"%(test_var.GetError().GetCString()))
-        ivar = test_var.GetChildMemberWithName("ivar")
-        self.assertTrue(test_var.GetError().Success(), "Failed to fetch ivar")
-        self.assertEqual(ivar_value, ivar.GetValueAsSigned(), "Got the right value for ivar")
-
-    def check_frame(self, thread):
-        frame = thread.frames[0]
-        inVal_var = frame.FindVariable("inVal")
-        self.check_value(inVal_var, 10)
-
-        options = lldb.SBExpressionOptions()
-        inVal_expr = frame.EvaluateExpression("inVal", options)
-        self.check_value(inVal_expr, 10)
-
-        thread.StepOut()
-        outVal_ret = thread.GetStopReturnValue()
-        self.check_value(outVal_ret, 30)
-
-    def expr_test(self, trivial):
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                   "Set a breakpoint here", self.main_source_file)
-
-        # Stop in a function that takes a trivial value, and try both frame var & expr to get its value:
-        if trivial:
-            self.check_frame(thread)
-            return
-
-        # Now continue to the same thing without the trivial_abi and see if we get that right:
-        threads = lldbutil.continue_to_breakpoint(process, bkpt)
-        self.assertEqual(len(threads), 1, "Hit my breakpoint the second time.")
-
-        self.check_frame(threads[0])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/trivial_abi/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/trivial_abi/main.cpp
deleted file mode 100644 (file)
index b1f5015..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-struct __attribute__((trivial_abi)) S_Trivial {
-  ~S_Trivial() {}
-  int ivar = 10;
-};
-
-S_Trivial takeTrivial(S_Trivial inVal)
-{
-  S_Trivial ret_val = inVal;
-  ret_val.ivar = 30;
-  return ret_val;   // Set a breakpoint here
-}
-
-struct S_NotTrivial {
-  ~S_NotTrivial() {}
-  int ivar = 10;
-};
-
-S_NotTrivial takeNotTrivial(S_NotTrivial inVal)
-{
-  S_NotTrivial ret_val = inVal;
-  ret_val.ivar = 30;
-  return ret_val;   // Set a breakpoint here
-}
-
-int
-main()
-{
-  S_Trivial inVal, outVal;
-  outVal = takeTrivial(inVal);
-
-  S_NotTrivial inNotVal, outNotVal;
-  outNotVal = takeNotTrivial(inNotVal);
-
-  return 0; // Set another for return value
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/type_lookup/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/type_lookup/Makefile
deleted file mode 100644 (file)
index 3d0b98f..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-CXX_SOURCES := main.cpp
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/type_lookup/TestCppTypeLookup.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/type_lookup/TestCppTypeLookup.py
deleted file mode 100644 (file)
index 45be731..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-"""
-Test that we can lookup types correctly in the expression parser
-"""
-
-
-
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import decorators
-
-class TestCppTypeLookup(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def check_value(self, value, ivar_name, ivar_value):
-        self.assertTrue(value.GetError().Success(),
-                        "Invalid valobj: %s" % (
-                                value.GetError().GetCString()))
-        ivar = value.GetChildMemberWithName(ivar_name)
-        self.assertTrue(ivar.GetError().Success(),
-                        "Failed to fetch ivar named '%s'" % (ivar_name))
-        self.assertEqual(ivar_value,
-                         ivar.GetValueAsSigned(),
-                         "Got the right value for ivar")
-
-    def test_namespace_only(self):
-        """
-            Test that we fail to lookup a struct type that exists only in a
-            namespace.
-        """
-        self.build()
-        self.main_source_file = lldb.SBFileSpec("main.cpp")
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
-            self, "Set a breakpoint here", self.main_source_file)
-
-        # Get frame for current thread
-        frame = thread.GetSelectedFrame()
-
-        # We are testing LLDB's type lookup machinery, but if we inject local
-        # variables, the types for those will be found because they have been
-        # imported through the variable, not because the type lookup worked.
-        self.runCmd("settings set target.experimental.inject-local-vars false")
-
-        # Make sure we don't accidentally accept structures that exist only
-        # in namespaces when evaluating expressions with top level types.
-        # Prior to the revision that added this test, we would accidentally
-        # accept types from namespaces, so this will ensure we don't regress
-        # to that behavior again
-        expr_result = frame.EvaluateExpression("*((namespace_only *)&i)")
-        self.assertTrue(expr_result.GetError().Fail(),
-                        "'namespace_only' exists in namespace only")
-
-        # Make sure we can find the correct type in a namespace "nsp_a"
-        expr_result = frame.EvaluateExpression("*((nsp_a::namespace_only *)&i)")
-        self.check_value(expr_result, "a", 123)
-        # Make sure we can find the correct type in a namespace "nsp_b"
-        expr_result = frame.EvaluateExpression("*((nsp_b::namespace_only *)&i)")
-        self.check_value(expr_result, "b", 123)
-
-        # Make sure we can find the correct type in the root namespace
-        expr_result = frame.EvaluateExpression("*((namespace_and_file *)&i)")
-        self.check_value(expr_result, "ff", 123)
-        # Make sure we can find the correct type in a namespace "nsp_a"
-        expr_result = frame.EvaluateExpression(
-                "*((nsp_a::namespace_and_file *)&i)")
-        self.check_value(expr_result, "aa", 123)
-        # Make sure we can find the correct type in a namespace "nsp_b"
-        expr_result = frame.EvaluateExpression(
-                "*((nsp_b::namespace_and_file *)&i)")
-        self.check_value(expr_result, "bb", 123)
-
-        # Make sure we don't accidentally accept structures that exist only
-        # in namespaces when evaluating expressions with top level types.
-        # Prior to the revision that added this test, we would accidentally
-        # accept types from namespaces, so this will ensure we don't regress
-        # to that behavior again
-        expr_result = frame.EvaluateExpression("*((in_contains_type *)&i)")
-        self.assertTrue(expr_result.GetError().Fail(),
-                        "'in_contains_type' exists in struct only")
-
-        # Make sure we can find the correct type in the root namespace
-        expr_result = frame.EvaluateExpression(
-                "*((contains_type::in_contains_type *)&i)")
-        self.check_value(expr_result, "fff", 123)
-        # Make sure we can find the correct type in a namespace "nsp_a"
-        expr_result = frame.EvaluateExpression(
-                "*((nsp_a::contains_type::in_contains_type *)&i)")
-        self.check_value(expr_result, "aaa", 123)
-        # Make sure we can find the correct type in a namespace "nsp_b"
-        expr_result = frame.EvaluateExpression(
-                "*((nsp_b::contains_type::in_contains_type *)&i)")
-        self.check_value(expr_result, "bbb", 123)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/type_lookup/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/type_lookup/main.cpp
deleted file mode 100644 (file)
index f2803e3..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In this test, we define struct that exist might exist at the different
-// levels in the code and test that we can properly locate these types with
-// a varienty of different expressions.
-
-namespace nsp_a {
-  struct namespace_only {
-    int a;
-  };
-  struct namespace_and_file {
-    int aa;
-  };
-  struct contains_type {
-    struct in_contains_type {
-      int aaa;
-    };
-  };
-};
-namespace nsp_b {
-  struct namespace_only {
-    int b;
-  };
-  struct namespace_and_file {
-    int bb;
-  };
-  struct contains_type {
-    struct in_contains_type {
-      int bbb;
-    };
-  };
-};
-
-struct namespace_and_file {
-  int ff;
-};
-
-struct contains_type {
-  struct in_contains_type {
-    int fff;
-  };
-};
-
-
-int main (int argc, char const *argv[]) {
-  nsp_a::namespace_only a_namespace_only = { 1 };
-  nsp_a::namespace_and_file a_namespace_and_file = { 2 };
-  nsp_a::contains_type::in_contains_type a_in_contains_type = { 3 };
-  nsp_b::namespace_only b_namespace_only = { 11 };
-  nsp_b::namespace_and_file b_namespace_and_file = { 22 };
-  nsp_b::contains_type::in_contains_type b_in_contains_type = { 33 };
-  namespace_and_file file_namespace_and_file = { 44 };
-  contains_type::in_contains_type file_in_contains_type = { 55 };
-  int i = 123; // Provide an integer that can be used for casting
-  // Take address of "i" to ensure it is in memory
-  if (&i == &argc) {
-    i = -1;
-  }
-  return i == -1; // Set a breakpoint here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/Makefile
deleted file mode 100644 (file)
index bf443d8..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CXX_SOURCES := main.cpp
-CFLAGS := -g -O0 -std=c++11
-
-clean: OBJECTS+=$(wildcard main.d.*)
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/TestUnicodeLiterals.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/TestUnicodeLiterals.py
deleted file mode 100644 (file)
index c1bd892..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-# coding=utf8
-"""
-Test that the expression parser returns proper Unicode strings.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-# this test case fails because of rdar://12991846
-# the expression parser does not deal correctly with Unicode expressions
-# e.g.
-#(lldb) expr L"Hello"
-#(const wchar_t [6]) $0 = {
-#  [0] = \0\0\0\0
-#  [1] = \0\0\0\0
-#  [2] = \0\0\0\0
-#  [3] = \0\0\0\0
-#  [4] = H\0\0\0
-#  [5] = e\0\0\0
-#}
-
-
-class UnicodeLiteralsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_expr1(self):
-        """Test that the expression parser returns proper Unicode strings."""
-        self.build()
-        self.rdar12991846(expr=1)
-
-    def test_expr2(self):
-        """Test that the expression parser returns proper Unicode strings."""
-        self.build()
-        self.rdar12991846(expr=2)
-
-    def test_expr3(self):
-        """Test that the expression parser returns proper Unicode strings."""
-        self.build()
-        self.rdar12991846(expr=3)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break for main.cpp.
-        self.source = 'main.cpp'
-        self.line = line_number(
-            self.source, '// Set break point at this line.')
-
-    def rdar12991846(self, expr=None):
-        """Test that the expression parser returns proper Unicode strings."""
-        if self.getArchitecture() in ['i386']:
-            self.skipTest(
-                "Skipping because this test is known to crash on i386")
-
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Break on the struct declration statement in main.cpp.
-        lldbutil.run_break_set_by_file_and_line(self, "main.cpp", self.line)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        if not process:
-            self.fail("SBTarget.Launch() failed")
-
-        if expr == 1:
-            self.expect('expression L"hello"', substrs=['hello'])
-
-        if expr == 2:
-            self.expect('expression u"hello"', substrs=['hello'])
-
-        if expr == 3:
-            self.expect('expression U"hello"', substrs=['hello'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/main.cpp
deleted file mode 100644 (file)
index a98fb44..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-
-int main (int argc, char const *argv[])
-{
-    auto cs16 = u"hello world ྒྙྐ";
-       auto cs32 = U"hello world ྒྙྐ";
-    char16_t *s16 = (char16_t *)u"ﺸﺵۻ";
-    char32_t *s32 = (char32_t *)U"ЕЙРГЖО";
-    s32 = nullptr; // Set break point at this line.
-    s32 = (char32_t *)U"෴";
-    s16 = (char16_t *)u"色ハ匂ヘト散リヌルヲ";
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/unique-types/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/unique-types/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/unique-types/TestUniqueTypes.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/unique-types/TestUniqueTypes.py
deleted file mode 100644 (file)
index 78121c1..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-"""
-Test that template instaniations of std::vector<long> and <short> in the same module have the correct types.
-"""
-
-
-
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbtest import *
-
-
-class UniqueTypesTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number inside main.cpp.
-        self.line = line_number(
-            "main.cpp",
-            "// Set breakpoint here to verify that std::vector 'longs' and 'shorts' have unique types.")
-
-    def test(self):
-        """Test for unique types of std::vector<long> and std::vector<short>."""
-        self.build()
-
-        compiler = self.getCompiler()
-        compiler_basename = os.path.basename(compiler)
-
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Do a "frame variable --show-types longs" and verify "long" is in each
-        # line of output.
-        self.runCmd("frame variable --show-types longs")
-        output = self.res.GetOutput()
-        for x in [line.strip() for line in output.split(os.linesep)]:
-            # Skip empty line, closing brace, and messages about more variables
-            # than can be displayed.
-            if not x or x == '}' or x == '...' or "Some of your variables have more members than the debugger will show by default" in x:
-                continue
-            self.expect(x, "Expect type 'long'", exe=False,
-                        substrs=['long'])
-
-        # Do a "frame variable --show-types shorts" and verify "short" is in
-        # each line of output.
-        self.runCmd("frame variable --show-types shorts")
-        output = self.res.GetOutput()
-        for x in [line.strip() for line in output.split(os.linesep)]:
-            # Skip empty line, closing brace, and messages about more variables
-            # than can be displayed.
-            if not x or x == '}' or x == '...' or "Some of your variables have more members than the debugger will show by default" in x:
-                continue
-            self.expect(x, "Expect type 'short'", exe=False,
-                        substrs=['short'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/unique-types/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/unique-types/main.cpp
deleted file mode 100644 (file)
index 839fd93..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <vector>
-
-#include <stdio.h>
-#include <stdint.h>
-
-int main (int argc, char const *argv[], char const *envp[])
-{
-    std::vector<long> longs;
-    std::vector<short> shorts;  
-    for (int i=0; i<12; i++)
-    {
-        longs.push_back(i);
-        shorts.push_back(i);
-    }
-    return 0; // Set breakpoint here to verify that std::vector 'longs' and 'shorts' have unique types.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/unsigned_types/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/unsigned_types/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/unsigned_types/TestUnsignedTypes.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/unsigned_types/TestUnsignedTypes.py
deleted file mode 100644 (file)
index ca754f4..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-"""
-Test that variables with unsigned types display correctly.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class UnsignedTypesTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    def test(self):
-        """Test that variables with unsigned types display correctly."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # GCC puts a breakpoint on the last line of a multi-line expression, so
-        # if GCC is the target compiler, we cannot rely on an exact line match.
-        need_exact = "gcc" not in self.getCompiler()
-        # Break on line 19 in main() after the variables are assigned values.
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            "main.cpp",
-            self.line,
-            num_expected_locations=-1,
-            loc_exact=need_exact)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped', 'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        # Test that unsigned types display correctly.
-        self.expect(
-            "frame variable --show-types --no-args",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            patterns=["\((short unsigned int|unsigned short)\) the_unsigned_short = 99"],
-            substrs=[
-                "(unsigned char) the_unsigned_char = 'c'",
-                "(unsigned int) the_unsigned_int = 99",
-                "(unsigned long) the_unsigned_long = 99",
-                "(unsigned long long) the_unsigned_long_long = 99",
-                "(uint32_t) the_uint32 = 99"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/unsigned_types/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/unsigned_types/main.cpp
deleted file mode 100644 (file)
index 8d0a0c3..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-int main (int argc, char const *argv[])
-{
-    typedef unsigned int uint32_t;
-    unsigned char the_unsigned_char = 'c';
-    unsigned short the_unsigned_short = 'c';
-    unsigned int the_unsigned_int = 'c';
-    unsigned long the_unsigned_long = 'c';
-    unsigned long long the_unsigned_long_long = 'c';
-    uint32_t the_uint32 = 'c';
-
-    return  the_unsigned_char - the_unsigned_short + // Set break point at this line.
-            the_unsigned_int - the_unsigned_long +
-            the_unsigned_long_long - the_uint32;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/virtual-overload/TestVirtualOverload.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/virtual-overload/TestVirtualOverload.py
deleted file mode 100644 (file)
index 1311a14..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-from lldbsuite.test import lldbinline
-
-lldbinline.MakeInlineTest(__file__, globals())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/virtual-overload/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/virtual-overload/main.cpp
deleted file mode 100644 (file)
index 79c4823..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Test that lldb doesn't get confused by an overload of a virtual
-// function of the same name.
-struct Base {
-  virtual void f(int i) {}
-  virtual ~Base() {}
-};
-
-struct Derived : Base {
-  virtual void f(int i, int j) {}
-};
-
-int main(int argc, char **argv) {
-  Derived obj;
-  obj.f(1, 2); //% self.expect("fr var", "not crashing", substrs = ["obj"])
-  return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/virtual/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/virtual/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/virtual/TestVirtual.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/virtual/TestVirtual.py
deleted file mode 100644 (file)
index 22fe96b..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-"""
-Test C++ virtual function and virtual inheritance.
-"""
-
-import os
-import re
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-def Msg(expr, val):
-    return "'expression %s' matches the output (from compiled code): %s" % (
-        expr, val)
-
-
-class CppVirtualMadness(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # This is the pattern by design to match the "my_expr = 'value'" output from
-    # printf() stmts (see main.cpp).
-    pattern = re.compile("^([^=]*) = '([^=]*)'$")
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break for main.cpp.
-        self.source = 'main.cpp'
-        self.line = line_number(self.source, '// Set first breakpoint here.')
-
-    @expectedFailureAll(
-        compiler="icc",
-        bugnumber="llvm.org/pr16808 lldb does not call the correct virtual function with icc.")
-    @skipIfWindows # This test will hang on windows llvm.org/pr21753
-    @expectedFlakeyNetBSD
-    def test_virtual_madness(self):
-        """Test that expression works correctly with virtual inheritance as well as virtual function."""
-        self.build()
-
-        # Bring the program to the point where we can issue a series of
-        # 'expression' command to compare against the golden output.
-        self.dbg.SetAsync(False)
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
-        self.assertTrue(target, VALID_TARGET)
-
-        # Create the breakpoint inside function 'main'.
-        breakpoint = target.BreakpointCreateByLocation(self.source, self.line)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        self.assertTrue(process.GetState() == lldb.eStateStopped)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint condition")
-
-        # First, capture the golden output from the program itself.
-        golden = thread.GetFrameAtIndex(0).FindVariable("golden")
-        self.assertTrue(
-            golden.IsValid(),
-            "Encountered an error reading the process's golden variable")
-        error = lldb.SBError()
-        golden_str = process.ReadCStringFromMemory(
-            golden.AddressOf().GetValueAsUnsigned(), 4096, error)
-        self.assertTrue(error.Success())
-        self.assertTrue("c_as_C" in golden_str)
-
-        # This golden list contains a list of "my_expr = 'value' pairs extracted
-        # from the golden output.
-        gl = []
-
-        # Scan the golden output line by line, looking for the pattern:
-        #
-        #     my_expr = 'value'
-        #
-        for line in golden_str.split(os.linesep):
-            match = self.pattern.search(line)
-            if match:
-                my_expr, val = match.group(1), match.group(2)
-                gl.append((my_expr, val))
-        #print("golden list:", gl)
-
-        # Now iterate through the golden list, comparing against the output from
-        # 'expression var'.
-        for my_expr, val in gl:
-
-            self.runCmd("expression %s" % my_expr)
-            output = self.res.GetOutput()
-
-            # The expression output must match the oracle.
-            self.expect(output, Msg(my_expr, val), exe=False,
-                        substrs=[val])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/virtual/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/virtual/main.cpp
deleted file mode 100644 (file)
index 0adf415..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-#include <stdio.h>
-#include <stdint.h>
-
-class A
-{
-public:
-    A () : m_pad ('c') {}
-
-    virtual ~A () {}
-    
-    virtual const char * a()
-    {
-        return __PRETTY_FUNCTION__;
-    }
-
-    virtual const char * b()
-    {
-        return __PRETTY_FUNCTION__;
-    }
-
-    virtual const char * c()
-    {
-        return __PRETTY_FUNCTION__;
-    }
-protected:
-    char m_pad;
-};
-
-class AA
-{
-public:
-    AA () : m_pad('A') {}
-    virtual ~AA () {}
-
-    virtual const char * aa()
-    {
-        return __PRETTY_FUNCTION__;
-    }
-  
-protected:
-    char m_pad;
-};
-
-class B : virtual public A, public AA
-{
-public:
-    B () : m_pad ('c')  {}
-
-    virtual ~B () {}
-    
-    virtual const char * a()
-    {
-        return __PRETTY_FUNCTION__;
-    }
-
-    virtual const char * b()
-    {
-        return __PRETTY_FUNCTION__;
-    }
-protected:
-    char m_pad;
-};
-
-class C : public B, virtual public A
-{
-public:
-    C () : m_pad ('c') {}
-
-    virtual ~C () {}
-    
-    virtual const char * a()
-    {
-        return __PRETTY_FUNCTION__;
-    }
-protected:
-    char m_pad;
-};
-
-int main (int argc, char const *argv[], char const *envp[])
-{
-    A *a_as_A = new A();
-    B *b_as_B = new B();
-    A *b_as_A = b_as_B;
-    C *c_as_C = new C();
-    A *c_as_A = c_as_C;
-
-    char golden[4096];
-    char *p = golden;
-    char *end = p + sizeof golden;
-    p += snprintf(p, end-p, "a_as_A->a() = '%s'\n", a_as_A->a());
-    p += snprintf(p, end-p, "a_as_A->b() = '%s'\n", a_as_A->b());
-    p += snprintf(p, end-p, "a_as_A->c() = '%s'\n", a_as_A->c());
-    p += snprintf(p, end-p, "b_as_A->a() = '%s'\n", b_as_A->a());
-    p += snprintf(p, end-p, "b_as_A->b() = '%s'\n", b_as_A->b());
-    p += snprintf(p, end-p, "b_as_A->c() = '%s'\n", b_as_A->c());
-    p += snprintf(p, end-p, "b_as_B->aa() = '%s'\n", b_as_B->aa());
-    p += snprintf(p, end-p, "c_as_A->a() = '%s'\n", c_as_A->a());
-    p += snprintf(p, end-p, "c_as_A->b() = '%s'\n", c_as_A->b());
-    p += snprintf(p, end-p, "c_as_A->c() = '%s'\n", c_as_A->c());
-    p += snprintf(p, end-p, "c_as_C->aa() = '%s'\n", c_as_C->aa());
-    puts("");// Set first breakpoint here.
-    // then evaluate:
-    // expression a_as_A->a()
-    // expression a_as_A->b()
-    // expression a_as_A->c()
-    // expression b_as_A->a()
-    // expression b_as_A->b()
-    // expression b_as_A->c()
-    // expression b_as_B->aa()
-    // expression c_as_A->a()
-    // expression c_as_A->b()
-    // expression c_as_A->c()
-    // expression c_as_C->aa()
-    
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/wchar_t/.categories b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/wchar_t/.categories
deleted file mode 100644 (file)
index fe1da02..0000000
+++ /dev/null
@@ -1 +0,0 @@
-dataformatters
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/wchar_t/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/wchar_t/Makefile
deleted file mode 100644 (file)
index a4b03ae..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CXX_SOURCES := main.cpp
-CFLAGS := -g -O0
-
-clean: OBJECTS+=$(wildcard main.d.*)
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/wchar_t/TestCxxWCharT.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/wchar_t/TestCxxWCharT.py
deleted file mode 100644 (file)
index b59d71e..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-# coding=utf8
-"""
-Test that C++ supports wchar_t correctly.
-"""
-
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class CxxWCharTTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break for main.cpp.
-        self.source = 'main.cpp'
-        self.line = line_number(
-            self.source, '// Set break point at this line.')
-
-    def test(self):
-        """Test that C++ supports wchar_t correctly."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Break on the struct declration statement in main.cpp.
-        lldbutil.run_break_set_by_file_and_line(self, "main.cpp", self.line)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        if not process:
-            self.fail("SBTarget.Launch() failed")
-
-        # Check that we correctly report templates on wchar_t
-        self.expect("frame variable foo_y",
-                    substrs=['(Foo<wchar_t>) foo_y = '])
-
-        # Check that we correctly report templates on int
-        self.expect("frame variable foo_x",
-                    substrs=['(Foo<int>) foo_x = '])
-
-        # Check that we correctly report wchar_t
-        self.expect("frame variable foo_y.object",
-                    substrs=['(wchar_t) foo_y.object = '])
-
-        # Check that we correctly report int
-        self.expect("frame variable foo_x.object",
-                    substrs=['(int) foo_x.object = '])
-
-        # Check that we can run expressions that return wchar_t
-        self.expect("expression L'a'", substrs=['(wchar_t) $', "L'a'"])
-
-        # Mazel Tov if this works!
-        self.expect("frame variable mazeltov",
-                    substrs=['(const wchar_t *) mazeltov = ', 'L"מזל טוב"'])
-
-        self.expect(
-            "frame variable ws_NULL",
-            substrs=['(wchar_t *) ws_NULL = 0x0'])
-        self.expect("frame variable ws_empty", substrs=[' L""'])
-
-        self.expect("frame variable array", substrs=[
-                    'L"Hey, I\'m a super wchar_t string'])
-        self.expect("frame variable array", substrs=['[0]'], matching=False)
-
-        self.expect('frame variable wchar_zero', substrs=["L'\\0'"])
-        self.expect('expression wchar_zero', substrs=["L'\\0'"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/wchar_t/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/cpp/wchar_t/main.cpp
deleted file mode 100644 (file)
index 4d6a107..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <cstring>
-
-template <typename T>
-class Foo
-{
-public:
-    Foo () : object() {}
-    Foo (T x) : object(x) {}
-    T getObject() { return object; }
-private:
-    T object;
-};
-
-
-int main (int argc, char const *argv[])
-{
-    Foo<int> foo_x('a');
-    Foo<wchar_t> foo_y(L'a');
-    const wchar_t *mazeltov = L"מזל טוב";
-    wchar_t *ws_NULL = nullptr;
-    wchar_t *ws_empty = L"";
-       wchar_t array[200], * array_source = L"Hey, I'm a super wchar_t string, éõñž";
-    wchar_t wchar_zero = (wchar_t)0;
-       memcpy(array, array_source, 39 * sizeof(wchar_t));
-    return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/mixed/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/mixed/Makefile
deleted file mode 100644 (file)
index 12db32c..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CXX_SOURCES := foo.cpp
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/mixed/TestMixedLanguages.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/mixed/TestMixedLanguages.py
deleted file mode 100644 (file)
index b4fe539..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-"""Test that lldb works correctly on compile units form different languages."""
-
-
-
-import re
-import lldb
-from lldbsuite.test.lldbtest import *
-
-
-class MixedLanguagesTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_language_of_frame(self):
-        """Test that the language defaults to the language of the current frame."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Execute the cleanup function during test case tear down
-        # to restore the frame format.
-        def cleanup():
-            self.runCmd(
-                "settings set frame-format %s" %
-                self.format_string, check=False)
-        self.addTearDownHook(cleanup)
-        self.runCmd("settings show frame-format")
-        m = re.match(
-            '^frame-format \(format-string\) = "(.*)\"$',
-            self.res.GetOutput())
-        self.assertTrue(m, "Bad settings string")
-        self.format_string = m.group(1)
-
-        # Change the default format to print the language.
-        format_string = "frame #${frame.index}: ${frame.pc}{ ${module.file.basename}\`${function.name}{${function.pc-offset}}}{, lang=${language}}\n"
-        self.runCmd("settings set frame-format %s" % format_string)
-        self.expect("settings show frame-format", SETTING_MSG("frame-format"),
-                    substrs=[format_string])
-
-        # Run to BP at main (in main.c) and test that the language is C.
-        self.runCmd("breakpoint set -n main")
-        self.runCmd("run")
-        self.expect("thread backtrace",
-                    substrs=["`main", "lang=c"])
-        # Make sure evaluation of C++11 fails.
-        self.expect("expr foo != nullptr", error=True,
-                    startstr="error")
-
-        # Run to BP at foo (in foo.cpp) and test that the language is C++.
-        self.runCmd("breakpoint set -n foo")
-        self.runCmd("continue")
-        self.expect("thread backtrace",
-                    substrs=["`::foo()", "lang=c++"])
-        # Make sure we can evaluate an expression requiring C++11
-        # (note: C++11 is enabled by default for C++).
-        self.expect("expr foo != nullptr",
-                    patterns=["true"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/mixed/foo.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/mixed/foo.cpp
deleted file mode 100644 (file)
index 8a5a6a2..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-namespace ns {
-    int func(void)
-    {
-        return 0;
-    }
-}
-
-extern "C" int foo(void)
-{
-    return ns::func();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/mixed/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/mixed/main.c
deleted file mode 100644 (file)
index f5c5d19..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-int foo(void);
-static int static_value = 0;
-
-int
-bar()
-{
-    static_value++;
-    return static_value;
-}
-
-int main (int argc, char const *argv[])
-{
-    bar(); // breakpoint_in_main
-    return foo();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/.categories b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/.categories
deleted file mode 100644 (file)
index 72cf07c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-objc
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/TestBitfieldIvars.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/TestBitfieldIvars.py
deleted file mode 100644 (file)
index c0d006e..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(
-    __file__,
-    globals(),
-    [
-        # This is a Darwin-only failure related to incorrect expression-
-        # evaluation for single-bit ObjC bitfields.
-        decorators.skipUnlessDarwin,
-        decorators.expectedFailureAll(
-            bugnumber="rdar://problem/17990991")])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/main.m
deleted file mode 100644 (file)
index e19f291..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-//===-- main.m -------------------------------------------*- Objective-C-*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#import <Foundation/Foundation.h>
-
-@interface HasBitfield : NSObject {
-@public
-    unsigned field1 : 1;
-    unsigned field2 : 1;
-};
-
--(id)init;
-@end
-
-@implementation HasBitfield
--(id)init {
-    self = [super init];
-    field1 = 0;
-    field2 = 1;
-    return self;
-}
-@end
-
-@interface ContainsAHasBitfield : NSObject {
-@public
-    HasBitfield *hb;
-};
--(id)init;
-@end
-
-@implementation  ContainsAHasBitfield
--(id)init {
-    self = [super init];
-    hb = [[HasBitfield alloc] init];
-    return self;
-}
-
-@end
-
-int main(int argc, const char * argv[]) {
-    ContainsAHasBitfield *chb = [[ContainsAHasBitfield alloc] init];
-    printf("%d\n", chb->hb->field2); //% self.expect("expression -- chb->hb->field1", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["= 0"])
-                                     //% self.expect("expression -- chb->hb->field2", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["= 1"]) # this must happen second
-    return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/blocks/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/blocks/Makefile
deleted file mode 100644 (file)
index df76ed3..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-OBJC_SOURCES := ivars-in-blocks.m main.m
-LD_EXTRAS := -lobjc -framework Foundation
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/blocks/TestObjCIvarsInBlocks.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/blocks/TestObjCIvarsInBlocks.py
deleted file mode 100644 (file)
index e790e6e..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-"""Test printing ivars and ObjC objects captured in blocks that are made in methods of an ObjC class."""
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestObjCIvarsInBlocks(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers to break inside main().
-        self.main_source = "main.m"
-        self.class_source = "ivars-in-blocks.m"
-        self.class_source_file_spec = lldb.SBFileSpec(self.class_source)
-
-    @skipUnlessDarwin
-    @add_test_categories(['pyapi'])
-    @skipIf(dwarf_version=['<', '4'])
-    @expectedFailureAll(
-        archs=["i[3-6]86"],
-        bugnumber="This test requires the 2.0 runtime, so it will fail on i386")
-    def test_with_python_api(self):
-        """Test printing the ivars of the self when captured in blocks"""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        breakpoint = target.BreakpointCreateBySourceRegex(
-            '// Break here inside the block.', self.class_source_file_spec)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        breakpoint_two = target.BreakpointCreateBySourceRegex(
-            '// Break here inside the class method block.', self.class_source_file_spec)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, "Created a process.")
-        self.assertTrue(
-            process.GetState() == lldb.eStateStopped,
-            "Stopped it too.")
-
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint(
-            process, breakpoint)
-        self.assertTrue(len(thread_list) == 1)
-        thread = thread_list[0]
-
-        frame = thread.GetFrameAtIndex(0)
-        self.assertTrue(frame, "frame 0 is valid")
-
-        # First use the FindVariable API to see if we can find the ivar by
-        # undecorated name:
-        direct_blocky = frame.GetValueForVariablePath("blocky_ivar")
-        self.assertTrue(direct_blocky, "Found direct access to blocky_ivar.")
-
-        # Now get it as a member of "self" and make sure the two values are
-        # equal:
-        self_var = frame.GetValueForVariablePath("self")
-        self.assertTrue(self_var, "Found self in block.")
-        indirect_blocky = self_var.GetChildMemberWithName("blocky_ivar")
-        self.assertTrue(indirect_blocky, "Found blocky_ivar through self")
-
-        error = lldb.SBError()
-        direct_value = direct_blocky.GetValueAsSigned(error)
-        self.assertTrue(error.Success(), "Got direct value for blocky_ivar")
-
-        indirect_value = indirect_blocky.GetValueAsSigned(error)
-        self.assertTrue(error.Success(), "Got indirect value for blocky_ivar")
-
-        self.assertTrue(
-            direct_value == indirect_value,
-            "Direct and indirect values are equal.")
-
-        # Now make sure that we can get at the captured ivar through the expression parser.
-        # Doing a little trivial math will force this into the real expression
-        # parser:
-        direct_expr = frame.EvaluateExpression("blocky_ivar + 10")
-        self.assertTrue(
-            direct_expr,
-            "Got blocky_ivar through the expression parser")
-
-        # Again, get the value through self directly and make sure they are the
-        # same:
-        indirect_expr = frame.EvaluateExpression("self->blocky_ivar + 10")
-        self.assertTrue(
-            indirect_expr,
-            "Got blocky ivar through expression parser using self.")
-
-        direct_value = direct_expr.GetValueAsSigned(error)
-        self.assertTrue(
-            error.Success(),
-            "Got value from direct use of expression parser")
-
-        indirect_value = indirect_expr.GetValueAsSigned(error)
-        self.assertTrue(
-            error.Success(),
-            "Got value from indirect access using the expression parser")
-
-        self.assertTrue(
-            direct_value == indirect_value,
-            "Direct ivar access and indirect through expression parser produce same value.")
-
-        process.Continue()
-        self.assertTrue(
-            process.GetState() == lldb.eStateStopped,
-            "Stopped at the second breakpoint.")
-
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint(
-            process, breakpoint_two)
-        self.assertTrue(len(thread_list) == 1)
-        thread = thread_list[0]
-
-        frame = thread.GetFrameAtIndex(0)
-        self.assertTrue(frame, "frame 0 is valid")
-
-        expr = frame.EvaluateExpression("(ret)")
-        self.assertTrue(
-            expr, "Successfully got a local variable in a block in a class method.")
-
-        ret_value_signed = expr.GetValueAsSigned(error)
-        # print('ret_value_signed = %i' % (ret_value_signed))
-        self.assertTrue(
-            ret_value_signed == 5,
-            "The local variable in the block was what we expected.")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/blocks/ivars-in-blocks.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/blocks/ivars-in-blocks.h
deleted file mode 100644 (file)
index 1ceac33..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@interface IAmBlocky : NSObject
-{
-  @public
-  int blocky_ivar;
-}
-+ (void) classMethod;
-- (IAmBlocky *) init;
-- (int) callABlock: (int) block_value;
-@end
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/blocks/ivars-in-blocks.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/blocks/ivars-in-blocks.m
deleted file mode 100644 (file)
index 1098a91..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-#import "ivars-in-blocks.h"
-
-typedef int (^my_block_ptr_type) (int);
-
-@interface IAmBlocky()
-{
-  int _hidden_ivar;
-  my_block_ptr_type _block_ptr;
-}
-
-@end
-
-@implementation IAmBlocky
-
-+ (int) addend
-{
-  return 3;
-}
-+ (void) classMethod
-{
-  int (^my_block)(int) = ^(int foo)
-  {
-    int ret = foo + [self addend];
-    return ret; // Break here inside the class method block.
-  };
-  printf("%d\n", my_block(2));
-}
-
-- (void) makeBlockPtr;
-{
-  _block_ptr = ^(int inval)
-  {
-    _hidden_ivar += inval;
-    return blocky_ivar * inval; // Break here inside the block.
-  };
-}
-
-- (IAmBlocky *) init
-{
-  blocky_ivar = 10;
-  _hidden_ivar = 20;
-  // Interesting...  Apparently you can't make a block in your init method.  This crashes...
-  // [self makeBlockPtr];
-  return self;
-}
-
-- (int) callABlock: (int) block_value
-{
-  if (_block_ptr == NULL)
-    [self makeBlockPtr];
-  int ret = _block_ptr (block_value);
-  [IAmBlocky classMethod];
-  return ret;
-}
-@end
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/blocks/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/blocks/main.m
deleted file mode 100644 (file)
index 0c56f45..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#import "ivars-in-blocks.h"
-
-int
-main (int argc, char **argv)
-{
-  IAmBlocky *my_blocky = [[IAmBlocky alloc] init];
-  int blocky_value;
-  blocky_value = [my_blocky callABlock: 33];
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Makefile
deleted file mode 100644 (file)
index 00a0769..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-LD_EXTRAS := -lobjc -framework Foundation -L. -lTest -lTestExt
-OBJC_SOURCES := main.m
-
-all: a.out
-
-a.out: libTest.dylib libTestExt.dylib
-
-include Makefile.rules
-
-libTest.dylib: Test/Test.m
-       mkdir -p Test
-       $(MAKE) MAKE_DSYM=YES -f $(MAKEFILE_RULES) \
-               DYLIB_ONLY=YES DYLIB_NAME=Test DYLIB_OBJC_SOURCES=Test/Test.m \
-               LD_EXTRAS="-lobjc -framework Foundation" \
-               CFLAGS_EXTRAS=-I$(SRCDIR)
-
-libTestExt.dylib: TestExt/TestExt.m
-       mkdir -p TestExt
-       $(MAKE) MAKE_DSYM=YES -f $(MAKEFILE_RULES) \
-               DYLIB_ONLY=YES DYLIB_NAME=TestExt DYLIB_OBJC_SOURCES=TestExt/TestExt.m \
-               LD_EXTRAS="-lobjc -framework Foundation -lTest -L." \
-               CFLAGS_EXTRAS=-I$(SRCDIR)
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Foo.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Foo.h
deleted file mode 100644 (file)
index db07f50..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef __Foo_h__
-#define __Foo_h__
-
-typedef struct {
-    float start;
-    float duration;
-} CMTimeRange;
-
-#endif
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Test.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Test.h
deleted file mode 100644 (file)
index 73928c5..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#import <Foundation/Foundation.h>
-#import <Test/Foo.h>
-
-@interface Test : NSObject {
-@public
-    CMTimeRange _range;
-}
-- (void) doTest;
-@end
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Test.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Test.m
deleted file mode 100644 (file)
index 6b2cb3a..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#import "Test.h"
-
-@implementation Test
-- (void) doTest {
-    NSLog(@"-[Test doTest]");
-}
-@end
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestConflictingDefinition.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestConflictingDefinition.py
deleted file mode 100644 (file)
index f49858c..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-"""Test that types defined in shared libraries work correctly."""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestRealDefinition(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    def test_frame_var_after_stop_at_implementation(self):
-        """Test that we can find the implementation for an objective C type"""
-        if self.getArchitecture() == 'i386':
-            self.skipTest("requires modern objc runtime")
-        self.build()
-        self.shlib_names = ["libTestExt.dylib", "libTest.dylib"]
-        self.common_setup()
-
-        line = line_number('TestExt/TestExt.m', '// break here')
-        lldbutil.run_break_set_by_file_and_line(
-            self, 'TestExt.m', line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        # This should display correctly.
-        self.expect(
-            "expr 42",
-            "A simple expression should execute correctly",
-            substrs=[
-                "42"])
-
-    def common_setup(self):
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-        self.registerSharedLibrariesWithTarget(target, self.shlib_names)
-
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/Foo.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/Foo.h
deleted file mode 100644 (file)
index 7c90e6c..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef __Foo_h__
-#define __Foo_h__
-
-typedef struct {
-    float s;
-    float d;
-} CMTimeRange;
-
-#endif
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/TestExt.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/TestExt.h
deleted file mode 100644 (file)
index 243443c..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#import <TestExt/Foo.h>
-#import <Test/Test.h>
-struct CMTimeRange;
-
-@interface Test (Stuff)
-- (void)doSomethingElse: (CMTimeRange *)range_ptr;
-@end
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/TestExt.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/TestExt.m
deleted file mode 100644 (file)
index a14c702..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#import "TestExt.h"
-#import "Foo.h"
-
-@implementation Test (Stuff)
-- (void)doSomethingElse: (CMTimeRange *)range_ptr {
-    NSLog(@"doSomethingElse: %p", range_ptr); // break here
-}
-@end
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/main.m
deleted file mode 100644 (file)
index 6a71457..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#import <Test/Test.h>
-#import <TestExt/TestExt.h>
-
-int main() {
-  @autoreleasepool {
-    Test *test = [[Test alloc] init];
-    [test doSomethingElse:&test->_range];
-  }
-}    
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/Makefile
deleted file mode 100644 (file)
index 8763401..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-OBJCXX_SOURCES := main.mm
-
-CFLAGS_EXTRAS := -w
-
-
-
-LD_EXTRAS := -framework Foundation
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py
deleted file mode 100644 (file)
index ce9ee8e..0000000
+++ /dev/null
@@ -1,206 +0,0 @@
-# encoding: utf-8
-"""
-Test lldb Obj-C exception support.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjCExceptionsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    def test_objc_exceptions_at_throw(self):
-        self.build()
-
-        target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
-        self.assertTrue(target, VALID_TARGET)
-
-        launch_info = lldb.SBLaunchInfo(["a.out", "0"])
-        lldbutil.run_to_name_breakpoint(self, "objc_exception_throw", launch_info=launch_info)
-
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped', 'stop reason = breakpoint'])
-
-        self.expect('thread exception', substrs=[
-                '(NSException *) exception = ',
-                '"SomeReason"',
-            ])
-
-        target = self.dbg.GetSelectedTarget()
-        thread = target.GetProcess().GetSelectedThread()
-        frame = thread.GetSelectedFrame()
-
-        opts = lldb.SBVariablesOptions()
-        opts.SetIncludeRecognizedArguments(True)
-        variables = frame.GetVariables(opts)
-
-        self.assertEqual(variables.GetSize(), 1)
-        self.assertEqual(variables.GetValueAtIndex(0).name, "exception")
-        self.assertEqual(variables.GetValueAtIndex(0).GetValueType(), lldb.eValueTypeVariableArgument)
-
-        lldbutil.run_to_source_breakpoint(self, "// Set break point at this line.", lldb.SBFileSpec("main.mm"), launch_info=launch_info)
-
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped', 'stop reason = breakpoint'])
-
-        target = self.dbg.GetSelectedTarget()
-        thread = target.GetProcess().GetSelectedThread()
-        frame = thread.GetSelectedFrame()
-
-        # No exception being currently thrown/caught at this point
-        self.assertFalse(thread.GetCurrentException().IsValid())
-        self.assertFalse(thread.GetCurrentExceptionBacktrace().IsValid())
-
-        self.expect(
-            'frame variable e1',
-            substrs=[
-                '(NSException *) e1 = ',
-                '"SomeReason"'
-            ])
-
-        self.expect(
-            'frame variable --dynamic-type no-run-target *e1',
-            substrs=[
-                '(NSException) *e1 = ',
-                'name = ', '"ExceptionName"',
-                'reason = ', '"SomeReason"',
-                'userInfo = ', '1 key/value pair',
-                'reserved = ', 'nil',
-            ])
-
-        e1 = frame.FindVariable("e1")
-        self.assertTrue(e1)
-        self.assertEqual(e1.type.name, "NSException *")
-        self.assertEqual(e1.GetSummary(), '"SomeReason"')
-        self.assertEqual(e1.GetChildMemberWithName("name").description, "ExceptionName")
-        self.assertEqual(e1.GetChildMemberWithName("reason").description, "SomeReason")
-        userInfo = e1.GetChildMemberWithName("userInfo").dynamic
-        self.assertEqual(userInfo.summary, "1 key/value pair")
-        self.assertEqual(userInfo.GetChildAtIndex(0).GetChildAtIndex(0).description, "some_key")
-        self.assertEqual(userInfo.GetChildAtIndex(0).GetChildAtIndex(1).description, "some_value")
-        self.assertEqual(e1.GetChildMemberWithName("reserved").description, "<nil>")
-
-        self.expect(
-            'frame variable e2',
-            substrs=[
-                '(NSException *) e2 = ',
-                '"SomeReason"'
-            ])
-
-        self.expect(
-            'frame variable --dynamic-type no-run-target *e2',
-            substrs=[
-                '(NSException) *e2 = ',
-                'name = ', '"ThrownException"',
-                'reason = ', '"SomeReason"',
-                'userInfo = ', '1 key/value pair',
-                'reserved = ',
-            ])
-
-        e2 = frame.FindVariable("e2")
-        self.assertTrue(e2)
-        self.assertEqual(e2.type.name, "NSException *")
-        self.assertEqual(e2.GetSummary(), '"SomeReason"')
-        self.assertEqual(e2.GetChildMemberWithName("name").description, "ThrownException")
-        self.assertEqual(e2.GetChildMemberWithName("reason").description, "SomeReason")
-        userInfo = e2.GetChildMemberWithName("userInfo").dynamic
-        self.assertEqual(userInfo.summary, "1 key/value pair")
-        self.assertEqual(userInfo.GetChildAtIndex(0).GetChildAtIndex(0).description, "some_key")
-        self.assertEqual(userInfo.GetChildAtIndex(0).GetChildAtIndex(1).description, "some_value")
-        reserved = e2.GetChildMemberWithName("reserved").dynamic
-        self.assertGreater(reserved.num_children, 0)
-        callStackReturnAddresses = [reserved.GetChildAtIndex(i).GetChildAtIndex(1) for i in range(0, reserved.GetNumChildren())
-                if reserved.GetChildAtIndex(i).GetChildAtIndex(0).description == "callStackReturnAddresses"][0].dynamic
-        children = [callStackReturnAddresses.GetChildAtIndex(i) for i in range(0, callStackReturnAddresses.num_children)]
-
-        pcs = [i.unsigned for i in children]
-        names = [target.ResolveSymbolContextForAddress(lldb.SBAddress(pc, target), lldb.eSymbolContextSymbol).GetSymbol().name for pc in pcs]
-        for n in ["objc_exception_throw", "foo(int)", "main"]:
-            self.assertTrue(n in names, "%s is in the exception backtrace (%s)" % (n, names))
-
-    @skipUnlessDarwin
-    def test_objc_exceptions_at_abort(self):
-        self.build()
-
-        target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
-        self.assertTrue(target, VALID_TARGET)
-
-        self.runCmd("run 0")
-
-        # We should be stopped at pthread_kill because of an unhandled exception
-        self.expect("thread list",
-            substrs=['stopped', 'stop reason = signal SIGABRT'])
-
-        self.expect('thread exception', substrs=[
-                '(NSException *) exception = ',
-                '"SomeReason"',
-                'libobjc.A.dylib`objc_exception_throw',
-                'a.out`foo', 'at main.mm:24',
-                'a.out`rethrow', 'at main.mm:35',
-                'a.out`main',
-            ])
-
-        process = self.dbg.GetSelectedTarget().process
-        thread = process.GetSelectedThread()
-
-        # There is an exception being currently processed at this point
-        self.assertTrue(thread.GetCurrentException().IsValid())
-        self.assertTrue(thread.GetCurrentExceptionBacktrace().IsValid())
-
-        history_thread = thread.GetCurrentExceptionBacktrace()
-        self.assertGreaterEqual(history_thread.num_frames, 4)
-        for n in ["objc_exception_throw", "foo(int)", "rethrow(int)", "main"]:
-            self.assertEqual(len([f for f in history_thread.frames if f.GetFunctionName() == n]), 1)
-
-        self.runCmd("kill")
-
-        self.runCmd("run 1")
-        # We should be stopped at pthread_kill because of an unhandled exception
-        self.expect("thread list",
-            substrs=['stopped', 'stop reason = signal SIGABRT'])
-
-        self.expect('thread exception', substrs=[
-                '(MyCustomException *) exception = ',
-                'libobjc.A.dylib`objc_exception_throw',
-                'a.out`foo', 'at main.mm:26',
-                'a.out`rethrow', 'at main.mm:35',
-                'a.out`main',
-            ])
-
-        process = self.dbg.GetSelectedTarget().process
-        thread = process.GetSelectedThread()
-
-        history_thread = thread.GetCurrentExceptionBacktrace()
-        self.assertGreaterEqual(history_thread.num_frames, 4)
-        for n in ["objc_exception_throw", "foo(int)", "rethrow(int)", "main"]:
-            self.assertEqual(len([f for f in history_thread.frames if f.GetFunctionName() == n]), 1)
-
-    @skipUnlessDarwin
-    def test_cxx_exceptions_at_abort(self):
-        self.build()
-
-        target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
-        self.assertTrue(target, VALID_TARGET)
-
-        self.runCmd("run 2")
-
-        # We should be stopped at pthread_kill because of an unhandled exception
-        self.expect("thread list",
-            substrs=['stopped', 'stop reason = signal SIGABRT'])
-
-        self.expect('thread exception', substrs=['exception ='])
-
-        process = self.dbg.GetSelectedTarget().process
-        thread = process.GetSelectedThread()
-
-        self.assertTrue(thread.GetCurrentException().IsValid())
-
-        # C++ exception backtraces are not exposed in the API (yet).
-        self.assertFalse(thread.GetCurrentExceptionBacktrace().IsValid())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/main.mm b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/main.mm
deleted file mode 100644 (file)
index b5c71f9..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-//===-- main.m ------------------------------------------------*- ObjC -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#import <Foundation/Foundation.h>
-
-#import <exception>
-#import <stdexcept>
-
-@interface MyCustomException: NSException
-@end
-@implementation MyCustomException
-@end
-
-void foo(int n)
-{
-    NSDictionary *info = [NSDictionary dictionaryWithObjectsAndKeys:@"some_value", @"some_key", nil];
-    switch (n) {
-        case 0:
-            @throw [[NSException alloc] initWithName:@"ThrownException" reason:@"SomeReason" userInfo:info];
-        case 1:
-            @throw [[MyCustomException alloc] initWithName:@"ThrownException" reason:@"SomeReason" userInfo:info];
-        case 2:
-            throw std::runtime_error("C++ exception");
-    }
-}
-
-void rethrow(int n)
-{
-    @try {
-        foo(n);
-    } @catch(NSException *e) {
-        @throw;
-    }
-}
-
-int main(int argc, const char * argv[])
-{
-    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-
-    NSDictionary *info = [NSDictionary dictionaryWithObjectsAndKeys:@"some_value", @"some_key", nil];
-    NSException *e1 = [[NSException alloc] initWithName:@"ExceptionName" reason:@"SomeReason" userInfo:info];
-    NSException *e2;
-
-    @try {
-        foo(atoi(argv[1]));
-    } @catch(NSException *e) {
-        e2 = e;
-    }
-
-    NSLog(@"1"); // Set break point at this line.
-
-    rethrow(atoi(argv[1]));
-
-    [pool drain];
-    return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/Container.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/Container.h
deleted file mode 100644 (file)
index 85bbd06..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@class ForwardDeclaredClass;
-
-@interface Container : NSObject {
-@public
-    ForwardDeclaredClass *member;
-}
-
--(id)init;
--(ForwardDeclaredClass*)getMember;
-
-@end
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/Container.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/Container.m
deleted file mode 100644 (file)
index 4d2139f..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#import "Container.h"
-
-@interface ForwardDeclaredClass : NSObject
-{
-    int a;
-    int b;
-}
-@end
-
-@implementation ForwardDeclaredClass
-
-@end
-
-@implementation Container
-
--(id)init
-{
-    member = [ForwardDeclaredClass alloc];
-    return [super init];
-}
-
--(ForwardDeclaredClass *)getMember
-{
-    return member;
-}
-
-@end
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/Makefile
deleted file mode 100644 (file)
index cfae251..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-DYLIB_NAME := Container
-DYLIB_OBJC_SOURCES := Container.m
-OBJC_SOURCES := main.m
-
-
-
-LD_EXTRAS := -framework Foundation
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/TestForwardDecl.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/TestForwardDecl.py
deleted file mode 100644 (file)
index fd35d64..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-"""Test that a forward-declared class works when its complete definition is in a library"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ForwardDeclTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.source = 'main.m'
-        self.line = line_number(self.source, '// Set breakpoint 0 here.')
-        self.shlib_names = ["Container"]
-
-    def do_test(self, dictionary=None):
-        self.build(dictionary=dictionary)
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
-        self.assertTrue(target, VALID_TARGET)
-
-        # Create the breakpoint inside function 'main'.
-        breakpoint = target.BreakpointCreateByLocation(self.source, self.line)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Register our shared libraries for remote targets so they get
-        # automatically uploaded
-        environment = self.registerSharedLibrariesWithTarget(
-            target, self.shlib_names)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, environment, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        # This should display correctly.
-        self.expect("expression [j getMember]", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=["= 0x"])
-
-    @skipUnlessDarwin
-    def test_expr(self):
-        self.do_test()
-
-    @no_debug_info_test
-    @skipUnlessDarwin
-    @skipIf(compiler=no_match("clang"))
-    @skipIf(compiler_version=["<", "7.0"])
-    def test_debug_names(self):
-        """Test that we are able to find complete types when using DWARF v5
-        accelerator tables"""
-        self.do_test(
-            dict(CFLAGS_EXTRAS="-dwarf-version=5 -mllvm -accel-tables=Dwarf"))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/main.m
deleted file mode 100644 (file)
index 8e5256e..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#import <Foundation/Foundation.h>
-#import "Container.h"
-
-int main(int argc, const char * argv[])
-{
-
-    @autoreleasepool {
-        Container *j = [[Container alloc] init];
-
-        printf("member value = %p", [j getMember]); // Set breakpoint 0 here.
-    }   
-    return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/Makefile
deleted file mode 100644 (file)
index e95ebd9..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-OBJC_SOURCES := main.m my-base.m
-#OBJC_SOURCES := const-strings.m
-
-
-
-LD_EXTRAS := -framework Foundation
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestConstStrings.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestConstStrings.py
deleted file mode 100644 (file)
index 6e8e989..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-"""
-Test that objective-c constant strings are generated correctly by the expression
-parser.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ConstStringTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    d = {'OBJC_SOURCES': 'const-strings.m'}
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.main_source = "const-strings.m"
-        self.line = line_number(self.main_source, '// Set breakpoint here.')
-
-    @skipUnlessDarwin
-    def test_break(self):
-        """Test constant string generation amd comparison by the expression parser."""
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(self.d)
-
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            self.main_source,
-            self.line,
-            num_expected_locations=1,
-            loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.expect("process status", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=[" at %s:%d" % (self.main_source, self.line),
-                             "stop reason = breakpoint"])
-
-        self.expect('expression (int)[str compare:@"hello"]',
-                    startstr="(int) $0 = 0")
-        self.expect('expression (int)[str compare:@"world"]',
-                    startstr="(int) $1 = -1")
-
-        # Test empty strings, too.
-        self.expect('expression (int)[@"" length]',
-                    startstr="(int) $2 = 0")
-
-        self.expect('expression (int)[@"123" length]',
-                    startstr="(int) $3 = 3")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestFoundationDisassembly.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestFoundationDisassembly.py
deleted file mode 100644 (file)
index 9e39a73..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-"""
-Test the lldb disassemble command on foundation framework.
-"""
-
-import unittest2
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-@skipUnlessDarwin
-class FoundationDisassembleTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @skipIfAsan
-    def test_foundation_disasm(self):
-        """Do 'disassemble -n func' on each and every 'Code' symbol entry from the Foundation.framework."""
-        self.build()
-
-        # Enable synchronous mode
-        self.dbg.SetAsync(False)
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        foundation_framework = None
-        for module in target.modules:
-            if module.file.basename == "Foundation":
-                foundation_framework = module.file.fullpath
-                break
-
-        self.assertTrue(
-            foundation_framework is not None,
-            "Foundation.framework path located")
-        self.runCmd("image dump symtab '%s'" % foundation_framework)
-        raw_output = self.res.GetOutput()
-        # Now, grab every 'Code' symbol and feed it into the command:
-        # 'disassemble -n func'.
-        #
-        # The symbol name is on the last column and trails the flag column which
-        # looks like '0xhhhhhhhh', i.e., 8 hexadecimal digits.
-        codeRE = re.compile(r"""
-                             \ Code\ {9}    # ' Code' followed by 9 SPCs,
-                             .*             # the wildcard chars,
-                             0x[0-9a-f]{8}  # the flag column, and
-                             \ (.+)$        # finally the function symbol.
-                             """, re.VERBOSE)
-        for line in raw_output.split(os.linesep):
-            match = codeRE.search(line)
-            if match:
-                func = match.group(1)
-                self.runCmd('image lookup -s "%s"' % func)
-                self.runCmd('disassemble -n "%s"' % func)
-
-    @skipIfAsan
-    def test_simple_disasm(self):
-        """Test the lldb 'disassemble' command"""
-        self.build()
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
-        self.assertTrue(target, VALID_TARGET)
-
-        # Stop at +[NSString stringWithFormat:].
-        symbol_name = "+[NSString stringWithFormat:]"
-        break_results = lldbutil.run_break_set_command(
-            self, "_regexp-break %s" % (symbol_name))
-
-        lldbutil.check_breakpoint_result(
-            self,
-            break_results,
-            symbol_name=symbol_name,
-            num_locations=1)
-
-        # Stop at -[MyString initWithNSString:].
-        lldbutil.run_break_set_by_symbol(
-            self,
-            '-[MyString initWithNSString:]',
-            num_expected_locations=1,
-            sym_exact=True)
-
-        # Stop at the "description" selector.
-        lldbutil.run_break_set_by_selector(
-            self,
-            'description',
-            num_expected_locations=1,
-            module_name='a.out')
-
-        # Stop at -[NSAutoreleasePool release].
-        break_results = lldbutil.run_break_set_command(
-            self, "_regexp-break -[NSAutoreleasePool release]")
-        lldbutil.check_breakpoint_result(
-            self,
-            break_results,
-            symbol_name='-[NSAutoreleasePool release]',
-            num_locations=1)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # First stop is +[NSString stringWithFormat:].
-        self.expect(
-            "thread backtrace",
-            "Stop at +[NSString stringWithFormat:]",
-            substrs=["Foundation`+[NSString stringWithFormat:]"])
-
-        # Do the disassemble for the currently stopped function.
-        self.runCmd("disassemble -f")
-
-        self.runCmd("process continue")
-        # Skip another breakpoint for +[NSString stringWithFormat:].
-        self.runCmd("process continue")
-
-        # Followed by a.out`-[MyString initWithNSString:].
-        self.expect(
-            "thread backtrace",
-            "Stop at a.out`-[MyString initWithNSString:]",
-            substrs=["a.out`-[MyString initWithNSString:]"])
-
-        # Do the disassemble for the currently stopped function.
-        self.runCmd("disassemble -f")
-
-        self.runCmd("process continue")
-
-        # Followed by -[MyString description].
-        self.expect("thread backtrace", "Stop at -[MyString description]",
-                    substrs=["a.out`-[MyString description]"])
-
-        # Do the disassemble for the currently stopped function.
-        self.runCmd("disassemble -f")
-
-        self.runCmd("process continue")
-        # Skip another breakpoint for -[MyString description].
-        self.runCmd("process continue")
-
-        # Followed by -[NSAutoreleasePool release].
-        self.expect("thread backtrace", "Stop at -[NSAutoreleasePool release]",
-                    substrs=["Foundation`-[NSAutoreleasePool release]"])
-
-        # Do the disassemble for the currently stopped function.
-        self.runCmd("disassemble -f")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods.py
deleted file mode 100644 (file)
index 7d4990c..0000000
+++ /dev/null
@@ -1,325 +0,0 @@
-"""
-Set breakpoints on objective-c class and instance methods in foundation.
-Also lookup objective-c data types and evaluate expressions.
-"""
-
-from __future__ import print_function
-
-
-import os
-import os.path
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-file_index = 0
-
-
-@skipUnlessDarwin
-class FoundationTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.main_source = "main.m"
-        self.line = line_number(
-            self.main_source,
-            '// Set break point at this line.')
-
-    def test_break(self):
-        """Test setting objc breakpoints using '_regexp-break' and 'breakpoint set'."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Stop at +[NSString stringWithFormat:].
-        break_results = lldbutil.run_break_set_command(
-            self, "_regexp-break +[NSString stringWithFormat:]")
-        lldbutil.check_breakpoint_result(
-            self,
-            break_results,
-            symbol_name='+[NSString stringWithFormat:]',
-            num_locations=1)
-
-        # Stop at -[MyString initWithNSString:].
-        lldbutil.run_break_set_by_symbol(
-            self,
-            '-[MyString initWithNSString:]',
-            num_expected_locations=1,
-            sym_exact=True)
-
-        # Stop at the "description" selector.
-        lldbutil.run_break_set_by_selector(
-            self,
-            'description',
-            num_expected_locations=1,
-            module_name='a.out')
-
-        # Stop at -[NSAutoreleasePool release].
-        break_results = lldbutil.run_break_set_command(
-            self, "_regexp-break -[NSAutoreleasePool release]")
-        lldbutil.check_breakpoint_result(
-            self,
-            break_results,
-            symbol_name='-[NSAutoreleasePool release]',
-            num_locations=1)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # First stop is +[NSString stringWithFormat:].
-        self.expect(
-            "thread backtrace",
-            "Stop at +[NSString stringWithFormat:]",
-            substrs=["Foundation`+[NSString stringWithFormat:]"])
-
-        self.runCmd("process continue")
-
-        # Second stop is still +[NSString stringWithFormat:].
-        self.expect(
-            "thread backtrace",
-            "Stop at +[NSString stringWithFormat:]",
-            substrs=["Foundation`+[NSString stringWithFormat:]"])
-
-        self.runCmd("process continue")
-
-        # Followed by a.out`-[MyString initWithNSString:].
-        self.expect(
-            "thread backtrace",
-            "Stop at a.out`-[MyString initWithNSString:]",
-            substrs=["a.out`-[MyString initWithNSString:]"])
-
-        self.runCmd("process continue")
-
-        # Followed by -[MyString description].
-        self.expect("thread backtrace", "Stop at -[MyString description]",
-                    substrs=["a.out`-[MyString description]"])
-
-        self.runCmd("process continue")
-
-        # Followed by the same -[MyString description].
-        self.expect("thread backtrace", "Stop at -[MyString description]",
-                    substrs=["a.out`-[MyString description]"])
-
-        self.runCmd("process continue")
-
-        # Followed by -[NSAutoreleasePool release].
-        self.expect("thread backtrace", "Stop at -[NSAutoreleasePool release]",
-                    substrs=["Foundation`-[NSAutoreleasePool release]"])
-
-    # rdar://problem/8542091
-    # rdar://problem/8492646
-    def test_data_type_and_expr(self):
-        """Lookup objective-c data types and evaluate expressions."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Stop at -[MyString description].
-        lldbutil.run_break_set_by_symbol(
-            self,
-            '-[MyString description]',
-            num_expected_locations=1,
-            sym_exact=True)
-#        self.expect("breakpoint set -n '-[MyString description]", BREAKPOINT_CREATED,
-# startstr = "Breakpoint created: 1: name = '-[MyString description]',
-# locations = 1")
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The backtrace should show we stop at -[MyString description].
-        self.expect("thread backtrace", "Stop at -[MyString description]",
-                    substrs=["a.out`-[MyString description]"])
-
-        # Lookup objc data type MyString and evaluate some expressions.
-
-        self.expect("image lookup -t NSString", DATA_TYPES_DISPLAYED_CORRECTLY,
-                    substrs=['name = "NSString"',
-                             'compiler_type = "@interface NSString'])
-
-        self.expect("image lookup -t MyString", DATA_TYPES_DISPLAYED_CORRECTLY,
-                    substrs=['name = "MyString"',
-                             'compiler_type = "@interface MyString',
-                             'NSString * str;',
-                             'NSDate * date;'])
-
-        self.expect(
-            "frame variable --show-types --scope",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=["ARG: (MyString *) self"],
-            patterns=[
-                "ARG: \(.*\) _cmd",
-                "(objc_selector *)|(SEL)"])
-
-        # rdar://problem/8651752
-        # don't crash trying to ask clang how many children an empty record has
-        self.runCmd("frame variable *_cmd")
-
-        # rdar://problem/8492646
-        # test/foundation fails after updating to tot r115023
-        # self->str displays nothing as output
-        self.expect(
-            "frame variable --show-types self->str",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            startstr="(NSString *) self->str")
-
-        # rdar://problem/8447030
-        # 'frame variable self->date' displays the wrong data member
-        self.expect(
-            "frame variable --show-types self->date",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            startstr="(NSDate *) self->date")
-
-        # This should display the str and date member fields as well.
-        self.expect(
-            "frame variable --show-types *self",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                "(MyString) *self",
-                "(NSString *) str",
-                "(NSDate *) date"])
-
-        # isa should be accessible.
-        self.expect("expression self->isa", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=["(Class)"])
-
-        # This should fail expectedly.
-        self.expect(
-            "expression self->non_existent_member",
-            COMMAND_FAILED_AS_EXPECTED,
-            error=True,
-            substrs=["error:", "'MyString' does not have a member named 'non_existent_member'"])
-
-        # Use expression parser.
-        self.runCmd("expression self->str")
-        self.runCmd("expression self->date")
-
-        # (lldb) expression self->str
-        # error: instance variable 'str' is protected
-        # error: 1 errors parsing expression
-        #
-        # (lldb) expression self->date
-        # error: instance variable 'date' is protected
-        # error: 1 errors parsing expression
-        #
-
-        self.runCmd("breakpoint delete 1")
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("process continue")
-
-        # rdar://problem/8542091
-        # test/foundation: expr -o -- my not working?
-        #
-        # Test new feature with r115115:
-        # Add "-o" option to "expression" which prints the object description
-        # if available.
-        self.expect(
-            "expression --object-description -- my",
-            "Object description displayed correctly",
-            patterns=["Hello from.*a.out.*with timestamp: "])
-
-    @add_test_categories(['pyapi'])
-    def test_print_ivars_correctly(self):
-        self.build()
-        # See: <rdar://problem/8717050> lldb needs to use the ObjC runtime symbols for ivar offsets
-        # Only fails for the ObjC 2.0 runtime.
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        break1 = target.BreakpointCreateByLocation(self.main_source, self.line)
-        self.assertTrue(break1, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        thread = process.GetThreadAtIndex(0)
-        if thread.GetStopReason() != lldb.eStopReasonBreakpoint:
-            from lldbsuite.test.lldbutil import stop_reason_to_str
-            self.fail(STOPPED_DUE_TO_BREAKPOINT_WITH_STOP_REASON_AS %
-                      stop_reason_to_str(thread.GetStopReason()))
-
-        # Make sure we stopped at the first breakpoint.
-
-        cur_frame = thread.GetFrameAtIndex(0)
-
-        line_number = cur_frame.GetLineEntry().GetLine()
-        self.assertTrue(line_number == self.line, "Hit the first breakpoint.")
-
-        my_var = cur_frame.FindVariable("my")
-        self.assertTrue(my_var, "Made a variable object for my")
-
-        str_var = cur_frame.FindVariable("str")
-        self.assertTrue(str_var, "Made a variable object for str")
-
-        # Now make sure that the my->str == str:
-
-        my_str_var = my_var.GetChildMemberWithName("str")
-        self.assertTrue(my_str_var, "Found a str ivar in my")
-
-        str_value = int(str_var.GetValue(), 0)
-
-        my_str_value = int(my_str_var.GetValue(), 0)
-
-        self.assertTrue(
-            str_value == my_str_value,
-            "Got the correct value for my->str")
-
-    def test_expression_lookups_objc(self):
-        """Test running an expression detect spurious debug info lookups (DWARF)."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Stop at -[MyString initWithNSString:].
-        lldbutil.run_break_set_by_symbol(
-            self,
-            '-[MyString initWithNSString:]',
-            num_expected_locations=1,
-            sym_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        global file_index
-        # Log any DWARF lookups
-        ++file_index
-        logfile = os.path.join(
-            self.getBuildDir(),
-            "dwarf-lookups-" +
-            self.getArchitecture() +
-            "-" +
-            str(file_index) +
-            ".txt")
-        self.runCmd("log enable -f %s dwarf lookups" % (logfile))
-        self.runCmd("expr self")
-        self.runCmd("log disable dwarf lookups")
-
-        def cleanup():
-            if os.path.exists(logfile):
-                os.unlink(logfile)
-
-        self.addTearDownHook(cleanup)
-
-        if os.path.exists(logfile):
-            f = open(logfile)
-            lines = f.readlines()
-            num_errors = 0
-            for line in lines:
-                if "$__lldb" in line:
-                    if num_errors == 0:
-                        print(
-                            "error: found spurious name lookups when evaluating an expression:")
-                    num_errors += 1
-                    print(line, end='')
-            self.assertTrue(num_errors == 0, "Spurious lookups detected")
-            f.close()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods2.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods2.py
deleted file mode 100644 (file)
index b2d0d19..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-"""
-Test more expression command sequences with objective-c.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-@skipUnlessDarwin
-class FoundationTestCase2(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_expr_commands(self):
-        """More expression commands for objective-c."""
-        self.build()
-        main_spec = lldb.SBFileSpec("main.m")
-
-        (target, process, thread, bp) = lldbutil.run_to_source_breakpoint(
-            self, "Break here for selector: tests", main_spec)
-        
-        # Test_Selector:
-        self.expect("expression (char *)sel_getName(sel)",
-                    substrs=["(char *)",
-                             "length"])
-
-        desc_bkpt = target.BreakpointCreateBySourceRegex("Break here for description test",
-                                                          main_spec)
-        self.assertEqual(desc_bkpt.GetNumLocations(), 1, "description breakpoint has a location")
-        lldbutil.continue_to_breakpoint(process, desc_bkpt)
-        
-        self.expect("expression (char *)sel_getName(_cmd)",
-                    substrs=["(char *)",
-                             "description"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethodsNSArray.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethodsNSArray.py
deleted file mode 100644 (file)
index 8080029..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-"""
-Test more expression command sequences with objective-c.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-@skipUnlessDarwin
-class FoundationTestCaseNSArray(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_NSArray_expr_commands(self):
-        """Test expression commands for NSArray."""
-        self.build()
-        self.target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
-                self, '// Break here for NSArray tests',
-                lldb.SBFileSpec('main.m', False))
-
-        self.runCmd("thread backtrace")
-        self.expect("expression (int)[nil_mutable_array count]",
-                    patterns=["\(int\) \$.* = 0"])
-        self.expect("expression (int)[array1 count]",
-                    patterns=["\(int\) \$.* = 3"])
-        self.expect("expression (int)[array2 count]",
-                    patterns=["\(int\) \$.* = 3"])
-        self.expect("expression (int)array1.count",
-                    patterns=["\(int\) \$.* = 3"])
-        self.expect("expression (int)array2.count",
-                    patterns=["\(int\) \$.* = 3"])
-        self.runCmd("process continue")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethodsNSError.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethodsNSError.py
deleted file mode 100644 (file)
index 0771792..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-"""
-Test more expression command sequences with objective-c.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-@skipUnlessDarwin
-class FoundationTestCaseNSError(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(archs=["i[3-6]86"], bugnumber="<rdar://problem/28814052>")
-    def test_runtime_types(self):
-        """Test commands that require runtime types"""
-        self.build()
-        self.target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
-                self, '// Break here for NSString tests',
-                lldb.SBFileSpec('main.m', False))
-
-        # Test_NSString:
-        self.runCmd("thread backtrace")
-        self.expect("expression [str length]",
-                    patterns=["\(NSUInteger\) \$.* ="])
-        self.expect("expression str.length")
-        self.expect('expression str = [NSString stringWithCString: "new"]')
-        self.expect(
-            'po [NSError errorWithDomain:@"Hello" code:35 userInfo:@{@"NSDescription" : @"be completed."}]',
-            substrs=[
-                "Error Domain=Hello",
-                "Code=35",
-                "be completed."])
-        self.runCmd("process continue")
-
-    @expectedFailureAll(archs=["i[3-6]86"], bugnumber="<rdar://problem/28814052>")
-    def test_NSError_p(self):
-        """Test that p of the result of an unknown method does require a cast."""
-        self.build()
-        self.target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
-                self, '// Set break point at this line',
-                lldb.SBFileSpec('main.m', False))
-        self.expect("p [NSError thisMethodIsntImplemented:0]", error=True, patterns=[
-                    "no known method", "cast the message send to the method's return type"])
-        self.runCmd("process continue")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethodsString.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethodsString.py
deleted file mode 100644 (file)
index 65ccb0c..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-"""
-Test more expression command sequences with objective-c.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-@skipUnlessDarwin
-class FoundationTestCaseString(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_NSString_expr_commands(self):
-        """Test expression commands for NSString."""
-        self.build()
-        self.target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
-                self, '// Break here for NSString tests',
-                lldb.SBFileSpec('main.m', False))
-
-        # Test_NSString:
-        self.runCmd("thread backtrace")
-        self.expect("expression (int)[str length]",
-                    patterns=["\(int\) \$.* ="])
-        self.expect("expression (int)[str_id length]",
-                    patterns=["\(int\) \$.* ="])
-        self.expect("expression (id)[str description]",
-                    patterns=["\(id\) \$.* = 0x"])
-        self.expect("expression (id)[str_id description]",
-                    patterns=["\(id\) \$.* = 0x"])
-        self.expect("expression str.length")
-        self.expect('expression str = @"new"')
-        self.runCmd("image lookup -t NSString")
-        self.expect('expression str = (id)[NSString stringWithCString: "new"]')
-        self.runCmd("process continue")
-
-    @expectedFailureAll(archs=["i[3-6]86"], bugnumber="<rdar://problem/28814052>")
-    def test_MyString_dump_with_runtime(self):
-        """Test dump of a known Objective-C object by dereferencing it."""
-        self.build()
-        self.target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
-                self, '// Set break point at this line',
-                lldb.SBFileSpec('main.m', False))
-        self.expect(
-            "expression --show-types -- *my",
-            patterns=[
-                "\(MyString\) \$.* = ",
-                "\(MyBase\)"])
-        self.runCmd("process continue")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjectDescriptionAPI.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjectDescriptionAPI.py
deleted file mode 100644 (file)
index 803cbfe..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-"""
-Test SBValue.GetObjectDescription() with the value from SBTarget.FindGlobalVariables().
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjectDescriptionAPITestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.source = 'main.m'
-        self.line = line_number(
-            self.source, '// Set break point at this line.')
-
-    # rdar://problem/10857337
-    @skipUnlessDarwin
-    @add_test_categories(['pyapi'])
-    def test_find_global_variables_then_object_description(self):
-        """Exercise SBTarget.FindGlobalVariables() API."""
-        d = {'EXE': 'b.out'}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        exe = self.getBuildArtifact('b.out')
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        breakpoint = target.BreakpointCreateByLocation(self.source, self.line)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-        # Make sure we hit our breakpoint:
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint(
-            process, breakpoint)
-        self.assertTrue(len(thread_list) == 1)
-
-        thread = thread_list[0]
-        frame0 = thread.GetFrameAtIndex(0)
-
-        # Note my_global_str's object description prints fine here.
-        value_list1 = frame0.GetVariables(True, True, True, True)
-        for v in value_list1:
-            self.DebugSBValue(v)
-            if self.TraceOn():
-                print("val:", v)
-                print("object description:", v.GetObjectDescription())
-            if v.GetName() == 'my_global_str':
-                self.assertTrue(v.GetObjectDescription() ==
-                                'This is a global string')
-
-        # But not here!
-        value_list2 = target.FindGlobalVariables('my_global_str', 3)
-        for v in value_list2:
-            self.DebugSBValue(v)
-            if self.TraceOn():
-                print("val:", v)
-                print("object description:", v.GetObjectDescription())
-            if v.GetName() == 'my_global_str':
-                self.assertTrue(v.GetObjectDescription() ==
-                                'This is a global string')
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestRuntimeTypes.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestRuntimeTypes.py
deleted file mode 100644 (file)
index f5cb75b..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-"""
-Test that Objective-C methods from the runtime work correctly.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-@skipUnlessDarwin
-class RuntimeTypesTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(
-        oslist=["macosx"],
-        debug_info="gmodules",
-        bugnumber="llvm.org/pr27862")
-    def test_break(self):
-        """Test setting objc breakpoints using '_regexp-break' and 'breakpoint set'."""
-        if self.getArchitecture() != 'x86_64':
-            self.skipTest("This only applies to the v2 runtime")
-
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Stop at -[MyString description].
-        lldbutil.run_break_set_by_symbol(
-            self,
-            '-[MyString description]',
-            num_expected_locations=1,
-            sym_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The backtrace should show we stop at -[MyString description].
-        self.expect("thread backtrace", "Stop at -[MyString description]",
-                    substrs=["a.out`-[MyString description]"])
-
-        # Use runtime information about NSString.
-
-        # The length property should be usable.
-        self.expect("expression str.length", VARIABLES_DISPLAYED_CORRECTLY,
-                    patterns=[r"(\(unsigned long long\))|\(NSUInteger\)"])
-
-        # Static methods on NSString should work.
-        self.expect(
-            "expr [NSString stringWithCString:\"foo\" encoding:1]",
-            VALID_TYPE,
-            substrs=[
-                "(id)",
-                "$1"])
-
-        self.expect("po $1", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=["foo"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestSymbolTable.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestSymbolTable.py
deleted file mode 100644 (file)
index abfc762..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-"""
-Test symbol table access for main.m.
-"""
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-@skipUnlessDarwin
-class FoundationSymtabTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    symbols_list = ['-[MyString initWithNSString:]',
-                    '-[MyString dealloc]',
-                    '-[MyString description]',
-                    '-[MyString descriptionPauses]',     # synthesized property
-                    # synthesized property
-                    '-[MyString setDescriptionPauses:]',
-                    'Test_Selector',
-                    'Test_NSString',
-                    'Test_MyString',
-                    'Test_NSArray',
-                    'main'
-                    ]
-
-    @add_test_categories(['pyapi'])
-    def test_with_python_api(self):
-        """Test symbol table access with Python APIs."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        #
-        # Exercise Python APIs to access the symbol table entries.
-        #
-
-        # Create the filespec by which to locate our a.out module.
-        filespec = lldb.SBFileSpec(exe, False)
-
-        module = target.FindModule(filespec)
-        self.assertTrue(module, VALID_MODULE)
-
-        # Create the set of known symbols.  As we iterate through the symbol
-        # table, remove the symbol from the set if it is a known symbol.
-        expected_symbols = set(self.symbols_list)
-        for symbol in module:
-            self.assertTrue(symbol, VALID_SYMBOL)
-            #print("symbol:", symbol)
-            name = symbol.GetName()
-            if name in expected_symbols:
-                #print("Removing %s from known_symbols %s" % (name, expected_symbols))
-                expected_symbols.remove(name)
-
-        # At this point, the known_symbols set should have become an empty set.
-        # If not, raise an error.
-        #print("symbols unaccounted for:", expected_symbols)
-        self.assertTrue(len(expected_symbols) == 0,
-                        "All the known symbols are accounted for")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/const-strings.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/const-strings.m
deleted file mode 100644 (file)
index 8a43abe..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#import <Foundation/Foundation.h>
-
-// Tests to run:
-
-// Breakpoint 1
-// --
-// (lldb) expr (int)[str compare:@"hello"]
-// (int) $0 = 0
-// (lldb) expr (int)[str compare:@"world"]
-// (int) $1 = -1
-// (lldb) expr (int)[@"" length]
-// (int) $2 = 0
-
-int main ()
-{
-  NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-
-  NSString *str = [NSString stringWithCString:"hello" encoding:NSASCIIStringEncoding];
-
-  NSLog(@"String \"%@\" has length %lu", str, [str length]); // Set breakpoint here.
-
-  [pool drain];
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/main.m
deleted file mode 100644 (file)
index 519bec5..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-#import <Foundation/Foundation.h>
-#include <unistd.h>
-#import "my-base.h"
-
-@interface MyString : MyBase {
-    NSString *str;
-    NSDate *date;
-    BOOL _desc_pauses;
-}
-
-@property(retain) NSString * str_property;
-@property BOOL descriptionPauses;
-
-- (id)initWithNSString:(NSString *)string;
-@end
-
-@implementation MyString
-@synthesize descriptionPauses = _desc_pauses;
-@synthesize str_property = str;
-
-- (id)initWithNSString:(NSString *)string
-{
-    if (self = [super init])
-    {
-        str = [NSString stringWithString:string];
-        date = [NSDate date];
-    }
-    self.descriptionPauses = NO;
-    return self;
-}
-
-- (void)dealloc
-{
-    [date release];
-    [str release];
-    [super dealloc];
-}
-
-- (NSString *)description
-{
-    // Set a breakpoint on '-[MyString description]' and test expressions:
-    // expression (char *)sel_getName(_cmd)
-  if (self.descriptionPauses)  // Break here for description test
-    {
-        printf ("\nAbout to sleep.\n");
-        usleep(100000);
-    }
-
-    return [str stringByAppendingFormat:@" with timestamp: %@", date];
-}
-@end
-
-int
-Test_Selector ()
-{
-    SEL sel = @selector(length);
-    printf("sel = %p\n", sel);
-    // Expressions to test here for selector: 
-    // expression (char *)sel_getName(sel)
-    //      The expression above should return "sel" as it should be just
-    //      a uniqued C string pointer. We were seeing the result pointer being
-    //      truncated with recent LLDBs.
-    return 0; // Break here for selector: tests
-}
-
-int
-Test_NSString (const char *program)
-{
-    NSString *str = [NSString stringWithFormat:@"Hello from '%s'", program];
-    NSLog(@"NSString instance: %@", str);
-    printf("str = '%s'\n", [str cStringUsingEncoding: [NSString defaultCStringEncoding]]);
-    printf("[str length] = %zu\n", (size_t)[str length]);
-    printf("[str description] = %s\n", [[str description] UTF8String]);
-    id str_id = str;
-    // Expressions to test here for NSString:
-    // expression (char *)sel_getName(sel)
-    // expression [str length]
-    // expression [str_id length]
-    // expression [str description]
-    // expression [str_id description]
-    // expression str.length
-    // expression str.description
-    // expression str = @"new"
-    // expression str = [NSString stringWithFormat: @"%cew", 'N']
-    return 0; // Break here for NSString tests
-}
-
-NSString *my_global_str = NULL;
-
-void
-Test_MyString (const char *program)
-{
-    my_global_str = @"This is a global string";
-    NSString *str = [NSString stringWithFormat:@"Hello from '%s'", program];
-    MyString *my = [[MyString alloc] initWithNSString:str];
-    NSLog(@"MyString instance: %@", [my description]);
-    my.descriptionPauses = YES;     // Set break point at this line.  Test 'expression -o -- my'.
-    NSLog(@"MyString instance: %@", [my description]);
-}
-
-int
-Test_NSArray ()
-{
-    NSMutableArray *nil_mutable_array = nil;
-    NSArray *array1 = [NSArray arrayWithObjects: @"array1 object1", @"array1 object2", @"array1 object3", nil];
-    NSArray *array2 = [NSArray arrayWithObjects: array1, @"array2 object2", @"array2 object3", nil];
-    // Expressions to test here for NSArray:
-    // expression [nil_mutable_array count]
-    // expression [array1 count]
-    // expression array1.count
-    // expression [array2 count]
-    // expression array2.count
-    id obj;
-    // After each object at index call, use expression and validate object
-    obj = [array1 objectAtIndex: 0]; // Break here for NSArray tests
-    obj = [array1 objectAtIndex: 1];
-    obj = [array1 objectAtIndex: 2];
-
-    obj = [array2 objectAtIndex: 0];
-    obj = [array2 objectAtIndex: 1];
-    obj = [array2 objectAtIndex: 2];
-    NSUInteger count = [nil_mutable_array count];
-    return 0;
-}
-
-
-int main (int argc, char const *argv[])
-{
-    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-    Test_Selector();
-    Test_NSArray ();
-    Test_NSString (argv[0]);
-    Test_MyString (argv[0]);
-
-    printf("sizeof(id) = %zu\n", sizeof(id));
-    printf("sizeof(Class) = %zu\n", sizeof(Class));
-    printf("sizeof(SEL) = %zu\n", sizeof(SEL));
-
-    [pool release];
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/my-base.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/my-base.h
deleted file mode 100644 (file)
index 53202aa..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-@interface MyBase : NSObject 
-{
-#if !__OBJC2__
-  int maybe_used; // The 1.0 runtime needs to have backed properties...
-#endif
-}
-@property int propertyMovesThings;
-@end
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/my-base.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/my-base.m
deleted file mode 100644 (file)
index 0c316b2..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#import <Foundation/Foundation.h>
-#import "my-base.h"
-@implementation MyBase
-#if __OBJC2__
-@synthesize propertyMovesThings;
-#else
-@synthesize propertyMovesThings = maybe_used;
-#endif
-@end
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/global_ptrs/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/global_ptrs/Makefile
deleted file mode 100644 (file)
index afecbf9..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-OBJC_SOURCES := main.m
-LD_EXTRAS := -lobjc -framework Foundation
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/global_ptrs/TestGlobalObjects.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/global_ptrs/TestGlobalObjects.py
deleted file mode 100644 (file)
index 5cc6f4e..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-"""Test that a global ObjC object found before the process is started updates correctly."""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestObjCGlobalVar(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        self.main_source = lldb.SBFileSpec("main.m")
-
-    @skipUnlessDarwin
-    @add_test_categories(['pyapi'])
-    def test_with_python_api(self):
-        """Test that a global ObjC object found before the process is started updates correctly."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        bkpt = target.BreakpointCreateBySourceRegex('NSLog', self.main_source)
-        self.assertTrue(bkpt, VALID_BREAKPOINT)
-
-        # Before we launch, make an SBValue for our global object pointer:
-        g_obj_ptr = target.FindFirstGlobalVariable("g_obj_ptr")
-        self.assertTrue(g_obj_ptr.GetError().Success(), "Made the g_obj_ptr")
-        self.assertTrue(
-            g_obj_ptr.GetValueAsUnsigned(10) == 0,
-            "g_obj_ptr is initially null")
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        threads = lldbutil.get_threads_stopped_at_breakpoint(process, bkpt)
-        if len(threads) != 1:
-            self.fail("Failed to stop at breakpoint 1.")
-
-        thread = threads[0]
-
-        dyn_value = g_obj_ptr.GetDynamicValue(lldb.eDynamicCanRunTarget)
-        self.assertTrue(
-            dyn_value.GetError().Success(),
-            "Dynamic value is valid")
-        self.assertTrue(dyn_value.GetObjectDescription() == "Some NSString")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/global_ptrs/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/global_ptrs/main.m
deleted file mode 100644 (file)
index 977a984..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#import <Foundation/Foundation.h>
-
-id g_obj_ptr = nil;
-
-int
-main()
-{
-  g_obj_ptr = @"Some NSString";
-  NSLog(@"My string was %@.", g_obj_ptr);
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/InternalDefiner.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/InternalDefiner.h
deleted file mode 100644 (file)
index 59652d4..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#import <Foundation/Foundation.h>
-#import <stdint.h>
-
-@interface InternalDefiner : NSObject {
-@public
-    uintptr_t foo;
-}
-
--(id)initWithFoo:(uintptr_t)f andBar:(uintptr_t)b;
-
-@end
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/InternalDefiner.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/InternalDefiner.m
deleted file mode 100644 (file)
index 1a10ce0..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#import "InternalDefiner.h"
-
-@interface InternalDefiner () {
-    uintptr_t bar;
-}
-
-@end
-
-@implementation InternalDefiner
-
--(id)init
-{
-    if (self = [super init])
-    {
-        foo = 2;
-        bar = 3;
-    }
-    return self;
-}
-
--(id)initWithFoo:(uintptr_t)f andBar:(uintptr_t)b
-{
-    if (self = [super init])
-    {
-        foo = f;
-        bar = b;
-    }
-    return self;
-}
-
-@end
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/Makefile
deleted file mode 100644 (file)
index 0664769..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-DYLIB_NAME := InternalDefiner
-DYLIB_OBJC_SOURCES := InternalDefiner.m
-OBJC_SOURCES := main.m
-
-LD_EXTRAS = -framework Foundation
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/TestHiddenIvars.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/TestHiddenIvars.py
deleted file mode 100644 (file)
index 03a325a..0000000
+++ /dev/null
@@ -1,238 +0,0 @@
-"""Test that hidden ivars in a shared library are visible from the main executable."""
-
-
-
-import unittest2
-import subprocess
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class HiddenIvarsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.source = 'main.m'
-        self.line = line_number(self.source, '// breakpoint1')
-        # The makefile names of the shared libraries as they appear in DYLIB_NAME.
-        # The names should have no loading "lib" or extension as they will be
-        # localized
-        self.shlib_names = ["InternalDefiner"]
-
-    @skipUnlessDarwin
-    @skipIf(
-        debug_info=no_match("dsym"),
-        bugnumber="This test requires a stripped binary and a dSYM")
-    def test_expr_stripped(self):
-        if self.getArchitecture() == 'i386':
-            self.skipTest("requires modern objc runtime")
-        else:
-            self.build()
-            self.expr(True)
-
-    @skipUnlessDarwin
-    def test_expr(self):
-        if self.getArchitecture() == 'i386':
-            self.skipTest("requires modern objc runtime")
-        else:
-            self.build()
-            self.expr(False)
-
-    @skipUnlessDarwin
-    @skipIf(
-        debug_info=no_match("dsym"),
-        bugnumber="This test requires a stripped binary and a dSYM")
-    def test_frame_variable_stripped(self):
-        if self.getArchitecture() == 'i386':
-            self.skipTest("requires modern objc runtime")
-        else:
-            self.build()
-            self.frame_var(True)
-
-    @skipUnlessDarwin
-    def test_frame_variable(self):
-        if self.getArchitecture() == 'i386':
-            self.skipTest("requires modern objc runtime")
-        else:
-            self.build()
-            self.frame_var(False)
-
-    @unittest2.expectedFailure("rdar://18683637")
-    @skipUnlessDarwin
-    def test_frame_variable_across_modules(self):
-        if self.getArchitecture() == 'i386':
-            self.skipTest("requires modern objc runtime")
-        else:
-            self.build()
-            self.common_setup(False)
-            self.expect(
-                "frame variable k->bar",
-                VARIABLES_DISPLAYED_CORRECTLY,
-                substrs=["= 3"])
-
-    def common_setup(self, strip):
-
-        if strip:
-            self.assertTrue(subprocess.call(
-                ['/usr/bin/strip', '-Sx',
-                 self.getBuildArtifact('libInternalDefiner.dylib')]) == 0,
-                            'stripping dylib succeeded')
-            self.assertTrue(subprocess.call(
-                ['/bin/rm', '-rf',
-                 self.getBuildArtifact('libInternalDefiner.dylib.dSYM')]) == 0,
-                            'remove dylib dSYM file succeeded')
-            self.assertTrue(subprocess.call(['/usr/bin/strip', '-Sx',
-                                             self.getBuildArtifact("a.out")
-                                            ]) == 0,
-                            'stripping a.out succeeded')
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
-        self.assertTrue(target, VALID_TARGET)
-
-        # Create the breakpoint inside function 'main'.
-        breakpoint = target.BreakpointCreateByLocation(self.source, self.line)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Register our shared libraries for remote targets so they get
-        # automatically uploaded
-        environment = self.registerSharedLibrariesWithTarget(
-            target, self.shlib_names)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, environment, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break inside the foo function which takes a bar_ptr argument.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-    def expr(self, strip):
-        self.common_setup(strip)
-
-        # This should display correctly.
-        self.expect(
-            "expression (j->_definer->foo)",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=["= 4"])
-
-        self.expect(
-            "expression (j->_definer->bar)",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=["= 5"])
-
-        if strip:
-            self.expect(
-                "expression *(j->_definer)",
-                VARIABLES_DISPLAYED_CORRECTLY,
-                substrs=["foo = 4"])
-        else:
-            self.expect(
-                "expression *(j->_definer)",
-                VARIABLES_DISPLAYED_CORRECTLY,
-                substrs=[
-                    "foo = 4",
-                    "bar = 5"])
-
-        self.expect("expression (k->foo)", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=["= 2"])
-
-        self.expect("expression (k->bar)", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=["= 3"])
-
-        self.expect(
-            "expression k.filteredDataSource",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                ' = 0x',
-                '"2 elements"'])
-
-        if strip:
-            self.expect("expression *(k)", VARIABLES_DISPLAYED_CORRECTLY,
-                        substrs=["foo = 2", ' = 0x', '"2 elements"'])
-        else:
-            self.expect(
-                "expression *(k)",
-                VARIABLES_DISPLAYED_CORRECTLY,
-                substrs=[
-                    "foo = 2",
-                    "bar = 3",
-                    '_filteredDataSource = 0x',
-                    '"2 elements"'])
-
-    def frame_var(self, strip):
-        self.common_setup(strip)
-
-        # This should display correctly.
-        self.expect(
-            "frame variable j->_definer->foo",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=["= 4"])
-
-        if not strip:
-            self.expect(
-                "frame variable j->_definer->bar",
-                VARIABLES_DISPLAYED_CORRECTLY,
-                substrs=["= 5"])
-
-        if strip:
-            self.expect(
-                "frame variable *j->_definer",
-                VARIABLES_DISPLAYED_CORRECTLY,
-                substrs=["foo = 4"])
-        else:
-            self.expect(
-                "frame variable *j->_definer",
-                VARIABLES_DISPLAYED_CORRECTLY,
-                substrs=[
-                    "foo = 4",
-                    "bar = 5"])
-
-        self.expect("frame variable k->foo", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=["= 2"])
-
-        self.expect(
-            "frame variable k->_filteredDataSource",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                ' = 0x',
-                '"2 elements"'])
-
-        if strip:
-            self.expect(
-                "frame variable *k",
-                VARIABLES_DISPLAYED_CORRECTLY,
-                substrs=[
-                    "foo = 2",
-                    '_filteredDataSource = 0x',
-                    '"2 elements"'])
-        else:
-            self.expect(
-                "frame variable *k",
-                VARIABLES_DISPLAYED_CORRECTLY,
-                substrs=[
-                    "foo = 2",
-                    "bar = 3",
-                    '_filteredDataSource = 0x',
-                    '"2 elements"'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/main.m
deleted file mode 100644 (file)
index 1795d56..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#import <Foundation/Foundation.h>
-#import "InternalDefiner.h"
-
-@interface Container : NSObject {
-@public
-    InternalDefiner *_definer;
-}
-
--(id)init;
-@end
-
-@implementation Container
-
--(id)init
-{
-    if (self = [super init])
-    {
-        _definer = [[InternalDefiner alloc] initWithFoo:4 andBar:5];
-    }
-    return self;
-}
-
-@end
-
-@interface InheritContainer : InternalDefiner 
-@property (nonatomic, strong) NSMutableArray *filteredDataSource;
--(id)init;
-@end
-
-@implementation InheritContainer
-
--(id)init
-{
-    if (self = [super initWithFoo:2 andBar:3])
-    {
-        self.filteredDataSource = [NSMutableArray arrayWithObjects:@"hello", @"world", nil];
-    }
-    return self;
-}
-
-@end
-
-int main(int argc, const char * argv[])
-{
-    @autoreleasepool {
-        Container *j = [[Container alloc] init];
-        InheritContainer *k = [[InheritContainer alloc] init];
-
-        printf("ivar value = %u\n", (unsigned)j->_definer->foo); // breakpoint1
-        printf("ivar value = %u\n", (unsigned)k->foo);
-    }   
-    return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/Makefile
deleted file mode 100644 (file)
index ba7e23a..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-CFLAGS := -g -O0
-CFLAGS_NO_DEBUG = 
-
-all: aout
-
-aout: 
-       $(CC) $(CFLAGS_NO_DEBUG) $(SRCDIR)/myclass.m -c -o myclass.o
-       $(CC) $(CFLAGS) myclass.o $(SRCDIR)/repro.m -framework Foundation
-
-clean::
-       rm -f myclass.o
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py
deleted file mode 100644 (file)
index 3019bcf..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-"""
-Test that dynamically discovered ivars of type IMP do not crash LLDB
-"""
-
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjCiVarIMPTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    @skipIf(archs=['i386'])  # objc file does not build for i386
-    @no_debug_info_test
-    def test_imp_ivar_type(self):
-        """Test that dynamically discovered ivars of type IMP do not crash LLDB"""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target from the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Set up our breakpoint
-
-        bkpt = lldbutil.run_break_set_by_source_regexp(self, "break here")
-
-        # Now launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        PROCESS_STOPPED)
-
-        self.expect(
-            'frame variable --ptr-depth=1 --show-types -d run -- object',
-            substrs=[
-                '(MyClass *) object = 0x',
-                '(void *) myImp = 0x'])
-        self.expect(
-            'disassemble --start-address `((MyClass*)object)->myImp`',
-            substrs=['-[MyClass init]'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/myclass.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/myclass.h
deleted file mode 100644 (file)
index da28d1e..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@interface MyClass : NSObject
-{}
-- (id)init;
-@end
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/myclass.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/myclass.m
deleted file mode 100644 (file)
index 85b2fcf..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#import <Foundation/Foundation.h>
-#import "myclass.h"
-
-@implementation MyClass
-{
-  IMP myImp;
-}
-- (id)init {
-  if (self = [super init])
-  {
-    SEL theSelector = @selector(init);
-    self->myImp = [self methodForSelector:theSelector]; 
-  }
-  return self;
-}
-@end
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/repro.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/repro.m
deleted file mode 100644 (file)
index 14f911f..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#import <Foundation/Foundation.h>
-#import "myclass.h"
-
-int main() {
-  id object = [MyClass new];
-  return 0; // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/Makefile
deleted file mode 100644 (file)
index 0d8068b..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-CFLAGS_EXTRAS = -I$(BUILDDIR)
-USE_PRIVATE_MODULE_CACHE := YES
-OBJC_SOURCES := main.m foo.m
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/TestClangModulesAppUpdate.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/TestClangModulesAppUpdate.py
deleted file mode 100644 (file)
index 4bd136b..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-
-import unittest2
-import os
-import shutil
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestClangModuleAppUpdate(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    @skipIf(debug_info=no_match(["gmodules"]))
-    def test_rebuild_app_modules_untouched(self):
-        with open(self.getBuildArtifact("module.modulemap"), "w") as f:
-            f.write("""
-                    module Foo { header "f.h" }
-                    """)
-        with open(self.getBuildArtifact("f.h"), "w") as f:
-            f.write("""
-                    @import Foundation;
-                    @interface Foo : NSObject {
-                       int i;
-                    }
-                    +(instancetype)init;
-                    @end
-                    """)
-
-        mod_cache = self.getBuildArtifact("private-module-cache")
-        import os
-        if os.path.isdir(mod_cache):
-          shutil.rmtree(mod_cache)
-        self.build()
-        self.assertTrue(os.path.isdir(mod_cache), "module cache exists")
-
-        target, process, _, bkpt = lldbutil.run_to_source_breakpoint(
-            self, "break here", lldb.SBFileSpec("main.m"))
-        bar = target.FindTypes('Bar').GetTypeAtIndex(0)
-        foo = bar.GetDirectBaseClassAtIndex(0).GetType()
-        self.assertEqual(foo.GetNumberOfFields(), 1)
-        self.assertEqual(foo.GetFieldAtIndex(0).GetName(), "i")
-
-        # Rebuild.
-        process.Kill()
-        os.remove(self.getBuildArtifact('main.o'))
-        os.remove(self.getBuildArtifact('a.out'))
-        self.build()
-
-        # Reattach.
-        target, process, _, _ = lldbutil.run_to_breakpoint_do_run(self, target, bkpt)
-        bar = target.FindTypes('Bar').GetTypeAtIndex(0)
-        foo = bar.GetDirectBaseClassAtIndex(0).GetType()
-        self.assertEqual(foo.GetNumberOfFields(), 1)
-        self.assertEqual(foo.GetFieldAtIndex(0).GetName(), "i")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/foo.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/foo.m
deleted file mode 100644 (file)
index 83a5abc..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-@import Foundation;
-@import Foo;
-@implementation Foo
-+(instancetype)init {
-  return [super init];
-}
-@end
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/main.m
deleted file mode 100644 (file)
index 37ec1f3..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-@import Umbrella;
-
-@interface Bar : Foo
-+(instancetype)init;
-@end
-
-@implementation Bar
-+(instancetype)init {
-  return [super init];
-}
-@end
-
-int main(int argc, char **argv) {
-  id bar = [Bar new];
-  [bar i]; // break here
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/module.modulemap b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/module.modulemap
deleted file mode 100644 (file)
index c142410..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-module Umbrella {
-  header "umbrella.h"
-  export *
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/umbrella.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/umbrella.h
deleted file mode 100644 (file)
index 375d3ea..0000000
+++ /dev/null
@@ -1 +0,0 @@
-@import Foo;
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/Makefile
deleted file mode 100644 (file)
index 3b2bd50..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-OBJC_SOURCES := main.m
-
-CFLAGS_EXTRAS = $(MANDATORY_MODULE_BUILD_CFLAGS)
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/TestModulesAutoImport.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/TestModulesAutoImport.py
deleted file mode 100644 (file)
index 449e5b5..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-"""Test that importing modules in Objective-C works as expected."""
-
-
-
-import unittest2
-import lldb
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjCModulesAutoImportTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line = line_number('main.m', '// Set breakpoint 0 here.')
-
-    @skipUnlessDarwin
-    @skipIf(macos_version=["<", "10.12"])
-    def test_expr(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break inside the foo function which takes a bar_ptr argument.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        self.runCmd("settings set target.auto-import-clang-modules true")
-
-        self.expect("p getpid()", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=["pid_t"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/main.m
deleted file mode 100644 (file)
index 5452ffd..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-@import Darwin;
-
-int main()
-{
-    size_t ret = printf("Stop here\n"); // Set breakpoint 0 here.
-    return ret;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-cache/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-cache/Makefile
deleted file mode 100644 (file)
index d0aadc1..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-OBJC_SOURCES := main.m
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-cache/TestClangModulesCache.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-cache/TestClangModulesCache.py
deleted file mode 100644 (file)
index 3a12b23..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-"""Test that the clang modules cache directory can be controlled."""
-
-
-
-import unittest2
-import os
-import shutil
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjCModulesTestCase(TestBase):
-    NO_DEBUG_INFO_TESTCASE = True
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    def test_expr(self):
-        self.build()
-        self.main_source_file = lldb.SBFileSpec("main.m")
-        self.runCmd("settings set target.auto-import-clang-modules true")
-        mod_cache = self.getBuildArtifact("my-clang-modules-cache")
-        if os.path.isdir(mod_cache):
-          shutil.rmtree(mod_cache)
-        self.assertFalse(os.path.isdir(mod_cache),
-                         "module cache should not exist")
-        self.runCmd('settings set symbols.clang-modules-cache-path "%s"' % mod_cache)
-        self.runCmd('settings set target.clang-module-search-paths "%s"'
-                    % self.getSourceDir())
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
-            self, "Set breakpoint here", self.main_source_file)
-        self.runCmd("expr @import Foo")
-        self.assertTrue(os.path.isdir(mod_cache), "module cache exists")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-cache/f.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-cache/f.h
deleted file mode 100644 (file)
index 56757a7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-void f() {}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-cache/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-cache/main.m
deleted file mode 100644 (file)
index 6009d28..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#include "f.h"
-int main() {
-  f(); // Set breakpoint here.
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-cache/module.modulemap b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-cache/module.modulemap
deleted file mode 100644 (file)
index f54534a..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-module Foo {
-  header "f.h"
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-hash-mismatch/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-hash-mismatch/Makefile
deleted file mode 100644 (file)
index 59bf009..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-OBJC_SOURCES := main.m
-CFLAGS_EXTRAS = -I$(BUILDDIR)
-USE_PRIVATE_MODULE_CACHE = YES
-
-.PHONY: update-module
-
-all: $(EXE)
-       $(MAKE) -f $(SRCDIR)/Makefile update-module
-
-include Makefile.rules
-
-update-module:
-       echo "forcing an update of f.pcm"
-       echo "typedef int something_other;" > $(BUILDDIR)/f.h
-       $(CC) $(CFLAGS) $(MANDATORY_MODULE_BUILD_CFLAGS) \
-               -c $(SRCDIR)/other.m -o $(BUILDDIR)/other.o
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-hash-mismatch/TestClangModulesHashMismatch.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-hash-mismatch/TestClangModulesHashMismatch.py
deleted file mode 100644 (file)
index 606bd30..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-
-import unittest2
-import os
-import shutil
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestClangModuleHashMismatch(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    @skipIf(debug_info=no_match(["gmodules"]))
-    def test_expr(self):
-        with open(self.getBuildArtifact("module.modulemap"), "w") as f:
-            f.write("""
-                    module Foo { header "f.h" }
-                    """)
-        with open(self.getBuildArtifact("f.h"), "w") as f:
-            f.write("""
-                    typedef int my_int;
-                    void f() {}
-                    """)
-
-        mod_cache = self.getBuildArtifact("private-module-cache")
-        if os.path.isdir(mod_cache):
-          shutil.rmtree(mod_cache)
-        self.build()
-        self.assertTrue(os.path.isdir(mod_cache), "module cache exists")
-
-        logfile = self.getBuildArtifact("host.log")
-        self.runCmd("log enable -v -f %s lldb host" % logfile)
-        target, _, _, _ = lldbutil.run_to_source_breakpoint(
-            self, "break here", lldb.SBFileSpec("main.m"))
-        target.GetModuleAtIndex(0).FindTypes('my_int') 
-
-        found = False
-        with open(logfile, 'r') as f:
-            for line in f:
-                if "hash mismatch" in line and "Foo" in line:
-                    found = True
-        self.assertTrue(found)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-hash-mismatch/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-hash-mismatch/main.m
deleted file mode 100644 (file)
index 5065222..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#include "f.h"
-int main(int argc, char **argv) {
-  my_int i = argc;
-  f(); // break here
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-hash-mismatch/other.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-hash-mismatch/other.m
deleted file mode 100644 (file)
index 0afd3eb..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#include "f.h"
-something_other f() {
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/Makefile
deleted file mode 100644 (file)
index abb36e2..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-OBJC_SOURCES := main.m myModule.m
-
-CFLAGS_EXTRAS = $(MANDATORY_MODULE_BUILD_CFLAGS)
-LD_EXTRAS := -framework Foundation
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/TestIncompleteModules.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/TestIncompleteModules.py
deleted file mode 100644 (file)
index 8fed613..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-"""Test that DWARF types are trusted over module types"""
-
-
-
-import unittest2
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class IncompleteModulesTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line = line_number('main.m', '// Set breakpoint 0 here.')
-
-    @skipUnlessDarwin
-    @skipIf(debug_info=no_match(["gmodules"]))
-    def test_expr(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        self.runCmd(
-            "settings set target.clang-module-search-paths \"" +
-            self.getSourceDir() +
-            "\"")
-
-        self.expect("expr @import myModule; 3", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=["int", "3"])
-
-        self.expect(
-            "expr private_func()",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                "int",
-                "5"])
-
-        self.expect("expr MY_MIN(2,3)", "#defined macro was found",
-                    substrs=["int", "2"])
-
-        self.expect("expr MY_MAX(2,3)", "#undefd macro was correctly not found",
-                    error=True)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/main.m
deleted file mode 100644 (file)
index bfa0b06..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-@import myModule;
-@import minmax;
-
-int main(int argc, char **argv) {
-  public_func(); // Set breakpoint 0 here.
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/minmax.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/minmax.h
deleted file mode 100644 (file)
index efad120..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#define MY_MIN(A, B) (((A) < (B)) ? (A) : (B))
-#define MY_MAX(A, B) (((A) < (B)) ? (B) : (A))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/module.map b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/module.map
deleted file mode 100644 (file)
index 0dd9fad..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-module myModule {
-  header "myModule.h"
-  export *
-}
-
-module minmax {
-  header "minmax.h"
-  export *
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/myModule.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/myModule.h
deleted file mode 100644 (file)
index 04ec388..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-@import minmax;
-
-#undef MY_MAX
-
-extern void public_func();
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/myModule.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/myModule.m
deleted file mode 100644 (file)
index 372a328..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#include "myModule.h"
-
-void public_func() {}
-
-int private_func() {
-  return 5;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/Makefile
deleted file mode 100644 (file)
index b4afe2c..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-C_SOURCES := myModule.c
-
-OBJC_SOURCES := main.m
-
-CFLAGS_EXTRAS = $(MANDATORY_MODULE_BUILD_CFLAGS) -I$(BUILDDIR)
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py
deleted file mode 100644 (file)
index e2e335a..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-"""Test that inline functions from modules are imported correctly"""
-
-
-
-
-import unittest2
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ModulesInlineFunctionsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    @skipIf(macos_version=["<", "10.12"], debug_info=no_match(["gmodules"]))
-    def test_expr(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break inside the foo function which takes a bar_ptr argument.
-        lldbutil.run_to_source_breakpoint(
-            self, '// Set breakpoint here.', lldb.SBFileSpec('main.m'))
-
-        self.runCmd(
-            "settings set target.clang-module-search-paths \"" +
-            self.getSourceDir() +
-            "\"")
-
-        self.expect("expr @import myModule; 3", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=["int", "3"])
-
-        self.expect("expr isInline(2)", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=["4"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/main.m
deleted file mode 100644 (file)
index 13a5bf3..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-@import Darwin;
-@import myModule;
-
-int main()
-{
-    int a = isInline(2);
-    int b = notInline();
-    printf("%d %d\n", a, b); // Set breakpoint here.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/module.map b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/module.map
deleted file mode 100644 (file)
index 2ef8064..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-module myModule {
-  header "myModule.h"
-  export *
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/myModule.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/myModule.c
deleted file mode 100644 (file)
index ad3c85d..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#include "myModule.h"
-
-int notInline()
-{
-    return 3;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/myModule.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/myModule.h
deleted file mode 100644 (file)
index d50d010..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-int notInline();
-
-static __inline__ __attribute__ ((always_inline)) int isInline(int a)
-{
-    int b = a + a;
-    return b;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/Makefile
deleted file mode 100644 (file)
index 5d0a220..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CFLAGS_EXTRAS = -I$(BUILDDIR)
-USE_PRIVATE_MODULE_CACHE = YES
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/TestClangModulesUpdate.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/TestClangModulesUpdate.py
deleted file mode 100644 (file)
index e36a227..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-
-import unittest2
-import os
-import shutil
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestClangModuleUpdate(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    @skipIf(debug_info=no_match(["gmodules"]))
-    def test_expr(self):
-        with open(self.getBuildArtifact("module.modulemap"), "w") as f:
-            f.write("""
-                    module Foo { header "f.h" }
-                    """)
-        with open(self.getBuildArtifact("f.h"), "w") as f:
-            f.write("""
-                    struct Q { int i; };
-                    void f() {}
-                    """)
-
-        mod_cache = self.getBuildArtifact("private-module-cache")
-        if os.path.isdir(mod_cache):
-          shutil.rmtree(mod_cache)
-        d = {'OBJC_SOURCES': 'first.m'}
-        self.build(dictionary=d)
-        self.assertTrue(os.path.isdir(mod_cache), "module cache exists")
-
-        logfile = self.getBuildArtifact("modules.log")
-        self.runCmd("log enable -f %s lldb module" % logfile)
-        target, process, _, bkpt = lldbutil.run_to_name_breakpoint(self, "main")
-        self.assertIn("int i", str(target.FindTypes('Q').GetTypeAtIndex(0)))
-        self.expect("image list -g", patterns=[r'first\.o', r'Foo.*\.pcm'])
-
-        # Update the module.
-        with open(self.getBuildArtifact("f.h"), "w") as f:
-            f.write("""
-                    struct S { int i; };
-                    struct S getS() { struct S r = {1}; return r; }
-                    void f() {}
-                    """)
-
-        # Rebuild.
-        d = {'OBJC_SOURCES': 'second.m'}
-        self.build(dictionary=d)
-
-        # Reattach.
-        process.Kill()
-        target, process, _, _ = lldbutil.run_to_breakpoint_do_run(self, target, bkpt)
-        self.assertIn("int i", str(target.FindTypes('S').GetTypeAtIndex(0)))
-        self.expect("image list -g", patterns=[r'second\.o', r'Foo.*\.pcm'])
-
-        # Check log file.
-        found = False
-        with open(logfile, 'r') as f:
-            for line in f:
-                if "module changed" in line and "Foo" in line:
-                    found = True
-        self.assertTrue(found)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/first.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/first.m
deleted file mode 100644 (file)
index bcc458f..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-@import Umbrella;
-int main(int argc, char **argv) {
-  f(); // break here
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/module.modulemap b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/module.modulemap
deleted file mode 100644 (file)
index c142410..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-module Umbrella {
-  header "umbrella.h"
-  export *
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/second.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/second.m
deleted file mode 100644 (file)
index bce925c..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-@import Umbrella;
-int main() {
-  struct S s = getS(); // break here
-  return s.i;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/umbrella.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/umbrella.h
deleted file mode 100644 (file)
index 375d3ea..0000000
+++ /dev/null
@@ -1 +0,0 @@
-@import Foo;
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules/Makefile
deleted file mode 100644 (file)
index 37dd8f4..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-OBJC_SOURCES := main.m
-
-
-
-LD_EXTRAS := -framework Foundation
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules/TestObjCModules.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules/TestObjCModules.py
deleted file mode 100644 (file)
index 695eac9..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-"""Test that importing modules in Objective-C works as expected."""
-
-
-
-import unittest2
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjCModulesTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line = line_number('main.m', '// Set breakpoint 0 here.')
-
-    @skipUnlessDarwin
-    @skipIf(macos_version=["<", "10.12"])
-    def test_expr(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break inside the foo function which takes a bar_ptr argument.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        self.expect("expr @import Darwin; 3", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=["int", "3"])
-
-        self.expect("expr getpid()", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=["pid_t"])
-
-        self.expect(
-            "expr @import Foundation; 4",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                "int",
-                "4"])
-
-        # Type lookup should still work and print something reasonable
-        # for types from the module.
-        self.expect("type lookup NSObject", substrs=["instanceMethod"])
-
-        self.expect("expr string.length", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=["NSUInteger", "5"])
-
-        self.expect("expr array.count", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=["NSUInteger", "3"])
-
-        self.expect(
-            "p *[NSURL URLWithString:@\"http://lldb.llvm.org\"]",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                "NSURL",
-                "isa",
-                "_urlString"])
-
-        self.expect(
-            "p [NSURL URLWithString:@\"http://lldb.llvm.org\"].scheme",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=["http"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/modules/main.m
deleted file mode 100644 (file)
index 99b50f9..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#import <Foundation/Foundation.h>
-
-int main()
-{
-    @autoreleasepool
-    {
-        NSString *string = @"Hello";
-        NSArray *array = @[ @1, @2, @3 ];
-
-        NSLog(@"Stop here"); // Set breakpoint 0 here.
-    }
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc++/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc++/Makefile
deleted file mode 100644 (file)
index e8a4b0c..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-OBJCXX_SOURCES := main.mm
-LD_EXTRAS = -framework Foundation
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc++/TestObjCXX.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc++/TestObjCXX.py
deleted file mode 100644 (file)
index 344af99..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-"""
-Make sure that ivars of Objective-C++ classes are visible in LLDB.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjCXXTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    def test_break(self):
-        """Test ivars of Objective-C++ classes"""
-        if self.getArchitecture() == 'i386':
-            self.skipTest("requires Objective-C 2.0 runtime")
-
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_source_regexp(
-            self, 'breakpoint 1', num_expected_locations=1)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.expect("expr f->f", "Found ivar in class",
-                    substrs=["= 3"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc++/main.mm b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc++/main.mm
deleted file mode 100644 (file)
index 50d2f0a..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <Foundation/NSObject.h>
-
-@interface F : NSObject
-@end
-
-@implementation F
-{
-@public
-    int f;
-}
-
-@end
-
-int main(int argc, char* argv[])
-{
-    F* f = [F new];
-    f->f = 3;
-    return 0; // breakpoint 1
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/Makefile
deleted file mode 100644 (file)
index ad28ecf..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-OBJC_SOURCES := main.m
-LD_EXTRAS = -lobjc -framework Foundation
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py
deleted file mode 100644 (file)
index 8f974f0..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-"""
-Use lldb Python API to test base class resolution for ObjC classes
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjCDynamicValueTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-        self.line = line_number('main.m', '// Set breakpoint here.')
-
-    @skipUnlessDarwin
-    @add_test_categories(['pyapi'])
-    def test_get_baseclass(self):
-        """Test fetching ObjC dynamic values."""
-        if self.getArchitecture() == 'i386':
-            # rdar://problem/9946499
-            self.skipTest("Dynamic types for ObjC V1 runtime not implemented")
-
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target from the debugger.
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Set up our breakpoints:
-
-        target.BreakpointCreateByLocation('main.m', self.line)
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        PROCESS_STOPPED)
-
-        var = self.frame().FindVariable("foo")
-        var_ptr_type = var.GetType()
-        var_pte_type = var_ptr_type.GetPointeeType()
-        self.assertTrue(
-            var_ptr_type.GetNumberOfDirectBaseClasses() == 1,
-            "Foo * has one base class")
-        self.assertTrue(
-            var_pte_type.GetNumberOfDirectBaseClasses() == 1,
-            "Foo has one base class")
-
-        self.assertTrue(var_ptr_type.GetDirectBaseClassAtIndex(
-            0).IsValid(), "Foo * has a valid base class")
-        self.assertTrue(var_pte_type.GetDirectBaseClassAtIndex(
-            0).IsValid(), "Foo * has a valid base class")
-
-        self.assertTrue(var_ptr_type.GetDirectBaseClassAtIndex(0).GetName() == var_pte_type.GetDirectBaseClassAtIndex(
-            0).GetName(), "Foo and its pointer type don't agree on their base class")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/main.m
deleted file mode 100644 (file)
index 3ec78fd..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@interface Foo : NSObject {}
-
--(id) init;
-
-@end
-
-@implementation Foo
-
--(id) init
-{
-    return self = [super init];
-}
-@end
-int main ()
-{
-    Foo *foo = [Foo new];
-       NSLog(@"a"); // Set breakpoint here.
-       return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py
deleted file mode 100644 (file)
index d07b827..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-"""Test that the expression parser doesn't get confused by 'id' and 'Class'"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestObjCBuiltinTypes(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers to break inside main().
-        self.main_source = "main.cpp"
-        self.break_line = line_number(
-            self.main_source, '// Set breakpoint here.')
-
-    @skipUnlessDarwin
-    @add_test_categories(['pyapi'])
-    #<rdar://problem/10591460> [regression] Can't print ivar value: error: reference to 'id' is ambiguous
-    def test_with_python_api(self):
-        """Test expression parser respect for ObjC built-in types."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        bpt = target.BreakpointCreateByLocation(
-            self.main_source, self.break_line)
-        self.assertTrue(bpt, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint(process, bpt)
-
-        # Make sure we stopped at the first breakpoint.
-        self.assertTrue(
-            len(thread_list) != 0,
-            "No thread stopped at our breakpoint.")
-        self.assertTrue(len(thread_list) == 1,
-                        "More than one thread stopped at our breakpoint.")
-
-        # Now make sure we can call a function in the class method we've
-        # stopped in.
-        frame = thread_list[0].GetFrameAtIndex(0)
-        self.assertTrue(frame, "Got a valid frame 0 frame.")
-
-        self.expect("expr (foo)", patterns=["\(ns::id\) \$.* = 0"])
-
-        self.expect("expr id my_id = 0; my_id", patterns=["\(id\) \$.* = nil"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/main.cpp
deleted file mode 100644 (file)
index 6dd8cbc..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-namespace ns {
-  typedef int id;
-};
-
-int main()
-{
-  ns::id foo = 0;
-  return foo; // Set breakpoint here.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-checker/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-checker/Makefile
deleted file mode 100644 (file)
index afecbf9..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-OBJC_SOURCES := main.m
-LD_EXTRAS := -lobjc -framework Foundation
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-checker/TestObjCCheckers.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-checker/TestObjCCheckers.py
deleted file mode 100644 (file)
index ac2dc2a..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-"""
-Use lldb Python API to make sure the dynamic checkers are doing their jobs.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjCCheckerTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-        # Find the line number to break for main.c.
-        self.source_name = 'main.m'
-
-    @skipUnlessDarwin
-    @add_test_categories(['pyapi'])
-    def test_objc_checker(self):
-        """Test that checkers catch unrecognized selectors"""
-        if self.getArchitecture() == 'i386':
-            self.skipTest("requires Objective-C 2.0 runtime")
-
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target from the debugger.
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Set up our breakpoints:
-
-        main_bkpt = target.BreakpointCreateBySourceRegex(
-            "Set a breakpoint here.", lldb.SBFileSpec(self.source_name))
-        self.assertTrue(main_bkpt and
-                        main_bkpt.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        PROCESS_STOPPED)
-
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-            process, main_bkpt)
-        self.assertTrue(len(threads) == 1)
-        thread = threads[0]
-
-        #
-        #  The class Simple doesn't have a count method.  Make sure that we don't
-        #  actually try to send count but catch it as an unrecognized selector.
-
-        frame = thread.GetFrameAtIndex(0)
-        expr_value = frame.EvaluateExpression("(int) [my_simple count]", False)
-        expr_error = expr_value.GetError()
-
-        self.assertTrue(expr_error.Fail())
-
-        # Make sure the call produced no NSLog stdout.
-        stdout = process.GetSTDOUT(100)
-        self.assertTrue(stdout is None or (len(stdout) == 0))
-
-        # Make sure the error is helpful:
-        err_string = expr_error.GetCString()
-        self.assertTrue("selector" in err_string)
-
-        #
-        # Check that we correctly insert the checker for an
-        # ObjC method with the struct return convention.
-        # Getting this wrong would cause us to call the checker
-        # with the wrong arguments, and the checker would crash
-        # So I'm just checking "expression runs successfully" here:
-        #
-        expr_value = frame.EvaluateExpression("[my_simple getBigStruct]", False)
-        expr_error = expr_value.GetError()
-        
-        self.assertTrue(expr_error.Success())
-        
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-checker/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-checker/main.m
deleted file mode 100644 (file)
index de73e68..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#import <Foundation/Foundation.h>
-
-// This should be a big enough struct that it will force
-// the struct return convention:
-typedef struct BigStruct {
-  float a, b, c, d, e, f, g, h, i, j, k, l;
-} BigStruct;
-
-
-@interface Simple : NSObject
-{
-  int _value;
-}
-- (int) value;
-- (void) setValue: (int) newValue;
-- (BigStruct) getBigStruct;
-@end
-
-@implementation Simple
-- (int) value
-{
-  return _value;
-}
-
-- (void) setValue: (int) newValue
-{
-  _value = newValue;
-}
-
-- (BigStruct) getBigStruct
-{
-  BigStruct big_struct = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0,
-                          7.0, 8.0, 9.0, 10.0, 11.0, 12.0};
-  return big_struct;
-}
-@end
-
-int main ()
-{
-  NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-  Simple *my_simple = [[Simple alloc] init];
-  my_simple.value = 20;
-  // Set a breakpoint here.
-  NSLog (@"Object has value: %d.", my_simple.value); 
-  [pool drain];
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-class-method/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-class-method/Makefile
deleted file mode 100644 (file)
index e6db3de..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-OBJC_SOURCES := class.m
-LD_EXTRAS := -lobjc -framework Foundation
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py
deleted file mode 100644 (file)
index 46cddd6..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-"""Test calling functions in class methods."""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestObjCClassMethod(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers to break inside main().
-        self.main_source = "class.m"
-        self.break_line = line_number(
-            self.main_source, '// Set breakpoint here.')
-
-    @skipUnlessDarwin
-    @add_test_categories(['pyapi'])
-    def test_with_python_api(self):
-        """Test calling functions in class methods."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        bpt = target.BreakpointCreateByLocation(
-            self.main_source, self.break_line)
-        self.assertTrue(bpt, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint(process, bpt)
-
-        # Make sure we stopped at the first breakpoint.
-        self.assertTrue(
-            len(thread_list) != 0,
-            "No thread stopped at our breakpoint.")
-        self.assertTrue(len(thread_list) == 1,
-                        "More than one thread stopped at our breakpoint.")
-
-        # Now make sure we can call a function in the class method we've
-        # stopped in.
-        frame = thread_list[0].GetFrameAtIndex(0)
-        self.assertTrue(frame, "Got a valid frame 0 frame.")
-
-        cmd_value = frame.EvaluateExpression(
-            "(int)[Foo doSomethingWithString:@\"Hello\"]")
-        if self.TraceOn():
-            if cmd_value.IsValid():
-                print("cmd_value is valid")
-                print("cmd_value has the value %d" % cmd_value.GetValueAsUnsigned())
-        self.assertTrue(cmd_value.IsValid())
-        self.assertTrue(cmd_value.GetValueAsUnsigned() == 5)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-class-method/class.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-class-method/class.m
deleted file mode 100644 (file)
index 18a2c27..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@interface Foo : NSObject
-+(int) doSomethingWithString: (NSString *) string;
--(int) doSomethingInstance: (NSString *) string;
-@end
-
-@implementation Foo
-+(int) doSomethingWithString: (NSString *) string
-{
-  NSLog (@"String is: %@.", string);
-  return [string length];
-}
-
--(int) doSomethingInstance: (NSString *)string
-{
-  return [Foo doSomethingWithString:string];
-}
-@end
-
-int main()
-{
-  return 0; // Set breakpoint here.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/.categories b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/.categories
deleted file mode 100644 (file)
index 9526bab..0000000
+++ /dev/null
@@ -1 +0,0 @@
-dyntype
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/Makefile
deleted file mode 100644 (file)
index 9ff3ce6..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-OBJC_SOURCES := main.m
-
-include Makefile.rules
-
-LD_EXTRAS = -framework Foundation
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py
deleted file mode 100644 (file)
index 1851bc3..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-"""
-Test that we are able to properly report a usable dynamic type
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-@skipUnlessDarwin
-class ObjCDynamicSBTypeTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # We'll use the test method name as the exe_name.
-        self.exe_name = self.testMethodName
-        # Find the line number to break inside main().
-        self.main_source = "main.m"
-        self.line = line_number(self.main_source, '// Set breakpoint here.')
-
-    @skipIf(archs="i[3-6]86")
-    def test_dyn(self):
-        """Test that we are able to properly report a usable dynamic type."""
-        d = {'EXE': self.exe_name}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            self.main_source,
-            self.line,
-            num_expected_locations=1,
-            loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        v_object = self.frame().FindVariable(
-            "object").GetDynamicValue(lldb.eDynamicCanRunTarget)
-        v_base = self.frame().FindVariable(
-            "base").GetDynamicValue(lldb.eDynamicCanRunTarget)
-        self.assertTrue(
-            v_object.GetTypeName() == "MyDerivedClass *",
-            "The NSObject is properly type-named")
-        self.assertTrue(
-            v_base.GetTypeName() == "MyDerivedClass *",
-            "The Base is properly type-named")
-        object_type = v_object.GetType()
-        base_type = v_base.GetType()
-        self.assertTrue(
-            object_type.GetName() == "MyDerivedClass *",
-            "The dynamic SBType for NSObject is for the correct type")
-        self.assertTrue(
-            base_type.GetName() == "MyDerivedClass *",
-            "The dynamic SBType for Base is for the correct type")
-        object_pointee_type = object_type.GetPointeeType()
-        base_pointee_type = base_type.GetPointeeType()
-        self.assertTrue(
-            object_pointee_type.GetName() == "MyDerivedClass",
-            "The dynamic type for NSObject figures out its pointee type just fine")
-        self.assertTrue(
-            base_pointee_type.GetName() == "MyDerivedClass",
-            "The dynamic type for Base figures out its pointee type just fine")
-
-        self.assertTrue(
-            object_pointee_type.GetDirectBaseClassAtIndex(0).GetName() == "MyBaseClass",
-            "The dynamic type for NSObject can go back to its base class")
-        self.assertTrue(
-            base_pointee_type.GetDirectBaseClassAtIndex(0).GetName() == "MyBaseClass",
-            "The dynamic type for Base can go back to its base class")
-
-        self.assertTrue(object_pointee_type.GetDirectBaseClassAtIndex(0).GetType().GetDirectBaseClassAtIndex(
-            0).GetName() == "NSObject", "The dynamic type for NSObject can go up the hierarchy")
-        self.assertTrue(base_pointee_type.GetDirectBaseClassAtIndex(0).GetType().GetDirectBaseClassAtIndex(
-            0).GetName() == "NSObject", "The dynamic type for Base can go up the hierarchy")
-
-        self.assertTrue(
-            object_pointee_type.GetNumberOfFields() == 2,
-            "The dynamic type for NSObject has 2 fields")
-        self.assertTrue(
-            base_pointee_type.GetNumberOfFields() == 2,
-            "The dynamic type for Base has 2 fields")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/main.m
deleted file mode 100644 (file)
index f3587b5..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@interface MyBaseClass : NSObject
-{}
--(id) init;
--(int) getInt;
-@end
-
-@implementation MyBaseClass
-- (id) init {
-       return (self = [super init]);
-}
-
-- (int) getInt {
-       return 1;
-}
-@end
-
-@interface MyDerivedClass : MyBaseClass
-{
-       int x;
-       int y;
-}
--(id) init;
--(int) getInt;
-@end
-
-@implementation MyDerivedClass
-- (id) init {
-       self = [super init];
-       if (self) {
-               self-> x = 0;
-               self->y = 1;
-       }
-       return self;
-}
-
-- (int) getInt {
-       y = x++;
-       return x;
-}
-@end
-
-
-int main (int argc, char const *argv[])
-{
-    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];       
-       NSObject* object = [[MyDerivedClass alloc] init];
-       MyBaseClass* base = [[MyDerivedClass alloc] init];
-    [pool release]; // Set breakpoint here.
-    return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/Makefile
deleted file mode 100644 (file)
index a349777..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-OBJC_SOURCES := dynamic-value.m
-LD_EXTRAS := -lobjc -framework Foundation
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
deleted file mode 100644 (file)
index 5a6ec4e..0000000
+++ /dev/null
@@ -1,207 +0,0 @@
-"""
-Use lldb Python API to test dynamic values in ObjC
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjCDynamicValueTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-        # Find the line number to break for main.c.
-
-        self.source_name = 'dynamic-value.m'
-        self.set_property_line = line_number(
-            self.source_name,
-            '// This is the line in setProperty, make sure we step to here.')
-        self.handle_SourceBase = line_number(
-            self.source_name, '// Break here to check dynamic values.')
-        self.main_before_setProperty_line = line_number(
-            self.source_name, '// Break here to see if we can step into real method.')
-
-    @skipUnlessDarwin
-    @add_test_categories(['pyapi'])
-    @expectedFailureDarwin("llvm.org/pr20271 rdar://18684107")
-    def test_get_objc_dynamic_vals(self):
-        """Test fetching ObjC dynamic values."""
-        if self.getArchitecture() == 'i386':
-            # rdar://problem/9946499
-            self.skipTest("Dynamic types for ObjC V1 runtime not implemented")
-
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target from the debugger.
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Set up our breakpoints:
-
-        handle_SourceBase_bkpt = target.BreakpointCreateByLocation(
-            self.source_name, self.handle_SourceBase)
-        self.assertTrue(handle_SourceBase_bkpt and
-                        handle_SourceBase_bkpt.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        main_before_setProperty_bkpt = target.BreakpointCreateByLocation(
-            self.source_name, self.main_before_setProperty_line)
-        self.assertTrue(main_before_setProperty_bkpt and
-                        main_before_setProperty_bkpt.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        PROCESS_STOPPED)
-
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-            process, main_before_setProperty_bkpt)
-        self.assertTrue(len(threads) == 1)
-        thread = threads[0]
-
-        #
-        #  At this point, myObserver has a Source pointer that is actually a KVO swizzled SourceDerived
-        #  make sure we can get that properly:
-
-        frame = thread.GetFrameAtIndex(0)
-        myObserver = frame.FindVariable(
-            'myObserver', lldb.eDynamicCanRunTarget)
-        self.assertTrue(myObserver)
-        myObserver_source = myObserver.GetChildMemberWithName(
-            '_source', lldb.eDynamicCanRunTarget)
-        self.examine_SourceDerived_ptr(myObserver_source)
-
-        #
-        # Make sure a static value can be correctly turned into a dynamic
-        # value.
-
-        frame = thread.GetFrameAtIndex(0)
-        myObserver_static = frame.FindVariable(
-            'myObserver', lldb.eNoDynamicValues)
-        self.assertTrue(myObserver_static)
-        myObserver = myObserver_static.GetDynamicValue(
-            lldb.eDynamicCanRunTarget)
-        myObserver_source = myObserver.GetChildMemberWithName(
-            '_source', lldb.eDynamicCanRunTarget)
-        self.examine_SourceDerived_ptr(myObserver_source)
-
-        # The "frame var" code uses another path to get into children, so let's
-        # make sure that works as well:
-
-        result = lldb.SBCommandReturnObject()
-
-        self.expect(
-            'frame var -d run-target myObserver->_source',
-            'frame var finds its way into a child member',
-            patterns=['\(SourceDerived \*\)'])
-
-        # check that our ObjC GetISA() does a good job at hiding KVO swizzled
-        # classes
-
-        self.expect(
-            'frame var -d run-target myObserver->_source -T',
-            'the KVO-ed class is hidden',
-            substrs=['SourceDerived'])
-
-        self.expect(
-            'frame var -d run-target myObserver->_source -T',
-            'the KVO-ed class is hidden',
-            matching=False,
-            substrs=['NSKVONotify'])
-
-        # This test is not entirely related to the main thrust of this test case, but since we're here,
-        # try stepping into setProperty, and make sure we get into the version
-        # in Source:
-
-        thread.StepInto()
-
-        threads = lldbutil.get_stopped_threads(
-            process, lldb.eStopReasonPlanComplete)
-        self.assertTrue(len(threads) == 1)
-        line_entry = threads[0].GetFrameAtIndex(0).GetLineEntry()
-
-        self.assertEqual(line_entry.GetLine(), self.set_property_line)
-        self.assertEqual(
-            line_entry.GetFileSpec().GetFilename(),
-            self.source_name)
-
-        # Okay, back to the main business.  Continue to the handle_SourceBase
-        # and make sure we get the correct dynamic value.
-
-        threads = lldbutil.continue_to_breakpoint(
-            process, handle_SourceBase_bkpt)
-        self.assertTrue(len(threads) == 1)
-        thread = threads[0]
-
-        frame = thread.GetFrameAtIndex(0)
-
-        # Get "object" using FindVariable:
-
-        noDynamic = lldb.eNoDynamicValues
-        useDynamic = lldb.eDynamicCanRunTarget
-
-        object_static = frame.FindVariable('object', noDynamic)
-        object_dynamic = frame.FindVariable('object', useDynamic)
-
-        # Delete this object to make sure that this doesn't cause havoc with
-        # the dynamic object that depends on it.
-        del (object_static)
-
-        self.examine_SourceDerived_ptr(object_dynamic)
-
-        # Get "this" using FindValue, make sure that works too:
-        object_static = frame.FindValue(
-            'object', lldb.eValueTypeVariableArgument, noDynamic)
-        object_dynamic = frame.FindValue(
-            'object', lldb.eValueTypeVariableArgument, useDynamic)
-        del (object_static)
-        self.examine_SourceDerived_ptr(object_dynamic)
-
-        # Get "this" using the EvaluateExpression:
-        object_static = frame.EvaluateExpression('object', noDynamic)
-        object_dynamic = frame.EvaluateExpression('object', useDynamic)
-        del (object_static)
-        self.examine_SourceDerived_ptr(object_dynamic)
-
-        # Continue again to the handle_SourceBase and make sure we get the correct dynamic value.
-        # This one looks exactly the same, but in fact this is an "un-KVO'ed" version of SourceBase, so
-        # its isa pointer points to SourceBase not NSKVOSourceBase or
-        # whatever...
-
-        threads = lldbutil.continue_to_breakpoint(
-            process, handle_SourceBase_bkpt)
-        self.assertTrue(len(threads) == 1)
-        thread = threads[0]
-
-        frame = thread.GetFrameAtIndex(0)
-
-        # Get "object" using FindVariable:
-
-        object_static = frame.FindVariable('object', noDynamic)
-        object_dynamic = frame.FindVariable('object', useDynamic)
-
-        # Delete this object to make sure that this doesn't cause havoc with
-        # the dynamic object that depends on it.
-        del (object_static)
-
-        self.examine_SourceDerived_ptr(object_dynamic)
-
-    def examine_SourceDerived_ptr(self, object):
-        self.assertTrue(object)
-        self.assertTrue(object.GetTypeName().find('SourceDerived') != -1)
-        derivedValue = object.GetChildMemberWithName('_derivedValue')
-        self.assertTrue(derivedValue)
-        self.assertTrue(int(derivedValue.GetValue(), 0) == 30)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/dynamic-value.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/dynamic-value.m
deleted file mode 100644 (file)
index 2bcb76b..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-#import <Foundation/Foundation.h>
-
-// SourceBase will be the base class of Source.  We'll pass a Source object into a
-// function as a SourceBase, and then see if the dynamic typing can get us through the KVO
-// goo and all the way back to Source.
-
-@interface SourceBase: NSObject
-{
-    uint32_t _value;
-}
-- (SourceBase *) init;
-- (uint32_t) getValue;
-@end
-
-@implementation SourceBase
-- (SourceBase *) init
-{
-    [super init];
-    _value = 10;
-    return self;
-}
-- (uint32_t) getValue
-{
-    return _value;
-}
-@end
-
-// Source is a class that will be observed by the Observer class below.
-// When Observer sets itself up to observe this property (in initWithASource)
-// the KVO system will overwrite the "isa" pointer of the object with the "kvo'ed" 
-// one.
-
-@interface Source : SourceBase
-{
-    int _property;
-}
-- (Source *) init;
-- (void) setProperty: (int) newValue;
-@end
-
-@implementation Source
-- (Source *) init
-{
-    [super init];
-    _property = 20;
-    return self;
-}
-- (void) setProperty: (int) newValue
-{
-    _property = newValue;  // This is the line in setProperty, make sure we step to here.
-}
-@end
-
-@interface SourceDerived : Source
-{
-    int _derivedValue;
-}
-- (SourceDerived *) init;
-- (uint32_t) getValue;
-@end
-
-@implementation SourceDerived
-- (SourceDerived *) init
-{
-    [super init];
-    _derivedValue = 30;
-    return self;
-}
-- (uint32_t) getValue
-{
-    return _derivedValue;
-}
-@end
-
-// Observer is the object that will watch Source and cause KVO to swizzle it...
-
-@interface Observer : NSObject
-{
-    Source *_source;
-}
-+ (Observer *) observerWithSource: (Source *) source;
-- (Observer *) initWithASource: (Source *) source;
-- (void) observeValueForKeyPath: (NSString *) path 
-                      ofObject: (id) object
-                        change: (NSDictionary *) change
-                       context: (void *) context;
-@end
-
-@implementation Observer
-
-+ (Observer *) observerWithSource: (Source *) inSource;
-{
-    Observer *retval;
-
-    retval = [[Observer alloc] initWithASource: inSource];
-    return retval;
-}
-
-- (Observer *) initWithASource: (Source *) source
-{
-    [super init];
-    _source = source;
-    [_source addObserver: self 
-           forKeyPath: @"property" 
-           options: (NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld)
-           context: NULL];
-    return self;
-}
-
-- (void) observeValueForKeyPath: (NSString *) path 
-                      ofObject: (id) object
-                        change: (NSDictionary *) change
-                       context: (void *) context
-{
-    printf ("Observer function called.\n");
-    return;
-}
-@end
-
-uint32_t 
-handle_SourceBase (SourceBase *object)
-{
-    return [object getValue];  // Break here to check dynamic values.
-}
-
-int main ()
-{
-    Source *mySource;
-    Observer *myObserver;
-
-    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-
-    mySource = [[SourceDerived alloc] init];
-    myObserver = [Observer observerWithSource: mySource];
-
-    [mySource setProperty: 5];      // Break here to see if we can step into real method.
-    
-    uint32_t return_value = handle_SourceBase (mySource);
-
-    SourceDerived *unwatchedSource = [[SourceDerived alloc] init];
-    
-    return_value = handle_SourceBase (unwatchedSource);
-    
-    [pool release];
-    return 0;
-
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-foundation-dictionary-empty/TestNSDictionary0.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-foundation-dictionary-empty/TestNSDictionary0.py
deleted file mode 100644 (file)
index 562d9ae..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(
-    __file__, globals(), [
-        decorators.skipIfFreeBSD, decorators.skipIfLinux,
-        decorators.skipIfWindows, decorators.skipIfNetBSD])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-foundation-dictionary-empty/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-foundation-dictionary-empty/main.m
deleted file mode 100644 (file)
index 14a792b..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#import <Foundation/Foundation.h>
-
-int main(void)
-{
-  NSDictionary *emptyDictionary = [[NSDictionary alloc] init];
-  return 0; //% self.expect("frame var emptyDictionary", substrs = ["0 key/value pairs"]);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/Makefile
deleted file mode 100644 (file)
index 5408f41..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-OBJC_SOURCES := objc-ivar-offsets.m main.m
-LD_EXTRAS := -lobjc -framework Foundation
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py
deleted file mode 100644 (file)
index 749c713..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-"""Test printing ObjC objects that use unbacked properties - so that the static ivar offsets are incorrect."""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestObjCIvarOffsets(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers to break inside main().
-        self.main_source = "main.m"
-        self.stop_line = line_number(
-            self.main_source, '// Set breakpoint here.')
-
-    @skipUnlessDarwin
-    @add_test_categories(['pyapi'])
-    def test_with_python_api(self):
-        """Test printing ObjC objects that use unbacked properties"""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        breakpoint = target.BreakpointCreateByLocation(
-            self.main_source, self.stop_line)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, "Created a process.")
-        self.assertTrue(
-            process.GetState() == lldb.eStateStopped,
-            "Stopped it too.")
-
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint(
-            process, breakpoint)
-        self.assertTrue(len(thread_list) == 1)
-        thread = thread_list[0]
-
-        frame = thread.GetFrameAtIndex(0)
-        self.assertTrue(frame, "frame 0 is valid")
-
-        mine = thread.GetFrameAtIndex(0).FindVariable("mine")
-        self.assertTrue(mine, "Found local variable mine.")
-
-        # Test the value object value for BaseClass->_backed_int
-
-        error = lldb.SBError()
-
-        mine_backed_int = mine.GetChildMemberWithName("_backed_int")
-        self.assertTrue(
-            mine_backed_int,
-            "Found mine->backed_int local variable.")
-        backed_value = mine_backed_int.GetValueAsSigned(error)
-        self.assertTrue(error.Success())
-        self.assertTrue(backed_value == 1111)
-
-        # Test the value object value for DerivedClass->_derived_backed_int
-
-        mine_derived_backed_int = mine.GetChildMemberWithName(
-            "_derived_backed_int")
-        self.assertTrue(mine_derived_backed_int,
-                        "Found mine->derived_backed_int local variable.")
-        derived_backed_value = mine_derived_backed_int.GetValueAsSigned(error)
-        self.assertTrue(error.Success())
-        self.assertTrue(derived_backed_value == 3333)
-
-        # Make sure we also get bit-field offsets correct:
-
-        mine_flag2 = mine.GetChildMemberWithName("flag2")
-        self.assertTrue(mine_flag2, "Found mine->flag2 local variable.")
-        flag2_value = mine_flag2.GetValueAsUnsigned(error)
-        self.assertTrue(error.Success())
-        self.assertTrue(flag2_value == 7)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/main.m
deleted file mode 100644 (file)
index 41943f4..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#include "objc-ivar-offsets.h"
-
-int
-main ()
-{
-  DerivedClass *mine = [[DerivedClass alloc] init];
-  mine.backed_int = 1111;
-  mine.unbacked_int = 2222;
-  mine.derived_backed_int = 3333;
-  mine.derived_unbacked_int = 4444;
-  mine->flag1 = 1;
-  mine->flag2 = 7;
-
-  return 0;  // Set breakpoint here.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/objc-ivar-offsets.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/objc-ivar-offsets.h
deleted file mode 100644 (file)
index 99bbd42..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@interface BaseClass : NSObject
-{
-  int _backed_int;
-#if !__OBJC2__
-  int _unbacked_int;
-#endif
-}
-@property int backed_int;
-@property int unbacked_int;
-@end
-
-@interface DerivedClass : BaseClass
-{
-  int _derived_backed_int;
-#if !__OBJC2__
-  int _derived_unbacked_int;
-#endif
-  @public
-  uint32_t flag1 : 1;
-  uint32_t flag2 : 3;
-}
-
-@property int derived_backed_int;
-@property int derived_unbacked_int;
-@end
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/objc-ivar-offsets.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/objc-ivar-offsets.m
deleted file mode 100644 (file)
index db87ade..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#import "objc-ivar-offsets.h"
-
-@implementation BaseClass
-@synthesize backed_int = _backed_int;
-#if __OBJC2__
-@synthesize unbacked_int;
-#else
-@synthesize unbacked_int = _unbacked_int;
-#endif
-@end
-
-@implementation DerivedClass
-@synthesize derived_backed_int = _derived_backed_int;
-#if __OBJC2__
-@synthesize derived_unbacked_int;
-#else
-@synthesize derived_unbacked_int = _derived_unbacked_int;
-#endif
-@end
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/TestIvarProtocols.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/TestIvarProtocols.py
deleted file mode 100644 (file)
index 562d9ae..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(
-    __file__, globals(), [
-        decorators.skipIfFreeBSD, decorators.skipIfLinux,
-        decorators.skipIfWindows, decorators.skipIfNetBSD])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/main.m
deleted file mode 100644 (file)
index aa6c471..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@protocol MyProtocol
--(void)aMethod;
-@end
-
-@interface MyClass : NSObject {
-  id <MyProtocol> myId;
-  NSObject <MyProtocol> *myObject;
-};
-
--(void)doSomething;
-
-@end
-
-@implementation MyClass
-
--(void)doSomething
-{
-  NSLog(@"Hello"); //% self.expect("expression -- myId", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["id"]);
-                   //% self.expect("expression -- myObject", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["NSObject"]);
-}
-
-@end
-
-int main ()
-{
-  @autoreleasepool
-  {
-    MyClass *c = [MyClass alloc];
-    [c doSomething];
-  }
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/Makefile
deleted file mode 100644 (file)
index a218ce3..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-OBJC_SOURCES := main.m
-LD_EXTRAS := -lobjc -framework Foundation
-
-all:        a.out.stripped
-
-a.out.stripped: a.out.dSYM
-       strip -o a.out.stripped a.out
-
-clean::
-       rm -f a.out.stripped
-       rm -rf a.out.stripped.dSYM
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py
deleted file mode 100644 (file)
index 12a22f6..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-"""Test printing ObjC objects that use unbacked properties - so that the static ivar offsets are incorrect."""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestObjCIvarStripped(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers to break inside main().
-        self.main_source = "main.m"
-        self.stop_line = line_number(
-            self.main_source, '// Set breakpoint here.')
-
-    @skipUnlessDarwin
-    @skipIf(
-        debug_info=no_match("dsym"),
-        bugnumber="This test requires a stripped binary and a dSYM")
-    @add_test_categories(['pyapi'])
-    def test_with_python_api(self):
-        """Test that we can find stripped Objective-C ivars in the runtime"""
-        self.build()
-        exe = self.getBuildArtifact("a.out.stripped")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        self.dbg.HandleCommand("add-dsym "+self.getBuildArtifact("a.out.dSYM"))
-
-        breakpoint = target.BreakpointCreateByLocation(
-            self.main_source, self.stop_line)
-        self.assertTrue(
-            breakpoint.IsValid() and breakpoint.GetNumLocations() > 0,
-            VALID_BREAKPOINT)
-
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, "Created a process.")
-        self.assertTrue(
-            process.GetState() == lldb.eStateStopped,
-            "Stopped it too.")
-
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint(
-            process, breakpoint)
-        self.assertTrue(len(thread_list) == 1)
-        thread = thread_list[0]
-
-        frame = thread.GetFrameAtIndex(0)
-        self.assertTrue(frame, "frame 0 is valid")
-
-        # Test the expression for mc->_foo
-
-        error = lldb.SBError()
-
-        ivar = frame.EvaluateExpression("(mc->_foo)")
-        self.assertTrue(ivar, "Got result for mc->_foo")
-        ivar_value = ivar.GetValueAsSigned(error)
-        self.assertTrue(error.Success())
-        self.assertTrue(ivar_value == 3)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/main.m
deleted file mode 100644 (file)
index ed9c1d9..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@interface MyClass : NSObject {
-@public
-  int _foo;
-};
-
--(id)init;
-@end
-
-@implementation MyClass
-
--(id)init
-{
-  if ([super init])
-  {
-    _foo = 3;
-  }
-
-  return self;
-}
-
-@end
-
-int main ()
-{
-  @autoreleasepool
-  {
-    MyClass *mc = [[MyClass alloc] init];
-
-    NSLog(@"%d", mc->_foo); // Set breakpoint here.
-  }
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/Makefile
deleted file mode 100644 (file)
index 37dd8f4..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-OBJC_SOURCES := main.m
-
-
-
-LD_EXTRAS := -framework Foundation
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/ObjCNewSyntaxTest.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/ObjCNewSyntaxTest.py
deleted file mode 100644 (file)
index 5fa9336..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-"""Test that the Objective-C syntax for dictionary/array literals and indexing works"""
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjCNewSyntaxTest(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def runToBreakpoint(self):
-        self.build()
-        self.target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
-            self, '// Set breakpoint 0 here.', lldb.SBFileSpec(
-                'main.m', False))
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect(
-            "thread list",
-            STOPPED_DUE_TO_BREAKPOINT,
-            substrs=['stopped', 'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect(
-            "breakpoint list -f",
-            BREAKPOINT_HIT_ONCE,
-            substrs=[' resolved, hit count = 1'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntaxArray.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntaxArray.py
deleted file mode 100644 (file)
index cf638c7..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-"""Test that the Objective-C syntax for dictionary/array literals and indexing works"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-from ObjCNewSyntaxTest import ObjCNewSyntaxTest
-
-
-class ObjCNewSyntaxTestCaseArray(ObjCNewSyntaxTest):
-
-    @skipUnlessDarwin
-    @skipIf(macos_version=["<", "10.12"])
-    @expectedFailureAll(archs=["i[3-6]86"])
-    def test_read_array(self):
-        self.runToBreakpoint()
-
-        self.expect(
-            "expr --object-description -- immutable_array[0]",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=["foo"])
-
-        self.expect(
-            "expr --object-description -- mutable_array[0]",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=["foo"])
-
-    @skipUnlessDarwin
-    @skipIf(macos_version=["<", "10.12"])
-    @expectedFailureAll(archs=["i[3-6]86"])
-    def test_update_array(self):
-        self.runToBreakpoint()
-
-        self.expect(
-            "expr --object-description -- mutable_array[0] = @\"bar\"",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=["bar"])
-
-        self.expect(
-            "expr --object-description -- mutable_array[0]",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=["bar"])
-
-    @skipUnlessDarwin
-    @skipIf(macos_version=["<", "10.12"])
-    @expectedFailureAll(archs=["i[3-6]86"])
-    def test_array_literal(self):
-        self.runToBreakpoint()
-
-        self.expect(
-            "expr --object-description -- @[ @\"foo\", @\"bar\" ]",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                "NSArray",
-                "foo",
-                "bar"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntaxDictionary.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntaxDictionary.py
deleted file mode 100644 (file)
index 5291b46..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-"""Test that the Objective-C syntax for dictionary/array literals and indexing works"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-from ObjCNewSyntaxTest import ObjCNewSyntaxTest
-
-
-class ObjCNewSyntaxTestCaseDictionary(ObjCNewSyntaxTest):
-
-    @skipUnlessDarwin
-    @skipIf(macos_version=["<", "10.12"])
-    @expectedFailureAll(archs=["i[3-6]86"])
-    def test_read_dictionary(self):
-        self.runToBreakpoint()
-
-        self.expect(
-            "expr --object-description -- immutable_dictionary[@\"key\"]",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=["value"])
-
-        self.expect(
-            "expr --object-description -- mutable_dictionary[@\"key\"]",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=["value"])
-
-    @skipUnlessDarwin
-    @skipIf(macos_version=["<", "10.12"])
-    @expectedFailureAll(archs=["i[3-6]86"])
-    def test_update_dictionary(self):
-        self.runToBreakpoint()
-
-        self.expect(
-            "expr --object-description -- mutable_dictionary[@\"key\"] = @\"object\"",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=["object"])
-
-        self.expect(
-            "expr --object-description -- mutable_dictionary[@\"key\"]",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=["object"])
-
-    @skipUnlessDarwin
-    @skipIf(macos_version=["<", "10.12"])
-    @expectedFailureAll(archs=["i[3-6]86"])
-    def test_dictionary_literal(self):
-        self.runToBreakpoint()
-
-        self.expect(
-            "expr --object-description -- @{ @\"key\" : @\"object\" }",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                "key",
-                "object"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntaxLiteral.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntaxLiteral.py
deleted file mode 100644 (file)
index e17343b..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-"""Test that the Objective-C syntax for dictionary/array literals and indexing works"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-from ObjCNewSyntaxTest import ObjCNewSyntaxTest
-
-
-class ObjCNewSyntaxTestCaseLiteral(ObjCNewSyntaxTest):
-
-    @skipUnlessDarwin
-    @skipIf(macos_version=["<", "10.12"])
-    @expectedFailureAll(archs=["i[3-6]86"])
-    def test_char_literal(self):
-        self.runToBreakpoint()
-
-        self.expect("expr --object-description -- @'a'",
-                    VARIABLES_DISPLAYED_CORRECTLY, substrs=[str(ord('a'))])
-
-    @skipUnlessDarwin
-    @skipIf(macos_version=["<", "10.12"])
-    @expectedFailureAll(archs=["i[3-6]86"])
-    def test_integer_literals(self):
-        self.runToBreakpoint()
-
-        self.expect(
-            "expr --object-description -- @1",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=["1"])
-
-        self.expect(
-            "expr --object-description -- @1l",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=["1"])
-
-        self.expect(
-            "expr --object-description -- @1ul",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=["1"])
-
-        self.expect(
-            "expr --object-description -- @1ll",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=["1"])
-
-        self.expect(
-            "expr --object-description -- @1ull",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=["1"])
-
-    @skipUnlessDarwin
-    @skipIf(macos_version=["<", "10.12"])
-    @expectedFailureAll(archs=["i[3-6]86"])
-    def test_float_literal(self):
-        self.runToBreakpoint()
-
-        self.expect("expr -- @123.45", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=["NSNumber", "123.45"])
-
-    @skipUnlessDarwin
-    @skipIf(macos_version=["<", "10.12"])
-    @expectedFailureAll(archs=["i[3-6]86"])
-    def test_expressions_in_literals(self):
-        self.runToBreakpoint()
-
-        self.expect(
-            "expr --object-description -- @( 1 + 3 )",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=["4"])
-        self.expect(
-            "expr -- @((char*)\"Hello world\" + 6)",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                "NSString",
-                "world"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/main.m
deleted file mode 100644 (file)
index d77ba5b..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#import <Foundation/Foundation.h>
-
-int main()
-{
-    @autoreleasepool
-    {
-        // NSArrays
-        NSArray *immutable_array = @[ @"foo", @"bar" ];
-        NSMutableArray *mutable_array = [NSMutableArray arrayWithCapacity:2];
-        [mutable_array addObjectsFromArray:immutable_array];
-        
-        // NSDictionaries
-        NSDictionary *immutable_dictionary = @{ @"key" : @"value" };
-        NSMutableDictionary *mutable_dictionary = [NSMutableDictionary dictionaryWithCapacity:1];
-        [mutable_dictionary addEntriesFromDictionary:immutable_dictionary];
-
-        NSNumber *one = @1;
-
-        NSLog(@"Stop here"); // Set breakpoint 0 here.
-    }
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-optimized/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-optimized/Makefile
deleted file mode 100644 (file)
index 5fb128d..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-OBJC_SOURCES := main.m
-
-CFLAGS ?= -arch $(ARCH) -g -O2
-LD_EXTRAS := -lobjc -framework Foundation
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-optimized/TestObjcOptimized.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-optimized/TestObjcOptimized.py
deleted file mode 100644 (file)
index 6209f14..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-"""
-Test that objective-c expression parser continues to work for optimized build.
-
-Fixed a bug in the expression parser where the 'this'
-or 'self' variable was not properly read if the compiler
-optimized it into a register.
-"""
-
-
-
-import lldb
-import re
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-# rdar://problem/9087739
-# test failure: objc_optimized does not work for "-C clang -A i386"
-
-
-@skipUnlessDarwin
-class ObjcOptimizedTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    myclass = "MyClass"
-    mymethod = "description"
-    method_spec = "-[%s %s]" % (myclass, mymethod)
-
-    def test_break(self):
-        """Test 'expr member' continues to work for optimized build."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_symbol(
-            self,
-            self.method_spec,
-            num_expected_locations=1,
-            sym_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.expect(
-            "thread backtrace",
-            STOPPED_DUE_TO_BREAKPOINT,
-            substrs=["stop reason = breakpoint"],
-            patterns=[
-                "frame.*0:.*%s %s" %
-                (self.myclass,
-                 self.mymethod)])
-
-        self.expect('expression member',
-                    startstr="(int) $0 = 5")
-
-        # <rdar://problem/12693963>
-        interp = self.dbg.GetCommandInterpreter()
-        result = lldb.SBCommandReturnObject()
-        interp.HandleCommand('frame variable self', result)
-        output = result.GetOutput()
-
-        desired_pointer = "0x0"
-
-        mo = re.search("0x[0-9a-f]+", output)
-
-        if mo:
-            desired_pointer = mo.group(0)
-
-        self.expect('expression (self)',
-                    substrs=[("(%s *) $1 = " % self.myclass), desired_pointer])
-
-        self.expect('expression self->non_member', error=True,
-                    substrs=["does not have a member named 'non_member'"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-optimized/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-optimized/main.m
deleted file mode 100644 (file)
index df88eea..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@interface MyClass : NSObject {
-  int member;
-}
-
-- (id)initWithMember:(int)_member;
-- (NSString*)description;
-@end
-
-@implementation MyClass
-
-- (id)initWithMember:(int)_member
-{
-    if (self = [super init])
-    {
-      member = _member;
-    }
-    return self;
-}
-
-- (void)dealloc
-{
-    [super dealloc];
-}
-
-// Set a breakpoint on '-[MyClass description]' and test expressions: expr member
-- (NSString *)description
-{
-    return [NSString stringWithFormat:@"%d", member];
-}
-@end
-
-int main (int argc, char const *argv[])
-{
-    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-
-    MyClass *my_object = [[MyClass alloc] initWithMember:5];
-
-    NSLog(@"MyObject %@", [my_object description]);
-
-    [pool release];
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-property/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-property/Makefile
deleted file mode 100644 (file)
index afecbf9..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-OBJC_SOURCES := main.m
-LD_EXTRAS := -lobjc -framework Foundation
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-property/TestObjCProperty.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-property/TestObjCProperty.py
deleted file mode 100644 (file)
index 3092c3f..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-"""
-Use lldb Python API to verify that expression evaluation for property references uses the correct getters and setters
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjCPropertyTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-        # Find the line number to break for main.c.
-        self.source_name = 'main.m'
-
-    @skipUnlessDarwin
-    @add_test_categories(['pyapi'])
-    def test_objc_properties(self):
-        """Test that expr uses the correct property getters and setters"""
-        if self.getArchitecture() == 'i386':
-            self.skipTest("requires modern objc runtime")
-
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target from the debugger.
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Set up our breakpoints:
-
-        main_bkpt = target.BreakpointCreateBySourceRegex(
-            "Set a breakpoint here.", lldb.SBFileSpec(self.source_name))
-        self.assertTrue(main_bkpt and
-                        main_bkpt.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        PROCESS_STOPPED)
-
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-            process, main_bkpt)
-        self.assertTrue(len(threads) == 1)
-        thread = threads[0]
-        frame = thread.GetFrameAtIndex(0)
-
-        mine = frame.FindVariable("mine")
-        self.assertTrue(mine.IsValid())
-        access_count = mine.GetChildMemberWithName("_access_count")
-        self.assertTrue(access_count.IsValid())
-        start_access_count = access_count.GetValueAsUnsigned(123456)
-        self.assertTrue(start_access_count != 123456)
-
-        #
-        # The first set of tests test calling the getter & setter of
-        # a property that actually only has a getter & setter and no
-        # @property.
-        #
-        nonexistant_value = frame.EvaluateExpression(
-            "mine.nonexistantInt", False)
-        nonexistant_error = nonexistant_value.GetError()
-        self.assertTrue(nonexistant_error.Success())
-        nonexistant_int = nonexistant_value.GetValueAsUnsigned(123456)
-        self.assertTrue(nonexistant_int == 6)
-
-        # Calling the getter function would up the access count, so make sure
-        # that happened.
-
-        new_access_count = access_count.GetValueAsUnsigned(123456)
-        self.assertTrue(new_access_count - start_access_count == 1)
-        start_access_count = new_access_count
-
-        #
-        # Now call the setter, then make sure that
-        nonexistant_change = frame.EvaluateExpression(
-            "mine.nonexistantInt = 10", False)
-        nonexistant_error = nonexistant_change.GetError()
-        self.assertTrue(nonexistant_error.Success())
-
-        # Calling the setter function would up the access count, so make sure
-        # that happened.
-
-        new_access_count = access_count.GetValueAsUnsigned(123456)
-        self.assertTrue(new_access_count - start_access_count == 1)
-        start_access_count = new_access_count
-
-        #
-        # Now we call the getter of a property that is backed by an ivar,
-        # make sure it works and that we actually update the backing ivar.
-        #
-
-        backed_value = frame.EvaluateExpression("mine.backedInt", False)
-        backed_error = backed_value.GetError()
-        self.assertTrue(backed_error.Success())
-        backing_value = mine.GetChildMemberWithName("_backedInt")
-        self.assertTrue(backing_value.IsValid())
-        self.assertTrue(backed_value.GetValueAsUnsigned(12345)
-                        == backing_value.GetValueAsUnsigned(23456))
-
-        unbacked_value = frame.EvaluateExpression("mine.unbackedInt", False)
-        unbacked_error = unbacked_value.GetError()
-        self.assertTrue(unbacked_error.Success())
-
-        idWithProtocol_value = frame.EvaluateExpression(
-            "mine.idWithProtocol", False)
-        idWithProtocol_error = idWithProtocol_value.GetError()
-        self.assertTrue(idWithProtocol_error.Success())
-        self.assertTrue(idWithProtocol_value.GetTypeName() == "id")
-
-        # Make sure that class property getter works as expected
-        value = frame.EvaluateExpression("BaseClass.classInt", False)
-        self.assertTrue(value.GetError().Success())
-        self.assertTrue(value.GetValueAsUnsigned(11111) == 123)
-
-        # Make sure that class property setter works as expected
-        value = frame.EvaluateExpression("BaseClass.classInt = 234", False)
-        self.assertTrue(value.GetError().Success())
-
-        # Verify that setter above actually worked
-        value = frame.EvaluateExpression("BaseClass.classInt", False)
-        self.assertTrue(value.GetError().Success())
-        self.assertTrue(value.GetValueAsUnsigned(11111) == 234)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-property/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-property/main.m
deleted file mode 100644 (file)
index 8d14759..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@protocol MyProtocol
-
--(const char *)hello;
-
-@end
-
-static int _class_int = 123;
-
-@interface BaseClass : NSObject
-{
-  int _backedInt;
-  int _access_count;
-}
-
-- (int) nonexistantInt;
-- (void) setNonexistantInt: (int) in_int;
-
-- (int) myGetUnbackedInt;
-- (void) mySetUnbackedInt: (int) in_int;
-
-- (int) getAccessCount;
-
-+(BaseClass *) baseClassWithBackedInt: (int) inInt andUnbackedInt: (int) inOtherInt;
-
-@property(getter=myGetUnbackedInt,setter=mySetUnbackedInt:) int unbackedInt;
-@property int backedInt;
-@property (nonatomic, assign) id <MyProtocol> idWithProtocol;
-@property(class) int classInt;
-@end
-
-@implementation BaseClass
-@synthesize unbackedInt;
-@synthesize backedInt = _backedInt;
-
-+ (BaseClass *) baseClassWithBackedInt: (int) inInt andUnbackedInt: (int) inOtherInt
-{
-  BaseClass *new = [[BaseClass alloc] init];
-  
-  new->_backedInt = inInt;
-  new->unbackedInt = inOtherInt;
-
-  return new;
-}
-
-- (int) myGetUnbackedInt
-{
-  // NSLog (@"Getting BaseClass::unbackedInt - %d.\n", unbackedInt);
-  _access_count++;
-  return unbackedInt;
-}
-
-- (void) mySetUnbackedInt: (int) in_int
-{
-  // NSLog (@"Setting BaseClass::unbackedInt from %d to %d.", unbackedInt, in_int);
-  _access_count++;
-  unbackedInt = in_int;
-}
-
-- (int) nonexistantInt
-{
-  // NSLog (@"Getting BaseClass::nonexistantInt - %d.\n", 5);
-  _access_count++;
-  return 6;
-}
-
-- (void) setNonexistantInt: (int) in_int
-{
-  // NSLog (@"Setting BaseClass::nonexistantInt from 7 to %d.", in_int);
-  _access_count++;
-}
-
-+ (int) classInt
-{
-    return _class_int;
-}
-
-+ (void) setClassInt:(int) n
-{
-    _class_int = n;
-}
-
-- (int) getAccessCount
-{
-  return _access_count;
-}
-@end
-
-int
-main ()
-{
-  BaseClass *mine = [BaseClass baseClassWithBackedInt: 10 andUnbackedInt: 20];
-  
-  // Set a breakpoint here.
-  int nonexistant = mine.nonexistantInt;
-
-  int backedInt = mine.backedInt;
-
-  int unbackedInt = mine.unbackedInt;
-
-  id idWithProtocol = mine.idWithProtocol;
-
-  NSLog (@"Results for %p: nonexistant: %d backed: %d unbacked: %d accessCount: %d.",
-         mine,
-         nonexistant,
-         backedInt,
-         unbackedInt,
-         [mine getAccessCount]);
-  return 0;
-
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/Makefile
deleted file mode 100644 (file)
index afecbf9..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-OBJC_SOURCES := main.m
-LD_EXTRAS := -lobjc -framework Foundation
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/TestRuntimeIvars.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/TestRuntimeIvars.py
deleted file mode 100644 (file)
index f1b3694..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(
-    __file__, globals(), [
-        decorators.skipIfFreeBSD, decorators.skipIfLinux,
-        decorators.skipIfWindows, decorators.skipIfNetBSD,
-        decorators.skipIf(archs=["i386", "i686"])])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/main.m
deleted file mode 100644 (file)
index 1f5a9b0..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#import <Foundation/Foundation.h>
-
-int main ()
-{
-  @autoreleasepool
-  {
-    NSLog(@"Hello"); //% self.expect("expression -- *((NSConcretePointerArray*)[NSPointerArray strongObjectsPointerArray])", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["count", "capacity", "options", "mutations"]);
-                     //% self.expect("expression -- ((NSConcretePointerArray*)[NSPointerArray strongObjectsPointerArray])->count", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["unsigned"]);
-  }
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/Makefile
deleted file mode 100644 (file)
index 0ad7e35..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-OBJC_SOURCES := static.m
-LD_EXTRAS := -lobjc -framework Foundation
-
-default:        a.out.stripped
-
-a.out.stripped: a.out.dSYM
-       strip -o a.out.stripped a.out
-       ln -sf a.out.dSYM a.out.stripped.dSYM
-
-clean::
-       rm -f a.out.stripped
-       rm -rf $(wildcard *.dSYM)
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py
deleted file mode 100644 (file)
index 8ee73ed..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-"""Test calling functions in static methods with a stripped binary."""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestObjCStaticMethodStripped(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers to break inside main().
-        self.main_source = "static.m"
-        self.break_line = line_number(
-            self.main_source, '// Set breakpoint here.')
-
-    @skipUnlessDarwin
-    @add_test_categories(['pyapi'])
-    @skipIf(
-        debug_info=no_match("dsym"),
-        bugnumber="This test requires a stripped binary and a dSYM")
-    #<rdar://problem/12042992>
-    def test_with_python_api(self):
-        """Test calling functions in static methods with a stripped binary."""
-        if self.getArchitecture() == 'i386':
-            self.skipTest("requires modern objc runtime")
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        bpt = target.BreakpointCreateByLocation(
-            self.main_source, self.break_line)
-        self.assertTrue(bpt, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint(process, bpt)
-
-        # Make sure we stopped at the first breakpoint.
-        self.assertTrue(
-            len(thread_list) != 0,
-            "No thread stopped at our breakpoint.")
-        self.assertTrue(len(thread_list) == 1,
-                        "More than one thread stopped at our breakpoint.")
-
-        # Now make sure we can call a function in the static method we've
-        # stopped in.
-        frame = thread_list[0].GetFrameAtIndex(0)
-        self.assertTrue(frame, "Got a valid frame 0 frame.")
-
-        cmd_value = frame.EvaluateExpression("(char *) sel_getName (_cmd)")
-        self.assertTrue(cmd_value.IsValid())
-        sel_name = cmd_value.GetSummary()
-        self.assertTrue(
-            sel_name == "\"doSomethingWithString:\"",
-            "Got the right value for the selector as string.")
-
-        cmd_value = frame.EvaluateExpression(
-            "[Foo doSomethingElseWithString:string]")
-        self.assertTrue(cmd_value.IsValid())
-        string_length = cmd_value.GetValueAsUnsigned()
-        self.assertTrue(
-            string_length == 27,
-            "Got the right value from another class method on the same class.")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/static.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/static.m
deleted file mode 100644 (file)
index ec7b2ef..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@interface Foo : NSObject
-+(void) doSomethingWithString: (NSString *) string;
--(void) doSomethingWithNothing;
-@end
-
-@implementation Foo
-+(void) doSomethingWithString: (NSString *) string
-{
-  NSLog (@"String is: %@.", string); // Set breakpoint here.
-}
-
-+(int) doSomethingElseWithString: (NSString *) string
-{
-  NSLog (@"String is still: %@.", string);
-  return [string length];
-}
-
--(void) doSomethingWithNothing
-{
-}
-@end
-
-int main()
-{
-  [Foo doSomethingWithString: @"Some string I have in mind."];
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method/Makefile
deleted file mode 100644 (file)
index 954dea4..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-OBJC_SOURCES := static.m
-LD_EXTRAS := -lobjc -framework Foundation
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method/TestObjCStaticMethod.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method/TestObjCStaticMethod.py
deleted file mode 100644 (file)
index ce18a07..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-"""Test calling functions in static methods."""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestObjCStaticMethod(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers to break inside main().
-        self.main_source = "static.m"
-        self.break_line = line_number(
-            self.main_source, '// Set breakpoint here.')
-
-    @skipUnlessDarwin
-    @add_test_categories(['pyapi'])
-    #<rdar://problem/9745789> "expression" can't call functions in class methods
-    def test_with_python_api(self):
-        """Test calling functions in static methods."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        bpt = target.BreakpointCreateByLocation(
-            self.main_source, self.break_line)
-        self.assertTrue(bpt, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint(process, bpt)
-
-        # Make sure we stopped at the first breakpoint.
-        self.assertTrue(
-            len(thread_list) != 0,
-            "No thread stopped at our breakpoint.")
-        self.assertTrue(len(thread_list) == 1,
-                        "More than one thread stopped at our breakpoint.")
-
-        # Now make sure we can call a function in the static method we've
-        # stopped in.
-        frame = thread_list[0].GetFrameAtIndex(0)
-        self.assertTrue(frame, "Got a valid frame 0 frame.")
-
-        cmd_value = frame.EvaluateExpression("(char *) sel_getName (_cmd)")
-        self.assertTrue(cmd_value.IsValid())
-        sel_name = cmd_value.GetSummary()
-        self.assertTrue(
-            sel_name == "\"doSomethingWithString:\"",
-            "Got the right value for the selector as string.")
-
-        cmd_value = frame.EvaluateExpression(
-            "[self doSomethingElseWithString:string]")
-        self.assertTrue(cmd_value.IsValid())
-        string_length = cmd_value.GetValueAsUnsigned()
-        self.assertTrue(
-            string_length == 27,
-            "Got the right value from another class method on the same class.")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method/static.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method/static.m
deleted file mode 100644 (file)
index ec7b2ef..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@interface Foo : NSObject
-+(void) doSomethingWithString: (NSString *) string;
--(void) doSomethingWithNothing;
-@end
-
-@implementation Foo
-+(void) doSomethingWithString: (NSString *) string
-{
-  NSLog (@"String is: %@.", string); // Set breakpoint here.
-}
-
-+(int) doSomethingElseWithString: (NSString *) string
-{
-  NSLog (@"String is still: %@.", string);
-  return [string length];
-}
-
--(void) doSomethingWithNothing
-{
-}
-@end
-
-int main()
-{
-  [Foo doSomethingWithString: @"Some string I have in mind."];
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-stepping/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-stepping/Makefile
deleted file mode 100644 (file)
index 9906470..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-OBJC_SOURCES := stepping-tests.m
-LD_EXTRAS := -lobjc -framework Foundation
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-stepping/TestObjCStepping.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-stepping/TestObjCStepping.py
deleted file mode 100644 (file)
index bf80995..0000000
+++ /dev/null
@@ -1,220 +0,0 @@
-"""Test stepping through ObjC method dispatch in various forms."""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestObjCStepping(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers that we will step to in main:
-        self.main_source = "stepping-tests.m"
-        self.source_randomMethod_line = line_number(
-            self.main_source, '// Source randomMethod start line.')
-        self.sourceBase_randomMethod_line = line_number(
-            self.main_source, '// SourceBase randomMethod start line.')
-        self.source_returnsStruct_start_line = line_number(
-            self.main_source, '// Source returnsStruct start line.')
-        self.sourceBase_returnsStruct_start_line = line_number(
-            self.main_source, '// SourceBase returnsStruct start line.')
-        self.stepped_past_nil_line = line_number(
-            self.main_source, '// Step over nil should stop here.')
-
-    @skipUnlessDarwin
-    @add_test_categories(['pyapi', 'basic_process'])
-    def test_with_python_api(self):
-        """Test stepping through ObjC method dispatch in various forms."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-
-        breakpoints_to_disable = []
-
-        break1 = target.BreakpointCreateBySourceRegex(
-            "// Set first breakpoint here.", self.main_source_spec)
-        self.assertTrue(break1, VALID_BREAKPOINT)
-        breakpoints_to_disable.append(break1)
-
-        break2 = target.BreakpointCreateBySourceRegex(
-            "// Set second breakpoint here.", self.main_source_spec)
-        self.assertTrue(break2, VALID_BREAKPOINT)
-        breakpoints_to_disable.append(break2)
-
-        break3 = target.BreakpointCreateBySourceRegex(
-            '// Set third breakpoint here.', self.main_source_spec)
-        self.assertTrue(break3, VALID_BREAKPOINT)
-        breakpoints_to_disable.append(break3)
-
-        break4 = target.BreakpointCreateBySourceRegex(
-            '// Set fourth breakpoint here.', self.main_source_spec)
-        self.assertTrue(break4, VALID_BREAKPOINT)
-        breakpoints_to_disable.append(break4)
-
-        break5 = target.BreakpointCreateBySourceRegex(
-            '// Set fifth breakpoint here.', self.main_source_spec)
-        self.assertTrue(break5, VALID_BREAKPOINT)
-        breakpoints_to_disable.append(break5)
-
-        break_returnStruct_call_super = target.BreakpointCreateBySourceRegex(
-            '// Source returnsStruct call line.', self.main_source_spec)
-        self.assertTrue(break_returnStruct_call_super, VALID_BREAKPOINT)
-        breakpoints_to_disable.append(break_returnStruct_call_super)
-
-        break_step_nil = target.BreakpointCreateBySourceRegex(
-            '// Set nil step breakpoint here.', self.main_source_spec)
-        self.assertTrue(break_step_nil, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        threads = lldbutil.get_threads_stopped_at_breakpoint(process, break1)
-        if len(threads) != 1:
-            self.fail("Failed to stop at breakpoint 1.")
-
-        thread = threads[0]
-
-        mySource = thread.GetFrameAtIndex(0).FindVariable("mySource")
-        self.assertTrue(mySource, "Found mySource local variable.")
-        mySource_isa = mySource.GetChildMemberWithName("isa")
-        self.assertTrue(mySource_isa, "Found mySource->isa local variable.")
-        className = mySource_isa.GetSummary()
-
-        if self.TraceOn():
-            print(mySource_isa)
-
-        # Lets delete mySource so we can check that after stepping a child variable
-        # with no parent persists and is useful.
-        del (mySource)
-
-        # Now step in, that should leave us in the Source randomMethod:
-        thread.StepInto()
-        line_number = thread.GetFrameAtIndex(0).GetLineEntry().GetLine()
-        self.assertTrue(
-            line_number == self.source_randomMethod_line,
-            "Stepped into Source randomMethod.")
-
-        # Now step in again, through the super call, and that should leave us
-        # in the SourceBase randomMethod:
-        thread.StepInto()
-        line_number = thread.GetFrameAtIndex(0).GetLineEntry().GetLine()
-        self.assertTrue(
-            line_number == self.sourceBase_randomMethod_line,
-            "Stepped through super into SourceBase randomMethod.")
-
-        threads = lldbutil.continue_to_breakpoint(process, break2)
-        self.assertTrue(
-            len(threads) == 1,
-            "Continued to second breakpoint in main.")
-
-        # Again, step in twice gets us to a stret method and a stret super
-        # call:
-        thread = threads[0]
-        thread.StepInto()
-        line_number = thread.GetFrameAtIndex(0).GetLineEntry().GetLine()
-        self.assertTrue(
-            line_number == self.source_returnsStruct_start_line,
-            "Stepped into Source returnsStruct.")
-
-        threads = lldbutil.continue_to_breakpoint(
-            process, break_returnStruct_call_super)
-        self.assertTrue(
-            len(threads) == 1,
-            "Stepped to the call super line in Source returnsStruct.")
-        thread = threads[0]
-
-        thread.StepInto()
-        line_number = thread.GetFrameAtIndex(0).GetLineEntry().GetLine()
-        self.assertTrue(
-            line_number == self.sourceBase_returnsStruct_start_line,
-            "Stepped through super into SourceBase returnsStruct.")
-
-        # Cool now continue to get past the call that initializes the Observer, and then do our steps in again to see that
-        # we can find our way when we're stepping through a KVO swizzled
-        # object.
-
-        threads = lldbutil.continue_to_breakpoint(process, break3)
-        self.assertTrue(
-            len(threads) == 1,
-            "Continued to third breakpoint in main, our object should now be swizzled.")
-
-        newClassName = mySource_isa.GetSummary()
-
-        if self.TraceOn():
-            print("className is %s, newClassName is %s" % (className, newClassName))
-            print(mySource_isa)
-
-        self.assertTrue(
-            newClassName != className,
-            "The isa did indeed change, swizzled!")
-
-        # Now step in, that should leave us in the Source randomMethod:
-        thread = threads[0]
-        thread.StepInto()
-        line_number = thread.GetFrameAtIndex(0).GetLineEntry().GetLine()
-        self.assertTrue(
-            line_number == self.source_randomMethod_line,
-            "Stepped into Source randomMethod in swizzled object.")
-
-        # Now step in again, through the super call, and that should leave us
-        # in the SourceBase randomMethod:
-        thread.StepInto()
-        line_number = thread.GetFrameAtIndex(0).GetLineEntry().GetLine()
-        self.assertTrue(
-            line_number == self.sourceBase_randomMethod_line,
-            "Stepped through super into SourceBase randomMethod in swizzled object.")
-
-        threads = lldbutil.continue_to_breakpoint(process, break4)
-        self.assertTrue(
-            len(threads) == 1,
-            "Continued to fourth breakpoint in main.")
-        thread = threads[0]
-
-        # Again, step in twice gets us to a stret method and a stret super
-        # call:
-        thread.StepInto()
-        line_number = thread.GetFrameAtIndex(0).GetLineEntry().GetLine()
-        self.assertTrue(
-            line_number == self.source_returnsStruct_start_line,
-            "Stepped into Source returnsStruct in swizzled object.")
-
-        threads = lldbutil.continue_to_breakpoint(
-            process, break_returnStruct_call_super)
-        self.assertTrue(
-            len(threads) == 1,
-            "Stepped to the call super line in Source returnsStruct - second time.")
-        thread = threads[0]
-
-        thread.StepInto()
-        line_number = thread.GetFrameAtIndex(0).GetLineEntry().GetLine()
-        self.assertTrue(
-            line_number == self.sourceBase_returnsStruct_start_line,
-            "Stepped through super into SourceBase returnsStruct in swizzled object.")
-
-        for bkpt in breakpoints_to_disable:
-            bkpt.SetEnabled(False)
-
-        threads = lldbutil.continue_to_breakpoint(process, break_step_nil)
-        self.assertTrue(len(threads) == 1, "Continued to step nil breakpoint.")
-
-        thread.StepInto()
-        line_number = thread.GetFrameAtIndex(0).GetLineEntry().GetLine()
-        self.assertTrue(
-            line_number == self.stepped_past_nil_line,
-            "Step in over dispatch to nil stepped over.")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-stepping/stepping-tests.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-stepping/stepping-tests.m
deleted file mode 100644 (file)
index 63db536..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-#import <Foundation/Foundation.h>
-#include <stdio.h>
-
-struct return_me
-{
-  int first;
-  int second;
-};
-
-@interface SourceBase: NSObject
-{
-  struct return_me my_return;
-}
-- (SourceBase *) initWithFirst: (int) first andSecond: (int) second;
-- (void) randomMethod;
-- (struct return_me) returnsStruct;
-@end
-
-@implementation SourceBase
-- (void) randomMethod
-{
-  printf ("Called in SourceBase version of randomMethod.\n"); // SourceBase randomMethod start line.
-}
-
-- (struct return_me) returnsStruct
-{
-  return my_return; // SourceBase returnsStruct start line.
-}
-
-- (SourceBase *) initWithFirst: (int) first andSecond: (int) second
-{
-  my_return.first = first;
-  my_return.second = second;
-
-  return self;
-}
-@end
-
-@interface Source : SourceBase
-{
-  int _property;
-}
-- (void) setProperty: (int) newValue;
-- (void) randomMethod;
-- (struct return_me) returnsStruct;
-@end
-
-@implementation Source
-- (void) setProperty: (int) newValue
-{
-  _property = newValue;
-}
-
-- (void) randomMethod
-{
-  [super randomMethod];  // Source randomMethod start line.
-    printf ("Called in Source version of random method.");
-}
-
-- (struct return_me) returnsStruct
-{
-  printf ("Called in Source version of returnsStruct.\n");  // Source returnsStruct start line.
-  return [super returnsStruct];                             // Source returnsStruct call line.  
-}
-
-@end
-
-@interface Observer : NSObject
-{
-  Source *_source;
-}
-+ (Observer *) observerWithSource: (Source *) source;
-- (Observer *) initWithASource: (Source *) source;
-- (void) observeValueForKeyPath: (NSString *) path 
-                      ofObject: (id) object
-                        change: (NSDictionary *) change
-                       context: (void *) context;
-@end
-
-@implementation Observer
-
-+ (Observer *) observerWithSource: (Source *) inSource;
-{
-  Observer *retval;
-
-  retval = [[Observer alloc] initWithASource: inSource];
-  return retval;
-}
-
-- (Observer *) initWithASource: (Source *) source
-{
-  [super init];
-  _source = source;
-  [_source addObserver: self 
-           forKeyPath: @"property" 
-           options: (NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld)
-           context: NULL];
-  return self;
-}
-
-- (void) observeValueForKeyPath: (NSString *) path 
-                      ofObject: (id) object
-                        change: (NSDictionary *) change
-                       context: (void *) context
-{
-  printf ("Observer function called.\n");
-  return;
-}
-@end
-
-int main ()
-{
-  Source *mySource;
-  Observer *myObserver;
-  struct return_me ret_val;
-
-  NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-
-  mySource = [[Source alloc] init];
-
-  [mySource randomMethod];               // Set first breakpoint here.
-  ret_val = [mySource returnsStruct];    // Set second breakpoint here.
-
-  myObserver = [Observer observerWithSource: mySource];  
-
-  [mySource randomMethod];              // Set third breakpoint here.
-  ret_val = [mySource returnsStruct];   // Set fourth breakpoint here.
-  [mySource setProperty: 5];            // Set fifth breakpoint here.
-
-  // We also had a bug where stepping into a method dispatch to nil turned
-  // into continue.  So make sure that works here:
-
-  mySource = nil;
-  [mySource randomMethod];             // Set nil step breakpoint here.
-  [pool release];                      // Step over nil should stop here.
-  return 0;
-
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/Makefile
deleted file mode 100644 (file)
index d059a5c..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-OBJC_SOURCES := test.m
-LD_EXTRAS := -lobjc -framework Foundation
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py
deleted file mode 100644 (file)
index 28188af..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-"""Test passing structs to Objective-C methods."""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestObjCStructArgument(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers to break inside main().
-        self.main_source = "test.m"
-        self.break_line = line_number(
-            self.main_source, '// Set breakpoint here.')
-
-    @skipUnlessDarwin
-    @add_test_categories(['pyapi'])
-    @skipIf(debug_info=no_match(["gmodules"]), oslist=['ios', 'watchos', 'tvos', 'bridgeos'], archs=['armv7', 'arm64'])  # this test program only builds for ios with -gmodules
-    def test_with_python_api(self):
-        """Test passing structs to Objective-C methods."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        bpt = target.BreakpointCreateByLocation(
-            self.main_source, self.break_line)
-        self.assertTrue(bpt, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint(process, bpt)
-
-        # Make sure we stopped at the first breakpoint.
-        self.assertTrue(
-            len(thread_list) != 0,
-            "No thread stopped at our breakpoint.")
-        self.assertTrue(len(thread_list) == 1,
-                        "More than one thread stopped at our breakpoint.")
-
-        frame = thread_list[0].GetFrameAtIndex(0)
-        self.assertTrue(frame, "Got a valid frame 0 frame.")
-
-        self.expect("p [summer sumThings:tts]", substrs=['9'])
-
-        self.expect(
-            "po [NSValue valueWithRect:rect]",
-            substrs=['NSRect: {{0, 0}, {10, 20}}'])
-
-        # Now make sure we can call a method that returns a struct without
-        # crashing.
-        cmd_value = frame.EvaluateExpression("[provider getRange]")
-        self.assertTrue(cmd_value.IsValid())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/test.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/test.m
deleted file mode 100644 (file)
index 6b13a3a..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#import <Foundation/Foundation.h>
-#include <TargetConditionals.h>
-
-#if TARGET_OS_IPHONE
-@import CoreGraphics;
-typedef CGRect NSRect;
-#endif
-
-struct things_to_sum {
-    int a;
-    int b;
-    int c;
-};
-
-@interface ThingSummer : NSObject {
-};
--(int)sumThings:(struct things_to_sum)tts;
-@end
-
-@implementation ThingSummer
--(int)sumThings:(struct things_to_sum)tts
-{
-  return tts.a + tts.b + tts.c;
-}
-@end
-
-int main()
-{
-  @autoreleasepool
-  {
-    ThingSummer *summer = [ThingSummer alloc];
-    struct things_to_sum tts = { 2, 3, 4 };
-    int ret = [summer sumThings:tts];
-    NSRect rect = {{0, 0}, {10, 20}};    
-       // The Objective-C V1 runtime won't read types from metadata so we need
-       // NSValue in our debug info to use it in our test.
-       NSValue *v = [NSValue valueWithRect:rect];
-    return rect.origin.x; // Set breakpoint here.
-  }
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/Makefile
deleted file mode 100644 (file)
index d059a5c..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-OBJC_SOURCES := test.m
-LD_EXTRAS := -lobjc -framework Foundation
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/TestObjCStructReturn.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/TestObjCStructReturn.py
deleted file mode 100644 (file)
index c8c5484..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-"""Test calling functions in class methods."""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestObjCClassMethod(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers to break inside main().
-        self.main_source = "test.m"
-        self.break_line = line_number(
-            self.main_source, '// Set breakpoint here.')
-
-    @skipUnlessDarwin
-    @add_test_categories(['pyapi'])
-    def test_with_python_api(self):
-        """Test calling functions in class methods."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        bpt = target.BreakpointCreateByLocation(
-            self.main_source, self.break_line)
-        self.assertTrue(bpt, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint(process, bpt)
-
-        # Make sure we stopped at the first breakpoint.
-        self.assertTrue(
-            len(thread_list) != 0,
-            "No thread stopped at our breakpoint.")
-        self.assertTrue(len(thread_list) == 1,
-                        "More than one thread stopped at our breakpoint.")
-
-        frame = thread_list[0].GetFrameAtIndex(0)
-        self.assertTrue(frame, "Got a valid frame 0 frame.")
-
-        # Now make sure we can call a method that returns a struct without
-        # crashing.
-        cmd_value = frame.EvaluateExpression("[provider getRange]")
-        self.assertTrue(cmd_value.IsValid())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/test.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/test.m
deleted file mode 100644 (file)
index aafe231..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@interface RangeProvider : NSObject {
-};
--(NSRange)getRange;
-@end
-
-@implementation RangeProvider
--(NSRange)getRange
-{
-  return NSMakeRange(0, 3);
-}
-@end
-
-int main()
-{
-  @autoreleasepool
-  {
-    RangeProvider *provider = [RangeProvider alloc];
-    NSRange range = [provider getRange]; // Set breakpoint here.
-    return 0;
-  }
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-super/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-super/Makefile
deleted file mode 100644 (file)
index e6db3de..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-OBJC_SOURCES := class.m
-LD_EXTRAS := -lobjc -framework Foundation
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-super/TestObjCSuper.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-super/TestObjCSuper.py
deleted file mode 100644 (file)
index 5cb46e0..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-"""Test calling methods on super."""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestObjCSuperMethod(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers to break inside main().
-        self.main_source = "class.m"
-        self.break_line = line_number(
-            self.main_source, '// Set breakpoint here.')
-
-    @skipUnlessDarwin
-    @add_test_categories(['pyapi'])
-    def test_with_python_api(self):
-        """Test calling methods on super."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        bpt = target.BreakpointCreateByLocation(
-            self.main_source, self.break_line)
-        self.assertTrue(bpt, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint(process, bpt)
-
-        # Make sure we stopped at the first breakpoint.
-        self.assertTrue(
-            len(thread_list) != 0,
-            "No thread stopped at our breakpoint.")
-        self.assertTrue(len(thread_list) == 1,
-                        "More than one thread stopped at our breakpoint.")
-
-        # Now make sure we can call a function in the class method we've
-        # stopped in.
-        frame = thread_list[0].GetFrameAtIndex(0)
-        self.assertTrue(frame, "Got a valid frame 0 frame.")
-
-        cmd_value = frame.EvaluateExpression("[self get]")
-        self.assertTrue(cmd_value.IsValid())
-        self.assertTrue(cmd_value.GetValueAsUnsigned() == 2)
-
-        cmd_value = frame.EvaluateExpression("[super get]")
-        self.assertTrue(cmd_value.IsValid())
-        self.assertTrue(cmd_value.GetValueAsUnsigned() == 1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-super/class.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-super/class.m
deleted file mode 100644 (file)
index b55b649..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@interface Foo : NSObject {
-}
--(int)get;
-@end
-
-@implementation Foo
--(int)get
-{
-  return 1;
-}
-@end
-
-@interface Bar : Foo {
-}
--(int)get;
-@end
-
-@implementation Bar
--(int)get
-{
-  return 2; 
-}
-
--(int)callme
-{
-  return [self get]; // Set breakpoint here.
-}
-@end
-
-int main()
-{
-  @autoreleasepool
-  {
-    Bar *bar = [Bar alloc];
-    return [bar callme];
-  }
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc_direct-methods/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc_direct-methods/Makefile
deleted file mode 100644 (file)
index afecbf9..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-OBJC_SOURCES := main.m
-LD_EXTRAS := -lobjc -framework Foundation
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc_direct-methods/TestObjCDirectMethods.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc_direct-methods/TestObjCDirectMethods.py
deleted file mode 100644 (file)
index f0152de..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(
-    __file__, globals(), [decorators.skipUnlessDarwin])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc_direct-methods/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc_direct-methods/main.m
deleted file mode 100644 (file)
index 6799f22..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-#import <Foundation/Foundation.h>
-
-int side_effect = 0;
-
-NSString *str = @"some string";
-
-const char *directCallConflictingName() {
-  return "wrong function";
-}
-
-@interface Foo : NSObject {
-  int instance_var;
-}
--(int) entryPoint;
-@end
-
-@implementation Foo
--(int) entryPoint
-{
-  // Try calling directly with self. Same as in the main method otherwise.
-  return 0; //%self.expect("expr [self directCallNoArgs]", substrs=["called directCallNoArgs"])
-            //%self.expect("expr [self directCallArgs: 1111]", substrs=["= 2345"])
-            //%self.expect("expr side_effect = 0; [self directCallVoidReturn]; side_effect", substrs=["= 4321"])
-            //%self.expect("expr [self directCallNSStringArg: str]", substrs=['@"some string"'])
-            //%self.expect("expr [self directCallIdArg: (id)str]", substrs=['@"some string appendix"'])
-            //%self.expect("expr [self directCallConflictingName]", substrs=["correct function"])
-            //%self.expect("expr [self directCallWithCategory]", substrs=["called function with category"])
-}
-
-// Declare several objc_direct functions we can test.
--(const char *) directCallNoArgs __attribute__((objc_direct))
-{
-  return "called directCallNoArgs";
-}
-
--(void) directCallVoidReturn __attribute__((objc_direct))
-{
-  side_effect = 4321;
-}
-
--(int) directCallArgs:(int)i __attribute__((objc_direct))
-{
-  // Use the arg in some way to make sure that gets passed correctly.
-  return i + 1234;
-}
-
--(NSString *) directCallNSStringArg:(NSString *)str __attribute__((objc_direct))
-{
-  return str;
-}
-
--(NSString *) directCallIdArg:(id)param __attribute__((objc_direct))
-{
-  return [param stringByAppendingString:@" appendix"];
-}
-
-// We have another function with the same name above. Make sure this doesn't influence
-// what we call.
--(const char *) directCallConflictingName  __attribute__((objc_direct))
-{
-  return "correct function";
-}
-@end
-
-
-@interface Foo (Cat)
-@end
-
-@implementation Foo (Cat)
--(const char *) directCallWithCategory  __attribute__((objc_direct))
-{
-  return "called function with category";
-}
-@end
-
-int main()
-{
-  Foo *foo = [[Foo alloc] init];
-  [foo directCallNoArgs];
-  [foo directCallArgs: 1];
-  [foo directCallVoidReturn];
-  [foo directCallNSStringArg: str];
-  [foo directCallIdArg: (id)str];
-  [foo entryPoint];  //%self.expect("expr [foo directCallNoArgs]", substrs=["called directCallNoArgs"])
-                     //%self.expect("expr [foo directCallArgs: 1111]", substrs=["= 2345"])
-                     //%self.expect("expr side_effect = 0; [foo directCallVoidReturn]; side_effect", substrs=["= 4321"])
-                     //%self.expect("expr [foo directCallNSStringArg: str]", substrs=['@"some string"'])
-                     //%self.expect("expr [foo directCallIdArg: (id)str]", substrs=['@"some string appendix"'])
-                     //%self.expect("expr [foo directCallConflictingName]", substrs=["correct function"])
-                     //%self.expect("expr [foo directCallWithCategory]", substrs=["called function with category"])
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/orderedset/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/orderedset/Makefile
deleted file mode 100644 (file)
index afecbf9..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-OBJC_SOURCES := main.m
-LD_EXTRAS := -lobjc -framework Foundation
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/orderedset/TestOrderedSet.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/orderedset/TestOrderedSet.py
deleted file mode 100644 (file)
index 90c6bc3..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestOrderedSet(TestBase):
-  mydir = TestBase.compute_mydir(__file__)
-
-  @skipUnlessDarwin
-  def test_ordered_set(self):
-    self.build()
-    src_file = "main.m"
-    src_file_spec = lldb.SBFileSpec(src_file)
-    (target, process, thread, main_breakpoint) = lldbutil.run_to_source_breakpoint(self,
-          "break here", src_file_spec, exe_name = "a.out")
-    frame = thread.GetSelectedFrame()
-    self.expect("expr -d run -- orderedSet", substrs=["3 elements"])
-    self.expect("expr -d run -- *orderedSet", substrs=["(int)1", "(int)2", "(int)3"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/orderedset/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/orderedset/main.m
deleted file mode 100644 (file)
index e3f0162..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#import <Foundation/Foundation.h>
-
-int main() {
-  NSOrderedSet *orderedSet =
-      [NSOrderedSet orderedSetWithArray:@[@1,@2,@3,@1]];
-  NSLog(@"%@",orderedSet);
-  return 0; // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/print-obj/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/print-obj/Makefile
deleted file mode 100644 (file)
index 2eab562..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-OBJC_SOURCES := blocked.m
-LD_EXTRAS := -lobjc -framework Foundation
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/print-obj/TestPrintObj.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/print-obj/TestPrintObj.py
deleted file mode 100644 (file)
index 9b3ec33..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-"""
-Test "print object" where another thread blocks the print object from making progress.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-@skipUnlessDarwin
-class PrintObjTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # My source program.
-        self.source = "blocked.m"
-        # Find the line numbers to break at.
-        self.line = line_number(self.source, '// Set a breakpoint here.')
-
-    def test_print_obj(self):
-        """
-        Test "print object" where another thread blocks the print object from making progress.
-
-        Set a breakpoint on the line in my_pthread_routine.  Then switch threads
-        to the main thread, and do print the lock_me object.  Since that will
-        try to get the lock already gotten by my_pthread_routime thread, it will
-        have to switch to running all threads, and that should then succeed.
-        """
-        d = {'EXE': 'b.out'}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        exe = self.getBuildArtifact('b.out')
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        breakpoint = target.BreakpointCreateByLocation(self.source, self.line)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-        self.runCmd("breakpoint list")
-
-        # Launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.runCmd("thread backtrace all")
-
-        # Let's get the current stopped thread.  We'd like to switch to the
-        # other thread to issue our 'po lock_me' command.
-        import lldbsuite.test.lldbutil as lldbutil
-        this_thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(this_thread)
-
-        # Find the other thread.  The iteration protocol of SBProcess and the
-        # rich comparison methods (__eq__/__ne__) of SBThread come in handy.
-        other_thread = None
-        for t in process:
-            if t != this_thread:
-                other_thread = t
-                break
-
-        # Set the other thread as the selected thread to issue our 'po'
-        # command.other
-        self.assertTrue(other_thread)
-        process.SetSelectedThread(other_thread)
-        if self.TraceOn():
-            print("selected thread:" + lldbutil.get_description(other_thread))
-        self.runCmd("thread backtrace")
-
-        # We want to traverse the frame to the one corresponding to blocked.m to
-        # issue our 'po lock_me' command.
-
-        depth = other_thread.GetNumFrames()
-        for i in range(depth):
-            frame = other_thread.GetFrameAtIndex(i)
-            name = frame.GetFunctionName()
-            if name == 'main':
-                other_thread.SetSelectedFrame(i)
-                if self.TraceOn():
-                    print("selected frame:" + lldbutil.get_description(frame))
-                break
-
-        self.expect("po lock_me", OBJECT_PRINTED_CORRECTLY,
-                    substrs=['I am pretty special.'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/print-obj/blocked.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/print-obj/blocked.m
deleted file mode 100644 (file)
index 5877126..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-//===-- blocked.m --------------------------------------------------*- ObjC -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// This file is for testing running "print object" in a case where another thread
-// blocks the print object from making progress.  Set a breakpoint on the line in 
-// my_pthread_routine as indicated.  Then switch threads to the main thread, and
-// do print the lock_me object.  Since that will try to get the lock already gotten
-// by my_pthread_routime thread, it will have to switch to running all threads, and
-// that should then succeed.
-//
-
-#include <Foundation/Foundation.h>
-#include <pthread.h>
-
-static pthread_mutex_t test_mutex;
-
-static void Mutex_Init (void)
-{
-    pthread_mutexattr_t tmp_mutex_attr;
-    pthread_mutexattr_init(&tmp_mutex_attr);
-    pthread_mutex_init(&test_mutex, &tmp_mutex_attr);
-}
-
-@interface LockMe :NSObject
-{
-  
-}
-- (NSString *) description;
-@end
-
-@implementation LockMe 
-- (NSString *) description
-{
-    printf ("LockMe trying to get the lock.\n");
-    pthread_mutex_lock(&test_mutex);
-    printf ("LockMe got the lock.\n");
-    pthread_mutex_unlock(&test_mutex);
-    return @"I am pretty special.\n";
-}
-@end
-
-void *
-my_pthread_routine (void *data)
-{
-    printf ("my_pthread_routine about to enter.\n");  
-    pthread_mutex_lock(&test_mutex);
-    printf ("Releasing Lock.\n"); // Set a breakpoint here.
-    pthread_mutex_unlock(&test_mutex);
-    return NULL;
-}
-
-int
-main ()
-{
-  pthread_attr_t tmp_attr;
-  pthread_attr_init (&tmp_attr);
-  pthread_t my_pthread;
-
-  Mutex_Init ();
-
-  LockMe *lock_me = [[LockMe alloc] init];
-  pthread_create (&my_pthread, &tmp_attr, my_pthread_routine, NULL);
-
-  pthread_join (my_pthread, NULL);
-
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/ptr_refs/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/ptr_refs/Makefile
deleted file mode 100644 (file)
index 845553d..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-OBJC_SOURCES := main.m
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/ptr_refs/TestPtrRefsObjC.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/ptr_refs/TestPtrRefsObjC.py
deleted file mode 100644 (file)
index aade40c..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-"""
-Test the ptr_refs tool on Darwin with Objective-C
-"""
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestPtrRefsObjC(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    def test_ptr_refs(self):
-        """Test the ptr_refs tool on Darwin with Objective-C"""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        main_file_spec = lldb.SBFileSpec('main.m')
-        breakpoint = target.BreakpointCreateBySourceRegex(
-            'break', main_file_spec)
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Frame #0 should be on self.line1 and the break condition should hold.
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint condition")
-
-        frame = thread.GetFrameAtIndex(0)
-
-        self.dbg.HandleCommand("script import lldb.macosx.heap")
-        self.expect("ptr_refs self", substrs=["malloc", "stack"])
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/ptr_refs/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/ptr_refs/main.m
deleted file mode 100644 (file)
index 94bf0fb..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#import <Foundation/Foundation.h>
-
-@interface MyClass : NSObject {
-};
--(void)test;
-@end
-
-@implementation MyClass
--(void)test {
-    printf("%p\n", self); // break here
-}
-@end
-
-@interface MyOwner : NSObject {
-  @public id ownedThing; // should be id, to test <rdar://problem/31363513>
-};
-@end
-
-@implementation MyOwner
-@end
-
-int main (int argc, char const *argv[]) {
-    @autoreleasepool {
-        MyOwner *owner = [[MyOwner alloc] init];
-        owner->ownedThing = [[MyClass alloc] init];
-        [(MyClass*)owner->ownedThing test];
-    }
-    return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/radar-9691614/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/radar-9691614/Makefile
deleted file mode 100644 (file)
index 37dd8f4..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-OBJC_SOURCES := main.m
-
-
-
-LD_EXTRAS := -framework Foundation
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py
deleted file mode 100644 (file)
index 632ef7b..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-"""
-Test that objective-c method returning BOOL works correctly.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-@skipUnlessDarwin
-class MethodReturningBOOLTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # We'll use the test method name as the exe_name.
-        self.exe_name = self.testMethodName
-        # Find the line number to break inside main().
-        self.main_source = "main.m"
-        self.line = line_number(self.main_source, '// Set breakpoint here.')
-
-    def test_method_ret_BOOL(self):
-        """Test that objective-c method returning BOOL works correctly."""
-        d = {'EXE': self.exe_name}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.expect("process status", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=[" at %s:%d" % (self.main_source, self.line),
-                             "stop reason = breakpoint"])
-
-        # rdar://problem/9691614
-        self.runCmd('p (int)[my isValid]')
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/radar-9691614/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/radar-9691614/main.m
deleted file mode 100644 (file)
index bb87d67..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-#import <Foundation/Foundation.h>
-#include <stdio.h>
-
-@interface MyString : NSObject {
-    NSString *str;
-    NSDate *date;
-    BOOL _is_valid;
-}
-
-- (id)initWithNSString:(NSString *)string;
-- (BOOL)isValid;
-@end
-
-@implementation MyString
-- (id)initWithNSString:(NSString *)string
-{
-    if (self = [super init])
-    {
-        str = [NSString stringWithString:string];
-        date = [NSDate date];
-    }
-    _is_valid = YES;
-    return self;
-}
-
-- (BOOL)isValid
-{
-    return _is_valid;
-}
-
-- (void)dealloc
-{
-    [date release];
-    [str release];
-    [super dealloc];
-}
-
-- (NSString *)description
-{
-    return [str stringByAppendingFormat:@" with timestamp: %@", date];
-}
-@end
-
-void
-Test_MyString (const char *program)
-{
-    NSString *str = [NSString stringWithFormat:@"Hello from '%s'", program];
-    MyString *my = [[MyString alloc] initWithNSString:str];
-    if ([my isValid])
-        printf("my is valid!\n");
-
-    NSLog(@"NSString instance: %@", [str description]); // Set breakpoint here.
-                                                        // Test 'p (int)[my isValid]'.
-                                                        // The expression parser should not crash -- rdar://problem/9691614.
-
-    NSLog(@"MyString instance: %@", [my description]);
-}
-
-int main (int argc, char const *argv[])
-{
-    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-
-    Test_MyString (argv[0]);
-
-    [pool release];
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/Makefile
deleted file mode 100644 (file)
index 37dd8f4..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-OBJC_SOURCES := main.m
-
-
-
-LD_EXTRAS := -framework Foundation
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/TestRdar10967107.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/TestRdar10967107.py
deleted file mode 100644 (file)
index c6633b7..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-"""
-Test that CoreFoundation classes CFGregorianDate and CFRange are not improperly uniqued
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-@skipUnlessDarwin
-class Rdar10967107TestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # We'll use the test method name as the exe_name.
-        self.exe_name = self.testMethodName
-        # Find the line number to break inside main().
-        self.main_source = "main.m"
-        self.line = line_number(self.main_source, '// Set breakpoint here.')
-
-    def test_cfrange_diff_cfgregoriandate(self):
-        """Test that CoreFoundation classes CFGregorianDate and CFRange are not improperly uniqued."""
-        d = {'EXE': self.exe_name}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            self.main_source,
-            self.line,
-            num_expected_locations=1,
-            loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-        # check that each type is correctly bound to its list of children
-        self.expect(
-            "frame variable cf_greg_date --raw",
-            substrs=[
-                'year',
-                'month',
-                'day',
-                'hour',
-                'minute',
-                'second'])
-        self.expect(
-            "frame variable cf_range --raw",
-            substrs=[
-                'location',
-                'length'])
-        # check that printing both does not somehow confuse LLDB
-        self.expect(
-            "frame variable  --raw",
-            substrs=[
-                'year',
-                'month',
-                'day',
-                'hour',
-                'minute',
-                'second',
-                'location',
-                'length'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/main.m
deleted file mode 100644 (file)
index 386a458..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#import <Foundation/Foundation.h>
-
-int main (int argc, char const *argv[])
-{
-    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-
-       NSDate *date1 = [NSDate date];
-       CFGregorianDate cf_greg_date = CFAbsoluteTimeGetGregorianDate(CFDateGetAbsoluteTime((CFDateRef)date1), NULL);
-       CFRange cf_range = {4,4};
-
-    [pool release]; // Set breakpoint here.
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/Makefile
deleted file mode 100644 (file)
index 37dd8f4..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-OBJC_SOURCES := main.m
-
-
-
-LD_EXTRAS := -framework Foundation
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/TestRdar11355592.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/TestRdar11355592.py
deleted file mode 100644 (file)
index f9e825a..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-"""
-Test that we do not attempt to make a dynamic type for a 'const char*'
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-@skipUnlessDarwin
-class Rdar10967107TestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # We'll use the test method name as the exe_name.
-        self.exe_name = self.testMethodName
-        # Find the line number to break inside main().
-        self.main_source = "main.m"
-        self.line = line_number(self.main_source, '// Set breakpoint here.')
-
-    def test_charstar_dyntype(self):
-        """Test that we do not attempt to make a dynamic type for a 'const char*'"""
-        d = {'EXE': self.exe_name}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            self.main_source,
-            self.line,
-            num_expected_locations=1,
-            loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-        # check that we correctly see the const char*, even with dynamic types
-        # on
-        self.expect("frame variable -raw-output my_string", substrs=['const char *'])
-        self.expect(
-            "frame variable my_string --raw-output --dynamic-type run-target",
-            substrs=['const char *'])
-        # check that expr also gets it right
-        self.expect("e -R -- my_string", substrs=['const char *'])
-        self.expect("expr -R -d run -- my_string", substrs=['const char *'])
-        # but check that we get the real Foolie as such
-        self.expect("frame variable my_foolie", substrs=['FoolMeOnce *'])
-        self.expect(
-            "frame variable my_foolie --dynamic-type run-target",
-            substrs=['FoolMeOnce *'])
-        # check that expr also gets it right
-        self.expect("expr my_foolie", substrs=['FoolMeOnce *'])
-        self.expect("expr -d run -- my_foolie", substrs=['FoolMeOnce *'])
-        # now check that assigning a true string does not break anything
-        self.runCmd("next")
-        # check that we correctly see the const char*, even with dynamic types
-        # on
-        self.expect("frame variable my_string", substrs=['const char *'])
-        self.expect(
-            "frame variable my_string --dynamic-type run-target",
-            substrs=['const char *'])
-        # check that expr also gets it right
-        self.expect("expr my_string", substrs=['const char *'])
-        self.expect("expr -d run -- my_string", substrs=['const char *'])
-        # but check that we get the real Foolie as such
-        self.expect("frame variable my_foolie", substrs=['FoolMeOnce *'])
-        self.expect(
-            "frame variable my_foolie --dynamic-type run-target",
-            substrs=['FoolMeOnce *'])
-        # check that expr also gets it right
-        self.expect("expr my_foolie", substrs=['FoolMeOnce *'])
-        self.expect("expr -d run -- my_foolie", substrs=['FoolMeOnce *'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/main.m
deleted file mode 100644 (file)
index 09b3b18..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@interface FoolMeOnce : NSObject
-{
-       int32_t value_one; // ivars needed to make 32-bit happy
-       int32_t value_two;
-}
-- (FoolMeOnce *) initWithFirst: (int32_t) first andSecond: (int32_t) second;
-
-@property int32_t value_one;
-@property int32_t value_two;
-
-@end
-
-@implementation FoolMeOnce
-@synthesize value_one;
-@synthesize value_two;
-- (FoolMeOnce *) initWithFirst: (int32_t) first andSecond: (int32_t) second
-{
-  value_one = first;
-  value_two = second;
-  return self;
-}
-@end
-
-int main (int argc, char const *argv[])
-{
-    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-
-    FoolMeOnce *my_foolie = [[FoolMeOnce alloc] initWithFirst: 20 andSecond: 55];
-    const char *my_string = (char *) my_foolie;
-
-    my_string = "Now this is a REAL string..."; // Set breakpoint here.
-
-    [pool release];
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/Makefile
deleted file mode 100644 (file)
index 919000e..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-OBJC_SOURCES := main.m
-
-include Makefile.rules
-
-ifneq (,$(findstring arm,$(ARCH)))
-    LD_EXTRAS = -framework Foundation -framework UIKit
-else
-    LD_EXTRAS = -framework Foundation -framework Cocoa
-endif
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/TestRdar12408181.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/TestRdar12408181.py
deleted file mode 100644 (file)
index 8f262a3..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-"""
-Test that we are able to find out how many children NSWindow has
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-# TODO: The Jenkins testers on OS X fail running this test because they don't
-# have access to WindowServer so NSWindow doesn't work.  We should disable this
-# test if WindowServer isn't available.
-# Note: Simply applying the @skipIf decorator here confuses the test harness
-# and gives a spurious failure.
-@skipUnlessDarwin
-class Rdar12408181TestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # We'll use the test method name as the exe_name.
-        self.exe_name = self.testMethodName
-        # Find the line number to break inside main().
-        self.main_source = "main.m"
-        self.line = line_number(self.main_source, '// Set breakpoint here.')
-
-    def test_nswindow_count(self):
-        """Test that we are able to find out how many children NSWindow has."""
-
-        self.skipTest("Skipping this test due to timeout flakiness")
-
-        d = {'EXE': self.exe_name}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            self.main_source,
-            self.line,
-            num_expected_locations=1,
-            loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-        if self.frame().EvaluateExpression(
-                '(void*)_CGSDefaultConnection()').GetValueAsUnsigned() != 0:
-            window = self.frame().FindVariable("window")
-            window_dynamic = window.GetDynamicValue(lldb.eDynamicCanRunTarget)
-            self.assertTrue(
-                window.GetNumChildren() > 1,
-                "NSWindow (static) only has 1 child!")
-            self.assertTrue(
-                window_dynamic.GetNumChildren() > 1,
-                "NSWindow (dynamic) only has 1 child!")
-            self.assertTrue(
-                window.GetChildAtIndex(0).IsValid(),
-                "NSWindow (static) has an invalid child")
-            self.assertTrue(
-                window_dynamic.GetChildAtIndex(0).IsValid(),
-                "NSWindow (dynamic) has an invalid child")
-        else:
-            self.skipTest('no WindowServer connection')
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/main.m
deleted file mode 100644 (file)
index 858ba2a..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#import <Foundation/Foundation.h>
-#if defined (__i386__) || defined (__x86_64__)
-#import <Cocoa/Cocoa.h>
-#else
-#import <UIKit/UIKit.h>
-#endif
-
-int main (int argc, char const *argv[])
-{
-    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-#if defined (__i386__) || defined (__x86_64__)
-
-    [NSApplication sharedApplication];
-    NSWindow* window = [[NSWindow alloc] initWithContentRect:NSMakeRect(0,0,100,100) styleMask:NSBorderlessWindowMask backing:NSBackingStoreRetained defer:NO];
-    [window setCanHide:YES];
-#else
-    [UIApplication sharedApplication];
-    CGRect rect = { 0, 0, 100, 100};
-    UIWindow* window = [[UIWindow alloc] initWithFrame:rect];
-#endif
-    [pool release]; // Set breakpoint here.
-    return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/Bar.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/Bar.h
deleted file mode 100644 (file)
index 5ee6acb..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@class InternalClass;
-
-@interface Bar : NSObject {
-    @private
-    InternalClass *storage;
-}
-
-- (NSString *)description;
-
-@end
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/Bar.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/Bar.m
deleted file mode 100644 (file)
index 21c3906..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#import "Bar.h"
-
-@interface InternalClass : NSObject {
-    @public
-    NSString *foo;
-    NSString *bar;
-}
-@end
-
-@implementation InternalClass
-@end
-
-@interface Bar () 
-{
-    NSString *_hidden_ivar;
-}
-
-@end
-
-@implementation Bar
-
-- (id)init
-{
-    self = [super init];
-    if (self) {
-        _hidden_ivar = [NSString stringWithFormat:@"%p: @Bar", self];
-    }
-    return self; // Set breakpoint where Bar is an implementation
-}
-
-- (void)dealloc
-{
-    [_hidden_ivar release];
-    [super dealloc];
-}
-
-- (NSString *)description
-{
-    return [_hidden_ivar copyWithZone:NULL];
-}
-
-@end
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/Foo.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/Foo.h
deleted file mode 100644 (file)
index d58da60..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#import <Foundation/Foundation.h>
-
-#import "Bar.h"
-
-@interface Foo : NSObject {
-    Bar *_bar;
-}
-
-- (NSString *)description;
-
-@end
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/Foo.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/Foo.m
deleted file mode 100644 (file)
index bcdeaef..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#import "Foo.h"
-
-@implementation Foo
-
-- (id)init
-{
-    self = [super init];
-    if (self) {
-        _bar = [[Bar alloc] init];
-    }
-    return self; // Set breakpoint where Bar is an interface
-}
-
-- (void)dealloc
-{
-    [_bar release];
-    [super dealloc];
-}
-
-- (NSString *)description
-{
-    return [NSString stringWithFormat:@"%p: @Foo { _bar = %@ }", self, _bar];
-}
-
-@end
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/Makefile
deleted file mode 100644 (file)
index f1498ef..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-OBJC_SOURCES := Bar.m Foo.m main.m
-LD_EXTRAS := -lobjc -framework Foundation
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/TestRealDefinition.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/TestRealDefinition.py
deleted file mode 100644 (file)
index 002bc6c..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-"""Test that types defined in shared libraries work correctly."""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestRealDefinition(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    def test_frame_var_after_stop_at_interface(self):
-        """Test that we can find the implementation for an objective C type"""
-        if self.getArchitecture() == 'i386':
-            self.skipTest("requires modern objc runtime")
-        self.build()
-        self.common_setup()
-
-        line = line_number(
-            'Foo.m', '// Set breakpoint where Bar is an interface')
-        lldbutil.run_break_set_by_file_and_line(
-            self, 'Foo.m', line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Run and stop at Foo
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        self.runCmd("continue", RUN_SUCCEEDED)
-
-        # Run at stop at main
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        # This should display correctly.
-        self.expect(
-            "frame variable foo->_bar->_hidden_ivar",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                "(NSString *)",
-                "foo->_bar->_hidden_ivar = 0x"])
-
-    @skipUnlessDarwin
-    def test_frame_var_after_stop_at_implementation(self):
-        """Test that we can find the implementation for an objective C type"""
-        if self.getArchitecture() == 'i386':
-            self.skipTest("requires modern objc runtime")
-        self.build()
-        self.common_setup()
-
-        line = line_number(
-            'Bar.m', '// Set breakpoint where Bar is an implementation')
-        lldbutil.run_break_set_by_file_and_line(
-            self, 'Bar.m', line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Run and stop at Foo
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        self.runCmd("continue", RUN_SUCCEEDED)
-
-        # Run at stop at main
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        # This should display correctly.
-        self.expect(
-            "frame variable foo->_bar->_hidden_ivar",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                "(NSString *)",
-                "foo->_bar->_hidden_ivar = 0x"])
-
-    def common_setup(self):
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break inside the foo function which takes a bar_ptr argument.
-        line = line_number('main.m', '// Set breakpoint in main')
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.m", line, num_expected_locations=1, loc_exact=True)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/main.m
deleted file mode 100644 (file)
index 8c31dc9..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <stdio.h>
-#include <stdint.h>
-#import <Foundation/Foundation.h>
-#import "Foo.h"
-
-int main (int argc, char const *argv[])
-{
-    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-    Foo *foo = [[Foo alloc] init];
-    NSLog (@"foo is %@", foo); // Set breakpoint in main
-    [pool release];
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/sample/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/sample/Makefile
deleted file mode 100644 (file)
index afecbf9..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-OBJC_SOURCES := main.m
-LD_EXTRAS := -lobjc -framework Foundation
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/sample/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/sample/main.m
deleted file mode 100644 (file)
index 9dffc71..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-#import <Foundation/Foundation.h>
-
-
-@interface MyString : NSObject {
-    NSString *_string;
-    NSDate *_date;
-}
-- (id)initWithNSString:(NSString *)string;
-
-@property (copy) NSString *string;
-@property (readonly,getter=getTheDate) NSDate *date;
-
-- (NSDate *) getTheDate;
-@end
-
-@implementation MyString
-
-@synthesize string = _string;
-@synthesize date = _date;
-
-- (id)initWithNSString:(NSString *)string
-{
-    if (self = [super init])
-    {
-        _string = [NSString stringWithString:string];
-        _date = [NSDate date];            
-    }
-    return self;
-}
-
-- (void) dealloc
-{
-    [_date release];
-    [_string release];
-    [super dealloc];
-}
-
-- (NSDate *) getTheDate
-{
-    return _date;
-}
-
-- (NSString *)description
-{
-    return [_string stringByAppendingFormat:@" with timestamp: %@", _date];
-}
-@end
-
-int main (int argc, char const *argv[])
-{
-    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-    static NSString *g_global_nsstr = @"Howdy";
-    
-    MyString *myStr = [[MyString alloc] initWithNSString: [NSString stringWithFormat:@"string %i", 1]];
-    NSString *str1 = myStr.string;
-    NSString *str2 = [NSString stringWithFormat:@"string %i", 2];
-    NSString *str3 = [NSString stringWithFormat:@"string %i", 3];
-    NSArray *array = [NSArray arrayWithObjects: str1, str2, str3, nil];
-    NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
-                            str1, @"1", 
-                            str2, @"2", 
-                            str3, @"3", 
-                            myStr.date, @"date",
-                            nil];
-
-    id str_id = str1;
-    SEL sel = @selector(length);
-    [pool release];
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/self/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/self/Makefile
deleted file mode 100644 (file)
index 644046c..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-OBJC_SOURCES := main.m
-LD_EXTRAS ?= -framework Foundation
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/self/TestObjCSelf.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/self/TestObjCSelf.py
deleted file mode 100644 (file)
index 81d6b79..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-"""
-Tests that ObjC member variables are available where they should be.
-"""
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjCSelfTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    def test_with_run_command(self):
-        """Test that the appropriate member variables are available when stopped in Objective-C class and instance methods"""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        self.set_breakpoint(line_number('main.m', '// breakpoint 1'))
-        self.set_breakpoint(line_number('main.m', '// breakpoint 2'))
-
-        self.runCmd("process launch", RUN_SUCCEEDED)
-
-        self.expect("expression -- m_a = 2",
-                    startstr="(int) $0 = 2")
-
-        self.runCmd("process continue")
-
-        # This would be disallowed if we enforced const.  But we don't.
-        self.expect("expression -- m_a = 2",
-                    error=True)
-
-        self.expect("expression -- s_a",
-                    startstr="(int) $1 = 5")
-
-    def set_breakpoint(self, line):
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.m", line, num_expected_locations=1, loc_exact=True)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/self/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/self/main.m
deleted file mode 100644 (file)
index 8f4e612..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-//===-- main.m ------------------------------------------*- Objective-C -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#import <Foundation/Foundation.h>
-
-@interface A : NSObject
-{
-    int m_a;
-}
--(id)init;
--(void)accessMember:(int)a;
-+(void)accessStaticMember:(int)a;
-@end
-
-static int s_a = 5;
-
-@implementation A
--(id)init
-{
-    self = [super init];
-    
-    if (self)
-        m_a = 2;
-
-    return self;
-}
-
--(void)accessMember:(int)a
-{
-    m_a = a; // breakpoint 1
-}
-
-+(void)accessStaticMember:(int)a
-{
-    s_a = a; // breakpoint 2
-}
-@end
-
-int main()
-{
-    NSAutoreleasePool *pool = [NSAutoreleasePool alloc];
-    A *my_a = [[A alloc] init];
-    
-    [my_a accessMember:3];
-    [A accessStaticMember:5];
-    
-    [pool release];
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/Makefile
deleted file mode 100644 (file)
index 37dd8f4..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-OBJC_SOURCES := main.m
-
-
-
-LD_EXTRAS := -framework Foundation
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py
deleted file mode 100644 (file)
index 85ad628..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-"""Test that we properly vend children for a single entry NSDictionary"""
-
-
-
-import unittest2
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjCSingleEntryDictionaryTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line = line_number('main.m', '// break here')
-
-    @skipUnlessDarwin
-    @expectedFailureAll(oslist=['watchos'], bugnumber="rdar://problem/34642736") # bug in NSDictionary formatting on watchos
-    def test_single_entry_dict(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break inside the foo function which takes a bar_ptr argument.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        d1 = self.frame().FindVariable("d1")
-        d1.SetPreferSyntheticValue(True)
-        d1.SetPreferDynamicValue(lldb.eDynamicCanRunTarget)
-
-        self.assertTrue(
-            d1.GetNumChildren() == 1,
-            "dictionary has != 1 child elements")
-        pair = d1.GetChildAtIndex(0)
-        pair.SetPreferSyntheticValue(True)
-        pair.SetPreferDynamicValue(lldb.eDynamicCanRunTarget)
-
-        self.assertTrue(
-            pair.GetNumChildren() == 2,
-            "pair has != 2 child elements")
-
-        key = pair.GetChildMemberWithName("key")
-        value = pair.GetChildMemberWithName("value")
-
-        key.SetPreferSyntheticValue(True)
-        key.SetPreferDynamicValue(lldb.eDynamicCanRunTarget)
-        value.SetPreferSyntheticValue(True)
-        value.SetPreferDynamicValue(lldb.eDynamicCanRunTarget)
-
-        self.assertTrue(
-            key.GetSummary() == '@"key"',
-            "key doesn't contain key")
-        self.assertTrue(
-            value.GetSummary() == '@"value"',
-            "value doesn't contain value")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/main.m
deleted file mode 100644 (file)
index be472fd..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#import <Foundation/Foundation.h>
-
-int main() {
-  NSDictionary *d1 = @{@"key" : @"value"};
-  NSLog(@"%@\n", d1); // break here
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/unicode-string/TestUnicodeString.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/unicode-string/TestUnicodeString.py
deleted file mode 100644 (file)
index c9986aa..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(
-    __file__, globals(), [
-        decorators.skipUnlessDarwin])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/unicode-string/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/unicode-string/main.m
deleted file mode 100644 (file)
index e55eb1e..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#import <Foundation/Foundation.h>
-
-int main() {
-  NSLog(@"凸"); //% self.expect("po @\"凹\"", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["凹"])
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/variadic_methods/TestVariadicMethods.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/variadic_methods/TestVariadicMethods.py
deleted file mode 100644 (file)
index 562d9ae..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(
-    __file__, globals(), [
-        decorators.skipIfFreeBSD, decorators.skipIfLinux,
-        decorators.skipIfWindows, decorators.skipIfNetBSD])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/variadic_methods/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/variadic_methods/main.m
deleted file mode 100644 (file)
index 609d783..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-//===-- main.m -------------------------------------------*- Objective-C-*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#import <Foundation/Foundation.h>
-
-@interface VarClass : NSObject
-- (id) lottaArgs: (id) first, ...;
-@end
-
-@implementation VarClass
-- (id) lottaArgs: (id) first, ...
-{
-  return first;
-}
-@end
-
-int
-main()
-{
-  VarClass *my_var = [[VarClass alloc] init];
-  id something = [my_var lottaArgs: @"111", @"222", nil];
-  NSLog (@"%@ - %@", my_var, something); //% self.expect("expression -O -- [my_var lottaArgs:@\"111\", @\"222\", nil]", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["111"])
-  return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/class-name-clash/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/class-name-clash/Makefile
deleted file mode 100644 (file)
index bae88de..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-OBJCXX_SOURCES := main.mm myobject.mm
-include Makefile.rules
-CFLAGS_NO_DEBUG =
-ifeq "$(OS)" "Darwin"
-               CFLAGS_NO_DEBUG += -arch $(ARCH)
-endif
-
-# myobject.o needs to be built without debug info
-myobject.o: myobject.mm
-       $(CXX) $(CFLAGS_NO_DEBUG) -c -o $@ $<
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/class-name-clash/TestNameClash.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/class-name-clash/TestNameClash.py
deleted file mode 100644 (file)
index 19832ae..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-from lldbsuite.test import decorators
-from lldbsuite.test import lldbinline
-
-lldbinline.MakeInlineTest(
-    __file__, globals(), [
-        decorators.skipIfFreeBSD, decorators.skipIfLinux,
-        decorators.skipIfWindows, decorators.skipIfNetBSD])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/class-name-clash/main.mm b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/class-name-clash/main.mm
deleted file mode 100644 (file)
index b74871f..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#import <Foundation/Foundation.h>
-
-namespace NS {
-  class MyObject { int i = 42; };
-  NS::MyObject globalObject;
-}
-
-@interface MyObject: NSObject
-@end
-
-int main ()
-{
-  @autoreleasepool
-  {
-    MyObject *o = [MyObject alloc];
-    return 0; //% self.expect("fr var o", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["(MyObject"]);
-              //% self.expect("fr var globalObject", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["42"]);
-  }
-}
-
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/class-name-clash/myobject.mm b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/class-name-clash/myobject.mm
deleted file mode 100644 (file)
index 051c4e5..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#import <Foundation/Foundation.h>
-
-@interface MyObject : NSObject
-@end
-
-@implementation MyObject
-@end
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/cxx-bridged-po/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/cxx-bridged-po/Makefile
deleted file mode 100644 (file)
index 7cfe4a3..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-OBJCXX_SOURCES := main.mm
-LD_EXTRAS := -lobjc -framework CoreFoundation
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/cxx-bridged-po/TestObjCXXBridgedPO.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/cxx-bridged-po/TestObjCXXBridgedPO.py
deleted file mode 100644 (file)
index 6f3275b..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-import lldbsuite.test.lldbutil as lldbutil
-
-class TestObjCXXBridgedPO(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    def test_bridged_type_po(self):
-        self.build()
-        lldbutil.run_to_source_breakpoint(
-            self, 'break here', lldb.SBFileSpec('main.mm'))
-        self.expect('po num',
-                    "did not get the Objective-C object description",
-                    substrs=['CFNumber', '0x', '42'])
-        pointer_val = str(self.frame().FindVariable('num').GetValue())
-        self.expect('po '+pointer_val,
-                    "did not get the Objective-C object description",
-                    substrs=['CFNumber', '0x', '42'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/cxx-bridged-po/main.mm b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/cxx-bridged-po/main.mm
deleted file mode 100644 (file)
index e376456..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#include <CoreFoundation/CoreFoundation.h>
-
-void stop() {}
-
-int main(int argc, char **argv)
-{
-  int value = 42;
-  CFNumberRef num;
-  num = CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &value);
-  stop(); // break here
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/hide-runtime-values/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/hide-runtime-values/Makefile
deleted file mode 100644 (file)
index 3af75c3..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-OBJCXX_SOURCES := main.mm
-LD_EXTRAS := -lobjc -framework Foundation
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/hide-runtime-values/TestObjCXXHideRuntimeValues.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/hide-runtime-values/TestObjCXXHideRuntimeValues.py
deleted file mode 100644 (file)
index cc6ac20..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-import lldbsuite.test.lldbutil as lldbutil
-import unittest2
-
-
-class TestObjCXXHideRuntimeSupportValues(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfFreeBSD
-    @skipIfLinux
-    @skipIfWindows
-    @skipIfNetBSD
-    def test_hide_runtime_support_values(self):
-        self.build()
-        _, process, _, _ = lldbutil.run_to_source_breakpoint(
-            self, 'break here', lldb.SBFileSpec('main.mm'))
-
-        var_opts = lldb.SBVariablesOptions()
-        var_opts.SetIncludeArguments(True)
-        var_opts.SetIncludeLocals(True)
-        var_opts.SetInScopeOnly(True)
-        var_opts.SetIncludeStatics(False)
-        var_opts.SetIncludeRuntimeSupportValues(False)
-        var_opts.SetUseDynamic(lldb.eDynamicCanRunTarget)
-        values = self.frame().GetVariables(var_opts)
-
-        def shows_var(name):
-            for value in values:
-                if value.name == name:
-                    return True
-            return False
-        # ObjC method.
-        values = self.frame().GetVariables(var_opts)
-        self.assertFalse(shows_var("this"))
-        self.assertTrue(shows_var("self"))
-        self.assertTrue(shows_var("_cmd"))
-        self.assertTrue(shows_var("c"))
-
-        process.Continue()
-        # C++ method.
-        values = self.frame().GetVariables(var_opts)
-        self.assertTrue(shows_var("this"))
-        self.assertFalse(shows_var("self"))
-        self.assertFalse(shows_var("_cmd"))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/hide-runtime-values/main.mm b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/hide-runtime-values/main.mm
deleted file mode 100644 (file)
index c192f38..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#import <Foundation/Foundation.h>
-
-void baz() {}
-
-struct MyClass {
-  void bar() {
-    baz(); // break here
-  }
-};
-
-@interface MyObject : NSObject {}
-- (void)foo;
-@end
-
-@implementation MyObject
-- (void)foo {
-  MyClass c;
-  c.bar(); // break here
-}
-@end
-
-int main (int argc, char const *argv[]) {
-    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-    id obj = [MyObject new];
-    [obj foo];
-    [pool release];
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/objcxx-ivar-vector/TestIvarVector.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/objcxx-ivar-vector/TestIvarVector.py
deleted file mode 100644 (file)
index 19832ae..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-from lldbsuite.test import decorators
-from lldbsuite.test import lldbinline
-
-lldbinline.MakeInlineTest(
-    __file__, globals(), [
-        decorators.skipIfFreeBSD, decorators.skipIfLinux,
-        decorators.skipIfWindows, decorators.skipIfNetBSD])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/objcxx-ivar-vector/main.mm b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/objcxx-ivar-vector/main.mm
deleted file mode 100644 (file)
index 36eda1d..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#import <Foundation/Foundation.h>
-
-#include <vector>
-
-@interface MyElement : NSObject {
-}
-@end
-
-@interface MyClass : NSObject {
-  std::vector<MyElement *> elements;
-};
-
--(void)doSomething;
-
-@end
-
-@implementation MyClass
-
--(void)doSomething
-{
-  NSLog(@"Hello"); //% self.expect("expression -- elements", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["vector", "MyElement"]);
-}
-
-@end
-
-int main ()
-{
-  @autoreleasepool
-  {
-    MyClass *c = [MyClass alloc];
-    [c doSomething];
-  }
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/sample/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/sample/Makefile
deleted file mode 100644 (file)
index 3af75c3..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-OBJCXX_SOURCES := main.mm
-LD_EXTRAS := -lobjc -framework Foundation
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/sample/main.mm b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objcxx/sample/main.mm
deleted file mode 100644 (file)
index c9a2172..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-#import <Foundation/Foundation.h>
-#include <iostream>
-
-@interface MyString : NSObject {
-    NSString *_string;
-    NSDate *_date;
-}
-- (id)initWithNSString:(NSString *)string;
-
-@property (copy) NSString *string;
-@property (readonly,getter=getTheDate) NSDate *date;
-
-- (NSDate *) getTheDate;
-@end
-
-@implementation MyString
-
-@synthesize string = _string;
-@synthesize date = _date;
-
-- (id)initWithNSString:(NSString *)string
-{
-    if (self = [super init])
-    {
-        _string = [NSString stringWithString:string];
-        _date = [NSDate date];            
-    }
-    return self;
-}
-
-- (void) dealloc
-{
-    [_date release];
-    [_string release];
-    [super dealloc];
-}
-
-- (NSDate *) getTheDate
-{
-    return _date;
-}
-
-- (NSString *)description
-{
-    return [_string stringByAppendingFormat:@" with timestamp: %@", _date];
-}
-@end
-
-int main (int argc, char const *argv[])
-{
-    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-    static NSString *g_global_nsstr = @"Howdy";
-    
-    MyString *myStr = [[MyString alloc] initWithNSString: [NSString stringWithFormat:@"string %i", 1]];
-    NSString *str1 = myStr.string;
-    NSString *str2 = [NSString stringWithFormat:@"string %i", 2];
-    NSString *str3 = [NSString stringWithFormat:@"string %i", 3];
-    NSArray *array = [NSArray arrayWithObjects: str1, str2, str3, nil];
-    NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
-                            str1, @"1", 
-                            str2, @"2", 
-                            str3, @"3", 
-                            myStr.date, @"date",
-                            nil];
-
-    id str_id = str1;
-    SEL sel = @selector(length);
-    [pool release];
-    std::cout << "Hello, objc++!\n";
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/add-symbols/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/add-symbols/Makefile
deleted file mode 100644 (file)
index 98042d6..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-CXX_SOURCES := main.cpp
-LD_EXTRAS := -Wl,--build-id=none
-
-all: stripped.out
-
-stripped.out : a.out
-       $(OBJCOPY) --remove-section=.note.gnu.build-id --remove-section=.gnu_debuglink --strip-debug $< $@
-
-clean::
-       $(RM) stripped.out
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/add-symbols/TestTargetSymbolsAddCommand.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/add-symbols/TestTargetSymbolsAddCommand.py
deleted file mode 100644 (file)
index 33975d2..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-""" Testing explicit symbol loading via target symbols add. """
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TargetSymbolsAddCommand(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        TestBase.setUp(self)
-        self.source = 'main.c'
-
-    @no_debug_info_test  # Prevent the genaration of the dwarf version of this test
-    @skipUnlessPlatform(['linux'])
-    def test_target_symbols_add(self):
-        """Test that 'target symbols add' can load the symbols
-        even if gnu.build-id and gnu_debuglink are not present in the module.
-        Similar to test_add_dsym_mid_execution test for macos."""
-        self.build()
-        exe = self.getBuildArtifact("stripped.out")
-
-        self.target = self.dbg.CreateTarget(exe)
-        self.assertTrue(self.target, VALID_TARGET)
-
-        main_bp = self.target.BreakpointCreateByName("main", "stripped.out")
-        self.assertTrue(main_bp, VALID_BREAKPOINT)
-
-        self.process = self.target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(self.process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        self.assertTrue(self.process.GetState() == lldb.eStateStopped,
-                        STOPPED_DUE_TO_BREAKPOINT)
-
-        exe_module = self.target.GetModuleAtIndex(0)
-
-        # Check that symbols are not loaded and main.c is not know to be
-        # the source file.
-        self.expect("frame select", substrs=['main.c'], matching=False)
-
-        # Tell LLDB that a.out has symbols for stripped.out
-        self.runCmd("target symbols add -s %s %s" %
-                    (exe, self.getBuildArtifact("a.out")))
-
-        # Check that symbols are now loaded and main.c is in the output.
-        self.expect("frame select", substrs=['main.c'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/add-symbols/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/add-symbols/main.c
deleted file mode 100644 (file)
index 5a09157..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <stdio.h>
-static int var = 5;
-int main() {
-  printf("%p is %d\n", &var, var);
-  return ++var;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/builtin_trap/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/builtin_trap/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/builtin_trap/TestBuiltinTrap.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/builtin_trap/TestBuiltinTrap.py
deleted file mode 100644 (file)
index 22de873..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-"""
-Test lldb ability to unwind a stack with a function containing a call to the
-'__builtin_trap' intrinsic, which GCC (4.6) encodes to an illegal opcode.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class BuiltinTrapTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    # gcc generates incorrect linetable
-    @expectedFailureAll(archs="arm", compiler="gcc", triple=".*-android")
-    @expectedFailureAll(oslist=['linux'], archs=['arm', 'aarch64'])
-    @skipIfWindows
-    def test_with_run_command(self):
-        """Test that LLDB handles a function with __builtin_trap correctly."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(self, "main.cpp", self.line,
-                                                num_expected_locations=1,
-                                                loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # print backtrace, expect both 'bar' and 'main' functions to be listed
-        self.expect('bt', substrs=['bar', 'main'])
-
-        # go up one frame
-        self.runCmd("up", RUN_SUCCEEDED)
-
-        # evaluate a local
-        self.expect('p foo', substrs=['= 5'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/builtin_trap/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/builtin_trap/main.cpp
deleted file mode 100644 (file)
index f005e69..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-void bar(int const *foo) {
-  __builtin_trap(); // Set break point at this line.
-}
-
-int main() {
-  int foo = 5;
-  bar(&foo);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/mix-dwo-and-regular-objects/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/mix-dwo-and-regular-objects/Makefile
deleted file mode 100644 (file)
index 4f3dd56..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-C_SOURCES := a.c b.c
-a.o: CFLAGS_EXTRAS := -gsplit-dwarf
-
-include Makefile.rules
-
-.PHONY: clean
-clean::
-       $(RM) -f a.dwo a.o b.o main
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/mix-dwo-and-regular-objects/TestMixedDwarfBinary.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/mix-dwo-and-regular-objects/TestMixedDwarfBinary.py
deleted file mode 100644 (file)
index 7c7c76d..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-""" Testing debugging of a binary with "mixed" dwarf (with/without fission). """
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestMixedDwarfBinary(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test  # Prevent the genaration of the dwarf version of this test
-    @add_test_categories(["dwo"])
-    @skipUnlessPlatform(["linux"])
-    def test_mixed_dwarf(self):
-        """Test that 'frame variable' works
-        for the executable built from two source files compiled
-        with/whithout -gsplit-dwarf correspondingly."""
-
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        self.target = self.dbg.CreateTarget(exe)
-        self.assertTrue(self.target, VALID_TARGET)
-
-        main_bp = self.target.BreakpointCreateByName("g", "a.out")
-        self.assertTrue(main_bp, VALID_BREAKPOINT)
-
-        self.process = self.target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(self.process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        self.assertTrue(self.process.GetState() == lldb.eStateStopped,
-                        STOPPED_DUE_TO_BREAKPOINT)
-
-        frame = self.process.GetThreadAtIndex(0).GetFrameAtIndex(0)
-        x = frame.FindVariable("x")
-        self.assertTrue(x.IsValid(), "x is not valid")
-        y = frame.FindVariable("y")
-        self.assertTrue(y.IsValid(), "y is not valid")
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/mix-dwo-and-regular-objects/a.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/mix-dwo-and-regular-objects/a.c
deleted file mode 100644 (file)
index 047e78a..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-int f() {
-  return 1;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/mix-dwo-and-regular-objects/b.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/mix-dwo-and-regular-objects/b.c
deleted file mode 100644 (file)
index d79970e..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-extern int f();
-
-void g() {
-  int y = 14;
-  int x = f();
-}
-
-int main() {
-  g();
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/sepdebugsymlink/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/sepdebugsymlink/Makefile
deleted file mode 100644 (file)
index a290c8c..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-C_SOURCES := main.c
-
-all: dirsymlink
-
-dirreal: a.out
-       $(RM) -r $@
-       mkdir $@
-       $(OBJCOPY) --only-keep-debug $< $@/stripped.debug
-       $(OBJCOPY) --strip-all --add-gnu-debuglink=$@/stripped.debug $< $@/stripped.out
-
-dirsymlink: dirreal
-       $(RM) -r $@
-       mkdir $@
-       ln -s ../$</stripped.out $@/stripped.symlink
-
-clean::
-       $(RM) -r dirreal dirsymlink
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/sepdebugsymlink/TestTargetSymbolsSepDebugSymlink.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/sepdebugsymlink/TestTargetSymbolsSepDebugSymlink.py
deleted file mode 100644 (file)
index 7338332..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-""" Testing separate debug info loading for base binary with a symlink. """
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestTargetSymbolsSepDebugSymlink(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test  # Prevent the genaration of the dwarf version of this test
-    @skipUnlessPlatform(['linux'])
-    @skipIf(hostoslist=["windows"])
-    @skipIfRemote # llvm.org/pr36237
-    def test_target_symbols_sepdebug_symlink_case(self):
-        self.build()
-        exe = self.getBuildArtifact("dirsymlink/stripped.symlink")
-
-        lldbutil.run_to_name_breakpoint(self, "main", exe_name = exe)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/sepdebugsymlink/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/sepdebugsymlink/main.c
deleted file mode 100644 (file)
index 4cce7f6..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-int main() {
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/thread/create_during_instruction_step/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/thread/create_during_instruction_step/Makefile
deleted file mode 100644 (file)
index 566938c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-ENABLE_THREADS := YES
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py
deleted file mode 100644 (file)
index c4d6461..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-"""
-This tests that we do not lose control of the inferior, while doing an instruction-level step
-over a thread creation instruction.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class CreateDuringInstructionStepTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @skipUnlessPlatform(['linux'])
-    @expectedFailureAndroid('llvm.org/pr24737', archs=['arm'])
-    @expectedFailureAll(
-        oslist=["linux"],
-        archs=["arm"],
-        bugnumber="llvm.org/pr24737")
-    def test_step_inst(self):
-        self.build(dictionary=self.getBuildFlags())
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target and target.IsValid(), "Target is valid")
-
-        # This should create a breakpoint in the stepping thread.
-        breakpoint = target.BreakpointCreateByName("main")
-        self.assertTrue(
-            breakpoint and breakpoint.IsValid(),
-            "Breakpoint is valid")
-
-        # Run the program.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process and process.IsValid(), PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        self.assertEqual(
-            process.GetState(),
-            lldb.eStateStopped,
-            PROCESS_STOPPED)
-
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-            process, breakpoint)
-        self.assertEqual(len(threads), 1, STOPPED_DUE_TO_BREAKPOINT)
-
-        thread = threads[0]
-        self.assertTrue(thread and thread.IsValid(), "Thread is valid")
-
-        # Make sure we see only one threads
-        self.assertEqual(
-            process.GetNumThreads(),
-            1,
-            'Number of expected threads and actual threads do not match.')
-
-        # Keep stepping until we see the thread creation
-        while process.GetNumThreads() < 2:
-            thread.StepInstruction(False)
-            self.assertEqual(
-                process.GetState(),
-                lldb.eStateStopped,
-                PROCESS_STOPPED)
-            self.assertEqual(
-                thread.GetStopReason(),
-                lldb.eStopReasonPlanComplete,
-                "Step operation succeeded")
-            if self.TraceOn():
-                self.runCmd("disassemble --pc")
-
-        if self.TraceOn():
-            self.runCmd("thread list")
-
-        # We have successfully caught thread creation. Now just run to
-        # completion
-        process.Continue()
-
-        # At this point, the inferior process should have exited.
-        self.assertEqual(process.GetState(), lldb.eStateExited, PROCESS_EXITED)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/thread/create_during_instruction_step/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/linux/thread/create_during_instruction_step/main.cpp
deleted file mode 100644 (file)
index 4488f23..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// This file deliberately uses low level linux-specific API for thread creation because:
-// - instruction-stepping over thread creation using higher-level functions was very slow
-// - it was also unreliable due to single-stepping bugs unrelated to this test
-// - some threading libraries do not create or destroy threads when we would expect them to
-
-#include <sched.h>
-
-#include <atomic>
-#include <cstdio>
-
-enum { STACK_SIZE = 0x2000 };
-
-static uint8_t child_stack[STACK_SIZE];
-
-pid_t child_tid;
-
-std::atomic<bool> flag(false);
-
-int thread_main(void *)
-{
-    while (! flag) // Make sure the thread does not exit prematurely
-        ;
-
-    return 0;
-}
-
-int main ()
-{
-    int ret = clone(thread_main,
-            child_stack + STACK_SIZE/2, // Don't care whether the stack grows up or down,
-                                        // just point to the middle
-            CLONE_CHILD_CLEARTID | CLONE_FILES | CLONE_FS | CLONE_PARENT_SETTID |
-            CLONE_SIGHAND | CLONE_SYSVSEM | CLONE_THREAD | CLONE_VM,
-            nullptr, // thread_main argument
-            &child_tid);
-
-    if (ret == -1)
-    {
-        perror("clone");
-        return 1;
-    }
-
-    flag = true;
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lock.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lock.py
deleted file mode 100644 (file)
index e9970e1..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-"""
-Interprocess mutex based on file locks
-"""
-
-import fcntl
-
-
-class Lock:
-
-    def __init__(self, filename):
-        self.filename = filename
-        # This will create it if it does not exist already
-        unbuffered = 0
-        self.handle = open(filename, 'a+', unbuffered)
-
-    def acquire(self):
-        fcntl.flock(self.handle, fcntl.LOCK_EX)
-
-    # will throw IOError if unavailable
-    def try_acquire(self):
-        fcntl.flock(self.handle, fcntl.LOCK_NB | fcntl.LOCK_EX)
-
-    def release(self):
-        fcntl.flock(self.handle, fcntl.LOCK_UN)
-
-    def __del__(self):
-        self.handle.close()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/Inputs/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/Inputs/main.c
deleted file mode 100644 (file)
index 41a6a46..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-void relative();
-
-int main()
-{
-  relative();
-  // Hello Absolute!
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/Inputs/relative.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/Inputs/relative.c
deleted file mode 100644 (file)
index 0233183..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-void stop() {}
-void relative() {
-  stop();
-  // Hello Relative!
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/Makefile
deleted file mode 100644 (file)
index 8c82c73..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-BOTDIR = $(BUILDDIR)/buildbot
-USERDIR = $(BUILDDIR)/user
-C_SOURCES = $(BOTDIR)/main.c
-LD_EXTRAS = $(BOTDIR)/relative.o
-
-include Makefile.rules
-
-$(EXE): relative.o
-relative.o: $(BOTDIR)/relative.c
-       cd $(BOTDIR) && $(CC) -c $(CFLAGS) -o $@ relative.c
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/TestDSYMSourcePathRemapping.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/TestDSYMSourcePathRemapping.py
deleted file mode 100644 (file)
index 0f5daf5..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-import lldb
-from lldbsuite.test.decorators import *
-import lldbsuite.test.lldbtest as lldbtest
-import lldbsuite.test.lldbutil as lldbutil
-import os
-import unittest2
-
-
-class TestDSYMSourcePathRemapping(lldbtest.TestBase):
-
-    mydir = lldbtest.TestBase.compute_mydir(__file__)
-
-    def build(self):
-        botdir = self.getBuildArtifact('buildbot')
-        userdir = self.getBuildArtifact('user')
-        inputs = self.getSourcePath('Inputs')
-        lldbutil.mkdir_p(botdir)
-        lldbutil.mkdir_p(userdir)
-        import shutil
-        for f in ['main.c', 'relative.c']:
-            shutil.copyfile(os.path.join(inputs, f), os.path.join(botdir, f))
-            shutil.copyfile(os.path.join(inputs, f), os.path.join(userdir, f))
-
-        super(TestDSYMSourcePathRemapping, self).build()
-
-        # Remove the build sources.
-        self.assertTrue(os.path.isdir(botdir))
-        shutil.rmtree(botdir)
-
-        # Create a plist.
-        import subprocess
-        dsym = self.getBuildArtifact('a.out.dSYM')
-        uuid = subprocess.check_output(["/usr/bin/dwarfdump", "--uuid", dsym]
-                                      ).decode("utf-8").split(" ")[1]
-        import re
-        self.assertTrue(re.match(r'[0-9a-fA-F-]+', uuid))
-        plist = os.path.join(dsym, 'Contents', 'Resources', uuid + '.plist')
-        with open(plist, 'w') as f:
-            f.write('<?xml version="1.0" encoding="UTF-8"?>\n')
-            f.write('<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\n')
-            f.write('<plist version="1.0">\n')
-            f.write('<dict>\n')
-            f.write('  <key>DBGSourcePathRemapping</key>\n')
-            f.write('  <dict>\n')
-            f.write('    <key>' + botdir + '</key>\n')
-            f.write('    <string>' + userdir + '</string>\n')
-            f.write('  </dict>\n')
-            f.write('</dict>\n')
-            f.write('</plist>\n')
-
-
-    @skipIf(debug_info=no_match("dsym"))
-    def test(self):
-        self.build()
-
-        target, process, _, _ = lldbutil.run_to_name_breakpoint(
-            self, 'main')
-        self.expect("source list -n main", substrs=["Hello Absolute"])
-        bkpt = target.BreakpointCreateByName('relative')
-        lldbutil.continue_to_breakpoint(process, bkpt)
-        self.expect("source list -n relative", substrs=["Hello Relative"])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/add-dsym/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/add-dsym/Makefile
deleted file mode 100644 (file)
index 4e1ec22..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-C_SOURCES = main.c
-
-include Makefile.rules
-
-all: a.out.dSYM hide.app/Contents/a.out.dSYM
-
-hide.app/Contents/a.out.dSYM:
-       mkdir hide.app
-       mkdir hide.app/Contents
-       mv a.out.dSYM hide.app/Contents
-       strip -x a.out
-ifneq "$(CODESIGN)" ""
-       $(CODESIGN) -fs - a.out
-endif
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py
deleted file mode 100644 (file)
index df9716f..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-"""Test that the 'add-dsym', aka 'target symbols add', succeeds in the middle of debug session."""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-@skipUnlessDarwin
-class AddDsymMidExecutionCommandCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        self.source = 'main.c'
-
-    @no_debug_info_test  # Prevent the genaration of the dwarf version of this test
-    def test_add_dsym_mid_execution(self):
-        """Test that add-dsym mid-execution loads the symbols at the right place for a slid binary."""
-        self.buildDefault(dictionary={'MAKE_DSYM':'YES'})
-        exe = self.getBuildArtifact("a.out")
-
-        self.target = self.dbg.CreateTarget(exe)
-        self.assertTrue(self.target, VALID_TARGET)
-
-        main_bp = self.target.BreakpointCreateByName("main", "a.out")
-        self.assertTrue(main_bp, VALID_BREAKPOINT)
-
-        self.runCmd("settings set target.disable-aslr false")
-        self.process = self.target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(self.process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        self.assertTrue(self.process.GetState() == lldb.eStateStopped,
-                        STOPPED_DUE_TO_BREAKPOINT)
-
-        self.runCmd("add-dsym " +
-                    self.getBuildArtifact("hide.app/Contents/a.out.dSYM"))
-
-        self.expect("frame select",
-                    substrs=['a.out`main at main.c'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/add-dsym/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/add-dsym/main.c
deleted file mode 100644 (file)
index da9e09f..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <stdio.h>
-static int var = 5;
-int main ()
-{
-    printf ("%p is %d\n", &var, var); // break on this line
-    return ++var;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/Makefile
deleted file mode 100644 (file)
index b880d9e..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-C_SOURCES := main.c
-
-# Make an archive that has two object files with the same name, but
-# different timestamps. Do it all in one rule so that the timestamps
-# can be controlled without confusing Make.
-libfoo.a: a.c sub1/a.c
-       $(CC) $(CFLAGS) -c $(<D)/a.c -o a.o
-       mkdir -p sub1
-       $(CC) $(CFLAGS) -c $(<D)/sub1/a.c -o sub1/a.o
-       touch -t '198001010000.00' a.o
-       touch -t '198001010000.01' sub1/a.o
-       $(AR) $(ARFLAGS) $@ a.o sub1/a.o
-       rm a.o sub1/a.o
-
-include Makefile.rules
-
-# Needs to come after include
-OBJECTS += libfoo.a
-$(EXE) : libfoo.a
-.DEFAULT_GOAL := $(EXE)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/TestDuplicateMembers.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/TestDuplicateMembers.py
deleted file mode 100644 (file)
index 3fecb3b..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-"""Test breaking inside functions defined within a BSD archive file libfoo.a."""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class BSDArchivesTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24527.  Makefile.rules doesn't know how to build static libs on Windows")
-    def test(self):
-        """Break inside a() and b() defined within libfoo.a."""
-        self.build()
-
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break on a() and b() symbols
-        lldbutil.run_break_set_by_symbol(
-            self, "a", sym_exact=True)
-        lldbutil.run_break_set_by_symbol(
-            self, "b", sym_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Break at a(int) first.
-        self.expect("frame variable", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['(int) arg = 1'])
-        self.expect("frame variable __a_global", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['(int) __a_global = 1'])
-
-        # Continue the program, we should break at b(int) next.
-        self.runCmd("continue")
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-        self.expect("frame variable", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['(int) arg = 2'])
-        self.expect("frame variable __b_global", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs=['(int) __b_global = 2'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/a.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/a.c
deleted file mode 100644 (file)
index 4d57868..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-//===-- a.c -----------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-int __a_global = 1;
-
-int a(int arg) {
-    int result = arg + __a_global;
-    return result;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/main.c
deleted file mode 100644 (file)
index 1525a1a..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-extern int a(int);
-extern int b(int);
-int main (int argc, char const *argv[])
-{
-    printf ("a(1) returns %d\n", a(1));
-    printf ("b(2) returns %d\n", b(2));
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/sub1/a.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/sub1/a.c
deleted file mode 100644 (file)
index e90218c..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-//===-- a.c -----------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-static int __b_global = 2;
-
-int b(int arg) {
-    int result = arg + __b_global;
-    return result;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/Makefile
deleted file mode 100644 (file)
index 68012d2..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-SRCDIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))/
-CC ?= clang
-
-ifeq "$(ARCH)" ""
-     ARCH = x86_64
-endif
-
-CFLAGS ?= -g -O0 -arch $(ARCH)
-
-all:  TestApp.app/Contents/MacOS/TestApp
-
-TestApp.app/Contents/MacOS/TestApp: $(SRCDIR)/main.c
-       $(CC) $(CFLAGS) -o TestApp $<
-       rm -rf TestApp.app
-       cp -r $(SRCDIR)/TestApp.app .
-       mv TestApp TestApp.app/Contents/MacOS/TestApp
-       mv TestApp.dSYM TestApp.app.dSYM
-
-clean:
-       rm -rf TestApp.app/Contents/MacOS/TestApp TestApp.app.dSYM
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/TestApp.app/Contents/Info.plist b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/TestApp.app/Contents/Info.plist
deleted file mode 100644 (file)
index a47f72b..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-       <key>CFBundleDevelopmentRegion</key>
-       <string>en</string>
-       <key>CFBundleExecutable</key>
-       <string>TestApp</string>
-       <key>CFBundleIdentifier</key>
-       <string>com.lldb.TestApp</string>
-       <key>CFBundleInfoDictionaryVersion</key>
-       <string>6.0</string>
-       <key>CFBundleName</key>
-       <string>TestApp</string>
-       <key>CFBundlePackageType</key>
-       <string>APPL</string>
-       <key>CFBundleShortVersionString</key>
-       <string>1.0</string>
-       <key>CFBundleSupportedPlatforms</key>
-       <array>
-               <string>MacOSX</string>
-               </array>
-               <key>CFBundleVersion</key>
-               <string>1</string>
-               <key>LSMinimumSystemVersion</key>
-               <string>10.8</string>
-               <key>NSHumanReadableCopyright</key>
-               <string>Copyright Â© 2018 Jim Ingham. All rights reserved.</string>
-</dict>
-</plist>
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/TestApp.app/Contents/MacOS/.empty b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/TestApp.app/Contents/MacOS/.empty
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/TestApp.app/Contents/Resources/.empty b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/TestApp.app/Contents/Resources/.empty
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/TestFindAppInBundle.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/TestFindAppInBundle.py
deleted file mode 100644 (file)
index 99d21f0..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-"""
-Make sure we can find the binary inside an app bundle.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-import lldbsuite.test.lldbutil as lldbutil
-import lldbsuite.test.lldbplatformutil as lldbplatformutil
-from lldbsuite.test.lldbtest import *
-
-@decorators.skipUnlessDarwin
-class FindAppInMacOSAppBundle(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_find_app_in_bundle(self):
-        """There can be many tests in a test case - describe this test here."""
-        self.build()
-        self.main_source_file = lldb.SBFileSpec("main.c")
-        self.find_app_in_bundle_test()
-
-    def find_app_in_bundle_test(self):
-        """This reads in the .app, makes sure we get the right binary and can run it."""
-
-        # This function starts a process, "a.out" by default, sets a source
-        # breakpoint, runs to it, and returns the thread, process & target.
-        # It optionally takes an SBLaunchOption argument if you want to pass
-        # arguments or environment variables.
-        exe = self.getBuildArtifact("TestApp.app")
-        error = lldb.SBError()
-        target = self.dbg.CreateTarget(exe, None, None, False, error)
-        self.assertTrue(error.Success(), "Could not create target: %s"%(error.GetCString()))
-        self.assertTrue(target.IsValid(), "Target: TestApp.app is not valid.")
-        exe_module_spec = target.GetExecutable()
-        self.assertTrue(exe_module_spec.GetFilename(), "TestApp")
-
-        bkpt = target.BreakpointCreateBySourceRegex("Set a breakpoint here", self.main_source_file)
-        self.assertTrue(bkpt.GetNumLocations() == 1, "Couldn't set a breakpoint in the main app")
-
-        if lldbplatformutil.getPlatform() == "macosx":
-            launch_info = lldb.SBLaunchInfo(None)
-            launch_info.SetWorkingDirectory(self.get_process_working_directory())
-
-            error = lldb.SBError()
-            process = target.Launch(launch_info, error)
-
-            self.assertTrue(process.IsValid(), "Could not create a valid process for TestApp: %s"%(error.GetCString()))
-
-            # Frame #0 should be at our breakpoint.
-            threads = lldbutil.get_threads_stopped_at_breakpoint(process, bkpt)
-
-            self.assertTrue(len(threads) == 1, "Expected 1 thread to stop at breakpoint, %d did."%(len(threads)))
-
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/main.c
deleted file mode 100644 (file)
index 27a0cdc..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <stdio.h>
-
-int
-main()
-{
-  printf("Set a breakpoint here.\n");
-  return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/Makefile
deleted file mode 100644 (file)
index 658c9a9..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-SRCDIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))/
-CC ?= clang
-
-ifeq "$(ARCH)" ""
-       ARCH = x86_64
-endif
-
-CFLAGS ?= -g -O0 -arch $(ARCH)
-
-all: clean
-       $(CC) $(CFLAGS) -dynamiclib -o com.apple.sbd $(SRCDIR)/bundle.c
-       mkdir com.apple.sbd.xpc
-       mv com.apple.sbd com.apple.sbd.xpc/
-       mkdir -p com.apple.sbd.xpc.dSYM/Contents/Resources/DWARF
-       mv com.apple.sbd.dSYM/Contents/Resources/DWARF/com.apple.sbd com.apple.sbd.xpc.dSYM/Contents/Resources/DWARF/
-       rm -rf com.apple.sbd.dSYM
-       mkdir hide.app
-       tar cf - com.apple.sbd.xpc com.apple.sbd.xpc.dSYM | ( cd hide.app;tar xBpf -)
-       $(CC) $(CFLAGS) -o find-bundle-with-dots-in-fn $(SRCDIR)/main.c
-
-clean:
-       rm -rf a.out a.out.dSYM hide.app com.apple.sbd com.apple.sbd.dSYM com.apple.sbd.xpc com.apple.sbd.xpc.dSYM find-bundle-with-dots-in-fn find-bundle-with-dots-in-fn.dSYM
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/TestBundleWithDotInFilename.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/TestBundleWithDotInFilename.py
deleted file mode 100644 (file)
index 6b38d3c..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-"""Test that a dSYM can be found when a binary is in a bundle hnd has dots in the filename."""
-
-
-#import unittest2
-import os.path
-from time import sleep
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-exe_name = 'find-bundle-with-dots-in-fn'  # must match Makefile
-
-class BundleWithDotInFilenameTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfRemote
-    @skipUnlessDarwin
-    # This test is explicitly a dSYM test, it doesn't need to run for any other config, but
-    # the following doesn't work, fixme.
-    # @skipIf(debug_info=no_match(["dsym"]), bugnumber="This test is looking explicitly for a dSYM")
-
-    def setUp(self):
-        TestBase.setUp(self)
-        self.source = 'main.c'
-
-    def tearDown(self):
-        # Destroy process before TestBase.tearDown()
-        self.dbg.GetSelectedTarget().GetProcess().Destroy()
-
-        # Call super's tearDown().
-        TestBase.tearDown(self)
-
-    def test_attach_and_check_dsyms(self):
-        """Test attach to binary, see if the bundle dSYM is found"""
-        exe = self.getBuildArtifact(exe_name)
-        self.build()
-        os.chdir(self.getBuildDir());
-        popen = self.spawnSubprocess(exe)
-        self.addTearDownHook(self.cleanupSubprocesses)
-
-        # Give the inferior time to start up, dlopen a bundle, remove the bundle it linked in
-        sleep(5)
-
-        # Since the library that was dlopen()'ed is now removed, lldb will need to find the
-        # binary & dSYM via target.exec-search-paths
-        settings_str = "settings set target.exec-search-paths " + self.get_process_working_directory() + "/hide.app"
-        self.runCmd(settings_str)
-
-        self.runCmd("process attach -p " + str(popen.pid))
-
-        target = self.dbg.GetSelectedTarget()
-        self.assertTrue(target.IsValid(), 'Should have a valid Target after attaching to process')
-
-        setup_complete = target.FindFirstGlobalVariable("setup_is_complete")
-        self.assertTrue(setup_complete.GetValueAsUnsigned() == 1, 'Check that inferior process has completed setup')
-
-        # Find the bundle module, see if we found the dSYM too (they're both in "hide.app")
-        i = 0
-        while i < target.GetNumModules():
-            mod = target.GetModuleAtIndex(i)
-            if mod.GetFileSpec().GetFilename() == 'com.apple.sbd':
-                dsym_name = mod.GetSymbolFileSpec().GetFilename()
-                self.assertTrue (dsym_name == 'com.apple.sbd', "Check that we found the dSYM for the bundle that was loaded")
-            i=i+1
-        os.chdir(self.getSourceDir());
-
-if __name__ == '__main__':
-    unittest.main()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/bundle.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/bundle.c
deleted file mode 100644 (file)
index c100f9a..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-int foo ()
-{
-    return 5;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/main.c
deleted file mode 100644 (file)
index 30761eb..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <dlfcn.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-int setup_is_complete = 0;
-
-int main()
-{
-
-    void *handle = dlopen ("com.apple.sbd.xpc/com.apple.sbd", RTLD_NOW);
-    if (handle)
-    {
-        if (dlsym(handle, "foo"))
-        {
-            system ("/bin/rm -rf com.apple.sbd.xpc com.apple.sbd.xpc.dSYM");
-            setup_is_complete = 1;
-
-            // At this point we want lldb to attach to the process.  If lldb attaches
-            // before we've removed the dlopen'ed bundle, lldb will find the bundle
-            // at its actual filepath and not have to do any tricky work, invalidating
-            // the test.
-
-            for (int loop_limiter = 0; loop_limiter < 100; loop_limiter++)
-                sleep (1);
-        }
-    }
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/Info.plist b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/Info.plist
deleted file mode 100644 (file)
index 82e1711..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-       <key>BuildMachineOSBuild</key>
-       <string>16B2657</string>
-       <key>CFBundleDevelopmentRegion</key>
-       <string>en</string>
-       <key>CFBundleExecutable</key>
-       <string>MyFramework</string>
-       <key>CFBundleIdentifier</key>
-       <string>com.apple.test.framework</string>
-       <key>CFBundleInfoDictionaryVersion</key>
-       <string>6.0</string>
-       <key>CFBundleName</key>
-       <string>MyFramework</string>
-       <key>CFBundlePackageType</key>
-       <string>FMWK</string>
-       <key>CFBundleShortVersionString</key>
-       <string>113</string>
-       <key>CFBundleSignature</key>
-       <string>????</string>
-       <key>CFBundleSupportedPlatforms</key>
-       <array>
-               <string>MacOSX</string>
-       </array>
-       <key>CFBundleVersion</key>
-       <string>113</string>
-       <key>DTCompiler</key>
-       <string>com.apple.compilers.llvm.clang.1_0</string>
-       <key>DTPlatformBuild</key>
-       <string>9L120i</string>
-       <key>DTPlatformVersion</key>
-       <string>GM</string>
-       <key>DTSDKBuild</key>
-       <string>17A261x</string>
-       <key>DTSDKName</key>
-       <string>macosx10.13</string>
-       <key>DTXcode</key>
-       <string>0900</string>
-       <key>DTXcodeBuild</key>
-       <string>9L120i</string>
-</dict>
-</plist>
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/Makefile
deleted file mode 100644 (file)
index b2a66c2..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-SRCDIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))/
-CC ?= clang
-
-ifeq "$(ARCH)" ""
-       ARCH = x86_64
-endif
-
-CFLAGS ?= -g -O0 -arch $(ARCH)
-
-all: clean
-       $(CC) $(CFLAGS) -install_name $(shell pwd)/MyFramework.framework/Versions/A/MyFramework -dynamiclib -o MyFramework $(SRCDIR)/myframework.c
-       mkdir -p MyFramework.framework/Versions/A/Headers
-       mkdir -p MyFramework.framework/Versions/A/Resources
-       cp MyFramework MyFramework.framework/Versions/A
-       cp $(SRCDIR)/MyFramework.h MyFramework.framework/Versions/A/Headers
-       cp $(SRCDIR)/Info.plist MyFramework.framework/Versions/A/Resources
-       ( cd MyFramework.framework/Versions ; ln -s A Current )
-       ( cd MyFramework.framework/ ; ln -s Versions/Current/Headers . )
-       ( cd MyFramework.framework/ ; ln -s Versions/Current/MyFramework . )
-       ( cd MyFramework.framework/ ; ln -s Versions/Current/Resources . )
-       mv MyFramework.dSYM MyFramework.framework.dSYM
-       mkdir hide.app
-       rm -f MyFramework
-       tar cf - MyFramework.framework MyFramework.framework.dSYM | ( cd hide.app;tar xBpf -)
-       $(CC) $(CFLAGS) -o deep-bundle $(SRCDIR)/main.c -F. -framework MyFramework
-
-
-clean:
-       rm -rf a.out a.out.dSYM deep-bundle deep-bundle.dSYM MyFramework.framework MyFramework.framework.dSYM MyFramework MyFramework.dSYM hide.app
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/MyFramework.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/MyFramework.h
deleted file mode 100644 (file)
index a453664..0000000
+++ /dev/null
@@ -1 +0,0 @@
-int foo ();
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/TestDeepBundle.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/TestDeepBundle.py
deleted file mode 100644 (file)
index ecab535..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-"""Test that a dSYM can be found when a binary is in a deep bundle with multiple pathname components."""
-
-
-#import unittest2
-from time import sleep
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-exe_name = 'deep-bundle'  # must match Makefile
-
-class DeepBundleTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfRemote
-    @skipUnlessDarwin
-    # This test is explicitly a dSYM test, it doesn't need to run for any other config, but
-    # the following doesn't work, fixme.
-    # @skipIf(debug_info=no_match(["dsym"]), bugnumber="This test is looking explicitly for a dSYM")
-
-    def setUp(self):
-        TestBase.setUp(self)
-        self.source = 'main.c'
-
-    def tearDown(self):
-        # Destroy process before TestBase.tearDown()
-        self.dbg.GetSelectedTarget().GetProcess().Destroy()
-
-        # Call super's tearDown().
-        TestBase.tearDown(self)
-
-    def test_attach_and_check_dsyms(self):
-        """Test attach to binary, see if the framework dSYM is found"""
-        exe = self.getBuildArtifact(exe_name)
-        self.build()
-        popen = self.spawnSubprocess(exe, [self.getBuildDir()])
-        self.addTearDownHook(self.cleanupSubprocesses)
-
-        # Give the inferior time to start up, dlopen a bundle, remove the bundle it linked in
-        sleep(5)
-
-        # Since the library that was dlopen()'ed is now removed, lldb will need to find the
-        # binary & dSYM via target.exec-search-paths
-        settings_str = "settings set target.exec-search-paths " + self.get_process_working_directory() + "/hide.app"
-        self.runCmd(settings_str)
-        self.runCmd("process attach -p " + str(popen.pid))
-
-        target = self.dbg.GetSelectedTarget()
-        self.assertTrue(target.IsValid(), 'Should have a valid Target after attaching to process')
-
-        setup_complete = target.FindFirstGlobalVariable("setup_is_complete")
-        self.assertTrue(setup_complete.GetValueAsUnsigned() == 1, 'Check that inferior process has completed setup')
-
-        # Find the bundle module, see if we found the dSYM too (they're both in "hide.app")
-        i = 0
-        found_module = False
-        while i < target.GetNumModules():
-            mod = target.GetModuleAtIndex(i)
-            if mod.GetFileSpec().GetFilename() == 'MyFramework':
-                found_module = True
-                dsym_name = mod.GetSymbolFileSpec().GetFilename()
-                self.assertTrue (dsym_name == 'MyFramework', "Check that we found the dSYM for the bundle that was loaded")
-            i=i+1
-
-        self.assertTrue(found_module, "Check that we found the framework loaded in lldb's image list")
-
-if __name__ == '__main__':
-    unittest.main()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/main.c
deleted file mode 100644 (file)
index b5ef5cf..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#include <MyFramework/MyFramework.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-int setup_is_complete = 0;
-
-int main(int argc, const char **argv)
-{
-    char command[8192];
-    sprintf (command,
-             "/bin/rm -rf %s/MyFramework %s/MyFramework.framework %s/MyFramework.framework.dSYM",
-             argv[1], argv[1], argv[1]);
-    system (command);
-
-    setup_is_complete = 1;
-
-    // At this point we want lldb to attach to the process.  If lldb attaches
-    // before we've removed the framework we're running against, it will be
-    // easy for lldb to find the binary & dSYM without using target.exec-search-paths,
-    // which is the point of this test.
-
-    for (int loop_limiter = 0; loop_limiter < 100; loop_limiter++)
-        sleep (1);
-
-     return foo();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/myframework.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/myframework.c
deleted file mode 100644 (file)
index c100f9a..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-int foo ()
-{
-    return 5;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/function-starts/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/function-starts/Makefile
deleted file mode 100644 (file)
index 0d6f517..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-CXX_SOURCES := main.cpp
-EXE := StripMe
-MAKE_DSYM := NO
-
-include Makefile.rules
-
-main.o: main.cpp
-       $(CC) $(CFLAGS_NO_DEBUG) -c $< -o $@
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/function-starts/TestFunctionStarts.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/function-starts/TestFunctionStarts.py
deleted file mode 100644 (file)
index e876cdf..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-"""
-Test that we read the function starts section.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-exe_name = "StripMe"  # Must match Makefile
-
-class FunctionStartsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @skipIfRemote
-    @skipUnlessDarwin
-    def test_function_starts_binary(self):
-        """Test that we make synthetic symbols when we have the binary."""
-        self.build()
-        self.do_function_starts(False)
-
-    @skipIfRemote
-    @skipUnlessDarwin
-    def test_function_starts_no_binary(self):
-        """Test that we make synthetic symbols when we don't have the binary"""
-        self.build()
-        self.do_function_starts(True)
-
-    def do_function_starts(self, in_memory):
-        """Run the binary, stop at our unstripped function, 
-           make sure the caller has synthetic symbols"""
-
-        exe = self.getBuildArtifact(exe_name)
-        # Now strip the binary, but leave externals so we can break on dont_strip_me.
-        try:
-            fail_str = system([["strip", "-u", "-x", "-S", exe]])
-        except CalledProcessError as cmd_error:
-            self.fail("Strip failed: %d"%(cmd_error.returncode))
-
-        # Use a file as a synchronization point between test and inferior.
-        pid_file_path = lldbutil.append_to_process_working_directory(self,
-            "token_pid_%d" % (int(os.getpid())))
-        self.addTearDownHook(
-            lambda: self.run_platform_command(
-                "rm %s" %
-                (pid_file_path)))
-
-        popen = self.spawnSubprocess(exe, [pid_file_path])
-        self.addTearDownHook(self.cleanupSubprocesses)
-
-        # Wait until process has fully started up.
-        pid = lldbutil.wait_for_file_on_target(self, pid_file_path)
-
-        if in_memory:
-          remove_file(exe)            
-
-        target = self.dbg.CreateTarget(None)
-        self.assertTrue(target.IsValid(), "Got a vaid empty target.")
-        error = lldb.SBError()
-        attach_info = lldb.SBAttachInfo()
-        attach_info.SetProcessID(popen.pid)
-        attach_info.SetIgnoreExisting(False)
-        process = target.Attach(attach_info, error)
-        self.assertTrue(error.Success(), "Didn't attach successfully to %d: %s"%(popen.pid, error.GetCString()))
-        
-        bkpt = target.BreakpointCreateByName("dont_strip_me", exe)
-        self.assertTrue(bkpt.GetNumLocations() > 0, "Didn't set the dont_strip_me bkpt.")
-        
-        threads = lldbutil.continue_to_breakpoint(process, bkpt)
-        self.assertEqual(len(threads), 1, "Didn't hit my breakpoint.")
-
-        # Our caller frame should have been stripped.  Make sure we made a synthetic symbol
-        # for it:
-        thread = threads[0]
-        self.assertTrue(thread.num_frames > 1, "Couldn't backtrace.")
-        name = thread.frame[1].GetFunctionName()
-        self.assertTrue(name.startswith("___lldb_unnamed_symbol"))
-        self.assertTrue(name.endswith("$$StripMe"))
-        
-
-        
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/function-starts/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/function-starts/main.cpp
deleted file mode 100644 (file)
index 188078a..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#include <stdio.h>
-#include <fcntl.h>
-
-#include <chrono>
-#include <fstream>
-#include <thread>
-
-extern void dont_strip_me()
-{
-  printf("I wasn't stripped\n");
-}
-
-static void *a_function()
-{
-    while (1)
-    {
-        std::this_thread::sleep_for(std::chrono::microseconds(100)); 
-        dont_strip_me();
-    }
-    return 0;
-}
-
-int main(int argc, char const *argv[])
-{
-    {
-        // Create file to signal that this process has started up.
-        std::ofstream f;
-        f.open(argv[1]);
-    }
-    a_function();
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/indirect_symbol/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/indirect_symbol/Makefile
deleted file mode 100644 (file)
index 929ed58..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-C_SOURCES := main.c
-LD_EXTRAS := -L. -lindirect -lreexport
-
-.PHONY: build-libindirect build-libreepxoprt
-all: build-libindirect build-libreepxoprt a.out
-
-include Makefile.rules
-
-build-libindirect: indirect.c
-       $(MAKE) -f $(MAKEFILE_RULES) \
-               DYLIB_C_SOURCES=indirect.c DYLIB_NAME=indirect DYLIB_ONLY=YES
-
-build-libreepxoprt: reexport.c
-       $(MAKE) -f $(MAKEFILE_RULES) \
-               DYLIB_C_SOURCES=reexport.c DYLIB_NAME=reexport DYLIB_ONLY=YES \
-               LD_EXTRAS="-L. -lindirect -Wl,-alias_list,$(SRCDIR)/alias.list"
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/indirect_symbol/TestIndirectSymbols.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/indirect_symbol/TestIndirectSymbols.py
deleted file mode 100644 (file)
index 2718bd7..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-"""Test stepping and setting breakpoints in indirect and re-exported symbols."""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestIndirectFunctions(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers that we will step to in main:
-        self.main_source = "main.c"
-
-    @skipUnlessDarwin
-    @expectedFailureAll(oslist=no_match(["macosx"]), bugnumber="rdar://55952764")
-    @add_test_categories(['pyapi'])
-    def test_with_python_api(self):
-        """Test stepping and setting breakpoints in indirect and re-exported symbols."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        if self.platformIsDarwin():
-            lib1 = self.getBuildArtifact('libindirect.dylib')
-            lib2 = self.getBuildArtifact('libreexport.dylib')
-            self.registerSharedLibrariesWithTarget(target, [lib1, lib2])
-
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-
-        break1 = target.BreakpointCreateBySourceRegex(
-            "Set breakpoint here to step in indirect.", self.main_source_spec)
-        self.assertTrue(break1, VALID_BREAKPOINT)
-
-        break2 = target.BreakpointCreateBySourceRegex(
-            "Set breakpoint here to step in reexported.", self.main_source_spec)
-        self.assertTrue(break2, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        threads = lldbutil.get_threads_stopped_at_breakpoint(process, break1)
-        if len(threads) != 1:
-            self.fail("Failed to stop at breakpoint 1.")
-
-        thread = threads[0]
-
-        # Now do a step-into, and we should end up in the hidden target of this
-        # indirect function.
-        thread.StepInto()
-        curr_function = thread.GetFrameAtIndex(0).GetFunctionName()
-        self.assertEqual(curr_function, "call_through_indirect_hidden",
-            "Stepped into indirect symbols.")
-
-        # Now set a breakpoint using the indirect symbol name, and make sure we
-        # get to that:
-        break_indirect = target.BreakpointCreateByName("call_through_indirect")
-        self.assertTrue(break_indirect, VALID_BREAKPOINT)
-
-        # Now continue should take us to the second call through the indirect
-        # symbol:
-
-        threads = lldbutil.continue_to_breakpoint(process, break_indirect)
-        self.assertTrue(
-            len(threads) == 1,
-            "Stopped at breakpoint in indirect function.")
-        curr_function = thread.GetFrameAtIndex(0).GetFunctionName()
-        self.assertTrue(
-            curr_function == "call_through_indirect_hidden",
-            "Stepped into indirect symbols.")
-
-        # Delete this breakpoint so it won't get in the way:
-        target.BreakpointDelete(break_indirect.GetID())
-
-        # Now continue to the site of the first re-exported function call in
-        # main:
-        threads = lldbutil.continue_to_breakpoint(process, break2)
-
-        # This is stepping Into through a re-exported symbol to an indirect
-        # symbol:
-        thread.StepInto()
-        curr_function = thread.GetFrameAtIndex(0).GetFunctionName()
-        self.assertTrue(
-            curr_function == "call_through_indirect_hidden",
-            "Stepped into indirect symbols.")
-
-        # And the last bit is to set a breakpoint on the re-exported symbol and
-        # make sure we are again in out target function.
-        break_reexported = target.BreakpointCreateByName(
-            "reexport_to_indirect")
-        self.assertTrue(break_reexported, VALID_BREAKPOINT)
-
-        # Now continue should take us to the second call through the indirect
-        # symbol:
-
-        threads = lldbutil.continue_to_breakpoint(process, break_reexported)
-        self.assertTrue(
-            len(threads) == 1,
-            "Stopped at breakpoint in reexported function target.")
-        curr_function = thread.GetFrameAtIndex(0).GetFunctionName()
-        self.assertTrue(
-            curr_function == "call_through_indirect_hidden",
-            "Stepped into indirect symbols.")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/indirect_symbol/alias.list b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/indirect_symbol/alias.list
deleted file mode 100644 (file)
index 3232c58..0000000
+++ /dev/null
@@ -1 +0,0 @@
-_call_through_indirect _reexport_to_indirect
\ No newline at end of file
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/indirect_symbol/indirect.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/indirect_symbol/indirect.c
deleted file mode 100644 (file)
index 48e1459..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#define MakeResolver(name)                                       \
-  void * name ## Resolver(void) __asm__("_" #name);              \
-  void * name ## Resolver(void) {                                \
-    __asm__(".symbol_resolver _" #name);                         \
-    return name ## _hidden;                                    \
-  }
-
-int 
-call_through_indirect_hidden(int arg)
-{
-  return arg + 5;
-}
-
-MakeResolver(call_through_indirect)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/indirect_symbol/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/indirect_symbol/main.c
deleted file mode 100644 (file)
index b5af058..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-extern int call_through_indirect(int);
-extern int reexport_to_indirect(int);
-
-int
-main ()
-{
-  int indirect_result = call_through_indirect(20); // Set breakpoint here to step in indirect.
-  indirect_result = call_through_indirect(30);
-
-  int reexport_result = reexport_to_indirect (20); // Set breakpoint here to step in reexported.
-  reexport_result = reexport_to_indirect (30);
-
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/indirect_symbol/reexport.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/indirect_symbol/reexport.c
deleted file mode 100644 (file)
index 096a463..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-extern int call_through_indirect(int);
-
-int
-fake_call_through_reexport(int value)
-{
-  return value + 10;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/Makefile
deleted file mode 100644 (file)
index ad37346..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-MAKE_DSYM := NO
-
-C_SOURCES := main.c
-
-all: a.out create-empty-corefile
-
-create-empty-corefile:
-       $(MAKE) -f $(MAKEFILE_RULES) EXE=create-empty-corefile \
-               C_SOURCES=create-empty-corefile.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/TestKernVerStrLCNOTE.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/TestKernVerStrLCNOTE.py
deleted file mode 100644 (file)
index 8000743..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-"""Test that corefiles with an LC_NOTE "kern ver str" load command is used."""
-
-
-
-import os
-import re
-import subprocess
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestKernVerStrLCNOTE(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIf(debug_info=no_match(["dsym"]), bugnumber="This test is looking explicitly for a dSYM")
-    @skipIfDarwinEmbedded
-    @skipUnlessDarwin
-    def test_lc_note(self):
-        self.build()
-        self.test_exe = self.getBuildArtifact("a.out")
-        self.create_corefile = self.getBuildArtifact("create-empty-corefile")
-        self.dsym_for_uuid = self.getBuildArtifact("dsym-for-uuid.sh")
-        self.corefile = self.getBuildArtifact("core")
-
-        ## We can hook in our dsym-for-uuid shell script to lldb with this env
-        ## var instead of requiring a defaults write.
-        os.environ['LLDB_APPLE_DSYMFORUUID_EXECUTABLE'] = self.dsym_for_uuid
-        self.addTearDownHook(lambda: os.environ.pop('LLDB_APPLE_DSYMFORUUID_EXECUTABLE', None))
-
-        dwarfdump_uuid_regex = re.compile(
-            'UUID: ([-0-9a-fA-F]+) \(([^\(]+)\) .*')
-        dwarfdump_cmd_output = subprocess.check_output(
-                ('/usr/bin/dwarfdump --uuid "%s"' % self.test_exe), shell=True).decode("utf-8")
-        aout_uuid = None
-        for line in dwarfdump_cmd_output.splitlines():
-            match = dwarfdump_uuid_regex.search(line)
-            if match:
-                aout_uuid = match.group(1)
-        self.assertNotEqual(aout_uuid, None, "Could not get uuid of built a.out")
-
-        ###  Create our dsym-for-uuid shell script which returns self.test_exe
-        ###  and its dSYM when given self.test_exe's UUID.
-        shell_cmds = [
-                '#! /bin/sh',
-                'ret=0',
-                'echo "<?xml version=\\"1.0\\" encoding=\\"UTF-8\\"?>"',
-                'echo "<!DOCTYPE plist PUBLIC \\"-//Apple//DTD PLIST 1.0//EN\\" \\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\\">"',
-                'echo "<plist version=\\"1.0\\">"',
-                '',
-                '# the last arugment is probably the uuid',
-                'while [ $# -gt 1 ]',
-                'do',
-                '  shift',
-                'done',
-                'echo "<dict><key>$1</key><dict>"',
-                '',
-                'if [ "$1" = "%s" ]' % aout_uuid,
-                'then',
-                '  echo "<key>DBGArchitecture</key><string>x86_64</string>"',
-                '  echo "<key>DBGDSYMPath</key><string>%s.dSYM/Contents/Resources/DWARF/%s</string>"' % (self.test_exe, os.path.basename(self.test_exe)),
-                '  echo "<key>DBGSymbolRichExecutable</key><string>%s</string>"' % self.test_exe,
-                'else',
-                '  echo "<key>DBGError</key><string>not found</string>"',
-                '  ret=1',
-                'fi',
-                'echo "</dict></dict></plist>"',
-                'exit $ret'
-                ]
-
-        with open(self.dsym_for_uuid, "w") as writer:
-            for l in shell_cmds:
-                writer.write(l + '\n')
-
-        os.chmod(self.dsym_for_uuid, 0o755)
-
-        ### Create our corefile
-        retcode = call(self.create_corefile + " " +  self.corefile + " " + self.test_exe, shell=True)
-
-        ### Now run lldb on the corefile
-        ### which will give us a UUID
-        ### which we call dsym-for-uuid.sh with
-        ### which gives us a binary and dSYM
-        ### which lldb should load!
-
-
-        self.target = self.dbg.CreateTarget('')
-        err = lldb.SBError()
-        self.process = self.target.LoadCore(self.corefile)
-        self.assertEqual(self.process.IsValid(), True)
-        if self.TraceOn():
-            self.runCmd("image list")
-        self.assertEqual(self.target.GetNumModules(), 1)
-        fspec = self.target.GetModuleAtIndex(0).GetFileSpec()
-        filepath = fspec.GetDirectory() + "/" + fspec.GetFilename()
-        self.assertEqual(filepath, self.test_exe)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/create-empty-corefile.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/create-empty-corefile.cpp
deleted file mode 100644 (file)
index 8a8115a..0000000
+++ /dev/null
@@ -1,315 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <mach-o/loader.h>
-#include <vector>
-#include <string>
-#include <mach/thread_status.h>
-#include <string.h>
-#include <uuid/uuid.h>
-
-// Create an empty corefile with a "kern ver str" LC_NOTE.
-// If an existing binary is given as an optional 2nd argument on the cmd line,
-// the UUID from that binary will be encoded in the corefile.
-// Otherwise a pre-set UUID will be put in the corefile that
-// is created.
-
-
-union uint32_buf {
-    uint8_t bytebuf[4];
-    uint32_t val;
-};
-
-union uint64_buf {
-    uint8_t bytebuf[8];
-    uint64_t val;
-};
-
-void
-add_uint64(std::vector<uint8_t> &buf, uint64_t val)
-{
-    uint64_buf conv;
-    conv.val = val;
-    for (int i = 0; i < 8; i++)
-        buf.push_back(conv.bytebuf[i]);
-}
-
-void
-add_uint32(std::vector<uint8_t> &buf, uint32_t val)
-{
-    uint32_buf conv;
-    conv.val = val;
-    for (int i = 0; i < 4; i++)
-        buf.push_back(conv.bytebuf[i]);
-}
-
-std::vector<uint8_t>
-x86_lc_thread_load_command ()
-{
-    std::vector<uint8_t> data;
-    add_uint32 (data, LC_THREAD);                // thread_command.cmd
-    add_uint32 (data, 184);                      // thread_command.cmdsize
-    add_uint32 (data, x86_THREAD_STATE64);       // thread_command.flavor
-    add_uint32 (data, x86_THREAD_STATE64_COUNT); // thread_command.count
-    add_uint64 (data, 0x0000000000000000);       // rax
-    add_uint64 (data, 0x0000000000000400);       // rbx
-    add_uint64 (data, 0x0000000000000000);       // rcx
-    add_uint64 (data, 0x0000000000000000);       // rdx
-    add_uint64 (data, 0x0000000000000000);       // rdi
-    add_uint64 (data, 0x0000000000000000);       // rsi
-    add_uint64 (data, 0xffffff9246e2ba20);       // rbp
-    add_uint64 (data, 0xffffff9246e2ba10);       // rsp
-    add_uint64 (data, 0x0000000000000000);       // r8 
-    add_uint64 (data, 0x0000000000000000);       // r9 
-    add_uint64 (data, 0x0000000000000000);       // r10
-    add_uint64 (data, 0x0000000000000000);       // r11
-    add_uint64 (data, 0xffffff7f96ce5fe1);       // r12
-    add_uint64 (data, 0x0000000000000000);       // r13
-    add_uint64 (data, 0x0000000000000000);       // r14
-    add_uint64 (data, 0xffffff9246e2bac0);       // r15
-    add_uint64 (data, 0xffffff8015a8f6d0);       // rip
-    add_uint64 (data, 0x0000000000011111);       // rflags
-    add_uint64 (data, 0x0000000000022222);       // cs
-    add_uint64 (data, 0x0000000000033333);       // fs
-    add_uint64 (data, 0x0000000000044444);       // gs
-    return data;
-}
-
-void
-add_lc_note_kern_ver_str_load_command (std::vector<std::vector<uint8_t> > &loadcmds, 
-                                       std::vector<uint8_t> &payload,
-                                       int payload_file_offset,
-                                       std::string ident)
-{
-    std::vector<uint8_t> loadcmd_data;
-
-    add_uint32 (loadcmd_data, LC_NOTE);          // note_command.cmd
-    add_uint32 (loadcmd_data, 40);               // note_command.cmdsize
-    char lc_note_name[16];
-    memset (lc_note_name, 0, 16);
-    strcpy (lc_note_name, "kern ver str");
-    
-    // lc_note.data_owner
-    for (int i = 0; i < 16; i++)
-        loadcmd_data.push_back (lc_note_name[i]);
-
-    // we start writing the payload at payload_file_offset to leave
-    // room at the start for the header & the load commands.
-    uint64_t current_payload_offset = payload.size() + payload_file_offset;
-
-    add_uint64 (loadcmd_data, current_payload_offset);   // note_command.offset
-    add_uint64 (loadcmd_data, 4 + ident.size() + 1);       // note_command.size
-
-    loadcmds.push_back (loadcmd_data);
-
-    add_uint32 (payload, 1);                 // kerneL_version_string.version
-    for (int i = 0; i < ident.size() + 1; i++)
-    {
-        payload.push_back (ident[i]);
-    }
-}
-
-void
-add_lc_segment (std::vector<std::vector<uint8_t> > &loadcmds,
-                std::vector<uint8_t> &payload,
-                int payload_file_offset)
-{
-    std::vector<uint8_t> loadcmd_data;
-    struct segment_command_64 seg;
-    seg.cmd = LC_SEGMENT_64;
-    seg.cmdsize = sizeof (struct segment_command_64);  // no sections
-    memset (seg.segname, 0, 16);
-    seg.vmaddr = 0xffffff7f96400000;
-    seg.vmsize = 4096;
-    seg.fileoff = payload.size() + payload_file_offset;
-    seg.filesize = 0;
-    seg.maxprot = 1;
-    seg.initprot = 1;
-    seg.nsects = 0;
-    seg.flags = 0;
-
-    uint8_t *p = (uint8_t*) &seg;
-    for (int i = 0; i < sizeof (struct segment_command_64); i++)
-    {
-        loadcmd_data.push_back (*(p + i));
-    }
-    loadcmds.push_back (loadcmd_data);
-}
-
-std::string
-get_uuid_from_binary (const char *fn)
-{
-    FILE *f = fopen(fn, "r");
-    if (f == nullptr)
-    {
-        fprintf (stderr, "Unable to open binary '%s' to get uuid\n", fn);
-        exit(1);
-    }
-               uint32_t num_of_load_cmds = 0;
-               uint32_t size_of_load_cmds = 0;
-               std::string uuid;
-    off_t file_offset = 0;
-
-    uint8_t magic[4];
-    if (::fread (magic, 1, 4, f) != 4)
-    {
-        fprintf (stderr, "Failed to read magic number from input file %s\n", fn);
-        exit (1);
-    }
-    uint8_t magic_32_be[] = {0xfe, 0xed, 0xfa, 0xce};
-    uint8_t magic_32_le[] = {0xce, 0xfa, 0xed, 0xfe};
-    uint8_t magic_64_be[] = {0xfe, 0xed, 0xfa, 0xcf};
-    uint8_t magic_64_le[] = {0xcf, 0xfa, 0xed, 0xfe};
-
-    if (memcmp (magic, magic_32_be, 4) == 0 || memcmp (magic, magic_64_be, 4) == 0)
-    {
-        fprintf (stderr, "big endian corefiles not supported\n");
-        exit (1);
-    }
-
-    ::fseeko (f, 0, SEEK_SET);
-    if (memcmp (magic, magic_32_le, 4) == 0)
-    {
-        struct mach_header mh;
-        if (::fread (&mh, 1, sizeof (mh), f) != sizeof (mh))
-        {
-            fprintf (stderr, "error reading mach header from input file\n");
-            exit (1);
-        }
-        if (mh.cputype != CPU_TYPE_X86_64)
-        {
-            fprintf (stderr, "This tool creates an x86_64 corefile but "
-                     "the supplied binary '%s' is cputype 0x%x\n",
-                     fn, (uint32_t) mh.cputype);
-            exit (1);
-        }
-                               num_of_load_cmds = mh.ncmds;
-                               size_of_load_cmds = mh.sizeofcmds;
-        file_offset += sizeof (struct mach_header);
-    }
-    else
-    {
-        struct mach_header_64 mh;
-        if (::fread (&mh, 1, sizeof (mh), f) != sizeof (mh))
-        {
-            fprintf (stderr, "error reading mach header from input file\n");
-            exit (1);
-        }
-        if (mh.cputype != CPU_TYPE_X86_64)
-        {
-            fprintf (stderr, "This tool creates an x86_64 corefile but "
-                     "the supplied binary '%s' is cputype 0x%x\n",
-                     fn, (uint32_t) mh.cputype);
-            exit (1);
-        }
-                               num_of_load_cmds = mh.ncmds;
-                               size_of_load_cmds = mh.sizeofcmds;
-        file_offset += sizeof (struct mach_header_64);
-    }
-
-    off_t load_cmds_offset = file_offset;
-
-    for (int i = 0; i < num_of_load_cmds && (file_offset - load_cmds_offset) < size_of_load_cmds; i++)
-    {
-        ::fseeko (f, file_offset, SEEK_SET);
-        uint32_t cmd;
-        uint32_t cmdsize;
-        ::fread (&cmd, sizeof (uint32_t), 1, f);
-        ::fread (&cmdsize, sizeof (uint32_t), 1, f);
-        if (cmd == LC_UUID)
-        {
-            struct uuid_command uuidcmd;
-            ::fseeko (f, file_offset, SEEK_SET);
-            if (::fread (&uuidcmd, 1, sizeof (uuidcmd), f) != sizeof (uuidcmd))
-            {
-                fprintf (stderr, "Unable to read LC_UUID load command.\n");
-                exit (1);
-            }
-            uuid_string_t uuidstr;
-            uuid_unparse (uuidcmd.uuid, uuidstr);
-            uuid = uuidstr;
-            break;
-        }
-        file_offset += cmdsize;
-    }
-    return uuid;
-}
-
-int main (int argc, char **argv)
-{
-    if (argc != 2 && argc != 3)
-    {
-        fprintf (stderr, "usage: create-empty-corefile <output-core-name> [binary-to-copy-uuid-from]\n");
-        fprintf (stderr, "Create a Mach-O corefile with an LC_NOTE 'kern ver str' load command/payload\n");
-        fprintf (stderr, "If a binary is given as a second argument, the Mach-O UUID of that file will\n");
-        fprintf (stderr, "be read and used in the corefile's LC_NOTE payload.\n");
-        exit (1);
-    }
-
-    std::string ident = "EFI UUID=3F9BA21F-55EA-356A-A349-BBA6F51FE8B1";
-    if (argc == 3)
-    {
-        std::string uuid_from_file = get_uuid_from_binary (argv[2]);
-        if (!uuid_from_file.empty())
-        {
-            ident = "EFI UUID=";
-            ident += uuid_from_file;
-        }
-    }
-
-    // An array of load commands (in the form of byte arrays)
-    std::vector<std::vector<uint8_t> > load_commands;
-
-    // An array of corefile contents (page data, lc_note data, etc)
-    std::vector<uint8_t> payload;
-
-    // First add all the load commands / payload so we can figure out how large
-    // the load commands will actually be.
-    load_commands.push_back (x86_lc_thread_load_command());
-    add_lc_note_kern_ver_str_load_command (load_commands, payload, 0, ident);
-    add_lc_segment (load_commands, payload, 0);
-
-    int size_of_load_commands = 0;
-    for (const auto &lc : load_commands)
-        size_of_load_commands += lc.size();
-
-    int header_and_load_cmd_room = sizeof (struct mach_header_64) + size_of_load_commands;
-
-    // Erease the load commands / payload now that we know how much space is needed,
-    // redo it.
-    load_commands.clear();
-    payload.clear();
-
-    load_commands.push_back (x86_lc_thread_load_command());
-    add_lc_note_kern_ver_str_load_command (load_commands, payload, header_and_load_cmd_room, ident);
-    add_lc_segment (load_commands, payload, header_and_load_cmd_room);
-
-    struct mach_header_64 mh;
-    mh.magic = MH_MAGIC_64;
-    mh.cputype = CPU_TYPE_X86_64;
-    mh.cpusubtype = CPU_SUBTYPE_X86_64_ALL;
-    mh.filetype = MH_CORE;
-    mh.ncmds = load_commands.size();
-    mh.sizeofcmds = size_of_load_commands;
-    mh.flags = 0;
-    mh.reserved = 0;
-
-
-    FILE *f = fopen (argv[1], "w");
-
-    if (f == nullptr)
-    {
-        fprintf (stderr, "Unable to open file %s for writing\n", argv[1]);
-        exit (1);
-    }
-
-    fwrite (&mh, sizeof (struct mach_header_64), 1, f);
-
-    for (const auto &lc : load_commands)
-        fwrite (lc.data(), lc.size(), 1, f);
-
-    fseek (f, header_and_load_cmd_room, SEEK_SET);
-
-    fwrite (payload.data(), payload.size(), 1, f);
-
-    fclose (f);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/main.c
deleted file mode 100644 (file)
index 70a72e0..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#include <stdio.h>
-int main () { puts ("this is the lc-note test program."); }
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/load-kext/TestLoadKext.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/load-kext/TestLoadKext.py
deleted file mode 100644 (file)
index ec35ce8..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-"""
-Test loading of a kext binary.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class LoadKextTestCase(TestBase):
-    NO_DEBUG_INFO_TESTCASE = True
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        TestBase.setUp(self)
-        #super(LoadKextTestCase, self).setUp()
-        #self._initial_platform = lldb.DBG.GetSelectedPlatform()
-
-    def test_load_kext(self):
-        """Test that lldb can load a kext binary."""
-
-        # Create kext from YAML.
-        self.yaml2obj("mykext.yaml", self.getBuildArtifact("mykext"))
-
-        target = self.dbg.CreateTarget(self.getBuildArtifact("mykext"))
-
-        self.assertTrue(target.IsValid())
-
-        self.assertEqual(target.GetNumModules(), 1)
-        mod = target.GetModuleAtIndex(0)
-        self.assertEqual(mod.GetFileSpec().GetFilename(), "mykext")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/load-kext/mykext.yaml b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/load-kext/mykext.yaml
deleted file mode 100644 (file)
index ccf0163..0000000
+++ /dev/null
@@ -1,222 +0,0 @@
---- !mach-o
-FileHeader:      
-  magic:           0xFEEDFACF
-  cputype:         0x01000007
-  cpusubtype:      0x00000003
-  filetype:        0x0000000B
-  ncmds:           7
-  sizeofcmds:      520
-  flags:           0x00000085
-  reserved:        0x00000000
-LoadCommands:    
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         152
-    segname:         __TEXT
-    vmaddr:          0
-    vmsize:          4096
-    fileoff:         0
-    filesize:        4096
-    maxprot:         7
-    initprot:        5
-    nsects:          1
-    flags:           0
-    Sections:        
-      - sectname:        __text
-        segname:         __TEXT
-        addr:            0x0000000000000F60
-        size:            158
-        offset:          0x00000F60
-        align:           4
-        reloff:          0x00000000
-        nreloc:          0
-        flags:           0x80000400
-        reserved1:       0x00000000
-        reserved2:       0x00000000
-        reserved3:       0x00000000
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         152
-    segname:         __DATA
-    vmaddr:          4096
-    vmsize:          4096
-    fileoff:         4096
-    filesize:        4096
-    maxprot:         7
-    initprot:        3
-    nsects:          1
-    flags:           0
-    Sections:        
-      - sectname:        __data
-        segname:         __DATA
-        addr:            0x0000000000001000
-        size:            220
-        offset:          0x00001000
-        align:           3
-        reloff:          0x00000000
-        nreloc:          0
-        flags:           0x00000000
-        reserved1:       0x00000000
-        reserved2:       0x00000000
-        reserved3:       0x00000000
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         __LINKEDIT
-    vmaddr:          8192
-    vmsize:          4096
-    fileoff:         8192
-    filesize:        800
-    maxprot:         7
-    initprot:        1
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SYMTAB
-    cmdsize:         24
-    symoff:          8224
-    nsyms:           19
-    stroff:          8528
-    strsize:         464
-  - cmd:             LC_DYSYMTAB
-    cmdsize:         80
-    ilocalsym:       0
-    nlocalsym:       16
-    iextdefsym:      16
-    nextdefsym:      3
-    iundefsym:       19
-    nundefsym:       0
-    tocoff:          0
-    ntoc:            0
-    modtaboff:       0
-    nmodtab:         0
-    extrefsymoff:    0
-    nextrefsyms:     0
-    indirectsymoff:  0
-    nindirectsyms:   0
-    extreloff:       0
-    nextrel:         0
-    locreloff:       8192
-    nlocrel:         4
-  - cmd:             LC_UUID
-    cmdsize:         24
-    uuid:            17A97B33-09B7-3195-9408-DBD965D578A5
-  - cmd:             LC_SOURCE_VERSION
-    cmdsize:         16
-    version:         0
-LinkEditData:    
-  NameList:        
-    - n_strx:          40
-      n_type:          0x64
-      n_sect:          0
-      n_desc:          0
-      n_value:         0
-    - n_strx:          141
-      n_type:          0x64
-      n_sect:          0
-      n_desc:          0
-      n_value:         0
-    - n_strx:          155
-      n_type:          0x66
-      n_sect:          3
-      n_desc:          1
-      n_value:         1543540349
-    - n_strx:          276
-      n_type:          0x20
-      n_sect:          0
-      n_desc:          0
-      n_value:         0
-    - n_strx:          287
-      n_type:          0x20
-      n_sect:          0
-      n_desc:          0
-      n_value:         0
-    - n_strx:          298
-      n_type:          0x20
-      n_sect:          0
-      n_desc:          0
-      n_value:         0
-    - n_strx:          309
-      n_type:          0x20
-      n_sect:          0
-      n_desc:          0
-      n_value:         0
-    - n_strx:          1
-      n_type:          0x64
-      n_sect:          1
-      n_desc:          0
-      n_value:         0
-    - n_strx:          325
-      n_type:          0x1E
-      n_sect:          1
-      n_desc:          0
-      n_value:         3992
-    - n_strx:          333
-      n_type:          0x1E
-      n_sect:          1
-      n_desc:          0
-      n_value:         4018
-    - n_strx:          361
-      n_type:          0x1E
-      n_sect:          1
-      n_desc:          0
-      n_value:         4035
-    - n_strx:          392
-      n_type:          0x1E
-      n_sect:          1
-      n_desc:          0
-      n_value:         4052
-    - n_strx:          417
-      n_type:          0x1E
-      n_sect:          1
-      n_desc:          0
-      n_value:         4068
-    - n_strx:          424
-      n_type:          0x1E
-      n_sect:          2
-      n_desc:          0
-      n_value:         4296
-    - n_strx:          435
-      n_type:          0x1E
-      n_sect:          2
-      n_desc:          0
-      n_value:         4304
-    - n_strx:          446
-      n_type:          0x1E
-      n_sect:          2
-      n_desc:          0
-      n_value:         4312
-    - n_strx:          2
-      n_type:          0x0F
-      n_sect:          2
-      n_desc:          0
-      n_value:         4096
-    - n_strx:          13
-      n_type:          0x0F
-      n_sect:          1
-      n_desc:          0
-      n_value:         3936
-    - n_strx:          27
-      n_type:          0x0F
-      n_sect:          1
-      n_desc:          0
-      n_value:         3968
-  StringTable:     
-    - ' '
-    - _kmod_info
-    - _mykext_start
-    - _mykext_stop
-    - /tmp/mykext/build/mykext/Build/Intermediates.noindex/mykext.build/Debug/mykext.build/DerivedSources/
-    - mykext_info.c
-    - /tmp/mykext/build/mykext/Build/Intermediates.noindex/mykext.build/Debug/mykext.build/Objects-normal/x86_64/mykext_info.o
-    - _kmod_info
-    - __realmain
-    - __antimain
-    - __kext_apple_cc
-    - __start
-    - _OSKextGetCurrentIdentifier
-    - _OSKextGetCurrentVersionString
-    - _OSKextGetCurrentLoadTag
-    - __stop
-    - __realmain
-    - __antimain
-    - __kext_apple_cc
-    - ''
-    - ''
-...
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/macabi/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/macabi/Makefile
deleted file mode 100644 (file)
index 2123af1..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-C_SOURCES := main.c
-LD_EXTRAS := -L. -lfoo
-
-TRIPLE := x86_64-apple-ios13.0-macabi
-CFLAGS_EXTRAS := -target $(TRIPLE)
-
-all: libfoo.dylib a.out
-
-libfoo.dylib: foo.c
-       $(MAKE) -f $(MAKEFILE_RULES) \
-               DYLIB_ONLY=YES DYLIB_NAME=foo DYLIB_C_SOURCES=foo.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/macabi/TestMacABImacOSFramework.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/macabi/TestMacABImacOSFramework.py
deleted file mode 100644 (file)
index 23b2677..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-# TestMacABImacOSFramework.py
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-import lldbsuite.test.lldbutil as lldbutil
-import os
-import unittest2
-
-
-class TestMacABImacOSFramework(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIf(macos_version=["<", "10.15"])
-    @skipUnlessDarwin
-    @skipIfDarwinEmbedded
-    # There is a Clang driver change missing on llvm.org.
-    @expectedFailureAll(bugnumber="rdar://problem/54986190>")
-    def test_macabi(self):
-        """Test the x86_64-apple-ios-macabi target linked against a macos dylib"""
-        self.build()
-        lldbutil.run_to_source_breakpoint(self, "break here",
-                                          lldb.SBFileSpec('main.c'))
-        self.expect("image list -t -b",
-                    patterns=["x86_64.*-apple-ios.*-macabi a\.out",
-                              "x86_64.*-apple-macosx.* libfoo.dylib[^(]"])
-        self.expect("fr v s", "Hello MacABI")
-        self.expect("p s", "Hello MacABI")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/macabi/foo.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/macabi/foo.c
deleted file mode 100644 (file)
index 9c29d59..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#include "foo.h"
-
-void stop() {}
-
-int foo() {
-  stop();
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/macabi/foo.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/macabi/foo.h
deleted file mode 100644 (file)
index 5d5f8f0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-int foo();
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/macabi/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/macabi/main.c
deleted file mode 100644 (file)
index 92069d9..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#include "foo.h"
-int main() {
-  const char *s = "Hello MacABI!";
-  return foo(); // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/nslog/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/nslog/Makefile
deleted file mode 100644 (file)
index a68dad5..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-OBJC_SOURCES := main.m
-LD_EXTRAS = -framework Foundation
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/nslog/TestDarwinNSLogOutput.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/nslog/TestDarwinNSLogOutput.py
deleted file mode 100644 (file)
index 2ab217d..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-"""
-Test DarwinLog "source include debug-level" functionality provided by the
-StructuredDataDarwinLog plugin.
-
-These tests are currently only supported when running against Darwin
-targets.
-"""
-
-
-import lldb
-import platform
-import re
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbtest_config
-
-
-class DarwinNSLogOutputTestCase(TestBase):
-    NO_DEBUG_INFO_TESTCASE = True
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    @skipIfRemote   # this test is currently written using lldb commands & assumes running on local system
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        self.child = None
-        self.child_prompt = '(lldb) '
-        self.strict_sources = False
-
-        # Source filename.
-        self.source = 'main.m'
-
-        # Output filename.
-        self.exe_name = self.getBuildArtifact("a.out")
-        self.d = {'OBJC_SOURCES': self.source, 'EXE': self.exe_name}
-
-        # Locate breakpoint.
-        self.line = line_number(self.source, '// break here')
-
-    def tearDown(self):
-        # Shut down the process if it's still running.
-        if self.child:
-            self.runCmd('process kill')
-            self.expect_prompt()
-            self.runCmd('quit')
-
-        # Let parent clean up
-        super(DarwinNSLogOutputTestCase, self).tearDown()
-
-    def run_lldb_to_breakpoint(self, exe, source_file, line,
-                               settings_commands=None):
-        # Set self.child_prompt, which is "(lldb) ".
-        prompt = self.child_prompt
-
-        # So that the child gets torn down after the test.
-        import pexpect
-        import sys
-        if sys.version_info.major == 3:
-          self.child = pexpect.spawnu('%s %s %s' % (lldbtest_config.lldbExec,
-                                                    self.lldbOption, exe))
-        else:
-          self.child = pexpect.spawn('%s %s %s' % (lldbtest_config.lldbExec,
-                                                   self.lldbOption, exe))
-        child = self.child
-
-        # Turn on logging for what the child sends back.
-        if self.TraceOn():
-            child.logfile_read = sys.stdout
-
-        # Disable showing of source lines at our breakpoint.
-        # This is necessary for the logging tests, because the very
-        # text we want to match for output from the running inferior
-        # will show up in the source as well.  We don't want the source
-        # output to erroneously make a match with our expected output.
-        self.runCmd("settings set stop-line-count-before 0")
-        self.expect_prompt()
-        self.runCmd("settings set stop-line-count-after 0")
-        self.expect_prompt()
-
-        # Run any test-specific settings commands now.
-        if settings_commands is not None:
-            for setting_command in settings_commands:
-                self.runCmd(setting_command)
-                self.expect_prompt()
-
-        # Set the breakpoint, and run to it.
-        child.sendline('breakpoint set -f %s -l %d' % (source_file, line))
-        child.expect_exact(prompt)
-        child.sendline('run')
-        child.expect_exact(prompt)
-
-        # Ensure we stopped at a breakpoint.
-        self.runCmd("thread list")
-        self.expect(re.compile(r"stop reason = .*breakpoint"))
-
-    def runCmd(self, cmd):
-        if self.child:
-            self.child.sendline(cmd)
-
-    def expect_prompt(self, exactly=True):
-        self.expect(self.child_prompt, exactly=exactly)
-
-    def expect(self, pattern, exactly=False, *args, **kwargs):
-        if exactly:
-            return self.child.expect_exact(pattern, *args, **kwargs)
-        return self.child.expect(pattern, *args, **kwargs)
-
-    def do_test(self, expect_regexes=None, settings_commands=None):
-        """ Run a test. """
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(dictionary=self.d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.run_lldb_to_breakpoint(exe, self.source, self.line,
-                                    settings_commands=settings_commands)
-        self.expect_prompt()
-
-        # Now go.
-        self.runCmd("process continue")
-        self.expect(expect_regexes)
-
-    def test_nslog_output_is_displayed(self):
-        """Test that NSLog() output shows up in the command-line debugger."""
-        self.do_test(expect_regexes=[
-            re.compile(r"(This is a message from NSLog)"),
-            re.compile(r"Process \d+ exited with status")
-        ])
-        self.assertIsNotNone(self.child.match)
-        self.assertGreater(len(self.child.match.groups()), 0)
-        self.assertEqual(
-            "This is a message from NSLog",
-            self.child.match.group(1))
-
-    def test_nslog_output_is_suppressed_with_env_var(self):
-        """Test that NSLog() output does not show up with the ignore env var."""
-        # This test will only work properly on macOS 10.12+.  Skip it on earlier versions.
-        # This will require some tweaking on iOS.
-        match = re.match(r"^\d+\.(\d+)", platform.mac_ver()[0])
-        if match is None or int(match.group(1)) < 12:
-            self.skipTest("requires macOS 10.12 or higher")
-
-        self.do_test(
-            expect_regexes=[
-                re.compile(r"(This is a message from NSLog)"),
-                re.compile(r"Process \d+ exited with status")
-            ],
-            settings_commands=[
-                "settings set target.env-vars "
-                "\"IDE_DISABLED_OS_ACTIVITY_DT_MODE=1\""
-            ])
-        self.assertIsNotNone(self.child.match)
-        self.assertEqual(len(self.child.match.groups()), 0)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/nslog/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/nslog/main.m
deleted file mode 100644 (file)
index d485364..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-//===-- main.m --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <Foundation/Foundation.h>
-
-int main(int argc, char** argv)
-{
-    printf("About to log\n"); // break here
-    NSLog(@"This is a message from NSLog");
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/order/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/order/Makefile
deleted file mode 100644 (file)
index ee67988..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-C_SOURCES := main.c
-LD_EXTRAS = -Xlinker -order_file -Xlinker $(SRCDIR)/order-file
-MAKE_DSYM := NO
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/order/TestOrderFile.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/order/TestOrderFile.py
deleted file mode 100644 (file)
index 778d06d..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-"""
-Test that debug symbols have the correct order as specified by the order file.
-"""
-
-
-
-import re
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class OrderFileTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    def test(self):
-        """Test debug symbols follow the correct order by the order file."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Test that the debug symbols have Function f3 before Function f1.
-        # Use "-s address" option to sort by address.
-        self.runCmd("image dump symtab -s address %s" % exe)
-        output = self.res.GetOutput()
-        mo_f3 = re.search("Code +.+f3", output)
-        mo_f1 = re.search("Code +.+f1", output)
-
-        # Match objects for f3 and f1 must exist and f3 must come before f1.
-        self.assertTrue(mo_f3 and mo_f1 and mo_f3.start() < mo_f1.start(),
-                        "Symbols have correct order by the order file")
-
-        self.runCmd("run", RUN_COMPLETED)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/order/cmds.txt b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/order/cmds.txt
deleted file mode 100644 (file)
index 8c51dd7..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-b main.c:41
-c
-lines -shlib a.out main.c
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/order/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/order/main.c
deleted file mode 100644 (file)
index 18ee776..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-
-int f1 (char *s);
-int f2 (char *s);
-int f3 (char *s);
-
-
-// We want f1 to start on line 20
-int f1 (char *s)
-{
-    return printf("f1: %s\n", s);
-}
-
-
-
-
-
-// We want f2 to start on line 30
-int f2 (char *s)
-{
-    return printf("f2: %s\n", s);
-}
-
-
-
-
-
-// We want f3 to start on line 40
-int f3 (char *s)
-{
-    return printf("f3: %s\n", s);
-}
-
-
-
-
-
-// We want main to start on line 50
-int main (int argc, const char * argv[])
-{
-    f1("carp");
-    f2("ding");
-    f3("dong");
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/order/order-file b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/order/order-file
deleted file mode 100644 (file)
index 0cf8ecd..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-main.o:_f3
-main.o:_main
-main.o:_f2
-main.o:_f1
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/queues/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/queues/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py
deleted file mode 100644 (file)
index 805ad21..0000000
+++ /dev/null
@@ -1,391 +0,0 @@
-"""Test queues inspection SB APIs."""
-
-from __future__ import print_function
-
-
-import unittest2
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestQueues(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    @add_test_categories(['pyapi'])
-    def test_with_python_api_queues(self):
-        """Test queues inspection SB APIs."""
-        self.build()
-        self.queues()
-
-    @skipUnlessDarwin
-    @add_test_categories(['pyapi'])
-    def test_with_python_api_queues_with_backtrace(self):
-        """Test queues inspection SB APIs."""
-        self.build()
-        self.queues_with_libBacktraceRecording()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers that we will step to in main:
-        self.main_source = "main.c"
-
-    def check_queue_for_valid_queue_id(self, queue):
-        self.assertTrue(
-            queue.GetQueueID() != 0, "Check queue %s for valid QueueID (got 0x%x)" %
-            (queue.GetName(), queue.GetQueueID()))
-
-    def check_running_and_pending_items_on_queue(
-            self, queue, expected_running, expected_pending):
-        self.assertTrue(
-            queue.GetNumPendingItems() == expected_pending,
-            "queue %s should have %d pending items, instead has %d pending items" %
-            (queue.GetName(),
-             expected_pending,
-             (queue.GetNumPendingItems())))
-        self.assertTrue(
-            queue.GetNumRunningItems() == expected_running,
-            "queue %s should have %d running items, instead has %d running items" %
-            (queue.GetName(),
-             expected_running,
-             (queue.GetNumRunningItems())))
-
-    def describe_threads(self):
-        desc = []
-        for x in self.inferior_process:
-            id = x.GetIndexID()
-            reason_str = lldbutil.stop_reason_to_str(x.GetStopReason())
-
-            location = "\t".join([lldbutil.get_description(
-                x.GetFrameAtIndex(i)) for i in range(x.GetNumFrames())])
-            desc.append(
-                "thread %d: %s (queue id: %s) at\n\t%s" %
-                (id, reason_str, x.GetQueueID(), location))
-        print('\n'.join(desc))
-
-    def check_number_of_threads_owned_by_queue(self, queue, number_threads):
-        if (queue.GetNumThreads() != number_threads):
-            self.describe_threads()
-
-        self.assertTrue(
-            queue.GetNumThreads() == number_threads,
-            "queue %s should have %d thread executing, but has %d" %
-            (queue.GetName(),
-             number_threads,
-             queue.GetNumThreads()))
-
-    def check_queue_kind(self, queue, kind):
-        expected_kind_string = "Unknown"
-        if kind == lldb.eQueueKindSerial:
-            expected_kind_string = "Serial queue"
-        if kind == lldb.eQueueKindConcurrent:
-            expected_kind_string = "Concurrent queue"
-        actual_kind_string = "Unknown"
-        if queue.GetKind() == lldb.eQueueKindSerial:
-            actual_kind_string = "Serial queue"
-        if queue.GetKind() == lldb.eQueueKindConcurrent:
-            actual_kind_string = "Concurrent queue"
-        self.assertTrue(
-            queue.GetKind() == kind,
-            "queue %s is expected to be a %s but it is actually a %s" %
-            (queue.GetName(),
-             expected_kind_string,
-             actual_kind_string))
-
-    def check_queues_threads_match_queue(self, queue):
-        for idx in range(0, queue.GetNumThreads()):
-            t = queue.GetThreadAtIndex(idx)
-            self.assertTrue(
-                t.IsValid(), "Queue %s's thread #%d must be valid" %
-                (queue.GetName(), idx))
-            self.assertTrue(
-                t.GetQueueID() == queue.GetQueueID(),
-                "Queue %s has a QueueID of %d but its thread #%d has a QueueID of %d" %
-                (queue.GetName(),
-                 queue.GetQueueID(),
-                 idx,
-                 t.GetQueueID()))
-            self.assertTrue(
-                t.GetQueueName() == queue.GetName(),
-                "Queue %s has a QueueName of %s but its thread #%d has a QueueName of %s" %
-                (queue.GetName(),
-                 queue.GetName(),
-                 idx,
-                 t.GetQueueName()))
-            self.assertTrue(
-                t.GetQueue().GetQueueID() == queue.GetQueueID(),
-                "Thread #%d's Queue's QueueID of %d is not the same as the QueueID of its owning queue %d" %
-                (idx,
-                 t.GetQueue().GetQueueID(),
-                    queue.GetQueueID()))
-
-    def queues(self):
-        """Test queues inspection SB APIs without libBacktraceRecording."""
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-        break1 = target.BreakpointCreateByName("stopper", 'a.out')
-        self.assertTrue(break1, VALID_BREAKPOINT)
-        process = target.LaunchSimple(
-            [], None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-        threads = lldbutil.get_threads_stopped_at_breakpoint(process, break1)
-        if len(threads) != 1:
-            self.fail("Failed to stop at breakpoint 1.")
-
-        self.inferior_process = process
-
-        queue_submittor_1 = lldb.SBQueue()
-        queue_performer_1 = lldb.SBQueue()
-        queue_performer_2 = lldb.SBQueue()
-        queue_performer_3 = lldb.SBQueue()
-        for idx in range(0, process.GetNumQueues()):
-            q = process.GetQueueAtIndex(idx)
-            if q.GetName() == "com.apple.work_submittor_1":
-                queue_submittor_1 = q
-            if q.GetName() == "com.apple.work_performer_1":
-                queue_performer_1 = q
-            if q.GetName() == "com.apple.work_performer_2":
-                queue_performer_2 = q
-            if q.GetName() == "com.apple.work_performer_3":
-                queue_performer_3 = q
-
-        self.assertTrue(
-            queue_submittor_1.IsValid() and queue_performer_1.IsValid() and queue_performer_2.IsValid() and queue_performer_3.IsValid(),
-            "Got all four expected queues: %s %s %s %s" %
-            (queue_submittor_1.IsValid(),
-             queue_performer_1.IsValid(),
-             queue_performer_2.IsValid(),
-             queue_performer_3.IsValid()))
-
-        self.check_queue_for_valid_queue_id(queue_submittor_1)
-        self.check_queue_for_valid_queue_id(queue_performer_1)
-        self.check_queue_for_valid_queue_id(queue_performer_2)
-        self.check_queue_for_valid_queue_id(queue_performer_3)
-
-        self.check_number_of_threads_owned_by_queue(queue_submittor_1, 1)
-        self.check_number_of_threads_owned_by_queue(queue_performer_1, 1)
-        self.check_number_of_threads_owned_by_queue(queue_performer_2, 1)
-        self.check_number_of_threads_owned_by_queue(queue_performer_3, 4)
-
-        self.check_queue_kind(queue_submittor_1, lldb.eQueueKindSerial)
-        self.check_queue_kind(queue_performer_1, lldb.eQueueKindSerial)
-        self.check_queue_kind(queue_performer_2, lldb.eQueueKindSerial)
-        self.check_queue_kind(queue_performer_3, lldb.eQueueKindConcurrent)
-
-        self.check_queues_threads_match_queue(queue_submittor_1)
-        self.check_queues_threads_match_queue(queue_performer_1)
-        self.check_queues_threads_match_queue(queue_performer_2)
-        self.check_queues_threads_match_queue(queue_performer_3)
-
-        # We have threads running with all the different dispatch QoS service
-        # levels - find those threads and check that we can get the correct
-        # QoS name for each of them.
-
-        user_initiated_thread = lldb.SBThread()
-        user_interactive_thread = lldb.SBThread()
-        utility_thread = lldb.SBThread()
-        unspecified_thread = lldb.SBThread()
-        background_thread = lldb.SBThread()
-        for th in process.threads:
-            if th.GetName() == "user initiated QoS":
-                user_initiated_thread = th
-            if th.GetName() == "user interactive QoS":
-                user_interactive_thread = th
-            if th.GetName() == "utility QoS":
-                utility_thread = th
-            if th.GetName() == "unspecified QoS":
-                unspecified_thread = th
-            if th.GetName() == "background QoS":
-                background_thread = th
-
-        self.assertTrue(
-            user_initiated_thread.IsValid(),
-            "Found user initiated QoS thread")
-        self.assertTrue(
-            user_interactive_thread.IsValid(),
-            "Found user interactive QoS thread")
-        self.assertTrue(utility_thread.IsValid(), "Found utility QoS thread")
-        self.assertTrue(
-            unspecified_thread.IsValid(),
-            "Found unspecified QoS thread")
-        self.assertTrue(
-            background_thread.IsValid(),
-            "Found background QoS thread")
-
-        stream = lldb.SBStream()
-        self.assertTrue(
-            user_initiated_thread.GetInfoItemByPathAsString(
-                "requested_qos.printable_name",
-                stream),
-            "Get QoS printable string for user initiated QoS thread")
-        self.assertTrue(
-            stream.GetData() == "User Initiated",
-            "user initiated QoS thread name is valid")
-        stream.Clear()
-        self.assertTrue(
-            user_interactive_thread.GetInfoItemByPathAsString(
-                "requested_qos.printable_name",
-                stream),
-            "Get QoS printable string for user interactive QoS thread")
-        self.assertTrue(
-            stream.GetData() == "User Interactive",
-            "user interactive QoS thread name is valid")
-        stream.Clear()
-        self.assertTrue(
-            utility_thread.GetInfoItemByPathAsString(
-                "requested_qos.printable_name",
-                stream),
-            "Get QoS printable string for utility QoS thread")
-        self.assertTrue(
-            stream.GetData() == "Utility",
-            "utility QoS thread name is valid")
-        stream.Clear()
-        self.assertTrue(
-            unspecified_thread.GetInfoItemByPathAsString(
-                "requested_qos.printable_name",
-                stream),
-            "Get QoS printable string for unspecified QoS thread")
-        qosName = stream.GetData()
-        self.assertTrue(
-            qosName == "User Initiated" or qosName == "Default",
-            "unspecified QoS thread name is valid")
-        stream.Clear()
-        self.assertTrue(
-            background_thread.GetInfoItemByPathAsString(
-                "requested_qos.printable_name",
-                stream),
-            "Get QoS printable string for background QoS thread")
-        self.assertTrue(
-            stream.GetData() == "Background",
-            "background QoS thread name is valid")
-
-    @skipIfDarwin # rdar://50379398
-    def queues_with_libBacktraceRecording(self):
-        """Test queues inspection SB APIs with libBacktraceRecording present."""
-        exe = self.getBuildArtifact("a.out")
-
-        if not os.path.isfile(
-                '/Applications/Xcode.app/Contents/Developer/usr/lib/libBacktraceRecording.dylib'):
-            self.skipTest(
-                "Skipped because libBacktraceRecording.dylib was present on the system.")
-
-        if not os.path.isfile(
-                '/usr/lib/system/introspection/libdispatch.dylib'):
-            self.skipTest(
-                "Skipped because introspection libdispatch dylib is not present.")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-
-        break1 = target.BreakpointCreateByName("stopper", 'a.out')
-        self.assertTrue(break1, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        libbtr_path = "/Applications/Xcode.app/Contents/Developer/usr/lib/libBacktraceRecording.dylib"
-        if self.getArchitecture() in ['arm', 'arm64', 'arm64e', 'arm64_32', 'armv7', 'armv7k']:
-            libbtr_path = "/Developer/usr/lib/libBacktraceRecording.dylib"
-
-        process = target.LaunchSimple(
-            [],
-            [
-                'DYLD_INSERT_LIBRARIES=%s' % (libbtr_path),
-                'DYLD_LIBRARY_PATH=/usr/lib/system/introspection'],
-            self.get_process_working_directory())
-
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        threads = lldbutil.get_threads_stopped_at_breakpoint(process, break1)
-        if len(threads) != 1:
-            self.fail("Failed to stop at breakpoint 1.")
-
-        self.inferior_process = process
-
-        libbtr_module_filespec = lldb.SBFileSpec("libBacktraceRecording.dylib")
-        libbtr_module = target.FindModule(libbtr_module_filespec)
-        if not libbtr_module.IsValid():
-            self.skipTest(
-                "Skipped because libBacktraceRecording.dylib was not loaded into the process.")
-
-        self.assertTrue(
-            process.GetNumQueues() >= 4,
-            "Found the correct number of queues.")
-
-        queue_submittor_1 = lldb.SBQueue()
-        queue_performer_1 = lldb.SBQueue()
-        queue_performer_2 = lldb.SBQueue()
-        queue_performer_3 = lldb.SBQueue()
-        for idx in range(0, process.GetNumQueues()):
-            q = process.GetQueueAtIndex(idx)
-            if "LLDB_COMMAND_TRACE" in os.environ:
-                print("Queue  with id %s has name %s" % (q.GetQueueID(), q.GetName()))
-            if q.GetName() == "com.apple.work_submittor_1":
-                queue_submittor_1 = q
-            if q.GetName() == "com.apple.work_performer_1":
-                queue_performer_1 = q
-            if q.GetName() == "com.apple.work_performer_2":
-                queue_performer_2 = q
-            if q.GetName() == "com.apple.work_performer_3":
-                queue_performer_3 = q
-            if q.GetName() == "com.apple.main-thread":
-                if q.GetNumThreads() == 0:
-                    print("Cannot get thread <=> queue associations")
-                    return
-
-        self.assertTrue(
-            queue_submittor_1.IsValid() and queue_performer_1.IsValid() and queue_performer_2.IsValid() and queue_performer_3.IsValid(),
-            "Got all four expected queues: %s %s %s %s" %
-            (queue_submittor_1.IsValid(),
-             queue_performer_1.IsValid(),
-             queue_performer_2.IsValid(),
-             queue_performer_3.IsValid()))
-
-        self.check_queue_for_valid_queue_id(queue_submittor_1)
-        self.check_queue_for_valid_queue_id(queue_performer_1)
-        self.check_queue_for_valid_queue_id(queue_performer_2)
-        self.check_queue_for_valid_queue_id(queue_performer_3)
-
-        self.check_running_and_pending_items_on_queue(queue_submittor_1, 1, 0)
-        self.check_running_and_pending_items_on_queue(queue_performer_1, 1, 3)
-        self.check_running_and_pending_items_on_queue(
-            queue_performer_2, 1, 9999)
-        self.check_running_and_pending_items_on_queue(queue_performer_3, 4, 0)
-
-        self.check_number_of_threads_owned_by_queue(queue_submittor_1, 1)
-        self.check_number_of_threads_owned_by_queue(queue_performer_1, 1)
-        self.check_number_of_threads_owned_by_queue(queue_performer_2, 1)
-        self.check_number_of_threads_owned_by_queue(queue_performer_3, 4)
-
-        self.check_queue_kind(queue_submittor_1, lldb.eQueueKindSerial)
-        self.check_queue_kind(queue_performer_1, lldb.eQueueKindSerial)
-        self.check_queue_kind(queue_performer_2, lldb.eQueueKindSerial)
-        self.check_queue_kind(queue_performer_3, lldb.eQueueKindConcurrent)
-
-        self.check_queues_threads_match_queue(queue_submittor_1)
-        self.check_queues_threads_match_queue(queue_performer_1)
-        self.check_queues_threads_match_queue(queue_performer_2)
-        self.check_queues_threads_match_queue(queue_performer_3)
-
-        self.assertTrue(queue_performer_2.GetPendingItemAtIndex(
-            0).IsValid(), "queue 2's pending item #0 is valid")
-        self.assertTrue(queue_performer_2.GetPendingItemAtIndex(0).GetAddress().GetSymbol(
-        ).GetName() == "doing_the_work_2", "queue 2's pending item #0 should be doing_the_work_2")
-        self.assertTrue(
-            queue_performer_2.GetNumPendingItems() == 9999,
-            "verify that queue 2 still has 9999 pending items")
-        self.assertTrue(queue_performer_2.GetPendingItemAtIndex(
-            9998).IsValid(), "queue 2's pending item #9998 is valid")
-        self.assertTrue(queue_performer_2.GetPendingItemAtIndex(9998).GetAddress().GetSymbol(
-        ).GetName() == "doing_the_work_2", "queue 2's pending item #0 should be doing_the_work_2")
-        self.assertTrue(queue_performer_2.GetPendingItemAtIndex(
-            9999).IsValid() == False, "queue 2's pending item #9999 is invalid")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/queues/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/queues/main.c
deleted file mode 100644 (file)
index 3978b92..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-#include <stdatomic.h>
-#include <string.h>
-#include <unistd.h>
-#include <dispatch/dispatch.h>
-#include <pthread.h>
-
-atomic_int finished_enqueueing_work = 0;
-atomic_int thread_count = 0;
-
-void
-doing_the_work_1(void *in)
-{
-    // This is only counted once because the first job in the queue
-    // starves all the others.
-    atomic_fetch_add(&thread_count, 1);
-    while (1)
-        sleep (1);
-}
-
-void
-submit_work_1a(void *in)
-{
-    dispatch_queue_t *work_performer_1 = (dispatch_queue_t*) in;
-    dispatch_async_f (*work_performer_1, NULL, doing_the_work_1);
-    dispatch_async_f (*work_performer_1, NULL, doing_the_work_1);
-}
-
-void
-submit_work_1b(void *in)
-{
-    dispatch_queue_t *work_performer_1 = (dispatch_queue_t*) in;
-    dispatch_async_f (*work_performer_1, NULL, doing_the_work_1);
-    dispatch_async_f (*work_performer_1, NULL, doing_the_work_1);
-    atomic_fetch_add(&thread_count, 1);
-    while (1)
-        sleep (1);
-}
-
-void
-doing_the_work_2(void *in)
-{
-    atomic_fetch_add(&thread_count, 1);
-    while (1)
-        sleep (1);
-}
-
-void
-submit_work_2(void *in)
-{
-    dispatch_queue_t *work_performer_2 = (dispatch_queue_t*) in;
-    int i = 0;
-    while (i++ < 5000)
-    {
-        dispatch_async_f (*work_performer_2, NULL, doing_the_work_2);
-        dispatch_async_f (*work_performer_2, NULL, doing_the_work_2);
-    }
-    atomic_fetch_add(&finished_enqueueing_work, 1);
-}
-
-
-void
-doing_the_work_3(void *in)
-{
-    // This counts four times, since the queue is marked as CONCURRENT.
-    atomic_fetch_add(&thread_count, 1);
-    while (1)
-        sleep (1);
-}
-
-void
-submit_work_3(void *in)
-{
-    dispatch_queue_t *work_performer_3 = (dispatch_queue_t*) in;
-    dispatch_async_f (*work_performer_3, NULL, doing_the_work_3);
-    dispatch_async_f (*work_performer_3, NULL, doing_the_work_3);
-    dispatch_async_f (*work_performer_3, NULL, doing_the_work_3);
-    dispatch_async_f (*work_performer_3, NULL, doing_the_work_3);
-}
-
-
-void
-stopper ()
-{
-    while (1)
-        sleep (1);
-}
-
-
-int main (int argc, const char **argv)
-{
-    dispatch_queue_t work_submittor_1 = dispatch_queue_create ("com.apple.work_submittor_1", DISPATCH_QUEUE_SERIAL);
-    dispatch_queue_t work_submittor_2 = dispatch_queue_create ("com.apple.work_submittor_and_quit_2", DISPATCH_QUEUE_SERIAL);
-    dispatch_queue_t work_submittor_3 = dispatch_queue_create ("com.apple.work_submittor_3", DISPATCH_QUEUE_SERIAL);
-
-    dispatch_queue_t work_performer_1 = dispatch_queue_create ("com.apple.work_performer_1", DISPATCH_QUEUE_SERIAL);
-    dispatch_queue_t work_performer_2 = dispatch_queue_create ("com.apple.work_performer_2", DISPATCH_QUEUE_SERIAL);
-
-    dispatch_queue_t work_performer_3 = dispatch_queue_create ("com.apple.work_performer_3", DISPATCH_QUEUE_CONCURRENT);
-
-    dispatch_async_f (work_submittor_1, (void*) &work_performer_1, submit_work_1a);
-    dispatch_async_f (work_submittor_1, (void*) &work_performer_1, submit_work_1b);
-
-    dispatch_async_f (work_submittor_2, (void*) &work_performer_2, submit_work_2);
-
-    dispatch_async_f (work_submittor_3, (void*) &work_performer_3, submit_work_3);
-
-
-    // Spin up threads with each of the different libdispatch QoS values.
-    dispatch_async (dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0), ^{
-            pthread_setname_np ("user initiated QoS");
-            atomic_fetch_add(&thread_count, 1);
-            while (1)
-                sleep (10);
-      });
-    dispatch_async (dispatch_get_global_queue(QOS_CLASS_USER_INTERACTIVE, 0), ^{
-            pthread_setname_np ("user interactive QoS");
-            atomic_fetch_add(&thread_count, 1);
-            while (1)
-                sleep (10);
-      });
-    dispatch_async (dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0), ^{
-            pthread_setname_np ("default QoS");
-            atomic_fetch_add(&thread_count, 1);
-            while (1)
-                sleep (10);
-      });
-    dispatch_async (dispatch_get_global_queue(QOS_CLASS_UTILITY, 0), ^{
-            pthread_setname_np ("utility QoS");
-            atomic_fetch_add(&thread_count, 1);
-            while (1)
-                sleep (10);
-      });
-    dispatch_async (dispatch_get_global_queue(QOS_CLASS_BACKGROUND, 0), ^{
-            pthread_setname_np ("background QoS");
-            atomic_fetch_add(&thread_count, 1);
-            while (1)
-                sleep (10);
-      });
-    dispatch_async (dispatch_get_global_queue(QOS_CLASS_UNSPECIFIED, 0), ^{
-            pthread_setname_np ("unspecified QoS");
-            atomic_fetch_add(&thread_count, 1);
-            while (1)
-                sleep (10);
-      });
-
-    // Unfortunately there is no pthread_barrier on darwin.
-    while ((atomic_load(&thread_count) < 13) || (finished_enqueueing_work == 0))
-        sleep (1);
-
-    stopper ();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/safe-to-func-call/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/safe-to-func-call/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/safe-to-func-call/TestSafeFuncCalls.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/safe-to-func-call/TestSafeFuncCalls.py
deleted file mode 100644 (file)
index fe6d748..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-"""Test function call thread safety."""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestSafeFuncCalls(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers that we will step to in main:
-        self.main_source = "main.c"
-
-    @skipUnlessDarwin
-    @add_test_categories(['pyapi'])
-    def test_with_python_api(self):
-        """Test function call thread safety."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-        break1 = target.BreakpointCreateByName("stopper", 'a.out')
-        self.assertTrue(break1, VALID_BREAKPOINT)
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-        threads = lldbutil.get_threads_stopped_at_breakpoint(process, break1)
-        if len(threads) != 1:
-            self.fail("Failed to stop at breakpoint 1.")
-
-        self.check_number_of_threads(process)
-
-        main_thread = lldb.SBThread()
-        select_thread = lldb.SBThread()
-        for idx in range(0, process.GetNumThreads()):
-            t = process.GetThreadAtIndex(idx)
-            if t.GetName() == "main thread":
-                main_thread = t
-            if t.GetName() == "select thread":
-                select_thread = t
-
-        self.assertTrue(
-            main_thread.IsValid() and select_thread.IsValid(),
-            "Got both expected threads")
-
-        self.safe_to_call_func_on_main_thread(main_thread)
-        self.safe_to_call_func_on_select_thread(select_thread)
-
-    def check_number_of_threads(self, process):
-        self.assertTrue(
-            process.GetNumThreads() == 2,
-            "Check that the process has two threads when sitting at the stopper() breakpoint")
-
-    def safe_to_call_func_on_main_thread(self, main_thread):
-        self.assertTrue(main_thread.SafeToCallFunctions(),
-                        "It is safe to call functions on the main thread")
-
-    def safe_to_call_func_on_select_thread(self, select_thread):
-        self.assertTrue(
-            select_thread.SafeToCallFunctions() == False,
-            "It is not safe to call functions on the select thread")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/safe-to-func-call/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/safe-to-func-call/main.c
deleted file mode 100644 (file)
index 5865008..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#include <sys/time.h>  // work around module map issue with iOS sdk, <rdar://problem/35159346> 
-#include <sys/select.h>
-#include <stdio.h>
-#include <pthread.h>
-#include <unistd.h>
-
-void *
-select_thread (void *in)
-{
-    pthread_setname_np ("select thread");
-    fd_set fdset;
-    FD_SET (STDIN_FILENO, &fdset);
-    while (1)
-        select (2, &fdset, NULL, NULL, NULL);
-    return NULL;
-}
-
-void stopper ()
-{
-    while (1)
-        sleep(1); // break here
-}
-
-int main ()
-{
-    pthread_setname_np ("main thread");
-    pthread_t other_thread;
-    pthread_create (&other_thread, NULL, select_thread, NULL);
-    sleep (1);
-    stopper();
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/thread-names/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/thread-names/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/thread-names/TestInterruptThreadNames.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/thread-names/TestInterruptThreadNames.py
deleted file mode 100644 (file)
index 2a27681..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-"""Test that we get thread names when interrupting a process."""
-
-
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestInterruptThreadNames(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    @add_test_categories(['pyapi'])
-    def test_with_python_api(self):
-        """Test that we get thread names when interrupting a process."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        launch_info = lldb.SBLaunchInfo(None)
-        error = lldb.SBError()
-        self.dbg.SetAsync(True)
-        process = target.Launch(launch_info, error)
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        listener = self.dbg.GetListener()
-        broadcaster = process.GetBroadcaster()
-        rc = broadcaster.AddListener(listener, lldb.SBProcess.eBroadcastBitStateChanged)
-        self.assertTrue(rc != 0, "Unable to add listener to process")
-        self.assertTrue(self.wait_for_running(process, listener), "Check that process is up and running")
-
-        inferior_set_up = self.wait_until_program_setup_complete(process, listener)
-
-        self.assertTrue(inferior_set_up.IsValid() and inferior_set_up.GetValueAsSigned() == 1, "Check that the program was able to create its threads within the allotted time")
-
-        self.check_number_of_threads(process)
-
-        main_thread = lldb.SBThread()
-        second_thread = lldb.SBThread()
-        third_thread = lldb.SBThread()
-        for idx in range(0, process.GetNumThreads()):
-            t = process.GetThreadAtIndex(idx)
-            if t.GetName() == "main thread":
-                main_thread = t
-            if t.GetName() == "second thread":
-                second_thread = t
-            if t.GetName() == "third thread":
-                third_thread = t
-
-        self.check_expected_threads_present(main_thread, second_thread, third_thread)
-
-        process.Kill()
-
-
-    # The process will set a global variable 'threads_up_and_running' to 1 when
-    # it has has completed its setup.  Sleep for one second, pause the program,
-    # check to see if the global has that value, and continue if it does not.
-    def wait_until_program_setup_complete(self, process, listener):
-        inferior_set_up = lldb.SBValue()
-        retry = 5
-        while retry > 0:
-            arch = self.getArchitecture()
-            # when running the testsuite against a remote arm device, it may take
-            # a little longer for the process to start up.  Use a "can't possibly take
-            # longer than this" value.
-            if arch == 'arm64' or arch == 'armv7':
-                time.sleep(10)
-            else:
-                time.sleep(1)
-            process.SendAsyncInterrupt()
-            self.assertTrue(self.wait_for_stop(process, listener), "Check that process is paused")
-            inferior_set_up = process.GetTarget().CreateValueFromExpression("threads_up_and_running", "threads_up_and_running")
-            if inferior_set_up.IsValid() and inferior_set_up.GetValueAsSigned() == 1:
-                retry = 0
-            else:
-                process.Continue()
-            retry = retry - 1
-        return inferior_set_up
-
-    # Listen to the process events until we get an event saying that the process is
-    # running.  Retry up to five times in case we get other events that are not
-    # what we're looking for.
-    def wait_for_running(self, process, listener):
-        retry_count = 5
-        if process.GetState() == lldb.eStateRunning:
-            return True
-
-        while retry_count > 0:
-            event = lldb.SBEvent()
-            listener.WaitForEvent(2, event)
-            if event.GetType() == lldb.SBProcess.eBroadcastBitStateChanged:
-                if process.GetState() == lldb.eStateRunning:
-                    return True
-            retry_count = retry_count - 1
-
-        return False
-
-    # Listen to the process events until we get an event saying the process is
-    # stopped.  Retry up to five times in case we get other events that we are
-    # not looking for.
-    def wait_for_stop(self, process, listener):
-        retry_count = 5
-        if process.GetState() == lldb.eStateStopped or process.GetState() == lldb.eStateCrashed or process.GetState() == lldb.eStateDetached or process.GetState() == lldb.eStateExited:
-            return True
-
-        while retry_count > 0:
-            event = lldb.SBEvent()
-            listener.WaitForEvent(2, event)
-            if event.GetType() == lldb.SBProcess.eBroadcastBitStateChanged:
-                if process.GetState() == lldb.eStateStopped or process.GetState() == lldb.eStateCrashed or process.GetState() == lldb.eStateDetached or process.GetState() == lldb.eStateExited:
-                    return True
-                if process.GetState() == lldb.eStateCrashed or process.GetState() == lldb.eStateDetached or process.GetState() == lldb.eStateExited:
-                    return False
-            retry_count = retry_count - 1
-
-        return False
-
-
-
-    def check_number_of_threads(self, process):
-        self.assertTrue(
-            process.GetNumThreads() == 3,
-            "Check that the process has three threads when sitting at the stopper() breakpoint")
-
-    def check_expected_threads_present(self, main_thread, second_thread, third_thread):
-        self.assertTrue(
-            main_thread.IsValid() and second_thread.IsValid() and third_thread.IsValid(),
-            "Got all three expected threads")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/thread-names/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/thread-names/main.c
deleted file mode 100644 (file)
index 6834f06..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#include <stdio.h>
-#include <pthread.h>
-#include <unistd.h>
-
-int threads_up_and_running = 0;
-
-void *
-second_thread (void *in)
-{
-    pthread_setname_np ("second thread");
-    while (1) 
-        sleep (1);
-    return NULL;
-}
-
-void *
-third_thread (void *in)
-{
-    pthread_setname_np ("third thread");
-    while (1) 
-        sleep (1);
-    return NULL;
-}
-
-int main ()
-{
-    pthread_setname_np ("main thread");
-    pthread_t other_thread;
-    pthread_create (&other_thread, NULL, second_thread, NULL);
-    pthread_create (&other_thread, NULL, third_thread, NULL);
-
-    threads_up_and_running = 1;
-
-    while (1)
-        sleep (1);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/universal/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/universal/Makefile
deleted file mode 100644 (file)
index efdeb1f..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-EXE := testit
-
-include Makefile.rules
-
-all: testit
-
-testit: testit.x86_64h testit.x86_64
-       lipo -create -o testit $^
-
-testit.x86_64h: testit.x86_64h.o
-       $(CC) -arch x86_64h -o testit.x86_64h $<
-
-testit.x86_64: testit.x86_64.o
-       $(CC) -arch x86_64 -o testit.x86_64 $<
-
-testit.x86_64h.o: main.c
-       $(CC) -g -O0 -arch x86_64h -c -o testit.x86_64h.o $<
-
-testit.x86_64.o: main.c
-       $(CC) -g -O0 -arch x86_64 -c -o testit.x86_64.o $<
-
-clean::
-       rm -rf $(wildcard testit* *~)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/universal/TestUniversal.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/universal/TestUniversal.py
deleted file mode 100644 (file)
index ebcdee8..0000000
+++ /dev/null
@@ -1,162 +0,0 @@
-"""Test aspects of lldb commands on universal binaries."""
-
-
-
-import unittest2
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-def haswellOrLater():
-    features = subprocess.check_output(["sysctl", "machdep.cpu"])
-    return "AVX2" in features.split()
-
-class UniversalTestCase(TestBase):
-
-    NO_DEBUG_INFO_TESTCASE = True
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line = line_number('main.c', '// Set break point at this line.')
-
-    @add_test_categories(['pyapi'])
-    @skipUnlessDarwin
-    @unittest2.skipUnless(hasattr(os, "uname") and os.uname()[4] in
-                          ['x86_64'], "requires x86_64")
-    @skipIfDarwinEmbedded # this test file assumes we're targetting an x86 system
-    def test_sbdebugger_create_target_with_file_and_target_triple(self):
-        """Test the SBDebugger.CreateTargetWithFileAndTargetTriple() API."""
-        # Invoke the default build rule.
-        self.build()
-
-        # Note that "testit" is a universal binary.
-        exe = self.getBuildArtifact("testit")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTargetWithFileAndTargetTriple(
-            exe, "x86_64-apple-macosx")
-        self.assertTrue(target, VALID_TARGET)
-        self.expect("image list -A -b", substrs=["x86_64 testit"])
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-    @skipUnlessDarwin
-    @unittest2.skipUnless(hasattr(os, "uname") and os.uname()[4] in
-                          ['x86_64'], "requires x86_64")
-    @skipIfDarwinEmbedded # this test file assumes we're targetting an x86 system
-    def test_process_launch_for_universal(self):
-        """Test process launch of a universal binary."""
-        from lldbsuite.test.lldbutil import print_registers
-
-        if not haswellOrLater():
-            return
-        
-        # Invoke the default build rule.
-        self.build()
-
-        # Note that "testit" is a universal binary.
-        exe = self.getBuildArtifact("testit")
-
-        # By default, x86_64 is assumed if no architecture is specified.
-        self.expect("file " + exe, CURRENT_EXECUTABLE_SET,
-                    startstr="Current executable set to ",
-                    substrs=["testit' (x86_64h)."])
-
-        # Break inside the main.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", self.line, num_expected_locations=1, loc_exact=True)
-
-        # We should be able to launch the x86_64h executable.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # Check whether we have a x86_64h process launched.
-        target = self.dbg.GetSelectedTarget()
-        process = target.GetProcess()
-        self.expect("image list -A -b", substrs=["x86_64h testit"])
-        self.runCmd("continue")
-
-        # Now specify x86_64 as the architecture for "testit".
-        self.expect("file -a x86_64 " + exe, CURRENT_EXECUTABLE_SET,
-                    startstr="Current executable set to ",
-                    substrs=["testit' (x86_64)."])
-
-        # Break inside the main.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", self.line, num_expected_locations=1, loc_exact=True)
-
-        # We should be able to launch the x86_64 executable as well.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # Check whether we have a x86_64 process launched.
-        
-        # FIXME: This wrong. We are expecting x86_64, but spawning a
-        # new process currently doesn't allow specifying a *sub*-architecture.
-        # <rdar://problem/46101466>
-        self.expect("image list -A -b", substrs=["x86_64h testit"])
-        self.runCmd("continue")
-
-    @skipUnlessDarwin
-    @unittest2.skipUnless(hasattr(os, "uname") and os.uname()[4] in
-                          ['x86_64'], "requires x86_64")
-    @skipIfDarwinEmbedded # this test file assumes we're targetting an x86 system
-    def test_process_attach_with_wrong_arch(self):
-        """Test that when we attach to a binary from the wrong fork of
-            a universal binary, we fix up the ABI correctly."""
-        if not haswellOrLater():
-            return
-
-        # Now keep the architecture at x86_64, but switch the binary
-        # we launch to x86_64h, and make sure on attach we switch to
-        # the correct architecture.
-
-        # Invoke the default build rule.
-        self.build()
-
-        # Note that "testit" is a universal binary.
-        exe = self.getBuildArtifact("testit")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTargetWithFileAndTargetTriple(
-            exe, "x86_64-apple-macosx")
-        self.assertTrue(target, VALID_TARGET)
-        self.expect("image list -A -b", substrs=["x86_64 testit"])
-
-        bkpt = target.BreakpointCreateBySourceRegex(
-            "sleep", lldb.SBFileSpec("main.c"))
-        self.assertTrue(bkpt.IsValid(), "Valid breakpoint")
-        self.assertTrue(
-            bkpt.GetNumLocations() >= 1,
-            "Our main breakpoint has locations.")
-
-        popen = self.spawnSubprocess(exe, ["keep_waiting"])
-        self.addTearDownHook(self.cleanupSubprocesses)
-
-        error = lldb.SBError()
-        empty_listener = lldb.SBListener()
-        process = target.AttachToProcessWithID(
-            empty_listener, popen.pid, error)
-        self.assertTrue(error.Success(), "Attached to process.")
-
-        self.expect("image list -A -b", substrs=["x86_64h testit"])
-
-        # It may seem odd to check the number of frames, but the bug
-        # that motivated this test was that we eventually fixed the
-        # architecture, but we left the ABI set to the original value.
-        # In that case, if you asked the process for its architecture,
-        # it would look right, but since the ABI was wrong,
-        # backtracing failed.
-
-        threads = lldbutil.continue_to_breakpoint(process, bkpt)
-        self.assertTrue(len(threads) == 1)
-        thread = threads[0]
-        self.assertTrue(
-            thread.GetNumFrames() > 1,
-            "We were able to backtrace.")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/universal/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/universal/main.c
deleted file mode 100644 (file)
index 3edab51..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-
-void
-call_me()
-{
-  sleep(1);
-}
-
-int
-main (int argc, char **argv)
-{
-  printf ("Hello there!\n"); // Set break point at this line.
-  if (argc == 2 && strcmp(argv[1], "keep_waiting") == 0)
-    while (1)
-      {
-        call_me();
-      }
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/version_zero/TestGetVersionZeroVersion.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/version_zero/TestGetVersionZeroVersion.py
deleted file mode 100644 (file)
index f7e4da7..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-"""
-Read in a library with a version number of 0.0.0, make sure we produce a good version.
-"""
-
-
-
-import lldb
-from lldbsuite.test import decorators
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbtest import *
-
-
-class TestGetVersionForZero(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # If your test case doesn't stress debug info, the
-    # set this to true.  That way it won't be run once for
-    # each debug info format.
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_get_version_zero(self):
-        """Read in a library with a version of 0.0.0.  Test SBModule::GetVersion"""
-        self.yaml2obj("libDylib.dylib.yaml", self.getBuildArtifact("libDylib.dylib"))
-        self.do_test()
-
-    def do_test(self):
-        lib_name = "libDylib.dylib"
-        target = lldbutil.run_to_breakpoint_make_target(self, exe_name=lib_name)
-        module = target.FindModule(lldb.SBFileSpec(lib_name))
-        self.assertTrue(module.IsValid(), "Didn't find the libDylib.dylib module")
-        # For now the actual version numbers are wrong for a library of 0.0.0
-        # but the previous code would crash iterating over the resultant
-        # list.  So we are testing that that doesn't happen.
-        did_iterate = False
-        for elem in module.GetVersion():
-            did_iterate = True
-        self.assertTrue(did_iterate, "Didn't get into the GetVersion loop")
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/version_zero/libDylib.dylib.yaml b/gnu/llvm/lldb/packages/Python/lldbsuite/test/macosx/version_zero/libDylib.dylib.yaml
deleted file mode 100644 (file)
index a672f49..0000000
+++ /dev/null
@@ -1,220 +0,0 @@
---- !mach-o
-FileHeader:      
-  magic:           0xFEEDFACF
-  cputype:         0x01000007
-  cpusubtype:      0x00000003
-  filetype:        0x00000006
-  ncmds:           12
-  sizeofcmds:      672
-  flags:           0x00100085
-  reserved:        0x00000000
-LoadCommands:    
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         232
-    segname:         __TEXT
-    vmaddr:          0
-    vmsize:          4096
-    fileoff:         0
-    filesize:        4096
-    maxprot:         5
-    initprot:        5
-    nsects:          2
-    flags:           0
-    Sections:        
-      - sectname:        __text
-        segname:         __TEXT
-        addr:            0x0000000000000FA0
-        size:            11
-        offset:          0x00000FA0
-        align:           4
-        reloff:          0x00000000
-        nreloc:          0
-        flags:           0x80000400
-        reserved1:       0x00000000
-        reserved2:       0x00000000
-        reserved3:       0x00000000
-      - sectname:        __unwind_info
-        segname:         __TEXT
-        addr:            0x0000000000000FAC
-        size:            72
-        offset:          0x00000FAC
-        align:           2
-        reloff:          0x00000000
-        nreloc:          0
-        flags:           0x00000000
-        reserved1:       0x00000000
-        reserved2:       0x00000000
-        reserved3:       0x00000000
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         __LINKEDIT
-    vmaddr:          4096
-    vmsize:          4096
-    fileoff:         4096
-    filesize:        528
-    maxprot:         1
-    initprot:        1
-    nsects:          0
-    flags:           0
-  - cmd:             LC_ID_DYLIB
-    cmdsize:         56
-    dylib:           
-      name:            24
-      timestamp:       1
-      current_version: 0
-      compatibility_version: 0
-    PayloadString:   '@executable_path/libDylib.dylib'
-    ZeroPadBytes:    1
-  - cmd:             LC_DYLD_INFO_ONLY
-    cmdsize:         48
-    rebase_off:      0
-    rebase_size:     0
-    bind_off:        0
-    bind_size:       0
-    weak_bind_off:   0
-    weak_bind_size:  0
-    lazy_bind_off:   0
-    lazy_bind_size:  0
-    export_off:      4096
-    export_size:     16
-  - cmd:             LC_SYMTAB
-    cmdsize:         24
-    symoff:          4120
-    nsyms:           10
-    stroff:          4280
-    strsize:         344
-  - cmd:             LC_DYSYMTAB
-    cmdsize:         80
-    ilocalsym:       0
-    nlocalsym:       8
-    iextdefsym:      8
-    nextdefsym:      1
-    iundefsym:       9
-    nundefsym:       1
-    tocoff:          0
-    ntoc:            0
-    modtaboff:       0
-    nmodtab:         0
-    extrefsymoff:    0
-    nextrefsyms:     0
-    indirectsymoff:  0
-    nindirectsyms:   0
-    extreloff:       0
-    nextrel:         0
-    locreloff:       0
-    nlocrel:         0
-  - cmd:             LC_UUID
-    cmdsize:         24
-    uuid:            5F76D8E3-7EA5-3092-8A9D-0D0E36429550
-  - cmd:             LC_BUILD_VERSION
-    cmdsize:         32
-    platform:        1
-    minos:           659200
-    sdk:             659200
-    ntools:          1
-    Tools:           
-      - tool:            3
-        version:         33227776
-  - cmd:             LC_SOURCE_VERSION
-    cmdsize:         16
-    version:         0
-  - cmd:             LC_LOAD_DYLIB
-    cmdsize:         56
-    dylib:           
-      name:            24
-      timestamp:       2
-      current_version: 83427328
-      compatibility_version: 65536
-    PayloadString:   '/usr/lib/libSystem.B.dylib'
-    ZeroPadBytes:    6
-  - cmd:             LC_FUNCTION_STARTS
-    cmdsize:         16
-    dataoff:         4112
-    datasize:        8
-  - cmd:             LC_DATA_IN_CODE
-    cmdsize:         16
-    dataoff:         4120
-    datasize:        0
-LinkEditData:    
-  ExportTrie:      
-    TerminalSize:    0
-    NodeOffset:      0
-    Name:            ''
-    Flags:           0x0000000000000000
-    Address:         0x0000000000000000
-    Other:           0x0000000000000000
-    ImportName:      ''
-    Children:        
-      - TerminalSize:    3
-        NodeOffset:      9
-        Name:            _func
-        Flags:           0x0000000000000000
-        Address:         0x0000000000000FA0
-        Other:           0x0000000000000000
-        ImportName:      ''
-  NameList:        
-    - n_strx:          25
-      n_type:          0x64
-      n_sect:          0
-      n_desc:          0
-      n_value:         0
-    - n_strx:          148
-      n_type:          0x64
-      n_sect:          0
-      n_desc:          0
-      n_value:         0
-    - n_strx:          156
-      n_type:          0x66
-      n_sect:          3
-      n_desc:          1
-      n_value:         1553735575
-    - n_strx:          1
-      n_type:          0x2E
-      n_sect:          1
-      n_desc:          0
-      n_value:         4000
-    - n_strx:          332
-      n_type:          0x24
-      n_sect:          1
-      n_desc:          0
-      n_value:         4000
-    - n_strx:          1
-      n_type:          0x24
-      n_sect:          0
-      n_desc:          0
-      n_value:         11
-    - n_strx:          1
-      n_type:          0x4E
-      n_sect:          1
-      n_desc:          0
-      n_value:         11
-    - n_strx:          1
-      n_type:          0x64
-      n_sect:          1
-      n_desc:          0
-      n_value:         0
-    - n_strx:          2
-      n_type:          0x0F
-      n_sect:          1
-      n_desc:          0
-      n_value:         4000
-    - n_strx:          8
-      n_type:          0x01
-      n_sect:          0
-      n_desc:          256
-      n_value:         0
-  StringTable:     
-    - ' '
-    - _func
-    - dyld_stub_binder
-    - '/Volumes/ThePlayground/Users/jingham/Work/LLDB/llvm-dot-org/lldb-clean/packages/Python/lldbsuite/test/macosx/version_zero/'
-    - dylib.c
-    - '/Volumes/ThePlayground/Users/jingham/Work/LLDB/llvm-dot-org/lldb-clean/test/lldb-test-build.noindex/macosx/version_zero/TestGetVersionZeroVersion.test_get_version_zero/dylib.o'
-    - _func
-    - ''
-    - ''
-    - ''
-    - ''
-    - ''
-    - ''
-...
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/.categories b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/.categories
deleted file mode 100644 (file)
index db8069c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-pyapi
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/breakpoint/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/breakpoint/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/breakpoint/TestBreakpointAPI.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/breakpoint/TestBreakpointAPI.py
deleted file mode 100644 (file)
index dd57846..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-"""
-Test SBBreakpoint APIs.
-"""
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class BreakpointAPITestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @add_test_categories(['pyapi'])
-    def test_breakpoint_is_valid(self):
-        """Make sure that if an SBBreakpoint gets deleted its IsValid returns false."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create a breakpoint on main.c by name 'AFunction'.
-        breakpoint = target.BreakpointCreateByName('AFunction', 'a.out')
-        #print("breakpoint:", breakpoint)
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        # Now delete it:
-        did_delete = target.BreakpointDelete(breakpoint.GetID())
-        self.assertTrue(
-            did_delete,
-            "Did delete the breakpoint we just created.")
-
-        # Make sure we can't find it:
-        del_bkpt = target.FindBreakpointByID(breakpoint.GetID())
-        self.assertTrue(not del_bkpt, "We did delete the breakpoint.")
-
-        # Finally make sure the original breakpoint is no longer valid.
-        self.assertTrue(
-            not breakpoint,
-            "Breakpoint we deleted is no longer valid.")
-
-    @add_test_categories(['pyapi'])
-    def test_target_delete(self):
-        """Make sure that if an SBTarget gets deleted the associated
-        Breakpoint's IsValid returns false."""
-
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create a breakpoint on main.c by name 'AFunction'.
-        breakpoint = target.BreakpointCreateByName('AFunction', 'a.out')
-        #print("breakpoint:", breakpoint)
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-        location = breakpoint.GetLocationAtIndex(0)
-        self.assertTrue(location.IsValid())
-
-        self.assertTrue(self.dbg.DeleteTarget(target))
-        self.assertFalse(breakpoint.IsValid())
-        self.assertFalse(location.IsValid())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/breakpoint/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/breakpoint/main.c
deleted file mode 100644 (file)
index 2677594..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#include <stdio.h>
-
-void
-AFunction()
-{
-  printf ("I am a function.\n");
-}
-
-int
-main ()
-{
-  AFunction();
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/class_members/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/class_members/Makefile
deleted file mode 100644 (file)
index 6f34ff7..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-OBJCXX_SOURCES := main.mm
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/class_members/TestSBTypeClassMembers.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/class_members/TestSBTypeClassMembers.py
deleted file mode 100644 (file)
index 884043a..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-"""
-Test SBType APIs to fetch member function types.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class SBTypeMemberFunctionsTest(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # We'll use the test method name as the exe_name.
-        self.exe_name = self.testMethodName
-        # Find the line number to break at.
-        self.source = 'main.mm'
-        self.line = line_number(self.source, '// set breakpoint here')
-
-    @skipUnlessDarwin
-    @add_test_categories(['pyapi'])
-    def test(self):
-        """Test SBType APIs to fetch member function types."""
-        d = {'EXE': self.exe_name}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        exe = self.getBuildArtifact(self.exe_name)
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Create the breakpoint inside function 'main'.
-        breakpoint = target.BreakpointCreateByLocation(self.source, self.line)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Get Frame #0.
-        self.assertTrue(process.GetState() == lldb.eStateStopped)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint condition")
-        frame0 = thread.GetFrameAtIndex(0)
-
-        variable = frame0.FindVariable("d")
-        Derived = variable.GetType()
-        Base = Derived.GetDirectBaseClassAtIndex(0).GetType()
-
-        self.assertEquals(2,
-            Derived.GetNumberOfMemberFunctions(),
-            "Derived declares two methods")
-        self.assertEquals("int", Derived.GetMemberFunctionAtIndex(0).GetType(
-            ).GetFunctionReturnType().GetName(),
-            "Derived::dImpl returns int")
-
-        self.assertEquals(4,
-            Base.GetNumberOfMemberFunctions(),
-            "Base declares three methods")
-        self.assertEquals(3, Base.GetMemberFunctionAtIndex(3).GetType(
-            ).GetFunctionArgumentTypes().GetSize(),
-            "Base::sfunc takes three arguments")
-        self.assertEquals("sfunc", Base.GetMemberFunctionAtIndex(
-            3).GetName(), "Base::sfunc not found")
-        self.assertEquals(lldb.eMemberFunctionKindStaticMethod,
-            Base.GetMemberFunctionAtIndex(3).GetKind(),
-            "Base::sfunc is a static")
-        self.assertEquals(0, Base.GetMemberFunctionAtIndex(2).GetType(
-            ).GetFunctionArgumentTypes().GetSize(),
-            "Base::dat takes no arguments")
-        self.assertEquals("char",
-            Base.GetMemberFunctionAtIndex(1).GetType().GetFunctionArgumentTypes(
-            ).GetTypeAtIndex(1).GetName(),
-            "Base::bar takes a second 'char' argument")
-        self.assertEquals("bar",
-            Base.GetMemberFunctionAtIndex(1).GetName(), "Base::bar not found")
-
-        variable = frame0.FindVariable("thingy")
-        Thingy = variable.GetType()
-
-        self.assertEquals(
-            2, Thingy.GetNumberOfMemberFunctions(),
-            "Thingy declares two methods")
-
-        self.assertEquals("id", Thingy.GetMemberFunctionAtIndex(
-            0).GetReturnType().GetName(), "Thingy::init returns an id")
-        self.assertEquals(2,
-            Thingy.GetMemberFunctionAtIndex(1).GetNumberOfArguments(),
-            "Thingy::foo takes two arguments")
-        self.assertEquals("int",
-            Thingy.GetMemberFunctionAtIndex(1).GetArgumentTypeAtIndex(
-            0).GetName(), "Thingy::foo takes an int")
-
-        self.assertEquals("Derived::dImpl()", Derived.GetMemberFunctionAtIndex(0).GetDemangledName())
-        self.assertEquals("Derived::baz(float)", Derived.GetMemberFunctionAtIndex(1).GetDemangledName())
-        self.assertEquals("Base::foo(int, int)", Base.GetMemberFunctionAtIndex(0).GetDemangledName())
-        self.assertEquals("Base::bar(int, char)", Base.GetMemberFunctionAtIndex(1).GetDemangledName())
-        self.assertEquals("Base::dat()", Base.GetMemberFunctionAtIndex(2).GetDemangledName())
-        self.assertEquals("Base::sfunc(char, int, float)", Base.GetMemberFunctionAtIndex(3).GetDemangledName())
-
-        self.assertEquals("_ZN7Derived5dImplEv", Derived.GetMemberFunctionAtIndex(0).GetMangledName())
-        self.assertEquals("_ZN7Derived3bazEf", Derived.GetMemberFunctionAtIndex(1).GetMangledName())
-        self.assertEquals("_ZN4Base3fooEii", Base.GetMemberFunctionAtIndex(0).GetMangledName())
-        self.assertEquals("_ZN4Base3barEic", Base.GetMemberFunctionAtIndex(1).GetMangledName())
-        self.assertEquals("_ZN4Base3datEv", Base.GetMemberFunctionAtIndex(2).GetMangledName())
-        self.assertEquals("_ZN4Base5sfuncEcif", Base.GetMemberFunctionAtIndex(3).GetMangledName())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/class_members/main.mm b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/class_members/main.mm
deleted file mode 100644 (file)
index 48a2c59..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#import <Foundation/Foundation.h>
-
-class Base {
-public:
-    int foo(int x, int y) { return 1; }
-    char bar(int x, char y) { return 2; }
-    void dat() {}
-    static int sfunc(char, int, float) { return 3; }
-};
-
-class Derived: public Base {
-protected:
-    int dImpl() { return 1; }
-public:
-    float baz(float b) { return b + 1.0; }
-};
-
-@interface Thingy: NSObject {
-}
-- (id)init;
-- (id)fooWithBar: (int)bar andBaz:(id)baz;
-@end
-
-@implementation Thingy {
-}
-- (id)init {
-    return (self = [super init]);
-}
-- (id)fooWithBar: (int)bar andBaz:(id)baz {
-    return nil;
-}
-@end
-
-int main() {
-    Derived d;
-    Thingy *thingy = [[Thingy alloc] init];
-    return 0; // set breakpoint here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/debugger/TestDebuggerAPI.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/debugger/TestDebuggerAPI.py
deleted file mode 100644 (file)
index 32202ac..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-"""
-Test Debugger APIs.
-"""
-
-import lldb
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class DebuggerAPITestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @add_test_categories(['pyapi'])
-    def test_debugger_api_boundary_condition(self):
-        """Exercise SBDebugger APIs with boundary conditions."""
-        self.dbg.HandleCommand(None)
-        self.dbg.SetDefaultArchitecture(None)
-        self.dbg.GetScriptingLanguage(None)
-        self.dbg.CreateTarget(None)
-        self.dbg.CreateTarget(None, None, None, True, lldb.SBError())
-        self.dbg.CreateTargetWithFileAndTargetTriple(None, None)
-        self.dbg.CreateTargetWithFileAndArch(None, None)
-        self.dbg.FindTargetWithFileAndArch(None, None)
-        self.dbg.SetInternalVariable(None, None, None)
-        self.dbg.GetInternalVariableValue(None, None)
-        # FIXME (filcab): We must first allow for the swig bindings to know if
-        # a Python callback is set. (Check python-typemaps.swig)
-        # self.dbg.SetLoggingCallback(None)
-        self.dbg.SetPrompt(None)
-        self.dbg.SetCurrentPlatform(None)
-        self.dbg.SetCurrentPlatformSDKRoot(None)
-        
-        fresh_dbg = lldb.SBDebugger()
-        self.assertEquals(len(fresh_dbg), 0)
-
-    @add_test_categories(['pyapi'])
-    def test_debugger_delete_invalid_target(self):
-        """SBDebugger.DeleteTarget() should not crash LLDB given and invalid target."""
-        target = lldb.SBTarget()
-        self.assertFalse(target.IsValid())
-        self.dbg.DeleteTarget(target)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py
deleted file mode 100644 (file)
index e002065..0000000
+++ /dev/null
@@ -1,398 +0,0 @@
-"""
-Test lldb Python API object's default constructor and make sure it is invalid
-after initial construction.
-
-There are also some cases of boundary condition testings sprinkled throughout
-the tests where None is passed to SB API which expects (const char *) in the
-C++ API counterpart.  Passing None should not crash lldb!
-
-There are three exceptions to the above general rules, though; API objects
-SBCommadnReturnObject, SBStream, and SBSymbolContextList, are all valid objects
-after default construction.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class APIDefaultConstructorTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @add_test_categories(['pyapi'])
-    def test_SBAddress(self):
-        obj = lldb.SBAddress()
-        if self.TraceOn():
-            print(obj)
-        self.assertFalse(obj)
-        # Do fuzz testing on the invalid obj, it should not crash lldb.
-        import sb_address
-        sb_address.fuzz_obj(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBBlock(self):
-        obj = lldb.SBBlock()
-        if self.TraceOn():
-            print(obj)
-        self.assertFalse(obj)
-        # Do fuzz testing on the invalid obj, it should not crash lldb.
-        import sb_block
-        sb_block.fuzz_obj(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBBreakpoint(self):
-        obj = lldb.SBBreakpoint()
-        if self.TraceOn():
-            print(obj)
-        self.assertFalse(obj)
-        # Do fuzz testing on the invalid obj, it should not crash lldb.
-        import sb_breakpoint
-        sb_breakpoint.fuzz_obj(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBBreakpointLocation(self):
-        obj = lldb.SBBreakpointLocation()
-        if self.TraceOn():
-            print(obj)
-        self.assertFalse(obj)
-        # Do fuzz testing on the invalid obj, it should not crash lldb.
-        import sb_breakpointlocation
-        sb_breakpointlocation.fuzz_obj(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBBreakpointName(self):
-        obj = lldb.SBBreakpointName()
-        if self.TraceOn():
-            print(obj)
-        self.assertFalse(obj)
-        # Do fuzz testing on the invalid obj, it should not crash lldb.
-        import sb_breakpointname
-        sb_breakpointname.fuzz_obj(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBBroadcaster(self):
-        obj = lldb.SBBroadcaster()
-        if self.TraceOn():
-            print(obj)
-        self.assertFalse(obj)
-        # Do fuzz testing on the invalid obj, it should not crash lldb.
-        import sb_broadcaster
-        sb_broadcaster.fuzz_obj(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBCommandReturnObject(self):
-        """SBCommandReturnObject object is valid after default construction."""
-        obj = lldb.SBCommandReturnObject()
-        if self.TraceOn():
-            print(obj)
-        self.assertTrue(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBCommunication(self):
-        obj = lldb.SBCommunication()
-        if self.TraceOn():
-            print(obj)
-        self.assertFalse(obj)
-        # Do fuzz testing on the invalid obj, it should not crash lldb.
-        import sb_communication
-        sb_communication.fuzz_obj(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBCompileUnit(self):
-        obj = lldb.SBCompileUnit()
-        if self.TraceOn():
-            print(obj)
-        self.assertFalse(obj)
-        # Do fuzz testing on the invalid obj, it should not crash lldb.
-        import sb_compileunit
-        sb_compileunit.fuzz_obj(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBDebugger(self):
-        obj = lldb.SBDebugger()
-        if self.TraceOn():
-            print(obj)
-        self.assertFalse(obj)
-        # Do fuzz testing on the invalid obj, it should not crash lldb.
-        import sb_debugger
-        sb_debugger.fuzz_obj(obj)
-
-    @add_test_categories(['pyapi'])
-    # darwin: This test passes with swig 3.0.2, fails w/3.0.5 other tests fail
-    # with 2.0.12 http://llvm.org/pr23488
-    def test_SBError(self):
-        obj = lldb.SBError()
-        if self.TraceOn():
-            print(obj)
-        self.assertFalse(obj)
-        # Do fuzz testing on the invalid obj, it should not crash lldb.
-        import sb_error
-        sb_error.fuzz_obj(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBEvent(self):
-        obj = lldb.SBEvent()
-        # This is just to test that typemap, as defined in lldb.swig, works.
-        obj2 = lldb.SBEvent(0, "abc")
-        if self.TraceOn():
-            print(obj)
-        self.assertFalse(obj)
-        # Do fuzz testing on the invalid obj, it should not crash lldb.
-        import sb_event
-        sb_event.fuzz_obj(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBFileSpec(self):
-        obj = lldb.SBFileSpec()
-        # This is just to test that FileSpec(None) does not crash.
-        obj2 = lldb.SBFileSpec(None, True)
-        if self.TraceOn():
-            print(obj)
-        self.assertFalse(obj)
-        # Do fuzz testing on the invalid obj, it should not crash lldb.
-        import sb_filespec
-        sb_filespec.fuzz_obj(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBFrame(self):
-        obj = lldb.SBFrame()
-        if self.TraceOn():
-            print(obj)
-        self.assertFalse(obj)
-        # Do fuzz testing on the invalid obj, it should not crash lldb.
-        import sb_frame
-        sb_frame.fuzz_obj(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBFunction(self):
-        obj = lldb.SBFunction()
-        if self.TraceOn():
-            print(obj)
-        self.assertFalse(obj)
-        # Do fuzz testing on the invalid obj, it should not crash lldb.
-        import sb_function
-        sb_function.fuzz_obj(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBFile(self):
-        sbf = lldb.SBFile()
-        self.assertFalse(sbf.IsValid())
-        self.assertFalse(bool(sbf))
-        e, n = sbf.Write(b'foo')
-        self.assertTrue(e.Fail())
-        self.assertEqual(n, 0)
-        buffer = bytearray(100)
-        e, n = sbf.Read(buffer)
-        self.assertEqual(n, 0)
-        self.assertTrue(e.Fail())
-
-    @add_test_categories(['pyapi'])
-    def test_SBInstruction(self):
-        obj = lldb.SBInstruction()
-        if self.TraceOn():
-            print(obj)
-        self.assertFalse(obj)
-        # Do fuzz testing on the invalid obj, it should not crash lldb.
-        import sb_instruction
-        sb_instruction.fuzz_obj(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBInstructionList(self):
-        obj = lldb.SBInstructionList()
-        if self.TraceOn():
-            print(obj)
-        self.assertFalse(obj)
-        # Do fuzz testing on the invalid obj, it should not crash lldb.
-        import sb_instructionlist
-        sb_instructionlist.fuzz_obj(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBLineEntry(self):
-        obj = lldb.SBLineEntry()
-        if self.TraceOn():
-            print(obj)
-        self.assertFalse(obj)
-        # Do fuzz testing on the invalid obj, it should not crash lldb.
-        import sb_lineentry
-        sb_lineentry.fuzz_obj(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBListener(self):
-        obj = lldb.SBListener()
-        if self.TraceOn():
-            print(obj)
-        self.assertFalse(obj)
-        # Do fuzz testing on the invalid obj, it should not crash lldb.
-        import sb_listener
-        sb_listener.fuzz_obj(obj)
-
-    @add_test_categories(['pyapi'])
-    # Py3 asserts due to a bug in SWIG.  Trying to upstream a patch to fix
-    # this in 3.0.8
-    @skipIf(py_version=['>=', (3, 0)], swig_version=['<', (3, 0, 8)])
-    def test_SBModule(self):
-        obj = lldb.SBModule()
-        if self.TraceOn():
-            print(obj)
-        self.assertFalse(obj)
-        # Do fuzz testing on the invalid obj, it should not crash lldb.
-        import sb_module
-        sb_module.fuzz_obj(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBProcess(self):
-        obj = lldb.SBProcess()
-        if self.TraceOn():
-            print(obj)
-        self.assertFalse(obj)
-        # Do fuzz testing on the invalid obj, it should not crash lldb.
-        import sb_process
-        sb_process.fuzz_obj(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBProcessInfo(self):
-        obj = lldb.SBProcessInfo()
-        if self.TraceOn():
-            print(obj)
-        self.assertFalse(obj)
-        # Do fuzz testing on the invalid obj, it should not crash lldb.
-        import sb_process_info
-        sb_process_info.fuzz_obj(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBSection(self):
-        obj = lldb.SBSection()
-        if self.TraceOn():
-            print(obj)
-        self.assertFalse(obj)
-        # Do fuzz testing on the invalid obj, it should not crash lldb.
-        import sb_section
-        sb_section.fuzz_obj(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBStream(self):
-        """SBStream object is valid after default construction."""
-        obj = lldb.SBStream()
-        if self.TraceOn():
-            print(obj)
-        self.assertTrue(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBStringList(self):
-        obj = lldb.SBStringList()
-        if self.TraceOn():
-            print(obj)
-        self.assertFalse(obj)
-        # Do fuzz testing on the invalid obj, it should not crash lldb.
-        import sb_stringlist
-        sb_stringlist.fuzz_obj(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBSymbol(self):
-        obj = lldb.SBSymbol()
-        if self.TraceOn():
-            print(obj)
-        self.assertFalse(obj)
-        # Do fuzz testing on the invalid obj, it should not crash lldb.
-        import sb_symbol
-        sb_symbol.fuzz_obj(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBSymbolContext(self):
-        obj = lldb.SBSymbolContext()
-        if self.TraceOn():
-            print(obj)
-        self.assertFalse(obj)
-        # Do fuzz testing on the invalid obj, it should not crash lldb.
-        import sb_symbolcontext
-        sb_symbolcontext.fuzz_obj(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBSymbolContextList(self):
-        """SBSymbolContextList object is valid after default construction."""
-        obj = lldb.SBSymbolContextList()
-        if self.TraceOn():
-            print(obj)
-        self.assertTrue(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBTarget(self):
-        obj = lldb.SBTarget()
-        if self.TraceOn():
-            print(obj)
-        self.assertFalse(obj)
-        # Do fuzz testing on the invalid obj, it should not crash lldb.
-        import sb_target
-        sb_target.fuzz_obj(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBThread(self):
-        obj = lldb.SBThread()
-        if self.TraceOn():
-            print(obj)
-        self.assertFalse(obj)
-        # Do fuzz testing on the invalid obj, it should not crash lldb.
-        import sb_thread
-        sb_thread.fuzz_obj(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBType(self):
-        try:
-            obj = lldb.SBType()
-            if self.TraceOn():
-                print(obj)
-            self.assertFalse(obj)
-            # If we reach here, the test fails.
-            self.fail("lldb.SBType() should fail, not succeed!")
-        except:
-            # Exception is expected.
-            return
-
-        # Unreachable code because lldb.SBType() should fail.
-        # Do fuzz testing on the invalid obj, it should not crash lldb.
-        import sb_type
-        sb_type.fuzz_obj(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBTypeList(self):
-        """SBTypeList object is valid after default construction."""
-        obj = lldb.SBTypeList()
-        if self.TraceOn():
-            print(obj)
-        self.assertTrue(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBValue(self):
-        obj = lldb.SBValue()
-        if self.TraceOn():
-            print(obj)
-        self.assertFalse(obj)
-        # Do fuzz testing on the invalid obj, it should not crash lldb.
-        import sb_value
-        sb_value.fuzz_obj(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBValueList(self):
-        obj = lldb.SBValueList()
-        if self.TraceOn():
-            print(obj)
-        self.assertFalse(obj)
-        # Do fuzz testing on the invalid obj, it should not crash lldb.
-        import sb_valuelist
-        sb_valuelist.fuzz_obj(obj)
-
-    @add_test_categories(['pyapi'])
-    def test_SBWatchpoint(self):
-        obj = lldb.SBWatchpoint()
-        if self.TraceOn():
-            print(obj)
-        self.assertFalse(obj)
-        # Do fuzz testing on the invalid obj, it should not crash lldb.
-        import sb_watchpoint
-        sb_watchpoint.fuzz_obj(obj)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_address.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_address.py
deleted file mode 100644 (file)
index 8f9665d..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import sys
-import lldb
-
-
-def fuzz_obj(obj):
-    obj.GetFileAddress()
-    obj.GetLoadAddress(lldb.SBTarget())
-    obj.SetLoadAddress(0xffff, lldb.SBTarget())
-    obj.OffsetAddress(sys.maxsize)
-    obj.GetDescription(lldb.SBStream())
-    obj.GetSection()
-    obj.GetSymbolContext(lldb.eSymbolContextEverything)
-    obj.GetModule()
-    obj.GetCompileUnit()
-    obj.GetFunction()
-    obj.GetBlock()
-    obj.GetSymbol()
-    obj.GetLineEntry()
-    obj.Clear()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_block.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_block.py
deleted file mode 100644 (file)
index 299ca08..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import lldb
-
-
-def fuzz_obj(obj):
-    obj.IsInlined()
-    obj.GetInlinedName()
-    obj.GetInlinedCallSiteFile()
-    obj.GetInlinedCallSiteLine()
-    obj.GetInlinedCallSiteColumn()
-    obj.GetParent()
-    obj.GetSibling()
-    obj.GetFirstChild()
-    obj.GetDescription(lldb.SBStream())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpoint.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpoint.py
deleted file mode 100644 (file)
index 3bdf587..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import sys
-import lldb
-
-
-def fuzz_obj(obj):
-    obj.GetID()
-    obj.ClearAllBreakpointSites()
-    obj.FindLocationByAddress(sys.maxsize)
-    obj.FindLocationIDByAddress(sys.maxsize)
-    obj.FindLocationByID(0)
-    obj.GetLocationAtIndex(0)
-    obj.SetEnabled(True)
-    obj.IsEnabled()
-    obj.GetHitCount()
-    obj.SetIgnoreCount(1)
-    obj.GetIgnoreCount()
-    obj.SetCondition("i >= 10")
-    obj.GetCondition()
-    obj.SetThreadID(0)
-    obj.GetThreadID()
-    obj.SetThreadIndex(0)
-    obj.GetThreadIndex()
-    obj.SetThreadName("worker thread")
-    obj.GetThreadName()
-    obj.SetQueueName("my queue")
-    obj.GetQueueName()
-    obj.SetScriptCallbackFunction(None)
-    obj.SetScriptCallbackBody(None)
-    obj.GetNumResolvedLocations()
-    obj.GetNumLocations()
-    obj.GetDescription(lldb.SBStream())
-    for bp_loc in obj:
-        s = str(bp_loc)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpointlocation.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpointlocation.py
deleted file mode 100644 (file)
index 5ac1c06..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import lldb
-
-
-def fuzz_obj(obj):
-    obj.GetAddress()
-    obj.GetLoadAddress()
-    obj.SetEnabled(True)
-    obj.IsEnabled()
-    obj.SetCondition("i >= 10")
-    obj.GetCondition()
-    obj.SetThreadID(0)
-    obj.GetThreadID()
-    obj.SetThreadIndex(0)
-    obj.GetThreadIndex()
-    obj.SetThreadName("worker thread")
-    obj.GetThreadName()
-    obj.SetQueueName("my queue")
-    obj.GetQueueName()
-    obj.IsResolved()
-    obj.GetDescription(lldb.SBStream(), lldb.eDescriptionLevelVerbose)
-    breakpoint = obj.GetBreakpoint()
-    # Do fuzz testing on the breakpoint obj, it should not crash lldb.
-    import sb_breakpoint
-    sb_breakpoint.fuzz_obj(breakpoint)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpointname.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpointname.py
deleted file mode 100644 (file)
index b32ed0d..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import lldb
-
-
-def fuzz_obj(obj):
-    obj.IsValid()
-    obj.GetName()
-    obj.SetEnabled(True)
-    obj.IsEnabled()
-    obj.SetOneShot(True)
-    obj.IsOneShot()
-    obj.SetIgnoreCount(1)
-    obj.GetIgnoreCount()
-    obj.SetCondition("1 == 2")
-    obj.GetCondition()
-    obj.SetAutoContinue(False)
-    obj.GetAutoContinue()
-    obj.SetThreadID(0x1234)
-    obj.GetThreadID()
-    obj.SetThreadIndex(10)
-    obj.GetThreadIndex()
-    obj.SetThreadName("AThread")
-    obj.GetThreadName()
-    obj.SetQueueName("AQueue")
-    obj.GetQueueName()
-    obj.SetScriptCallbackFunction("AFunction")
-    commands = lldb.SBStringList()
-    obj.SetCommandLineCommands(commands)
-    obj.GetCommandLineCommands(commands)
-    obj.SetScriptCallbackBody("Insert Python Code here")
-    obj.GetAllowList()
-    obj.SetAllowList(False)
-    obj.GetAllowDelete()
-    obj.SetAllowDelete(False)
-    obj.GetAllowDisable()
-    obj.SetAllowDisable(False)
-    stream = lldb.SBStream()
-    obj.GetDescription(stream)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_broadcaster.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_broadcaster.py
deleted file mode 100644 (file)
index 59491a7..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import lldb
-
-
-def fuzz_obj(obj):
-    obj.BroadcastEventByType(lldb.eBreakpointEventTypeInvalidType, True)
-    obj.BroadcastEvent(lldb.SBEvent(), False)
-    listener = lldb.SBListener("fuzz_testing")
-    obj.AddInitialEventsToListener(listener, 0xffffffff)
-    obj.AddInitialEventsToListener(listener, 0)
-    obj.AddListener(listener, 0xffffffff)
-    obj.AddListener(listener, 0)
-    obj.GetName()
-    obj.EventTypeHasListeners(0)
-    obj.RemoveListener(listener, 0xffffffff)
-    obj.RemoveListener(listener, 0)
-    obj.Clear()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_communication.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_communication.py
deleted file mode 100644 (file)
index 1f5aefb..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import lldb
-
-
-def fuzz_obj(obj):
-    broadcaster = obj.GetBroadcaster()
-    # Do fuzz testing on the broadcaster obj, it should not crash lldb.
-    import sb_broadcaster
-    sb_broadcaster.fuzz_obj(broadcaster)
-    obj.AdoptFileDesriptor(0, False)
-    obj.AdoptFileDesriptor(1, False)
-    obj.AdoptFileDesriptor(2, False)
-    obj.Connect("file:/tmp/myfile")
-    obj.Connect(None)
-    obj.Disconnect()
-    obj.IsConnected()
-    obj.GetCloseOnEOF()
-    obj.SetCloseOnEOF(True)
-    obj.SetCloseOnEOF(False)
-    #obj.Write(None, sys.maxint, None)
-    #obj.Read(None, sys.maxint, 0xffffffff, None)
-    obj.ReadThreadStart()
-    obj.ReadThreadStop()
-    obj.ReadThreadIsRunning()
-    obj.SetReadThreadBytesReceivedCallback(None, None)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_compileunit.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_compileunit.py
deleted file mode 100644 (file)
index 4caef33..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import lldb
-
-
-def fuzz_obj(obj):
-    obj.GetFileSpec()
-    obj.GetNumLineEntries()
-    obj.GetLineEntryAtIndex(0xffffffff)
-    obj.FindLineEntryIndex(0, 0xffffffff, None)
-    obj.GetDescription(lldb.SBStream())
-    len(obj)
-    for line_entry in obj:
-        s = str(line_entry)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_debugger.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_debugger.py
deleted file mode 100644 (file)
index e6267c8..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import lldb
-
-
-def fuzz_obj(obj):
-    obj.SetAsync(True)
-    obj.SetAsync(False)
-    obj.GetAsync()
-    obj.SkipLLDBInitFiles(True)
-    obj.SetInputFileHandle(None, True)
-    obj.SetOutputFileHandle(None, True)
-    obj.SetErrorFileHandle(None, True)
-    obj.GetInputFileHandle()
-    obj.GetOutputFileHandle()
-    obj.GetErrorFileHandle()
-    obj.GetCommandInterpreter()
-    obj.HandleCommand("nothing here")
-    listener = obj.GetListener()
-    try:
-        obj.HandleProcessEvent(lldb.SBProcess(), lldb.SBEvent(), None, None)
-    except Exception:
-        pass
-    obj.CreateTargetWithFileAndTargetTriple("a.out", "A-B-C")
-    obj.CreateTargetWithFileAndArch("b.out", "arm")
-    obj.CreateTarget("c.out")
-    obj.DeleteTarget(lldb.SBTarget())
-    obj.GetTargetAtIndex(0xffffffff)
-    obj.FindTargetWithProcessID(0)
-    obj.FindTargetWithFileAndArch("a.out", "arm")
-    obj.GetNumTargets()
-    obj.GetSelectedTarget()
-    obj.GetNumPlatforms()
-    obj.GetPlatformAtIndex(0xffffffff)
-    obj.GetNumAvailablePlatforms()
-    obj.GetAvailablePlatformInfoAtIndex(0xffffffff)
-    obj.GetSourceManager()
-    obj.SetSelectedTarget(lldb.SBTarget())
-    obj.SetCurrentPlatformSDKRoot("tmp/sdk-root")
-    try:
-        obj.DispatchInput(None)
-    except Exception:
-        pass
-    obj.DispatchInputInterrupt()
-    obj.DispatchInputEndOfFile()
-    obj.GetInstanceName()
-    obj.GetDescription(lldb.SBStream())
-    obj.GetTerminalWidth()
-    obj.SetTerminalWidth(0xffffffff)
-    obj.GetID()
-    obj.GetPrompt()
-    obj.SetPrompt("Hi, Mom!")
-    obj.GetScriptLanguage()
-    obj.SetScriptLanguage(lldb.eScriptLanguageNone)
-    obj.SetScriptLanguage(lldb.eScriptLanguagePython)
-    obj.GetCloseInputOnEOF()
-    obj.SetCloseInputOnEOF(True)
-    obj.SetCloseInputOnEOF(False)
-    obj.Clear()
-    for target in obj:
-        s = str(target)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_error.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_error.py
deleted file mode 100644 (file)
index 7d14c3e..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import lldb
-
-
-def fuzz_obj(obj):
-    obj.GetCString()
-    obj.Fail()
-    obj.Success()
-    obj.GetError()
-    obj.GetType()
-    obj.SetError(5, lldb.eErrorTypeGeneric)
-    obj.SetErrorToErrno()
-    obj.SetErrorToGenericError()
-    obj.SetErrorString("xyz")
-    obj.SetErrorString(None)
-    obj.SetErrorStringWithFormat("%s!", "error")
-    obj.SetErrorStringWithFormat(None)
-    obj.SetErrorStringWithFormat("error")
-    obj.SetErrorStringWithFormat("%s %s", "warning", "danger")
-    obj.SetErrorStringWithFormat("%s %s %s", "danger", "will", "robinson")
-    obj.GetDescription(lldb.SBStream())
-    obj.Clear()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_event.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_event.py
deleted file mode 100644 (file)
index aaf71d0..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import lldb
-
-
-def fuzz_obj(obj):
-    obj.GetDataFlavor()
-    obj.GetType()
-    broadcaster = obj.GetBroadcaster()
-    # Do fuzz testing on the broadcaster obj, it should not crash lldb.
-    import sb_broadcaster
-    sb_broadcaster.fuzz_obj(broadcaster)
-    obj.BroadcasterMatchesRef(broadcaster)
-    obj.GetDescription(lldb.SBStream())
-    obj.Clear()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_filespec.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_filespec.py
deleted file mode 100644 (file)
index 4ab5c49..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import lldb
-
-
-def fuzz_obj(obj):
-    obj.Exists()
-    obj.ResolveExecutableLocation()
-    obj.GetFilename()
-    obj.GetDirectory()
-    obj.GetPath(None, 0)
-    obj.GetDescription(lldb.SBStream())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_frame.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_frame.py
deleted file mode 100644 (file)
index b81f1af..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import lldb
-
-
-def fuzz_obj(obj):
-    obj.GetFrameID()
-    obj.GetPC()
-    obj.SetPC(0xffffffff)
-    obj.GetSP()
-    obj.GetFP()
-    obj.GetPCAddress()
-    obj.GetSymbolContext(0)
-    obj.GetModule()
-    obj.GetCompileUnit()
-    obj.GetFunction()
-    obj.GetSymbol()
-    obj.GetBlock()
-    obj.GetFunctionName()
-    obj.IsInlined()
-    obj.EvaluateExpression("x + y")
-    obj.EvaluateExpression("x + y", lldb.eDynamicCanRunTarget)
-    obj.GetFrameBlock()
-    obj.GetLineEntry()
-    obj.GetThread()
-    obj.Disassemble()
-    obj.GetVariables(True, True, True, True)
-    obj.GetVariables(True, True, True, False, lldb.eDynamicCanRunTarget)
-    obj.GetRegisters()
-    obj.FindVariable("my_var")
-    obj.FindVariable("my_var", lldb.eDynamicCanRunTarget)
-    obj.FindValue("your_var", lldb.eValueTypeVariableGlobal)
-    obj.FindValue(
-        "your_var",
-        lldb.eValueTypeVariableStatic,
-        lldb.eDynamicCanRunTarget)
-    obj.GetDescription(lldb.SBStream())
-    obj.Clear()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_function.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_function.py
deleted file mode 100644 (file)
index 764fb37..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import lldb
-
-
-def fuzz_obj(obj):
-    obj.GetName()
-    obj.GetMangledName()
-    obj.GetInstructions(lldb.SBTarget())
-    sa = obj.GetStartAddress()
-    ea = obj.GetEndAddress()
-    # Do fuzz testing on the address obj, it should not crash lldb.
-    import sb_address
-    sb_address.fuzz_obj(sa)
-    sb_address.fuzz_obj(ea)
-    obj.GetPrologueByteSize
-    obj.GetDescription(lldb.SBStream())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instruction.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instruction.py
deleted file mode 100644 (file)
index fbfb231..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import lldb
-
-
-def fuzz_obj(obj):
-    obj.GetAddress()
-    obj.GetByteSize()
-    obj.DoesBranch()
-    try:
-        obj.Print(None)
-    except Exception:
-        pass
-    obj.GetDescription(lldb.SBStream())
-    obj.EmulateWithFrame(lldb.SBFrame(), 0)
-    obj.DumpEmulation("armv7")
-    obj.TestEmulation(lldb.SBStream(), "my-file")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instructionlist.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instructionlist.py
deleted file mode 100644 (file)
index 9e7ebf9..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import lldb
-
-
-def fuzz_obj(obj):
-    obj.GetSize()
-    obj.GetInstructionAtIndex(0xffffffff)
-    obj.AppendInstruction(lldb.SBInstruction())
-    try:
-        obj.Print(None)
-    except Exception:
-        pass
-    obj.GetDescription(lldb.SBStream())
-    obj.DumpEmulationForAllInstructions("armv7")
-    obj.Clear()
-    for inst in obj:
-        s = str(inst)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_lineentry.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_lineentry.py
deleted file mode 100644 (file)
index 53761a0..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import lldb
-
-
-def fuzz_obj(obj):
-    obj.GetStartAddress()
-    obj.GetEndAddress()
-    obj.GetFileSpec()
-    obj.GetLine()
-    obj.GetColumn()
-    obj.GetDescription(lldb.SBStream())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_listener.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_listener.py
deleted file mode 100644 (file)
index b40cfd4..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import lldb
-
-
-def fuzz_obj(obj):
-    obj.AddEvent(lldb.SBEvent())
-    obj.StartListeningForEvents(lldb.SBBroadcaster(), 0xffffffff)
-    obj.StopListeningForEvents(lldb.SBBroadcaster(), 0xffffffff)
-    event = lldb.SBEvent()
-    broadcaster = lldb.SBBroadcaster()
-    obj.WaitForEvent(5, event)
-    obj.WaitForEventForBroadcaster(5, broadcaster, event)
-    obj.WaitForEventForBroadcasterWithType(5, broadcaster, 0xffffffff, event)
-    obj.PeekAtNextEvent(event)
-    obj.PeekAtNextEventForBroadcaster(broadcaster, event)
-    obj.PeekAtNextEventForBroadcasterWithType(broadcaster, 0xffffffff, event)
-    obj.GetNextEvent(event)
-    obj.GetNextEventForBroadcaster(broadcaster, event)
-    obj.GetNextEventForBroadcasterWithType(broadcaster, 0xffffffff, event)
-    obj.HandleBroadcastEvent(event)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_module.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_module.py
deleted file mode 100644 (file)
index 175550a..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import sys
-import lldb
-
-
-def fuzz_obj(obj):
-    obj.GetFileSpec()
-    obj.GetPlatformFileSpec()
-    obj.SetPlatformFileSpec(lldb.SBFileSpec())
-    obj.GetUUIDString()
-    obj.ResolveFileAddress(sys.maxsize)
-    obj.ResolveSymbolContextForAddress(lldb.SBAddress(), 0)
-    obj.GetDescription(lldb.SBStream())
-    obj.GetNumSymbols()
-    obj.GetSymbolAtIndex(sys.maxsize)
-    sc_list = obj.FindFunctions("my_func")
-    sc_list = obj.FindFunctions("my_func", lldb.eFunctionNameTypeAny)
-    obj.FindGlobalVariables(lldb.SBTarget(), "my_global_var", 1)
-    for section in obj.section_iter():
-        s = str(section)
-    for symbol in obj.symbol_in_section_iter(lldb.SBSection()):
-        s = str(symbol)
-    for symbol in obj:
-        s = str(symbol)
-    obj.GetAddressByteSize()
-    obj.GetByteOrder()
-    obj.GetTriple()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_process.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_process.py
deleted file mode 100644 (file)
index 93e43d4..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import lldb
-
-
-def fuzz_obj(obj):
-    obj.GetTarget()
-    obj.GetByteOrder()
-    obj.PutSTDIN("my data")
-    obj.GetSTDOUT(6)
-    obj.GetSTDERR(6)
-    event = lldb.SBEvent()
-    try:
-        obj.ReportEventState(event, None)
-    except Exception:
-        pass
-    obj.AppendEventStateReport(event, lldb.SBCommandReturnObject())
-    error = lldb.SBError()
-    obj.RemoteAttachToProcessWithID(123, error)
-    obj.RemoteLaunch(None, None, None, None, None, None, 0, False, error)
-    obj.GetNumThreads()
-    obj.GetThreadAtIndex(0)
-    obj.GetThreadByID(0)
-    obj.GetSelectedThread()
-    obj.SetSelectedThread(lldb.SBThread())
-    obj.SetSelectedThreadByID(0)
-    obj.GetState()
-    obj.GetExitStatus()
-    obj.GetExitDescription()
-    obj.GetProcessID()
-    obj.GetAddressByteSize()
-    obj.Destroy()
-    obj.Continue()
-    obj.Stop()
-    obj.Kill()
-    obj.Detach()
-    obj.Signal(7)
-    obj.ReadMemory(0x0000ffff, 10, error)
-    obj.WriteMemory(0x0000ffff, "hi data", error)
-    obj.ReadCStringFromMemory(0x0, 128, error)
-    obj.ReadUnsignedFromMemory(0xff, 4, error)
-    obj.ReadPointerFromMemory(0xff, error)
-    obj.GetBroadcaster()
-    obj.GetDescription(lldb.SBStream())
-    obj.LoadImage(lldb.SBFileSpec(), error)
-    obj.UnloadImage(0)
-    obj.Clear()
-    obj.GetNumSupportedHardwareWatchpoints(error)
-    for thread in obj:
-        s = str(thread)
-    len(obj)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_process_info.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_process_info.py
deleted file mode 100644 (file)
index 0c4562f..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import lldb
-
-
-def fuzz_obj(obj):
-    obj.IsValid()
-    obj.GetName()
-    obj.GetExecutableFile()
-    obj.GetProcessID()
-    obj.GetUserID()
-    obj.GetGroupID()
-    obj.UserIDIsValid()
-    obj.GroupIDIsValid()
-    obj.GetEffectiveUserID()
-    obj.GetEffectiveGroupID()
-    obj.EffectiveUserIDIsValid()
-    obj.EffectiveGroupIDIsValid()
-    obj.GetParentProcessID()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_section.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_section.py
deleted file mode 100644 (file)
index d611818..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import lldb
-
-
-def fuzz_obj(obj):
-    obj.IsValid()
-    obj.GetName()
-    obj.FindSubSection("hello_section_name")
-    obj.GetNumSubSections()
-    obj.GetSubSectionAtIndex(600)
-    obj.GetFileAddress()
-    obj.GetByteSize()
-    obj.GetFileOffset()
-    obj.GetFileByteSize()
-    obj.GetSectionData(1000, 100)
-    obj.GetSectionType()
-    obj.GetDescription(lldb.SBStream())
-    for subsec in obj:
-        s = str(subsec)
-    len(obj)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_stringlist.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_stringlist.py
deleted file mode 100644 (file)
index 015de7a..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import lldb
-
-
-def fuzz_obj(obj):
-    obj.AppendString("another string")
-    obj.AppendString(None)
-    obj.AppendList(None, 0)
-    obj.AppendList(lldb.SBStringList())
-    obj.GetSize()
-    obj.GetStringAtIndex(0xffffffff)
-    obj.Clear()
-    for n in obj:
-        s = str(n)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_symbol.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_symbol.py
deleted file mode 100644 (file)
index ce942a9..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import lldb
-
-
-def fuzz_obj(obj):
-    obj.GetName()
-    obj.GetMangledName()
-    obj.GetInstructions(lldb.SBTarget())
-    obj.GetStartAddress()
-    obj.GetEndAddress()
-    obj.GetPrologueByteSize()
-    obj.GetType()
-    obj.GetDescription(lldb.SBStream())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_symbolcontext.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_symbolcontext.py
deleted file mode 100644 (file)
index e46e471..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import lldb
-
-
-def fuzz_obj(obj):
-    obj.GetModule()
-    obj.GetCompileUnit()
-    obj.GetFunction()
-    obj.GetBlock()
-    obj.GetLineEntry()
-    obj.GetSymbol()
-    obj.GetDescription(lldb.SBStream())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_target.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_target.py
deleted file mode 100644 (file)
index 3b521dc..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import lldb
-
-
-def fuzz_obj(obj):
-    obj.GetProcess()
-    listener = lldb.SBListener()
-    error = lldb.SBError()
-    obj.Launch(listener, None, None, None, None, None, None, 0, True, error)
-    obj.LaunchSimple(None, None, None)
-    obj.AttachToProcessWithID(listener, 123, error)
-    obj.AttachToProcessWithName(listener, 'lldb', False, error)
-    obj.ConnectRemote(listener, "connect://to/here", None, error)
-    obj.GetExecutable()
-    obj.GetNumModules()
-    obj.GetModuleAtIndex(0xffffffff)
-    obj.GetDebugger()
-    filespec = lldb.SBFileSpec()
-    obj.FindModule(filespec)
-    sc_list = obj.FindFunctions("the_func")
-    sc_list = obj.FindFunctions("the_func", lldb.eFunctionNameTypeAny)
-    obj.FindFirstType("dont_care")
-    obj.FindTypes("dont_care")
-    obj.FindFirstType(None)
-    obj.GetInstructions(lldb.SBAddress(), bytearray())
-    obj.GetSourceManager()
-    obj.FindGlobalVariables("my_global_var", 1)
-    address = obj.ResolveLoadAddress(0xffff)
-    obj.ResolveSymbolContextForAddress(address, 0)
-    obj.BreakpointCreateByLocation("filename", 20)
-    obj.BreakpointCreateByLocation(filespec, 20)
-    obj.BreakpointCreateByName("func", None)
-    obj.BreakpointCreateByRegex("func.", None)
-    obj.BreakpointCreateByAddress(0xf0f0)
-    obj.GetNumBreakpoints()
-    obj.GetBreakpointAtIndex(0)
-    obj.BreakpointDelete(0)
-    obj.FindBreakpointByID(0)
-    obj.EnableAllBreakpoints()
-    obj.DisableAllBreakpoints()
-    obj.DeleteAllBreakpoints()
-    obj.GetNumWatchpoints()
-    obj.GetWatchpointAtIndex(0)
-    obj.DeleteWatchpoint(0)
-    obj.FindWatchpointByID(0)
-    obj.EnableAllWatchpoints()
-    obj.DisableAllWatchpoints()
-    obj.DeleteAllWatchpoints()
-    obj.GetAddressByteSize()
-    obj.GetByteOrder()
-    obj.GetTriple()
-    error = lldb.SBError()
-    obj.WatchAddress(123, 8, True, True, error)
-    obj.GetBroadcaster()
-    obj.GetDescription(lldb.SBStream(), lldb.eDescriptionLevelBrief)
-    obj.Clear()
-    for module in obj.module_iter():
-        s = str(module)
-    for bp in obj.breakpoint_iter():
-        s = str(bp)
-    for wp in obj.watchpoint_iter():
-        s = str(wp)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_thread.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_thread.py
deleted file mode 100644 (file)
index 0e5f944..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import lldb
-
-
-def fuzz_obj(obj):
-    obj.GetStopReason()
-    obj.GetStopReasonDataCount()
-    obj.GetStopReasonDataAtIndex(100)
-    obj.GetStopDescription(256)
-    obj.GetThreadID()
-    obj.GetIndexID()
-    obj.GetName()
-    obj.GetQueueName()
-    obj.StepOver(lldb.eOnlyDuringStepping)
-    obj.StepInto(lldb.eOnlyDuringStepping)
-    obj.StepOut()
-    frame = lldb.SBFrame()
-    obj.StepOutOfFrame(frame)
-    obj.StepInstruction(True)
-    filespec = lldb.SBFileSpec()
-    obj.StepOverUntil(frame, filespec, 1234)
-    obj.RunToAddress(0xabcd)
-    obj.Suspend()
-    obj.Resume()
-    obj.IsSuspended()
-    obj.GetNumFrames()
-    obj.GetFrameAtIndex(200)
-    obj.GetSelectedFrame()
-    obj.SetSelectedFrame(999)
-    obj.GetProcess()
-    obj.GetDescription(lldb.SBStream())
-    obj.Clear()
-    for frame in obj:
-        s = str(frame)
-    len(obj)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_type.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_type.py
deleted file mode 100644 (file)
index 54ab482..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import lldb
-
-
-def fuzz_obj(obj):
-    obj.GetName()
-    obj.GetByteSize()
-    # obj.GetEncoding(5)
-    obj.GetNumberChildren(True)
-    member = lldb.SBTypeMember()
-    obj.GetChildAtIndex(True, 0, member)
-    obj.GetChildIndexForName(True, "_member_field")
-    obj.IsAPointerType()
-    obj.GetPointeeType()
-    obj.GetDescription(lldb.SBStream())
-    obj.IsPointerType(None)
-    lldb.SBType.IsPointerType(None)
-    for child_type in obj:
-        s = str(child_type)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_value.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_value.py
deleted file mode 100644 (file)
index 9e31a70..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import lldb
-
-
-def fuzz_obj(obj):
-    obj.GetError()
-    obj.GetID()
-    obj.GetName()
-    obj.GetTypeName()
-    obj.GetByteSize()
-    obj.IsInScope()
-    obj.GetFormat()
-    obj.SetFormat(lldb.eFormatBoolean)
-    obj.GetValue()
-    obj.GetValueType()
-    obj.GetValueDidChange()
-    obj.GetSummary()
-    obj.GetObjectDescription()
-    obj.GetLocation()
-    obj.SetValueFromCString("my_new_value")
-    obj.GetChildAtIndex(1)
-    obj.GetChildAtIndex(2, lldb.eNoDynamicValues, False)
-    obj.GetIndexOfChildWithName("my_first_child")
-    obj.GetChildMemberWithName("my_first_child")
-    obj.GetChildMemberWithName("my_first_child", lldb.eNoDynamicValues)
-    obj.GetNumChildren()
-    obj.GetOpaqueType()
-    obj.Dereference()
-    obj.TypeIsPointerType()
-    stream = lldb.SBStream()
-    obj.GetDescription(stream)
-    obj.GetExpressionPath(stream)
-    obj.GetExpressionPath(stream, True)
-    error = lldb.SBError()
-    obj.Watch(True, True, False, error)
-    obj.WatchPointee(True, False, True, error)
-    for child_val in obj:
-        s = str(child_val)
-    error = lldb.SBError()
-    obj.GetValueAsSigned(error, 0)
-    obj.GetValueAsUnsigned(error, 0)
-    obj.GetValueAsSigned(0)
-    obj.GetValueAsUnsigned(0)
-    obj.GetDynamicValue(lldb.eNoDynamicValues)
-    obj.GetStaticValue()
-    obj.IsDynamic()
-    invalid_type = lldb.SBType()
-    obj.CreateChildAtOffset("a", 12, invalid_type)
-    obj.Cast(invalid_type)
-    obj.CreateValueFromExpression("pt->x", "pt->x")
-    obj.CreateValueFromAddress("x", 0x123, invalid_type)
-    invalid_data = lldb.SBData()
-    obj.CreateValueFromData("x", invalid_data, invalid_type)
-    obj.GetValueForExpressionPath("[0]")
-    obj.AddressOf()
-    obj.GetLoadAddress()
-    obj.GetAddress()
-    obj.GetPointeeData(0, 1)
-    obj.GetData()
-    obj.GetTarget()
-    obj.GetProcess()
-    obj.GetThread()
-    obj.GetFrame()
-    obj.GetType()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_valuelist.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_valuelist.py
deleted file mode 100644 (file)
index f20c877..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import lldb
-
-
-def fuzz_obj(obj):
-    obj.Append(lldb.SBValue())
-    obj.GetSize()
-    obj.GetValueAtIndex(100)
-    obj.FindValueObjectByUID(200)
-    for val in obj:
-        s = str(val)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_watchpoint.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_watchpoint.py
deleted file mode 100644 (file)
index 8aa3812..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-"""
-Fuzz tests an object after the default construction to make sure it does not crash lldb.
-"""
-
-import lldb
-
-
-def fuzz_obj(obj):
-    obj.GetID()
-    obj.IsValid()
-    obj.GetHardwareIndex()
-    obj.GetWatchAddress()
-    obj.GetWatchSize()
-    obj.SetEnabled(True)
-    obj.IsEnabled()
-    obj.GetHitCount()
-    obj.GetIgnoreCount()
-    obj.SetIgnoreCount(5)
-    obj.GetDescription(lldb.SBStream(), lldb.eDescriptionLevelVerbose)
-    obj.SetCondition("shouldWeStop()")
-    obj.GetCondition()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassembleRawData.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassembleRawData.py
deleted file mode 100644 (file)
index 8e2bc4a..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-"""
-Use lldb Python API to disassemble raw machine code bytes
-"""
-
-from __future__ import print_function
-
-
-import re
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class DisassembleRawDataTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(['pyapi'])
-    @no_debug_info_test
-    @skipIfRemote
-    def test_disassemble_raw_data(self):
-        """Test disassembling raw bytes with the API."""
-        # Create a target from the debugger.
-        arch = self.getArchitecture()
-        if re.match("mips*el", arch):
-            target = self.dbg.CreateTargetWithFileAndTargetTriple("", "mipsel")
-            raw_bytes = bytearray([0x21, 0xf0, 0xa0, 0x03])
-        elif re.match("mips", arch):
-            target = self.dbg.CreateTargetWithFileAndTargetTriple("", "mips")
-            raw_bytes = bytearray([0x03, 0xa0, 0xf0, 0x21])
-        elif re.match("powerpc64le", arch):
-            target = self.dbg.CreateTargetWithFileAndTargetTriple("", "powerpc64le")
-            raw_bytes = bytearray([0x00, 0x00, 0x80, 0x38])
-        else:
-            target = self.dbg.CreateTargetWithFileAndTargetTriple("", "x86_64")
-            raw_bytes = bytearray([0x48, 0x89, 0xe5])
-
-        self.assertTrue(target, VALID_TARGET)
-        insts = target.GetInstructions(lldb.SBAddress(0, target), raw_bytes)
-
-        inst = insts.GetInstructionAtIndex(0)
-
-        if self.TraceOn():
-            print()
-            print("Raw bytes:    ", [hex(x) for x in raw_bytes])
-            print("Disassembled%s" % str(inst))
-        if re.match("mips", arch):
-            self.assertTrue(inst.GetMnemonic(target) == "move")
-            self.assertTrue(inst.GetOperands(target) ==
-                            '$' + "fp, " + '$' + "sp")
-        elif re.match("powerpc64le", arch):
-            self.assertTrue(inst.GetMnemonic(target) == "li")
-            self.assertTrue(inst.GetOperands(target) == "4, 0")
-        else:
-            self.assertTrue(inst.GetMnemonic(target) == "movq")
-            self.assertTrue(inst.GetOperands(target) ==
-                            '%' + "rsp, " + '%' + "rbp")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py
deleted file mode 100644 (file)
index e4d085d..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-"""
-Use lldb Python API to disassemble raw machine code bytes
-"""
-
-from __future__ import print_function
-
-from io import StringIO
-import sys
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class Disassemble_VST1_64(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(['pyapi'])
-    @no_debug_info_test
-    @skipIfLLVMTargetMissing("ARM")
-    def test_disassemble_invalid_vst_1_64_raw_data(self):
-        """Test disassembling invalid vst1.64 raw bytes with the API."""
-        # Create a target from the debugger.
-        target = self.dbg.CreateTargetWithFileAndTargetTriple("", "thumbv7-apple-macosx")
-        self.assertTrue(target, VALID_TARGET)
-
-        raw_bytes = bytearray([0xf0, 0xb5, 0x03, 0xaf,
-                               0x2d, 0xe9, 0x00, 0x0d,
-                               0xad, 0xf1, 0x40, 0x04,
-                               0x24, 0xf0, 0x0f, 0x04,
-                               0xa5, 0x46])
-
-        assembly = """
-        push   {r4, r5, r6, r7, lr}
-        add    r7, sp, #0xc
-        push.w {r8, r10, r11}
-        sub.w  r4, sp, #0x40
-        bic    r4, r4, #0xf
-        mov    sp, r4
-        """
-        def split(s):
-            return [x.strip() for x in s.strip().splitlines()]
-
-        insts = target.GetInstructions(lldb.SBAddress(), raw_bytes)
-
-        if self.TraceOn():
-            print()
-            for i in insts:
-                print("Disassembled %s" % str(i))
-
-        if sys.version_info.major >= 3:
-            sio = StringIO()
-            insts.Print(sio)
-            self.assertEqual(split(assembly), split(sio.getvalue()))
-
-        self.assertEqual(insts.GetSize(), len(split(assembly)))
-
-        if sys.version_info.major >= 3:
-            for i,asm in enumerate(split(assembly)):
-                inst = insts.GetInstructionAtIndex(i)
-                sio = StringIO()
-                inst.Print(sio)
-                self.assertEqual(asm, sio.getvalue().strip())
-
-        raw_bytes = bytearray([0x04, 0xf9, 0xed, 0x82])
-
-        insts = target.GetInstructions(lldb.SBAddress(), raw_bytes)
-
-        inst = insts.GetInstructionAtIndex(0)
-
-        if self.TraceOn():
-            print()
-            print("Raw bytes:    ", [hex(x) for x in raw_bytes])
-            print("Disassembled%s" % str(inst))
-
-        self.assertTrue(inst.GetMnemonic(target) == "vst1.64")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/event/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/event/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/event/TestEvents.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/event/TestEvents.py
deleted file mode 100644 (file)
index 97ebe8f..0000000
+++ /dev/null
@@ -1,316 +0,0 @@
-"""
-Test lldb Python event APIs.
-"""
-
-from __future__ import print_function
-
-
-import re
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-@skipIfLinux   # llvm.org/pr25924, sometimes generating SIGSEGV
-@skipIfDarwin
-class EventAPITestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to of function 'c'.
-        self.line = line_number(
-            'main.c', '// Find the line number of function "c" here.')
-
-    @add_test_categories(['pyapi'])
-    @expectedFailureAll(
-        oslist=["linux"],
-        bugnumber="llvm.org/pr23730 Flaky, fails ~1/10 cases")
-    @skipIfWindows # This is flakey on Windows AND when it fails, it hangs: llvm.org/pr38373
-    @skipIfNetBSD
-    def test_listen_for_and_print_event(self):
-        """Exercise SBEvent API."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        self.dbg.SetAsync(True)
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create a breakpoint on main.c by name 'c'.
-        breakpoint = target.BreakpointCreateByName('c', 'a.out')
-
-        listener = lldb.SBListener("my listener")
-
-        # Now launch the process, and do not stop at the entry point.
-        error = lldb.SBError()
-        process = target.Launch(listener,
-                                None,      # argv
-                                None,      # envp
-                                None,      # stdin_path
-                                None,      # stdout_path
-                                None,      # stderr_path
-                                None,      # working directory
-                                0,         # launch flags
-                                False,     # Stop at entry
-                                error)     # error
-
-        self.assertTrue(
-            process.GetState() == lldb.eStateStopped,
-            PROCESS_STOPPED)
-
-        # Create an empty event object.
-        event = lldb.SBEvent()
-
-        traceOn = self.TraceOn()
-        if traceOn:
-            lldbutil.print_stacktraces(process)
-
-        # Create MyListeningThread class to wait for any kind of event.
-        import threading
-
-        class MyListeningThread(threading.Thread):
-
-            def run(self):
-                count = 0
-                # Let's only try at most 4 times to retrieve any kind of event.
-                # After that, the thread exits.
-                while not count > 3:
-                    if traceOn:
-                        print("Try wait for event...")
-                    if listener.WaitForEvent(5, event):
-                        if traceOn:
-                            desc = lldbutil.get_description(event)
-                            print("Event description:", desc)
-                            print("Event data flavor:", event.GetDataFlavor())
-                            print(
-                                "Process state:",
-                                lldbutil.state_type_to_str(
-                                    process.GetState()))
-                            print()
-                    else:
-                        if traceOn:
-                            print("timeout occurred waiting for event...")
-                    count = count + 1
-                listener.Clear()
-                return
-
-        # Let's start the listening thread to retrieve the events.
-        my_thread = MyListeningThread()
-        my_thread.start()
-
-        # Use Python API to continue the process.  The listening thread should be
-        # able to receive the state changed events.
-        process.Continue()
-
-        # Use Python API to kill the process.  The listening thread should be
-        # able to receive the state changed event, too.
-        process.Kill()
-
-        # Wait until the 'MyListeningThread' terminates.
-        my_thread.join()
-
-        # Shouldn't we be testing against some kind of expectation here?
-
-    @add_test_categories(['pyapi'])
-    @expectedFlakeyLinux("llvm.org/pr23730")  # Flaky, fails ~1/100 cases
-    @skipIfWindows # This is flakey on Windows AND when it fails, it hangs: llvm.org/pr38373
-    @skipIfNetBSD
-    def test_wait_for_event(self):
-        """Exercise SBListener.WaitForEvent() API."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        self.dbg.SetAsync(True)
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create a breakpoint on main.c by name 'c'.
-        breakpoint = target.BreakpointCreateByName('c', 'a.out')
-        #print("breakpoint:", breakpoint)
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        # Get the debugger listener.
-        listener = self.dbg.GetListener()
-
-        # Now launch the process, and do not stop at entry point.
-        error = lldb.SBError()
-        process = target.Launch(listener,
-                                None,      # argv
-                                None,      # envp
-                                None,      # stdin_path
-                                None,      # stdout_path
-                                None,      # stderr_path
-                                None,      # working directory
-                                0,         # launch flags
-                                False,     # Stop at entry
-                                error)     # error
-        self.assertTrue(error.Success() and process, PROCESS_IS_VALID)
-
-        # Create an empty event object.
-        event = lldb.SBEvent()
-        self.assertFalse(event, "Event should not be valid initially")
-
-        # Create MyListeningThread to wait for any kind of event.
-        import threading
-
-        class MyListeningThread(threading.Thread):
-
-            def run(self):
-                count = 0
-                # Let's only try at most 3 times to retrieve any kind of event.
-                while not count > 3:
-                    if listener.WaitForEvent(5, event):
-                        #print("Got a valid event:", event)
-                        #print("Event data flavor:", event.GetDataFlavor())
-                        #print("Event type:", lldbutil.state_type_to_str(event.GetType()))
-                        listener.Clear()
-                        return
-                    count = count + 1
-                    print("Timeout: listener.WaitForEvent")
-                listener.Clear()
-                return
-
-        # Use Python API to kill the process.  The listening thread should be
-        # able to receive a state changed event.
-        process.Kill()
-
-        # Let's start the listening thread to retrieve the event.
-        my_thread = MyListeningThread()
-        my_thread.start()
-
-        # Wait until the 'MyListeningThread' terminates.
-        my_thread.join()
-
-        self.assertTrue(event,
-                        "My listening thread successfully received an event")
-
-    @skipIfFreeBSD  # llvm.org/pr21325
-    @add_test_categories(['pyapi'])
-    @expectedFailureAll(
-        oslist=["linux"],
-        bugnumber="llvm.org/pr23617 Flaky, fails ~1/10 cases")
-    @skipIfWindows # This is flakey on Windows AND when it fails, it hangs: llvm.org/pr38373
-    @expectedFlakeyNetBSD
-    def test_add_listener_to_broadcaster(self):
-        """Exercise some SBBroadcaster APIs."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        self.dbg.SetAsync(True)
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create a breakpoint on main.c by name 'c'.
-        breakpoint = target.BreakpointCreateByName('c', 'a.out')
-        #print("breakpoint:", breakpoint)
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        listener = lldb.SBListener("my listener")
-
-        # Now launch the process, and do not stop at the entry point.
-        error = lldb.SBError()
-        process = target.Launch(listener,
-                                None,      # argv
-                                None,      # envp
-                                None,      # stdin_path
-                                None,      # stdout_path
-                                None,      # stderr_path
-                                None,      # working directory
-                                0,         # launch flags
-                                False,     # Stop at entry
-                                error)     # error
-
-        # Create an empty event object.
-        event = lldb.SBEvent()
-        self.assertFalse(event, "Event should not be valid initially")
-
-        # The finite state machine for our custom listening thread, with an
-        # initial state of None, which means no event has been received.
-        # It changes to 'connected' after 'connected' event is received (for remote platforms)
-        # It changes to 'running' after 'running' event is received (should happen only if the
-        # currentstate is either 'None' or 'connected')
-        # It changes to 'stopped' if a 'stopped' event is received (should happen only if the
-        # current state is 'running'.)
-        self.state = None
-
-        # Create MyListeningThread to wait for state changed events.
-        # By design, a "running" event is expected following by a "stopped"
-        # event.
-        import threading
-
-        class MyListeningThread(threading.Thread):
-
-            def run(self):
-                #print("Running MyListeningThread:", self)
-
-                # Regular expression pattern for the event description.
-                pattern = re.compile("data = {.*, state = (.*)}$")
-
-                # Let's only try at most 6 times to retrieve our events.
-                count = 0
-                while True:
-                    if listener.WaitForEvent(5, event):
-                        desc = lldbutil.get_description(event)
-                        #print("Event description:", desc)
-                        match = pattern.search(desc)
-                        if not match:
-                            break
-                        if match.group(1) == 'connected':
-                            # When debugging remote targets with lldb-server, we
-                            # first get the 'connected' event.
-                            self.context.assertTrue(self.context.state is None)
-                            self.context.state = 'connected'
-                            continue
-                        elif match.group(1) == 'running':
-                            self.context.assertTrue(
-                                self.context.state is None or self.context.state == 'connected')
-                            self.context.state = 'running'
-                            continue
-                        elif match.group(1) == 'stopped':
-                            self.context.assertTrue(
-                                self.context.state == 'running')
-                            # Whoopee, both events have been received!
-                            self.context.state = 'stopped'
-                            break
-                        else:
-                            break
-                    print("Timeout: listener.WaitForEvent")
-                    count = count + 1
-                    if count > 6:
-                        break
-                listener.Clear()
-                return
-
-        # Use Python API to continue the process.  The listening thread should be
-        # able to receive the state changed events.
-        process.Continue()
-
-        # Start the listening thread to receive the "running" followed by the
-        # "stopped" events.
-        my_thread = MyListeningThread()
-        # Supply the enclosing context so that our listening thread can access
-        # the 'state' variable.
-        my_thread.context = self
-        my_thread.start()
-
-        # Wait until the 'MyListeningThread' terminates.
-        my_thread.join()
-
-        # The final judgement. :-)
-        self.assertTrue(self.state == 'stopped',
-                        "Both expected state changed events received")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/event/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/event/main.c
deleted file mode 100644 (file)
index 5736952..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-// This simple program is to test the lldb Python API related to events.
-
-int a(int);
-int b(int);
-int c(int);
-
-int a(int val)
-{
-    if (val <= 1)
-        return b(val);
-    else if (val >= 3)
-        return c(val);
-
-    return val;
-}
-
-int b(int val)
-{
-    return c(val);
-}
-
-int c(int val)
-{
-    return val + 3; // Find the line number of function "c" here.
-}
-
-int main (int argc, char const *argv[])
-{
-    int A1 = a(1);  // a(1) -> b(1) -> c(1)
-    printf("a(1) returns %d\n", A1);
-    
-    int B2 = b(2);  // b(2) -> c(2)
-    printf("b(2) returns %d\n", B2);
-    
-    int A3 = a(3);  // a(3) -> c(3)
-    printf("a(3) returns %d\n", A3);
-    
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/exprpath_synthetic/TestExprPathSynthetic.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/exprpath_synthetic/TestExprPathSynthetic.py
deleted file mode 100644 (file)
index 19832ae..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-from lldbsuite.test import decorators
-from lldbsuite.test import lldbinline
-
-lldbinline.MakeInlineTest(
-    __file__, globals(), [
-        decorators.skipIfFreeBSD, decorators.skipIfLinux,
-        decorators.skipIfWindows, decorators.skipIfNetBSD])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/exprpath_synthetic/main.mm b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/exprpath_synthetic/main.mm
deleted file mode 100644 (file)
index 365fe12..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- main.mm --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#import <Foundation/Foundation.h>
-#include <vector>
-
-int main (int argc, char const *argv[])
-{
-    std::vector<int> v{1,2,3,4,5};
-    NSArray *a = @[@"Hello",@"World",@"From Me"];
-    return 0; //% v = self.frame().FindVariable("v"); v0 = v.GetChildAtIndex(0); s = lldb.SBStream(); v0.GetExpressionPath(s);
-    //% self.runCmd("expr %s = 12" % s.GetData()); self.assertTrue(v0.GetValueAsUnsigned() == 12, "value change via expr failed")
-    //% a = self.frame().FindVariable("a"); a1 = a.GetChildAtIndex(1); s = lldb.SBStream(); a1.GetExpressionPath(s);
-    //% self.expect("po %s" % s.GetData(), substrs = ["World"])
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/file_handle/TestFileHandle.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/file_handle/TestFileHandle.py
deleted file mode 100644 (file)
index 53ca649..0000000
+++ /dev/null
@@ -1,919 +0,0 @@
-"""
-Test lldb Python API for file handles.
-"""
-
-
-import os
-import io
-import re
-import sys
-from contextlib import contextmanager
-
-import lldb
-from lldbsuite.test import  lldbtest
-from lldbsuite.test.decorators import *
-
-class OhNoe(Exception):
-    pass
-
-class BadIO(io.TextIOBase):
-    @property
-    def closed(self):
-        return False
-    def writable(self):
-        return True
-    def readable(self):
-        return True
-    def write(self, s):
-        raise OhNoe('OH NOE')
-    def read(self, n):
-        raise OhNoe("OH NOE")
-    def flush(self):
-        raise OhNoe('OH NOE')
-
-# This class will raise an exception while it's being
-# converted into a C++ object by swig
-class ReallyBadIO(io.TextIOBase):
-    def fileno(self):
-        return 999
-    def writable(self):
-        raise OhNoe("OH NOE!!!")
-
-class MutableBool():
-    def __init__(self, value):
-        self.value = value
-    def set(self, value):
-        self.value = bool(value)
-    def __bool__(self):
-        return self.value
-
-class FlushTestIO(io.StringIO):
-    def __init__(self, mutable_flushed, mutable_closed):
-        super(FlushTestIO, self).__init__()
-        self.mut_flushed = mutable_flushed
-        self.mut_closed = mutable_closed
-    def close(self):
-        self.mut_closed.set(True)
-        return super(FlushTestIO, self).close()
-    def flush(self):
-        self.mut_flushed.set(True)
-        return super(FlushTestIO, self).flush()
-
-@contextmanager
-def replace_stdout(new):
-    old = sys.stdout
-    sys.stdout = new
-    try:
-        yield
-    finally:
-        sys.stdout = old
-
-def readStrippedLines(f):
-    def i():
-        for line in f:
-            line = line.strip()
-            if line:
-                yield line
-    return list(i())
-
-
-class FileHandleTestCase(lldbtest.TestBase):
-
-    NO_DEBUG_INFO_TESTCASE = True
-    mydir = lldbtest.Base.compute_mydir(__file__)
-
-    # The way this class interacts with the debugger is different
-    # than normal.   Most of these test cases will mess with the
-    # debugger I/O streams, so we want a fresh debugger for each
-    # test so those mutations don't interfere with each other.
-    #
-    # Also, the way normal tests evaluate debugger commands is
-    # by using a SBCommandInterpreter directly, which captures
-    # the output in a result object.   For many of tests tests
-    # we want the debugger to write the  output directly to
-    # its I/O streams like it would have done interactively.
-    #
-    # For this reason we also define handleCmd() here, even though
-    # it is similar to runCmd().
-
-    def setUp(self):
-        super(FileHandleTestCase, self).setUp()
-        self.debugger = lldb.SBDebugger.Create()
-        self.out_filename = self.getBuildArtifact('output')
-        self.in_filename = self.getBuildArtifact('input')
-
-    def tearDown(self):
-        lldb.SBDebugger.Destroy(self.debugger)
-        super(FileHandleTestCase, self).tearDown()
-        for name in (self.out_filename, self.in_filename):
-            if os.path.exists(name):
-                os.unlink(name)
-
-    # Similar to runCmd(), but this uses the per-test debugger, and it
-    # supports, letting the debugger just print the results instead
-    # of collecting them.
-    def handleCmd(self, cmd, check=True, collect_result=True):
-        assert not check or collect_result
-        ret = lldb.SBCommandReturnObject()
-        if collect_result:
-            interpreter = self.debugger.GetCommandInterpreter()
-            interpreter.HandleCommand(cmd, ret)
-        else:
-            self.debugger.HandleCommand(cmd)
-        self.debugger.GetOutputFile().Flush()
-        self.debugger.GetErrorFile().Flush()
-        if collect_result and check:
-            self.assertTrue(ret.Succeeded())
-        return ret.GetOutput()
-
-
-    @add_test_categories(['pyapi'])
-    def test_legacy_file_out_script(self):
-        with open(self.out_filename, 'w') as f:
-            self.debugger.SetOutputFileHandle(f, False)
-            # scripts print to output even if you capture the results
-            # I'm not sure I love that behavior, but that's the way
-            # it's been for a long time.  That's why this test works
-            # even with collect_result=True.
-            self.handleCmd('script 1+1')
-            self.debugger.GetOutputFileHandle().write('FOO\n')
-        lldb.SBDebugger.Destroy(self.debugger)
-        with open(self.out_filename, 'r') as f:
-            self.assertEqual(readStrippedLines(f), ['2', 'FOO'])
-
-
-    @add_test_categories(['pyapi'])
-    def test_legacy_file_out(self):
-        with open(self.out_filename, 'w') as f:
-            self.debugger.SetOutputFileHandle(f, False)
-            self.handleCmd('p/x 3735928559', collect_result=False, check=False)
-        lldb.SBDebugger.Destroy(self.debugger)
-        with open(self.out_filename, 'r') as f:
-            self.assertIn('deadbeef', f.read())
-
-    @add_test_categories(['pyapi'])
-    def test_legacy_file_err_with_get(self):
-        with open(self.out_filename, 'w') as f:
-            self.debugger.SetErrorFileHandle(f, False)
-            self.handleCmd('lolwut', check=False, collect_result=False)
-            f2 = self.debugger.GetErrorFileHandle()
-            f2.write('FOOBAR\n')
-            f2.flush()
-        lldb.SBDebugger.Destroy(self.debugger)
-        with open(self.out_filename, 'r') as f:
-            errors = f.read()
-            self.assertTrue(re.search(r'error:.*lolwut', errors))
-            self.assertTrue(re.search(r'FOOBAR', errors))
-
-
-    @add_test_categories(['pyapi'])
-    def test_legacy_file_err(self):
-        with open(self.out_filename, 'w') as f:
-            self.debugger.SetErrorFileHandle(f, False)
-            self.handleCmd('lol', check=False, collect_result=False)
-        lldb.SBDebugger.Destroy(self.debugger)
-        with open(self.out_filename, 'r') as f:
-            self.assertIn("is not a valid command", f.read())
-
-
-    @add_test_categories(['pyapi'])
-    def test_legacy_file_error(self):
-        debugger = self.debugger
-        with open(self.out_filename, 'w') as f:
-            debugger.SetErrorFileHandle(f, False)
-            self.handleCmd('lolwut', check=False, collect_result=False)
-        with open(self.out_filename, 'r') as f:
-            errors = f.read()
-            self.assertTrue(re.search(r'error:.*lolwut', errors))
-
-    @add_test_categories(['pyapi'])
-    def test_sbfile_type_errors(self):
-        sbf = lldb.SBFile()
-        self.assertRaises(Exception, sbf.Write, None)
-        self.assertRaises(Exception, sbf.Read, None)
-        self.assertRaises(Exception, sbf.Read, b'this bytes is not mutable')
-        self.assertRaises(Exception, sbf.Write, u"ham sandwich")
-        self.assertRaises(Exception, sbf.Read, u"ham sandwich")
-
-
-    @add_test_categories(['pyapi'])
-    def test_sbfile_write_fileno(self):
-        with open(self.out_filename, 'w') as f:
-            sbf = lldb.SBFile(f.fileno(), "w", False)
-            self.assertTrue(sbf.IsValid())
-            e, n = sbf.Write(b'FOO\nBAR')
-            self.assertTrue(e.Success())
-            self.assertEqual(n, 7)
-            sbf.Close()
-            self.assertFalse(sbf.IsValid())
-        with open(self.out_filename, 'r') as f:
-            self.assertEqual(readStrippedLines(f), ['FOO', 'BAR'])
-
-
-    @add_test_categories(['pyapi'])
-    def test_sbfile_write(self):
-        with open(self.out_filename, 'w') as f:
-            sbf = lldb.SBFile(f)
-            e, n = sbf.Write(b'FOO\n')
-            self.assertTrue(e.Success())
-            self.assertEqual(n, 4)
-            sbf.Close()
-            self.assertTrue(f.closed)
-        with open(self.out_filename, 'r') as f:
-            self.assertEqual(f.read().strip(), 'FOO')
-
-
-    @add_test_categories(['pyapi'])
-    def test_sbfile_read_fileno(self):
-        with open(self.out_filename, 'w') as f:
-            f.write('FOO')
-        with open(self.out_filename, 'r') as f:
-            sbf = lldb.SBFile(f.fileno(), "r", False)
-            self.assertTrue(sbf.IsValid())
-            buffer = bytearray(100)
-            e, n = sbf.Read(buffer)
-            self.assertTrue(e.Success())
-            self.assertEqual(buffer[:n], b'FOO')
-
-
-    @add_test_categories(['pyapi'])
-    def test_sbfile_read(self):
-        with open(self.out_filename, 'w') as f:
-            f.write('foo')
-        with open(self.out_filename, 'r') as f:
-            sbf = lldb.SBFile(f)
-            buf = bytearray(100)
-            e, n = sbf.Read(buf)
-            self.assertTrue(e.Success())
-            self.assertEqual(n, 3)
-            self.assertEqual(buf[:n], b'foo')
-            sbf.Close()
-            self.assertTrue(f.closed)
-
-
-    @add_test_categories(['pyapi'])
-    def test_fileno_out(self):
-        with open(self.out_filename, 'w') as f:
-            sbf = lldb.SBFile(f.fileno(), "w", False)
-            status = self.debugger.SetOutputFile(sbf)
-            self.assertTrue(status.Success())
-            self.handleCmd('script 1+2')
-            self.debugger.GetOutputFile().Write(b'quux')
-
-        with open(self.out_filename, 'r') as f:
-            self.assertEqual(readStrippedLines(f), ['3', 'quux'])
-
-
-    @add_test_categories(['pyapi'])
-    def test_fileno_help(self):
-        with open(self.out_filename, 'w') as f:
-            sbf = lldb.SBFile(f.fileno(), "w", False)
-            status = self.debugger.SetOutputFile(sbf)
-            self.assertTrue(status.Success())
-            self.handleCmd("help help", collect_result=False, check=False)
-        with open(self.out_filename, 'r') as f:
-            self.assertTrue(re.search(r'Show a list of all debugger commands', f.read()))
-
-
-    @add_test_categories(['pyapi'])
-    def test_help(self):
-        debugger = self.debugger
-        with open(self.out_filename, 'w') as f:
-            status = debugger.SetOutputFile(lldb.SBFile(f))
-            self.assertTrue(status.Success())
-            self.handleCmd("help help", check=False, collect_result=False)
-        with open(self.out_filename, 'r') as f:
-            self.assertIn('Show a list of all debugger commands', f.read())
-
-
-    @add_test_categories(['pyapi'])
-    def test_immediate(self):
-        with open(self.out_filename, 'w') as f:
-            ret = lldb.SBCommandReturnObject()
-            ret.SetImmediateOutputFile(f)
-            interpreter = self.debugger.GetCommandInterpreter()
-            interpreter.HandleCommand("help help", ret)
-            # make sure the file wasn't closed early.
-            f.write("\nQUUX\n")
-        ret = None # call destructor and flush streams
-        with open(self.out_filename, 'r') as f:
-            output = f.read()
-            self.assertTrue(re.search(r'Show a list of all debugger commands', output))
-            self.assertTrue(re.search(r'QUUX', output))
-
-
-    @add_test_categories(['pyapi'])
-    @skipIf(py_version=['<', (3,)])
-    def test_immediate_string(self):
-        f = io.StringIO()
-        ret = lldb.SBCommandReturnObject()
-        ret.SetImmediateOutputFile(f)
-        interpreter = self.debugger.GetCommandInterpreter()
-        interpreter.HandleCommand("help help", ret)
-        # make sure the file wasn't closed early.
-        f.write("\nQUUX\n")
-        ret = None # call destructor and flush streams
-        output = f.getvalue()
-        self.assertTrue(re.search(r'Show a list of all debugger commands', output))
-        self.assertTrue(re.search(r'QUUX', output))
-
-
-    @add_test_categories(['pyapi'])
-    @skipIf(py_version=['<', (3,)])
-    def test_immediate_sbfile_string(self):
-        f = io.StringIO()
-        ret = lldb.SBCommandReturnObject()
-        ret.SetImmediateOutputFile(lldb.SBFile(f))
-        interpreter = self.debugger.GetCommandInterpreter()
-        interpreter.HandleCommand("help help", ret)
-        output = f.getvalue()
-        ret = None # call destructor and flush streams
-        # sbfile default constructor doesn't borrow the file
-        self.assertTrue(f.closed)
-        self.assertTrue(re.search(r'Show a list of all debugger commands', output))
-
-
-    @add_test_categories(['pyapi'])
-    def test_fileno_inout(self):
-        with open(self.in_filename, 'w') as f:
-            f.write("help help\n")
-
-        with open(self.out_filename, 'w') as outf, open(self.in_filename, 'r') as inf:
-
-            outsbf = lldb.SBFile(outf.fileno(), "w", False)
-            status = self.debugger.SetOutputFile(outsbf)
-            self.assertTrue(status.Success())
-
-            insbf = lldb.SBFile(inf.fileno(), "r", False)
-            status = self.debugger.SetInputFile(insbf)
-            self.assertTrue(status.Success())
-
-            opts = lldb.SBCommandInterpreterRunOptions()
-            self.debugger.RunCommandInterpreter(True, False, opts, 0, False, False)
-            self.debugger.GetOutputFile().Flush()
-
-        with open(self.out_filename, 'r') as f:
-            self.assertTrue(re.search(r'Show a list of all debugger commands', f.read()))
-
-
-    @add_test_categories(['pyapi'])
-    def test_inout(self):
-        with open(self.in_filename, 'w') as f:
-            f.write("help help\n")
-        with  open(self.out_filename, 'w') as outf, \
-              open(self.in_filename, 'r') as inf:
-            status = self.debugger.SetOutputFile(lldb.SBFile(outf))
-            self.assertTrue(status.Success())
-            status = self.debugger.SetInputFile(lldb.SBFile(inf))
-            self.assertTrue(status.Success())
-            opts = lldb.SBCommandInterpreterRunOptions()
-            self.debugger.RunCommandInterpreter(True, False, opts, 0, False, False)
-            self.debugger.GetOutputFile().Flush()
-        with open(self.out_filename, 'r') as f:
-            output = f.read()
-            self.assertIn('Show a list of all debugger commands', output)
-
-
-    @add_test_categories(['pyapi'])
-    def test_binary_inout(self):
-        debugger = self.debugger
-        with open(self.in_filename, 'w') as f:
-            f.write("help help\n")
-        with  open(self.out_filename, 'wb') as outf, \
-              open(self.in_filename, 'rb') as inf:
-            status = debugger.SetOutputFile(lldb.SBFile(outf))
-            self.assertTrue(status.Success())
-            status = debugger.SetInputFile(lldb.SBFile(inf))
-            self.assertTrue(status.Success())
-            opts = lldb.SBCommandInterpreterRunOptions()
-            debugger.RunCommandInterpreter(True, False, opts, 0, False, False)
-            debugger.GetOutputFile().Flush()
-        with open(self.out_filename, 'r') as f:
-            output = f.read()
-            self.assertIn('Show a list of all debugger commands', output)
-
-
-    @add_test_categories(['pyapi'])
-    @skipIf(py_version=['<', (3,)])
-    def test_string_inout(self):
-        inf = io.StringIO("help help\np/x ~0\n")
-        outf = io.StringIO()
-        status = self.debugger.SetOutputFile(lldb.SBFile(outf))
-        self.assertTrue(status.Success())
-        status = self.debugger.SetInputFile(lldb.SBFile(inf))
-        self.assertTrue(status.Success())
-        opts = lldb.SBCommandInterpreterRunOptions()
-        self.debugger.RunCommandInterpreter(True, False, opts, 0, False, False)
-        self.debugger.GetOutputFile().Flush()
-        output = outf.getvalue()
-        self.assertIn('Show a list of all debugger commands', output)
-        self.assertIn('0xfff', output)
-
-
-    @add_test_categories(['pyapi'])
-    @skipIf(py_version=['<', (3,)])
-    def test_bytes_inout(self):
-        inf = io.BytesIO(b"help help\nhelp b\n")
-        outf = io.BytesIO()
-        status = self.debugger.SetOutputFile(lldb.SBFile(outf))
-        self.assertTrue(status.Success())
-        status = self.debugger.SetInputFile(lldb.SBFile(inf))
-        self.assertTrue(status.Success())
-        opts = lldb.SBCommandInterpreterRunOptions()
-        self.debugger.RunCommandInterpreter(True, False, opts, 0, False, False)
-        self.debugger.GetOutputFile().Flush()
-        output = outf.getvalue()
-        self.assertIn(b'Show a list of all debugger commands', output)
-        self.assertIn(b'Set a breakpoint', output)
-
-
-    @add_test_categories(['pyapi'])
-    def test_fileno_error(self):
-        with open(self.out_filename, 'w') as f:
-
-            sbf = lldb.SBFile(f.fileno(), 'w', False)
-            status = self.debugger.SetErrorFile(sbf)
-            self.assertTrue(status.Success())
-
-            self.handleCmd('lolwut', check=False, collect_result=False)
-
-            self.debugger.GetErrorFile().Write(b'\nzork\n')
-
-        with open(self.out_filename, 'r') as f:
-            errors = f.read()
-            self.assertTrue(re.search(r'error:.*lolwut', errors))
-            self.assertTrue(re.search(r'zork', errors))
-
-
-    @add_test_categories(['pyapi'])
-    def test_replace_stdout(self):
-        f = io.StringIO()
-        with replace_stdout(f):
-            self.assertEqual(sys.stdout, f)
-            self.handleCmd('script sys.stdout.write("lol")',
-                collect_result=False, check=False)
-            self.assertEqual(sys.stdout, f)
-
-
-    @add_test_categories(['pyapi'])
-    def test_replace_stdout_with_nonfile(self):
-        debugger = self.debugger
-        f = io.StringIO()
-        with replace_stdout(f):
-            class Nothing():
-                pass
-            with replace_stdout(Nothing):
-                self.assertEqual(sys.stdout, Nothing)
-                self.handleCmd('script sys.stdout.write("lol")',
-                    check=False, collect_result=False)
-                self.assertEqual(sys.stdout, Nothing)
-            sys.stdout.write(u"FOO")
-        self.assertEqual(f.getvalue(), "FOO")
-
-
-    @add_test_categories(['pyapi'])
-    def test_sbfile_write_borrowed(self):
-        with open(self.out_filename, 'w') as f:
-            sbf = lldb.SBFile.Create(f, borrow=True)
-            e, n = sbf.Write(b'FOO')
-            self.assertTrue(e.Success())
-            self.assertEqual(n, 3)
-            sbf.Close()
-            self.assertFalse(f.closed)
-            f.write('BAR\n')
-        with open(self.out_filename, 'r') as f:
-            self.assertEqual(f.read().strip(), 'FOOBAR')
-
-
-
-    @add_test_categories(['pyapi'])
-    @skipIf(py_version=['<', (3,)])
-    def test_sbfile_write_forced(self):
-        with open(self.out_filename, 'w') as f:
-            written = MutableBool(False)
-            orig_write = f.write
-            def mywrite(x):
-                written.set(True)
-                return orig_write(x)
-            f.write = mywrite
-            sbf = lldb.SBFile.Create(f, force_io_methods=True)
-            e, n = sbf.Write(b'FOO')
-            self.assertTrue(written)
-            self.assertTrue(e.Success())
-            self.assertEqual(n, 3)
-            sbf.Close()
-            self.assertTrue(f.closed)
-        with open(self.out_filename, 'r') as f:
-            self.assertEqual(f.read().strip(), 'FOO')
-
-
-    @add_test_categories(['pyapi'])
-    @skipIf(py_version=['<', (3,)])
-    def test_sbfile_write_forced_borrowed(self):
-        with open(self.out_filename, 'w') as f:
-            written = MutableBool(False)
-            orig_write = f.write
-            def mywrite(x):
-                written.set(True)
-                return orig_write(x)
-            f.write = mywrite
-            sbf = lldb.SBFile.Create(f, borrow=True, force_io_methods=True)
-            e, n = sbf.Write(b'FOO')
-            self.assertTrue(written)
-            self.assertTrue(e.Success())
-            self.assertEqual(n, 3)
-            sbf.Close()
-            self.assertFalse(f.closed)
-        with open(self.out_filename, 'r') as f:
-            self.assertEqual(f.read().strip(), 'FOO')
-
-
-    @add_test_categories(['pyapi'])
-    @skipIf(py_version=['<', (3,)])
-    def test_sbfile_write_string(self):
-        f = io.StringIO()
-        sbf = lldb.SBFile(f)
-        e, n = sbf.Write(b'FOO')
-        self.assertEqual(f.getvalue().strip(), "FOO")
-        self.assertTrue(e.Success())
-        self.assertEqual(n, 3)
-        sbf.Close()
-        self.assertTrue(f.closed)
-
-
-    @add_test_categories(['pyapi'])
-    @skipIf(py_version=['<', (3,)])
-    def test_string_out(self):
-        f = io.StringIO()
-        status = self.debugger.SetOutputFile(f)
-        self.assertTrue(status.Success())
-        self.handleCmd("script 'foobar'")
-        self.assertEqual(f.getvalue().strip(), "'foobar'")
-
-
-    @add_test_categories(['pyapi'])
-    @skipIf(py_version=['<', (3,)])
-    def test_string_error(self):
-        f = io.StringIO()
-        debugger = self.debugger
-        status = debugger.SetErrorFile(f)
-        self.assertTrue(status.Success())
-        self.handleCmd('lolwut', check=False, collect_result=False)
-        errors = f.getvalue()
-        self.assertTrue(re.search(r'error:.*lolwut', errors))
-
-
-    @add_test_categories(['pyapi'])
-    @skipIf(py_version=['<', (3,)])
-    def test_sbfile_write_bytes(self):
-        f = io.BytesIO()
-        sbf = lldb.SBFile(f)
-        e, n = sbf.Write(b'FOO')
-        self.assertEqual(f.getvalue().strip(), b"FOO")
-        self.assertTrue(e.Success())
-        self.assertEqual(n, 3)
-        sbf.Close()
-        self.assertTrue(f.closed)
-
-    @add_test_categories(['pyapi'])
-    @skipIf(py_version=['<', (3,)])
-    def test_sbfile_read_string(self):
-        f = io.StringIO('zork')
-        sbf = lldb.SBFile(f)
-        buf = bytearray(100)
-        e, n = sbf.Read(buf)
-        self.assertTrue(e.Success())
-        self.assertEqual(buf[:n], b'zork')
-
-
-    @add_test_categories(['pyapi'])
-    @skipIf(py_version=['<', (3,)])
-    def test_sbfile_read_string_one_byte(self):
-        f = io.StringIO('z')
-        sbf = lldb.SBFile(f)
-        buf = bytearray(1)
-        e, n = sbf.Read(buf)
-        self.assertTrue(e.Fail())
-        self.assertEqual(n, 0)
-        self.assertEqual(e.GetCString(), "can't read less than 6 bytes from a utf8 text stream")
-
-
-    @add_test_categories(['pyapi'])
-    @skipIf(py_version=['<', (3,)])
-    def test_sbfile_read_bytes(self):
-        f = io.BytesIO(b'zork')
-        sbf = lldb.SBFile(f)
-        buf = bytearray(100)
-        e, n = sbf.Read(buf)
-        self.assertTrue(e.Success())
-        self.assertEqual(buf[:n], b'zork')
-
-
-    @add_test_categories(['pyapi'])
-    @skipIf(py_version=['<', (3,)])
-    def test_sbfile_out(self):
-        with open(self.out_filename, 'w') as f:
-            sbf = lldb.SBFile(f)
-            status = self.debugger.SetOutputFile(sbf)
-            self.assertTrue(status.Success())
-            self.handleCmd('script 2+2')
-        with open(self.out_filename, 'r') as f:
-            self.assertEqual(f.read().strip(), '4')
-
-
-    @add_test_categories(['pyapi'])
-    @skipIf(py_version=['<', (3,)])
-    def test_file_out(self):
-        with open(self.out_filename, 'w') as f:
-            status = self.debugger.SetOutputFile(f)
-            self.assertTrue(status.Success())
-            self.handleCmd('script 2+2')
-        with open(self.out_filename, 'r') as f:
-            self.assertEqual(f.read().strip(), '4')
-
-
-    @add_test_categories(['pyapi'])
-    def test_sbfile_error(self):
-        with open(self.out_filename, 'w') as f:
-            sbf = lldb.SBFile(f)
-            status = self.debugger.SetErrorFile(sbf)
-            self.assertTrue(status.Success())
-            self.handleCmd('lolwut', check=False, collect_result=False)
-        with open(self.out_filename, 'r') as f:
-            errors = f.read()
-            self.assertTrue(re.search(r'error:.*lolwut', errors))
-
-
-    @add_test_categories(['pyapi'])
-    def test_file_error(self):
-        with open(self.out_filename, 'w') as f:
-            status = self.debugger.SetErrorFile(f)
-            self.assertTrue(status.Success())
-            self.handleCmd('lolwut', check=False, collect_result=False)
-        with open(self.out_filename, 'r') as f:
-            errors = f.read()
-            self.assertTrue(re.search(r'error:.*lolwut', errors))
-
-
-    @add_test_categories(['pyapi'])
-    def test_exceptions(self):
-        self.assertRaises(Exception, lldb.SBFile, None)
-        self.assertRaises(Exception, lldb.SBFile, "ham sandwich")
-        if sys.version_info[0] < 3:
-            self.assertRaises(Exception, lldb.SBFile, ReallyBadIO())
-        else:
-            self.assertRaises(OhNoe, lldb.SBFile, ReallyBadIO())
-            error, n = lldb.SBFile(BadIO()).Write(b"FOO")
-            self.assertEqual(n, 0)
-            self.assertTrue(error.Fail())
-            self.assertIn('OH NOE', error.GetCString())
-            error, n = lldb.SBFile(BadIO()).Read(bytearray(100))
-            self.assertEqual(n, 0)
-            self.assertTrue(error.Fail())
-            self.assertIn('OH NOE', error.GetCString())
-
-
-    @add_test_categories(['pyapi'])
-    @skipIf(py_version=['<', (3,)])
-    def test_exceptions_logged(self):
-        messages = list()
-        self.debugger.SetLoggingCallback(messages.append)
-        self.handleCmd('log enable lldb script')
-        self.debugger.SetOutputFile(lldb.SBFile(BadIO()))
-        self.handleCmd('script 1+1')
-        self.assertTrue(any('OH NOE' in msg for msg in messages))
-
-
-    @add_test_categories(['pyapi'])
-    @skipIf(py_version=['<', (3,)])
-    def test_flush(self):
-        flushed = MutableBool(False)
-        closed = MutableBool(False)
-        f = FlushTestIO(flushed, closed)
-        self.assertFalse(flushed)
-        self.assertFalse(closed)
-        sbf = lldb.SBFile(f)
-        self.assertFalse(flushed)
-        self.assertFalse(closed)
-        sbf = None
-        self.assertFalse(flushed)
-        self.assertTrue(closed)
-        self.assertTrue(f.closed)
-
-        flushed = MutableBool(False)
-        closed = MutableBool(False)
-        f = FlushTestIO(flushed, closed)
-        self.assertFalse(flushed)
-        self.assertFalse(closed)
-        sbf = lldb.SBFile.Create(f, borrow=True)
-        self.assertFalse(flushed)
-        self.assertFalse(closed)
-        sbf = None
-        self.assertTrue(flushed)
-        self.assertFalse(closed)
-        self.assertFalse(f.closed)
-
-
-    @add_test_categories(['pyapi'])
-    def test_fileno_flush(self):
-        with open(self.out_filename, 'w') as f:
-            f.write("foo")
-            sbf = lldb.SBFile(f)
-            sbf.Write(b'bar')
-            sbf = None
-            self.assertTrue(f.closed)
-        with open(self.out_filename, 'r') as f:
-            self.assertEqual(f.read(), 'foobar')
-
-        with open(self.out_filename, 'w+') as f:
-            f.write("foo")
-            sbf = lldb.SBFile.Create(f, borrow=True)
-            sbf.Write(b'bar')
-            sbf = None
-            self.assertFalse(f.closed)
-            f.seek(0)
-            self.assertEqual(f.read(), 'foobar')
-
-
-    @add_test_categories(['pyapi'])
-    def test_close(self):
-        debugger = self.debugger
-        with open(self.out_filename, 'w') as f:
-            status = debugger.SetOutputFile(f)
-            self.assertTrue(status.Success())
-            self.handleCmd("help help", check=False, collect_result=False)
-            # make sure the file wasn't closed early.
-            f.write("\nZAP\n")
-            lldb.SBDebugger.Destroy(debugger)
-            # check that output file was closed when debugger was destroyed.
-            with self.assertRaises(ValueError):
-                f.write("\nQUUX\n")
-        with open(self.out_filename, 'r') as f:
-            output = f.read()
-            self.assertTrue(re.search(r'Show a list of all debugger commands', output))
-            self.assertTrue(re.search(r'ZAP', output))
-
-
-    @add_test_categories(['pyapi'])
-    @skipIf(py_version=['<', (3,)])
-    def test_stdout(self):
-        f = io.StringIO()
-        status = self.debugger.SetOutputFile(f)
-        self.assertTrue(status.Success())
-        self.handleCmd(r"script sys.stdout.write('foobar\n')")
-        self.assertEqual(f.getvalue().strip().split(), ["foobar", "7"])
-
-
-    @add_test_categories(['pyapi'])
-    def test_stdout_file(self):
-        with open(self.out_filename, 'w') as f:
-            status = self.debugger.SetOutputFile(f)
-            self.assertTrue(status.Success())
-            self.handleCmd(r"script sys.stdout.write('foobar\n')")
-        with open(self.out_filename, 'r') as f:
-            # In python2 sys.stdout.write() returns None, which
-            # the REPL will ignore, but in python3 it will
-            # return the number of bytes written, which the REPL
-            # will print out.
-            lines = [x for x in f.read().strip().split() if x != "7"]
-            self.assertEqual(lines, ["foobar"])
-
-
-    @add_test_categories(['pyapi'])
-    @skipIf(py_version=['<', (3,)])
-    def test_identity(self):
-
-        f = io.StringIO()
-        sbf = lldb.SBFile(f)
-        self.assertTrue(f is sbf.GetFile())
-        sbf.Close()
-        self.assertTrue(f.closed)
-
-        f = io.StringIO()
-        sbf = lldb.SBFile.Create(f, borrow=True)
-        self.assertTrue(f is sbf.GetFile())
-        sbf.Close()
-        self.assertFalse(f.closed)
-
-        with open(self.out_filename, 'w') as f:
-            sbf = lldb.SBFile(f)
-            self.assertTrue(f is sbf.GetFile())
-            sbf.Close()
-            self.assertTrue(f.closed)
-
-        with open(self.out_filename, 'w') as f:
-            sbf = lldb.SBFile.Create(f, borrow=True)
-            self.assertFalse(f is sbf.GetFile())
-            sbf.Write(b"foobar\n")
-            self.assertEqual(f.fileno(), sbf.GetFile().fileno())
-            sbf.Close()
-            self.assertFalse(f.closed)
-
-        with open(self.out_filename, 'r') as f:
-            self.assertEqual("foobar", f.read().strip())
-
-        with open(self.out_filename, 'wb') as f:
-            sbf = lldb.SBFile.Create(f, borrow=True, force_io_methods=True)
-            self.assertTrue(f is sbf.GetFile())
-            sbf.Write(b"foobar\n")
-            self.assertEqual(f.fileno(), sbf.GetFile().fileno())
-            sbf.Close()
-            self.assertFalse(f.closed)
-
-        with open(self.out_filename, 'r') as f:
-            self.assertEqual("foobar", f.read().strip())
-
-        with open(self.out_filename, 'wb') as f:
-            sbf = lldb.SBFile.Create(f, force_io_methods=True)
-            self.assertTrue(f is sbf.GetFile())
-            sbf.Write(b"foobar\n")
-            self.assertEqual(f.fileno(), sbf.GetFile().fileno())
-            sbf.Close()
-            self.assertTrue(f.closed)
-
-        with open(self.out_filename, 'r') as f:
-            self.assertEqual("foobar", f.read().strip())
-
-
-    @add_test_categories(['pyapi'])
-    def test_back_and_forth(self):
-        with open(self.out_filename, 'w') as f:
-            # at each step here we're borrowing the file, so we have to keep
-            # them all alive until the end.
-            sbf = lldb.SBFile.Create(f, borrow=True)
-            def i(sbf):
-                for i in range(10):
-                    f = sbf.GetFile()
-                    self.assertEqual(f.mode, "w")
-                    yield f
-                    sbf = lldb.SBFile.Create(f, borrow=True)
-                    yield sbf
-                    sbf.Write(str(i).encode('ascii') + b"\n")
-            files = list(i(sbf))
-        with open(self.out_filename, 'r') as f:
-            self.assertEqual(list(range(10)), list(map(int, f.read().strip().split())))
-
-
-    @add_test_categories(['pyapi'])
-    def test_set_filehandle_none(self):
-        self.assertRaises(Exception, self.debugger.SetOutputFile, None)
-        self.assertRaises(Exception, self.debugger.SetOutputFile, "ham sandwich")
-        self.assertRaises(Exception, self.debugger.SetOutputFileHandle, "ham sandwich")
-        self.assertRaises(Exception, self.debugger.SetInputFile, None)
-        self.assertRaises(Exception, self.debugger.SetInputFile, "ham sandwich")
-        self.assertRaises(Exception, self.debugger.SetInputFileHandle, "ham sandwich")
-        self.assertRaises(Exception, self.debugger.SetErrorFile, None)
-        self.assertRaises(Exception, self.debugger.SetErrorFile, "ham sandwich")
-        self.assertRaises(Exception, self.debugger.SetErrorFileHandle, "ham sandwich")
-
-        with open(self.out_filename, 'w') as f:
-            status = self.debugger.SetOutputFile(f)
-            self.assertTrue(status.Success())
-            status = self.debugger.SetErrorFile(f)
-            self.assertTrue(status.Success())
-            self.debugger.SetOutputFileHandle(None, False)
-            self.debugger.SetErrorFileHandle(None, False)
-            sbf = self.debugger.GetOutputFile()
-            if sys.version_info.major >= 3:
-                # python 2 lacks PyFile_FromFd, so GetFile() will
-                # have to duplicate the file descriptor and make a FILE*
-                # in order to convert a NativeFile it back to a python
-                # file.
-                self.assertEqual(sbf.GetFile().fileno(), 1)
-            sbf = self.debugger.GetErrorFile()
-            if sys.version_info.major >= 3:
-                self.assertEqual(sbf.GetFile().fileno(), 2)
-        with open(self.out_filename, 'r') as f:
-            status = self.debugger.SetInputFile(f)
-            self.assertTrue(status.Success())
-            self.debugger.SetInputFileHandle(None, False)
-            sbf = self.debugger.GetInputFile()
-            if sys.version_info.major >= 3:
-                self.assertEqual(sbf.GetFile().fileno(), 0)
-
-
-    @add_test_categories(['pyapi'])
-    def test_sbstream(self):
-
-        with open(self.out_filename, 'w') as f:
-            stream = lldb.SBStream()
-            stream.RedirectToFile(f)
-            stream.Print("zork")
-        with open(self.out_filename, 'r') as f:
-            self.assertEqual(f.read().strip(), "zork")
-
-        with open(self.out_filename, 'w') as f:
-            stream = lldb.SBStream()
-            stream.RedirectToFileHandle(f, True)
-            stream.Print("Yendor")
-        with open(self.out_filename, 'r') as f:
-            self.assertEqual(f.read().strip(), "Yendor")
-
-        stream = lldb.SBStream()
-        f = open(self.out_filename,  'w')
-        stream.RedirectToFile(lldb.SBFile.Create(f, borrow=False))
-        stream.Print("Frobozz")
-        stream = None
-        self.assertTrue(f.closed)
-        with open(self.out_filename, 'r') as f:
-            self.assertEqual(f.read().strip(), "Frobozz")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/Makefile
deleted file mode 100644 (file)
index 33da5d0..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
-
-# Clean renamed executable on 'make clean'
-clean::
-       $(RM) -f no_synth
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/TestSBFrameFindValue.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/TestSBFrameFindValue.py
deleted file mode 100644 (file)
index 0c9e280..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-"""Test that SBFrame::FindValue finds things but does not duplicate the entire variables list"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class SBFrameFindValueTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @add_test_categories(['pyapi'])
-    def test_formatters_api(self):
-        """Test that SBFrame::FindValue finds things but does not duplicate the entire variables list"""
-        self.build()
-        self.setTearDownCleanup()
-
-        exe = self.getBuildArtifact("a.out")
-
-        # Create the target
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Set the breakpoints
-        breakpoint = target.BreakpointCreateBySourceRegex(
-            'Set breakpoint here', lldb.SBFileSpec("main.cpp"))
-        self.assertTrue(breakpoint.GetNumLocations() > 0, VALID_BREAKPOINT)
-
-        # Launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Frame #0 should be at our breakpoint.
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-            process, breakpoint)
-
-        self.assertTrue(len(threads) == 1)
-        self.thread = threads[0]
-        self.frame = self.thread.frames[0]
-        self.assertTrue(self.frame, "Frame 0 is valid.")
-
-        self.assertTrue(
-            self.frame.GetVariables(
-                True,
-                True,
-                False,
-                True).GetSize() == 2,
-            "variable count is off")
-        self.assertFalse(
-            self.frame.FindValue(
-                "NoSuchThing",
-                lldb.eValueTypeVariableArgument,
-                lldb.eDynamicCanRunTarget).IsValid(),
-            "found something that should not be here")
-        self.assertTrue(
-            self.frame.GetVariables(
-                True,
-                True,
-                False,
-                True).GetSize() == 2,
-            "variable count is off after failed FindValue()")
-        self.assertTrue(
-            self.frame.FindValue(
-                "a",
-                lldb.eValueTypeVariableArgument,
-                lldb.eDynamicCanRunTarget).IsValid(),
-            "FindValue() didn't find an argument")
-        self.assertTrue(
-            self.frame.GetVariables(
-                True,
-                True,
-                False,
-                True).GetSize() == 2,
-            "variable count is off after successful FindValue()")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/main.cpp
deleted file mode 100644 (file)
index 7058d46..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-int foo(int a, int b) {
-       return a + b; // Set breakpoint here
-}
-
-int main() {
-       return foo(1,3);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/formatters/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/formatters/Makefile
deleted file mode 100644 (file)
index 16a8232..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
-
-# Clean renamed executable on 'make clean'
-clean::
-       $(RM) -f no_synth
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/formatters/TestFormattersSBAPI.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/formatters/TestFormattersSBAPI.py
deleted file mode 100644 (file)
index f01d7c4..0000000
+++ /dev/null
@@ -1,500 +0,0 @@
-"""Test Python APIs for working with formatters"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class SBFormattersAPITestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    @add_test_categories(['pyapi'])
-    def test_formatters_api(self):
-        """Test Python APIs for working with formatters"""
-        self.build()
-        self.setTearDownCleanup()
-
-        """Test Python APIs for working with formatters"""
-        self.runCmd("file " + self.getBuildArtifact("a.out"),
-                    CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1,
-            loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type filter clear', check=False)
-            self.runCmd('type synthetic clear', check=False)
-            self.runCmd('type category delete foobar', check=False)
-            self.runCmd('type category delete JASSynth', check=False)
-            self.runCmd('type category delete newbar', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        format = lldb.SBTypeFormat(lldb.eFormatHex)
-        category = self.dbg.GetDefaultCategory()
-        category.AddTypeFormat(lldb.SBTypeNameSpecifier("int"), format)
-
-        self.expect("frame variable foo.A",
-                    substrs=['0x00000001'])
-        self.expect("frame variable foo.E", matching=False,
-                    substrs=['b8cca70a'])
-
-        category.AddTypeFormat(lldb.SBTypeNameSpecifier("long"), format)
-        self.expect("frame variable foo.A",
-                    substrs=['0x00000001'])
-        self.expect("frame variable foo.E",
-                    substrs=['b8cca70a'])
-
-        format.SetFormat(lldb.eFormatOctal)
-        category.AddTypeFormat(lldb.SBTypeNameSpecifier("int"), format)
-        self.expect("frame variable foo.A",
-                    substrs=[' 01'])
-        self.expect("frame variable foo.E",
-                    substrs=['b8cca70a'])
-
-        category.DeleteTypeFormat(lldb.SBTypeNameSpecifier("int"))
-        category.DeleteTypeFormat(lldb.SBTypeNameSpecifier("long"))
-        self.expect("frame variable foo.A", matching=False,
-                    substrs=[' 01'])
-        self.expect("frame variable foo.E", matching=False,
-                    substrs=['b8cca70a'])
-
-        summary = lldb.SBTypeSummary.CreateWithSummaryString(
-            "the hello world you'll never see")
-        summary.SetSummaryString('hello world')
-        new_category = self.dbg.GetCategory("foobar")
-        self.assertFalse(
-            new_category.IsValid(),
-            "getting a non-existing category worked")
-        new_category = self.dbg.CreateCategory("foobar")
-        new_category.SetEnabled(True)
-        new_category.AddTypeSummary(
-            lldb.SBTypeNameSpecifier(
-                "^.*t$",
-                True,  # is_regexp
-            ), summary)
-
-        self.expect("frame variable foo.A",
-                    substrs=['hello world'])
-        self.expect("frame variable foo.E", matching=False,
-                    substrs=['hello world'])
-        self.expect("frame variable foo.B",
-                    substrs=['hello world'])
-        self.expect("frame variable foo.F",
-                    substrs=['hello world'])
-        new_category.SetEnabled(False)
-        self.expect("frame variable foo.A", matching=False,
-                    substrs=['hello world'])
-        self.expect("frame variable foo.E", matching=False,
-                    substrs=['hello world'])
-        self.expect("frame variable foo.B", matching=False,
-                    substrs=['hello world'])
-        self.expect("frame variable foo.F", matching=False,
-                    substrs=['hello world'])
-        self.dbg.DeleteCategory(new_category.GetName())
-        self.expect("frame variable foo.A", matching=False,
-                    substrs=['hello world'])
-        self.expect("frame variable foo.E", matching=False,
-                    substrs=['hello world'])
-        self.expect("frame variable foo.B", matching=False,
-                    substrs=['hello world'])
-        self.expect("frame variable foo.F", matching=False,
-                    substrs=['hello world'])
-
-        filter = lldb.SBTypeFilter(0)
-        filter.AppendExpressionPath("A")
-        filter.AppendExpressionPath("D")
-        self.assertTrue(
-            filter.GetNumberOfExpressionPaths() == 2,
-            "filter with two items does not have two items")
-
-        category.AddTypeFilter(lldb.SBTypeNameSpecifier("JustAStruct"), filter)
-        self.expect("frame variable foo",
-                    substrs=['A = 1', 'D = 6.28'])
-        self.expect("frame variable foo", matching=False,
-                    substrs=['B = ', 'C = ', 'E = ', 'F = '])
-
-        category.DeleteTypeFilter(
-            lldb.SBTypeNameSpecifier(
-                "JustAStruct", True))
-        self.expect("frame variable foo",
-                    substrs=['A = 1', 'D = 6.28'])
-        self.expect("frame variable foo", matching=False,
-                    substrs=['B = ', 'C = ', 'E = ', 'F = '])
-
-        category.DeleteTypeFilter(
-            lldb.SBTypeNameSpecifier(
-                "JustAStruct", False))
-        self.expect("frame variable foo",
-                    substrs=['A = 1', 'D = 6.28'])
-        self.expect("frame variable foo", matching=True,
-                    substrs=['B = ', 'C = ', 'E = ', 'F = '])
-
-        self.runCmd("command script import --allow-reload ./synth.py")
-
-        self.expect("frame variable foo", matching=False,
-                    substrs=['X = 1'])
-
-        self.dbg.GetCategory("JASSynth").SetEnabled(True)
-        self.expect("frame variable foo", matching=True,
-                    substrs=['X = 1'])
-
-        self.dbg.GetCategory("CCCSynth").SetEnabled(True)
-        self.expect(
-            "frame variable ccc",
-            matching=True,
-            substrs=[
-                'CCC object with leading value (int) a = 111',
-                'a = 111',
-                'b = 222',
-                'c = 333'])
-
-        foo_var = self.dbg.GetSelectedTarget().GetProcess(
-        ).GetSelectedThread().GetSelectedFrame().FindVariable('foo')
-        self.assertTrue(foo_var.IsValid(), 'could not find foo')
-        self.assertTrue(
-            foo_var.GetDeclaration().IsValid(),
-            'foo declaration is invalid')
-
-        self.assertTrue(
-            foo_var.GetNumChildren() == 2,
-            'synthetic value has wrong number of child items (synth)')
-        self.assertTrue(
-            foo_var.GetChildMemberWithName('X').GetValueAsUnsigned() == 1,
-            'foo_synth.X has wrong value (synth)')
-        self.assertFalse(
-            foo_var.GetChildMemberWithName('B').IsValid(),
-            'foo_synth.B is valid but should not (synth)')
-
-        self.dbg.GetCategory("JASSynth").SetEnabled(False)
-        foo_var = self.dbg.GetSelectedTarget().GetProcess(
-        ).GetSelectedThread().GetSelectedFrame().FindVariable('foo')
-        self.assertTrue(foo_var.IsValid(), 'could not find foo')
-
-        self.assertFalse(
-            foo_var.GetNumChildren() == 2,
-            'still seeing synthetic value')
-
-        filter = lldb.SBTypeFilter(0)
-        filter.AppendExpressionPath("A")
-        filter.AppendExpressionPath("D")
-        category.AddTypeFilter(lldb.SBTypeNameSpecifier("JustAStruct"), filter)
-        self.expect("frame variable foo",
-                    substrs=['A = 1', 'D = 6.28'])
-
-        foo_var = self.dbg.GetSelectedTarget().GetProcess(
-        ).GetSelectedThread().GetSelectedFrame().FindVariable('foo')
-        self.assertTrue(foo_var.IsValid(), 'could not find foo')
-
-        self.assertTrue(
-            foo_var.GetNumChildren() == 2,
-            'synthetic value has wrong number of child items (filter)')
-        self.assertTrue(
-            foo_var.GetChildMemberWithName('X').GetValueAsUnsigned() == 0,
-            'foo_synth.X has wrong value (filter)')
-        self.assertTrue(
-            foo_var.GetChildMemberWithName('A').GetValueAsUnsigned() == 1,
-            'foo_synth.A has wrong value (filter)')
-
-        self.assertTrue(filter.ReplaceExpressionPathAtIndex(
-            0, "C"), "failed to replace an expression path in filter")
-        self.expect("frame variable foo",
-                    substrs=['A = 1', 'D = 6.28'])
-        category.AddTypeFilter(lldb.SBTypeNameSpecifier("JustAStruct"), filter)
-        self.expect("frame variable foo",
-                    substrs=["C = 'e'", 'D = 6.28'])
-        category.AddTypeFilter(lldb.SBTypeNameSpecifier("FooType"), filter)
-        filter.ReplaceExpressionPathAtIndex(1, "F")
-        self.expect("frame variable foo",
-                    substrs=["C = 'e'", 'D = 6.28'])
-        category.AddTypeFilter(lldb.SBTypeNameSpecifier("JustAStruct"), filter)
-        self.expect("frame variable foo",
-                    substrs=["C = 'e'", 'F = 0'])
-        self.expect("frame variable bar",
-                    substrs=["C = 'e'", 'D = 6.28'])
-
-        foo_var = self.dbg.GetSelectedTarget().GetProcess(
-        ).GetSelectedThread().GetSelectedFrame().FindVariable('foo')
-        self.assertTrue(foo_var.IsValid(), 'could not find foo')
-        self.assertTrue(
-            foo_var.GetChildMemberWithName('C').GetValueAsUnsigned() == ord('e'),
-            'foo_synth.C has wrong value (filter)')
-
-        chosen = self.dbg.GetFilterForType(
-            lldb.SBTypeNameSpecifier("JustAStruct"))
-        self.assertTrue(
-            chosen.count == 2,
-            "wrong filter found for JustAStruct")
-        self.assertTrue(
-            chosen.GetExpressionPathAtIndex(0) == 'C',
-            "wrong item at index 0 for JustAStruct")
-        self.assertTrue(
-            chosen.GetExpressionPathAtIndex(1) == 'F',
-            "wrong item at index 1 for JustAStruct")
-
-        self.assertFalse(
-            category.DeleteTypeFilter(
-                lldb.SBTypeNameSpecifier("NoSuchType")),
-            "deleting a non-existing filter worked")
-        self.assertFalse(
-            category.DeleteTypeSummary(
-                lldb.SBTypeNameSpecifier("NoSuchType")),
-            "deleting a non-existing summary worked")
-        self.assertFalse(
-            category.DeleteTypeFormat(
-                lldb.SBTypeNameSpecifier("NoSuchType")),
-            "deleting a non-existing format worked")
-        self.assertFalse(
-            category.DeleteTypeSynthetic(
-                lldb.SBTypeNameSpecifier("NoSuchType")),
-            "deleting a non-existing synthetic worked")
-
-        self.assertFalse(
-            category.DeleteTypeFilter(
-                lldb.SBTypeNameSpecifier("")),
-            "deleting a filter for '' worked")
-        self.assertFalse(
-            category.DeleteTypeSummary(
-                lldb.SBTypeNameSpecifier("")),
-            "deleting a summary for '' worked")
-        self.assertFalse(
-            category.DeleteTypeFormat(
-                lldb.SBTypeNameSpecifier("")),
-            "deleting a format for '' worked")
-        self.assertFalse(
-            category.DeleteTypeSynthetic(
-                lldb.SBTypeNameSpecifier("")),
-            "deleting a synthetic for '' worked")
-
-        try:
-            self.assertFalse(
-                category.AddTypeSummary(
-                    lldb.SBTypeNameSpecifier("NoneSuchType"),
-                    None),
-                "adding a summary valued None worked")
-        except:
-            pass
-        else:
-            self.assertFalse(True, "adding a summary valued None worked")
-
-        try:
-            self.assertFalse(
-                category.AddTypeFilter(
-                    lldb.SBTypeNameSpecifier("NoneSuchType"),
-                    None),
-                "adding a filter valued None worked")
-        except:
-            pass
-        else:
-            self.assertFalse(True, "adding a filter valued None worked")
-
-        try:
-            self.assertFalse(
-                category.AddTypeSynthetic(
-                    lldb.SBTypeNameSpecifier("NoneSuchType"),
-                    None),
-                "adding a synthetic valued None worked")
-        except:
-            pass
-        else:
-            self.assertFalse(True, "adding a synthetic valued None worked")
-
-        try:
-            self.assertFalse(
-                category.AddTypeFormat(
-                    lldb.SBTypeNameSpecifier("NoneSuchType"),
-                    None),
-                "adding a format valued None worked")
-        except:
-            pass
-        else:
-            self.assertFalse(True, "adding a format valued None worked")
-
-        self.assertFalse(
-            category.AddTypeSummary(
-                lldb.SBTypeNameSpecifier("EmptySuchType"),
-                lldb.SBTypeSummary()),
-            "adding a summary without value worked")
-        self.assertFalse(
-            category.AddTypeFilter(
-                lldb.SBTypeNameSpecifier("EmptySuchType"),
-                lldb.SBTypeFilter()),
-            "adding a filter without value worked")
-        self.assertFalse(
-            category.AddTypeSynthetic(
-                lldb.SBTypeNameSpecifier("EmptySuchType"),
-                lldb.SBTypeSynthetic()),
-            "adding a synthetic without value worked")
-        self.assertFalse(
-            category.AddTypeFormat(
-                lldb.SBTypeNameSpecifier("EmptySuchType"),
-                lldb.SBTypeFormat()),
-            "adding a format without value worked")
-
-        self.assertFalse(
-            category.AddTypeSummary(
-                lldb.SBTypeNameSpecifier(""),
-                lldb.SBTypeSummary.CreateWithSummaryString("")),
-            "adding a summary for an invalid type worked")
-        self.assertFalse(
-            category.AddTypeFilter(
-                lldb.SBTypeNameSpecifier(""),
-                lldb.SBTypeFilter(0)),
-            "adding a filter for an invalid type worked")
-        self.assertFalse(
-            category.AddTypeSynthetic(
-                lldb.SBTypeNameSpecifier(""),
-                lldb.SBTypeSynthetic.CreateWithClassName("")),
-            "adding a synthetic for an invalid type worked")
-        self.assertFalse(
-            category.AddTypeFormat(
-                lldb.SBTypeNameSpecifier(""),
-                lldb.SBTypeFormat(
-                    lldb.eFormatHex)),
-            "adding a format for an invalid type worked")
-
-        new_category = self.dbg.CreateCategory("newbar")
-        new_category.AddTypeSummary(
-            lldb.SBTypeNameSpecifier("JustAStruct"),
-            lldb.SBTypeSummary.CreateWithScriptCode("return 'hello scripted world';"))
-        self.expect("frame variable foo", matching=False,
-                    substrs=['hello scripted world'])
-        new_category.SetEnabled(True)
-        self.expect("frame variable foo", matching=True,
-                    substrs=['hello scripted world'])
-
-        self.expect("frame variable foo_ptr", matching=True,
-                    substrs=['hello scripted world'])
-        new_category.AddTypeSummary(
-            lldb.SBTypeNameSpecifier("JustAStruct"),
-            lldb.SBTypeSummary.CreateWithScriptCode(
-                "return 'hello scripted world';",
-                lldb.eTypeOptionSkipPointers))
-        self.expect("frame variable foo", matching=True,
-                    substrs=['hello scripted world'])
-
-        frame = self.dbg.GetSelectedTarget().GetProcess(
-        ).GetSelectedThread().GetSelectedFrame()
-        foo_ptr = frame.FindVariable("foo_ptr")
-        summary = foo_ptr.GetTypeSummary()
-
-        self.assertFalse(
-            summary.IsValid(),
-            "summary found for foo* when none was planned")
-
-        self.expect("frame variable foo_ptr", matching=False,
-                    substrs=['hello scripted world'])
-
-        new_category.AddTypeSummary(
-            lldb.SBTypeNameSpecifier("JustAStruct"),
-            lldb.SBTypeSummary.CreateWithSummaryString(
-                "hello static world",
-                lldb.eTypeOptionNone))
-
-        summary = foo_ptr.GetTypeSummary()
-
-        self.assertTrue(
-            summary.IsValid(),
-            "no summary found for foo* when one was in place")
-        self.assertTrue(
-            summary.GetData() == "hello static world",
-            "wrong summary found for foo*")
-
-        self.expect("frame variable e1", substrs=["I am an empty Empty1 {}"])
-        self.expect("frame variable e2", substrs=["I am an empty Empty2"])
-        self.expect(
-            "frame variable e2",
-            substrs=["I am an empty Empty2 {}"],
-            matching=False)
-
-        self.assertTrue(
-            self.dbg.GetCategory(
-                lldb.eLanguageTypeObjC) is not None,
-            "ObjC category is None")
-
-    @add_test_categories(['pyapi'])
-    def test_force_synth_off(self):
-        """Test that one can have the public API return non-synthetic SBValues if desired"""
-        self.build(dictionary={'EXE': 'no_synth'})
-        self.setTearDownCleanup()
-
-        self.runCmd("file " + self.getBuildArtifact("no_synth"),
-                    CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type filter clear', check=False)
-            self.runCmd('type synthetic clear', check=False)
-            self.runCmd('type category delete foobar', check=False)
-            self.runCmd('type category delete JASSynth', check=False)
-            self.runCmd('type category delete newbar', check=False)
-            self.runCmd('settings set target.enable-synthetic-value true')
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        frame = self.dbg.GetSelectedTarget().GetProcess(
-        ).GetSelectedThread().GetSelectedFrame()
-        int_vector = frame.FindVariable("int_vector")
-        if self.TraceOn():
-            print(int_vector)
-        self.assertTrue(
-            int_vector.GetNumChildren() == 0,
-            'synthetic vector is empty')
-
-        self.runCmd('settings set target.enable-synthetic-value false')
-        frame = self.dbg.GetSelectedTarget().GetProcess(
-        ).GetSelectedThread().GetSelectedFrame()
-        int_vector = frame.FindVariable("int_vector")
-        if self.TraceOn():
-            print(int_vector)
-        self.assertFalse(
-            int_vector.GetNumChildren() == 0,
-            '"physical" vector is not empty')
-
-        self.runCmd('settings set target.enable-synthetic-value true')
-        frame = self.dbg.GetSelectedTarget().GetProcess(
-        ).GetSelectedThread().GetSelectedFrame()
-        int_vector = frame.FindVariable("int_vector")
-        if self.TraceOn():
-            print(int_vector)
-        self.assertTrue(
-            int_vector.GetNumChildren() == 0,
-            'synthetic vector is still empty')
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/formatters/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/formatters/main.cpp
deleted file mode 100644 (file)
index f21c956..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-#include <stdio.h>
-#include <vector>
-
-struct JustAStruct
-{
-       int A;
-       float B;
-       char C;
-       double D;
-       long E;
-       short F;
-};
-
-struct FooType
-{
-       int A;
-       float B;
-       char C;
-       double D;
-       long E;
-       short F;
-};
-
-struct CCC
-{
-       int a, b, c;
-};
-
-struct Empty1 { void *data; };
-struct Empty2 { void *data; };
-
-
-int main(int argc, char const *argv[]) {
-       JustAStruct foo;
-       foo.A = 1;
-       foo.B = 3.14;
-       foo.C = 'e';
-       foo.D = 6.28;
-       foo.E = 3100419850;
-       foo.F = 0;
-
-       FooType bar;
-       bar.A = 1;
-       bar.B = 3.14;
-       bar.C = 'e';
-       bar.D = 6.28;
-       bar.E = 3100419850;
-       bar.F = 0;
-       JustAStruct* foo_ptr = &foo;
-
-       std::vector<int> int_vector;
-
-       CCC ccc = {111, 222, 333};
-
-        Empty1 e1;
-        Empty2 e2;
-
-       return 0; // Set break point at this line.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/formatters/synth.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/formatters/synth.py
deleted file mode 100644 (file)
index 75a8d6c..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-import lldb
-
-
-class jasSynthProvider:
-
-    def __init__(self, valobj, dict):
-        self.valobj = valobj
-
-    def num_children(self):
-        return 2
-
-    def get_child_at_index(self, index):
-        child = None
-        if index == 0:
-            child = self.valobj.GetChildMemberWithName('A')
-        if index == 1:
-            child = self.valobj.CreateValueFromExpression('X', '(int)1')
-        return child
-
-    def get_child_index(self, name):
-        if name == 'A':
-            return 0
-        if name == 'X':
-            return 1
-        return None
-
-
-def ccc_summary(sbvalue, internal_dict):
-    sbvalue = sbvalue.GetNonSyntheticValue()
-    # This tests that the SBValue.GetNonSyntheticValue() actually returns a
-    # non-synthetic value. If it does not, then sbvalue.GetChildMemberWithName("a")
-    # in the following statement will call the 'get_child_index' method of the
-    # synthetic child provider CCCSynthProvider below (which raises an
-    # exception).
-    return "CCC object with leading value " + \
-        str(sbvalue.GetChildMemberWithName("a"))
-
-
-class CCCSynthProvider(object):
-
-    def __init__(self, sbvalue, internal_dict):
-        self._sbvalue = sbvalue
-
-    def num_children(self):
-        return 3
-
-    def get_child_index(self, name):
-        raise RuntimeError("I don't want to be called!")
-
-    def get_child_at_index(self, index):
-        if index == 0:
-            return self._sbvalue.GetChildMemberWithName("a")
-        if index == 1:
-            return self._sbvalue.GetChildMemberWithName("b")
-        if index == 2:
-            return self._sbvalue.GetChildMemberWithName("c")
-
-
-def empty1_summary(sbvalue, internal_dict):
-    return "I am an empty Empty1"
-
-
-class Empty1SynthProvider(object):
-
-    def __init__(self, sbvalue, internal_dict):
-        self._sbvalue = sbvalue
-
-    def num_children(self):
-        return 0
-
-    def get_child_at_index(self, index):
-        return None
-
-
-def empty2_summary(sbvalue, internal_dict):
-    return "I am an empty Empty2"
-
-
-class Empty2SynthProvider(object):
-
-    def __init__(self, sbvalue, internal_dict):
-        self._sbvalue = sbvalue
-
-    def num_children(self):
-        return 0
-
-    def get_child_at_index(self, index):
-        return None
-
-
-def __lldb_init_module(debugger, dict):
-    debugger.CreateCategory("JASSynth").AddTypeSynthetic(
-        lldb.SBTypeNameSpecifier("JustAStruct"),
-        lldb.SBTypeSynthetic.CreateWithClassName("synth.jasSynthProvider"))
-    cat = debugger.CreateCategory("CCCSynth")
-    cat.AddTypeSynthetic(
-        lldb.SBTypeNameSpecifier("CCC"),
-        lldb.SBTypeSynthetic.CreateWithClassName("synth.CCCSynthProvider",
-                                                 lldb.eTypeOptionCascade))
-    cat.AddTypeSummary(
-        lldb.SBTypeNameSpecifier("CCC"),
-        lldb.SBTypeSummary.CreateWithFunctionName("synth.ccc_summary",
-                                                  lldb.eTypeOptionCascade))
-    cat.AddTypeSynthetic(
-        lldb.SBTypeNameSpecifier("Empty1"),
-        lldb.SBTypeSynthetic.CreateWithClassName("synth.Empty1SynthProvider"))
-    cat.AddTypeSummary(
-        lldb.SBTypeNameSpecifier("Empty1"),
-        lldb.SBTypeSummary.CreateWithFunctionName("synth.empty1_summary"))
-    cat.AddTypeSynthetic(
-        lldb.SBTypeNameSpecifier("Empty2"),
-        lldb.SBTypeSynthetic.CreateWithClassName("synth.Empty2SynthProvider"))
-    cat.AddTypeSummary(
-        lldb.SBTypeNameSpecifier("Empty2"),
-        lldb.SBTypeSummary.CreateWithFunctionName(
-            "synth.empty2_summary",
-            lldb.eTypeOptionHideEmptyAggregates))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/frame/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/frame/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py
deleted file mode 100644 (file)
index 91ac30e..0000000
+++ /dev/null
@@ -1,221 +0,0 @@
-"""
-Use lldb Python SBFrame API to get the argument values of the call stacks.
-And other SBFrame API tests.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class FrameAPITestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(['pyapi'])
-    def test_get_arg_vals_for_call_stack(self):
-        """Exercise SBFrame.GetVariables() API to get argument vals."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create a breakpoint on main.c by name 'c'.
-        breakpoint = target.BreakpointCreateByName('c', 'a.out')
-        #print("breakpoint:", breakpoint)
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        process = target.GetProcess()
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        PROCESS_STOPPED)
-
-        # Keeps track of the number of times 'a' is called where it is within a
-        # depth of 3 of the 'c' leaf function.
-        callsOfA = 0
-
-        from six import StringIO as SixStringIO
-        session = SixStringIO()
-        while process.GetState() == lldb.eStateStopped:
-            thread = lldbutil.get_stopped_thread(
-                process, lldb.eStopReasonBreakpoint)
-            self.assertIsNotNone(thread)
-            # Inspect at most 3 frames.
-            numFrames = min(3, thread.GetNumFrames())
-            for i in range(numFrames):
-                frame = thread.GetFrameAtIndex(i)
-                if self.TraceOn():
-                    print("frame:", frame)
-
-                name = frame.GetFunction().GetName()
-                if name == 'a':
-                    callsOfA = callsOfA + 1
-
-                # We'll inspect only the arguments for the current frame:
-                #
-                # arguments     => True
-                # locals        => False
-                # statics       => False
-                # in_scope_only => True
-                valList = frame.GetVariables(True, False, False, True)
-                argList = []
-                for val in valList:
-                    argList.append("(%s)%s=%s" % (val.GetTypeName(),
-                                                  val.GetName(),
-                                                  val.GetValue()))
-                print("%s(%s)" % (name, ", ".join(argList)), file=session)
-
-                # Also check the generic pc & stack pointer.  We can't test their absolute values,
-                # but they should be valid.  Uses get_GPRs() from the lldbutil
-                # module.
-                gpr_reg_set = lldbutil.get_GPRs(frame)
-                pc_value = gpr_reg_set.GetChildMemberWithName("pc")
-                self.assertTrue(pc_value, "We should have a valid PC.")
-                pc_value_int = int(pc_value.GetValue(), 0)
-                # Make sure on arm targets we dont mismatch PC value on the basis of thumb bit.
-                # Frame PC will not have thumb bit set in case of a thumb
-                # instruction as PC.
-                if self.getArchitecture() in ['arm', 'armv7', 'armv7k']:
-                    pc_value_int &= ~1
-                self.assertTrue(
-                    pc_value_int == frame.GetPC(),
-                    "PC gotten as a value should equal frame's GetPC")
-                sp_value = gpr_reg_set.GetChildMemberWithName("sp")
-                self.assertTrue(
-                    sp_value, "We should have a valid Stack Pointer.")
-                self.assertTrue(int(sp_value.GetValue(), 0) == frame.GetSP(
-                ), "SP gotten as a value should equal frame's GetSP")
-
-            print("---", file=session)
-            process.Continue()
-
-        # At this point, the inferior process should have exited.
-        self.assertTrue(
-            process.GetState() == lldb.eStateExited,
-            PROCESS_EXITED)
-
-        # Expect to find 'a' on the call stacks two times.
-        self.assertTrue(callsOfA == 2,
-                        "Expect to find 'a' on the call stacks two times")
-        # By design, the 'a' call frame has the following arg vals:
-        #     o a((int)val=1, (char)ch='A')
-        #     o a((int)val=3, (char)ch='A')
-        if self.TraceOn():
-            print("Full stack traces when stopped on the breakpoint 'c':")
-            print(session.getvalue())
-        self.expect(session.getvalue(), "Argugment values displayed correctly",
-                    exe=False,
-                    substrs=["a((int)val=1, (char)ch='A')",
-                             "a((int)val=3, (char)ch='A')"])
-
-    @add_test_categories(['pyapi'])
-    def test_frame_api_boundary_condition(self):
-        """Exercise SBFrame APIs with boundary condition inputs."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create a breakpoint on main.c by name 'c'.
-        breakpoint = target.BreakpointCreateByName('c', 'a.out')
-        #print("breakpoint:", breakpoint)
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        process = target.GetProcess()
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        PROCESS_STOPPED)
-
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertIsNotNone(thread)
-        frame = thread.GetFrameAtIndex(0)
-        if self.TraceOn():
-            print("frame:", frame)
-
-        # Boundary condition testings.
-        val1 = frame.FindVariable(None, True)
-        val2 = frame.FindVariable(None, False)
-        val3 = frame.FindValue(None, lldb.eValueTypeVariableGlobal)
-        if self.TraceOn():
-            print("val1:", val1)
-            print("val2:", val2)
-
-        frame.EvaluateExpression(None)
-
-    @add_test_categories(['pyapi'])
-    def test_frame_api_IsEqual(self):
-        """Exercise SBFrame API IsEqual."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create a breakpoint on main.c by name 'c'.
-        breakpoint = target.BreakpointCreateByName('c', 'a.out')
-        #print("breakpoint:", breakpoint)
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        process = target.GetProcess()
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        PROCESS_STOPPED)
-
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertIsNotNone(thread)
-
-        frameEntered = thread.GetFrameAtIndex(0)
-        if self.TraceOn():
-            print(frameEntered)
-            lldbutil.print_stacktrace(thread)
-        self.assertTrue(frameEntered)
-
-        # Doing two step overs while still inside c().
-        thread.StepOver()
-        thread.StepOver()
-        self.assertTrue(thread)
-        frameNow = thread.GetFrameAtIndex(0)
-        if self.TraceOn():
-            print(frameNow)
-            lldbutil.print_stacktrace(thread)
-        self.assertTrue(frameNow)
-
-        # The latest two frames are considered equal.
-        self.assertTrue(frameEntered.IsEqual(frameNow))
-
-        # Now let's step out of frame c().
-        thread.StepOutOfFrame(frameNow)
-        frameOutOfC = thread.GetFrameAtIndex(0)
-        if self.TraceOn():
-            print(frameOutOfC)
-            lldbutil.print_stacktrace(thread)
-        self.assertTrue(frameOutOfC)
-
-        # The latest two frames should not be equal.
-        self.assertFalse(frameOutOfC.IsEqual(frameNow))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
deleted file mode 100644 (file)
index 7ced4dd..0000000
+++ /dev/null
@@ -1,294 +0,0 @@
-"""
-Test that SBFrame::GetVariables() calls work correctly.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbplatform
-from lldbsuite.test import lldbutil
-
-
-def get_names_from_value_list(value_list):
-    names = list()
-    for value in value_list:
-        names.append(value.GetName())
-    return names
-
-
-class TestGetVariables(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        self.source = 'main.c'
-
-    def verify_variable_names(self, description, value_list, names):
-        copy_names = list(names)
-        actual_names = get_names_from_value_list(value_list)
-        for name in actual_names:
-            if name in copy_names:
-                copy_names.remove(name)
-            else:
-                self.assertTrue(
-                    False, "didn't find '%s' in %s" %
-                    (name, copy_names))
-        self.assertEqual(
-            len(copy_names), 0, "%s: we didn't find variables: %s in value list (%s)" %
-            (description, copy_names, actual_names))
-
-    def test(self):
-        self.build()
-
-        # Set debugger into synchronous mode
-        self.dbg.SetAsync(False)
-
-        # Create a target by the debugger.
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        line1 = line_number(self.source, '// breakpoint 1')
-        line2 = line_number(self.source, '// breakpoint 2')
-        line3 = line_number(self.source, '// breakpoint 3')
-
-        breakpoint1 = target.BreakpointCreateByLocation(self.source, line1)
-        breakpoint2 = target.BreakpointCreateByLocation(self.source, line2)
-        breakpoint3 = target.BreakpointCreateByLocation(self.source, line3)
-
-        self.assertTrue(breakpoint1.GetNumLocations() >= 1, PROCESS_IS_VALID)
-        self.assertTrue(breakpoint2.GetNumLocations() >= 1, PROCESS_IS_VALID)
-        self.assertTrue(breakpoint3.GetNumLocations() >= 1, PROCESS_IS_VALID)
-
-        # Register our shared libraries for remote targets so they get
-        # automatically uploaded
-        arguments = None
-        environment = None
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            arguments, environment, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-            process, breakpoint1)
-        self.assertEqual(
-            len(threads),
-            1,
-            "There should be a thread stopped at breakpoint 1")
-
-        thread = threads[0]
-        self.assertTrue(thread.IsValid(), "Thread must be valid")
-        frame = thread.GetFrameAtIndex(0)
-        self.assertTrue(frame.IsValid(), "Frame must be valid")
-
-        arg_names = ['argc', 'argv']
-        local_names = ['i', 'j', 'k']
-        static_names = ['static_var', 'g_global_var', 'g_static_var']
-        breakpoint1_locals = ['i']
-        breakpoint1_statics = ['static_var']
-        num_args = len(arg_names)
-        num_locals = len(local_names)
-        num_statics = len(static_names)
-        args_yes = True
-        args_no = False
-        locals_yes = True
-        locals_no = False
-        statics_yes = True
-        statics_no = False
-        in_scopy_only = True
-        ignore_scope = False
-
-        # Verify if we ask for only arguments that we got what we expect
-        vars = frame.GetVariables(
-            args_yes, locals_no, statics_no, ignore_scope)
-        self.assertEqual(
-            vars.GetSize(),
-            num_args,
-            "There should be %i arguments, but we are reporting %i" %
-            (num_args,
-             vars.GetSize()))
-        self.verify_variable_names("check names of arguments", vars, arg_names)
-        self.assertEqual(
-            len(arg_names),
-            num_args,
-            "make sure verify_variable_names() didn't mutate list")
-
-        # Verify if we ask for only locals that we got what we expect
-        vars = frame.GetVariables(
-            args_no, locals_yes, statics_no, ignore_scope)
-        self.assertEqual(
-            vars.GetSize(),
-            num_locals,
-            "There should be %i local variables, but we are reporting %i" %
-            (num_locals,
-             vars.GetSize()))
-        self.verify_variable_names("check names of locals", vars, local_names)
-
-        # Verify if we ask for only statics that we got what we expect
-        vars = frame.GetVariables(
-            args_no, locals_no, statics_yes, ignore_scope)
-        print('statics: ', str(vars))
-        self.assertEqual(
-            vars.GetSize(),
-            num_statics,
-            "There should be %i static variables, but we are reporting %i" %
-            (num_statics,
-             vars.GetSize()))
-        self.verify_variable_names(
-            "check names of statics", vars, static_names)
-
-        # Verify if we ask for arguments and locals that we got what we expect
-        vars = frame.GetVariables(
-            args_yes, locals_yes, statics_no, ignore_scope)
-        desc = 'arguments + locals'
-        names = arg_names + local_names
-        count = len(names)
-        self.assertEqual(
-            vars.GetSize(),
-            count,
-            "There should be %i %s (%s) but we are reporting %i (%s)" %
-            (count,
-             desc,
-             names,
-             vars.GetSize(),
-             get_names_from_value_list(vars)))
-        self.verify_variable_names("check names of %s" % (desc), vars, names)
-
-        # Verify if we ask for arguments and statics that we got what we expect
-        vars = frame.GetVariables(
-            args_yes, locals_no, statics_yes, ignore_scope)
-        desc = 'arguments + statics'
-        names = arg_names + static_names
-        count = len(names)
-        self.assertEqual(
-            vars.GetSize(),
-            count,
-            "There should be %i %s (%s) but we are reporting %i (%s)" %
-            (count,
-             desc,
-             names,
-             vars.GetSize(),
-             get_names_from_value_list(vars)))
-        self.verify_variable_names("check names of %s" % (desc), vars, names)
-
-        # Verify if we ask for locals and statics that we got what we expect
-        vars = frame.GetVariables(
-            args_no, locals_yes, statics_yes, ignore_scope)
-        desc = 'locals + statics'
-        names = local_names + static_names
-        count = len(names)
-        self.assertEqual(
-            vars.GetSize(),
-            count,
-            "There should be %i %s (%s) but we are reporting %i (%s)" %
-            (count,
-             desc,
-             names,
-             vars.GetSize(),
-             get_names_from_value_list(vars)))
-        self.verify_variable_names("check names of %s" % (desc), vars, names)
-
-        # Verify if we ask for arguments, locals and statics that we got what
-        # we expect
-        vars = frame.GetVariables(
-            args_yes, locals_yes, statics_yes, ignore_scope)
-        desc = 'arguments + locals + statics'
-        names = arg_names + local_names + static_names
-        count = len(names)
-        self.assertEqual(
-            vars.GetSize(),
-            count,
-            "There should be %i %s (%s) but we are reporting %i (%s)" %
-            (count,
-             desc,
-             names,
-             vars.GetSize(),
-             get_names_from_value_list(vars)))
-        self.verify_variable_names("check names of %s" % (desc), vars, names)
-
-        # Verify if we ask for in scope locals that we got what we expect
-        vars = frame.GetVariables(
-            args_no, locals_yes, statics_no, in_scopy_only)
-        desc = 'in scope locals at breakpoint 1'
-        names = ['i']
-        count = len(names)
-        self.assertEqual(
-            vars.GetSize(),
-            count,
-            "There should be %i %s (%s) but we are reporting %i (%s)" %
-            (count,
-             desc,
-             names,
-             vars.GetSize(),
-             get_names_from_value_list(vars)))
-        self.verify_variable_names("check names of %s" % (desc), vars, names)
-
-        # Continue to breakpoint 2
-        process.Continue()
-
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-            process, breakpoint2)
-        self.assertEqual(
-            len(threads),
-            1,
-            "There should be a thread stopped at breakpoint 2")
-
-        thread = threads[0]
-        self.assertTrue(thread.IsValid(), "Thread must be valid")
-        frame = thread.GetFrameAtIndex(0)
-        self.assertTrue(frame.IsValid(), "Frame must be valid")
-
-        # Verify if we ask for in scope locals that we got what we expect
-        vars = frame.GetVariables(
-            args_no, locals_yes, statics_no, in_scopy_only)
-        desc = 'in scope locals at breakpoint 2'
-        names = ['i', 'j']
-        count = len(names)
-        self.assertEqual(
-            vars.GetSize(),
-            count,
-            "There should be %i %s (%s) but we are reporting %i (%s)" %
-            (count,
-             desc,
-             names,
-             vars.GetSize(),
-             get_names_from_value_list(vars)))
-        self.verify_variable_names("check names of %s" % (desc), vars, names)
-
-        # Continue to breakpoint 3
-        process.Continue()
-
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-            process, breakpoint3)
-        self.assertEqual(
-            len(threads),
-            1,
-            "There should be a thread stopped at breakpoint 3")
-
-        thread = threads[0]
-        self.assertTrue(thread.IsValid(), "Thread must be valid")
-        frame = thread.GetFrameAtIndex(0)
-        self.assertTrue(frame.IsValid(), "Frame must be valid")
-
-        # Verify if we ask for in scope locals that we got what we expect
-        vars = frame.GetVariables(
-            args_no, locals_yes, statics_no, in_scopy_only)
-        desc = 'in scope locals at breakpoint 3'
-        names = ['i', 'j', 'k']
-        count = len(names)
-        self.assertEqual(
-            vars.GetSize(),
-            count,
-            "There should be %i %s (%s) but we are reporting %i (%s)" %
-            (count,
-             desc,
-             names,
-             vars.GetSize(),
-             get_names_from_value_list(vars)))
-        self.verify_variable_names("check names of %s" % (desc), vars, names)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c
deleted file mode 100644 (file)
index 7606e2a..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-int g_global_var = 123;
-static int g_static_var = 123;
-
-int main (int argc, char const *argv[])
-{
-    static int static_var = 123;
-    g_static_var = 123; // clang bug. Need to touch this variable, otherwise it disappears.
-    int i = 0;                                  // breakpoint 1
-    for (i=0; i<1; ++i)
-    {
-        int j = i*2;
-        printf("i = %i, j = %i\n", i, j);       // breakpoint 2
-        {
-            int k = i*j*3;
-            printf("i = %i, j = %i\n", i, j);   // breakpoint 3
-        }
-    }
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/Makefile
deleted file mode 100644 (file)
index e6d9d83..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-C_SOURCES := inlines.c
-
-ifneq (,$(findstring icc,$(CC)))
-    CFLAGS_EXTRAS := -debug inline-debug-info
-endif
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/TestInlinedFrame.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/TestInlinedFrame.py
deleted file mode 100644 (file)
index da4e9cb..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-"""
-Testlldb Python SBFrame APIs IsInlined() and GetFunctionName().
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class InlinedFrameAPITestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to of function 'c'.
-        self.source = 'inlines.c'
-        self.first_stop = line_number(
-            self.source, '// This should correspond to the first break stop.')
-        self.second_stop = line_number(
-            self.source, '// This should correspond to the second break stop.')
-
-    @add_test_categories(['pyapi'])
-    def test_stop_at_outer_inline(self):
-        """Exercise SBFrame.IsInlined() and SBFrame.GetFunctionName()."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create a breakpoint on main.c by the name of 'inner_inline'.
-        breakpoint = target.BreakpointCreateByName('inner_inline', 'a.out')
-        #print("breakpoint:", breakpoint)
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() > 1,
-                        VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        process = target.GetProcess()
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        PROCESS_STOPPED)
-
-        import lldbsuite.test.lldbutil as lldbutil
-        stack_traces1 = lldbutil.print_stacktraces(process, string_buffer=True)
-        if self.TraceOn():
-            print(
-                "Full stack traces when first stopped on the breakpoint 'inner_inline':")
-            print(stack_traces1)
-
-        # The first breakpoint should correspond to an inlined call frame.
-        # If it's an inlined call frame, expect to find, in the stack trace,
-        # that there is a frame which corresponds to the following call site:
-        #
-        #     outer_inline (argc);
-        #
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertIsNotNone(thread)
-
-        frame0 = thread.GetFrameAtIndex(0)
-        if frame0.IsInlined():
-            filename = frame0.GetLineEntry().GetFileSpec().GetFilename()
-            self.assertTrue(filename == self.source)
-            self.expect(
-                stack_traces1, "First stop at %s:%d" %
-                (self.source, self.first_stop), exe=False, substrs=[
-                    '%s:%d' %
-                    (self.source, self.first_stop)])
-
-            # Expect to break again for the second time.
-            process.Continue()
-            self.assertTrue(process.GetState() == lldb.eStateStopped,
-                            PROCESS_STOPPED)
-            stack_traces2 = lldbutil.print_stacktraces(
-                process, string_buffer=True)
-            if self.TraceOn():
-                print(
-                    "Full stack traces when stopped on the breakpoint 'inner_inline' for the second time:")
-                print(stack_traces2)
-                self.expect(
-                    stack_traces2, "Second stop at %s:%d" %
-                    (self.source, self.second_stop), exe=False, substrs=[
-                        '%s:%d' %
-                        (self.source, self.second_stop)])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/inlines.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/inlines.c
deleted file mode 100644 (file)
index a2a8212..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-#include <stdio.h>
-#include "inlines.h"
-
-#define INLINE_ME __inline__ __attribute__((always_inline))
-
-int
-not_inlined_2 (int input)
-{
-  printf ("Called in not_inlined_2 with : %d.\n", input);
-  return input;
-}
-
-int 
-not_inlined_1 (int input)
-{
-  printf ("Called in not_inlined_1 with %d.\n", input);
-  return not_inlined_2(input);
-}
-  
-INLINE_ME int
-inner_inline (int inner_input, int mod_value)
-{
-  int inner_result;
-  inner_result = inner_input % mod_value;
-  printf ("Returning: %d.\n", inner_result);
-  return not_inlined_1 (inner_result);
-}
-
-INLINE_ME int
-outer_inline (int outer_input)
-{
-  int outer_result;
-
-  outer_result = inner_inline (outer_input, outer_input % 3);
-  return outer_result;
-}
-
-int
-main (int argc, char **argv)
-{
-  printf ("Starting...\n");
-
-  int (*func_ptr) (int);
-  func_ptr = outer_inline;
-
-  outer_inline (argc); // This should correspond to the first break stop.
-
-  func_ptr (argc); // This should correspond to the second break stop.
-
-  return 0;
-}
-
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/inlines.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/inlines.h
deleted file mode 100644 (file)
index 265d7b4..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-int inner_inline (int inner_input, int mod_value);
-int outer_inline (int outer_input);
-int not_inlined_2 (int input);
-int not_inlined_1 (int input);
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/frame/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/frame/main.c
deleted file mode 100644 (file)
index 75f4448..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-// This simple program is to test the lldb Python API related to frames.
-
-int a(int, char);
-int b(int, char);
-int c(int, char);
-
-int a(int val, char ch)
-{
-    int my_val = val;
-    char my_ch = ch;
-    printf("a(val=%d, ch='%c')\n", val, ch);
-    if (val <= 1)
-        return b(val+1, ch+1);
-    else if (val >= 3)
-        return c(val+1, ch+1);
-
-    return val;
-}
-
-int b(int val, char ch)
-{
-    int my_val = val;
-    char my_ch = ch;
-    printf("b(val=%d, ch='%c')\n", val, ch);
-    return c(val+1, ch+1);
-}
-
-int c(int val, char ch)
-{
-    int my_val = val;
-    char my_ch = ch;
-    printf("c(val=%d, ch='%c')\n", val, ch);
-    return val + 3 + ch;
-}
-
-int main (int argc, char const *argv[])
-{
-    int A1 = a(1, 'A');  // a(1, 'A') -> b(2, 'B') -> c(3, 'C')
-    printf("a(1, 'A') returns %d\n", A1);
-    
-    int B2 = b(2, 'B');  // b(2, 'B') -> c(3, 'C')
-    printf("b(2, 'B') returns %d\n", B2);
-    
-    int A3 = a(3, 'A');  // a(3, 'A') -> c(4, 'B')
-    printf("a(3, 'A') returns %d\n", A3);
-    
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/TestDisasmAPI.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/TestDisasmAPI.py
deleted file mode 100644 (file)
index 2278d69..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-"""
-Test retrieval of SBAddress from function/symbol, disassembly, and SBAddress APIs.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class DisasmAPITestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to of function 'c'.
-        self.line1 = line_number(
-            'main.c', '// Find the line number for breakpoint 1 here.')
-        self.line2 = line_number(
-            'main.c', '// Find the line number for breakpoint 2 here.')
-
-    @add_test_categories(['pyapi'])
-    @expectedFailureAll(oslist=["windows"], bugnumber='llvm.org/pr21765')
-    def test(self):
-        """Exercise getting SBAddress objects, disassembly, and SBAddress APIs."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create the two breakpoints inside function 'a'.
-        breakpoint1 = target.BreakpointCreateByLocation('main.c', self.line1)
-        breakpoint2 = target.BreakpointCreateByLocation('main.c', self.line2)
-        #print("breakpoint1:", breakpoint1)
-        #print("breakpoint2:", breakpoint2)
-        self.assertTrue(breakpoint1 and
-                        breakpoint1.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-        self.assertTrue(breakpoint2 and
-                        breakpoint2.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Frame #0 should be on self.line1.
-        self.assertTrue(process.GetState() == lldb.eStateStopped)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint condition")
-        frame0 = thread.GetFrameAtIndex(0)
-        lineEntry = frame0.GetLineEntry()
-        self.assertTrue(lineEntry.GetLine() == self.line1)
-
-        address1 = lineEntry.GetStartAddress()
-        #print("address1:", address1)
-
-        # Now call SBTarget.ResolveSymbolContextForAddress() with address1.
-        context1 = target.ResolveSymbolContextForAddress(
-            address1, lldb.eSymbolContextEverything)
-
-        self.assertTrue(context1)
-        if self.TraceOn():
-            print("context1:", context1)
-
-        # Continue the inferior, the breakpoint 2 should be hit.
-        process.Continue()
-        self.assertTrue(process.GetState() == lldb.eStateStopped)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint condition")
-        frame0 = thread.GetFrameAtIndex(0)
-        lineEntry = frame0.GetLineEntry()
-        self.assertTrue(lineEntry.GetLine() == self.line2)
-
-        # Verify that the symbol and the function has the same address range
-        # per function 'a'.
-        symbol = context1.GetSymbol()
-        function = frame0.GetFunction()
-        self.assertTrue(symbol and function)
-
-        disasm_output = lldbutil.disassemble(target, symbol)
-        if self.TraceOn():
-            print("symbol:", symbol)
-            print("disassembly=>\n", disasm_output)
-
-        disasm_output = lldbutil.disassemble(target, function)
-        if self.TraceOn():
-            print("function:", function)
-            print("disassembly=>\n", disasm_output)
-
-        sa1 = symbol.GetStartAddress()
-        #print("sa1:", sa1)
-        #print("sa1.GetFileAddress():", hex(sa1.GetFileAddress()))
-        #ea1 = symbol.GetEndAddress()
-        #print("ea1:", ea1)
-        sa2 = function.GetStartAddress()
-        #print("sa2:", sa2)
-        #print("sa2.GetFileAddress():", hex(sa2.GetFileAddress()))
-        #ea2 = function.GetEndAddress()
-        #print("ea2:", ea2)
-        self.assertTrue(sa1 and sa2 and sa1 == sa2,
-                        "The two starting addresses should be the same")
-
-        from lldbsuite.test.lldbutil import get_description
-        desc1 = get_description(sa1)
-        desc2 = get_description(sa2)
-        self.assertTrue(
-            desc1 and desc2 and desc1 == desc2,
-            "SBAddress.GetDescription() API of sa1 and sa2 should return the same string")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/TestSymbolAPI.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/TestSymbolAPI.py
deleted file mode 100644 (file)
index 56fa73c..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-"""
-Test newly added SBSymbol and SBAddress APIs.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class SymbolAPITestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to of function 'c'.
-        self.line1 = line_number(
-            'main.c', '// Find the line number for breakpoint 1 here.')
-        self.line2 = line_number(
-            'main.c', '// Find the line number for breakpoint 2 here.')
-
-    @add_test_categories(['pyapi'])
-    @expectedFailureAll(oslist=["windows"], bugnumber='llvm.org/pr21765')
-    def test(self):
-        """Exercise some SBSymbol and SBAddress APIs."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create the two breakpoints inside function 'a'.
-        breakpoint1 = target.BreakpointCreateByLocation('main.c', self.line1)
-        breakpoint2 = target.BreakpointCreateByLocation('main.c', self.line2)
-        #print("breakpoint1:", breakpoint1)
-        #print("breakpoint2:", breakpoint2)
-        self.assertTrue(breakpoint1 and
-                        breakpoint1.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-        self.assertTrue(breakpoint2 and
-                        breakpoint2.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Frame #0 should be on self.line1.
-        self.assertTrue(process.GetState() == lldb.eStateStopped)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint condition")
-        frame0 = thread.GetFrameAtIndex(0)
-        symbol_line1 = frame0.GetSymbol()
-        # We should have a symbol type of code.
-        self.assertTrue(symbol_line1.GetType() == lldb.eSymbolTypeCode)
-        addr_line1 = symbol_line1.GetStartAddress()
-        # And a section type of code, too.
-        self.assertTrue(addr_line1.GetSection().GetSectionType()
-                        == lldb.eSectionTypeCode)
-
-        # Continue the inferior, the breakpoint 2 should be hit.
-        process.Continue()
-        self.assertTrue(process.GetState() == lldb.eStateStopped)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint condition")
-        frame0 = thread.GetFrameAtIndex(0)
-        symbol_line2 = frame0.GetSymbol()
-        # We should have a symbol type of code.
-        self.assertTrue(symbol_line2.GetType() == lldb.eSymbolTypeCode)
-        addr_line2 = symbol_line2.GetStartAddress()
-        # And a section type of code, too.
-        self.assertTrue(addr_line2.GetSection().GetSectionType()
-                        == lldb.eSectionTypeCode)
-
-        # Now verify that both addresses point to the same module.
-        if self.TraceOn():
-            print("UUID:", addr_line1.GetModule().GetUUIDString())
-        self.assertTrue(addr_line1.GetModule().GetUUIDString()
-                        == addr_line2.GetModule().GetUUIDString())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/main.c
deleted file mode 100644 (file)
index 33eea20..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-// This simple program is to test the lldb Python APIs SBTarget, SBFrame,
-// SBFunction, SBSymbol, and SBAddress.
-//
-// When stopped on breakppint 1, we can get the line entry using SBFrame API
-// SBFrame.GetLineEntry().  We'll get the start address for the line entry
-// with the SBAddress type, resolve the symbol context using the SBTarget API
-// SBTarget.ResolveSymbolContextForAddress() in order to get the SBSymbol.
-//
-// We then stop at breakpoint 2, get the SBFrame, and the SBFunction object.
-//
-// The address from calling GetStartAddress() on the symbol and the function
-// should point to the same address, and we also verify that.
-
-int a(int);
-int b(int);
-int c(int);
-
-int a(int val)
-{
-    if (val <= 1) // Find the line number for breakpoint 1 here.
-        val = b(val);
-    else if (val >= 3)
-        val = c(val);
-
-    return val; // Find the line number for breakpoint 2 here.
-}
-
-int b(int val)
-{
-    return c(val);
-}
-
-int c(int val)
-{
-    return val + 3;
-}
-
-int main (int argc, char const *argv[])
-{
-    int A1 = a(1);  // a(1) -> b(1) -> c(1)
-    printf("a(1) returns %d\n", A1);
-    
-    int B2 = b(2);  // b(2) -> c(2)
-    printf("b(2) returns %d\n", B2);
-    
-    int A3 = a(3);  // a(3) -> c(3)
-    printf("a(3) returns %d\n", A3);
-    
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/get-value-32bit-int/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/get-value-32bit-int/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/get-value-32bit-int/TestGetValue32BitInt.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/get-value-32bit-int/TestGetValue32BitInt.py
deleted file mode 100644 (file)
index 0252264..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-"""
-Check that SBValue.GetValueAsSigned() does the right thing for a 32-bit -1.
-"""
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-class TestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_with_run_command(self):
-        self.build()
-        lldbutil.run_to_source_breakpoint(self,"// break here", lldb.SBFileSpec("main.cpp"))
-
-        self.assertEqual(self.frame().FindVariable("myvar").GetValueAsSigned(), -1)
-        self.assertEqual(self.frame().FindVariable("myvar").GetValueAsUnsigned(), 0xFFFFFFFF)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/get-value-32bit-int/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/get-value-32bit-int/main.cpp
deleted file mode 100644 (file)
index 61f40fb..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#include <cstdint>
-int main () {
-  int32_t myvar = -1;
-  return myvar; // break here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/hello_world/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/hello_world/Makefile
deleted file mode 100644 (file)
index 73625f4..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-C_SOURCES := main.c
-# See TestHelloWorld.py, which specifies the executable name with a dictionary.
-EXE := hello_world
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py
deleted file mode 100644 (file)
index fc6ef48..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-"""Test Python APIs for target (launch and attach), breakpoint, and process."""
-
-
-
-import os
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-class HelloWorldTestCase(TestBase):
-    NO_DEBUG_INFO_TESTCASE = True
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find a couple of the line numbers within main.c.
-        self.line1 = line_number('main.c', '// Set break point at this line.')
-        self.line2 = line_number('main.c', '// Waiting to be attached...')
-
-    def tearDown(self):
-        # Destroy process before TestBase.tearDown()
-        self.dbg.GetSelectedTarget().GetProcess().Destroy()
-        # Call super's tearDown().
-        TestBase.tearDown(self)
-
-    @add_test_categories(['pyapi'])
-    @skipIfiOSSimulator
-    def test_with_process_launch_api(self):
-        """Create target, breakpoint, launch a process, and then kill it."""
-        # Get the full path to our executable to be attached/debugged.
-        exe = '%s_%d'%(self.getBuildArtifact(self.testMethodName), os.getpid())
-        d = {'EXE': exe}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        target = self.dbg.CreateTarget(exe)
-
-        breakpoint = target.BreakpointCreateByLocation("main.c", self.line1)
-
-        # The default state after breakpoint creation should be enabled.
-        self.assertTrue(breakpoint.IsEnabled(),
-                        "Breakpoint should be enabled after creation")
-
-        breakpoint.SetEnabled(False)
-        self.assertTrue(not breakpoint.IsEnabled(),
-                        "Breakpoint.SetEnabled(False) works")
-
-        breakpoint.SetEnabled(True)
-        self.assertTrue(breakpoint.IsEnabled(),
-                        "Breakpoint.SetEnabled(True) works")
-
-        # rdar://problem/8364687
-        # SBTarget.Launch() issue (or is there some race condition)?
-
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        # The following isn't needed anymore, rdar://8364687 is fixed.
-        #
-        # Apply some dances after LaunchProcess() in order to break at "main".
-        # It only works sometimes.
-        #self.breakAfterLaunch(process, "main")
-
-        process = target.GetProcess()
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertIsNotNone(thread)
-
-        # The breakpoint should have a hit count of 1.
-        self.assertEqual(breakpoint.GetHitCount(), 1, BREAKPOINT_HIT_ONCE)
-
-    @add_test_categories(['pyapi'])
-    @skipIfiOSSimulator
-    @expectedFailureNetBSD
-    def test_with_attach_to_process_with_id_api(self):
-        """Create target, spawn a process, and attach to it with process id."""
-        exe = '%s_%d'%(self.testMethodName, os.getpid())
-        d = {'EXE': exe}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        target = self.dbg.CreateTarget(self.getBuildArtifact(exe))
-
-        # Spawn a new process
-        token = exe+'.token'
-        if not lldb.remote_platform:
-            token = self.getBuildArtifact(token)
-            if os.path.exists(token):
-                os.remove(token)
-        popen = self.spawnSubprocess(self.getBuildArtifact(exe), [token])
-        self.addTearDownHook(self.cleanupSubprocesses)
-        lldbutil.wait_for_file_on_target(self, token)
-
-        listener = lldb.SBListener("my.attach.listener")
-        error = lldb.SBError()
-        process = target.AttachToProcessWithID(listener, popen.pid, error)
-
-        self.assertTrue(error.Success() and process, PROCESS_IS_VALID)
-
-        # Let's check the stack traces of the attached process.
-        stacktraces = lldbutil.print_stacktraces(process, string_buffer=True)
-        self.expect(stacktraces, exe=False,
-                    substrs=['main.c:%d' % self.line2,
-                             '(int)argc=2'])
-
-    @add_test_categories(['pyapi'])
-    @skipIfiOSSimulator
-    @skipIfAsan # FIXME: Hangs indefinitely.
-    @expectedFailureNetBSD
-    def test_with_attach_to_process_with_name_api(self):
-        """Create target, spawn a process, and attach to it with process name."""
-        exe = '%s_%d'%(self.testMethodName, os.getpid())
-        d = {'EXE': exe}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        target = self.dbg.CreateTarget(self.getBuildArtifact(exe))
-
-        # Spawn a new process.
-        token = exe+'.token'
-        if not lldb.remote_platform:
-            token = self.getBuildArtifact(token)
-            if os.path.exists(token):
-                os.remove(token)
-        popen = self.spawnSubprocess(self.getBuildArtifact(exe), [token])
-        self.addTearDownHook(self.cleanupSubprocesses)
-        lldbutil.wait_for_file_on_target(self, token)
-
-        listener = lldb.SBListener("my.attach.listener")
-        error = lldb.SBError()
-        # Pass 'False' since we don't want to wait for new instance of
-        # "hello_world" to be launched.
-        name = os.path.basename(exe)
-
-        # While we're at it, make sure that passing a None as the process name
-        # does not hang LLDB.
-        target.AttachToProcessWithName(listener, None, False, error)
-        # Also boundary condition test ConnectRemote(), too.
-        target.ConnectRemote(listener, None, None, error)
-
-        process = target.AttachToProcessWithName(listener, name, False, error)
-        self.assertTrue(error.Success() and process, PROCESS_IS_VALID)
-
-        # Verify that after attach, our selected target indeed matches name.
-        self.expect(
-            self.dbg.GetSelectedTarget().GetExecutable().GetFilename(),
-            exe=False,
-            startstr=name)
-
-        # Let's check the stack traces of the attached process.
-        stacktraces = lldbutil.print_stacktraces(process, string_buffer=True)
-        self.expect(stacktraces, exe=False,
-                    substrs=['main.c:%d' % self.line2,
-                             '(int)argc=2'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/hello_world/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/hello_world/main.c
deleted file mode 100644 (file)
index c516f92..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#include <stdio.h>
-#ifdef _MSC_VER
-#include <windows.h>
-#define sleep(x) Sleep((x) * 1000)
-#else
-#include <unistd.h>
-#endif
-
-int main(int argc, char const *argv[])
-{
-  lldb_enable_attach();
-
-  printf("Hello world.\n"); // Set break point at this line.
-  if (argc == 1)
-    return 1;
-
-  // Create the synchronization token.
-  FILE *f;
-  if (f = fopen(argv[1], "wx")) {
-    fputs("\n", f);
-    fflush(f);
-    fclose(f);
-  } else
-    return 1;
-
-  // Waiting to be attached by the debugger, otherwise.
-  while (1)
-    sleep(1); // Waiting to be attached...
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/interpreter/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/interpreter/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/interpreter/TestCommandInterpreterAPI.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/interpreter/TestCommandInterpreterAPI.py
deleted file mode 100644 (file)
index a920ce8..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-"""Test the SBCommandInterpreter APIs."""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class CommandInterpreterAPICase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break on inside main.cpp.
-        self.line = line_number('main.c', 'Hello world.')
-
-    @add_test_categories(['pyapi'])
-    def test_with_process_launch_api(self):
-        """Test the SBCommandInterpreter APIs."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Retrieve the associated command interpreter from our debugger.
-        ci = self.dbg.GetCommandInterpreter()
-        self.assertTrue(ci, VALID_COMMAND_INTERPRETER)
-
-        # Exercise some APIs....
-
-        self.assertTrue(ci.HasCommands())
-        self.assertTrue(ci.HasAliases())
-        self.assertTrue(ci.HasAliasOptions())
-        self.assertTrue(ci.CommandExists("breakpoint"))
-        self.assertTrue(ci.CommandExists("target"))
-        self.assertTrue(ci.CommandExists("platform"))
-        self.assertTrue(ci.AliasExists("file"))
-        self.assertTrue(ci.AliasExists("run"))
-        self.assertTrue(ci.AliasExists("bt"))
-
-        res = lldb.SBCommandReturnObject()
-        ci.HandleCommand("breakpoint set -f main.c -l %d" % self.line, res)
-        self.assertTrue(res.Succeeded())
-        ci.HandleCommand("process launch", res)
-        self.assertTrue(res.Succeeded())
-
-        # Boundary conditions should not crash lldb!
-        self.assertFalse(ci.CommandExists(None))
-        self.assertFalse(ci.AliasExists(None))
-        ci.HandleCommand(None, res)
-        self.assertFalse(res.Succeeded())
-        res.AppendMessage("Just appended a message.")
-        res.AppendMessage(None)
-        if self.TraceOn():
-            print(res)
-
-        process = ci.GetProcess()
-        self.assertTrue(process)
-
-        import lldbsuite.test.lldbutil as lldbutil
-        if process.GetState() != lldb.eStateStopped:
-            self.fail("Process should be in the 'stopped' state, "
-                      "instead the actual state is: '%s'" %
-                      lldbutil.state_type_to_str(process.GetState()))
-
-        if self.TraceOn():
-            lldbutil.print_stacktraces(process)
-
-    @add_test_categories(['pyapi'])
-    def test_command_output(self):
-        """Test command output handling."""
-        ci = self.dbg.GetCommandInterpreter()
-        self.assertTrue(ci, VALID_COMMAND_INTERPRETER)
-
-        # Test that a command which produces no output returns "" instead of
-        # None.
-        res = lldb.SBCommandReturnObject()
-        ci.HandleCommand("settings set use-color false", res)
-        self.assertTrue(res.Succeeded())
-        self.assertIsNotNone(res.GetOutput())
-        self.assertEquals(res.GetOutput(), "")
-        self.assertIsNotNone(res.GetError())
-        self.assertEquals(res.GetError(), "")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/interpreter/TestRunCommandInterpreterAPI.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/interpreter/TestRunCommandInterpreterAPI.py
deleted file mode 100644 (file)
index a32805b..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-"""Test the RunCommandInterpreter API."""
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-
-class CommandRunInterpreterLegacyAPICase(TestBase):
-
-    NO_DEBUG_INFO_TESTCASE = True
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        TestBase.setUp(self)
-
-        self.stdin_path = self.getBuildArtifact("stdin.txt")
-
-        with open(self.stdin_path, 'w') as input_handle:
-            input_handle.write("nonexistingcommand\nquit")
-
-        # Python will close the file descriptor if all references
-        # to the filehandle object lapse, so we need to keep one
-        # around.
-        self.filehandle = open(self.stdin_path, 'r')
-        self.dbg.SetInputFileHandle(self.filehandle, False)
-
-        # No need to track the output
-        self.devnull = open(os.devnull, 'w')
-        self.dbg.SetOutputFileHandle(self.devnull, False)
-        self.dbg.SetErrorFileHandle (self.devnull, False)
-
-    @add_test_categories(['pyapi'])
-    def test_run_session_with_error_and_quit_legacy(self):
-        """Run non-existing and quit command returns appropriate values"""
-
-        n_errors, quit_requested, has_crashed = self.dbg.RunCommandInterpreter(
-                True, False, lldb.SBCommandInterpreterRunOptions(), 0, False,
-                False)
-
-        self.assertGreater(n_errors, 0)
-        self.assertTrue(quit_requested)
-        self.assertFalse(has_crashed)
-
-
-class CommandRunInterpreterAPICase(TestBase):
-
-    NO_DEBUG_INFO_TESTCASE = True
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        TestBase.setUp(self)
-
-        self.stdin_path = self.getBuildArtifact("stdin.txt")
-
-        with open(self.stdin_path, 'w') as input_handle:
-            input_handle.write("nonexistingcommand\nquit")
-
-        self.dbg.SetInputFile(open(self.stdin_path, 'r'))
-
-        # No need to track the output
-        devnull = open(os.devnull, 'w')
-        self.dbg.SetOutputFile(devnull)
-        self.dbg.SetErrorFile(devnull)
-
-    @add_test_categories(['pyapi'])
-    def test_run_session_with_error_and_quit(self):
-        """Run non-existing and quit command returns appropriate values"""
-
-        n_errors, quit_requested, has_crashed = self.dbg.RunCommandInterpreter(
-                True, False, lldb.SBCommandInterpreterRunOptions(), 0, False,
-                False)
-
-        self.assertGreater(n_errors, 0)
-        self.assertTrue(quit_requested)
-        self.assertFalse(has_crashed)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/interpreter/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/interpreter/main.c
deleted file mode 100644 (file)
index 277aa54..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <stdio.h>
-
-int main(int argc, char const *argv[]) {
-    printf("Hello world.\n");
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/TestSwigVersion.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/TestSwigVersion.py
deleted file mode 100644 (file)
index 8c5c6ef..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-"""
-Test that we embed the swig version into the lldb module
-"""
-
-
-"""
-import os
-import time
-import re
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test import lldbutil
-"""
-from lldbsuite.test.lldbtest import *
-
-class SwigVersionTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test(self):
-        self.assertTrue(getattr(lldb, "swig_version"))
-        self.assertIsInstance(lldb.swig_version, tuple)
-        self.assertEqual(len(lldb.swig_version), 3)
-        self.assertGreaterEqual(lldb.swig_version[0], 1)
-        for v in lldb.swig_version:
-            self.assertGreaterEqual(v, 0)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/frame/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/frame/Makefile
deleted file mode 100644 (file)
index c5fa384..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-C_SOURCES := main.c
-MAKE_DSYM :=NO
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/frame/TestFrameUtils.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/frame/TestFrameUtils.py
deleted file mode 100644 (file)
index ec8d1f8..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-"""
-Test utility functions for the frame object.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class FrameUtilsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line = line_number('main.c',
-                                "// Find the line number here.")
-
-    @add_test_categories(['pyapi'])
-    def test_frame_utils(self):
-        """Test utility functions for the frame object."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        breakpoint = target.BreakpointCreateByLocation("main.c", self.line)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        if not process:
-            self.fail("SBTarget.LaunchProcess() failed")
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        PROCESS_STOPPED)
-
-        import lldbsuite.test.lldbutil as lldbutil
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(thread)
-        frame0 = thread.GetFrameAtIndex(0)
-        self.assertTrue(frame0)
-        frame1 = thread.GetFrameAtIndex(1)
-        self.assertTrue(frame1)
-        parent = lldbutil.get_parent_frame(frame0)
-        self.assertTrue(parent and parent.GetFrameID() == frame1.GetFrameID())
-        frame0_args = lldbutil.get_args_as_string(frame0)
-        parent_args = lldbutil.get_args_as_string(parent)
-        self.assertTrue(
-            frame0_args and parent_args and "(int)val=1" in frame0_args)
-        if self.TraceOn():
-            lldbutil.print_stacktrace(thread)
-            print("Current frame: %s" % frame0_args)
-            print("Parent frame: %s" % parent_args)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/frame/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/frame/main.c
deleted file mode 100644 (file)
index f837096..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-int a(int);
-int b(int);
-int c(int);
-
-int a(int val)
-{
-    if (val <= 1)
-        return b(val);
-    else if (val >= 3)
-        return c(val);
-
-    return val;
-}
-
-int b(int val)
-{
-    return c(val);
-}
-
-int c(int val)
-{
-    return val + 3; // Find the line number here.
-}
-
-int main (int argc, char const *argv[])
-{
-    int A1 = a(1);  // a(1) -> b(1) -> c(1)
-    printf("a(1) returns %d\n", A1);
-    
-    int B2 = b(2);  // b(2) -> c(2)
-    printf("b(2) returns %d\n", B2);
-    
-    int A3 = a(3);  // a(3) -> c(3)
-    printf("a(3) returns %d\n", A3);
-    
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/Makefile
deleted file mode 100644 (file)
index 4d11bbc..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CFLAGS_EXTRAS := -D__STDC_LIMIT_MACROS
-ENABLE_THREADS := YES
-CXX_SOURCES := main.cpp
-MAKE_DSYM := NO
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestLLDBIterator.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestLLDBIterator.py
deleted file mode 100644 (file)
index 050ec87..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-"""
-Test the iteration protocol for some lldb container objects.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class LLDBIteratorTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers to break inside main().
-        self.line1 = line_number(
-            'main.cpp', '// Set break point at this line.')
-        self.line2 = line_number('main.cpp', '// And that line.')
-
-    @add_test_categories(['pyapi'])
-    def test_lldb_iter_module(self):
-        """Test module_iter works correctly for SBTarget -> SBModule."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        breakpoint = target.BreakpointCreateByLocation("main.cpp", self.line1)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        if not process:
-            self.fail("SBTarget.LaunchProcess() failed")
-
-        from lldbsuite.test.lldbutil import get_description
-        yours = []
-        for i in range(target.GetNumModules()):
-            yours.append(target.GetModuleAtIndex(i))
-        mine = []
-        for m in target.module_iter():
-            mine.append(m)
-
-        self.assertTrue(len(yours) == len(mine))
-        for i in range(len(yours)):
-            if self.TraceOn():
-                print("yours[%d]='%s'" % (i, get_description(yours[i])))
-                print("mine[%d]='%s'" % (i, get_description(mine[i])))
-            self.assertTrue(
-                yours[i] == mine[i],
-                "UUID+FileSpec of yours[{0}] and mine[{0}] matches".format(i))
-
-    @add_test_categories(['pyapi'])
-    def test_lldb_iter_breakpoint(self):
-        """Test breakpoint_iter works correctly for SBTarget -> SBBreakpoint."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        breakpoint = target.BreakpointCreateByLocation("main.cpp", self.line1)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-        breakpoint = target.BreakpointCreateByLocation("main.cpp", self.line2)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        self.assertTrue(target.GetNumBreakpoints() == 2)
-
-        from lldbsuite.test.lldbutil import get_description
-        yours = []
-        for i in range(target.GetNumBreakpoints()):
-            yours.append(target.GetBreakpointAtIndex(i))
-        mine = []
-        for b in target.breakpoint_iter():
-            mine.append(b)
-
-        self.assertTrue(len(yours) == len(mine))
-        for i in range(len(yours)):
-            if self.TraceOn():
-                print("yours[%d]='%s'" % (i, get_description(yours[i])))
-                print("mine[%d]='%s'" % (i, get_description(mine[i])))
-            self.assertTrue(yours[i] == mine[i],
-                            "ID of yours[{0}] and mine[{0}] matches".format(i))
-
-    @add_test_categories(['pyapi'])
-    def test_lldb_iter_frame(self):
-        """Test iterator works correctly for SBProcess->SBThread->SBFrame."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        breakpoint = target.BreakpointCreateByLocation("main.cpp", self.line1)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        if not process:
-            self.fail("SBTarget.LaunchProcess() failed")
-
-        from lldbsuite.test.lldbutil import print_stacktrace
-        stopped_due_to_breakpoint = False
-        for thread in process:
-            if self.TraceOn():
-                print_stacktrace(thread)
-            ID = thread.GetThreadID()
-            if thread.GetStopReason() == lldb.eStopReasonBreakpoint:
-                stopped_due_to_breakpoint = True
-            for frame in thread:
-                self.assertTrue(frame.GetThread().GetThreadID() == ID)
-                if self.TraceOn():
-                    print(frame)
-
-        self.assertTrue(stopped_due_to_breakpoint)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py
deleted file mode 100644 (file)
index fbb8bff..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-"""
-Test the iteration protocol for frame registers.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class RegistersIteratorTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line1 = line_number(
-            'main.cpp', '// Set break point at this line.')
-
-    @add_test_categories(['pyapi'])
-    def test_iter_registers(self):
-        """Test iterator works correctly for lldbutil.iter_registers()."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        breakpoint = target.BreakpointCreateByLocation("main.cpp", self.line1)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        if not process:
-            self.fail("SBTarget.LaunchProcess() failed")
-
-        import lldbsuite.test.lldbutil as lldbutil
-        for thread in process:
-            if thread.GetStopReason() == lldb.eStopReasonBreakpoint:
-                for frame in thread:
-                    # Dump the registers of this frame using
-                    # lldbutil.get_GPRs() and friends.
-                    if self.TraceOn():
-                        print(frame)
-
-                    REGs = lldbutil.get_GPRs(frame)
-                    num = len(REGs)
-                    if self.TraceOn():
-                        print(
-                            "\nNumber of general purpose registers: %d" %
-                            num)
-                    for reg in REGs:
-                        self.assertTrue(reg)
-                        if self.TraceOn():
-                            print("%s => %s" % (reg.GetName(), reg.GetValue()))
-
-                    REGs = lldbutil.get_FPRs(frame)
-                    num = len(REGs)
-                    if self.TraceOn():
-                        print("\nNumber of floating point registers: %d" % num)
-                    for reg in REGs:
-                        self.assertTrue(reg)
-                        if self.TraceOn():
-                            print("%s => %s" % (reg.GetName(), reg.GetValue()))
-
-                    REGs = lldbutil.get_ESRs(frame)
-                    if self.platformIsDarwin():
-                        if self.getArchitecture() != 'armv7' and self.getArchitecture() != 'armv7k':
-                            num = len(REGs)
-                            if self.TraceOn():
-                                print(
-                                    "\nNumber of exception state registers: %d" %
-                                    num)
-                            for reg in REGs:
-                                self.assertTrue(reg)
-                                if self.TraceOn():
-                                    print(
-                                        "%s => %s" %
-                                        (reg.GetName(), reg.GetValue()))
-                    else:
-                        self.assertIsNone(REGs)
-
-                    # And these should also work.
-                    for kind in ["General Purpose Registers",
-                                 "Floating Point Registers"]:
-                        REGs = lldbutil.get_registers(frame, kind)
-                        self.assertTrue(REGs)
-
-                    REGs = lldbutil.get_registers(
-                        frame, "Exception State Registers")
-                    if self.platformIsDarwin():
-                        if self.getArchitecture() != 'armv7' and self.getArchitecture() != 'armv7k':
-                            self.assertIsNotNone(REGs)
-                    else:
-                        self.assertIsNone(REGs)
-
-                    # We've finished dumping the registers for frame #0.
-                    break
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/main.cpp
deleted file mode 100644 (file)
index 6823ccc..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// C includes
-#include <stdio.h>
-#include <stdint.h>
-#include <stdlib.h>
-
-// C++ includes
-#include <chrono>
-#include <mutex>
-#include <random>
-#include <thread>
-
-std::thread g_thread_1;
-std::thread g_thread_2;
-std::thread g_thread_3;
-std::mutex g_mask_mutex;
-
-enum MaskAction {
-    eGet,
-    eAssign,
-    eClearBits
-};
-
-uint32_t mask_access (MaskAction action, uint32_t mask = 0);
-
-uint32_t
-mask_access (MaskAction action, uint32_t mask)
-{
-    static uint32_t g_mask = 0;
-
-    std::lock_guard<std::mutex> lock(g_mask_mutex);
-    switch (action)
-    {
-    case eGet:
-        break;
-
-    case eAssign:
-        g_mask |= mask;
-        break;
-
-    case eClearBits:
-        g_mask &= ~mask;
-        break;
-    }
-    return g_mask;
-}
-
-void *
-thread_func (void *arg)
-{
-    uint32_t thread_index = *((uint32_t *)arg);
-    uint32_t thread_mask = (1u << (thread_index));
-    printf ("%s (thread index = %u) startng...\n", __FUNCTION__, thread_index);
-
-    std::default_random_engine generator;
-    std::uniform_int_distribution<int> distribution(0, 3000000);
-
-    while (mask_access(eGet) & thread_mask)
-    {
-        // random micro second sleep from zero to 3 seconds
-        int usec = distribution(generator);
-        printf ("%s (thread = %u) doing a usleep (%d)...\n", __FUNCTION__, thread_index, usec);
-
-        std::chrono::microseconds duration(usec);
-        std::this_thread::sleep_for(duration);
-        printf ("%s (thread = %u) after usleep ...\n", __FUNCTION__, thread_index); // Set break point at this line.
-    }
-    printf ("%s (thread index = %u) exiting...\n", __FUNCTION__, thread_index);
-    return NULL;
-}
-
-
-int main (int argc, char const *argv[])
-{
-    uint32_t thread_index_1 = 1;
-    uint32_t thread_index_2 = 2;
-    uint32_t thread_index_3 = 3;
-    uint32_t thread_mask_1 = (1u << thread_index_1);
-    uint32_t thread_mask_2 = (1u << thread_index_2);
-    uint32_t thread_mask_3 = (1u << thread_index_3);
-
-    // Make a mask that will keep all threads alive
-    mask_access (eAssign, thread_mask_1 | thread_mask_2 | thread_mask_3); // And that line.
-
-    // Create 3 threads
-    g_thread_1 = std::thread(thread_func, (void*)&thread_index_1);
-    g_thread_2 = std::thread(thread_func, (void*)&thread_index_2);
-    g_thread_3 = std::thread(thread_func, (void*)&thread_index_3);
-
-    char line[64];
-    while (mask_access(eGet) != 0)
-    {
-        printf ("Enter thread index to kill or ENTER for all:\n");
-        fflush (stdout);
-        // Kill threads by index, or ENTER for all threads
-
-        if (fgets (line, sizeof(line), stdin))
-        {
-            if (line[0] == '\n' || line[0] == '\r' || line[0] == '\0')
-            {
-                printf ("Exiting all threads...\n");
-                break;
-            }
-            int32_t index = strtoul (line, NULL, 0);
-            switch (index)
-            {
-                case 1: mask_access (eClearBits, thread_mask_1); break;
-                case 2: mask_access (eClearBits, thread_mask_2); break;
-                case 3: mask_access (eClearBits, thread_mask_3); break;
-            }
-            continue;
-        }
-
-        break;
-    }
-
-    // Clear all thread bits to they all exit
-    mask_access (eClearBits, UINT32_MAX);
-
-    // Join all of our threads
-    g_thread_1.join();
-    g_thread_2.join();
-    g_thread_3.join();
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/Makefile
deleted file mode 100644 (file)
index 6b33049..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CFLAGS_EXTRAS := -D__STDC_LIMIT_MACROS
-ENABLE_THREADS := YES
-CXX_SOURCES := main.cpp
-MAKE_DSYM :=NO
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/TestPrintStackTraces.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/TestPrintStackTraces.py
deleted file mode 100644 (file)
index 123b60e..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-"""
-Test SBprocess and SBThread APIs with printing of the stack traces using lldbutil.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ThreadsStackTracesTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(['pyapi'])
-    def test_stack_traces(self):
-        """Test SBprocess and SBThread APIs with printing of the stack traces."""
-        self.build()
-        (_, process, _, _) = lldbutil.run_to_source_breakpoint(self,
-                "// BREAK HERE", lldb.SBFileSpec("main.cpp"))
-        stacktraces = lldbutil.print_stacktraces(process, string_buffer=True)
-        self.expect(stacktraces, exe=False,
-                    substrs=['(int)x=4', '(int)y=6', '(int)x=3', '(int)argc=1'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/main.cpp
deleted file mode 100644 (file)
index a490d8f..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-static int foo(int x, int y) {
-  return x + y; // BREAK HERE
-}
-
-static int bar(int x) {
-  return foo(x + 1, x * 2);
-}
-
-int main (int argc, char const *argv[])
-{
-    return bar(argc + 2);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/module_section/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/module_section/Makefile
deleted file mode 100644 (file)
index 79209db..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CFLAGS_EXTRAS := -D__STDC_LIMIT_MACROS
-ENABLE_THREADS := YES
-CXX_SOURCES := main.cpp b.cpp c.cpp
-MAKE_DSYM :=NO
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/module_section/TestModuleAndSection.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/module_section/TestModuleAndSection.py
deleted file mode 100644 (file)
index 95d4576..0000000
+++ /dev/null
@@ -1,167 +0,0 @@
-"""
-Test some SBModule and SBSection APIs.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-from lldbsuite.test.lldbutil import symbol_type_to_str
-
-
-class ModuleAndSectionAPIsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # Py3 asserts due to a bug in SWIG.  A fix for this was upstreamed into
-    # SWIG 3.0.8.
-    @skipIf(py_version=['>=', (3, 0)], swig_version=['<', (3, 0, 8)])
-    @add_test_categories(['pyapi'])
-    def test_module_and_section(self):
-        """Test module and section APIs."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-        self.assertTrue(target.GetNumModules() > 0)
-
-        # Hide stdout if not running with '-t' option.
-        if not self.TraceOn():
-            self.HideStdout()
-
-        print("Number of modules for the target: %d" % target.GetNumModules())
-        for module in target.module_iter():
-            print(module)
-
-        # Get the executable module at index 0.
-        exe_module = target.GetModuleAtIndex(0)
-
-        print("Exe module: %s" % str(exe_module))
-        print("Number of sections: %d" % exe_module.GetNumSections())
-        print("Number of symbols: %d" % len(exe_module))
-        INDENT = ' ' * 4
-        INDENT2 = INDENT * 2
-        for sec in exe_module.section_iter():
-            print(sec)
-            print(
-                INDENT +
-                "Number of subsections: %d" %
-                sec.GetNumSubSections())
-            if sec.GetNumSubSections() == 0:
-                for sym in exe_module.symbol_in_section_iter(sec):
-                    print(INDENT + str(sym))
-                    print(
-                        INDENT +
-                        "symbol type: %s" %
-                        symbol_type_to_str(
-                            sym.GetType()))
-            else:
-                for subsec in sec:
-                    print(INDENT + str(subsec))
-                    # Now print the symbols belonging to the subsection....
-                    for sym in exe_module.symbol_in_section_iter(subsec):
-                        print(INDENT2 + str(sym))
-                        print(
-                            INDENT2 +
-                            "symbol type: %s" %
-                            symbol_type_to_str(
-                                sym.GetType()))
-
-    @add_test_categories(['pyapi'])
-    def test_module_and_section_boundary_condition(self):
-        """Test module and section APIs by passing None when it expects a Python string."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-        self.assertTrue(target.GetNumModules() > 0)
-
-        # Hide stdout if not running with '-t' option.
-        if not self.TraceOn():
-            self.HideStdout()
-
-        print("Number of modules for the target: %d" % target.GetNumModules())
-        for module in target.module_iter():
-            print(module)
-
-        # Get the executable module at index 0.
-        exe_module = target.GetModuleAtIndex(0)
-
-        print("Exe module: %s" % str(exe_module))
-        print("Number of sections: %d" % exe_module.GetNumSections())
-
-        # Boundary condition testings.  Should not crash lldb!
-        exe_module.FindFirstType(None)
-        exe_module.FindTypes(None)
-        exe_module.FindGlobalVariables(target, None, 1)
-        exe_module.FindFunctions(None, 0)
-        exe_module.FindSection(None)
-
-        # Get the section at index 1.
-        if exe_module.GetNumSections() > 1:
-            sec1 = exe_module.GetSectionAtIndex(1)
-            print(sec1)
-        else:
-            sec1 = None
-
-        if sec1:
-            sec1.FindSubSection(None)
-
-    @add_test_categories(['pyapi'])
-    def test_module_compile_unit_iter(self):
-        """Test module's compile unit iterator APIs."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-        self.assertTrue(target.GetNumModules() > 0)
-
-        # Hide stdout if not running with '-t' option.
-        if not self.TraceOn():
-            self.HideStdout()
-
-        print("Number of modules for the target: %d" % target.GetNumModules())
-        for module in target.module_iter():
-            print(module)
-
-        # Get the executable module at index 0.
-        exe_module = target.GetModuleAtIndex(0)
-
-        print("Exe module: %s" % str(exe_module))
-        print("Number of compile units: %d" % exe_module.GetNumCompileUnits())
-        INDENT = ' ' * 4
-        INDENT2 = INDENT * 2
-        for cu in exe_module.compile_unit_iter():
-            print(cu)
-
-    @add_test_categories(['pyapi'])
-    def test_find_compile_units(self):
-        """Exercise SBModule.FindCompileUnits() API."""
-        d = {'EXE': 'b.out'}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.find_compile_units(self.getBuildArtifact('b.out'))
-
-    def find_compile_units(self, exe):
-        """Exercise SBModule.FindCompileUnits() API."""
-        source_name_list = ["main.cpp", "b.cpp", "c.cpp"]
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        num_modules = target.GetNumModules()
-        for i in range(num_modules):
-            module = target.GetModuleAtIndex(i)
-            for source_name in source_name_list:
-                list = module.FindCompileUnits(lldb.SBFileSpec(source_name, False))
-                for sc in list:
-                    self.assertTrue(
-                        sc.GetCompileUnit().GetFileSpec().GetFilename() ==
-                        source_name)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/module_section/b.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/module_section/b.cpp
deleted file mode 100644 (file)
index 4e3e541..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-int b_function(int input) {
-    return input * 2;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/module_section/c.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/module_section/c.cpp
deleted file mode 100644 (file)
index 3c87bfe..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-int c_function(int input) {
-    return input * 3;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/module_section/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/module_section/main.cpp
deleted file mode 100644 (file)
index 943123b..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#include <stdio.h>
-
-int main() {
-  printf("Hello World\n");
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/name_lookup/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/name_lookup/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/name_lookup/TestNameLookup.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/name_lookup/TestNameLookup.py
deleted file mode 100644 (file)
index 6cd8d4f..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-"""
-Test SBTarget APIs.
-"""
-
-
-
-import unittest2
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestNameLookup(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(['pyapi'])
-    @expectedFailureAll(oslist=["windows"], bugnumber='llvm.org/pr21765')
-    def test_target(self):
-        """Exercise SBTarget.FindFunctions() with various name masks.
-
-        A previous regression caused mangled names to not be able to be looked up.
-        This test verifies that using a mangled name with eFunctionNameTypeFull works
-        and that using a function basename with eFunctionNameTypeFull works for all
-        C++ functions that are at the global namespace level."""
-        self.build();
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        exe_module = target.FindModule(target.GetExecutable())
-
-        c_name_to_symbol = {}
-        cpp_name_to_symbol = {}
-        mangled_to_symbol = {}
-        num_symbols = exe_module.GetNumSymbols();
-        for i in range(num_symbols):
-            symbol = exe_module.GetSymbolAtIndex(i);
-            name = symbol.GetName()
-            if name and 'unique_function_name' in name and '__PRETTY_FUNCTION__' not in name:
-                mangled = symbol.GetMangledName()
-                if mangled:
-                    mangled_to_symbol[mangled] = symbol
-                    if name:
-                        cpp_name_to_symbol[name] = symbol
-                elif name:
-                    c_name_to_symbol[name] = symbol
-
-        # Make sure each mangled name turns up exactly one match when looking up
-        # functions by full name and using the mangled name as the name in the
-        # lookup
-        self.assertGreaterEqual(len(mangled_to_symbol), 6)
-        for mangled in mangled_to_symbol.keys():
-            symbol_contexts = target.FindFunctions(mangled, lldb.eFunctionNameTypeFull)
-            self.assertTrue(symbol_contexts.GetSize() == 1)
-            for symbol_context in symbol_contexts:
-                self.assertTrue(symbol_context.GetFunction().IsValid())
-                self.assertTrue(symbol_context.GetSymbol().IsValid())
-
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/name_lookup/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/name_lookup/main.cpp
deleted file mode 100644 (file)
index b38208c..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#include <stdio.h>
-
-extern "C" int unique_function_name(int i)
-{
-  return puts(__PRETTY_FUNCTION__);
-}
-
-int unique_function_name()
-{
-  return puts(__PRETTY_FUNCTION__);
-}
-
-int unique_function_name(float f)
-{
-  return puts(__PRETTY_FUNCTION__);
-}
-
-namespace e
-{
-  int unique_function_name()
-  {
-    return puts(__PRETTY_FUNCTION__);
-  }
-  
-  namespace g
-  {
-    int unique_function_name()
-    {
-      return puts(__PRETTY_FUNCTION__);
-    }
-  }
-}
-
-class g
-{
-public:
-  int unique_function_name()
-  {
-    return puts(__PRETTY_FUNCTION__); 
-  }
-  
-  int unique_function_name(int i)
-  {
-    return puts(__PRETTY_FUNCTION__); 
-  }
-};
-
-int main (int argc, char const *argv[])
-{
-  g g;
-  g.unique_function_name();
-  g.unique_function_name(argc);
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/objc_type/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/objc_type/Makefile
deleted file mode 100644 (file)
index 8b322ff..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-OBJC_SOURCES := main.m
-
-CFLAGS_EXTRAS := -w
-
-
-
-LD_EXTRAS := -framework Foundation
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/objc_type/TestObjCType.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/objc_type/TestObjCType.py
deleted file mode 100644 (file)
index 37f5375..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-"""
-Test SBType for ObjC classes.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjCSBTypeTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        self.line = line_number("main.m", '// Break at this line')
-
-    @skipUnlessDarwin
-    @add_test_categories(['pyapi'])
-    def test(self):
-        """Test SBType for ObjC classes."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Create the breakpoint inside function 'main'.
-        breakpoint = target.BreakpointCreateByLocation("main.m", self.line)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Get Frame #0.
-        self.assertTrue(process.GetState() == lldb.eStateStopped)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint condition")
-
-        aBar = self.frame().FindVariable("aBar")
-        aBarType = aBar.GetType()
-        self.assertTrue(aBarType.IsValid(), "Bar should be a valid data type")
-        self.assertTrue(
-            aBarType.GetName() == "Bar *",
-            "Bar has the right name")
-
-        self.assertTrue(
-            aBarType.GetNumberOfDirectBaseClasses() == 1,
-            "Bar has a superclass")
-        aFooType = aBarType.GetDirectBaseClassAtIndex(0)
-
-        self.assertTrue(aFooType.IsValid(), "Foo should be a valid data type")
-        self.assertTrue(aFooType.GetName() == "Foo", "Foo has the right name")
-
-        self.assertTrue(aBarType.GetNumberOfFields() == 1, "Bar has a field")
-        aBarField = aBarType.GetFieldAtIndex(0)
-
-        self.assertTrue(
-            aBarField.GetName() == "_iVar",
-            "The field has the right name")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/objc_type/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/objc_type/main.m
deleted file mode 100644 (file)
index a2a7b0b..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-//===-- main.m ------------------------------------------------*- ObjC -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#import <Foundation/Foundation.h>
-
-@interface Foo: NSObject
-{}
-- (id) init;
-@end
-
-@interface Bar: Foo
-{
-       int _iVar;
-}
-- (id) init;
-@end
-
-@implementation Foo
-
-- (id) init
-{
-       self = [super init];
-       return self;
-}
-
-@end
-
-@implementation Bar
-
-- (id) init
-{
-       self = [super init];
-       if (self)
-               self->_iVar = 5;
-       return self;
-}
-
-@end
-
-int main()
-{
-       Bar* aBar = [Bar new];
-       id nothing = [aBar noSuchSelector]; // Break at this line
-       return 0;
-}
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/process/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/process/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/process/TestProcessAPI.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/process/TestProcessAPI.py
deleted file mode 100644 (file)
index d26933a..0000000
+++ /dev/null
@@ -1,401 +0,0 @@
-"""
-Test SBProcess APIs, including ReadMemory(), WriteMemory(), and others.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.lldbutil import get_stopped_thread, state_type_to_str
-
-
-class ProcessAPITestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line = line_number(
-            "main.cpp",
-            "// Set break point at this line and check variable 'my_char'.")
-
-    @add_test_categories(['pyapi'])
-    def test_read_memory(self):
-        """Test Python SBProcess.ReadMemory() API."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        breakpoint = target.BreakpointCreateByLocation("main.cpp", self.line)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint")
-        frame = thread.GetFrameAtIndex(0)
-
-        # Get the SBValue for the global variable 'my_char'.
-        val = frame.FindValue("my_char", lldb.eValueTypeVariableGlobal)
-        self.DebugSBValue(val)
-
-        # Due to the typemap magic (see lldb.swig), we pass in 1 to ReadMemory and
-        # expect to get a Python string as the result object!
-        error = lldb.SBError()
-        self.assertFalse(val.TypeIsPointerType())
-        content = process.ReadMemory(
-            val.AddressOf().GetValueAsUnsigned(), 1, error)
-        if not error.Success():
-            self.fail("SBProcess.ReadMemory() failed")
-        if self.TraceOn():
-            print("memory content:", content)
-
-        self.expect(
-            content,
-            "Result from SBProcess.ReadMemory() matches our expected output: 'x'",
-            exe=False,
-            startstr=b'x')
-
-        # Read (char *)my_char_ptr.
-        val = frame.FindValue("my_char_ptr", lldb.eValueTypeVariableGlobal)
-        self.DebugSBValue(val)
-        cstring = process.ReadCStringFromMemory(
-            val.GetValueAsUnsigned(), 256, error)
-        if not error.Success():
-            self.fail("SBProcess.ReadCStringFromMemory() failed")
-        if self.TraceOn():
-            print("cstring read is:", cstring)
-
-        self.expect(
-            cstring,
-            "Result from SBProcess.ReadCStringFromMemory() matches our expected output",
-            exe=False,
-            startstr='Does it work?')
-
-        # Get the SBValue for the global variable 'my_cstring'.
-        val = frame.FindValue("my_cstring", lldb.eValueTypeVariableGlobal)
-        self.DebugSBValue(val)
-
-        # Due to the typemap magic (see lldb.swig), we pass in 256 to read at most 256 bytes
-        # from the address, and expect to get a Python string as the result
-        # object!
-        self.assertFalse(val.TypeIsPointerType())
-        cstring = process.ReadCStringFromMemory(
-            val.AddressOf().GetValueAsUnsigned(), 256, error)
-        if not error.Success():
-            self.fail("SBProcess.ReadCStringFromMemory() failed")
-        if self.TraceOn():
-            print("cstring read is:", cstring)
-
-        self.expect(
-            cstring,
-            "Result from SBProcess.ReadCStringFromMemory() matches our expected output",
-            exe=False,
-            startstr='lldb.SBProcess.ReadCStringFromMemory() works!')
-
-        # Get the SBValue for the global variable 'my_uint32'.
-        val = frame.FindValue("my_uint32", lldb.eValueTypeVariableGlobal)
-        self.DebugSBValue(val)
-
-        # Due to the typemap magic (see lldb.swig), we pass in 4 to read 4 bytes
-        # from the address, and expect to get an int as the result!
-        self.assertFalse(val.TypeIsPointerType())
-        my_uint32 = process.ReadUnsignedFromMemory(
-            val.AddressOf().GetValueAsUnsigned(), 4, error)
-        if not error.Success():
-            self.fail("SBProcess.ReadCStringFromMemory() failed")
-        if self.TraceOn():
-            print("uint32 read is:", my_uint32)
-
-        if my_uint32 != 12345:
-            self.fail(
-                "Result from SBProcess.ReadUnsignedFromMemory() does not match our expected output")
-
-    @add_test_categories(['pyapi'])
-    def test_write_memory(self):
-        """Test Python SBProcess.WriteMemory() API."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        breakpoint = target.BreakpointCreateByLocation("main.cpp", self.line)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint")
-        frame = thread.GetFrameAtIndex(0)
-
-        # Get the SBValue for the global variable 'my_char'.
-        val = frame.FindValue("my_char", lldb.eValueTypeVariableGlobal)
-        self.DebugSBValue(val)
-
-        # If the variable does not have a load address, there's no sense
-        # continuing.
-        if not val.GetLocation().startswith("0x"):
-            return
-
-        # OK, let's get the hex location of the variable.
-        location = int(val.GetLocation(), 16)
-
-        # The program logic makes the 'my_char' variable to have memory content as 'x'.
-        # But we want to use the WriteMemory() API to assign 'a' to the
-        # variable.
-
-        # Now use WriteMemory() API to write 'a' into the global variable.
-        error = lldb.SBError()
-        result = process.WriteMemory(location, 'a', error)
-        if not error.Success() or result != 1:
-            self.fail("SBProcess.WriteMemory() failed")
-
-        # Read from the memory location.  This time it should be 'a'.
-        # Due to the typemap magic (see lldb.swig), we pass in 1 to ReadMemory and
-        # expect to get a Python string as the result object!
-        content = process.ReadMemory(location, 1, error)
-        if not error.Success():
-            self.fail("SBProcess.ReadMemory() failed")
-        if self.TraceOn():
-            print("memory content:", content)
-
-        self.expect(
-            content,
-            "Result from SBProcess.ReadMemory() matches our expected output: 'a'",
-            exe=False,
-            startstr=b'a')
-
-    @add_test_categories(['pyapi'])
-    def test_access_my_int(self):
-        """Test access 'my_int' using Python SBProcess.GetByteOrder() and other APIs."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        breakpoint = target.BreakpointCreateByLocation("main.cpp", self.line)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint")
-        frame = thread.GetFrameAtIndex(0)
-
-        # Get the SBValue for the global variable 'my_int'.
-        val = frame.FindValue("my_int", lldb.eValueTypeVariableGlobal)
-        self.DebugSBValue(val)
-
-        # If the variable does not have a load address, there's no sense
-        # continuing.
-        if not val.GetLocation().startswith("0x"):
-            return
-
-        # OK, let's get the hex location of the variable.
-        location = int(val.GetLocation(), 16)
-
-        # Note that the canonical from of the bytearray is little endian.
-        from lldbsuite.test.lldbutil import int_to_bytearray, bytearray_to_int
-
-        byteSize = val.GetByteSize()
-        bytes = int_to_bytearray(256, byteSize)
-
-        byteOrder = process.GetByteOrder()
-        if byteOrder == lldb.eByteOrderBig:
-            bytes.reverse()
-        elif byteOrder == lldb.eByteOrderLittle:
-            pass
-        else:
-            # Neither big endian nor little endian?  Return for now.
-            # Add more logic here if we want to handle other types.
-            return
-
-        # The program logic makes the 'my_int' variable to have int type and value of 0.
-        # But we want to use the WriteMemory() API to assign 256 to the
-        # variable.
-
-        # Now use WriteMemory() API to write 256 into the global variable.
-        error = lldb.SBError()
-        result = process.WriteMemory(location, bytes, error)
-        if not error.Success() or result != byteSize:
-            self.fail("SBProcess.WriteMemory() failed")
-
-        # Make sure that the val we got originally updates itself to notice the
-        # change:
-        self.expect(
-            val.GetValue(),
-            "SBProcess.ReadMemory() successfully writes (int)256 to the memory location for 'my_int'",
-            exe=False,
-            startstr='256')
-
-        # And for grins, get the SBValue for the global variable 'my_int'
-        # again, to make sure that also tracks the new value:
-        val = frame.FindValue("my_int", lldb.eValueTypeVariableGlobal)
-        self.expect(
-            val.GetValue(),
-            "SBProcess.ReadMemory() successfully writes (int)256 to the memory location for 'my_int'",
-            exe=False,
-            startstr='256')
-
-        # Now read the memory content.  The bytearray should have (byte)1 as
-        # the second element.
-        content = process.ReadMemory(location, byteSize, error)
-        if not error.Success():
-            self.fail("SBProcess.ReadMemory() failed")
-
-        # The bytearray_to_int utility function expects a little endian
-        # bytearray.
-        if byteOrder == lldb.eByteOrderBig:
-            content = bytearray(content, 'ascii')
-            content.reverse()
-
-        new_value = bytearray_to_int(content, byteSize)
-        if new_value != 256:
-            self.fail("Memory content read from 'my_int' does not match (int)256")
-
-        # Dump the memory content....
-        if self.TraceOn():
-            for i in content:
-                print("byte:", i)
-
-    @add_test_categories(['pyapi'])
-    def test_remote_launch(self):
-        """Test SBProcess.RemoteLaunch() API with a process not in eStateConnected, and it should fail."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        if self.TraceOn():
-            print("process state:", state_type_to_str(process.GetState()))
-        self.assertTrue(process.GetState() != lldb.eStateConnected)
-
-        error = lldb.SBError()
-        success = process.RemoteLaunch(
-            None, None, None, None, None, None, 0, False, error)
-        self.assertTrue(
-            not success,
-            "RemoteLaunch() should fail for process state != eStateConnected")
-
-    @add_test_categories(['pyapi'])
-    def test_get_num_supported_hardware_watchpoints(self):
-        """Test SBProcess.GetNumSupportedHardwareWatchpoints() API with a process."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        breakpoint = target.BreakpointCreateByLocation("main.cpp", self.line)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        error = lldb.SBError()
-        num = process.GetNumSupportedHardwareWatchpoints(error)
-        if self.TraceOn() and error.Success():
-            print("Number of supported hardware watchpoints: %d" % num)
-
-    @add_test_categories(['pyapi'])
-    @no_debug_info_test
-    def test_get_process_info(self):
-        """Test SBProcess::GetProcessInfo() API with a locally launched process."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Launch the process and stop at the entry point.
-        launch_info = lldb.SBLaunchInfo(None)
-        launch_info.SetWorkingDirectory(self.get_process_working_directory())
-        launch_flags = launch_info.GetLaunchFlags()
-        launch_flags |= lldb.eLaunchFlagStopAtEntry
-        launch_info.SetLaunchFlags(launch_flags)
-        error = lldb.SBError()
-        process = target.Launch(launch_info, error)
-
-        if not error.Success():
-            self.fail("Failed to launch process")
-
-        # Verify basic process info can be retrieved successfully
-        process_info = process.GetProcessInfo()
-        self.assertTrue(process_info.IsValid())
-        file_spec = process_info.GetExecutableFile()
-        self.assertTrue(file_spec.IsValid())
-        process_name = process_info.GetName()
-        self.assertIsNotNone(process_name, "Process has a name")
-        self.assertGreater(len(process_name), 0, "Process name isn't blank")
-        self.assertEqual(file_spec.GetFilename(), "a.out")
-        self.assertNotEqual(
-            process_info.GetProcessID(), lldb.LLDB_INVALID_PROCESS_ID,
-            "Process ID is valid")
-
-        # Additional process info varies by platform, so just check that
-        # whatever info was retrieved is consistent and nothing blows up.
-        if process_info.UserIDIsValid():
-            self.assertNotEqual(
-                process_info.GetUserID(), lldb.UINT32_MAX,
-                "Process user ID is valid")
-        else:
-            self.assertEqual(
-                process_info.GetUserID(), lldb.UINT32_MAX,
-                "Process user ID is invalid")
-
-        if process_info.GroupIDIsValid():
-            self.assertNotEqual(
-                process_info.GetGroupID(), lldb.UINT32_MAX,
-                "Process group ID is valid")
-        else:
-            self.assertEqual(
-                process_info.GetGroupID(), lldb.UINT32_MAX,
-                "Process group ID is invalid")
-
-        if process_info.EffectiveUserIDIsValid():
-            self.assertNotEqual(
-                process_info.GetEffectiveUserID(), lldb.UINT32_MAX,
-                "Process effective user ID is valid")
-        else:
-            self.assertEqual(
-                process_info.GetEffectiveUserID(), lldb.UINT32_MAX,
-                "Process effective user ID is invalid")
-
-        if process_info.EffectiveGroupIDIsValid():
-            self.assertNotEqual(
-                process_info.GetEffectiveGroupID(), lldb.UINT32_MAX,
-                "Process effective group ID is valid")
-        else:
-            self.assertEqual(
-                process_info.GetEffectiveGroupID(), lldb.UINT32_MAX,
-                "Process effective group ID is invalid")
-
-        process_info.GetParentProcessID()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/process/io/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/process/io/Makefile
deleted file mode 100644 (file)
index 4aa7832..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-C_SOURCES := main.c
-EXE := process_io
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py
deleted file mode 100644 (file)
index 365d486..0000000
+++ /dev/null
@@ -1,239 +0,0 @@
-"""Test Python APIs for process IO."""
-
-from __future__ import print_function
-
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ProcessIOTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setup_test(self):
-        # Get the full path to our executable to be debugged.
-        self.exe = self.getBuildArtifact("process_io")
-        self.local_input_file = self.getBuildArtifact("input.txt")
-        self.local_output_file = self.getBuildArtifact("output.txt")
-        self.local_error_file = self.getBuildArtifact("error.txt")
-
-        self.input_file = os.path.join(
-            self.get_process_working_directory(), "input.txt")
-        self.output_file = os.path.join(
-            self.get_process_working_directory(), "output.txt")
-        self.error_file = os.path.join(
-            self.get_process_working_directory(), "error.txt")
-        self.lines = ["Line 1", "Line 2", "Line 3"]
-
-    @skipIfWindows  # stdio manipulation unsupported on Windows
-    @add_test_categories(['pyapi'])
-    @expectedFlakeyLinux(bugnumber="llvm.org/pr26437")
-    @skipIfDarwinEmbedded # I/O redirection like this is not supported on remote iOS devices yet <rdar://problem/54581135>
-    def test_stdin_by_api(self):
-        """Exercise SBProcess.PutSTDIN()."""
-        self.setup_test()
-        self.build()
-        self.create_target()
-        self.run_process(True)
-        output = self.process.GetSTDOUT(1000)
-        self.check_process_output(output, output)
-
-    @skipIfWindows  # stdio manipulation unsupported on Windows
-    @add_test_categories(['pyapi'])
-    @expectedFlakeyLinux(bugnumber="llvm.org/pr26437")
-    def test_stdin_redirection(self):
-        """Exercise SBLaunchInfo::AddOpenFileAction() for STDIN without specifying STDOUT or STDERR."""
-        self.setup_test()
-        self.build()
-        self.create_target()
-        self.redirect_stdin()
-        self.run_process(False)
-        output = self.process.GetSTDOUT(1000)
-        self.check_process_output(output, output)
-
-    @skipIfWindows  # stdio manipulation unsupported on Windows
-    @add_test_categories(['pyapi'])
-    @expectedFlakeyLinux(bugnumber="llvm.org/pr26437")
-    @skipIfDarwinEmbedded # debugserver can't create/write files on the device
-    def test_stdout_redirection(self):
-        """Exercise SBLaunchInfo::AddOpenFileAction() for STDOUT without specifying STDIN or STDERR."""
-        self.setup_test()
-        self.build()
-        self.create_target()
-        self.redirect_stdout()
-        self.run_process(True)
-        output = self.read_output_file_and_delete()
-        error = self.process.GetSTDOUT(1000)
-        self.check_process_output(output, error)
-
-    @skipIfWindows  # stdio manipulation unsupported on Windows
-    @add_test_categories(['pyapi'])
-    @expectedFlakeyLinux(bugnumber="llvm.org/pr26437")
-    @skipIfDarwinEmbedded # debugserver can't create/write files on the device
-    def test_stderr_redirection(self):
-        """Exercise SBLaunchInfo::AddOpenFileAction() for STDERR without specifying STDIN or STDOUT."""
-        self.setup_test()
-        self.build()
-        self.create_target()
-        self.redirect_stderr()
-        self.run_process(True)
-        output = self.process.GetSTDOUT(1000)
-        error = self.read_error_file_and_delete()
-        self.check_process_output(output, error)
-
-    @skipIfWindows  # stdio manipulation unsupported on Windows
-    @add_test_categories(['pyapi'])
-    @expectedFlakeyLinux(bugnumber="llvm.org/pr26437")
-    @skipIfDarwinEmbedded # debugserver can't create/write files on the device
-    def test_stdout_stderr_redirection(self):
-        """Exercise SBLaunchInfo::AddOpenFileAction() for STDOUT and STDERR without redirecting STDIN."""
-        self.setup_test()
-        self.build()
-        self.create_target()
-        self.redirect_stdout()
-        self.redirect_stderr()
-        self.run_process(True)
-        output = self.read_output_file_and_delete()
-        error = self.read_error_file_and_delete()
-        self.check_process_output(output, error)
-
-    # target_file - path on local file system or remote file system if running remote
-    # local_file - path on local system
-    def read_file_and_delete(self, target_file, local_file):
-        if lldb.remote_platform:
-            self.runCmd('platform get-file "{remote}" "{local}"'.format(
-                remote=target_file, local=local_file))
-
-        self.assertTrue(
-            os.path.exists(local_file),
-            'Make sure "{local}" file exists'.format(
-                local=local_file))
-        f = open(local_file, 'r')
-        contents = f.read()
-        f.close()
-
-        # TODO: add 'platform delete-file' file command
-        # if lldb.remote_platform:
-        #    self.runCmd('platform delete-file "{remote}"'.format(remote=target_file))
-        os.unlink(local_file)
-        return contents
-
-    def read_output_file_and_delete(self):
-        return self.read_file_and_delete(
-            self.output_file, self.local_output_file)
-
-    def read_error_file_and_delete(self):
-        return self.read_file_and_delete(
-            self.error_file, self.local_error_file)
-
-    def create_target(self):
-        '''Create the target and launch info that will be used by all tests'''
-        self.target = self.dbg.CreateTarget(self.exe)
-        self.launch_info = lldb.SBLaunchInfo([self.exe])
-        self.launch_info.SetWorkingDirectory(
-            self.get_process_working_directory())
-
-    def redirect_stdin(self):
-        '''Redirect STDIN (file descriptor 0) to use our input.txt file
-
-        Make the input.txt file to use when redirecting STDIN, setup a cleanup action
-        to delete the input.txt at the end of the test in case exceptions are thrown,
-        and redirect STDIN in the launch info.'''
-        f = open(self.local_input_file, 'w')
-        for line in self.lines:
-            f.write(line + "\n")
-        f.close()
-
-        if lldb.remote_platform:
-            self.runCmd('platform put-file "{local}" "{remote}"'.format(
-                local=self.local_input_file, remote=self.input_file))
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            os.unlink(self.local_input_file)
-            # TODO: add 'platform delete-file' file command
-            # if lldb.remote_platform:
-            #    self.runCmd('platform delete-file "{remote}"'.format(remote=self.input_file))
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-        self.launch_info.AddOpenFileAction(0, self.input_file, True, False)
-
-    def redirect_stdout(self):
-        '''Redirect STDOUT (file descriptor 1) to use our output.txt file'''
-        self.launch_info.AddOpenFileAction(1, self.output_file, False, True)
-
-    def redirect_stderr(self):
-        '''Redirect STDERR (file descriptor 2) to use our error.txt file'''
-        self.launch_info.AddOpenFileAction(2, self.error_file, False, True)
-
-    def run_process(self, put_stdin):
-        '''Run the process to completion and optionally put lines to STDIN via the API if "put_stdin" is True'''
-        # Set the breakpoints
-        self.breakpoint = self.target.BreakpointCreateBySourceRegex(
-            'Set breakpoint here', lldb.SBFileSpec("main.c"))
-        self.assertTrue(
-            self.breakpoint.GetNumLocations() > 0,
-            VALID_BREAKPOINT)
-
-        # Launch the process, and do not stop at the entry point.
-        error = lldb.SBError()
-        # This should launch the process and it should exit by the time we get back
-        # because we have synchronous mode enabled
-        self.process = self.target.Launch(self.launch_info, error)
-
-        self.assertTrue(
-            error.Success(),
-            "Make sure process launched successfully")
-        self.assertTrue(self.process, PROCESS_IS_VALID)
-
-        if self.TraceOn():
-            print("process launched.")
-
-        # Frame #0 should be at our breakpoint.
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-            self.process, self.breakpoint)
-
-        self.assertTrue(len(threads) == 1)
-        self.thread = threads[0]
-        self.frame = self.thread.frames[0]
-        self.assertTrue(self.frame, "Frame 0 is valid.")
-
-        if self.TraceOn():
-            print("process stopped at breakpoint, sending STDIN via LLDB API.")
-
-        # Write data to stdin via the public API if we were asked to
-        if put_stdin:
-            for line in self.lines:
-                self.process.PutSTDIN(line + "\n")
-
-        # Let process continue so it will exit
-        self.process.Continue()
-        state = self.process.GetState()
-        self.assertTrue(state == lldb.eStateExited, PROCESS_IS_VALID)
-
-    def check_process_output(self, output, error):
-            # Since we launched the process without specifying stdin/out/err,
-            # a pseudo terminal is used for stdout/err, and we are satisfied
-            # once "input line=>1" appears in stdout.
-            # See also main.c.
-        if self.TraceOn():
-            print("output = '%s'" % output)
-            print("error = '%s'" % error)
-
-        for line in self.lines:
-            check_line = 'input line to stdout: %s' % (line)
-            self.assertTrue(
-                check_line in output,
-                "verify stdout line shows up in STDOUT")
-        for line in self.lines:
-            check_line = 'input line to stderr: %s' % (line)
-            self.assertTrue(
-                check_line in error,
-                "verify stderr line shows up in STDERR")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/process/io/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/process/io/main.c
deleted file mode 100644 (file)
index c9a5707..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <stdio.h>
-
-int main(int argc, char const *argv[]) {
-    printf("Hello world.\n"); // Set breakpoint here
-    char line[100];
-    if (fgets(line, sizeof(line), stdin)) {
-        fprintf(stdout, "input line to stdout: %s", line);
-        fprintf(stderr, "input line to stderr: %s", line);
-    }
-    if (fgets(line, sizeof(line), stdin)) {
-        fprintf(stdout, "input line to stdout: %s", line);
-        fprintf(stderr, "input line to stderr: %s", line);
-    }
-    if (fgets(line, sizeof(line), stdin)) {
-        fprintf(stdout, "input line to stdout: %s", line);
-        fprintf(stderr, "input line to stderr: %s", line);
-    }
-    printf("Exiting now\n");
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/process/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/process/main.cpp
deleted file mode 100644 (file)
index 32c6dee..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-#include <stdint.h>
-
-// This simple program is to test the lldb Python API related to process.
-
-char my_char = 'u';
-char my_cstring[] = "lldb.SBProcess.ReadCStringFromMemory() works!";
-char *my_char_ptr = (char *)"Does it work?";
-uint32_t my_uint32 = 12345;
-int my_int = 0;
-
-int main (int argc, char const *argv[])
-{
-    for (int i = 0; i < 3; ++i) {
-        printf("my_char='%c'\n", my_char);
-        ++my_char;
-    }
-
-    printf("after the loop: my_char='%c'\n", my_char); // 'my_char' should print out as 'x'.
-
-    return 0; // Set break point at this line and check variable 'my_char'.
-              // Use lldb Python API to set memory content for my_int and check the result.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/process/read-mem-cstring/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/process/read-mem-cstring/Makefile
deleted file mode 100644 (file)
index 6bc1b47..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-C_SOURCES := main.c
-EXE := read-mem-cstring
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/process/read-mem-cstring/TestReadMemCString.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/process/read-mem-cstring/TestReadMemCString.py
deleted file mode 100644 (file)
index fc26c3b..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-"""Test reading c-strings from memory via SB API."""
-
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestReadMemCString(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_read_memory_c_string(self):
-        """Test corner case behavior of SBProcess::ReadCStringFromMemory"""
-        self.build()
-        self.dbg.SetAsync(False)
-
-        self.main_source = "main.c"
-        self.main_source_path = os.path.join(self.getSourceDir(),
-                                             self.main_source)
-        self.main_source_spec = lldb.SBFileSpec(self.main_source_path)
-        self.exe = self.getBuildArtifact("read-mem-cstring")
-
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
-            self, 'breakpoint here', self.main_source_spec, None, self.exe)
-
-        frame = thread.GetFrameAtIndex(0)
-
-        err = lldb.SBError()
-
-        empty_str_addr = frame.FindVariable("empty_string").GetValueAsUnsigned(err)
-        self.assertTrue(err.Success())
-        self.assertTrue(empty_str_addr != lldb.LLDB_INVALID_ADDRESS)
-
-        one_letter_str_addr = frame.FindVariable("one_letter_string").GetValueAsUnsigned(err)
-        self.assertTrue(err.Success())
-        self.assertTrue(one_letter_str_addr != lldb.LLDB_INVALID_ADDRESS)
-
-        invalid_memory_str_addr = frame.FindVariable("invalid_memory_string").GetValueAsUnsigned(err)
-        self.assertTrue(err.Success())
-        self.assertTrue(invalid_memory_str_addr != lldb.LLDB_INVALID_ADDRESS)
-
-        # Important:  An empty (0-length) c-string must come back as a Python string, not a
-        # None object.
-        empty_str = process.ReadCStringFromMemory(empty_str_addr, 2048, err)
-        self.assertTrue(err.Success())
-        self.assertTrue(empty_str == "")
-
-        one_letter_string = process.ReadCStringFromMemory(one_letter_str_addr, 2048, err)
-        self.assertTrue(err.Success())
-        self.assertTrue(one_letter_string == "1")
-
-        invalid_memory_string = process.ReadCStringFromMemory(invalid_memory_str_addr, 2048, err)
-        self.assertTrue(err.Fail())
-        self.assertTrue(invalid_memory_string == "" or invalid_memory_string == None)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/process/read-mem-cstring/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/process/read-mem-cstring/main.c
deleted file mode 100644 (file)
index 03c6674..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#include <stdlib.h>
-int main ()
-{
-   const char *empty_string = "";
-   const char *one_letter_string = "1";
-   // This expects that lower 4k of memory will be mapped unreadable, which most
-   // OSs do (to catch null pointer dereferences).
-   const char *invalid_memory_string = (char*)0x100;
-
-   return empty_string[0] + one_letter_string[0]; // breakpoint here
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbdata/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbdata/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbdata/TestSBData.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbdata/TestSBData.py
deleted file mode 100644 (file)
index a12f683..0000000
+++ /dev/null
@@ -1,521 +0,0 @@
-"""Test the SBData APIs."""
-
-
-
-from math import fabs
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class SBDataAPICase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break on inside main.cpp.
-        self.line = line_number('main.cpp', '// set breakpoint here')
-
-    @add_test_categories(['pyapi'])
-    def test_byte_order_and_address_byte_size(self):
-        """Test the SBData::SetData() to ensure the byte order and address
-        byte size are obeyed"""
-        addr_data = b'\x11\x22\x33\x44\x55\x66\x77\x88'
-        error = lldb.SBError()
-        data = lldb.SBData()
-        data.SetData(error, addr_data, lldb.eByteOrderBig, 4)
-        addr = data.GetAddress(error, 0)
-        self.assertTrue(addr == 0x11223344);
-        data.SetData(error, addr_data, lldb.eByteOrderBig, 8)
-        addr = data.GetAddress(error, 0)
-        self.assertTrue(addr == 0x1122334455667788);
-        data.SetData(error, addr_data, lldb.eByteOrderLittle, 4)
-        addr = data.GetAddress(error, 0)
-        self.assertTrue(addr == 0x44332211);
-        data.SetData(error, addr_data, lldb.eByteOrderLittle, 8)
-        addr = data.GetAddress(error, 0)
-        self.assertTrue(addr == 0x8877665544332211);
-
-    @add_test_categories(['pyapi'])
-    def test_with_run_command(self):
-        """Test the SBData APIs."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        target = self.dbg.GetSelectedTarget()
-
-        process = target.GetProcess()
-
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertIsNotNone(thread)
-
-        frame = thread.GetSelectedFrame()
-        foobar = frame.FindVariable('foobar')
-        self.assertTrue(foobar.IsValid())
-        data = foobar.GetPointeeData(0, 2)
-        offset = 0
-        error = lldb.SBError()
-
-        self.assert_data(data.GetUnsignedInt32, offset, 1)
-        offset += 4
-        low = data.GetSignedInt16(error, offset)
-        self.assertTrue(error.Success())
-        offset += 2
-        high = data.GetSignedInt16(error, offset)
-        self.assertTrue(error.Success())
-        offset += 2
-        self.assertTrue(
-            (low == 9 and high == 0) or (
-                low == 0 and high == 9),
-            'foo[0].b == 9')
-        self.assertTrue(
-            fabs(
-                data.GetFloat(
-                    error,
-                    offset) -
-                3.14) < 1,
-            'foo[0].c == 3.14')
-        self.assertTrue(error.Success())
-        offset += 4
-        self.assert_data(data.GetUnsignedInt32, offset, 8)
-        offset += 4
-        self.assert_data(data.GetUnsignedInt32, offset, 5)
-        offset += 4
-
-        self.runCmd("n")
-
-        offset = 16
-
-        self.assert_data(data.GetUnsignedInt32, offset, 5)
-
-        data = foobar.GetPointeeData(1, 1)
-
-        offset = 0
-
-        self.assert_data(data.GetSignedInt32, offset, 8)
-        offset += 4
-        self.assert_data(data.GetSignedInt32, offset, 7)
-        offset += 8
-        self.assertTrue(
-            data.GetUnsignedInt32(
-                error,
-                offset) == 0,
-            'do not read beyond end')
-        self.assertTrue(not error.Success())
-        error.Clear()  # clear the error for the next test
-
-        star_foobar = foobar.Dereference()
-        self.assertTrue(star_foobar.IsValid())
-
-        data = star_foobar.GetData()
-
-        offset = 0
-        self.assert_data(data.GetUnsignedInt32, offset, 1)
-        offset += 4
-        self.assert_data(data.GetUnsignedInt32, offset, 9)
-
-        foobar_addr = star_foobar.GetLoadAddress()
-        foobar_addr += 12
-
-        # http://llvm.org/bugs/show_bug.cgi?id=11579
-        # lldb::SBValue::CreateValueFromAddress does not verify SBType::GetPointerType succeeds
-        # This should not crash LLDB.
-        nothing = foobar.CreateValueFromAddress(
-            "nothing", foobar_addr, star_foobar.GetType().GetBasicType(
-                lldb.eBasicTypeInvalid))
-
-        new_foobar = foobar.CreateValueFromAddress(
-            "f00", foobar_addr, star_foobar.GetType())
-        self.assertTrue(new_foobar.IsValid())
-        data = new_foobar.GetData()
-
-        self.assertTrue(data.uint32[0] == 8, 'then foo[1].a == 8')
-        self.assertTrue(data.uint32[1] == 7, 'then foo[1].b == 7')
-        # exploiting that sizeof(uint32) == sizeof(float)
-        self.assertTrue(fabs(data.float[2] - 3.14) < 1, 'foo[1].c == 3.14')
-
-        self.runCmd("n")
-
-        offset = 0
-        self.assert_data(data.GetUnsignedInt32, offset, 8)
-        offset += 4
-        self.assert_data(data.GetUnsignedInt32, offset, 7)
-        offset += 4
-        self.assertTrue(
-            fabs(
-                data.GetFloat(
-                    error,
-                    offset) -
-                3.14) < 1,
-            'foo[1].c == 3.14')
-        self.assertTrue(error.Success())
-
-        data = new_foobar.GetData()
-
-        offset = 0
-        self.assert_data(data.GetUnsignedInt32, offset, 8)
-        offset += 4
-        self.assert_data(data.GetUnsignedInt32, offset, 7)
-        offset += 4
-        self.assertTrue(
-            fabs(
-                data.GetFloat(
-                    error,
-                    offset) -
-                6.28) < 1,
-            'foo[1].c == 6.28')
-        self.assertTrue(error.Success())
-
-        self.runCmd("n")
-
-        barfoo = frame.FindVariable('barfoo')
-
-        data = barfoo.GetData()
-        offset = 0
-        self.assert_data(data.GetUnsignedInt32, offset, 1)
-        offset += 4
-        self.assert_data(data.GetUnsignedInt32, offset, 2)
-        offset += 4
-        self.assertTrue(
-            fabs(
-                data.GetFloat(
-                    error,
-                    offset) -
-                3) < 1,
-            'barfoo[0].c == 3')
-        self.assertTrue(error.Success())
-        offset += 4
-        self.assert_data(data.GetUnsignedInt32, offset, 4)
-        offset += 4
-        self.assert_data(data.GetUnsignedInt32, offset, 5)
-        offset += 4
-        self.assertTrue(
-            fabs(
-                data.GetFloat(
-                    error,
-                    offset) -
-                6) < 1,
-            'barfoo[1].c == 6')
-        self.assertTrue(error.Success())
-
-        new_object = barfoo.CreateValueFromData(
-            "new_object", data, barfoo.GetType().GetBasicType(
-                lldb.eBasicTypeInt))
-        self.assertTrue(new_object.GetValue() == "1", 'new_object == 1')
-
-        if data.GetByteOrder() == lldb.eByteOrderBig:
-            data.SetData(
-                error,
-                '\0\0\0A',
-                data.GetByteOrder(),
-                data.GetAddressByteSize())
-        else:
-            data.SetData(
-                error,
-                'A\0\0\0',
-                data.GetByteOrder(),
-                data.GetAddressByteSize())
-        self.assertTrue(error.Success())
-
-        data2 = lldb.SBData()
-        data2.SetData(
-            error,
-            'BCD',
-            data.GetByteOrder(),
-            data.GetAddressByteSize())
-        self.assertTrue(error.Success())
-
-        data.Append(data2)
-
-        # this breaks on EBCDIC
-        offset = 0
-        self.assert_data(data.GetUnsignedInt32, offset, 65)
-        offset += 4
-        self.assert_data(data.GetUnsignedInt8, offset, 66)
-        offset += 1
-        self.assert_data(data.GetUnsignedInt8, offset, 67)
-        offset += 1
-        self.assert_data(data.GetUnsignedInt8, offset, 68)
-        offset += 1
-
-        # check the new API calls introduced per LLVM llvm.org/prenhancement request
-        # 11619 (Allow creating SBData values from arrays or primitives in
-        # Python)
-
-        hello_str = "hello!"
-        data2 = lldb.SBData.CreateDataFromCString(
-            process.GetByteOrder(), process.GetAddressByteSize(), hello_str)
-        self.assertTrue(len(data2.uint8) == len(hello_str))
-        self.assertTrue(data2.uint8[0] == 104, 'h == 104')
-        self.assertTrue(data2.uint8[1] == 101, 'e == 101')
-        self.assertTrue(data2.uint8[2] == 108, 'l == 108')
-        self.assert_data(data2.GetUnsignedInt8, 3, 108)  # l
-        self.assertTrue(data2.uint8[4] == 111, 'o == 111')
-        self.assert_data(data2.GetUnsignedInt8, 5, 33)  # !
-
-        uint_lists = [[1, 2, 3, 4, 5], [int(i) for i in [1, 2, 3, 4, 5]]]
-        int_lists = [[2, -2], [int(i) for i in [2, -2]]]
-
-        for l in uint_lists:
-            data2 = lldb.SBData.CreateDataFromUInt64Array(
-                process.GetByteOrder(), process.GetAddressByteSize(), l)
-            self.assert_data(data2.GetUnsignedInt64, 0, 1)
-            self.assert_data(data2.GetUnsignedInt64, 8, 2)
-            self.assert_data(data2.GetUnsignedInt64, 16, 3)
-            self.assert_data(data2.GetUnsignedInt64, 24, 4)
-            self.assert_data(data2.GetUnsignedInt64, 32, 5)
-
-            self.assertTrue(
-                data2.uint64s == [
-                    1,
-                    2,
-                    3,
-                    4,
-                    5],
-                'read_data_helper failure: data2 == [1,2,3,4,5]')
-
-        for l in int_lists:
-            data2 = lldb.SBData.CreateDataFromSInt32Array(
-                process.GetByteOrder(), process.GetAddressByteSize(), l)
-            self.assertTrue(
-                data2.sint32[
-                    0:2] == [
-                    2, -2], 'signed32 data2 = [2,-2]')
-
-        data2.Append(
-            lldb.SBData.CreateDataFromSInt64Array(
-                process.GetByteOrder(),
-                process.GetAddressByteSize(),
-                int_lists[0]))
-        self.assert_data(data2.GetSignedInt32, 0, 2)
-        self.assert_data(data2.GetSignedInt32, 4, -2)
-        self.assertTrue(
-            data2.sint64[
-                1:3] == [
-                2, -2], 'signed64 data2 = [2,-2]')
-
-        for l in int_lists:
-            data2 = lldb.SBData.CreateDataFromSInt64Array(
-                process.GetByteOrder(), process.GetAddressByteSize(), l)
-            self.assert_data(data2.GetSignedInt64, 0, 2)
-            self.assert_data(data2.GetSignedInt64, 8, -2)
-            self.assertTrue(
-                data2.sint64[
-                    0:2] == [
-                    2, -2], 'signed64 data2 = [2,-2]')
-
-        for l in uint_lists:
-            data2 = lldb.SBData.CreateDataFromUInt32Array(
-                process.GetByteOrder(), process.GetAddressByteSize(), l)
-            self.assert_data(data2.GetUnsignedInt32, 0, 1)
-            self.assert_data(data2.GetUnsignedInt32, 4, 2)
-            self.assert_data(data2.GetUnsignedInt32, 8, 3)
-            self.assert_data(data2.GetUnsignedInt32, 12, 4)
-            self.assert_data(data2.GetUnsignedInt32, 16, 5)
-
-        bool_list = [True, True, False, False, True, False]
-
-        data2 = lldb.SBData.CreateDataFromSInt32Array(
-            process.GetByteOrder(), process.GetAddressByteSize(), bool_list)
-        self.assertTrue(
-            data2.sint32[
-                0:6] == [
-                1,
-                1,
-                0,
-                0,
-                1,
-                0],
-            'signed32 data2 = [1, 1, 0, 0, 1, 0]')
-
-        data2 = lldb.SBData.CreateDataFromUInt32Array(
-            process.GetByteOrder(), process.GetAddressByteSize(), bool_list)
-        self.assertTrue(
-            data2.uint32[
-                0:6] == [
-                1,
-                1,
-                0,
-                0,
-                1,
-                0],
-            'unsigned32 data2 = [1, 1, 0, 0, 1, 0]')
-
-        data2 = lldb.SBData.CreateDataFromSInt64Array(
-            process.GetByteOrder(), process.GetAddressByteSize(), bool_list)
-        self.assertTrue(
-            data2.sint64[
-                0:6] == [
-                1,
-                1,
-                0,
-                0,
-                1,
-                0],
-            'signed64 data2 = [1, 1, 0, 0, 1, 0]')
-
-        data2 = lldb.SBData.CreateDataFromUInt64Array(
-            process.GetByteOrder(), process.GetAddressByteSize(), bool_list)
-        self.assertTrue(
-            data2.uint64[
-                0:6] == [
-                1,
-                1,
-                0,
-                0,
-                1,
-                0],
-            'signed64 data2 = [1, 1, 0, 0, 1, 0]')
-
-        data2 = lldb.SBData.CreateDataFromDoubleArray(
-            process.GetByteOrder(), process.GetAddressByteSize(), [
-                3.14, 6.28, 2.71])
-        self.assertTrue(
-            fabs(
-                data2.GetDouble(
-                    error,
-                    0) -
-                3.14) < 0.5,
-            'double data2[0] = 3.14')
-        self.assertTrue(error.Success())
-        self.assertTrue(
-            fabs(
-                data2.GetDouble(
-                    error,
-                    8) -
-                6.28) < 0.5,
-            'double data2[1] = 6.28')
-        self.assertTrue(error.Success())
-        self.assertTrue(
-            fabs(
-                data2.GetDouble(
-                    error,
-                    16) -
-                2.71) < 0.5,
-            'double data2[2] = 2.71')
-        self.assertTrue(error.Success())
-
-        data2 = lldb.SBData()
-
-        data2.SetDataFromCString(hello_str)
-        self.assertTrue(len(data2.uint8) == len(hello_str))
-        self.assert_data(data2.GetUnsignedInt8, 0, 104)
-        self.assert_data(data2.GetUnsignedInt8, 1, 101)
-        self.assert_data(data2.GetUnsignedInt8, 2, 108)
-        self.assert_data(data2.GetUnsignedInt8, 3, 108)
-        self.assert_data(data2.GetUnsignedInt8, 4, 111)
-        self.assert_data(data2.GetUnsignedInt8, 5, 33)
-
-        data2.SetDataFromUInt64Array([1, 2, 3, 4, 5])
-        self.assert_data(data2.GetUnsignedInt64, 0, 1)
-        self.assert_data(data2.GetUnsignedInt64, 8, 2)
-        self.assert_data(data2.GetUnsignedInt64, 16, 3)
-        self.assert_data(data2.GetUnsignedInt64, 24, 4)
-        self.assert_data(data2.GetUnsignedInt64, 32, 5)
-
-        self.assertTrue(
-            data2.uint64[0] == 1,
-            'read_data_helper failure: set data2[0] = 1')
-        self.assertTrue(
-            data2.uint64[1] == 2,
-            'read_data_helper failure: set data2[1] = 2')
-        self.assertTrue(
-            data2.uint64[2] == 3,
-            'read_data_helper failure: set data2[2] = 3')
-        self.assertTrue(
-            data2.uint64[3] == 4,
-            'read_data_helper failure: set data2[3] = 4')
-        self.assertTrue(
-            data2.uint64[4] == 5,
-            'read_data_helper failure: set data2[4] = 5')
-
-        self.assertTrue(
-            data2.uint64[
-                0:2] == [
-                1,
-                2],
-            'read_data_helper failure: set data2[0:2] = [1,2]')
-
-        data2.SetDataFromSInt32Array([2, -2])
-        self.assert_data(data2.GetSignedInt32, 0, 2)
-        self.assert_data(data2.GetSignedInt32, 4, -2)
-
-        data2.SetDataFromSInt64Array([2, -2])
-        self.assert_data(data2.GetSignedInt64, 0, 2)
-        self.assert_data(data2.GetSignedInt64, 8, -2)
-
-        data2.SetDataFromUInt32Array([1, 2, 3, 4, 5])
-        self.assert_data(data2.GetUnsignedInt32, 0, 1)
-        self.assert_data(data2.GetUnsignedInt32, 4, 2)
-        self.assert_data(data2.GetUnsignedInt32, 8, 3)
-        self.assert_data(data2.GetUnsignedInt32, 12, 4)
-        self.assert_data(data2.GetUnsignedInt32, 16, 5)
-
-        self.assertTrue(
-            data2.uint32[0] == 1,
-            'read_data_helper failure: set 32-bit data2[0] = 1')
-        self.assertTrue(
-            data2.uint32[1] == 2,
-            'read_data_helper failure: set 32-bit data2[1] = 2')
-        self.assertTrue(
-            data2.uint32[2] == 3,
-            'read_data_helper failure: set 32-bit data2[2] = 3')
-        self.assertTrue(
-            data2.uint32[3] == 4,
-            'read_data_helper failure: set 32-bit data2[3] = 4')
-        self.assertTrue(
-            data2.uint32[4] == 5,
-            'read_data_helper failure: set 32-bit data2[4] = 5')
-
-        data2.SetDataFromDoubleArray([3.14, 6.28, 2.71])
-        self.assertTrue(fabs(data2.GetDouble(error, 0) - 3.14)
-                        < 0.5, 'set double data2[0] = 3.14')
-        self.assertTrue(fabs(data2.GetDouble(error, 8) - 6.28)
-                        < 0.5, 'set double data2[1] = 6.28')
-        self.assertTrue(fabs(data2.GetDouble(error, 16) - 2.71)
-                        < 0.5, 'set double data2[2] = 2.71')
-
-        self.assertTrue(
-            fabs(
-                data2.double[0] -
-                3.14) < 0.5,
-            'read_data_helper failure: set double data2[0] = 3.14')
-        self.assertTrue(
-            fabs(
-                data2.double[1] -
-                6.28) < 0.5,
-            'read_data_helper failure: set double data2[1] = 6.28')
-        self.assertTrue(
-            fabs(
-                data2.double[2] -
-                2.71) < 0.5,
-            'read_data_helper failure: set double data2[2] = 2.71')
-
-    def assert_data(self, func, arg, expected):
-        """ Asserts func(SBError error, arg) == expected. """
-        error = lldb.SBError()
-        result = func(error, arg)
-        if not error.Success():
-            stream = lldb.SBStream()
-            error.GetDescription(stream)
-            self.assertTrue(
-                error.Success(), "%s(error, %s) did not succeed: %s" %
-                (func.__name__, arg, stream.GetData()))
-        self.assertTrue(
-            expected == result, "%s(error, %s) == %s != %s" %
-            (func.__name__, arg, result, expected))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbdata/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbdata/main.cpp
deleted file mode 100644 (file)
index 78e071c..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdint.h>
-
-struct foo
-{
-    uint32_t a;
-    uint32_t b;
-    float c;
-    foo() : a(0), b(1), c(3.14) {}
-    foo(uint32_t A, uint32_t B, float C) :
-        a(A),
-        b(B),
-        c(C)
-    {}
-};
-
-int main (int argc, char const *argv[])
-{
-    foo* foobar = new foo[2];
-    
-    foobar[0].a = 1;
-    foobar[0].b = 9;
-
-    foobar[1].a = 8;
-    foobar[1].b = 5;
-    
-    foobar[1].b = 7; // set breakpoint here
-    
-    foobar[1].c = 6.28;
-    
-    foo barfoo[] = {foo(1,2,3), foo(4,5,6)};
-    
-    delete[] foobar;
-    
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sblaunchinfo/TestSBLaunchInfo.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sblaunchinfo/TestSBLaunchInfo.py
deleted file mode 100644 (file)
index 44a6362..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-"""
-Test SBLaunchInfo
-"""
-
-
-
-from lldbsuite.test.lldbtest import *
-
-
-def lookup(info, key):
-    for i in range(info.GetNumEnvironmentEntries()):
-        KeyEqValue = info.GetEnvironmentEntryAtIndex(i)
-        Key, Value = KeyEqValue.split("=")
-        if Key == key:
-            return Value
-    return ""
-
-class TestSBLaunchInfo(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_environment_getset(self):
-        info = lldb.SBLaunchInfo(None)
-        info.SetEnvironmentEntries(["FOO=BAR"], False)
-        self.assertEquals(1, info.GetNumEnvironmentEntries())
-        info.SetEnvironmentEntries(["BAR=BAZ"], True)
-        self.assertEquals(2, info.GetNumEnvironmentEntries())
-        self.assertEquals("BAR", lookup(info, "FOO"))
-        self.assertEquals("BAZ", lookup(info, "BAR"))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbstructureddata/TestStructuredDataAPI.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbstructureddata/TestStructuredDataAPI.py
deleted file mode 100644 (file)
index f5efdfa..0000000
+++ /dev/null
@@ -1,199 +0,0 @@
-"""
-Test some SBStructuredData API.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestStructuredDataAPI(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test(self):
-        self.structured_data_api_test()
-
-    @add_test_categories(['pyapi'])
-    def structured_data_api_test(self):
-        error = lldb.SBError()
-        s = lldb.SBStream()
-        s.Print(
-            "{\"key_dict\":{\"key_string\":\"STRING\",\"key_int\":3,\"key_float\":2.99,\"key_bool\":true,\"key_array\":[\"23\",\"arr\"]}}")
-        example = lldb.SBStructuredData()
-
-        # Check SetFromJSON API for dictionaries, integers, floating point
-        # values, strings and arrays
-        error = example.SetFromJSON(s)
-        if not error.Success():
-            self.fail("FAILED:   " + error.GetCString())
-
-        # Tests for invalid data type
-        self.invalid_struct_test(example)
-
-        dict_struct = lldb.SBStructuredData()
-        dict_struct = example.GetValueForKey("key_dict")
-
-        # Tests for dictionary data type
-        self.dictionary_struct_test(example)
-
-        # Tests for string data type
-        self.string_struct_test(dict_struct)
-
-        # Tests for integer data type
-        self.int_struct_test(dict_struct)
-
-        # Tests for floating point data type
-        self.double_struct_test(dict_struct)
-
-        # Tests for boolean data type
-        self.bool_struct_test(dict_struct)
-
-        # Tests for array data type
-        self.array_struct_test(dict_struct)
-
-    def invalid_struct_test(self, example):
-        invalid_struct = lldb.SBStructuredData()
-        invalid_struct = example.GetValueForKey("invalid_key")
-        if invalid_struct.IsValid():
-            self.fail("An invalid object should have been returned")
-
-        # Check Type API
-        if not invalid_struct.GetType() == lldb.eStructuredDataTypeInvalid:
-            self.fail("Wrong type returned: " + str(invalid_struct.GetType()))
-
-    def dictionary_struct_test(self, example):
-        # Check API returning a valid SBStructuredData of 'dictionary' type
-        dict_struct = lldb.SBStructuredData()
-        dict_struct = example.GetValueForKey("key_dict")
-        if not dict_struct.IsValid():
-            self.fail("A valid object should have been returned")
-
-        # Check Type API
-        if not dict_struct.GetType() == lldb.eStructuredDataTypeDictionary:
-            self.fail("Wrong type returned: " + str(dict_struct.GetType()))
-
-        # Check Size API for 'dictionary' type
-        if not dict_struct.GetSize() == 5:
-            self.fail("Wrong no of elements returned: " +
-                      str(dict_struct.GetSize()))
-
-    def string_struct_test(self, dict_struct):
-        string_struct = lldb.SBStructuredData()
-        string_struct = dict_struct.GetValueForKey("key_string")
-        if not string_struct.IsValid():
-            self.fail("A valid object should have been returned")
-
-        # Check Type API
-        if not string_struct.GetType() == lldb.eStructuredDataTypeString:
-            self.fail("Wrong type returned: " + str(string_struct.GetType()))
-
-        # Check API returning 'string' value
-        output = string_struct.GetStringValue(25)
-        if not "STRING" in output:
-            self.fail("wrong output: " + output)
-
-        # Calling wrong API on a SBStructuredData
-        # (e.g. getting an integer from a string type structure)
-        output = string_struct.GetIntegerValue()
-        if output:
-            self.fail(
-                "Valid integer value " +
-                str(output) +
-                " returned for a string object")
-
-    def int_struct_test(self, dict_struct):
-        # Check a valid SBStructuredData containing an 'integer' by
-        int_struct = lldb.SBStructuredData()
-        int_struct = dict_struct.GetValueForKey("key_int")
-        if not int_struct.IsValid():
-            self.fail("A valid object should have been returned")
-
-        # Check Type API
-        if not int_struct.GetType() == lldb.eStructuredDataTypeInteger:
-            self.fail("Wrong type returned: " + str(int_struct.GetType()))
-
-        # Check API returning 'integer' value
-        output = int_struct.GetIntegerValue()
-        if not output == 3:
-            self.fail("wrong output: " + str(output))
-
-        # Calling wrong API on a SBStructuredData
-        # (e.g. getting a string value from an integer type structure)
-        output = int_struct.GetStringValue(25)
-        if output:
-            self.fail(
-                "Valid string " +
-                output +
-                " returned for an integer object")
-
-    def double_struct_test(self, dict_struct):
-        floating_point_struct = lldb.SBStructuredData()
-        floating_point_struct = dict_struct.GetValueForKey("key_float")
-        if not floating_point_struct.IsValid():
-            self.fail("A valid object should have been returned")
-
-        # Check Type API
-        if not floating_point_struct.GetType() == lldb.eStructuredDataTypeFloat:
-            self.fail("Wrong type returned: " +
-                      str(floating_point_struct.GetType()))
-
-        # Check API returning 'double' value
-        output = floating_point_struct.GetFloatValue()
-        if not output == 2.99:
-            self.fail("wrong output: " + str(output))
-
-    def bool_struct_test(self, dict_struct):
-        bool_struct = lldb.SBStructuredData()
-        bool_struct = dict_struct.GetValueForKey("key_bool")
-        if not bool_struct.IsValid():
-            self.fail("A valid object should have been returned")
-
-        # Check Type API
-        if not bool_struct.GetType() == lldb.eStructuredDataTypeBoolean:
-            self.fail("Wrong type returned: " + str(bool_struct.GetType()))
-
-        # Check API returning 'bool' value
-        output = bool_struct.GetBooleanValue()
-        if not output:
-            self.fail("wrong output: " + str(output))
-
-    def array_struct_test(self, dict_struct):
-        # Check API returning a valid SBStructuredData of 'array' type
-        array_struct = lldb.SBStructuredData()
-        array_struct = dict_struct.GetValueForKey("key_array")
-        if not array_struct.IsValid():
-            self.fail("A valid object should have been returned")
-
-        # Check Type API
-        if not array_struct.GetType() == lldb.eStructuredDataTypeArray:
-            self.fail("Wrong type returned: " + str(array_struct.GetType()))
-
-        # Check Size API for 'array' type
-        if not array_struct.GetSize() == 2:
-            self.fail("Wrong no of elements returned: " +
-                      str(array_struct.GetSize()))
-
-        # Check API returning a valid SBStructuredData for different 'array'
-        # indices
-        string_struct = array_struct.GetItemAtIndex(0)
-        if not string_struct.IsValid():
-            self.fail("A valid object should have been returned")
-        if not string_struct.GetType() == lldb.eStructuredDataTypeString:
-            self.fail("Wrong type returned: " + str(string_struct.GetType()))
-        output = string_struct.GetStringValue(5)
-        if not output == "23":
-            self.fail("wrong output: " + str(output))
-
-        string_struct = array_struct.GetItemAtIndex(1)
-        if not string_struct.IsValid():
-            self.fail("A valid object should have been returned")
-        if not string_struct.GetType() == lldb.eStructuredDataTypeString:
-            self.fail("Wrong type returned: " + str(string_struct.GetType()))
-        output = string_struct.GetStringValue(5)
-        if not output == "arr":
-            self.fail("wrong output: " + str(output))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbtype_typeclass/TestSBTypeTypeClass.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbtype_typeclass/TestSBTypeTypeClass.py
deleted file mode 100644 (file)
index a06dd7a..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-from lldbsuite.test import decorators
-from lldbsuite.test import lldbinline
-
-lldbinline.MakeInlineTest(
-    __file__, globals(), [
-        decorators.skipIfFreeBSD, decorators.skipIfLinux,
-        decorators.skipIfWindows, decorators.skipIfNetBSD,
-        decorators.expectedFailureAll(
-            oslist=['macosx'], archs=['i386'],
-            bugnumber='rdar://28656677')])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbtype_typeclass/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbtype_typeclass/main.m
deleted file mode 100644 (file)
index 8e9601e..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-//===-- main.m --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#import <Foundation/Foundation.h>
-
-@interface ThisClassTestsThings : NSObject
-@end
-
-@implementation ThisClassTestsThings
-- (int)doSomething {
-
-    id s = self;
-    NSLog(@"%@",s); //% s = self.frame().FindVariable("s"); s.SetPreferDynamicValue(lldb.eDynamicCanRunTarget)
-    //% s_type = s.GetType()
-    //% typeClass = s_type.GetTypeClass()
-    //% condition = (typeClass == lldb.eTypeClassClass) or (typeClass ==lldb.eTypeClassObjCObject) or (typeClass == lldb.eTypeClassObjCInterface) or (typeClass == lldb.eTypeClassObjCObjectPointer) or (typeClass == lldb.eTypeClassPointer)
-    //% self.assertTrue(condition, "s has the wrong TypeClass")
-    return 0;
-}
-- (id)init {
-    return (self = [super init]);
-}
-@end
-
-
-int main (int argc, char const *argv[])
-{
-    return [[[ThisClassTestsThings alloc] init] doSomething];
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_const_addrof/TestSBValueConstAddrOf.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_const_addrof/TestSBValueConstAddrOf.py
deleted file mode 100644 (file)
index a3d43c1..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-import lldbsuite.test.lldbinline as lldbinline
-
-lldbinline.MakeInlineTest(__file__, globals())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_const_addrof/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_const_addrof/main.cpp
deleted file mode 100644 (file)
index 318a45b..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#include <stdio.h>
-#include <stdint.h>
-
-struct RegisterContext
-{
-    uintptr_t r0;
-    uintptr_t r1;
-    uintptr_t r2;
-    uintptr_t r3;
-    uintptr_t r4;
-    uintptr_t pc;
-    uintptr_t fp;
-    uintptr_t sp;
-};
-
-struct ThreadInfo {
-    uint32_t tid;
-    const char *name;
-    RegisterContext regs;
-    ThreadInfo *next;
-};
-int main (int argc, char const *argv[], char const *envp[]);
-
-ThreadInfo g_thread2 = { 0x2222, "thread2", { 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, (uintptr_t)&main, 0x2006, 0x2007 }, NULL       };
-ThreadInfo g_thread1 = { 0x1111, "thread1", { 0x1000, 0x1001, 0x1002, 0x1003, 0x1004, (uintptr_t)&main, 0x1006, 0x1007 }, &g_thread2 };
-ThreadInfo *g_thread_list_ptr = &g_thread1;
-
-int main (int argc, char const *argv[], char const *envp[])
-{
-    printf ("g_thread_list is %p\n", g_thread_list_ptr);
-    return 0; //% v = self.dbg.GetSelectedTarget().FindFirstGlobalVariable('g_thread_list_ptr')
-    //% v_gla = v.GetChildMemberWithName('regs').GetLoadAddress()
-    //% v_aof = v.GetChildMemberWithName('regs').AddressOf().GetValueAsUnsigned(lldb.LLDB_INVALID_ADDRESS)
-    //% expr = '(%s)0x%x' % (v.GetType().GetName(), v.GetValueAsUnsigned(0))
-    //% e = v.CreateValueFromExpression('e', expr)
-    //% e_gla = e.GetChildMemberWithName('regs').GetLoadAddress()
-    //% e_aof = e.GetChildMemberWithName('regs').AddressOf().GetValueAsUnsigned(lldb.LLDB_INVALID_ADDRESS)
-    //% self.assertTrue(v_gla == e_gla, "GetLoadAddress() differs")
-    //% self.assertTrue(v_aof == e_aof, "AddressOf() differs")
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_persist/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_persist/Makefile
deleted file mode 100644 (file)
index b525656..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CXX_SOURCES := main.cpp
-
-# Clean renamed executable on 'make clean'
-clean: OBJECTS+=no_synth
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_persist/TestSBValuePersist.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_persist/TestSBValuePersist.py
deleted file mode 100644 (file)
index 1662f69..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-"""Test SBValue::Persist"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class SBValuePersistTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @add_test_categories(['pyapi'])
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24772")
-    def test(self):
-        """Test SBValue::Persist"""
-        self.build()
-        self.setTearDownCleanup()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_source_regexp(self, "break here")
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format clear', check=False)
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type filter clear', check=False)
-            self.runCmd('type synthetic clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        foo = self.frame().FindVariable("foo")
-        bar = self.frame().FindVariable("bar")
-        baz = self.frame().FindVariable("baz")
-
-        self.assertTrue(foo.IsValid(), "foo is not valid")
-        self.assertTrue(bar.IsValid(), "bar is not valid")
-        self.assertTrue(baz.IsValid(), "baz is not valid")
-
-        fooPersist = foo.Persist()
-        barPersist = bar.Persist()
-        bazPersist = baz.Persist()
-
-        self.assertTrue(fooPersist.IsValid(), "fooPersist is not valid")
-        self.assertTrue(barPersist.IsValid(), "barPersist is not valid")
-        self.assertTrue(bazPersist.IsValid(), "bazPersist is not valid")
-
-        self.assertTrue(
-            fooPersist.GetValueAsUnsigned(0) == 10,
-            "fooPersist != 10")
-        self.assertTrue(
-            barPersist.GetPointeeData().sint32[0] == 4,
-            "barPersist != 4")
-        self.assertTrue(bazPersist.GetSummary() == '"85"', "bazPersist != 85")
-
-        self.runCmd("continue")
-
-        self.assertTrue(fooPersist.IsValid(), "fooPersist is not valid")
-        self.assertTrue(barPersist.IsValid(), "barPersist is not valid")
-        self.assertTrue(bazPersist.IsValid(), "bazPersist is not valid")
-
-        self.assertTrue(
-            fooPersist.GetValueAsUnsigned(0) == 10,
-            "fooPersist != 10")
-        self.assertTrue(
-            barPersist.GetPointeeData().sint32[0] == 4,
-            "barPersist != 4")
-        self.assertTrue(bazPersist.GetSummary() == '"85"', "bazPersist != 85")
-
-        self.expect("expr *(%s)" % (barPersist.GetName()), substrs=['= 4'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_persist/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_persist/main.cpp
deleted file mode 100644 (file)
index c54339f..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#include <vector>
-#include <string>
-
-void f() {}
-
-int main() {
-    int foo = 10;
-    int *bar = new int(4);
-    std::string baz = "85";
-    
-    f(); // break here
-    f(); // break here
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/section/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/section/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/section/TestSectionAPI.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/section/TestSectionAPI.py
deleted file mode 100644 (file)
index 1513b98..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-"""
-Test SBSection APIs.
-"""
-
-
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class SectionAPITestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(['pyapi'])
-    def test_get_target_byte_size(self):
-        d = {'EXE': 'b.out'}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        exe = self.getBuildArtifact('b.out')
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # find the .data section of the main module
-        mod = target.GetModuleAtIndex(0)
-        data_section = None
-        for s in mod.sections:
-            sect_type = s.GetSectionType()
-            if sect_type == lldb.eSectionTypeData:
-                data_section = s
-                break
-            elif sect_type == lldb.eSectionTypeContainer:
-                for i in range(s.GetNumSubSections()):
-                    ss = s.GetSubSectionAtIndex(i)
-                    sect_type = ss.GetSectionType()
-                    if sect_type == lldb.eSectionTypeData:
-                        data_section = ss
-                        break
-
-        self.assertIsNotNone(data_section)
-        self.assertEqual(data_section.target_byte_size, 1)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/section/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/section/main.c
deleted file mode 100644 (file)
index f12ef5a..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-#include <string.h>
-
-// This simple program is to test the lldb Python API SBSection. It includes
-// somes global data, and so the build process produces a DATA section, which 
-// the test code can use to query for the target byte size
-
-char my_global_var_of_char_type = 'X';
-
-int main (int argc, char const *argv[])
-{
-    // this code just "does something" with the global so that it is not
-    // optimised away
-    if (argc > 1 && strlen(argv[1]))
-    {
-        my_global_var_of_char_type += argv[1][0];
-    }
-
-    return my_global_var_of_char_type;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/signals/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/signals/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/signals/TestSignalsAPI.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/signals/TestSignalsAPI.py
deleted file mode 100644 (file)
index 602fee4..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-"""
-Test SBProcess APIs, including ReadMemory(), WriteMemory(), and others.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-from lldbsuite.test.lldbutil import get_stopped_thread, state_type_to_str
-
-
-class SignalsAPITestCase(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @add_test_categories(['pyapi'])
-    @skipIfWindows  # Windows doesn't have signals
-    def test_ignore_signal(self):
-        """Test Python SBUnixSignals.Suppress/Stop/Notify() API."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        line = line_number(
-            "main.cpp",
-            "// Set break point at this line and setup signal ignores.")
-        breakpoint = target.BreakpointCreateByLocation("main.cpp", line)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint")
-
-        unix_signals = process.GetUnixSignals()
-        sigint = unix_signals.GetSignalNumberFromName("SIGINT")
-        unix_signals.SetShouldSuppress(sigint, True)
-        unix_signals.SetShouldStop(sigint, False)
-        unix_signals.SetShouldNotify(sigint, False)
-
-        process.Continue()
-        self.assertTrue(
-            process.state == lldb.eStateExited,
-            "The process should have exited")
-        self.assertTrue(
-            process.GetExitStatus() == 0,
-            "The process should have returned 0")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/signals/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/signals/main.cpp
deleted file mode 100644 (file)
index c4c5a00..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-#include <sys/types.h>
-#if defined(_WIN32)
-#include <windows.h>
-#else
-#include <unistd.h>
-#include <signal.h>
-#endif
-
-// This simple program is to test the lldb Python API related to process.
-
-int main (int argc, char const *argv[])
-{
-#if defined(_WIN32)
-               ::ExitProcess(1);
-#else
-    kill(getpid(), SIGINT); // Set break point at this line and setup signal ignores.
-#endif
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/TestSymbolContext.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/TestSymbolContext.py
deleted file mode 100644 (file)
index 0c1ad83..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-"""
-Test SBSymbolContext APIs.
-"""
-
-from __future__ import print_function
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class SymbolContextAPITestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to of function 'c'.
-        self.line = line_number(
-            'main.c', '// Find the line number of function "c" here.')
-
-    @add_test_categories(['pyapi'])
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
-    def test(self):
-        """Exercise SBSymbolContext API extensively."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create a breakpoint on main.c by name 'c'.
-        breakpoint = target.BreakpointCreateByName('c', 'a.out')
-        #print("breakpoint:", breakpoint)
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Frame #0 should be on self.line.
-        from lldbsuite.test.lldbutil import get_stopped_thread
-        thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint")
-        frame0 = thread.GetFrameAtIndex(0)
-        self.assertTrue(frame0.GetLineEntry().GetLine() == self.line)
-
-        # Now get the SBSymbolContext from this frame.  We want everything. :-)
-        context = frame0.GetSymbolContext(lldb.eSymbolContextEverything)
-        self.assertTrue(context)
-
-        # Get the description of this module.
-        module = context.GetModule()
-        desc = lldbutil.get_description(module)
-        self.expect(desc, "The module should match", exe=False,
-                    substrs=[self.getBuildArtifact("a.out")])
-
-        compileUnit = context.GetCompileUnit()
-        self.expect(
-            str(compileUnit),
-            "The compile unit should match",
-            exe=False,
-            substrs=[self.getSourcePath('main.c')])
-
-        function = context.GetFunction()
-        self.assertTrue(function)
-        #print("function:", function)
-
-        block = context.GetBlock()
-        self.assertTrue(block)
-        #print("block:", block)
-
-        lineEntry = context.GetLineEntry()
-        #print("line entry:", lineEntry)
-        self.expect(
-            lineEntry.GetFileSpec().GetDirectory(),
-            "The line entry should have the correct directory",
-            exe=False,
-            substrs=[self.mydir])
-        self.expect(
-            lineEntry.GetFileSpec().GetFilename(),
-            "The line entry should have the correct filename",
-            exe=False,
-            substrs=['main.c'])
-        self.assertTrue(lineEntry.GetLine() == self.line,
-                        "The line entry's line number should match ")
-
-        symbol = context.GetSymbol()
-        self.assertTrue(
-            function.GetName() == symbol.GetName() and symbol.GetName() == 'c',
-            "The symbol name should be 'c'")
-
-        sc_list = lldb.SBSymbolContextList()
-        sc_list.Append(context)
-        self.assertEqual(len(sc_list), 1)
-        for sc in sc_list:
-            self.assertEqual(lineEntry, sc.GetLineEntry())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/main.c
deleted file mode 100644 (file)
index 4e68fb7..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-// This simple program is to test the lldb Python API SBSymbolContext.
-// When stopped on a frame, we can get the symbol context using the SBFrame API
-// SBFrame.GetSymbolContext().
-
-int a(int);
-int b(int);
-int c(int);
-
-int a(int val)
-{
-    if (val <= 1)
-        return b(val);
-    else if (val >= 3)
-        return c(val);
-
-    return val;
-}
-
-int b(int val)
-{
-    return c(val);
-}
-
-int c(int val)
-{
-    return val + 3; // Find the line number of function "c" here.
-}
-
-int main (int argc, char const *argv[])
-{
-    int A1 = a(1);  // a(1) -> b(1) -> c(1)
-    printf("a(1) returns %d\n", A1);
-    
-    int B2 = b(2);  // b(2) -> c(2)
-    printf("b(2) returns %d\n", B2);
-    
-    int A3 = a(3);  // a(3) -> c(3)
-    printf("a(3) returns %d\n", A3);
-    
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/two-files/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/two-files/Makefile
deleted file mode 100644 (file)
index ccaa0ed..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := file1.cpp file2.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/two-files/TestSymbolContextTwoFiles.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/two-files/TestSymbolContextTwoFiles.py
deleted file mode 100644 (file)
index 27d1b60..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-"""
-Test SBSymbolContext APIs.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class SymbolContextTwoFilesTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(['pyapi'])
-    @expectedFailureAll(oslist=["windows"])
-    def test_lookup_by_address(self):
-        """Test lookup by address in a module with multiple compilation units"""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        module = target.GetModuleAtIndex(0)
-        self.assertTrue(module.IsValid())
-        for symbol_name in ["struct1::f()", "struct2::f()"]:
-            sc_list = module.FindFunctions(symbol_name, lldb.eSymbolTypeCode)
-            self.assertTrue(1, sc_list.GetSize())
-            symbol_address = sc_list.GetContextAtIndex(
-                0).GetSymbol().GetStartAddress()
-            self.assertTrue(symbol_address.IsValid())
-            sc_by_address = module.ResolveSymbolContextForAddress(
-                symbol_address, lldb.eSymbolContextFunction)
-            self.assertEqual(symbol_name,
-                             sc_by_address.GetFunction().GetName())
-
-    @add_test_categories(['pyapi'])
-    def test_ranges_in_multiple_compile_unit(self):
-        """This test verifies that we correctly handle the case when multiple
-        compile unit contains DW_AT_ranges and DW_AT_ranges_base attributes."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        source1 = "file1.cpp"
-        line1 = line_number(source1, '// Break1')
-        breakpoint1 = target.BreakpointCreateByLocation(source1, line1)
-        self.assertIsNotNone(breakpoint1)
-        self.assertTrue(breakpoint1.IsValid())
-
-        source2 = "file2.cpp"
-        line2 = line_number(source2, '// Break2')
-        breakpoint2 = target.BreakpointCreateByLocation(source2, line2)
-        self.assertIsNotNone(breakpoint2)
-        self.assertTrue(breakpoint2.IsValid())
-
-        process = target.LaunchSimple(None, None, self.get_process_working_directory())
-        self.assertIsNotNone(process, PROCESS_IS_VALID)
-
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-            process, breakpoint2)
-        self.assertEqual(len(threads), 1)
-        frame = threads[0].GetFrameAtIndex(0)
-        value = frame.FindVariable("x")
-        self.assertTrue(value.IsValid())
-
-        process.Continue()
-
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-            process, breakpoint1)
-        self.assertEqual(len(threads), 1)
-        frame = threads[0].GetFrameAtIndex(0)
-        value = frame.FindVariable("x")
-        self.assertTrue(value.IsValid())
-
-        process.Continue()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/two-files/decls.h b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/two-files/decls.h
deleted file mode 100644 (file)
index 7c80458..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-struct struct1 {
-  ~struct1();
-  static void f();
-};
-
-struct struct2 {
-  ~struct2();
-  static void f();
-};
-
-int g();
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/two-files/file1.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/two-files/file1.cpp
deleted file mode 100644 (file)
index 327d0fb..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#include "decls.h"
-
-int g() {
-  return 1;
-}
-
-struct1::~struct1() {
-  int x = g(); // Break1
-}
-
-void struct1::f() {}
-
-int main() {
-  struct1::f();
-  struct2::f();
-
-  struct1 s1;
-  struct2 s2;
-
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/two-files/file2.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/two-files/file2.cpp
deleted file mode 100644 (file)
index 109e015..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#include "decls.h"
-
-struct2::~struct2() {
-  int x = g(); // Break2
-}
-
-void struct2::f() {}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/target/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/target/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/target/TestTargetAPI.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/target/TestTargetAPI.py
deleted file mode 100644 (file)
index 6e5be6e..0000000
+++ /dev/null
@@ -1,426 +0,0 @@
-"""
-Test SBTarget APIs.
-"""
-
-from __future__ import print_function
-
-
-import unittest2
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TargetAPITestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to of function 'c'.
-        self.line1 = line_number(
-            'main.c', '// Find the line number for breakpoint 1 here.')
-        self.line2 = line_number(
-            'main.c', '// Find the line number for breakpoint 2 here.')
-        self.line_main = line_number(
-            "main.c", "// Set a break at entry to main.")
-
-    # rdar://problem/9700873
-    # Find global variable value fails for dwarf if inferior not started
-    # (Was CrashTracer: [USER] 1 crash in Python at _lldb.so: lldb_private::MemoryCache::Read + 94)
-    #
-    # It does not segfaults now.  But for dwarf, the variable value is None if
-    # the inferior process does not exist yet.  The radar has been updated.
-    #@unittest232.skip("segmentation fault -- skipping")
-    @add_test_categories(['pyapi'])
-    def test_find_global_variables(self):
-        """Exercise SBTarget.FindGlobalVariables() API."""
-        d = {'EXE': 'b.out'}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.find_global_variables('b.out')
-
-    @add_test_categories(['pyapi'])
-    def test_find_compile_units(self):
-        """Exercise SBTarget.FindCompileUnits() API."""
-        d = {'EXE': 'b.out'}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.find_compile_units(self.getBuildArtifact('b.out'))
-
-    @add_test_categories(['pyapi'])
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
-    def test_find_functions(self):
-        """Exercise SBTarget.FindFunctions() API."""
-        d = {'EXE': 'b.out'}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.find_functions('b.out')
-
-    @add_test_categories(['pyapi'])
-    def test_get_description(self):
-        """Exercise SBTarget.GetDescription() API."""
-        self.build()
-        self.get_description()
-
-    @add_test_categories(['pyapi'])
-    @expectedFailureAll(oslist=["windows"], bugnumber='llvm.org/pr21765')
-    def test_resolve_symbol_context_with_address(self):
-        """Exercise SBTarget.ResolveSymbolContextForAddress() API."""
-        self.build()
-        self.resolve_symbol_context_with_address()
-
-    @add_test_categories(['pyapi'])
-    def test_get_platform(self):
-        d = {'EXE': 'b.out'}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        target = self.create_simple_target('b.out')
-        platform = target.platform
-        self.assertTrue(platform, VALID_PLATFORM)
-
-    @add_test_categories(['pyapi'])
-    def test_get_data_byte_size(self):
-        d = {'EXE': 'b.out'}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        target = self.create_simple_target('b.out')
-        self.assertEqual(target.data_byte_size, 1)
-
-    @add_test_categories(['pyapi'])
-    def test_get_code_byte_size(self):
-        d = {'EXE': 'b.out'}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        target = self.create_simple_target('b.out')
-        self.assertEqual(target.code_byte_size, 1)
-
-    @add_test_categories(['pyapi'])
-    def test_resolve_file_address(self):
-        d = {'EXE': 'b.out'}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        target = self.create_simple_target('b.out')
-
-        # find the file address in the .data section of the main
-        # module
-        data_section = self.find_data_section(target)
-        data_section_addr = data_section.file_addr
-
-        # resolve the above address, and compare the address produced
-        # by the resolution against the original address/section
-        res_file_addr = target.ResolveFileAddress(data_section_addr)
-        self.assertTrue(res_file_addr.IsValid())
-
-        self.assertEqual(data_section_addr, res_file_addr.file_addr)
-
-        data_section2 = res_file_addr.section
-        self.assertIsNotNone(data_section2)
-        self.assertEqual(data_section.name, data_section2.name)
-
-    @add_test_categories(['pyapi'])
-    def test_read_memory(self):
-        d = {'EXE': 'b.out'}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        target = self.create_simple_target('b.out')
-
-        breakpoint = target.BreakpointCreateByLocation(
-            "main.c", self.line_main)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Put debugger into synchronous mode so when we target.LaunchSimple returns
-        # it will guaranteed to be at the breakpoint
-        self.dbg.SetAsync(False)
-
-        # Launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        # find the file address in the .data section of the main
-        # module
-        data_section = self.find_data_section(target)
-        sb_addr = lldb.SBAddress(data_section, 0)
-        error = lldb.SBError()
-        content = target.ReadMemory(sb_addr, 1, error)
-        self.assertTrue(error.Success(), "Make sure memory read succeeded")
-        self.assertEqual(len(content), 1)
-
-    def create_simple_target(self, fn):
-        exe = self.getBuildArtifact(fn)
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-        return target
-
-    def find_data_section(self, target):
-        mod = target.GetModuleAtIndex(0)
-        data_section = None
-        for s in mod.sections:
-            sect_type = s.GetSectionType()
-            if sect_type == lldb.eSectionTypeData:
-                data_section = s
-                break
-            elif sect_type == lldb.eSectionTypeContainer:
-                for i in range(s.GetNumSubSections()):
-                    ss = s.GetSubSectionAtIndex(i)
-                    sect_type = ss.GetSectionType()
-                    if sect_type == lldb.eSectionTypeData:
-                        data_section = ss
-                        break
-
-        self.assertIsNotNone(data_section)
-        return data_section
-
-    def find_global_variables(self, exe_name):
-        """Exercise SBTaget.FindGlobalVariables() API."""
-        exe = self.getBuildArtifact(exe_name)
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # rdar://problem/9700873
-        # Find global variable value fails for dwarf if inferior not started
-        # (Was CrashTracer: [USER] 1 crash in Python at _lldb.so: lldb_private::MemoryCache::Read + 94)
-        #
-        # Remove the lines to create a breakpoint and to start the inferior
-        # which are workarounds for the dwarf case.
-
-        breakpoint = target.BreakpointCreateByLocation('main.c', self.line1)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-        # Make sure we hit our breakpoint:
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint(
-            process, breakpoint)
-        self.assertTrue(len(thread_list) == 1)
-
-        value_list = target.FindGlobalVariables(
-            'my_global_var_of_char_type', 3)
-        self.assertTrue(value_list.GetSize() == 1)
-        my_global_var = value_list.GetValueAtIndex(0)
-        self.DebugSBValue(my_global_var)
-        self.assertTrue(my_global_var)
-        self.expect(my_global_var.GetName(), exe=False,
-                    startstr="my_global_var_of_char_type")
-        self.expect(my_global_var.GetTypeName(), exe=False,
-                    startstr="char")
-        self.expect(my_global_var.GetValue(), exe=False,
-                    startstr="'X'")
-
-        # While we are at it, let's also exercise the similar
-        # SBModule.FindGlobalVariables() API.
-        for m in target.module_iter():
-            if os.path.normpath(m.GetFileSpec().GetDirectory()) == self.getBuildDir() and m.GetFileSpec().GetFilename() == exe_name:
-                value_list = m.FindGlobalVariables(
-                    target, 'my_global_var_of_char_type', 3)
-                self.assertTrue(value_list.GetSize() == 1)
-                self.assertTrue(
-                    value_list.GetValueAtIndex(0).GetValue() == "'X'")
-                break
-
-    def find_compile_units(self, exe):
-        """Exercise SBTarget.FindCompileUnits() API."""
-        source_name = "main.c"
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        list = target.FindCompileUnits(lldb.SBFileSpec(source_name, False))
-        # Executable has been built just from one source file 'main.c',
-        # so we may check only the first element of list.
-        self.assertTrue(
-            list[0].GetCompileUnit().GetFileSpec().GetFilename() == source_name)
-
-    def find_functions(self, exe_name):
-        """Exercise SBTaget.FindFunctions() API."""
-        exe = self.getBuildArtifact(exe_name)
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        list = target.FindFunctions('c', lldb.eFunctionNameTypeAuto)
-        self.assertTrue(list.GetSize() == 1)
-
-        for sc in list:
-            self.assertTrue(
-                sc.GetModule().GetFileSpec().GetFilename() == exe_name)
-            self.assertTrue(sc.GetSymbol().GetName() == 'c')
-
-    def get_description(self):
-        """Exercise SBTaget.GetDescription() API."""
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        from lldbsuite.test.lldbutil import get_description
-
-        # get_description() allows no option to mean
-        # lldb.eDescriptionLevelBrief.
-        desc = get_description(target)
-        #desc = get_description(target, option=lldb.eDescriptionLevelBrief)
-        if not desc:
-            self.fail("SBTarget.GetDescription() failed")
-        self.expect(desc, exe=False,
-                    substrs=['a.out'])
-        self.expect(desc, exe=False, matching=False,
-                    substrs=['Target', 'Module', 'Breakpoint'])
-
-        desc = get_description(target, option=lldb.eDescriptionLevelFull)
-        if not desc:
-            self.fail("SBTarget.GetDescription() failed")
-        self.expect(desc, exe=False,
-                    substrs=['a.out', 'Target', 'Module', 'Breakpoint'])
-
-    @not_remote_testsuite_ready
-    @add_test_categories(['pyapi'])
-    @no_debug_info_test
-    def test_launch_new_process_and_redirect_stdout(self):
-        """Exercise SBTaget.Launch() API with redirected stdout."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Add an extra twist of stopping the inferior in a breakpoint, and then continue till it's done.
-        # We should still see the entire stdout redirected once the process is
-        # finished.
-        line = line_number('main.c', '// a(3) -> c(3)')
-        breakpoint = target.BreakpointCreateByLocation('main.c', line)
-
-        # Now launch the process, do not stop at entry point, and redirect stdout to "stdout.txt" file.
-        # The inferior should run to completion after "process.Continue()"
-        # call.
-        local_path = self.getBuildArtifact("stdout.txt")
-        if os.path.exists(local_path):
-            os.remove(local_path)
-
-        if lldb.remote_platform:
-            stdout_path = lldbutil.append_to_process_working_directory(self,
-                "lldb-stdout-redirect.txt")
-        else:
-            stdout_path = local_path
-        error = lldb.SBError()
-        process = target.Launch(
-            self.dbg.GetListener(),
-            None,
-            None,
-            None,
-            stdout_path,
-            None,
-            None,
-            0,
-            False,
-            error)
-        process.Continue()
-        #self.runCmd("process status")
-        if lldb.remote_platform:
-            # copy output file to host
-            lldb.remote_platform.Get(
-                lldb.SBFileSpec(stdout_path),
-                lldb.SBFileSpec(local_path))
-
-        # The 'stdout.txt' file should now exist.
-        self.assertTrue(
-            os.path.isfile(local_path),
-            "'stdout.txt' exists due to redirected stdout via SBTarget.Launch() API.")
-
-        # Read the output file produced by running the program.
-        with open(local_path, 'r') as f:
-            output = f.read()
-
-        self.expect(output, exe=False,
-                    substrs=["a(1)", "b(2)", "a(3)"])
-
-    def resolve_symbol_context_with_address(self):
-        """Exercise SBTaget.ResolveSymbolContextForAddress() API."""
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create the two breakpoints inside function 'a'.
-        breakpoint1 = target.BreakpointCreateByLocation('main.c', self.line1)
-        breakpoint2 = target.BreakpointCreateByLocation('main.c', self.line2)
-        #print("breakpoint1:", breakpoint1)
-        #print("breakpoint2:", breakpoint2)
-        self.assertTrue(breakpoint1 and
-                        breakpoint1.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-        self.assertTrue(breakpoint2 and
-                        breakpoint2.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Frame #0 should be on self.line1.
-        self.assertTrue(process.GetState() == lldb.eStateStopped)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint condition")
-        #self.runCmd("process status")
-        frame0 = thread.GetFrameAtIndex(0)
-        lineEntry = frame0.GetLineEntry()
-        self.assertTrue(lineEntry.GetLine() == self.line1)
-
-        address1 = lineEntry.GetStartAddress()
-
-        # Continue the inferior, the breakpoint 2 should be hit.
-        process.Continue()
-        self.assertTrue(process.GetState() == lldb.eStateStopped)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint condition")
-        #self.runCmd("process status")
-        frame0 = thread.GetFrameAtIndex(0)
-        lineEntry = frame0.GetLineEntry()
-        self.assertTrue(lineEntry.GetLine() == self.line2)
-
-        address2 = lineEntry.GetStartAddress()
-
-        #print("address1:", address1)
-        #print("address2:", address2)
-
-        # Now call SBTarget.ResolveSymbolContextForAddress() with the addresses
-        # from our line entry.
-        context1 = target.ResolveSymbolContextForAddress(
-            address1, lldb.eSymbolContextEverything)
-        context2 = target.ResolveSymbolContextForAddress(
-            address2, lldb.eSymbolContextEverything)
-
-        self.assertTrue(context1 and context2)
-        #print("context1:", context1)
-        #print("context2:", context2)
-
-        # Verify that the context point to the same function 'a'.
-        symbol1 = context1.GetSymbol()
-        symbol2 = context2.GetSymbol()
-        self.assertTrue(symbol1 and symbol2)
-        #print("symbol1:", symbol1)
-        #print("symbol2:", symbol2)
-
-        from lldbsuite.test.lldbutil import get_description
-        desc1 = get_description(symbol1)
-        desc2 = get_description(symbol2)
-        self.assertTrue(desc1 and desc2 and desc1 == desc2,
-                        "The two addresses should resolve to the same symbol")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/target/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/target/main.c
deleted file mode 100644 (file)
index d075f2c..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-// This simple program is to test the lldb Python API SBTarget.
-//
-// When stopped on breakppint 1, and then 2, we can get the line entries using
-// SBFrame API SBFrame.GetLineEntry().  We'll get the start addresses for the
-// two line entries; with the start address (of SBAddress type), we can then
-// resolve the symbol context using the SBTarget API
-// SBTarget.ResolveSymbolContextForAddress().
-//
-// The two symbol context should point to the same symbol, i.e., 'a' function.
-
-char my_global_var_of_char_type = 'X'; // Test SBTarget.FindGlobalVariables(...).
-
-int a(int);
-int b(int);
-int c(int);
-
-int a(int val)
-{
-    if (val <= 1) // Find the line number for breakpoint 1 here.
-        val = b(val);
-    else if (val >= 3)
-        val = c(val);
-
-    return val; // Find the line number for breakpoint 2 here.
-}
-
-int b(int val)
-{
-    return c(val);
-}
-
-int c(int val)
-{
-    return val + 3;
-}
-
-int main (int argc, char const *argv[])
-{
-    // Set a break at entry to main.
-    int A1 = a(1);  // a(1) -> b(1) -> c(1)
-    printf("a(1) returns %d\n", A1);
-    
-    int B2 = b(2);  // b(2) -> c(2)
-    printf("b(2) returns %d\n", B2);
-    
-    int A3 = a(3);  // a(3) -> c(3)
-    printf("a(3) returns %d\n", A3);
-    
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/thread/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/thread/Makefile
deleted file mode 100644 (file)
index 30749db..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES ?= main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/thread/TestThreadAPI.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/thread/TestThreadAPI.py
deleted file mode 100644 (file)
index 9124138..0000000
+++ /dev/null
@@ -1,282 +0,0 @@
-"""
-Test SBThread APIs.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-from lldbsuite.test.lldbutil import get_stopped_thread, get_caller_symbol
-
-
-class ThreadAPITestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(['pyapi'])
-    def test_get_process(self):
-        """Test Python SBThread.GetProcess() API."""
-        self.build()
-        self.get_process()
-
-    @add_test_categories(['pyapi'])
-    def test_get_stop_description(self):
-        """Test Python SBThread.GetStopDescription() API."""
-        self.build()
-        self.get_stop_description()
-
-    @add_test_categories(['pyapi'])
-    def test_run_to_address(self):
-        """Test Python SBThread.RunToAddress() API."""
-        # We build a different executable than the default build() does.
-        d = {'CXX_SOURCES': 'main2.cpp', 'EXE': self.exe_name}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.run_to_address(self.exe_name)
-
-    @add_test_categories(['pyapi'])
-    @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr20476')
-    @expectedFailureAll(oslist=["windows"])
-    @expectedFailureNetBSD
-    def test_step_out_of_malloc_into_function_b(self):
-        """Test Python SBThread.StepOut() API to step out of a malloc call where the call site is at function b()."""
-        # We build a different executable than the default build() does.
-        d = {'CXX_SOURCES': 'main2.cpp', 'EXE': self.exe_name}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.step_out_of_malloc_into_function_b(self.exe_name)
-
-    @add_test_categories(['pyapi'])
-    def test_step_over_3_times(self):
-        """Test Python SBThread.StepOver() API."""
-        # We build a different executable than the default build() does.
-        d = {'CXX_SOURCES': 'main2.cpp', 'EXE': self.exe_name}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.step_over_3_times(self.exe_name)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number within main.cpp to break inside main().
-        self.break_line = line_number(
-            "main.cpp", "// Set break point at this line and check variable 'my_char'.")
-        # Find the line numbers within main2.cpp for
-        # step_out_of_malloc_into_function_b() and step_over_3_times().
-        self.step_out_of_malloc = line_number(
-            "main2.cpp", "// thread step-out of malloc into function b.")
-        self.after_3_step_overs = line_number(
-            "main2.cpp", "// we should reach here after 3 step-over's.")
-
-        # We'll use the test method name as the exe_name for executable
-        # comppiled from main2.cpp.
-        self.exe_name = self.testMethodName
-
-    def get_process(self):
-        """Test Python SBThread.GetProcess() API."""
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        breakpoint = target.BreakpointCreateByLocation(
-            "main.cpp", self.break_line)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-        self.runCmd("breakpoint list")
-
-        # Launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint")
-        self.runCmd("process status")
-
-        proc_of_thread = thread.GetProcess()
-        #print("proc_of_thread:", proc_of_thread)
-        self.assertTrue(proc_of_thread.GetProcessID()
-                        == process.GetProcessID())
-
-    def get_stop_description(self):
-        """Test Python SBThread.GetStopDescription() API."""
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        breakpoint = target.BreakpointCreateByLocation(
-            "main.cpp", self.break_line)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-        #self.runCmd("breakpoint list")
-
-        # Launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint")
-
-        # Get the stop reason. GetStopDescription expects that we pass in the size of the description
-        # we expect plus an additional byte for the null terminator.
-
-        # Test with a buffer that is exactly as large as the expected stop reason.
-        self.assertEqual("breakpoint 1.1", thread.GetStopDescription(len('breakpoint 1.1') + 1))
-
-        # Test some smaller buffer sizes.
-        self.assertEqual("breakpoint", thread.GetStopDescription(len('breakpoint') + 1))
-        self.assertEqual("break", thread.GetStopDescription(len('break') + 1))
-        self.assertEqual("b", thread.GetStopDescription(len('b') + 1))
-
-        # Test that we can pass in a much larger size and still get the right output.
-        self.assertEqual("breakpoint 1.1", thread.GetStopDescription(len('breakpoint 1.1') + 100))
-
-    def step_out_of_malloc_into_function_b(self, exe_name):
-        """Test Python SBThread.StepOut() API to step out of a malloc call where the call site is at function b()."""
-        exe = self.getBuildArtifact(exe_name)
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        breakpoint = target.BreakpointCreateByName('malloc')
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        while True:
-            thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
-            self.assertTrue(
-                thread.IsValid(),
-                "There should be a thread stopped due to breakpoint")
-            caller_symbol = get_caller_symbol(thread)
-            if not caller_symbol:
-                self.fail(
-                    "Test failed: could not locate the caller symbol of malloc")
-
-            # Our top frame may be an inlined function in malloc() (e.g., on
-            # FreeBSD).  Apply a simple heuristic of stepping out until we find
-            # a non-malloc caller
-            while caller_symbol.startswith("malloc"):
-                thread.StepOut()
-                self.assertTrue(thread.IsValid(),
-                                "Thread valid after stepping to outer malloc")
-                caller_symbol = get_caller_symbol(thread)
-
-            if caller_symbol == "b(int)":
-                break
-            process.Continue()
-
-        # On Linux malloc calls itself in some case. Remove the breakpoint because we don't want
-        # to hit it during step-out.
-        target.BreakpointDelete(breakpoint.GetID())
-
-        thread.StepOut()
-        self.runCmd("thread backtrace")
-        self.assertTrue(
-            thread.GetFrameAtIndex(0).GetLineEntry().GetLine() == self.step_out_of_malloc,
-            "step out of malloc into function b is successful")
-
-    def step_over_3_times(self, exe_name):
-        """Test Python SBThread.StepOver() API."""
-        exe = self.getBuildArtifact(exe_name)
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        breakpoint = target.BreakpointCreateByLocation(
-            'main2.cpp', self.step_out_of_malloc)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-        self.runCmd("breakpoint list")
-
-        # Launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Frame #0 should be on self.step_out_of_malloc.
-        self.assertTrue(process.GetState() == lldb.eStateStopped)
-        thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint condition")
-        self.runCmd("thread backtrace")
-        frame0 = thread.GetFrameAtIndex(0)
-        lineEntry = frame0.GetLineEntry()
-        self.assertTrue(lineEntry.GetLine() == self.step_out_of_malloc)
-
-        thread.StepOver()
-        thread.StepOver()
-        thread.StepOver()
-        self.runCmd("thread backtrace")
-
-        # Verify that we are stopped at the correct source line number in
-        # main2.cpp.
-        frame0 = thread.GetFrameAtIndex(0)
-        lineEntry = frame0.GetLineEntry()
-        self.assertTrue(thread.GetStopReason() == lldb.eStopReasonPlanComplete)
-        # Expected failure with clang as the compiler.
-        # rdar://problem/9223880
-        #
-        # Which has been fixed on the lldb by compensating for inaccurate line
-        # table information with r140416.
-        self.assertTrue(lineEntry.GetLine() == self.after_3_step_overs)
-
-    def run_to_address(self, exe_name):
-        """Test Python SBThread.RunToAddress() API."""
-        exe = self.getBuildArtifact(exe_name)
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        breakpoint = target.BreakpointCreateByLocation(
-            'main2.cpp', self.step_out_of_malloc)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-        self.runCmd("breakpoint list")
-
-        # Launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Frame #0 should be on self.step_out_of_malloc.
-        self.assertTrue(process.GetState() == lldb.eStateStopped)
-        thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint condition")
-        self.runCmd("thread backtrace")
-        frame0 = thread.GetFrameAtIndex(0)
-        lineEntry = frame0.GetLineEntry()
-        self.assertTrue(lineEntry.GetLine() == self.step_out_of_malloc)
-
-        # Get the start/end addresses for this line entry.
-        start_addr = lineEntry.GetStartAddress().GetLoadAddress(target)
-        end_addr = lineEntry.GetEndAddress().GetLoadAddress(target)
-        if self.TraceOn():
-            print("start addr:", hex(start_addr))
-            print("end addr:", hex(end_addr))
-
-        # Disable the breakpoint.
-        self.assertTrue(target.DisableAllBreakpoints())
-        self.runCmd("breakpoint list")
-
-        thread.StepOver()
-        thread.StepOver()
-        thread.StepOver()
-        self.runCmd("thread backtrace")
-
-        # Now ask SBThread to run to the address 'start_addr' we got earlier, which
-        # corresponds to self.step_out_of_malloc line entry's start address.
-        thread.RunToAddress(start_addr)
-        self.runCmd("process status")
-        #self.runCmd("thread backtrace")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/thread/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/thread/main.cpp
deleted file mode 100644 (file)
index 01c8404..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-// This simple program is to test the lldb Python API related to thread.
-
-char my_char = 'u';
-int my_int = 0;
-
-int main (int argc, char const *argv[])
-{
-    for (int i = 0; i < 3; ++i) {
-        printf("my_char='%c'\n", my_char);
-        ++my_char;
-    }
-
-    printf("after the loop: my_char='%c'\n", my_char); // 'my_char' should print out as 'x'.
-
-    return 0; // Set break point at this line and check variable 'my_char'.
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/thread/main2.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/thread/main2.cpp
deleted file mode 100644 (file)
index 57c485c..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-#include <stdlib.h>
-
-int a(int);
-int b(int);
-int c(int);
-
-int a(int val)
-{
-    if (val <= 1)
-        return b(val);
-    else if (val >= 3)
-        return c(val);
-
-    return val;
-}
-
-int b(int val)
-{
-    int rc = c(val);
-    void *ptr = malloc(1024); // thread step-out of malloc into function b.
-    if (!ptr)
-        return -1;
-    else
-        printf("ptr=%p\n", ptr);
-    return rc;                // we should reach here after 3 step-over's.
-}
-
-int c(int val)
-{
-    return val + 3;
-}
-
-int main (int argc, char const *argv[])
-{
-    int A1 = a(1);
-    printf("a(1) returns %d\n", A1);
-    
-    int B2 = b(2);
-    printf("b(2) returns %d\n", B2);
-    
-    int A3 = a(3);
-    printf("a(3) returns %d\n", A3);
-    
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/type/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/type/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/type/TestTypeList.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/type/TestTypeList.py
deleted file mode 100644 (file)
index 75a793a..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-"""
-Test SBType and SBTypeList API.
-"""
-
-from __future__ import print_function
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TypeAndTypeListTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # We'll use the test method name as the exe_name.
-        self.exe_name = self.testMethodName
-        # Find the line number to break at.
-        self.source = 'main.cpp'
-        self.line = line_number(self.source, '// Break at this line')
-
-    @add_test_categories(['pyapi'])
-    def test(self):
-        """Exercise SBType and SBTypeList API."""
-        d = {'EXE': self.exe_name}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        exe = self.getBuildArtifact(self.exe_name)
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Create the breakpoint inside function 'main'.
-        breakpoint = target.BreakpointCreateByLocation(self.source, self.line)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Get Frame #0.
-        self.assertTrue(process.GetState() == lldb.eStateStopped)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint condition")
-        frame0 = thread.GetFrameAtIndex(0)
-
-        # Get the type 'Task'.
-        type_list = target.FindTypes('Task')
-        if self.TraceOn():
-            print(
-                "Size of type_list from target.FindTypes('Task') query: %d" %
-                type_list.GetSize())
-        # a second Task make be scared up by the Objective-C runtime
-        self.assertTrue(len(type_list) >= 1)
-        for type in type_list:
-            self.assertTrue(type)
-            self.DebugSBType(type)
-            self.assertFalse(type.IsAnonymousType(), "Task is not anonymous")
-            for field in type.fields:
-                if field.name == "type":
-                    for enum_member in field.type.enum_members:
-                        self.assertTrue(enum_member)
-                        self.DebugSBType(enum_member.type)
-                elif field.name == "my_type_is_nameless":
-                    self.assertFalse(
-                        field.type.IsAnonymousType(),
-                        "my_type_is_nameless is not an anonymous type")
-                elif field.name == "my_type_is_named":
-                    self.assertFalse(
-                        field.type.IsAnonymousType(),
-                        "my_type_is_named has a named type")
-                elif field.name == None:
-                    self.assertTrue(
-                        field.type.IsAnonymousType(),
-                        "Nameless type is not anonymous")
-
-        # Pass an empty string.  LLDB should not crash. :-)
-        fuzz_types = target.FindTypes(None)
-        fuzz_type = target.FindFirstType(None)
-
-        # Now use the SBTarget.FindFirstType() API to find 'Task'.
-        task_type = target.FindFirstType('Task')
-        self.assertTrue(task_type)
-        self.DebugSBType(task_type)
-
-        # Get the reference type of 'Task', just for fun.
-        task_ref_type = task_type.GetReferenceType()
-        self.assertTrue(task_ref_type)
-        self.DebugSBType(task_ref_type)
-
-        # Get the pointer type of 'Task', which is the same as task_head's
-        # type.
-        task_pointer_type = task_type.GetPointerType()
-        self.assertTrue(task_pointer_type)
-        self.DebugSBType(task_pointer_type)
-
-        # Get variable 'task_head'.
-        task_head = frame0.FindVariable('task_head')
-        self.assertTrue(task_head, VALID_VARIABLE)
-        self.DebugSBValue(task_head)
-        task_head_type = task_head.GetType()
-        self.DebugSBType(task_head_type)
-        self.assertTrue(task_head_type.IsPointerType())
-
-        self.assertTrue(task_head_type == task_pointer_type)
-
-        # Get the pointee type of 'task_head'.
-        task_head_pointee_type = task_head_type.GetPointeeType()
-        self.DebugSBType(task_head_pointee_type)
-
-        self.assertTrue(task_type == task_head_pointee_type)
-
-        # We'll now get the child member 'id' from 'task_head'.
-        id = task_head.GetChildMemberWithName('id')
-        self.DebugSBValue(id)
-        id_type = id.GetType()
-        self.DebugSBType(id_type)
-
-        # SBType.GetBasicType() takes an enum 'BasicType'
-        # (lldb-enumerations.h).
-        int_type = id_type.GetBasicType(lldb.eBasicTypeInt)
-        self.assertTrue(id_type == int_type)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/type/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/type/main.cpp
deleted file mode 100644 (file)
index b43b617..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-class Task {
-public:
-    int id;
-    Task *next;
-    enum {
-        TASK_TYPE_1,
-        TASK_TYPE_2
-    } type;
-    // This struct is anonymous b/c it does not have a name
-    // and it is not unnamed class.
-    // Anonymous classes are a GNU extension.
-    struct {
-      int y;
-    };
-    // This struct is an unnamed class see [class.pre]p1
-    // http://eel.is/c++draft/class#pre-1.sentence-6
-    struct {
-      int x;
-    } my_type_is_nameless;
-    struct name {
-      int x;
-    } my_type_is_named;
-    Task(int i, Task *n):
-        id(i),
-        next(n),
-        type(TASK_TYPE_1)
-    {}
-};
-
-
-int main (int argc, char const *argv[])
-{
-    Task *task_head = new Task(-1, NULL);
-    Task *task1 = new Task(1, NULL);
-    Task *task2 = new Task(2, NULL);
-    Task *task3 = new Task(3, NULL); // Orphaned.
-    Task *task4 = new Task(4, NULL);
-    Task *task5 = new Task(5, NULL);
-
-    task_head->next = task1;
-    task1->next = task2;
-    task2->next = task4;
-    task4->next = task5;
-
-    int total = 0;
-    Task *t = task_head;
-    while (t != NULL) {
-        if (t->id >= 0)
-            ++total;
-        t = t->next;
-    }
-    printf("We have a total number of %d tasks\n", total);
-
-    // This corresponds to an empty task list.
-    Task *empty_task_head = new Task(-1, NULL);
-
-    return 0; // Break at this line
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py
deleted file mode 100644 (file)
index bf8cbe3..0000000
+++ /dev/null
@@ -1,193 +0,0 @@
-"""
-Test some SBValue APIs.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ValueAPITestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # We'll use the test method name as the exe_name.
-        self.exe_name = self.testMethodName
-        # Find the line number to of function 'c'.
-        self.line = line_number('main.c', '// Break at this line')
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24772")
-    @add_test_categories(['pyapi'])
-    def test(self):
-        """Exercise some SBValue APIs."""
-        d = {'EXE': self.exe_name}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        exe = self.getBuildArtifact(self.exe_name)
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Create the breakpoint inside function 'main'.
-        breakpoint = target.BreakpointCreateByLocation('main.c', self.line)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Get Frame #0.
-        self.assertTrue(process.GetState() == lldb.eStateStopped)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint condition")
-        frame0 = thread.GetFrameAtIndex(0)
-
-        # Get global variable 'days_of_week'.
-        list = target.FindGlobalVariables('days_of_week', 1)
-        days_of_week = list.GetValueAtIndex(0)
-        self.assertTrue(days_of_week, VALID_VARIABLE)
-        self.assertEqual(days_of_week.GetNumChildren(), 7, VALID_VARIABLE)
-        self.DebugSBValue(days_of_week)
-
-        # Use this to test the "child" and "children" accessors:
-        children = days_of_week.children
-        self.assertEqual(len(children), 7, VALID_VARIABLE)
-        for i in range(0, len(children)):
-            day = days_of_week.child[i]
-            list_day = children[i]
-            self.assertNotEqual(day, None)
-            self.assertNotEqual(list_day, None)
-            self.assertEqual(day.GetSummary(), list_day.GetSummary(), VALID_VARIABLE)
-
-        # Spot check the actual value:
-        first_day = days_of_week.child[1]
-        self.assertEqual(first_day.GetSummary(), '"Monday"', VALID_VARIABLE)
-
-        # Get global variable 'weekdays'.
-        list = target.FindGlobalVariables('weekdays', 1)
-        weekdays = list.GetValueAtIndex(0)
-        self.assertTrue(weekdays, VALID_VARIABLE)
-        self.assertTrue(weekdays.GetNumChildren() == 5, VALID_VARIABLE)
-        self.DebugSBValue(weekdays)
-
-        # Get global variable 'g_table'.
-        list = target.FindGlobalVariables('g_table', 1)
-        g_table = list.GetValueAtIndex(0)
-        self.assertTrue(g_table, VALID_VARIABLE)
-        self.assertTrue(g_table.GetNumChildren() == 2, VALID_VARIABLE)
-        self.DebugSBValue(g_table)
-
-        fmt = lldbutil.BasicFormatter()
-        cvf = lldbutil.ChildVisitingFormatter(indent_child=2)
-        rdf = lldbutil.RecursiveDecentFormatter(indent_child=2)
-        if self.TraceOn():
-            print(fmt.format(days_of_week))
-            print(cvf.format(days_of_week))
-            print(cvf.format(weekdays))
-            print(rdf.format(g_table))
-
-        # Get variable 'my_int_ptr'.
-        value = frame0.FindVariable('my_int_ptr')
-        self.assertTrue(value, VALID_VARIABLE)
-        self.DebugSBValue(value)
-
-        # Get what 'my_int_ptr' points to.
-        pointed = value.GetChildAtIndex(0)
-        self.assertTrue(pointed, VALID_VARIABLE)
-        self.DebugSBValue(pointed)
-
-        # While we are at it, verify that 'my_int_ptr' points to 'g_my_int'.
-        symbol = target.ResolveLoadAddress(
-            int(pointed.GetLocation(), 0)).GetSymbol()
-        self.assertTrue(symbol)
-        self.expect(symbol.GetName(), exe=False,
-                    startstr='g_my_int')
-
-        # Get variable 'str_ptr'.
-        value = frame0.FindVariable('str_ptr')
-        self.assertTrue(value, VALID_VARIABLE)
-        self.DebugSBValue(value)
-
-        # SBValue::TypeIsPointerType() should return true.
-        self.assertTrue(value.TypeIsPointerType())
-
-        # Verify the SBValue::GetByteSize() API is working correctly.
-        arch = self.getArchitecture()
-        if arch == 'i386':
-            self.assertTrue(value.GetByteSize() == 4)
-        elif arch == 'x86_64':
-            self.assertTrue(value.GetByteSize() == 8)
-
-        # Get child at index 5 => 'Friday'.
-        child = value.GetChildAtIndex(5, lldb.eNoDynamicValues, True)
-        self.assertTrue(child, VALID_VARIABLE)
-        self.DebugSBValue(child)
-
-        self.expect(child.GetSummary(), exe=False,
-                    substrs=['Friday'])
-
-        # Now try to get at the same variable using GetValueForExpressionPath().
-        # These two SBValue objects should have the same value.
-        val2 = value.GetValueForExpressionPath('[5]')
-        self.assertTrue(val2, VALID_VARIABLE)
-        self.DebugSBValue(val2)
-        self.assertTrue(child.GetValue() == val2.GetValue() and
-                        child.GetSummary() == val2.GetSummary())
-
-        val_i = target.EvaluateExpression('i')
-        val_s = target.EvaluateExpression('s')
-        val_a = target.EvaluateExpression('a')
-        self.assertTrue(
-            val_s.GetChildMemberWithName('a').GetAddress().IsValid(),
-            VALID_VARIABLE)
-        self.assertTrue(
-            val_s.GetChildMemberWithName('a').AddressOf(),
-            VALID_VARIABLE)
-        self.assertTrue(
-            val_a.Cast(
-                val_i.GetType()).AddressOf(),
-            VALID_VARIABLE)
-
-        # Check that lldb.value implements truth testing.
-        self.assertFalse(lldb.value(frame0.FindVariable('bogus')))
-        self.assertTrue(lldb.value(frame0.FindVariable('uinthex')))
-
-        self.assertTrue(int(lldb.value(frame0.FindVariable('uinthex')))
-                        == 3768803088, 'uinthex == 3768803088')
-        self.assertTrue(int(lldb.value(frame0.FindVariable('sinthex')))
-                        == -526164208, 'sinthex == -526164208')
-
-        # Check value_iter works correctly.
-        for v in [
-                lldb.value(frame0.FindVariable('uinthex')),
-                lldb.value(frame0.FindVariable('sinthex'))
-        ]:
-            self.assertTrue(v)
-
-        self.assertTrue(
-            frame0.FindVariable('uinthex').GetValueAsUnsigned() == 3768803088,
-            'unsigned uinthex == 3768803088')
-        self.assertTrue(
-            frame0.FindVariable('sinthex').GetValueAsUnsigned() == 3768803088,
-            'unsigned sinthex == 3768803088')
-
-        self.assertTrue(
-            frame0.FindVariable('uinthex').GetValueAsSigned() == -
-            526164208,
-            'signed uinthex == -526164208')
-        self.assertTrue(
-            frame0.FindVariable('sinthex').GetValueAsSigned() == -
-            526164208,
-            'signed sinthex == -526164208')
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/change_values/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/change_values/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/change_values/TestChangeValueAPI.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/change_values/TestChangeValueAPI.py
deleted file mode 100644 (file)
index 6f0dee2..0000000
+++ /dev/null
@@ -1,181 +0,0 @@
-"""
-Test some SBValue APIs.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ChangeValueAPITestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # We'll use the test method name as the exe_name.
-        self.exe_name = self.testMethodName
-        # Find the line number to of function 'c'.
-        self.line = line_number('main.c', '// Stop here and set values')
-        self.check_line = line_number(
-            'main.c', '// Stop here and check values')
-        self.end_line = line_number(
-            'main.c', '// Set a breakpoint here at the end')
-
-    @add_test_categories(['pyapi'])
-    @expectedFlakeyLinux("llvm.org/pr25652")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24772")
-    def test_change_value(self):
-        """Exercise the SBValue::SetValueFromCString API."""
-        d = {'EXE': self.exe_name}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        exe = self.getBuildArtifact(self.exe_name)
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Create the breakpoint inside function 'main'.
-        breakpoint = target.BreakpointCreateByLocation('main.c', self.line)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Create the breakpoint inside the function 'main'
-        check_breakpoint = target.BreakpointCreateByLocation(
-            'main.c', self.check_line)
-        self.assertTrue(check_breakpoint, VALID_BREAKPOINT)
-
-        # Create the breakpoint inside function 'main'.
-        end_breakpoint = target.BreakpointCreateByLocation(
-            'main.c', self.end_line)
-        self.assertTrue(end_breakpoint, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Get Frame #0.
-        self.assertTrue(process.GetState() == lldb.eStateStopped)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint condition")
-        frame0 = thread.GetFrameAtIndex(0)
-        self.assertTrue(frame0.IsValid(), "Got a valid frame.")
-
-        # Get the val variable and change it:
-        error = lldb.SBError()
-
-        val_value = frame0.FindVariable("val")
-        self.assertTrue(val_value.IsValid(), "Got the SBValue for val")
-        actual_value = val_value.GetValueAsSigned(error, 0)
-        self.assertTrue(error.Success(), "Got a value from val")
-        self.assertTrue(actual_value == 100, "Got the right value from val")
-
-        result = val_value.SetValueFromCString("12345")
-        self.assertTrue(result, "Setting val returned True.")
-        actual_value = val_value.GetValueAsSigned(error, 0)
-        self.assertTrue(error.Success(), "Got a changed value from val")
-        self.assertTrue(
-            actual_value == 12345,
-            "Got the right changed value from val")
-
-        # Now check that we can set a structure element:
-
-        mine_value = frame0.FindVariable("mine")
-        self.assertTrue(mine_value.IsValid(), "Got the SBValue for mine")
-
-        mine_second_value = mine_value.GetChildMemberWithName("second_val")
-        self.assertTrue(
-            mine_second_value.IsValid(),
-            "Got second_val from mine")
-        actual_value = mine_second_value.GetValueAsUnsigned(error, 0)
-        self.assertTrue(
-            error.Success(),
-            "Got an unsigned value for second_val")
-        self.assertTrue(actual_value == 5555)
-
-        result = mine_second_value.SetValueFromCString("98765")
-        self.assertTrue(result, "Success setting mine.second_value.")
-        actual_value = mine_second_value.GetValueAsSigned(error, 0)
-        self.assertTrue(
-            error.Success(),
-            "Got a changed value from mine.second_val")
-        self.assertTrue(actual_value == 98765,
-                        "Got the right changed value from mine.second_val")
-
-        # Next do the same thing with the pointer version.
-        ptr_value = frame0.FindVariable("ptr")
-        self.assertTrue(ptr_value.IsValid(), "Got the SBValue for ptr")
-
-        ptr_second_value = ptr_value.GetChildMemberWithName("second_val")
-        self.assertTrue(ptr_second_value.IsValid(), "Got second_val from ptr")
-        actual_value = ptr_second_value.GetValueAsUnsigned(error, 0)
-        self.assertTrue(
-            error.Success(),
-            "Got an unsigned value for ptr->second_val")
-        self.assertTrue(actual_value == 6666)
-
-        result = ptr_second_value.SetValueFromCString("98765")
-        self.assertTrue(result, "Success setting ptr->second_value.")
-        actual_value = ptr_second_value.GetValueAsSigned(error, 0)
-        self.assertTrue(
-            error.Success(),
-            "Got a changed value from ptr->second_val")
-        self.assertTrue(actual_value == 98765,
-                        "Got the right changed value from ptr->second_val")
-
-        # gcc may set multiple locations for breakpoint
-        breakpoint.SetEnabled(False)
-
-        # Now continue, grab the stdout and make sure we changed the real
-        # values as well...
-        process.Continue()
-
-        self.assertTrue(process.GetState() == lldb.eStateStopped)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint condition")
-
-        expected_value = "Val - 12345 Mine - 55, 98765, 55555555. Ptr - 66, 98765, 66666666"
-        stdout = process.GetSTDOUT(1000)
-        self.assertTrue(
-            expected_value in stdout,
-            "STDOUT showed changed values.")
-
-        # Finally, change the stack pointer to 0, and we should not make it to
-        # our end breakpoint.
-        frame0 = thread.GetFrameAtIndex(0)
-        self.assertTrue(frame0.IsValid(), "Second time: got a valid frame.")
-        sp_value = frame0.FindValue("sp", lldb.eValueTypeRegister)
-        self.assertTrue(sp_value.IsValid(), "Got a stack pointer value")
-        result = sp_value.SetValueFromCString("1")
-        self.assertTrue(result, "Setting sp returned true.")
-        actual_value = sp_value.GetValueAsUnsigned(error, 0)
-        self.assertTrue(error.Success(), "Got a changed value for sp")
-        self.assertTrue(
-            actual_value == 1,
-            "Got the right changed value for sp.")
-
-        # Boundary condition test the SBValue.CreateValueFromExpression() API.
-        # LLDB should not crash!
-        nosuchval = mine_value.CreateValueFromExpression(None, None)
-
-        process.Continue()
-
-        self.assertTrue(process.GetState() == lldb.eStateStopped)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread is None,
-            "We should not have managed to hit our second breakpoint with sp == 1")
-
-        process.Kill()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/change_values/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/change_values/main.c
deleted file mode 100644 (file)
index 01455c0..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#include <stdio.h>
-#include <stdint.h>
-#include <stdlib.h>
-
-struct foo
-{
-  uint8_t   first_val;
-  uint32_t  second_val;
-  uint64_t  third_val;
-};
-  
-int main ()
-{
-  int val = 100;
-  struct foo mine = {55, 5555, 55555555};
-  struct foo *ptr = (struct foo *) malloc (sizeof (struct foo));
-  ptr->first_val = 66;
-  ptr->second_val = 6666;
-  ptr->third_val = 66666666;
-
-  // Stop here and set values
-  printf ("Val - %d Mine - %d, %d, %llu. Ptr - %d, %d, %llu\n", val, 
-          mine.first_val, mine.second_val, mine.third_val,
-          ptr->first_val, ptr->second_val, ptr->third_val); 
-
-  // Stop here and check values
-  printf ("This is just another call which we won't make it over %d.", val);
-  return 0; // Set a breakpoint here at the end
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/empty_class/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/empty_class/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/empty_class/TestValueAPIEmptyClass.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/empty_class/TestValueAPIEmptyClass.py
deleted file mode 100644 (file)
index c7197e5..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class ValueAPIEmptyClassTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(['pyapi'])
-    def test(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        line = line_number('main.cpp', '// Break at this line')
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Create the breakpoint inside function 'main'.
-        breakpoint = target.BreakpointCreateByLocation('main.cpp', line)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Get Frame #0.
-        self.assertTrue(process.GetState() == lldb.eStateStopped)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint condition")
-        frame0 = thread.GetFrameAtIndex(0)
-
-        # Verify that we can access to a frame variable with an empty class type
-        e = frame0.FindVariable('e')
-        self.assertTrue(e.IsValid(), VALID_VARIABLE)
-        self.DebugSBValue(e)
-        self.assertEqual(e.GetNumChildren(), 0)
-
-        # Verify that we can acces to a frame variable what is a pointer to an
-        # empty class
-        ep = frame0.FindVariable('ep')
-        self.assertTrue(ep.IsValid(), VALID_VARIABLE)
-        self.DebugSBValue(ep)
-
-        # Verify that we can dereference a pointer to an empty class
-        epd = ep.Dereference()
-        self.assertTrue(epd.IsValid(), VALID_VARIABLE)
-        self.DebugSBValue(epd)
-        self.assertEqual(epd.GetNumChildren(), 0)
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/empty_class/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/empty_class/main.cpp
deleted file mode 100644 (file)
index 483a57e..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-class Empty {};
-
-int main (int argc, char const *argv[]) {
-  Empty e;
-  Empty* ep = new Empty;
-  return 0; // Break at this line
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/linked_list/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/linked_list/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/linked_list/TestValueAPILinkedList.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/linked_list/TestValueAPILinkedList.py
deleted file mode 100644 (file)
index b45186a..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-"""
-Test SBValue API linked_list_iter which treats the SBValue as a linked list and
-supports iteration till the end of list is reached.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ValueAsLinkedListTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # We'll use the test method name as the exe_name.
-        self.exe_name = self.testMethodName
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Break at this line')
-
-    # Py3 asserts due to a bug in SWIG.  A fix for this was upstreamed into
-    # SWIG 3.0.8.
-    @skipIf(py_version=['>=', (3, 0)], swig_version=['<', (3, 0, 8)])
-    @add_test_categories(['pyapi'])
-    def test(self):
-        """Exercise SBValue API linked_list_iter."""
-        d = {'EXE': self.exe_name}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        exe = self.getBuildArtifact(self.exe_name)
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Create the breakpoint inside function 'main'.
-        breakpoint = target.BreakpointCreateByLocation('main.cpp', self.line)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Get Frame #0.
-        self.assertTrue(process.GetState() == lldb.eStateStopped)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint condition")
-        frame0 = thread.GetFrameAtIndex(0)
-
-        # Get variable 'task_head'.
-        task_head = frame0.FindVariable('task_head')
-        self.assertTrue(task_head, VALID_VARIABLE)
-        self.DebugSBValue(task_head)
-
-        # By design (see main.cpp), the visited id's are: [1, 2, 4, 5].
-        visitedIDs = [1, 2, 4, 5]
-        list = []
-
-        cvf = lldbutil.ChildVisitingFormatter(indent_child=2)
-        for t in task_head.linked_list_iter('next'):
-            self.assertTrue(t, VALID_VARIABLE)
-            # Make sure that 'next' corresponds to an SBValue with pointer
-            # type.
-            self.assertTrue(t.TypeIsPointerType())
-            if self.TraceOn():
-                print(cvf.format(t))
-            list.append(int(t.GetChildMemberWithName("id").GetValue()))
-
-        # Sanity checks that the we visited all the items (no more, no less).
-        if self.TraceOn():
-            print("visited IDs:", list)
-        self.assertTrue(visitedIDs == list)
-
-        # Let's exercise the linked_list_iter() API again, this time supplying
-        # our end of list test function.
-        def eol(val):
-            """Test function to determine end of list."""
-            # End of list is reached if either the value object is invalid
-            # or it corresponds to a null pointer.
-            if not val or int(val.GetValue(), 16) == 0:
-                return True
-            # Also check the "id" for correct semantics.  If id <= 0, the item
-            # is corrupted, let's return True to signify end of list.
-            if int(val.GetChildMemberWithName("id").GetValue(), 0) <= 0:
-                return True
-
-            # Otherwise, return False.
-            return False
-
-        list = []
-        for t in task_head.linked_list_iter('next', eol):
-            self.assertTrue(t, VALID_VARIABLE)
-            # Make sure that 'next' corresponds to an SBValue with pointer
-            # type.
-            self.assertTrue(t.TypeIsPointerType())
-            if self.TraceOn():
-                print(cvf.format(t))
-            list.append(int(t.GetChildMemberWithName("id").GetValue()))
-
-        # Sanity checks that the we visited all the items (no more, no less).
-        if self.TraceOn():
-            print("visited IDs:", list)
-        self.assertTrue(visitedIDs == list)
-
-        # Get variable 'empty_task_head'.
-        empty_task_head = frame0.FindVariable('empty_task_head')
-        self.assertTrue(empty_task_head, VALID_VARIABLE)
-        self.DebugSBValue(empty_task_head)
-
-        list = []
-        # There is no iterable item from empty_task_head.linked_list_iter().
-        for t in empty_task_head.linked_list_iter('next', eol):
-            if self.TraceOn():
-                print(cvf.format(t))
-            list.append(int(t.GetChildMemberWithName("id").GetValue()))
-
-        self.assertTrue(len(list) == 0)
-
-        # Get variable 'task_evil'.
-        task_evil = frame0.FindVariable('task_evil')
-        self.assertTrue(task_evil, VALID_VARIABLE)
-        self.DebugSBValue(task_evil)
-
-        list = []
-        # There 3 iterable items from task_evil.linked_list_iter(). :-)
-        for t in task_evil.linked_list_iter('next'):
-            if self.TraceOn():
-                print(cvf.format(t))
-            list.append(int(t.GetChildMemberWithName("id").GetValue()))
-
-        self.assertTrue(len(list) == 3)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/linked_list/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/linked_list/main.cpp
deleted file mode 100644 (file)
index edd175a..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-
-class Task {
-public:
-    int id;
-    Task *next;
-    Task(int i, Task *n):
-        id(i),
-        next(n)
-    {}
-};
-
-
-int main (int argc, char const *argv[])
-{
-    Task *task_head = NULL;
-    Task *task1 = new Task(1, NULL);
-    Task *task2 = new Task(2, NULL);
-    Task *task3 = new Task(3, NULL); // Orphaned.
-    Task *task4 = new Task(4, NULL);
-    Task *task5 = new Task(5, NULL);
-
-    task_head = task1;
-    task1->next = task2;
-    task2->next = task4;
-    task4->next = task5;
-
-    int total = 0;
-    Task *t = task_head;
-    while (t != NULL) {
-        if (t->id >= 0)
-            ++total;
-        t = t->next;
-    }
-    printf("We have a total number of %d tasks\n", total);
-
-    // This corresponds to an empty task list.
-    Task *empty_task_head = NULL;
-
-    Task *task_evil = new Task(1, NULL);
-    Task *task_2 = new Task(2, NULL);
-    Task *task_3 = new Task(3, NULL);
-    task_evil->next = task_2;
-    task_2->next = task_3;
-    task_3->next = task_evil; // In order to cause inifinite loop. :-)
-
-    return 0; // Break at this line
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value/main.c
deleted file mode 100644 (file)
index 68b3c12..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-#include <stdint.h>
-
-// This simple program is to test the lldb Python API SBValue.GetChildAtIndex().
-
-int g_my_int = 100;
-
-const char *days_of_week[7] = { "Sunday",
-                                "Monday",
-                                "Tuesday",
-                                "Wednesday",
-                                "Thursday",
-                                "Friday",
-                                "Saturday" };
-
-const char *weekdays[5] = { "Monday",
-                            "Tuesday",
-                            "Wednesday",
-                            "Thursday",
-                            "Friday" };
-
-const char **g_table[2] = { days_of_week, weekdays };
-
-typedef int MyInt;
-
-struct MyStruct
-{
-  int a;
-  int b;
-};
-
-int main (int argc, char const *argv[])
-{
-    uint32_t uinthex = 0xE0A35F10;
-    int32_t  sinthex = 0xE0A35F10;
-
-    int i;
-    MyInt a = 12345;
-    struct MyStruct s = { 11, 22 };
-    int *my_int_ptr = &g_my_int;
-    printf("my_int_ptr points to location %p\n", my_int_ptr);
-    const char **str_ptr = days_of_week;
-    for (i = 0; i < 7; ++i)
-        printf("%s\n", str_ptr[i]); // Break at this line
-                                    // and do str_ptr_val.GetChildAtIndex(5, lldb.eNoDynamicValues, True).
-    
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value_var_update/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value_var_update/Makefile
deleted file mode 100644 (file)
index 3716c6e..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-C_SOURCES := main.c
-CFLAGS_EXTRAS := -std=c99
-# See TestHelloWorld.py, which specifies the executable name with a dictionary.
-EXE := hello_world
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value_var_update/TestValueVarUpdate.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value_var_update/TestValueVarUpdate.py
deleted file mode 100644 (file)
index b425cef..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-"""Test SBValue::GetValueDidChange"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ValueVarUpdateTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(['pyapi'])
-    def test_with_process_launch_api(self):
-        """Test SBValue::GetValueDidChange"""
-        # Get the full path to our executable to be attached/debugged.
-        exe = self.getBuildArtifact(self.testMethodName)
-        d = {'EXE': exe}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        target = self.dbg.CreateTarget(exe)
-
-        breakpoint = target.BreakpointCreateBySourceRegex(
-            "break here", lldb.SBFileSpec("main.c"))
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        i = self.frame().FindVariable("i")
-        i_val = i.GetValueAsUnsigned(0)
-        c = self.frame().FindVariable("c")
-
-        # Update any values from the SBValue objects so we can ask them if they
-        # changed after a continue
-        i.GetValueDidChange()
-        c.GetChildAtIndex(1).GetValueDidChange()
-        c.GetChildAtIndex(0).GetChildAtIndex(0).GetValueDidChange()
-
-        if self.TraceOn():
-            self.runCmd("frame variable")
-
-        self.runCmd("continue")
-
-        if self.TraceOn():
-            self.runCmd("frame variable")
-
-        self.assertTrue(
-            i_val != i.GetValueAsUnsigned(0),
-            "GetValue() is saying a lie")
-        self.assertTrue(
-            i.GetValueDidChange(),
-            "GetValueDidChange() is saying a lie")
-
-        # Check complex type
-        self.assertTrue(c.GetChildAtIndex(0).GetChildAtIndex(0).GetValueDidChange(
-        ) and not c.GetChildAtIndex(1).GetValueDidChange(), "GetValueDidChange() is saying a lie")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value_var_update/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/value_var_update/main.c
deleted file mode 100644 (file)
index 9ffca5c..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-struct complex_type {
-    struct { long l; } inner;
-    struct complex_type *complex_ptr;
-};
-
-int main() {
-    int i = 0;
-    struct complex_type c = { { 1L }, &c };
-    for (int j = 3; j < 20; j++)
-    {
-        c.inner.l += (i += j);
-        i = i - 1; // break here
-    }
-    return i;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/.categories b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/.categories
deleted file mode 100644 (file)
index 50c1613..0000000
+++ /dev/null
@@ -1 +0,0 @@
-watchpoint
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py
deleted file mode 100644 (file)
index a34806d..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-"""
-Use lldb Python SBValue API to create a watchpoint for read_write of 'globl' var.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class SetWatchpointAPITestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Our simple source filename.
-        self.source = 'main.c'
-        # Find the line number to break inside main().
-        self.line = line_number(
-            self.source, '// Set break point at this line.')
-
-    @add_test_categories(['pyapi'])
-    # Read-write watchpoints not supported on SystemZ
-    @expectedFailureAll(archs=['s390x'])
-    def test_watch_val(self):
-        """Exercise SBValue.Watch() API to set a watchpoint."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create a breakpoint on main.c.
-        breakpoint = target.BreakpointCreateByLocation(self.source, self.line)
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        # We should be stopped due to the breakpoint.  Get frame #0.
-        process = target.GetProcess()
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        frame0 = thread.GetFrameAtIndex(0)
-
-        # Watch 'global' for read and write.
-        value = frame0.FindValue('global', lldb.eValueTypeVariableGlobal)
-        error = lldb.SBError()
-        watchpoint = value.Watch(True, True, True, error)
-        self.assertTrue(value and watchpoint,
-                        "Successfully found the variable and set a watchpoint")
-        self.DebugSBValue(value)
-
-        # Hide stdout if not running with '-t' option.
-        if not self.TraceOn():
-            self.HideStdout()
-
-        print(watchpoint)
-
-        # Continue.  Expect the program to stop due to the variable being
-        # written to.
-        process.Continue()
-
-        if (self.TraceOn()):
-            lldbutil.print_stacktraces(process)
-
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonWatchpoint)
-        self.assertTrue(thread, "The thread stopped due to watchpoint")
-        self.DebugSBValue(value)
-
-        # Continue.  Expect the program to stop due to the variable being read
-        # from.
-        process.Continue()
-
-        if (self.TraceOn()):
-            lldbutil.print_stacktraces(process)
-
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonWatchpoint)
-        self.assertTrue(thread, "The thread stopped due to watchpoint")
-        self.DebugSBValue(value)
-
-        # Continue the process.  We don't expect the program to be stopped
-        # again.
-        process.Continue()
-
-        # At this point, the inferior process should have exited.
-        self.assertTrue(
-            process.GetState() == lldb.eStateExited,
-            PROCESS_EXITED)
-
-        self.dbg.DeleteTarget(target)
-        self.assertFalse(watchpoint.IsValid())
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py
deleted file mode 100644 (file)
index 83a11d4..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-"""
-Use lldb Python SBWatchpoint API to set the ignore count.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class WatchpointIgnoreCountTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Our simple source filename.
-        self.source = 'main.c'
-        # Find the line number to break inside main().
-        self.line = line_number(
-            self.source, '// Set break point at this line.')
-
-    @add_test_categories(['pyapi'])
-    # Read-write watchpoints not supported on SystemZ
-    @expectedFailureAll(archs=['s390x'])
-    def test_set_watch_ignore_count(self):
-        """Test SBWatchpoint.SetIgnoreCount() API."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Create a breakpoint on main.c in order to set our watchpoint later.
-        breakpoint = target.BreakpointCreateByLocation(self.source, self.line)
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        # We should be stopped due to the breakpoint.  Get frame #0.
-        process = target.GetProcess()
-        self.assertEqual(process.GetState(), lldb.eStateStopped,
-                        PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        frame0 = thread.GetFrameAtIndex(0)
-
-        # Watch 'global' for read and write.
-        value = frame0.FindValue('global', lldb.eValueTypeVariableGlobal)
-        error = lldb.SBError()
-        watchpoint = value.Watch(True, True, True, error)
-        self.assertTrue(value and watchpoint,
-                        "Successfully found the variable and set a watchpoint")
-        self.DebugSBValue(value)
-
-        # Hide stdout if not running with '-t' option.
-        if not self.TraceOn():
-            self.HideStdout()
-
-        # There should be only 1 watchpoint location under the target.
-        self.assertEqual(target.GetNumWatchpoints(), 1)
-        watchpoint = target.GetWatchpointAtIndex(0)
-        self.assertTrue(watchpoint.IsEnabled())
-        self.assertEqual(watchpoint.GetIgnoreCount(), 0)
-        watch_id = watchpoint.GetID()
-        self.assertNotEqual(watch_id, 0)
-        print(watchpoint)
-
-        # Now immediately set the ignore count to 2.  When we continue, expect the
-        # inferior to run to its completion without stopping due to watchpoint.
-        watchpoint.SetIgnoreCount(2)
-        print(watchpoint)
-        process.Continue()
-
-        # At this point, the inferior process should have exited.
-        self.assertEqual(process.GetState(), lldb.eStateExited, PROCESS_EXITED)
-
-        # Verify some vital statistics.
-        self.assertTrue(watchpoint)
-        self.assertEqual(watchpoint.GetWatchSize(), 4)
-        self.assertEqual(watchpoint.GetHitCount(), 2)
-        print(watchpoint)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIter.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIter.py
deleted file mode 100644 (file)
index 44df96b..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-"""
-Use lldb Python SBTarget API to iterate on the watchpoint(s) for the target.
-"""
-
-from __future__ import print_function
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class WatchpointIteratorTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    # hardware watchpoints are not reported with a hardware index # on armv7 on ios devices
-    def affected_by_radar_34564183(self):
-        return (self.getArchitecture() in ['armv7', 'armv7k', 'arm64_32']) and self.platformIsDarwin()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Our simple source filename.
-        self.source = 'main.c'
-        # Find the line number to break inside main().
-        self.line = line_number(
-            self.source, '// Set break point at this line.')
-
-    @add_test_categories(['pyapi'])
-    def test_watch_iter(self):
-        """Exercise SBTarget.watchpoint_iter() API to iterate on the available watchpoints."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Create a breakpoint on main.c in order to set our watchpoint later.
-        breakpoint = target.BreakpointCreateByLocation(self.source, self.line)
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        # We should be stopped due to the breakpoint.  Get frame #0.
-        process = target.GetProcess()
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        frame0 = thread.GetFrameAtIndex(0)
-
-        # Watch 'global' for read and write.
-        value = frame0.FindValue('global', lldb.eValueTypeVariableGlobal)
-        error = lldb.SBError()
-        watchpoint = value.Watch(True, False, True, error)
-        self.assertTrue(value and watchpoint,
-                        "Successfully found the variable and set a watchpoint")
-        self.DebugSBValue(value)
-
-        # Hide stdout if not running with '-t' option.
-        if not self.TraceOn():
-            self.HideStdout()
-
-        # There should be only 1 watchpoint location under the target.
-        self.assertTrue(target.GetNumWatchpoints() == 1)
-        self.assertTrue(watchpoint.IsEnabled())
-        watch_id = watchpoint.GetID()
-        self.assertTrue(watch_id != 0)
-
-        # Continue.  Expect the program to stop due to the variable being
-        # written to.
-        process.Continue()
-
-        # Hide stdout if not running with '-t' option.
-        if not self.TraceOn():
-            self.HideStdout()
-
-        # Print the stack traces.
-        lldbutil.print_stacktraces(process)
-
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonWatchpoint)
-        self.assertTrue(thread, "The thread stopped due to watchpoint")
-        self.DebugSBValue(value)
-
-        # We currently only support hardware watchpoint.  Verify that we have a
-        # meaningful hardware index at this point.  Exercise the printed repr of
-        # SBWatchpointLocation.
-        print(watchpoint)
-        if not self.affected_by_radar_34564183():
-            self.assertTrue(watchpoint.GetHardwareIndex() != -1)
-
-        # SBWatchpoint.GetDescription() takes a description level arg.
-        print(lldbutil.get_description(watchpoint, lldb.eDescriptionLevelFull))
-
-        # Now disable the 'rw' watchpoint.  The program won't stop when it reads
-        # 'global' next.
-        watchpoint.SetEnabled(False)
-        self.assertTrue(watchpoint.GetHardwareIndex() == -1)
-        self.assertFalse(watchpoint.IsEnabled())
-
-        # Continue.  The program does not stop again when the variable is being
-        # read from because the watchpoint location has been disabled.
-        process.Continue()
-
-        # At this point, the inferior process should have exited.
-        self.assertTrue(
-            process.GetState() == lldb.eStateExited,
-            PROCESS_EXITED)
-
-        # Verify some vital statistics and exercise the iterator API.
-        for watchpoint in target.watchpoint_iter():
-            self.assertTrue(watchpoint)
-            self.assertTrue(watchpoint.GetWatchSize() == 4)
-            self.assertTrue(watchpoint.GetHitCount() == 1)
-            print(watchpoint)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/condition/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/condition/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py
deleted file mode 100644 (file)
index 7334734..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-"""
-Test watchpoint condition API.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class WatchpointConditionAPITestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Our simple source filename.
-        self.source = 'main.cpp'
-        # Find the line number to break inside main().
-        self.line = line_number(
-            self.source, '// Set break point at this line.')
-        # And the watchpoint variable declaration line number.
-        self.decl = line_number(self.source,
-                                '// Watchpoint variable declaration.')
-        # Build dictionary to have unique executable names for each test
-        # method.
-        self.exe_name = self.testMethodName
-        self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}
-
-    def test_watchpoint_cond_api(self):
-        """Test watchpoint condition API."""
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(dictionary=self.d)
-        exe = self.getBuildArtifact(self.exe_name)
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create a breakpoint on main.c.
-        breakpoint = target.BreakpointCreateByLocation(self.source, self.line)
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        # We should be stopped due to the breakpoint.  Get frame #0.
-        process = target.GetProcess()
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        frame0 = thread.GetFrameAtIndex(0)
-
-        # Watch 'global' for write.
-        value = frame0.FindValue('global', lldb.eValueTypeVariableGlobal)
-        error = lldb.SBError()
-        watchpoint = value.Watch(True, False, True, error)
-        self.assertTrue(value and watchpoint,
-                        "Successfully found the variable and set a watchpoint")
-        self.DebugSBValue(value)
-
-        # Now set the condition as "global==5".
-        watchpoint.SetCondition('global==5')
-        self.expect(watchpoint.GetCondition(), exe=False,
-                    startstr='global==5')
-
-        # Hide stdout if not running with '-t' option.
-        if not self.TraceOn():
-            self.HideStdout()
-
-        print(watchpoint)
-
-        # Continue.  Expect the program to stop due to the variable being
-        # written to.
-        process.Continue()
-
-        if (self.TraceOn()):
-            lldbutil.print_stacktraces(process)
-
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonWatchpoint)
-        self.assertTrue(thread, "The thread stopped due to watchpoint")
-        self.DebugSBValue(value)
-
-        # Verify that the condition is met.
-        self.assertTrue(value.GetValueAsUnsigned() == 5)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/condition/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/condition/main.cpp
deleted file mode 100644 (file)
index 3f7c5f5..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-#include <stdint.h>
-
-int32_t global = 0; // Watchpoint variable declaration.
-
-static void modify(int32_t &var) {
-    ++var;
-}
-
-int main(int argc, char** argv) {
-    int local = 0;
-    printf("&global=%p\n", &global);
-    printf("about to write to 'global'...\n"); // Set break point at this line.
-                                               // When stopped, watch 'global',
-                                               // for the condition "global == 5".
-    for (int i = 0; i < 10; ++i)
-        modify(global);
-
-    printf("global=%d\n", global);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/main.c
deleted file mode 100644 (file)
index 6cda6d7..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#include <stdio.h>
-#include <stdint.h>
-
-int32_t global = 10; // Watchpoint variable declaration.
-
-int main(int argc, char** argv) {
-    int local = 0;
-    printf("&global=%p\n", &global);
-    printf("about to write to 'global'...\n"); // Set break point at this line.
-                                               // When stopped, watch 'global' for read&write.
-    global = 20;
-    local += argc;
-    ++local;
-    printf("local: %d\n", local);
-    printf("global=%d\n", global);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/Makefile
deleted file mode 100644 (file)
index de4ec12..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-ENABLE_THREADS := YES
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py
deleted file mode 100644 (file)
index 9cbc396..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-"""
-Use lldb Python SBValue.WatchPointee() API to create a watchpoint for write of '*g_char_ptr'.
-"""
-
-from __future__ import print_function
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class SetWatchlocationAPITestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Our simple source filename.
-        self.source = 'main.cpp'
-        # Find the line number to break inside main().
-        self.line = line_number(
-            self.source, '// Set break point at this line.')
-        # This is for verifying that watch location works.
-        self.violating_func = "do_bad_thing_with_location"
-
-    @add_test_categories(['pyapi'])
-    def test_watch_location(self):
-        """Exercise SBValue.WatchPointee() API to set a watchpoint."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create a breakpoint on main.c.
-        breakpoint = target.BreakpointCreateByLocation(self.source, self.line)
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        # We should be stopped due to the breakpoint.  Get frame #0.
-        process = target.GetProcess()
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        frame0 = thread.GetFrameAtIndex(0)
-
-        value = frame0.FindValue('g_char_ptr',
-                                 lldb.eValueTypeVariableGlobal)
-        pointee = value.CreateValueFromAddress(
-            "pointee",
-            value.GetValueAsUnsigned(0),
-            value.GetType().GetPointeeType())
-        # Watch for write to *g_char_ptr.
-        error = lldb.SBError()
-        watchpoint = value.WatchPointee(True, False, True, error)
-        self.assertTrue(value and watchpoint,
-                        "Successfully found the pointer and set a watchpoint")
-        self.DebugSBValue(value)
-        self.DebugSBValue(pointee)
-
-        # Hide stdout if not running with '-t' option.
-        if not self.TraceOn():
-            self.HideStdout()
-
-        print(watchpoint)
-
-        # Continue.  Expect the program to stop due to the variable being
-        # written to.
-        process.Continue()
-
-        if (self.TraceOn()):
-            lldbutil.print_stacktraces(process)
-
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonWatchpoint)
-        self.assertTrue(thread, "The thread stopped due to watchpoint")
-        self.DebugSBValue(value)
-        self.DebugSBValue(pointee)
-
-        self.expect(
-            lldbutil.print_stacktrace(
-                thread,
-                string_buffer=True),
-            exe=False,
-            substrs=[
-                self.violating_func])
-
-        # This finishes our test.
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py
deleted file mode 100644 (file)
index 53e794d..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-"""
-Use lldb Python SBtarget.WatchAddress() API to create a watchpoint for write of '*g_char_ptr'.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TargetWatchAddressAPITestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Our simple source filename.
-        self.source = 'main.cpp'
-        # Find the line number to break inside main().
-        self.line = line_number(
-            self.source, '// Set break point at this line.')
-        # This is for verifying that watch location works.
-        self.violating_func = "do_bad_thing_with_location"
-
-    @add_test_categories(['pyapi'])
-    def test_watch_address(self):
-        """Exercise SBTarget.WatchAddress() API to set a watchpoint."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create a breakpoint on main.c.
-        breakpoint = target.BreakpointCreateByLocation(self.source, self.line)
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        # We should be stopped due to the breakpoint.  Get frame #0.
-        process = target.GetProcess()
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        frame0 = thread.GetFrameAtIndex(0)
-
-        value = frame0.FindValue('g_char_ptr',
-                                 lldb.eValueTypeVariableGlobal)
-        pointee = value.CreateValueFromAddress(
-            "pointee",
-            value.GetValueAsUnsigned(0),
-            value.GetType().GetPointeeType())
-        # Watch for write to *g_char_ptr.
-        error = lldb.SBError()
-        watchpoint = target.WatchAddress(
-            value.GetValueAsUnsigned(), 1, False, True, error)
-        self.assertTrue(value and watchpoint,
-                        "Successfully found the pointer and set a watchpoint")
-        self.DebugSBValue(value)
-        self.DebugSBValue(pointee)
-
-        # Hide stdout if not running with '-t' option.
-        if not self.TraceOn():
-            self.HideStdout()
-
-        print(watchpoint)
-
-        # Continue.  Expect the program to stop due to the variable being
-        # written to.
-        process.Continue()
-
-        if (self.TraceOn()):
-            lldbutil.print_stacktraces(process)
-
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonWatchpoint)
-        self.assertTrue(thread, "The thread stopped due to watchpoint")
-        self.DebugSBValue(value)
-        self.DebugSBValue(pointee)
-
-        self.expect(
-            lldbutil.print_stacktrace(
-                thread,
-                string_buffer=True),
-            exe=False,
-            substrs=[
-                self.violating_func])
-
-        # This finishes our test.
-
-    @add_test_categories(['pyapi'])
-    # No size constraint on MIPS for watches
-    @skipIf(archs=['mips', 'mipsel', 'mips64', 'mips64el'])
-    @skipIf(archs=['s390x'])  # Likewise on SystemZ
-    def test_watch_address_with_invalid_watch_size(self):
-        """Exercise SBTarget.WatchAddress() API but pass an invalid watch_size."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create a breakpoint on main.c.
-        breakpoint = target.BreakpointCreateByLocation(self.source, self.line)
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        # We should be stopped due to the breakpoint.  Get frame #0.
-        process = target.GetProcess()
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(
-            process, lldb.eStopReasonBreakpoint)
-        frame0 = thread.GetFrameAtIndex(0)
-
-        value = frame0.FindValue('g_char_ptr',
-                                 lldb.eValueTypeVariableGlobal)
-        pointee = value.CreateValueFromAddress(
-            "pointee",
-            value.GetValueAsUnsigned(0),
-            value.GetType().GetPointeeType())
-        # Watch for write to *g_char_ptr.
-        error = lldb.SBError()
-        watchpoint = target.WatchAddress(
-            value.GetValueAsUnsigned(), 365, False, True, error)
-        self.assertFalse(watchpoint)
-        self.expect(error.GetCString(), exe=False,
-                    substrs=['watch size of %d is not supported' % 365])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/main.cpp
deleted file mode 100644 (file)
index e455331..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <chrono>
-#include <condition_variable>
-#include <cstdio>
-#include <random>
-#include <thread>
-
-std::default_random_engine g_random_engine{std::random_device{}()};
-std::uniform_int_distribution<> g_distribution{0, 3000000};
-std::condition_variable g_condition_variable;
-std::mutex g_mutex;
-int g_count;
-
-char *g_char_ptr = nullptr;
-
-void
-barrier_wait()
-{
-    std::unique_lock<std::mutex> lock{g_mutex};
-    if (--g_count > 0)
-        g_condition_variable.wait(lock);
-    else
-        g_condition_variable.notify_all();
-}
-
-void
-do_bad_thing_with_location(char *char_ptr, char new_val)
-{
-    *char_ptr = new_val;
-}
-
-uint32_t
-access_pool (bool flag = false)
-{
-    static std::mutex g_access_mutex;
-    if (!flag)
-        g_access_mutex.lock();
-
-    char old_val = *g_char_ptr;
-    if (flag)
-        do_bad_thing_with_location(g_char_ptr, old_val + 1);
-
-    if (!flag)
-        g_access_mutex.unlock();
-    return *g_char_ptr;
-}
-
-void
-thread_func (uint32_t thread_index)
-{
-    printf ("%s (thread index = %u) startng...\n", __FUNCTION__, thread_index);
-
-    barrier_wait();
-
-    uint32_t count = 0;
-    uint32_t val;
-    while (count++ < 15)
-    {
-        // random micro second sleep from zero to 3 seconds
-        int usec = g_distribution(g_random_engine);
-        printf ("%s (thread = %u) doing a usleep (%d)...\n", __FUNCTION__, thread_index, usec);
-        std::this_thread::sleep_for(std::chrono::microseconds{usec});
-
-        if (count < 7)
-            val = access_pool ();
-        else
-            val = access_pool (true);
-
-        printf ("%s (thread = %u) after usleep access_pool returns %d (count=%d)...\n", __FUNCTION__, thread_index, val, count);
-    }
-    printf ("%s (thread index = %u) exiting...\n", __FUNCTION__, thread_index);
-}
-
-
-int main (int argc, char const *argv[])
-{
-    g_count = 4;
-    std::thread threads[3];
-
-    g_char_ptr = new char{};
-
-    // Create 3 threads
-    for (auto &thread : threads)
-        thread = std::thread{thread_func, std::distance(threads, &thread)};
-
-    printf ("Before turning all three threads loose...\n"); // Set break point at this line.
-    barrier_wait();
-
-    // Join all of our threads
-    for (auto &thread : threads)
-        thread.join();
-
-    delete g_char_ptr;
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/redo.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/redo.py
deleted file mode 100644 (file)
index 03052c3..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
-#!/usr/bin/env python
-
-"""
-A simple utility to redo the failed/errored tests.
-
-You need to specify the session directory in order for this script to locate the
-tests which need to be re-run.
-
-See also dotest.py, the test driver running the test suite.
-
-Type:
-
-./dotest.py -h
-
-for help.
-"""
-
-from __future__ import print_function
-
-import os
-import sys
-import datetime
-import re
-
-# If True, redo with no '-t' option for the test driver.
-no_trace = False
-
-# To be filled with the filterspecs found in the session logs.
-redo_specs = []
-
-# The filename components to match for.  Only files with the contained component names
-# will be considered for re-run.  Examples: ['X86_64', 'clang'].
-filename_components = []
-
-do_delay = False
-
-# There is a known bug with respect to comp_specs and arch_specs, in that if we
-# encountered "-C clang" and "-C gcc" when visiting the session files, both
-# compilers will end up in the invocation of the test driver when rerunning.
-# That is: ./dotest -v -C clang^gcc ... -f ...".  Ditto for "-A" flags.
-
-# The "-C compiler" for comp_specs.
-comp_specs = set()
-# The "-A arch" for arch_specs.
-arch_specs = set()
-
-
-def usage():
-    print("""\
-Usage: redo.py [-F filename_component] [-n] [session_dir] [-d]
-where options:
--F : only consider the test for re-run if the session filename contains the filename component
-     for example: -F x86_64
--n : when running the tests, do not turn on trace mode, i.e, no '-t' option
-     is passed to the test driver (this will run the tests faster)
--d : pass -d down to the test driver (introduces a delay so you can attach with a debugger)
-
-and session_dir specifies the session directory which contains previously
-recorded session infos for all the test cases which either failed or errored.
-
-If sessin_dir is left unspecified, this script uses the heuristic to find the
-possible session directories with names starting with %Y-%m-%d- (for example,
-2012-01-23-) and employs the one with the latest timestamp.""")
-    sys.exit(0)
-
-
-def where(session_dir, test_dir):
-    """Returns the full path to the session directory; None if non-existent."""
-    abspath = os.path.abspath(session_dir)
-    if os.path.isdir(abspath):
-        return abspath
-
-    session_dir_path = os.path.join(test_dir, session_dir)
-    if os.path.isdir(session_dir_path):
-        return session_dir_path
-
-    return None
-
-# This is the pattern for the line from the log file to redo a test.
-# We want the filter spec.
-filter_pattern = re.compile("^\./dotest\.py.*-f (.*)$")
-comp_pattern = re.compile(" -C ([^ ]+) ")
-arch_pattern = re.compile(" -A ([^ ]+) ")
-
-
-def redo(suffix, dir, names):
-    """Visitor function for os.path.walk(path, visit, arg)."""
-    global redo_specs
-    global comp_specs
-    global arch_specs
-    global filter_pattern
-    global comp_pattern
-    global arch_pattern
-    global filename_components
-    global do_delay
-
-    for name in names:
-        if name.endswith(suffix):
-            #print("Find a log file:", name)
-            if name.startswith("Error") or name.startswith("Failure"):
-                if filename_components:
-                    if not all([comp in name for comp in filename_components]):
-                        continue
-                with open(os.path.join(dir, name), 'r') as log:
-                    content = log.read()
-                    for line in content.splitlines():
-                        match = filter_pattern.match(line)
-                        if match:
-                            filterspec = match.group(1)
-                            print("adding filterspec:", filterspec)
-                            redo_specs.append(filterspec)
-                            comp = comp_pattern.search(line)
-                            if comp:
-                                comp_specs.add(comp.group(1))
-                            arch = arch_pattern.search(line)
-                            if arch:
-                                arch_specs.add(arch.group(1))
-            else:
-                continue
-
-
-def main():
-    """Read the session directory and run the failed test cases one by one."""
-    global no_trace
-    global redo_specs
-    global filename_components
-    global do_delay
-
-    test_dir = sys.path[0]
-    if not test_dir:
-        test_dir = os.getcwd()
-    if not test_dir.endswith('test'):
-        print("This script expects to reside in lldb's test directory.")
-        sys.exit(-1)
-
-    index = 1
-    while index < len(sys.argv):
-        if sys.argv[index].startswith(
-                '-h') or sys.argv[index].startswith('--help'):
-            usage()
-
-        if sys.argv[index].startswith('-'):
-            # We should continue processing...
-            pass
-        else:
-            # End of option processing.
-            break
-
-        if sys.argv[index] == '-F':
-            # Increment by 1 to fetch the filename component spec.
-            index += 1
-            if index >= len(sys.argv) or sys.argv[index].startswith('-'):
-                usage()
-            filename_components.append(sys.argv[index])
-        elif sys.argv[index] == '-n':
-            no_trace = True
-        elif sys.argv[index] == '-d':
-            do_delay = True
-
-        index += 1
-
-    if index < len(sys.argv):
-        # Get the specified session directory.
-        session_dir = sys.argv[index]
-    else:
-        # Use heuristic to find the latest session directory.
-        name = datetime.datetime.now().strftime("%Y-%m-%d-")
-        dirs = [d for d in os.listdir(os.getcwd()) if d.startswith(name)]
-        if len(dirs) == 0:
-            print("No default session directory found, please specify it explicitly.")
-            usage()
-        session_dir = max(dirs, key=os.path.getmtime)
-        if not session_dir or not os.path.exists(session_dir):
-            print("No default session directory found, please specify it explicitly.")
-            usage()
-
-    #print("The test directory:", test_dir)
-    session_dir_path = where(session_dir, test_dir)
-
-    print("Using session dir path:", session_dir_path)
-    os.chdir(test_dir)
-    os.path.walk(session_dir_path, redo, ".log")
-
-    if not redo_specs:
-        print("No failures/errors recorded within the session directory, please specify a different session directory.\n")
-        usage()
-
-    filters = " -f ".join(redo_specs)
-    compilers = ''
-    for comp in comp_specs:
-        compilers += " -C %s" % (comp)
-    archs = ''
-    for arch in arch_specs:
-        archs += "--arch %s " % (arch)
-
-    command = "./dotest.py %s %s -v %s %s -f " % (
-        compilers, archs, "" if no_trace else "-t", "-d" if do_delay else "")
-
-    print("Running %s" % (command + filters))
-    os.system(command + filters)
-
-if __name__ == '__main__':
-    main()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/sample_test/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/sample_test/Makefile
deleted file mode 100644 (file)
index 695335e..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-C_SOURCES := main.c
-CFLAGS_EXTRAS := -std=c99
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/sample_test/TestSampleInlineTest.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/sample_test/TestSampleInlineTest.py
deleted file mode 100644 (file)
index 29fad79..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-"""
-Describe the purpose of the test here.
-"""
-
-from __future__ import absolute_import
-
-from lldbsuite.test import lldbinline
-
-lldbinline.MakeInlineTest(
-    __file__, globals(), None)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/sample_test/TestSampleTest.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/sample_test/TestSampleTest.py
deleted file mode 100644 (file)
index 9c5b3ea..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-"""
-Describe the purpose of the test class here.
-"""
-
-
-
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbtest import *
-
-
-class RenameThisSampleTestTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # If your test case doesn't stress debug info, the
-    # set this to true.  That way it won't be run once for
-    # each debug info format.
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_sample_rename_this(self):
-        """There can be many tests in a test case - describe this test here."""
-        self.build()
-        self.main_source_file = lldb.SBFileSpec("main.c")
-        self.sample_test()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Set up your test case here. If your test doesn't need any set up then
-        # remove this method from your TestCase class.
-
-    def sample_test(self):
-        """You might use the test implementation in several ways, say so here."""
-
-        # This function starts a process, "a.out" by default, sets a source
-        # breakpoint, runs to it, and returns the thread, process & target.
-        # It optionally takes an SBLaunchOption argument if you want to pass
-        # arguments or environment variables.
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                   "Set a breakpoint here", self.main_source_file)
-
-        frame = thread.GetFrameAtIndex(0)
-        test_var = frame.FindVariable("test_var")
-        self.assertTrue(test_var.GetError().Success(), "Failed to fetch test_var")
-        test_value = test_var.GetValueAsUnsigned()
-        self.assertEqual(test_value, 10, "Got the right value for test_var")
-
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/sample_test/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/sample_test/main.c
deleted file mode 100644 (file)
index 0164d71..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <stdio.h>
-
-int
-main()
-{
-  int test_var = 10;
-  printf ("Set a breakpoint here: %d.\n", test_var);
-  //% test_var = self.frame().FindVariable("test_var")
-  //% test_value = test_var.GetValueAsUnsigned()
-  //% self.assertTrue(test_var.GetError().Success(), "Failed to fetch test_var")
-  //% self.assertEqual(test_value, 10, "Failed to get the right value for test_var")
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/sanity/TestModuleCacheSanity.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/sanity/TestModuleCacheSanity.py
deleted file mode 100644 (file)
index 3d9f171..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-"""
-This is a sanity check that verifies that the module cache path is set
-correctly and points inside the default test build directory.
-"""
-
-
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbtest import *
-
-
-class ModuleCacheSanityTestCase(TestBase):
-
-  mydir = TestBase.compute_mydir(__file__)
-
-  NO_DEBUG_INFO_TESTCASE = True
-
-  def test(self):
-    self.expect(
-        'settings show symbols.clang-modules-cache-path',
-        substrs=['lldb-test-build.noindex', 'module-cache-lldb'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/source-manager/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/source-manager/Makefile
deleted file mode 100644 (file)
index a78dc11..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-C_SOURCES := main-copy.c
-
-include Makefile.rules
-
-# Copy file into the build folder to enable the test to modify it.
-main-copy.c: main.c
-       cp -f $< $@
-
-
-clean::
-       $(RM) main-copy.c
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/source-manager/TestSourceManager.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/source-manager/TestSourceManager.py
deleted file mode 100644 (file)
index f91d076..0000000
+++ /dev/null
@@ -1,264 +0,0 @@
-"""
-Test lldb core component: SourceManager.
-
-Test cases:
-
-o test_display_source_python:
-  Test display of source using the SBSourceManager API.
-o test_modify_source_file_while_debugging:
-  Test the caching mechanism of the source manager.
-"""
-
-from __future__ import print_function
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-def ansi_underline_surround_regex(inner_regex_text):
-    # return re.compile(r"\[4m%s\[0m" % inner_regex_text)
-    return "4.+\033\\[4m%s\033\\[0m" % inner_regex_text
-
-def ansi_color_surround_regex(inner_regex_text):
-    return "\033\\[3[0-7]m%s\033\\[0m" % inner_regex_text
-
-class SourceManagerTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.file = self.getBuildArtifact("main-copy.c")
-        self.line = line_number("main.c", '// Set break point at this line.')
-
-    def get_expected_stop_column_number(self):
-        """Return the 1-based column number of the first non-whitespace
-        character in the breakpoint source line."""
-        stop_line = get_line(self.file, self.line)
-        # The number of spaces that must be skipped to get to the first non-
-        # whitespace character --- where we expect the debugger breakpoint
-        # column to be --- is equal to the number of characters that get
-        # stripped off the front when we lstrip it, plus one to specify
-        # the character column after the initial whitespace.
-        return len(stop_line) - len(stop_line.lstrip()) + 1
-
-    def do_display_source_python_api(self, use_color, needle_regex, highlight_source=False):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Launch the process, and do not stop at the entry point.
-        args = None
-        envp = None
-        process = target.LaunchSimple(
-            args, envp, self.get_process_working_directory())
-        self.assertIsNotNone(process)
-
-        #
-        # Exercise Python APIs to display source lines.
-        #
-
-        # Setup whether we should use ansi escape sequences, including color
-        # and styles such as underline.
-        self.dbg.SetUseColor(use_color)
-        # Disable syntax highlighting if needed.
-
-        self.runCmd("settings set highlight-source " + str(highlight_source).lower())
-
-        filespec = lldb.SBFileSpec(self.file, False)
-        source_mgr = self.dbg.GetSourceManager()
-        # Use a string stream as the destination.
-        stream = lldb.SBStream()
-        column = self.get_expected_stop_column_number()
-        context_before = 2
-        context_after = 2
-        current_line_prefix = "=>"
-        source_mgr.DisplaySourceLinesWithLineNumbersAndColumn(
-            filespec, self.line, column, context_before, context_after,
-            current_line_prefix, stream)
-
-        #    2
-        #    3    int main(int argc, char const *argv[]) {
-        # => 4        printf("Hello world.\n"); // Set break point at this line.
-        #    5        return 0;
-        #    6    }
-        self.expect(stream.GetData(), "Source code displayed correctly:\n" + stream.GetData(),
-                    exe=False,
-                    patterns=['=> %d.*Hello world' % self.line,
-                              needle_regex])
-
-        # Boundary condition testings for SBStream().  LLDB should not crash!
-        stream.Print(None)
-        stream.RedirectToFile(None, True)
-
-    @add_test_categories(['pyapi'])
-    def test_display_source_python_dumb_terminal(self):
-        """Test display of source using the SBSourceManager API, using a
-        dumb terminal and thus no color support (the default)."""
-        use_color = False
-        self.do_display_source_python_api(use_color, r"\s+\^")
-
-    @add_test_categories(['pyapi'])
-    def test_display_source_python_ansi_terminal(self):
-        """Test display of source using the SBSourceManager API, using a
-        dumb terminal and thus no color support (the default)."""
-        use_color = True
-        underline_regex = ansi_underline_surround_regex(r"printf")
-        self.do_display_source_python_api(use_color, underline_regex)
-
-    @add_test_categories(['pyapi'])
-    def test_display_source_python_ansi_terminal_syntax_highlighting(self):
-        """Test display of source using the SBSourceManager API and check for
-        the syntax highlighted output"""
-        use_color = True
-        syntax_highlighting = True;
-
-        # Just pick 'int' as something that should be colored.
-        color_regex = ansi_color_surround_regex("int")
-        self.do_display_source_python_api(use_color, color_regex, syntax_highlighting)
-
-        # Same for 'char'.
-        color_regex = ansi_color_surround_regex("char")
-        self.do_display_source_python_api(use_color, color_regex, syntax_highlighting)
-
-        # Test that we didn't color unrelated identifiers.
-        self.do_display_source_python_api(use_color, r" main\(", syntax_highlighting)
-        self.do_display_source_python_api(use_color, r"\);", syntax_highlighting)
-
-    def test_move_and_then_display_source(self):
-        """Test that target.source-map settings work by moving main.c to hidden/main.c."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Move main.c to hidden/main.c.
-        hidden = self.getBuildArtifact("hidden")
-        lldbutil.mkdir_p(hidden)
-        main_c_hidden = os.path.join(hidden, "main-copy.c")
-        os.rename(self.file, main_c_hidden)
-
-        if self.TraceOn():
-            system([["ls"]])
-            system([["ls", "hidden"]])
-
-        # Set source remapping with invalid replace path and verify we get an
-        # error
-        self.expect(
-            "settings set target.source-map /a/b/c/d/e /q/r/s/t/u",
-            error=True,
-            substrs=['''error: the replacement path doesn't exist: "/q/r/s/t/u"'''])
-
-        # 'make -C' has resolved current directory to its realpath form.
-        builddir_real = os.path.realpath(self.getBuildDir())
-        hidden_real = os.path.realpath(hidden)
-        # Set target.source-map settings.
-        self.runCmd("settings set target.source-map %s %s" %
-                    (builddir_real, hidden_real))
-        # And verify that the settings work.
-        self.expect("settings show target.source-map",
-                    substrs=[builddir_real, hidden_real])
-
-        # Display main() and verify that the source mapping has been kicked in.
-        self.expect("source list -n main", SOURCE_DISPLAYED_CORRECTLY,
-                    substrs=['Hello world'])
-
-    @skipIf(oslist=["windows"], bugnumber="llvm.org/pr44431")
-    def test_modify_source_file_while_debugging(self):
-        """Modify a source file while debugging the executable."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main-copy.c", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'main-copy.c:%d' % self.line,
-                             'stop reason = breakpoint'])
-
-        # Display some source code.
-        self.expect(
-            "source list -f main-copy.c -l %d" %
-            self.line,
-            SOURCE_DISPLAYED_CORRECTLY,
-            substrs=['Hello world'])
-
-        # The '-b' option shows the line table locations from the debug information
-        # that indicates valid places to set source level breakpoints.
-
-        # The file to display is implicit in this case.
-        self.runCmd("source list -l %d -c 3 -b" % self.line)
-        output = self.res.GetOutput().splitlines()[0]
-
-        # If the breakpoint set command succeeded, we should expect a positive number
-        # of breakpoints for the current line, i.e., self.line.
-        import re
-        m = re.search('^\[(\d+)\].*// Set break point at this line.', output)
-        if not m:
-            self.fail("Fail to display source level breakpoints")
-        self.assertTrue(int(m.group(1)) > 0)
-
-        # Read the main.c file content.
-        with io.open(self.file, 'r', newline='\n') as f:
-            original_content = f.read()
-            if self.TraceOn():
-                print("original content:", original_content)
-
-        # Modify the in-memory copy of the original source code.
-        new_content = original_content.replace('Hello world', 'Hello lldb', 1)
-
-        # Modify the source code file.
-        with io.open(self.file, 'w', newline='\n') as f:
-            time.sleep(1)
-            f.write(new_content)
-            if self.TraceOn():
-                print("new content:", new_content)
-                print(
-                    "os.path.getmtime() after writing new content:",
-                    os.path.getmtime(self.file))
-
-        # Display the source code again.  We should see the updated line.
-        self.expect(
-            "source list -f main-copy.c -l %d" %
-            self.line,
-            SOURCE_DISPLAYED_CORRECTLY,
-            substrs=['Hello lldb'])
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr44432")
-    def test_set_breakpoint_with_absolute_path(self):
-        self.build()
-        hidden = self.getBuildArtifact("hidden")
-        lldbutil.mkdir_p(hidden)
-        # 'make -C' has resolved current directory to its realpath form.
-        builddir_real = os.path.realpath(self.getBuildDir())
-        hidden_real = os.path.realpath(hidden)
-        self.runCmd("settings set target.source-map %s %s" %
-                    (builddir_real, hidden_real))
-
-        exe = self.getBuildArtifact("a.out")
-        main = os.path.join(builddir_real, "hidden", "main-copy.c")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, main, self.line, num_expected_locations=1, loc_exact=False)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'main-copy.c:%d' % self.line,
-                             'stop reason = breakpoint'])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/source-manager/hidden/.keep b/gnu/llvm/lldb/packages/Python/lldbsuite/test/source-manager/hidden/.keep
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/source-manager/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/source-manager/main.c
deleted file mode 100644 (file)
index 9f62166..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <stdio.h>
-
-int main(int argc, char const *argv[]) {
-    printf("Hello world.\n"); // Set break point at this line.
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/terminal/TestEditline.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/terminal/TestEditline.py
deleted file mode 100644 (file)
index 8e1652a..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-"""
-Test that the lldb editline handling is configured correctly.
-"""
-
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-from lldbsuite.test.lldbpexpect import PExpectTest
-
-
-class EditlineTest(PExpectTest):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfAsan
-    @skipIfEditlineSupportMissing
-    def test_left_right_arrow(self):
-        """Test that ctrl+left/right arrow navigates words correctly.
-
-        Note: just sending escape characters to pexpect and checking the buffer
-        doesn't work well, so we run real commands. We want to type
-        "help command" while exercising word-navigation, so type it as below,
-        where [] indicates cursor position.
-
-        1. Send "el rint"  -> "el rint[]"
-        2. Ctrl+left once  -> "el []rint"
-        3. Send "p"        -> "el p[]rint"
-        4. Ctrl+left twice -> "[]el print"
-        5. Send "h"        -> "h[]el print"
-        6. Ctrl+right      -> "hel[] print"
-        7. Send "p"        -> "help print"
-        """
-        self.launch()
-
-        escape_pairs = [
-            ("\x1b[1;5D", "\x1b[1;5C"),
-            ("\x1b[5D", "\x1b[5C"),
-            ("\x1b\x1b[D", "\x1b\x1b[C"),
-        ]
-        for (l_escape, r_escape) in escape_pairs:
-            self.expect("el rint{L}p{L}{L}h{R}p".format(
-                L=l_escape, R=r_escape), substrs=["Syntax: print"])
-
-        self.quit()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/terminal/TestSTTYBeforeAndAfter.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/terminal/TestSTTYBeforeAndAfter.py
deleted file mode 100644 (file)
index e994508..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-"""
-Test that 'stty -a' displays the same output before and after running the lldb command.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-import six
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestSTTYBeforeAndAfter(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @classmethod
-    def classCleanup(cls):
-        """Cleanup the test byproducts."""
-        cls.RemoveTempFile("child_send1.txt")
-        cls.RemoveTempFile("child_read1.txt")
-        cls.RemoveTempFile("child_send2.txt")
-        cls.RemoveTempFile("child_read2.txt")
-
-    @expectedFailureAll(
-        hostoslist=["windows"],
-        bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
-    @no_debug_info_test
-    def test_stty_dash_a_before_and_afetr_invoking_lldb_command(self):
-        """Test that 'stty -a' displays the same output before and after running the lldb command."""
-        import pexpect
-        if not which('expect'):
-            self.skipTest(
-                "The 'expect' program cannot be located, skip the test")
-
-        # The expect prompt.
-        expect_prompt = "expect[0-9.]+> "
-        # The default lldb prompt.
-        lldb_prompt = "(lldb) "
-
-        # So that the child gets torn down after the test.
-        import sys
-        if sys.version_info.major == 3:
-          self.child = pexpect.spawnu('expect')
-        else:
-          self.child = pexpect.spawn('expect')
-        child = self.child
-
-        child.expect(expect_prompt)
-        child.setecho(True)
-        if self.TraceOn():
-            child.logfile = sys.stdout
-
-        if self.platformIsDarwin():
-            child.sendline('set env(TERM) xterm')
-        else:
-            child.sendline('set env(TERM) vt100')
-        child.expect(expect_prompt)
-        child.sendline('puts $env(TERM)')
-        child.expect(expect_prompt)
-
-        # Turn on loggings for input/output to/from the child.
-        child.logfile_send = child_send1 = six.StringIO()
-        child.logfile_read = child_read1 = six.StringIO()
-        child.sendline('stty -a')
-        child.expect(expect_prompt)
-
-        # Now that the stage1 logging is done, restore logfile to None to
-        # stop further logging.
-        child.logfile_send = None
-        child.logfile_read = None
-
-        # Invoke the lldb command.
-        child.sendline(lldbtest_config.lldbExec)
-        child.expect_exact(lldb_prompt)
-
-        # Immediately quit.
-        child.sendline('quit')
-        child.expect(expect_prompt)
-
-        child.logfile_send = child_send2 = six.StringIO()
-        child.logfile_read = child_read2 = six.StringIO()
-        child.sendline('stty -a')
-        child.expect(expect_prompt)
-
-        child.sendline('exit')
-
-        # Now that the stage2 logging is done, restore logfile to None to
-        # stop further logging.
-        child.logfile_send = None
-        child.logfile_read = None
-
-        if self.TraceOn():
-            print("\n\nContents of child_send1:")
-            print(child_send1.getvalue())
-            print("\n\nContents of child_read1:")
-            print(child_read1.getvalue())
-            print("\n\nContents of child_send2:")
-            print(child_send2.getvalue())
-            print("\n\nContents of child_read2:")
-            print(child_read2.getvalue())
-
-        stty_output1_lines = child_read1.getvalue().splitlines()
-        stty_output2_lines = child_read2.getvalue().splitlines()
-        zipped = list(zip(stty_output1_lines, stty_output2_lines))
-        for tuple in zipped:
-            if self.TraceOn():
-                print("tuple->%s" % str(tuple))
-            # Every line should compare equal until the first blank line.
-            if len(tuple[0]) == 0:
-                break
-            self.assertTrue(tuple[0] == tuple[1])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/test_runner/test/__init__.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/test_runner/test/__init__.py
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/test_runner/test/inferior.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/test_runner/test/inferior.py
deleted file mode 100755 (executable)
index 4207bac..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-#!/usr/bin/env python
-"""Inferior program used by process control tests."""
-
-from __future__ import print_function
-
-import argparse
-import datetime
-import signal
-import subprocess
-import sys
-import time
-
-
-def parse_args(command_line):
-    """Parses the command line arguments given to it.
-
-    @param command_line a list of command line arguments to be parsed.
-
-    @return the argparse options dictionary.
-    """
-    parser = argparse.ArgumentParser()
-    parser.add_argument(
-        "--ignore-signal",
-        "-i",
-        dest="ignore_signals",
-        metavar="SIGNUM",
-        action="append",
-        type=int,
-        default=[],
-        help="ignore the given signal number (if possible)")
-    parser.add_argument(
-        "--launch-child-share-handles",
-        action="store_true",
-        help=("launch a child inferior.py that shares stdout/stderr/stdio and "
-              "never returns"))
-    parser.add_argument(
-        "--never-return",
-        action="store_true",
-        help="run in an infinite loop, never return")
-    parser.add_argument(
-        "--return-code",
-        "-r",
-        type=int,
-        default=0,
-        help="specify the return code for the inferior upon exit")
-    parser.add_argument(
-        "--sleep",
-        "-s",
-        metavar="SECONDS",
-        dest="sleep_seconds",
-        type=float,
-        help="sleep for SECONDS seconds before returning")
-    parser.add_argument(
-        "--verbose", "-v", action="store_true",
-        help="log verbose operation details to stdout")
-    return parser.parse_args(command_line)
-
-
-def handle_ignore_signals(options, signals):
-    """Ignores any signals provided to it.
-
-    @param options the command line options parsed by the program.
-    General used to check flags for things like verbosity.
-
-    @param signals the list of signals to ignore.  Can be None or zero-length.
-    Entries should be type int.
-    """
-    if signals is None:
-        return
-
-    for signum in signals:
-        if options.verbose:
-            print("disabling signum {}".format(signum))
-        signal.signal(signum, signal.SIG_IGN)
-
-
-def handle_sleep(options, sleep_seconds):
-    """Sleeps the number of seconds specified, restarting as needed.
-
-    @param options the command line options parsed by the program.
-    General used to check flags for things like verbosity.
-
-    @param sleep_seconds the number of seconds to sleep.  If None
-    or <= 0, no sleeping will occur.
-    """
-    if sleep_seconds is None:
-        return
-
-    if sleep_seconds <= 0:
-        return
-
-    end_time = datetime.datetime.now() + datetime.timedelta(0, sleep_seconds)
-    if options.verbose:
-        print("sleep end time: {}".format(end_time))
-
-    # Do sleep in a loop: signals can interrupt.
-    while datetime.datetime.now() < end_time:
-        # We'll wrap this in a try/catch so we don't encounter
-        # a race if a signal (ignored) knocks us out of this
-        # loop and causes us to return.
-        try:
-            sleep_interval = end_time - datetime.datetime.now()
-            sleep_seconds = sleep_interval.total_seconds()
-            if sleep_seconds > 0:
-                time.sleep(sleep_seconds)
-        except:  # pylint: disable=bare-except
-            pass
-
-
-def handle_launch_children(options):
-    if options.launch_child_share_handles:
-        # Launch the child, share our file handles.
-        # We won't bother reaping it since it will likely outlive us.
-        subprocess.Popen([sys.executable, __file__, "--never-return"])
-
-
-def handle_never_return(options):
-    if not options.never_return:
-        return
-
-    # Loop forever.
-    while True:
-        try:
-            time.sleep(10)
-        except:  # pylint: disable=bare-except
-            # Ignore
-            pass
-
-
-def main(command_line):
-    """Drives the main operation of the inferior test program.
-
-    @param command_line the command line options to process.
-
-    @return the exit value (program return code) for the process.
-    """
-    options = parse_args(command_line)
-    handle_ignore_signals(options, options.ignore_signals)
-    handle_launch_children(options)
-    handle_sleep(options, options.sleep_seconds)
-    handle_never_return(options)
-
-    return options.return_code
-
-if __name__ == "__main__":
-    sys.exit(main(sys.argv[1:]))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/test_runner/test/test_process_control.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/test_runner/test/test_process_control.py
deleted file mode 100755 (executable)
index b3b5aee..0000000
+++ /dev/null
@@ -1,240 +0,0 @@
-#!/usr/bin/env python
-"""
-Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-See https://llvm.org/LICENSE.txt for license information.
-SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-Provides classes used by the test results reporting infrastructure
-within the LLDB test suite.
-
-
-Tests the process_control module.
-"""
-
-
-# System imports.
-import os
-import os.path
-import unittest
-import sys
-import threading
-
-# Our imports.
-from test_runner import process_control
-
-
-class TestInferiorDriver(process_control.ProcessDriver):
-
-    def __init__(self, soft_terminate_timeout=None):
-        super(TestInferiorDriver, self).__init__(
-            soft_terminate_timeout=soft_terminate_timeout)
-        self.started_event = threading.Event()
-        self.started_event.clear()
-
-        self.completed_event = threading.Event()
-        self.completed_event.clear()
-
-        self.was_timeout = False
-        self.returncode = None
-        self.output = None
-
-    def write(self, content):
-        # We'll swallow this to keep tests non-noisy.
-        # Uncomment the following line if you want to see it.
-        # sys.stdout.write(content)
-        pass
-
-    def on_process_started(self):
-        self.started_event.set()
-
-    def on_process_exited(self, command, output, was_timeout, exit_status):
-        self.returncode = exit_status
-        self.was_timeout = was_timeout
-        self.output = output
-        self.returncode = exit_status
-        self.completed_event.set()
-
-
-class ProcessControlTests(unittest.TestCase):
-
-    @classmethod
-    def _suppress_soft_terminate(cls, command):
-        # Do the right thing for your platform here.
-        # Right now only POSIX-y systems are reporting
-        # soft terminate support, so this is set up for
-        # those.
-        helper = process_control.ProcessHelper.process_helper()
-        signals = helper.soft_terminate_signals()
-        if signals is not None:
-            for signum in helper.soft_terminate_signals():
-                command.extend(["--ignore-signal", str(signum)])
-
-    @classmethod
-    def inferior_command(
-            cls,
-            ignore_soft_terminate=False,
-            options=None):
-
-        # Base command.
-        script_name = "{}/inferior.py".format(os.path.dirname(__file__))
-        if not os.path.exists(script_name):
-            raise Exception(
-                "test inferior python script not found: {}".format(script_name))
-        command = ([sys.executable, script_name])
-
-        if ignore_soft_terminate:
-            cls._suppress_soft_terminate(command)
-
-        # Handle options as string or list.
-        if isinstance(options, str):
-            command.extend(options.split())
-        elif isinstance(options, list):
-            command.extend(options)
-
-        # Return full command.
-        return command
-
-
-class ProcessControlNoTimeoutTests(ProcessControlTests):
-    """Tests the process_control module."""
-
-    def test_run_completes(self):
-        """Test that running completes and gets expected stdout/stderr."""
-        driver = TestInferiorDriver()
-        driver.run_command(self.inferior_command())
-        self.assertTrue(
-            driver.completed_event.wait(5), "process failed to complete")
-        self.assertEqual(driver.returncode, 0, "return code does not match")
-
-    def test_run_completes_with_code(self):
-        """Test that running completes and gets expected stdout/stderr."""
-        driver = TestInferiorDriver()
-        driver.run_command(self.inferior_command(options="-r10"))
-        self.assertTrue(
-            driver.completed_event.wait(5), "process failed to complete")
-        self.assertEqual(driver.returncode, 10, "return code does not match")
-
-
-class ProcessControlTimeoutTests(ProcessControlTests):
-
-    def test_run_completes(self):
-        """Test that running completes and gets expected return code."""
-        driver = TestInferiorDriver()
-        timeout_seconds = 5
-        driver.run_command_with_timeout(
-            self.inferior_command(),
-            "{}s".format(timeout_seconds),
-            False)
-        self.assertTrue(
-            driver.completed_event.wait(2 * timeout_seconds),
-            "process failed to complete")
-        self.assertEqual(driver.returncode, 0)
-
-    def _soft_terminate_works(self, with_core):
-        # Skip this test if the platform doesn't support soft ti
-        helper = process_control.ProcessHelper.process_helper()
-        if not helper.supports_soft_terminate():
-            self.skipTest("soft terminate not supported by platform")
-
-        driver = TestInferiorDriver()
-        timeout_seconds = 5
-
-        driver.run_command_with_timeout(
-            # Sleep twice as long as the timeout interval.  This
-            # should force a timeout.
-            self.inferior_command(
-                options="--sleep {}".format(timeout_seconds * 2)),
-            "{}s".format(timeout_seconds),
-            with_core)
-
-        # We should complete, albeit with a timeout.
-        self.assertTrue(
-            driver.completed_event.wait(2 * timeout_seconds),
-            "process failed to complete")
-
-        # Ensure we received a timeout.
-        self.assertTrue(driver.was_timeout, "expected to end with a timeout")
-
-        self.assertTrue(
-            helper.was_soft_terminate(driver.returncode, with_core),
-            ("timeout didn't return expected returncode "
-             "for soft terminate with core: {}").format(driver.returncode))
-
-    def test_soft_terminate_works_core(self):
-        """Driver uses soft terminate (with core request) when process times out.
-        """
-        self._soft_terminate_works(True)
-
-    def test_soft_terminate_works_no_core(self):
-        """Driver uses soft terminate (no core request) when process times out.
-        """
-        self._soft_terminate_works(False)
-
-    def test_hard_terminate_works(self):
-        """Driver falls back to hard terminate when soft terminate is ignored.
-        """
-
-        driver = TestInferiorDriver(soft_terminate_timeout=2.0)
-        timeout_seconds = 1
-
-        driver.run_command_with_timeout(
-            # Sleep much longer than the timeout interval,forcing a
-            # timeout.  Do whatever is needed to have the inferior
-            # ignore soft terminate calls.
-            self.inferior_command(
-                ignore_soft_terminate=True,
-                options="--never-return"),
-            "{}s".format(timeout_seconds),
-            True)
-
-        # We should complete, albeit with a timeout.
-        self.assertTrue(
-            driver.completed_event.wait(60),
-            "process failed to complete")
-
-        # Ensure we received a timeout.
-        self.assertTrue(driver.was_timeout, "expected to end with a timeout")
-
-        helper = process_control.ProcessHelper.process_helper()
-        self.assertTrue(
-            helper.was_hard_terminate(driver.returncode),
-            ("timeout didn't return expected returncode "
-             "for hard teriminate: {} ({})").format(
-                 driver.returncode,
-                 driver.output))
-
-    def test_inferior_exits_with_live_child_shared_handles(self):
-        """inferior exit detected when inferior children are live with shared
-        stdout/stderr handles.
-        """
-        # Requires review D13362 or equivalent to be implemented.
-        self.skipTest("http://reviews.llvm.org/D13362")
-
-        driver = TestInferiorDriver()
-
-        # Create the inferior (I1), and instruct it to create a child (C1)
-        # that shares the stdout/stderr handles with the inferior.
-        # C1 will then loop forever.
-        driver.run_command_with_timeout(
-            self.inferior_command(
-                options="--launch-child-share-handles --return-code 3"),
-            "5s",
-            False)
-
-        # We should complete without a timetout.  I1 should end
-        # immediately after launching C1.
-        self.assertTrue(
-            driver.completed_event.wait(5),
-            "process failed to complete")
-
-        # Ensure we didn't receive a timeout.
-        self.assertFalse(
-            driver.was_timeout, "inferior should have completed normally")
-
-        self.assertEqual(
-            driver.returncode, 3,
-            "expected inferior process to end with expected returncode")
-
-
-if __name__ == "__main__":
-    unittest.main()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/.clang-format b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/.clang-format
deleted file mode 100644 (file)
index 9b3aa8b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-BasedOnStyle: LLVM
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/Makefile
deleted file mode 100644 (file)
index 0c441ed..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CFLAGS_EXTRAS := -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS
-ENABLE_THREADS := YES
-CXX_SOURCES := main.cpp
-MAKE_DSYM :=NO
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py
deleted file mode 100644 (file)
index 5ea55c3..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-
-
-import gdbremote_testcase
-import lldbgdbserverutils
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-import json
-
-class TestAppleSimulatorOSType(gdbremote_testcase.GdbRemoteTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def check_simulator_ostype(self, sdk, platform, arch='x86_64'):
-        sim_devices_str = subprocess.check_output(['xcrun', 'simctl', 'list',
-                                                   '-j', 'devices']).decode("utf-8")
-        sim_devices = json.loads(sim_devices_str)['devices']
-        # Find an available simulator for the requested platform
-        deviceUDID = None
-        for simulator in sim_devices:
-            if isinstance(simulator,dict):
-                runtime = simulator['name']
-                devices = simulator['devices']
-            else:
-                runtime = simulator
-                devices = sim_devices[simulator]
-            if not platform in runtime.lower():
-                continue
-            for device in devices:
-                if 'availability' in device and device['availability'] != '(available)':
-                    continue
-                if 'isAvailable' in device and device['isAvailable'] != True:
-                    continue
-                deviceUDID = device['udid']
-                break
-            if deviceUDID != None:
-                break
-
-        # Launch the process using simctl
-        self.assertIsNotNone(deviceUDID)
-        exe_name = 'test_simulator_platform_{}'.format(platform)
-        sdkroot = subprocess.check_output(['xcrun', '--show-sdk-path', '--sdk',
-                                           sdk]).decode("utf-8")
-        self.build(dictionary={ 'EXE': exe_name, 'SDKROOT': sdkroot.strip(),
-                                'ARCH': arch })
-        exe_path = self.getBuildArtifact(exe_name)
-        sim_launcher = subprocess.Popen(['xcrun', 'simctl', 'spawn', '-s',
-                                         deviceUDID, exe_path,
-                                         'print-pid', 'sleep:10'],
-                                        stderr=subprocess.PIPE)
-        # Get the PID from the process output
-        pid = None
-        while not pid:
-            stderr = sim_launcher.stderr.readline().decode("utf-8")
-            if stderr == '':
-                continue
-            m = re.match(r"PID: (.*)", stderr)
-            self.assertIsNotNone(m)
-            pid = int(m.group(1))
-
-        # Launch debug monitor attaching to the simulated process
-        self.init_debugserver_test()
-        server = self.connect_to_debug_monitor(attach_pid=pid)
-
-        # Setup packet sequences
-        self.add_no_ack_remote_stream()
-        self.add_process_info_collection_packets()
-        self.test_sequence.add_log_lines(
-            ["read packet: " +
-             "$jGetLoadedDynamicLibrariesInfos:{\"fetch_all_solibs\" : true}]#ce",
-             {"direction": "send", "regex": r"^\$(.+)#[0-9a-fA-F]{2}$",
-              "capture": {1: "dylib_info_raw"}}],
-            True)
-
-        # Run the stream
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Gather process info response
-        process_info = self.parse_process_info_response(context)
-        self.assertIsNotNone(process_info)
-
-        # Check that ostype is correct
-        self.assertEquals(process_info['ostype'], platform)
-
-        # Now for dylibs
-        dylib_info_raw = context.get("dylib_info_raw")
-        dylib_info = json.loads(self.decode_gdbremote_binary(dylib_info_raw))
-        images = dylib_info['images']
-
-        image_info = None
-        for image in images:
-            if image['pathname'] != exe_path:
-                continue
-            image_info = image
-            break
-
-        self.assertIsNotNone(image_info)
-        self.assertEquals(image['min_version_os_name'], platform)
-
-
-    @apple_simulator_test('iphone')
-    @debugserver_test
-    @skipIfRemote
-    def test_simulator_ostype_ios(self):
-        self.check_simulator_ostype(sdk='iphonesimulator',
-                                    platform='ios')
-
-    @apple_simulator_test('appletv')
-    @debugserver_test
-    @skipIfRemote
-    def test_simulator_ostype_tvos(self):
-        self.check_simulator_ostype(sdk='appletvsimulator',
-                                    platform='tvos')
-
-    @apple_simulator_test('watch')
-    @debugserver_test
-    @skipIfRemote
-    def test_simulator_ostype_watchos(self):
-        self.check_simulator_ostype(sdk='watchsimulator',
-                                    platform='watchos', arch='i386')
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteAttach.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteAttach.py
deleted file mode 100644 (file)
index dbb83d6..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-import gdbremote_testcase
-import lldbgdbserverutils
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestGdbRemoteAttach(gdbremote_testcase.GdbRemoteTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def attach_with_vAttach(self):
-        # Start the inferior, start the debug monitor, nothing is attached yet.
-        procs = self.prep_debug_monitor_and_inferior(
-            inferior_args=["sleep:60"])
-        self.assertIsNotNone(procs)
-
-        # Make sure the target process has been launched.
-        inferior = procs.get("inferior")
-        self.assertIsNotNone(inferior)
-        self.assertTrue(inferior.pid > 0)
-        self.assertTrue(
-            lldbgdbserverutils.process_is_running(
-                inferior.pid, True))
-
-        # Add attach packets.
-        self.test_sequence.add_log_lines([
-            # Do the attach.
-            "read packet: $vAttach;{:x}#00".format(inferior.pid),
-            # Expect a stop notification from the attach.
-            {"direction": "send",
-             "regex": r"^\$T([0-9a-fA-F]{2})[^#]*#[0-9a-fA-F]{2}$",
-             "capture": {1: "stop_signal_hex"}},
-        ], True)
-        self.add_process_info_collection_packets()
-
-        # Run the stream
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Gather process info response
-        process_info = self.parse_process_info_response(context)
-        self.assertIsNotNone(process_info)
-
-        # Ensure the process id matches what we expected.
-        pid_text = process_info.get('pid', None)
-        self.assertIsNotNone(pid_text)
-        reported_pid = int(pid_text, base=16)
-        self.assertEqual(reported_pid, inferior.pid)
-
-    @debugserver_test
-    def test_attach_with_vAttach_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_attach_manually()
-        self.attach_with_vAttach()
-
-    @expectedFailureNetBSD
-    @llgs_test
-    def test_attach_with_vAttach_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_attach_manually()
-        self.attach_with_vAttach()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteAuxvSupport.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteAuxvSupport.py
deleted file mode 100644 (file)
index 1a3a2b2..0000000
+++ /dev/null
@@ -1,227 +0,0 @@
-from __future__ import print_function
-
-
-import gdbremote_testcase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestGdbRemoteAuxvSupport(gdbremote_testcase.GdbRemoteTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    AUXV_SUPPORT_FEATURE_NAME = "qXfer:auxv:read"
-
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def has_auxv_support(self):
-        inferior_args = ["message:main entered", "sleep:5"]
-        procs = self.prep_debug_monitor_and_inferior(
-            inferior_args=inferior_args)
-
-        # Don't do anything until we match the launched inferior main entry output.
-        # Then immediately interrupt the process.
-        # This prevents auxv data being asked for before it's ready and leaves
-        # us in a stopped state.
-        self.test_sequence.add_log_lines([
-            # Start the inferior...
-            "read packet: $c#63",
-            # ... match output....
-            {"type": "output_match", "regex": self.maybe_strict_output_regex(
-                r"message:main entered\r\n")},
-        ], True)
-        # ... then interrupt.
-        self.add_interrupt_packets()
-        self.add_qSupported_packets()
-
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        features = self.parse_qSupported_response(context)
-        return self.AUXV_SUPPORT_FEATURE_NAME in features and features[
-            self.AUXV_SUPPORT_FEATURE_NAME] == "+"
-
-    def get_raw_auxv_data(self):
-        # Start up llgs and inferior, and check for auxv support.
-        if not self.has_auxv_support():
-            self.skipTest("auxv data not supported")
-
-        # Grab pointer size for target.  We'll assume that is equivalent to an unsigned long on the target.
-        # Auxv is specified in terms of pairs of unsigned longs.
-        self.reset_test_sequence()
-        self.add_process_info_collection_packets()
-
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        proc_info = self.parse_process_info_response(context)
-        self.assertIsNotNone(proc_info)
-        self.assertTrue("ptrsize" in proc_info)
-        word_size = int(proc_info["ptrsize"])
-
-        OFFSET = 0
-        LENGTH = 0x400
-
-        # Grab the auxv data.
-        self.reset_test_sequence()
-        self.test_sequence.add_log_lines(
-            [
-                "read packet: $qXfer:auxv:read::{:x},{:x}:#00".format(
-                    OFFSET,
-                    LENGTH),
-                {
-                    "direction": "send",
-                    "regex": re.compile(
-                        r"^\$([^E])(.*)#[0-9a-fA-F]{2}$",
-                        re.MULTILINE | re.DOTALL),
-                    "capture": {
-                        1: "response_type",
-                        2: "content_raw"}}],
-            True)
-
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Ensure we end up with all auxv data in one packet.
-        # FIXME don't assume it all comes back in one packet.
-        self.assertEqual(context.get("response_type"), "l")
-
-        # Decode binary data.
-        content_raw = context.get("content_raw")
-        self.assertIsNotNone(content_raw)
-        return (word_size, self.decode_gdbremote_binary(content_raw))
-
-    def supports_auxv(self):
-        # When non-auxv platforms support llgs, skip the test on platforms
-        # that don't support auxv.
-        self.assertTrue(self.has_auxv_support())
-
-    #
-    # We skip the "supports_auxv" test on debugserver.  The rest of the tests
-    # appropriately skip the auxv tests if the support flag is not present
-    # in the qSupported response, so the debugserver test bits are still there
-    # in case debugserver code one day does have auxv support and thus those
-    # tests don't get skipped.
-    #
-
-    @skipIfWindows # no auxv support.
-    @llgs_test
-    def test_supports_auxv_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.supports_auxv()
-
-    def auxv_data_is_correct_size(self):
-        (word_size, auxv_data) = self.get_raw_auxv_data()
-        self.assertIsNotNone(auxv_data)
-
-        # Ensure auxv data is a multiple of 2*word_size (there should be two
-        # unsigned long fields per auxv entry).
-        self.assertEqual(len(auxv_data) % (2 * word_size), 0)
-        # print("auxv contains {} entries".format(len(auxv_data) / (2*word_size)))
-
-    @debugserver_test
-    def test_auxv_data_is_correct_size_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.auxv_data_is_correct_size()
-
-    @skipIfWindows
-    @expectedFailureNetBSD
-    @llgs_test
-    def test_auxv_data_is_correct_size_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.auxv_data_is_correct_size()
-
-    def auxv_keys_look_valid(self):
-        (word_size, auxv_data) = self.get_raw_auxv_data()
-        self.assertIsNotNone(auxv_data)
-
-        # Grab endian.
-        self.reset_test_sequence()
-        self.add_process_info_collection_packets()
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        process_info = self.parse_process_info_response(context)
-        self.assertIsNotNone(process_info)
-        endian = process_info.get("endian")
-        self.assertIsNotNone(endian)
-
-        auxv_dict = self.build_auxv_dict(endian, word_size, auxv_data)
-        self.assertIsNotNone(auxv_dict)
-
-        # Verify keys look reasonable.
-        for auxv_key in auxv_dict:
-            self.assertTrue(auxv_key >= 1)
-            self.assertTrue(auxv_key <= 1000)
-        # print("auxv dict: {}".format(auxv_dict))
-
-    @debugserver_test
-    def test_auxv_keys_look_valid_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.auxv_keys_look_valid()
-
-    @skipIfWindows
-    @expectedFailureNetBSD
-    @llgs_test
-    def test_auxv_keys_look_valid_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.auxv_keys_look_valid()
-
-    def auxv_chunked_reads_work(self):
-        # Verify that multiple smaller offset,length reads of auxv data
-        # return the same data as a single larger read.
-
-        # Grab the auxv data with a single large read here.
-        (word_size, auxv_data) = self.get_raw_auxv_data()
-        self.assertIsNotNone(auxv_data)
-
-        # Grab endian.
-        self.reset_test_sequence()
-        self.add_process_info_collection_packets()
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        process_info = self.parse_process_info_response(context)
-        self.assertIsNotNone(process_info)
-        endian = process_info.get("endian")
-        self.assertIsNotNone(endian)
-
-        auxv_dict = self.build_auxv_dict(endian, word_size, auxv_data)
-        self.assertIsNotNone(auxv_dict)
-
-        iterated_auxv_data = self.read_binary_data_in_chunks(
-            "qXfer:auxv:read::", 2 * word_size)
-        self.assertIsNotNone(iterated_auxv_data)
-
-        auxv_dict_iterated = self.build_auxv_dict(
-            endian, word_size, iterated_auxv_data)
-        self.assertIsNotNone(auxv_dict_iterated)
-
-        # Verify both types of data collection returned same content.
-        self.assertEqual(auxv_dict_iterated, auxv_dict)
-
-    @debugserver_test
-    def test_auxv_chunked_reads_work_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.auxv_chunked_reads_work()
-
-    @skipIfWindows
-    @expectedFailureNetBSD
-    @llgs_test
-    def test_auxv_chunked_reads_work_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.auxv_chunked_reads_work()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteExitCode.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteExitCode.py
deleted file mode 100644 (file)
index 24fb0d5..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-
-# lldb test suite imports
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import TestBase
-
-# gdb-remote-specific imports
-import lldbgdbserverutils
-from gdbremote_testcase import GdbRemoteTestCaseBase
-
-
-class TestGdbRemoteExitCode(GdbRemoteTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    FAILED_LAUNCH_CODE = "E08"
-
-    def get_launch_fail_reason(self):
-        self.reset_test_sequence()
-        self.test_sequence.add_log_lines(
-            ["read packet: $qLaunchSuccess#00"],
-            True)
-        self.test_sequence.add_log_lines(
-            [{"direction": "send", "regex": r"^\$(.+)#[0-9a-fA-F]{2}$",
-              "capture": {1: "launch_result"}}],
-            True)
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-        return context.get("launch_result")[1:]
-
-    def start_inferior(self):
-        launch_args = self.install_and_create_launch_args()
-
-        server = self.connect_to_debug_monitor()
-        self.assertIsNotNone(server)
-
-        self.add_no_ack_remote_stream()
-        self.test_sequence.add_log_lines(
-            ["read packet: %s" % lldbgdbserverutils.build_gdbremote_A_packet(
-                launch_args)],
-            True)
-        self.test_sequence.add_log_lines(
-            [{"direction": "send", "regex": r"^\$(.+)#[0-9a-fA-F]{2}$",
-              "capture": {1: "A_result"}}],
-            True)
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        launch_result = context.get("A_result")
-        self.assertIsNotNone(launch_result)
-        if launch_result == self.FAILED_LAUNCH_CODE:
-            fail_reason = self.get_launch_fail_reason()
-            self.fail("failed to launch inferior: " + fail_reason)
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_start_inferior_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.start_inferior()
-
-    @llgs_test
-    def test_start_inferior_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.start_inferior()
-
-    def inferior_exit_0(self):
-        launch_args = self.install_and_create_launch_args()
-
-        server = self.connect_to_debug_monitor()
-        self.assertIsNotNone(server)
-
-        self.add_no_ack_remote_stream()
-        self.add_verified_launch_packets(launch_args)
-        self.test_sequence.add_log_lines(
-            ["read packet: $vCont;c#a8",
-             "send packet: $W00#00"],
-            True)
-
-        self.expect_gdbremote_sequence()
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_inferior_exit_0_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.inferior_exit_0()
-
-    @llgs_test
-    def test_inferior_exit_0_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.inferior_exit_0()
-
-    def inferior_exit_42(self):
-        launch_args = self.install_and_create_launch_args()
-
-        server = self.connect_to_debug_monitor()
-        self.assertIsNotNone(server)
-
-        RETVAL = 42
-
-        # build launch args
-        launch_args += ["retval:%d" % RETVAL]
-
-        self.add_no_ack_remote_stream()
-        self.add_verified_launch_packets(launch_args)
-        self.test_sequence.add_log_lines(
-            ["read packet: $vCont;c#a8",
-             "send packet: $W{0:02x}#00".format(RETVAL)],
-            True)
-
-        self.expect_gdbremote_sequence()
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_inferior_exit_42_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.inferior_exit_42()
-
-    @llgs_test
-    def test_inferior_exit_42_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.inferior_exit_42()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteExpeditedRegisters.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteExpeditedRegisters.py
deleted file mode 100644 (file)
index 7d8e28c..0000000
+++ /dev/null
@@ -1,162 +0,0 @@
-from __future__ import print_function
-
-
-import gdbremote_testcase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestGdbRemoteExpeditedRegisters(
-        gdbremote_testcase.GdbRemoteTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-
-    def gather_expedited_registers(self):
-        # Setup the stub and set the gdb remote command stream.
-        procs = self.prep_debug_monitor_and_inferior(inferior_args=["sleep:2"])
-        self.test_sequence.add_log_lines([
-            # Start up the inferior.
-            "read packet: $c#63",
-            # Immediately tell it to stop.  We want to see what it reports.
-            "read packet: {}".format(chr(3)),
-            {"direction": "send",
-             "regex": r"^\$T([0-9a-fA-F]+)([^#]+)#[0-9a-fA-F]{2}$",
-             "capture": {1: "stop_result",
-                         2: "key_vals_text"}},
-        ], True)
-
-        # Run the gdb remote command stream.
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Pull out expedited registers.
-        key_vals_text = context.get("key_vals_text")
-        self.assertIsNotNone(key_vals_text)
-
-        expedited_registers = self.extract_registers_from_stop_notification(
-            key_vals_text)
-        self.assertIsNotNone(expedited_registers)
-
-        return expedited_registers
-
-    def stop_notification_contains_generic_register(
-            self, generic_register_name):
-        # Generate a stop reply, parse out expedited registers from stop
-        # notification.
-        expedited_registers = self.gather_expedited_registers()
-        self.assertIsNotNone(expedited_registers)
-        self.assertTrue(len(expedited_registers) > 0)
-
-        # Gather target register infos.
-        reg_infos = self.gather_register_infos()
-
-        # Find the generic register.
-        reg_info = self.find_generic_register_with_name(
-            reg_infos, generic_register_name)
-        self.assertIsNotNone(reg_info)
-
-        # Ensure the expedited registers contained it.
-        self.assertTrue(reg_info["lldb_register_index"] in expedited_registers)
-        # print("{} reg_info:{}".format(generic_register_name, reg_info))
-
-    def stop_notification_contains_any_registers(self):
-        # Generate a stop reply, parse out expedited registers from stop
-        # notification.
-        expedited_registers = self.gather_expedited_registers()
-        # Verify we have at least one expedited register.
-        self.assertTrue(len(expedited_registers) > 0)
-
-    @debugserver_test
-    def test_stop_notification_contains_any_registers_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.stop_notification_contains_any_registers()
-
-    @llgs_test
-    def test_stop_notification_contains_any_registers_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.stop_notification_contains_any_registers()
-
-    def stop_notification_contains_no_duplicate_registers(self):
-        # Generate a stop reply, parse out expedited registers from stop
-        # notification.
-        expedited_registers = self.gather_expedited_registers()
-        # Verify no expedited register was specified multiple times.
-        for (reg_num, value) in list(expedited_registers.items()):
-            if (isinstance(value, list)) and (len(value) > 0):
-                self.fail(
-                    "expedited register number {} specified more than once ({} times)".format(
-                        reg_num, len(value)))
-
-    @debugserver_test
-    def test_stop_notification_contains_no_duplicate_registers_debugserver(
-            self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.stop_notification_contains_no_duplicate_registers()
-
-    @llgs_test
-    def test_stop_notification_contains_no_duplicate_registers_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.stop_notification_contains_no_duplicate_registers()
-
-    def stop_notification_contains_pc_register(self):
-        self.stop_notification_contains_generic_register("pc")
-
-    @debugserver_test
-    def test_stop_notification_contains_pc_register_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.stop_notification_contains_pc_register()
-
-    @llgs_test
-    def test_stop_notification_contains_pc_register_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.stop_notification_contains_pc_register()
-
-    # powerpc64 has no FP register
-    @skipIf(triple='^powerpc64')
-    def stop_notification_contains_fp_register(self):
-        self.stop_notification_contains_generic_register("fp")
-
-    @debugserver_test
-    def test_stop_notification_contains_fp_register_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.stop_notification_contains_fp_register()
-
-    @llgs_test
-    def test_stop_notification_contains_fp_register_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.stop_notification_contains_fp_register()
-
-    def stop_notification_contains_sp_register(self):
-        self.stop_notification_contains_generic_register("sp")
-
-    @debugserver_test
-    def test_stop_notification_contains_sp_register_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.stop_notification_contains_sp_register()
-
-    @llgs_test
-    def test_stop_notification_contains_sp_register_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.stop_notification_contains_sp_register()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteHostInfo.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteHostInfo.py
deleted file mode 100644 (file)
index 832096a..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-from __future__ import print_function
-
-# lldb test suite imports
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import TestBase
-
-# gdb-remote-specific imports
-import lldbgdbserverutils
-from gdbremote_testcase import GdbRemoteTestCaseBase
-
-
-class TestGdbRemoteHostInfo(GdbRemoteTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    KNOWN_HOST_INFO_KEYS = set([
-        "arch",
-        "cputype",
-        "cpusubtype",
-        "distribution_id",
-        "endian",
-        "hostname",
-        "ostype",
-        "os_build",
-        "os_kernel",
-        "os_version",
-        "maccatalyst_version",
-        "ptrsize",
-        "triple",
-        "vendor",
-        "watchpoint_exceptions_received",
-        "default_packet_timeout",
-    ])
-
-    DARWIN_REQUIRED_HOST_INFO_KEYS = set([
-        "cputype",
-        "cpusubtype",
-        "endian",
-        "ostype",
-        "ptrsize",
-        "vendor",
-        "watchpoint_exceptions_received"
-    ])
-
-    def add_host_info_collection_packets(self):
-        self.test_sequence.add_log_lines(
-            ["read packet: $qHostInfo#9b",
-             {"direction": "send", "regex": r"^\$(.+)#[0-9a-fA-F]{2}$",
-              "capture": {1: "host_info_raw"}}],
-            True)
-
-    def parse_host_info_response(self, context):
-        # Ensure we have a host info response.
-        self.assertIsNotNone(context)
-        host_info_raw = context.get("host_info_raw")
-        self.assertIsNotNone(host_info_raw)
-
-        # Pull out key:value; pairs.
-        host_info_dict = {match.group(1): match.group(2)
-                          for match in re.finditer(r"([^:]+):([^;]+);",
-                                                   host_info_raw)}
-
-        import pprint
-        print("\nqHostInfo response:")
-        pprint.pprint(host_info_dict)
-
-        # Validate keys are known.
-        for (key, val) in list(host_info_dict.items()):
-            self.assertTrue(key in self.KNOWN_HOST_INFO_KEYS,
-                            "unknown qHostInfo key: " + key)
-            self.assertIsNotNone(val)
-
-        # Return the key:val pairs.
-        return host_info_dict
-
-    def get_qHostInfo_response(self):
-        # Launch the debug monitor stub, attaching to the inferior.
-        server = self.connect_to_debug_monitor()
-        self.assertIsNotNone(server)
-        self.add_no_ack_remote_stream()
-
-        # Request qHostInfo and get response
-        self.add_host_info_collection_packets()
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Parse qHostInfo response.
-        host_info = self.parse_host_info_response(context)
-        self.assertIsNotNone(host_info)
-        self.assertGreater(len(host_info), 0, "qHostInfo should have returned "
-                           "at least one key:val pair.")
-        return host_info
-
-    def validate_darwin_minimum_host_info_keys(self, host_info_dict):
-        self.assertIsNotNone(host_info_dict)
-        missing_keys = [key for key in self.DARWIN_REQUIRED_HOST_INFO_KEYS
-                        if key not in host_info_dict]
-        self.assertEquals(0, len(missing_keys),
-                          "qHostInfo is missing the following required "
-                          "keys: " + str(missing_keys))
-
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    @debugserver_test
-    def test_qHostInfo_returns_at_least_one_key_val_pair_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.get_qHostInfo_response()
-
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    @llgs_test
-    def test_qHostInfo_returns_at_least_one_key_val_pair_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.get_qHostInfo_response()
-
-    @skipUnlessDarwin
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    @debugserver_test
-    def test_qHostInfo_contains_darwin_required_keys_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        host_info_dict = self.get_qHostInfo_response()
-        self.validate_darwin_minimum_host_info_keys(host_info_dict)
-
-    @skipUnlessDarwin
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    @llgs_test
-    def test_qHostInfo_contains_darwin_required_keys_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        host_info_dict = self.get_qHostInfo_response()
-        self.validate_darwin_minimum_host_info_keys(host_info_dict)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteKill.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteKill.py
deleted file mode 100644 (file)
index 48f919a..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
-import gdbremote_testcase
-import lldbgdbserverutils
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestGdbRemoteKill(gdbremote_testcase.GdbRemoteTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-
-    def attach_commandline_kill_after_initial_stop(self):
-        reg_expr = r"^\$[XW][0-9a-fA-F]+([^#]*)#[0-9A-Fa-f]{2}"
-        procs = self.prep_debug_monitor_and_inferior()
-        self.test_sequence.add_log_lines([
-            "read packet: $k#6b",
-            {"direction": "send", "regex": reg_expr},
-        ], True)
-
-        if self.stub_sends_two_stop_notifications_on_kill:
-            # Add an expectation for a second X result for stubs that send two
-            # of these.
-            self.test_sequence.add_log_lines([
-                {"direction": "send", "regex": reg_expr},
-            ], True)
-
-        self.expect_gdbremote_sequence()
-
-        # Wait a moment for completed and now-detached inferior process to
-        # clear.
-        time.sleep(self._WAIT_TIMEOUT)
-
-        if not lldb.remote_platform:
-            # Process should be dead now. Reap results.
-            poll_result = procs["inferior"].poll()
-            self.assertIsNotNone(poll_result)
-
-        # Where possible, verify at the system level that the process is not
-        # running.
-        self.assertFalse(
-            lldbgdbserverutils.process_is_running(
-                procs["inferior"].pid, False))
-
-    @debugserver_test
-    def test_attach_commandline_kill_after_initial_stop_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_attach()
-        self.attach_commandline_kill_after_initial_stop()
-
-    @expectedFailureNetBSD
-    @llgs_test
-    def test_attach_commandline_kill_after_initial_stop_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_attach()
-        self.attach_commandline_kill_after_initial_stop()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteModuleInfo.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteModuleInfo.py
deleted file mode 100644 (file)
index 5e94dbc..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-
-import json
-import gdbremote_testcase
-import lldbgdbserverutils
-from lldbsuite.support import seven
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestGdbRemoteModuleInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def module_info(self):
-        procs = self.prep_debug_monitor_and_inferior()
-        self.add_process_info_collection_packets()
-        context = self.expect_gdbremote_sequence()
-        info = self.parse_process_info_response(context)
-
-        self.test_sequence.add_log_lines([
-            'read packet: $jModulesInfo:%s]#00' % json.dumps(
-                [{"file":lldbutil.append_to_process_working_directory(self, "a.out"),
-                  "triple":seven.unhexlify(info["triple"])}]),
-            {"direction": "send",
-             "regex": r'^\$\[{(.*)}\]\]#[0-9A-Fa-f]{2}',
-             "capture": {1: "spec"}},
-        ], True)
-
-        context = self.expect_gdbremote_sequence()
-        spec = context.get("spec")
-        self.assertRegexpMatches(spec, '"file_path":".*"')
-        self.assertRegexpMatches(spec, '"file_offset":\d+')
-        self.assertRegexpMatches(spec, '"file_size":\d+')
-        self.assertRegexpMatches(spec, '"triple":"\w*-\w*-.*"')
-        self.assertRegexpMatches(spec, '"uuid":"[A-Fa-f0-9]+"')
-
-    @llgs_test
-    def test_module_info(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.module_info()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteProcessInfo.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteProcessInfo.py
deleted file mode 100644 (file)
index bc793a3..0000000
+++ /dev/null
@@ -1,209 +0,0 @@
-
-
-
-import gdbremote_testcase
-import lldbgdbserverutils
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestGdbRemoteProcessInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def qProcessInfo_returns_running_process(self):
-        procs = self.prep_debug_monitor_and_inferior()
-        self.add_process_info_collection_packets()
-
-        # Run the stream
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Gather process info response
-        process_info = self.parse_process_info_response(context)
-        self.assertIsNotNone(process_info)
-
-        # Ensure the process id looks reasonable.
-        pid_text = process_info.get("pid")
-        self.assertIsNotNone(pid_text)
-        pid = int(pid_text, base=16)
-        self.assertNotEqual(0, pid)
-
-        # If possible, verify that the process is running.
-        self.assertTrue(lldbgdbserverutils.process_is_running(pid, True))
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_qProcessInfo_returns_running_process_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.qProcessInfo_returns_running_process()
-
-    @llgs_test
-    def test_qProcessInfo_returns_running_process_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.qProcessInfo_returns_running_process()
-
-    def attach_commandline_qProcessInfo_reports_correct_pid(self):
-        procs = self.prep_debug_monitor_and_inferior()
-        self.assertIsNotNone(procs)
-        self.add_process_info_collection_packets()
-
-        # Run the stream
-        context = self.expect_gdbremote_sequence(timeout_seconds=self._DEFAULT_TIMEOUT)
-        self.assertIsNotNone(context)
-
-        # Gather process info response
-        process_info = self.parse_process_info_response(context)
-        self.assertIsNotNone(process_info)
-
-        # Ensure the process id matches what we expected.
-        pid_text = process_info.get('pid', None)
-        self.assertIsNotNone(pid_text)
-        reported_pid = int(pid_text, base=16)
-        self.assertEqual(reported_pid, procs["inferior"].pid)
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_attach_commandline_qProcessInfo_reports_correct_pid_debugserver(
-            self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_attach()
-        self.attach_commandline_qProcessInfo_reports_correct_pid()
-
-    @expectedFailureNetBSD
-    @llgs_test
-    def test_attach_commandline_qProcessInfo_reports_correct_pid_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_attach()
-        self.attach_commandline_qProcessInfo_reports_correct_pid()
-
-    def qProcessInfo_reports_valid_endian(self):
-        procs = self.prep_debug_monitor_and_inferior()
-        self.add_process_info_collection_packets()
-
-        # Run the stream
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Gather process info response
-        process_info = self.parse_process_info_response(context)
-        self.assertIsNotNone(process_info)
-
-        # Ensure the process id looks reasonable.
-        endian = process_info.get("endian")
-        self.assertIsNotNone(endian)
-        self.assertTrue(endian in ["little", "big", "pdp"])
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_qProcessInfo_reports_valid_endian_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.qProcessInfo_reports_valid_endian()
-
-    @llgs_test
-    def test_qProcessInfo_reports_valid_endian_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.qProcessInfo_reports_valid_endian()
-
-    def qProcessInfo_contains_keys(self, expected_key_set):
-        procs = self.prep_debug_monitor_and_inferior()
-        self.add_process_info_collection_packets()
-
-        # Run the stream
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Gather process info response
-        process_info = self.parse_process_info_response(context)
-        self.assertIsNotNone(process_info)
-
-        # Ensure the expected keys are present and non-None within the process
-        # info.
-        missing_key_set = set()
-        for expected_key in expected_key_set:
-            if expected_key not in process_info:
-                missing_key_set.add(expected_key)
-
-        self.assertEqual(
-            missing_key_set,
-            set(),
-            "the listed keys are missing in the qProcessInfo result")
-
-    def qProcessInfo_does_not_contain_keys(self, absent_key_set):
-        procs = self.prep_debug_monitor_and_inferior()
-        self.add_process_info_collection_packets()
-
-        # Run the stream
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Gather process info response
-        process_info = self.parse_process_info_response(context)
-        self.assertIsNotNone(process_info)
-
-        # Ensure the unexpected keys are not present
-        unexpected_key_set = set()
-        for unexpected_key in absent_key_set:
-            if unexpected_key in process_info:
-                unexpected_key_set.add(unexpected_key)
-
-        self.assertEqual(
-            unexpected_key_set,
-            set(),
-            "the listed keys were present but unexpected in qProcessInfo result")
-
-    @skipUnlessDarwin
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_qProcessInfo_contains_cputype_cpusubtype_debugserver_darwin(self):
-        self.init_debugserver_test()
-        self.build()
-        self.qProcessInfo_contains_keys(set(['cputype', 'cpusubtype']))
-
-    @skipUnlessDarwin
-    @llgs_test
-    def test_qProcessInfo_contains_cputype_cpusubtype_llgs_darwin(self):
-        self.init_llgs_test()
-        self.build()
-        self.qProcessInfo_contains_keys(set(['cputype', 'cpusubtype']))
-
-    @llgs_test
-    def test_qProcessInfo_contains_triple_ppid_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.qProcessInfo_contains_keys(set(['triple', 'parent-pid']))
-
-    @skipUnlessDarwin
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_qProcessInfo_does_not_contain_triple_debugserver_darwin(self):
-        self.init_debugserver_test()
-        self.build()
-        # We don't expect to see triple on darwin.  If we do, we'll prefer triple
-        # to cputype/cpusubtype and skip some darwin-based ProcessGDBRemote ArchSpec setup
-        # for the remote Host and Process.
-        self.qProcessInfo_does_not_contain_keys(set(['triple']))
-
-    @skipUnlessDarwin
-    @llgs_test
-    def test_qProcessInfo_does_not_contain_triple_llgs_darwin(self):
-        self.init_llgs_test()
-        self.build()
-        # We don't expect to see triple on darwin.  If we do, we'll prefer triple
-        # to cputype/cpusubtype and skip some darwin-based ProcessGDBRemote ArchSpec setup
-        # for the remote Host and Process.
-        self.qProcessInfo_does_not_contain_keys(set(['triple']))
-
-    @skipIfDarwin
-    @llgs_test
-    def test_qProcessInfo_does_not_contain_cputype_cpusubtype_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.qProcessInfo_does_not_contain_keys(set(['cputype', 'cpusubtype']))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteRegisterState.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteRegisterState.py
deleted file mode 100644 (file)
index 2543ed6..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-from __future__ import print_function
-
-
-import gdbremote_testcase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestGdbRemoteRegisterState(gdbremote_testcase.GdbRemoteTestCaseBase):
-    """Test QSaveRegisterState/QRestoreRegisterState support."""
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def grp_register_save_restore_works(self, with_suffix):
-        # Start up the process, use thread suffix, grab main thread id.
-        inferior_args = ["message:main entered", "sleep:5"]
-        procs = self.prep_debug_monitor_and_inferior(
-            inferior_args=inferior_args)
-
-        self.add_process_info_collection_packets()
-        self.add_register_info_collection_packets()
-        if with_suffix:
-            self.add_thread_suffix_request_packets()
-        self.add_threadinfo_collection_packets()
-
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Gather process info.
-        process_info = self.parse_process_info_response(context)
-        endian = process_info.get("endian")
-        self.assertIsNotNone(endian)
-
-        # Gather register info.
-        reg_infos = self.parse_register_info_packets(context)
-        self.assertIsNotNone(reg_infos)
-        self.add_lldb_register_index(reg_infos)
-
-        # Pull out the register infos that we think we can bit flip
-        # successfully.
-        gpr_reg_infos = [
-            reg_info for reg_info in reg_infos if self.is_bit_flippable_register(reg_info)]
-        self.assertTrue(len(gpr_reg_infos) > 0)
-
-        # Gather thread info.
-        if with_suffix:
-            threads = self.parse_threadinfo_packets(context)
-            self.assertIsNotNone(threads)
-            thread_id = threads[0]
-            self.assertIsNotNone(thread_id)
-            # print("Running on thread: 0x{:x}".format(thread_id))
-        else:
-            thread_id = None
-
-        # Save register state.
-        self.reset_test_sequence()
-        self.add_QSaveRegisterState_packets(thread_id)
-
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        (success, state_id) = self.parse_QSaveRegisterState_response(context)
-        self.assertTrue(success)
-        self.assertIsNotNone(state_id)
-        # print("saved register state id: {}".format(state_id))
-
-        # Remember initial register values.
-        initial_reg_values = self.read_register_values(
-            gpr_reg_infos, endian, thread_id=thread_id)
-        # print("initial_reg_values: {}".format(initial_reg_values))
-
-        # Flip gpr register values.
-        (successful_writes, failed_writes) = self.flip_all_bits_in_each_register_value(
-            gpr_reg_infos, endian, thread_id=thread_id)
-        # print("successful writes: {}, failed writes: {}".format(successful_writes, failed_writes))
-        self.assertTrue(successful_writes > 0)
-
-        flipped_reg_values = self.read_register_values(
-            gpr_reg_infos, endian, thread_id=thread_id)
-        # print("flipped_reg_values: {}".format(flipped_reg_values))
-
-        # Restore register values.
-        self.reset_test_sequence()
-        self.add_QRestoreRegisterState_packets(state_id, thread_id)
-
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Verify registers match initial register values.
-        final_reg_values = self.read_register_values(
-            gpr_reg_infos, endian, thread_id=thread_id)
-        # print("final_reg_values: {}".format(final_reg_values))
-        self.assertIsNotNone(final_reg_values)
-        self.assertEqual(final_reg_values, initial_reg_values)
-
-    @debugserver_test
-    def test_grp_register_save_restore_works_with_suffix_debugserver(self):
-        USE_THREAD_SUFFIX = True
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.grp_register_save_restore_works(USE_THREAD_SUFFIX)
-
-    @llgs_test
-    def test_grp_register_save_restore_works_with_suffix_llgs(self):
-        USE_THREAD_SUFFIX = True
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.grp_register_save_restore_works(USE_THREAD_SUFFIX)
-
-    @debugserver_test
-    def test_grp_register_save_restore_works_no_suffix_debugserver(self):
-        USE_THREAD_SUFFIX = False
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.grp_register_save_restore_works(USE_THREAD_SUFFIX)
-
-    @llgs_test
-    def test_grp_register_save_restore_works_no_suffix_llgs(self):
-        USE_THREAD_SUFFIX = False
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.grp_register_save_restore_works(USE_THREAD_SUFFIX)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteSingleStep.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteSingleStep.py
deleted file mode 100644 (file)
index c6c7502..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-import gdbremote_testcase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestGdbRemoteSingleStep(gdbremote_testcase.GdbRemoteTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    @debugserver_test
-    def test_single_step_only_steps_one_instruction_with_s_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.single_step_only_steps_one_instruction(
-            use_Hc_packet=True, step_instruction="s")
-
-    @skipIfWindows # No pty support to test any inferior std -i/e/o
-    @llgs_test
-    @expectedFailureAndroid(
-        bugnumber="llvm.org/pr24739",
-        archs=[
-            "arm",
-            "aarch64"])
-    @expectedFailureAll(
-        oslist=["linux"],
-        archs=["arm"],
-        bugnumber="llvm.org/pr24739")
-    @skipIf(triple='^mips')
-    def test_single_step_only_steps_one_instruction_with_s_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.single_step_only_steps_one_instruction(
-            use_Hc_packet=True, step_instruction="s")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py
deleted file mode 100644 (file)
index f9bd668..0000000
+++ /dev/null
@@ -1,315 +0,0 @@
-
-import json
-import re
-
-import gdbremote_testcase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestGdbRemoteThreadsInStopReply(
-        gdbremote_testcase.GdbRemoteTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    ENABLE_THREADS_IN_STOP_REPLY_ENTRIES = [
-        "read packet: $QListThreadsInStopReply#21",
-        "send packet: $OK#00",
-    ]
-
-    def gather_stop_reply_fields(self, post_startup_log_lines, thread_count,
-            field_names):
-        # Set up the inferior args.
-        inferior_args = []
-        for i in range(thread_count - 1):
-            inferior_args.append("thread:new")
-        inferior_args.append("sleep:10")
-        procs = self.prep_debug_monitor_and_inferior(
-            inferior_args=inferior_args)
-
-        self.add_register_info_collection_packets()
-        self.add_process_info_collection_packets()
-
-        # Assumes test_sequence has anything added needed to setup the initial state.
-        # (Like optionally enabling QThreadsInStopReply.)
-        if post_startup_log_lines:
-            self.test_sequence.add_log_lines(post_startup_log_lines, True)
-        self.test_sequence.add_log_lines([
-            "read packet: $c#63"
-        ], True)
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-        hw_info = self.parse_hw_info(context)
-
-        # Give threads time to start up, then break.
-        time.sleep(self._WAIT_TIMEOUT)
-        self.reset_test_sequence()
-        self.test_sequence.add_log_lines(
-            [
-                "read packet: {}".format(
-                    chr(3)),
-                {
-                    "direction": "send",
-                    "regex": r"^\$T([0-9a-fA-F]+)([^#]+)#[0-9a-fA-F]{2}$",
-                    "capture": {
-                        1: "stop_result",
-                        2: "key_vals_text"}},
-            ],
-            True)
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Wait until all threads have started.
-        threads = self.wait_for_thread_count(thread_count,
-                                             timeout_seconds=self._WAIT_TIMEOUT)
-        self.assertIsNotNone(threads)
-        self.assertEqual(len(threads), thread_count)
-
-        # Run, then stop the process, grab the stop reply content.
-        self.reset_test_sequence()
-        self.test_sequence.add_log_lines(["read packet: $c#63",
-                                          "read packet: {}".format(chr(3)),
-                                          {"direction": "send",
-                                           "regex": r"^\$T([0-9a-fA-F]+)([^#]+)#[0-9a-fA-F]{2}$",
-                                           "capture": {1: "stop_result",
-                                                       2: "key_vals_text"}},
-                                          ],
-                                         True)
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Parse the stop reply contents.
-        key_vals_text = context.get("key_vals_text")
-        self.assertIsNotNone(key_vals_text)
-        kv_dict = self.parse_key_val_dict(key_vals_text)
-        self.assertIsNotNone(kv_dict)
-
-        result = dict();
-        result["pc_register"] = hw_info["pc_register"]
-        result["little_endian"] = hw_info["little_endian"]
-        for key_field in field_names:
-            result[key_field] = kv_dict.get(key_field)
-
-        return result
-
-    def gather_stop_reply_threads(self, post_startup_log_lines, thread_count):
-        # Pull out threads from stop response.
-        stop_reply_threads_text = self.gather_stop_reply_fields(
-                post_startup_log_lines, thread_count, ["threads"])["threads"]
-        if stop_reply_threads_text:
-            return [int(thread_id, 16)
-                    for thread_id in stop_reply_threads_text.split(",")]
-        else:
-            return []
-
-    def gather_stop_reply_pcs(self, post_startup_log_lines, thread_count):
-        results = self.gather_stop_reply_fields( post_startup_log_lines,
-                thread_count, ["threads", "thread-pcs"])
-        if not results:
-            return []
-
-        threads_text = results["threads"]
-        pcs_text = results["thread-pcs"]
-        thread_ids = threads_text.split(",")
-        pcs = pcs_text.split(",")
-        self.assertTrue(len(thread_ids) == len(pcs))
-
-        thread_pcs = dict()
-        for i in range(0, len(pcs)):
-            thread_pcs[int(thread_ids[i], 16)] = pcs[i]
-
-        result = dict()
-        result["thread_pcs"] = thread_pcs
-        result["pc_register"] = results["pc_register"]
-        result["little_endian"] = results["little_endian"]
-        return result
-
-    def switch_endian(self, egg):
-        return "".join(reversed(re.findall("..", egg)))
-
-    def parse_hw_info(self, context):
-        self.assertIsNotNone(context)
-        process_info = self.parse_process_info_response(context)
-        endian = process_info.get("endian")
-        reg_info = self.parse_register_info_packets(context)
-        (pc_lldb_reg_index, pc_reg_info) = self.find_pc_reg_info(reg_info)
-
-        hw_info = dict()
-        hw_info["pc_register"] = pc_lldb_reg_index
-        hw_info["little_endian"] = (endian == "little")
-        return hw_info
-
-    def gather_threads_info_pcs(self, pc_register, little_endian):
-        self.reset_test_sequence()
-        self.test_sequence.add_log_lines(
-                [
-                    "read packet: $jThreadsInfo#c1",
-                    {
-                        "direction": "send",
-                        "regex": r"^\$(.*)#[0-9a-fA-F]{2}$",
-                        "capture": {
-                            1: "threads_info"}},
-                ],
-                True)
-
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-        threads_info = context.get("threads_info")
-        register = str(pc_register)
-        # The jThreadsInfo response is not valid JSON data, so we have to
-        # clean it up first.
-        jthreads_info = json.loads(re.sub(r"}]", "}", threads_info))
-        thread_pcs = dict()
-        for thread_info in jthreads_info:
-            tid = thread_info["tid"]
-            pc = thread_info["registers"][register]
-            thread_pcs[tid] = self.switch_endian(pc) if little_endian else pc
-
-        return thread_pcs
-
-    def QListThreadsInStopReply_supported(self):
-        procs = self.prep_debug_monitor_and_inferior()
-        self.test_sequence.add_log_lines(
-            self.ENABLE_THREADS_IN_STOP_REPLY_ENTRIES, True)
-
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    @debugserver_test
-    def test_QListThreadsInStopReply_supported_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.QListThreadsInStopReply_supported()
-
-    @llgs_test
-    def test_QListThreadsInStopReply_supported_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.QListThreadsInStopReply_supported()
-
-    def stop_reply_reports_multiple_threads(self, thread_count):
-        # Gather threads from stop notification when QThreadsInStopReply is
-        # enabled.
-        stop_reply_threads = self.gather_stop_reply_threads(
-            self.ENABLE_THREADS_IN_STOP_REPLY_ENTRIES, thread_count)
-        self.assertEqual(len(stop_reply_threads), thread_count)
-
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    @debugserver_test
-    def test_stop_reply_reports_multiple_threads_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.stop_reply_reports_multiple_threads(5)
-
-    # In current implementation of llgs on Windows, as a response to '\x03' packet, the debugger
-    # of the native process will trigger a call to DebugBreakProcess that will create a new thread
-    # to handle the exception debug event. So one more stop thread will be notified to the
-    # delegate, e.g. llgs.  So tests below to assert the stop threads number will all fail.
-    @expectedFailureAll(oslist=["windows"])
-    @skipIfNetBSD
-    @llgs_test
-    def test_stop_reply_reports_multiple_threads_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.stop_reply_reports_multiple_threads(5)
-
-    def no_QListThreadsInStopReply_supplies_no_threads(self, thread_count):
-        # Gather threads from stop notification when QThreadsInStopReply is not
-        # enabled.
-        stop_reply_threads = self.gather_stop_reply_threads(None, thread_count)
-        self.assertEqual(len(stop_reply_threads), 0)
-
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    @debugserver_test
-    def test_no_QListThreadsInStopReply_supplies_no_threads_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.no_QListThreadsInStopReply_supplies_no_threads(5)
-
-    @expectedFailureAll(oslist=["windows"])
-    @skipIfNetBSD
-    @llgs_test
-    def test_no_QListThreadsInStopReply_supplies_no_threads_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.no_QListThreadsInStopReply_supplies_no_threads(5)
-
-    def stop_reply_reports_correct_threads(self, thread_count):
-        # Gather threads from stop notification when QThreadsInStopReply is
-        # enabled.
-        stop_reply_threads = self.gather_stop_reply_threads(
-            self.ENABLE_THREADS_IN_STOP_REPLY_ENTRIES, thread_count)
-        self.assertEqual(len(stop_reply_threads), thread_count)
-
-        # Gather threads from q{f,s}ThreadInfo.
-        self.reset_test_sequence()
-        self.add_threadinfo_collection_packets()
-
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        threads = self.parse_threadinfo_packets(context)
-        self.assertIsNotNone(threads)
-        self.assertEqual(len(threads), thread_count)
-
-        # Ensure each thread in q{f,s}ThreadInfo appears in stop reply threads
-        for tid in threads:
-            self.assertTrue(tid in stop_reply_threads)
-
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    @debugserver_test
-    def test_stop_reply_reports_correct_threads_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.stop_reply_reports_correct_threads(5)
-
-    @expectedFailureAll(oslist=["windows"])
-    @skipIfNetBSD
-    @llgs_test
-    def test_stop_reply_reports_correct_threads_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.stop_reply_reports_correct_threads(5)
-
-    def stop_reply_contains_thread_pcs(self, thread_count):
-        results = self.gather_stop_reply_pcs(
-                self.ENABLE_THREADS_IN_STOP_REPLY_ENTRIES, thread_count)
-        stop_reply_pcs = results["thread_pcs"]
-        pc_register = results["pc_register"]
-        little_endian = results["little_endian"]
-        self.assertEqual(len(stop_reply_pcs), thread_count)
-
-        threads_info_pcs = self.gather_threads_info_pcs(pc_register,
-                little_endian)
-
-        self.assertEqual(len(threads_info_pcs), thread_count)
-        for thread_id in stop_reply_pcs:
-            self.assertTrue(thread_id in threads_info_pcs)
-            self.assertTrue(int(stop_reply_pcs[thread_id], 16)
-                    == int(threads_info_pcs[thread_id], 16))
-
-    @expectedFailureAll(oslist=["windows"])
-    @skipIfNetBSD
-    @llgs_test
-    def test_stop_reply_contains_thread_pcs_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.stop_reply_contains_thread_pcs(5)
-
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    @debugserver_test
-    def test_stop_reply_contains_thread_pcs_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.stop_reply_contains_thread_pcs(5)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py
deleted file mode 100644 (file)
index 51dd0cb..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
-
-
-
-import unittest2
-import gdbremote_testcase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestGdbRemote_qThreadStopInfo(gdbremote_testcase.GdbRemoteTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    THREAD_COUNT = 5
-
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    @skipIfDarwinEmbedded # <rdar://problem/27005337>
-    def gather_stop_replies_via_qThreadStopInfo(self, thread_count):
-        # Set up the inferior args.
-        inferior_args = []
-        for i in range(thread_count - 1):
-            inferior_args.append("thread:new")
-        inferior_args.append("sleep:10")
-        procs = self.prep_debug_monitor_and_inferior(
-            inferior_args=inferior_args)
-
-        # Assumes test_sequence has anything added needed to setup the initial state.
-        # (Like optionally enabling QThreadsInStopReply.)
-        self.test_sequence.add_log_lines([
-            "read packet: $c#63"
-        ], True)
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Give threads time to start up, then break.
-        time.sleep(self._WAIT_TIMEOUT)
-        self.reset_test_sequence()
-        self.test_sequence.add_log_lines(
-            [
-                "read packet: {}".format(
-                    chr(3)),
-                {
-                    "direction": "send",
-                    "regex": r"^\$T([0-9a-fA-F]+)([^#]+)#[0-9a-fA-F]{2}$",
-                    "capture": {
-                        1: "stop_result",
-                        2: "key_vals_text"}},
-            ],
-            True)
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Wait until all threads have started.
-        threads = self.wait_for_thread_count(thread_count,
-                                             timeout_seconds=self._WAIT_TIMEOUT)
-        self.assertIsNotNone(threads)
-
-        # On Windows, there could be more threads spawned. For example, DebugBreakProcess will
-        # create a new thread from the debugged process to handle an exception event. So here we
-        # assert 'GreaterEqual' condition.
-        triple = self.dbg.GetSelectedPlatform().GetTriple()
-        if re.match(".*-.*-windows", triple):
-            self.assertGreaterEqual(len(threads), thread_count)
-        else:
-            self.assertEqual(len(threads), thread_count)
-
-        # Grab stop reply for each thread via qThreadStopInfo{tid:hex}.
-        stop_replies = {}
-        thread_dicts = {}
-        for thread in threads:
-            # Run the qThreadStopInfo command.
-            self.reset_test_sequence()
-            self.test_sequence.add_log_lines(
-                [
-                    "read packet: $qThreadStopInfo{:x}#00".format(thread),
-                    {
-                        "direction": "send",
-                        "regex": r"^\$T([0-9a-fA-F]+)([^#]+)#[0-9a-fA-F]{2}$",
-                        "capture": {
-                            1: "stop_result",
-                            2: "key_vals_text"}},
-                ],
-                True)
-            context = self.expect_gdbremote_sequence()
-            self.assertIsNotNone(context)
-
-            # Parse stop reply contents.
-            key_vals_text = context.get("key_vals_text")
-            self.assertIsNotNone(key_vals_text)
-            kv_dict = self.parse_key_val_dict(key_vals_text)
-            self.assertIsNotNone(kv_dict)
-
-            # Verify there is a thread and that it matches the expected thread
-            # id.
-            kv_thread = kv_dict.get("thread")
-            self.assertIsNotNone(kv_thread)
-            kv_thread_id = int(kv_thread, 16)
-            self.assertEqual(kv_thread_id, thread)
-
-            # Grab the stop id reported.
-            stop_result_text = context.get("stop_result")
-            self.assertIsNotNone(stop_result_text)
-            stop_replies[kv_thread_id] = int(stop_result_text, 16)
-
-            # Hang on to the key-val dictionary for the thread.
-            thread_dicts[kv_thread_id] = kv_dict
-
-        return (stop_replies, thread_dicts)
-
-    def qThreadStopInfo_works_for_multiple_threads(self, thread_count):
-        (stop_replies, _) = self.gather_stop_replies_via_qThreadStopInfo(thread_count)
-        triple = self.dbg.GetSelectedPlatform().GetTriple()
-        # Consider one more thread created by calling DebugBreakProcess.
-        if re.match(".*-.*-windows", triple):
-            self.assertGreaterEqual(len(stop_replies), thread_count)
-        else:
-            self.assertEqual(len(stop_replies), thread_count)
-
-    @debugserver_test
-    def test_qThreadStopInfo_works_for_multiple_threads_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.qThreadStopInfo_works_for_multiple_threads(self.THREAD_COUNT)
-
-    @llgs_test
-    @skipIfNetBSD
-    def test_qThreadStopInfo_works_for_multiple_threads_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.qThreadStopInfo_works_for_multiple_threads(self.THREAD_COUNT)
-
-    def qThreadStopInfo_only_reports_one_thread_stop_reason_during_interrupt(
-            self, thread_count):
-        (stop_replies, _) = self.gather_stop_replies_via_qThreadStopInfo(thread_count)
-        self.assertIsNotNone(stop_replies)
-
-        no_stop_reason_count = sum(
-            1 for stop_reason in list(
-                stop_replies.values()) if stop_reason == 0)
-        with_stop_reason_count = sum(
-            1 for stop_reason in list(
-                stop_replies.values()) if stop_reason != 0)
-
-        # All but one thread should report no stop reason.
-        triple = self.dbg.GetSelectedPlatform().GetTriple()
-
-        # Consider one more thread created by calling DebugBreakProcess.
-        if re.match(".*-.*-windows", triple):
-            self.assertGreaterEqual(no_stop_reason_count, thread_count - 1)
-        else:
-            self.assertEqual(no_stop_reason_count, thread_count - 1)
-
-        # Only one thread should should indicate a stop reason.
-        self.assertEqual(with_stop_reason_count, 1)
-
-    @debugserver_test
-    def test_qThreadStopInfo_only_reports_one_thread_stop_reason_during_interrupt_debugserver(
-            self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.qThreadStopInfo_only_reports_one_thread_stop_reason_during_interrupt(
-            self.THREAD_COUNT)
-
-    @expectedFailureNetBSD
-    @llgs_test
-    def test_qThreadStopInfo_only_reports_one_thread_stop_reason_during_interrupt_llgs(
-            self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.qThreadStopInfo_only_reports_one_thread_stop_reason_during_interrupt(
-            self.THREAD_COUNT)
-
-    def qThreadStopInfo_has_valid_thread_names(
-            self, thread_count, expected_thread_name):
-        (_, thread_dicts) = self.gather_stop_replies_via_qThreadStopInfo(thread_count)
-        self.assertIsNotNone(thread_dicts)
-
-        for thread_dict in list(thread_dicts.values()):
-            name = thread_dict.get("name")
-            self.assertIsNotNone(name)
-            self.assertEqual(name, expected_thread_name)
-
-    @unittest2.skip("MacOSX doesn't have a default thread name")
-    @debugserver_test
-    def test_qThreadStopInfo_has_valid_thread_names_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.qThreadStopInfo_has_valid_thread_names(self.THREAD_COUNT, "a.out")
-
-    # test requires OS with set, equal thread names by default.
-    # Windows thread does not have name property, equal names as the process's by default.
-    @skipUnlessPlatform(["linux", "windows"])
-    @llgs_test
-    def test_qThreadStopInfo_has_valid_thread_names_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.qThreadStopInfo_has_valid_thread_names(self.THREAD_COUNT, "a.out")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_vCont.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_vCont.py
deleted file mode 100644 (file)
index 3511b01..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-
-import gdbremote_testcase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestGdbRemote_vCont(gdbremote_testcase.GdbRemoteTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def vCont_supports_mode(self, mode, inferior_args=None):
-        # Setup the stub and set the gdb remote command stream.
-        procs = self.prep_debug_monitor_and_inferior(
-            inferior_args=inferior_args)
-        self.add_vCont_query_packets()
-
-        # Run the gdb remote command stream.
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Pull out supported modes.
-        supported_vCont_modes = self.parse_vCont_query_response(context)
-        self.assertIsNotNone(supported_vCont_modes)
-
-        # Verify we support the given mode.
-        self.assertTrue(mode in supported_vCont_modes)
-
-    def vCont_supports_c(self):
-        self.vCont_supports_mode("c")
-
-    def vCont_supports_C(self):
-        self.vCont_supports_mode("C")
-
-    def vCont_supports_s(self):
-        self.vCont_supports_mode("s")
-
-    def vCont_supports_S(self):
-        self.vCont_supports_mode("S")
-
-    @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337")
-    @debugserver_test
-    def test_vCont_supports_c_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.vCont_supports_c()
-
-    @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337")
-    @llgs_test
-    def test_vCont_supports_c_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.vCont_supports_c()
-
-    @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337")
-    @debugserver_test
-    def test_vCont_supports_C_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.vCont_supports_C()
-
-    @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337")
-    @llgs_test
-    def test_vCont_supports_C_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.vCont_supports_C()
-
-    @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337")
-    @debugserver_test
-    def test_vCont_supports_s_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.vCont_supports_s()
-
-    @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337")
-    @llgs_test
-    def test_vCont_supports_s_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.vCont_supports_s()
-
-    @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337")
-    @debugserver_test
-    def test_vCont_supports_S_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.vCont_supports_S()
-
-    @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337")
-    @llgs_test
-    def test_vCont_supports_S_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.vCont_supports_S()
-
-    @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337")
-    @debugserver_test
-    def test_single_step_only_steps_one_instruction_with_Hc_vCont_s_debugserver(
-            self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.single_step_only_steps_one_instruction(
-            use_Hc_packet=True, step_instruction="vCont;s")
-
-    @skipIfWindows # No pty support to test O* & I* notification packets.
-    @llgs_test
-    @expectedFailureAndroid(
-        bugnumber="llvm.org/pr24739",
-        archs=[
-            "arm",
-            "aarch64"])
-    @expectedFailureAll(
-        oslist=["linux"],
-        archs=["arm"],
-        bugnumber="llvm.org/pr24739")
-    @skipIf(triple='^mips')
-    @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337")
-    def test_single_step_only_steps_one_instruction_with_Hc_vCont_s_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.single_step_only_steps_one_instruction(
-            use_Hc_packet=True, step_instruction="vCont;s")
-
-    @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337")
-    @debugserver_test
-    def test_single_step_only_steps_one_instruction_with_vCont_s_thread_debugserver(
-            self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.single_step_only_steps_one_instruction(
-            use_Hc_packet=False, step_instruction="vCont;s:{thread}")
-
-    @skipIfWindows # No pty support to test O* & I* notification packets.
-    @llgs_test
-    @expectedFailureAndroid(
-        bugnumber="llvm.org/pr24739",
-        archs=[
-            "arm",
-            "aarch64"])
-    @expectedFailureAll(
-        oslist=["linux"],
-        archs=["arm"],
-        bugnumber="llvm.org/pr24739")
-    @skipIf(triple='^mips')
-    @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337")
-    def test_single_step_only_steps_one_instruction_with_vCont_s_thread_llgs(
-            self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.single_step_only_steps_one_instruction(
-            use_Hc_packet=False, step_instruction="vCont;s:{thread}")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_vContThreads.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_vContThreads.py
deleted file mode 100644 (file)
index e16a28a..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-
-import json
-import re
-
-import gdbremote_testcase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestGdbRemote_vContThreads(gdbremote_testcase.GdbRemoteTestCaseBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    def start_threads(self, num):
-        procs = self.prep_debug_monitor_and_inferior(
-            inferior_args=['thread:new'] * num + ['@started'])
-        # start the process and wait for output
-        self.test_sequence.add_log_lines([
-            "read packet: $c#63",
-            {"type": "output_match", "regex": self.maybe_strict_output_regex(
-                r"@started\r\n")},
-        ], True)
-        # then interrupt it
-        self.add_interrupt_packets()
-        self.add_threadinfo_collection_packets()
-
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-        threads = self.parse_threadinfo_packets(context)
-        self.assertIsNotNone(threads)
-        self.assertEqual(len(threads), num + 1)
-
-        self.reset_test_sequence()
-        return threads
-
-    def signal_one_thread(self):
-        threads = self.start_threads(1)
-        # try sending a signal to one of the two threads
-        self.test_sequence.add_log_lines([
-            "read packet: $vCont;C{0:x}:{1:x};c#00".format(
-                lldbutil.get_signal_number('SIGUSR1'), threads[0]),
-            {"direction": "send", "regex": r"^\$W00#b7$"},
-        ], True)
-
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-    @skipUnlessPlatform(["netbsd"])
-    @debugserver_test
-    def test_signal_one_thread_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.signal_one_thread()
-
-    @skipUnlessPlatform(["netbsd"])
-    @llgs_test
-    def test_signal_one_thread_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.signal_one_thread()
-
-    def signal_all_threads(self):
-        threads = self.start_threads(1)
-        # try sending a signal to two threads (= the process)
-        self.test_sequence.add_log_lines([
-            "read packet: $vCont;C{0:x}:{1:x};C{0:x}:{2:x}#00".format(
-                lldbutil.get_signal_number('SIGUSR1'),
-                threads[0], threads[1]),
-            {"direction": "send", "regex": r"^\$W00#b7$"},
-        ], True)
-
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-    @skipUnlessPlatform(["netbsd"])
-    @debugserver_test
-    def test_signal_all_threads_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.signal_all_threads()
-
-    @skipUnlessPlatform(["netbsd"])
-    @llgs_test
-    def test_signal_all_threads_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.signal_all_threads()
-
-    def signal_two_of_three_threads(self):
-        threads = self.start_threads(2)
-        # try sending a signal to 2 out of 3 threads
-        self.test_sequence.add_log_lines([
-            "read packet: $vCont;C{0:x}:{1:x};C{0:x}:{2:x};c#00".format(
-                lldbutil.get_signal_number('SIGUSR1'),
-                threads[1], threads[2]),
-            {"direction": "send", "regex": r"^\$E1e#db$"},
-        ], True)
-
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-    @skipUnlessPlatform(["netbsd"])
-    @debugserver_test
-    def test_signal_two_of_three_threads_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.signal_two_of_three_threads()
-
-    @skipUnlessPlatform(["netbsd"])
-    @llgs_test
-    def test_signal_two_of_three_threads_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.signal_two_of_three_threads()
-
-    def signal_two_signals(self):
-        threads = self.start_threads(1)
-        # try sending two different signals to two threads
-        self.test_sequence.add_log_lines([
-            "read packet: $vCont;C{0:x}:{1:x};C{2:x}:{3:x}#00".format(
-                lldbutil.get_signal_number('SIGUSR1'), threads[0],
-                lldbutil.get_signal_number('SIGUSR2'), threads[1]),
-            {"direction": "send", "regex": r"^\$E1e#db$"},
-        ], True)
-
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-    @skipUnlessPlatform(["netbsd"])
-    @debugserver_test
-    def test_signal_two_signals_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.signal_two_signals()
-
-    @skipUnlessPlatform(["netbsd"])
-    @llgs_test
-    def test_signal_two_signals_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.signal_two_signals()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py
deleted file mode 100644 (file)
index 2b7f28a..0000000
+++ /dev/null
@@ -1,1590 +0,0 @@
-"""
-Test case for testing the gdbremote protocol.
-
-Tests run against debugserver and lldb-server (llgs).
-lldb-server tests run where the lldb-server exe is
-available.
-
-This class will be broken into smaller test case classes by
-gdb remote packet functional areas.  For now it contains
-the initial set of tests implemented.
-"""
-
-from __future__ import division, print_function
-
-
-import unittest2
-import gdbremote_testcase
-import lldbgdbserverutils
-from lldbsuite.support import seven
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.lldbdwarf import *
-from lldbsuite.test import lldbutil
-
-
-class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcodeParser):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_exe_starts_debugserver(self):
-        self.init_debugserver_test()
-        server = self.connect_to_debug_monitor()
-
-    @llgs_test
-    def test_exe_starts_llgs(self):
-        self.init_llgs_test()
-        server = self.connect_to_debug_monitor()
-
-    def start_no_ack_mode(self):
-        server = self.connect_to_debug_monitor()
-        self.assertIsNotNone(server)
-
-        self.add_no_ack_remote_stream()
-        self.expect_gdbremote_sequence()
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_start_no_ack_mode_debugserver(self):
-        self.init_debugserver_test()
-        self.start_no_ack_mode()
-
-    @llgs_test
-    def test_start_no_ack_mode_llgs(self):
-        self.init_llgs_test()
-        self.start_no_ack_mode()
-
-    def thread_suffix_supported(self):
-        server = self.connect_to_debug_monitor()
-        self.assertIsNotNone(server)
-
-        self.add_no_ack_remote_stream()
-        self.test_sequence.add_log_lines(
-            ["lldb-server <  26> read packet: $QThreadSuffixSupported#e4",
-             "lldb-server <   6> send packet: $OK#9a"],
-            True)
-
-        self.expect_gdbremote_sequence()
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_thread_suffix_supported_debugserver(self):
-        self.init_debugserver_test()
-        self.thread_suffix_supported()
-
-    @llgs_test
-    def test_thread_suffix_supported_llgs(self):
-        self.init_llgs_test()
-        self.thread_suffix_supported()
-
-    def list_threads_in_stop_reply_supported(self):
-        server = self.connect_to_debug_monitor()
-        self.assertIsNotNone(server)
-
-        self.add_no_ack_remote_stream()
-        self.test_sequence.add_log_lines(
-            ["lldb-server <  27> read packet: $QListThreadsInStopReply#21",
-             "lldb-server <   6> send packet: $OK#9a"],
-            True)
-        self.expect_gdbremote_sequence()
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_list_threads_in_stop_reply_supported_debugserver(self):
-        self.init_debugserver_test()
-        self.list_threads_in_stop_reply_supported()
-
-    @llgs_test
-    def test_list_threads_in_stop_reply_supported_llgs(self):
-        self.init_llgs_test()
-        self.list_threads_in_stop_reply_supported()
-
-    def c_packet_works(self):
-        launch_args = self.install_and_create_launch_args()
-
-        server = self.connect_to_debug_monitor()
-        self.assertIsNotNone(server)
-
-        self.add_no_ack_remote_stream()
-        self.add_verified_launch_packets(launch_args)
-        self.test_sequence.add_log_lines(
-            ["read packet: $c#63",
-             "send packet: $W00#00"],
-            True)
-
-        self.expect_gdbremote_sequence()
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_c_packet_works_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.c_packet_works()
-
-    @llgs_test
-    def test_c_packet_works_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.c_packet_works()
-
-    def inferior_print_exit(self):
-        launch_args = self.install_and_create_launch_args()
-
-        server = self.connect_to_debug_monitor()
-        self.assertIsNotNone(server)
-
-        # build launch args
-        launch_args += ["hello, world"]
-
-        self.add_no_ack_remote_stream()
-        self.add_verified_launch_packets(launch_args)
-        self.test_sequence.add_log_lines(
-            ["read packet: $vCont;c#a8",
-             {"type": "output_match", "regex": self.maybe_strict_output_regex(r"hello, world\r\n")},
-             "send packet: $W00#00"],
-            True)
-
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_inferior_print_exit_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.inferior_print_exit()
-
-    @skipIfWindows # No pty support to test any inferior output
-    @llgs_test
-    @expectedFlakeyLinux("llvm.org/pr25652")
-    def test_inferior_print_exit_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.inferior_print_exit()
-
-    def first_launch_stop_reply_thread_matches_first_qC(self):
-        launch_args = self.install_and_create_launch_args()
-
-        server = self.connect_to_debug_monitor()
-        self.assertIsNotNone(server)
-
-        # build launch args
-        launch_args += ["hello, world"]
-
-        self.add_no_ack_remote_stream()
-        self.add_verified_launch_packets(launch_args)
-        self.test_sequence.add_log_lines(["read packet: $qC#00",
-                                          {"direction": "send",
-                                           "regex": r"^\$QC([0-9a-fA-F]+)#",
-                                           "capture": {1: "thread_id"}},
-                                          "read packet: $?#00",
-                                          {"direction": "send",
-                                              "regex": r"^\$T[0-9a-fA-F]{2}thread:([0-9a-fA-F]+)",
-                                              "expect_captures": {1: "thread_id"}}],
-                                         True)
-        self.expect_gdbremote_sequence()
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_first_launch_stop_reply_thread_matches_first_qC_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.first_launch_stop_reply_thread_matches_first_qC()
-
-    @llgs_test
-    def test_first_launch_stop_reply_thread_matches_first_qC_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.first_launch_stop_reply_thread_matches_first_qC()
-
-    def attach_commandline_continue_app_exits(self):
-        procs = self.prep_debug_monitor_and_inferior()
-        self.test_sequence.add_log_lines(
-            ["read packet: $vCont;c#a8",
-             "send packet: $W00#00"],
-            True)
-        self.expect_gdbremote_sequence()
-
-        # Wait a moment for completed and now-detached inferior process to
-        # clear.
-        time.sleep(1)
-
-        if not lldb.remote_platform:
-            # Process should be dead now. Reap results.
-            poll_result = procs["inferior"].poll()
-            self.assertIsNotNone(poll_result)
-
-        # Where possible, verify at the system level that the process is not
-        # running.
-        self.assertFalse(
-            lldbgdbserverutils.process_is_running(
-                procs["inferior"].pid, False))
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_attach_commandline_continue_app_exits_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_attach()
-        self.attach_commandline_continue_app_exits()
-
-    @expectedFailureNetBSD
-    @llgs_test
-    def test_attach_commandline_continue_app_exits_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_attach()
-        self.attach_commandline_continue_app_exits()
-
-    def qRegisterInfo_returns_one_valid_result(self):
-        launch_args = self.install_and_create_launch_args()
-
-        server = self.connect_to_debug_monitor()
-        self.assertIsNotNone(server)
-
-        # Build the expected protocol stream
-        self.add_no_ack_remote_stream()
-        self.add_verified_launch_packets(launch_args)
-        self.test_sequence.add_log_lines(
-            ["read packet: $qRegisterInfo0#00",
-             {"direction": "send", "regex": r"^\$(.+);#[0-9A-Fa-f]{2}", "capture": {1: "reginfo_0"}}],
-            True)
-
-        # Run the stream
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        reg_info_packet = context.get("reginfo_0")
-        self.assertIsNotNone(reg_info_packet)
-        self.assert_valid_reg_info(
-            lldbgdbserverutils.parse_reg_info_response(reg_info_packet))
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_qRegisterInfo_returns_one_valid_result_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.qRegisterInfo_returns_one_valid_result()
-
-    @llgs_test
-    def test_qRegisterInfo_returns_one_valid_result_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.qRegisterInfo_returns_one_valid_result()
-
-    def qRegisterInfo_returns_all_valid_results(self):
-        launch_args = self.install_and_create_launch_args()
-
-        server = self.connect_to_debug_monitor()
-        self.assertIsNotNone(server)
-
-        # Build the expected protocol stream.
-        self.add_no_ack_remote_stream()
-        self.add_verified_launch_packets(launch_args)
-        self.add_register_info_collection_packets()
-
-        # Run the stream.
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Validate that each register info returned validates.
-        for reg_info in self.parse_register_info_packets(context):
-            self.assert_valid_reg_info(reg_info)
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_qRegisterInfo_returns_all_valid_results_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.qRegisterInfo_returns_all_valid_results()
-
-    @llgs_test
-    def test_qRegisterInfo_returns_all_valid_results_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.qRegisterInfo_returns_all_valid_results()
-
-    def qRegisterInfo_contains_required_generics(self):
-        launch_args = self.install_and_create_launch_args()
-
-        server = self.connect_to_debug_monitor()
-        self.assertIsNotNone(server)
-
-        # Build the expected protocol stream
-        self.add_no_ack_remote_stream()
-        self.add_verified_launch_packets(launch_args)
-        self.add_register_info_collection_packets()
-
-        # Run the packet stream.
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Gather register info entries.
-        reg_infos = self.parse_register_info_packets(context)
-
-        # Collect all generic registers found.
-        generic_regs = {
-            reg_info['generic']: 1 for reg_info in reg_infos if 'generic' in reg_info}
-
-        # Ensure we have a program counter register.
-        self.assertTrue('pc' in generic_regs)
-
-        # Ensure we have a frame pointer register. PPC64le's FP is the same as SP
-        if self.getArchitecture() != 'powerpc64le':
-            self.assertTrue('fp' in generic_regs)
-
-        # Ensure we have a stack pointer register.
-        self.assertTrue('sp' in generic_regs)
-
-        # Ensure we have a flags register.
-        self.assertTrue('flags' in generic_regs)
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_qRegisterInfo_contains_required_generics_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.qRegisterInfo_contains_required_generics()
-
-    @llgs_test
-    def test_qRegisterInfo_contains_required_generics_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.qRegisterInfo_contains_required_generics()
-
-    def qRegisterInfo_contains_at_least_one_register_set(self):
-        launch_args = self.install_and_create_launch_args()
-
-        server = self.connect_to_debug_monitor()
-        self.assertIsNotNone(server)
-
-        # Build the expected protocol stream
-        self.add_no_ack_remote_stream()
-        self.add_verified_launch_packets(launch_args)
-        self.add_register_info_collection_packets()
-
-        # Run the packet stream.
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Gather register info entries.
-        reg_infos = self.parse_register_info_packets(context)
-
-        # Collect all register sets found.
-        register_sets = {
-            reg_info['set']: 1 for reg_info in reg_infos if 'set' in reg_info}
-        self.assertTrue(len(register_sets) >= 1)
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_qRegisterInfo_contains_at_least_one_register_set_debugserver(
-            self):
-        self.init_debugserver_test()
-        self.build()
-        self.qRegisterInfo_contains_at_least_one_register_set()
-
-    @llgs_test
-    def test_qRegisterInfo_contains_at_least_one_register_set_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.qRegisterInfo_contains_at_least_one_register_set()
-
-    def targetHasAVX(self):
-        triple = self.dbg.GetSelectedPlatform().GetTriple()
-
-        # TODO other platforms, please implement this function
-        if not re.match(".*-.*-linux", triple):
-            return True
-
-        # Need to do something different for non-Linux/Android targets
-        if lldb.remote_platform:
-            self.runCmd('platform get-file "/proc/cpuinfo" "cpuinfo"')
-            cpuinfo_path = "cpuinfo"
-            self.addTearDownHook(lambda: os.unlink("cpuinfo"))
-        else:
-            cpuinfo_path = "/proc/cpuinfo"
-
-        f = open(cpuinfo_path, 'r')
-        cpuinfo = f.read()
-        f.close()
-        return " avx " in cpuinfo
-
-    def qRegisterInfo_contains_avx_registers(self):
-        launch_args = self.install_and_create_launch_args()
-
-        server = self.connect_to_debug_monitor()
-        self.assertIsNotNone(server)
-
-        # Build the expected protocol stream
-        self.add_no_ack_remote_stream()
-        self.add_verified_launch_packets(launch_args)
-        self.add_register_info_collection_packets()
-
-        # Run the packet stream.
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Gather register info entries.
-        reg_infos = self.parse_register_info_packets(context)
-
-        # Collect all generics found.
-        register_sets = {
-            reg_info['set']: 1 for reg_info in reg_infos if 'set' in reg_info}
-        self.assertEqual(
-            self.targetHasAVX(),
-            "Advanced Vector Extensions" in register_sets)
-
-    @expectedFailureAll(oslist=["windows"]) # no avx for now.
-    @expectedFailureNetBSD
-    @llgs_test
-    def test_qRegisterInfo_contains_avx_registers_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.qRegisterInfo_contains_avx_registers()
-
-    def qThreadInfo_contains_thread(self):
-        procs = self.prep_debug_monitor_and_inferior()
-        self.add_threadinfo_collection_packets()
-
-        # Run the packet stream.
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Gather threadinfo entries.
-        threads = self.parse_threadinfo_packets(context)
-        self.assertIsNotNone(threads)
-
-        # We should have exactly one thread.
-        self.assertEqual(len(threads), 1)
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_qThreadInfo_contains_thread_launch_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.qThreadInfo_contains_thread()
-
-    @llgs_test
-    def test_qThreadInfo_contains_thread_launch_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.qThreadInfo_contains_thread()
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_qThreadInfo_contains_thread_attach_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_attach()
-        self.qThreadInfo_contains_thread()
-
-    @expectedFailureAll(oslist=["windows"]) # expect one more thread stopped
-    @expectedFailureNetBSD
-    @llgs_test
-    def test_qThreadInfo_contains_thread_attach_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_attach()
-        self.qThreadInfo_contains_thread()
-
-    def qThreadInfo_matches_qC(self):
-        procs = self.prep_debug_monitor_and_inferior()
-
-        self.add_threadinfo_collection_packets()
-        self.test_sequence.add_log_lines(
-            ["read packet: $qC#00",
-             {"direction": "send", "regex": r"^\$QC([0-9a-fA-F]+)#", "capture": {1: "thread_id"}}
-             ], True)
-
-        # Run the packet stream.
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Gather threadinfo entries.
-        threads = self.parse_threadinfo_packets(context)
-        self.assertIsNotNone(threads)
-
-        # We should have exactly one thread from threadinfo.
-        self.assertEqual(len(threads), 1)
-
-        # We should have a valid thread_id from $QC.
-        QC_thread_id_hex = context.get("thread_id")
-        self.assertIsNotNone(QC_thread_id_hex)
-        QC_thread_id = int(QC_thread_id_hex, 16)
-
-        # Those two should be the same.
-        self.assertEqual(threads[0], QC_thread_id)
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_qThreadInfo_matches_qC_launch_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.qThreadInfo_matches_qC()
-
-    @llgs_test
-    def test_qThreadInfo_matches_qC_launch_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.qThreadInfo_matches_qC()
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_qThreadInfo_matches_qC_attach_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_attach()
-        self.qThreadInfo_matches_qC()
-
-    @expectedFailureAll(oslist=["windows"]) # expect one more thread stopped
-    @expectedFailureNetBSD
-    @llgs_test
-    def test_qThreadInfo_matches_qC_attach_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_attach()
-        self.qThreadInfo_matches_qC()
-
-    def p_returns_correct_data_size_for_each_qRegisterInfo(self):
-        procs = self.prep_debug_monitor_and_inferior()
-        self.add_register_info_collection_packets()
-
-        # Run the packet stream.
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Gather register info entries.
-        reg_infos = self.parse_register_info_packets(context)
-        self.assertIsNotNone(reg_infos)
-        self.assertTrue(len(reg_infos) > 0)
-
-        byte_order = self.get_target_byte_order()
-
-        # Read value for each register.
-        reg_index = 0
-        for reg_info in reg_infos:
-            # Skip registers that don't have a register set.  For x86, these are
-            # the DRx registers, which have no LLDB-kind register number and thus
-            # cannot be read via normal
-            # NativeRegisterContext::ReadRegister(reg_info,...) calls.
-            if not "set" in reg_info:
-                continue
-
-            # Clear existing packet expectations.
-            self.reset_test_sequence()
-
-            # Run the register query
-            self.test_sequence.add_log_lines(
-                ["read packet: $p{0:x}#00".format(reg_index),
-                 {"direction": "send", "regex": r"^\$([0-9a-fA-F]+)#", "capture": {1: "p_response"}}],
-                True)
-            context = self.expect_gdbremote_sequence()
-            self.assertIsNotNone(context)
-
-            # Verify the response length.
-            p_response = context.get("p_response")
-            self.assertIsNotNone(p_response)
-
-            if "dynamic_size_dwarf_expr_bytes" in reg_info:
-                self.updateRegInfoBitsize(reg_info, byte_order)
-            self.assertEqual(len(p_response), 2 * int(reg_info["bitsize"]) / 8)
-
-            # Increment loop
-            reg_index += 1
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_p_returns_correct_data_size_for_each_qRegisterInfo_launch_debugserver(
-            self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.p_returns_correct_data_size_for_each_qRegisterInfo()
-
-    @expectedFailureNetBSD
-    @llgs_test
-    def test_p_returns_correct_data_size_for_each_qRegisterInfo_launch_llgs(
-            self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.p_returns_correct_data_size_for_each_qRegisterInfo()
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_p_returns_correct_data_size_for_each_qRegisterInfo_attach_debugserver(
-            self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_attach()
-        self.p_returns_correct_data_size_for_each_qRegisterInfo()
-
-    @expectedFailureNetBSD
-    @llgs_test
-    def test_p_returns_correct_data_size_for_each_qRegisterInfo_attach_llgs(
-            self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_attach()
-        self.p_returns_correct_data_size_for_each_qRegisterInfo()
-
-    def Hg_switches_to_3_threads(self):
-        # Startup the inferior with three threads (main + 2 new ones).
-        procs = self.prep_debug_monitor_and_inferior(
-            inferior_args=["thread:new", "thread:new"])
-
-        # Let the inferior process have a few moments to start up the thread
-        # when launched.  (The launch scenario has no time to run, so threads
-        # won't be there yet.)
-        self.run_process_then_stop(run_seconds=1)
-
-        # Wait at most x seconds for 3 threads to be present.
-        threads = self.wait_for_thread_count(3, timeout_seconds=self._WAIT_TIMEOUT)
-        self.assertEqual(len(threads), 3)
-
-        # verify we can $H to each thead, and $qC matches the thread we set.
-        for thread in threads:
-            # Change to each thread, verify current thread id.
-            self.reset_test_sequence()
-            self.test_sequence.add_log_lines(
-                ["read packet: $Hg{0:x}#00".format(thread),  # Set current thread.
-                 "send packet: $OK#00",
-                 "read packet: $qC#00",
-                 {"direction": "send", "regex": r"^\$QC([0-9a-fA-F]+)#", "capture": {1: "thread_id"}}],
-                True)
-
-            context = self.expect_gdbremote_sequence()
-            self.assertIsNotNone(context)
-
-            # Verify the thread id.
-            self.assertIsNotNone(context.get("thread_id"))
-            self.assertEqual(int(context.get("thread_id"), 16), thread)
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_Hg_switches_to_3_threads_launch_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.Hg_switches_to_3_threads()
-
-    @expectedFailureAll(oslist=["windows"]) # expect 4 threads
-    @llgs_test
-    def test_Hg_switches_to_3_threads_launch_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.Hg_switches_to_3_threads()
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_Hg_switches_to_3_threads_attach_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_attach()
-        self.Hg_switches_to_3_threads()
-
-    @expectedFailureAll(oslist=["windows"]) # expecting one more thread
-    @expectedFailureNetBSD
-    @llgs_test
-    def test_Hg_switches_to_3_threads_attach_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_attach()
-        self.Hg_switches_to_3_threads()
-
-    def Hc_then_Csignal_signals_correct_thread(self, segfault_signo):
-        # NOTE only run this one in inferior-launched mode: we can't grab inferior stdout when running attached,
-        # and the test requires getting stdout from the exe.
-
-        NUM_THREADS = 3
-
-        # Startup the inferior with three threads (main + NUM_THREADS-1 worker threads).
-        # inferior_args=["thread:print-ids"]
-        inferior_args = ["thread:segfault"]
-        for i in range(NUM_THREADS - 1):
-            # if i > 0:
-                # Give time between thread creation/segfaulting for the handler to work.
-                # inferior_args.append("sleep:1")
-            inferior_args.append("thread:new")
-        inferior_args.append("sleep:10")
-
-        # Launch/attach.  (In our case, this should only ever be launched since
-        # we need inferior stdout/stderr).
-        procs = self.prep_debug_monitor_and_inferior(
-            inferior_args=inferior_args)
-        self.test_sequence.add_log_lines(["read packet: $c#63"], True)
-        context = self.expect_gdbremote_sequence()
-
-        # Let the inferior process have a few moments to start up the thread when launched.
-        # context = self.run_process_then_stop(run_seconds=1)
-
-        # Wait at most x seconds for all threads to be present.
-        # threads = self.wait_for_thread_count(NUM_THREADS, timeout_seconds=5)
-        # self.assertEquals(len(threads), NUM_THREADS)
-
-        signaled_tids = {}
-        print_thread_ids = {}
-
-        # Switch to each thread, deliver a signal, and verify signal delivery
-        for i in range(NUM_THREADS - 1):
-            # Run until SIGSEGV comes in.
-            self.reset_test_sequence()
-            self.test_sequence.add_log_lines([{"direction": "send",
-                                               "regex": r"^\$T([0-9a-fA-F]{2})thread:([0-9a-fA-F]+);",
-                                               "capture": {1: "signo",
-                                                            2: "thread_id"}}],
-                                             True)
-
-            context = self.expect_gdbremote_sequence(timeout_seconds=self._DEFAULT_TIMEOUT)
-            self.assertIsNotNone(context)
-            signo = context.get("signo")
-            self.assertEqual(int(signo, 16), segfault_signo)
-
-            # Ensure we haven't seen this tid yet.
-            thread_id = int(context.get("thread_id"), 16)
-            self.assertFalse(thread_id in signaled_tids)
-            signaled_tids[thread_id] = 1
-
-            # Send SIGUSR1 to the thread that signaled the SIGSEGV.
-            self.reset_test_sequence()
-            self.test_sequence.add_log_lines(
-                [
-                    # Set the continue thread.
-                    # Set current thread.
-                    "read packet: $Hc{0:x}#00".format(thread_id),
-                    "send packet: $OK#00",
-
-                    # Continue sending the signal number to the continue thread.
-                    # The commented out packet is a way to do this same operation without using
-                    # a $Hc (but this test is testing $Hc, so we'll stick with the former).
-                    "read packet: $C{0:x}#00".format(lldbutil.get_signal_number('SIGUSR1')),
-                    # "read packet: $vCont;C{0:x}:{1:x};c#00".format(lldbutil.get_signal_number('SIGUSR1'), thread_id),
-
-                    # FIXME: Linux does not report the thread stop on the delivered signal (SIGUSR1 here).  MacOSX debugserver does.
-                    # But MacOSX debugserver isn't guaranteeing the thread the signal handler runs on, so currently its an XFAIL.
-                    # Need to rectify behavior here.  The linux behavior is more intuitive to me since we're essentially swapping out
-                    # an about-to-be-delivered signal (for which we already sent a stop packet) to a different signal.
-                    # {"direction":"send", "regex":r"^\$T([0-9a-fA-F]{2})thread:([0-9a-fA-F]+);", "capture":{1:"stop_signo", 2:"stop_thread_id"} },
-                    #  "read packet: $c#63",
-                    {"type": "output_match", "regex": r"^received SIGUSR1 on thread id: ([0-9a-fA-F]+)\r\nthread ([0-9a-fA-F]+): past SIGSEGV\r\n", "capture": {1: "print_thread_id", 2: "post_handle_thread_id"}},
-                ],
-                True)
-
-            # Run the sequence.
-            context = self.expect_gdbremote_sequence(
-                timeout_seconds=self._DEFAULT_TIMEOUT)
-            self.assertIsNotNone(context)
-
-            # Ensure the stop signal is the signal we delivered.
-            # stop_signo = context.get("stop_signo")
-            # self.assertIsNotNone(stop_signo)
-            # self.assertEquals(int(stop_signo,16), lldbutil.get_signal_number('SIGUSR1'))
-
-            # Ensure the stop thread is the thread to which we delivered the signal.
-            # stop_thread_id = context.get("stop_thread_id")
-            # self.assertIsNotNone(stop_thread_id)
-            # self.assertEquals(int(stop_thread_id,16), thread_id)
-
-            # Ensure we haven't seen this thread id yet.  The inferior's
-            # self-obtained thread ids are not guaranteed to match the stub
-            # tids (at least on MacOSX).
-            print_thread_id = context.get("print_thread_id")
-            self.assertIsNotNone(print_thread_id)
-            print_thread_id = int(print_thread_id, 16)
-            self.assertFalse(print_thread_id in print_thread_ids)
-
-            # Now remember this print (i.e. inferior-reflected) thread id and
-            # ensure we don't hit it again.
-            print_thread_ids[print_thread_id] = 1
-
-            # Ensure post signal-handle thread id matches the thread that
-            # initially raised the SIGSEGV.
-            post_handle_thread_id = context.get("post_handle_thread_id")
-            self.assertIsNotNone(post_handle_thread_id)
-            post_handle_thread_id = int(post_handle_thread_id, 16)
-            self.assertEqual(post_handle_thread_id, print_thread_id)
-
-    @unittest2.expectedFailure()
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_Hc_then_Csignal_signals_correct_thread_launch_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        # Darwin debugserver translates some signals like SIGSEGV into some gdb
-        # expectations about fixed signal numbers.
-        self.Hc_then_Csignal_signals_correct_thread(self.TARGET_EXC_BAD_ACCESS)
-
-    @skipIfWindows # no SIGSEGV support
-    @expectedFailureNetBSD
-    @llgs_test
-    def test_Hc_then_Csignal_signals_correct_thread_launch_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.Hc_then_Csignal_signals_correct_thread(
-            lldbutil.get_signal_number('SIGSEGV'))
-
-    def m_packet_reads_memory(self):
-        # This is the memory we will write into the inferior and then ensure we
-        # can read back with $m.
-        MEMORY_CONTENTS = "Test contents 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz"
-
-        # Start up the inferior.
-        procs = self.prep_debug_monitor_and_inferior(
-            inferior_args=[
-                "set-message:%s" %
-                MEMORY_CONTENTS,
-                "get-data-address-hex:g_message",
-                "sleep:5"])
-
-        # Run the process
-        self.test_sequence.add_log_lines(
-            [
-                # Start running after initial stop.
-                "read packet: $c#63",
-                # Match output line that prints the memory address of the message buffer within the inferior.
-                # Note we require launch-only testing so we can get inferior otuput.
-                {"type": "output_match", "regex": self.maybe_strict_output_regex(r"data address: 0x([0-9a-fA-F]+)\r\n"),
-                 "capture": {1: "message_address"}},
-                # Now stop the inferior.
-                "read packet: {}".format(chr(3)),
-                # And wait for the stop notification.
-                {"direction": "send", "regex": r"^\$T([0-9a-fA-F]{2})thread:([0-9a-fA-F]+);", "capture": {1: "stop_signo", 2: "stop_thread_id"}}],
-            True)
-
-        # Run the packet stream.
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Grab the message address.
-        self.assertIsNotNone(context.get("message_address"))
-        message_address = int(context.get("message_address"), 16)
-
-        # Grab contents from the inferior.
-        self.reset_test_sequence()
-        self.test_sequence.add_log_lines(
-            ["read packet: $m{0:x},{1:x}#00".format(message_address, len(MEMORY_CONTENTS)),
-             {"direction": "send", "regex": r"^\$(.+)#[0-9a-fA-F]{2}$", "capture": {1: "read_contents"}}],
-            True)
-
-        # Run the packet stream.
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Ensure what we read from inferior memory is what we wrote.
-        self.assertIsNotNone(context.get("read_contents"))
-        read_contents = seven.unhexlify(context.get("read_contents"))
-        self.assertEqual(read_contents, MEMORY_CONTENTS)
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_m_packet_reads_memory_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.m_packet_reads_memory()
-
-    @skipIfWindows # No pty support to test any inferior output
-    @llgs_test
-    def test_m_packet_reads_memory_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.m_packet_reads_memory()
-
-    def qMemoryRegionInfo_is_supported(self):
-        # Start up the inferior.
-        procs = self.prep_debug_monitor_and_inferior()
-
-        # Ask if it supports $qMemoryRegionInfo.
-        self.test_sequence.add_log_lines(
-            ["read packet: $qMemoryRegionInfo#00",
-             "send packet: $OK#00"
-             ], True)
-        self.expect_gdbremote_sequence()
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_qMemoryRegionInfo_is_supported_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.qMemoryRegionInfo_is_supported()
-
-    @llgs_test
-    def test_qMemoryRegionInfo_is_supported_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.qMemoryRegionInfo_is_supported()
-
-    def qMemoryRegionInfo_reports_code_address_as_executable(self):
-        # Start up the inferior.
-        procs = self.prep_debug_monitor_and_inferior(
-            inferior_args=["get-code-address-hex:hello", "sleep:5"])
-
-        # Run the process
-        self.test_sequence.add_log_lines(
-            [
-                # Start running after initial stop.
-                "read packet: $c#63",
-                # Match output line that prints the memory address of the message buffer within the inferior.
-                # Note we require launch-only testing so we can get inferior otuput.
-                {"type": "output_match", "regex": self.maybe_strict_output_regex(r"code address: 0x([0-9a-fA-F]+)\r\n"),
-                 "capture": {1: "code_address"}},
-                # Now stop the inferior.
-                "read packet: {}".format(chr(3)),
-                # And wait for the stop notification.
-                {"direction": "send", "regex": r"^\$T([0-9a-fA-F]{2})thread:([0-9a-fA-F]+);", "capture": {1: "stop_signo", 2: "stop_thread_id"}}],
-            True)
-
-        # Run the packet stream.
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Grab the code address.
-        self.assertIsNotNone(context.get("code_address"))
-        code_address = int(context.get("code_address"), 16)
-
-        # Grab memory region info from the inferior.
-        self.reset_test_sequence()
-        self.add_query_memory_region_packets(code_address)
-
-        # Run the packet stream.
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-        mem_region_dict = self.parse_memory_region_packet(context)
-
-        # Ensure there are no errors reported.
-        self.assertFalse("error" in mem_region_dict)
-
-        # Ensure code address is readable and executable.
-        self.assertTrue("permissions" in mem_region_dict)
-        self.assertTrue("r" in mem_region_dict["permissions"])
-        self.assertTrue("x" in mem_region_dict["permissions"])
-
-        # Ensure the start address and size encompass the address we queried.
-        self.assert_address_within_memory_region(code_address, mem_region_dict)
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_qMemoryRegionInfo_reports_code_address_as_executable_debugserver(
-            self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.qMemoryRegionInfo_reports_code_address_as_executable()
-
-    @skipIfWindows # No pty support to test any inferior output
-    @llgs_test
-    def test_qMemoryRegionInfo_reports_code_address_as_executable_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.qMemoryRegionInfo_reports_code_address_as_executable()
-
-    def qMemoryRegionInfo_reports_stack_address_as_readable_writeable(self):
-        # Start up the inferior.
-        procs = self.prep_debug_monitor_and_inferior(
-            inferior_args=["get-stack-address-hex:", "sleep:5"])
-
-        # Run the process
-        self.test_sequence.add_log_lines(
-            [
-                # Start running after initial stop.
-                "read packet: $c#63",
-                # Match output line that prints the memory address of the message buffer within the inferior.
-                # Note we require launch-only testing so we can get inferior otuput.
-                {"type": "output_match", "regex": self.maybe_strict_output_regex(r"stack address: 0x([0-9a-fA-F]+)\r\n"),
-                 "capture": {1: "stack_address"}},
-                # Now stop the inferior.
-                "read packet: {}".format(chr(3)),
-                # And wait for the stop notification.
-                {"direction": "send", "regex": r"^\$T([0-9a-fA-F]{2})thread:([0-9a-fA-F]+);", "capture": {1: "stop_signo", 2: "stop_thread_id"}}],
-            True)
-
-        # Run the packet stream.
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Grab the address.
-        self.assertIsNotNone(context.get("stack_address"))
-        stack_address = int(context.get("stack_address"), 16)
-
-        # Grab memory region info from the inferior.
-        self.reset_test_sequence()
-        self.add_query_memory_region_packets(stack_address)
-
-        # Run the packet stream.
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-        mem_region_dict = self.parse_memory_region_packet(context)
-
-        # Ensure there are no errors reported.
-        self.assertFalse("error" in mem_region_dict)
-
-        # Ensure address is readable and executable.
-        self.assertTrue("permissions" in mem_region_dict)
-        self.assertTrue("r" in mem_region_dict["permissions"])
-        self.assertTrue("w" in mem_region_dict["permissions"])
-
-        # Ensure the start address and size encompass the address we queried.
-        self.assert_address_within_memory_region(
-            stack_address, mem_region_dict)
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_qMemoryRegionInfo_reports_stack_address_as_readable_writeable_debugserver(
-            self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.qMemoryRegionInfo_reports_stack_address_as_readable_writeable()
-
-    @skipIfWindows # No pty support to test any inferior output
-    @llgs_test
-    def test_qMemoryRegionInfo_reports_stack_address_as_readable_writeable_llgs(
-            self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.qMemoryRegionInfo_reports_stack_address_as_readable_writeable()
-
-    def qMemoryRegionInfo_reports_heap_address_as_readable_writeable(self):
-        # Start up the inferior.
-        procs = self.prep_debug_monitor_and_inferior(
-            inferior_args=["get-heap-address-hex:", "sleep:5"])
-
-        # Run the process
-        self.test_sequence.add_log_lines(
-            [
-                # Start running after initial stop.
-                "read packet: $c#63",
-                # Match output line that prints the memory address of the message buffer within the inferior.
-                # Note we require launch-only testing so we can get inferior otuput.
-                {"type": "output_match", "regex": self.maybe_strict_output_regex(r"heap address: 0x([0-9a-fA-F]+)\r\n"),
-                 "capture": {1: "heap_address"}},
-                # Now stop the inferior.
-                "read packet: {}".format(chr(3)),
-                # And wait for the stop notification.
-                {"direction": "send", "regex": r"^\$T([0-9a-fA-F]{2})thread:([0-9a-fA-F]+);", "capture": {1: "stop_signo", 2: "stop_thread_id"}}],
-            True)
-
-        # Run the packet stream.
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Grab the address.
-        self.assertIsNotNone(context.get("heap_address"))
-        heap_address = int(context.get("heap_address"), 16)
-
-        # Grab memory region info from the inferior.
-        self.reset_test_sequence()
-        self.add_query_memory_region_packets(heap_address)
-
-        # Run the packet stream.
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-        mem_region_dict = self.parse_memory_region_packet(context)
-
-        # Ensure there are no errors reported.
-        self.assertFalse("error" in mem_region_dict)
-
-        # Ensure address is readable and executable.
-        self.assertTrue("permissions" in mem_region_dict)
-        self.assertTrue("r" in mem_region_dict["permissions"])
-        self.assertTrue("w" in mem_region_dict["permissions"])
-
-        # Ensure the start address and size encompass the address we queried.
-        self.assert_address_within_memory_region(heap_address, mem_region_dict)
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_qMemoryRegionInfo_reports_heap_address_as_readable_writeable_debugserver(
-            self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.qMemoryRegionInfo_reports_heap_address_as_readable_writeable()
-
-    @skipIfWindows # No pty support to test any inferior output
-    @llgs_test
-    def test_qMemoryRegionInfo_reports_heap_address_as_readable_writeable_llgs(
-            self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.qMemoryRegionInfo_reports_heap_address_as_readable_writeable()
-
-    def breakpoint_set_and_remove_work(self, want_hardware=False):
-        # Start up the inferior.
-        procs = self.prep_debug_monitor_and_inferior(
-            inferior_args=[
-                "get-code-address-hex:hello",
-                "sleep:1",
-                "call-function:hello"])
-
-        # Run the process
-        self.add_register_info_collection_packets()
-        self.add_process_info_collection_packets()
-        self.test_sequence.add_log_lines(
-            [  # Start running after initial stop.
-                "read packet: $c#63",
-                # Match output line that prints the memory address of the function call entry point.
-                # Note we require launch-only testing so we can get inferior otuput.
-                {"type": "output_match", "regex": self.maybe_strict_output_regex(r"code address: 0x([0-9a-fA-F]+)\r\n"),
-                 "capture": {1: "function_address"}},
-                # Now stop the inferior.
-                "read packet: {}".format(chr(3)),
-                # And wait for the stop notification.
-                {"direction": "send", "regex": r"^\$T([0-9a-fA-F]{2})thread:([0-9a-fA-F]+);", "capture": {1: "stop_signo", 2: "stop_thread_id"}}],
-            True)
-
-        # Run the packet stream.
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Gather process info - we need endian of target to handle register
-        # value conversions.
-        process_info = self.parse_process_info_response(context)
-        endian = process_info.get("endian")
-        self.assertIsNotNone(endian)
-
-        # Gather register info entries.
-        reg_infos = self.parse_register_info_packets(context)
-        (pc_lldb_reg_index, pc_reg_info) = self.find_pc_reg_info(reg_infos)
-        self.assertIsNotNone(pc_lldb_reg_index)
-        self.assertIsNotNone(pc_reg_info)
-
-        # Grab the function address.
-        self.assertIsNotNone(context.get("function_address"))
-        function_address = int(context.get("function_address"), 16)
-
-        # Get current target architecture
-        target_arch = self.getArchitecture()
-
-        # Set the breakpoint.
-        if (target_arch == "arm") or (target_arch == "aarch64"):
-            # TODO: Handle case when setting breakpoint in thumb code
-            BREAKPOINT_KIND = 4
-        else:
-            BREAKPOINT_KIND = 1
-
-        # Set default packet type to Z0 (software breakpoint)
-        z_packet_type = 0
-
-        # If hardware breakpoint is requested set packet type to Z1
-        if want_hardware == True:
-            z_packet_type = 1
-
-        self.reset_test_sequence()
-        self.add_set_breakpoint_packets(
-            function_address,
-            z_packet_type,
-            do_continue=True,
-            breakpoint_kind=BREAKPOINT_KIND)
-
-        # Run the packet stream.
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Verify the stop signal reported was the breakpoint signal number.
-        stop_signo = context.get("stop_signo")
-        self.assertIsNotNone(stop_signo)
-        self.assertEqual(int(stop_signo, 16),
-                         lldbutil.get_signal_number('SIGTRAP'))
-
-        # Ensure we did not receive any output.  If the breakpoint was not set, we would
-        # see output (from a launched process with captured stdio) printing a hello, world message.
-        # That would indicate the breakpoint didn't take.
-        self.assertEqual(len(context["O_content"]), 0)
-
-        # Verify that the PC for the main thread is where we expect it - right at the breakpoint address.
-        # This acts as a another validation on the register reading code.
-        self.reset_test_sequence()
-        self.test_sequence.add_log_lines(
-            [
-                # Print the PC.  This should match the breakpoint address.
-                "read packet: $p{0:x}#00".format(pc_lldb_reg_index),
-                # Capture $p results.
-                {"direction": "send",
-                 "regex": r"^\$([0-9a-fA-F]+)#",
-                 "capture": {1: "p_response"}},
-            ], True)
-
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Verify the PC is where we expect.  Note response is in endianness of
-        # the inferior.
-        p_response = context.get("p_response")
-        self.assertIsNotNone(p_response)
-
-        # Convert from target endian to int.
-        returned_pc = lldbgdbserverutils.unpack_register_hex_unsigned(
-            endian, p_response)
-        self.assertEqual(returned_pc, function_address)
-
-        # Verify that a breakpoint remove and continue gets us the expected
-        # output.
-        self.reset_test_sequence()
-
-        # Add breakpoint remove packets
-        self.add_remove_breakpoint_packets(
-            function_address,
-            z_packet_type,
-            breakpoint_kind=BREAKPOINT_KIND)
-
-        self.test_sequence.add_log_lines(
-            [
-                # Continue running.
-                "read packet: $c#63",
-                # We should now receive the output from the call.
-                {"type": "output_match", "regex": r"^hello, world\r\n$"},
-                # And wait for program completion.
-                {"direction": "send", "regex": r"^\$W00(.*)#[0-9a-fA-F]{2}$"},
-            ], True)
-
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_software_breakpoint_set_and_remove_work_debugserver(self):
-        self.init_debugserver_test()
-        if self.getArchitecture() == "arm":
-            # TODO: Handle case when setting breakpoint in thumb code
-            self.build(dictionary={'CFLAGS_EXTRAS': '-marm'})
-        else:
-            self.build()
-        self.set_inferior_startup_launch()
-        self.breakpoint_set_and_remove_work(want_hardware=False)
-
-    @skipIfWindows # No pty support to test any inferior output
-    @llgs_test
-    @expectedFlakeyLinux("llvm.org/pr25652")
-    def test_software_breakpoint_set_and_remove_work_llgs(self):
-        self.init_llgs_test()
-        if self.getArchitecture() == "arm":
-            # TODO: Handle case when setting breakpoint in thumb code
-            self.build(dictionary={'CFLAGS_EXTRAS': '-marm'})
-        else:
-            self.build()
-        self.set_inferior_startup_launch()
-        self.breakpoint_set_and_remove_work(want_hardware=False)
-
-    @debugserver_test
-    @skipUnlessPlatform(oslist=['linux'])
-    @expectedFailureAndroid
-    @skipIf(archs=no_match(['arm', 'aarch64']))
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_hardware_breakpoint_set_and_remove_work_debugserver(self):
-        self.init_debugserver_test()
-        if self.getArchitecture() == "arm":
-            # TODO: Handle case when setting breakpoint in thumb code
-            self.build(dictionary={'CFLAGS_EXTRAS': '-marm'})
-        else:
-            self.build()
-        self.set_inferior_startup_launch()
-        self.breakpoint_set_and_remove_work(want_hardware=True)
-
-    @llgs_test
-    @skipUnlessPlatform(oslist=['linux'])
-    @skipIf(archs=no_match(['arm', 'aarch64']))
-    def test_hardware_breakpoint_set_and_remove_work_llgs(self):
-        self.init_llgs_test()
-        if self.getArchitecture() == "arm":
-            # TODO: Handle case when setting breakpoint in thumb code
-            self.build(dictionary={'CFLAGS_EXTRAS': '-marm'})
-        else:
-            self.build()
-        self.set_inferior_startup_launch()
-        self.breakpoint_set_and_remove_work(want_hardware=True)
-
-    def qSupported_returns_known_stub_features(self):
-        # Start up the stub and start/prep the inferior.
-        procs = self.prep_debug_monitor_and_inferior()
-        self.add_qSupported_packets()
-
-        # Run the packet stream.
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Retrieve the qSupported features.
-        supported_dict = self.parse_qSupported_response(context)
-        self.assertIsNotNone(supported_dict)
-        self.assertTrue(len(supported_dict) > 0)
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_qSupported_returns_known_stub_features_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.qSupported_returns_known_stub_features()
-
-    @llgs_test
-    def test_qSupported_returns_known_stub_features_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.qSupported_returns_known_stub_features()
-
-    def written_M_content_reads_back_correctly(self):
-        TEST_MESSAGE = "Hello, memory"
-
-        # Start up the stub and start/prep the inferior.
-        procs = self.prep_debug_monitor_and_inferior(
-            inferior_args=[
-                "set-message:xxxxxxxxxxxxxX",
-                "get-data-address-hex:g_message",
-                "sleep:1",
-                "print-message:"])
-        self.test_sequence.add_log_lines(
-            [
-                # Start running after initial stop.
-                "read packet: $c#63",
-                # Match output line that prints the memory address of the message buffer within the inferior.
-                # Note we require launch-only testing so we can get inferior otuput.
-                {"type": "output_match", "regex": self.maybe_strict_output_regex(r"data address: 0x([0-9a-fA-F]+)\r\n"),
-                 "capture": {1: "message_address"}},
-                # Now stop the inferior.
-                "read packet: {}".format(chr(3)),
-                # And wait for the stop notification.
-                {"direction": "send", "regex": r"^\$T([0-9a-fA-F]{2})thread:([0-9a-fA-F]+);", "capture": {1: "stop_signo", 2: "stop_thread_id"}}],
-            True)
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Grab the message address.
-        self.assertIsNotNone(context.get("message_address"))
-        message_address = int(context.get("message_address"), 16)
-
-        # Hex-encode the test message, adding null termination.
-        hex_encoded_message = seven.hexlify(TEST_MESSAGE)
-
-        # Write the message to the inferior. Verify that we can read it with the hex-encoded (m)
-        # and binary (x) memory read packets.
-        self.reset_test_sequence()
-        self.test_sequence.add_log_lines(
-            ["read packet: $M{0:x},{1:x}:{2}#00".format(message_address, len(TEST_MESSAGE), hex_encoded_message),
-             "send packet: $OK#00",
-             "read packet: $m{0:x},{1:x}#00".format(message_address, len(TEST_MESSAGE)),
-             "send packet: ${0}#00".format(hex_encoded_message),
-             "read packet: $x{0:x},{1:x}#00".format(message_address, len(TEST_MESSAGE)),
-             "send packet: ${0}#00".format(TEST_MESSAGE),
-             "read packet: $m{0:x},4#00".format(message_address),
-             "send packet: ${0}#00".format(hex_encoded_message[0:8]),
-             "read packet: $x{0:x},4#00".format(message_address),
-             "send packet: ${0}#00".format(TEST_MESSAGE[0:4]),
-             "read packet: $c#63",
-             {"type": "output_match", "regex": r"^message: (.+)\r\n$", "capture": {1: "printed_message"}},
-             "send packet: $W00#00",
-             ], True)
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Ensure what we read from inferior memory is what we wrote.
-        printed_message = context.get("printed_message")
-        self.assertIsNotNone(printed_message)
-        self.assertEqual(printed_message, TEST_MESSAGE + "X")
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_written_M_content_reads_back_correctly_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.written_M_content_reads_back_correctly()
-
-    @skipIfWindows # No pty support to test any inferior output
-    @llgs_test
-    @expectedFlakeyLinux("llvm.org/pr25652")
-    def test_written_M_content_reads_back_correctly_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.written_M_content_reads_back_correctly()
-
-    def P_writes_all_gpr_registers(self):
-        # Start inferior debug session, grab all register info.
-        procs = self.prep_debug_monitor_and_inferior(inferior_args=["sleep:2"])
-        self.add_register_info_collection_packets()
-        self.add_process_info_collection_packets()
-
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Process register infos.
-        reg_infos = self.parse_register_info_packets(context)
-        self.assertIsNotNone(reg_infos)
-        self.add_lldb_register_index(reg_infos)
-
-        # Process endian.
-        process_info = self.parse_process_info_response(context)
-        endian = process_info.get("endian")
-        self.assertIsNotNone(endian)
-
-        # Pull out the register infos that we think we can bit flip
-        # successfully,.
-        gpr_reg_infos = [
-            reg_info for reg_info in reg_infos if self.is_bit_flippable_register(reg_info)]
-        self.assertTrue(len(gpr_reg_infos) > 0)
-
-        # Write flipped bit pattern of existing value to each register.
-        (successful_writes, failed_writes) = self.flip_all_bits_in_each_register_value(
-            gpr_reg_infos, endian)
-        # print("successful writes: {}, failed writes: {}".format(successful_writes, failed_writes))
-        self.assertTrue(successful_writes > 0)
-
-    # Note: as of this moment, a hefty number of the GPR writes are failing with E32 (everything except rax-rdx, rdi, rsi, rbp).
-    # Come back to this.  I have the test rigged to verify that at least some
-    # of the bit-flip writes work.
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_P_writes_all_gpr_registers_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.P_writes_all_gpr_registers()
-
-    @llgs_test
-    def test_P_writes_all_gpr_registers_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.P_writes_all_gpr_registers()
-
-    def P_and_p_thread_suffix_work(self):
-        # Startup the inferior with three threads.
-        procs = self.prep_debug_monitor_and_inferior(
-            inferior_args=["thread:new", "thread:new"])
-        self.add_thread_suffix_request_packets()
-        self.add_register_info_collection_packets()
-        self.add_process_info_collection_packets()
-
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        process_info = self.parse_process_info_response(context)
-        self.assertIsNotNone(process_info)
-        endian = process_info.get("endian")
-        self.assertIsNotNone(endian)
-
-        reg_infos = self.parse_register_info_packets(context)
-        self.assertIsNotNone(reg_infos)
-        self.add_lldb_register_index(reg_infos)
-
-        reg_index = self.select_modifiable_register(reg_infos)
-        self.assertIsNotNone(reg_index)
-        reg_byte_size = int(reg_infos[reg_index]["bitsize"]) // 8
-        self.assertTrue(reg_byte_size > 0)
-
-        # Run the process a bit so threads can start up, and collect register
-        # info.
-        context = self.run_process_then_stop(run_seconds=1)
-        self.assertIsNotNone(context)
-
-        # Wait for 3 threads to be present.
-        threads = self.wait_for_thread_count(3, timeout_seconds=self._WAIT_TIMEOUT)
-        self.assertEqual(len(threads), 3)
-
-        expected_reg_values = []
-        register_increment = 1
-        next_value = None
-
-        # Set the same register in each of 3 threads to a different value.
-        # Verify each one has the unique value.
-        for thread in threads:
-            # If we don't have a next value yet, start it with the initial read
-            # value + 1
-            if not next_value:
-                # Read pre-existing register value.
-                self.reset_test_sequence()
-                self.test_sequence.add_log_lines(
-                    ["read packet: $p{0:x};thread:{1:x}#00".format(reg_index, thread),
-                     {"direction": "send", "regex": r"^\$([0-9a-fA-F]+)#", "capture": {1: "p_response"}},
-                     ], True)
-                context = self.expect_gdbremote_sequence()
-                self.assertIsNotNone(context)
-
-                # Set the next value to use for writing as the increment plus
-                # current value.
-                p_response = context.get("p_response")
-                self.assertIsNotNone(p_response)
-                next_value = lldbgdbserverutils.unpack_register_hex_unsigned(
-                    endian, p_response)
-
-            # Set new value using P and thread suffix.
-            self.reset_test_sequence()
-            self.test_sequence.add_log_lines(
-                [
-                    "read packet: $P{0:x}={1};thread:{2:x}#00".format(
-                        reg_index,
-                        lldbgdbserverutils.pack_register_hex(
-                            endian,
-                            next_value,
-                            byte_size=reg_byte_size),
-                        thread),
-                    "send packet: $OK#00",
-                ],
-                True)
-            context = self.expect_gdbremote_sequence()
-            self.assertIsNotNone(context)
-
-            # Save the value we set.
-            expected_reg_values.append(next_value)
-
-            # Increment value for next thread to use (we want them all
-            # different so we can verify they wrote to each thread correctly
-            # next.)
-            next_value += register_increment
-
-        # Revisit each thread and verify they have the expected value set for
-        # the register we wrote.
-        thread_index = 0
-        for thread in threads:
-            # Read pre-existing register value.
-            self.reset_test_sequence()
-            self.test_sequence.add_log_lines(
-                ["read packet: $p{0:x};thread:{1:x}#00".format(reg_index, thread),
-                 {"direction": "send", "regex": r"^\$([0-9a-fA-F]+)#", "capture": {1: "p_response"}},
-                 ], True)
-            context = self.expect_gdbremote_sequence()
-            self.assertIsNotNone(context)
-
-            # Get the register value.
-            p_response = context.get("p_response")
-            self.assertIsNotNone(p_response)
-            read_value = lldbgdbserverutils.unpack_register_hex_unsigned(
-                endian, p_response)
-
-            # Make sure we read back what we wrote.
-            self.assertEqual(read_value, expected_reg_values[thread_index])
-            thread_index += 1
-
-    # Note: as of this moment, a hefty number of the GPR writes are failing
-    # with E32 (everything except rax-rdx, rdi, rsi, rbp).
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_P_and_p_thread_suffix_work_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.P_and_p_thread_suffix_work()
-
-    @skipIfWindows
-    @llgs_test
-    def test_P_and_p_thread_suffix_work_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.P_and_p_thread_suffix_work()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/commandline/TestStubReverseConnect.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/commandline/TestStubReverseConnect.py
deleted file mode 100644 (file)
index 664b600..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-from __future__ import print_function
-
-import gdbremote_testcase
-import lldbgdbserverutils
-import re
-import select
-import socket
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestStubReverseConnect(gdbremote_testcase.GdbRemoteTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    _DEFAULT_TIMEOUT = 20 * (10 if ('ASAN_OPTIONS' in os.environ) else 1)
-
-    def setUp(self):
-        # Set up the test.
-        gdbremote_testcase.GdbRemoteTestCaseBase.setUp(self)
-
-        # Create a listener on a local port.
-        self.listener_socket = self.create_listener_socket()
-        self.assertIsNotNone(self.listener_socket)
-        self.listener_port = self.listener_socket.getsockname()[1]
-
-    def create_listener_socket(self, timeout_seconds=_DEFAULT_TIMEOUT):
-        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-        self.assertIsNotNone(sock)
-
-        sock.settimeout(timeout_seconds)
-        sock.bind(("127.0.0.1", 0))
-        sock.listen(1)
-
-        def tear_down_listener():
-            try:
-                sock.shutdown(socket.SHUT_RDWR)
-            except:
-                # ignore
-                None
-
-        self.addTearDownHook(tear_down_listener)
-        return sock
-
-    def reverse_connect_works(self):
-        # Indicate stub startup should do a reverse connect.
-        appended_stub_args = ["--reverse-connect"]
-        if self.debug_monitor_extra_args:
-            self.debug_monitor_extra_args += appended_stub_args
-        else:
-            self.debug_monitor_extra_args = appended_stub_args
-
-        self.stub_hostname = "127.0.0.1"
-        self.port = self.listener_port
-
-        triple = self.dbg.GetSelectedPlatform().GetTriple()
-        if re.match(".*-.*-.*-android", triple):
-            self.forward_adb_port(
-                self.port,
-                self.port,
-                "reverse",
-                self.stub_device)
-
-        # Start the stub.
-        server = self.launch_debug_monitor(logfile=sys.stdout)
-        self.assertIsNotNone(server)
-        self.assertTrue(
-            lldbgdbserverutils.process_is_running(
-                server.pid, True))
-
-        # Listen for the stub's connection to us.
-        (stub_socket, address) = self.listener_socket.accept()
-        self.assertIsNotNone(stub_socket)
-        self.assertIsNotNone(address)
-        print("connected to stub {} on {}".format(
-            address, stub_socket.getsockname()))
-
-        # Verify we can do the handshake.  If that works, we'll call it good.
-        self.do_handshake(stub_socket, timeout_seconds=self._DEFAULT_TIMEOUT)
-
-        # Clean up.
-        stub_socket.shutdown(socket.SHUT_RDWR)
-
-    @debugserver_test
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def test_reverse_connect_works_debugserver(self):
-        self.init_debugserver_test(use_named_pipe=False)
-        self.set_inferior_startup_launch()
-        self.reverse_connect_works()
-
-    @llgs_test
-    @skipIfRemote  # reverse connect is not a supported use case for now
-    def test_reverse_connect_works_llgs(self):
-        self.init_llgs_test(use_named_pipe=False)
-        self.set_inferior_startup_launch()
-        self.reverse_connect_works()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/commandline/TestStubSetSID.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/commandline/TestStubSetSID.py
deleted file mode 100644 (file)
index 4641b17..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-import gdbremote_testcase
-import lldbgdbserverutils
-import os
-import select
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestStubSetSIDTestCase(gdbremote_testcase.GdbRemoteTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def get_stub_sid(self, extra_stub_args=None):
-        # Launch debugserver
-        if extra_stub_args:
-            self.debug_monitor_extra_args += extra_stub_args
-
-        server = self.launch_debug_monitor()
-        self.assertIsNotNone(server)
-        self.assertTrue(
-            lldbgdbserverutils.process_is_running(
-                server.pid, True))
-
-        # Get the process id for the stub.
-        return os.getsid(server.pid)
-
-    def sid_is_same_without_setsid(self):
-        stub_sid = self.get_stub_sid()
-        self.assertEqual(stub_sid, os.getsid(0))
-
-    def sid_is_different_with_setsid(self):
-        stub_sid = self.get_stub_sid(["--setsid"])
-        self.assertNotEqual(stub_sid, os.getsid(0))
-
-    def sid_is_different_with_S(self):
-        stub_sid = self.get_stub_sid(["-S"])
-        self.assertNotEqual(stub_sid, os.getsid(0))
-
-    @debugserver_test
-    @skipIfRemote  # --setsid not used on remote platform and currently it is also impossible to get the sid of lldb-platform running on a remote target
-    def test_sid_is_same_without_setsid_debugserver(self):
-        self.init_debugserver_test()
-        self.set_inferior_startup_launch()
-        self.sid_is_same_without_setsid()
-
-    @skipIfWindows
-    @llgs_test
-    @skipIfRemote  # --setsid not used on remote platform and currently it is also impossible to get the sid of lldb-platform running on a remote target
-    @expectedFailureAll(oslist=['freebsd'])
-    def test_sid_is_same_without_setsid_llgs(self):
-        self.init_llgs_test()
-        self.set_inferior_startup_launch()
-        self.sid_is_same_without_setsid()
-
-    @debugserver_test
-    @skipIfRemote  # --setsid not used on remote platform and currently it is also impossible to get the sid of lldb-platform running on a remote target
-    def test_sid_is_different_with_setsid_debugserver(self):
-        self.init_debugserver_test()
-        self.set_inferior_startup_launch()
-        self.sid_is_different_with_setsid()
-
-    @skipIfWindows
-    @llgs_test
-    @skipIfRemote  # --setsid not used on remote platform and currently it is also impossible to get the sid of lldb-platform running on a remote target
-    def test_sid_is_different_with_setsid_llgs(self):
-        self.init_llgs_test()
-        self.set_inferior_startup_launch()
-        self.sid_is_different_with_setsid()
-
-    @debugserver_test
-    @skipIfRemote  # --setsid not used on remote platform and currently it is also impossible to get the sid of lldb-platform running on a remote target
-    def test_sid_is_different_with_S_debugserver(self):
-        self.init_debugserver_test()
-        self.set_inferior_startup_launch()
-        self.sid_is_different_with_S()
-
-    @skipIfWindows
-    @llgs_test
-    @skipIfRemote  # --setsid not used on remote platform and currently it is also impossible to get the sid of lldb-platform running on a remote target
-    def test_sid_is_different_with_S_llgs(self):
-        self.init_llgs_test()
-        self.set_inferior_startup_launch()
-        self.sid_is_different_with_S()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/Makefile
deleted file mode 100644 (file)
index 536d2e8..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-CFLAGS_EXTRAS := -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -std=c++11
-# LD_EXTRAS := -lpthread
-CXX_SOURCES := main.cpp
-MAKE_DSYM :=NO
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py
deleted file mode 100644 (file)
index 5292913..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-import gdbremote_testcase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestGdbRemoteAbort(gdbremote_testcase.GdbRemoteTestCaseBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def inferior_abort_received(self):
-        procs = self.prep_debug_monitor_and_inferior(inferior_args=["abort"])
-        self.assertIsNotNone(procs)
-
-        self.test_sequence.add_log_lines(["read packet: $vCont;c#a8",
-                                          {"direction": "send",
-                                           "regex": r"^\$T([0-9a-fA-F]{2}).*#[0-9a-fA-F]{2}$",
-                                           "capture": {1: "hex_exit_code"}},
-                                          ],
-                                         True)
-
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        hex_exit_code = context.get("hex_exit_code")
-        self.assertIsNotNone(hex_exit_code)
-        self.assertEqual(int(hex_exit_code, 16),
-                         lldbutil.get_signal_number('SIGABRT'))
-
-    @debugserver_test
-    def test_inferior_abort_received_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.inferior_abort_received()
-
-    @skipIfWindows # No signal is sent on Windows.
-    @llgs_test
-    # std::abort() on <= API 16 raises SIGSEGV - b.android.com/179836
-    @expectedFailureAndroid(api_levels=list(range(16 + 1)))
-    def test_inferior_abort_received_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.inferior_abort_received()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py
deleted file mode 100644 (file)
index e0ba3d7..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-import gdbremote_testcase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestGdbRemoteSegFault(gdbremote_testcase.GdbRemoteTestCaseBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    GDB_REMOTE_STOP_CODE_BAD_ACCESS = 0x91
-
-    @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
-    def inferior_seg_fault_received(self, expected_signo):
-        procs = self.prep_debug_monitor_and_inferior(
-            inferior_args=["segfault"])
-        self.assertIsNotNone(procs)
-
-        self.test_sequence.add_log_lines(["read packet: $vCont;c#a8",
-                                          {"direction": "send",
-                                           "regex": r"^\$T([0-9a-fA-F]{2}).*#[0-9a-fA-F]{2}$",
-                                           "capture": {1: "hex_exit_code"}},
-                                          ],
-                                         True)
-
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        hex_exit_code = context.get("hex_exit_code")
-        self.assertIsNotNone(hex_exit_code)
-        self.assertEqual(int(hex_exit_code, 16), expected_signo)
-
-    @debugserver_test
-    def test_inferior_seg_fault_received_debugserver(self):
-        self.init_debugserver_test()
-        self.build()
-        self.inferior_seg_fault_received(self.GDB_REMOTE_STOP_CODE_BAD_ACCESS)
-
-    @skipIfWindows # No signal is sent on Windows.
-    @llgs_test
-    def test_inferior_seg_fault_received_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.inferior_seg_fault_received(lldbutil.get_signal_number('SIGSEGV'))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/main.cpp
deleted file mode 100644 (file)
index ced7f71..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#include <cstdlib>
-#include <cstring>
-#include <iostream>
-
-namespace {
-const char *const SEGFAULT_COMMAND = "segfault";
-const char *const ABORT_COMMAND = "abort";
-}
-
-int main(int argc, char **argv) {
-  if (argc < 2) {
-    std::cout << "expected at least one command provided on the command line"
-              << std::endl;
-  }
-
-  // Process command line args.
-  for (int i = 1; i < argc; ++i) {
-    const char *const command = argv[i];
-    if (std::strstr(command, SEGFAULT_COMMAND)) {
-      // Perform a null pointer access.
-      int *const null_int_ptr = nullptr;
-      *null_int_ptr = 0xDEAD;
-    } else if (std::strstr(command, ABORT_COMMAND)) {
-      std::abort();
-    } else {
-      std::cout << "Unsupported command: " << command << std::endl;
-    }
-  }
-
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/Makefile
deleted file mode 100644 (file)
index 5b5c1dc..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-LIB_PREFIX := svr4lib
-LD_EXTRAS := -L. -lsvr4lib_a -lsvr4lib_b\"
-CXX_SOURCES := main.cpp
-USE_LIBDL := 1
-MAKE_DSYM := NO
-
-a.out: svr4lib_a svr4lib_b_quote
-
-include Makefile.rules
-
-svr4lib_a:
-       $(MAKE) -f $(MAKEFILE_RULES) \
-               DYLIB_NAME=svr4lib_a DYLIB_CXX_SOURCES=svr4lib_a.cpp \
-               DYLIB_ONLY=YES
-
-svr4lib_b_quote:
-       $(MAKE) -f $(MAKEFILE_RULES) \
-               DYLIB_NAME=svr4lib_b\\\" DYLIB_CXX_SOURCES=svr4lib_b_quote.cpp \
-               DYLIB_ONLY=YES
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py
deleted file mode 100644 (file)
index 2081d9f..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-import xml.etree.ElementTree as ET
-
-import gdbremote_testcase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-
-
-class TestGdbRemoteLibrariesSvr4Support(gdbremote_testcase.GdbRemoteTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    FEATURE_NAME = "qXfer:libraries-svr4:read"
-
-    def setup_test(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        env = {}
-        env[self.dylibPath] = self.getBuildDir()
-        self.prep_debug_monitor_and_inferior(inferior_env=env)
-        self.continue_process_and_wait_for_stop()
-
-    def get_expected_libs(self):
-        return ["libsvr4lib_a.so", 'libsvr4lib_b".so']
-
-    def has_libraries_svr4_support(self):
-        self.add_qSupported_packets()
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-        features = self.parse_qSupported_response(context)
-        return self.FEATURE_NAME in features and features[self.FEATURE_NAME] == "+"
-
-    def get_libraries_svr4_data(self):
-        # Start up llgs and inferior, and check for libraries-svr4 support.
-        if not self.has_libraries_svr4_support():
-            self.skipTest("libraries-svr4 not supported")
-
-        # Grab the libraries-svr4 data.
-        self.reset_test_sequence()
-        self.test_sequence.add_log_lines(
-            [
-                "read packet: $qXfer:libraries-svr4:read::0,ffff:#00",
-                {
-                    "direction": "send",
-                    "regex": re.compile(
-                        r"^\$([^E])(.*)#[0-9a-fA-F]{2}$", re.MULTILINE | re.DOTALL
-                    ),
-                    "capture": {1: "response_type", 2: "content_raw"},
-                },
-            ],
-            True,
-        )
-
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Ensure we end up with all libraries-svr4 data in one packet.
-        self.assertEqual(context.get("response_type"), "l")
-
-        # Decode binary data.
-        content_raw = context.get("content_raw")
-        self.assertIsNotNone(content_raw)
-        return content_raw
-
-    def get_libraries_svr4_xml(self):
-        libraries_svr4 = self.get_libraries_svr4_data()
-        xml_root = None
-        try:
-            xml_root = ET.fromstring(libraries_svr4)
-        except xml.etree.ElementTree.ParseError:
-            pass
-        self.assertIsNotNone(xml_root, "Malformed libraries-svr4 XML")
-        return xml_root
-
-    def libraries_svr4_well_formed(self):
-        xml_root = self.get_libraries_svr4_xml()
-        self.assertEqual(xml_root.tag, "library-list-svr4")
-        for child in xml_root:
-            self.assertEqual(child.tag, "library")
-            self.assertItemsEqual(child.attrib.keys(), ["name", "lm", "l_addr", "l_ld"])
-
-    def libraries_svr4_has_correct_load_addr(self):
-        xml_root = self.get_libraries_svr4_xml()
-        for child in xml_root:
-            name = child.attrib.get("name")
-            base_name = os.path.basename(name)
-            if os.path.basename(name) not in self.get_expected_libs():
-                continue
-            load_addr = int(child.attrib.get("l_addr"), 16)
-            self.reset_test_sequence()
-            self.add_query_memory_region_packets(load_addr)
-            context = self.expect_gdbremote_sequence()
-            mem_region = self.parse_memory_region_packet(context)
-            self.assertEqual(load_addr, int(mem_region.get("start", 0), 16))
-            self.assertEqual(
-                os.path.realpath(name), os.path.realpath(mem_region.get("name", ""))
-            )
-
-    def libraries_svr4_libs_present(self):
-        xml_root = self.get_libraries_svr4_xml()
-        libraries_svr4_names = []
-        for child in xml_root:
-            name = child.attrib.get("name")
-            libraries_svr4_names.append(os.path.realpath(name))
-        for lib in self.get_expected_libs():
-            self.assertIn(self.getBuildDir() + "/" + lib, libraries_svr4_names)
-
-    @llgs_test
-    @skipUnlessPlatform(["linux", "android", "netbsd"])
-    def test_supports_libraries_svr4(self):
-        self.setup_test()
-        self.assertTrue(self.has_libraries_svr4_support())
-
-    @llgs_test
-    @skipUnlessPlatform(["linux", "android", "netbsd"])
-    @expectedFailureNetBSD
-    def test_libraries_svr4_well_formed(self):
-        self.setup_test()
-        self.libraries_svr4_well_formed()
-
-    @llgs_test
-    @skipUnlessPlatform(["linux", "android", "netbsd"])
-    @expectedFailureNetBSD
-    def test_libraries_svr4_load_addr(self):
-        self.setup_test()
-        self.libraries_svr4_has_correct_load_addr()
-
-    @llgs_test
-    @skipUnlessPlatform(["linux", "android", "netbsd"])
-    @expectedFailureNetBSD
-    def test_libraries_svr4_libs_present(self):
-        self.setup_test()
-        self.libraries_svr4_libs_present()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/main.cpp
deleted file mode 100644 (file)
index b62ca71..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-int main(int argc, char **argv) {
-  // Perform a null pointer access.
-  int *const null_int_ptr = nullptr;
-  *null_int_ptr = 0xDEAD;
-
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_a.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_a.cpp
deleted file mode 100644 (file)
index 47d4b97..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-int svr4lib_a() { return 42; }
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_b_quote.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_b_quote.cpp
deleted file mode 100644 (file)
index bd8eb00..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-int svr4lib_b_quote() { return 42; }
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/main.cpp
deleted file mode 100644 (file)
index f1d46b8..0000000
+++ /dev/null
@@ -1,370 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <atomic>
-#include <chrono>
-#include <cstdlib>
-#include <cstring>
-#include <errno.h>
-#include <inttypes.h>
-#include <memory>
-#include <mutex>
-#if !defined(_WIN32)
-#include <pthread.h>
-#include <signal.h>
-#include <unistd.h>
-#endif
-#include <setjmp.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <string.h>
-#include <thread>
-#include <time.h>
-#include <vector>
-
-#if defined(__APPLE__)
-__OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2)
-int pthread_threadid_np(pthread_t, __uint64_t *);
-#elif defined(__linux__)
-#include <sys/syscall.h>
-#elif defined(__NetBSD__)
-#include <lwp.h>
-#elif defined(_WIN32)
-#include <windows.h>
-#endif
-
-static const char *const RETVAL_PREFIX = "retval:";
-static const char *const SLEEP_PREFIX = "sleep:";
-static const char *const STDERR_PREFIX = "stderr:";
-static const char *const SET_MESSAGE_PREFIX = "set-message:";
-static const char *const PRINT_MESSAGE_COMMAND = "print-message:";
-static const char *const GET_DATA_ADDRESS_PREFIX = "get-data-address-hex:";
-static const char *const GET_STACK_ADDRESS_COMMAND = "get-stack-address-hex:";
-static const char *const GET_HEAP_ADDRESS_COMMAND = "get-heap-address-hex:";
-
-static const char *const GET_CODE_ADDRESS_PREFIX = "get-code-address-hex:";
-static const char *const CALL_FUNCTION_PREFIX = "call-function:";
-
-static const char *const THREAD_PREFIX = "thread:";
-static const char *const THREAD_COMMAND_NEW = "new";
-static const char *const THREAD_COMMAND_PRINT_IDS = "print-ids";
-static const char *const THREAD_COMMAND_SEGFAULT = "segfault";
-
-static const char *const PRINT_PID_COMMAND = "print-pid";
-
-static bool g_print_thread_ids = false;
-static std::mutex g_print_mutex;
-static bool g_threads_do_segfault = false;
-
-static std::mutex g_jump_buffer_mutex;
-static jmp_buf g_jump_buffer;
-static bool g_is_segfaulting = false;
-
-static char g_message[256];
-
-static volatile char g_c1 = '0';
-static volatile char g_c2 = '1';
-
-static void print_pid() {
-#if defined(_WIN32)
-  fprintf(stderr, "PID: %d\n", ::GetCurrentProcessId());
-#else
-  fprintf(stderr, "PID: %d\n", getpid());
-#endif
-}
-
-static void print_thread_id() {
-// Put in the right magic here for your platform to spit out the thread id (tid)
-// that debugserver/lldb-gdbserver would see as a TID. Otherwise, let the else
-// clause print out the unsupported text so that the unit test knows to skip
-// verifying thread ids.
-#if defined(__APPLE__)
-  __uint64_t tid = 0;
-  pthread_threadid_np(pthread_self(), &tid);
-  printf("%" PRIx64, tid);
-#elif defined(__linux__)
-  // This is a call to gettid() via syscall.
-  printf("%" PRIx64, static_cast<uint64_t>(syscall(__NR_gettid)));
-#elif defined(__NetBSD__)
-  // Technically lwpid_t is 32-bit signed integer
-  printf("%" PRIx64, static_cast<uint64_t>(_lwp_self()));
-#elif defined(_WIN32)
-  printf("%" PRIx64, static_cast<uint64_t>(::GetCurrentThreadId()));
-#else
-  printf("{no-tid-support}");
-#endif
-}
-
-static void signal_handler(int signo) {
-#if defined(_WIN32)
-  // No signal support on Windows.
-#else
-  const char *signal_name = nullptr;
-  switch (signo) {
-  case SIGUSR1:
-    signal_name = "SIGUSR1";
-    break;
-  case SIGSEGV:
-    signal_name = "SIGSEGV";
-    break;
-  default:
-    signal_name = nullptr;
-  }
-
-  // Print notice that we received the signal on a given thread.
-  {
-    std::lock_guard<std::mutex> lock(g_print_mutex);
-    if (signal_name)
-      printf("received %s on thread id: ", signal_name);
-    else
-      printf("received signo %d (%s) on thread id: ", signo, strsignal(signo));
-    print_thread_id();
-    printf("\n");
-  }
-
-  // Reset the signal handler if we're one of the expected signal handlers.
-  switch (signo) {
-  case SIGSEGV:
-    if (g_is_segfaulting) {
-      // Fix up the pointer we're writing to.  This needs to happen if nothing
-      // intercepts the SIGSEGV (i.e. if somebody runs this from the command
-      // line).
-      longjmp(g_jump_buffer, 1);
-    }
-    break;
-  case SIGUSR1:
-    if (g_is_segfaulting) {
-      // Fix up the pointer we're writing to.  This is used to test gdb remote
-      // signal delivery. A SIGSEGV will be raised when the thread is created,
-      // switched out for a SIGUSR1, and then this code still needs to fix the
-      // seg fault. (i.e. if somebody runs this from the command line).
-      longjmp(g_jump_buffer, 1);
-    }
-    break;
-  }
-
-  // Reset the signal handler.
-  sig_t sig_result = signal(signo, signal_handler);
-  if (sig_result == SIG_ERR) {
-    fprintf(stderr, "failed to set signal handler: errno=%d\n", errno);
-    exit(1);
-  }
-#endif
-}
-
-static void swap_chars() {
-  g_c1 = '1';
-  g_c2 = '0';
-
-  g_c1 = '0';
-  g_c2 = '1';
-}
-
-static void hello() {
-  std::lock_guard<std::mutex> lock(g_print_mutex);
-  printf("hello, world\n");
-}
-
-static void *thread_func(void *arg) {
-  static std::atomic<int> s_thread_index(1);
-  const int this_thread_index = s_thread_index++;
-  if (g_print_thread_ids) {
-    std::lock_guard<std::mutex> lock(g_print_mutex);
-    printf("thread %d id: ", this_thread_index);
-    print_thread_id();
-    printf("\n");
-  }
-
-  if (g_threads_do_segfault) {
-    // Sleep for a number of seconds based on the thread index.
-    // TODO add ability to send commands to test exe so we can
-    // handle timing more precisely.  This is clunky.  All we're
-    // trying to do is add predictability as to the timing of
-    // signal generation by created threads.
-    int sleep_seconds = 2 * (this_thread_index - 1);
-    std::this_thread::sleep_for(std::chrono::seconds(sleep_seconds));
-
-    // Test creating a SEGV.
-    {
-      std::lock_guard<std::mutex> lock(g_jump_buffer_mutex);
-      g_is_segfaulting = true;
-      int *bad_p = nullptr;
-      if (setjmp(g_jump_buffer) == 0) {
-        // Force a seg fault signal on this thread.
-        *bad_p = 0;
-      } else {
-        // Tell the system we're no longer seg faulting.
-        // Used by the SIGUSR1 signal handler that we inject
-        // in place of the SIGSEGV so it only tries to
-        // recover from the SIGSEGV if this seg fault code
-        // was in play.
-        g_is_segfaulting = false;
-      }
-    }
-
-    {
-      std::lock_guard<std::mutex> lock(g_print_mutex);
-      printf("thread ");
-      print_thread_id();
-      printf(": past SIGSEGV\n");
-    }
-  }
-
-  int sleep_seconds_remaining = 60;
-  std::this_thread::sleep_for(std::chrono::seconds(sleep_seconds_remaining));
-
-  return nullptr;
-}
-
-int main(int argc, char **argv) {
-  lldb_enable_attach();
-
-  std::vector<std::thread> threads;
-  std::unique_ptr<uint8_t[]> heap_array_up;
-  int return_value = 0;
-
-#if !defined(_WIN32)
-  // Set the signal handler.
-  sig_t sig_result = signal(SIGALRM, signal_handler);
-  if (sig_result == SIG_ERR) {
-    fprintf(stderr, "failed to set SIGALRM signal handler: errno=%d\n", errno);
-    exit(1);
-  }
-
-  sig_result = signal(SIGUSR1, signal_handler);
-  if (sig_result == SIG_ERR) {
-    fprintf(stderr, "failed to set SIGUSR1 handler: errno=%d\n", errno);
-    exit(1);
-  }
-
-  sig_result = signal(SIGSEGV, signal_handler);
-  if (sig_result == SIG_ERR) {
-    fprintf(stderr, "failed to set SIGUSR1 handler: errno=%d\n", errno);
-    exit(1);
-  }
-#endif
-
-  // Process command line args.
-  for (int i = 1; i < argc; ++i) {
-    if (std::strstr(argv[i], STDERR_PREFIX)) {
-      // Treat remainder as text to go to stderr.
-      fprintf(stderr, "%s\n", (argv[i] + strlen(STDERR_PREFIX)));
-    } else if (std::strstr(argv[i], RETVAL_PREFIX)) {
-      // Treat as the return value for the program.
-      return_value = std::atoi(argv[i] + strlen(RETVAL_PREFIX));
-    } else if (std::strstr(argv[i], SLEEP_PREFIX)) {
-      // Treat as the amount of time to have this process sleep (in seconds).
-      int sleep_seconds_remaining = std::atoi(argv[i] + strlen(SLEEP_PREFIX));
-
-      // Loop around, sleeping until all sleep time is used up.  Note that
-      // signals will cause sleep to end early with the number of seconds
-      // remaining.
-      std::this_thread::sleep_for(
-          std::chrono::seconds(sleep_seconds_remaining));
-
-    } else if (std::strstr(argv[i], SET_MESSAGE_PREFIX)) {
-      // Copy the contents after "set-message:" to the g_message buffer.
-      // Used for reading inferior memory and verifying contents match
-      // expectations.
-      strncpy(g_message, argv[i] + strlen(SET_MESSAGE_PREFIX),
-              sizeof(g_message));
-
-      // Ensure we're null terminated.
-      g_message[sizeof(g_message) - 1] = '\0';
-
-    } else if (std::strstr(argv[i], PRINT_MESSAGE_COMMAND)) {
-      std::lock_guard<std::mutex> lock(g_print_mutex);
-      printf("message: %s\n", g_message);
-    } else if (std::strstr(argv[i], GET_DATA_ADDRESS_PREFIX)) {
-      volatile void *data_p = nullptr;
-
-      if (std::strstr(argv[i] + strlen(GET_DATA_ADDRESS_PREFIX), "g_message"))
-        data_p = &g_message[0];
-      else if (std::strstr(argv[i] + strlen(GET_DATA_ADDRESS_PREFIX), "g_c1"))
-        data_p = &g_c1;
-      else if (std::strstr(argv[i] + strlen(GET_DATA_ADDRESS_PREFIX), "g_c2"))
-        data_p = &g_c2;
-
-      std::lock_guard<std::mutex> lock(g_print_mutex);
-      printf("data address: %p\n", data_p);
-    } else if (std::strstr(argv[i], GET_HEAP_ADDRESS_COMMAND)) {
-      // Create a byte array if not already present.
-      if (!heap_array_up)
-        heap_array_up.reset(new uint8_t[32]);
-
-      std::lock_guard<std::mutex> lock(g_print_mutex);
-      printf("heap address: %p\n", heap_array_up.get());
-
-    } else if (std::strstr(argv[i], GET_STACK_ADDRESS_COMMAND)) {
-      std::lock_guard<std::mutex> lock(g_print_mutex);
-      printf("stack address: %p\n", &return_value);
-    } else if (std::strstr(argv[i], GET_CODE_ADDRESS_PREFIX)) {
-      void (*func_p)() = nullptr;
-
-      if (std::strstr(argv[i] + strlen(GET_CODE_ADDRESS_PREFIX), "hello"))
-        func_p = hello;
-      else if (std::strstr(argv[i] + strlen(GET_CODE_ADDRESS_PREFIX),
-                           "swap_chars"))
-        func_p = swap_chars;
-
-      std::lock_guard<std::mutex> lock(g_print_mutex);
-      printf("code address: %p\n", func_p);
-    } else if (std::strstr(argv[i], CALL_FUNCTION_PREFIX)) {
-      void (*func_p)() = nullptr;
-
-      // Defaut to providing the address of main.
-      if (std::strcmp(argv[i] + strlen(CALL_FUNCTION_PREFIX), "hello") == 0)
-        func_p = hello;
-      else if (std::strcmp(argv[i] + strlen(CALL_FUNCTION_PREFIX),
-                           "swap_chars") == 0)
-        func_p = swap_chars;
-      else {
-        std::lock_guard<std::mutex> lock(g_print_mutex);
-        printf("unknown function: %s\n",
-               argv[i] + strlen(CALL_FUNCTION_PREFIX));
-      }
-      if (func_p)
-        func_p();
-    } else if (std::strstr(argv[i], THREAD_PREFIX)) {
-      // Check if we're creating a new thread.
-      if (std::strstr(argv[i] + strlen(THREAD_PREFIX), THREAD_COMMAND_NEW)) {
-        threads.push_back(std::thread(thread_func, nullptr));
-      } else if (std::strstr(argv[i] + strlen(THREAD_PREFIX),
-                             THREAD_COMMAND_PRINT_IDS)) {
-        // Turn on thread id announcing.
-        g_print_thread_ids = true;
-
-        // And announce us.
-        {
-          std::lock_guard<std::mutex> lock(g_print_mutex);
-          printf("thread 0 id: ");
-          print_thread_id();
-          printf("\n");
-        }
-      } else if (std::strstr(argv[i] + strlen(THREAD_PREFIX),
-                             THREAD_COMMAND_SEGFAULT)) {
-        g_threads_do_segfault = true;
-      } else {
-        // At this point we don't do anything else with threads.
-        // Later use thread index and send command to thread.
-      }
-    } else if (std::strstr(argv[i], PRINT_PID_COMMAND)) {
-      print_pid();
-    } else {
-      // Treat the argument as text for stdout.
-      printf("%s\n", argv[i]);
-    }
-  }
-
-  // If we launched any threads, join them
-  for (std::vector<std::thread>::iterator it = threads.begin();
-       it != threads.end(); ++it)
-    it->join();
-
-  return return_value;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/platform-process-connect/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/platform-process-connect/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/platform-process-connect/TestPlatformProcessConnect.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/platform-process-connect/TestPlatformProcessConnect.py
deleted file mode 100644 (file)
index ff70831..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-
-import time
-
-import gdbremote_testcase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestPlatformProcessConnect(gdbremote_testcase.GdbRemoteTestCaseBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        super(TestPlatformProcessConnect, self).setUp()
-        self._initial_platform = lldb.DBG.GetSelectedPlatform()
-
-    def tearDown(self):
-        lldb.DBG.SetSelectedPlatform(self._initial_platform)
-        super(TestPlatformProcessConnect, self).tearDown()
-
-    @llgs_test
-    @no_debug_info_test
-    @skipIf(remote=False)
-    @expectedFailureAll(hostoslist=["windows"], triple='.*-android')
-    def test_platform_process_connect(self):
-        self.build()
-        self.init_llgs_test(False)
-
-        working_dir = lldb.remote_platform.GetWorkingDirectory()
-        src = lldb.SBFileSpec(self.getBuildArtifact("a.out"))
-        dest = lldb.SBFileSpec(os.path.join(working_dir, "a.out"))
-        err = lldb.remote_platform.Put(src, dest)
-        if err.Fail():
-            raise RuntimeError(
-                "Unable copy '%s' to '%s'.\n>>> %s" %
-                (f, wd, err.GetCString()))
-
-        m = re.search("^(.*)://([^:/]*)", configuration.lldb_platform_url)
-        protocol = m.group(1)
-        hostname = m.group(2)
-        unix_protocol = protocol.startswith("unix-")
-        if unix_protocol:
-            p = re.search("^(.*)-connect", protocol)
-            path = lldbutil.join_remote_paths(configuration.lldb_platform_working_dir,
-                    self.getBuildDirBasename(), "platform-%d.sock" % int(time.time()))
-            listen_url = "%s://%s" % (p.group(1), path)
-        else:
-            listen_url = "*:0"
-
-        port_file = "%s/port" % working_dir
-        commandline_args = [
-            "platform",
-            "--listen",
-            listen_url,
-            "--socket-file",
-            port_file,
-            "--",
-            "%s/a.out" %
-            working_dir,
-            "foo"]
-        self.spawnSubprocess(
-            self.debug_monitor_exe,
-            commandline_args,
-            install_remote=False)
-        self.addTearDownHook(self.cleanupSubprocesses)
-
-        socket_id = lldbutil.wait_for_file_on_target(self, port_file)
-
-        new_debugger = lldb.SBDebugger.Create()
-        new_debugger.SetAsync(False)
-
-        def del_debugger(new_debugger=new_debugger):
-            del new_debugger
-        self.addTearDownHook(del_debugger)
-
-        new_platform = lldb.SBPlatform(lldb.remote_platform.GetName())
-        new_debugger.SetSelectedPlatform(new_platform)
-        new_interpreter = new_debugger.GetCommandInterpreter()
-
-        if unix_protocol:
-            connect_url = "%s://%s%s" % (protocol, hostname, socket_id)
-        else:
-            connect_url = "%s://%s:%s" % (protocol, hostname, socket_id)
-
-        command = "platform connect %s" % (connect_url)
-        result = lldb.SBCommandReturnObject()
-        new_interpreter.HandleCommand(command, result)
-        self.assertTrue(
-            result.Succeeded(),
-            "platform process connect failed: %s" %
-            result.GetOutput())
-
-        target = new_debugger.GetSelectedTarget()
-        process = target.GetProcess()
-        thread = process.GetThreadAtIndex(0)
-
-        breakpoint = target.BreakpointCreateByName("main")
-        process.Continue()
-
-        frame = thread.GetFrameAtIndex(0)
-        self.assertEqual(frame.GetFunction().GetName(), "main")
-        self.assertEqual(frame.FindVariable("argc").GetValueAsSigned(), 2)
-        process.Continue()
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/platform-process-connect/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/platform-process-connect/main.cpp
deleted file mode 100644 (file)
index c7ebe07..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <cstdio>
-
-int main(int argc, char **argv) {
-  printf("argc: %d\n", argc);
-  return argv[0][0];
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/register-reading/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/register-reading/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/register-reading/TestGdbRemoteGPacket.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/register-reading/TestGdbRemoteGPacket.py
deleted file mode 100644 (file)
index a27cb01..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-
-
-import gdbremote_testcase
-import textwrap
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-def _extract_register_value(reg_info, reg_bank, byte_order, bytes_per_entry=8):
-    reg_offset = int(reg_info["offset"])*2
-    reg_byte_size = int(2 * int(reg_info["bitsize"]) / 8)
-    # Create slice with the contents of the register.
-    reg_slice = reg_bank[reg_offset:reg_offset+reg_byte_size]
-
-    reg_value = []
-    # Wrap slice according to bytes_per_entry.
-    for entry in textwrap.wrap(reg_slice, 2 * bytes_per_entry):
-        # Invert the bytes order if target uses little-endian.
-        if byte_order == lldb.eByteOrderLittle:
-            entry = "".join(reversed([entry[i:i+2] for i in range(0,
-                                          len(entry),2)]))
-        reg_value.append("0x" + entry)
-
-    return reg_value
-
-
-class TestGdbRemoteGPacket(gdbremote_testcase.GdbRemoteTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def run_test_g_packet(self):
-        self.build()
-        self.prep_debug_monitor_and_inferior()
-        self.test_sequence.add_log_lines(
-            ["read packet: $g#67",
-             {"direction": "send", "regex": r"^\$(.+)#[0-9a-fA-F]{2}$",
-              "capture": {1: "register_bank"}}],
-            True)
-        self.connect_to_debug_monitor()
-        context = self.expect_gdbremote_sequence()
-        register_bank = context.get("register_bank")
-        self.assertTrue(register_bank[0] != 'E')
-
-        self.test_sequence.add_log_lines(
-            ["read packet: $G" + register_bank + "#00",
-             {"direction": "send", "regex": r"^\$(.+)#[0-9a-fA-F]{2}$",
-              "capture": {1: "G_reply"}}],
-            True)
-        context = self.expect_gdbremote_sequence()
-        self.assertTrue(context.get("G_reply")[0] != 'E')
-
-    @skipIfOutOfTreeDebugserver
-    @debugserver_test
-    @skipIfDarwinEmbedded
-    def test_g_packet_debugserver(self):
-        self.init_debugserver_test()
-        self.run_test_g_packet()
-
-    @skipIf(archs=no_match(["x86_64"]))
-    def g_returns_correct_data(self, with_suffix):
-        procs = self.prep_debug_monitor_and_inferior()
-
-        self.add_register_info_collection_packets()
-        if with_suffix:
-            self.add_thread_suffix_request_packets()
-        self.add_threadinfo_collection_packets()
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Gather register info.
-        reg_infos = self.parse_register_info_packets(context)
-        self.assertIsNotNone(reg_infos)
-        self.add_lldb_register_index(reg_infos)
-        # Index register info entries by name.
-        reg_infos = {info['name']: info for info in reg_infos}
-
-        # Gather thread info.
-        if with_suffix:
-            threads = self.parse_threadinfo_packets(context)
-            self.assertIsNotNone(threads)
-            thread_id = threads[0]
-            self.assertIsNotNone(thread_id)
-        else:
-            thread_id = None
-
-        # Send vCont packet to resume the inferior.
-        self.test_sequence.add_log_lines(["read packet: $vCont;c#a8",
-                                          {"direction": "send",
-                                           "regex": r"^\$T([0-9a-fA-F]{2}).*#[0-9a-fA-F]{2}$",
-                                           "capture": {1: "hex_exit_code"}},
-                                          ],
-                                         True)
-
-        # Send g packet to retrieve the register bank
-        if thread_id:
-            g_request = "read packet: $g;thread:{:x}#00".format(thread_id)
-        else:
-            g_request = "read packet: $g#00"
-        self.test_sequence.add_log_lines(
-            [g_request,
-             {"direction": "send", "regex": r"^\$(.+)#[0-9a-fA-F]{2}$",
-              "capture": {1: "register_bank"}}],
-            True)
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-        reg_bank = context.get("register_bank")
-        self.assertTrue(reg_bank[0] != 'E')
-
-        byte_order = self.get_target_byte_order()
-        get_reg_value = lambda reg_name : _extract_register_value(
-            reg_infos[reg_name], reg_bank, byte_order)
-
-        self.assertEqual(['0x0102030405060708'], get_reg_value('r8'))
-        self.assertEqual(['0x1112131415161718'], get_reg_value('r9'))
-        self.assertEqual(['0x2122232425262728'], get_reg_value('r10'))
-        self.assertEqual(['0x3132333435363738'], get_reg_value('r11'))
-        self.assertEqual(['0x4142434445464748'], get_reg_value('r12'))
-        self.assertEqual(['0x5152535455565758'], get_reg_value('r13'))
-        self.assertEqual(['0x6162636465666768'], get_reg_value('r14'))
-        self.assertEqual(['0x7172737475767778'], get_reg_value('r15'))
-
-        self.assertEqual(
-            ['0x020406080a0c0e01', '0x030507090b0d0f00'], get_reg_value('xmm8'))
-        self.assertEqual(
-            ['0x121416181a1c1e11', '0x131517191b1d1f10'], get_reg_value('xmm9'))
-        self.assertEqual(
-            ['0x222426282a2c2e21', '0x232527292b2d2f20'], get_reg_value('xmm10'))
-        self.assertEqual(
-            ['0x323436383a3c3e31', '0x333537393b3d3f30'], get_reg_value('xmm11'))
-        self.assertEqual(
-            ['0x424446484a4c4e41', '0x434547494b4d4f40'], get_reg_value('xmm12'))
-        self.assertEqual(
-            ['0x525456585a5c5e51', '0x535557595b5d5f50'], get_reg_value('xmm13'))
-        self.assertEqual(
-            ['0x626466686a6c6e61', '0x636567696b6d6f60'], get_reg_value('xmm14'))
-        self.assertEqual(
-            ['0x727476787a7c7e71', '0x737577797b7d7f70'], get_reg_value('xmm15'))
-
-    @expectedFailureNetBSD
-    @llgs_test
-    def test_g_returns_correct_data_with_suffix_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.g_returns_correct_data(True)
-
-    @expectedFailureNetBSD
-    @llgs_test
-    def test_g_returns_correct_data_no_suffix_llgs(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        self.g_returns_correct_data(False)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/register-reading/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/register-reading/main.cpp
deleted file mode 100644 (file)
index fca0c72..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#include <cstdint>
-
-int main() {
-#if defined(__x86_64__)
-  struct alignas(16) xmm_t {
-    uint64_t a, b;
-  };
-  uint64_t r8 = 0x0102030405060708;
-  uint64_t r9 = 0x1112131415161718;
-  uint64_t r10 = 0x2122232425262728;
-  uint64_t r11 = 0x3132333435363738;
-  uint64_t r12 = 0x4142434445464748;
-  uint64_t r13 = 0x5152535455565758;
-  uint64_t r14 = 0x6162636465666768;
-  uint64_t r15 = 0x7172737475767778;
-
-  xmm_t xmm8 = {0x020406080A0C0E01, 0x030507090B0D0F00};
-  xmm_t xmm9 = {0x121416181A1C1E11, 0x131517191B1D1F10};
-  xmm_t xmm10 = {0x222426282A2C2E21, 0x232527292B2D2F20};
-  xmm_t xmm11 = {0x323436383A3C3E31, 0x333537393B3D3F30};
-  xmm_t xmm12 = {0x424446484A4C4E41, 0x434547494B4D4F40};
-  xmm_t xmm13 = {0x525456585A5C5E51, 0x535557595B5D5F50};
-  xmm_t xmm14 = {0x626466686A6C6E61, 0x636567696B6D6F60};
-  xmm_t xmm15 = {0x727476787A7C7E71, 0x737577797B7D7F70};
-
-  asm volatile("movq    %0, %%r8\n\t"
-               "movq    %1, %%r9\n\t"
-               "movq    %2, %%r10\n\t"
-               "movq    %3, %%r11\n\t"
-               "movq    %4, %%r12\n\t"
-               "movq    %5, %%r13\n\t"
-               "movq    %6, %%r14\n\t"
-               "movq    %7, %%r15\n\t"
-               "\n\t"
-               "movaps  %8, %%xmm8\n\t"
-               "movaps  %9, %%xmm9\n\t"
-               "movaps  %10, %%xmm10\n\t"
-               "movaps  %11, %%xmm11\n\t"
-               "movaps  %12, %%xmm12\n\t"
-               "movaps  %13, %%xmm13\n\t"
-               "movaps  %14, %%xmm14\n\t"
-               "movaps  %15, %%xmm15\n\t"
-               "\n\t"
-               "int3"
-               :
-               : "g"(r8), "g"(r9), "g"(r10), "g"(r11), "g"(r12), "g"(r13),
-                 "g"(r14), "g"(r15), "m"(xmm8), "m"(xmm9), "m"(xmm10),
-                 "m"(xmm11), "m"(xmm12), "m"(xmm13), "m"(xmm14), "m"(xmm15)
-               : "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15",
-                 "%xmm8", "%xmm9", "%xmm10", "%xmm11", "%xmm12", "%xmm13",
-                 "%xmm14", "%xmm15");
-#endif
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/signal-filtering/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/signal-filtering/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/signal-filtering/TestGdbRemote_QPassSignals.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/signal-filtering/TestGdbRemote_QPassSignals.py
deleted file mode 100644 (file)
index 72e0d94..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-# This test makes sure that lldb-server supports and properly handles
-# QPassSignals GDB protocol package.
-
-import gdbremote_testcase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestGdbRemote_QPassSignals(gdbremote_testcase.GdbRemoteTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def expect_signal(self, expected_signo):
-        self.test_sequence.add_log_lines(["read packet: $vCont;c#a8",
-                                          {"direction": "send",
-                                           "regex": r"^\$T([0-9a-fA-F]{2}).*#[0-9a-fA-F]{2}$",
-                                           "capture": {1: "hex_exit_code"}},
-                                          ],
-                                         True)
-
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        hex_exit_code = context.get("hex_exit_code")
-        self.assertIsNotNone(hex_exit_code)
-        self.assertEqual(int(hex_exit_code, 16), expected_signo)
-
-    def expect_exit_code(self, exit_code):
-        self.test_sequence.add_log_lines(
-            ["read packet: $vCont;c#a8",
-             "send packet: $W{0:02x}#00".format(exit_code)],
-            True)
-        self.expect_gdbremote_sequence()
-
-
-    def ignore_signals(self, signals):
-        def signal_name_to_hex(signame):
-            return format(lldbutil.get_signal_number(signame), 'x')
-        signals_str = ";".join(map(signal_name_to_hex, signals))
-
-        self.test_sequence.add_log_lines(["read packet: $QPassSignals:"
-                                          + signals_str + " #00",
-                                          "send packet: $OK#00"],
-                                         True)
-
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-    @llgs_test
-    @skipUnlessPlatform(["linux", "android"])
-    def test_q_pass_signals(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        procs = self.prep_debug_monitor_and_inferior()
-        expected_signals = ["SIGSEGV",
-            "SIGALRM", "SIGFPE", "SIGBUS", "SIGINT", "SIGHUP"]
-        signals_to_ignore = ["SIGUSR1", "SIGUSR2"]
-        self.ignore_signals(signals_to_ignore)
-        for signal_name in expected_signals:
-            signo = lldbutil.get_signal_number(signal_name)
-            self.expect_signal(signo)
-        self.expect_exit_code(len(signals_to_ignore))
-
-    @llgs_test
-    @skipUnlessPlatform(["linux", "android"])
-    def test_change_signals_at_runtime(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        procs = self.prep_debug_monitor_and_inferior()
-        expected_signals = ["SIGSEGV", "SIGUSR1", "SIGUSR2",
-            "SIGALRM", "SIGHUP"]
-        signals_to_ignore = ["SIGFPE", "SIGBUS", "SIGINT"]
-
-        for signal_name in expected_signals:
-            signo = lldbutil.get_signal_number(signal_name)
-            self.expect_signal(signo)
-            if signal_name == "SIGALRM":
-                self.ignore_signals(signals_to_ignore)
-        self.expect_exit_code(len(signals_to_ignore))
-
-    @skipIfWindows # no signal support
-    @expectedFailureNetBSD
-    @llgs_test
-    def test_default_signals_behavior(self):
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        procs = self.prep_debug_monitor_and_inferior()
-        expected_signals = ["SIGSEGV", "SIGUSR1", "SIGUSR2",
-            "SIGALRM", "SIGFPE", "SIGBUS", "SIGINT", "SIGHUP"]
-        for signal_name in expected_signals:
-            signo = lldbutil.get_signal_number(signal_name)
-            self.expect_signal(signo)
-        self.expect_exit_code(0)
-
-
-    @llgs_test
-    @skipUnlessPlatform(["linux", "android"])
-    def test_support_q_pass_signals(self):
-        self.init_llgs_test()
-        self.build()
-
-        # Start up the stub and start/prep the inferior.
-        self.set_inferior_startup_launch()
-        procs = self.prep_debug_monitor_and_inferior()
-        self.add_qSupported_packets()
-
-        # Run the packet stream.
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        # Retrieve the qSupported features and check QPassSignals+
-        supported_dict = self.parse_qSupported_response(context)
-        self.assertEqual(supported_dict["QPassSignals"], "+")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/signal-filtering/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/signal-filtering/main.cpp
deleted file mode 100644 (file)
index fe33c29..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <signal.h>
-#include <stdio.h>
-#include <vector>
-
-static int signal_counter = 0;
-
-static void count_signal(int signo) {
-  ++signal_counter;
-  printf("Signal %d\n", signo);
-}
-
-static void raise_signals() {
-  std::vector<int> signals(
-      {SIGSEGV, SIGUSR1, SIGUSR2, SIGALRM, SIGFPE, SIGBUS, SIGINT, SIGHUP});
-
-  for (int signal_num : signals) {
-    signal(signal_num, count_signal);
-  }
-
-  for (int signal_num : signals) {
-    raise(signal_num);
-  }
-}
-
-int main() {
-  raise_signals();
-  return signal_counter;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/test/test_lldbgdbserverutils.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/test/test_lldbgdbserverutils.py
deleted file mode 100644 (file)
index 6f07b2f..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-import unittest2
-import re
-
-from lldbgdbserverutils import *
-
-
-class TestLldbGdbServerUtils(unittest2.TestCase):
-
-    def test_entry_exact_payload_match(self):
-        entry = GdbRemoteEntry(is_send_to_remote=False, exact_payload="$OK#9a")
-        entry.assert_match(self, "$OK#9a")
-
-    def test_entry_exact_payload_match_ignores_checksum(self):
-        entry = GdbRemoteEntry(is_send_to_remote=False, exact_payload="$OK#9a")
-        entry.assert_match(self, "$OK#00")
-
-    def test_entry_creates_context(self):
-        entry = GdbRemoteEntry(is_send_to_remote=False, exact_payload="$OK#9a")
-        context = entry.assert_match(self, "$OK#9a")
-        self.assertIsNotNone(context)
-
-    def test_entry_regex_matches(self):
-        entry = GdbRemoteEntry(
-            is_send_to_remote=False,
-            regex=re.compile(r"^\$QC([0-9a-fA-F]+)#"),
-            capture={
-                1: "thread_id"})
-        context = entry.assert_match(self, "$QC980#00")
-
-    def test_entry_regex_saves_match(self):
-        entry = GdbRemoteEntry(
-            is_send_to_remote=False,
-            regex=re.compile(r"^\$QC([0-9a-fA-F]+)#"),
-            capture={
-                1: "thread_id"})
-        context = entry.assert_match(self, "$QC980#00")
-        self.assertEqual(context["thread_id"], "980")
-
-    def test_entry_regex_expect_captures_success(self):
-        context = {"thread_id": "980"}
-        entry = GdbRemoteEntry(
-            is_send_to_remote=False,
-            regex=re.compile(r"^\$T([0-9a-fA-F]{2})thread:([0-9a-fA-F]+)"),
-            expect_captures={
-                2: "thread_id"})
-        entry.assert_match(self, "$T11thread:980;", context=context)
-
-    def test_entry_regex_expect_captures_raises_on_fail(self):
-        context = {"thread_id": "980"}
-        entry = GdbRemoteEntry(
-            is_send_to_remote=False,
-            regex=re.compile(r"^\$T([0-9a-fA-F]{2})thread:([0-9a-fA-F]+)"),
-            expect_captures={
-                2: "thread_id"})
-        try:
-            entry.assert_match(self, "$T11thread:970;", context=context)
-            self.fail()
-        except AssertionError:
-            # okay
-            return None
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/Makefile
deleted file mode 100644 (file)
index de4ec12..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-ENABLE_THREADS := YES
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/TestGdbRemoteThreadName.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/TestGdbRemoteThreadName.py
deleted file mode 100644 (file)
index 9ec40c1..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-
-import gdbremote_testcase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestGdbRemoteThreadName(gdbremote_testcase.GdbRemoteTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def run_and_check_name(self, expected_name):
-        self.test_sequence.add_log_lines(["read packet: $vCont;c#a8",
-                                          {"direction": "send",
-                                           "regex":
-                                           r"^\$T([0-9a-fA-F]{2})([^#]+)#[0-9a-fA-F]{2}$",
-                                           "capture": {
-                                               1: "signal",
-                                               2: "key_vals_text"}},
-                                          ],
-                                         True)
-
-        context = self.expect_gdbremote_sequence()
-        self.assertIsNotNone(context)
-
-        sigint = lldbutil.get_signal_number("SIGINT")
-        self.assertEqual(sigint, int(context.get("signal"), 16))
-        kv_dict = self.parse_key_val_dict(context.get("key_vals_text"))
-        self.assertEqual(expected_name, kv_dict.get("name"))
-
-    @skipIfWindows # the test is not updated for Windows.
-    @llgs_test
-    def test(self):
-        """ Make sure lldb-server can retrieve inferior thread name"""
-        self.init_llgs_test()
-        self.build()
-        self.set_inferior_startup_launch()
-        procs = self.prep_debug_monitor_and_inferior()
-
-        self.run_and_check_name("hello world")
-        self.run_and_check_name("goodbye world")
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/main.cpp
deleted file mode 100644 (file)
index 86f0ecf..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#include <pthread.h>
-#include <signal.h>
-
-void set_thread_name(const char *name) {
-#if defined(__APPLE__)
-  ::pthread_setname_np(name);
-#elif defined(__FreeBSD__)
-  ::pthread_set_name_np(::pthread_self(), name);
-#elif defined(__OpenBSD__)
-  ::pthread_set_name_np(::pthread_self(), name);
-#elif defined(__linux__)
-  ::pthread_setname_np(::pthread_self(), name);
-#elif defined(__NetBSD__)
-  ::pthread_setname_np(::pthread_self(), "%s", const_cast<char *>(name));
-#endif
-}
-
-int main() {
-  set_thread_name("hello world");
-  raise(SIGINT);
-  set_thread_name("goodbye world");
-  raise(SIGINT);
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/.categories b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/.categories
deleted file mode 100644 (file)
index ce2cfd0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-lldb-vscode
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/TestVSCode_attach.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/TestVSCode_attach.py
deleted file mode 100644 (file)
index 835bd0b..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-"""
-Test lldb-vscode setBreakpoints request
-"""
-
-
-import unittest2
-import vscode
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-import lldbvscode_testcase
-import os
-import shutil
-import subprocess
-import tempfile
-import threading
-import time
-
-
-def spawn_and_wait(program, delay):
-    if delay:
-        time.sleep(delay)
-    process = subprocess.Popen([program],
-                               stdin=subprocess.PIPE,
-                               stdout=subprocess.PIPE,
-                               stderr=subprocess.PIPE)
-    process.wait()
-
-
-class TestVSCode_attach(lldbvscode_testcase.VSCodeTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def set_and_hit_breakpoint(self, continueToExit=True):
-        source = 'main.c'
-        breakpoint1_line = line_number(source, '// breakpoint 1')
-        lines = [breakpoint1_line]
-        # Set breakoint in the thread function so we can step the threads
-        breakpoint_ids = self.set_source_breakpoints(source, lines)
-        self.assertEqual(len(breakpoint_ids), len(lines),
-                         "expect correct number of breakpoints")
-        self.continue_to_breakpoints(breakpoint_ids)
-        if continueToExit:
-            self.continue_to_exit()
-
-
-    @skipIfWindows
-    @skipIfNetBSD # Hangs on NetBSD as well
-    def test_by_pid(self):
-        '''
-            Tests attaching to a process by process ID.
-        '''
-        self.build_and_create_debug_adaptor()
-        program = self.getBuildArtifact("a.out")
-        self.process = subprocess.Popen([program],
-                                        stdin=subprocess.PIPE,
-                                        stdout=subprocess.PIPE,
-                                        stderr=subprocess.PIPE)
-        self.attach(pid=self.process.pid)
-        self.set_and_hit_breakpoint(continueToExit=True)
-
-    @skipIfWindows
-    @skipIfNetBSD # Hangs on NetBSD as well
-    def test_by_name(self):
-        '''
-            Tests attaching to a process by process name.
-        '''
-        self.build_and_create_debug_adaptor()
-        orig_program = self.getBuildArtifact("a.out")
-        # Since we are going to attach by process name, we need a unique
-        # process name that has minimal chance to match a process that is
-        # already running. To do this we use tempfile.mktemp() to give us a
-        # full path to a location where we can copy our executable. We then
-        # run this copy to ensure we don't get the error "more that one
-        # process matches 'a.out'".
-        program = tempfile.mktemp()
-        shutil.copyfile(orig_program, program)
-        shutil.copymode(orig_program, program)
-
-        # Use a file as a synchronization point between test and inferior.
-        pid_file_path = lldbutil.append_to_process_working_directory(self,
-            "pid_file_%d" % (int(time.time())))
-
-        def cleanup():
-            if os.path.exists(program):
-                os.unlink(program)
-            self.run_platform_command("rm %s" % (pid_file_path))
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        popen = self.spawnSubprocess(program, [pid_file_path])
-        self.addTearDownHook(self.cleanupSubprocesses)
-
-        pid = lldbutil.wait_for_file_on_target(self, pid_file_path)
-
-        self.attach(program=program)
-        self.set_and_hit_breakpoint(continueToExit=True)
-
-    @skipUnlessDarwin
-    @skipIfDarwin
-    @skipIfNetBSD # Hangs on NetBSD as well
-    def test_by_name_waitFor(self):
-        '''
-            Tests attaching to a process by process name and waiting for the
-            next instance of a process to be launched, ingoring all current
-            ones.
-        '''
-        self.build_and_create_debug_adaptor()
-        program = self.getBuildArtifact("a.out")
-        self.spawn_thread = threading.Thread(target=spawn_and_wait,
-                                             args=(program, 1.0,))
-        self.spawn_thread.start()
-        self.attach(program=program, waitFor=True)
-        self.set_and_hit_breakpoint(continueToExit=True)
-
-    @skipIfWindows
-    @skipIfDarwin
-    @skipIfNetBSD # Hangs on NetBSD as well
-    def test_commands(self):
-        '''
-            Tests the "initCommands", "preRunCommands", "stopCommands",
-            "exitCommands", and "attachCommands" that can be passed during
-            attach.
-
-            "initCommands" are a list of LLDB commands that get executed
-            before the targt is created.
-            "preRunCommands" are a list of LLDB commands that get executed
-            after the target has been created and before the launch.
-            "stopCommands" are a list of LLDB commands that get executed each
-            time the program stops.
-            "exitCommands" are a list of LLDB commands that get executed when
-            the process exits
-            "attachCommands" are a list of LLDB commands that get executed and
-            must have a valid process in the selected target in LLDB after
-            they are done executing. This allows custom commands to create any
-            kind of debug session.
-        '''
-        self.build_and_create_debug_adaptor()
-        program = self.getBuildArtifact("a.out")
-        # Here we just create a target and launch the process as a way to test
-        # if we are able to use attach commands to create any kind of a target
-        # and use it for debugging
-        attachCommands = [
-            'target create -d "%s"' % (program),
-            'process launch'
-        ]
-        initCommands = ['target list', 'platform list']
-        preRunCommands = ['image list a.out', 'image dump sections a.out']
-        stopCommands = ['frame variable', 'bt']
-        exitCommands = ['expr 2+3', 'expr 3+4']
-        self.attach(program=program,
-                    attachCommands=attachCommands,
-                    initCommands=initCommands,
-                    preRunCommands=preRunCommands,
-                    stopCommands=stopCommands,
-                    exitCommands=exitCommands)
-
-        # Get output from the console. This should contain both the
-        # "initCommands" and the "preRunCommands".
-        output = self.get_console()
-        # Verify all "initCommands" were found in console output
-        self.verify_commands('initCommands', output, initCommands)
-        # Verify all "preRunCommands" were found in console output
-        self.verify_commands('preRunCommands', output, preRunCommands)
-
-        functions = ['main']
-        breakpoint_ids = self.set_function_breakpoints(functions)
-        self.assertTrue(len(breakpoint_ids) == len(functions),
-                        "expect one breakpoint")
-        self.continue_to_breakpoints(breakpoint_ids)
-        output = self.get_console(timeout=1.0)
-        self.verify_commands('stopCommands', output, stopCommands)
-
-        # Continue after launch and hit the "pause()" call and stop the target.
-        # Get output from the console. This should contain both the
-        # "stopCommands" that were run after we stop.
-        self.vscode.request_continue()
-        time.sleep(0.5)
-        self.vscode.request_pause()
-        self.vscode.wait_for_stopped()
-        output = self.get_console(timeout=1.0)
-        self.verify_commands('stopCommands', output, stopCommands)
-
-        # Continue until the program exits
-        self.continue_to_exit()
-        # Get output from the console. This should contain both the
-        # "exitCommands" that were run after the second breakpoint was hit
-        output = self.get_console(timeout=1.0)
-        self.verify_commands('exitCommands', output, exitCommands)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/main.c
deleted file mode 100644 (file)
index 64d8658..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <stdio.h>
-#include <unistd.h>
-
-int main(int argc, char const *argv[]) {
-  lldb_enable_attach();
-
-  if (argc >= 2) {
-    // Create the synchronization token.
-    FILE *f = fopen(argv[1], "wx");
-    if (!f)
-      return 1;
-    fputs("\n", f);
-    fflush(f);
-    fclose(f);
-  }
-
-  printf("pid = %i\n", getpid());
-  sleep(10);
-  return 0; // breakpoint 1
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.py
deleted file mode 100644 (file)
index 8b13b9b..0000000
+++ /dev/null
@@ -1,205 +0,0 @@
-"""
-Test lldb-vscode setBreakpoints request
-"""
-
-
-import unittest2
-import vscode
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-import lldbvscode_testcase
-import os
-
-
-class TestVSCode_setBreakpoints(lldbvscode_testcase.VSCodeTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfWindows
-    def test_set_and_clear(self):
-        '''Tests setting and clearing source file and line breakpoints.
-           This packet is a bit tricky on the debug adaptor side since there
-           is no "clearBreakpoints" packet. Source file and line breakpoints
-           are set by sending a "setBreakpoints" packet with a source file
-           specified and zero or more source lines. If breakpoints have been
-           set in the source file before, any exising breakpoints must remain
-           set, and any new breakpoints must be created, and any breakpoints
-           that were in previous requests and are not in the current request
-           must be removed. This function tests this setting and clearing
-           and makes sure things happen correctly. It doesn't test hitting
-           breakpoints and the functionality of each breakpoint, like
-           'conditions' and 'hitCondition' settings.'''
-        source_basename = 'main.cpp'
-        source_path = os.path.join(os.getcwd(), source_basename)
-        first_line = line_number('main.cpp', 'break 12')
-        second_line = line_number('main.cpp', 'break 13')
-        third_line = line_number('main.cpp', 'break 14')
-        lines = [first_line, second_line, third_line]
-
-        # Visual Studio Code Debug Adaptors have no way to specify the file
-        # without launching or attaching to a process, so we must start a
-        # process in order to be able to set breakpoints.
-        program = self.getBuildArtifact("a.out")
-        self.build_and_launch(program)
-
-        # Set 3 breakoints and verify that they got set correctly
-        response = self.vscode.request_setBreakpoints(source_path, lines)
-        line_to_id = {}
-        if response:
-            breakpoints = response['body']['breakpoints']
-            self.assertTrue(len(breakpoints) == len(lines),
-                            "expect %u source breakpoints" % (len(lines)))
-            for breakpoint in breakpoints:
-                line = breakpoint['line']
-                # Store the "id" of the breakpoint that was set for later
-                line_to_id[line] = breakpoint['id']
-                self.assertTrue(line in lines, "line expected in lines array")
-                self.assertTrue(breakpoint['verified'],
-                                "expect breakpoint verified")
-
-        # There is no breakpoint delete packet, clients just send another
-        # setBreakpoints packet with the same source file with fewer lines.
-        # Below we remove the second line entry and call the setBreakpoints
-        # function again. We want to verify that any breakpoints that were set
-        # before still have the same "id". This means we didn't clear the
-        # breakpoint and set it again at the same location. We also need to
-        # verify that the second line location was actually removed.
-        lines.remove(second_line)
-        # Set 2 breakoints and verify that the previous breakoints that were
-        # set above are still set.
-        response = self.vscode.request_setBreakpoints(source_path, lines)
-        if response:
-            breakpoints = response['body']['breakpoints']
-            self.assertTrue(len(breakpoints) == len(lines),
-                            "expect %u source breakpoints" % (len(lines)))
-            for breakpoint in breakpoints:
-                line = breakpoint['line']
-                # Verify the same breakpoints are still set within LLDB by
-                # making sure the breakpoint ID didn't change
-                self.assertTrue(line_to_id[line] == breakpoint['id'],
-                                "verify previous breakpoints stayed the same")
-                self.assertTrue(line in lines, "line expected in lines array")
-                self.assertTrue(breakpoint['verified'],
-                                "expect breakpoint still verified")
-
-        # Now get the full list of breakpoints set in the target and verify
-        # we have only 2 breakpoints set. The response above could have told
-        # us about 2 breakpoints, but we want to make sure we don't have the
-        # third one still set in the target
-        response = self.vscode.request_testGetTargetBreakpoints()
-        if response:
-            breakpoints = response['body']['breakpoints']
-            self.assertTrue(len(breakpoints) == len(lines),
-                            "expect %u source breakpoints" % (len(lines)))
-            for breakpoint in breakpoints:
-                line = breakpoint['line']
-                # Verify the same breakpoints are still set within LLDB by
-                # making sure the breakpoint ID didn't change
-                self.assertTrue(line_to_id[line] == breakpoint['id'],
-                                "verify previous breakpoints stayed the same")
-                self.assertTrue(line in lines, "line expected in lines array")
-                self.assertTrue(breakpoint['verified'],
-                                "expect breakpoint still verified")
-
-        # Now clear all breakpoints for the source file by passing down an
-        # empty lines array
-        lines = []
-        response = self.vscode.request_setBreakpoints(source_path, lines)
-        if response:
-            breakpoints = response['body']['breakpoints']
-            self.assertTrue(len(breakpoints) == len(lines),
-                            "expect %u source breakpoints" % (len(lines)))
-
-        # Verify with the target that all breakpoints have been cleared
-        response = self.vscode.request_testGetTargetBreakpoints()
-        if response:
-            breakpoints = response['body']['breakpoints']
-            self.assertTrue(len(breakpoints) == len(lines),
-                            "expect %u source breakpoints" % (len(lines)))
-
-        # Now set a breakpoint again in the same source file and verify it
-        # was added.
-        lines = [second_line]
-        response = self.vscode.request_setBreakpoints(source_path, lines)
-        if response:
-            breakpoints = response['body']['breakpoints']
-            self.assertTrue(len(breakpoints) == len(lines),
-                            "expect %u source breakpoints" % (len(lines)))
-            for breakpoint in breakpoints:
-                line = breakpoint['line']
-                self.assertTrue(line in lines, "line expected in lines array")
-                self.assertTrue(breakpoint['verified'],
-                                "expect breakpoint still verified")
-
-        # Now get the full list of breakpoints set in the target and verify
-        # we have only 2 breakpoints set. The response above could have told
-        # us about 2 breakpoints, but we want to make sure we don't have the
-        # third one still set in the target
-        response = self.vscode.request_testGetTargetBreakpoints()
-        if response:
-            breakpoints = response['body']['breakpoints']
-            self.assertTrue(len(breakpoints) == len(lines),
-                            "expect %u source breakpoints" % (len(lines)))
-            for breakpoint in breakpoints:
-                line = breakpoint['line']
-                self.assertTrue(line in lines, "line expected in lines array")
-                self.assertTrue(breakpoint['verified'],
-                                "expect breakpoint still verified")
-
-    @skipIfWindows
-    def test_functionality(self):
-        '''Tests hitting breakpoints and the functionality of a single
-           breakpoint, like 'conditions' and 'hitCondition' settings.'''
-        source_basename = 'main.cpp'
-        source_path = os.path.join(os.getcwd(), source_basename)
-        loop_line = line_number('main.cpp', '// break loop')
-
-        program = self.getBuildArtifact("a.out")
-        self.build_and_launch(program)
-        # Set a breakpoint at the loop line with no condition and no
-        # hitCondition
-        breakpoint_ids = self.set_source_breakpoints(source_path, [loop_line])
-        self.assertTrue(len(breakpoint_ids) == 1, "expect one breakpoint")
-        self.vscode.request_continue()
-
-        # Verify we hit the breakpoint we just set
-        self.verify_breakpoint_hit(breakpoint_ids)
-
-        # Make sure i is zero at first breakpoint
-        i = int(self.vscode.get_local_variable_value('i'))
-        self.assertTrue(i == 0, 'i != 0 after hitting breakpoint')
-
-        # Update the condition on our breakpoint
-        new_breakpoint_ids = self.set_source_breakpoints(source_path,
-                                                         [loop_line],
-                                                         condition="i==4")
-        self.assertTrue(breakpoint_ids == new_breakpoint_ids,
-                        "existing breakpoint should have its condition "
-                        "updated")
-
-        self.continue_to_breakpoints(breakpoint_ids)
-        i = int(self.vscode.get_local_variable_value('i'))
-        self.assertTrue(i == 4,
-                        'i != 4 showing conditional works')
-
-        new_breakpoint_ids = self.set_source_breakpoints(source_path,
-                                                         [loop_line],
-                                                         hitCondition="2")
-
-        self.assertTrue(breakpoint_ids == new_breakpoint_ids,
-                        "existing breakpoint should have its condition "
-                        "updated")
-
-        # Continue with a hitContidtion of 2 and expect it to skip 1 value
-        self.continue_to_breakpoints(breakpoint_ids)
-        i = int(self.vscode.get_local_variable_value('i'))
-        self.assertTrue(i == 6,
-                        'i != 6 showing hitCondition works')
-
-        # continue after hitting our hitCondition and make sure it only goes
-        # up by 1
-        self.continue_to_breakpoints(breakpoint_ids)
-        i = int(self.vscode.get_local_variable_value('i'))
-        self.assertTrue(i == 7,
-                        'i != 7 showing post hitCondition hits every time')
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setExceptionBreakpoints.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setExceptionBreakpoints.py
deleted file mode 100644 (file)
index d20a343..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-"""
-Test lldb-vscode setBreakpoints request
-"""
-
-
-import unittest2
-import vscode
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-import lldbvscode_testcase
-
-
-class TestVSCode_setExceptionBreakpoints(
-        lldbvscode_testcase.VSCodeTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfWindows
-    @expectedFailureNetBSD
-    def test_functionality(self):
-        '''Tests setting and clearing exception breakpoints.
-           This packet is a bit tricky on the debug adaptor side since there
-           is no "clear exception breakpoints" packet. Exception breakpoints
-           are set by sending a "setExceptionBreakpoints" packet with zero or
-           more exception filters. If exception breakpoints have been set
-           before, any exising breakpoints must remain set, and any new
-           breakpoints must be created, and any breakpoints that were in
-           previous requests and are not in the current request must be
-           removed. This exception tests this setting and clearing and makes
-           sure things happen correctly. It doesn't test hitting breakpoints
-           and the functionality of each breakpoint, like 'conditions' and
-           x'hitCondition' settings.
-        '''
-        # Visual Studio Code Debug Adaptors have no way to specify the file
-        # without launching or attaching to a process, so we must start a
-        # process in order to be able to set breakpoints.
-        program = self.getBuildArtifact("a.out")
-        self.build_and_launch(program)
-
-        filters = ['cpp_throw', 'cpp_catch']
-        response = self.vscode.request_setExceptionBreakpoints(filters)
-        if response:
-            self.assertTrue(response['success'])
-
-        self.continue_to_exception_breakpoint('C++ Throw')
-        self.continue_to_exception_breakpoint('C++ Catch')
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setFunctionBreakpoints.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setFunctionBreakpoints.py
deleted file mode 100644 (file)
index 2c62bf8..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-"""
-Test lldb-vscode setBreakpoints request
-"""
-
-
-import unittest2
-import vscode
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-import lldbvscode_testcase
-
-
-class TestVSCode_setFunctionBreakpoints(
-        lldbvscode_testcase.VSCodeTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfWindows
-    def test_set_and_clear(self):
-        '''Tests setting and clearing function breakpoints.
-           This packet is a bit tricky on the debug adaptor side since there
-           is no "clearFunction Breakpoints" packet. Function breakpoints
-           are set by sending a "setFunctionBreakpoints" packet with zero or
-           more function names. If function breakpoints have been set before,
-           any exising breakpoints must remain set, and any new breakpoints
-           must be created, and any breakpoints that were in previous requests
-           and are not in the current request must be removed. This function
-           tests this setting and clearing and makes sure things happen
-           correctly. It doesn't test hitting breakpoints and the functionality
-           of each breakpoint, like 'conditions' and 'hitCondition' settings.
-        '''
-        # Visual Studio Code Debug Adaptors have no way to specify the file
-        # without launching or attaching to a process, so we must start a
-        # process in order to be able to set breakpoints.
-        program = self.getBuildArtifact("a.out")
-        self.build_and_launch(program)
-        bp_id_12 = None
-        functions = ['twelve']
-        # Set a function breakpoint at 'twelve'
-        response = self.vscode.request_setFunctionBreakpoints(functions)
-        if response:
-            breakpoints = response['body']['breakpoints']
-            self.assertTrue(len(breakpoints) == len(functions),
-                            "expect %u source breakpoints" % (len(functions)))
-            for breakpoint in breakpoints:
-                bp_id_12 = breakpoint['id']
-                self.assertTrue(breakpoint['verified'],
-                                "expect breakpoint verified")
-
-        # Add an extra name and make sure we have two breakpoints after this
-        functions.append('thirteen')
-        response = self.vscode.request_setFunctionBreakpoints(functions)
-        if response:
-            breakpoints = response['body']['breakpoints']
-            self.assertTrue(len(breakpoints) == len(functions),
-                            "expect %u source breakpoints" % (len(functions)))
-            for breakpoint in breakpoints:
-                self.assertTrue(breakpoint['verified'],
-                                "expect breakpoint verified")
-
-        # There is no breakpoint delete packet, clients just send another
-        # setFunctionBreakpoints packet with the different function names.
-        functions.remove('thirteen')
-        response = self.vscode.request_setFunctionBreakpoints(functions)
-        if response:
-            breakpoints = response['body']['breakpoints']
-            self.assertTrue(len(breakpoints) == len(functions),
-                            "expect %u source breakpoints" % (len(functions)))
-            for breakpoint in breakpoints:
-                bp_id = breakpoint['id']
-                self.assertTrue(bp_id == bp_id_12,
-                                'verify "twelve" breakpoint ID is same')
-                self.assertTrue(breakpoint['verified'],
-                                "expect breakpoint still verified")
-
-        # Now get the full list of breakpoints set in the target and verify
-        # we have only 1 breakpoints set. The response above could have told
-        # us about 1 breakpoints, but we want to make sure we don't have the
-        # second one still set in the target
-        response = self.vscode.request_testGetTargetBreakpoints()
-        if response:
-            breakpoints = response['body']['breakpoints']
-            self.assertTrue(len(breakpoints) == len(functions),
-                            "expect %u source breakpoints" % (len(functions)))
-            for breakpoint in breakpoints:
-                bp_id = breakpoint['id']
-                self.assertTrue(bp_id == bp_id_12,
-                                'verify "twelve" breakpoint ID is same')
-                self.assertTrue(breakpoint['verified'],
-                                "expect breakpoint still verified")
-
-        # Now clear all breakpoints for the source file by passing down an
-        # empty lines array
-        functions = []
-        response = self.vscode.request_setFunctionBreakpoints(functions)
-        if response:
-            breakpoints = response['body']['breakpoints']
-            self.assertTrue(len(breakpoints) == len(functions),
-                            "expect %u source breakpoints" % (len(functions)))
-
-        # Verify with the target that all breakpoints have been cleared
-        response = self.vscode.request_testGetTargetBreakpoints()
-        if response:
-            breakpoints = response['body']['breakpoints']
-            self.assertTrue(len(breakpoints) == len(functions),
-                            "expect %u source breakpoints" % (len(functions)))
-
-    @skipIfWindows
-    def test_functionality(self):
-        '''Tests hitting breakpoints and the functionality of a single
-           breakpoint, like 'conditions' and 'hitCondition' settings.'''
-
-        program = self.getBuildArtifact("a.out")
-        self.build_and_launch(program)
-        # Set a breakpoint on "twelve" with no condition and no hitCondition
-        functions = ['twelve']
-        breakpoint_ids = self.set_function_breakpoints(functions)
-
-        self.assertTrue(len(breakpoint_ids) == len(functions),
-                        "expect one breakpoint")
-
-        # Verify we hit the breakpoint we just set
-        self.continue_to_breakpoints(breakpoint_ids)
-
-        # Make sure i is zero at first breakpoint
-        i = int(self.vscode.get_local_variable_value('i'))
-        self.assertTrue(i == 0, 'i != 0 after hitting breakpoint')
-
-        # Update the condition on our breakpoint
-        new_breakpoint_ids = self.set_function_breakpoints(functions,
-                                                           condition="i==4")
-        self.assertTrue(breakpoint_ids == new_breakpoint_ids,
-                        "existing breakpoint should have its condition "
-                        "updated")
-
-        self.continue_to_breakpoints(breakpoint_ids)
-        i = int(self.vscode.get_local_variable_value('i'))
-        self.assertTrue(i == 4,
-                        'i != 4 showing conditional works')
-        new_breakpoint_ids = self.set_function_breakpoints(functions,
-                                                           hitCondition="2")
-
-        self.assertTrue(breakpoint_ids == new_breakpoint_ids,
-                        "existing breakpoint should have its condition "
-                        "updated")
-
-        # Continue with a hitContidtion of 2 and expect it to skip 1 value
-        self.continue_to_breakpoints(breakpoint_ids)
-        i = int(self.vscode.get_local_variable_value('i'))
-        self.assertTrue(i == 6,
-                        'i != 6 showing hitCondition works')
-
-        # continue after hitting our hitCondition and make sure it only goes
-        # up by 1
-        self.continue_to_breakpoints(breakpoint_ids)
-        i = int(self.vscode.get_local_variable_value('i'))
-        self.assertTrue(i == 7,
-                        'i != 7 showing post hitCondition hits every time')
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/main.cpp
deleted file mode 100644 (file)
index e859b04..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#include <stdio.h>
-#include <stdexcept>
-
-int twelve(int i) {
-  return 12 + i; // break 12
-}
-
-int thirteen(int i) {
-  return 13 + i; // break 13
-}
-
-namespace a {
-  int fourteen(int i) {
-    return 14 + i; // break 14
-  }
-}
-int main(int argc, char const *argv[]) {
-  for (int i=0; i<10; ++i) {
-    int x = twelve(i) + thirteen(i) + a::fourteen(i); // break loop
-  }
-  try {
-    throw std::invalid_argument( "throwing exception for testing" );
-  } catch (...) {
-    puts("caught exception...");
-  }
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/completions/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/completions/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/completions/TestVSCode_completions.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/completions/TestVSCode_completions.py
deleted file mode 100644 (file)
index d1d9234..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-"""
-Test lldb-vscode completions request
-"""
-
-
-import lldbvscode_testcase
-import unittest2
-import vscode
-from lldbsuite.test import lldbutil
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-
-
-class TestVSCode_variables(lldbvscode_testcase.VSCodeTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def verify_completions(self, actual_list, expected_list, not_expected_list=[]):
-        for expected_item in expected_list:
-            self.assertTrue(expected_item in actual_list)
-
-        for not_expected_item in not_expected_list:
-            self.assertFalse(not_expected_item in actual_list)
-
-    @skipIfWindows
-    @skipIfDarwin # Skip this test for now until we can figure out why tings aren't working on build bots
-    def test_completions(self):
-        """
-            Tests the completion request at different breakpoints
-        """
-        program = self.getBuildArtifact("a.out")
-        self.build_and_launch(program)
-        source = "main.cpp"
-        breakpoint1_line = line_number(source, "// breakpoint 1")
-        breakpoint2_line = line_number(source, "// breakpoint 2")
-        breakpoint_ids = self.set_source_breakpoints(
-            source, [breakpoint1_line, breakpoint2_line]
-        )
-        self.continue_to_next_stop()
-
-        # shouldn't see variables inside main
-        self.verify_completions(
-            self.vscode.get_completions("var"),
-            [
-                {
-                    "text": "var",
-                    "label": "var -- vector<basic_string<char, char_traits<char>, allocator<char> >, allocator<basic_string<char, char_traits<char>, allocator<char> > > > &",
-                }
-            ],
-            [{"text": "var1", "label": "var1 -- int &"}],
-        )
-
-        # should see global keywords but not variables inside main
-        self.verify_completions(
-            self.vscode.get_completions("str"),
-            [{"text": "struct", "label": "struct"}],
-            [{"text": "str1", "label": "str1 -- std::string &"}],
-        )
-
-        self.continue_to_next_stop()
-
-        # should see variables from main but not from the other function
-        self.verify_completions(
-            self.vscode.get_completions("var"),
-            [
-                {"text": "var1", "label": "var1 -- int &"},
-                {"text": "var2", "label": "var2 -- int &"},
-            ],
-            [
-                {
-                    "text": "var",
-                    "label": "var -- vector<basic_string<char, char_traits<char>, allocator<char> >, allocator<basic_string<char, char_traits<char>, allocator<char> > > > &",
-                }
-            ],
-        )
-
-        self.verify_completions(
-            self.vscode.get_completions("str"),
-            [
-                {"text": "struct", "label": "struct"},
-                {"text": "str1", "label": "str1 -- string &"},
-            ],
-        )
-
-        # should complete arbitrary commands including word starts
-        self.verify_completions(
-            self.vscode.get_completions("`log enable  "),
-            [{"text": "gdb-remote", "label": "gdb-remote"}],
-        )
-
-        # should complete expressions with quotes inside
-        self.verify_completions(
-            self.vscode.get_completions('`expr " "; typed'),
-            [{"text": "typedef", "label": "typedef"}],
-        )
-
-        # should complete an incomplete quoted token
-        self.verify_completions(
-            self.vscode.get_completions('`setting "se'),
-            [
-                {
-                    "text": "set",
-                    "label": "set -- Set the value of the specified debugger setting.",
-                }
-            ],
-        )
-        self.verify_completions(
-            self.vscode.get_completions("`'comm"),
-            [
-                {
-                    "text": "command",
-                    "label": "command -- Commands for managing custom LLDB commands.",
-                }
-            ],
-        )
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/completions/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/completions/main.cpp
deleted file mode 100644 (file)
index 14a8815..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <string>
-#include <vector>
-
-int fun(std::vector<std::string> var) {
-  return var.size(); // breakpoint 1
-}
-
-int main(int argc, char const *argv[]) {
-  int var1 = 0;
-  int var2 = 1;
-  std::string str1 = "a";
-  std::string str2 = "b";
-  std::vector<std::string> vec;
-  fun(vec);
-  return 0; // breakpoint 2
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py
deleted file mode 100644 (file)
index 76c8064..0000000
+++ /dev/null
@@ -1,384 +0,0 @@
-"""
-Test lldb-vscode setBreakpoints request
-"""
-
-
-import unittest2
-import vscode
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-import lldbvscode_testcase
-import os
-
-
-class TestVSCode_launch(lldbvscode_testcase.VSCodeTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfWindows
-    @skipIfDarwin # Flaky
-    def test_default(self):
-        '''
-            Tests the default launch of a simple program. No arguments,
-            environment, or anything else is specified.
-        '''
-        program = self.getBuildArtifact("a.out")
-        self.build_and_launch(program)
-        self.continue_to_exit()
-        # Now get the STDOUT and verify our program argument is correct
-        output = self.get_stdout()
-        self.assertTrue(output and len(output) > 0,
-                        "expect program output")
-        lines = output.splitlines()
-        self.assertTrue(program in lines[0],
-                        "make sure program path is in first argument")
-
-    @skipIfWindows
-    def test_stopOnEntry(self):
-        '''
-            Tests the default launch of a simple program that stops at the
-            entry point instead of continuing.
-        '''
-        program = self.getBuildArtifact("a.out")
-        self.build_and_launch(program, stopOnEntry=True)
-        self.set_function_breakpoints(['main'])
-        stopped_events = self.continue_to_next_stop()
-        for stopped_event in stopped_events:
-            if 'body' in stopped_event:
-                body = stopped_event['body']
-                if 'reason' in body:
-                    reason = body['reason']
-                    self.assertTrue(
-                        reason != 'breakpoint',
-                        'verify stop isn\'t "main" breakpoint')
-
-    @skipIfWindows
-    def test_cwd(self):
-        '''
-            Tests the default launch of a simple program with a current working
-            directory.
-        '''
-        program = self.getBuildArtifact("a.out")
-        program_parent_dir = os.path.realpath(
-            os.path.dirname(os.path.dirname(program)))
-        self.build_and_launch(program,
-                              cwd=program_parent_dir)
-        self.continue_to_exit()
-        # Now get the STDOUT and verify our program argument is correct
-        output = self.get_stdout()
-        self.assertTrue(output and len(output) > 0,
-                        "expect program output")
-        lines = output.splitlines()
-        found = False
-        for line in lines:
-            if line.startswith('cwd = \"'):
-                quote_path = '"%s"' % (program_parent_dir)
-                found = True
-                self.assertTrue(quote_path in line,
-                                "working directory '%s' not in '%s'" % (
-                                    program_parent_dir, line))
-        self.assertTrue(found, "verified program working directory")
-
-    @skipIfWindows
-    def test_debuggerRoot(self):
-        '''
-            Tests the "debuggerRoot" will change the working directory of
-            the lldb-vscode debug adaptor.
-        '''
-        program = self.getBuildArtifact("a.out")
-        program_parent_dir = os.path.realpath(
-            os.path.dirname(os.path.dirname(program)))
-        commands = ['platform shell echo cwd = $PWD']
-        self.build_and_launch(program,
-                              debuggerRoot=program_parent_dir,
-                              initCommands=commands)
-        output = self.get_console()
-        self.assertTrue(output and len(output) > 0,
-                        "expect console output")
-        lines = output.splitlines()
-        prefix = 'cwd = '
-        found = False
-        for line in lines:
-            if line.startswith(prefix):
-                found = True
-                self.assertTrue(program_parent_dir == line[len(prefix):],
-                                "lldb-vscode working dir '%s' == '%s'" % (
-                                    program_parent_dir, line[6:]))
-        self.assertTrue(found, "verified lldb-vscode working directory")
-        self.continue_to_exit()
-
-    @skipIfWindows
-    def test_sourcePath(self):
-        '''
-            Tests the "sourcePath" will set the target.source-map.
-        '''
-        program = self.getBuildArtifact("a.out")
-        program_dir = os.path.dirname(program)
-        self.build_and_launch(program,
-                              sourcePath=program_dir)
-        output = self.get_console()
-        self.assertTrue(output and len(output) > 0,
-                        "expect console output")
-        lines = output.splitlines()
-        prefix = '(lldb) settings set target.source-map "." '
-        found = False
-        for line in lines:
-            if line.startswith(prefix):
-                found = True
-                quoted_path = '"%s"' % (program_dir)
-                self.assertTrue(quoted_path == line[len(prefix):],
-                                "lldb-vscode working dir %s == %s" % (
-                                    quoted_path, line[6:]))
-        self.assertTrue(found, 'found "sourcePath" in console output')
-        self.continue_to_exit()
-
-    @skipIfWindows
-    def test_disableSTDIO(self):
-        '''
-            Tests the default launch of a simple program with STDIO disabled.
-        '''
-        program = self.getBuildArtifact("a.out")
-        self.build_and_launch(program,
-                              disableSTDIO=True)
-        self.continue_to_exit()
-        # Now get the STDOUT and verify our program argument is correct
-        output = self.get_stdout()
-        self.assertTrue(output is None or len(output) == 0,
-                        "expect no program output")
-
-    @skipIfWindows
-    @skipIfLinux # shell argument expansion doesn't seem to work on Linux
-    @expectedFailureNetBSD
-    def test_shellExpandArguments_enabled(self):
-        '''
-            Tests the default launch of a simple program with shell expansion
-            enabled.
-        '''
-        program = self.getBuildArtifact("a.out")
-        program_dir = os.path.dirname(program)
-        glob = os.path.join(program_dir, '*.out')
-        self.build_and_launch(program, args=[glob], shellExpandArguments=True)
-        self.continue_to_exit()
-        # Now get the STDOUT and verify our program argument is correct
-        output = self.get_stdout()
-        self.assertTrue(output and len(output) > 0,
-                        "expect no program output")
-        lines = output.splitlines()
-        for line in lines:
-            quote_path = '"%s"' % (program)
-            if line.startswith("arg[1] ="):
-                self.assertTrue(quote_path in line,
-                                'verify "%s" expanded to "%s"' % (
-                                    glob, program))
-
-    @skipIfWindows
-    def test_shellExpandArguments_disabled(self):
-        '''
-            Tests the default launch of a simple program with shell expansion
-            disabled.
-        '''
-        program = self.getBuildArtifact("a.out")
-        program_dir = os.path.dirname(program)
-        glob = os.path.join(program_dir, '*.out')
-        self.build_and_launch(program,
-                              args=[glob],
-                              shellExpandArguments=False)
-        self.continue_to_exit()
-        # Now get the STDOUT and verify our program argument is correct
-        output = self.get_stdout()
-        self.assertTrue(output and len(output) > 0,
-                        "expect no program output")
-        lines = output.splitlines()
-        for line in lines:
-            quote_path = '"%s"' % (glob)
-            if line.startswith("arg[1] ="):
-                self.assertTrue(quote_path in line,
-                                'verify "%s" stayed to "%s"' % (
-                                    glob, glob))
-
-    @skipIfWindows
-    def test_args(self):
-        '''
-            Tests launch of a simple program with arguments
-        '''
-        program = self.getBuildArtifact("a.out")
-        args = ["one", "with space", "'with single quotes'",
-                '"with double quotes"']
-        self.build_and_launch(program,
-                              args=args)
-        self.continue_to_exit()
-
-        # Now get the STDOUT and verify our arguments got passed correctly
-        output = self.get_stdout()
-        self.assertTrue(output and len(output) > 0,
-                        "expect program output")
-        lines = output.splitlines()
-        # Skip the first argument that contains the program name
-        lines.pop(0)
-        # Make sure arguments we specified are correct
-        for (i, arg) in enumerate(args):
-            quoted_arg = '"%s"' % (arg)
-            self.assertTrue(quoted_arg in lines[i],
-                            'arg[%i] "%s" not in "%s"' % (i+1, quoted_arg, lines[i]))
-
-    @skipIfWindows
-    def test_environment(self):
-        '''
-            Tests launch of a simple program with environment variables
-        '''
-        program = self.getBuildArtifact("a.out")
-        env = ["NO_VALUE", "WITH_VALUE=BAR", "EMPTY_VALUE=",
-               "SPACE=Hello World"]
-        self.build_and_launch(program,
-                              env=env)
-        self.continue_to_exit()
-
-        # Now get the STDOUT and verify our arguments got passed correctly
-        output = self.get_stdout()
-        self.assertTrue(output and len(output) > 0,
-                        "expect program output")
-        lines = output.splitlines()
-        # Skip the all arguments so we have only environment vars left
-        while len(lines) and lines[0].startswith("arg["):
-            lines.pop(0)
-        # Make sure each environment variable in "env" is actually set in the
-        # program environment that was printed to STDOUT
-        for var in env:
-            found = False
-            for program_var in lines:
-                if var in program_var:
-                    found = True
-                    break
-            self.assertTrue(found,
-                            '"%s" must exist in program environment (%s)' % (
-                                var, lines))
-
-    @skipIfWindows
-    def test_commands(self):
-        '''
-            Tests the "initCommands", "preRunCommands", "stopCommands" and
-            "exitCommands" that can be passed during launch.
-
-            "initCommands" are a list of LLDB commands that get executed
-            before the targt is created.
-            "preRunCommands" are a list of LLDB commands that get executed
-            after the target has been created and before the launch.
-            "stopCommands" are a list of LLDB commands that get executed each
-            time the program stops.
-            "exitCommands" are a list of LLDB commands that get executed when
-            the process exits
-        '''
-        program = self.getBuildArtifact("a.out")
-        initCommands = ['target list', 'platform list']
-        preRunCommands = ['image list a.out', 'image dump sections a.out']
-        stopCommands = ['frame variable', 'bt']
-        exitCommands = ['expr 2+3', 'expr 3+4']
-        self.build_and_launch(program,
-                              initCommands=initCommands,
-                              preRunCommands=preRunCommands,
-                              stopCommands=stopCommands,
-                              exitCommands=exitCommands)
-
-        # Get output from the console. This should contain both the
-        # "initCommands" and the "preRunCommands".
-        output = self.get_console()
-        # Verify all "initCommands" were found in console output
-        self.verify_commands('initCommands', output, initCommands)
-        # Verify all "preRunCommands" were found in console output
-        self.verify_commands('preRunCommands', output, preRunCommands)
-
-        source = 'main.c'
-        first_line = line_number(source, '// breakpoint 1')
-        second_line = line_number(source, '// breakpoint 2')
-        lines = [first_line, second_line]
-
-        # Set 2 breakoints so we can verify that "stopCommands" get run as the
-        # breakpoints get hit
-        breakpoint_ids = self.set_source_breakpoints(source, lines)
-        self.assertTrue(len(breakpoint_ids) == len(lines),
-                        "expect correct number of breakpoints")
-
-        # Continue after launch and hit the first breakpoint.
-        # Get output from the console. This should contain both the
-        # "stopCommands" that were run after the first breakpoint was hit
-        self.continue_to_breakpoints(breakpoint_ids)
-        output = self.get_console(timeout=1.0)
-        self.verify_commands('stopCommands', output, stopCommands)
-
-        # Continue again and hit the second breakpoint.
-        # Get output from the console. This should contain both the
-        # "stopCommands" that were run after the second breakpoint was hit
-        self.continue_to_breakpoints(breakpoint_ids)
-        output = self.get_console(timeout=1.0)
-        self.verify_commands('stopCommands', output, stopCommands)
-
-        # Continue until the program exits
-        self.continue_to_exit()
-        # Get output from the console. This should contain both the
-        # "exitCommands" that were run after the second breakpoint was hit
-        output = self.get_console(timeout=1.0)
-        self.verify_commands('exitCommands', output, exitCommands)
-
-    @skipIfWindows
-    def test_extra_launch_commands(self):
-        '''
-            Tests the "luanchCommands" with extra launching settings
-        '''
-        self.build_and_create_debug_adaptor()
-        program = self.getBuildArtifact("a.out")
-
-        source = 'main.c'
-        first_line = line_number(source, '// breakpoint 1')
-        second_line = line_number(source, '// breakpoint 2')
-        # Set target binary and 2 breakoints
-        # then we can varify the "launchCommands" get run
-        # also we can verify that "stopCommands" get run as the
-        # breakpoints get hit
-        launchCommands = [
-            'target create "%s"' % (program),
-            'br s -f main.c -l %d' % first_line,
-            'br s -f main.c -l %d' % second_line,
-            'process launch --stop-at-entry'
-        ]
-
-        initCommands = ['target list', 'platform list']
-        preRunCommands = ['image list a.out', 'image dump sections a.out']
-        stopCommands = ['frame variable', 'bt']
-        exitCommands = ['expr 2+3', 'expr 3+4']
-        self.launch(program,
-                    initCommands=initCommands,
-                    preRunCommands=preRunCommands,
-                    stopCommands=stopCommands,
-                    exitCommands=exitCommands,
-                    launchCommands=launchCommands)
-
-        # Get output from the console. This should contain both the
-        # "initCommands" and the "preRunCommands".
-        output = self.get_console()
-        # Verify all "initCommands" were found in console output
-        self.verify_commands('initCommands', output, initCommands)
-        # Verify all "preRunCommands" were found in console output
-        self.verify_commands('preRunCommands', output, preRunCommands)
-
-        # Verify all "launchCommands" were founc in console output
-        # After execution, program should launch
-        self.verify_commands('launchCommands', output, launchCommands)
-        # Verify the "stopCommands" here
-        self.continue_to_next_stop()
-        output = self.get_console(timeout=1.0)
-        self.verify_commands('stopCommands', output, stopCommands)
-
-        # Continue and hit the second breakpoint.
-        # Get output from the console. This should contain both the
-        # "stopCommands" that were run after the first breakpoint was hit
-        self.continue_to_next_stop()
-        output = self.get_console(timeout=1.0)
-        self.verify_commands('stopCommands', output, stopCommands)
-
-        # Continue until the program exits
-        self.continue_to_exit()
-        # Get output from the console. This should contain both the
-        # "exitCommands" that were run after the second breakpoint was hit
-        output = self.get_console(timeout=1.0)
-        self.verify_commands('exitCommands', output, exitCommands)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/main.c
deleted file mode 100644 (file)
index aed2af9..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-int main(int argc, char const *argv[], char const *envp[]) {
-  for (int i=0; i<argc; ++i)
-    printf("arg[%i] = \"%s\"\n", i, argv[i]);
-  for (int i=0; envp[i]; ++i)
-    printf("env[%i] = \"%s\"\n", i, envp[i]);
-  char *cwd = getcwd(NULL, 0);
-  printf("cwd = \"%s\"\n", cwd); // breakpoint 1
-  free(cwd);
-  cwd = NULL;
-  return 0;  // breakpoint 2
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/Makefile
deleted file mode 100644 (file)
index 1049594..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := main.c
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/TestVSCode_stackTrace.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/TestVSCode_stackTrace.py
deleted file mode 100644 (file)
index 817e40e..0000000
+++ /dev/null
@@ -1,163 +0,0 @@
-"""
-Test lldb-vscode setBreakpoints request
-"""
-
-
-import unittest2
-import vscode
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-import lldbvscode_testcase
-import os
-
-
-class TestVSCode_stackTrace(lldbvscode_testcase.VSCodeTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    name_key_path = ['name']
-    source_key_path = ['source', 'path']
-    line_key_path = ['line']
-
-    def verify_stackFrames(self, start_idx, stackFrames):
-        frame_idx = start_idx
-        for stackFrame in stackFrames:
-            # Don't care about frame above main
-            if frame_idx > 20:
-                return
-            self.verify_stackFrame(frame_idx, stackFrame)
-            frame_idx += 1
-
-    def verify_stackFrame(self, frame_idx, stackFrame):
-        frame_name = self.get_dict_value(stackFrame, self.name_key_path)
-        frame_source = self.get_dict_value(stackFrame, self.source_key_path)
-        frame_line = self.get_dict_value(stackFrame, self.line_key_path)
-        if frame_idx == 0:
-            expected_line = self.recurse_end
-            expected_name = 'recurse'
-        elif frame_idx < 20:
-            expected_line = self.recurse_call
-            expected_name = 'recurse'
-        else:
-            expected_line = self.recurse_invocation
-            expected_name = 'main'
-        self.assertTrue(frame_name == expected_name,
-                        'frame #%i name "%s" == "%s"' % (
-                            frame_idx, frame_name, expected_name))
-        self.assertTrue(frame_source == self.source_path,
-                        'frame #%i source "%s" == "%s"' % (
-                            frame_idx, frame_source, self.source_path))
-        self.assertTrue(frame_line == expected_line,
-                        'frame #%i line %i == %i' % (frame_idx, frame_line,
-                                                     expected_line))
-
-    @skipIfWindows
-    def test_stackTrace(self):
-        '''
-            Tests the 'stackTrace' packet and all its variants.
-        '''
-        program = self.getBuildArtifact("a.out")
-        self.build_and_launch(program)
-        source = 'main.c'
-        self.source_path = os.path.join(os.getcwd(), source)
-        self.recurse_end = line_number(source, 'recurse end')
-        self.recurse_call = line_number(source, 'recurse call')
-        self.recurse_invocation = line_number(source, 'recurse invocation')
-
-        lines = [self.recurse_end]
-
-        # Set breakoint at a point of deepest recuusion
-        breakpoint_ids = self.set_source_breakpoints(source, lines)
-        self.assertTrue(len(breakpoint_ids) == len(lines),
-                        "expect correct number of breakpoints")
-
-        self.continue_to_breakpoints(breakpoint_ids)
-        startFrame = 0
-        # Verify we get all stack frames with no arguments
-        (stackFrames, totalFrames) = self.get_stackFrames_and_totalFramesCount()
-        frameCount = len(stackFrames)
-        self.assertTrue(frameCount >= 20,
-                        'verify we get at least 20 frames for all frames')
-        self.assertTrue(totalFrames == frameCount,
-                        'verify we get correct value for totalFrames count')
-        self.verify_stackFrames(startFrame, stackFrames)
-
-        # Verify all stack frames by specifying startFrame = 0 and levels not
-        # specified
-        stackFrames = self.get_stackFrames(startFrame=startFrame)
-        self.assertTrue(frameCount == len(stackFrames),
-                        ('verify same number of frames with startFrame=%i') % (
-                            startFrame))
-        self.verify_stackFrames(startFrame, stackFrames)
-
-        # Verify all stack frames by specifying startFrame = 0 and levels = 0
-        levels = 0
-        stackFrames = self.get_stackFrames(startFrame=startFrame,
-                                           levels=levels)
-        self.assertTrue(frameCount == len(stackFrames),
-                        ('verify same number of frames with startFrame=%i and'
-                         ' levels=%i') % (startFrame, levels))
-        self.verify_stackFrames(startFrame, stackFrames)
-
-        # Get only the first stack frame by sepcifying startFrame = 0 and
-        # levels = 1
-        levels = 1
-        stackFrames = self.get_stackFrames(startFrame=startFrame,
-                                           levels=levels)
-        self.assertTrue(levels == len(stackFrames),
-                        ('verify one frame with startFrame=%i and'
-                         ' levels=%i') % (startFrame, levels))
-        self.verify_stackFrames(startFrame, stackFrames)
-
-        # Get only the first 3 stack frames by sepcifying startFrame = 0 and
-        # levels = 3
-        levels = 3
-        stackFrames = self.get_stackFrames(startFrame=startFrame,
-                                           levels=levels)
-        self.assertTrue(levels == len(stackFrames),
-                        ('verify %i frames with startFrame=%i and'
-                         ' levels=%i') % (levels, startFrame, levels))
-        self.verify_stackFrames(startFrame, stackFrames)
-
-        # Get only the first 15 stack frames by sepcifying startFrame = 5 and
-        # levels = 16
-        startFrame = 5
-        levels = 16
-        stackFrames = self.get_stackFrames(startFrame=startFrame,
-                                           levels=levels)
-        self.assertTrue(levels == len(stackFrames),
-                        ('verify %i frames with startFrame=%i and'
-                         ' levels=%i') % (levels, startFrame, levels))
-        self.verify_stackFrames(startFrame, stackFrames)
-
-        # Verify we cap things correctly when we ask for too many frames
-        startFrame = 5
-        levels = 1000
-        (stackFrames, totalFrames) = self.get_stackFrames_and_totalFramesCount(
-                                            startFrame=startFrame,
-                                            levels=levels)
-        self.assertTrue(len(stackFrames) == frameCount - startFrame,
-                        ('verify less than 1000 frames with startFrame=%i and'
-                         ' levels=%i') % (startFrame, levels))
-        self.assertTrue(totalFrames == frameCount,
-                        'verify we get correct value for totalFrames count '
-                        'when requested frames not from 0 index')
-        self.verify_stackFrames(startFrame, stackFrames)
-
-        # Verify level=0 works with non-zerp start frame
-        startFrame = 5
-        levels = 0
-        stackFrames = self.get_stackFrames(startFrame=startFrame,
-                                           levels=levels)
-        self.assertTrue(len(stackFrames) == frameCount - startFrame,
-                        ('verify less than 1000 frames with startFrame=%i and'
-                         ' levels=%i') % (startFrame, levels))
-        self.verify_stackFrames(startFrame, stackFrames)
-
-        # Verify we get not frames when startFrame is too high
-        startFrame = 1000
-        levels = 1
-        stackFrames = self.get_stackFrames(startFrame=startFrame,
-                                           levels=levels)
-        self.assertTrue(0 == len(stackFrames),
-                        'verify zero frames with startFrame out of bounds')
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/main.c b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/main.c
deleted file mode 100644 (file)
index 85b41c4..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <stdio.h>
-#include <unistd.h>
-
-int recurse(int x) {
-  if (x <= 1)
-    return 1; // recurse end
-  return recurse(x-1) + x; // recurse call
-}
-
-int main(int argc, char const *argv[]) {
-  recurse(20); // recurse invocation
-  return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/step/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/step/Makefile
deleted file mode 100644 (file)
index b7f3072..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-ENABLE_THREADS := YES
-
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/step/TestVSCode_step.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/step/TestVSCode_step.py
deleted file mode 100644 (file)
index 2431464..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-"""
-Test lldb-vscode setBreakpoints request
-"""
-
-
-import unittest2
-import vscode
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-import lldbvscode_testcase
-
-
-class TestVSCode_step(lldbvscode_testcase.VSCodeTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfWindows
-    def test_step(self):
-        '''
-            Tests the stepping in/out/over in threads.
-        '''
-        program = self.getBuildArtifact("a.out")
-        self.build_and_launch(program)
-        source = 'main.cpp'
-        # source_path = os.path.join(os.getcwd(), source)
-        breakpoint1_line = line_number(source, '// breakpoint 1')
-        lines = [breakpoint1_line]
-        # Set breakoint in the thread function so we can step the threads
-        breakpoint_ids = self.set_source_breakpoints(source, lines)
-        self.assertEqual(len(breakpoint_ids), len(lines),
-                        "expect correct number of breakpoints")
-        self.continue_to_breakpoints(breakpoint_ids)
-        threads = self.vscode.get_threads()
-        for thread in threads:
-            if 'reason' in thread:
-                reason = thread['reason']
-                if reason == 'breakpoint':
-                    # We have a thread that is stopped at our breakpoint.
-                    # Get the value of "x" and get the source file and line.
-                    # These will help us determine if we are stepping
-                    # correctly. If we step a thread correctly we will verify
-                    # the correct falue for x as it progresses through the
-                    # program.
-                    tid = thread['id']
-                    x1 = self.get_local_as_int('x', threadId=tid)
-                    (src1, line1) = self.get_source_and_line(threadId=tid)
-
-                    # Now step into the "recurse()" function call again and
-                    # verify, using the new value of "x" and the source file
-                    # and line if we stepped correctly
-                    self.stepIn(threadId=tid, waitForStop=True)
-                    x2 = self.get_local_as_int('x', threadId=tid)
-                    (src2, line2) = self.get_source_and_line(threadId=tid)
-                    self.assertEqual(x1, x2 + 1, 'verify step in variable')
-                    self.assertLess(line2, line1, 'verify step in line')
-                    self.assertEqual(src1, src2, 'verify step in source')
-
-                    # Now step out and verify
-                    self.stepOut(threadId=tid, waitForStop=True)
-                    x3 = self.get_local_as_int('x', threadId=tid)
-                    (src3, line3) = self.get_source_and_line(threadId=tid)
-                    self.assertEqual(x1, x3, 'verify step out variable')
-                    self.assertGreaterEqual(line3, line1, 'verify step out line')
-                    self.assertEqual(src1, src3, 'verify step in source')
-
-                    # Step over and verify
-                    self.stepOver(threadId=tid, waitForStop=True)
-                    x4 = self.get_local_as_int('x', threadId=tid)
-                    (src4, line4) = self.get_source_and_line(threadId=tid)
-                    self.assertEqual(x4, x3, 'verify step over variable')
-                    self.assertGreater(line4, line3, 'verify step over line')
-                    self.assertEqual(src1, src4, 'verify step over source')
-                    # only step one thread that is at the breakpoint and stop
-                    break
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/step/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/step/main.cpp
deleted file mode 100644 (file)
index 3027551..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-int function(int x) {
-  if ((x % 2) == 0)
-    return function(x-1) + x; // breakpoint 1
-  else
-    return x;
-}
-
-int main(int argc, char const *argv[]) {
-  return function(2);
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/Makefile
deleted file mode 100644 (file)
index 99998b2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CXX_SOURCES := main.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/TestVSCode_variables.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/TestVSCode_variables.py
deleted file mode 100644 (file)
index 55c4fd0..0000000
+++ /dev/null
@@ -1,222 +0,0 @@
-"""
-Test lldb-vscode setBreakpoints request
-"""
-
-from __future__ import print_function
-
-import unittest2
-import vscode
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-import lldbvscode_testcase
-
-
-def make_buffer_verify_dict(start_idx, count, offset=0):
-    verify_dict = {}
-    for i in range(start_idx, start_idx + count):
-        verify_dict['[%i]' % (i)] = {'type': 'int', 'value': str(i+offset)}
-    return verify_dict
-
-
-class TestVSCode_variables(lldbvscode_testcase.VSCodeTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def verify_values(self, verify_dict, actual, varref_dict=None):
-        if 'equals' in verify_dict:
-            verify = verify_dict['equals']
-            for key in verify:
-                verify_value = verify[key]
-                actual_value = actual[key]
-                self.assertTrue(verify_value == actual_value,
-                                '"%s" keys don\'t match (%s != %s)' % (
-                                    key, actual_value, verify_value))
-        if 'startswith' in verify_dict:
-            verify = verify_dict['startswith']
-            for key in verify:
-                verify_value = verify[key]
-                actual_value = actual[key]
-                startswith = actual_value.startswith(verify_value)
-                self.assertTrue(startswith,
-                                ('"%s" value "%s" doesn\'t start with'
-                                 ' "%s")') % (
-                                    key, actual_value,
-                                    verify_value))
-        hasVariablesReference = 'variablesReference' in actual
-        varRef = None
-        if hasVariablesReference:
-            # Remember variable references in case we want to test further
-            # by using the evaluate name.
-            varRef = actual['variablesReference']
-            if varRef != 0 and varref_dict is not None:
-                varref_dict[actual['evaluateName']] = varRef
-        if ('hasVariablesReference' in verify_dict and
-                verify_dict['hasVariablesReference']):
-            self.assertTrue(hasVariablesReference,
-                            "verify variable reference")
-        if 'children' in verify_dict:
-            self.assertTrue(hasVariablesReference and varRef is not None and
-                            varRef != 0,
-                            ("children verify values specified for "
-                             "variable without children"))
-
-            response = self.vscode.request_variables(varRef)
-            self.verify_variables(verify_dict['children'],
-                                  response['body']['variables'],
-                                  varref_dict)
-
-    def verify_variables(self, verify_dict, variables, varref_dict=None):
-        for variable in variables:
-            name = variable['name']
-            self.assertTrue(name in verify_dict,
-                            'variable "%s" in verify dictionary' % (name))
-            self.verify_values(verify_dict[name], variable, varref_dict)
-
-    @skipIfWindows
-    def test_scopes_variables_setVariable_evaluate(self):
-        '''
-            Tests the "scopes", "variables", "setVariable", and "evaluate"
-            packets.
-        '''
-        program = self.getBuildArtifact("a.out")
-        self.build_and_launch(program)
-        source = 'main.cpp'
-        breakpoint1_line = line_number(source, '// breakpoint 1')
-        lines = [breakpoint1_line]
-        # Set breakpoint in the thread function so we can step the threads
-        breakpoint_ids = self.set_source_breakpoints(source, lines)
-        self.assertTrue(len(breakpoint_ids) == len(lines),
-                        "expect correct number of breakpoints")
-        self.continue_to_breakpoints(breakpoint_ids)
-        locals = self.vscode.get_local_variables()
-        globals = self.vscode.get_global_variables()
-        buffer_children = make_buffer_verify_dict(0, 32)
-        verify_locals = {
-            'argc': {
-                'equals': {'type': 'int', 'value': '1'}
-            },
-            'argv': {
-                'equals': {'type': 'const char **'},
-                'startswith': {'value': '0x'},
-                'hasVariablesReference': True
-            },
-            'pt': {
-                'equals': {'type': 'PointType'},
-                'hasVariablesReference': True,
-                'children': {
-                    'x': {'equals': {'type': 'int', 'value': '11'}},
-                    'y': {'equals': {'type': 'int', 'value': '22'}},
-                    'buffer': {'children': buffer_children}
-                }
-            }
-        }
-        verify_globals = {
-            's_local': {
-                'equals': {'type': 'float', 'value': '2.25'}
-            },
-            '::g_global': {
-                'equals': {'type': 'int', 'value': '123'}
-            },
-            's_global': {
-                'equals': {'type': 'int', 'value': '234'}
-            },
-        }
-        varref_dict = {}
-        self.verify_variables(verify_locals, locals, varref_dict)
-        self.verify_variables(verify_globals, globals, varref_dict)
-        # pprint.PrettyPrinter(indent=4).pprint(varref_dict)
-        # We need to test the functionality of the "variables" request as it
-        # has optional parameters like "start" and "count" to limit the number
-        # of variables that are fetched
-        varRef = varref_dict['pt.buffer']
-        response = self.vscode.request_variables(varRef)
-        self.verify_variables(buffer_children, response['body']['variables'])
-        # Verify setting start=0 in the arguments still gets all children
-        response = self.vscode.request_variables(varRef, start=0)
-        self.verify_variables(buffer_children, response['body']['variables'])
-        # Verify setting count=0 in the arguments still gets all children.
-        # If count is zero, it means to get all children.
-        response = self.vscode.request_variables(varRef, count=0)
-        self.verify_variables(buffer_children, response['body']['variables'])
-        # Verify setting count to a value that is too large in the arguments
-        # still gets all children, and no more
-        response = self.vscode.request_variables(varRef, count=1000)
-        self.verify_variables(buffer_children, response['body']['variables'])
-        # Verify setting the start index and count gets only the children we
-        # want
-        response = self.vscode.request_variables(varRef, start=5, count=5)
-        self.verify_variables(make_buffer_verify_dict(5, 5),
-                              response['body']['variables'])
-        # Verify setting the start index to a value that is out of range
-        # results in an empty list
-        response = self.vscode.request_variables(varRef, start=32, count=1)
-        self.assertTrue(len(response['body']['variables']) == 0,
-                        'verify we get no variable back for invalid start')
-
-        # Test evaluate
-        expressions = {
-            'pt.x': {
-                'equals': {'result': '11', 'type': 'int'},
-                'hasVariablesReference': False
-            },
-            'pt.buffer[2]': {
-                'equals': {'result': '2', 'type': 'int'},
-                'hasVariablesReference': False
-            },
-            'pt': {
-                'equals': {'type': 'PointType'},
-                'startswith': {'result': 'PointType @ 0x'},
-                'hasVariablesReference': True
-            },
-            'pt.buffer': {
-                'equals': {'type': 'int [32]'},
-                'startswith': {'result': 'int [32] @ 0x'},
-                'hasVariablesReference': True
-            },
-            'argv': {
-                'equals': {'type': 'const char **'},
-                'startswith': {'result': '0x'},
-                'hasVariablesReference': True
-            },
-            'argv[0]': {
-                'equals': {'type': 'const char *'},
-                'startswith': {'result': '0x'},
-                'hasVariablesReference': True
-            },
-            '2+3': {
-                'equals': {'result': '5', 'type': 'int'},
-                'hasVariablesReference': False
-            },
-        }
-        for expression in expressions:
-            response = self.vscode.request_evaluate(expression)
-            self.verify_values(expressions[expression], response['body'])
-
-        # Test setting variables
-        self.set_local('argc', 123)
-        argc = self.get_local_as_int('argc')
-        self.assertTrue(argc == 123,
-                        'verify argc was set to 123 (123 != %i)' % (argc))
-
-        self.set_local('argv', 0x1234)
-        argv = self.get_local_as_int('argv')
-        self.assertTrue(argv == 0x1234,
-                        'verify argv was set to 0x1234 (0x1234 != %#x)' % (
-                            argv))
-
-        # Set a variable value whose name is synthetic, like a variable index
-        # and verify the value by reading it
-        self.vscode.request_setVariable(varRef, "[0]", 100)
-        response = self.vscode.request_variables(varRef, start=0, count=1)
-        self.verify_variables(make_buffer_verify_dict(0, 1, 100),
-                              response['body']['variables'])
-
-        # Set a variable value whose name is a real child value, like "pt.x"
-        # and verify the value by reading it
-        varRef = varref_dict['pt']
-        self.vscode.request_setVariable(varRef, "x", 111)
-        response = self.vscode.request_variables(varRef, start=0, count=1)
-        value = response['body']['variables'][0]['value']
-        self.assertTrue(value == '111',
-                        'verify pt.x got set to 111 (111 != %s)' % (value))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/main.cpp
deleted file mode 100644 (file)
index 0223bd0..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-
-#define BUFFER_SIZE 32
-struct PointType {
-  int x;
-  int y;
-  int buffer[BUFFER_SIZE];
-};
-
-int g_global = 123;
-static int s_global = 234;
-
-int main(int argc, char const *argv[]) {
-  static float s_local = 2.25;
-  PointType pt = { 11,22, {0}};
-  for (int i=0; i<BUFFER_SIZE; ++i)
-    pt.buffer[i] = i;
-  return s_global - g_global - pt.y; // breakpoint 1
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/AbstractBase.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/AbstractBase.py
deleted file mode 100644 (file)
index 2ced139..0000000
+++ /dev/null
@@ -1,297 +0,0 @@
-"""
-Abstract base class of basic types provides a generic type tester method.
-"""
-
-from __future__ import print_function
-
-import os
-import re
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-def Msg(var, val, using_frame_variable):
-    return "'%s %s' matches the output (from compiled code): %s" % (
-        'frame variable --show-types' if using_frame_variable else 'expression', var, val)
-
-
-class GenericTester(TestBase):
-
-    # This is the pattern by design to match the " var = 'value'" output from
-    # printf() stmts (see basic_type.cpp).
-    pattern = re.compile(" (\*?a[^=]*) = '([^=]*)'$")
-
-    # Assert message.
-    DATA_TYPE_GROKKED = "Data type from expr parser output is parsed correctly"
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # We'll use the test method name as the exe_name.
-        # There are a bunch of test cases under test/types and we don't want the
-        # module cacheing subsystem to be confused with executable name "a.out"
-        # used for all the test cases.
-        self.exe_name = self.testMethodName
-        self.golden_filename = self.getBuildArtifact("golden-output.txt")
-
-    def tearDown(self):
-        """Cleanup the test byproducts."""
-        #print("Removing golden-output.txt...")
-        if os.path.exists(self.golden_filename):
-            os.remove(self.golden_filename)
-        TestBase.tearDown(self)
-
-    #==========================================================================#
-    # Functions build_and_run() and build_and_run_expr() are generic functions #
-    # which are called from the Test*Types*.py test cases.  The API client is  #
-    # responsible for supplying two mandatory arguments: the source file, e.g.,#
-    # 'int.cpp', and the atoms, e.g., set(['unsigned', 'long long']) to the    #
-    # functions.  There are also three optional keyword arguments of interest, #
-    # as follows:                                                              #
-    #                                                                          #
-    # bc -> blockCaptured (defaulted to False)                                 #
-    #         True: testing vars of various basic types from inside a block    #
-    #         False: testing vars of various basic types from a function       #
-    # qd -> quotedDisplay (defaulted to False)                                 #
-    #         True: the output from 'frame var' or 'expr var' contains a pair  #
-    #               of single quotes around the value                          #
-    #         False: no single quotes are to be found around the value of      #
-    #                variable                                                  #
-    #==========================================================================#
-
-    def build_and_run(self, source, atoms, bc=False, qd=False):
-        self.build_and_run_with_source_atoms_expr(
-            source, atoms, expr=False, bc=bc, qd=qd)
-
-    def build_and_run_expr(self, source, atoms, bc=False, qd=False):
-        self.build_and_run_with_source_atoms_expr(
-            source, atoms, expr=True, bc=bc, qd=qd)
-
-    def build_and_run_with_source_atoms_expr(
-            self, source, atoms, expr, bc=False, qd=False):
-        # See also Makefile and basic_type.cpp:177.
-        if bc:
-            d = {'CXX_SOURCES': source, 'EXE': self.exe_name,
-                 'CFLAGS_EXTRAS': '-DTEST_BLOCK_CAPTURED_VARS'}
-        else:
-            d = {'CXX_SOURCES': source, 'EXE': self.exe_name}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        if expr:
-            self.generic_type_expr_tester(
-                self.exe_name, atoms, blockCaptured=bc, quotedDisplay=qd)
-        else:
-            self.generic_type_tester(
-                self.exe_name,
-                atoms,
-                blockCaptured=bc,
-                quotedDisplay=qd)
-
-    def process_launch_o(self, localPath):
-        # process launch command output redirect always goes to host the
-        # process is running on
-        if lldb.remote_platform:
-            # process launch -o requires a path that is valid on the target
-            self.assertIsNotNone(lldb.remote_platform.GetWorkingDirectory())
-            remote_path = lldbutil.append_to_process_working_directory(self,
-                "lldb-stdout-redirect.txt")
-            self.runCmd(
-                'process launch -- {remote}'.format(remote=remote_path))
-            # copy remote_path to local host
-            self.runCmd('platform get-file {remote} "{local}"'.format(
-                remote=remote_path, local=self.golden_filename))
-        else:
-            self.runCmd(
-                'process launch -o "{local}"'.format(local=self.golden_filename))
-
-    def generic_type_tester(
-            self,
-            exe_name,
-            atoms,
-            quotedDisplay=False,
-            blockCaptured=False):
-        """Test that variables with basic types are displayed correctly."""
-        self.runCmd("file %s" % self.getBuildArtifact(exe_name),
-                    CURRENT_EXECUTABLE_SET)
-
-        # First, capture the golden output emitted by the oracle, i.e., the
-        # series of printf statements.
-
-        self.process_launch_o(self.golden_filename)
-
-        with open(self.golden_filename) as f:
-            go = f.read()
-
-        # This golden list contains a list of (variable, value) pairs extracted
-        # from the golden output.
-        gl = []
-
-        # Scan the golden output line by line, looking for the pattern:
-        #
-        #     variable = 'value'
-        #
-        for line in go.split(os.linesep):
-            # We'll ignore variables of array types from inside a block.
-            if blockCaptured and '[' in line:
-                continue
-            match = self.pattern.search(line)
-            if match:
-                var, val = match.group(1), match.group(2)
-                gl.append((var, val))
-        #print("golden list:", gl)
-
-        # This test uses a #include of "basic_type.cpp" so we need to enable
-        # always setting inlined breakpoints.
-        self.runCmd('settings set target.inline-breakpoint-strategy always')
-        # And add hooks to restore the settings during tearDown().
-        self.addTearDownHook(lambda: self.runCmd(
-            "settings set target.inline-breakpoint-strategy headers"))
-
-        # Bring the program to the point where we can issue a series of
-        # 'frame variable --show-types' command.
-        if blockCaptured:
-            break_line = line_number(
-                "basic_type.cpp",
-                "// Break here to test block captured variables.")
-        else:
-            break_line = line_number(
-                "basic_type.cpp",
-                "// Here is the line we will break on to check variables.")
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            "basic_type.cpp",
-            break_line,
-            num_expected_locations=1,
-            loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.expect("process status", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=[" at basic_type.cpp:%d" % break_line,
-                             "stop reason = breakpoint"])
-
-        #self.runCmd("frame variable --show-types")
-
-        # Now iterate through the golden list, comparing against the output from
-        # 'frame variable --show-types var'.
-        for var, val in gl:
-            self.runCmd("frame variable --show-types %s" % var)
-            output = self.res.GetOutput()
-
-            # The input type is in a canonical form as a set of named atoms.
-            # The display type string must contain each and every element.
-            #
-            # Example:
-            #     runCmd: frame variable --show-types a_array_bounded[0]
-            #     output: (char) a_array_bounded[0] = 'a'
-            #
-            try:
-                dt = re.match("^\((.*)\)", output).group(1)
-            except:
-                self.fail(self.DATA_TYPE_GROKKED)
-
-            # Expect the display type string to contain each and every atoms.
-            self.expect(
-                dt, "Display type: '%s' must contain the type atoms: '%s'" %
-                (dt, atoms), exe=False, substrs=list(atoms))
-
-            # The (var, val) pair must match, too.
-            nv = ("%s = '%s'" if quotedDisplay else "%s = %s") % (var, val)
-            self.expect(output, Msg(var, val, True), exe=False,
-                        substrs=[nv])
-
-    def generic_type_expr_tester(
-            self,
-            exe_name,
-            atoms,
-            quotedDisplay=False,
-            blockCaptured=False):
-        """Test that variable expressions with basic types are evaluated correctly."""
-
-        self.runCmd("file %s" % self.getBuildArtifact(exe_name),
-                    CURRENT_EXECUTABLE_SET)
-
-        # First, capture the golden output emitted by the oracle, i.e., the
-        # series of printf statements.
-
-        self.process_launch_o(self.golden_filename)
-
-        with open(self.golden_filename) as f:
-            go = f.read()
-
-        # This golden list contains a list of (variable, value) pairs extracted
-        # from the golden output.
-        gl = []
-
-        # Scan the golden output line by line, looking for the pattern:
-        #
-        #     variable = 'value'
-        #
-        for line in go.split(os.linesep):
-            # We'll ignore variables of array types from inside a block.
-            if blockCaptured and '[' in line:
-                continue
-            match = self.pattern.search(line)
-            if match:
-                var, val = match.group(1), match.group(2)
-                gl.append((var, val))
-        #print("golden list:", gl)
-
-        # This test uses a #include of "basic_type.cpp" so we need to enable
-        # always setting inlined breakpoints.
-        self.runCmd('settings set target.inline-breakpoint-strategy always')
-        # And add hooks to restore the settings during tearDown().
-        self.addTearDownHook(lambda: self.runCmd(
-            "settings set target.inline-breakpoint-strategy headers"))
-
-        # Bring the program to the point where we can issue a series of
-        # 'expr' command.
-        if blockCaptured:
-            break_line = line_number(
-                "basic_type.cpp",
-                "// Break here to test block captured variables.")
-        else:
-            break_line = line_number(
-                "basic_type.cpp",
-                "// Here is the line we will break on to check variables.")
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            "basic_type.cpp",
-            break_line,
-            num_expected_locations=1,
-            loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.expect("process status", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=[" at basic_type.cpp:%d" % break_line,
-                             "stop reason = breakpoint"])
-
-        #self.runCmd("frame variable --show-types")
-
-        # Now iterate through the golden list, comparing against the output from
-        # 'expr var'.
-        for var, val in gl:
-            self.runCmd("expression %s" % var)
-            output = self.res.GetOutput()
-
-            # The input type is in a canonical form as a set of named atoms.
-            # The display type string must contain each and every element.
-            #
-            # Example:
-            #     runCmd: expr a
-            #     output: (double) $0 = 1100.12
-            #
-            try:
-                dt = re.match("^\((.*)\) \$[0-9]+ = ", output).group(1)
-            except:
-                self.fail(self.DATA_TYPE_GROKKED)
-
-            # Expect the display type string to contain each and every atoms.
-            self.expect(
-                dt, "Display type: '%s' must contain the type atoms: '%s'" %
-                (dt, atoms), exe=False, substrs=list(atoms))
-
-            # The val part must match, too.
-            valPart = ("'%s'" if quotedDisplay else "%s") % val
-            self.expect(output, Msg(var, val, False), exe=False,
-                        substrs=[valPart])
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/HideTestFailures.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/HideTestFailures.py
deleted file mode 100644 (file)
index 91b1383..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-"""
-Test that variables of integer basic types are displayed correctly.
-"""
-
-
-
-import AbstractBase
-import lldb
-from lldbsuite.test.lldbtest import *
-
-# rdar://problem/9649573
-# Capture the lldb and gdb-remote log files for test failures when run
-# with no "-w" option
-
-
-class DebugIntegerTypesFailures(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # If we're lucky, test_long_type_with_dsym fails.
-        # Let's turn on logging just for that.
-        try:
-            if "test_long_type_with_dsym" in self.id():
-                self.runCmd(
-                    "log enable -n -f %s lldb commands event process state" %
-                    os.environ["DEBUG_LLDB_LOG"])
-                self.runCmd(
-                    "log enable -n -f %s gdb-remote packets process" %
-                    os.environ["DEBUG_GDB_REMOTE_LOG"])
-        except:
-            pass
-
-    def tearDown(self):
-        # If we're lucky, test_long_type_with_dsym fails.
-        # Let's turn off logging just for that.
-        if "test_long_type_with_dsym" in self.id():
-            self.runCmd("log disable lldb")
-            self.runCmd("log disable gdb-remote")
-        # Call super's tearDown().
-        TestBase.tearDown(self)
-
-    def test_char_type(self):
-        """Test that char-type variables are displayed correctly."""
-        d = {'CXX_SOURCES': 'char.cpp'}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.generic_type_tester(set(['char']), quotedDisplay=True)
-
-    def test_short_type(self):
-        """Test that short-type variables are displayed correctly."""
-        d = {'CXX_SOURCES': 'short.cpp'}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.generic_type_tester(set(['short']))
-
-    def test_int_type(self):
-        """Test that int-type variables are displayed correctly."""
-        d = {'CXX_SOURCES': 'int.cpp'}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.generic_type_tester(set(['int']))
-
-    def test_long_type(self):
-        """Test that long-type variables are displayed correctly."""
-        d = {'CXX_SOURCES': 'long.cpp'}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.generic_type_tester(set(['long']))
-
-    def test_long_long_type(self):
-        """Test that 'long long'-type variables are displayed correctly."""
-        d = {'CXX_SOURCES': 'long_long.cpp'}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.generic_type_tester(set(['long long']))
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/Makefile b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/Makefile
deleted file mode 100644 (file)
index d48ed76..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-# Example:
-#
-# CXX_SOURCES := int.cpp
-
-include Makefile.rules
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestCharType.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestCharType.py
deleted file mode 100644 (file)
index bc56870..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-"""
-Test that variables of type char are displayed correctly.
-"""
-
-import AbstractBase
-
-from lldbsuite.test.decorators import *
-
-
-class CharTypeTestCase(AbstractBase.GenericTester):
-
-    mydir = AbstractBase.GenericTester.compute_mydir(__file__)
-
-    def test_char_type(self):
-        """Test that char-type variables are displayed correctly."""
-        self.build_and_run('char.cpp', set(['char']), qd=True)
-
-    @skipUnlessDarwin
-    def test_char_type_from_block(self):
-        """Test that char-type variables are displayed correctly from a block."""
-        self.build_and_run('char.cpp', set(['char']), bc=True, qd=True)
-
-    def test_unsigned_char_type(self):
-        """Test that 'unsigned_char'-type variables are displayed correctly."""
-        self.build_and_run(
-            'unsigned_char.cpp', set(['unsigned', 'char']), qd=True)
-
-    @skipUnlessDarwin
-    def test_unsigned_char_type_from_block(self):
-        """Test that 'unsigned char'-type variables are displayed correctly from a block."""
-        self.build_and_run(
-            'unsigned_char.cpp', set(['unsigned', 'char']), bc=True, qd=True)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestCharTypeExpr.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestCharTypeExpr.py
deleted file mode 100644 (file)
index 63ddc14..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-"""
-Test that variable expressions of type char are evaluated correctly.
-"""
-
-import AbstractBase
-
-from lldbsuite.test.decorators import *
-
-
-class CharTypeExprTestCase(AbstractBase.GenericTester):
-
-    mydir = AbstractBase.GenericTester.compute_mydir(__file__)
-
-    def test_char_type(self):
-        """Test that char-type variable expressions are evaluated correctly."""
-        self.build_and_run_expr('char.cpp', set(['char']), qd=True)
-
-    @skipUnlessDarwin
-    def test_char_type_from_block(self):
-        """Test that char-type variables are displayed correctly from a block."""
-        self.build_and_run_expr('char.cpp', set(['char']), bc=True, qd=True)
-
-    def test_unsigned_char_type(self):
-        """Test that 'unsigned_char'-type variable expressions are evaluated correctly."""
-        self.build_and_run_expr(
-            'unsigned_char.cpp', set(['unsigned', 'char']), qd=True)
-
-    @skipUnlessDarwin
-    def test_unsigned_char_type_from_block(self):
-        """Test that 'unsigned char'-type variables are displayed correctly from a block."""
-        self.build_and_run_expr(
-            'unsigned_char.cpp', set(['unsigned', 'char']), bc=True, qd=True)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestDoubleTypes.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestDoubleTypes.py
deleted file mode 100644 (file)
index adce103..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-"""
-Test that variables of floating point types are displayed correctly.
-"""
-
-
-
-import AbstractBase
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class DoubleTypesTestCase(AbstractBase.GenericTester):
-
-    mydir = AbstractBase.GenericTester.compute_mydir(__file__)
-
-    def test_double_type(self):
-        """Test that double-type variables are displayed correctly."""
-        self.build_and_run('double.cpp', set(['double']))
-
-    @skipUnlessDarwin
-    def test_double_type_from_block(self):
-        """Test that double-type variables are displayed correctly from a block."""
-        self.build_and_run('double.cpp', set(['double']), bc=True)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestDoubleTypesExpr.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestDoubleTypesExpr.py
deleted file mode 100644 (file)
index 20c5410..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-"""
-Test that variable expressions of floating point types are evaluated correctly.
-"""
-
-
-
-import AbstractBase
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class DoubleTypesExprTestCase(AbstractBase.GenericTester):
-
-    mydir = AbstractBase.GenericTester.compute_mydir(__file__)
-
-    # rdar://problem/8493023
-    # test/types failures for Test*TypesExpr.py: element offset computed wrong
-    # and sign error?
-
-    def test_double_type(self):
-        """Test that double-type variable expressions are evaluated correctly."""
-        self.build_and_run_expr('double.cpp', set(['double']))
-
-    @skipUnlessDarwin
-    def test_double_type_from_block(self):
-        """Test that double-type variables are displayed correctly from a block."""
-        self.build_and_run_expr('double.cpp', set(['double']), bc=True)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestFloatTypes.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestFloatTypes.py
deleted file mode 100644 (file)
index 7377552..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-"""
-Test that variables of floating point types are displayed correctly.
-"""
-
-
-
-import AbstractBase
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class FloatTypesTestCase(AbstractBase.GenericTester):
-
-    mydir = AbstractBase.GenericTester.compute_mydir(__file__)
-
-    def test_float_type(self):
-        """Test that float-type variables are displayed correctly."""
-        self.build_and_run('float.cpp', set(['float']))
-
-    @skipUnlessDarwin
-    def test_float_type_from_block(self):
-        """Test that float-type variables are displayed correctly from a block."""
-        self.build_and_run('float.cpp', set(['float']), bc=True)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestFloatTypesExpr.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestFloatTypesExpr.py
deleted file mode 100644 (file)
index ceb257e..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-"""
-Test that variable expressions of floating point types are evaluated correctly.
-"""
-
-
-
-import AbstractBase
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class FloatTypesExprTestCase(AbstractBase.GenericTester):
-
-    mydir = AbstractBase.GenericTester.compute_mydir(__file__)
-
-    # rdar://problem/8493023
-    # test/types failures for Test*TypesExpr.py: element offset computed wrong
-    # and sign error?
-
-    def test_float_type(self):
-        """Test that float-type variable expressions are evaluated correctly."""
-        self.build_and_run_expr('float.cpp', set(['float']))
-
-    @skipUnlessDarwin
-    def test_float_type_from_block(self):
-        """Test that float-type variables are displayed correctly from a block."""
-        self.build_and_run_expr('float.cpp', set(['float']), bc=True)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestIntegerType.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestIntegerType.py
deleted file mode 100644 (file)
index 549b37a..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-"""
-Test that variables of type integer are displayed correctly.
-"""
-
-import AbstractBase
-
-from lldbsuite.test.decorators import *
-
-
-class IntegerTypesTestCase(AbstractBase.GenericTester):
-
-    mydir = AbstractBase.GenericTester.compute_mydir(__file__)
-
-    def test_int_type(self):
-        """Test that int-type variables are displayed correctly."""
-        self.build_and_run('int.cpp', set(['int']))
-
-    @skipUnlessDarwin
-    def test_int_type_from_block(self):
-        """Test that int-type variables are displayed correctly from a block."""
-        self.build_and_run('int.cpp', set(['int']))
-
-    def test_unsigned_int_type(self):
-        """Test that 'unsigned_int'-type variables are displayed correctly."""
-        self.build_and_run('unsigned_int.cpp', set(['unsigned', 'int']))
-
-    @skipUnlessDarwin
-    def test_unsigned_int_type_from_block(self):
-        """Test that 'unsigned int'-type variables are displayed correctly from a block."""
-        self.build_and_run(
-            'unsigned_int.cpp', set(['unsigned', 'int']), bc=True)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestIntegerTypeExpr.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestIntegerTypeExpr.py
deleted file mode 100644 (file)
index 0b258db..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-"""
-Test that variable expressions of type integer are evaluated correctly.
-"""
-
-import AbstractBase
-
-from lldbsuite.test.decorators import *
-
-
-class IntegerTypeExprTestCase(AbstractBase.GenericTester):
-
-    mydir = AbstractBase.GenericTester.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    def test_unsigned_short_type_from_block(self):
-        """Test that 'unsigned short'-type variables are displayed correctly from a block."""
-        self.build_and_run_expr(
-            'unsigned_short.cpp', set(['unsigned', 'short']), bc=True)
-
-    def test_int_type(self):
-        """Test that int-type variable expressions are evaluated correctly."""
-        self.build_and_run_expr('int.cpp', set(['int']))
-
-    @skipUnlessDarwin
-    def test_int_type_from_block(self):
-        """Test that int-type variables are displayed correctly from a block."""
-        self.build_and_run_expr('int.cpp', set(['int']))
-
-    def test_unsigned_int_type(self):
-        """Test that 'unsigned_int'-type variable expressions are evaluated correctly."""
-        self.build_and_run_expr('unsigned_int.cpp', set(['unsigned', 'int']))
-
-    @skipUnlessDarwin
-    def test_unsigned_int_type_from_block(self):
-        """Test that 'unsigned int'-type variables are displayed correctly from a block."""
-        self.build_and_run_expr(
-            'unsigned_int.cpp', set(['unsigned', 'int']), bc=True)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestLongTypes.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestLongTypes.py
deleted file mode 100644 (file)
index 28f8193..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-"""
-Test that variables of integer basic types are displayed correctly.
-"""
-
-import AbstractBase
-
-from lldbsuite.test.decorators import *
-
-
-class LongTypesTestCase(AbstractBase.GenericTester):
-
-    mydir = AbstractBase.GenericTester.compute_mydir(__file__)
-
-    def test_long_type(self):
-        """Test that long-type variables are displayed correctly."""
-        self.build_and_run('long.cpp', set(['long']))
-
-    @skipUnlessDarwin
-    def test_long_type_from_block(self):
-        """Test that long-type variables are displayed correctly from a block."""
-        self.build_and_run('long.cpp', set(['long']), bc=True)
-
-    def test_unsigned_long_type(self):
-        """Test that 'unsigned long'-type variables are displayed correctly."""
-        self.build_and_run('unsigned_long.cpp', set(['unsigned', 'long']))
-
-    @skipUnlessDarwin
-    def test_unsigned_long_type_from_block(self):
-        """Test that 'unsigned_long'-type variables are displayed correctly from a block."""
-        self.build_and_run(
-            'unsigned_long.cpp', set(['unsigned', 'long']), bc=True)
-
-    def test_long_long_type(self):
-        """Test that 'long long'-type variables are displayed correctly."""
-        self.build_and_run('long_long.cpp', set(['long long']))
-
-    @skipUnlessDarwin
-    def test_long_long_type_from_block(self):
-        """Test that 'long_long'-type variables are displayed correctly from a block."""
-        self.build_and_run('long_long.cpp', set(['long long']), bc=True)
-
-    def test_unsigned_long_long_type(self):
-        """Test that 'unsigned long long'-type variables are displayed correctly."""
-        self.build_and_run('unsigned_long_long.cpp',
-                           set(['unsigned', 'long long']))
-
-    @skipUnlessDarwin
-    def test_unsigned_long_long_type_from_block(self):
-        """Test that 'unsigned_long_long'-type variables are displayed correctly from a block."""
-        self.build_and_run(
-            'unsigned_long_long.cpp', set(['unsigned', 'long long']), bc=True)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestLongTypesExpr.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestLongTypesExpr.py
deleted file mode 100644 (file)
index b753a9d..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-"""
-Test that variable expressions of integer basic types are evaluated correctly.
-"""
-
-import AbstractBase
-
-from lldbsuite.test.decorators import *
-
-
-class LongTypesExprTestCase(AbstractBase.GenericTester):
-
-    mydir = AbstractBase.GenericTester.compute_mydir(__file__)
-
-    def test_long_type(self):
-        """Test that long-type variable expressions are evaluated correctly."""
-        self.build_and_run_expr('long.cpp', set(['long']))
-
-    @skipUnlessDarwin
-    def test_long_type_from_block(self):
-        """Test that long-type variables are displayed correctly from a block."""
-        self.build_and_run_expr('long.cpp', set(['long']), bc=True)
-
-    def test_unsigned_long_type(self):
-        """Test that 'unsigned long'-type variable expressions are evaluated correctly."""
-        self.build_and_run_expr('unsigned_long.cpp', set(['unsigned', 'long']))
-
-    @skipUnlessDarwin
-    def test_unsigned_long_type_from_block(self):
-        """Test that 'unsigned_long'-type variables are displayed correctly from a block."""
-        self.build_and_run_expr(
-            'unsigned_long.cpp', set(['unsigned', 'long']), bc=True)
-
-    def test_long_long_type(self):
-        """Test that 'long long'-type variable expressions are evaluated correctly."""
-        self.build_and_run_expr('long_long.cpp', set(['long long']))
-
-    @skipUnlessDarwin
-    def test_long_long_type_from_block(self):
-        """Test that 'long_long'-type variables are displayed correctly from a block."""
-        self.build_and_run_expr('long_long.cpp', set(['long long']), bc=True)
-
-    def test_unsigned_long_long_type(self):
-        """Test that 'unsigned long long'-type variable expressions are evaluated correctly."""
-        self.build_and_run_expr('unsigned_long_long.cpp',
-                                set(['unsigned', 'long long']))
-
-    @skipUnlessDarwin
-    def test_unsigned_long_long_type_from_block(self):
-        """Test that 'unsigned_long_long'-type variables are displayed correctly from a block."""
-        self.build_and_run_expr(
-            'unsigned_long_long.cpp', set(['unsigned', 'long long']), bc=True)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestRecursiveTypes.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestRecursiveTypes.py
deleted file mode 100644 (file)
index 69194cf..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-"""
-Test that recursive types are handled correctly.
-"""
-
-
-
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbtest import *
-
-
-class RecursiveTypesTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-        # Find the line number to break for main.c.
-        self.line = line_number('recursive_type_main.cpp',
-                                '// Test at this line.')
-
-        self.d1 = {
-            'CXX_SOURCES': 'recursive_type_main.cpp recursive_type_1.cpp'}
-        self.d2 = {
-            'CXX_SOURCES': 'recursive_type_main.cpp recursive_type_2.cpp'}
-
-    def test_recursive_type_1(self):
-        """Test that recursive structs are displayed correctly."""
-        self.build(dictionary=self.d1)
-        self.setTearDownCleanup(dictionary=self.d1)
-        self.print_struct()
-
-    def test_recursive_type_2(self):
-        """Test that recursive structs are displayed correctly."""
-        self.build(dictionary=self.d2)
-        self.setTearDownCleanup(dictionary=self.d2)
-        self.print_struct()
-
-    def print_struct(self):
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            "recursive_type_main.cpp",
-            self.line,
-            num_expected_locations=-1,
-            loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.expect("print tpi", RUN_SUCCEEDED)
-        self.expect("print *tpi", RUN_SUCCEEDED)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestShortType.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestShortType.py
deleted file mode 100644 (file)
index d940d1b..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-"""
-Test that variables of type short are displayed correctly.
-"""
-
-import AbstractBase
-
-from lldbsuite.test.decorators import *
-
-
-class ShortTypeTestCase(AbstractBase.GenericTester):
-
-    mydir = AbstractBase.GenericTester.compute_mydir(__file__)
-
-    def test_short_type(self):
-        """Test that short-type variables are displayed correctly."""
-        self.build_and_run('short.cpp', set(['short']))
-
-    @skipUnlessDarwin
-    def test_short_type_from_block(self):
-        """Test that short-type variables are displayed correctly from a block."""
-        self.build_and_run('short.cpp', set(['short']), bc=True)
-
-    def test_unsigned_short_type(self):
-        """Test that 'unsigned_short'-type variables are displayed correctly."""
-        self.build_and_run('unsigned_short.cpp', set(['unsigned', 'short']))
-
-    @skipUnlessDarwin
-    def test_unsigned_short_type_from_block(self):
-        """Test that 'unsigned short'-type variables are displayed correctly from a block."""
-        self.build_and_run(
-            'unsigned_short.cpp', set(['unsigned', 'short']), bc=True)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestShortTypeExpr.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/TestShortTypeExpr.py
deleted file mode 100644 (file)
index 17bcfd3..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-"""
-Test that variable expressions of type short are evaluated correctly.
-"""
-
-import AbstractBase
-
-from lldbsuite.test.decorators import *
-
-
-class ShortExprTestCase(AbstractBase.GenericTester):
-
-    mydir = AbstractBase.GenericTester.compute_mydir(__file__)
-
-    def test_short_type(self):
-        """Test that short-type variable expressions are evaluated correctly."""
-        self.build_and_run_expr('short.cpp', set(['short']))
-
-    @skipUnlessDarwin
-    def test_short_type_from_block(self):
-        """Test that short-type variables are displayed correctly from a block."""
-        self.build_and_run_expr('short.cpp', set(['short']), bc=True)
-
-    def test_unsigned_short_type(self):
-        """Test that 'unsigned_short'-type variable expressions are evaluated correctly."""
-        self.build_and_run_expr('unsigned_short.cpp',
-                                set(['unsigned', 'short']))
-
-    @skipUnlessDarwin
-    def test_unsigned_short_type_from_block(self):
-        """Test that 'unsigned short'-type variables are displayed correctly from a block."""
-        self.build_and_run_expr(
-            'unsigned_short.cpp', set(['unsigned', 'short']), bc=True)
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/basic_type.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/basic_type.cpp
deleted file mode 100644 (file)
index 2d7e7b2..0000000
+++ /dev/null
@@ -1,225 +0,0 @@
-// This file must have the following defined before it is included:
-// T defined to the type to test (int, float, etc)
-// T_CSTR a C string representation of the type T ("int", "float")
-// T_VALUE_1 defined to a valid initializer value for TEST_TYPE (7 for int, 2.0 for float)
-// T_VALUE_2, T_VALUE_3, T_VALUE_4 defined to a valid initializer value for TEST_TYPE that is different from TEST_VALUE_1
-// T_PRINTF_FORMAT defined if T can be printed with printf
-//
-// An example for integers is below
-#if 0
-
-#define T int
-#define T_CSTR "int"
-#define T_VALUE_1 11001110
-#define T_VALUE_2 22002220
-#define T_VALUE_3 33003330
-#define T_VALUE_4 44044440
-#define T_PRINTF_FORMAT "%i"
-
-#include "basic_type.cpp"
-
-#endif
-
-#ifdef TEST_BLOCK_CAPTURED_VARS
-#include <dispatch/dispatch.h>
-#endif
-#include <cstdint>
-#include <cstdio>
-#include <cstdlib>
-
-class a_class 
-{
-public:
-    a_class (const T& a, const T& b) :
-        m_a (a),
-        m_b (b)
-    {
-    }
-
-    ~a_class ()
-    {
-    }
-
-    const T&
-    get_a() const
-    {
-        return m_a;
-    } 
-
-    void
-    set_a (const T& a)
-    {
-        m_a = a;
-    }
-
-    const T&
-    get_b() const
-    {
-        return m_b;
-    } 
-
-    void
-    set_b (const T& b)
-    {
-        m_b = b;
-    }
-
-protected:
-    T m_a;
-    T m_b;
-};
-
-typedef struct a_struct_tag {
-    T a;
-    T b;
-} a_struct_t;
-
-
-typedef union a_union_zero_tag {
-    T a;
-    double a_double;
-} a_union_zero_t;
-
-typedef struct a_union_nonzero_tag {
-  double a_double;
-  a_union_zero_t u;
-} a_union_nonzero_t;
-
-
-int 
-main (int argc, char const *argv[])
-{
-    FILE *out = stdout;
-
-    // By default, output to stdout
-    // If a filename is provided as the command line argument,
-    // output to that file.
-    if (argc == 2 && argv[1] && argv[1][0] != '\0')
-    {
-        out = fopen (argv[1], "w");
-    }
-
-    T a = T_VALUE_1;
-    T* a_ptr = &a;
-    T& a_ref = a;
-    T a_array_bounded[2] = { T_VALUE_1, T_VALUE_2 };    
-    T a_array_unbounded[] = { T_VALUE_1, T_VALUE_2 };
-
-    a_class a_class_instance (T_VALUE_1, T_VALUE_2);
-    a_class *a_class_ptr = &a_class_instance;
-    a_class &a_class_ref = a_class_instance;
-
-    a_struct_t a_struct = { T_VALUE_1, T_VALUE_2 };
-    a_struct_t *a_struct_ptr = &a_struct;
-    a_struct_t &a_struct_ref = a_struct;
-
-    // Create a union with type T at offset zero
-    a_union_zero_t a_union_zero;
-    a_union_zero.a = T_VALUE_1;
-    a_union_zero_t *a_union_zero_ptr = &a_union_zero;
-    a_union_zero_t &a_union_zero_ref = a_union_zero;
-
-    // Create a union with type T at a non-zero offset
-    a_union_nonzero_t a_union_nonzero;
-    a_union_nonzero.u.a = T_VALUE_1;
-    a_union_nonzero_t *a_union_nonzero_ptr = &a_union_nonzero;
-    a_union_nonzero_t &a_union_nonzero_ref = a_union_nonzero;
-
-    a_struct_t a_struct_array_bounded[2]  = {{ T_VALUE_1, T_VALUE_2 }, { T_VALUE_3, T_VALUE_4 }};
-    a_struct_t a_struct_array_unbounded[] = {{ T_VALUE_1, T_VALUE_2 }, { T_VALUE_3, T_VALUE_4 }};
-    a_union_zero_t a_union_zero_array_bounded[2];
-    a_union_zero_array_bounded[0].a = T_VALUE_1;
-    a_union_zero_array_bounded[1].a = T_VALUE_2;
-    a_union_zero_t a_union_zero_array_unbounded[] = {{ T_VALUE_1 }, { T_VALUE_2 }};
-    
-#ifdef T_PRINTF_FORMAT
-    fprintf (out, "%s: a = '" T_PRINTF_FORMAT "'\n", T_CSTR, a);
-    fprintf (out, "%s*: %p => *a_ptr = '" T_PRINTF_FORMAT "'\n", T_CSTR, a_ptr, *a_ptr);
-    fprintf (out, "%s&: @%p => a_ref = '" T_PRINTF_FORMAT "'\n", T_CSTR, &a_ref, a_ref);
-
-    fprintf (out, "%s[2]: a_array_bounded[0] = '" T_PRINTF_FORMAT "'\n", T_CSTR, a_array_bounded[0]);
-    fprintf (out, "%s[2]: a_array_bounded[1] = '" T_PRINTF_FORMAT "'\n", T_CSTR, a_array_bounded[1]);
-
-    fprintf (out, "%s[]: a_array_unbounded[0] = '" T_PRINTF_FORMAT "'\n", T_CSTR, a_array_unbounded[0]);
-    fprintf (out, "%s[]: a_array_unbounded[1] = '" T_PRINTF_FORMAT "'\n", T_CSTR, a_array_unbounded[1]);
-
-    fprintf (out, "(a_class) a_class_instance.m_a = '" T_PRINTF_FORMAT "'\n", a_class_instance.get_a());
-    fprintf (out, "(a_class) a_class_instance.m_b = '" T_PRINTF_FORMAT "'\n", a_class_instance.get_b());
-    fprintf (out, "(a_class*) a_class_ptr = %p, a_class_ptr->m_a = '" T_PRINTF_FORMAT "'\n", a_class_ptr, a_class_ptr->get_a());
-    fprintf (out, "(a_class*) a_class_ptr = %p, a_class_ptr->m_b = '" T_PRINTF_FORMAT "'\n", a_class_ptr, a_class_ptr->get_b());
-    fprintf (out, "(a_class&) a_class_ref = %p, a_class_ref.m_a = '" T_PRINTF_FORMAT "'\n", &a_class_ref, a_class_ref.get_a());
-    fprintf (out, "(a_class&) a_class_ref = %p, a_class_ref.m_b = '" T_PRINTF_FORMAT "'\n", &a_class_ref, a_class_ref.get_b());
-
-    fprintf (out, "(a_struct_t) a_struct.a = '" T_PRINTF_FORMAT "'\n", a_struct.a);
-    fprintf (out, "(a_struct_t) a_struct.b = '" T_PRINTF_FORMAT "'\n", a_struct.b);
-    fprintf (out, "(a_struct_t*) a_struct_ptr = %p, a_struct_ptr->a = '" T_PRINTF_FORMAT "'\n", a_struct_ptr, a_struct_ptr->a);
-    fprintf (out, "(a_struct_t*) a_struct_ptr = %p, a_struct_ptr->b = '" T_PRINTF_FORMAT "'\n", a_struct_ptr, a_struct_ptr->b);
-    fprintf (out, "(a_struct_t&) a_struct_ref = %p, a_struct_ref.a = '" T_PRINTF_FORMAT "'\n", &a_struct_ref, a_struct_ref.a);
-    fprintf (out, "(a_struct_t&) a_struct_ref = %p, a_struct_ref.b = '" T_PRINTF_FORMAT "'\n", &a_struct_ref, a_struct_ref.b);
-    
-    fprintf (out, "(a_union_zero_t) a_union_zero.a = '" T_PRINTF_FORMAT "'\n", a_union_zero.a);
-    fprintf (out, "(a_union_zero_t*) a_union_zero_ptr = %p, a_union_zero_ptr->a = '" T_PRINTF_FORMAT "'\n", a_union_zero_ptr, a_union_zero_ptr->a);
-    fprintf (out, "(a_union_zero_t&) a_union_zero_ref = %p, a_union_zero_ref.a = '" T_PRINTF_FORMAT "'\n", &a_union_zero_ref, a_union_zero_ref.a);
-
-    fprintf (out, "(a_union_nonzero_t) a_union_nonzero.u.a = '" T_PRINTF_FORMAT "'\n", a_union_nonzero.u.a);
-    fprintf (out, "(a_union_nonzero_t*) a_union_nonzero_ptr = %p, a_union_nonzero_ptr->u.a = '" T_PRINTF_FORMAT "'\n", a_union_nonzero_ptr, a_union_nonzero_ptr->u.a);
-    fprintf (out, "(a_union_nonzero_t&) a_union_nonzero_ref = %p, a_union_nonzero_ref.u.a = '" T_PRINTF_FORMAT "'\n", &a_union_nonzero_ref, a_union_nonzero_ref.u.a);
-
-    fprintf (out, "(a_struct_t[2]) a_struct_array_bounded[0].a = '" T_PRINTF_FORMAT "'\n", a_struct_array_bounded[0].a);
-    fprintf (out, "(a_struct_t[2]) a_struct_array_bounded[0].b = '" T_PRINTF_FORMAT "'\n", a_struct_array_bounded[0].b);
-    fprintf (out, "(a_struct_t[2]) a_struct_array_bounded[1].a = '" T_PRINTF_FORMAT "'\n", a_struct_array_bounded[1].a);
-    fprintf (out, "(a_struct_t[2]) a_struct_array_bounded[1].b = '" T_PRINTF_FORMAT "'\n", a_struct_array_bounded[1].b);
-
-    fprintf (out, "(a_struct_t[]) a_struct_array_unbounded[0].a = '" T_PRINTF_FORMAT "'\n", a_struct_array_unbounded[0].a);
-    fprintf (out, "(a_struct_t[]) a_struct_array_unbounded[0].b = '" T_PRINTF_FORMAT "'\n", a_struct_array_unbounded[0].b);
-    fprintf (out, "(a_struct_t[]) a_struct_array_unbounded[1].a = '" T_PRINTF_FORMAT "'\n", a_struct_array_unbounded[1].a);
-    fprintf (out, "(a_struct_t[]) a_struct_array_unbounded[1].b = '" T_PRINTF_FORMAT "'\n", a_struct_array_unbounded[1].b);
-
-    fprintf (out, "(a_union_zero_t[2]) a_union_zero_array_bounded[0].a = '" T_PRINTF_FORMAT "'\n", a_union_zero_array_bounded[0].a);
-    fprintf (out, "(a_union_zero_t[2]) a_union_zero_array_bounded[1].a = '" T_PRINTF_FORMAT "'\n", a_union_zero_array_bounded[1].a);
-
-    fprintf (out, "(a_union_zero_t[]) a_union_zero_array_unbounded[0].a = '" T_PRINTF_FORMAT "'\n", a_union_zero_array_unbounded[0].a);
-    fprintf (out, "(a_union_zero_t[]) a_union_zero_array_unbounded[1].a = '" T_PRINTF_FORMAT "'\n", a_union_zero_array_unbounded[1].a);
-
-#endif
-    puts("About to exit, break here to check values..."); // Here is the line we will break on to check variables.
-
-#ifdef TEST_BLOCK_CAPTURED_VARS
-    void (^myBlock)() = ^() {
-        fprintf (out, "%s: a = '" T_PRINTF_FORMAT "'\n", T_CSTR, a);
-        fprintf (out, "%s*: %p => *a_ptr = '" T_PRINTF_FORMAT "'\n", T_CSTR, a_ptr, *a_ptr);
-        fprintf (out, "%s&: @%p => a_ref = '" T_PRINTF_FORMAT "'\n", T_CSTR, &a_ref, a_ref);
-
-        fprintf (out, "(a_class) a_class_instance.m_a = '" T_PRINTF_FORMAT "'\n", a_class_instance.get_a());
-        fprintf (out, "(a_class) a_class_instance.m_b = '" T_PRINTF_FORMAT "'\n", a_class_instance.get_b());
-        fprintf (out, "(a_class*) a_class_ptr = %p, a_class_ptr->m_a = '" T_PRINTF_FORMAT "'\n", a_class_ptr, a_class_ptr->get_a());
-        fprintf (out, "(a_class*) a_class_ptr = %p, a_class_ptr->m_b = '" T_PRINTF_FORMAT "'\n", a_class_ptr, a_class_ptr->get_b());
-        fprintf (out, "(a_class&) a_class_ref = %p, a_class_ref.m_a = '" T_PRINTF_FORMAT "'\n", &a_class_ref, a_class_ref.get_a());
-        fprintf (out, "(a_class&) a_class_ref = %p, a_class_ref.m_b = '" T_PRINTF_FORMAT "'\n", &a_class_ref, a_class_ref.get_b());
-    
-        fprintf (out, "(a_struct_t) a_struct.a = '" T_PRINTF_FORMAT "'\n", a_struct.a);
-        fprintf (out, "(a_struct_t) a_struct.b = '" T_PRINTF_FORMAT "'\n", a_struct.b);
-        fprintf (out, "(a_struct_t*) a_struct_ptr = %p, a_struct_ptr->a = '" T_PRINTF_FORMAT "'\n", a_struct_ptr, a_struct_ptr->a);
-        fprintf (out, "(a_struct_t*) a_struct_ptr = %p, a_struct_ptr->b = '" T_PRINTF_FORMAT "'\n", a_struct_ptr, a_struct_ptr->b);
-        fprintf (out, "(a_struct_t&) a_struct_ref = %p, a_struct_ref.a = '" T_PRINTF_FORMAT "'\n", &a_struct_ref, a_struct_ref.a);
-        fprintf (out, "(a_struct_t&) a_struct_ref = %p, a_struct_ref.b = '" T_PRINTF_FORMAT "'\n", &a_struct_ref, a_struct_ref.b);
-    
-        fprintf (out, "(a_union_zero_t) a_union_zero.a = '" T_PRINTF_FORMAT "'\n", a_union_zero.a);
-        fprintf (out, "(a_union_zero_t*) a_union_zero_ptr = %p, a_union_zero_ptr->a = '" T_PRINTF_FORMAT "'\n", a_union_zero_ptr, a_union_zero_ptr->a);
-        fprintf (out, "(a_union_zero_t&) a_union_zero_ref = %p, a_union_zero_ref.a = '" T_PRINTF_FORMAT "'\n", &a_union_zero_ref, a_union_zero_ref.a);
-
-        fprintf (out, "(a_union_nonzero_t) a_union_nonzero.u.a = '" T_PRINTF_FORMAT "'\n", a_union_nonzero.u.a);
-        fprintf (out, "(a_union_nonzero_t*) a_union_nonzero_ptr = %p, a_union_nonzero_ptr->u.a = '" T_PRINTF_FORMAT "'\n", a_union_nonzero_ptr, a_union_nonzero_ptr->u.a);
-        fprintf (out, "(a_union_nonzero_t&) a_union_nonzero_ref = %p, a_union_nonzero_ref.u.a = '" T_PRINTF_FORMAT "'\n", &a_union_nonzero_ref, a_union_nonzero_ref.u.a);
-
-        fprintf (out, "That's All Folks!\n"); // Break here to test block captured variables.
-    };
-
-    myBlock();
-#endif
-
-    if (out != stdout)
-        fclose (out);
-
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/char.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/char.cpp
deleted file mode 100644 (file)
index 584582e..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#define T char
-#define T_CSTR "char"
-#define T_VALUE_1 'a'
-#define T_VALUE_2 'b'
-#define T_VALUE_3 '!'
-#define T_VALUE_4 '~'
-#define T_PRINTF_FORMAT "%c"
-
-#include "basic_type.cpp"
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/double.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/double.cpp
deleted file mode 100644 (file)
index 6788dad..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#define T double
-#define T_CSTR "double"
-#define T_VALUE_1 1100.125
-#define T_VALUE_2 2200.250
-#define T_VALUE_3 33.00
-#define T_VALUE_4 44.00
-#define T_PRINTF_FORMAT "%lg"
-
-#include "basic_type.cpp"
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/float.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/float.cpp
deleted file mode 100644 (file)
index 4bc1246..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#define T float
-#define T_CSTR "float"
-#define T_VALUE_1 1100.125
-#define T_VALUE_2 2200.250
-#define T_VALUE_3 33.00
-#define T_VALUE_4 44.00
-#define T_PRINTF_FORMAT "%g"
-
-#include "basic_type.cpp"
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/int.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/int.cpp
deleted file mode 100644 (file)
index 922398b..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#define T int
-#define T_CSTR "int"
-#define T_VALUE_1 11001110
-#define T_VALUE_2 22002220
-#define T_VALUE_3 33003330
-#define T_VALUE_4 44004440
-#define T_PRINTF_FORMAT "%i"
-
-#include "basic_type.cpp"
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/long.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/long.cpp
deleted file mode 100644 (file)
index 9056b42..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#define T long
-#define T_CSTR "long"
-
-#ifdef __LP64__
-#define T_VALUE_1 110011101111
-#define T_VALUE_2 220022202222
-#define T_VALUE_3 330033303333
-#define T_VALUE_4 440044404444
-#else
-#define T_VALUE_1 110011101
-#define T_VALUE_2 220022202
-#define T_VALUE_3 330033303
-#define T_VALUE_4 440044404
-#endif
-
-#define T_PRINTF_FORMAT "%ld"
-
-#include "basic_type.cpp"
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/long_long.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/long_long.cpp
deleted file mode 100644 (file)
index 5b442e7..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#define T long long
-#define T_CSTR "long long"
-
-#ifdef __LP64__
-#define T_VALUE_1 110011101111
-#define T_VALUE_2 220022202222
-#define T_VALUE_3 330033303333
-#define T_VALUE_4 440044404444
-#else
-#define T_VALUE_1 110011101
-#define T_VALUE_2 220022202
-#define T_VALUE_3 330033303
-#define T_VALUE_4 440044404
-#endif
-
-#define T_PRINTF_FORMAT "%lld"
-
-#include "basic_type.cpp"
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/recursive_type_1.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/recursive_type_1.cpp
deleted file mode 100644 (file)
index 81d923f..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-typedef struct t *tp;
-typedef tp (*get_tp)();
-
-struct s {
-    get_tp get_tp_p;
-};
-
-struct t {
-    struct s *s;
-};
-
-struct t t;
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/recursive_type_2.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/recursive_type_2.cpp
deleted file mode 100644 (file)
index 3047390..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-typedef struct t *tp;
-typedef tp (*get_tp)();
-
-struct t {
-    struct {
-      get_tp get_tp_p;
-    };
-};
-
-struct t t;
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/recursive_type_main.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/recursive_type_main.cpp
deleted file mode 100644 (file)
index e06cd30..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-typedef struct t *tp;
-extern struct t t;
-
-int main() {
-    tp tpi = &t;
-    // Test at this line.
-    return 0;
-}
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/short.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/short.cpp
deleted file mode 100644 (file)
index 470c68a..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#define T short
-#define T_CSTR "short"
-#define T_VALUE_1 11001
-#define T_VALUE_2 22002
-#define T_VALUE_3 -32768
-#define T_VALUE_4 32767
-#define T_PRINTF_FORMAT "%hd"
-
-#include "basic_type.cpp"
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/unsigned_char.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/unsigned_char.cpp
deleted file mode 100644 (file)
index 0ac555a..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#define T unsigned char
-#define T_CSTR "unsigned char"
-#define T_VALUE_1 '0'
-#define T_VALUE_2 '9'
-#define T_VALUE_3 '@'
-#define T_VALUE_4 '$'
-#define T_PRINTF_FORMAT "%c"
-
-#include "basic_type.cpp"
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/unsigned_int.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/unsigned_int.cpp
deleted file mode 100644 (file)
index 1b307b0..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#define T unsigned int
-#define T_CSTR "unsigned int"
-#define T_VALUE_1 11001110
-#define T_VALUE_2 22002220
-#define T_VALUE_3 33003330
-#define T_VALUE_4 44004440
-#define T_PRINTF_FORMAT "%u"
-
-#include "basic_type.cpp"
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/unsigned_long.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/unsigned_long.cpp
deleted file mode 100644 (file)
index 0c442e3..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#define T unsigned long
-#define T_CSTR "unsigned long"
-
-#ifdef __LP64__
-#define T_VALUE_1 110011101111
-#define T_VALUE_2 220022202222
-#define T_VALUE_3 330033303333
-#define T_VALUE_4 440044404444
-#else
-#define T_VALUE_1 110011101
-#define T_VALUE_2 220022202
-#define T_VALUE_3 330033303
-#define T_VALUE_4 440044404
-#endif
-
-#define T_PRINTF_FORMAT "%lu"
-
-#include "basic_type.cpp"
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/unsigned_long_long.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/unsigned_long_long.cpp
deleted file mode 100644 (file)
index 648aad0..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#define T unsigned long long
-#define T_CSTR "unsigned long long"
-
-#ifdef __LP64__
-#define T_VALUE_1 110011101111
-#define T_VALUE_2 220022202222
-#define T_VALUE_3 330033303333
-#define T_VALUE_4 440044404444
-#else
-#define T_VALUE_1 110011101
-#define T_VALUE_2 220022202
-#define T_VALUE_3 330033303
-#define T_VALUE_4 440044404
-#endif
-
-#define T_PRINTF_FORMAT "%llu"
-
-#include "basic_type.cpp"
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/unsigned_short.cpp b/gnu/llvm/lldb/packages/Python/lldbsuite/test/types/unsigned_short.cpp
deleted file mode 100644 (file)
index 09af2aa..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#define T unsigned short
-#define T_CSTR "unsigned short"
-#define T_VALUE_1 11001
-#define T_VALUE_2 22002
-#define T_VALUE_3 0
-#define T_VALUE_4 65535
-#define T_PRINTF_FORMAT "%hu"
-
-#include "basic_type.cpp"
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test_event/formatter/xunit.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test_event/formatter/xunit.py
deleted file mode 100644 (file)
index e480df5..0000000
+++ /dev/null
@@ -1,595 +0,0 @@
-"""
-Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-See https://llvm.org/LICENSE.txt for license information.
-SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-Provides an xUnit ResultsFormatter for integrating the LLDB
-test suite with the Jenkins xUnit aggregator and other xUnit-compliant
-test output processors.
-"""
-from __future__ import absolute_import
-from __future__ import print_function
-
-# System modules
-import re
-import sys
-import xml.sax.saxutils
-
-# Third-party modules
-import six
-
-# Local modules
-from ..event_builder import EventBuilder
-from ..build_exception import BuildError
-from .results_formatter import ResultsFormatter
-
-
-class XunitFormatter(ResultsFormatter):
-    """Provides xUnit-style formatted output.
-    """
-
-    # Result mapping arguments
-    RM_IGNORE = 'ignore'
-    RM_SUCCESS = 'success'
-    RM_FAILURE = 'failure'
-    RM_PASSTHRU = 'passthru'
-
-    @staticmethod
-    def _build_illegal_xml_regex():
-        """Constructs a regex to match all illegal xml characters.
-
-        Expects to be used against a unicode string."""
-        # Construct the range pairs of invalid unicode characters.
-        illegal_chars_u = [
-            (0x00, 0x08), (0x0B, 0x0C), (0x0E, 0x1F), (0x7F, 0x84),
-            (0x86, 0x9F), (0xFDD0, 0xFDDF), (0xFFFE, 0xFFFF)]
-
-        # For wide builds, we have more.
-        if sys.maxunicode >= 0x10000:
-            illegal_chars_u.extend(
-                [(0x1FFFE, 0x1FFFF), (0x2FFFE, 0x2FFFF), (0x3FFFE, 0x3FFFF),
-                 (0x4FFFE, 0x4FFFF), (0x5FFFE, 0x5FFFF), (0x6FFFE, 0x6FFFF),
-                 (0x7FFFE, 0x7FFFF), (0x8FFFE, 0x8FFFF), (0x9FFFE, 0x9FFFF),
-                 (0xAFFFE, 0xAFFFF), (0xBFFFE, 0xBFFFF), (0xCFFFE, 0xCFFFF),
-                 (0xDFFFE, 0xDFFFF), (0xEFFFE, 0xEFFFF), (0xFFFFE, 0xFFFFF),
-                 (0x10FFFE, 0x10FFFF)])
-
-        # Build up an array of range expressions.
-        illegal_ranges = [
-            "%s-%s" % (six.unichr(low), six.unichr(high))
-            for (low, high) in illegal_chars_u]
-
-        # Compile the regex
-        return re.compile(six.u('[%s]') % six.u('').join(illegal_ranges))
-
-    @staticmethod
-    def _quote_attribute(text):
-        """Returns the given text in a manner safe for usage in an XML attribute.
-
-        @param text the text that should appear within an XML attribute.
-        @return the attribute-escaped version of the input text.
-        """
-        return xml.sax.saxutils.quoteattr(text)
-
-    def _replace_invalid_xml(self, str_or_unicode):
-        """Replaces invalid XML characters with a '?'.
-
-        @param str_or_unicode a string to replace invalid XML
-        characters within.  Can be unicode or not.  If not unicode,
-        assumes it is a byte string in utf-8 encoding.
-
-        @returns a utf-8-encoded byte string with invalid
-        XML replaced with '?'.
-        """
-        # Get the content into unicode
-        if isinstance(str_or_unicode, str):
-            # If we hit decoding errors due to data corruption, replace the
-            # invalid characters with U+FFFD REPLACEMENT CHARACTER.
-            unicode_content = str_or_unicode.decode('utf-8', 'replace')
-        else:
-            unicode_content = str_or_unicode
-        return self.invalid_xml_re.sub(
-            six.u('?'), unicode_content).encode('utf-8')
-
-    @classmethod
-    def arg_parser(cls):
-        """@return arg parser used to parse formatter-specific options."""
-        parser = super(XunitFormatter, cls).arg_parser()
-
-        # These are valid choices for results mapping.
-        results_mapping_choices = [
-            XunitFormatter.RM_IGNORE,
-            XunitFormatter.RM_SUCCESS,
-            XunitFormatter.RM_FAILURE,
-            XunitFormatter.RM_PASSTHRU]
-        parser.add_argument(
-            "--assert-on-unknown-events",
-            action="store_true",
-            help=('cause unknown test events to generate '
-                  'a python assert.  Default is to ignore.'))
-        parser.add_argument(
-            "--ignore-skip-name",
-            "-n",
-            metavar='PATTERN',
-            action="append",
-            dest='ignore_skip_name_patterns',
-            help=('a python regex pattern, where '
-                  'any skipped test with a test method name where regex '
-                  'matches (via search) will be ignored for xUnit test '
-                  'result purposes.  Can be specified multiple times.'))
-        parser.add_argument(
-            "--ignore-skip-reason",
-            "-r",
-            metavar='PATTERN',
-            action="append",
-            dest='ignore_skip_reason_patterns',
-            help=('a python regex pattern, where '
-                  'any skipped test with a skip reason where the regex '
-                  'matches (via search) will be ignored for xUnit test '
-                  'result purposes.  Can be specified multiple times.'))
-        parser.add_argument(
-            "--xpass", action="store", choices=results_mapping_choices,
-            default=XunitFormatter.RM_FAILURE,
-            help=('specify mapping from unexpected success to jUnit/xUnit '
-                  'result type'))
-        parser.add_argument(
-            "--xfail", action="store", choices=results_mapping_choices,
-            default=XunitFormatter.RM_IGNORE,
-            help=('specify mapping from expected failure to jUnit/xUnit '
-                  'result type'))
-        return parser
-
-    @staticmethod
-    def _build_regex_list_from_patterns(patterns):
-        """Builds a list of compiled regular expressions from option value.
-
-        @param patterns contains a list of regular expression
-        patterns.
-
-        @return list of compiled regular expressions, empty if no
-        patterns provided.
-        """
-        regex_list = []
-        if patterns is not None:
-            for pattern in patterns:
-                regex_list.append(re.compile(pattern))
-        return regex_list
-
-    def __init__(self, out_file, options):
-        """Initializes the XunitFormatter instance.
-        @param out_file file-like object where formatted output is written.
-        @param options specifies a dictionary of options for the
-        formatter.
-        """
-        # Initialize the parent
-        super(XunitFormatter, self).__init__(out_file, options)
-        self.text_encoding = "UTF-8"
-        self.invalid_xml_re = XunitFormatter._build_illegal_xml_regex()
-        self.total_test_count = 0
-        self.ignore_skip_name_regexes = (
-            XunitFormatter._build_regex_list_from_patterns(
-                options.ignore_skip_name_patterns))
-        self.ignore_skip_reason_regexes = (
-            XunitFormatter._build_regex_list_from_patterns(
-                options.ignore_skip_reason_patterns))
-
-        self.elements = {
-            "successes": [],
-            "errors": [],
-            "failures": [],
-            "skips": [],
-            "unexpected_successes": [],
-            "expected_failures": [],
-            "all": []
-        }
-
-        self.status_handlers = {
-            EventBuilder.STATUS_SUCCESS: self._handle_success,
-            EventBuilder.STATUS_FAILURE: self._handle_failure,
-            EventBuilder.STATUS_ERROR: self._handle_error,
-            EventBuilder.STATUS_SKIP: self._handle_skip,
-            EventBuilder.STATUS_EXPECTED_FAILURE:
-                self._handle_expected_failure,
-            EventBuilder.STATUS_EXPECTED_TIMEOUT:
-                self._handle_expected_timeout,
-            EventBuilder.STATUS_UNEXPECTED_SUCCESS:
-                self._handle_unexpected_success,
-            EventBuilder.STATUS_EXCEPTIONAL_EXIT:
-                self._handle_exceptional_exit,
-            EventBuilder.STATUS_TIMEOUT:
-                self._handle_timeout
-        }
-
-    RESULT_TYPES = {
-        EventBuilder.TYPE_TEST_RESULT,
-        EventBuilder.TYPE_JOB_RESULT}
-
-    def handle_event(self, test_event):
-        super(XunitFormatter, self).handle_event(test_event)
-
-        event_type = test_event["event"]
-        if event_type is None:
-            return
-
-        if event_type == "terminate":
-            # Process all the final result events into their
-            # XML counterparts.
-            for result_event in self.result_events.values():
-                self._process_test_result(result_event)
-            self._finish_output()
-        else:
-            # This is an unknown event.
-            if self.options.assert_on_unknown_events:
-                raise Exception("unknown event type {} from {}\n".format(
-                    event_type, test_event))
-
-    def _handle_success(self, test_event):
-        """Handles a test success.
-        @param test_event the test event to handle.
-        """
-        result = self._common_add_testcase_entry(test_event)
-        with self.lock:
-            self.elements["successes"].append(result)
-
-    def _handle_failure(self, test_event):
-        """Handles a test failure.
-        @param test_event the test event to handle.
-        """
-        message = self._replace_invalid_xml(test_event["issue_message"])
-        backtrace = self._replace_invalid_xml(
-            "".join(test_event.get("issue_backtrace", [])))
-
-        result = self._common_add_testcase_entry(
-            test_event,
-            inner_content=(
-                '<failure type={} message={}><![CDATA[{}]]></failure>'.format(
-                    XunitFormatter._quote_attribute(test_event["issue_class"]),
-                    XunitFormatter._quote_attribute(message),
-                    backtrace)
-            ))
-        with self.lock:
-            self.elements["failures"].append(result)
-
-    def _handle_error_build(self, test_event):
-        """Handles a test error.
-        @param test_event the test event to handle.
-        """
-        message = self._replace_invalid_xml(test_event["issue_message"])
-        build_issue_description = self._replace_invalid_xml(
-            BuildError.format_build_error(
-                test_event.get("build_command", "<None>"),
-                test_event.get("build_error", "<None>")))
-
-        result = self._common_add_testcase_entry(
-            test_event,
-            inner_content=(
-                '<error type={} message={}><![CDATA[{}]]></error>'.format(
-                    XunitFormatter._quote_attribute(test_event["issue_class"]),
-                    XunitFormatter._quote_attribute(message),
-                    build_issue_description)
-            ))
-        with self.lock:
-            self.elements["errors"].append(result)
-
-    def _handle_error_standard(self, test_event):
-        """Handles a test error.
-        @param test_event the test event to handle.
-        """
-        message = self._replace_invalid_xml(test_event["issue_message"])
-        backtrace = self._replace_invalid_xml(
-            "".join(test_event.get("issue_backtrace", [])))
-
-        result = self._common_add_testcase_entry(
-            test_event,
-            inner_content=(
-                '<error type={} message={}><![CDATA[{}]]></error>'.format(
-                    XunitFormatter._quote_attribute(test_event["issue_class"]),
-                    XunitFormatter._quote_attribute(message),
-                    backtrace)
-            ))
-        with self.lock:
-            self.elements["errors"].append(result)
-
-    def _handle_error(self, test_event):
-        if test_event.get("issue_phase", None) == "build":
-            self._handle_error_build(test_event)
-        else:
-            self._handle_error_standard(test_event)
-
-    def _handle_exceptional_exit(self, test_event):
-        """Handles an exceptional exit.
-        @param test_event the test method or job result event to handle.
-        """
-        if "test_name" in test_event:
-            name = test_event["test_name"]
-        else:
-            name = test_event.get("test_filename", "<unknown test/filename>")
-
-        message_text = "ERROR: {} ({}): {}".format(
-            test_event.get("exception_code", 0),
-            test_event.get("exception_description", ""),
-            name)
-        message = self._replace_invalid_xml(message_text)
-
-        result = self._common_add_testcase_entry(
-            test_event,
-            inner_content=(
-                '<error type={} message={}></error>'.format(
-                    "exceptional_exit",
-                    XunitFormatter._quote_attribute(message))
-            ))
-        with self.lock:
-            self.elements["errors"].append(result)
-
-    def _handle_timeout(self, test_event):
-        """Handles a test method or job timeout.
-        @param test_event the test method or job result event to handle.
-        """
-        if "test_name" in test_event:
-            name = test_event["test_name"]
-        else:
-            name = test_event.get("test_filename", "<unknown test/filename>")
-
-        message_text = "TIMEOUT: {}".format(name)
-        message = self._replace_invalid_xml(message_text)
-
-        result = self._common_add_testcase_entry(
-            test_event,
-            inner_content=(
-                '<error type={} message={}></error>'.format(
-                    XunitFormatter._quote_attribute("timeout"),
-                    XunitFormatter._quote_attribute(message))
-            ))
-        with self.lock:
-            self.elements["errors"].append(result)
-
-    @staticmethod
-    def _ignore_based_on_regex_list(test_event, test_key, regex_list):
-        """Returns whether to ignore a test event based on patterns.
-
-        @param test_event the test event dictionary to check.
-        @param test_key the key within the dictionary to check.
-        @param regex_list a list of zero or more regexes.  May contain
-        zero or more compiled regexes.
-
-        @return True if any o the regex list match based on the
-        re.search() method; false otherwise.
-        """
-        for regex in regex_list:
-            match = regex.search(test_event.get(test_key, ''))
-            if match:
-                return True
-        return False
-
-    def _handle_skip(self, test_event):
-        """Handles a skipped test.
-        @param test_event the test event to handle.
-        """
-
-        # Are we ignoring this test based on test name?
-        if XunitFormatter._ignore_based_on_regex_list(
-                test_event, 'test_name', self.ignore_skip_name_regexes):
-            return
-
-        # Are we ignoring this test based on skip reason?
-        if XunitFormatter._ignore_based_on_regex_list(
-                test_event, 'skip_reason', self.ignore_skip_reason_regexes):
-            return
-
-        # We're not ignoring this test.  Process the skip.
-        reason = self._replace_invalid_xml(test_event.get("skip_reason", ""))
-        result = self._common_add_testcase_entry(
-            test_event,
-            inner_content='<skipped message={} />'.format(
-                XunitFormatter._quote_attribute(reason)))
-        with self.lock:
-            self.elements["skips"].append(result)
-
-    def _handle_expected_failure(self, test_event):
-        """Handles a test that failed as expected.
-        @param test_event the test event to handle.
-        """
-        if self.options.xfail == XunitFormatter.RM_PASSTHRU:
-            # This is not a natively-supported junit/xunit
-            # testcase mode, so it might fail a validating
-            # test results viewer.
-            if "bugnumber" in test_event:
-                bug_id_attribute = 'bug-id={} '.format(
-                    XunitFormatter._quote_attribute(test_event["bugnumber"]))
-            else:
-                bug_id_attribute = ''
-
-            result = self._common_add_testcase_entry(
-                test_event,
-                inner_content=(
-                    '<expected-failure {}type={} message={} />'.format(
-                        bug_id_attribute,
-                        XunitFormatter._quote_attribute(
-                            test_event["issue_class"]),
-                        XunitFormatter._quote_attribute(
-                            test_event["issue_message"]))
-                ))
-            with self.lock:
-                self.elements["expected_failures"].append(result)
-        elif self.options.xfail == XunitFormatter.RM_SUCCESS:
-            result = self._common_add_testcase_entry(test_event)
-            with self.lock:
-                self.elements["successes"].append(result)
-        elif self.options.xfail == XunitFormatter.RM_FAILURE:
-            result = self._common_add_testcase_entry(
-                test_event,
-                inner_content='<failure type={} message={} />'.format(
-                    XunitFormatter._quote_attribute(test_event["issue_class"]),
-                    XunitFormatter._quote_attribute(
-                        test_event["issue_message"])))
-            with self.lock:
-                self.elements["failures"].append(result)
-        elif self.options.xfail == XunitFormatter.RM_IGNORE:
-            pass
-        else:
-            raise Exception(
-                "unknown xfail option: {}".format(self.options.xfail))
-
-    @staticmethod
-    def _handle_expected_timeout(test_event):
-        """Handles expected_timeout.
-        @param test_event the test event to handle.
-        """
-        # We don't do anything with expected timeouts, not even report.
-        pass
-
-    def _handle_unexpected_success(self, test_event):
-        """Handles a test that passed but was expected to fail.
-        @param test_event the test event to handle.
-        """
-        if self.options.xpass == XunitFormatter.RM_PASSTHRU:
-            # This is not a natively-supported junit/xunit
-            # testcase mode, so it might fail a validating
-            # test results viewer.
-            result = self._common_add_testcase_entry(
-                test_event,
-                inner_content="<unexpected-success />")
-            with self.lock:
-                self.elements["unexpected_successes"].append(result)
-        elif self.options.xpass == XunitFormatter.RM_SUCCESS:
-            # Treat the xpass as a success.
-            result = self._common_add_testcase_entry(test_event)
-            with self.lock:
-                self.elements["successes"].append(result)
-        elif self.options.xpass == XunitFormatter.RM_FAILURE:
-            # Treat the xpass as a failure.
-            if "bugnumber" in test_event:
-                message = "unexpected success (bug_id:{})".format(
-                    test_event["bugnumber"])
-            else:
-                message = "unexpected success (bug_id:none)"
-            result = self._common_add_testcase_entry(
-                test_event,
-                inner_content='<failure type={} message={} />'.format(
-                    XunitFormatter._quote_attribute("unexpected_success"),
-                    XunitFormatter._quote_attribute(message)))
-            with self.lock:
-                self.elements["failures"].append(result)
-        elif self.options.xpass == XunitFormatter.RM_IGNORE:
-            # Ignore the xpass result as far as xUnit reporting goes.
-            pass
-        else:
-            raise Exception("unknown xpass option: {}".format(
-                self.options.xpass))
-
-    def _process_test_result(self, test_event):
-        """Processes the test_event known to be a test result.
-
-        This categorizes the event appropriately and stores the data needed
-        to generate the final xUnit report.  This method skips events that
-        cannot be represented in xUnit output.
-        """
-        if "status" not in test_event:
-            raise Exception("test event dictionary missing 'status' key")
-
-        status = test_event["status"]
-        if status not in self.status_handlers:
-            raise Exception("test event status '{}' unsupported".format(
-                status))
-
-        # Call the status handler for the test result.
-        self.status_handlers[status](test_event)
-
-    def _common_add_testcase_entry(self, test_event, inner_content=None):
-        """Registers a testcase result, and returns the text created.
-
-        The caller is expected to manage failure/skip/success counts
-        in some kind of appropriate way.  This call simply constructs
-        the XML and appends the returned result to the self.all_results
-        list.
-
-        @param test_event the test event dictionary.
-
-        @param inner_content if specified, gets included in the <testcase>
-        inner section, at the point before stdout and stderr would be
-        included.  This is where a <failure/>, <skipped/>, <error/>, etc.
-        could go.
-
-        @return the text of the xml testcase element.
-        """
-
-        # Get elapsed time.
-        test_class = test_event.get("test_class", "<no_class>")
-        test_name = test_event.get("test_name", "<no_test_method>")
-        event_time = test_event["event_time"]
-        time_taken = self.elapsed_time_for_test(
-            test_class, test_name, event_time)
-
-        # Plumb in stdout/stderr once we shift over to only test results.
-        test_stdout = ''
-        test_stderr = ''
-
-        # Formulate the output xml.
-        if not inner_content:
-            inner_content = ""
-        result = (
-            '<testcase classname="{}" name="{}" time="{:.3f}">'
-            '{}{}{}</testcase>'.format(
-                test_class,
-                test_name,
-                time_taken,
-                inner_content,
-                test_stdout,
-                test_stderr))
-
-        # Save the result, update total test count.
-        with self.lock:
-            self.total_test_count += 1
-            self.elements["all"].append(result)
-
-        return result
-
-    def _finish_output_no_lock(self):
-        """Flushes out the report of test executions to form valid xml output.
-
-        xUnit output is in XML.  The reporting system cannot complete the
-        formatting of the output without knowing when there is no more input.
-        This call addresses notification of the completed test run and thus is
-        when we can finish off the report output.
-        """
-
-        # Figure out the counts line for the testsuite.  If we have
-        # been counting either unexpected successes or expected
-        # failures, we'll output those in the counts, at the risk of
-        # being invalidated by a validating test results viewer.
-        # These aren't counted by default so they won't show up unless
-        # the user specified a formatter option to include them.
-        xfail_count = len(self.elements["expected_failures"])
-        xpass_count = len(self.elements["unexpected_successes"])
-        if xfail_count > 0 or xpass_count > 0:
-            extra_testsuite_attributes = (
-                ' expected-failures="{}"'
-                ' unexpected-successes="{}"'.format(xfail_count, xpass_count))
-        else:
-            extra_testsuite_attributes = ""
-
-        # Output the header.
-        self.out_file.write(
-            '<?xml version="1.0" encoding="{}"?>\n'
-            '<testsuites>'
-            '<testsuite name="{}" tests="{}" errors="{}" failures="{}" '
-            'skip="{}"{}>\n'.format(
-                self.text_encoding,
-                "LLDB test suite",
-                self.total_test_count,
-                len(self.elements["errors"]),
-                len(self.elements["failures"]),
-                len(self.elements["skips"]),
-                extra_testsuite_attributes))
-
-        # Output each of the test result entries.
-        for result in self.elements["all"]:
-            self.out_file.write(result + '\n')
-
-        # Close off the test suite.
-        self.out_file.write('</testsuite></testsuites>\n')
-
-    def _finish_output(self):
-        """Finish writing output as all incoming events have arrived."""
-        with self.lock:
-            self._finish_output_no_lock()
diff --git a/gnu/llvm/lldb/scripts/swig_bot_lib/__init__.py b/gnu/llvm/lldb/scripts/swig_bot_lib/__init__.py
deleted file mode 100644 (file)
index e69de29..0000000
index d491ac1..28c463b 100644 (file)
@@ -1207,7 +1207,8 @@ bool FormatEntity::Format(const Entry &entry, Stream &s,
                                               : llvm::Triple::UnknownOS;
             if ((ostype == llvm::Triple::FreeBSD) ||
                 (ostype == llvm::Triple::Linux) ||
-                (ostype == llvm::Triple::NetBSD)) {
+                (ostype == llvm::Triple::NetBSD) ||
+                (ostype == llvm::Triple::OpenBSD)) {
               format = "%" PRIu64;
             }
           } else {
index e98944d..4e99366 100644 (file)
@@ -113,7 +113,7 @@ static socklen_t GetFamilyLength(sa_family_t family) {
 }
 
 socklen_t SocketAddress::GetLength() const {
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
   return m_socket_addr.sa.sa_len;
 #else
   return GetFamilyLength(GetFamily());
@@ -128,7 +128,7 @@ sa_family_t SocketAddress::GetFamily() const {
 
 void SocketAddress::SetFamily(sa_family_t family) {
   m_socket_addr.sa.sa_family = family;
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
   m_socket_addr.sa.sa_len = GetFamilyLength(family);
 #endif
 }
diff --git a/gnu/llvm/lldb/source/Host/common/TaskPool.cpp b/gnu/llvm/lldb/source/Host/common/TaskPool.cpp
deleted file mode 100644 (file)
index 73f761b..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-//===--------------------- TaskPool.cpp -------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "lldb/Host/TaskPool.h"
-#include "lldb/Host/ThreadLauncher.h"
-#include "lldb/Utility/Log.h"
-
-#include <cstdint>
-#include <queue>
-#include <thread>
-
-namespace lldb_private {
-
-namespace {
-class TaskPoolImpl {
-public:
-  static TaskPoolImpl &GetInstance();
-
-  void AddTask(std::function<void()> &&task_fn);
-
-private:
-  TaskPoolImpl();
-
-  static lldb::thread_result_t WorkerPtr(void *pool);
-
-  static void Worker(TaskPoolImpl *pool);
-
-  std::queue<std::function<void()>> m_tasks;
-  std::mutex m_tasks_mutex;
-  uint32_t m_thread_count;
-};
-
-} // end of anonymous namespace
-
-TaskPoolImpl &TaskPoolImpl::GetInstance() {
-  static TaskPoolImpl g_task_pool_impl;
-  return g_task_pool_impl;
-}
-
-void TaskPool::AddTaskImpl(std::function<void()> &&task_fn) {
-  TaskPoolImpl::GetInstance().AddTask(std::move(task_fn));
-}
-
-TaskPoolImpl::TaskPoolImpl() : m_thread_count(0) {}
-
-unsigned GetHardwareConcurrencyHint() {
-  // std::thread::hardware_concurrency may return 0 if the value is not well
-  // defined or not computable.
-  static const unsigned g_hardware_concurrency = 
-    std::max(1u, std::thread::hardware_concurrency());
-  return g_hardware_concurrency;
-}
-
-void TaskPoolImpl::AddTask(std::function<void()> &&task_fn) {
-  const size_t min_stack_size = 8 * 1024 * 1024;
-
-  std::unique_lock<std::mutex> lock(m_tasks_mutex);
-  m_tasks.emplace(std::move(task_fn));
-  if (m_thread_count < GetHardwareConcurrencyHint()) {
-    m_thread_count++;
-    // Note that this detach call needs to happen with the m_tasks_mutex held.
-    // This prevents the thread from exiting prematurely and triggering a linux
-    // libc bug (https://sourceware.org/bugzilla/show_bug.cgi?id=19951).
-    llvm::Expected<HostThread> host_thread =
-        lldb_private::ThreadLauncher::LaunchThread(
-            "task-pool.worker", WorkerPtr, this, min_stack_size);
-    if (host_thread) {
-      host_thread->Release();
-    } else {
-      LLDB_LOG(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST),
-               "failed to launch host thread: {}",
-               llvm::toString(host_thread.takeError()));
-    }
-  }
-}
-
-lldb::thread_result_t TaskPoolImpl::WorkerPtr(void *pool) {
-  Worker((TaskPoolImpl *)pool);
-  return {};
-}
-
-void TaskPoolImpl::Worker(TaskPoolImpl *pool) {
-  while (true) {
-    std::unique_lock<std::mutex> lock(pool->m_tasks_mutex);
-    if (pool->m_tasks.empty()) {
-      pool->m_thread_count--;
-      break;
-    }
-
-    std::function<void()> f = std::move(pool->m_tasks.front());
-    pool->m_tasks.pop();
-    lock.unlock();
-
-    f();
-  }
-}
-
-void TaskMapOverInt(size_t begin, size_t end,
-                    const llvm::function_ref<void(size_t)> &func) {
-  const size_t num_workers = std::min<size_t>(end, GetHardwareConcurrencyHint());
-  std::atomic<size_t> idx{begin};
-  
-  auto wrapper = [&idx, end, &func]() {
-    while (true) {
-      size_t i = idx.fetch_add(1);
-      if (i >= end)
-        break;
-      func(i);
-    }
-  };
-
-  std::vector<std::future<void>> futures;
-  futures.reserve(num_workers);
-  for (size_t i = 0; i < num_workers; i++)
-    futures.push_back(TaskPool::AddTask(wrapper));
-  for (size_t i = 0; i < num_workers; i++)
-    futures[i].wait();
-}
-
-} // namespace lldb_private
-
diff --git a/gnu/llvm/lldb/source/Host/linux/ProcessLauncherLinux.cpp b/gnu/llvm/lldb/source/Host/linux/ProcessLauncherLinux.cpp
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/gnu/llvm/lldb/source/Host/netbsd/Host.cpp b/gnu/llvm/lldb/source/Host/netbsd/Host.cpp
deleted file mode 100644 (file)
index 20f3db3..0000000
+++ /dev/null
@@ -1,246 +0,0 @@
-//===-- source/Host/netbsd/Host.cpp -----------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <dlfcn.h>
-#include <execinfo.h>
-#include <stdio.h>
-#include <sys/proc.h>
-#include <sys/sysctl.h>
-#include <sys/types.h>
-
-#include <limits.h>
-
-#include <elf.h>
-#include <kvm.h>
-#include <sys/exec.h>
-#include <sys/ptrace.h>
-
-#include "lldb/Host/Host.h"
-#include "lldb/Host/HostInfo.h"
-#include "lldb/Utility/DataBufferHeap.h"
-#include "lldb/Utility/DataExtractor.h"
-#include "lldb/Utility/Endian.h"
-#include "lldb/Utility/Log.h"
-#include "lldb/Utility/NameMatches.h"
-#include "lldb/Utility/ProcessInfo.h"
-#include "lldb/Utility/Status.h"
-#include "lldb/Utility/StreamString.h"
-
-#include "llvm/Support/Host.h"
-
-extern "C" {
-extern char **environ;
-}
-
-using namespace lldb;
-using namespace lldb_private;
-
-namespace lldb_private {
-class ProcessLaunchInfo;
-}
-
-Environment Host::GetEnvironment() { return Environment(environ); }
-
-static bool GetNetBSDProcessArgs(const ProcessInstanceInfoMatch *match_info_ptr,
-                                 ProcessInstanceInfo &process_info) {
-  if (!process_info.ProcessIDIsValid())
-    return false;
-
-  int pid = process_info.GetProcessID();
-
-  int mib[4] = {CTL_KERN, KERN_PROC_ARGS, pid, KERN_PROC_ARGV};
-
-  char arg_data[8192];
-  size_t arg_data_size = sizeof(arg_data);
-  if (::sysctl(mib, 4, arg_data, &arg_data_size, NULL, 0) != 0)
-    return false;
-
-  DataExtractor data(arg_data, arg_data_size, endian::InlHostByteOrder(),
-                     sizeof(void *));
-  lldb::offset_t offset = 0;
-  const char *cstr;
-
-  cstr = data.GetCStr(&offset);
-  if (!cstr)
-    return false;
-
-  process_info.GetExecutableFile().SetFile(cstr,
-                                           FileSpec::Style::native);
-
-  if (!(match_info_ptr == NULL ||
-        NameMatches(process_info.GetExecutableFile().GetFilename().GetCString(),
-                    match_info_ptr->GetNameMatchType(),
-                    match_info_ptr->GetProcessInfo().GetName())))
-    return false;
-
-  process_info.SetArg0(cstr);
-  Args &proc_args = process_info.GetArguments();
-  while (1) {
-    const uint8_t *p = data.PeekData(offset, 1);
-    while ((p != NULL) && (*p == '\0') && offset < arg_data_size) {
-      ++offset;
-      p = data.PeekData(offset, 1);
-    }
-    if (p == NULL || offset >= arg_data_size)
-      break;
-
-    cstr = data.GetCStr(&offset);
-    if (!cstr)
-      break;
-
-    proc_args.AppendArgument(llvm::StringRef(cstr));
-  }
-
-  return true;
-}
-
-static bool GetNetBSDProcessCPUType(ProcessInstanceInfo &process_info) {
-  if (process_info.ProcessIDIsValid()) {
-    process_info.GetArchitecture() =
-        HostInfo::GetArchitecture(HostInfo::eArchKindDefault);
-    return true;
-  }
-  process_info.GetArchitecture().Clear();
-  return false;
-}
-
-static bool GetNetBSDProcessUserAndGroup(ProcessInstanceInfo &process_info) {
-  ::kvm_t *kdp;
-  char errbuf[_POSIX2_LINE_MAX]; /* XXX: error string unused */
-
-  struct ::kinfo_proc2 *proc_kinfo;
-  const int pid = process_info.GetProcessID();
-  int nproc;
-
-  if (!process_info.ProcessIDIsValid())
-    goto error;
-
-  if ((kdp = ::kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, errbuf)) == NULL)
-    goto error;
-
-  if ((proc_kinfo = ::kvm_getproc2(kdp, KERN_PROC_PID, pid,
-                                   sizeof(struct ::kinfo_proc2), &nproc)) ==
-      NULL) {
-    ::kvm_close(kdp);
-    goto error;
-  }
-
-  if (nproc < 1) {
-    ::kvm_close(kdp); /* XXX: we don't check for error here */
-    goto error;
-  }
-
-  process_info.SetParentProcessID(proc_kinfo->p_ppid);
-  process_info.SetUserID(proc_kinfo->p_ruid);
-  process_info.SetGroupID(proc_kinfo->p_rgid);
-  process_info.SetEffectiveUserID(proc_kinfo->p_uid);
-  process_info.SetEffectiveGroupID(proc_kinfo->p_gid);
-
-  ::kvm_close(kdp); /* XXX: we don't check for error here */
-
-  return true;
-
-error:
-  process_info.SetParentProcessID(LLDB_INVALID_PROCESS_ID);
-  process_info.SetUserID(UINT32_MAX);
-  process_info.SetGroupID(UINT32_MAX);
-  process_info.SetEffectiveUserID(UINT32_MAX);
-  process_info.SetEffectiveGroupID(UINT32_MAX);
-  return false;
-}
-
-uint32_t Host::FindProcesses(const ProcessInstanceInfoMatch &match_info,
-                             ProcessInstanceInfoList &process_infos) {
-  const ::pid_t our_pid = ::getpid();
-  const ::uid_t our_uid = ::getuid();
-
-  const bool all_users =
-      match_info.GetMatchAllUsers() ||
-      // Special case, if lldb is being run as root we can attach to anything
-      (our_uid == 0);
-
-  kvm_t *kdp;
-  char errbuf[_POSIX2_LINE_MAX]; /* XXX: error string unused */
-  if ((kdp = ::kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, errbuf)) == NULL)
-    return 0;
-
-  struct ::kinfo_proc2 *proc_kinfo;
-  int nproc;
-  if ((proc_kinfo = ::kvm_getproc2(kdp, KERN_PROC_ALL, 0,
-                                   sizeof(struct ::kinfo_proc2), &nproc)) ==
-      NULL) {
-    ::kvm_close(kdp);
-    return 0;
-  }
-
-  for (int i = 0; i < nproc; i++) {
-    if (proc_kinfo[i].p_pid < 1)
-      continue; /* not valid */
-    /* Make sure the user is acceptable */
-    if (!all_users && proc_kinfo[i].p_ruid != our_uid)
-      continue;
-
-    if (proc_kinfo[i].p_pid == our_pid ||  // Skip this process
-        proc_kinfo[i].p_pid == 0 ||        // Skip kernel (kernel pid is 0)
-        proc_kinfo[i].p_stat == LSZOMB ||  // Zombies are bad
-        proc_kinfo[i].p_flag & P_TRACED || // Being debugged?
-        proc_kinfo[i].p_flag & P_WEXIT)    // Working on exiting
-      continue;
-
-    // Every thread is a process in NetBSD, but all the threads of a single
-    // process have the same pid. Do not store the process info in the result
-    // list if a process with given identifier is already registered there.
-    if (proc_kinfo[i].p_nlwps > 1) {
-      bool already_registered = false;
-      for (size_t pi = 0; pi < process_infos.GetSize(); pi++) {
-        if (process_infos.GetProcessIDAtIndex(pi) == proc_kinfo[i].p_pid) {
-          already_registered = true;
-          break;
-        }
-      }
-
-      if (already_registered)
-        continue;
-    }
-    ProcessInstanceInfo process_info;
-    process_info.SetProcessID(proc_kinfo[i].p_pid);
-    process_info.SetParentProcessID(proc_kinfo[i].p_ppid);
-    process_info.SetUserID(proc_kinfo[i].p_ruid);
-    process_info.SetGroupID(proc_kinfo[i].p_rgid);
-    process_info.SetEffectiveUserID(proc_kinfo[i].p_uid);
-    process_info.SetEffectiveGroupID(proc_kinfo[i].p_gid);
-    // Make sure our info matches before we go fetch the name and cpu type
-    if (match_info.Matches(process_info) &&
-        GetNetBSDProcessArgs(&match_info, process_info)) {
-      GetNetBSDProcessCPUType(process_info);
-      if (match_info.Matches(process_info))
-        process_infos.Append(process_info);
-    }
-  }
-
-  kvm_close(kdp); /* XXX: we don't check for error here */
-
-  return process_infos.GetSize();
-}
-
-bool Host::GetProcessInfo(lldb::pid_t pid, ProcessInstanceInfo &process_info) {
-  process_info.SetProcessID(pid);
-
-  if (GetNetBSDProcessArgs(NULL, process_info)) {
-    GetNetBSDProcessCPUType(process_info);
-    GetNetBSDProcessUserAndGroup(process_info);
-    return true;
-  }
-
-  process_info.Clear();
-  return false;
-}
-
-Status Host::ShellExpandArguments(ProcessLaunchInfo &launch_info) {
-  return Status("unimplemented");
-}
index 776202f..7e146f7 100644 (file)
@@ -1,4 +1,4 @@
-//===-- source/Host/openbsd/Host.cpp ----------------------------*- C++ -*-===//
+//===-- source/Host/openbsd/Host.cpp --------------------------------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -142,8 +142,8 @@ static bool GetOpenBSDProcessUserAndGroup(ProcessInstanceInfo &process_info) {
   return false;
 }
 
-uint32_t Host::FindProcesses(const ProcessInstanceInfoMatch &match_info,
-                             ProcessInstanceInfoList &process_infos) {
+uint32_t Host::FindProcessesImpl(const ProcessInstanceInfoMatch &match_info,
+                                 ProcessInstanceInfoList &process_infos) {
   std::vector<struct kinfo_proc> kinfos;
 
   int mib[6] = {CTL_KERN, KERN_PROC, KERN_PROC_ALL, 0, sizeof(struct kinfo_proc), 0};
@@ -196,11 +196,11 @@ uint32_t Host::FindProcesses(const ProcessInstanceInfoMatch &match_info,
         GetOpenBSDProcessArgs(&match_info, process_info)) {
       GetOpenBSDProcessCPUType(process_info);
       if (match_info.Matches(process_info))
-        process_infos.Append(process_info);
+        process_infos.push_back(process_info);
     }
   }
 
-  return process_infos.GetSize();
+  return process_infos.size();
 }
 
 bool Host::GetProcessInfo(lldb::pid_t pid, ProcessInstanceInfo &process_info) {
index 5883633..304a501 100644 (file)
@@ -7,9 +7,11 @@
 //===----------------------------------------------------------------------===//
 
 #include "lldb/Host/openbsd/HostInfoOpenBSD.h"
+#include "lldb/Host/FileSystem.h"
 
 #include <stdio.h>
 #include <string.h>
+#include <unistd.h>
 #include <sys/sysctl.h>
 #include <sys/types.h>
 #include <sys/utsname.h>
@@ -19,13 +21,18 @@ using namespace lldb_private;
 llvm::VersionTuple HostInfoOpenBSD::GetOSVersion() {
   struct utsname un;
 
-  ::memset(&un, 0, sizeof(utsname));
-  if (uname(&un) < 0)
+  ::memset(&un, 0, sizeof(un));
+  if (::uname(&un) < 0)
     return llvm::VersionTuple();
 
-  unsigned major, minor;
-  if (2 == sscanf(un.release, "%u.%u", &major, &minor))
+  uint32_t major, minor;
+  int status = ::sscanf(un.release, "%" PRIu32 ".%" PRIu32, &major, &minor);
+  switch (status) {
+  case 1:
+    return llvm::VersionTuple(major);
+  case 2:
     return llvm::VersionTuple(major, minor);
+  }
   return llvm::VersionTuple();
 }
 
@@ -63,3 +70,12 @@ FileSpec HostInfoOpenBSD::GetProgramFileSpec() {
   static FileSpec g_program_filespec;
   return g_program_filespec;
 }
+
+bool HostInfoOpenBSD::ComputeSupportExeDirectory(FileSpec &file_spec) {
+  if (HostInfoPosix::ComputeSupportExeDirectory(file_spec) &&
+      file_spec.IsAbsolute() && FileSystem::Instance().Exists(file_spec))
+    return true;
+
+  file_spec.GetDirectory().SetCString("/usr/bin");
+  return true;
+}
index 5a39690..c0c73cb 100644 (file)
@@ -50,7 +50,7 @@ bool SetSockAddr(llvm::StringRef name, const size_t name_offset,
     saddr_un_len =
         offsetof(struct sockaddr_un, sun_path) + name_offset + name.size();
 
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
   saddr_un->sun_len = saddr_un_len;
 #endif
 
index 780222d..8f80a4f 100644 (file)
@@ -39,7 +39,7 @@ enum PIPES { READ, WRITE }; // Constants 0 and 1 for READ and WRITE
 // pipe2 is supported by a limited set of platforms
 // TODO: Add more platforms that support pipe2.
 #if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD__ >= 10) ||       \
-    defined(__NetBSD__)
+    defined(__NetBSD__) || defined(__OpenBSD__)
 #define PIPE2_SUPPORTED 1
 #else
 #define PIPE2_SUPPORTED 0
index c1a1678..b6282e1 100644 (file)
@@ -1,4 +1,4 @@
-if ( CMAKE_SYSTEM_NAME MATCHES "Linux|Android|FreeBSD|NetBSD" )
+if ( CMAKE_SYSTEM_NAME MATCHES "Linux|Android|FreeBSD|NetBSD|OpenBSD" )
   list(APPEND EXTRA_PLUGINS lldbPluginProcessPOSIX)
 endif()
 
index 0cef2a4..d1153e9 100644 (file)
@@ -18,7 +18,7 @@
 #include "lldb/Utility/Timer.h"
 #include "lldb/lldb-private.h"
 
-#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
 #include "Plugins/Process/POSIX/ProcessPOSIXLog.h"
 #endif
 
@@ -110,7 +110,7 @@ llvm::Error SystemInitializerCommon::Initialize() {
 
   process_gdb_remote::ProcessGDBRemoteLog::Initialize();
 
-#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
   ProcessPOSIXLog::Initialize();
 #endif
 #if defined(_WIN32)
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp b/gnu/llvm/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp
deleted file mode 100644 (file)
index 9dff12b..0000000
+++ /dev/null
@@ -1,2054 +0,0 @@
-//===-- ABIMacOSX_arm.cpp ---------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "ABIMacOSX_arm.h"
-
-#include <vector>
-
-#include "llvm/ADT/STLExtras.h"
-#include "llvm/ADT/Triple.h"
-
-#include "lldb/Core/Module.h"
-#include "lldb/Core/PluginManager.h"
-#include "lldb/Core/Value.h"
-#include "lldb/Core/ValueObjectConstResult.h"
-#include "lldb/Symbol/UnwindPlan.h"
-#include "lldb/Target/Process.h"
-#include "lldb/Target/RegisterContext.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Target/Thread.h"
-#include "lldb/Utility/ConstString.h"
-#include "lldb/Utility/RegisterValue.h"
-#include "lldb/Utility/Scalar.h"
-#include "lldb/Utility/Status.h"
-
-#include "Plugins/Process/Utility/ARMDefines.h"
-#include "Utility/ARM_DWARF_Registers.h"
-#include "Utility/ARM_ehframe_Registers.h"
-
-using namespace lldb;
-using namespace lldb_private;
-
-static RegisterInfo g_register_infos[] = {
-    //  NAME       ALT       SZ OFF ENCODING         FORMAT          EH_FRAME
-    //  DWARF               GENERIC                     PROCESS PLUGIN
-    //  LLDB NATIVE
-    //  ========== =======   == === =============    ============
-    //  ======================= =================== ===========================
-    //  ======================= ======================
-    {"r0",
-     "arg1",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_r0, dwarf_r0, LLDB_REGNUM_GENERIC_ARG1, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r1",
-     "arg2",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_r1, dwarf_r1, LLDB_REGNUM_GENERIC_ARG2, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r2",
-     "arg3",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_r2, dwarf_r2, LLDB_REGNUM_GENERIC_ARG3, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r3",
-     "arg4",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_r3, dwarf_r3, LLDB_REGNUM_GENERIC_ARG4, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r4",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_r4, dwarf_r4, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r5",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_r5, dwarf_r5, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r6",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_r6, dwarf_r6, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r7",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_r7, dwarf_r7, LLDB_REGNUM_GENERIC_FP, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r8",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_r8, dwarf_r8, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r9",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_r9, dwarf_r9, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r10",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_r10, dwarf_r10, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r11",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_r11, dwarf_r11, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r12",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_r12, dwarf_r12, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"sp",
-     "r13",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_sp, dwarf_sp, LLDB_REGNUM_GENERIC_SP, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"lr",
-     "r14",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_lr, dwarf_lr, LLDB_REGNUM_GENERIC_RA, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"pc",
-     "r15",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_pc, dwarf_pc, LLDB_REGNUM_GENERIC_PC, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"cpsr",
-     "psr",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_cpsr, dwarf_cpsr, LLDB_REGNUM_GENERIC_FLAGS, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s0",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s0, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s1",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s1, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s2",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s2, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s3",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s3, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s4",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s4, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s5",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s5, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s6",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s6, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s7",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s7, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s8",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s8, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s9",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s9, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s10",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s10, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s11",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s11, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s12",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s12, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s13",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s13, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s14",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s14, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s15",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s15, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s16",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s16, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s17",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s17, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s18",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s18, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s19",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s19, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s20",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s20, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s21",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s21, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s22",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s22, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s23",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s23, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s24",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s24, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s25",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s25, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s26",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s26, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s27",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s27, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s28",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s28, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s29",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s29, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s30",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s30, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s31",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s31, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"fpscr",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d0",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d0, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d1",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d1, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d2",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d2, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d3",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d3, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d4",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d4, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d5",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d5, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d6",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d6, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d7",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d7, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d8",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d8, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d9",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d9, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d10",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d10, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d11",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d11, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d12",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d12, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d13",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d13, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d14",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d14, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d15",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d15, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d16",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d16, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d17",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d17, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d18",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d18, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d19",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d19, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d20",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d20, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d21",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d21, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d22",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d22, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d23",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d23, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d24",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d24, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d25",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d25, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d26",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d26, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d27",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d27, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d28",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d28, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d29",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d29, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d30",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d30, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d31",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d31, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r8_usr",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r8_usr, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r9_usr",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r9_usr, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r10_usr",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r10_usr, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r11_usr",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r11_usr, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r12_usr",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r12_usr, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r13_usr",
-     "sp_usr",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r13_usr, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r14_usr",
-     "lr_usr",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r14_usr, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r8_fiq",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r8_fiq, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r9_fiq",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r9_fiq, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r10_fiq",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r10_fiq, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r11_fiq",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r11_fiq, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r12_fiq",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r12_fiq, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r13_fiq",
-     "sp_fiq",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r13_fiq, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r14_fiq",
-     "lr_fiq",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r14_fiq, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r13_irq",
-     "sp_irq",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r13_irq, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r14_irq",
-     "lr_irq",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r14_irq, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r13_abt",
-     "sp_abt",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r13_abt, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r14_abt",
-     "lr_abt",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r14_abt, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r13_und",
-     "sp_und",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r13_und, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r14_und",
-     "lr_und",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r14_und, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r13_svc",
-     "sp_svc",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r13_svc, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r14_svc",
-     "lr_svc",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r14_svc, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0}};
-
-static const uint32_t k_num_register_infos =
-    llvm::array_lengthof(g_register_infos);
-static bool g_register_info_names_constified = false;
-
-const lldb_private::RegisterInfo *
-ABIMacOSX_arm::GetRegisterInfoArray(uint32_t &count) {
-  // Make the C-string names and alt_names for the register infos into const
-  // C-string values by having the ConstString unique the names in the global
-  // constant C-string pool.
-  if (!g_register_info_names_constified) {
-    g_register_info_names_constified = true;
-    for (uint32_t i = 0; i < k_num_register_infos; ++i) {
-      if (g_register_infos[i].name)
-        g_register_infos[i].name =
-            ConstString(g_register_infos[i].name).GetCString();
-      if (g_register_infos[i].alt_name)
-        g_register_infos[i].alt_name =
-            ConstString(g_register_infos[i].alt_name).GetCString();
-    }
-  }
-  count = k_num_register_infos;
-  return g_register_infos;
-}
-
-size_t ABIMacOSX_arm::GetRedZoneSize() const { return 0; }
-
-// Static Functions
-
-ABISP
-ABIMacOSX_arm::CreateInstance(ProcessSP process_sp, const ArchSpec &arch) {
-  const llvm::Triple::ArchType arch_type = arch.GetTriple().getArch();
-  const llvm::Triple::VendorType vendor_type = arch.GetTriple().getVendor();
-
-  if (vendor_type == llvm::Triple::Apple) {
-    if ((arch_type == llvm::Triple::arm) ||
-        (arch_type == llvm::Triple::thumb)) {
-      return ABISP(
-          new ABIMacOSX_arm(std::move(process_sp), MakeMCRegisterInfo(arch)));
-    }
-  }
-
-  return ABISP();
-}
-
-bool ABIMacOSX_arm::PrepareTrivialCall(Thread &thread, addr_t sp,
-                                       addr_t function_addr, addr_t return_addr,
-                                       llvm::ArrayRef<addr_t> args) const {
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-  if (!reg_ctx)
-    return false;
-
-  const uint32_t pc_reg_num = reg_ctx->ConvertRegisterKindToRegisterNumber(
-      eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC);
-  const uint32_t sp_reg_num = reg_ctx->ConvertRegisterKindToRegisterNumber(
-      eRegisterKindGeneric, LLDB_REGNUM_GENERIC_SP);
-  const uint32_t ra_reg_num = reg_ctx->ConvertRegisterKindToRegisterNumber(
-      eRegisterKindGeneric, LLDB_REGNUM_GENERIC_RA);
-
-  RegisterValue reg_value;
-
-  const char *reg_names[] = {"r0", "r1", "r2", "r3"};
-
-  llvm::ArrayRef<addr_t>::iterator ai = args.begin(), ae = args.end();
-
-  for (size_t i = 0; i < llvm::array_lengthof(reg_names); ++i) {
-    if (ai == ae)
-      break;
-
-    reg_value.SetUInt32(*ai);
-    if (!reg_ctx->WriteRegister(reg_ctx->GetRegisterInfoByName(reg_names[i]),
-                                reg_value))
-      return false;
-
-    ++ai;
-  }
-
-  if (ai != ae) {
-    // Spill onto the stack
-    size_t num_stack_regs = ae - ai;
-
-    sp -= (num_stack_regs * 4);
-    // Keep the stack 16 byte aligned
-    sp &= ~(16ull - 1ull);
-
-    // just using arg1 to get the right size
-    const RegisterInfo *reg_info = reg_ctx->GetRegisterInfo(
-        eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1);
-
-    addr_t arg_pos = sp;
-
-    for (; ai != ae; ++ai) {
-      reg_value.SetUInt32(*ai);
-      if (reg_ctx
-              ->WriteRegisterValueToMemory(reg_info, arg_pos,
-                                           reg_info->byte_size, reg_value)
-              .Fail())
-        return false;
-      arg_pos += reg_info->byte_size;
-    }
-  }
-
-  TargetSP target_sp(thread.CalculateTarget());
-  Address so_addr;
-
-  // Figure out if our return address is ARM or Thumb by using the
-  // Address::GetCallableLoadAddress(Target*) which will figure out the ARM
-  // thumb-ness and set the correct address bits for us.
-  so_addr.SetLoadAddress(return_addr, target_sp.get());
-  return_addr = so_addr.GetCallableLoadAddress(target_sp.get());
-
-  // Set "lr" to the return address
-  if (!reg_ctx->WriteRegisterFromUnsigned(ra_reg_num, return_addr))
-    return false;
-
-  // If bit zero or 1 is set, this must be a thumb function, no need to figure
-  // this out from the symbols.
-  so_addr.SetLoadAddress(function_addr, target_sp.get());
-  function_addr = so_addr.GetCallableLoadAddress(target_sp.get());
-
-  const RegisterInfo *cpsr_reg_info = reg_ctx->GetRegisterInfoByName("cpsr");
-  const uint32_t curr_cpsr = reg_ctx->ReadRegisterAsUnsigned(cpsr_reg_info, 0);
-
-  // Make a new CPSR and mask out any Thumb IT (if/then) bits
-  uint32_t new_cpsr = curr_cpsr & ~MASK_CPSR_IT_MASK;
-  // If bit zero or 1 is set, this must be thumb...
-  if (function_addr & 1ull)
-    new_cpsr |= MASK_CPSR_T; // Set T bit in CPSR
-  else
-    new_cpsr &= ~MASK_CPSR_T; // Clear T bit in CPSR
-
-  if (new_cpsr != curr_cpsr) {
-    if (!reg_ctx->WriteRegisterFromUnsigned(cpsr_reg_info, new_cpsr))
-      return false;
-  }
-
-  function_addr &=
-      ~1ull; // clear bit zero since the CPSR will take care of the mode for us
-
-  // Update the sp - stack pointer - to be aligned to 16-bytes
-  sp &= ~(0xfull);
-  if (!reg_ctx->WriteRegisterFromUnsigned(sp_reg_num, sp))
-    return false;
-
-  // Set "pc" to the address requested
-  if (!reg_ctx->WriteRegisterFromUnsigned(pc_reg_num, function_addr))
-    return false;
-
-  return true;
-}
-
-bool ABIMacOSX_arm::GetArgumentValues(Thread &thread, ValueList &values) const {
-  uint32_t num_values = values.GetSize();
-
-  ExecutionContext exe_ctx(thread.shared_from_this());
-  // For now, assume that the types in the AST values come from the Target's
-  // scratch AST.
-
-  // Extract the register context so we can read arguments from registers
-
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-
-  if (!reg_ctx)
-    return false;
-
-  addr_t sp = 0;
-
-  for (uint32_t value_idx = 0; value_idx < num_values; ++value_idx) {
-    // We currently only support extracting values with Clang QualTypes. Do we
-    // care about others?
-    Value *value = values.GetValueAtIndex(value_idx);
-
-    if (!value)
-      return false;
-
-    CompilerType compiler_type = value->GetCompilerType();
-    if (compiler_type) {
-      bool is_signed = false;
-      size_t bit_width = 0;
-      llvm::Optional<uint64_t> bit_size = compiler_type.GetBitSize(&thread);
-      if (!bit_size)
-        return false;
-      if (compiler_type.IsIntegerOrEnumerationType(is_signed))
-        bit_width = *bit_size;
-      else if (compiler_type.IsPointerOrReferenceType())
-        bit_width = *bit_size;
-      else
-        // We only handle integer, pointer and reference types currently...
-        return false;
-
-      if (bit_width <= (exe_ctx.GetProcessRef().GetAddressByteSize() * 8)) {
-        if (value_idx < 4) {
-          // Arguments 1-4 are in r0-r3...
-          const RegisterInfo *arg_reg_info = nullptr;
-          // Search by generic ID first, then fall back to by name
-          uint32_t arg_reg_num = reg_ctx->ConvertRegisterKindToRegisterNumber(
-              eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1 + value_idx);
-          if (arg_reg_num != LLDB_INVALID_REGNUM) {
-            arg_reg_info = reg_ctx->GetRegisterInfoAtIndex(arg_reg_num);
-          } else {
-            switch (value_idx) {
-            case 0:
-              arg_reg_info = reg_ctx->GetRegisterInfoByName("r0");
-              break;
-            case 1:
-              arg_reg_info = reg_ctx->GetRegisterInfoByName("r1");
-              break;
-            case 2:
-              arg_reg_info = reg_ctx->GetRegisterInfoByName("r2");
-              break;
-            case 3:
-              arg_reg_info = reg_ctx->GetRegisterInfoByName("r3");
-              break;
-            }
-          }
-
-          if (arg_reg_info) {
-            RegisterValue reg_value;
-
-            if (reg_ctx->ReadRegister(arg_reg_info, reg_value)) {
-              if (is_signed)
-                reg_value.SignExtend(bit_width);
-              if (!reg_value.GetScalarValue(value->GetScalar()))
-                return false;
-              continue;
-            }
-          }
-          return false;
-        } else {
-          if (sp == 0) {
-            // Read the stack pointer if it already hasn't been read
-            sp = reg_ctx->GetSP(0);
-            if (sp == 0)
-              return false;
-          }
-
-          // Arguments 5 on up are on the stack
-          const uint32_t arg_byte_size = (bit_width + (8 - 1)) / 8;
-          Status error;
-          if (!exe_ctx.GetProcessRef().ReadScalarIntegerFromMemory(
-                  sp, arg_byte_size, is_signed, value->GetScalar(), error))
-            return false;
-
-          sp += arg_byte_size;
-        }
-      }
-    }
-  }
-  return true;
-}
-
-bool ABIMacOSX_arm::IsArmv7kProcess() const {
-  bool is_armv7k = false;
-  ProcessSP process_sp(GetProcessSP());
-  if (process_sp) {
-    const ArchSpec &arch(process_sp->GetTarget().GetArchitecture());
-    const ArchSpec::Core system_core = arch.GetCore();
-    if (system_core == ArchSpec::eCore_arm_armv7k) {
-      is_armv7k = true;
-    }
-  }
-  return is_armv7k;
-}
-
-ValueObjectSP ABIMacOSX_arm::GetReturnValueObjectImpl(
-    Thread &thread, lldb_private::CompilerType &compiler_type) const {
-  Value value;
-  ValueObjectSP return_valobj_sp;
-
-  if (!compiler_type)
-    return return_valobj_sp;
-
-  value.SetCompilerType(compiler_type);
-
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-  if (!reg_ctx)
-    return return_valobj_sp;
-
-  bool is_signed;
-
-  // Get the pointer to the first stack argument so we have a place to start
-  // when reading data
-
-  const RegisterInfo *r0_reg_info = reg_ctx->GetRegisterInfoByName("r0", 0);
-  if (compiler_type.IsIntegerOrEnumerationType(is_signed)) {
-    llvm::Optional<uint64_t> bit_width = compiler_type.GetBitSize(&thread);
-    if (!bit_width)
-      return return_valobj_sp;
-
-    switch (*bit_width) {
-    default:
-      return return_valobj_sp;
-    case 128:
-      if (IsArmv7kProcess()) {
-        // "A composite type not larger than 16 bytes is returned in r0-r3. The
-        // format is as if the result had been stored in memory at a word-
-        // aligned address and then loaded into r0-r3 with an ldm instruction"
-        {
-          const RegisterInfo *r1_reg_info =
-              reg_ctx->GetRegisterInfoByName("r1", 0);
-          const RegisterInfo *r2_reg_info =
-              reg_ctx->GetRegisterInfoByName("r2", 0);
-          const RegisterInfo *r3_reg_info =
-              reg_ctx->GetRegisterInfoByName("r3", 0);
-          if (r1_reg_info && r2_reg_info && r3_reg_info) {
-            llvm::Optional<uint64_t> byte_size =
-                compiler_type.GetByteSize(&thread);
-            if (!byte_size)
-              return return_valobj_sp;
-            ProcessSP process_sp(thread.GetProcess());
-            if (*byte_size <= r0_reg_info->byte_size + r1_reg_info->byte_size +
-                                  r2_reg_info->byte_size +
-                                  r3_reg_info->byte_size &&
-                process_sp) {
-              std::unique_ptr<DataBufferHeap> heap_data_up(
-                  new DataBufferHeap(*byte_size, 0));
-              const ByteOrder byte_order = process_sp->GetByteOrder();
-              RegisterValue r0_reg_value;
-              RegisterValue r1_reg_value;
-              RegisterValue r2_reg_value;
-              RegisterValue r3_reg_value;
-              if (reg_ctx->ReadRegister(r0_reg_info, r0_reg_value) &&
-                  reg_ctx->ReadRegister(r1_reg_info, r1_reg_value) &&
-                  reg_ctx->ReadRegister(r2_reg_info, r2_reg_value) &&
-                  reg_ctx->ReadRegister(r3_reg_info, r3_reg_value)) {
-                Status error;
-                if (r0_reg_value.GetAsMemoryData(r0_reg_info,
-                                                 heap_data_up->GetBytes() + 0,
-                                                 4, byte_order, error) &&
-                    r1_reg_value.GetAsMemoryData(r1_reg_info,
-                                                 heap_data_up->GetBytes() + 4,
-                                                 4, byte_order, error) &&
-                    r2_reg_value.GetAsMemoryData(r2_reg_info,
-                                                 heap_data_up->GetBytes() + 8,
-                                                 4, byte_order, error) &&
-                    r3_reg_value.GetAsMemoryData(r3_reg_info,
-                                                 heap_data_up->GetBytes() + 12,
-                                                 4, byte_order, error)) {
-                  DataExtractor data(DataBufferSP(heap_data_up.release()),
-                                     byte_order,
-                                     process_sp->GetAddressByteSize());
-
-                  return_valobj_sp = ValueObjectConstResult::Create(
-                      &thread, compiler_type, ConstString(""), data);
-                  return return_valobj_sp;
-                }
-              }
-            }
-          }
-        }
-      } else {
-        return return_valobj_sp;
-      }
-      break;
-    case 64: {
-      const RegisterInfo *r1_reg_info = reg_ctx->GetRegisterInfoByName("r1", 0);
-      uint64_t raw_value;
-      raw_value = reg_ctx->ReadRegisterAsUnsigned(r0_reg_info, 0) & UINT32_MAX;
-      raw_value |= ((uint64_t)(reg_ctx->ReadRegisterAsUnsigned(r1_reg_info, 0) &
-                               UINT32_MAX))
-                   << 32;
-      if (is_signed)
-        value.GetScalar() = (int64_t)raw_value;
-      else
-        value.GetScalar() = (uint64_t)raw_value;
-    } break;
-    case 32:
-      if (is_signed)
-        value.GetScalar() = (int32_t)(
-            reg_ctx->ReadRegisterAsUnsigned(r0_reg_info, 0) & UINT32_MAX);
-      else
-        value.GetScalar() = (uint32_t)(
-            reg_ctx->ReadRegisterAsUnsigned(r0_reg_info, 0) & UINT32_MAX);
-      break;
-    case 16:
-      if (is_signed)
-        value.GetScalar() = (int16_t)(
-            reg_ctx->ReadRegisterAsUnsigned(r0_reg_info, 0) & UINT16_MAX);
-      else
-        value.GetScalar() = (uint16_t)(
-            reg_ctx->ReadRegisterAsUnsigned(r0_reg_info, 0) & UINT16_MAX);
-      break;
-    case 8:
-      if (is_signed)
-        value.GetScalar() = (int8_t)(
-            reg_ctx->ReadRegisterAsUnsigned(r0_reg_info, 0) & UINT8_MAX);
-      else
-        value.GetScalar() = (uint8_t)(
-            reg_ctx->ReadRegisterAsUnsigned(r0_reg_info, 0) & UINT8_MAX);
-      break;
-    }
-  } else if (compiler_type.IsPointerType()) {
-    uint32_t ptr =
-        thread.GetRegisterContext()->ReadRegisterAsUnsigned(r0_reg_info, 0) &
-        UINT32_MAX;
-    value.GetScalar() = ptr;
-  } else {
-    // not handled yet
-    return return_valobj_sp;
-  }
-
-  // If we get here, we have a valid Value, so make our ValueObject out of it:
-
-  return_valobj_sp = ValueObjectConstResult::Create(
-      thread.GetStackFrameAtIndex(0).get(), value, ConstString(""));
-  return return_valobj_sp;
-}
-
-Status ABIMacOSX_arm::SetReturnValueObject(lldb::StackFrameSP &frame_sp,
-                                           lldb::ValueObjectSP &new_value_sp) {
-  Status error;
-  if (!new_value_sp) {
-    error.SetErrorString("Empty value object for return value.");
-    return error;
-  }
-
-  CompilerType compiler_type = new_value_sp->GetCompilerType();
-  if (!compiler_type) {
-    error.SetErrorString("Null clang type for return value.");
-    return error;
-  }
-
-  Thread *thread = frame_sp->GetThread().get();
-
-  bool is_signed;
-  uint32_t count;
-  bool is_complex;
-
-  RegisterContext *reg_ctx = thread->GetRegisterContext().get();
-
-  bool set_it_simple = false;
-  if (compiler_type.IsIntegerOrEnumerationType(is_signed) ||
-      compiler_type.IsPointerType()) {
-    DataExtractor data;
-    Status data_error;
-    size_t num_bytes = new_value_sp->GetData(data, data_error);
-    if (data_error.Fail()) {
-      error.SetErrorStringWithFormat(
-          "Couldn't convert return value to raw data: %s",
-          data_error.AsCString());
-      return error;
-    }
-    lldb::offset_t offset = 0;
-    if (num_bytes <= 8) {
-      const RegisterInfo *r0_info = reg_ctx->GetRegisterInfoByName("r0", 0);
-      if (num_bytes <= 4) {
-        uint32_t raw_value = data.GetMaxU32(&offset, num_bytes);
-
-        if (reg_ctx->WriteRegisterFromUnsigned(r0_info, raw_value))
-          set_it_simple = true;
-      } else {
-        uint32_t raw_value = data.GetMaxU32(&offset, 4);
-
-        if (reg_ctx->WriteRegisterFromUnsigned(r0_info, raw_value)) {
-          const RegisterInfo *r1_info = reg_ctx->GetRegisterInfoByName("r1", 0);
-          uint32_t raw_value = data.GetMaxU32(&offset, num_bytes - offset);
-
-          if (reg_ctx->WriteRegisterFromUnsigned(r1_info, raw_value))
-            set_it_simple = true;
-        }
-      }
-    } else if (num_bytes <= 16 && IsArmv7kProcess()) {
-      // "A composite type not larger than 16 bytes is returned in r0-r3. The
-      // format is as if the result had been stored in memory at a word-aligned
-      // address and then loaded into r0-r3 with an ldm instruction"
-
-      const RegisterInfo *r0_info = reg_ctx->GetRegisterInfoByName("r0", 0);
-      const RegisterInfo *r1_info = reg_ctx->GetRegisterInfoByName("r1", 0);
-      const RegisterInfo *r2_info = reg_ctx->GetRegisterInfoByName("r2", 0);
-      const RegisterInfo *r3_info = reg_ctx->GetRegisterInfoByName("r3", 0);
-      lldb::offset_t offset = 0;
-      uint32_t bytes_written = 4;
-      uint32_t raw_value = data.GetMaxU64(&offset, 4);
-      if (reg_ctx->WriteRegisterFromUnsigned(r0_info, raw_value) &&
-          bytes_written <= num_bytes) {
-        bytes_written += 4;
-        raw_value = data.GetMaxU64(&offset, 4);
-        if (bytes_written <= num_bytes &&
-            reg_ctx->WriteRegisterFromUnsigned(r1_info, raw_value)) {
-          bytes_written += 4;
-          raw_value = data.GetMaxU64(&offset, 4);
-          if (bytes_written <= num_bytes &&
-              reg_ctx->WriteRegisterFromUnsigned(r2_info, raw_value)) {
-            bytes_written += 4;
-            raw_value = data.GetMaxU64(&offset, 4);
-            if (bytes_written <= num_bytes &&
-                reg_ctx->WriteRegisterFromUnsigned(r3_info, raw_value)) {
-              set_it_simple = true;
-            }
-          }
-        }
-      }
-    } else {
-      error.SetErrorString("We don't support returning longer than 64 bit "
-                           "integer values at present.");
-    }
-  } else if (compiler_type.IsFloatingPointType(count, is_complex)) {
-    if (is_complex)
-      error.SetErrorString(
-          "We don't support returning complex values at present");
-    else
-      error.SetErrorString(
-          "We don't support returning float values at present");
-  }
-
-  if (!set_it_simple)
-    error.SetErrorString(
-        "We only support setting simple integer return types at present.");
-
-  return error;
-}
-
-bool ABIMacOSX_arm::CreateFunctionEntryUnwindPlan(UnwindPlan &unwind_plan) {
-  unwind_plan.Clear();
-  unwind_plan.SetRegisterKind(eRegisterKindDWARF);
-
-  uint32_t lr_reg_num = dwarf_lr;
-  uint32_t sp_reg_num = dwarf_sp;
-  uint32_t pc_reg_num = dwarf_pc;
-
-  UnwindPlan::RowSP row(new UnwindPlan::Row);
-
-  // Our Call Frame Address is the stack pointer value
-  row->GetCFAValue().SetIsRegisterPlusOffset(sp_reg_num, 0);
-
-  // The previous PC is in the LR
-  row->SetRegisterLocationToRegister(pc_reg_num, lr_reg_num, true);
-  unwind_plan.AppendRow(row);
-
-  // All other registers are the same.
-
-  unwind_plan.SetSourceName("arm at-func-entry default");
-  unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
-
-  return true;
-}
-
-bool ABIMacOSX_arm::CreateDefaultUnwindPlan(UnwindPlan &unwind_plan) {
-  unwind_plan.Clear();
-  unwind_plan.SetRegisterKind(eRegisterKindDWARF);
-
-  uint32_t fp_reg_num =
-      dwarf_r7; // apple uses r7 for all frames. Normal arm uses r11
-  uint32_t pc_reg_num = dwarf_pc;
-
-  UnwindPlan::RowSP row(new UnwindPlan::Row);
-  const int32_t ptr_size = 4;
-
-  row->GetCFAValue().SetIsRegisterPlusOffset(fp_reg_num, 2 * ptr_size);
-  row->SetOffset(0);
-
-  row->SetRegisterLocationToAtCFAPlusOffset(fp_reg_num, ptr_size * -2, true);
-  row->SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, ptr_size * -1, true);
-
-  unwind_plan.AppendRow(row);
-  unwind_plan.SetSourceName("arm-apple-ios default unwind plan");
-  unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
-  unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
-  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
-
-  return true;
-}
-
-// cf. "ARMv6 Function Calling Conventions"
-// https://developer.apple.com/library/ios/documentation/Xcode/Conceptual/iPhoneOSABIReference/Articles/ARMv6FunctionCallingConventions.html
-// and "ARMv7 Function Calling Conventions"
-// https://developer.apple.com/library/ios/documentation/Xcode/Conceptual/iPhoneOSABIReference/Articles/ARMv7FunctionCallingConventions.html
-
-// ARMv7 on iOS general purpose reg rules:
-//    r0-r3 not preserved  (used for argument passing)
-//    r4-r6 preserved
-//    r7    preserved (frame pointer)
-//    r8    preserved
-//    r9    not preserved (usable as volatile scratch register with iOS 3.x and
-//    later)
-//    r10-r11 preserved
-//    r12   not presrved
-//    r13   preserved (stack pointer)
-//    r14   not preserved (link register)
-//    r15   preserved (pc)
-//    cpsr  not preserved (different rules for different bits)
-
-// ARMv7 on iOS floating point rules:
-//    d0-d7   not preserved   (aka s0-s15, q0-q3)
-//    d8-d15  preserved       (aka s16-s31, q4-q7)
-//    d16-d31 not preserved   (aka q8-q15)
-
-bool ABIMacOSX_arm::RegisterIsVolatile(const RegisterInfo *reg_info) {
-  if (reg_info) {
-    // Volatile registers are: r0, r1, r2, r3, r9, r12, r13 (aka sp)
-    const char *name = reg_info->name;
-    if (name[0] == 'r') {
-      switch (name[1]) {
-      case '0':
-        return name[2] == '\0'; // r0
-      case '1':
-        switch (name[2]) {
-        case '\0':
-          return true; // r1
-        case '2':
-        case '3':
-          return name[3] == '\0'; // r12, r13 (sp)
-        default:
-          break;
-        }
-        break;
-
-      case '2':
-        return name[2] == '\0'; // r2
-      case '3':
-        return name[2] == '\0'; // r3
-      case '9':
-        return name[2] == '\0'; // r9 (apple-ios only...)
-
-        break;
-      }
-    } else if (name[0] == 'd') {
-      switch (name[1]) {
-      case '0':
-        return name[2] == '\0'; // d0 is volatile
-
-      case '1':
-        switch (name[2]) {
-        case '\0':
-          return true; // d1 is volatile
-        case '6':
-        case '7':
-        case '8':
-        case '9':
-          return name[3] == '\0'; // d16 - d19 are volatile
-        default:
-          break;
-        }
-        break;
-
-      case '2':
-        switch (name[2]) {
-        case '\0':
-          return true; // d2 is volatile
-        case '0':
-        case '1':
-        case '2':
-        case '3':
-        case '4':
-        case '5':
-        case '6':
-        case '7':
-        case '8':
-        case '9':
-          return name[3] == '\0'; // d20 - d29 are volatile
-        default:
-          break;
-        }
-        break;
-
-      case '3':
-        switch (name[2]) {
-        case '\0':
-          return true; // d3 is volatile
-        case '0':
-        case '1':
-          return name[3] == '\0'; // d30 - d31 are volatile
-        default:
-          break;
-        }
-        break;
-      case '4':
-      case '5':
-      case '6':
-      case '7':
-        return name[2] == '\0'; // d4 - d7 are volatile
-
-      default:
-        break;
-      }
-    } else if (name[0] == 's') {
-      switch (name[1]) {
-      case '0':
-        return name[2] == '\0'; // s0 is volatile
-
-      case '1':
-        switch (name[2]) {
-        case '\0':
-          return true; // s1 is volatile
-        case '0':
-        case '1':
-        case '2':
-        case '3':
-        case '4':
-        case '5':
-          return name[3] == '\0'; // s10 - s15 are volatile
-        default:
-          break;
-        }
-        break;
-
-      case '2':
-      case '3':
-      case '4':
-      case '5':
-      case '6':
-      case '7':
-      case '8':
-      case '9':
-        return name[2] == '\0'; // s2 - s9 are volatile
-
-      default:
-        break;
-      }
-    } else if (name[0] == 'q') {
-      switch (name[1]) {
-      case '1':
-        switch (name[2]) {
-        case '\0':
-          return true; // q1 is volatile
-        case '0':
-        case '1':
-        case '2':
-        case '3':
-        case '4':
-        case '5':
-          return true; // q10-q15 are volatile
-        default:
-          break;
-        };
-        break;
-      case '0':
-      case '2':
-      case '3':
-        return name[2] == '\0'; // q0-q3 are volatile
-      case '8':
-      case '9':
-        return name[2] == '\0'; // q8-q9 are volatile
-      default:
-        break;
-      }
-    } else if (name[0] == 's' && name[1] == 'p' && name[2] == '\0')
-      return true;
-  }
-  return false;
-}
-
-void ABIMacOSX_arm::Initialize() {
-  PluginManager::RegisterPlugin(GetPluginNameStatic(),
-                                "Mac OS X ABI for arm targets", CreateInstance);
-}
-
-void ABIMacOSX_arm::Terminate() {
-  PluginManager::UnregisterPlugin(CreateInstance);
-}
-
-lldb_private::ConstString ABIMacOSX_arm::GetPluginNameStatic() {
-  static ConstString g_name("macosx-arm");
-  return g_name;
-}
-
-// PluginInterface protocol
-
-lldb_private::ConstString ABIMacOSX_arm::GetPluginName() {
-  return GetPluginNameStatic();
-}
-
-uint32_t ABIMacOSX_arm::GetPluginVersion() { return 1; }
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h b/gnu/llvm/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h
deleted file mode 100644 (file)
index e512651..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-//===-- ABIMacOSX_arm.h ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_ABIMacOSX_arm_h_
-#define liblldb_ABIMacOSX_arm_h_
-
-#include "lldb/Target/ABI.h"
-#include "lldb/lldb-private.h"
-
-class ABIMacOSX_arm : public lldb_private::ABI {
-public:
-  ~ABIMacOSX_arm() override = default;
-
-  size_t GetRedZoneSize() const override;
-
-  bool PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp,
-                          lldb::addr_t func_addr, lldb::addr_t returnAddress,
-                          llvm::ArrayRef<lldb::addr_t> args) const override;
-
-  bool GetArgumentValues(lldb_private::Thread &thread,
-                         lldb_private::ValueList &values) const override;
-
-  lldb_private::Status
-  SetReturnValueObject(lldb::StackFrameSP &frame_sp,
-                       lldb::ValueObjectSP &new_value) override;
-
-  bool
-  CreateFunctionEntryUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
-  bool CreateDefaultUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
-  bool RegisterIsVolatile(const lldb_private::RegisterInfo *reg_info) override;
-
-  bool CallFrameAddressIsValid(lldb::addr_t cfa) override {
-    // Make sure the stack call frame addresses are are 4 byte aligned
-    if (cfa & (4ull - 1ull))
-      return false; // Not 4 byte aligned
-    if (cfa == 0)
-      return false; // Zero is not a valid stack address
-    return true;
-  }
-
-  bool CodeAddressIsValid(lldb::addr_t pc) override {
-    // Just make sure the address is a valid 32 bit address. Bit zero
-    // might be set due to Thumb function calls, so don't enforce 2 byte
-    // alignment
-    return pc <= UINT32_MAX;
-  }
-
-  lldb::addr_t FixCodeAddress(lldb::addr_t pc) override {
-    // ARM uses bit zero to signify a code address is thumb, so we must
-    // strip bit zero in any code addresses.
-    return pc & ~(lldb::addr_t)1;
-  }
-
-  const lldb_private::RegisterInfo *
-  GetRegisterInfoArray(uint32_t &count) override;
-
-  bool IsArmv7kProcess() const;
-
-  // Static Functions
-
-  static void Initialize();
-
-  static void Terminate();
-
-  static lldb::ABISP CreateInstance(lldb::ProcessSP process_sp, const lldb_private::ArchSpec &arch);
-
-  static lldb_private::ConstString GetPluginNameStatic();
-
-  // PluginInterface protocol
-
-  lldb_private::ConstString GetPluginName() override;
-
-  uint32_t GetPluginVersion() override;
-
-protected:
-  lldb::ValueObjectSP
-  GetReturnValueObjectImpl(lldb_private::Thread &thread,
-                           lldb_private::CompilerType &ast_type) const override;
-
-private:
-  ABIMacOSX_arm(lldb::ProcessSP process_sp,
-                std::unique_ptr<llvm::MCRegisterInfo> info_up)
-      : lldb_private::ABI(std::move(process_sp), std::move(info_up)) {
-    // Call CreateInstance instead.
-  }
-};
-
-#endif // liblldb_ABIMacOSX_arm_h_
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/MacOSX-arm/CMakeLists.txt b/gnu/llvm/lldb/source/Plugins/ABI/MacOSX-arm/CMakeLists.txt
deleted file mode 100644 (file)
index b41814f..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-add_lldb_library(lldbPluginABIMacOSX_arm PLUGIN
-  ABIMacOSX_arm.cpp
-
-  LINK_LIBS
-    lldbCore
-    lldbSymbol
-    lldbTarget
-    lldbPluginProcessUtility
-  LINK_COMPONENTS
-    Support
-  )
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp b/gnu/llvm/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp
deleted file mode 100644 (file)
index ec7588d..0000000
+++ /dev/null
@@ -1,2451 +0,0 @@
-//===-- ABIMacOSX_arm64.cpp -------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "ABIMacOSX_arm64.h"
-
-#include <vector>
-
-#include "llvm/ADT/STLExtras.h"
-#include "llvm/ADT/Triple.h"
-
-#include "lldb/Core/Module.h"
-#include "lldb/Core/PluginManager.h"
-#include "lldb/Core/Value.h"
-#include "lldb/Core/ValueObjectConstResult.h"
-#include "lldb/Symbol/UnwindPlan.h"
-#include "lldb/Target/Process.h"
-#include "lldb/Target/RegisterContext.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Target/Thread.h"
-#include "lldb/Utility/ConstString.h"
-#include "lldb/Utility/Log.h"
-#include "lldb/Utility/RegisterValue.h"
-#include "lldb/Utility/Scalar.h"
-#include "lldb/Utility/Status.h"
-
-#include "Utility/ARM64_DWARF_Registers.h"
-
-using namespace lldb;
-using namespace lldb_private;
-
-static const char *pluginDesc = "Mac OS X ABI for arm64 targets";
-
-static RegisterInfo g_register_infos[] = {
-    //  NAME       ALT       SZ OFF ENCODING          FORMAT
-    //  EH_FRAME             DWARF                  GENERIC
-    //  PROCESS PLUGIN          LLDB NATIVE
-    //  ========== =======   == === =============     ===================
-    //  ===================  ====================== ===========================
-    //  ======================= ======================
-    {"x0",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x0, LLDB_REGNUM_GENERIC_ARG1,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x1",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x1, LLDB_REGNUM_GENERIC_ARG2,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x2",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x2, LLDB_REGNUM_GENERIC_ARG3,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x3",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x3, LLDB_REGNUM_GENERIC_ARG4,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x4",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x4, LLDB_REGNUM_GENERIC_ARG5,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x5",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x5, LLDB_REGNUM_GENERIC_ARG6,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x6",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x6, LLDB_REGNUM_GENERIC_ARG7,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x7",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x7, LLDB_REGNUM_GENERIC_ARG8,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x8",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x8, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x9",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x9, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x10",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x10, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x11",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x11, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x12",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x12, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x13",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x13, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x14",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x14, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x15",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x15, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x16",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x16, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x17",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x17, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x18",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x18, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x19",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x19, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x20",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x20, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x21",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x21, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x22",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x22, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x23",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x23, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x24",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x24, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x25",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x25, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x26",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x26, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x27",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x27, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x28",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x28, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"fp",
-     "x29",
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x29, LLDB_REGNUM_GENERIC_FP,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"lr",
-     "x30",
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x30, LLDB_REGNUM_GENERIC_RA,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"sp",
-     "x31",
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x31, LLDB_REGNUM_GENERIC_SP,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"pc",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::pc, LLDB_REGNUM_GENERIC_PC,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"cpsr",
-     "psr",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::cpsr, LLDB_REGNUM_GENERIC_FLAGS,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-
-    {"v0",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v0, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v1",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v1, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v2",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v2, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v3",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v3, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v4",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v4, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v5",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v5, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v6",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v6, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v7",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v7, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v8",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v8, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v9",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v9, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v10",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v10, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v11",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v11, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v12",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v12, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v13",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v13, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v14",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v14, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v15",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v15, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v16",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v16, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v17",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v17, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v18",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v18, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v19",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v19, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v20",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v20, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v21",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v21, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v22",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v22, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v23",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v23, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v24",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v24, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v25",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v25, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v26",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v26, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v27",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v27, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v28",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v28, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v29",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v29, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v30",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v30, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v31",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v31, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-
-    {"fpsr",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"fpcr",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-
-    {"s0",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s1",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s2",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s3",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s4",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s5",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s6",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s7",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s8",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s9",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s10",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s11",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s12",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s13",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s14",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s15",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s16",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s17",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s18",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s19",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s20",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s21",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s22",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s23",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s24",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s25",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s26",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s27",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s28",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s29",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s30",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s31",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-
-    {"d0",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d1",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d2",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d3",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d4",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d5",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d6",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d7",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d8",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d9",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d10",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d11",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d12",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d13",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d14",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d15",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d16",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d17",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d18",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d19",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d20",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d21",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d22",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d23",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d24",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d25",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d26",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d27",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d28",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d29",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d30",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d31",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0}};
-
-static const uint32_t k_num_register_infos =
-    llvm::array_lengthof(g_register_infos);
-static bool g_register_info_names_constified = false;
-
-const lldb_private::RegisterInfo *
-ABIMacOSX_arm64::GetRegisterInfoArray(uint32_t &count) {
-  // Make the C-string names and alt_names for the register infos into const
-  // C-string values by having the ConstString unique the names in the global
-  // constant C-string pool.
-  if (!g_register_info_names_constified) {
-    g_register_info_names_constified = true;
-    for (uint32_t i = 0; i < k_num_register_infos; ++i) {
-      if (g_register_infos[i].name)
-        g_register_infos[i].name =
-            ConstString(g_register_infos[i].name).GetCString();
-      if (g_register_infos[i].alt_name)
-        g_register_infos[i].alt_name =
-            ConstString(g_register_infos[i].alt_name).GetCString();
-    }
-  }
-  count = k_num_register_infos;
-  return g_register_infos;
-}
-
-size_t ABIMacOSX_arm64::GetRedZoneSize() const { return 128; }
-
-// Static Functions
-
-ABISP
-ABIMacOSX_arm64::CreateInstance(ProcessSP process_sp, const ArchSpec &arch) {
-  const llvm::Triple::ArchType arch_type = arch.GetTriple().getArch();
-  const llvm::Triple::VendorType vendor_type = arch.GetTriple().getVendor();
-
-  if (vendor_type == llvm::Triple::Apple) {
-    if (arch_type == llvm::Triple::aarch64 || 
-        arch_type == llvm::Triple::aarch64_32) {
-      return ABISP(
-          new ABIMacOSX_arm64(std::move(process_sp), MakeMCRegisterInfo(arch)));
-    }
-  }
-
-  return ABISP();
-}
-
-bool ABIMacOSX_arm64::PrepareTrivialCall(
-    Thread &thread, lldb::addr_t sp, lldb::addr_t func_addr,
-    lldb::addr_t return_addr, llvm::ArrayRef<lldb::addr_t> args) const {
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-  if (!reg_ctx)
-    return false;
-
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
-
-  if (log) {
-    StreamString s;
-    s.Printf("ABISysV_x86_64::PrepareTrivialCall (tid = 0x%" PRIx64
-             ", sp = 0x%" PRIx64 ", func_addr = 0x%" PRIx64
-             ", return_addr = 0x%" PRIx64,
-             thread.GetID(), (uint64_t)sp, (uint64_t)func_addr,
-             (uint64_t)return_addr);
-
-    for (size_t i = 0; i < args.size(); ++i)
-      s.Printf(", arg%d = 0x%" PRIx64, static_cast<int>(i + 1), args[i]);
-    s.PutCString(")");
-    log->PutString(s.GetString());
-  }
-
-  const uint32_t pc_reg_num = reg_ctx->ConvertRegisterKindToRegisterNumber(
-      eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC);
-  const uint32_t sp_reg_num = reg_ctx->ConvertRegisterKindToRegisterNumber(
-      eRegisterKindGeneric, LLDB_REGNUM_GENERIC_SP);
-  const uint32_t ra_reg_num = reg_ctx->ConvertRegisterKindToRegisterNumber(
-      eRegisterKindGeneric, LLDB_REGNUM_GENERIC_RA);
-
-  // x0 - x7 contain first 8 simple args
-  if (args.size() > 8) // TODO handle more than 6 arguments
-    return false;
-
-  for (size_t i = 0; i < args.size(); ++i) {
-    const RegisterInfo *reg_info = reg_ctx->GetRegisterInfo(
-        eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1 + i);
-    LLDB_LOGF(log, "About to write arg%d (0x%" PRIx64 ") into %s",
-              static_cast<int>(i + 1), args[i], reg_info->name);
-    if (!reg_ctx->WriteRegisterFromUnsigned(reg_info, args[i]))
-      return false;
-  }
-
-  // Set "lr" to the return address
-  if (!reg_ctx->WriteRegisterFromUnsigned(
-          reg_ctx->GetRegisterInfoAtIndex(ra_reg_num), return_addr))
-    return false;
-
-  // Set "sp" to the requested value
-  if (!reg_ctx->WriteRegisterFromUnsigned(
-          reg_ctx->GetRegisterInfoAtIndex(sp_reg_num), sp))
-    return false;
-
-  // Set "pc" to the address requested
-  if (!reg_ctx->WriteRegisterFromUnsigned(
-          reg_ctx->GetRegisterInfoAtIndex(pc_reg_num), func_addr))
-    return false;
-
-  return true;
-}
-
-bool ABIMacOSX_arm64::GetArgumentValues(Thread &thread,
-                                        ValueList &values) const {
-  uint32_t num_values = values.GetSize();
-
-  ExecutionContext exe_ctx(thread.shared_from_this());
-
-  // Extract the register context so we can read arguments from registers
-
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-
-  if (!reg_ctx)
-    return false;
-
-  addr_t sp = 0;
-
-  for (uint32_t value_idx = 0; value_idx < num_values; ++value_idx) {
-    // We currently only support extracting values with Clang QualTypes. Do we
-    // care about others?
-    Value *value = values.GetValueAtIndex(value_idx);
-
-    if (!value)
-      return false;
-
-    CompilerType value_type = value->GetCompilerType();
-    llvm::Optional<uint64_t> bit_size = value_type.GetBitSize(&thread);
-    if (!bit_size)
-      return false;
-
-    bool is_signed = false;
-    size_t bit_width = 0;
-    if (value_type.IsIntegerOrEnumerationType(is_signed)) {
-      bit_width = *bit_size;
-    } else if (value_type.IsPointerOrReferenceType()) {
-      bit_width = *bit_size;
-    } else {
-      // We only handle integer, pointer and reference types currently...
-      return false;
-    }
-
-    if (bit_width <= (exe_ctx.GetProcessRef().GetAddressByteSize() * 8)) {
-      if (value_idx < 8) {
-        // Arguments 1-6 are in x0-x5...
-        const RegisterInfo *reg_info = nullptr;
-        // Search by generic ID first, then fall back to by name
-        uint32_t arg_reg_num = reg_ctx->ConvertRegisterKindToRegisterNumber(
-            eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1 + value_idx);
-        if (arg_reg_num != LLDB_INVALID_REGNUM) {
-          reg_info = reg_ctx->GetRegisterInfoAtIndex(arg_reg_num);
-        } else {
-          switch (value_idx) {
-          case 0:
-            reg_info = reg_ctx->GetRegisterInfoByName("x0");
-            break;
-          case 1:
-            reg_info = reg_ctx->GetRegisterInfoByName("x1");
-            break;
-          case 2:
-            reg_info = reg_ctx->GetRegisterInfoByName("x2");
-            break;
-          case 3:
-            reg_info = reg_ctx->GetRegisterInfoByName("x3");
-            break;
-          case 4:
-            reg_info = reg_ctx->GetRegisterInfoByName("x4");
-            break;
-          case 5:
-            reg_info = reg_ctx->GetRegisterInfoByName("x5");
-            break;
-          case 6:
-            reg_info = reg_ctx->GetRegisterInfoByName("x6");
-            break;
-          case 7:
-            reg_info = reg_ctx->GetRegisterInfoByName("x7");
-            break;
-          }
-        }
-
-        if (reg_info) {
-          RegisterValue reg_value;
-
-          if (reg_ctx->ReadRegister(reg_info, reg_value)) {
-            if (is_signed)
-              reg_value.SignExtend(bit_width);
-            if (!reg_value.GetScalarValue(value->GetScalar()))
-              return false;
-            continue;
-          }
-        }
-        return false;
-      } else {
-        if (sp == 0) {
-          // Read the stack pointer if we already haven't read it
-          sp = reg_ctx->GetSP(0);
-          if (sp == 0)
-            return false;
-        }
-
-        // Arguments 5 on up are on the stack
-        const uint32_t arg_byte_size = (bit_width + (8 - 1)) / 8;
-        Status error;
-        if (!exe_ctx.GetProcessRef().ReadScalarIntegerFromMemory(
-                sp, arg_byte_size, is_signed, value->GetScalar(), error))
-          return false;
-
-        sp += arg_byte_size;
-        // Align up to the next 8 byte boundary if needed
-        if (sp % 8) {
-          sp >>= 3;
-          sp += 1;
-          sp <<= 3;
-        }
-      }
-    }
-  }
-  return true;
-}
-
-Status
-ABIMacOSX_arm64::SetReturnValueObject(lldb::StackFrameSP &frame_sp,
-                                      lldb::ValueObjectSP &new_value_sp) {
-  Status error;
-  if (!new_value_sp) {
-    error.SetErrorString("Empty value object for return value.");
-    return error;
-  }
-
-  CompilerType return_value_type = new_value_sp->GetCompilerType();
-  if (!return_value_type) {
-    error.SetErrorString("Null clang type for return value.");
-    return error;
-  }
-
-  Thread *thread = frame_sp->GetThread().get();
-
-  RegisterContext *reg_ctx = thread->GetRegisterContext().get();
-
-  if (reg_ctx) {
-    DataExtractor data;
-    Status data_error;
-    const uint64_t byte_size = new_value_sp->GetData(data, data_error);
-    if (data_error.Fail()) {
-      error.SetErrorStringWithFormat(
-          "Couldn't convert return value to raw data: %s",
-          data_error.AsCString());
-      return error;
-    }
-
-    const uint32_t type_flags = return_value_type.GetTypeInfo(nullptr);
-    if (type_flags & eTypeIsScalar || type_flags & eTypeIsPointer) {
-      if (type_flags & eTypeIsInteger || type_flags & eTypeIsPointer) {
-        // Extract the register context so we can read arguments from registers
-        lldb::offset_t offset = 0;
-        if (byte_size <= 16) {
-          const RegisterInfo *x0_info = reg_ctx->GetRegisterInfoByName("x0", 0);
-          if (byte_size <= 8) {
-            uint64_t raw_value = data.GetMaxU64(&offset, byte_size);
-
-            if (!reg_ctx->WriteRegisterFromUnsigned(x0_info, raw_value))
-              error.SetErrorString("failed to write register x0");
-          } else {
-            uint64_t raw_value = data.GetMaxU64(&offset, 8);
-
-            if (reg_ctx->WriteRegisterFromUnsigned(x0_info, raw_value)) {
-              const RegisterInfo *x1_info =
-                  reg_ctx->GetRegisterInfoByName("x1", 0);
-              raw_value = data.GetMaxU64(&offset, byte_size - offset);
-
-              if (!reg_ctx->WriteRegisterFromUnsigned(x1_info, raw_value))
-                error.SetErrorString("failed to write register x1");
-            }
-          }
-        } else {
-          error.SetErrorString("We don't support returning longer than 128 bit "
-                               "integer values at present.");
-        }
-      } else if (type_flags & eTypeIsFloat) {
-        if (type_flags & eTypeIsComplex) {
-          // Don't handle complex yet.
-          error.SetErrorString(
-              "returning complex float values are not supported");
-        } else {
-          const RegisterInfo *v0_info = reg_ctx->GetRegisterInfoByName("v0", 0);
-
-          if (v0_info) {
-            if (byte_size <= 16) {
-              if (byte_size <= RegisterValue::GetMaxByteSize()) {
-                RegisterValue reg_value;
-                error = reg_value.SetValueFromData(v0_info, data, 0, true);
-                if (error.Success()) {
-                  if (!reg_ctx->WriteRegister(v0_info, reg_value))
-                    error.SetErrorString("failed to write register v0");
-                }
-              } else {
-                error.SetErrorStringWithFormat(
-                    "returning float values with a byte size of %" PRIu64
-                    " are not supported",
-                    byte_size);
-              }
-            } else {
-              error.SetErrorString("returning float values longer than 128 "
-                                   "bits are not supported");
-            }
-          } else {
-            error.SetErrorString("v0 register is not available on this target");
-          }
-        }
-      }
-    } else if (type_flags & eTypeIsVector) {
-      if (byte_size > 0) {
-        const RegisterInfo *v0_info = reg_ctx->GetRegisterInfoByName("v0", 0);
-
-        if (v0_info) {
-          if (byte_size <= v0_info->byte_size) {
-            RegisterValue reg_value;
-            error = reg_value.SetValueFromData(v0_info, data, 0, true);
-            if (error.Success()) {
-              if (!reg_ctx->WriteRegister(v0_info, reg_value))
-                error.SetErrorString("failed to write register v0");
-            }
-          }
-        }
-      }
-    }
-  } else {
-    error.SetErrorString("no registers are available");
-  }
-
-  return error;
-}
-
-bool ABIMacOSX_arm64::CreateFunctionEntryUnwindPlan(UnwindPlan &unwind_plan) {
-  unwind_plan.Clear();
-  unwind_plan.SetRegisterKind(eRegisterKindDWARF);
-
-  uint32_t lr_reg_num = arm64_dwarf::lr;
-  uint32_t sp_reg_num = arm64_dwarf::sp;
-  uint32_t pc_reg_num = arm64_dwarf::pc;
-
-  UnwindPlan::RowSP row(new UnwindPlan::Row);
-
-  // Our previous Call Frame Address is the stack pointer
-  row->GetCFAValue().SetIsRegisterPlusOffset(sp_reg_num, 0);
-
-  // Our previous PC is in the LR
-  row->SetRegisterLocationToRegister(pc_reg_num, lr_reg_num, true);
-
-  unwind_plan.AppendRow(row);
-
-  // All other registers are the same.
-
-  unwind_plan.SetSourceName("arm64 at-func-entry default");
-  unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
-
-  return true;
-}
-
-bool ABIMacOSX_arm64::CreateDefaultUnwindPlan(UnwindPlan &unwind_plan) {
-  unwind_plan.Clear();
-  unwind_plan.SetRegisterKind(eRegisterKindDWARF);
-
-  uint32_t fp_reg_num = arm64_dwarf::fp;
-  uint32_t pc_reg_num = arm64_dwarf::pc;
-
-  UnwindPlan::RowSP row(new UnwindPlan::Row);
-  const int32_t ptr_size = 8;
-
-  row->GetCFAValue().SetIsRegisterPlusOffset(fp_reg_num, 2 * ptr_size);
-  row->SetOffset(0);
-
-  row->SetRegisterLocationToAtCFAPlusOffset(fp_reg_num, ptr_size * -2, true);
-  row->SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, ptr_size * -1, true);
-
-  unwind_plan.AppendRow(row);
-  unwind_plan.SetSourceName("arm64-apple-darwin default unwind plan");
-  unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
-  unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
-  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
-  return true;
-}
-
-// AAPCS64 (Procedure Call Standard for the ARM 64-bit Architecture) says
-// registers x19 through x28 and sp are callee preserved. v8-v15 are non-
-// volatile (and specifically only the lower 8 bytes of these regs), the rest
-// of the fp/SIMD registers are volatile.
-//
-// v. https://github.com/ARM-software/software-standards/blob/master/abi/aapcs64/
-
-// We treat x29 as callee preserved also, else the unwinder won't try to
-// retrieve fp saves.
-
-bool ABIMacOSX_arm64::RegisterIsVolatile(const RegisterInfo *reg_info) {
-  if (reg_info) {
-    const char *name = reg_info->name;
-
-    // Sometimes we'll be called with the "alternate" name for these registers;
-    // recognize them as non-volatile.
-
-    if (name[0] == 'p' && name[1] == 'c') // pc
-      return false;
-    if (name[0] == 'f' && name[1] == 'p') // fp
-      return false;
-    if (name[0] == 's' && name[1] == 'p') // sp
-      return false;
-    if (name[0] == 'l' && name[1] == 'r') // lr
-      return false;
-
-    if (name[0] == 'x') {
-      // Volatile registers: x0-x18, x30 (lr)
-      // Return false for the non-volatile gpr regs, true for everything else
-      switch (name[1]) {
-      case '1':
-        switch (name[2]) {
-        case '9':
-          return false; // x19 is non-volatile
-        default:
-          return true;
-        }
-        break;
-      case '2':
-        switch (name[2]) {
-        case '0':
-        case '1':
-        case '2':
-        case '3':
-        case '4':
-        case '5':
-        case '6':
-        case '7':
-        case '8':
-          return false; // x20 - 28 are non-volatile
-        case '9':
-          return false; // x29 aka fp treat as non-volatile on Darwin
-        default:
-          return true;
-        }
-      case '3': // x30 aka lr treat as non-volatile
-        if (name[2] == '0')
-          return false;
-        break;
-      default:
-        return true;
-      }
-    } else if (name[0] == 'v' || name[0] == 's' || name[0] == 'd') {
-      // Volatile registers: v0-7, v16-v31
-      // Return false for non-volatile fp/SIMD regs, true for everything else
-      switch (name[1]) {
-      case '8':
-      case '9':
-        return false; // v8-v9 are non-volatile
-      case '1':
-        switch (name[2]) {
-        case '0':
-        case '1':
-        case '2':
-        case '3':
-        case '4':
-        case '5':
-          return false; // v10-v15 are non-volatile
-        default:
-          return true;
-        }
-      default:
-        return true;
-      }
-    }
-  }
-  return true;
-}
-
-static bool LoadValueFromConsecutiveGPRRegisters(
-    ExecutionContext &exe_ctx, RegisterContext *reg_ctx,
-    const CompilerType &value_type,
-    bool is_return_value, // false => parameter, true => return value
-    uint32_t &NGRN,       // NGRN (see ABI documentation)
-    uint32_t &NSRN,       // NSRN (see ABI documentation)
-    DataExtractor &data) {
-  llvm::Optional<uint64_t> byte_size = value_type.GetByteSize(nullptr);
-  if (!byte_size || *byte_size == 0)
-    return false;
-
-  std::unique_ptr<DataBufferHeap> heap_data_up(
-      new DataBufferHeap(*byte_size, 0));
-  const ByteOrder byte_order = exe_ctx.GetProcessRef().GetByteOrder();
-  Status error;
-
-  CompilerType base_type;
-  const uint32_t homogeneous_count =
-      value_type.IsHomogeneousAggregate(&base_type);
-  if (homogeneous_count > 0 && homogeneous_count <= 8) {
-    // Make sure we have enough registers
-    if (NSRN < 8 && (8 - NSRN) >= homogeneous_count) {
-      if (!base_type)
-        return false;
-      llvm::Optional<uint64_t> base_byte_size = base_type.GetByteSize(nullptr);
-      if (!base_byte_size)
-        return false;
-      uint32_t data_offset = 0;
-
-      for (uint32_t i = 0; i < homogeneous_count; ++i) {
-        char v_name[8];
-        ::snprintf(v_name, sizeof(v_name), "v%u", NSRN);
-        const RegisterInfo *reg_info =
-            reg_ctx->GetRegisterInfoByName(v_name, 0);
-        if (reg_info == nullptr)
-          return false;
-
-        if (*base_byte_size > reg_info->byte_size)
-          return false;
-
-        RegisterValue reg_value;
-
-        if (!reg_ctx->ReadRegister(reg_info, reg_value))
-          return false;
-
-        // Make sure we have enough room in "heap_data_up"
-        if ((data_offset + *base_byte_size) <= heap_data_up->GetByteSize()) {
-          const size_t bytes_copied = reg_value.GetAsMemoryData(
-              reg_info, heap_data_up->GetBytes() + data_offset, *base_byte_size,
-              byte_order, error);
-          if (bytes_copied != *base_byte_size)
-            return false;
-          data_offset += bytes_copied;
-          ++NSRN;
-        } else
-          return false;
-      }
-      data.SetByteOrder(byte_order);
-      data.SetAddressByteSize(exe_ctx.GetProcessRef().GetAddressByteSize());
-      data.SetData(DataBufferSP(heap_data_up.release()));
-      return true;
-    }
-  }
-
-  const size_t max_reg_byte_size = 16;
-  if (*byte_size <= max_reg_byte_size) {
-    size_t bytes_left = *byte_size;
-    uint32_t data_offset = 0;
-    while (data_offset < *byte_size) {
-      if (NGRN >= 8)
-        return false;
-
-      uint32_t reg_num = reg_ctx->ConvertRegisterKindToRegisterNumber(
-          eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1 + NGRN);
-      if (reg_num == LLDB_INVALID_REGNUM)
-        return false;
-
-      const RegisterInfo *reg_info = reg_ctx->GetRegisterInfoAtIndex(reg_num);
-      if (reg_info == nullptr)
-        return false;
-
-      RegisterValue reg_value;
-
-      if (!reg_ctx->ReadRegister(reg_info, reg_value))
-        return false;
-
-      const size_t curr_byte_size = std::min<size_t>(8, bytes_left);
-      const size_t bytes_copied = reg_value.GetAsMemoryData(
-          reg_info, heap_data_up->GetBytes() + data_offset, curr_byte_size,
-          byte_order, error);
-      if (bytes_copied == 0)
-        return false;
-      if (bytes_copied >= bytes_left)
-        break;
-      data_offset += bytes_copied;
-      bytes_left -= bytes_copied;
-      ++NGRN;
-    }
-  } else {
-    const RegisterInfo *reg_info = nullptr;
-    if (is_return_value) {
-      // We are assuming we are decoding this immediately after returning from
-      // a function call and that the address of the structure is in x8
-      reg_info = reg_ctx->GetRegisterInfoByName("x8", 0);
-    } else {
-      // We are assuming we are stopped at the first instruction in a function
-      // and that the ABI is being respected so all parameters appear where
-      // they should be (functions with no external linkage can legally violate
-      // the ABI).
-      if (NGRN >= 8)
-        return false;
-
-      uint32_t reg_num = reg_ctx->ConvertRegisterKindToRegisterNumber(
-          eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1 + NGRN);
-      if (reg_num == LLDB_INVALID_REGNUM)
-        return false;
-      reg_info = reg_ctx->GetRegisterInfoAtIndex(reg_num);
-      if (reg_info == nullptr)
-        return false;
-      ++NGRN;
-    }
-
-    if (reg_info == nullptr)
-      return false;
-
-    const lldb::addr_t value_addr =
-        reg_ctx->ReadRegisterAsUnsigned(reg_info, LLDB_INVALID_ADDRESS);
-
-    if (value_addr == LLDB_INVALID_ADDRESS)
-      return false;
-
-    if (exe_ctx.GetProcessRef().ReadMemory(
-            value_addr, heap_data_up->GetBytes(), heap_data_up->GetByteSize(),
-            error) != heap_data_up->GetByteSize()) {
-      return false;
-    }
-  }
-
-  data.SetByteOrder(byte_order);
-  data.SetAddressByteSize(exe_ctx.GetProcessRef().GetAddressByteSize());
-  data.SetData(DataBufferSP(heap_data_up.release()));
-  return true;
-}
-
-ValueObjectSP ABIMacOSX_arm64::GetReturnValueObjectImpl(
-    Thread &thread, CompilerType &return_compiler_type) const {
-  ValueObjectSP return_valobj_sp;
-  Value value;
-
-  ExecutionContext exe_ctx(thread.shared_from_this());
-  if (exe_ctx.GetTargetPtr() == nullptr || exe_ctx.GetProcessPtr() == nullptr)
-    return return_valobj_sp;
-
-  // value.SetContext (Value::eContextTypeClangType, return_compiler_type);
-  value.SetCompilerType(return_compiler_type);
-
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-  if (!reg_ctx)
-    return return_valobj_sp;
-
-  llvm::Optional<uint64_t> byte_size =
-      return_compiler_type.GetByteSize(nullptr);
-  if (!byte_size)
-    return return_valobj_sp;
-
-  const uint32_t type_flags = return_compiler_type.GetTypeInfo(nullptr);
-  if (type_flags & eTypeIsScalar || type_flags & eTypeIsPointer) {
-    value.SetValueType(Value::eValueTypeScalar);
-
-    bool success = false;
-    if (type_flags & eTypeIsInteger || type_flags & eTypeIsPointer) {
-      // Extract the register context so we can read arguments from registers
-      if (*byte_size <= 8) {
-        const RegisterInfo *x0_reg_info =
-            reg_ctx->GetRegisterInfoByName("x0", 0);
-        if (x0_reg_info) {
-          uint64_t raw_value =
-              thread.GetRegisterContext()->ReadRegisterAsUnsigned(x0_reg_info,
-                                                                  0);
-          const bool is_signed = (type_flags & eTypeIsSigned) != 0;
-          switch (*byte_size) {
-          default:
-            break;
-          case 16: // uint128_t
-            // In register x0 and x1
-            {
-              const RegisterInfo *x1_reg_info =
-                  reg_ctx->GetRegisterInfoByName("x1", 0);
-
-              if (x1_reg_info) {
-                if (*byte_size <=
-                    x0_reg_info->byte_size + x1_reg_info->byte_size) {
-                  std::unique_ptr<DataBufferHeap> heap_data_up(
-                      new DataBufferHeap(*byte_size, 0));
-                  const ByteOrder byte_order =
-                      exe_ctx.GetProcessRef().GetByteOrder();
-                  RegisterValue x0_reg_value;
-                  RegisterValue x1_reg_value;
-                  if (reg_ctx->ReadRegister(x0_reg_info, x0_reg_value) &&
-                      reg_ctx->ReadRegister(x1_reg_info, x1_reg_value)) {
-                    Status error;
-                    if (x0_reg_value.GetAsMemoryData(
-                            x0_reg_info, heap_data_up->GetBytes() + 0, 8,
-                            byte_order, error) &&
-                        x1_reg_value.GetAsMemoryData(
-                            x1_reg_info, heap_data_up->GetBytes() + 8, 8,
-                            byte_order, error)) {
-                      DataExtractor data(
-                          DataBufferSP(heap_data_up.release()), byte_order,
-                          exe_ctx.GetProcessRef().GetAddressByteSize());
-
-                      return_valobj_sp = ValueObjectConstResult::Create(
-                          &thread, return_compiler_type, ConstString(""), data);
-                      return return_valobj_sp;
-                    }
-                  }
-                }
-              }
-            }
-            break;
-          case sizeof(uint64_t):
-            if (is_signed)
-              value.GetScalar() = (int64_t)(raw_value);
-            else
-              value.GetScalar() = (uint64_t)(raw_value);
-            success = true;
-            break;
-
-          case sizeof(uint32_t):
-            if (is_signed)
-              value.GetScalar() = (int32_t)(raw_value & UINT32_MAX);
-            else
-              value.GetScalar() = (uint32_t)(raw_value & UINT32_MAX);
-            success = true;
-            break;
-
-          case sizeof(uint16_t):
-            if (is_signed)
-              value.GetScalar() = (int16_t)(raw_value & UINT16_MAX);
-            else
-              value.GetScalar() = (uint16_t)(raw_value & UINT16_MAX);
-            success = true;
-            break;
-
-          case sizeof(uint8_t):
-            if (is_signed)
-              value.GetScalar() = (int8_t)(raw_value & UINT8_MAX);
-            else
-              value.GetScalar() = (uint8_t)(raw_value & UINT8_MAX);
-            success = true;
-            break;
-          }
-        }
-      }
-    } else if (type_flags & eTypeIsFloat) {
-      if (type_flags & eTypeIsComplex) {
-        // Don't handle complex yet.
-      } else {
-        if (*byte_size <= sizeof(long double)) {
-          const RegisterInfo *v0_reg_info =
-              reg_ctx->GetRegisterInfoByName("v0", 0);
-          RegisterValue v0_value;
-          if (reg_ctx->ReadRegister(v0_reg_info, v0_value)) {
-            DataExtractor data;
-            if (v0_value.GetData(data)) {
-              lldb::offset_t offset = 0;
-              if (*byte_size == sizeof(float)) {
-                value.GetScalar() = data.GetFloat(&offset);
-                success = true;
-              } else if (*byte_size == sizeof(double)) {
-                value.GetScalar() = data.GetDouble(&offset);
-                success = true;
-              } else if (*byte_size == sizeof(long double)) {
-                value.GetScalar() = data.GetLongDouble(&offset);
-                success = true;
-              }
-            }
-          }
-        }
-      }
-    }
-
-    if (success)
-      return_valobj_sp = ValueObjectConstResult::Create(
-          thread.GetStackFrameAtIndex(0).get(), value, ConstString(""));
-  } else if (type_flags & eTypeIsVector) {
-    if (*byte_size > 0) {
-
-      const RegisterInfo *v0_info = reg_ctx->GetRegisterInfoByName("v0", 0);
-
-      if (v0_info) {
-        if (*byte_size <= v0_info->byte_size) {
-          std::unique_ptr<DataBufferHeap> heap_data_up(
-              new DataBufferHeap(*byte_size, 0));
-          const ByteOrder byte_order = exe_ctx.GetProcessRef().GetByteOrder();
-          RegisterValue reg_value;
-          if (reg_ctx->ReadRegister(v0_info, reg_value)) {
-            Status error;
-            if (reg_value.GetAsMemoryData(v0_info, heap_data_up->GetBytes(),
-                                          heap_data_up->GetByteSize(),
-                                          byte_order, error)) {
-              DataExtractor data(DataBufferSP(heap_data_up.release()),
-                                 byte_order,
-                                 exe_ctx.GetProcessRef().GetAddressByteSize());
-              return_valobj_sp = ValueObjectConstResult::Create(
-                  &thread, return_compiler_type, ConstString(""), data);
-            }
-          }
-        }
-      }
-    }
-  } else if (type_flags & eTypeIsStructUnion || type_flags & eTypeIsClass) {
-    DataExtractor data;
-
-    uint32_t NGRN = 0; // Search ABI docs for NGRN
-    uint32_t NSRN = 0; // Search ABI docs for NSRN
-    const bool is_return_value = true;
-    if (LoadValueFromConsecutiveGPRRegisters(
-            exe_ctx, reg_ctx, return_compiler_type, is_return_value, NGRN, NSRN,
-            data)) {
-      return_valobj_sp = ValueObjectConstResult::Create(
-          &thread, return_compiler_type, ConstString(""), data);
-    }
-  }
-  return return_valobj_sp;
-}
-
-void ABIMacOSX_arm64::Initialize() {
-  PluginManager::RegisterPlugin(GetPluginNameStatic(), pluginDesc,
-                                CreateInstance);
-}
-
-void ABIMacOSX_arm64::Terminate() {
-  PluginManager::UnregisterPlugin(CreateInstance);
-}
-
-// PluginInterface protocol
-
-ConstString ABIMacOSX_arm64::GetPluginNameStatic() {
-  static ConstString g_plugin_name("ABIMacOSX_arm64");
-  return g_plugin_name;
-}
-
-uint32_t ABIMacOSX_arm64::GetPluginVersion() { return 1; }
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.h b/gnu/llvm/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.h
deleted file mode 100644 (file)
index c7a91ba..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-//===-- ABIMacOSX_arm64.h ---------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_ABIMacOSX_arm64_h_
-#define liblldb_ABIMacOSX_arm64_h_
-
-#include "lldb/Target/ABI.h"
-#include "lldb/Utility/ConstString.h"
-#include "lldb/lldb-private.h"
-
-class ABIMacOSX_arm64 : public lldb_private::ABI {
-public:
-  ~ABIMacOSX_arm64() override = default;
-
-  size_t GetRedZoneSize() const override;
-
-  bool PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp,
-                          lldb::addr_t functionAddress,
-                          lldb::addr_t returnAddress,
-                          llvm::ArrayRef<lldb::addr_t> args) const override;
-
-  bool GetArgumentValues(lldb_private::Thread &thread,
-                         lldb_private::ValueList &values) const override;
-
-  bool
-  CreateFunctionEntryUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
-  bool CreateDefaultUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
-  bool RegisterIsVolatile(const lldb_private::RegisterInfo *reg_info) override;
-
-  // The arm64 ABI requires that stack frames be 16 byte aligned.
-  // When there is a trap handler on the stack, e.g. _sigtramp in userland
-  // code, we've seen that the stack pointer is often not aligned properly
-  // before the handler is invoked.  This means that lldb will stop the unwind
-  // early -- before the function which caused the trap.
-  //
-  // To work around this, we relax that alignment to be just word-size
-  // (8-bytes).
-  // Whitelisting the trap handlers for user space would be easy (_sigtramp) but
-  // in other environments there can be a large number of different functions
-  // involved in async traps.
-  bool CallFrameAddressIsValid(lldb::addr_t cfa) override {
-    // Make sure the stack call frame addresses are are 8 byte aligned
-    if (cfa & (8ull - 1ull))
-      return false; // Not 8 byte aligned
-    if (cfa == 0)
-      return false; // Zero is not a valid stack address
-    return true;
-  }
-
-  bool CodeAddressIsValid(lldb::addr_t pc) override {
-    if (pc & (4ull - 1ull))
-      return false; // Not 4 byte aligned
-
-    // Anything else if fair game..
-    return true;
-  }
-
-  const lldb_private::RegisterInfo *
-  GetRegisterInfoArray(uint32_t &count) override;
-
-  // Static Functions
-
-  static void Initialize();
-
-  static void Terminate();
-
-  static lldb::ABISP CreateInstance(lldb::ProcessSP process_sp, const lldb_private::ArchSpec &arch);
-
-  // PluginInterface protocol
-
-  static lldb_private::ConstString GetPluginNameStatic();
-
-  lldb_private::ConstString GetPluginName() override {
-    return GetPluginNameStatic();
-  }
-
-  uint32_t GetPluginVersion() override;
-
-  lldb_private::Status
-  SetReturnValueObject(lldb::StackFrameSP &frame_sp,
-                       lldb::ValueObjectSP &new_value) override;
-
-protected:
-  lldb::ValueObjectSP
-  GetReturnValueObjectImpl(lldb_private::Thread &thread,
-                           lldb_private::CompilerType &ast_type) const override;
-
-private:
-  ABIMacOSX_arm64(lldb::ProcessSP process_sp,
-                  std::unique_ptr<llvm::MCRegisterInfo> info_up)
-      : lldb_private::ABI(std::move(process_sp), std::move(info_up)) {
-    // Call CreateInstance instead.
-  }
-};
-
-#endif // liblldb_ABIMacOSX_arm64_h_
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/MacOSX-arm64/CMakeLists.txt b/gnu/llvm/lldb/source/Plugins/ABI/MacOSX-arm64/CMakeLists.txt
deleted file mode 100644 (file)
index f769d63..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-add_lldb_library(lldbPluginABIMacOSX_arm64 PLUGIN
-  ABIMacOSX_arm64.cpp
-  
-  LINK_LIBS
-    lldbCore
-    lldbSymbol
-    lldbTarget
-  LINK_COMPONENTS
-    Support
-  )
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp b/gnu/llvm/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp
deleted file mode 100644 (file)
index 76ebd64..0000000
+++ /dev/null
@@ -1,1132 +0,0 @@
-//===-- ABIMacOSX_i386.cpp --------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "ABIMacOSX_i386.h"
-
-#include <vector>
-
-#include "llvm/ADT/STLExtras.h"
-#include "llvm/ADT/Triple.h"
-
-#include "lldb/Core/Module.h"
-#include "lldb/Core/PluginManager.h"
-#include "lldb/Core/ValueObjectConstResult.h"
-#include "lldb/Symbol/UnwindPlan.h"
-#include "lldb/Target/Process.h"
-#include "lldb/Target/RegisterContext.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Target/Thread.h"
-#include "lldb/Utility/ConstString.h"
-#include "lldb/Utility/RegisterValue.h"
-#include "lldb/Utility/Scalar.h"
-#include "lldb/Utility/Status.h"
-
-using namespace lldb;
-using namespace lldb_private;
-
-enum {
-  ehframe_eax = 0,
-  ehframe_ecx,
-  ehframe_edx,
-  ehframe_ebx,
-  ehframe_ebp, // Different from DWARF the regnums - eh_frame esp/ebp had their
-               // regnums switched on i386 darwin
-  ehframe_esp, // Different from DWARF the regnums - eh_frame esp/ebp had their
-               // regnums switched on i386 darwin
-  ehframe_esi,
-  ehframe_edi,
-  ehframe_eip,
-  ehframe_eflags
-};
-
-enum {
-  dwarf_eax = 0,
-  dwarf_ecx,
-  dwarf_edx,
-  dwarf_ebx,
-  dwarf_esp,
-  dwarf_ebp,
-  dwarf_esi,
-  dwarf_edi,
-  dwarf_eip,
-  dwarf_eflags,
-  dwarf_stmm0 = 11,
-  dwarf_stmm1,
-  dwarf_stmm2,
-  dwarf_stmm3,
-  dwarf_stmm4,
-  dwarf_stmm5,
-  dwarf_stmm6,
-  dwarf_stmm7,
-  dwarf_xmm0 = 21,
-  dwarf_xmm1,
-  dwarf_xmm2,
-  dwarf_xmm3,
-  dwarf_xmm4,
-  dwarf_xmm5,
-  dwarf_xmm6,
-  dwarf_xmm7,
-  dwarf_ymm0 = dwarf_xmm0,
-  dwarf_ymm1 = dwarf_xmm1,
-  dwarf_ymm2 = dwarf_xmm2,
-  dwarf_ymm3 = dwarf_xmm3,
-  dwarf_ymm4 = dwarf_xmm4,
-  dwarf_ymm5 = dwarf_xmm5,
-  dwarf_ymm6 = dwarf_xmm6,
-  dwarf_ymm7 = dwarf_xmm7
-};
-
-static RegisterInfo g_register_infos[] = {
-    //  NAME      ALT      SZ OFF ENCODING         FORMAT
-    //  EH_FRAME              DWARF                 GENERIC
-    //  PROCESS PLUGIN        LLDB NATIVE
-    //  ======    =======  == === =============    ============
-    //  ===================== ===================== ============================
-    //  ====================  ======================
-    {"eax",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_eax, dwarf_eax, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ebx",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_ebx, dwarf_ebx, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ecx",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_ecx, dwarf_ecx, LLDB_REGNUM_GENERIC_ARG4, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"edx",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_edx, dwarf_edx, LLDB_REGNUM_GENERIC_ARG3, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"esi",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_esi, dwarf_esi, LLDB_REGNUM_GENERIC_ARG2, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"edi",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_edi, dwarf_edi, LLDB_REGNUM_GENERIC_ARG1, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ebp",
-     "fp",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_ebp, dwarf_ebp, LLDB_REGNUM_GENERIC_FP, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"esp",
-     "sp",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_esp, dwarf_esp, LLDB_REGNUM_GENERIC_SP, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"eip",
-     "pc",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_eip, dwarf_eip, LLDB_REGNUM_GENERIC_PC, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"eflags",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_REGNUM_GENERIC_FLAGS,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"cs",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ss",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ds",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"es",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"fs",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"gs",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"stmm0",
-     nullptr,
-     10,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, dwarf_stmm0, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"stmm1",
-     nullptr,
-     10,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, dwarf_stmm1, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"stmm2",
-     nullptr,
-     10,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, dwarf_stmm2, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"stmm3",
-     nullptr,
-     10,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, dwarf_stmm3, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"stmm4",
-     nullptr,
-     10,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, dwarf_stmm4, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"stmm5",
-     nullptr,
-     10,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, dwarf_stmm5, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"stmm6",
-     nullptr,
-     10,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, dwarf_stmm6, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"stmm7",
-     nullptr,
-     10,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, dwarf_stmm7, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"fctrl",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"fstat",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ftag",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"fiseg",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"fioff",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"foseg",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"fooff",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"fop",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"xmm0",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, dwarf_xmm0, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"xmm1",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, dwarf_xmm1, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"xmm2",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, dwarf_xmm2, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"xmm3",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, dwarf_xmm3, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"xmm4",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, dwarf_xmm4, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"xmm5",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, dwarf_xmm5, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"xmm6",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, dwarf_xmm6, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"xmm7",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, dwarf_xmm7, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"mxcsr",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ymm0",
-     nullptr,
-     32,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, dwarf_ymm0, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ymm1",
-     nullptr,
-     32,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, dwarf_ymm1, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ymm2",
-     nullptr,
-     32,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, dwarf_ymm2, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ymm3",
-     nullptr,
-     32,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, dwarf_ymm3, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ymm4",
-     nullptr,
-     32,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, dwarf_ymm4, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ymm5",
-     nullptr,
-     32,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, dwarf_ymm5, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ymm6",
-     nullptr,
-     32,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, dwarf_ymm6, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ymm7",
-     nullptr,
-     32,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, dwarf_ymm7, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0}};
-
-static const uint32_t k_num_register_infos =
-    llvm::array_lengthof(g_register_infos);
-static bool g_register_info_names_constified = false;
-
-const lldb_private::RegisterInfo *
-ABIMacOSX_i386::GetRegisterInfoArray(uint32_t &count) {
-  // Make the C-string names and alt_names for the register infos into const
-  // C-string values by having the ConstString unique the names in the global
-  // constant C-string pool.
-  if (!g_register_info_names_constified) {
-    g_register_info_names_constified = true;
-    for (uint32_t i = 0; i < k_num_register_infos; ++i) {
-      if (g_register_infos[i].name)
-        g_register_infos[i].name =
-            ConstString(g_register_infos[i].name).GetCString();
-      if (g_register_infos[i].alt_name)
-        g_register_infos[i].alt_name =
-            ConstString(g_register_infos[i].alt_name).GetCString();
-    }
-  }
-  count = k_num_register_infos;
-  return g_register_infos;
-}
-
-size_t ABIMacOSX_i386::GetRedZoneSize() const { return 0; }
-
-// Static Functions
-
-ABISP
-ABIMacOSX_i386::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
-  if ((arch.GetTriple().getArch() == llvm::Triple::x86) &&
-      (arch.GetTriple().isMacOSX() || arch.GetTriple().isiOS() ||
-       arch.GetTriple().isWatchOS())) {
-    return ABISP(
-        new ABIMacOSX_i386(std::move(process_sp), MakeMCRegisterInfo(arch)));
-  }
-  return ABISP();
-}
-
-bool ABIMacOSX_i386::PrepareTrivialCall(Thread &thread, addr_t sp,
-                                        addr_t func_addr, addr_t return_addr,
-                                        llvm::ArrayRef<addr_t> args) const {
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-  if (!reg_ctx)
-    return false;
-  uint32_t pc_reg_num = reg_ctx->ConvertRegisterKindToRegisterNumber(
-      eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC);
-  uint32_t sp_reg_num = reg_ctx->ConvertRegisterKindToRegisterNumber(
-      eRegisterKindGeneric, LLDB_REGNUM_GENERIC_SP);
-
-  // When writing a register value down to memory, the register info used to
-  // write memory just needs to have the correct size of a 32 bit register, the
-  // actual register it pertains to is not important, just the size needs to be
-  // correct. Here we use "eax"...
-  const RegisterInfo *reg_info_32 = reg_ctx->GetRegisterInfoByName("eax");
-  if (!reg_info_32)
-    return false; // TODO this should actually never happen
-
-  // Make room for the argument(s) on the stack
-
-  Status error;
-  RegisterValue reg_value;
-
-  // Write any arguments onto the stack
-  sp -= 4 * args.size();
-
-  // Align the SP
-  sp &= ~(16ull - 1ull); // 16-byte alignment
-
-  addr_t arg_pos = sp;
-
-  for (addr_t arg : args) {
-    reg_value.SetUInt32(arg);
-    error = reg_ctx->WriteRegisterValueToMemory(
-        reg_info_32, arg_pos, reg_info_32->byte_size, reg_value);
-    if (error.Fail())
-      return false;
-    arg_pos += 4;
-  }
-
-  // The return address is pushed onto the stack (yes after we just set the
-  // alignment above!).
-  sp -= 4;
-  reg_value.SetUInt32(return_addr);
-  error = reg_ctx->WriteRegisterValueToMemory(
-      reg_info_32, sp, reg_info_32->byte_size, reg_value);
-  if (error.Fail())
-    return false;
-
-  // %esp is set to the actual stack value.
-
-  if (!reg_ctx->WriteRegisterFromUnsigned(sp_reg_num, sp))
-    return false;
-
-  // %eip is set to the address of the called function.
-
-  if (!reg_ctx->WriteRegisterFromUnsigned(pc_reg_num, func_addr))
-    return false;
-
-  return true;
-}
-
-static bool ReadIntegerArgument(Scalar &scalar, unsigned int bit_width,
-                                bool is_signed, Process *process,
-                                addr_t &current_stack_argument) {
-
-  uint32_t byte_size = (bit_width + (8 - 1)) / 8;
-  Status error;
-  if (process->ReadScalarIntegerFromMemory(current_stack_argument, byte_size,
-                                           is_signed, scalar, error)) {
-    current_stack_argument += byte_size;
-    return true;
-  }
-  return false;
-}
-
-bool ABIMacOSX_i386::GetArgumentValues(Thread &thread,
-                                       ValueList &values) const {
-  unsigned int num_values = values.GetSize();
-  unsigned int value_index;
-
-  // Get the pointer to the first stack argument so we have a place to start
-  // when reading data
-
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-
-  if (!reg_ctx)
-    return false;
-
-  addr_t sp = reg_ctx->GetSP(0);
-
-  if (!sp)
-    return false;
-
-  addr_t current_stack_argument = sp + 4; // jump over return address
-
-  for (value_index = 0; value_index < num_values; ++value_index) {
-    Value *value = values.GetValueAtIndex(value_index);
-
-    if (!value)
-      return false;
-
-    // We currently only support extracting values with Clang QualTypes. Do we
-    // care about others?
-    CompilerType compiler_type(value->GetCompilerType());
-    llvm::Optional<uint64_t> bit_size = compiler_type.GetBitSize(&thread);
-    if (bit_size) {
-      bool is_signed;
-      if (compiler_type.IsIntegerOrEnumerationType(is_signed))
-        ReadIntegerArgument(value->GetScalar(), *bit_size, is_signed,
-                            thread.GetProcess().get(), current_stack_argument);
-      else if (compiler_type.IsPointerType())
-        ReadIntegerArgument(value->GetScalar(), *bit_size, false,
-                            thread.GetProcess().get(), current_stack_argument);
-    }
-  }
-
-  return true;
-}
-
-Status ABIMacOSX_i386::SetReturnValueObject(lldb::StackFrameSP &frame_sp,
-                                            lldb::ValueObjectSP &new_value_sp) {
-  Status error;
-  if (!new_value_sp) {
-    error.SetErrorString("Empty value object for return value.");
-    return error;
-  }
-
-  CompilerType compiler_type = new_value_sp->GetCompilerType();
-  if (!compiler_type) {
-    error.SetErrorString("Null clang type for return value.");
-    return error;
-  }
-
-  Thread *thread = frame_sp->GetThread().get();
-
-  bool is_signed;
-  uint32_t count;
-  bool is_complex;
-
-  RegisterContext *reg_ctx = thread->GetRegisterContext().get();
-
-  bool set_it_simple = false;
-  if (compiler_type.IsIntegerOrEnumerationType(is_signed) ||
-      compiler_type.IsPointerType()) {
-    DataExtractor data;
-    Status data_error;
-    size_t num_bytes = new_value_sp->GetData(data, data_error);
-    if (data_error.Fail()) {
-      error.SetErrorStringWithFormat(
-          "Couldn't convert return value to raw data: %s",
-          data_error.AsCString());
-      return error;
-    }
-    lldb::offset_t offset = 0;
-    if (num_bytes <= 8) {
-      const RegisterInfo *eax_info = reg_ctx->GetRegisterInfoByName("eax", 0);
-      if (num_bytes <= 4) {
-        uint32_t raw_value = data.GetMaxU32(&offset, num_bytes);
-
-        if (reg_ctx->WriteRegisterFromUnsigned(eax_info, raw_value))
-          set_it_simple = true;
-      } else {
-        uint32_t raw_value = data.GetMaxU32(&offset, 4);
-
-        if (reg_ctx->WriteRegisterFromUnsigned(eax_info, raw_value)) {
-          const RegisterInfo *edx_info =
-              reg_ctx->GetRegisterInfoByName("edx", 0);
-          uint32_t raw_value = data.GetMaxU32(&offset, num_bytes - offset);
-
-          if (reg_ctx->WriteRegisterFromUnsigned(edx_info, raw_value))
-            set_it_simple = true;
-        }
-      }
-    } else {
-      error.SetErrorString("We don't support returning longer than 64 bit "
-                           "integer values at present.");
-    }
-  } else if (compiler_type.IsFloatingPointType(count, is_complex)) {
-    if (is_complex)
-      error.SetErrorString(
-          "We don't support returning complex values at present");
-    else
-      error.SetErrorString(
-          "We don't support returning float values at present");
-  }
-
-  if (!set_it_simple)
-    error.SetErrorString(
-        "We only support setting simple integer return types at present.");
-
-  return error;
-}
-
-ValueObjectSP
-ABIMacOSX_i386::GetReturnValueObjectImpl(Thread &thread,
-                                         CompilerType &compiler_type) const {
-  Value value;
-  ValueObjectSP return_valobj_sp;
-
-  if (!compiler_type)
-    return return_valobj_sp;
-
-  // value.SetContext (Value::eContextTypeClangType,
-  // compiler_type.GetOpaqueQualType());
-  value.SetCompilerType(compiler_type);
-
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-  if (!reg_ctx)
-    return return_valobj_sp;
-
-  bool is_signed;
-
-  if (compiler_type.IsIntegerOrEnumerationType(is_signed)) {
-    llvm::Optional<uint64_t> bit_width = compiler_type.GetBitSize(&thread);
-    if (!bit_width)
-      return return_valobj_sp;
-    unsigned eax_id =
-        reg_ctx->GetRegisterInfoByName("eax", 0)->kinds[eRegisterKindLLDB];
-    unsigned edx_id =
-        reg_ctx->GetRegisterInfoByName("edx", 0)->kinds[eRegisterKindLLDB];
-
-    switch (*bit_width) {
-    default:
-    case 128:
-      // Scalar can't hold 128-bit literals, so we don't handle this
-      return return_valobj_sp;
-    case 64:
-      uint64_t raw_value;
-      raw_value =
-          thread.GetRegisterContext()->ReadRegisterAsUnsigned(eax_id, 0) &
-          0xffffffff;
-      raw_value |=
-          (thread.GetRegisterContext()->ReadRegisterAsUnsigned(edx_id, 0) &
-           0xffffffff)
-          << 32;
-      if (is_signed)
-        value.GetScalar() = (int64_t)raw_value;
-      else
-        value.GetScalar() = (uint64_t)raw_value;
-      break;
-    case 32:
-      if (is_signed)
-        value.GetScalar() = (int32_t)(
-            thread.GetRegisterContext()->ReadRegisterAsUnsigned(eax_id, 0) &
-            0xffffffff);
-      else
-        value.GetScalar() = (uint32_t)(
-            thread.GetRegisterContext()->ReadRegisterAsUnsigned(eax_id, 0) &
-            0xffffffff);
-      break;
-    case 16:
-      if (is_signed)
-        value.GetScalar() = (int16_t)(
-            thread.GetRegisterContext()->ReadRegisterAsUnsigned(eax_id, 0) &
-            0xffff);
-      else
-        value.GetScalar() = (uint16_t)(
-            thread.GetRegisterContext()->ReadRegisterAsUnsigned(eax_id, 0) &
-            0xffff);
-      break;
-    case 8:
-      if (is_signed)
-        value.GetScalar() = (int8_t)(
-            thread.GetRegisterContext()->ReadRegisterAsUnsigned(eax_id, 0) &
-            0xff);
-      else
-        value.GetScalar() = (uint8_t)(
-            thread.GetRegisterContext()->ReadRegisterAsUnsigned(eax_id, 0) &
-            0xff);
-      break;
-    }
-  } else if (compiler_type.IsPointerType()) {
-    unsigned eax_id =
-        reg_ctx->GetRegisterInfoByName("eax", 0)->kinds[eRegisterKindLLDB];
-    uint32_t ptr =
-        thread.GetRegisterContext()->ReadRegisterAsUnsigned(eax_id, 0) &
-        0xffffffff;
-    value.GetScalar() = ptr;
-  } else {
-    // not handled yet
-    return return_valobj_sp;
-  }
-
-  // If we get here, we have a valid Value, so make our ValueObject out of it:
-
-  return_valobj_sp = ValueObjectConstResult::Create(
-      thread.GetStackFrameAtIndex(0).get(), value, ConstString(""));
-  return return_valobj_sp;
-}
-
-// This defines the CFA as esp+4
-// the saved pc is at CFA-4 (i.e. esp+0)
-// The saved esp is CFA+0
-
-bool ABIMacOSX_i386::CreateFunctionEntryUnwindPlan(UnwindPlan &unwind_plan) {
-  unwind_plan.Clear();
-  unwind_plan.SetRegisterKind(eRegisterKindDWARF);
-
-  uint32_t sp_reg_num = dwarf_esp;
-  uint32_t pc_reg_num = dwarf_eip;
-
-  UnwindPlan::RowSP row(new UnwindPlan::Row);
-  row->GetCFAValue().SetIsRegisterPlusOffset(sp_reg_num, 4);
-  row->SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, -4, false);
-  row->SetRegisterLocationToIsCFAPlusOffset(sp_reg_num, 0, true);
-  unwind_plan.AppendRow(row);
-  unwind_plan.SetSourceName("i386 at-func-entry default");
-  unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
-  return true;
-}
-
-// This defines the CFA as ebp+8
-// The saved pc is at CFA-4 (i.e. ebp+4)
-// The saved ebp is at CFA-8 (i.e. ebp+0)
-// The saved esp is CFA+0
-
-bool ABIMacOSX_i386::CreateDefaultUnwindPlan(UnwindPlan &unwind_plan) {
-  unwind_plan.Clear();
-  unwind_plan.SetRegisterKind(eRegisterKindDWARF);
-
-  uint32_t fp_reg_num = dwarf_ebp;
-  uint32_t sp_reg_num = dwarf_esp;
-  uint32_t pc_reg_num = dwarf_eip;
-
-  UnwindPlan::RowSP row(new UnwindPlan::Row);
-  const int32_t ptr_size = 4;
-
-  row->GetCFAValue().SetIsRegisterPlusOffset(fp_reg_num, 2 * ptr_size);
-  row->SetOffset(0);
-
-  row->SetRegisterLocationToAtCFAPlusOffset(fp_reg_num, ptr_size * -2, true);
-  row->SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, ptr_size * -1, true);
-  row->SetRegisterLocationToIsCFAPlusOffset(sp_reg_num, 0, true);
-
-  unwind_plan.AppendRow(row);
-  unwind_plan.SetSourceName("i386 default unwind plan");
-  unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
-  unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
-  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
-  return true;
-}
-
-bool ABIMacOSX_i386::RegisterIsVolatile(const RegisterInfo *reg_info) {
-  return !RegisterIsCalleeSaved(reg_info);
-}
-
-// v.
-// http://developer.apple.com/library/mac/#documentation/developertools/Conceptual/LowLevelABI/130
-// -IA-
-// 32_Function_Calling_Conventions/IA32.html#//apple_ref/doc/uid/TP40002492-SW4
-//
-// This document ("OS X ABI Function Call Guide", chapter "IA-32 Function
-// Calling Conventions") says that the following registers on i386 are
-// preserved aka non-volatile aka callee-saved:
-//
-// ebx, ebp, esi, edi, esp
-
-bool ABIMacOSX_i386::RegisterIsCalleeSaved(const RegisterInfo *reg_info) {
-  if (reg_info) {
-    // Saved registers are ebx, ebp, esi, edi, esp, eip
-    const char *name = reg_info->name;
-    if (name[0] == 'e') {
-      switch (name[1]) {
-      case 'b':
-        if (name[2] == 'x' || name[2] == 'p')
-          return name[3] == '\0';
-        break;
-      case 'd':
-        if (name[2] == 'i')
-          return name[3] == '\0';
-        break;
-      case 'i':
-        if (name[2] == 'p')
-          return name[3] == '\0';
-        break;
-      case 's':
-        if (name[2] == 'i' || name[2] == 'p')
-          return name[3] == '\0';
-        break;
-      }
-    }
-    if (name[0] == 's' && name[1] == 'p' && name[2] == '\0') // sp
-      return true;
-    if (name[0] == 'f' && name[1] == 'p' && name[2] == '\0') // fp
-      return true;
-    if (name[0] == 'p' && name[1] == 'c' && name[2] == '\0') // pc
-      return true;
-  }
-  return false;
-}
-
-void ABIMacOSX_i386::Initialize() {
-  PluginManager::RegisterPlugin(
-      GetPluginNameStatic(), "Mac OS X ABI for i386 targets", CreateInstance);
-}
-
-void ABIMacOSX_i386::Terminate() {
-  PluginManager::UnregisterPlugin(CreateInstance);
-}
-
-lldb_private::ConstString ABIMacOSX_i386::GetPluginNameStatic() {
-  static ConstString g_short_name("abi.macosx-i386");
-  return g_short_name;
-}
-
-// PluginInterface protocol
-
-lldb_private::ConstString ABIMacOSX_i386::GetPluginName() {
-  return GetPluginNameStatic();
-}
-
-uint32_t ABIMacOSX_i386::GetPluginVersion() { return 1; }
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h b/gnu/llvm/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h
deleted file mode 100644 (file)
index 50062b8..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-//===-- ABIMacOSX_i386.h ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_ABIMacOSX_i386_h_
-#define liblldb_ABIMacOSX_i386_h_
-
-#include "lldb/Core/Value.h"
-#include "lldb/Target/ABI.h"
-#include "lldb/lldb-private.h"
-
-class ABIMacOSX_i386 : public lldb_private::ABI {
-public:
-  ~ABIMacOSX_i386() override = default;
-
-  size_t GetRedZoneSize() const override;
-
-  bool PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp,
-                          lldb::addr_t func_addr, lldb::addr_t return_addr,
-                          llvm::ArrayRef<lldb::addr_t> args) const override;
-
-  bool GetArgumentValues(lldb_private::Thread &thread,
-                         lldb_private::ValueList &values) const override;
-
-  lldb_private::Status
-  SetReturnValueObject(lldb::StackFrameSP &frame_sp,
-                       lldb::ValueObjectSP &new_value) override;
-
-  bool
-  CreateFunctionEntryUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
-  bool CreateDefaultUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
-  bool RegisterIsVolatile(const lldb_private::RegisterInfo *reg_info) override;
-
-  // The Darwin i386 ABI requires that stack frames be 16 byte aligned.
-  // When there is a trap handler on the stack, e.g. _sigtramp in userland
-  // code, we've seen that the stack pointer is often not aligned properly
-  // before the handler is invoked.  This means that lldb will stop the unwind
-  // early -- before the function which caused the trap.
-  //
-  // To work around this, we relax that alignment to be just word-size
-  // (4-bytes).
-  // Whitelisting the trap handlers for user space would be easy (_sigtramp) but
-  // in other environments there can be a large number of different functions
-  // involved in async traps.
-  //
-  // If we were to enforce 16-byte alignment, we also need to relax to 4-byte
-  // alignment for non-darwin i386 targets.
-  bool CallFrameAddressIsValid(lldb::addr_t cfa) override {
-    // Make sure the stack call frame addresses are are 4 byte aligned
-    if (cfa & (4ull - 1ull))
-      return false; // Not 4 byte aligned
-    if (cfa == 0)
-      return false; // Zero is not a valid stack address
-    return true;
-  }
-
-  bool CodeAddressIsValid(lldb::addr_t pc) override {
-    // Just make sure the address is a valid 32 bit address.
-    return pc <= UINT32_MAX;
-  }
-
-  const lldb_private::RegisterInfo *
-  GetRegisterInfoArray(uint32_t &count) override;
-
-  // Static Functions
-
-  static void Initialize();
-
-  static void Terminate();
-
-  static lldb::ABISP CreateInstance(lldb::ProcessSP process_sp, const lldb_private::ArchSpec &arch);
-
-  // PluginInterface protocol
-
-  static lldb_private::ConstString GetPluginNameStatic();
-
-  lldb_private::ConstString GetPluginName() override;
-
-  uint32_t GetPluginVersion() override;
-
-protected:
-  lldb::ValueObjectSP
-  GetReturnValueObjectImpl(lldb_private::Thread &thread,
-                           lldb_private::CompilerType &ast_type) const override;
-
-  bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info);
-
-private:
-  ABIMacOSX_i386(lldb::ProcessSP process_sp,
-                 std::unique_ptr<llvm::MCRegisterInfo> info_up)
-      : lldb_private::ABI(std::move(process_sp), std::move(info_up)) {
-    // Call CreateInstance instead.
-  }
-};
-
-#endif // liblldb_ABIMacOSX_i386_h_
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/MacOSX-i386/CMakeLists.txt b/gnu/llvm/lldb/source/Plugins/ABI/MacOSX-i386/CMakeLists.txt
deleted file mode 100644 (file)
index 21f153d..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-add_lldb_library(lldbPluginABIMacOSX_i386 PLUGIN
-  ABIMacOSX_i386.cpp
-
-  LINK_LIBS
-    lldbCore
-    lldbSymbol
-    lldbTarget
-  LINK_COMPONENTS
-    Support
-  )
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-arc/ABISysV_arc.cpp b/gnu/llvm/lldb/source/Plugins/ABI/SysV-arc/ABISysV_arc.cpp
deleted file mode 100644 (file)
index 715b5e5..0000000
+++ /dev/null
@@ -1,614 +0,0 @@
-//===-- ABISysV_arc.cpp ---------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "ABISysV_arc.h"
-
-// C Includes
-// C++ Includes
-#include <array>
-#include <limits>
-#include <type_traits>
-
-// Other libraries and framework includes
-#include "llvm/ADT/Triple.h"
-#include "llvm/IR/DerivedTypes.h"
-#include "llvm/Support/MathExtras.h"
-
-#include "lldb/Core/Module.h"
-#include "lldb/Core/PluginManager.h"
-#include "lldb/Core/Value.h"
-#include "lldb/Core/ValueObjectConstResult.h"
-#include "lldb/Core/ValueObjectMemory.h"
-#include "lldb/Core/ValueObjectRegister.h"
-#include "lldb/Symbol/UnwindPlan.h"
-#include "lldb/Target/Process.h"
-#include "lldb/Target/RegisterContext.h"
-#include "lldb/Target/StackFrame.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Target/Thread.h"
-#include "lldb/Utility/ConstString.h"
-#include "lldb/Utility/RegisterValue.h"
-#include "lldb/Utility/Status.h"
-
-#define DEFINE_REG_NAME(reg_num)      ConstString(#reg_num).GetCString()
-#define DEFINE_REG_NAME_STR(reg_name) ConstString(reg_name).GetCString()
-
-// The ABI is not a source of such information as size, offset, encoding, etc.
-// of a register. Just provides correct dwarf and eh_frame numbers.
-
-#define DEFINE_GENERIC_REGISTER_STUB(dwarf_num, str_name, generic_num)        \
-  {                                                                           \
-    DEFINE_REG_NAME(dwarf_num), DEFINE_REG_NAME_STR(str_name),                \
-    0, 0, eEncodingInvalid, eFormatDefault,                                   \
-    { dwarf_num, dwarf_num, generic_num, LLDB_INVALID_REGNUM, dwarf_num },    \
-    nullptr, nullptr, nullptr, 0                                              \
-  }
-
-#define DEFINE_REGISTER_STUB(dwarf_num, str_name) \
-  DEFINE_GENERIC_REGISTER_STUB(dwarf_num, str_name, LLDB_INVALID_REGNUM)
-
-using namespace lldb;
-using namespace lldb_private;
-
-namespace {
-namespace dwarf {
-enum regnums {
-  r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16,
-  r17, r18, r19, r20, r21, r22, r23, r24, r25, r26,
-  r27, fp = r27, r28, sp = r28, r29, r30, r31, blink = r31,
-  r32, r33, r34, r35, r36, r37, r38, r39, r40, r41, r42, r43, r44, r45, r46,
-  r47, r48, r49, r50, r51, r52, r53, r54, r55, r56, r57, r58, r59, r60,
-  /*reserved,*/ /*limm indicator,*/ r63 = 63, pc = 70, status32 = 74
-};
-
-static const std::array<RegisterInfo, 64> g_register_infos = { {
-    DEFINE_GENERIC_REGISTER_STUB(r0, nullptr, LLDB_REGNUM_GENERIC_ARG1),
-    DEFINE_GENERIC_REGISTER_STUB(r1, nullptr, LLDB_REGNUM_GENERIC_ARG2),
-    DEFINE_GENERIC_REGISTER_STUB(r2, nullptr, LLDB_REGNUM_GENERIC_ARG3),
-    DEFINE_GENERIC_REGISTER_STUB(r3, nullptr, LLDB_REGNUM_GENERIC_ARG4),
-    DEFINE_GENERIC_REGISTER_STUB(r4, nullptr, LLDB_REGNUM_GENERIC_ARG5),
-    DEFINE_GENERIC_REGISTER_STUB(r5, nullptr, LLDB_REGNUM_GENERIC_ARG6),
-    DEFINE_GENERIC_REGISTER_STUB(r6, nullptr, LLDB_REGNUM_GENERIC_ARG7),
-    DEFINE_GENERIC_REGISTER_STUB(r7, nullptr, LLDB_REGNUM_GENERIC_ARG8),
-    DEFINE_REGISTER_STUB(r8, nullptr),
-    DEFINE_REGISTER_STUB(r9, nullptr),
-    DEFINE_REGISTER_STUB(r10, nullptr),
-    DEFINE_REGISTER_STUB(r11, nullptr),
-    DEFINE_REGISTER_STUB(r12, nullptr),
-    DEFINE_REGISTER_STUB(r13, nullptr),
-    DEFINE_REGISTER_STUB(r14, nullptr),
-    DEFINE_REGISTER_STUB(r15, nullptr),
-    DEFINE_REGISTER_STUB(r16, nullptr),
-    DEFINE_REGISTER_STUB(r17, nullptr),
-    DEFINE_REGISTER_STUB(r18, nullptr),
-    DEFINE_REGISTER_STUB(r19, nullptr),
-    DEFINE_REGISTER_STUB(r20, nullptr),
-    DEFINE_REGISTER_STUB(r21, nullptr),
-    DEFINE_REGISTER_STUB(r22, nullptr),
-    DEFINE_REGISTER_STUB(r23, nullptr),
-    DEFINE_REGISTER_STUB(r24, nullptr),
-    DEFINE_REGISTER_STUB(r25, nullptr),
-    DEFINE_REGISTER_STUB(r26, "gp"),
-    DEFINE_GENERIC_REGISTER_STUB(r27, "fp", LLDB_REGNUM_GENERIC_FP),
-    DEFINE_GENERIC_REGISTER_STUB(r28, "sp", LLDB_REGNUM_GENERIC_SP),
-    DEFINE_REGISTER_STUB(r29, "ilink"),
-    DEFINE_REGISTER_STUB(r30, nullptr),
-    DEFINE_GENERIC_REGISTER_STUB(r31, "blink", LLDB_REGNUM_GENERIC_RA),
-    DEFINE_REGISTER_STUB(r32, nullptr),
-    DEFINE_REGISTER_STUB(r33, nullptr),
-    DEFINE_REGISTER_STUB(r34, nullptr),
-    DEFINE_REGISTER_STUB(r35, nullptr),
-    DEFINE_REGISTER_STUB(r36, nullptr),
-    DEFINE_REGISTER_STUB(r37, nullptr),
-    DEFINE_REGISTER_STUB(r38, nullptr),
-    DEFINE_REGISTER_STUB(r39, nullptr),
-    DEFINE_REGISTER_STUB(r40, nullptr),
-    DEFINE_REGISTER_STUB(r41, nullptr),
-    DEFINE_REGISTER_STUB(r42, nullptr),
-    DEFINE_REGISTER_STUB(r43, nullptr),
-    DEFINE_REGISTER_STUB(r44, nullptr),
-    DEFINE_REGISTER_STUB(r45, nullptr),
-    DEFINE_REGISTER_STUB(r46, nullptr),
-    DEFINE_REGISTER_STUB(r47, nullptr),
-    DEFINE_REGISTER_STUB(r48, nullptr),
-    DEFINE_REGISTER_STUB(r49, nullptr),
-    DEFINE_REGISTER_STUB(r50, nullptr),
-    DEFINE_REGISTER_STUB(r51, nullptr),
-    DEFINE_REGISTER_STUB(r52, nullptr),
-    DEFINE_REGISTER_STUB(r53, nullptr),
-    DEFINE_REGISTER_STUB(r54, nullptr),
-    DEFINE_REGISTER_STUB(r55, nullptr),
-    DEFINE_REGISTER_STUB(r56, nullptr),
-    DEFINE_REGISTER_STUB(r57, nullptr),
-    DEFINE_REGISTER_STUB(r58, "accl"),
-    DEFINE_REGISTER_STUB(r59, "acch"),
-    DEFINE_REGISTER_STUB(r60, "lp_count"),
-    DEFINE_REGISTER_STUB(r63, "pcl"),
-    DEFINE_GENERIC_REGISTER_STUB(pc, nullptr, LLDB_REGNUM_GENERIC_PC),
-    DEFINE_GENERIC_REGISTER_STUB(status32, nullptr, LLDB_REGNUM_GENERIC_FLAGS)} };
-} // namespace dwarf
-} // namespace
-
-const RegisterInfo *ABISysV_arc::GetRegisterInfoArray(uint32_t &count) {
-  count = dwarf::g_register_infos.size();
-  return dwarf::g_register_infos.data();
-}
-
-size_t ABISysV_arc::GetRedZoneSize() const { return 0; }
-
-bool ABISysV_arc::IsRegisterFileReduced(RegisterContext &reg_ctx) const {
-  if (!m_is_reg_file_reduced) {
-    const auto *const rf_build_reg = reg_ctx.GetRegisterInfoByName("rf_build");
-    
-    const auto reg_value = reg_ctx.ReadRegisterAsUnsigned(rf_build_reg,
-                                                          /*fail_value*/ 0);
-    // RF_BUILD "Number of Entries" bit.
-    const uint32_t rf_entries_bit = 1U << 9U;
-    m_is_reg_file_reduced = (reg_value | rf_entries_bit) != 0;
-  }
-
-  return m_is_reg_file_reduced.getValueOr(false);
-}
-
-//------------------------------------------------------------------
-// Static Functions
-//------------------------------------------------------------------
-
-ABISP ABISysV_arc::CreateInstance(ProcessSP process_sp, const ArchSpec &arch) {
-  return llvm::Triple::arc == arch.GetTriple().getArch() ?
-      ABISP(new ABISysV_arc(std::move(process_sp), MakeMCRegisterInfo(arch))) :
-      ABISP();
-}
-
-namespace {
-const size_t word_size = 4U;
-const size_t reg_size = word_size;
-
-inline size_t AugmentArgSize(size_t size_in_bytes) {
-  return llvm::alignTo(size_in_bytes, word_size);
-}
-
-size_t TotalArgsSizeInWords(const llvm::ArrayRef<ABI::CallArgument> &args) {
-  size_t total_size = 0;
-  for (const auto &arg : args)
-    total_size +=
-        (ABI::CallArgument::TargetValue == arg.type ? AugmentArgSize(arg.size)
-                                                    : reg_size) /
-        word_size;
-
-  return total_size;
-}
-} // namespace
-
-bool ABISysV_arc::PrepareTrivialCall(Thread &thread, addr_t sp,
-                                     addr_t func_addr, addr_t return_addr,
-                                     llvm::ArrayRef<addr_t> args) const {
-  // We don't use the traditional trivial call specialized for jit.
-  return false;
-}
-
-bool ABISysV_arc::PrepareTrivialCall(Thread &thread, addr_t sp, addr_t pc,
-    addr_t ra, llvm::Type &prototype,
-    llvm::ArrayRef<ABI::CallArgument> args) const {
-  auto reg_ctx = thread.GetRegisterContext();
-  if (!reg_ctx)
-    return false;
-
-  uint32_t pc_reg = reg_ctx->ConvertRegisterKindToRegisterNumber(
-      eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC);
-  if (pc_reg == LLDB_INVALID_REGNUM)
-    return false;
-
-  uint32_t ra_reg = reg_ctx->ConvertRegisterKindToRegisterNumber(
-      eRegisterKindGeneric, LLDB_REGNUM_GENERIC_RA);
-  if (ra_reg == LLDB_INVALID_REGNUM)
-    return false;
-
-  uint32_t sp_reg = reg_ctx->ConvertRegisterKindToRegisterNumber(
-      eRegisterKindGeneric, LLDB_REGNUM_GENERIC_SP);
-  if (sp_reg == LLDB_INVALID_REGNUM)
-    return false;
-
-  Status error;
-  ProcessSP process = thread.GetProcess();
-  if (!process)
-    return false;
-
-  // Push host data onto target.
-  for (const auto &arg : args) {
-    // Skip over target values.
-    if (arg.type == ABI::CallArgument::TargetValue)
-      continue;
-
-    // Create space on the stack for this data 4-byte aligned.
-    sp -= AugmentArgSize(arg.size);
-
-    if (process->WriteMemory(sp, arg.data_up.get(), arg.size, error) < arg.size
-        || error.Fail())
-      return false;
-
-    // Update the argument with the target pointer.
-    *const_cast<addr_t *>(&arg.value) = sp;
-  }
-
-  // Make sure number of parameters matches prototype.
-  assert(!prototype.isFunctionVarArg());
-  assert(prototype.getFunctionNumParams() == args.size());
-  
-  const size_t regs_for_args_count = IsRegisterFileReduced(*reg_ctx) ? 4U : 8U;
-
-  // Number of arguments passed on stack.
-  auto args_size = TotalArgsSizeInWords(args);
-  auto on_stack =
-      args_size <= regs_for_args_count ? 0 : args_size - regs_for_args_count;
-  auto offset = on_stack * word_size;
-
-  uint8_t reg_value[reg_size];
-  size_t reg_index = LLDB_REGNUM_GENERIC_ARG1;
-
-  for (const auto &arg : args) {
-    auto value = reinterpret_cast<const uint8_t *>(&arg.value);
-    auto size =
-        ABI::CallArgument::TargetValue == arg.type ? arg.size : reg_size;
-
-    // Pass arguments via registers.
-    while (size > 0 && reg_index < regs_for_args_count) {
-      size_t byte_index = 0;
-      auto end = size < reg_size ? size : reg_size;
-
-      while (byte_index < end) {
-        reg_value[byte_index++] = *(value++);
-        --size;
-      }
-
-      while (byte_index < reg_size) {
-        reg_value[byte_index++] = 0;
-      }
-
-      RegisterValue reg_val_obj(reg_value, reg_size, eByteOrderLittle);
-      if (!reg_ctx->WriteRegister(
-            reg_ctx->GetRegisterInfo(eRegisterKindGeneric, reg_index),
-            reg_val_obj))
-        return false;
-
-      // NOTE: It's unsafe to iterate through LLDB_REGNUM_GENERICs.
-      ++reg_index;
-    }
-
-    if (reg_index < regs_for_args_count || size == 0)
-      continue;
-
-    // Remaining arguments are passed on the stack.
-    if (process->WriteMemory(sp - offset, value, size, error) < size ||
-        !error.Success())
-      return false;
-
-    offset -= AugmentArgSize(size);
-  }
-
-  // Set stack pointer immediately below arguments.
-  sp -= on_stack * word_size;
-
-  // Update registers with current function call state.
-  reg_ctx->WriteRegisterFromUnsigned(pc_reg, pc);
-  reg_ctx->WriteRegisterFromUnsigned(ra_reg, ra);
-  reg_ctx->WriteRegisterFromUnsigned(sp_reg, sp);
-
-  return true;
-}
-
-bool ABISysV_arc::GetArgumentValues(Thread &thread, ValueList &values) const {
-  return false;
-}
-
-Status ABISysV_arc::SetReturnValueObject(StackFrameSP &frame_sp,
-                                         ValueObjectSP &new_value_sp) {
-  Status result;
-  if (!new_value_sp) {
-    result.SetErrorString("Empty value object for return value.");
-    return result;
-  }
-
-  CompilerType compiler_type = new_value_sp->GetCompilerType();
-  if (!compiler_type) {
-    result.SetErrorString("Null clang type for return value.");
-    return result;
-  }
-
-  auto &reg_ctx = *frame_sp->GetThread()->GetRegisterContext();
-
-  bool is_signed = false;
-  if (!compiler_type.IsIntegerOrEnumerationType(is_signed) &&
-      !compiler_type.IsPointerType()) {
-    result.SetErrorString("We don't support returning other types at present");
-    return result;
-  }
-
-  DataExtractor data;
-  size_t num_bytes = new_value_sp->GetData(data, result);
-
-  if (result.Fail()) {
-    result.SetErrorStringWithFormat(
-        "Couldn't convert return value to raw data: %s", result.AsCString());
-    return result;
-  }
-
-  if (num_bytes <= 2 * reg_size) {
-    offset_t offset = 0;
-    uint64_t raw_value = data.GetMaxU64(&offset, num_bytes);
-
-    auto reg_info =
-        reg_ctx.GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1);
-    if (!reg_ctx.WriteRegisterFromUnsigned(reg_info, raw_value)) {
-      result.SetErrorStringWithFormat("Couldn't write value to register %s",
-                                      reg_info->name);
-      return result;
-    }
-
-    if (num_bytes <= reg_size)
-      return result; // Successfully written.
-
-    raw_value >>= 32;
-    reg_info =
-        reg_ctx.GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG2);
-    if (!reg_ctx.WriteRegisterFromUnsigned(reg_info, raw_value)) {
-      result.SetErrorStringWithFormat("Couldn't write value to register %s",
-                                      reg_info->name);
-    }
-
-    return result;
-  }
-
-  result.SetErrorString(
-      "We don't support returning large integer values at present.");
-  return result;
-}
-
-namespace {
-template <typename T>
-void SetInteger(Scalar &scalar, uint64_t raw_value, bool is_signed) {
-  raw_value &= std::numeric_limits<T>::max();
-  if (is_signed)
-    scalar = static_cast<typename std::make_signed<T>::type>(raw_value);
-  else
-    scalar = static_cast<T>(raw_value);
-}
-
-bool SetSizedInteger(Scalar &scalar, uint64_t raw_value, uint8_t size_in_bytes,
-                     bool is_signed) {
-  switch (size_in_bytes) {
-  default:
-    return false;
-
-  case sizeof(uint64_t):
-    SetInteger<uint64_t>(scalar, raw_value, is_signed);
-    break;
-
-  case sizeof(uint32_t):
-    SetInteger<uint32_t>(scalar, raw_value, is_signed);
-    break;
-
-  case sizeof(uint16_t):
-    SetInteger<uint16_t>(scalar, raw_value, is_signed);
-    break;
-
-  case sizeof(uint8_t):
-    SetInteger<uint8_t>(scalar, raw_value, is_signed);
-    break;
-  }
-
-  return true;
-}
-
-bool SetSizedFloat(Scalar &scalar, uint64_t raw_value, uint8_t size_in_bytes) {
-  switch (size_in_bytes) {
-  default:
-    return false;
-
-  case sizeof(uint64_t):
-    scalar = *reinterpret_cast<double *>(&raw_value);
-    break;
-
-  case sizeof(uint32_t):
-    scalar = *reinterpret_cast<float *>(&raw_value);
-    break;
-  }
-
-  return true;
-}
-
-uint64_t ReadRawValue(const RegisterContextSP &reg_ctx, uint8_t size_in_bytes) {
-  auto reg_info_r0 =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1);
-
-  // Extract the register context so we can read arguments from registers.
-  uint64_t raw_value =
-      reg_ctx->ReadRegisterAsUnsigned(reg_info_r0, 0) & UINT32_MAX;
-
-  if (sizeof(uint64_t) == size_in_bytes)
-    raw_value |= (reg_ctx->ReadRegisterAsUnsigned(
-                      reg_ctx->GetRegisterInfo(eRegisterKindGeneric,
-                                               LLDB_REGNUM_GENERIC_ARG2), 0) &
-                  UINT64_MAX) << 32U;
-
-  return raw_value;
-}
-} // namespace
-
-ValueObjectSP
-ABISysV_arc::GetReturnValueObjectSimple(Thread &thread,
-                                        CompilerType &compiler_type) const {
-  if (!compiler_type)
-    return ValueObjectSP();
-
-  auto reg_ctx = thread.GetRegisterContext();
-  if (!reg_ctx)
-    return ValueObjectSP();
-
-  Value value;
-  value.SetCompilerType(compiler_type);
-
-  const uint32_t type_flags = compiler_type.GetTypeInfo();
-  // Integer return type.
-  if (type_flags & eTypeIsInteger) {
-    const size_t byte_size = compiler_type.GetByteSize(nullptr).getValueOr(0);
-    auto raw_value = ReadRawValue(reg_ctx, byte_size);
-
-    const bool is_signed = (type_flags & eTypeIsSigned) != 0;
-    if (!SetSizedInteger(value.GetScalar(), raw_value, byte_size, is_signed))
-      return ValueObjectSP();
-
-    value.SetValueType(Value::eValueTypeScalar);
-  }
-  // Pointer return type.
-  else if (type_flags & eTypeIsPointer) {
-    auto reg_info_r0 = reg_ctx->GetRegisterInfo(eRegisterKindGeneric,
-                                                LLDB_REGNUM_GENERIC_ARG1);
-    value.GetScalar() = reg_ctx->ReadRegisterAsUnsigned(reg_info_r0, 0);
-
-    value.SetValueType(Value::eValueTypeScalar);
-  }
-  // Floating point return type.
-  else if (type_flags & eTypeIsFloat) {
-    uint32_t float_count = 0;
-    bool is_complex = false;
-
-    if (compiler_type.IsFloatingPointType(float_count, is_complex) &&
-        1 == float_count && !is_complex) {
-      const size_t byte_size = compiler_type.GetByteSize(nullptr).getValueOr(0);
-      auto raw_value = ReadRawValue(reg_ctx, byte_size);
-
-      if (!SetSizedFloat(value.GetScalar(), raw_value, byte_size))
-        return ValueObjectSP();
-    }
-  }
-  // Unsupported return type.
-  else
-    return ValueObjectSP();
-
-  return ValueObjectConstResult::Create(thread.GetStackFrameAtIndex(0).get(),
-                                        value, ConstString(""));
-}
-
-ValueObjectSP ABISysV_arc::GetReturnValueObjectImpl(
-    Thread &thread, CompilerType &return_compiler_type) const {
-  ValueObjectSP return_valobj_sp;
-
-  if (!return_compiler_type)
-    return return_valobj_sp;
-
-  ExecutionContext exe_ctx(thread.shared_from_this());
-  return GetReturnValueObjectSimple(thread, return_compiler_type);
-}
-
-ValueObjectSP ABISysV_arc::GetReturnValueObjectImpl(Thread &thread,
-                                                    llvm::Type &retType) const {
-  auto reg_ctx = thread.GetRegisterContext();
-  if (!reg_ctx)
-    return ValueObjectSP();
-
-  Value value;
-  // Void return type.
-  if (retType.isVoidTy()) {
-    value.GetScalar() = 0;
-  }
-  // Integer return type.
-  else if (retType.isIntegerTy()) {
-    size_t byte_size = retType.getPrimitiveSizeInBits();
-    if (1 != byte_size) // For boolian type.
-      byte_size /= CHAR_BIT;
-
-    auto raw_value = ReadRawValue(reg_ctx, byte_size);
-
-    const bool is_signed = false; // IR Type doesn't provide this info.
-    if (!SetSizedInteger(value.GetScalar(), raw_value, byte_size, is_signed))
-      return ValueObjectSP();
-  }
-  // Pointer return type.
-  else if (retType.isPointerTy()) {
-    auto reg_info_r0 = reg_ctx->GetRegisterInfo(eRegisterKindGeneric,
-                                                LLDB_REGNUM_GENERIC_ARG1);
-    value.GetScalar() = reg_ctx->ReadRegisterAsUnsigned(reg_info_r0, 0);
-    value.SetValueType(Value::eValueTypeScalar);
-  }
-  // Floating point return type.
-  else if (retType.isFloatingPointTy()) {
-    const size_t byte_size = retType.getPrimitiveSizeInBits() / CHAR_BIT;
-    auto raw_value = ReadRawValue(reg_ctx, byte_size);
-
-    if (!SetSizedFloat(value.GetScalar(), raw_value, byte_size))
-      return ValueObjectSP();
-  }
-  // Unsupported return type.
-  else
-    return ValueObjectSP();
-
-  return ValueObjectConstResult::Create(thread.GetStackFrameAtIndex(0).get(),
-                                        value, ConstString(""));
-}
-
-bool ABISysV_arc::CreateFunctionEntryUnwindPlan(UnwindPlan &unwind_plan) {
-  unwind_plan.Clear();
-  unwind_plan.SetRegisterKind(eRegisterKindDWARF);
-
-  UnwindPlan::RowSP row(new UnwindPlan::Row);
-
-  // Our Call Frame Address is the stack pointer value.
-  row->GetCFAValue().SetIsRegisterPlusOffset(dwarf::sp, 0);
-
-  // The previous PC is in the BLINK.
-  row->SetRegisterLocationToRegister(dwarf::pc, dwarf::blink, true);
-  unwind_plan.AppendRow(row);
-
-  // All other registers are the same.
-  unwind_plan.SetSourceName("arc at-func-entry default");
-  unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
-
-  return true;
-}
-
-bool ABISysV_arc::CreateDefaultUnwindPlan(UnwindPlan &unwind_plan) {
-  return false;
-}
-
-bool ABISysV_arc::RegisterIsVolatile(const RegisterInfo *reg_info) {
-  if (nullptr == reg_info)
-    return false;
-
-  // Volatile registers are: r0..r12.
-  uint32_t regnum = reg_info->kinds[eRegisterKindDWARF];
-  if (regnum <= 12)
-    return true;
-
-  static const std::string ra_reg_name = "blink";
-  return ra_reg_name == reg_info->name;
-}
-
-void ABISysV_arc::Initialize() {
-  PluginManager::RegisterPlugin(GetPluginNameStatic(),
-                                "System V ABI for ARC targets", CreateInstance);
-}
-
-void ABISysV_arc::Terminate() {
-  PluginManager::UnregisterPlugin(CreateInstance);
-}
-
-ConstString ABISysV_arc::GetPluginNameStatic() {
-  static ConstString g_name("sysv-arc");
-  return g_name;
-}
-
-//------------------------------------------------------------------
-// PluginInterface protocol
-//------------------------------------------------------------------
-
-ConstString ABISysV_arc::GetPluginName() {
-  return GetPluginNameStatic();
-}
-
-uint32_t ABISysV_arc::GetPluginVersion() { return 1; }
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-arc/ABISysV_arc.h b/gnu/llvm/lldb/source/Plugins/ABI/SysV-arc/ABISysV_arc.h
deleted file mode 100644 (file)
index c4b26a5..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-//===-- ArchitectureArc.h ---------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_ABISysV_arc_h_
-#define liblldb_ABISysV_arc_h_
-
-// Other libraries and framework includes
-#include <llvm/ADT/Optional.h>
-
-// Project includes
-#include "lldb/Target/ABI.h"
-#include "lldb/lldb-private.h"
-
-class ABISysV_arc : public lldb_private::ABI {
-public:
-  ~ABISysV_arc() override = default;
-
-  size_t GetRedZoneSize() const override;
-
-  bool PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp,
-                          lldb::addr_t functionAddress,
-                          lldb::addr_t returnAddress,
-                          llvm::ArrayRef<lldb::addr_t> args) const override;
-
-  // Special thread plan for GDB style non-jit function calls.
-  bool
-  PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp,
-                     lldb::addr_t functionAddress, lldb::addr_t returnAddress,
-                     llvm::Type &prototype,
-                     llvm::ArrayRef<ABI::CallArgument> args) const override;
-
-  bool GetArgumentValues(lldb_private::Thread &thread,
-                         lldb_private::ValueList &values) const override;
-
-  lldb_private::Status
-  SetReturnValueObject(lldb::StackFrameSP &frame_sp,
-                       lldb::ValueObjectSP &new_value) override;
-
-  lldb::ValueObjectSP
-  GetReturnValueObjectImpl(lldb_private::Thread &thread,
-                           lldb_private::CompilerType &type) const override;
-
-  // Specialized to work with llvm IR types.
-  lldb::ValueObjectSP GetReturnValueObjectImpl(lldb_private::Thread &thread,
-                                               llvm::Type &type) const override;
-
-  bool
-  CreateFunctionEntryUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
-  bool CreateDefaultUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
-  bool RegisterIsVolatile(const lldb_private::RegisterInfo *reg_info) override;
-
-  bool CallFrameAddressIsValid(lldb::addr_t cfa) override {
-    // Stack call frame address must be 4 byte aligned.
-    return (cfa & 0x3ull) == 0;
-  }
-
-  bool CodeAddressIsValid(lldb::addr_t pc) override {
-    // Code addresse must be 2 byte aligned.
-    return (pc & 1ull) == 0;
-  }
-
-  const lldb_private::RegisterInfo *
-  GetRegisterInfoArray(uint32_t &count) override;
-
-  //------------------------------------------------------------------
-  // Static Functions
-  //------------------------------------------------------------------
-
-  static void Initialize();
-
-  static void Terminate();
-
-  static lldb::ABISP CreateInstance(lldb::ProcessSP process_sp,
-                                    const lldb_private::ArchSpec &arch);
-
-  static lldb_private::ConstString GetPluginNameStatic();
-
-  //------------------------------------------------------------------
-  // PluginInterface protocol
-  //------------------------------------------------------------------
-
-  lldb_private::ConstString GetPluginName() override;
-
-  uint32_t GetPluginVersion() override;
-
-private:
-  lldb::ValueObjectSP
-  GetReturnValueObjectSimple(lldb_private::Thread &thread,
-                             lldb_private::CompilerType &ast_type) const;
-
-  bool IsRegisterFileReduced(lldb_private::RegisterContext &reg_ctx) const;
-
-  using lldb_private::ABI::ABI; // Call CreateInstance instead.
-
-  using RegisterFileFlag = llvm::Optional<bool>;
-  mutable RegisterFileFlag m_is_reg_file_reduced;
-};
-
-#endif // liblldb_ABISysV_arc_h_
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-arc/CMakeLists.txt b/gnu/llvm/lldb/source/Plugins/ABI/SysV-arc/CMakeLists.txt
deleted file mode 100644 (file)
index 3dc0d1c..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-add_lldb_library(lldbPluginABISysV_arc PLUGIN
-  ABISysV_arc.cpp
-
-  LINK_LIBS
-    lldbCore
-    lldbSymbol
-    lldbTarget
-    lldbPluginProcessUtility
-  LINK_COMPONENTS
-    Support
-  )
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp b/gnu/llvm/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp
deleted file mode 100644 (file)
index b6e8f88..0000000
+++ /dev/null
@@ -1,2158 +0,0 @@
-//===-- ABISysV_arm.cpp -----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "ABISysV_arm.h"
-
-#include <vector>
-
-#include "llvm/ADT/STLExtras.h"
-#include "llvm/ADT/Triple.h"
-
-#include "lldb/Core/Module.h"
-#include "lldb/Core/PluginManager.h"
-#include "lldb/Core/Value.h"
-#include "lldb/Core/ValueObjectConstResult.h"
-#include "lldb/Symbol/UnwindPlan.h"
-#include "lldb/Target/Process.h"
-#include "lldb/Target/RegisterContext.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Target/Thread.h"
-#include "lldb/Utility/ConstString.h"
-#include "lldb/Utility/RegisterValue.h"
-#include "lldb/Utility/Scalar.h"
-#include "lldb/Utility/Status.h"
-
-#include "Plugins/Process/Utility/ARMDefines.h"
-#include "Utility/ARM_DWARF_Registers.h"
-#include "Utility/ARM_ehframe_Registers.h"
-
-using namespace lldb;
-using namespace lldb_private;
-
-static RegisterInfo g_register_infos[] = {
-    //  NAME       ALT       SZ OFF ENCODING         FORMAT          EH_FRAME
-    //  DWARF               GENERIC                     PROCESS PLUGIN
-    //  LLDB NATIVE            VALUE REGS    INVALIDATE REGS
-    //  ========== =======   == === =============    ============
-    //  ======================= =================== ===========================
-    //  ======================= ====================== ==========
-    //  ===============
-    {"r0",
-     "arg1",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_r0, dwarf_r0, LLDB_REGNUM_GENERIC_ARG1, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r1",
-     "arg2",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_r1, dwarf_r1, LLDB_REGNUM_GENERIC_ARG2, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r2",
-     "arg3",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_r2, dwarf_r2, LLDB_REGNUM_GENERIC_ARG3, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r3",
-     "arg4",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_r3, dwarf_r3, LLDB_REGNUM_GENERIC_ARG4, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r4",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_r4, dwarf_r4, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r5",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_r5, dwarf_r5, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r6",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_r6, dwarf_r6, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r7",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_r7, dwarf_r7, LLDB_REGNUM_GENERIC_FP, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r8",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_r8, dwarf_r8, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r9",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_r9, dwarf_r9, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r10",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_r10, dwarf_r10, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r11",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_r11, dwarf_r11, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r12",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_r12, dwarf_r12, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"sp",
-     "r13",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_sp, dwarf_sp, LLDB_REGNUM_GENERIC_SP, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"lr",
-     "r14",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_lr, dwarf_lr, LLDB_REGNUM_GENERIC_RA, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"pc",
-     "r15",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_pc, dwarf_pc, LLDB_REGNUM_GENERIC_PC, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"cpsr",
-     "psr",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {ehframe_cpsr, dwarf_cpsr, LLDB_REGNUM_GENERIC_FLAGS, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s0",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s0, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s1",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s1, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s2",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s2, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s3",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s3, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s4",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s4, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s5",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s5, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s6",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s6, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s7",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s7, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s8",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s8, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s9",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s9, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s10",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s10, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s11",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s11, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s12",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s12, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s13",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s13, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s14",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s14, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s15",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s15, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s16",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s16, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s17",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s17, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s18",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s18, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s19",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s19, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s20",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s20, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s21",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s21, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s22",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s22, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s23",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s23, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s24",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s24, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s25",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s25, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s26",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s26, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s27",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s27, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s28",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s28, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s29",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s29, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s30",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s30, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s31",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_s31, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"fpscr",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d0",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d0, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d1",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d1, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d2",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d2, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d3",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d3, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d4",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d4, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d5",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d5, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d6",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d6, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d7",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d7, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d8",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d8, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d9",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d9, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d10",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d10, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d11",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d11, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d12",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d12, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d13",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d13, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d14",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d14, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d15",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d15, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d16",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d16, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d17",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d17, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d18",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d18, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d19",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d19, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d20",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d20, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d21",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d21, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d22",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d22, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d23",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d23, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d24",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d24, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d25",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d25, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d26",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d26, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d27",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d27, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d28",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d28, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d29",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d29, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d30",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d30, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d31",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, dwarf_d31, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r8_usr",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r8_usr, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r9_usr",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r9_usr, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r10_usr",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r10_usr, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r11_usr",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r11_usr, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r12_usr",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r12_usr, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r13_usr",
-     "sp_usr",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r13_usr, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r14_usr",
-     "lr_usr",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r14_usr, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r8_fiq",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r8_fiq, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r9_fiq",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r9_fiq, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r10_fiq",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r10_fiq, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r11_fiq",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r11_fiq, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r12_fiq",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r12_fiq, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r13_fiq",
-     "sp_fiq",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r13_fiq, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r14_fiq",
-     "lr_fiq",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r14_fiq, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r13_irq",
-     "sp_irq",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r13_irq, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r14_irq",
-     "lr_irq",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r14_irq, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r13_abt",
-     "sp_abt",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r13_abt, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r14_abt",
-     "lr_abt",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r14_abt, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r13_und",
-     "sp_und",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r13_und, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r14_und",
-     "lr_und",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r14_und, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r13_svc",
-     "sp_svc",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r13_svc, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r14_svc",
-     "lr_svc",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, dwarf_r14_svc, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0}};
-
-static const uint32_t k_num_register_infos =
-    llvm::array_lengthof(g_register_infos);
-static bool g_register_info_names_constified = false;
-
-const lldb_private::RegisterInfo *
-ABISysV_arm::GetRegisterInfoArray(uint32_t &count) {
-  // Make the C-string names and alt_names for the register infos into const
-  // C-string values by having the ConstString unique the names in the global
-  // constant C-string pool.
-  if (!g_register_info_names_constified) {
-    g_register_info_names_constified = true;
-    for (uint32_t i = 0; i < k_num_register_infos; ++i) {
-      if (g_register_infos[i].name)
-        g_register_infos[i].name =
-            ConstString(g_register_infos[i].name).GetCString();
-      if (g_register_infos[i].alt_name)
-        g_register_infos[i].alt_name =
-            ConstString(g_register_infos[i].alt_name).GetCString();
-    }
-  }
-  count = k_num_register_infos;
-  return g_register_infos;
-}
-
-size_t ABISysV_arm::GetRedZoneSize() const { return 0; }
-
-// Static Functions
-
-ABISP
-ABISysV_arm::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
-  const llvm::Triple::ArchType arch_type = arch.GetTriple().getArch();
-  const llvm::Triple::VendorType vendor_type = arch.GetTriple().getVendor();
-
-  if (vendor_type != llvm::Triple::Apple) {
-    if ((arch_type == llvm::Triple::arm) ||
-        (arch_type == llvm::Triple::thumb)) {
-      return ABISP(
-          new ABISysV_arm(std::move(process_sp), MakeMCRegisterInfo(arch)));
-    }
-  }
-
-  return ABISP();
-}
-
-bool ABISysV_arm::PrepareTrivialCall(Thread &thread, addr_t sp,
-                                     addr_t function_addr, addr_t return_addr,
-                                     llvm::ArrayRef<addr_t> args) const {
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-  if (!reg_ctx)
-    return false;
-
-  const uint32_t pc_reg_num = reg_ctx->ConvertRegisterKindToRegisterNumber(
-      eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC);
-  const uint32_t sp_reg_num = reg_ctx->ConvertRegisterKindToRegisterNumber(
-      eRegisterKindGeneric, LLDB_REGNUM_GENERIC_SP);
-  const uint32_t ra_reg_num = reg_ctx->ConvertRegisterKindToRegisterNumber(
-      eRegisterKindGeneric, LLDB_REGNUM_GENERIC_RA);
-
-  RegisterValue reg_value;
-
-  const uint8_t reg_names[] = {
-      LLDB_REGNUM_GENERIC_ARG1, LLDB_REGNUM_GENERIC_ARG2,
-      LLDB_REGNUM_GENERIC_ARG3, LLDB_REGNUM_GENERIC_ARG4};
-
-  llvm::ArrayRef<addr_t>::iterator ai = args.begin(), ae = args.end();
-
-  for (size_t i = 0; i < llvm::array_lengthof(reg_names); ++i) {
-    if (ai == ae)
-      break;
-
-    reg_value.SetUInt32(*ai);
-    if (!reg_ctx->WriteRegister(
-            reg_ctx->GetRegisterInfo(eRegisterKindGeneric, reg_names[i]),
-            reg_value))
-      return false;
-
-    ++ai;
-  }
-
-  if (ai != ae) {
-    // Spill onto the stack
-    size_t num_stack_regs = ae - ai;
-
-    sp -= (num_stack_regs * 4);
-    // Keep the stack 8 byte aligned, not that we need to
-    sp &= ~(8ull - 1ull);
-
-    // just using arg1 to get the right size
-    const RegisterInfo *reg_info = reg_ctx->GetRegisterInfo(
-        eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1);
-
-    addr_t arg_pos = sp;
-
-    for (; ai != ae; ++ai) {
-      reg_value.SetUInt32(*ai);
-      if (reg_ctx
-              ->WriteRegisterValueToMemory(reg_info, arg_pos,
-                                           reg_info->byte_size, reg_value)
-              .Fail())
-        return false;
-      arg_pos += reg_info->byte_size;
-    }
-  }
-
-  TargetSP target_sp(thread.CalculateTarget());
-  Address so_addr;
-
-  // Figure out if our return address is ARM or Thumb by using the
-  // Address::GetCallableLoadAddress(Target*) which will figure out the ARM
-  // thumb-ness and set the correct address bits for us.
-  so_addr.SetLoadAddress(return_addr, target_sp.get());
-  return_addr = so_addr.GetCallableLoadAddress(target_sp.get());
-
-  // Set "lr" to the return address
-  if (!reg_ctx->WriteRegisterFromUnsigned(ra_reg_num, return_addr))
-    return false;
-
-  // Set "sp" to the requested value
-  if (!reg_ctx->WriteRegisterFromUnsigned(sp_reg_num, sp))
-    return false;
-
-  // If bit zero or 1 is set, this must be a thumb function, no need to figure
-  // this out from the symbols.
-  so_addr.SetLoadAddress(function_addr, target_sp.get());
-  function_addr = so_addr.GetCallableLoadAddress(target_sp.get());
-
-  const RegisterInfo *cpsr_reg_info =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_FLAGS);
-  const uint32_t curr_cpsr = reg_ctx->ReadRegisterAsUnsigned(cpsr_reg_info, 0);
-
-  // Make a new CPSR and mask out any Thumb IT (if/then) bits
-  uint32_t new_cpsr = curr_cpsr & ~MASK_CPSR_IT_MASK;
-  // If bit zero or 1 is set, this must be thumb...
-  if (function_addr & 1ull)
-    new_cpsr |= MASK_CPSR_T; // Set T bit in CPSR
-  else
-    new_cpsr &= ~MASK_CPSR_T; // Clear T bit in CPSR
-
-  if (new_cpsr != curr_cpsr) {
-    if (!reg_ctx->WriteRegisterFromUnsigned(cpsr_reg_info, new_cpsr))
-      return false;
-  }
-
-  function_addr &=
-      ~1ull; // clear bit zero since the CPSR will take care of the mode for us
-
-  // Set "pc" to the address requested
-  return reg_ctx->WriteRegisterFromUnsigned(pc_reg_num, function_addr);
-}
-
-bool ABISysV_arm::GetArgumentValues(Thread &thread, ValueList &values) const {
-  uint32_t num_values = values.GetSize();
-
-  ExecutionContext exe_ctx(thread.shared_from_this());
-  // For now, assume that the types in the AST values come from the Target's
-  // scratch AST.
-
-  // Extract the register context so we can read arguments from registers
-
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-
-  if (!reg_ctx)
-    return false;
-
-  addr_t sp = 0;
-
-  for (uint32_t value_idx = 0; value_idx < num_values; ++value_idx) {
-    // We currently only support extracting values with Clang QualTypes. Do we
-    // care about others?
-    Value *value = values.GetValueAtIndex(value_idx);
-
-    if (!value)
-      return false;
-
-    CompilerType compiler_type = value->GetCompilerType();
-    if (compiler_type) {
-      bool is_signed = false;
-      size_t bit_width = 0;
-      if (compiler_type.IsIntegerOrEnumerationType(is_signed) ||
-          compiler_type.IsPointerOrReferenceType()) {
-        if (llvm::Optional<uint64_t> size = compiler_type.GetBitSize(&thread))
-          bit_width = *size;
-      } else {
-        // We only handle integer, pointer and reference types currently...
-        return false;
-      }
-
-      if (bit_width <= (exe_ctx.GetProcessRef().GetAddressByteSize() * 8)) {
-        if (value_idx < 4) {
-          // Arguments 1-4 are in r0-r3...
-          const RegisterInfo *arg_reg_info = nullptr;
-          arg_reg_info = reg_ctx->GetRegisterInfo(
-              eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1 + value_idx);
-          if (arg_reg_info) {
-            RegisterValue reg_value;
-
-            if (reg_ctx->ReadRegister(arg_reg_info, reg_value)) {
-              if (is_signed)
-                reg_value.SignExtend(bit_width);
-              if (!reg_value.GetScalarValue(value->GetScalar()))
-                return false;
-              continue;
-            }
-          }
-          return false;
-        } else {
-          if (sp == 0) {
-            // Read the stack pointer if it already hasn't been read
-            sp = reg_ctx->GetSP(0);
-            if (sp == 0)
-              return false;
-          }
-
-          // Arguments 5 on up are on the stack
-          const uint32_t arg_byte_size = (bit_width + (8 - 1)) / 8;
-          Status error;
-          if (!exe_ctx.GetProcessRef().ReadScalarIntegerFromMemory(
-                  sp, arg_byte_size, is_signed, value->GetScalar(), error))
-            return false;
-
-          sp += arg_byte_size;
-        }
-      }
-    }
-  }
-  return true;
-}
-
-static bool GetReturnValuePassedInMemory(Thread &thread,
-                                         RegisterContext *reg_ctx,
-                                         size_t byte_size, Value &value) {
-  Status error;
-  DataBufferHeap buffer(byte_size, 0);
-
-  const RegisterInfo *r0_reg_info =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1);
-  uint32_t address =
-      reg_ctx->ReadRegisterAsUnsigned(r0_reg_info, 0) & UINT32_MAX;
-  thread.GetProcess()->ReadMemory(address, buffer.GetBytes(),
-                                  buffer.GetByteSize(), error);
-
-  if (error.Fail())
-    return false;
-
-  value.SetBytes(buffer.GetBytes(), buffer.GetByteSize());
-  return true;
-}
-
-bool ABISysV_arm::IsArmHardFloat(Thread &thread) const {
-  ProcessSP process_sp(thread.GetProcess());
-  if (process_sp) {
-    const ArchSpec &arch(process_sp->GetTarget().GetArchitecture());
-
-    return (arch.GetFlags() & ArchSpec::eARM_abi_hard_float) != 0;
-  }
-
-  return false;
-}
-
-ValueObjectSP ABISysV_arm::GetReturnValueObjectImpl(
-    Thread &thread, lldb_private::CompilerType &compiler_type) const {
-  Value value;
-  ValueObjectSP return_valobj_sp;
-
-  if (!compiler_type)
-    return return_valobj_sp;
-
-  // value.SetContext (Value::eContextTypeClangType,
-  // compiler_type.GetOpaqueQualType());
-  value.SetCompilerType(compiler_type);
-
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-  if (!reg_ctx)
-    return return_valobj_sp;
-
-  bool is_signed;
-  bool is_complex;
-  uint32_t float_count;
-  bool is_vfp_candidate = false;
-  uint8_t vfp_count = 0;
-  uint8_t vfp_byte_size = 0;
-
-  // Get the pointer to the first stack argument so we have a place to start
-  // when reading data
-
-  const RegisterInfo *r0_reg_info =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1);
-  llvm::Optional<uint64_t> bit_width = compiler_type.GetBitSize(&thread);
-  llvm::Optional<uint64_t> byte_size = compiler_type.GetByteSize(&thread);
-  if (!bit_width || !byte_size)
-    return return_valobj_sp;
-
-  if (compiler_type.IsIntegerOrEnumerationType(is_signed)) {
-    switch (*bit_width) {
-    default:
-      return return_valobj_sp;
-    case 64: {
-      const RegisterInfo *r1_reg_info = reg_ctx->GetRegisterInfo(
-          eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG2);
-      uint64_t raw_value;
-      raw_value = reg_ctx->ReadRegisterAsUnsigned(r0_reg_info, 0) & UINT32_MAX;
-      raw_value |= ((uint64_t)(reg_ctx->ReadRegisterAsUnsigned(r1_reg_info, 0) &
-                               UINT32_MAX))
-                   << 32;
-      if (is_signed)
-        value.GetScalar() = (int64_t)raw_value;
-      else
-        value.GetScalar() = (uint64_t)raw_value;
-    } break;
-    case 32:
-      if (is_signed)
-        value.GetScalar() = (int32_t)(
-            reg_ctx->ReadRegisterAsUnsigned(r0_reg_info, 0) & UINT32_MAX);
-      else
-        value.GetScalar() = (uint32_t)(
-            reg_ctx->ReadRegisterAsUnsigned(r0_reg_info, 0) & UINT32_MAX);
-      break;
-    case 16:
-      if (is_signed)
-        value.GetScalar() = (int16_t)(
-            reg_ctx->ReadRegisterAsUnsigned(r0_reg_info, 0) & UINT16_MAX);
-      else
-        value.GetScalar() = (uint16_t)(
-            reg_ctx->ReadRegisterAsUnsigned(r0_reg_info, 0) & UINT16_MAX);
-      break;
-    case 8:
-      if (is_signed)
-        value.GetScalar() = (int8_t)(
-            reg_ctx->ReadRegisterAsUnsigned(r0_reg_info, 0) & UINT8_MAX);
-      else
-        value.GetScalar() = (uint8_t)(
-            reg_ctx->ReadRegisterAsUnsigned(r0_reg_info, 0) & UINT8_MAX);
-      break;
-    }
-  } else if (compiler_type.IsPointerType()) {
-    uint32_t ptr =
-        thread.GetRegisterContext()->ReadRegisterAsUnsigned(r0_reg_info, 0) &
-        UINT32_MAX;
-    value.GetScalar() = ptr;
-  } else if (compiler_type.IsVectorType(nullptr, nullptr)) {
-    if (IsArmHardFloat(thread) && (*byte_size == 8 || *byte_size == 16)) {
-      is_vfp_candidate = true;
-      vfp_byte_size = 8;
-      vfp_count = (*byte_size == 8 ? 1 : 2);
-    } else if (*byte_size <= 16) {
-      DataBufferHeap buffer(16, 0);
-      uint32_t *buffer_ptr = (uint32_t *)buffer.GetBytes();
-
-      for (uint32_t i = 0; 4 * i < *byte_size; ++i) {
-        const RegisterInfo *reg_info = reg_ctx->GetRegisterInfo(
-            eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1 + i);
-        buffer_ptr[i] =
-            reg_ctx->ReadRegisterAsUnsigned(reg_info, 0) & UINT32_MAX;
-      }
-      value.SetBytes(buffer.GetBytes(), *byte_size);
-    } else {
-      if (!GetReturnValuePassedInMemory(thread, reg_ctx, *byte_size, value))
-        return return_valobj_sp;
-    }
-  } else if (compiler_type.IsFloatingPointType(float_count, is_complex)) {
-    if (float_count == 1 && !is_complex) {
-      switch (*bit_width) {
-      default:
-        return return_valobj_sp;
-      case 64: {
-        static_assert(sizeof(double) == sizeof(uint64_t), "");
-
-        if (IsArmHardFloat(thread)) {
-          RegisterValue reg_value;
-          const RegisterInfo *d0_reg_info =
-              reg_ctx->GetRegisterInfoByName("d0", 0);
-          reg_ctx->ReadRegister(d0_reg_info, reg_value);
-          value.GetScalar() = reg_value.GetAsDouble();
-        } else {
-          uint64_t raw_value;
-          const RegisterInfo *r1_reg_info = reg_ctx->GetRegisterInfo(
-              eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG2);
-          raw_value =
-              reg_ctx->ReadRegisterAsUnsigned(r0_reg_info, 0) & UINT32_MAX;
-          raw_value |=
-              ((uint64_t)(reg_ctx->ReadRegisterAsUnsigned(r1_reg_info, 0) &
-                          UINT32_MAX))
-              << 32;
-          value.GetScalar() = *reinterpret_cast<double *>(&raw_value);
-        }
-        break;
-      }
-      case 16: // Half precision returned after a conversion to single precision
-      case 32: {
-        static_assert(sizeof(float) == sizeof(uint32_t), "");
-
-        if (IsArmHardFloat(thread)) {
-          RegisterValue reg_value;
-          const RegisterInfo *s0_reg_info =
-              reg_ctx->GetRegisterInfoByName("s0", 0);
-          reg_ctx->ReadRegister(s0_reg_info, reg_value);
-          value.GetScalar() = reg_value.GetAsFloat();
-        } else {
-          uint32_t raw_value;
-          raw_value =
-              reg_ctx->ReadRegisterAsUnsigned(r0_reg_info, 0) & UINT32_MAX;
-          value.GetScalar() = *reinterpret_cast<float *>(&raw_value);
-        }
-        break;
-      }
-      }
-    } else if (is_complex && float_count == 2) {
-      if (IsArmHardFloat(thread)) {
-        is_vfp_candidate = true;
-        vfp_byte_size = *byte_size / 2;
-        vfp_count = 2;
-      } else if (!GetReturnValuePassedInMemory(thread, reg_ctx, *bit_width / 8,
-                                               value))
-        return return_valobj_sp;
-    } else
-      // not handled yet
-      return return_valobj_sp;
-  } else if (compiler_type.IsAggregateType()) {
-    if (IsArmHardFloat(thread)) {
-      CompilerType base_type;
-      const uint32_t homogeneous_count =
-          compiler_type.IsHomogeneousAggregate(&base_type);
-
-      if (homogeneous_count > 0 && homogeneous_count <= 4) {
-        llvm::Optional<uint64_t> base_byte_size =
-            base_type.GetByteSize(nullptr);
-        if (base_type.IsVectorType(nullptr, nullptr)) {
-          if (base_byte_size &&
-              (*base_byte_size == 8 || *base_byte_size == 16)) {
-            is_vfp_candidate = true;
-            vfp_byte_size = 8;
-            vfp_count = (*base_byte_size == 8 ? homogeneous_count
-                                              : homogeneous_count * 2);
-          }
-        } else if (base_type.IsFloatingPointType(float_count, is_complex)) {
-          if (float_count == 1 && !is_complex) {
-            is_vfp_candidate = true;
-            if (base_byte_size)
-              vfp_byte_size = *base_byte_size;
-            vfp_count = homogeneous_count;
-          }
-        }
-      } else if (homogeneous_count == 0) {
-        const uint32_t num_children = compiler_type.GetNumFields();
-
-        if (num_children > 0 && num_children <= 2) {
-          uint32_t index = 0;
-          for (index = 0; index < num_children; index++) {
-            std::string name;
-            base_type = compiler_type.GetFieldAtIndex(index, name, nullptr,
-                                                      nullptr, nullptr);
-
-            if (base_type.IsFloatingPointType(float_count, is_complex)) {
-              llvm::Optional<uint64_t> base_byte_size =
-                  base_type.GetByteSize(nullptr);
-              if (float_count == 2 && is_complex) {
-                if (index != 0 && base_byte_size &&
-                    vfp_byte_size != *base_byte_size)
-                  break;
-                else if (base_byte_size)
-                  vfp_byte_size = *base_byte_size;
-              } else
-                break;
-            } else
-              break;
-          }
-
-          if (index == num_children) {
-            is_vfp_candidate = true;
-            vfp_byte_size = (vfp_byte_size >> 1);
-            vfp_count = (num_children << 1);
-          }
-        }
-      }
-    }
-
-    if (*byte_size <= 4) {
-      RegisterValue r0_reg_value;
-      uint32_t raw_value =
-          reg_ctx->ReadRegisterAsUnsigned(r0_reg_info, 0) & UINT32_MAX;
-      value.SetBytes(&raw_value, *byte_size);
-    } else if (!is_vfp_candidate) {
-      if (!GetReturnValuePassedInMemory(thread, reg_ctx, *byte_size, value))
-        return return_valobj_sp;
-    }
-  } else {
-    // not handled yet
-    return return_valobj_sp;
-  }
-
-  if (is_vfp_candidate) {
-    ProcessSP process_sp(thread.GetProcess());
-    ByteOrder byte_order = process_sp->GetByteOrder();
-
-    DataBufferSP data_sp(new DataBufferHeap(*byte_size, 0));
-    uint32_t data_offset = 0;
-
-    for (uint32_t reg_index = 0; reg_index < vfp_count; reg_index++) {
-      uint32_t regnum = 0;
-
-      if (vfp_byte_size == 4)
-        regnum = dwarf_s0 + reg_index;
-      else if (vfp_byte_size == 8)
-        regnum = dwarf_d0 + reg_index;
-      else
-        break;
-
-      const RegisterInfo *reg_info =
-          reg_ctx->GetRegisterInfo(eRegisterKindDWARF, regnum);
-      if (reg_info == nullptr)
-        break;
-
-      RegisterValue reg_value;
-      if (!reg_ctx->ReadRegister(reg_info, reg_value))
-        break;
-
-      // Make sure we have enough room in "data_sp"
-      if ((data_offset + vfp_byte_size) <= data_sp->GetByteSize()) {
-        Status error;
-        const size_t bytes_copied = reg_value.GetAsMemoryData(
-            reg_info, data_sp->GetBytes() + data_offset, vfp_byte_size,
-            byte_order, error);
-        if (bytes_copied != vfp_byte_size)
-          break;
-
-        data_offset += bytes_copied;
-      }
-    }
-
-    if (data_offset == *byte_size) {
-      DataExtractor data;
-      data.SetByteOrder(byte_order);
-      data.SetAddressByteSize(process_sp->GetAddressByteSize());
-      data.SetData(data_sp);
-
-      return ValueObjectConstResult::Create(&thread, compiler_type,
-                                            ConstString(""), data);
-    } else { // Some error occurred while getting values from registers
-      return return_valobj_sp;
-    }
-  }
-
-  // If we get here, we have a valid Value, so make our ValueObject out of it:
-
-  return_valobj_sp = ValueObjectConstResult::Create(
-      thread.GetStackFrameAtIndex(0).get(), value, ConstString(""));
-  return return_valobj_sp;
-}
-
-Status ABISysV_arm::SetReturnValueObject(lldb::StackFrameSP &frame_sp,
-                                         lldb::ValueObjectSP &new_value_sp) {
-  Status error;
-  if (!new_value_sp) {
-    error.SetErrorString("Empty value object for return value.");
-    return error;
-  }
-
-  CompilerType compiler_type = new_value_sp->GetCompilerType();
-  if (!compiler_type) {
-    error.SetErrorString("Null clang type for return value.");
-    return error;
-  }
-
-  Thread *thread = frame_sp->GetThread().get();
-
-  bool is_signed;
-  uint32_t count;
-  bool is_complex;
-
-  RegisterContext *reg_ctx = thread->GetRegisterContext().get();
-
-  bool set_it_simple = false;
-  if (compiler_type.IsIntegerOrEnumerationType(is_signed) ||
-      compiler_type.IsPointerType()) {
-    DataExtractor data;
-    Status data_error;
-    size_t num_bytes = new_value_sp->GetData(data, data_error);
-    if (data_error.Fail()) {
-      error.SetErrorStringWithFormat(
-          "Couldn't convert return value to raw data: %s",
-          data_error.AsCString());
-      return error;
-    }
-    lldb::offset_t offset = 0;
-    if (num_bytes <= 8) {
-      const RegisterInfo *r0_info = reg_ctx->GetRegisterInfo(
-          eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1);
-      if (num_bytes <= 4) {
-        uint32_t raw_value = data.GetMaxU32(&offset, num_bytes);
-
-        if (reg_ctx->WriteRegisterFromUnsigned(r0_info, raw_value))
-          set_it_simple = true;
-      } else {
-        uint32_t raw_value = data.GetMaxU32(&offset, 4);
-
-        if (reg_ctx->WriteRegisterFromUnsigned(r0_info, raw_value)) {
-          const RegisterInfo *r1_info = reg_ctx->GetRegisterInfo(
-              eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG2);
-          uint32_t raw_value = data.GetMaxU32(&offset, num_bytes - offset);
-
-          if (reg_ctx->WriteRegisterFromUnsigned(r1_info, raw_value))
-            set_it_simple = true;
-        }
-      }
-    } else {
-      error.SetErrorString("We don't support returning longer than 64 bit "
-                           "integer values at present.");
-    }
-  } else if (compiler_type.IsFloatingPointType(count, is_complex)) {
-    if (is_complex)
-      error.SetErrorString(
-          "We don't support returning complex values at present");
-    else
-      error.SetErrorString(
-          "We don't support returning float values at present");
-  }
-
-  if (!set_it_simple)
-    error.SetErrorString(
-        "We only support setting simple integer return types at present.");
-
-  return error;
-}
-
-bool ABISysV_arm::CreateFunctionEntryUnwindPlan(UnwindPlan &unwind_plan) {
-  unwind_plan.Clear();
-  unwind_plan.SetRegisterKind(eRegisterKindDWARF);
-
-  uint32_t lr_reg_num = dwarf_lr;
-  uint32_t sp_reg_num = dwarf_sp;
-  uint32_t pc_reg_num = dwarf_pc;
-
-  UnwindPlan::RowSP row(new UnwindPlan::Row);
-
-  // Our Call Frame Address is the stack pointer value
-  row->GetCFAValue().SetIsRegisterPlusOffset(sp_reg_num, 0);
-
-  // The previous PC is in the LR
-  row->SetRegisterLocationToRegister(pc_reg_num, lr_reg_num, true);
-  unwind_plan.AppendRow(row);
-
-  // All other registers are the same.
-
-  unwind_plan.SetSourceName("arm at-func-entry default");
-  unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
-
-  return true;
-}
-
-bool ABISysV_arm::CreateDefaultUnwindPlan(UnwindPlan &unwind_plan) {
-  unwind_plan.Clear();
-  unwind_plan.SetRegisterKind(eRegisterKindDWARF);
-
-  // TODO: Handle thumb
-  uint32_t fp_reg_num = dwarf_r11;
-  uint32_t pc_reg_num = dwarf_pc;
-
-  UnwindPlan::RowSP row(new UnwindPlan::Row);
-  const int32_t ptr_size = 4;
-
-  row->GetCFAValue().SetIsRegisterPlusOffset(fp_reg_num, 2 * ptr_size);
-  row->SetOffset(0);
-
-  row->SetRegisterLocationToAtCFAPlusOffset(fp_reg_num, ptr_size * -2, true);
-  row->SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, ptr_size * -1, true);
-
-  unwind_plan.AppendRow(row);
-  unwind_plan.SetSourceName("arm default unwind plan");
-  unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
-  unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
-  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
-
-  return true;
-}
-
-// cf. "ARMv6 Function Calling Conventions"
-
-// ARMv7 on GNU/Linux general purpose reg rules:
-//    r0-r3 not preserved  (used for argument passing)
-//    r4-r11 preserved (v1-v8)
-//    r12   not presrved
-//    r13   preserved (stack pointer)
-//    r14   preserved (link register)
-//    r15   preserved (pc)
-//    cpsr  not preserved (different rules for different bits)
-
-// ARMv7 VFP register rules:
-//    d0-d7   not preserved   (aka s0-s15, q0-q3)
-//    d8-d15  preserved       (aka s16-s31, q4-q7)
-//    d16-d31 not preserved   (aka q8-q15)
-
-bool ABISysV_arm::RegisterIsVolatile(const RegisterInfo *reg_info) {
-  if (reg_info) {
-    // Volatile registers are: r0, r1, r2, r3, r9, r12, r13 (aka sp)
-    const char *name = reg_info->name;
-    if (name[0] == 'r') {
-      switch (name[1]) {
-      case '0':
-        return name[2] == '\0'; // r0
-      case '1':
-        switch (name[2]) {
-        case '\0':
-          return true; // r1
-        case '2':
-          return name[3] == '\0'; // r12
-        default:
-          break;
-        }
-        break;
-
-      case '2':
-        return name[2] == '\0'; // r2
-      case '3':
-        return name[2] == '\0'; // r3
-      default:
-        break;
-      }
-    } else if (name[0] == 'd') {
-      switch (name[1]) {
-      case '0':
-        return name[2] == '\0'; // d0 is volatile
-
-      case '1':
-        switch (name[2]) {
-        case '\0':
-          return true; // d1 is volatile
-        case '6':
-        case '7':
-        case '8':
-        case '9':
-          return name[3] == '\0'; // d16 - d19 are volatile
-        default:
-          break;
-        }
-        break;
-
-      case '2':
-        switch (name[2]) {
-        case '\0':
-          return true; // d2 is volatile
-        case '0':
-        case '1':
-        case '2':
-        case '3':
-        case '4':
-        case '5':
-        case '6':
-        case '7':
-        case '8':
-        case '9':
-          return name[3] == '\0'; // d20 - d29 are volatile
-        default:
-          break;
-        }
-        break;
-
-      case '3':
-        switch (name[2]) {
-        case '\0':
-          return true; // d3 is volatile
-        case '0':
-        case '1':
-          return name[3] == '\0'; // d30 - d31 are volatile
-        default:
-          break;
-        }
-        break;
-      case '4':
-      case '5':
-      case '6':
-      case '7':
-        return name[2] == '\0'; // d4 - d7 are volatile
-
-      default:
-        break;
-      }
-    } else if (name[0] == 's') {
-      switch (name[1]) {
-      case '0':
-        return name[2] == '\0'; // s0 is volatile
-
-      case '1':
-        switch (name[2]) {
-        case '\0':
-          return true; // s1 is volatile
-        case '0':
-        case '1':
-        case '2':
-        case '3':
-        case '4':
-        case '5':
-          return name[3] == '\0'; // s10 - s15 are volatile
-        default:
-          break;
-        }
-        break;
-
-      case '2':
-      case '3':
-      case '4':
-      case '5':
-      case '6':
-      case '7':
-      case '8':
-      case '9':
-        return name[2] == '\0'; // s2 - s9 are volatile
-
-      default:
-        break;
-      }
-    } else if (name[0] == 'q') {
-      switch (name[1]) {
-      case '1':
-        switch (name[2]) {
-        case '\0':
-          return true; // q1 is volatile
-        case '0':
-        case '1':
-        case '2':
-        case '3':
-        case '4':
-        case '5':
-          return true; // q10-q15 are volatile
-        default:
-          return false;
-        }
-        break;
-
-      case '0':
-      case '2':
-      case '3':
-        return name[2] == '\0'; // q0-q3 are volatile
-      case '8':
-      case '9':
-        return name[2] == '\0'; // q8-q9 are volatile
-      default:
-        break;
-      }
-    } else if (name[0] == 's' && name[1] == 'p' && name[2] == '\0')
-      return true;
-  }
-  return false;
-}
-
-void ABISysV_arm::Initialize() {
-  PluginManager::RegisterPlugin(GetPluginNameStatic(),
-                                "SysV ABI for arm targets", CreateInstance);
-}
-
-void ABISysV_arm::Terminate() {
-  PluginManager::UnregisterPlugin(CreateInstance);
-}
-
-lldb_private::ConstString ABISysV_arm::GetPluginNameStatic() {
-  static ConstString g_name("SysV-arm");
-  return g_name;
-}
-
-// PluginInterface protocol
-
-lldb_private::ConstString ABISysV_arm::GetPluginName() {
-  return GetPluginNameStatic();
-}
-
-uint32_t ABISysV_arm::GetPluginVersion() { return 1; }
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.h b/gnu/llvm/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.h
deleted file mode 100644 (file)
index 60fb14b..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-//===-- ABISysV_arm.h ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_ABISysV_arm_h_
-#define liblldb_ABISysV_arm_h_
-
-#include "lldb/Target/ABI.h"
-#include "lldb/lldb-private.h"
-
-class ABISysV_arm : public lldb_private::ABI {
-public:
-  ~ABISysV_arm() override = default;
-
-  size_t GetRedZoneSize() const override;
-
-  bool PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp,
-                          lldb::addr_t func_addr, lldb::addr_t returnAddress,
-                          llvm::ArrayRef<lldb::addr_t> args) const override;
-
-  bool GetArgumentValues(lldb_private::Thread &thread,
-                         lldb_private::ValueList &values) const override;
-
-  lldb_private::Status
-  SetReturnValueObject(lldb::StackFrameSP &frame_sp,
-                       lldb::ValueObjectSP &new_value) override;
-
-  bool
-  CreateFunctionEntryUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
-  bool CreateDefaultUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
-  bool RegisterIsVolatile(const lldb_private::RegisterInfo *reg_info) override;
-
-  bool CallFrameAddressIsValid(lldb::addr_t cfa) override {
-    // Make sure the stack call frame addresses are are 4 byte aligned
-    if (cfa & (4ull - 1ull))
-      return false; // Not 4 byte aligned
-    if (cfa == 0)
-      return false; // Zero is not a valid stack address
-    return true;
-  }
-
-  bool CodeAddressIsValid(lldb::addr_t pc) override {
-    // Just make sure the address is a valid 32 bit address. Bit zero
-    // might be set due to Thumb function calls, so don't enforce 2 byte
-    // alignment
-    return pc <= UINT32_MAX;
-  }
-
-  lldb::addr_t FixCodeAddress(lldb::addr_t pc) override {
-    // ARM uses bit zero to signify a code address is thumb, so we must
-    // strip bit zero in any code addresses.
-    return pc & ~(lldb::addr_t)1;
-  }
-
-  const lldb_private::RegisterInfo *
-  GetRegisterInfoArray(uint32_t &count) override;
-
-  bool IsArmHardFloat(lldb_private::Thread &thread) const;
-
-  // Static Functions
-
-  static void Initialize();
-
-  static void Terminate();
-
-  static lldb::ABISP CreateInstance(lldb::ProcessSP process_sp, const lldb_private::ArchSpec &arch);
-
-  static lldb_private::ConstString GetPluginNameStatic();
-
-  // PluginInterface protocol
-
-  lldb_private::ConstString GetPluginName() override;
-
-  uint32_t GetPluginVersion() override;
-
-protected:
-  lldb::ValueObjectSP
-  GetReturnValueObjectImpl(lldb_private::Thread &thread,
-                           lldb_private::CompilerType &ast_type) const override;
-
-private:
-  ABISysV_arm(lldb::ProcessSP process_sp,
-              std::unique_ptr<llvm::MCRegisterInfo> info_up)
-      : lldb_private::ABI(std::move(process_sp), std::move(info_up)) {
-    // Call CreateInstance instead.
-  }
-};
-
-#endif // liblldb_ABISysV_arm_h_
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-arm/CMakeLists.txt b/gnu/llvm/lldb/source/Plugins/ABI/SysV-arm/CMakeLists.txt
deleted file mode 100644 (file)
index c597904..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-add_lldb_library(lldbPluginABISysV_arm PLUGIN
-  ABISysV_arm.cpp
-
-  LINK_LIBS
-    lldbCore
-    lldbSymbol
-    lldbTarget
-    lldbPluginProcessUtility
-  LINK_COMPONENTS
-    Support
-  )
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp b/gnu/llvm/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp
deleted file mode 100644 (file)
index 89a1f2b..0000000
+++ /dev/null
@@ -1,2420 +0,0 @@
-//===-- ABISysV_arm64.cpp ---------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "ABISysV_arm64.h"
-
-#include <vector>
-
-#include "llvm/ADT/STLExtras.h"
-#include "llvm/ADT/Triple.h"
-
-#include "lldb/Core/Module.h"
-#include "lldb/Core/PluginManager.h"
-#include "lldb/Core/Value.h"
-#include "lldb/Core/ValueObjectConstResult.h"
-#include "lldb/Symbol/UnwindPlan.h"
-#include "lldb/Target/Process.h"
-#include "lldb/Target/RegisterContext.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Target/Thread.h"
-#include "lldb/Utility/ConstString.h"
-#include "lldb/Utility/Log.h"
-#include "lldb/Utility/RegisterValue.h"
-#include "lldb/Utility/Scalar.h"
-#include "lldb/Utility/Status.h"
-
-#include "Utility/ARM64_DWARF_Registers.h"
-
-using namespace lldb;
-using namespace lldb_private;
-
-static RegisterInfo g_register_infos[] = {
-    //  NAME       ALT       SZ OFF ENCODING          FORMAT
-    //  EH_FRAME             DWARF                  GENERIC
-    //  PROCESS PLUGIN          LLDB NATIVE
-    //  ========== =======   == === =============     ===================
-    //  ===================  ====================== ===========================
-    //  ======================= ======================
-    {"x0",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x0, LLDB_REGNUM_GENERIC_ARG1,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x1",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x1, LLDB_REGNUM_GENERIC_ARG2,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x2",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x2, LLDB_REGNUM_GENERIC_ARG3,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x3",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x3, LLDB_REGNUM_GENERIC_ARG4,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x4",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x4, LLDB_REGNUM_GENERIC_ARG5,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x5",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x5, LLDB_REGNUM_GENERIC_ARG6,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x6",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x6, LLDB_REGNUM_GENERIC_ARG7,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x7",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x7, LLDB_REGNUM_GENERIC_ARG8,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x8",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x8, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x9",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x9, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x10",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x10, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x11",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x11, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x12",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x12, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x13",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x13, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x14",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x14, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x15",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x15, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x16",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x16, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x17",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x17, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x18",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x18, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x19",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x19, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x20",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x20, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x21",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x21, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x22",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x22, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x23",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x23, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x24",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x24, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x25",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x25, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x26",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x26, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x27",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x27, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"x28",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x28, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"fp",
-     "x29",
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x29, LLDB_REGNUM_GENERIC_FP,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"lr",
-     "x30",
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x30, LLDB_REGNUM_GENERIC_RA,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"sp",
-     "x31",
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::x31, LLDB_REGNUM_GENERIC_SP,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"pc",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::pc, LLDB_REGNUM_GENERIC_PC,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"cpsr",
-     "psr",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::cpsr, LLDB_REGNUM_GENERIC_FLAGS,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-
-    {"v0",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v0, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v1",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v1, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v2",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v2, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v3",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v3, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v4",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v4, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v5",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v5, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v6",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v6, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v7",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v7, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v8",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v8, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v9",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v9, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v10",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v10, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v11",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v11, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v12",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v12, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v13",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v13, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v14",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v14, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v15",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v15, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v16",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v16, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v17",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v17, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v18",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v18, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v19",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v19, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v20",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v20, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v21",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v21, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v22",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v22, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v23",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v23, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v24",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v24, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v25",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v25, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v26",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v26, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v27",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v27, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v28",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v28, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v29",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v29, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v30",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v30, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"v31",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, arm64_dwarf::v31, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-
-    {"fpsr",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"fpcr",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-
-    {"s0",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s1",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s2",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s3",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s4",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s5",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s6",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s7",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s8",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s9",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s10",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s11",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s12",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s13",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s14",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s15",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s16",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s17",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s18",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s19",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s20",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s21",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s22",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s23",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s24",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s25",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s26",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s27",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s28",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s29",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s30",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"s31",
-     nullptr,
-     4,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-
-    {"d0",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d1",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d2",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d3",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d4",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d5",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d6",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d7",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d8",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d9",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d10",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d11",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d12",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d13",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d14",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d15",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d16",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d17",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d18",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d19",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d20",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d21",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d22",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d23",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d24",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d25",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d26",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d27",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d28",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d29",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d30",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"d31",
-     nullptr,
-     8,
-     0,
-     eEncodingIEEE754,
-     eFormatFloat,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0}};
-
-static const uint32_t k_num_register_infos =
-    llvm::array_lengthof(g_register_infos);
-static bool g_register_info_names_constified = false;
-
-const lldb_private::RegisterInfo *
-ABISysV_arm64::GetRegisterInfoArray(uint32_t &count) {
-  // Make the C-string names and alt_names for the register infos into const
-  // C-string values by having the ConstString unique the names in the global
-  // constant C-string pool.
-  if (!g_register_info_names_constified) {
-    g_register_info_names_constified = true;
-    for (uint32_t i = 0; i < k_num_register_infos; ++i) {
-      if (g_register_infos[i].name)
-        g_register_infos[i].name =
-            ConstString(g_register_infos[i].name).GetCString();
-      if (g_register_infos[i].alt_name)
-        g_register_infos[i].alt_name =
-            ConstString(g_register_infos[i].alt_name).GetCString();
-    }
-  }
-  count = k_num_register_infos;
-  return g_register_infos;
-}
-
-bool ABISysV_arm64::GetPointerReturnRegister(const char *&name) {
-  name = "x0";
-  return true;
-}
-
-size_t ABISysV_arm64::GetRedZoneSize() const { return 128; }
-
-// Static Functions
-
-ABISP
-ABISysV_arm64::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
-  const llvm::Triple::ArchType arch_type = arch.GetTriple().getArch();
-  const llvm::Triple::VendorType vendor_type = arch.GetTriple().getVendor();
-
-  if (vendor_type != llvm::Triple::Apple) {
-    if (arch_type == llvm::Triple::aarch64 ||
-        arch_type == llvm::Triple::aarch64_32) {
-      return ABISP(
-          new ABISysV_arm64(std::move(process_sp), MakeMCRegisterInfo(arch)));
-    }
-  }
-
-  return ABISP();
-}
-
-bool ABISysV_arm64::PrepareTrivialCall(Thread &thread, addr_t sp,
-                                       addr_t func_addr, addr_t return_addr,
-                                       llvm::ArrayRef<addr_t> args) const {
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-  if (!reg_ctx)
-    return false;
-
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
-
-  if (log) {
-    StreamString s;
-    s.Printf("ABISysV_arm64::PrepareTrivialCall (tid = 0x%" PRIx64
-             ", sp = 0x%" PRIx64 ", func_addr = 0x%" PRIx64
-             ", return_addr = 0x%" PRIx64,
-             thread.GetID(), (uint64_t)sp, (uint64_t)func_addr,
-             (uint64_t)return_addr);
-
-    for (size_t i = 0; i < args.size(); ++i)
-      s.Printf(", arg%d = 0x%" PRIx64, static_cast<int>(i + 1), args[i]);
-    s.PutCString(")");
-    log->PutString(s.GetString());
-  }
-
-  // x0 - x7 contain first 8 simple args
-  if (args.size() > 8)
-    return false;
-
-  for (size_t i = 0; i < args.size(); ++i) {
-    const RegisterInfo *reg_info = reg_ctx->GetRegisterInfo(
-        eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1 + i);
-    LLDB_LOGF(log, "About to write arg%d (0x%" PRIx64 ") into %s",
-              static_cast<int>(i + 1), args[i], reg_info->name);
-    if (!reg_ctx->WriteRegisterFromUnsigned(reg_info, args[i]))
-      return false;
-  }
-
-  // Set "lr" to the return address
-  if (!reg_ctx->WriteRegisterFromUnsigned(
-          reg_ctx->GetRegisterInfo(eRegisterKindGeneric,
-                                   LLDB_REGNUM_GENERIC_RA),
-          return_addr))
-    return false;
-
-  // Set "sp" to the requested value
-  if (!reg_ctx->WriteRegisterFromUnsigned(
-          reg_ctx->GetRegisterInfo(eRegisterKindGeneric,
-                                   LLDB_REGNUM_GENERIC_SP),
-          sp))
-    return false;
-
-  // Set "pc" to the address requested
-  if (!reg_ctx->WriteRegisterFromUnsigned(
-          reg_ctx->GetRegisterInfo(eRegisterKindGeneric,
-                                   LLDB_REGNUM_GENERIC_PC),
-          func_addr))
-    return false;
-
-  return true;
-}
-
-// TODO: We dont support fp/SIMD arguments in v0-v7
-bool ABISysV_arm64::GetArgumentValues(Thread &thread, ValueList &values) const {
-  uint32_t num_values = values.GetSize();
-
-  ExecutionContext exe_ctx(thread.shared_from_this());
-
-  // Extract the register context so we can read arguments from registers
-
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-
-  if (!reg_ctx)
-    return false;
-
-  addr_t sp = 0;
-
-  for (uint32_t value_idx = 0; value_idx < num_values; ++value_idx) {
-    // We currently only support extracting values with Clang QualTypes. Do we
-    // care about others?
-    Value *value = values.GetValueAtIndex(value_idx);
-
-    if (!value)
-      return false;
-
-    CompilerType value_type = value->GetCompilerType();
-    if (value_type) {
-      bool is_signed = false;
-      size_t bit_width = 0;
-      llvm::Optional<uint64_t> bit_size = value_type.GetBitSize(&thread);
-      if (!bit_size)
-        return false;
-      if (value_type.IsIntegerOrEnumerationType(is_signed)) {
-        bit_width = *bit_size;
-      } else if (value_type.IsPointerOrReferenceType()) {
-        bit_width = *bit_size;
-      } else {
-        // We only handle integer, pointer and reference types currently...
-        return false;
-      }
-
-      if (bit_width <= (exe_ctx.GetProcessRef().GetAddressByteSize() * 8)) {
-        if (value_idx < 8) {
-          // Arguments 1-8 are in x0-x7...
-          const RegisterInfo *reg_info = nullptr;
-          reg_info = reg_ctx->GetRegisterInfo(
-              eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1 + value_idx);
-
-          if (reg_info) {
-            RegisterValue reg_value;
-
-            if (reg_ctx->ReadRegister(reg_info, reg_value)) {
-              if (is_signed)
-                reg_value.SignExtend(bit_width);
-              if (!reg_value.GetScalarValue(value->GetScalar()))
-                return false;
-              continue;
-            }
-          }
-          return false;
-        } else {
-          // TODO: Verify for stack layout for SysV
-          if (sp == 0) {
-            // Read the stack pointer if we already haven't read it
-            sp = reg_ctx->GetSP(0);
-            if (sp == 0)
-              return false;
-          }
-
-          // Arguments 5 on up are on the stack
-          const uint32_t arg_byte_size = (bit_width + (8 - 1)) / 8;
-          Status error;
-          if (!exe_ctx.GetProcessRef().ReadScalarIntegerFromMemory(
-                  sp, arg_byte_size, is_signed, value->GetScalar(), error))
-            return false;
-
-          sp += arg_byte_size;
-          // Align up to the next 8 byte boundary if needed
-          if (sp % 8) {
-            sp >>= 3;
-            sp += 1;
-            sp <<= 3;
-          }
-        }
-      }
-    }
-  }
-  return true;
-}
-
-Status ABISysV_arm64::SetReturnValueObject(lldb::StackFrameSP &frame_sp,
-                                           lldb::ValueObjectSP &new_value_sp) {
-  Status error;
-  if (!new_value_sp) {
-    error.SetErrorString("Empty value object for return value.");
-    return error;
-  }
-
-  CompilerType return_value_type = new_value_sp->GetCompilerType();
-  if (!return_value_type) {
-    error.SetErrorString("Null clang type for return value.");
-    return error;
-  }
-
-  Thread *thread = frame_sp->GetThread().get();
-
-  RegisterContext *reg_ctx = thread->GetRegisterContext().get();
-
-  if (reg_ctx) {
-    DataExtractor data;
-    Status data_error;
-    const uint64_t byte_size = new_value_sp->GetData(data, data_error);
-    if (data_error.Fail()) {
-      error.SetErrorStringWithFormat(
-          "Couldn't convert return value to raw data: %s",
-          data_error.AsCString());
-      return error;
-    }
-
-    const uint32_t type_flags = return_value_type.GetTypeInfo(nullptr);
-    if (type_flags & eTypeIsScalar || type_flags & eTypeIsPointer) {
-      if (type_flags & eTypeIsInteger || type_flags & eTypeIsPointer) {
-        // Extract the register context so we can read arguments from registers
-        lldb::offset_t offset = 0;
-        if (byte_size <= 16) {
-          const RegisterInfo *x0_info = reg_ctx->GetRegisterInfo(
-              eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1);
-          if (byte_size <= 8) {
-            uint64_t raw_value = data.GetMaxU64(&offset, byte_size);
-
-            if (!reg_ctx->WriteRegisterFromUnsigned(x0_info, raw_value))
-              error.SetErrorString("failed to write register x0");
-          } else {
-            uint64_t raw_value = data.GetMaxU64(&offset, 8);
-
-            if (reg_ctx->WriteRegisterFromUnsigned(x0_info, raw_value)) {
-              const RegisterInfo *x1_info = reg_ctx->GetRegisterInfo(
-                  eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG2);
-              raw_value = data.GetMaxU64(&offset, byte_size - offset);
-
-              if (!reg_ctx->WriteRegisterFromUnsigned(x1_info, raw_value))
-                error.SetErrorString("failed to write register x1");
-            }
-          }
-        } else {
-          error.SetErrorString("We don't support returning longer than 128 bit "
-                               "integer values at present.");
-        }
-      } else if (type_flags & eTypeIsFloat) {
-        if (type_flags & eTypeIsComplex) {
-          // Don't handle complex yet.
-          error.SetErrorString(
-              "returning complex float values are not supported");
-        } else {
-          const RegisterInfo *v0_info = reg_ctx->GetRegisterInfoByName("v0", 0);
-
-          if (v0_info) {
-            if (byte_size <= 16) {
-              if (byte_size <= RegisterValue::GetMaxByteSize()) {
-                RegisterValue reg_value;
-                error = reg_value.SetValueFromData(v0_info, data, 0, true);
-                if (error.Success()) {
-                  if (!reg_ctx->WriteRegister(v0_info, reg_value))
-                    error.SetErrorString("failed to write register v0");
-                }
-              } else {
-                error.SetErrorStringWithFormat(
-                    "returning float values with a byte size of %" PRIu64
-                    " are not supported",
-                    byte_size);
-              }
-            } else {
-              error.SetErrorString("returning float values longer than 128 "
-                                   "bits are not supported");
-            }
-          } else {
-            error.SetErrorString("v0 register is not available on this target");
-          }
-        }
-      }
-    } else if (type_flags & eTypeIsVector) {
-      if (byte_size > 0) {
-        const RegisterInfo *v0_info = reg_ctx->GetRegisterInfoByName("v0", 0);
-
-        if (v0_info) {
-          if (byte_size <= v0_info->byte_size) {
-            RegisterValue reg_value;
-            error = reg_value.SetValueFromData(v0_info, data, 0, true);
-            if (error.Success()) {
-              if (!reg_ctx->WriteRegister(v0_info, reg_value))
-                error.SetErrorString("failed to write register v0");
-            }
-          }
-        }
-      }
-    }
-  } else {
-    error.SetErrorString("no registers are available");
-  }
-
-  return error;
-}
-
-bool ABISysV_arm64::CreateFunctionEntryUnwindPlan(UnwindPlan &unwind_plan) {
-  unwind_plan.Clear();
-  unwind_plan.SetRegisterKind(eRegisterKindDWARF);
-
-  uint32_t lr_reg_num = arm64_dwarf::lr;
-  uint32_t sp_reg_num = arm64_dwarf::sp;
-
-  UnwindPlan::RowSP row(new UnwindPlan::Row);
-
-  // Our previous Call Frame Address is the stack pointer
-  row->GetCFAValue().SetIsRegisterPlusOffset(sp_reg_num, 0);
-
-  unwind_plan.AppendRow(row);
-  unwind_plan.SetReturnAddressRegister(lr_reg_num);
-
-  // All other registers are the same.
-
-  unwind_plan.SetSourceName("arm64 at-func-entry default");
-  unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
-  unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
-  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
-
-  return true;
-}
-
-bool ABISysV_arm64::CreateDefaultUnwindPlan(UnwindPlan &unwind_plan) {
-  unwind_plan.Clear();
-  unwind_plan.SetRegisterKind(eRegisterKindDWARF);
-
-  uint32_t fp_reg_num = arm64_dwarf::fp;
-  uint32_t pc_reg_num = arm64_dwarf::pc;
-
-  UnwindPlan::RowSP row(new UnwindPlan::Row);
-  const int32_t ptr_size = 8;
-
-  row->GetCFAValue().SetIsRegisterPlusOffset(fp_reg_num, 2 * ptr_size);
-  row->SetOffset(0);
-
-  row->SetRegisterLocationToAtCFAPlusOffset(fp_reg_num, ptr_size * -2, true);
-  row->SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, ptr_size * -1, true);
-
-  unwind_plan.AppendRow(row);
-  unwind_plan.SetSourceName("arm64 default unwind plan");
-  unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
-  unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
-  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
-
-  return true;
-}
-
-// AAPCS64 (Procedure Call Standard for the ARM 64-bit Architecture) says
-// registers x19 through x28 and sp are callee preserved. v8-v15 are non-
-// volatile (and specifically only the lower 8 bytes of these regs), the rest
-// of the fp/SIMD registers are volatile.
-
-// We treat x29 as callee preserved also, else the unwinder won't try to
-// retrieve fp saves.
-
-bool ABISysV_arm64::RegisterIsVolatile(const RegisterInfo *reg_info) {
-  if (reg_info) {
-    const char *name = reg_info->name;
-
-    // Sometimes we'll be called with the "alternate" name for these registers;
-    // recognize them as non-volatile.
-
-    if (name[0] == 'p' && name[1] == 'c') // pc
-      return false;
-    if (name[0] == 'f' && name[1] == 'p') // fp
-      return false;
-    if (name[0] == 's' && name[1] == 'p') // sp
-      return false;
-    if (name[0] == 'l' && name[1] == 'r') // lr
-      return false;
-
-    if (name[0] == 'x' || name[0] == 'r') {
-      // Volatile registers: x0-x18
-      // Although documentation says only x19-28 + sp are callee saved We ll
-      // also have to treat x30 as non-volatile. Each dwarf frame has its own
-      // value of lr. Return false for the non-volatile gpr regs, true for
-      // everything else
-      switch (name[1]) {
-      case '1':
-        switch (name[2]) {
-        case '9':
-          return false; // x19 is non-volatile
-        default:
-          return true;
-        }
-        break;
-      case '2':
-        switch (name[2]) {
-        case '0':
-        case '1':
-        case '2':
-        case '3':
-        case '4':
-        case '5':
-        case '6':
-        case '7':
-        case '8':
-          return false; // x20 - 28 are non-volatile
-        case '9':
-          return false; // x29 aka fp treat as non-volatile
-        default:
-          return true;
-        }
-      case '3': // x30 (lr) and x31 (sp) treat as non-volatile
-        if (name[2] == '0' || name[2] == '1')
-          return false;
-        break;
-      default:
-        return true; // all volatile cases not handled above fall here.
-      }
-    } else if (name[0] == 'v' || name[0] == 's' || name[0] == 'd') {
-      // Volatile registers: v0-7, v16-v31
-      // Return false for non-volatile fp/SIMD regs, true for everything else
-      switch (name[1]) {
-      case '8':
-      case '9':
-        return false; // v8-v9 are non-volatile
-      case '1':
-        switch (name[2]) {
-        case '0':
-        case '1':
-        case '2':
-        case '3':
-        case '4':
-        case '5':
-          return false; // v10-v15 are non-volatile
-        default:
-          return true;
-        }
-      default:
-        return true;
-      }
-    }
-  }
-  return true;
-}
-
-static bool LoadValueFromConsecutiveGPRRegisters(
-    ExecutionContext &exe_ctx, RegisterContext *reg_ctx,
-    const CompilerType &value_type,
-    bool is_return_value, // false => parameter, true => return value
-    uint32_t &NGRN,       // NGRN (see ABI documentation)
-    uint32_t &NSRN,       // NSRN (see ABI documentation)
-    DataExtractor &data) {
-  llvm::Optional<uint64_t> byte_size = value_type.GetByteSize(nullptr);
-
-  if (byte_size || *byte_size == 0)
-    return false;
-
-  std::unique_ptr<DataBufferHeap> heap_data_up(
-      new DataBufferHeap(*byte_size, 0));
-  const ByteOrder byte_order = exe_ctx.GetProcessRef().GetByteOrder();
-  Status error;
-
-  CompilerType base_type;
-  const uint32_t homogeneous_count =
-      value_type.IsHomogeneousAggregate(&base_type);
-  if (homogeneous_count > 0 && homogeneous_count <= 8) {
-    // Make sure we have enough registers
-    if (NSRN < 8 && (8 - NSRN) >= homogeneous_count) {
-      if (!base_type)
-        return false;
-      llvm::Optional<uint64_t> base_byte_size = base_type.GetByteSize(nullptr);
-      if (!base_byte_size)
-        return false;
-      uint32_t data_offset = 0;
-
-      for (uint32_t i = 0; i < homogeneous_count; ++i) {
-        char v_name[8];
-        ::snprintf(v_name, sizeof(v_name), "v%u", NSRN);
-        const RegisterInfo *reg_info =
-            reg_ctx->GetRegisterInfoByName(v_name, 0);
-        if (reg_info == nullptr)
-          return false;
-
-        if (*base_byte_size > reg_info->byte_size)
-          return false;
-
-        RegisterValue reg_value;
-
-        if (!reg_ctx->ReadRegister(reg_info, reg_value))
-          return false;
-
-        // Make sure we have enough room in "heap_data_up"
-        if ((data_offset + *base_byte_size) <= heap_data_up->GetByteSize()) {
-          const size_t bytes_copied = reg_value.GetAsMemoryData(
-              reg_info, heap_data_up->GetBytes() + data_offset, *base_byte_size,
-              byte_order, error);
-          if (bytes_copied != *base_byte_size)
-            return false;
-          data_offset += bytes_copied;
-          ++NSRN;
-        } else
-          return false;
-      }
-      data.SetByteOrder(byte_order);
-      data.SetAddressByteSize(exe_ctx.GetProcessRef().GetAddressByteSize());
-      data.SetData(DataBufferSP(heap_data_up.release()));
-      return true;
-    }
-  }
-
-  const size_t max_reg_byte_size = 16;
-  if (*byte_size <= max_reg_byte_size) {
-    size_t bytes_left = *byte_size;
-    uint32_t data_offset = 0;
-    while (data_offset < *byte_size) {
-      if (NGRN >= 8)
-        return false;
-
-      const RegisterInfo *reg_info = reg_ctx->GetRegisterInfo(
-          eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1 + NGRN);
-      if (reg_info == nullptr)
-        return false;
-
-      RegisterValue reg_value;
-
-      if (!reg_ctx->ReadRegister(reg_info, reg_value))
-        return false;
-
-      const size_t curr_byte_size = std::min<size_t>(8, bytes_left);
-      const size_t bytes_copied = reg_value.GetAsMemoryData(
-          reg_info, heap_data_up->GetBytes() + data_offset, curr_byte_size,
-          byte_order, error);
-      if (bytes_copied == 0)
-        return false;
-      if (bytes_copied >= bytes_left)
-        break;
-      data_offset += bytes_copied;
-      bytes_left -= bytes_copied;
-      ++NGRN;
-    }
-  } else {
-    const RegisterInfo *reg_info = nullptr;
-    if (is_return_value) {
-      // We are assuming we are decoding this immediately after returning from
-      // a function call and that the address of the structure is in x8
-      reg_info = reg_ctx->GetRegisterInfoByName("x8", 0);
-    } else {
-      // We are assuming we are stopped at the first instruction in a function
-      // and that the ABI is being respected so all parameters appear where
-      // they should be (functions with no external linkage can legally violate
-      // the ABI).
-      if (NGRN >= 8)
-        return false;
-
-      reg_info = reg_ctx->GetRegisterInfo(eRegisterKindGeneric,
-                                          LLDB_REGNUM_GENERIC_ARG1 + NGRN);
-      if (reg_info == nullptr)
-        return false;
-      ++NGRN;
-    }
-
-    if (reg_info == nullptr)
-      return false;
-
-    const lldb::addr_t value_addr =
-        reg_ctx->ReadRegisterAsUnsigned(reg_info, LLDB_INVALID_ADDRESS);
-
-    if (value_addr == LLDB_INVALID_ADDRESS)
-      return false;
-
-    if (exe_ctx.GetProcessRef().ReadMemory(
-            value_addr, heap_data_up->GetBytes(), heap_data_up->GetByteSize(),
-            error) != heap_data_up->GetByteSize()) {
-      return false;
-    }
-  }
-
-  data.SetByteOrder(byte_order);
-  data.SetAddressByteSize(exe_ctx.GetProcessRef().GetAddressByteSize());
-  data.SetData(DataBufferSP(heap_data_up.release()));
-  return true;
-}
-
-ValueObjectSP ABISysV_arm64::GetReturnValueObjectImpl(
-    Thread &thread, CompilerType &return_compiler_type) const {
-  ValueObjectSP return_valobj_sp;
-  Value value;
-
-  ExecutionContext exe_ctx(thread.shared_from_this());
-  if (exe_ctx.GetTargetPtr() == nullptr || exe_ctx.GetProcessPtr() == nullptr)
-    return return_valobj_sp;
-
-  // value.SetContext (Value::eContextTypeClangType, return_compiler_type);
-  value.SetCompilerType(return_compiler_type);
-
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-  if (!reg_ctx)
-    return return_valobj_sp;
-
-  llvm::Optional<uint64_t> byte_size =
-      return_compiler_type.GetByteSize(nullptr);
-  if (!byte_size)
-    return return_valobj_sp;
-
-  const uint32_t type_flags = return_compiler_type.GetTypeInfo(nullptr);
-  if (type_flags & eTypeIsScalar || type_flags & eTypeIsPointer) {
-    value.SetValueType(Value::eValueTypeScalar);
-
-    bool success = false;
-    if (type_flags & eTypeIsInteger || type_flags & eTypeIsPointer) {
-      // Extract the register context so we can read arguments from registers
-      if (*byte_size <= 8) {
-        const RegisterInfo *x0_reg_info = nullptr;
-        x0_reg_info = reg_ctx->GetRegisterInfo(eRegisterKindGeneric,
-                                               LLDB_REGNUM_GENERIC_ARG1);
-        if (x0_reg_info) {
-          uint64_t raw_value =
-              thread.GetRegisterContext()->ReadRegisterAsUnsigned(x0_reg_info,
-                                                                  0);
-          const bool is_signed = (type_flags & eTypeIsSigned) != 0;
-          switch (*byte_size) {
-          default:
-            break;
-          case 16: // uint128_t
-            // In register x0 and x1
-            {
-              const RegisterInfo *x1_reg_info = nullptr;
-              x1_reg_info = reg_ctx->GetRegisterInfo(eRegisterKindGeneric,
-                                                     LLDB_REGNUM_GENERIC_ARG2);
-
-              if (x1_reg_info) {
-                if (*byte_size <=
-                    x0_reg_info->byte_size + x1_reg_info->byte_size) {
-                  std::unique_ptr<DataBufferHeap> heap_data_up(
-                      new DataBufferHeap(*byte_size, 0));
-                  const ByteOrder byte_order =
-                      exe_ctx.GetProcessRef().GetByteOrder();
-                  RegisterValue x0_reg_value;
-                  RegisterValue x1_reg_value;
-                  if (reg_ctx->ReadRegister(x0_reg_info, x0_reg_value) &&
-                      reg_ctx->ReadRegister(x1_reg_info, x1_reg_value)) {
-                    Status error;
-                    if (x0_reg_value.GetAsMemoryData(
-                            x0_reg_info, heap_data_up->GetBytes() + 0, 8,
-                            byte_order, error) &&
-                        x1_reg_value.GetAsMemoryData(
-                            x1_reg_info, heap_data_up->GetBytes() + 8, 8,
-                            byte_order, error)) {
-                      DataExtractor data(
-                          DataBufferSP(heap_data_up.release()), byte_order,
-                          exe_ctx.GetProcessRef().GetAddressByteSize());
-
-                      return_valobj_sp = ValueObjectConstResult::Create(
-                          &thread, return_compiler_type, ConstString(""), data);
-                      return return_valobj_sp;
-                    }
-                  }
-                }
-              }
-            }
-            break;
-          case sizeof(uint64_t):
-            if (is_signed)
-              value.GetScalar() = (int64_t)(raw_value);
-            else
-              value.GetScalar() = (uint64_t)(raw_value);
-            success = true;
-            break;
-
-          case sizeof(uint32_t):
-            if (is_signed)
-              value.GetScalar() = (int32_t)(raw_value & UINT32_MAX);
-            else
-              value.GetScalar() = (uint32_t)(raw_value & UINT32_MAX);
-            success = true;
-            break;
-
-          case sizeof(uint16_t):
-            if (is_signed)
-              value.GetScalar() = (int16_t)(raw_value & UINT16_MAX);
-            else
-              value.GetScalar() = (uint16_t)(raw_value & UINT16_MAX);
-            success = true;
-            break;
-
-          case sizeof(uint8_t):
-            if (is_signed)
-              value.GetScalar() = (int8_t)(raw_value & UINT8_MAX);
-            else
-              value.GetScalar() = (uint8_t)(raw_value & UINT8_MAX);
-            success = true;
-            break;
-          }
-        }
-      }
-    } else if (type_flags & eTypeIsFloat) {
-      if (type_flags & eTypeIsComplex) {
-        // Don't handle complex yet.
-      } else {
-        if (*byte_size <= sizeof(long double)) {
-          const RegisterInfo *v0_reg_info =
-              reg_ctx->GetRegisterInfoByName("v0", 0);
-          RegisterValue v0_value;
-          if (reg_ctx->ReadRegister(v0_reg_info, v0_value)) {
-            DataExtractor data;
-            if (v0_value.GetData(data)) {
-              lldb::offset_t offset = 0;
-              if (*byte_size == sizeof(float)) {
-                value.GetScalar() = data.GetFloat(&offset);
-                success = true;
-              } else if (*byte_size == sizeof(double)) {
-                value.GetScalar() = data.GetDouble(&offset);
-                success = true;
-              } else if (*byte_size == sizeof(long double)) {
-                value.GetScalar() = data.GetLongDouble(&offset);
-                success = true;
-              }
-            }
-          }
-        }
-      }
-    }
-
-    if (success)
-      return_valobj_sp = ValueObjectConstResult::Create(
-          thread.GetStackFrameAtIndex(0).get(), value, ConstString(""));
-  } else if (type_flags & eTypeIsVector && *byte_size <= 16) {
-    if (*byte_size > 0) {
-      const RegisterInfo *v0_info = reg_ctx->GetRegisterInfoByName("v0", 0);
-
-      if (v0_info) {
-        std::unique_ptr<DataBufferHeap> heap_data_up(
-            new DataBufferHeap(*byte_size, 0));
-        const ByteOrder byte_order = exe_ctx.GetProcessRef().GetByteOrder();
-        RegisterValue reg_value;
-        if (reg_ctx->ReadRegister(v0_info, reg_value)) {
-          Status error;
-          if (reg_value.GetAsMemoryData(v0_info, heap_data_up->GetBytes(),
-                                        heap_data_up->GetByteSize(), byte_order,
-                                        error)) {
-            DataExtractor data(DataBufferSP(heap_data_up.release()), byte_order,
-                               exe_ctx.GetProcessRef().GetAddressByteSize());
-            return_valobj_sp = ValueObjectConstResult::Create(
-                &thread, return_compiler_type, ConstString(""), data);
-          }
-        }
-      }
-    }
-  } else if (type_flags & eTypeIsStructUnion || type_flags & eTypeIsClass ||
-             (type_flags & eTypeIsVector && *byte_size > 16)) {
-    DataExtractor data;
-
-    uint32_t NGRN = 0; // Search ABI docs for NGRN
-    uint32_t NSRN = 0; // Search ABI docs for NSRN
-    const bool is_return_value = true;
-    if (LoadValueFromConsecutiveGPRRegisters(
-            exe_ctx, reg_ctx, return_compiler_type, is_return_value, NGRN, NSRN,
-            data)) {
-      return_valobj_sp = ValueObjectConstResult::Create(
-          &thread, return_compiler_type, ConstString(""), data);
-    }
-  }
-  return return_valobj_sp;
-}
-
-void ABISysV_arm64::Initialize() {
-  PluginManager::RegisterPlugin(GetPluginNameStatic(),
-                                "SysV ABI for AArch64 targets", CreateInstance);
-}
-
-void ABISysV_arm64::Terminate() {
-  PluginManager::UnregisterPlugin(CreateInstance);
-}
-
-lldb_private::ConstString ABISysV_arm64::GetPluginNameStatic() {
-  static ConstString g_name("SysV-arm64");
-  return g_name;
-}
-
-// PluginInterface protocol
-
-ConstString ABISysV_arm64::GetPluginName() { return GetPluginNameStatic(); }
-
-uint32_t ABISysV_arm64::GetPluginVersion() { return 1; }
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.h b/gnu/llvm/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.h
deleted file mode 100644 (file)
index 1bf5773..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-//===-- ABISysV_arm64.h ---------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_ABISysV_arm64_h_
-#define liblldb_ABISysV_arm64_h_
-
-#include "lldb/Target/ABI.h"
-#include "lldb/lldb-private.h"
-
-class ABISysV_arm64 : public lldb_private::ABI {
-public:
-  ~ABISysV_arm64() override = default;
-
-  size_t GetRedZoneSize() const override;
-
-  bool PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp,
-                          lldb::addr_t functionAddress,
-                          lldb::addr_t returnAddress,
-                          llvm::ArrayRef<lldb::addr_t> args) const override;
-
-  bool GetArgumentValues(lldb_private::Thread &thread,
-                         lldb_private::ValueList &values) const override;
-
-  lldb_private::Status
-  SetReturnValueObject(lldb::StackFrameSP &frame_sp,
-                       lldb::ValueObjectSP &new_value) override;
-
-  bool
-  CreateFunctionEntryUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
-  bool CreateDefaultUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
-  bool RegisterIsVolatile(const lldb_private::RegisterInfo *reg_info) override;
-
-  // The arm64 ABI requires that stack frames be 16 byte aligned.
-  // When there is a trap handler on the stack, e.g. _sigtramp in userland
-  // code, we've seen that the stack pointer is often not aligned properly
-  // before the handler is invoked.  This means that lldb will stop the unwind
-  // early -- before the function which caused the trap.
-  //
-  // To work around this, we relax that alignment to be just word-size
-  // (8-bytes).
-  // Whitelisting the trap handlers for user space would be easy (_sigtramp) but
-  // in other environments there can be a large number of different functions
-  // involved in async traps.
-  bool CallFrameAddressIsValid(lldb::addr_t cfa) override {
-    // Make sure the stack call frame addresses are are 8 byte aligned
-    if (cfa & (8ull - 1ull))
-      return false; // Not 8 byte aligned
-    if (cfa == 0)
-      return false; // Zero is not a valid stack address
-    return true;
-  }
-
-  bool CodeAddressIsValid(lldb::addr_t pc) override {
-    if (pc & (4ull - 1ull))
-      return false; // Not 4 byte aligned
-
-    // Anything else if fair game..
-    return true;
-  }
-
-  const lldb_private::RegisterInfo *
-  GetRegisterInfoArray(uint32_t &count) override;
-
-  bool GetPointerReturnRegister(const char *&name) override;
-
-  // Static Functions
-
-  static void Initialize();
-
-  static void Terminate();
-
-  static lldb::ABISP CreateInstance(lldb::ProcessSP process_sp, const lldb_private::ArchSpec &arch);
-
-  static lldb_private::ConstString GetPluginNameStatic();
-
-  // PluginInterface protocol
-
-  lldb_private::ConstString GetPluginName() override;
-
-  uint32_t GetPluginVersion() override;
-
-protected:
-  lldb::ValueObjectSP
-  GetReturnValueObjectImpl(lldb_private::Thread &thread,
-                           lldb_private::CompilerType &ast_type) const override;
-
-private:
-  ABISysV_arm64(lldb::ProcessSP process_sp,
-                std::unique_ptr<llvm::MCRegisterInfo> info_up)
-      : lldb_private::ABI(std::move(process_sp), std::move(info_up)) {
-    // Call CreateInstance instead.
-  }
-};
-
-#endif // liblldb_ABISysV_arm64_h_
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-arm64/CMakeLists.txt b/gnu/llvm/lldb/source/Plugins/ABI/SysV-arm64/CMakeLists.txt
deleted file mode 100644 (file)
index 077b394..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-add_lldb_library(lldbPluginABISysV_arm64 PLUGIN
-  ABISysV_arm64.cpp
-
-  LINK_LIBS
-    lldbCore
-    lldbSymbol
-    lldbTarget
-  LINK_COMPONENTS
-    Support
-  )
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp b/gnu/llvm/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp
deleted file mode 100644 (file)
index 34d9258..0000000
+++ /dev/null
@@ -1,1355 +0,0 @@
-//===-- ABISysV_hexagon.cpp -------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "ABISysV_hexagon.h"
-
-#include "llvm/ADT/Triple.h"
-#include "llvm/IR/DerivedTypes.h"
-
-#include "lldb/Core/Module.h"
-#include "lldb/Core/PluginManager.h"
-#include "lldb/Core/Value.h"
-#include "lldb/Core/ValueObjectConstResult.h"
-#include "lldb/Core/ValueObjectMemory.h"
-#include "lldb/Core/ValueObjectRegister.h"
-#include "lldb/Symbol/UnwindPlan.h"
-#include "lldb/Target/Process.h"
-#include "lldb/Target/RegisterContext.h"
-#include "lldb/Target/StackFrame.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Target/Thread.h"
-#include "lldb/Utility/ConstString.h"
-#include "lldb/Utility/DataExtractor.h"
-#include "lldb/Utility/Log.h"
-#include "lldb/Utility/RegisterValue.h"
-#include "lldb/Utility/Status.h"
-
-using namespace lldb;
-using namespace lldb_private;
-
-static RegisterInfo g_register_infos[] = {
-    // hexagon-core.xml
-    {"r00",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {0, 0, LLDB_INVALID_REGNUM, 0, 0},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r01",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {1, 1, LLDB_INVALID_REGNUM, 1, 1},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r02",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {2, 2, LLDB_INVALID_REGNUM, 2, 2},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r03",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {3, 3, LLDB_INVALID_REGNUM, 3, 3},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r04",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {4, 4, LLDB_INVALID_REGNUM, 4, 4},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r05",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {5, 5, LLDB_INVALID_REGNUM, 5, 5},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r06",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {6, 6, LLDB_INVALID_REGNUM, 6, 6},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r07",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {7, 7, LLDB_INVALID_REGNUM, 7, 7},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r08",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {8, 8, LLDB_INVALID_REGNUM, 8, 8},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r09",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {9, 9, LLDB_INVALID_REGNUM, 9, 9},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r10",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {10, 10, LLDB_INVALID_REGNUM, 10, 10},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r11",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {11, 11, LLDB_INVALID_REGNUM, 11, 11},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r12",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {12, 12, LLDB_INVALID_REGNUM, 12, 12},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r13",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {13, 13, LLDB_INVALID_REGNUM, 13, 13},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r14",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {14, 14, LLDB_INVALID_REGNUM, 14, 14},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r15",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {15, 15, LLDB_INVALID_REGNUM, 15, 15},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r16",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {16, 16, LLDB_INVALID_REGNUM, 16, 16},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r17",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {17, 17, LLDB_INVALID_REGNUM, 17, 17},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r18",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {18, 18, LLDB_INVALID_REGNUM, 18, 18},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r19",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {19, 19, LLDB_INVALID_REGNUM, 19, 19},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r20",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {20, 20, LLDB_INVALID_REGNUM, 20, 20},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r21",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {21, 21, LLDB_INVALID_REGNUM, 21, 21},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r22",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {22, 22, LLDB_INVALID_REGNUM, 22, 22},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r23",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {23, 23, LLDB_INVALID_REGNUM, 23, 23},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r24",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {24, 24, LLDB_INVALID_REGNUM, 24, 24},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r25",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {25, 25, LLDB_INVALID_REGNUM, 25, 25},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r26",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {26, 26, LLDB_INVALID_REGNUM, 26, 26},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r27",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {27, 27, LLDB_INVALID_REGNUM, 27, 27},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r28",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {28, 28, LLDB_INVALID_REGNUM, 28, 28},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"sp",
-     "r29",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {29, 29, LLDB_REGNUM_GENERIC_SP, 29, 29},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"fp",
-     "r30",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {30, 30, LLDB_REGNUM_GENERIC_FP, 30, 30},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"lr",
-     "r31",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {31, 31, LLDB_REGNUM_GENERIC_RA, 31, 31},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"sa0",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {32, 32, LLDB_INVALID_REGNUM, 32, 32},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"lc0",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {33, 33, LLDB_INVALID_REGNUM, 33, 33},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"sa1",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {34, 34, LLDB_INVALID_REGNUM, 34, 34},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"lc1",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {35, 35, LLDB_INVALID_REGNUM, 35, 35},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    // --> hexagon-v4/5/55/56-sim.xml
-    {"p3_0",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {36, 36, LLDB_INVALID_REGNUM, 36, 36},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    // PADDING {
-    {"p00",
-     "",
-     4,
-     0,
-     eEncodingInvalid,
-     eFormatInvalid,
-     {37, 37, LLDB_INVALID_REGNUM, 37, 37},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    // }
-    {"m0",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {38, 38, LLDB_INVALID_REGNUM, 38, 38},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"m1",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {39, 39, LLDB_INVALID_REGNUM, 39, 39},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"usr",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {40, 40, LLDB_INVALID_REGNUM, 40, 40},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"pc",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {41, 41, LLDB_REGNUM_GENERIC_PC, 41, 41},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ugp",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {42, 42, LLDB_INVALID_REGNUM, 42, 42},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"gp",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {43, 43, LLDB_INVALID_REGNUM, 43, 43},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"cs0",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {44, 44, LLDB_INVALID_REGNUM, 44, 44},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"cs1",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {45, 45, LLDB_INVALID_REGNUM, 45, 45},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    // PADDING {
-    {"p01",
-     "",
-     4,
-     0,
-     eEncodingInvalid,
-     eFormatInvalid,
-     {46, 46, LLDB_INVALID_REGNUM, 46, 46},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"p02",
-     "",
-     4,
-     0,
-     eEncodingInvalid,
-     eFormatInvalid,
-     {47, 47, LLDB_INVALID_REGNUM, 47, 47},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"p03",
-     "",
-     4,
-     0,
-     eEncodingInvalid,
-     eFormatInvalid,
-     {48, 48, LLDB_INVALID_REGNUM, 48, 48},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"p04",
-     "",
-     4,
-     0,
-     eEncodingInvalid,
-     eFormatInvalid,
-     {49, 49, LLDB_INVALID_REGNUM, 49, 49},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"p05",
-     "",
-     4,
-     0,
-     eEncodingInvalid,
-     eFormatInvalid,
-     {50, 50, LLDB_INVALID_REGNUM, 50, 50},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"p06",
-     "",
-     4,
-     0,
-     eEncodingInvalid,
-     eFormatInvalid,
-     {51, 51, LLDB_INVALID_REGNUM, 51, 51},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"p07",
-     "",
-     4,
-     0,
-     eEncodingInvalid,
-     eFormatInvalid,
-     {52, 52, LLDB_INVALID_REGNUM, 52, 52},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"p08",
-     "",
-     4,
-     0,
-     eEncodingInvalid,
-     eFormatInvalid,
-     {53, 53, LLDB_INVALID_REGNUM, 53, 53},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"p09",
-     "",
-     4,
-     0,
-     eEncodingInvalid,
-     eFormatInvalid,
-     {54, 54, LLDB_INVALID_REGNUM, 54, 54},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"p10",
-     "",
-     4,
-     0,
-     eEncodingInvalid,
-     eFormatInvalid,
-     {55, 55, LLDB_INVALID_REGNUM, 55, 55},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"p11",
-     "",
-     4,
-     0,
-     eEncodingInvalid,
-     eFormatInvalid,
-     {56, 56, LLDB_INVALID_REGNUM, 56, 56},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"p12",
-     "",
-     4,
-     0,
-     eEncodingInvalid,
-     eFormatInvalid,
-     {57, 57, LLDB_INVALID_REGNUM, 57, 57},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"p13",
-     "",
-     4,
-     0,
-     eEncodingInvalid,
-     eFormatInvalid,
-     {58, 58, LLDB_INVALID_REGNUM, 58, 58},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"p14",
-     "",
-     4,
-     0,
-     eEncodingInvalid,
-     eFormatInvalid,
-     {59, 59, LLDB_INVALID_REGNUM, 59, 59},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"p15",
-     "",
-     4,
-     0,
-     eEncodingInvalid,
-     eFormatInvalid,
-     {60, 60, LLDB_INVALID_REGNUM, 60, 60},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"p16",
-     "",
-     4,
-     0,
-     eEncodingInvalid,
-     eFormatInvalid,
-     {61, 61, LLDB_INVALID_REGNUM, 61, 61},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"p17",
-     "",
-     4,
-     0,
-     eEncodingInvalid,
-     eFormatInvalid,
-     {62, 62, LLDB_INVALID_REGNUM, 62, 62},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"p18",
-     "",
-     4,
-     0,
-     eEncodingInvalid,
-     eFormatInvalid,
-     {63, 63, LLDB_INVALID_REGNUM, 63, 63},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    // }
-    {"sgp0",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {64, 64, LLDB_INVALID_REGNUM, 64, 64},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    // PADDING {
-    {"p19",
-     "",
-     4,
-     0,
-     eEncodingInvalid,
-     eFormatInvalid,
-     {65, 65, LLDB_INVALID_REGNUM, 65, 65},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    // }
-    {"stid",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {66, 66, LLDB_INVALID_REGNUM, 66, 66},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"elr",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {67, 67, LLDB_INVALID_REGNUM, 67, 67},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"badva0",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {68, 68, LLDB_INVALID_REGNUM, 68, 68},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"badva1",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {69, 69, LLDB_INVALID_REGNUM, 69, 69},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ssr",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {70, 70, LLDB_INVALID_REGNUM, 70, 70},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ccr",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {71, 71, LLDB_INVALID_REGNUM, 71, 71},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"htid",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {72, 72, LLDB_INVALID_REGNUM, 72, 72},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    // PADDING {
-    {"p20",
-     "",
-     4,
-     0,
-     eEncodingInvalid,
-     eFormatInvalid,
-     {73, 73, LLDB_INVALID_REGNUM, 73, 73},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    // }
-    {"imask",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {74, 74, LLDB_INVALID_REGNUM, 74, 74},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    // PADDING {
-    {"p21",
-     "",
-     4,
-     0,
-     eEncodingInvalid,
-     eFormatInvalid,
-     {75, 75, LLDB_INVALID_REGNUM, 75, 75},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"p22",
-     "",
-     4,
-     0,
-     eEncodingInvalid,
-     eFormatInvalid,
-     {76, 76, LLDB_INVALID_REGNUM, 76, 76},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"p23",
-     "",
-     4,
-     0,
-     eEncodingInvalid,
-     eFormatInvalid,
-     {77, 77, LLDB_INVALID_REGNUM, 77, 77},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"p24",
-     "",
-     4,
-     0,
-     eEncodingInvalid,
-     eFormatInvalid,
-     {78, 78, LLDB_INVALID_REGNUM, 78, 78},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"p25",
-     "",
-     4,
-     0,
-     eEncodingInvalid,
-     eFormatInvalid,
-     {79, 79, LLDB_INVALID_REGNUM, 79, 79},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    // }
-    {"g0",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {80, 80, LLDB_INVALID_REGNUM, 80, 80},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"g1",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {81, 81, LLDB_INVALID_REGNUM, 81, 81},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"g2",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {82, 82, LLDB_INVALID_REGNUM, 82, 82},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"g3",
-     "",
-     4,
-     0,
-     eEncodingUint,
-     eFormatAddressInfo,
-     {83, 83, LLDB_INVALID_REGNUM, 83, 83},
-     nullptr,
-     nullptr,
-     nullptr,
-     0}};
-
-static const uint32_t k_num_register_infos =
-    sizeof(g_register_infos) / sizeof(RegisterInfo);
-static bool g_register_info_names_constified = false;
-
-const lldb_private::RegisterInfo *
-ABISysV_hexagon::GetRegisterInfoArray(uint32_t &count) {
-  // Make the C-string names and alt_names for the register infos into const
-  // C-string values by having the ConstString unique the names in the global
-  // constant C-string pool.
-  if (!g_register_info_names_constified) {
-    g_register_info_names_constified = true;
-    for (uint32_t i = 0; i < k_num_register_infos; ++i) {
-      if (g_register_infos[i].name)
-        g_register_infos[i].name =
-            ConstString(g_register_infos[i].name).GetCString();
-      if (g_register_infos[i].alt_name)
-        g_register_infos[i].alt_name =
-            ConstString(g_register_infos[i].alt_name).GetCString();
-    }
-  }
-  count = k_num_register_infos;
-  return g_register_infos;
-}
-
-/*
-    http://en.wikipedia.org/wiki/Red_zone_%28computing%29
-
-    In computing, a red zone is a fixed size area in memory beyond the stack
-   pointer that has not been
-    "allocated". This region of memory is not to be modified by
-   interrupt/exception/signal handlers.
-    This allows the space to be used for temporary data without the extra
-   overhead of modifying the
-    stack pointer. The x86-64 ABI mandates a 128 byte red zone.[1] The OpenRISC
-   toolchain assumes a
-    128 byte red zone though it is not documented.
-*/
-size_t ABISysV_hexagon::GetRedZoneSize() const { return 0; }
-
-// Static Functions
-
-ABISP
-ABISysV_hexagon::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
-  if (arch.GetTriple().getArch() == llvm::Triple::hexagon) {
-    return ABISP(
-        new ABISysV_hexagon(std::move(process_sp), MakeMCRegisterInfo(arch)));
-  }
-  return ABISP();
-}
-
-bool ABISysV_hexagon::PrepareTrivialCall(Thread &thread, lldb::addr_t sp,
-                                         lldb::addr_t pc, lldb::addr_t ra,
-                                         llvm::ArrayRef<addr_t> args) const {
-  // we don't use the traditional trivial call specialized for jit
-  return false;
-}
-
-/*
-
-// AD:
-//  . safeguard the current stack
-//  . how can we know that the called function will create its own frame
-properly?
-//  . we could manually make a new stack first:
-//      2. push RA
-//      3. push FP
-//      4. FP = SP
-//      5. SP = SP ( since no locals in our temp frame )
-
-// AD 6/05/2014
-//  . variable argument list parameters are not passed via registers, they are
-passed on
-//    the stack.  This presents us with a problem, since we need to know when
-the valist
-//    starts.  Currently I can find out if a function is varg, but not how many
-//    real parameters it takes.  Thus I don't know when to start spilling the
-vargs.  For
-//    the time being, to progress, I will assume that it takes on real parameter
-before
-//    the vargs list starts.
-
-// AD 06/05/2014
-//  . how do we adhere to the stack alignment requirements
-
-// AD 06/05/2014
-//  . handle 64bit values and their register / stack requirements
-
-*/
-#define HEX_ABI_DEBUG 0
-bool ABISysV_hexagon::PrepareTrivialCall(
-    Thread &thread, lldb::addr_t sp, lldb::addr_t pc, lldb::addr_t ra,
-    llvm::Type &prototype, llvm::ArrayRef<ABI::CallArgument> args) const {
-  // default number of register passed arguments for varg functions
-  const int nVArgRegParams = 1;
-  Status error;
-
-  // grab the process so we have access to the memory for spilling
-  lldb::ProcessSP proc = thread.GetProcess();
-
-  // get the register context for modifying all of the registers
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-  if (!reg_ctx)
-    return false;
-
-  uint32_t pc_reg = reg_ctx->ConvertRegisterKindToRegisterNumber(
-      eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC);
-  if (pc_reg == LLDB_INVALID_REGNUM)
-    return false;
-
-  uint32_t ra_reg = reg_ctx->ConvertRegisterKindToRegisterNumber(
-      eRegisterKindGeneric, LLDB_REGNUM_GENERIC_RA);
-  if (ra_reg == LLDB_INVALID_REGNUM)
-    return false;
-
-  uint32_t sp_reg = reg_ctx->ConvertRegisterKindToRegisterNumber(
-      eRegisterKindGeneric, LLDB_REGNUM_GENERIC_SP);
-  if (sp_reg == LLDB_INVALID_REGNUM)
-    return false;
-
-  // push host data onto target
-  for (size_t i = 0; i < args.size(); i++) {
-    const ABI::CallArgument &arg = args[i];
-    // skip over target values
-    if (arg.type == ABI::CallArgument::TargetValue)
-      continue;
-    // round up to 8 byte multiple
-    size_t argSize = (arg.size | 0x7) + 1;
-
-    // create space on the stack for this data
-    sp -= argSize;
-
-    // write this argument onto the stack of the host process
-    proc->WriteMemory(sp, arg.data_up.get(), arg.size, error);
-    if (error.Fail())
-      return false;
-
-    // update the argument with the target pointer
-    // XXX: This is a gross hack for getting around the const
-    *const_cast<lldb::addr_t *>(&arg.value) = sp;
-  }
-
-#if HEX_ABI_DEBUG
-  // print the original stack pointer
-  printf("sp : %04" PRIx64 " \n", sp);
-#endif
-
-  // make sure number of parameters matches prototype
-  assert(prototype.getFunctionNumParams() == args.size());
-
-  // check if this is a variable argument function
-  bool isVArg = prototype.isFunctionVarArg();
-
-  // number of arguments passed by register
-  int nRegArgs = nVArgRegParams;
-  if (!isVArg) {
-    // number of arguments is limited by [R0 : R5] space
-    nRegArgs = args.size();
-    if (nRegArgs > 6)
-      nRegArgs = 6;
-  }
-
-  // pass arguments that are passed via registers
-  for (int i = 0; i < nRegArgs; i++) {
-    // get the parameter as a u32
-    uint32_t param = (uint32_t)args[i].value;
-    // write argument into register
-    if (!reg_ctx->WriteRegisterFromUnsigned(i, param))
-      return false;
-  }
-
-  // number of arguments to spill onto stack
-  int nSpillArgs = args.size() - nRegArgs;
-  // make space on the stack for arguments
-  sp -= 4 * nSpillArgs;
-  // align stack on an 8 byte boundary
-  if (sp & 7)
-    sp -= 4;
-
-  // arguments that are passed on the stack
-  for (size_t i = nRegArgs, offs = 0; i < args.size(); i++) {
-    // get the parameter as a u32
-    uint32_t param = (uint32_t)args[i].value;
-    // write argument to stack
-    proc->WriteMemory(sp + offs, (void *)&param, sizeof(param), error);
-    if (!error.Success())
-      return false;
-    //
-    offs += 4;
-  }
-
-  // update registers with current function call state
-  reg_ctx->WriteRegisterFromUnsigned(pc_reg, pc);
-  reg_ctx->WriteRegisterFromUnsigned(ra_reg, ra);
-  reg_ctx->WriteRegisterFromUnsigned(sp_reg, sp);
-
-#if HEX_ABI_DEBUG
-  // quick and dirty stack dumper for debugging
-  for (int i = -8; i < 8; i++) {
-    uint32_t data = 0;
-    lldb::addr_t addr = sp + i * 4;
-    proc->ReadMemory(addr, (void *)&data, sizeof(data), error);
-    printf("\n0x%04" PRIx64 " 0x%08x ", addr, data);
-    if (i == 0)
-      printf("<<-- sp");
-  }
-  printf("\n");
-#endif
-
-  return true;
-}
-
-bool ABISysV_hexagon::GetArgumentValues(Thread &thread,
-                                        ValueList &values) const {
-  return false;
-}
-
-Status
-ABISysV_hexagon::SetReturnValueObject(lldb::StackFrameSP &frame_sp,
-                                      lldb::ValueObjectSP &new_value_sp) {
-  Status error;
-  return error;
-}
-
-ValueObjectSP ABISysV_hexagon::GetReturnValueObjectSimple(
-    Thread &thread, CompilerType &return_compiler_type) const {
-  ValueObjectSP return_valobj_sp;
-  return return_valobj_sp;
-}
-
-ValueObjectSP ABISysV_hexagon::GetReturnValueObjectImpl(
-    Thread &thread, CompilerType &return_compiler_type) const {
-  ValueObjectSP return_valobj_sp;
-  return return_valobj_sp;
-}
-
-// called when we are on the first instruction of a new function for hexagon
-// the return address is in RA (R31)
-bool ABISysV_hexagon::CreateFunctionEntryUnwindPlan(UnwindPlan &unwind_plan) {
-  unwind_plan.Clear();
-  unwind_plan.SetRegisterKind(eRegisterKindGeneric);
-  unwind_plan.SetReturnAddressRegister(LLDB_REGNUM_GENERIC_RA);
-
-  UnwindPlan::RowSP row(new UnwindPlan::Row);
-
-  // Our Call Frame Address is the stack pointer value
-  row->GetCFAValue().SetIsRegisterPlusOffset(LLDB_REGNUM_GENERIC_SP, 4);
-  row->SetOffset(0);
-
-  // The previous PC is in the LR
-  row->SetRegisterLocationToRegister(LLDB_REGNUM_GENERIC_PC,
-                                     LLDB_REGNUM_GENERIC_RA, true);
-  unwind_plan.AppendRow(row);
-
-  unwind_plan.SetSourceName("hexagon at-func-entry default");
-  unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
-  return true;
-}
-
-bool ABISysV_hexagon::CreateDefaultUnwindPlan(UnwindPlan &unwind_plan) {
-  unwind_plan.Clear();
-  unwind_plan.SetRegisterKind(eRegisterKindGeneric);
-
-  uint32_t fp_reg_num = LLDB_REGNUM_GENERIC_FP;
-  uint32_t sp_reg_num = LLDB_REGNUM_GENERIC_SP;
-  uint32_t pc_reg_num = LLDB_REGNUM_GENERIC_PC;
-
-  UnwindPlan::RowSP row(new UnwindPlan::Row);
-
-  row->GetCFAValue().SetIsRegisterPlusOffset(LLDB_REGNUM_GENERIC_FP, 8);
-
-  row->SetRegisterLocationToAtCFAPlusOffset(fp_reg_num, -8, true);
-  row->SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, -4, true);
-  row->SetRegisterLocationToIsCFAPlusOffset(sp_reg_num, 0, true);
-
-  unwind_plan.AppendRow(row);
-  unwind_plan.SetSourceName("hexagon default unwind plan");
-  unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
-  unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
-  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
-  return true;
-}
-
-/*
-    Register           Usage                                   Saved By
-
-    R0  - R5           parameters(a)                   -
-    R6  - R15          Scratch(b)                              Caller
-    R16 - R27          Scratch                                 Callee
-    R28                                Scratch(b)                              Caller
-    R29 - R31          Stack Frames                    Callee(c)
-    P3:0                       Processor State                 Caller
-
-    a = the caller can change parameter values
-    b = R14 - R15 and R28 are used by the procedure linkage table
-    c = R29 - R31 are saved and restored by allocframe() and deallocframe()
-*/
-bool ABISysV_hexagon::RegisterIsVolatile(const RegisterInfo *reg_info) {
-  return !RegisterIsCalleeSaved(reg_info);
-}
-
-bool ABISysV_hexagon::RegisterIsCalleeSaved(const RegisterInfo *reg_info) {
-  int reg = ((reg_info->byte_offset) / 4);
-
-  bool save = (reg >= 16) && (reg <= 27);
-  save |= (reg >= 29) && (reg <= 32);
-
-  return save;
-}
-
-void ABISysV_hexagon::Initialize() {
-  PluginManager::RegisterPlugin(GetPluginNameStatic(),
-                                "System V ABI for hexagon targets",
-                                CreateInstance);
-}
-
-void ABISysV_hexagon::Terminate() {
-  PluginManager::UnregisterPlugin(CreateInstance);
-}
-
-lldb_private::ConstString ABISysV_hexagon::GetPluginNameStatic() {
-  static ConstString g_name("sysv-hexagon");
-  return g_name;
-}
-
-// PluginInterface protocol
-
-lldb_private::ConstString ABISysV_hexagon::GetPluginName() {
-  return GetPluginNameStatic();
-}
-
-uint32_t ABISysV_hexagon::GetPluginVersion() { return 1; }
-
-// get value object specialized to work with llvm IR types
-lldb::ValueObjectSP
-ABISysV_hexagon::GetReturnValueObjectImpl(lldb_private::Thread &thread,
-                                          llvm::Type &retType) const {
-  Value value;
-  ValueObjectSP vObjSP;
-
-  // get the current register context
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-  if (!reg_ctx)
-    return vObjSP;
-
-  // for now just pop R0 to find the return value
-  const lldb_private::RegisterInfo *r0_info =
-      reg_ctx->GetRegisterInfoAtIndex(0);
-  if (r0_info == nullptr)
-    return vObjSP;
-
-  // void return type
-  if (retType.isVoidTy()) {
-    value.GetScalar() = 0;
-  }
-  // integer / pointer return type
-  else if (retType.isIntegerTy() || retType.isPointerTy()) {
-    // read r0 register value
-    lldb_private::RegisterValue r0_value;
-    if (!reg_ctx->ReadRegister(r0_info, r0_value))
-      return vObjSP;
-
-    // push r0 into value
-    uint32_t r0_u32 = r0_value.GetAsUInt32();
-
-    // account for integer size
-    if (retType.isIntegerTy() && retType.isSized()) {
-      uint64_t size = retType.getScalarSizeInBits();
-      uint64_t mask = (1ull << size) - 1;
-      // mask out higher order bits then the type we expect
-      r0_u32 &= mask;
-    }
-
-    value.GetScalar() = r0_u32;
-  }
-  // unsupported return type
-  else
-    return vObjSP;
-
-  // pack the value into a ValueObjectSP
-  vObjSP = ValueObjectConstResult::Create(thread.GetStackFrameAtIndex(0).get(),
-                                          value, ConstString(""));
-  return vObjSP;
-}
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.h b/gnu/llvm/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.h
deleted file mode 100644 (file)
index bef64a2..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-//===-- ABISysV_hexagon.h ----------------------------------------*- C++
-//-*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_ABISysV_hexagon_h_
-#define liblldb_ABISysV_hexagon_h_
-
-#include "lldb/Target/ABI.h"
-#include "lldb/lldb-private.h"
-
-class ABISysV_hexagon : public lldb_private::ABI {
-public:
-  ~ABISysV_hexagon() override = default;
-
-  size_t GetRedZoneSize() const override;
-
-  bool PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp,
-                          lldb::addr_t functionAddress,
-                          lldb::addr_t returnAddress,
-                          llvm::ArrayRef<lldb::addr_t> args) const override;
-
-  // special thread plan for GDB style non-jit function calls
-  bool
-  PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp,
-                     lldb::addr_t functionAddress, lldb::addr_t returnAddress,
-                     llvm::Type &prototype,
-                     llvm::ArrayRef<ABI::CallArgument> args) const override;
-
-  bool GetArgumentValues(lldb_private::Thread &thread,
-                         lldb_private::ValueList &values) const override;
-
-  lldb_private::Status
-  SetReturnValueObject(lldb::StackFrameSP &frame_sp,
-                       lldb::ValueObjectSP &new_value) override;
-
-  lldb::ValueObjectSP
-  GetReturnValueObjectImpl(lldb_private::Thread &thread,
-                           lldb_private::CompilerType &type) const override;
-
-  // specialized to work with llvm IR types
-  lldb::ValueObjectSP GetReturnValueObjectImpl(lldb_private::Thread &thread,
-                                               llvm::Type &type) const override;
-
-  bool
-  CreateFunctionEntryUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
-  bool CreateDefaultUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
-  bool RegisterIsVolatile(const lldb_private::RegisterInfo *reg_info) override;
-
-  bool CallFrameAddressIsValid(lldb::addr_t cfa) override {
-    // Make sure the stack call frame addresses are 8 byte aligned
-    if (cfa & 0x07)
-      return false; // Not 8 byte aligned
-    if (cfa == 0)
-      return false; // Zero is not a valid stack address
-    return true;
-  }
-
-  bool CodeAddressIsValid(lldb::addr_t pc) override {
-    // We have a 64 bit address space, so anything is valid as opcodes
-    // aren't fixed width...
-    return true;
-  }
-
-  const lldb_private::RegisterInfo *
-  GetRegisterInfoArray(uint32_t &count) override;
-
-  // Static Functions
-
-  static void Initialize();
-
-  static void Terminate();
-
-  static lldb::ABISP CreateInstance(lldb::ProcessSP process_sp, const lldb_private::ArchSpec &arch);
-
-  static lldb_private::ConstString GetPluginNameStatic();
-
-  // PluginInterface protocol
-
-  lldb_private::ConstString GetPluginName() override;
-
-  uint32_t GetPluginVersion() override;
-
-protected:
-  void CreateRegisterMapIfNeeded();
-
-  lldb::ValueObjectSP
-  GetReturnValueObjectSimple(lldb_private::Thread &thread,
-                             lldb_private::CompilerType &ast_type) const;
-
-  bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info);
-
-private:
-  ABISysV_hexagon(lldb::ProcessSP process_sp,
-                  std::unique_ptr<llvm::MCRegisterInfo> info_up)
-      : lldb_private::ABI(std::move(process_sp), std::move(info_up)) {
-    // Call CreateInstance instead.
-  }
-};
-
-#endif // liblldb_ABISysV_hexagon_h_
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-hexagon/CMakeLists.txt b/gnu/llvm/lldb/source/Plugins/ABI/SysV-hexagon/CMakeLists.txt
deleted file mode 100644 (file)
index a857fff..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-add_lldb_library(lldbPluginABISysV_hexagon PLUGIN
-  ABISysV_hexagon.cpp
-
-  LINK_LIBS
-    lldbCore
-    lldbSymbol
-    lldbTarget
-  LINK_COMPONENTS
-    Support
-  )
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp b/gnu/llvm/lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp
deleted file mode 100644 (file)
index 69e4cff..0000000
+++ /dev/null
@@ -1,851 +0,0 @@
-//===----------------------- ABISysV_i386.cpp -------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//===----------------------------------------------------------------------===//
-
-#include "ABISysV_i386.h"
-
-#include "llvm/ADT/STLExtras.h"
-#include "llvm/ADT/Triple.h"
-
-#include "lldb/Core/Module.h"
-#include "lldb/Core/PluginManager.h"
-#include "lldb/Core/Value.h"
-#include "lldb/Core/ValueObjectConstResult.h"
-#include "lldb/Core/ValueObjectMemory.h"
-#include "lldb/Core/ValueObjectRegister.h"
-#include "lldb/Symbol/UnwindPlan.h"
-#include "lldb/Target/Process.h"
-#include "lldb/Target/RegisterContext.h"
-#include "lldb/Target/StackFrame.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Target/Thread.h"
-#include "lldb/Utility/ConstString.h"
-#include "lldb/Utility/DataExtractor.h"
-#include "lldb/Utility/Log.h"
-#include "lldb/Utility/RegisterValue.h"
-#include "lldb/Utility/Status.h"
-
-using namespace lldb;
-using namespace lldb_private;
-
-//   This source file uses the following document as a reference:
-//====================================================================
-//             System V Application Binary Interface
-//    Intel386 Architecture Processor Supplement, Version 1.0
-//                         Edited by
-//      H.J. Lu, David L Kreitzer, Milind Girkar, Zia Ansari
-//
-//                        (Based on
-//           System V Application Binary Interface,
-//          AMD64 Architecture Processor Supplement,
-//                         Edited by
-//     H.J. Lu, Michael Matz, Milind Girkar, Jan Hubicka,
-//               Andreas Jaeger, Mark Mitchell)
-//
-//                     February 3, 2015
-//====================================================================
-
-// DWARF Register Number Mapping
-// See Table 2.14 of the reference document (specified on top of this file)
-// Comment: Table 2.14 is followed till 'mm' entries. After that, all entries
-// are ignored here.
-
-enum dwarf_regnums {
-  dwarf_eax = 0,
-  dwarf_ecx,
-  dwarf_edx,
-  dwarf_ebx,
-  dwarf_esp,
-  dwarf_ebp,
-  dwarf_esi,
-  dwarf_edi,
-  dwarf_eip,
-  dwarf_eflags,
-
-  dwarf_st0 = 11,
-  dwarf_st1,
-  dwarf_st2,
-  dwarf_st3,
-  dwarf_st4,
-  dwarf_st5,
-  dwarf_st6,
-  dwarf_st7,
-
-  dwarf_xmm0 = 21,
-  dwarf_xmm1,
-  dwarf_xmm2,
-  dwarf_xmm3,
-  dwarf_xmm4,
-  dwarf_xmm5,
-  dwarf_xmm6,
-  dwarf_xmm7,
-  dwarf_ymm0 = dwarf_xmm0,
-  dwarf_ymm1 = dwarf_xmm1,
-  dwarf_ymm2 = dwarf_xmm2,
-  dwarf_ymm3 = dwarf_xmm3,
-  dwarf_ymm4 = dwarf_xmm4,
-  dwarf_ymm5 = dwarf_xmm5,
-  dwarf_ymm6 = dwarf_xmm6,
-  dwarf_ymm7 = dwarf_xmm7,
-
-  dwarf_mm0 = 29,
-  dwarf_mm1,
-  dwarf_mm2,
-  dwarf_mm3,
-  dwarf_mm4,
-  dwarf_mm5,
-  dwarf_mm6,
-  dwarf_mm7,
-
-  dwarf_bnd0 = 101,
-  dwarf_bnd1,
-  dwarf_bnd2,
-  dwarf_bnd3
-};
-
-static RegisterInfo g_register_infos[] = {
-    // clang-format off
-    //NAME       ALT     SZ OFF  ENCODING         FORMAT                 EH_FRAME             DWARF                GENERIC                   PROCESS PLUGIN       LLDB NATIVE           VALUE    INVAL    DYN EXPR SZ
-    //========== ======= == ===  =============    ====================   ===================  ===================  ========================= ===================  ===================   =======  =======  ======== ==
-    {"eax",      nullptr, 4,  0, eEncodingUint,   eFormatHex,           {dwarf_eax,           dwarf_eax,           LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"ebx",      nullptr, 4,  0, eEncodingUint,   eFormatHex,           {dwarf_ebx,           dwarf_ebx,           LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"ecx",      nullptr, 4,  0, eEncodingUint,   eFormatHex,           {dwarf_ecx,           dwarf_ecx,           LLDB_REGNUM_GENERIC_ARG4, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"edx",      nullptr, 4,  0, eEncodingUint,   eFormatHex,           {dwarf_edx,           dwarf_edx,           LLDB_REGNUM_GENERIC_ARG3, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"esi",      nullptr, 4,  0, eEncodingUint,   eFormatHex,           {dwarf_esi,           dwarf_esi,           LLDB_REGNUM_GENERIC_ARG2, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"edi",      nullptr, 4,  0, eEncodingUint,   eFormatHex,           {dwarf_edi,           dwarf_edi,           LLDB_REGNUM_GENERIC_ARG1, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"ebp",      "fp",    4,  0, eEncodingUint,   eFormatHex,           {dwarf_ebp,           dwarf_ebp,           LLDB_REGNUM_GENERIC_FP,   LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"esp",      "sp",    4,  0, eEncodingUint,   eFormatHex,           {dwarf_esp,           dwarf_esp,           LLDB_REGNUM_GENERIC_SP,   LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"eip",      "pc",    4,  0, eEncodingUint,   eFormatHex,           {dwarf_eip,           dwarf_eip,           LLDB_REGNUM_GENERIC_PC,   LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"eflags",   nullptr, 4,  0, eEncodingUint,   eFormatHex,           {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_REGNUM_GENERIC_FLAGS,LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"cs",       nullptr, 4,  0, eEncodingUint,   eFormatHex,           {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"ss",       nullptr, 4,  0, eEncodingUint,   eFormatHex,           {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"ds",       nullptr, 4,  0, eEncodingUint,   eFormatHex,           {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"es",       nullptr, 4,  0, eEncodingUint,   eFormatHex,           {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"fs",       nullptr, 4,  0, eEncodingUint,   eFormatHex,           {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"gs",       nullptr, 4,  0, eEncodingUint,   eFormatHex,           {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"st0",      nullptr, 10, 0, eEncodingVector, eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, dwarf_st0,           LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"st1",      nullptr, 10, 0, eEncodingVector, eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, dwarf_st1,           LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"st2",      nullptr, 10, 0, eEncodingVector, eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, dwarf_st2,           LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"st3",      nullptr, 10, 0, eEncodingVector, eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, dwarf_st3,           LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"st4",      nullptr, 10, 0, eEncodingVector, eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, dwarf_st4,           LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"st5",      nullptr, 10, 0, eEncodingVector, eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, dwarf_st5,           LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"st6",      nullptr, 10, 0, eEncodingVector, eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, dwarf_st6,           LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"st7",      nullptr, 10, 0, eEncodingVector, eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, dwarf_st7,           LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"fctrl",    nullptr, 4,  0, eEncodingUint,   eFormatHex,           {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"fstat",    nullptr, 4,  0, eEncodingUint,   eFormatHex,           {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"ftag",     nullptr, 4,  0, eEncodingUint,   eFormatHex,           {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"fiseg",    nullptr, 4,  0, eEncodingUint,   eFormatHex,           {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"fioff",    nullptr, 4,  0, eEncodingUint,   eFormatHex,           {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"foseg",    nullptr, 4,  0, eEncodingUint,   eFormatHex,           {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"fooff",    nullptr, 4,  0, eEncodingUint,   eFormatHex,           {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"fop",      nullptr, 4,  0, eEncodingUint,   eFormatHex,           {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"xmm0",     nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, dwarf_xmm0,          LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"xmm1",     nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, dwarf_xmm1,          LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"xmm2",     nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, dwarf_xmm2,          LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"xmm3",     nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, dwarf_xmm3,          LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"xmm4",     nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, dwarf_xmm4,          LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"xmm5",     nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, dwarf_xmm5,          LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"xmm6",     nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, dwarf_xmm6,          LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"xmm7",     nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, dwarf_xmm7,          LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"mxcsr",    nullptr, 4,  0, eEncodingUint,   eFormatHex,           {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"ymm0",     nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, dwarf_ymm0,          LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"ymm1",     nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, dwarf_ymm1,          LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"ymm2",     nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, dwarf_ymm2,          LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"ymm3",     nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, dwarf_ymm3,          LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"ymm4",     nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, dwarf_ymm4,          LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"ymm5",     nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, dwarf_ymm5,          LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"ymm6",     nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, dwarf_ymm6,          LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"ymm7",     nullptr, 32, 0, eEncodingVector, eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, dwarf_ymm7,          LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"bnd0",     nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt64,{dwarf_bnd0,          dwarf_bnd0,          LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"bnd1",     nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt64,{dwarf_bnd1,          dwarf_bnd1,          LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"bnd2",     nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt64,{dwarf_bnd2,          dwarf_bnd2,          LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"bnd3",     nullptr, 16, 0, eEncodingVector, eFormatVectorOfUInt64,{dwarf_bnd3,          dwarf_bnd3,          LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"bndcfgu",  nullptr, 8,  0, eEncodingVector, eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0},
-    {"bndstatus",nullptr, 8,  0, eEncodingVector, eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM}, nullptr, nullptr, nullptr, 0}
-    // clang-format on
-};
-
-static const uint32_t k_num_register_infos =
-    llvm::array_lengthof(g_register_infos);
-static bool g_register_info_names_constified = false;
-
-const lldb_private::RegisterInfo *
-ABISysV_i386::GetRegisterInfoArray(uint32_t &count) {
-  // Make the C-string names and alt_names for the register infos into const
-  // C-string values by having the ConstString unique the names in the global
-  // constant C-string pool.
-  if (!g_register_info_names_constified) {
-    g_register_info_names_constified = true;
-    for (uint32_t i = 0; i < k_num_register_infos; ++i) {
-      if (g_register_infos[i].name)
-        g_register_infos[i].name =
-            ConstString(g_register_infos[i].name).GetCString();
-      if (g_register_infos[i].alt_name)
-        g_register_infos[i].alt_name =
-            ConstString(g_register_infos[i].alt_name).GetCString();
-    }
-  }
-  count = k_num_register_infos;
-  return g_register_infos;
-}
-
-// Static Functions
-
-ABISP
-ABISysV_i386::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
-  if (arch.GetTriple().getVendor() != llvm::Triple::Apple) {
-    if (arch.GetTriple().getArch() == llvm::Triple::x86) {
-      return ABISP(
-          new ABISysV_i386(std::move(process_sp), MakeMCRegisterInfo(arch)));
-    }
-  }
-  return ABISP();
-}
-
-bool ABISysV_i386::PrepareTrivialCall(Thread &thread, addr_t sp,
-                                      addr_t func_addr, addr_t return_addr,
-                                      llvm::ArrayRef<addr_t> args) const {
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-
-  if (!reg_ctx)
-    return false;
-
-  uint32_t pc_reg_num = reg_ctx->ConvertRegisterKindToRegisterNumber(
-      eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC);
-  uint32_t sp_reg_num = reg_ctx->ConvertRegisterKindToRegisterNumber(
-      eRegisterKindGeneric, LLDB_REGNUM_GENERIC_SP);
-
-  // While using register info to write a register value to memory, the
-  // register info just needs to have the correct size of a 32 bit register,
-  // the actual register it pertains to is not important, just the size needs
-  // to be correct. "eax" is used here for this purpose.
-  const RegisterInfo *reg_info_32 = reg_ctx->GetRegisterInfoByName("eax");
-  if (!reg_info_32)
-    return false; // TODO this should actually never happen
-
-  Status error;
-  RegisterValue reg_value;
-
-  // Make room for the argument(s) on the stack
-  sp -= 4 * args.size();
-
-  // SP Alignment
-  sp &= ~(16ull - 1ull); // 16-byte alignment
-
-  // Write arguments onto the stack
-  addr_t arg_pos = sp;
-  for (addr_t arg : args) {
-    reg_value.SetUInt32(arg);
-    error = reg_ctx->WriteRegisterValueToMemory(
-        reg_info_32, arg_pos, reg_info_32->byte_size, reg_value);
-    if (error.Fail())
-      return false;
-    arg_pos += 4;
-  }
-
-  // The return address is pushed onto the stack
-  sp -= 4;
-  reg_value.SetUInt32(return_addr);
-  error = reg_ctx->WriteRegisterValueToMemory(
-      reg_info_32, sp, reg_info_32->byte_size, reg_value);
-  if (error.Fail())
-    return false;
-
-  // Setting %esp to the actual stack value.
-  if (!reg_ctx->WriteRegisterFromUnsigned(sp_reg_num, sp))
-    return false;
-
-  // Setting %eip to the address of the called function.
-  if (!reg_ctx->WriteRegisterFromUnsigned(pc_reg_num, func_addr))
-    return false;
-
-  return true;
-}
-
-static bool ReadIntegerArgument(Scalar &scalar, unsigned int bit_width,
-                                bool is_signed, Process *process,
-                                addr_t &current_stack_argument) {
-  uint32_t byte_size = (bit_width + (8 - 1)) / 8;
-  Status error;
-
-  if (!process)
-    return false;
-
-  if (process->ReadScalarIntegerFromMemory(current_stack_argument, byte_size,
-                                           is_signed, scalar, error)) {
-    current_stack_argument += byte_size;
-    return true;
-  }
-  return false;
-}
-
-bool ABISysV_i386::GetArgumentValues(Thread &thread, ValueList &values) const {
-  unsigned int num_values = values.GetSize();
-  unsigned int value_index;
-
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-
-  if (!reg_ctx)
-    return false;
-
-  // Get pointer to the first stack argument
-  addr_t sp = reg_ctx->GetSP(0);
-  if (!sp)
-    return false;
-
-  addr_t current_stack_argument = sp + 4; // jump over return address
-
-  for (value_index = 0; value_index < num_values; ++value_index) {
-    Value *value = values.GetValueAtIndex(value_index);
-
-    if (!value)
-      return false;
-
-    // Currently: Support for extracting values with Clang QualTypes only.
-    CompilerType compiler_type(value->GetCompilerType());
-    llvm::Optional<uint64_t> bit_size = compiler_type.GetBitSize(&thread);
-    if (bit_size) {
-      bool is_signed;
-      if (compiler_type.IsIntegerOrEnumerationType(is_signed)) {
-        ReadIntegerArgument(value->GetScalar(), *bit_size, is_signed,
-                            thread.GetProcess().get(), current_stack_argument);
-      } else if (compiler_type.IsPointerType()) {
-        ReadIntegerArgument(value->GetScalar(), *bit_size, false,
-                            thread.GetProcess().get(), current_stack_argument);
-      }
-    }
-  }
-  return true;
-}
-
-Status ABISysV_i386::SetReturnValueObject(lldb::StackFrameSP &frame_sp,
-                                          lldb::ValueObjectSP &new_value_sp) {
-  Status error;
-  if (!new_value_sp) {
-    error.SetErrorString("Empty value object for return value.");
-    return error;
-  }
-
-  CompilerType compiler_type = new_value_sp->GetCompilerType();
-  if (!compiler_type) {
-    error.SetErrorString("Null clang type for return value.");
-    return error;
-  }
-
-  const uint32_t type_flags = compiler_type.GetTypeInfo();
-  Thread *thread = frame_sp->GetThread().get();
-  RegisterContext *reg_ctx = thread->GetRegisterContext().get();
-  DataExtractor data;
-  Status data_error;
-  size_t num_bytes = new_value_sp->GetData(data, data_error);
-  bool register_write_successful = true;
-
-  if (data_error.Fail()) {
-    error.SetErrorStringWithFormat(
-        "Couldn't convert return value to raw data: %s",
-        data_error.AsCString());
-    return error;
-  }
-
-  // Following "IF ELSE" block categorizes various 'Fundamental Data Types'.
-  // The terminology 'Fundamental Data Types' used here is adopted from Table
-  // 2.1 of the reference document (specified on top of this file)
-
-  if (type_flags & eTypeIsPointer) // 'Pointer'
-  {
-    if (num_bytes != sizeof(uint32_t)) {
-      error.SetErrorString("Pointer to be returned is not 4 bytes wide");
-      return error;
-    }
-    lldb::offset_t offset = 0;
-    const RegisterInfo *eax_info = reg_ctx->GetRegisterInfoByName("eax", 0);
-    uint32_t raw_value = data.GetMaxU32(&offset, num_bytes);
-    register_write_successful =
-        reg_ctx->WriteRegisterFromUnsigned(eax_info, raw_value);
-  } else if ((type_flags & eTypeIsScalar) ||
-             (type_flags & eTypeIsEnumeration)) //'Integral' + 'Floating Point'
-  {
-    lldb::offset_t offset = 0;
-    const RegisterInfo *eax_info = reg_ctx->GetRegisterInfoByName("eax", 0);
-
-    if (type_flags & eTypeIsInteger) // 'Integral' except enum
-    {
-      switch (num_bytes) {
-      default:
-        break;
-      case 16:
-        // For clang::BuiltinType::UInt128 & Int128 ToDo: Need to decide how to
-        // handle it
-        break;
-      case 8: {
-        uint32_t raw_value_low = data.GetMaxU32(&offset, 4);
-        const RegisterInfo *edx_info = reg_ctx->GetRegisterInfoByName("edx", 0);
-        uint32_t raw_value_high = data.GetMaxU32(&offset, num_bytes - offset);
-        register_write_successful =
-            (reg_ctx->WriteRegisterFromUnsigned(eax_info, raw_value_low) &&
-             reg_ctx->WriteRegisterFromUnsigned(edx_info, raw_value_high));
-        break;
-      }
-      case 4:
-      case 2:
-      case 1: {
-        uint32_t raw_value = data.GetMaxU32(&offset, num_bytes);
-        register_write_successful =
-            reg_ctx->WriteRegisterFromUnsigned(eax_info, raw_value);
-        break;
-      }
-      }
-    } else if (type_flags & eTypeIsEnumeration) // handles enum
-    {
-      uint32_t raw_value = data.GetMaxU32(&offset, num_bytes);
-      register_write_successful =
-          reg_ctx->WriteRegisterFromUnsigned(eax_info, raw_value);
-    } else if (type_flags & eTypeIsFloat) // 'Floating Point'
-    {
-      RegisterValue st0_value, fstat_value, ftag_value;
-      const RegisterInfo *st0_info = reg_ctx->GetRegisterInfoByName("st0", 0);
-      const RegisterInfo *fstat_info =
-          reg_ctx->GetRegisterInfoByName("fstat", 0);
-      const RegisterInfo *ftag_info = reg_ctx->GetRegisterInfoByName("ftag", 0);
-
-      /* According to Page 3-12 of document
-      System V Application Binary Interface, Intel386 Architecture Processor
-      Supplement, Fourth Edition
-      To return Floating Point values, all st% registers except st0 should be
-      empty after exiting from
-      a function. This requires setting fstat and ftag registers to specific
-      values.
-      fstat: The TOP field of fstat should be set to a value [0,7]. ABI doesn't
-      specify the specific
-      value of TOP in case of function return. Hence, we set the TOP field to 7
-      by our choice. */
-      uint32_t value_fstat_u32 = 0x00003800;
-
-      /* ftag: Implication of setting TOP to 7 and indicating all st% registers
-      empty except st0 is to set
-      7th bit of 4th byte of FXSAVE area to 1 and all other bits of this byte to
-      0. This is in accordance
-      with the document Intel 64 and IA-32 Architectures Software Developer's
-      Manual, January 2015 */
-      uint32_t value_ftag_u32 = 0x00000080;
-
-      if (num_bytes <= 12) // handles float, double, long double, __float80
-      {
-        long double value_long_dbl = 0.0;
-        if (num_bytes == 4)
-          value_long_dbl = data.GetFloat(&offset);
-        else if (num_bytes == 8)
-          value_long_dbl = data.GetDouble(&offset);
-        else if (num_bytes == 12)
-          value_long_dbl = data.GetLongDouble(&offset);
-        else {
-          error.SetErrorString("Invalid number of bytes for this return type");
-          return error;
-        }
-        st0_value.SetLongDouble(value_long_dbl);
-        fstat_value.SetUInt32(value_fstat_u32);
-        ftag_value.SetUInt32(value_ftag_u32);
-        register_write_successful =
-            reg_ctx->WriteRegister(st0_info, st0_value) &&
-            reg_ctx->WriteRegister(fstat_info, fstat_value) &&
-            reg_ctx->WriteRegister(ftag_info, ftag_value);
-      } else if (num_bytes == 16) // handles __float128
-      {
-        error.SetErrorString("Implementation is missing for this clang type.");
-      }
-    } else {
-      // Neither 'Integral' nor 'Floating Point'. If flow reaches here then
-      // check type_flags. This type_flags is not a valid type.
-      error.SetErrorString("Invalid clang type");
-    }
-  } else {
-    /* 'Complex Floating Point', 'Packed', 'Decimal Floating Point' and
-    'Aggregate' data types
-    are yet to be implemented */
-    error.SetErrorString("Currently only Integral and Floating Point clang "
-                         "types are supported.");
-  }
-  if (!register_write_successful)
-    error.SetErrorString("Register writing failed");
-  return error;
-}
-
-ValueObjectSP ABISysV_i386::GetReturnValueObjectSimple(
-    Thread &thread, CompilerType &return_compiler_type) const {
-  ValueObjectSP return_valobj_sp;
-  Value value;
-
-  if (!return_compiler_type)
-    return return_valobj_sp;
-
-  value.SetCompilerType(return_compiler_type);
-
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-  if (!reg_ctx)
-    return return_valobj_sp;
-
-  const uint32_t type_flags = return_compiler_type.GetTypeInfo();
-
-  unsigned eax_id =
-      reg_ctx->GetRegisterInfoByName("eax", 0)->kinds[eRegisterKindLLDB];
-  unsigned edx_id =
-      reg_ctx->GetRegisterInfoByName("edx", 0)->kinds[eRegisterKindLLDB];
-
-  // Following "IF ELSE" block categorizes various 'Fundamental Data Types'.
-  // The terminology 'Fundamental Data Types' used here is adopted from Table
-  // 2.1 of the reference document (specified on top of this file)
-
-  if (type_flags & eTypeIsPointer) // 'Pointer'
-  {
-    uint32_t ptr =
-        thread.GetRegisterContext()->ReadRegisterAsUnsigned(eax_id, 0) &
-        0xffffffff;
-    value.SetValueType(Value::eValueTypeScalar);
-    value.GetScalar() = ptr;
-    return_valobj_sp = ValueObjectConstResult::Create(
-        thread.GetStackFrameAtIndex(0).get(), value, ConstString(""));
-  } else if ((type_flags & eTypeIsScalar) ||
-             (type_flags & eTypeIsEnumeration)) //'Integral' + 'Floating Point'
-  {
-    value.SetValueType(Value::eValueTypeScalar);
-    llvm::Optional<uint64_t> byte_size =
-        return_compiler_type.GetByteSize(nullptr);
-    if (!byte_size)
-      return return_valobj_sp;
-    bool success = false;
-
-    if (type_flags & eTypeIsInteger) // 'Integral' except enum
-    {
-      const bool is_signed = ((type_flags & eTypeIsSigned) != 0);
-      uint64_t raw_value =
-          thread.GetRegisterContext()->ReadRegisterAsUnsigned(eax_id, 0) &
-          0xffffffff;
-      raw_value |=
-          (thread.GetRegisterContext()->ReadRegisterAsUnsigned(edx_id, 0) &
-           0xffffffff)
-          << 32;
-
-      switch (*byte_size) {
-      default:
-        break;
-
-      case 16:
-        // For clang::BuiltinType::UInt128 & Int128 ToDo: Need to decide how to
-        // handle it
-        break;
-
-      case 8:
-        if (is_signed)
-          value.GetScalar() = (int64_t)(raw_value);
-        else
-          value.GetScalar() = (uint64_t)(raw_value);
-        success = true;
-        break;
-
-      case 4:
-        if (is_signed)
-          value.GetScalar() = (int32_t)(raw_value & UINT32_MAX);
-        else
-          value.GetScalar() = (uint32_t)(raw_value & UINT32_MAX);
-        success = true;
-        break;
-
-      case 2:
-        if (is_signed)
-          value.GetScalar() = (int16_t)(raw_value & UINT16_MAX);
-        else
-          value.GetScalar() = (uint16_t)(raw_value & UINT16_MAX);
-        success = true;
-        break;
-
-      case 1:
-        if (is_signed)
-          value.GetScalar() = (int8_t)(raw_value & UINT8_MAX);
-        else
-          value.GetScalar() = (uint8_t)(raw_value & UINT8_MAX);
-        success = true;
-        break;
-      }
-
-      if (success)
-        return_valobj_sp = ValueObjectConstResult::Create(
-            thread.GetStackFrameAtIndex(0).get(), value, ConstString(""));
-    } else if (type_flags & eTypeIsEnumeration) // handles enum
-    {
-      uint32_t enm =
-          thread.GetRegisterContext()->ReadRegisterAsUnsigned(eax_id, 0) &
-          0xffffffff;
-      value.SetValueType(Value::eValueTypeScalar);
-      value.GetScalar() = enm;
-      return_valobj_sp = ValueObjectConstResult::Create(
-          thread.GetStackFrameAtIndex(0).get(), value, ConstString(""));
-    } else if (type_flags & eTypeIsFloat) // 'Floating Point'
-    {
-      if (*byte_size <= 12) // handles float, double, long double, __float80
-      {
-        const RegisterInfo *st0_info = reg_ctx->GetRegisterInfoByName("st0", 0);
-        RegisterValue st0_value;
-
-        if (reg_ctx->ReadRegister(st0_info, st0_value)) {
-          DataExtractor data;
-          if (st0_value.GetData(data)) {
-            lldb::offset_t offset = 0;
-            long double value_long_double = data.GetLongDouble(&offset);
-
-            // float is 4 bytes.
-            if (*byte_size == 4) {
-              float value_float = (float)value_long_double;
-              value.GetScalar() = value_float;
-              success = true;
-            } else if (*byte_size == 8) {
-              // double is 8 bytes
-              // On Android Platform: long double is also 8 bytes It will be
-              // handled here only.
-              double value_double = (double)value_long_double;
-              value.GetScalar() = value_double;
-              success = true;
-            } else if (*byte_size == 12) {
-              // long double and __float80 are 12 bytes on i386.
-              value.GetScalar() = value_long_double;
-              success = true;
-            }
-          }
-        }
-
-        if (success)
-          return_valobj_sp = ValueObjectConstResult::Create(
-              thread.GetStackFrameAtIndex(0).get(), value, ConstString(""));
-      } else if (*byte_size == 16) // handles __float128
-      {
-        lldb::addr_t storage_addr = (uint32_t)(
-            thread.GetRegisterContext()->ReadRegisterAsUnsigned(eax_id, 0) &
-            0xffffffff);
-        return_valobj_sp = ValueObjectMemory::Create(
-            &thread, "", Address(storage_addr, nullptr), return_compiler_type);
-      }
-    } else // Neither 'Integral' nor 'Floating Point'
-    {
-      // If flow reaches here then check type_flags This type_flags is
-      // unhandled
-    }
-  } else if (type_flags & eTypeIsComplex) // 'Complex Floating Point'
-  {
-    // ToDo: Yet to be implemented
-  } else if (type_flags & eTypeIsVector) // 'Packed'
-  {
-    llvm::Optional<uint64_t> byte_size =
-        return_compiler_type.GetByteSize(nullptr);
-    if (byte_size && *byte_size > 0) {
-      const RegisterInfo *vec_reg = reg_ctx->GetRegisterInfoByName("xmm0", 0);
-      if (vec_reg == nullptr)
-        vec_reg = reg_ctx->GetRegisterInfoByName("mm0", 0);
-
-      if (vec_reg) {
-        if (*byte_size <= vec_reg->byte_size) {
-          ProcessSP process_sp(thread.GetProcess());
-          if (process_sp) {
-            std::unique_ptr<DataBufferHeap> heap_data_up(
-                new DataBufferHeap(*byte_size, 0));
-            const ByteOrder byte_order = process_sp->GetByteOrder();
-            RegisterValue reg_value;
-            if (reg_ctx->ReadRegister(vec_reg, reg_value)) {
-              Status error;
-              if (reg_value.GetAsMemoryData(vec_reg, heap_data_up->GetBytes(),
-                                            heap_data_up->GetByteSize(),
-                                            byte_order, error)) {
-                DataExtractor data(DataBufferSP(heap_data_up.release()),
-                                   byte_order,
-                                   process_sp->GetTarget()
-                                       .GetArchitecture()
-                                       .GetAddressByteSize());
-                return_valobj_sp = ValueObjectConstResult::Create(
-                    &thread, return_compiler_type, ConstString(""), data);
-              }
-            }
-          }
-        } else if (*byte_size <= vec_reg->byte_size * 2) {
-          const RegisterInfo *vec_reg2 =
-              reg_ctx->GetRegisterInfoByName("xmm1", 0);
-          if (vec_reg2) {
-            ProcessSP process_sp(thread.GetProcess());
-            if (process_sp) {
-              std::unique_ptr<DataBufferHeap> heap_data_up(
-                  new DataBufferHeap(*byte_size, 0));
-              const ByteOrder byte_order = process_sp->GetByteOrder();
-              RegisterValue reg_value;
-              RegisterValue reg_value2;
-              if (reg_ctx->ReadRegister(vec_reg, reg_value) &&
-                  reg_ctx->ReadRegister(vec_reg2, reg_value2)) {
-
-                Status error;
-                if (reg_value.GetAsMemoryData(vec_reg, heap_data_up->GetBytes(),
-                                              vec_reg->byte_size, byte_order,
-                                              error) &&
-                    reg_value2.GetAsMemoryData(
-                        vec_reg2, heap_data_up->GetBytes() + vec_reg->byte_size,
-                        heap_data_up->GetByteSize() - vec_reg->byte_size,
-                        byte_order, error)) {
-                  DataExtractor data(DataBufferSP(heap_data_up.release()),
-                                     byte_order,
-                                     process_sp->GetTarget()
-                                         .GetArchitecture()
-                                         .GetAddressByteSize());
-                  return_valobj_sp = ValueObjectConstResult::Create(
-                      &thread, return_compiler_type, ConstString(""), data);
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-  } else // 'Decimal Floating Point'
-  {
-    // ToDo: Yet to be implemented
-  }
-  return return_valobj_sp;
-}
-
-ValueObjectSP ABISysV_i386::GetReturnValueObjectImpl(
-    Thread &thread, CompilerType &return_compiler_type) const {
-  ValueObjectSP return_valobj_sp;
-
-  if (!return_compiler_type)
-    return return_valobj_sp;
-
-  ExecutionContext exe_ctx(thread.shared_from_this());
-  return_valobj_sp = GetReturnValueObjectSimple(thread, return_compiler_type);
-  if (return_valobj_sp)
-    return return_valobj_sp;
-
-  RegisterContextSP reg_ctx_sp = thread.GetRegisterContext();
-  if (!reg_ctx_sp)
-    return return_valobj_sp;
-
-  if (return_compiler_type.IsAggregateType()) {
-    unsigned eax_id =
-        reg_ctx_sp->GetRegisterInfoByName("eax", 0)->kinds[eRegisterKindLLDB];
-    lldb::addr_t storage_addr = (uint32_t)(
-        thread.GetRegisterContext()->ReadRegisterAsUnsigned(eax_id, 0) &
-        0xffffffff);
-    return_valobj_sp = ValueObjectMemory::Create(
-        &thread, "", Address(storage_addr, nullptr), return_compiler_type);
-  }
-
-  return return_valobj_sp;
-}
-
-// This defines CFA as esp+4
-// The saved pc is at CFA-4 (i.e. esp+0)
-// The saved esp is CFA+0
-
-bool ABISysV_i386::CreateFunctionEntryUnwindPlan(UnwindPlan &unwind_plan) {
-  unwind_plan.Clear();
-  unwind_plan.SetRegisterKind(eRegisterKindDWARF);
-
-  uint32_t sp_reg_num = dwarf_esp;
-  uint32_t pc_reg_num = dwarf_eip;
-
-  UnwindPlan::RowSP row(new UnwindPlan::Row);
-  row->GetCFAValue().SetIsRegisterPlusOffset(sp_reg_num, 4);
-  row->SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, -4, false);
-  row->SetRegisterLocationToIsCFAPlusOffset(sp_reg_num, 0, true);
-  unwind_plan.AppendRow(row);
-  unwind_plan.SetSourceName("i386 at-func-entry default");
-  unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
-  return true;
-}
-
-// This defines CFA as ebp+8
-// The saved pc is at CFA-4 (i.e. ebp+4)
-// The saved ebp is at CFA-8 (i.e. ebp+0)
-// The saved esp is CFA+0
-
-bool ABISysV_i386::CreateDefaultUnwindPlan(UnwindPlan &unwind_plan) {
-  unwind_plan.Clear();
-  unwind_plan.SetRegisterKind(eRegisterKindDWARF);
-
-  uint32_t fp_reg_num = dwarf_ebp;
-  uint32_t sp_reg_num = dwarf_esp;
-  uint32_t pc_reg_num = dwarf_eip;
-
-  UnwindPlan::RowSP row(new UnwindPlan::Row);
-  const int32_t ptr_size = 4;
-
-  row->GetCFAValue().SetIsRegisterPlusOffset(fp_reg_num, 2 * ptr_size);
-  row->SetOffset(0);
-
-  row->SetRegisterLocationToAtCFAPlusOffset(fp_reg_num, ptr_size * -2, true);
-  row->SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, ptr_size * -1, true);
-  row->SetRegisterLocationToIsCFAPlusOffset(sp_reg_num, 0, true);
-
-  unwind_plan.AppendRow(row);
-  unwind_plan.SetSourceName("i386 default unwind plan");
-  unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
-  unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
-  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
-  return true;
-}
-
-// According to "Register Usage" in reference document (specified on top of
-// this source file) ebx, ebp, esi, edi and esp registers are preserved i.e.
-// non-volatile i.e. callee-saved on i386
-bool ABISysV_i386::RegisterIsCalleeSaved(const RegisterInfo *reg_info) {
-  if (!reg_info)
-    return false;
-
-  // Saved registers are ebx, ebp, esi, edi, esp, eip
-  const char *name = reg_info->name;
-  if (name[0] == 'e') {
-    switch (name[1]) {
-    case 'b':
-      if (name[2] == 'x' || name[2] == 'p')
-        return name[3] == '\0';
-      break;
-    case 'd':
-      if (name[2] == 'i')
-        return name[3] == '\0';
-      break;
-    case 'i':
-      if (name[2] == 'p')
-        return name[3] == '\0';
-      break;
-    case 's':
-      if (name[2] == 'i' || name[2] == 'p')
-        return name[3] == '\0';
-      break;
-    }
-  }
-
-  if (name[0] == 's' && name[1] == 'p' && name[2] == '\0') // sp
-    return true;
-  if (name[0] == 'f' && name[1] == 'p' && name[2] == '\0') // fp
-    return true;
-  if (name[0] == 'p' && name[1] == 'c' && name[2] == '\0') // pc
-    return true;
-
-  return false;
-}
-
-void ABISysV_i386::Initialize() {
-  PluginManager::RegisterPlugin(
-      GetPluginNameStatic(), "System V ABI for i386 targets", CreateInstance);
-}
-
-void ABISysV_i386::Terminate() {
-  PluginManager::UnregisterPlugin(CreateInstance);
-}
-
-// PluginInterface protocol
-
-lldb_private::ConstString ABISysV_i386::GetPluginNameStatic() {
-  static ConstString g_name("sysv-i386");
-  return g_name;
-}
-
-lldb_private::ConstString ABISysV_i386::GetPluginName() {
-  return GetPluginNameStatic();
-}
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.h b/gnu/llvm/lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.h
deleted file mode 100644 (file)
index 2362e9a..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-//===------------------- ABISysV_i386.h -------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_ABISysV_i386_h_
-#define liblldb_ABISysV_i386_h_
-
-#include "lldb/Target/ABI.h"
-#include "lldb/lldb-private.h"
-
-class ABISysV_i386 : public lldb_private::ABI {
-public:
-  ~ABISysV_i386() override = default;
-
-  size_t GetRedZoneSize() const override {
-    return 0; // There is no red zone for i386 Architecture
-  }
-
-  bool PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp,
-                          lldb::addr_t functionAddress,
-                          lldb::addr_t returnAddress,
-                          llvm::ArrayRef<lldb::addr_t> args) const override;
-
-  bool GetArgumentValues(lldb_private::Thread &thread,
-                         lldb_private::ValueList &values) const override;
-
-  lldb_private::Status
-  SetReturnValueObject(lldb::StackFrameSP &frame_sp,
-                       lldb::ValueObjectSP &new_value) override;
-
-  lldb::ValueObjectSP
-  GetReturnValueObjectImpl(lldb_private::Thread &thread,
-                           lldb_private::CompilerType &type) const override;
-
-  bool
-  CreateFunctionEntryUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
-  bool CreateDefaultUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
-  bool RegisterIsVolatile(const lldb_private::RegisterInfo *reg_info) override {
-    return !RegisterIsCalleeSaved(reg_info);
-  }
-
-  // The SysV i386 ABI requires that stack frames be 16 byte aligned.
-  // When there is a trap handler on the stack, e.g. _sigtramp in userland
-  // code, we've seen that the stack pointer is often not aligned properly
-  // before the handler is invoked.  This means that lldb will stop the unwind
-  // early -- before the function which caused the trap.
-  //
-  // To work around this, we relax that alignment to be just word-size
-  // (4-bytes).
-  // Whitelisting the trap handlers for user space would be easy (_sigtramp) but
-  // in other environments there can be a large number of different functions
-  // involved in async traps.
-
-  // ToDo: When __m256 arguments are passed then stack frames should be
-  // 32 byte aligned. Decide what to do for 32 byte alignment checking
-  bool CallFrameAddressIsValid(lldb::addr_t cfa) override {
-    // Make sure the stack call frame addresses are 4 byte aligned
-    if (cfa & (4ull - 1ull))
-      return false; // Not 4 byte aligned
-    if (cfa == 0)
-      return false; // Zero is not a valid stack address
-    return true;
-  }
-
-  bool CodeAddressIsValid(lldb::addr_t pc) override {
-    // Check whether the address is a valid 32 bit address
-    return (pc <= UINT32_MAX);
-  }
-
-  const lldb_private::RegisterInfo *
-  GetRegisterInfoArray(uint32_t &count) override;
-
-  // Static Functions
-
-  static void Initialize();
-
-  static void Terminate();
-
-  static lldb::ABISP CreateInstance(lldb::ProcessSP process_sp, const lldb_private::ArchSpec &arch);
-
-  // PluginInterface protocol
-
-  static lldb_private::ConstString GetPluginNameStatic();
-
-  lldb_private::ConstString GetPluginName() override;
-
-  uint32_t GetPluginVersion() override { return 1; }
-
-protected:
-  lldb::ValueObjectSP
-  GetReturnValueObjectSimple(lldb_private::Thread &thread,
-                             lldb_private::CompilerType &ast_type) const;
-
-  bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info);
-
-private:
-  ABISysV_i386(lldb::ProcessSP process_sp,
-               std::unique_ptr<llvm::MCRegisterInfo> info_up)
-      : lldb_private::ABI(std::move(process_sp), std::move(info_up)) {
-    // Call CreateInstance instead.
-  }
-};
-
-#endif // liblldb_ABISysV_i386_h_
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-i386/CMakeLists.txt b/gnu/llvm/lldb/source/Plugins/ABI/SysV-i386/CMakeLists.txt
deleted file mode 100644 (file)
index 598b3d0..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-add_lldb_library(lldbPluginABISysV_i386 PLUGIN
-  ABISysV_i386.cpp
-
-  LINK_LIBS
-    lldbCore
-    lldbSymbol
-    lldbTarget
-  LINK_COMPONENTS
-    Support
-  )
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp b/gnu/llvm/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp
deleted file mode 100644 (file)
index 416db9f..0000000
+++ /dev/null
@@ -1,1064 +0,0 @@
-//===-- ABISysV_mips.cpp ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "ABISysV_mips.h"
-
-#include "llvm/ADT/STLExtras.h"
-#include "llvm/ADT/Triple.h"
-
-#include "lldb/Core/Module.h"
-#include "lldb/Core/PluginManager.h"
-#include "lldb/Core/Value.h"
-#include "lldb/Core/ValueObjectConstResult.h"
-#include "lldb/Core/ValueObjectMemory.h"
-#include "lldb/Core/ValueObjectRegister.h"
-#include "lldb/Symbol/UnwindPlan.h"
-#include "lldb/Target/Process.h"
-#include "lldb/Target/RegisterContext.h"
-#include "lldb/Target/StackFrame.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Target/Thread.h"
-#include "lldb/Utility/ConstString.h"
-#include "lldb/Utility/DataExtractor.h"
-#include "lldb/Utility/Log.h"
-#include "lldb/Utility/RegisterValue.h"
-#include "lldb/Utility/Status.h"
-
-using namespace lldb;
-using namespace lldb_private;
-
-enum dwarf_regnums {
-  dwarf_r0 = 0,
-  dwarf_r1,
-  dwarf_r2,
-  dwarf_r3,
-  dwarf_r4,
-  dwarf_r5,
-  dwarf_r6,
-  dwarf_r7,
-  dwarf_r8,
-  dwarf_r9,
-  dwarf_r10,
-  dwarf_r11,
-  dwarf_r12,
-  dwarf_r13,
-  dwarf_r14,
-  dwarf_r15,
-  dwarf_r16,
-  dwarf_r17,
-  dwarf_r18,
-  dwarf_r19,
-  dwarf_r20,
-  dwarf_r21,
-  dwarf_r22,
-  dwarf_r23,
-  dwarf_r24,
-  dwarf_r25,
-  dwarf_r26,
-  dwarf_r27,
-  dwarf_r28,
-  dwarf_r29,
-  dwarf_r30,
-  dwarf_r31,
-  dwarf_sr,
-  dwarf_lo,
-  dwarf_hi,
-  dwarf_bad,
-  dwarf_cause,
-  dwarf_pc
-};
-
-static const RegisterInfo g_register_infos[] = {
-    //  NAME      ALT    SZ OFF ENCODING        FORMAT         EH_FRAME
-    //  DWARF                   GENERIC                     PROCESS PLUGINS
-    //  LLDB NATIVE            VALUE REGS  INVALIDATE REGS
-    //  ========  ======  == === =============  ===========    ============
-    //  ==============          ============                =================
-    //  ===================     ========== =================
-    {"r0",
-     "zero",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r0, dwarf_r0, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r1",
-     "AT",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r1, dwarf_r1, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r2",
-     "v0",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r2, dwarf_r2, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r3",
-     "v1",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r3, dwarf_r3, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r4",
-     "arg1",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r4, dwarf_r4, LLDB_REGNUM_GENERIC_ARG1, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r5",
-     "arg2",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r5, dwarf_r5, LLDB_REGNUM_GENERIC_ARG2, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r6",
-     "arg3",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r6, dwarf_r6, LLDB_REGNUM_GENERIC_ARG3, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r7",
-     "arg4",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r7, dwarf_r7, LLDB_REGNUM_GENERIC_ARG4, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r8",
-     "arg5",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r8, dwarf_r8, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r9",
-     "arg6",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r9, dwarf_r9, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r10",
-     "arg7",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r10, dwarf_r10, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r11",
-     "arg8",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r11, dwarf_r11, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r12",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r12, dwarf_r12, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r13",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r13, dwarf_r13, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r14",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r14, dwarf_r14, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r15",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r15, dwarf_r15, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r16",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r16, dwarf_r16, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r17",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r17, dwarf_r17, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r18",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r18, dwarf_r18, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r19",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r19, dwarf_r19, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r20",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r20, dwarf_r20, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r21",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r21, dwarf_r21, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r22",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r22, dwarf_r22, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r23",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r23, dwarf_r23, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r24",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r24, dwarf_r24, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r25",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r25, dwarf_r25, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r26",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r26, dwarf_r26, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r27",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r27, dwarf_r27, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r28",
-     "gp",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r28, dwarf_r28, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r29",
-     "sp",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r29, dwarf_r29, LLDB_REGNUM_GENERIC_SP, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r30",
-     "fp",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r30, dwarf_r30, LLDB_REGNUM_GENERIC_FP, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r31",
-     "ra",
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r31, dwarf_r31, LLDB_REGNUM_GENERIC_RA, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"sr",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_sr, dwarf_sr, LLDB_REGNUM_GENERIC_FLAGS, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"lo",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_lo, dwarf_lo, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"hi",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_hi, dwarf_hi, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"bad",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_bad, dwarf_bad, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"cause",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_cause, dwarf_cause, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"pc",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_pc, dwarf_pc, LLDB_REGNUM_GENERIC_PC, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-};
-
-static const uint32_t k_num_register_infos =
-    llvm::array_lengthof(g_register_infos);
-
-const lldb_private::RegisterInfo *
-ABISysV_mips::GetRegisterInfoArray(uint32_t &count) {
-  count = k_num_register_infos;
-  return g_register_infos;
-}
-
-size_t ABISysV_mips::GetRedZoneSize() const { return 0; }
-
-// Static Functions
-
-ABISP
-ABISysV_mips::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
-  const llvm::Triple::ArchType arch_type = arch.GetTriple().getArch();
-  if ((arch_type == llvm::Triple::mips) ||
-      (arch_type == llvm::Triple::mipsel)) {
-    return ABISP(
-        new ABISysV_mips(std::move(process_sp), MakeMCRegisterInfo(arch)));
-  }
-  return ABISP();
-}
-
-bool ABISysV_mips::PrepareTrivialCall(Thread &thread, addr_t sp,
-                                      addr_t func_addr, addr_t return_addr,
-                                      llvm::ArrayRef<addr_t> args) const {
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
-
-  if (log) {
-    StreamString s;
-    s.Printf("ABISysV_mips::PrepareTrivialCall (tid = 0x%" PRIx64
-             ", sp = 0x%" PRIx64 ", func_addr = 0x%" PRIx64
-             ", return_addr = 0x%" PRIx64,
-             thread.GetID(), (uint64_t)sp, (uint64_t)func_addr,
-             (uint64_t)return_addr);
-
-    for (size_t i = 0; i < args.size(); ++i)
-      s.Printf(", arg%zd = 0x%" PRIx64, i + 1, args[i]);
-    s.PutCString(")");
-    log->PutString(s.GetString());
-  }
-
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-  if (!reg_ctx)
-    return false;
-
-  const RegisterInfo *reg_info = nullptr;
-
-  RegisterValue reg_value;
-
-  // Argument registers
-  const char *reg_names[] = {"r4", "r5", "r6", "r7"};
-
-  llvm::ArrayRef<addr_t>::iterator ai = args.begin(), ae = args.end();
-
-  // Write arguments to registers
-  for (size_t i = 0; i < llvm::array_lengthof(reg_names); ++i) {
-    if (ai == ae)
-      break;
-
-    reg_info = reg_ctx->GetRegisterInfo(eRegisterKindGeneric,
-                                        LLDB_REGNUM_GENERIC_ARG1 + i);
-    LLDB_LOGF(log, "About to write arg%zd (0x%" PRIx64 ") into %s", i + 1,
-              args[i], reg_info->name);
-
-    if (!reg_ctx->WriteRegisterFromUnsigned(reg_info, args[i]))
-      return false;
-
-    ++ai;
-  }
-
-  // If we have more than 4 arguments --Spill onto the stack
-  if (ai != ae) {
-    // No of arguments to go on stack
-    size_t num_stack_regs = args.size();
-
-    // Allocate needed space for args on the stack
-    sp -= (num_stack_regs * 4);
-
-    // Keep the stack 8 byte aligned
-    sp &= ~(8ull - 1ull);
-
-    // just using arg1 to get the right size
-    const RegisterInfo *reg_info = reg_ctx->GetRegisterInfo(
-        eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1);
-
-    addr_t arg_pos = sp + 16;
-
-    size_t i = 4;
-    for (; ai != ae; ++ai) {
-      reg_value.SetUInt32(*ai);
-      LLDB_LOGF(log, "About to write arg%zd (0x%" PRIx64 ") at  0x%" PRIx64 "",
-                i + 1, args[i], arg_pos);
-
-      if (reg_ctx
-              ->WriteRegisterValueToMemory(reg_info, arg_pos,
-                                           reg_info->byte_size, reg_value)
-              .Fail())
-        return false;
-      arg_pos += reg_info->byte_size;
-      i++;
-    }
-  }
-
-  Status error;
-  const RegisterInfo *pc_reg_info =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC);
-  const RegisterInfo *sp_reg_info =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_SP);
-  const RegisterInfo *ra_reg_info =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_RA);
-  const RegisterInfo *r25_info = reg_ctx->GetRegisterInfoByName("r25", 0);
-  const RegisterInfo *r0_info = reg_ctx->GetRegisterInfoByName("zero", 0);
-
-  LLDB_LOGF(log, "Writing R0: 0x%" PRIx64, (uint64_t)0);
-
-  /* Write r0 with 0, in case we are stopped in syscall,
-   * such setting prevents automatic decrement of the PC.
-   * This clears the bug 23659 for MIPS.
-  */
-  if (!reg_ctx->WriteRegisterFromUnsigned(r0_info, (uint64_t)0))
-    return false;
-
-  LLDB_LOGF(log, "Writing SP: 0x%" PRIx64, (uint64_t)sp);
-
-  // Set "sp" to the requested value
-  if (!reg_ctx->WriteRegisterFromUnsigned(sp_reg_info, sp))
-    return false;
-
-  LLDB_LOGF(log, "Writing RA: 0x%" PRIx64, (uint64_t)return_addr);
-
-  // Set "ra" to the return address
-  if (!reg_ctx->WriteRegisterFromUnsigned(ra_reg_info, return_addr))
-    return false;
-
-  LLDB_LOGF(log, "Writing PC: 0x%" PRIx64, (uint64_t)func_addr);
-
-  // Set pc to the address of the called function.
-  if (!reg_ctx->WriteRegisterFromUnsigned(pc_reg_info, func_addr))
-    return false;
-
-  LLDB_LOGF(log, "Writing r25: 0x%" PRIx64, (uint64_t)func_addr);
-
-  // All callers of position independent functions must place the address of
-  // the called function in t9 (r25)
-  if (!reg_ctx->WriteRegisterFromUnsigned(r25_info, func_addr))
-    return false;
-
-  return true;
-}
-
-bool ABISysV_mips::GetArgumentValues(Thread &thread, ValueList &values) const {
-  return false;
-}
-
-Status ABISysV_mips::SetReturnValueObject(lldb::StackFrameSP &frame_sp,
-                                          lldb::ValueObjectSP &new_value_sp) {
-  Status error;
-  if (!new_value_sp) {
-    error.SetErrorString("Empty value object for return value.");
-    return error;
-  }
-
-  CompilerType compiler_type = new_value_sp->GetCompilerType();
-  if (!compiler_type) {
-    error.SetErrorString("Null clang type for return value.");
-    return error;
-  }
-
-  Thread *thread = frame_sp->GetThread().get();
-
-  bool is_signed;
-  uint32_t count;
-  bool is_complex;
-
-  RegisterContext *reg_ctx = thread->GetRegisterContext().get();
-
-  bool set_it_simple = false;
-  if (compiler_type.IsIntegerOrEnumerationType(is_signed) ||
-      compiler_type.IsPointerType()) {
-    DataExtractor data;
-    Status data_error;
-    size_t num_bytes = new_value_sp->GetData(data, data_error);
-    if (data_error.Fail()) {
-      error.SetErrorStringWithFormat(
-          "Couldn't convert return value to raw data: %s",
-          data_error.AsCString());
-      return error;
-    }
-
-    lldb::offset_t offset = 0;
-    if (num_bytes <= 8) {
-      const RegisterInfo *r2_info = reg_ctx->GetRegisterInfoByName("r2", 0);
-      if (num_bytes <= 4) {
-        uint32_t raw_value = data.GetMaxU32(&offset, num_bytes);
-
-        if (reg_ctx->WriteRegisterFromUnsigned(r2_info, raw_value))
-          set_it_simple = true;
-      } else {
-        uint32_t raw_value = data.GetMaxU32(&offset, 4);
-
-        if (reg_ctx->WriteRegisterFromUnsigned(r2_info, raw_value)) {
-          const RegisterInfo *r3_info = reg_ctx->GetRegisterInfoByName("r3", 0);
-          uint32_t raw_value = data.GetMaxU32(&offset, num_bytes - offset);
-
-          if (reg_ctx->WriteRegisterFromUnsigned(r3_info, raw_value))
-            set_it_simple = true;
-        }
-      }
-    } else {
-      error.SetErrorString("We don't support returning longer than 64 bit "
-                           "integer values at present.");
-    }
-  } else if (compiler_type.IsFloatingPointType(count, is_complex)) {
-    if (is_complex)
-      error.SetErrorString(
-          "We don't support returning complex values at present");
-    else
-      error.SetErrorString(
-          "We don't support returning float values at present");
-  }
-
-  if (!set_it_simple)
-    error.SetErrorString(
-        "We only support setting simple integer return types at present.");
-
-  return error;
-}
-
-ValueObjectSP ABISysV_mips::GetReturnValueObjectSimple(
-    Thread &thread, CompilerType &return_compiler_type) const {
-  ValueObjectSP return_valobj_sp;
-  return return_valobj_sp;
-}
-
-ValueObjectSP ABISysV_mips::GetReturnValueObjectImpl(
-    Thread &thread, CompilerType &return_compiler_type) const {
-  ValueObjectSP return_valobj_sp;
-  Value value;
-
-  if (!return_compiler_type)
-    return return_valobj_sp;
-
-  ExecutionContext exe_ctx(thread.shared_from_this());
-  if (exe_ctx.GetTargetPtr() == nullptr || exe_ctx.GetProcessPtr() == nullptr)
-    return return_valobj_sp;
-
-  Target *target = exe_ctx.GetTargetPtr();
-  const ArchSpec target_arch = target->GetArchitecture();
-  ByteOrder target_byte_order = target_arch.GetByteOrder();
-  value.SetCompilerType(return_compiler_type);
-  uint32_t fp_flag =
-      target_arch.GetFlags() & lldb_private::ArchSpec::eMIPS_ABI_FP_mask;
-
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-  if (!reg_ctx)
-    return return_valobj_sp;
-
-  bool is_signed = false;
-  bool is_complex = false;
-  uint32_t count = 0;
-
-  // In MIPS register "r2" (v0) holds the integer function return values
-  const RegisterInfo *r2_reg_info = reg_ctx->GetRegisterInfoByName("r2", 0);
-  llvm::Optional<uint64_t> bit_width = return_compiler_type.GetBitSize(&thread);
-  if (!bit_width)
-    return return_valobj_sp;
-  if (return_compiler_type.IsIntegerOrEnumerationType(is_signed)) {
-    switch (*bit_width) {
-    default:
-      return return_valobj_sp;
-    case 64: {
-      const RegisterInfo *r3_reg_info = reg_ctx->GetRegisterInfoByName("r3", 0);
-      uint64_t raw_value;
-      raw_value = reg_ctx->ReadRegisterAsUnsigned(r2_reg_info, 0) & UINT32_MAX;
-      raw_value |= ((uint64_t)(reg_ctx->ReadRegisterAsUnsigned(r3_reg_info, 0) &
-                               UINT32_MAX))
-                   << 32;
-      if (is_signed)
-        value.GetScalar() = (int64_t)raw_value;
-      else
-        value.GetScalar() = (uint64_t)raw_value;
-    } break;
-    case 32:
-      if (is_signed)
-        value.GetScalar() = (int32_t)(
-            reg_ctx->ReadRegisterAsUnsigned(r2_reg_info, 0) & UINT32_MAX);
-      else
-        value.GetScalar() = (uint32_t)(
-            reg_ctx->ReadRegisterAsUnsigned(r2_reg_info, 0) & UINT32_MAX);
-      break;
-    case 16:
-      if (is_signed)
-        value.GetScalar() = (int16_t)(
-            reg_ctx->ReadRegisterAsUnsigned(r2_reg_info, 0) & UINT16_MAX);
-      else
-        value.GetScalar() = (uint16_t)(
-            reg_ctx->ReadRegisterAsUnsigned(r2_reg_info, 0) & UINT16_MAX);
-      break;
-    case 8:
-      if (is_signed)
-        value.GetScalar() = (int8_t)(
-            reg_ctx->ReadRegisterAsUnsigned(r2_reg_info, 0) & UINT8_MAX);
-      else
-        value.GetScalar() = (uint8_t)(
-            reg_ctx->ReadRegisterAsUnsigned(r2_reg_info, 0) & UINT8_MAX);
-      break;
-    }
-  } else if (return_compiler_type.IsPointerType()) {
-    uint32_t ptr =
-        thread.GetRegisterContext()->ReadRegisterAsUnsigned(r2_reg_info, 0) &
-        UINT32_MAX;
-    value.GetScalar() = ptr;
-  } else if (return_compiler_type.IsAggregateType()) {
-    // Structure/Vector is always passed in memory and pointer to that memory
-    // is passed in r2.
-    uint64_t mem_address = reg_ctx->ReadRegisterAsUnsigned(
-        reg_ctx->GetRegisterInfoByName("r2", 0), 0);
-    // We have got the address. Create a memory object out of it
-    return_valobj_sp = ValueObjectMemory::Create(
-        &thread, "", Address(mem_address, nullptr), return_compiler_type);
-    return return_valobj_sp;
-  } else if (return_compiler_type.IsFloatingPointType(count, is_complex)) {
-    if (IsSoftFloat(fp_flag)) {
-      uint64_t raw_value = reg_ctx->ReadRegisterAsUnsigned(r2_reg_info, 0);
-      if (count != 1 && is_complex)
-        return return_valobj_sp;
-      switch (*bit_width) {
-      default:
-        return return_valobj_sp;
-      case 32:
-        static_assert(sizeof(float) == sizeof(uint32_t), "");
-        value.GetScalar() = *((float *)(&raw_value));
-        break;
-      case 64:
-        static_assert(sizeof(double) == sizeof(uint64_t), "");
-        const RegisterInfo *r3_reg_info =
-            reg_ctx->GetRegisterInfoByName("r3", 0);
-        if (target_byte_order == eByteOrderLittle)
-          raw_value =
-              ((reg_ctx->ReadRegisterAsUnsigned(r3_reg_info, 0)) << 32) |
-              raw_value;
-        else
-          raw_value = (raw_value << 32) |
-                      reg_ctx->ReadRegisterAsUnsigned(r3_reg_info, 0);
-        value.GetScalar() = *((double *)(&raw_value));
-        break;
-      }
-    }
-
-    else {
-      const RegisterInfo *f0_info = reg_ctx->GetRegisterInfoByName("f0", 0);
-      RegisterValue f0_value;
-      DataExtractor f0_data;
-      reg_ctx->ReadRegister(f0_info, f0_value);
-      f0_value.GetData(f0_data);
-      lldb::offset_t offset = 0;
-
-      if (count == 1 && !is_complex) {
-        switch (*bit_width) {
-        default:
-          return return_valobj_sp;
-        case 64: {
-          static_assert(sizeof(double) == sizeof(uint64_t), "");
-          const RegisterInfo *f1_info = reg_ctx->GetRegisterInfoByName("f1", 0);
-          RegisterValue f1_value;
-          DataExtractor f1_data;
-          reg_ctx->ReadRegister(f1_info, f1_value);
-          DataExtractor *copy_from_extractor = nullptr;
-          DataBufferSP data_sp(new DataBufferHeap(8, 0));
-          DataExtractor return_ext(
-              data_sp, target_byte_order,
-              target->GetArchitecture().GetAddressByteSize());
-
-          if (target_byte_order == eByteOrderLittle) {
-            copy_from_extractor = &f0_data;
-            copy_from_extractor->CopyByteOrderedData(
-                offset, 4, data_sp->GetBytes(), 4, target_byte_order);
-            f1_value.GetData(f1_data);
-            copy_from_extractor = &f1_data;
-            copy_from_extractor->CopyByteOrderedData(
-                offset, 4, data_sp->GetBytes() + 4, 4, target_byte_order);
-          } else {
-            copy_from_extractor = &f0_data;
-            copy_from_extractor->CopyByteOrderedData(
-                offset, 4, data_sp->GetBytes() + 4, 4, target_byte_order);
-            f1_value.GetData(f1_data);
-            copy_from_extractor = &f1_data;
-            copy_from_extractor->CopyByteOrderedData(
-                offset, 4, data_sp->GetBytes(), 4, target_byte_order);
-          }
-          value.GetScalar() = (double)return_ext.GetDouble(&offset);
-          break;
-        }
-        case 32: {
-          static_assert(sizeof(float) == sizeof(uint32_t), "");
-          value.GetScalar() = (float)f0_data.GetFloat(&offset);
-          break;
-        }
-        }
-      } else {
-        // not handled yet
-        return return_valobj_sp;
-      }
-    }
-  } else {
-    // not handled yet
-    return return_valobj_sp;
-  }
-
-  // If we get here, we have a valid Value, so make our ValueObject out of it:
-
-  return_valobj_sp = ValueObjectConstResult::Create(
-      thread.GetStackFrameAtIndex(0).get(), value, ConstString(""));
-  return return_valobj_sp;
-}
-
-bool ABISysV_mips::CreateFunctionEntryUnwindPlan(UnwindPlan &unwind_plan) {
-  unwind_plan.Clear();
-  unwind_plan.SetRegisterKind(eRegisterKindDWARF);
-
-  UnwindPlan::RowSP row(new UnwindPlan::Row);
-
-  // Our Call Frame Address is the stack pointer value
-  row->GetCFAValue().SetIsRegisterPlusOffset(dwarf_r29, 0);
-
-  // The previous PC is in the RA
-  row->SetRegisterLocationToRegister(dwarf_pc, dwarf_r31, true);
-  unwind_plan.AppendRow(row);
-
-  // All other registers are the same.
-
-  unwind_plan.SetSourceName("mips at-func-entry default");
-  unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
-  unwind_plan.SetReturnAddressRegister(dwarf_r31);
-  return true;
-}
-
-bool ABISysV_mips::CreateDefaultUnwindPlan(UnwindPlan &unwind_plan) {
-  unwind_plan.Clear();
-  unwind_plan.SetRegisterKind(eRegisterKindDWARF);
-
-  UnwindPlan::RowSP row(new UnwindPlan::Row);
-
-  row->GetCFAValue().SetIsRegisterPlusOffset(dwarf_r29, 0);
-
-  row->SetRegisterLocationToRegister(dwarf_pc, dwarf_r31, true);
-
-  unwind_plan.AppendRow(row);
-  unwind_plan.SetSourceName("mips default unwind plan");
-  unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
-  unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
-  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
-  return true;
-}
-
-bool ABISysV_mips::RegisterIsVolatile(const RegisterInfo *reg_info) {
-  return !RegisterIsCalleeSaved(reg_info);
-}
-
-bool ABISysV_mips::IsSoftFloat(uint32_t fp_flags) const {
-  return (fp_flags == lldb_private::ArchSpec::eMIPS_ABI_FP_SOFT);
-}
-
-bool ABISysV_mips::RegisterIsCalleeSaved(const RegisterInfo *reg_info) {
-  if (reg_info) {
-    // Preserved registers are :
-    // r16-r23, r28, r29, r30, r31
-    const char *name = reg_info->name;
-
-    if (name[0] == 'r') {
-      switch (name[1]) {
-      case '1':
-        if (name[2] == '6' || name[2] == '7' || name[2] == '8' ||
-            name[2] == '9') // r16-r19
-          return name[3] == '\0';
-        break;
-      case '2':
-        if (name[2] == '0' || name[2] == '1' || name[2] == '2' ||
-            name[2] == '3'                       // r20-r23
-            || name[2] == '8' || name[2] == '9') // r28 and r29
-          return name[3] == '\0';
-        break;
-      case '3':
-        if (name[2] == '0' || name[2] == '1') // r30 and r31
-          return name[3] == '\0';
-        break;
-      }
-
-      if (name[0] == 'g' && name[1] == 'p' && name[2] == '\0') // gp (r28)
-        return true;
-      if (name[0] == 's' && name[1] == 'p' && name[2] == '\0') // sp (r29)
-        return true;
-      if (name[0] == 'f' && name[1] == 'p' && name[2] == '\0') // fp (r30)
-        return true;
-      if (name[0] == 'r' && name[1] == 'a' && name[2] == '\0') // ra (r31)
-        return true;
-    }
-  }
-  return false;
-}
-
-void ABISysV_mips::Initialize() {
-  PluginManager::RegisterPlugin(
-      GetPluginNameStatic(), "System V ABI for mips targets", CreateInstance);
-}
-
-void ABISysV_mips::Terminate() {
-  PluginManager::UnregisterPlugin(CreateInstance);
-}
-
-lldb_private::ConstString ABISysV_mips::GetPluginNameStatic() {
-  static ConstString g_name("sysv-mips");
-  return g_name;
-}
-
-// PluginInterface protocol
-
-lldb_private::ConstString ABISysV_mips::GetPluginName() {
-  return GetPluginNameStatic();
-}
-
-uint32_t ABISysV_mips::GetPluginVersion() { return 1; }
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.h b/gnu/llvm/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.h
deleted file mode 100644 (file)
index 8143f55..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-//===-- ABISysV_mips.h ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_ABISysV_mips_h_
-#define liblldb_ABISysV_mips_h_
-
-#include "lldb/Target/ABI.h"
-#include "lldb/lldb-private.h"
-
-class ABISysV_mips : public lldb_private::ABI {
-public:
-  ~ABISysV_mips() override = default;
-
-  size_t GetRedZoneSize() const override;
-
-  bool PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp,
-                          lldb::addr_t functionAddress,
-                          lldb::addr_t returnAddress,
-                          llvm::ArrayRef<lldb::addr_t> args) const override;
-
-  bool GetArgumentValues(lldb_private::Thread &thread,
-                         lldb_private::ValueList &values) const override;
-
-  lldb_private::Status
-  SetReturnValueObject(lldb::StackFrameSP &frame_sp,
-                       lldb::ValueObjectSP &new_value) override;
-
-  lldb::ValueObjectSP
-  GetReturnValueObjectImpl(lldb_private::Thread &thread,
-                           lldb_private::CompilerType &type) const override;
-
-  bool
-  CreateFunctionEntryUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
-  bool CreateDefaultUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
-  bool RegisterIsVolatile(const lldb_private::RegisterInfo *reg_info) override;
-
-  bool IsSoftFloat(uint32_t fp_flag) const;
-
-  bool CallFrameAddressIsValid(lldb::addr_t cfa) override {
-    // Make sure the stack call frame addresses are 8 byte aligned
-    if (cfa & (8ull - 1ull))
-      return false; // Not 8 byte aligned
-    if (cfa == 0)
-      return false; // Zero is not a valid stack address
-    return true;
-  }
-
-  bool CodeAddressIsValid(lldb::addr_t pc) override {
-    // Just make sure the address is a valid 32 bit address. Bit zero
-    // might be set due to MicroMIPS function calls, so don't enforce alignment.
-    return (pc <= UINT32_MAX);
-  }
-
-  const lldb_private::RegisterInfo *
-  GetRegisterInfoArray(uint32_t &count) override;
-
-  // Static Functions
-
-  static void Initialize();
-
-  static void Terminate();
-
-  static lldb::ABISP CreateInstance(lldb::ProcessSP process_sp, const lldb_private::ArchSpec &arch);
-
-  static lldb_private::ConstString GetPluginNameStatic();
-
-  // PluginInterface protocol
-
-  lldb_private::ConstString GetPluginName() override;
-
-  uint32_t GetPluginVersion() override;
-
-protected:
-  void CreateRegisterMapIfNeeded();
-
-  lldb::ValueObjectSP
-  GetReturnValueObjectSimple(lldb_private::Thread &thread,
-                             lldb_private::CompilerType &ast_type) const;
-
-  bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info);
-
-private:
-  ABISysV_mips(lldb::ProcessSP process_sp,
-               std::unique_ptr<llvm::MCRegisterInfo> info_up)
-      : lldb_private::ABI(std::move(process_sp), std::move(info_up)) {
-    // Call CreateInstance instead.
-  }
-};
-
-#endif // liblldb_ABISysV_mips_h_
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-mips/CMakeLists.txt b/gnu/llvm/lldb/source/Plugins/ABI/SysV-mips/CMakeLists.txt
deleted file mode 100644 (file)
index a3266a7..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-add_lldb_library(lldbPluginABISysV_mips PLUGIN
-  ABISysV_mips.cpp
-
-  LINK_LIBS
-    lldbCore
-    lldbSymbol
-    lldbTarget
-  LINK_COMPONENTS
-    Support
-  )
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp b/gnu/llvm/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp
deleted file mode 100644 (file)
index 72ec071..0000000
+++ /dev/null
@@ -1,1212 +0,0 @@
-//===-- ABISysV_mips64.cpp --------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "ABISysV_mips64.h"
-
-#include "llvm/ADT/STLExtras.h"
-#include "llvm/ADT/Triple.h"
-
-#include "lldb/Core/Module.h"
-#include "lldb/Core/PluginManager.h"
-#include "lldb/Core/Value.h"
-#include "lldb/Core/ValueObjectConstResult.h"
-#include "lldb/Core/ValueObjectMemory.h"
-#include "lldb/Core/ValueObjectRegister.h"
-#include "lldb/Symbol/UnwindPlan.h"
-#include "lldb/Target/Process.h"
-#include "lldb/Target/RegisterContext.h"
-#include "lldb/Target/StackFrame.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Target/Thread.h"
-#include "lldb/Utility/ConstString.h"
-#include "lldb/Utility/DataExtractor.h"
-#include "lldb/Utility/Log.h"
-#include "lldb/Utility/RegisterValue.h"
-#include "lldb/Utility/Status.h"
-
-using namespace lldb;
-using namespace lldb_private;
-
-enum dwarf_regnums {
-  dwarf_r0 = 0,
-  dwarf_r1,
-  dwarf_r2,
-  dwarf_r3,
-  dwarf_r4,
-  dwarf_r5,
-  dwarf_r6,
-  dwarf_r7,
-  dwarf_r8,
-  dwarf_r9,
-  dwarf_r10,
-  dwarf_r11,
-  dwarf_r12,
-  dwarf_r13,
-  dwarf_r14,
-  dwarf_r15,
-  dwarf_r16,
-  dwarf_r17,
-  dwarf_r18,
-  dwarf_r19,
-  dwarf_r20,
-  dwarf_r21,
-  dwarf_r22,
-  dwarf_r23,
-  dwarf_r24,
-  dwarf_r25,
-  dwarf_r26,
-  dwarf_r27,
-  dwarf_r28,
-  dwarf_r29,
-  dwarf_r30,
-  dwarf_r31,
-  dwarf_sr,
-  dwarf_lo,
-  dwarf_hi,
-  dwarf_bad,
-  dwarf_cause,
-  dwarf_pc
-};
-
-static const RegisterInfo g_register_infos_mips64[] = {
-    //  NAME      ALT    SZ OFF ENCODING        FORMAT         EH_FRAME
-    //  DWARF                   GENERIC                     PROCESS PLUGIN
-    //  LLDB NATIVE
-    //  ========  ======  == === =============  ==========     =============
-    //  =================       ====================        =================
-    //  ====================
-    {"r0",
-     "zero",
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r0, dwarf_r0, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r1",
-     "AT",
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r1, dwarf_r1, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r2",
-     "v0",
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r2, dwarf_r2, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r3",
-     "v1",
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r3, dwarf_r3, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r4",
-     "arg1",
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r4, dwarf_r4, LLDB_REGNUM_GENERIC_ARG1, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r5",
-     "arg2",
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r5, dwarf_r5, LLDB_REGNUM_GENERIC_ARG2, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r6",
-     "arg3",
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r6, dwarf_r6, LLDB_REGNUM_GENERIC_ARG3, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r7",
-     "arg4",
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r7, dwarf_r7, LLDB_REGNUM_GENERIC_ARG4, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r8",
-     "arg5",
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r8, dwarf_r8, LLDB_REGNUM_GENERIC_ARG5, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r9",
-     "arg6",
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r9, dwarf_r9, LLDB_REGNUM_GENERIC_ARG6, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r10",
-     "arg7",
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r10, dwarf_r10, LLDB_REGNUM_GENERIC_ARG7, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r11",
-     "arg8",
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r11, dwarf_r11, LLDB_REGNUM_GENERIC_ARG8, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r12",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r12, dwarf_r12, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r13",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r13, dwarf_r13, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r14",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r14, dwarf_r14, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r15",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r15, dwarf_r15, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r16",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r16, dwarf_r16, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r17",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r17, dwarf_r17, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r18",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r18, dwarf_r18, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r19",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r19, dwarf_r19, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r20",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r20, dwarf_r20, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r21",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r21, dwarf_r21, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r22",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r22, dwarf_r22, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r23",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r23, dwarf_r23, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r24",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r24, dwarf_r24, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r25",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r25, dwarf_r25, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r26",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r26, dwarf_r26, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r27",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r27, dwarf_r27, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r28",
-     "gp",
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r28, dwarf_r28, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r29",
-     "sp",
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r29, dwarf_r29, LLDB_REGNUM_GENERIC_SP, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r30",
-     "fp",
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r30, dwarf_r30, LLDB_REGNUM_GENERIC_FP, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r31",
-     "ra",
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r31, dwarf_r31, LLDB_REGNUM_GENERIC_RA, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"sr",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_sr, dwarf_sr, LLDB_REGNUM_GENERIC_FLAGS, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"lo",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_lo, dwarf_lo, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"hi",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_hi, dwarf_hi, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"bad",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_bad, dwarf_bad, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"cause",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_cause, dwarf_cause, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"pc",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_pc, dwarf_pc, LLDB_REGNUM_GENERIC_PC, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-};
-
-static const uint32_t k_num_register_infos =
-    llvm::array_lengthof(g_register_infos_mips64);
-
-const lldb_private::RegisterInfo *
-ABISysV_mips64::GetRegisterInfoArray(uint32_t &count) {
-  count = k_num_register_infos;
-  return g_register_infos_mips64;
-}
-
-size_t ABISysV_mips64::GetRedZoneSize() const { return 0; }
-
-// Static Functions
-
-ABISP
-ABISysV_mips64::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
-  if (arch.GetTriple().isMIPS64())
-    return ABISP(
-        new ABISysV_mips64(std::move(process_sp), MakeMCRegisterInfo(arch)));
-  return ABISP();
-}
-
-bool ABISysV_mips64::PrepareTrivialCall(Thread &thread, addr_t sp,
-                                        addr_t func_addr, addr_t return_addr,
-                                        llvm::ArrayRef<addr_t> args) const {
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
-
-  if (log) {
-    StreamString s;
-    s.Printf("ABISysV_mips64::PrepareTrivialCall (tid = 0x%" PRIx64
-             ", sp = 0x%" PRIx64 ", func_addr = 0x%" PRIx64
-             ", return_addr = 0x%" PRIx64,
-             thread.GetID(), (uint64_t)sp, (uint64_t)func_addr,
-             (uint64_t)return_addr);
-
-    for (size_t i = 0; i < args.size(); ++i)
-      s.Printf(", arg%zd = 0x%" PRIx64, i + 1, args[i]);
-    s.PutCString(")");
-    log->PutString(s.GetString());
-  }
-
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-  if (!reg_ctx)
-    return false;
-
-  const RegisterInfo *reg_info = nullptr;
-
-  if (args.size() > 8) // TODO handle more than 8 arguments
-    return false;
-
-  for (size_t i = 0; i < args.size(); ++i) {
-    reg_info = reg_ctx->GetRegisterInfo(eRegisterKindGeneric,
-                                        LLDB_REGNUM_GENERIC_ARG1 + i);
-    LLDB_LOGF(log, "About to write arg%zd (0x%" PRIx64 ") into %s", i + 1,
-              args[i], reg_info->name);
-    if (!reg_ctx->WriteRegisterFromUnsigned(reg_info, args[i]))
-      return false;
-  }
-
-  // First, align the SP
-
-  LLDB_LOGF(log, "16-byte aligning SP: 0x%" PRIx64 " to 0x%" PRIx64,
-            (uint64_t)sp, (uint64_t)(sp & ~0xfull));
-
-  sp &= ~(0xfull); // 16-byte alignment
-
-  Status error;
-  const RegisterInfo *pc_reg_info =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC);
-  const RegisterInfo *sp_reg_info =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_SP);
-  const RegisterInfo *ra_reg_info =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_RA);
-  const RegisterInfo *r25_info = reg_ctx->GetRegisterInfoByName("r25", 0);
-  const RegisterInfo *r0_info = reg_ctx->GetRegisterInfoByName("zero", 0);
-
-  LLDB_LOGF(log, "Writing R0: 0x%" PRIx64, (uint64_t)0);
-
-  /* Write r0 with 0, in case we are stopped in syscall,
-   * such setting prevents automatic decrement of the PC.
-   * This clears the bug 23659 for MIPS.
-  */
-  if (!reg_ctx->WriteRegisterFromUnsigned(r0_info, (uint64_t)0))
-    return false;
-
-  LLDB_LOGF(log, "Writing SP: 0x%" PRIx64, (uint64_t)sp);
-
-  // Set "sp" to the requested value
-  if (!reg_ctx->WriteRegisterFromUnsigned(sp_reg_info, sp))
-    return false;
-
-  LLDB_LOGF(log, "Writing RA: 0x%" PRIx64, (uint64_t)return_addr);
-
-  // Set "ra" to the return address
-  if (!reg_ctx->WriteRegisterFromUnsigned(ra_reg_info, return_addr))
-    return false;
-
-  LLDB_LOGF(log, "Writing PC: 0x%" PRIx64, (uint64_t)func_addr);
-
-  // Set pc to the address of the called function.
-  if (!reg_ctx->WriteRegisterFromUnsigned(pc_reg_info, func_addr))
-    return false;
-
-  LLDB_LOGF(log, "Writing r25: 0x%" PRIx64, (uint64_t)func_addr);
-
-  // All callers of position independent functions must place the address of
-  // the called function in t9 (r25)
-  if (!reg_ctx->WriteRegisterFromUnsigned(r25_info, func_addr))
-    return false;
-
-  return true;
-}
-
-bool ABISysV_mips64::GetArgumentValues(Thread &thread,
-                                       ValueList &values) const {
-  return false;
-}
-
-Status ABISysV_mips64::SetReturnValueObject(lldb::StackFrameSP &frame_sp,
-                                            lldb::ValueObjectSP &new_value_sp) {
-  Status error;
-  if (!new_value_sp) {
-    error.SetErrorString("Empty value object for return value.");
-    return error;
-  }
-
-  CompilerType compiler_type = new_value_sp->GetCompilerType();
-  if (!compiler_type) {
-    error.SetErrorString("Null clang type for return value.");
-    return error;
-  }
-
-  Thread *thread = frame_sp->GetThread().get();
-
-  RegisterContext *reg_ctx = thread->GetRegisterContext().get();
-
-  if (!reg_ctx)
-    error.SetErrorString("no registers are available");
-
-  DataExtractor data;
-  Status data_error;
-  size_t num_bytes = new_value_sp->GetData(data, data_error);
-  if (data_error.Fail()) {
-    error.SetErrorStringWithFormat(
-        "Couldn't convert return value to raw data: %s",
-        data_error.AsCString());
-    return error;
-  }
-
-  const uint32_t type_flags = compiler_type.GetTypeInfo(nullptr);
-
-  if (type_flags & eTypeIsScalar || type_flags & eTypeIsPointer) {
-    if (type_flags & eTypeIsInteger || type_flags & eTypeIsPointer) {
-      lldb::offset_t offset = 0;
-
-      if (num_bytes <= 16) {
-        const RegisterInfo *r2_info = reg_ctx->GetRegisterInfoByName("r2", 0);
-        if (num_bytes <= 8) {
-          uint64_t raw_value = data.GetMaxU64(&offset, num_bytes);
-
-          if (!reg_ctx->WriteRegisterFromUnsigned(r2_info, raw_value))
-            error.SetErrorString("failed to write register r2");
-        } else {
-          uint64_t raw_value = data.GetMaxU64(&offset, 8);
-          if (reg_ctx->WriteRegisterFromUnsigned(r2_info, raw_value)) {
-            const RegisterInfo *r3_info =
-                reg_ctx->GetRegisterInfoByName("r3", 0);
-            raw_value = data.GetMaxU64(&offset, num_bytes - offset);
-
-            if (!reg_ctx->WriteRegisterFromUnsigned(r3_info, raw_value))
-              error.SetErrorString("failed to write register r3");
-          } else
-            error.SetErrorString("failed to write register r2");
-        }
-      } else {
-        error.SetErrorString("We don't support returning longer than 128 bit "
-                             "integer values at present.");
-      }
-    } else if (type_flags & eTypeIsFloat) {
-      error.SetErrorString("TODO: Handle Float Types.");
-    }
-  } else if (type_flags & eTypeIsVector) {
-    error.SetErrorString("returning vector values are not supported");
-  }
-
-  return error;
-}
-
-ValueObjectSP ABISysV_mips64::GetReturnValueObjectSimple(
-    Thread &thread, CompilerType &return_compiler_type) const {
-  ValueObjectSP return_valobj_sp;
-  return return_valobj_sp;
-}
-
-ValueObjectSP ABISysV_mips64::GetReturnValueObjectImpl(
-    Thread &thread, CompilerType &return_compiler_type) const {
-  ValueObjectSP return_valobj_sp;
-  Value value;
-  Status error;
-
-  ExecutionContext exe_ctx(thread.shared_from_this());
-  if (exe_ctx.GetTargetPtr() == nullptr || exe_ctx.GetProcessPtr() == nullptr)
-    return return_valobj_sp;
-
-  value.SetCompilerType(return_compiler_type);
-
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-  if (!reg_ctx)
-    return return_valobj_sp;
-
-  Target *target = exe_ctx.GetTargetPtr();
-  const ArchSpec target_arch = target->GetArchitecture();
-  ByteOrder target_byte_order = target_arch.GetByteOrder();
-  llvm::Optional<uint64_t> byte_size =
-      return_compiler_type.GetByteSize(nullptr);
-  if (!byte_size)
-    return return_valobj_sp;
-  const uint32_t type_flags = return_compiler_type.GetTypeInfo(nullptr);
-  uint32_t fp_flag =
-      target_arch.GetFlags() & lldb_private::ArchSpec::eMIPS_ABI_FP_mask;
-
-  const RegisterInfo *r2_info = reg_ctx->GetRegisterInfoByName("r2", 0);
-  const RegisterInfo *r3_info = reg_ctx->GetRegisterInfoByName("r3", 0);
-
-  if (type_flags & eTypeIsScalar || type_flags & eTypeIsPointer) {
-    value.SetValueType(Value::eValueTypeScalar);
-
-    bool success = false;
-    if (type_flags & eTypeIsInteger || type_flags & eTypeIsPointer) {
-      // Extract the register context so we can read arguments from registers
-      // In MIPS register "r2" (v0) holds the integer function return values
-
-      uint64_t raw_value = reg_ctx->ReadRegisterAsUnsigned(r2_info, 0);
-
-      const bool is_signed = (type_flags & eTypeIsSigned) != 0;
-      switch (*byte_size) {
-      default:
-        break;
-
-      case sizeof(uint64_t):
-        if (is_signed)
-          value.GetScalar() = (int64_t)(raw_value);
-        else
-          value.GetScalar() = (uint64_t)(raw_value);
-        success = true;
-        break;
-
-      case sizeof(uint32_t):
-        if (is_signed)
-          value.GetScalar() = (int32_t)(raw_value & UINT32_MAX);
-        else
-          value.GetScalar() = (uint32_t)(raw_value & UINT32_MAX);
-        success = true;
-        break;
-
-      case sizeof(uint16_t):
-        if (is_signed)
-          value.GetScalar() = (int16_t)(raw_value & UINT16_MAX);
-        else
-          value.GetScalar() = (uint16_t)(raw_value & UINT16_MAX);
-        success = true;
-        break;
-
-      case sizeof(uint8_t):
-        if (is_signed)
-          value.GetScalar() = (int8_t)(raw_value & UINT8_MAX);
-        else
-          value.GetScalar() = (uint8_t)(raw_value & UINT8_MAX);
-        success = true;
-        break;
-      }
-    } else if (type_flags & eTypeIsFloat) {
-      if (type_flags & eTypeIsComplex) {
-        // Don't handle complex yet.
-      } else if (IsSoftFloat(fp_flag)) {
-        uint64_t raw_value = reg_ctx->ReadRegisterAsUnsigned(r2_info, 0);
-        switch (*byte_size) {
-        case 4:
-          value.GetScalar() = *((float *)(&raw_value));
-          success = true;
-          break;
-        case 8:
-          value.GetScalar() = *((double *)(&raw_value));
-          success = true;
-          break;
-        case 16:
-          uint64_t result[2];
-          if (target_byte_order == eByteOrderLittle) {
-            result[0] = raw_value;
-            result[1] = reg_ctx->ReadRegisterAsUnsigned(r3_info, 0);
-            value.GetScalar() = *((long double *)(result));
-          } else {
-            result[0] = reg_ctx->ReadRegisterAsUnsigned(r3_info, 0);
-            result[1] = raw_value;
-            value.GetScalar() = *((long double *)(result));
-          }
-          success = true;
-          break;
-        }
-
-      } else {
-        if (*byte_size <= sizeof(long double)) {
-          const RegisterInfo *f0_info = reg_ctx->GetRegisterInfoByName("f0", 0);
-
-          RegisterValue f0_value;
-          DataExtractor f0_data;
-
-          reg_ctx->ReadRegister(f0_info, f0_value);
-
-          f0_value.GetData(f0_data);
-
-          lldb::offset_t offset = 0;
-          if (*byte_size == sizeof(float)) {
-            value.GetScalar() = (float)f0_data.GetFloat(&offset);
-            success = true;
-          } else if (*byte_size == sizeof(double)) {
-            value.GetScalar() = (double)f0_data.GetDouble(&offset);
-            success = true;
-          } else if (*byte_size == sizeof(long double)) {
-            const RegisterInfo *f2_info =
-                reg_ctx->GetRegisterInfoByName("f2", 0);
-            RegisterValue f2_value;
-            DataExtractor f2_data;
-            reg_ctx->ReadRegister(f2_info, f2_value);
-            DataExtractor *copy_from_extractor = nullptr;
-            DataBufferSP data_sp(new DataBufferHeap(16, 0));
-            DataExtractor return_ext(
-                data_sp, target_byte_order,
-                target->GetArchitecture().GetAddressByteSize());
-
-            if (target_byte_order == eByteOrderLittle) {
-              copy_from_extractor = &f0_data;
-              copy_from_extractor->CopyByteOrderedData(
-                  0, 8, data_sp->GetBytes(), *byte_size - 8, target_byte_order);
-              f2_value.GetData(f2_data);
-              copy_from_extractor = &f2_data;
-              copy_from_extractor->CopyByteOrderedData(
-                  0, 8, data_sp->GetBytes() + 8, *byte_size - 8,
-                  target_byte_order);
-            } else {
-              copy_from_extractor = &f0_data;
-              copy_from_extractor->CopyByteOrderedData(
-                  0, 8, data_sp->GetBytes() + 8, *byte_size - 8,
-                  target_byte_order);
-              f2_value.GetData(f2_data);
-              copy_from_extractor = &f2_data;
-              copy_from_extractor->CopyByteOrderedData(
-                  0, 8, data_sp->GetBytes(), *byte_size - 8, target_byte_order);
-            }
-
-            return_valobj_sp = ValueObjectConstResult::Create(
-                &thread, return_compiler_type, ConstString(""), return_ext);
-            return return_valobj_sp;
-          }
-        }
-      }
-    }
-
-    if (success)
-      return_valobj_sp = ValueObjectConstResult::Create(
-          thread.GetStackFrameAtIndex(0).get(), value, ConstString(""));
-  } else if (type_flags & eTypeIsStructUnion || type_flags & eTypeIsClass ||
-             type_flags & eTypeIsVector) {
-    // Any structure of up to 16 bytes in size is returned in the registers.
-    if (*byte_size <= 16) {
-      DataBufferSP data_sp(new DataBufferHeap(16, 0));
-      DataExtractor return_ext(data_sp, target_byte_order,
-                               target->GetArchitecture().GetAddressByteSize());
-
-      RegisterValue r2_value, r3_value, f0_value, f1_value, f2_value;
-      // Tracks how much bytes of r2 and r3 registers we've consumed so far
-      uint32_t integer_bytes = 0;
-
-      // True if return values are in FP return registers.
-      bool use_fp_regs = false;
-      // True if we found any non floating point field in structure.
-      bool found_non_fp_field = false;
-      // True if return values are in r2 register.
-      bool use_r2 = false;
-      // True if return values are in r3 register.
-      bool use_r3 = false;
-      // True if the result is copied into our data buffer
-      bool sucess = false;
-      std::string name;
-      bool is_complex;
-      uint32_t count;
-      const uint32_t num_children = return_compiler_type.GetNumFields();
-
-      // A structure consisting of one or two FP values (and nothing else) will
-      // be returned in the two FP return-value registers i.e fp0 and fp2.
-      if (num_children <= 2) {
-        uint64_t field_bit_offset = 0;
-
-        // Check if this structure contains only floating point fields
-        for (uint32_t idx = 0; idx < num_children; idx++) {
-          CompilerType field_compiler_type =
-              return_compiler_type.GetFieldAtIndex(idx, name, &field_bit_offset,
-                                                   nullptr, nullptr);
-
-          if (field_compiler_type.IsFloatingPointType(count, is_complex))
-            use_fp_regs = true;
-          else
-            found_non_fp_field = true;
-        }
-
-        if (use_fp_regs && !found_non_fp_field) {
-          // We have one or two FP-only values in this structure. Get it from
-          // f0/f2 registers.
-          DataExtractor f0_data, f1_data, f2_data;
-          const RegisterInfo *f0_info = reg_ctx->GetRegisterInfoByName("f0", 0);
-          const RegisterInfo *f1_info = reg_ctx->GetRegisterInfoByName("f1", 0);
-          const RegisterInfo *f2_info = reg_ctx->GetRegisterInfoByName("f2", 0);
-
-          reg_ctx->ReadRegister(f0_info, f0_value);
-          reg_ctx->ReadRegister(f2_info, f2_value);
-
-          f0_value.GetData(f0_data);
-
-          for (uint32_t idx = 0; idx < num_children; idx++) {
-            CompilerType field_compiler_type =
-                return_compiler_type.GetFieldAtIndex(
-                    idx, name, &field_bit_offset, nullptr, nullptr);
-            llvm::Optional<uint64_t> field_byte_width =
-                field_compiler_type.GetByteSize(nullptr);
-            if (!field_byte_width)
-              return return_valobj_sp;
-
-            DataExtractor *copy_from_extractor = nullptr;
-            uint64_t return_value[2];
-            offset_t offset = 0;
-
-            if (idx == 0) {
-              // This case is for long double type.
-              if (*field_byte_width == 16) {
-
-                // If structure contains long double type, then it is returned
-                // in fp0/fp1 registers.
-                if (target_byte_order == eByteOrderLittle) {
-                  return_value[0] = f0_data.GetU64(&offset);
-                  reg_ctx->ReadRegister(f1_info, f1_value);
-                  f1_value.GetData(f1_data);
-                  offset = 0;
-                  return_value[1] = f1_data.GetU64(&offset);
-                } else {
-                  return_value[1] = f0_data.GetU64(&offset);
-                  reg_ctx->ReadRegister(f1_info, f1_value);
-                  f1_value.GetData(f1_data);
-                  offset = 0;
-                  return_value[0] = f1_data.GetU64(&offset);
-                }
-
-                f0_data.SetData(return_value, *field_byte_width,
-                                target_byte_order);
-              }
-              copy_from_extractor = &f0_data; // This is in f0, copy from
-                                              // register to our result
-                                              // structure
-            } else {
-              f2_value.GetData(f2_data);
-              // This is in f2, copy from register to our result structure
-              copy_from_extractor = &f2_data;
-            }
-
-            // Sanity check to avoid crash
-            if (!copy_from_extractor ||
-                *field_byte_width > copy_from_extractor->GetByteSize())
-              return return_valobj_sp;
-
-            // copy the register contents into our data buffer
-            copy_from_extractor->CopyByteOrderedData(
-                0, *field_byte_width,
-                data_sp->GetBytes() + (field_bit_offset / 8), *field_byte_width,
-                target_byte_order);
-          }
-
-          // The result is in our data buffer.  Create a variable object out of
-          // it
-          return_valobj_sp = ValueObjectConstResult::Create(
-              &thread, return_compiler_type, ConstString(""), return_ext);
-
-          return return_valobj_sp;
-        }
-      }
-
-      // If we reach here, it means this structure either contains more than
-      // two fields or it contains at least one non floating point type. In
-      // that case, all fields are returned in GP return registers.
-      for (uint32_t idx = 0; idx < num_children; idx++) {
-        uint64_t field_bit_offset = 0;
-        bool is_signed;
-        uint32_t padding;
-
-        CompilerType field_compiler_type = return_compiler_type.GetFieldAtIndex(
-            idx, name, &field_bit_offset, nullptr, nullptr);
-        llvm::Optional<uint64_t> field_byte_width =
-            field_compiler_type.GetByteSize(nullptr);
-
-        // if we don't know the size of the field (e.g. invalid type), just
-        // bail out
-        if (!field_byte_width || *field_byte_width == 0)
-          break;
-
-        uint32_t field_byte_offset = field_bit_offset / 8;
-
-        if (field_compiler_type.IsIntegerOrEnumerationType(is_signed) ||
-            field_compiler_type.IsPointerType() ||
-            field_compiler_type.IsFloatingPointType(count, is_complex)) {
-          padding = field_byte_offset - integer_bytes;
-
-          if (integer_bytes < 8) {
-            // We have not yet consumed r2 completely.
-            if (integer_bytes + *field_byte_width + padding <= 8) {
-              // This field fits in r2, copy its value from r2 to our result
-              // structure
-              integer_bytes = integer_bytes + *field_byte_width +
-                              padding; // Increase the consumed bytes.
-              use_r2 = true;
-            } else {
-              // There isn't enough space left in r2 for this field, so this
-              // will be in r3.
-              integer_bytes = integer_bytes + *field_byte_width +
-                              padding; // Increase the consumed bytes.
-              use_r3 = true;
-            }
-          }
-          // We already have consumed at-least 8 bytes that means r2 is done,
-          // and this field will be in r3. Check if this field can fit in r3.
-          else if (integer_bytes + *field_byte_width + padding <= 16) {
-            integer_bytes = integer_bytes + *field_byte_width + padding;
-            use_r3 = true;
-          } else {
-            // There isn't any space left for this field, this should not
-            // happen as we have already checked the overall size is not
-            // greater than 16 bytes. For now, return a nullptr return value
-            // object.
-            return return_valobj_sp;
-          }
-        }
-      }
-      // Vector types up to 16 bytes are returned in GP return registers
-      if (type_flags & eTypeIsVector) {
-        if (*byte_size <= 8)
-          use_r2 = true;
-        else {
-          use_r2 = true;
-          use_r3 = true;
-        }
-      }
-
-      if (use_r2) {
-        reg_ctx->ReadRegister(r2_info, r2_value);
-
-        const size_t bytes_copied = r2_value.GetAsMemoryData(
-            r2_info, data_sp->GetBytes(), r2_info->byte_size, target_byte_order,
-            error);
-        if (bytes_copied != r2_info->byte_size)
-          return return_valobj_sp;
-        sucess = true;
-      }
-      if (use_r3) {
-        reg_ctx->ReadRegister(r3_info, r3_value);
-        const size_t bytes_copied = r3_value.GetAsMemoryData(
-            r3_info, data_sp->GetBytes() + r2_info->byte_size,
-            r3_info->byte_size, target_byte_order, error);
-
-        if (bytes_copied != r3_info->byte_size)
-          return return_valobj_sp;
-        sucess = true;
-      }
-      if (sucess) {
-        // The result is in our data buffer.  Create a variable object out of
-        // it
-        return_valobj_sp = ValueObjectConstResult::Create(
-            &thread, return_compiler_type, ConstString(""), return_ext);
-      }
-      return return_valobj_sp;
-    }
-
-    // Any structure/vector greater than 16 bytes in size is returned in
-    // memory. The pointer to that memory is returned in r2.
-    uint64_t mem_address = reg_ctx->ReadRegisterAsUnsigned(
-        reg_ctx->GetRegisterInfoByName("r2", 0), 0);
-
-    // We have got the address. Create a memory object out of it
-    return_valobj_sp = ValueObjectMemory::Create(
-        &thread, "", Address(mem_address, nullptr), return_compiler_type);
-  }
-  return return_valobj_sp;
-}
-
-bool ABISysV_mips64::CreateFunctionEntryUnwindPlan(UnwindPlan &unwind_plan) {
-  unwind_plan.Clear();
-  unwind_plan.SetRegisterKind(eRegisterKindDWARF);
-
-  UnwindPlan::RowSP row(new UnwindPlan::Row);
-
-  // Our Call Frame Address is the stack pointer value
-  row->GetCFAValue().SetIsRegisterPlusOffset(dwarf_r29, 0);
-
-  // The previous PC is in the RA
-  row->SetRegisterLocationToRegister(dwarf_pc, dwarf_r31, true);
-  unwind_plan.AppendRow(row);
-
-  // All other registers are the same.
-
-  unwind_plan.SetSourceName("mips64 at-func-entry default");
-  unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
-  unwind_plan.SetReturnAddressRegister(dwarf_r31);
-  return true;
-}
-
-bool ABISysV_mips64::CreateDefaultUnwindPlan(UnwindPlan &unwind_plan) {
-  unwind_plan.Clear();
-  unwind_plan.SetRegisterKind(eRegisterKindDWARF);
-
-  UnwindPlan::RowSP row(new UnwindPlan::Row);
-
-  row->GetCFAValue().SetIsRegisterPlusOffset(dwarf_r29, 0);
-
-  row->SetRegisterLocationToRegister(dwarf_pc, dwarf_r31, true);
-
-  unwind_plan.AppendRow(row);
-  unwind_plan.SetSourceName("mips64 default unwind plan");
-  unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
-  unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
-  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
-  return true;
-}
-
-bool ABISysV_mips64::RegisterIsVolatile(const RegisterInfo *reg_info) {
-  return !RegisterIsCalleeSaved(reg_info);
-}
-
-bool ABISysV_mips64::IsSoftFloat(uint32_t fp_flag) const {
-  return (fp_flag == lldb_private::ArchSpec::eMIPS_ABI_FP_SOFT);
-}
-
-bool ABISysV_mips64::RegisterIsCalleeSaved(const RegisterInfo *reg_info) {
-  if (reg_info) {
-    // Preserved registers are :
-    // r16-r23, r28, r29, r30, r31
-
-    int reg = ((reg_info->byte_offset) / 8);
-
-    bool save = (reg >= 16) && (reg <= 23);
-    save |= (reg >= 28) && (reg <= 31);
-
-    return save;
-  }
-  return false;
-}
-
-void ABISysV_mips64::Initialize() {
-  PluginManager::RegisterPlugin(
-      GetPluginNameStatic(), "System V ABI for mips64 targets", CreateInstance);
-}
-
-void ABISysV_mips64::Terminate() {
-  PluginManager::UnregisterPlugin(CreateInstance);
-}
-
-lldb_private::ConstString ABISysV_mips64::GetPluginNameStatic() {
-  static ConstString g_name("sysv-mips64");
-  return g_name;
-}
-
-// PluginInterface protocol
-
-lldb_private::ConstString ABISysV_mips64::GetPluginName() {
-  return GetPluginNameStatic();
-}
-
-uint32_t ABISysV_mips64::GetPluginVersion() { return 1; }
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.h b/gnu/llvm/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.h
deleted file mode 100644 (file)
index 76c3c54..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-//===-- ABISysV_mips64.h ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_ABISysV_mips64_h_
-#define liblldb_ABISysV_mips64_h_
-
-#include "lldb/Target/ABI.h"
-#include "lldb/lldb-private.h"
-
-class ABISysV_mips64 : public lldb_private::ABI {
-public:
-  ~ABISysV_mips64() override = default;
-
-  size_t GetRedZoneSize() const override;
-
-  bool PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp,
-                          lldb::addr_t functionAddress,
-                          lldb::addr_t returnAddress,
-                          llvm::ArrayRef<lldb::addr_t> args) const override;
-
-  bool GetArgumentValues(lldb_private::Thread &thread,
-                         lldb_private::ValueList &values) const override;
-
-  lldb_private::Status
-  SetReturnValueObject(lldb::StackFrameSP &frame_sp,
-                       lldb::ValueObjectSP &new_value) override;
-
-  lldb::ValueObjectSP
-  GetReturnValueObjectImpl(lldb_private::Thread &thread,
-                           lldb_private::CompilerType &type) const override;
-
-  bool
-  CreateFunctionEntryUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
-  bool CreateDefaultUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
-  bool RegisterIsVolatile(const lldb_private::RegisterInfo *reg_info) override;
-
-  bool IsSoftFloat(uint32_t fp_flag) const;
-
-  // The SysV mips ABI requires that stack frames be 16 byte aligned.
-  // When there is a trap handler on the stack, e.g. _sigtramp in userland
-  // code, we've seen that the stack pointer is often not aligned properly
-  // before the handler is invoked.  This means that lldb will stop the unwind
-  // early -- before the function which caused the trap.
-  //
-  // To work around this, we relax that alignment to be just word-size
-  // (8-bytes).
-  // Whitelisting the trap handlers for user space would be easy (_sigtramp) but
-  // in other environments there can be a large number of different functions
-  // involved in async traps.
-  bool CallFrameAddressIsValid(lldb::addr_t cfa) override {
-    // Make sure the stack call frame addresses are 8 byte aligned
-    if (cfa & (8ull - 1ull))
-      return false; // Not 8 byte aligned
-    if (cfa == 0)
-      return false; // Zero is not a valid stack address
-    return true;
-  }
-
-  bool CodeAddressIsValid(lldb::addr_t pc) override {
-    if (pc & (4ull - 1ull))
-      return false; // Not 4 byte aligned
-
-    // Anything else if fair game..
-    return true;
-  }
-
-  const lldb_private::RegisterInfo *
-  GetRegisterInfoArray(uint32_t &count) override;
-
-  // Static Functions
-
-  static void Initialize();
-
-  static void Terminate();
-
-  static lldb::ABISP CreateInstance(lldb::ProcessSP process_sp, const lldb_private::ArchSpec &arch);
-
-  static lldb_private::ConstString GetPluginNameStatic();
-
-  // PluginInterface protocol
-
-  lldb_private::ConstString GetPluginName() override;
-
-  uint32_t GetPluginVersion() override;
-
-protected:
-  void CreateRegisterMapIfNeeded();
-
-  lldb::ValueObjectSP
-  GetReturnValueObjectSimple(lldb_private::Thread &thread,
-                             lldb_private::CompilerType &ast_type) const;
-
-  bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info);
-
-private:
-  ABISysV_mips64(lldb::ProcessSP process_sp,
-                 std::unique_ptr<llvm::MCRegisterInfo> info_up)
-      : lldb_private::ABI(std::move(process_sp), std::move(info_up)) {
-    // Call CreateInstance instead.
-  }
-};
-
-#endif // liblldb_ABISysV_mips64_h_
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-mips64/CMakeLists.txt b/gnu/llvm/lldb/source/Plugins/ABI/SysV-mips64/CMakeLists.txt
deleted file mode 100644 (file)
index 5eddfb5..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-add_lldb_library(lldbPluginABISysV_mips64 PLUGIN
-  ABISysV_mips64.cpp
-
-  LINK_LIBS
-    lldbCore
-    lldbSymbol
-    lldbTarget
-  LINK_COMPONENTS
-    Support
-  )
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp b/gnu/llvm/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp
deleted file mode 100644 (file)
index 857b7fe..0000000
+++ /dev/null
@@ -1,980 +0,0 @@
-//===-- ABISysV_ppc.cpp -----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "ABISysV_ppc.h"
-
-#include "llvm/ADT/STLExtras.h"
-#include "llvm/ADT/Triple.h"
-
-#include "lldb/Core/Module.h"
-#include "lldb/Core/PluginManager.h"
-#include "lldb/Core/Value.h"
-#include "lldb/Core/ValueObjectConstResult.h"
-#include "lldb/Core/ValueObjectMemory.h"
-#include "lldb/Core/ValueObjectRegister.h"
-#include "lldb/Symbol/UnwindPlan.h"
-#include "lldb/Target/Process.h"
-#include "lldb/Target/RegisterContext.h"
-#include "lldb/Target/StackFrame.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Target/Thread.h"
-#include "lldb/Utility/ConstString.h"
-#include "lldb/Utility/DataExtractor.h"
-#include "lldb/Utility/Log.h"
-#include "lldb/Utility/RegisterValue.h"
-#include "lldb/Utility/Status.h"
-
-using namespace lldb;
-using namespace lldb_private;
-
-enum dwarf_regnums {
-  dwarf_r0 = 0,
-  dwarf_r1,
-  dwarf_r2,
-  dwarf_r3,
-  dwarf_r4,
-  dwarf_r5,
-  dwarf_r6,
-  dwarf_r7,
-  dwarf_r8,
-  dwarf_r9,
-  dwarf_r10,
-  dwarf_r11,
-  dwarf_r12,
-  dwarf_r13,
-  dwarf_r14,
-  dwarf_r15,
-  dwarf_r16,
-  dwarf_r17,
-  dwarf_r18,
-  dwarf_r19,
-  dwarf_r20,
-  dwarf_r21,
-  dwarf_r22,
-  dwarf_r23,
-  dwarf_r24,
-  dwarf_r25,
-  dwarf_r26,
-  dwarf_r27,
-  dwarf_r28,
-  dwarf_r29,
-  dwarf_r30,
-  dwarf_r31,
-  dwarf_f0,
-  dwarf_f1,
-  dwarf_f2,
-  dwarf_f3,
-  dwarf_f4,
-  dwarf_f5,
-  dwarf_f6,
-  dwarf_f7,
-  dwarf_f8,
-  dwarf_f9,
-  dwarf_f10,
-  dwarf_f11,
-  dwarf_f12,
-  dwarf_f13,
-  dwarf_f14,
-  dwarf_f15,
-  dwarf_f16,
-  dwarf_f17,
-  dwarf_f18,
-  dwarf_f19,
-  dwarf_f20,
-  dwarf_f21,
-  dwarf_f22,
-  dwarf_f23,
-  dwarf_f24,
-  dwarf_f25,
-  dwarf_f26,
-  dwarf_f27,
-  dwarf_f28,
-  dwarf_f29,
-  dwarf_f30,
-  dwarf_f31,
-  dwarf_cr,
-  dwarf_fpscr,
-  dwarf_xer = 101,
-  dwarf_lr = 108,
-  dwarf_ctr,
-  dwarf_pc,
-  dwarf_cfa,
-};
-
-// Note that the size and offset will be updated by platform-specific classes.
-#define DEFINE_GPR(reg, alt, kind1, kind2, kind3, kind4)                       \
-  {                                                                            \
-    #reg, alt, 8, 0, eEncodingUint, eFormatHex, {kind1, kind2, kind3, kind4 }, \
-                                                 nullptr, nullptr, nullptr, 0  \
-  }
-
-static const RegisterInfo g_register_infos[] = {
-    // General purpose registers.             eh_frame,                 DWARF,
-    // Generic,    Process Plugin
-    DEFINE_GPR(r0, nullptr, dwarf_r0, dwarf_r0, LLDB_INVALID_REGNUM,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(r1, "sp", dwarf_r1, dwarf_r1, LLDB_REGNUM_GENERIC_SP,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(r2, nullptr, dwarf_r2, dwarf_r2, LLDB_INVALID_REGNUM,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(r3, "arg1", dwarf_r3, dwarf_r3, LLDB_REGNUM_GENERIC_ARG1,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(r4, "arg2", dwarf_r4, dwarf_r4, LLDB_REGNUM_GENERIC_ARG2,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(r5, "arg3", dwarf_r5, dwarf_r5, LLDB_REGNUM_GENERIC_ARG3,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(r6, "arg4", dwarf_r6, dwarf_r6, LLDB_REGNUM_GENERIC_ARG4,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(r7, "arg5", dwarf_r7, dwarf_r7, LLDB_REGNUM_GENERIC_ARG5,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(r8, "arg6", dwarf_r8, dwarf_r8, LLDB_REGNUM_GENERIC_ARG6,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(r9, "arg7", dwarf_r9, dwarf_r9, LLDB_REGNUM_GENERIC_ARG7,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(r10, "arg8", dwarf_r10, dwarf_r10, LLDB_REGNUM_GENERIC_ARG8,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(r11, nullptr, dwarf_r11, dwarf_r11, LLDB_INVALID_REGNUM,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(r12, nullptr, dwarf_r12, dwarf_r12, LLDB_INVALID_REGNUM,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(r13, nullptr, dwarf_r13, dwarf_r13, LLDB_INVALID_REGNUM,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(r14, nullptr, dwarf_r14, dwarf_r14, LLDB_INVALID_REGNUM,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(r15, nullptr, dwarf_r15, dwarf_r15, LLDB_INVALID_REGNUM,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(r16, nullptr, dwarf_r16, dwarf_r16, LLDB_INVALID_REGNUM,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(r17, nullptr, dwarf_r17, dwarf_r17, LLDB_INVALID_REGNUM,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(r18, nullptr, dwarf_r18, dwarf_r18, LLDB_INVALID_REGNUM,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(r19, nullptr, dwarf_r19, dwarf_r19, LLDB_INVALID_REGNUM,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(r20, nullptr, dwarf_r20, dwarf_r20, LLDB_INVALID_REGNUM,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(r21, nullptr, dwarf_r21, dwarf_r21, LLDB_INVALID_REGNUM,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(r22, nullptr, dwarf_r22, dwarf_r22, LLDB_INVALID_REGNUM,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(r23, nullptr, dwarf_r23, dwarf_r23, LLDB_INVALID_REGNUM,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(r24, nullptr, dwarf_r24, dwarf_r24, LLDB_INVALID_REGNUM,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(r25, nullptr, dwarf_r25, dwarf_r25, LLDB_INVALID_REGNUM,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(r26, nullptr, dwarf_r26, dwarf_r26, LLDB_INVALID_REGNUM,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(r27, nullptr, dwarf_r27, dwarf_r27, LLDB_INVALID_REGNUM,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(r28, nullptr, dwarf_r28, dwarf_r28, LLDB_INVALID_REGNUM,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(r29, nullptr, dwarf_r29, dwarf_r29, LLDB_INVALID_REGNUM,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(r30, nullptr, dwarf_r30, dwarf_r30, LLDB_INVALID_REGNUM,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(r31, nullptr, dwarf_r31, dwarf_r31, LLDB_INVALID_REGNUM,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(lr, "lr", dwarf_lr, dwarf_lr, LLDB_REGNUM_GENERIC_RA,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(cr, "cr", dwarf_cr, dwarf_cr, LLDB_REGNUM_GENERIC_FLAGS,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(xer, "xer", dwarf_xer, dwarf_xer, LLDB_INVALID_REGNUM,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(ctr, "ctr", dwarf_ctr, dwarf_ctr, LLDB_INVALID_REGNUM,
-               LLDB_INVALID_REGNUM),
-    DEFINE_GPR(pc, "pc", dwarf_pc, dwarf_pc, LLDB_REGNUM_GENERIC_PC,
-               LLDB_INVALID_REGNUM),
-    {nullptr,
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_cfa, dwarf_cfa, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0}};
-
-static const uint32_t k_num_register_infos =
-    llvm::array_lengthof(g_register_infos);
-
-const lldb_private::RegisterInfo *
-ABISysV_ppc::GetRegisterInfoArray(uint32_t &count) {
-  count = k_num_register_infos;
-  return g_register_infos;
-}
-
-size_t ABISysV_ppc::GetRedZoneSize() const { return 224; }
-
-// Static Functions
-
-ABISP
-ABISysV_ppc::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
-  if (arch.GetTriple().getArch() == llvm::Triple::ppc) {
-    return ABISP(
-        new ABISysV_ppc(std::move(process_sp), MakeMCRegisterInfo(arch)));
-  }
-  return ABISP();
-}
-
-bool ABISysV_ppc::PrepareTrivialCall(Thread &thread, addr_t sp,
-                                     addr_t func_addr, addr_t return_addr,
-                                     llvm::ArrayRef<addr_t> args) const {
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
-
-  if (log) {
-    StreamString s;
-    s.Printf("ABISysV_ppc::PrepareTrivialCall (tid = 0x%" PRIx64
-             ", sp = 0x%" PRIx64 ", func_addr = 0x%" PRIx64
-             ", return_addr = 0x%" PRIx64,
-             thread.GetID(), (uint64_t)sp, (uint64_t)func_addr,
-             (uint64_t)return_addr);
-
-    for (size_t i = 0; i < args.size(); ++i)
-      s.Printf(", arg%" PRIu64 " = 0x%" PRIx64, static_cast<uint64_t>(i + 1),
-               args[i]);
-    s.PutCString(")");
-    log->PutString(s.GetString());
-  }
-
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-  if (!reg_ctx)
-    return false;
-
-  const RegisterInfo *reg_info = nullptr;
-
-  if (args.size() > 8) // TODO handle more than 8 arguments
-    return false;
-
-  for (size_t i = 0; i < args.size(); ++i) {
-    reg_info = reg_ctx->GetRegisterInfo(eRegisterKindGeneric,
-                                        LLDB_REGNUM_GENERIC_ARG1 + i);
-    LLDB_LOGF(log, "About to write arg%" PRIu64 " (0x%" PRIx64 ") into %s",
-              static_cast<uint64_t>(i + 1), args[i], reg_info->name);
-    if (!reg_ctx->WriteRegisterFromUnsigned(reg_info, args[i]))
-      return false;
-  }
-
-  // First, align the SP
-
-  LLDB_LOGF(log, "16-byte aligning SP: 0x%" PRIx64 " to 0x%" PRIx64,
-            (uint64_t)sp, (uint64_t)(sp & ~0xfull));
-
-  sp &= ~(0xfull); // 16-byte alignment
-
-  sp -= 8;
-
-  Status error;
-  const RegisterInfo *pc_reg_info =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC);
-  const RegisterInfo *sp_reg_info =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_SP);
-  ProcessSP process_sp(thread.GetProcess());
-
-  RegisterValue reg_value;
-
-  LLDB_LOGF(log,
-            "Pushing the return address onto the stack: 0x%" PRIx64
-            ": 0x%" PRIx64,
-            (uint64_t)sp, (uint64_t)return_addr);
-
-  // Save return address onto the stack
-  if (!process_sp->WritePointerToMemory(sp, return_addr, error))
-    return false;
-
-  // %r1 is set to the actual stack value.
-
-  LLDB_LOGF(log, "Writing SP: 0x%" PRIx64, (uint64_t)sp);
-
-  if (!reg_ctx->WriteRegisterFromUnsigned(sp_reg_info, sp))
-    return false;
-
-  // %pc is set to the address of the called function.
-
-  LLDB_LOGF(log, "Writing IP: 0x%" PRIx64, (uint64_t)func_addr);
-
-  if (!reg_ctx->WriteRegisterFromUnsigned(pc_reg_info, func_addr))
-    return false;
-
-  return true;
-}
-
-static bool ReadIntegerArgument(Scalar &scalar, unsigned int bit_width,
-                                bool is_signed, Thread &thread,
-                                uint32_t *argument_register_ids,
-                                unsigned int &current_argument_register,
-                                addr_t &current_stack_argument) {
-  if (bit_width > 64)
-    return false; // Scalar can't hold large integer arguments
-
-  if (current_argument_register < 6) {
-    scalar = thread.GetRegisterContext()->ReadRegisterAsUnsigned(
-        argument_register_ids[current_argument_register], 0);
-    current_argument_register++;
-    if (is_signed)
-      scalar.SignExtend(bit_width);
-  } else {
-    uint32_t byte_size = (bit_width + (8 - 1)) / 8;
-    Status error;
-    if (thread.GetProcess()->ReadScalarIntegerFromMemory(
-            current_stack_argument, byte_size, is_signed, scalar, error)) {
-      current_stack_argument += byte_size;
-      return true;
-    }
-    return false;
-  }
-  return true;
-}
-
-bool ABISysV_ppc::GetArgumentValues(Thread &thread, ValueList &values) const {
-  unsigned int num_values = values.GetSize();
-  unsigned int value_index;
-
-  // Extract the register context so we can read arguments from registers
-
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-
-  if (!reg_ctx)
-    return false;
-
-  // Get the pointer to the first stack argument so we have a place to start
-  // when reading data
-
-  addr_t sp = reg_ctx->GetSP(0);
-
-  if (!sp)
-    return false;
-
-  addr_t current_stack_argument = sp + 48; // jump over return address
-
-  uint32_t argument_register_ids[8];
-
-  argument_register_ids[0] =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1)
-          ->kinds[eRegisterKindLLDB];
-  argument_register_ids[1] =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG2)
-          ->kinds[eRegisterKindLLDB];
-  argument_register_ids[2] =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG3)
-          ->kinds[eRegisterKindLLDB];
-  argument_register_ids[3] =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG4)
-          ->kinds[eRegisterKindLLDB];
-  argument_register_ids[4] =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG5)
-          ->kinds[eRegisterKindLLDB];
-  argument_register_ids[5] =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG6)
-          ->kinds[eRegisterKindLLDB];
-  argument_register_ids[6] =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG7)
-          ->kinds[eRegisterKindLLDB];
-  argument_register_ids[7] =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG8)
-          ->kinds[eRegisterKindLLDB];
-
-  unsigned int current_argument_register = 0;
-
-  for (value_index = 0; value_index < num_values; ++value_index) {
-    Value *value = values.GetValueAtIndex(value_index);
-
-    if (!value)
-      return false;
-
-    // We currently only support extracting values with Clang QualTypes. Do we
-    // care about others?
-    CompilerType compiler_type = value->GetCompilerType();
-    llvm::Optional<uint64_t> bit_size = compiler_type.GetBitSize(&thread);
-    if (!bit_size)
-      return false;
-    bool is_signed;
-    if (compiler_type.IsIntegerOrEnumerationType(is_signed))
-      ReadIntegerArgument(value->GetScalar(), *bit_size, is_signed, thread,
-                          argument_register_ids, current_argument_register,
-                          current_stack_argument);
-    else if (compiler_type.IsPointerType())
-      ReadIntegerArgument(value->GetScalar(), *bit_size, false, thread,
-                          argument_register_ids, current_argument_register,
-                          current_stack_argument);
-  }
-
-  return true;
-}
-
-Status ABISysV_ppc::SetReturnValueObject(lldb::StackFrameSP &frame_sp,
-                                         lldb::ValueObjectSP &new_value_sp) {
-  Status error;
-  if (!new_value_sp) {
-    error.SetErrorString("Empty value object for return value.");
-    return error;
-  }
-
-  CompilerType compiler_type = new_value_sp->GetCompilerType();
-  if (!compiler_type) {
-    error.SetErrorString("Null clang type for return value.");
-    return error;
-  }
-
-  Thread *thread = frame_sp->GetThread().get();
-
-  bool is_signed;
-  uint32_t count;
-  bool is_complex;
-
-  RegisterContext *reg_ctx = thread->GetRegisterContext().get();
-
-  bool set_it_simple = false;
-  if (compiler_type.IsIntegerOrEnumerationType(is_signed) ||
-      compiler_type.IsPointerType()) {
-    const RegisterInfo *reg_info = reg_ctx->GetRegisterInfoByName("r3", 0);
-
-    DataExtractor data;
-    Status data_error;
-    size_t num_bytes = new_value_sp->GetData(data, data_error);
-    if (data_error.Fail()) {
-      error.SetErrorStringWithFormat(
-          "Couldn't convert return value to raw data: %s",
-          data_error.AsCString());
-      return error;
-    }
-    lldb::offset_t offset = 0;
-    if (num_bytes <= 8) {
-      uint64_t raw_value = data.GetMaxU64(&offset, num_bytes);
-
-      if (reg_ctx->WriteRegisterFromUnsigned(reg_info, raw_value))
-        set_it_simple = true;
-    } else {
-      error.SetErrorString("We don't support returning longer than 64 bit "
-                           "integer values at present.");
-    }
-  } else if (compiler_type.IsFloatingPointType(count, is_complex)) {
-    if (is_complex)
-      error.SetErrorString(
-          "We don't support returning complex values at present");
-    else {
-      llvm::Optional<uint64_t> bit_width =
-          compiler_type.GetBitSize(frame_sp.get());
-      if (!bit_width) {
-        error.SetErrorString("can't get type size");
-        return error;
-      }
-      if (*bit_width <= 64) {
-        DataExtractor data;
-        Status data_error;
-        size_t num_bytes = new_value_sp->GetData(data, data_error);
-        if (data_error.Fail()) {
-          error.SetErrorStringWithFormat(
-              "Couldn't convert return value to raw data: %s",
-              data_error.AsCString());
-          return error;
-        }
-
-        unsigned char buffer[16];
-        ByteOrder byte_order = data.GetByteOrder();
-
-        data.CopyByteOrderedData(0, num_bytes, buffer, 16, byte_order);
-        set_it_simple = true;
-      } else {
-        // FIXME - don't know how to do 80 bit long doubles yet.
-        error.SetErrorString(
-            "We don't support returning float values > 64 bits at present");
-      }
-    }
-  }
-
-  if (!set_it_simple) {
-    // Okay we've got a structure or something that doesn't fit in a simple
-    // register. We should figure out where it really goes, but we don't
-    // support this yet.
-    error.SetErrorString("We only support setting simple integer and float "
-                         "return types at present.");
-  }
-
-  return error;
-}
-
-ValueObjectSP ABISysV_ppc::GetReturnValueObjectSimple(
-    Thread &thread, CompilerType &return_compiler_type) const {
-  ValueObjectSP return_valobj_sp;
-  Value value;
-
-  if (!return_compiler_type)
-    return return_valobj_sp;
-
-  // value.SetContext (Value::eContextTypeClangType, return_value_type);
-  value.SetCompilerType(return_compiler_type);
-
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-  if (!reg_ctx)
-    return return_valobj_sp;
-
-  const uint32_t type_flags = return_compiler_type.GetTypeInfo();
-  if (type_flags & eTypeIsScalar) {
-    value.SetValueType(Value::eValueTypeScalar);
-
-    bool success = false;
-    if (type_flags & eTypeIsInteger) {
-      // Extract the register context so we can read arguments from registers
-
-      llvm::Optional<uint64_t> byte_size =
-          return_compiler_type.GetByteSize(nullptr);
-      if (!byte_size)
-        return return_valobj_sp;
-      uint64_t raw_value = thread.GetRegisterContext()->ReadRegisterAsUnsigned(
-          reg_ctx->GetRegisterInfoByName("r3", 0), 0);
-      const bool is_signed = (type_flags & eTypeIsSigned) != 0;
-      switch (*byte_size) {
-      default:
-        break;
-
-      case sizeof(uint64_t):
-        if (is_signed)
-          value.GetScalar() = (int64_t)(raw_value);
-        else
-          value.GetScalar() = (uint64_t)(raw_value);
-        success = true;
-        break;
-
-      case sizeof(uint32_t):
-        if (is_signed)
-          value.GetScalar() = (int32_t)(raw_value & UINT32_MAX);
-        else
-          value.GetScalar() = (uint32_t)(raw_value & UINT32_MAX);
-        success = true;
-        break;
-
-      case sizeof(uint16_t):
-        if (is_signed)
-          value.GetScalar() = (int16_t)(raw_value & UINT16_MAX);
-        else
-          value.GetScalar() = (uint16_t)(raw_value & UINT16_MAX);
-        success = true;
-        break;
-
-      case sizeof(uint8_t):
-        if (is_signed)
-          value.GetScalar() = (int8_t)(raw_value & UINT8_MAX);
-        else
-          value.GetScalar() = (uint8_t)(raw_value & UINT8_MAX);
-        success = true;
-        break;
-      }
-    } else if (type_flags & eTypeIsFloat) {
-      if (type_flags & eTypeIsComplex) {
-        // Don't handle complex yet.
-      } else {
-        llvm::Optional<uint64_t> byte_size =
-            return_compiler_type.GetByteSize(nullptr);
-        if (byte_size && *byte_size <= sizeof(long double)) {
-          const RegisterInfo *f1_info = reg_ctx->GetRegisterInfoByName("f1", 0);
-          RegisterValue f1_value;
-          if (reg_ctx->ReadRegister(f1_info, f1_value)) {
-            DataExtractor data;
-            if (f1_value.GetData(data)) {
-              lldb::offset_t offset = 0;
-              if (*byte_size == sizeof(float)) {
-                value.GetScalar() = (float)data.GetFloat(&offset);
-                success = true;
-              } else if (*byte_size == sizeof(double)) {
-                value.GetScalar() = (double)data.GetDouble(&offset);
-                success = true;
-              }
-            }
-          }
-        }
-      }
-    }
-
-    if (success)
-      return_valobj_sp = ValueObjectConstResult::Create(
-          thread.GetStackFrameAtIndex(0).get(), value, ConstString(""));
-  } else if (type_flags & eTypeIsPointer) {
-    unsigned r3_id =
-        reg_ctx->GetRegisterInfoByName("r3", 0)->kinds[eRegisterKindLLDB];
-    value.GetScalar() =
-        (uint64_t)thread.GetRegisterContext()->ReadRegisterAsUnsigned(r3_id, 0);
-    value.SetValueType(Value::eValueTypeScalar);
-    return_valobj_sp = ValueObjectConstResult::Create(
-        thread.GetStackFrameAtIndex(0).get(), value, ConstString(""));
-  } else if (type_flags & eTypeIsVector) {
-    llvm::Optional<uint64_t> byte_size =
-        return_compiler_type.GetByteSize(nullptr);
-    if (byte_size && *byte_size > 0) {
-      const RegisterInfo *altivec_reg = reg_ctx->GetRegisterInfoByName("v2", 0);
-      if (altivec_reg) {
-        if (*byte_size <= altivec_reg->byte_size) {
-          ProcessSP process_sp(thread.GetProcess());
-          if (process_sp) {
-            std::unique_ptr<DataBufferHeap> heap_data_up(
-                new DataBufferHeap(*byte_size, 0));
-            const ByteOrder byte_order = process_sp->GetByteOrder();
-            RegisterValue reg_value;
-            if (reg_ctx->ReadRegister(altivec_reg, reg_value)) {
-              Status error;
-              if (reg_value.GetAsMemoryData(
-                      altivec_reg, heap_data_up->GetBytes(),
-                      heap_data_up->GetByteSize(), byte_order, error)) {
-                DataExtractor data(DataBufferSP(heap_data_up.release()),
-                                   byte_order,
-                                   process_sp->GetTarget()
-                                       .GetArchitecture()
-                                       .GetAddressByteSize());
-                return_valobj_sp = ValueObjectConstResult::Create(
-                    &thread, return_compiler_type, ConstString(""), data);
-              }
-            }
-          }
-        }
-      }
-    }
-  }
-
-  return return_valobj_sp;
-}
-
-ValueObjectSP ABISysV_ppc::GetReturnValueObjectImpl(
-    Thread &thread, CompilerType &return_compiler_type) const {
-  ValueObjectSP return_valobj_sp;
-
-  if (!return_compiler_type)
-    return return_valobj_sp;
-
-  ExecutionContext exe_ctx(thread.shared_from_this());
-  return_valobj_sp = GetReturnValueObjectSimple(thread, return_compiler_type);
-  if (return_valobj_sp)
-    return return_valobj_sp;
-
-  RegisterContextSP reg_ctx_sp = thread.GetRegisterContext();
-  if (!reg_ctx_sp)
-    return return_valobj_sp;
-
-  llvm::Optional<uint64_t> bit_width = return_compiler_type.GetBitSize(&thread);
-  if (!bit_width)
-    return return_valobj_sp;
-  if (return_compiler_type.IsAggregateType()) {
-    Target *target = exe_ctx.GetTargetPtr();
-    bool is_memory = true;
-    if (*bit_width <= 128) {
-      ByteOrder target_byte_order = target->GetArchitecture().GetByteOrder();
-      DataBufferSP data_sp(new DataBufferHeap(16, 0));
-      DataExtractor return_ext(data_sp, target_byte_order,
-                               target->GetArchitecture().GetAddressByteSize());
-
-      const RegisterInfo *r3_info = reg_ctx_sp->GetRegisterInfoByName("r3", 0);
-      const RegisterInfo *rdx_info =
-          reg_ctx_sp->GetRegisterInfoByName("rdx", 0);
-
-      RegisterValue r3_value, rdx_value;
-      reg_ctx_sp->ReadRegister(r3_info, r3_value);
-      reg_ctx_sp->ReadRegister(rdx_info, rdx_value);
-
-      DataExtractor r3_data, rdx_data;
-
-      r3_value.GetData(r3_data);
-      rdx_value.GetData(rdx_data);
-
-      uint32_t fp_bytes =
-          0; // Tracks how much of the xmm registers we've consumed so far
-      uint32_t integer_bytes =
-          0; // Tracks how much of the r3/rds registers we've consumed so far
-
-      const uint32_t num_children = return_compiler_type.GetNumFields();
-
-      // Since we are in the small struct regime, assume we are not in memory.
-      is_memory = false;
-
-      for (uint32_t idx = 0; idx < num_children; idx++) {
-        std::string name;
-        uint64_t field_bit_offset = 0;
-        bool is_signed;
-        bool is_complex;
-        uint32_t count;
-
-        CompilerType field_compiler_type = return_compiler_type.GetFieldAtIndex(
-            idx, name, &field_bit_offset, nullptr, nullptr);
-        llvm::Optional<uint64_t> field_bit_width =
-            field_compiler_type.GetBitSize(&thread);
-        if (!field_bit_width)
-          return return_valobj_sp;
-
-        // If there are any unaligned fields, this is stored in memory.
-        if (field_bit_offset % *field_bit_width != 0) {
-          is_memory = true;
-          break;
-        }
-
-        uint32_t field_byte_width = *field_bit_width / 8;
-        uint32_t field_byte_offset = field_bit_offset / 8;
-
-        DataExtractor *copy_from_extractor = nullptr;
-        uint32_t copy_from_offset = 0;
-
-        if (field_compiler_type.IsIntegerOrEnumerationType(is_signed) ||
-            field_compiler_type.IsPointerType()) {
-          if (integer_bytes < 8) {
-            if (integer_bytes + field_byte_width <= 8) {
-              // This is in RAX, copy from register to our result structure:
-              copy_from_extractor = &r3_data;
-              copy_from_offset = integer_bytes;
-              integer_bytes += field_byte_width;
-            } else {
-              // The next field wouldn't fit in the remaining space, so we
-              // pushed it to rdx.
-              copy_from_extractor = &rdx_data;
-              copy_from_offset = 0;
-              integer_bytes = 8 + field_byte_width;
-            }
-          } else if (integer_bytes + field_byte_width <= 16) {
-            copy_from_extractor = &rdx_data;
-            copy_from_offset = integer_bytes - 8;
-            integer_bytes += field_byte_width;
-          } else {
-            // The last field didn't fit.  I can't see how that would happen
-            // w/o the overall size being greater than 16 bytes.  For now,
-            // return a nullptr return value object.
-            return return_valobj_sp;
-          }
-        } else if (field_compiler_type.IsFloatingPointType(count, is_complex)) {
-          // Structs with long doubles are always passed in memory.
-          if (*field_bit_width == 128) {
-            is_memory = true;
-            break;
-          } else if (*field_bit_width == 64) {
-            copy_from_offset = 0;
-            fp_bytes += field_byte_width;
-          } else if (*field_bit_width == 32) {
-            // This one is kind of complicated.  If we are in an "eightbyte"
-            // with another float, we'll be stuffed into an xmm register with
-            // it.  If we are in an "eightbyte" with one or more ints, then we
-            // will be stuffed into the appropriate GPR with them.
-            bool in_gpr;
-            if (field_byte_offset % 8 == 0) {
-              // We are at the beginning of one of the eightbytes, so check the
-              // next element (if any)
-              if (idx == num_children - 1)
-                in_gpr = false;
-              else {
-                uint64_t next_field_bit_offset = 0;
-                CompilerType next_field_compiler_type =
-                    return_compiler_type.GetFieldAtIndex(idx + 1, name,
-                                                         &next_field_bit_offset,
-                                                         nullptr, nullptr);
-                if (next_field_compiler_type.IsIntegerOrEnumerationType(
-                        is_signed))
-                  in_gpr = true;
-                else {
-                  copy_from_offset = 0;
-                  in_gpr = false;
-                }
-              }
-            } else if (field_byte_offset % 4 == 0) {
-              // We are inside of an eightbyte, so see if the field before us
-              // is floating point: This could happen if somebody put padding
-              // in the structure.
-              if (idx == 0)
-                in_gpr = false;
-              else {
-                uint64_t prev_field_bit_offset = 0;
-                CompilerType prev_field_compiler_type =
-                    return_compiler_type.GetFieldAtIndex(idx - 1, name,
-                                                         &prev_field_bit_offset,
-                                                         nullptr, nullptr);
-                if (prev_field_compiler_type.IsIntegerOrEnumerationType(
-                        is_signed))
-                  in_gpr = true;
-                else {
-                  copy_from_offset = 4;
-                  in_gpr = false;
-                }
-              }
-            } else {
-              is_memory = true;
-              continue;
-            }
-
-            // Okay, we've figured out whether we are in GPR or XMM, now figure
-            // out which one.
-            if (in_gpr) {
-              if (integer_bytes < 8) {
-                // This is in RAX, copy from register to our result structure:
-                copy_from_extractor = &r3_data;
-                copy_from_offset = integer_bytes;
-                integer_bytes += field_byte_width;
-              } else {
-                copy_from_extractor = &rdx_data;
-                copy_from_offset = integer_bytes - 8;
-                integer_bytes += field_byte_width;
-              }
-            } else {
-              fp_bytes += field_byte_width;
-            }
-          }
-        }
-
-        // These two tests are just sanity checks.  If I somehow get the type
-        // calculation wrong above it is better to just return nothing than to
-        // assert or crash.
-        if (!copy_from_extractor)
-          return return_valobj_sp;
-        if (copy_from_offset + field_byte_width >
-            copy_from_extractor->GetByteSize())
-          return return_valobj_sp;
-
-        copy_from_extractor->CopyByteOrderedData(
-            copy_from_offset, field_byte_width,
-            data_sp->GetBytes() + field_byte_offset, field_byte_width,
-            target_byte_order);
-      }
-
-      if (!is_memory) {
-        // The result is in our data buffer.  Let's make a variable object out
-        // of it:
-        return_valobj_sp = ValueObjectConstResult::Create(
-            &thread, return_compiler_type, ConstString(""), return_ext);
-      }
-    }
-
-    // FIXME: This is just taking a guess, r3 may very well no longer hold the
-    // return storage location.
-    // If we are going to do this right, when we make a new frame we should
-    // check to see if it uses a memory return, and if we are at the first
-    // instruction and if so stash away the return location.  Then we would
-    // only return the memory return value if we know it is valid.
-
-    if (is_memory) {
-      unsigned r3_id =
-          reg_ctx_sp->GetRegisterInfoByName("r3", 0)->kinds[eRegisterKindLLDB];
-      lldb::addr_t storage_addr =
-          (uint64_t)thread.GetRegisterContext()->ReadRegisterAsUnsigned(r3_id,
-                                                                        0);
-      return_valobj_sp = ValueObjectMemory::Create(
-          &thread, "", Address(storage_addr, nullptr), return_compiler_type);
-    }
-  }
-
-  return return_valobj_sp;
-}
-
-bool ABISysV_ppc::CreateFunctionEntryUnwindPlan(UnwindPlan &unwind_plan) {
-  unwind_plan.Clear();
-  unwind_plan.SetRegisterKind(eRegisterKindDWARF);
-
-  uint32_t lr_reg_num = dwarf_lr;
-  uint32_t sp_reg_num = dwarf_r1;
-  uint32_t pc_reg_num = dwarf_pc;
-
-  UnwindPlan::RowSP row(new UnwindPlan::Row);
-
-  // Our Call Frame Address is the stack pointer value
-  row->GetCFAValue().SetIsRegisterPlusOffset(sp_reg_num, 0);
-
-  // The previous PC is in the LR
-  row->SetRegisterLocationToRegister(pc_reg_num, lr_reg_num, true);
-  unwind_plan.AppendRow(row);
-
-  // All other registers are the same.
-
-  unwind_plan.SetSourceName("ppc at-func-entry default");
-  unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
-
-  return true;
-}
-
-bool ABISysV_ppc::CreateDefaultUnwindPlan(UnwindPlan &unwind_plan) {
-  unwind_plan.Clear();
-  unwind_plan.SetRegisterKind(eRegisterKindDWARF);
-
-  uint32_t sp_reg_num = dwarf_r1;
-  uint32_t pc_reg_num = dwarf_lr;
-
-  UnwindPlan::RowSP row(new UnwindPlan::Row);
-
-  const int32_t ptr_size = 4;
-  row->GetCFAValue().SetIsRegisterDereferenced(sp_reg_num);
-
-  row->SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, ptr_size * 1, true);
-  row->SetRegisterLocationToIsCFAPlusOffset(sp_reg_num, 0, true);
-
-  unwind_plan.AppendRow(row);
-  unwind_plan.SetSourceName("ppc default unwind plan");
-  unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
-  unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
-  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
-  unwind_plan.SetReturnAddressRegister(dwarf_lr);
-  return true;
-}
-
-bool ABISysV_ppc::RegisterIsVolatile(const RegisterInfo *reg_info) {
-  return !RegisterIsCalleeSaved(reg_info);
-}
-
-// See "Register Usage" in the
-// "System V Application Binary Interface"
-// "64-bit PowerPC ELF Application Binary Interface Supplement" current version
-// is 1.9 released 2004 at http://refspecs.linuxfoundation.org/ELF/ppc/PPC-
-// elf64abi-1.9.pdf
-
-bool ABISysV_ppc::RegisterIsCalleeSaved(const RegisterInfo *reg_info) {
-  if (reg_info) {
-    // Preserved registers are :
-    //    r1,r2,r13-r31
-    //    f14-f31 (not yet)
-    //    v20-v31 (not yet)
-    //    vrsave (not yet)
-
-    const char *name = reg_info->name;
-    if (name[0] == 'r') {
-      if ((name[1] == '1' || name[1] == '2') && name[2] == '\0')
-        return true;
-      if (name[1] == '1' && name[2] > '2')
-        return true;
-      if ((name[1] == '2' || name[1] == '3') && name[2] != '\0')
-        return true;
-    }
-
-    if (name[0] == 'f' && name[1] >= '0' && name[1] <= '9') {
-      if (name[3] == '1' && name[4] >= '4')
-        return true;
-      if ((name[3] == '2' || name[3] == '3') && name[4] != '\0')
-        return true;
-    }
-
-    if (name[0] == 's' && name[1] == 'p' && name[2] == '\0') // sp
-      return true;
-    if (name[0] == 'f' && name[1] == 'p' && name[2] == '\0') // fp
-      return true;
-    if (name[0] == 'p' && name[1] == 'c' && name[2] == '\0') // pc
-      return true;
-  }
-  return false;
-}
-
-void ABISysV_ppc::Initialize() {
-  PluginManager::RegisterPlugin(GetPluginNameStatic(),
-                                "System V ABI for ppc targets", CreateInstance);
-}
-
-void ABISysV_ppc::Terminate() {
-  PluginManager::UnregisterPlugin(CreateInstance);
-}
-
-lldb_private::ConstString ABISysV_ppc::GetPluginNameStatic() {
-  static ConstString g_name("sysv-ppc");
-  return g_name;
-}
-
-// PluginInterface protocol
-
-lldb_private::ConstString ABISysV_ppc::GetPluginName() {
-  return GetPluginNameStatic();
-}
-
-uint32_t ABISysV_ppc::GetPluginVersion() { return 1; }
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h b/gnu/llvm/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h
deleted file mode 100644 (file)
index 59907c4..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-//===-- ABISysV_ppc.h ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_ABISysV_ppc_h_
-#define liblldb_ABISysV_ppc_h_
-
-#include "lldb/Target/ABI.h"
-#include "lldb/lldb-private.h"
-
-class ABISysV_ppc : public lldb_private::ABI {
-public:
-  ~ABISysV_ppc() override = default;
-
-  size_t GetRedZoneSize() const override;
-
-  bool PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp,
-                          lldb::addr_t functionAddress,
-                          lldb::addr_t returnAddress,
-                          llvm::ArrayRef<lldb::addr_t> args) const override;
-
-  bool GetArgumentValues(lldb_private::Thread &thread,
-                         lldb_private::ValueList &values) const override;
-
-  lldb_private::Status
-  SetReturnValueObject(lldb::StackFrameSP &frame_sp,
-                       lldb::ValueObjectSP &new_value) override;
-
-  lldb::ValueObjectSP
-  GetReturnValueObjectImpl(lldb_private::Thread &thread,
-                           lldb_private::CompilerType &type) const override;
-
-  bool
-  CreateFunctionEntryUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
-  bool CreateDefaultUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
-  bool RegisterIsVolatile(const lldb_private::RegisterInfo *reg_info) override;
-
-  // The SysV ppc ABI requires that stack frames be 16 byte aligned.
-  // When there is a trap handler on the stack, e.g. _sigtramp in userland
-  // code, we've seen that the stack pointer is often not aligned properly
-  // before the handler is invoked.  This means that lldb will stop the unwind
-  // early -- before the function which caused the trap.
-  //
-  // To work around this, we relax that alignment to be just word-size
-  // (8-bytes).
-  // Whitelisting the trap handlers for user space would be easy (_sigtramp) but
-  // in other environments there can be a large number of different functions
-  // involved in async traps.
-  bool CallFrameAddressIsValid(lldb::addr_t cfa) override {
-    // Make sure the stack call frame addresses are 8 byte aligned
-    if (cfa & (8ull - 1ull))
-      return false; // Not 8 byte aligned
-    if (cfa == 0)
-      return false; // Zero is not a valid stack address
-    return true;
-  }
-
-  bool CodeAddressIsValid(lldb::addr_t pc) override {
-    // We have a 64 bit address space, so anything is valid as opcodes
-    // aren't fixed width...
-    return true;
-  }
-
-  const lldb_private::RegisterInfo *
-  GetRegisterInfoArray(uint32_t &count) override;
-
-  // Static Functions
-
-  static void Initialize();
-
-  static void Terminate();
-
-  static lldb::ABISP CreateInstance(lldb::ProcessSP process_sp, const lldb_private::ArchSpec &arch);
-
-  static lldb_private::ConstString GetPluginNameStatic();
-
-  // PluginInterface protocol
-
-  lldb_private::ConstString GetPluginName() override;
-
-  uint32_t GetPluginVersion() override;
-
-protected:
-  void CreateRegisterMapIfNeeded();
-
-  lldb::ValueObjectSP
-  GetReturnValueObjectSimple(lldb_private::Thread &thread,
-                             lldb_private::CompilerType &ast_type) const;
-
-  bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info);
-
-private:
-  ABISysV_ppc(lldb::ProcessSP process_sp,
-              std::unique_ptr<llvm::MCRegisterInfo> info_up)
-      : lldb_private::ABI(std::move(process_sp), std::move(info_up)) {
-    // Call CreateInstance instead.
-  }
-};
-
-#endif // liblldb_ABISysV_ppc_h_
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-ppc/CMakeLists.txt b/gnu/llvm/lldb/source/Plugins/ABI/SysV-ppc/CMakeLists.txt
deleted file mode 100644 (file)
index 63bfc4a..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-add_lldb_library(lldbPluginABISysV_ppc PLUGIN
-  ABISysV_ppc.cpp
-
-  LINK_LIBS
-    lldbCore
-    lldbSymbol
-    lldbTarget
-  LINK_COMPONENTS
-    Support
-  )
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp b/gnu/llvm/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp
deleted file mode 100644 (file)
index 935353c..0000000
+++ /dev/null
@@ -1,1085 +0,0 @@
-//===-- ABISysV_ppc64.cpp ---------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "ABISysV_ppc64.h"
-
-#include "llvm/ADT/STLExtras.h"
-#include "llvm/ADT/Triple.h"
-
-#include "Utility/PPC64LE_DWARF_Registers.h"
-#include "Utility/PPC64_DWARF_Registers.h"
-#include "lldb/Core/Module.h"
-#include "lldb/Core/PluginManager.h"
-#include "lldb/Core/Value.h"
-#include "lldb/Core/ValueObjectConstResult.h"
-#include "lldb/Core/ValueObjectMemory.h"
-#include "lldb/Core/ValueObjectRegister.h"
-#include "lldb/Symbol/ClangASTContext.h"
-#include "lldb/Symbol/UnwindPlan.h"
-#include "lldb/Target/Process.h"
-#include "lldb/Target/RegisterContext.h"
-#include "lldb/Target/StackFrame.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Target/Thread.h"
-#include "lldb/Utility/ConstString.h"
-#include "lldb/Utility/DataExtractor.h"
-#include "lldb/Utility/Log.h"
-#include "lldb/Utility/RegisterValue.h"
-#include "lldb/Utility/Status.h"
-
-#include "clang/AST/ASTContext.h"
-#include "clang/AST/Attr.h"
-#include "clang/AST/Decl.h"
-
-#define DECLARE_REGISTER_INFOS_PPC64_STRUCT
-#include "Plugins/Process/Utility/RegisterInfos_ppc64.h"
-#undef DECLARE_REGISTER_INFOS_PPC64_STRUCT
-
-#define DECLARE_REGISTER_INFOS_PPC64LE_STRUCT
-#include "Plugins/Process/Utility/RegisterInfos_ppc64le.h"
-#undef DECLARE_REGISTER_INFOS_PPC64LE_STRUCT
-
-using namespace lldb;
-using namespace lldb_private;
-
-const lldb_private::RegisterInfo *
-ABISysV_ppc64::GetRegisterInfoArray(uint32_t &count) {
-  if (GetByteOrder() == lldb::eByteOrderLittle) {
-    count = llvm::array_lengthof(g_register_infos_ppc64le);
-    return g_register_infos_ppc64le;
-  } else {
-    count = llvm::array_lengthof(g_register_infos_ppc64);
-    return g_register_infos_ppc64;
-  }
-}
-
-size_t ABISysV_ppc64::GetRedZoneSize() const { return 224; }
-
-lldb::ByteOrder ABISysV_ppc64::GetByteOrder() const {
-  return GetProcessSP()->GetByteOrder();
-}
-
-// Static Functions
-
-ABISP
-ABISysV_ppc64::CreateInstance(lldb::ProcessSP process_sp,
-                              const ArchSpec &arch) {
-  if (arch.GetTriple().isPPC64())
-    return ABISP(
-        new ABISysV_ppc64(std::move(process_sp), MakeMCRegisterInfo(arch)));
-  return ABISP();
-}
-
-bool ABISysV_ppc64::PrepareTrivialCall(Thread &thread, addr_t sp,
-                                       addr_t func_addr, addr_t return_addr,
-                                       llvm::ArrayRef<addr_t> args) const {
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
-
-  if (log) {
-    StreamString s;
-    s.Printf("ABISysV_ppc64::PrepareTrivialCall (tid = 0x%" PRIx64
-             ", sp = 0x%" PRIx64 ", func_addr = 0x%" PRIx64
-             ", return_addr = 0x%" PRIx64,
-             thread.GetID(), (uint64_t)sp, (uint64_t)func_addr,
-             (uint64_t)return_addr);
-
-    for (size_t i = 0; i < args.size(); ++i)
-      s.Printf(", arg%" PRIu64 " = 0x%" PRIx64, static_cast<uint64_t>(i + 1),
-               args[i]);
-    s.PutCString(")");
-    log->PutString(s.GetString());
-  }
-
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-  if (!reg_ctx)
-    return false;
-
-  const RegisterInfo *reg_info = nullptr;
-
-  if (args.size() > 8) // TODO handle more than 8 arguments
-    return false;
-
-  for (size_t i = 0; i < args.size(); ++i) {
-    reg_info = reg_ctx->GetRegisterInfo(eRegisterKindGeneric,
-                                        LLDB_REGNUM_GENERIC_ARG1 + i);
-    LLDB_LOGF(log, "About to write arg%" PRIu64 " (0x%" PRIx64 ") into %s",
-              static_cast<uint64_t>(i + 1), args[i], reg_info->name);
-    if (!reg_ctx->WriteRegisterFromUnsigned(reg_info, args[i]))
-      return false;
-  }
-
-  // First, align the SP
-
-  LLDB_LOGF(log, "16-byte aligning SP: 0x%" PRIx64 " to 0x%" PRIx64,
-            (uint64_t)sp, (uint64_t)(sp & ~0xfull));
-
-  sp &= ~(0xfull); // 16-byte alignment
-
-  sp -= 544; // allocate frame to save TOC, RA and SP.
-
-  Status error;
-  uint64_t reg_value;
-  const RegisterInfo *pc_reg_info =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC);
-  const RegisterInfo *sp_reg_info =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_SP);
-  ProcessSP process_sp(thread.GetProcess());
-  const RegisterInfo *lr_reg_info =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_RA);
-  const RegisterInfo *r2_reg_info = reg_ctx->GetRegisterInfoAtIndex(2);
-  const RegisterInfo *r12_reg_info = reg_ctx->GetRegisterInfoAtIndex(12);
-
-  // Save return address onto the stack.
-  LLDB_LOGF(log,
-            "Pushing the return address onto the stack: 0x%" PRIx64
-            "(+16): 0x%" PRIx64,
-            (uint64_t)sp, (uint64_t)return_addr);
-  if (!process_sp->WritePointerToMemory(sp + 16, return_addr, error))
-    return false;
-
-  // Write the return address to link register.
-  LLDB_LOGF(log, "Writing LR: 0x%" PRIx64, (uint64_t)return_addr);
-  if (!reg_ctx->WriteRegisterFromUnsigned(lr_reg_info, return_addr))
-    return false;
-
-  // Write target address to %r12 register.
-  LLDB_LOGF(log, "Writing R12: 0x%" PRIx64, (uint64_t)func_addr);
-  if (!reg_ctx->WriteRegisterFromUnsigned(r12_reg_info, func_addr))
-    return false;
-
-  // Read TOC pointer value.
-  reg_value = reg_ctx->ReadRegisterAsUnsigned(r2_reg_info, 0);
-
-  // Write TOC pointer onto the stack.
-  uint64_t stack_offset;
-  if (GetByteOrder() == lldb::eByteOrderLittle)
-    stack_offset = 24;
-  else
-    stack_offset = 40;
-
-  LLDB_LOGF(log, "Writing R2 (TOC) at SP(0x%" PRIx64 ")+%d: 0x%" PRIx64,
-            (uint64_t)(sp + stack_offset), (int)stack_offset,
-            (uint64_t)reg_value);
-  if (!process_sp->WritePointerToMemory(sp + stack_offset, reg_value, error))
-    return false;
-
-  // Read the current SP value.
-  reg_value = reg_ctx->ReadRegisterAsUnsigned(sp_reg_info, 0);
-
-  // Save current SP onto the stack.
-  LLDB_LOGF(log, "Writing SP at SP(0x%" PRIx64 ")+0: 0x%" PRIx64, (uint64_t)sp,
-            (uint64_t)reg_value);
-  if (!process_sp->WritePointerToMemory(sp, reg_value, error))
-    return false;
-
-  // %r1 is set to the actual stack value.
-  LLDB_LOGF(log, "Writing SP: 0x%" PRIx64, (uint64_t)sp);
-
-  if (!reg_ctx->WriteRegisterFromUnsigned(sp_reg_info, sp))
-    return false;
-
-  // %pc is set to the address of the called function.
-
-  LLDB_LOGF(log, "Writing IP: 0x%" PRIx64, (uint64_t)func_addr);
-
-  if (!reg_ctx->WriteRegisterFromUnsigned(pc_reg_info, func_addr))
-    return false;
-
-  return true;
-}
-
-static bool ReadIntegerArgument(Scalar &scalar, unsigned int bit_width,
-                                bool is_signed, Thread &thread,
-                                uint32_t *argument_register_ids,
-                                unsigned int &current_argument_register,
-                                addr_t &current_stack_argument) {
-  if (bit_width > 64)
-    return false; // Scalar can't hold large integer arguments
-
-  if (current_argument_register < 6) {
-    scalar = thread.GetRegisterContext()->ReadRegisterAsUnsigned(
-        argument_register_ids[current_argument_register], 0);
-    current_argument_register++;
-    if (is_signed)
-      scalar.SignExtend(bit_width);
-  } else {
-    uint32_t byte_size = (bit_width + (8 - 1)) / 8;
-    Status error;
-    if (thread.GetProcess()->ReadScalarIntegerFromMemory(
-            current_stack_argument, byte_size, is_signed, scalar, error)) {
-      current_stack_argument += byte_size;
-      return true;
-    }
-    return false;
-  }
-  return true;
-}
-
-bool ABISysV_ppc64::GetArgumentValues(Thread &thread, ValueList &values) const {
-  unsigned int num_values = values.GetSize();
-  unsigned int value_index;
-
-  // Extract the register context so we can read arguments from registers
-
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-
-  if (!reg_ctx)
-    return false;
-
-  // Get the pointer to the first stack argument so we have a place to start
-  // when reading data
-
-  addr_t sp = reg_ctx->GetSP(0);
-
-  if (!sp)
-    return false;
-
-  uint64_t stack_offset;
-  if (GetByteOrder() == lldb::eByteOrderLittle)
-    stack_offset = 32;
-  else
-    stack_offset = 48;
-
-  // jump over return address.
-  addr_t current_stack_argument = sp + stack_offset;
-  uint32_t argument_register_ids[8];
-
-  for (size_t i = 0; i < 8; ++i) {
-    argument_register_ids[i] =
-        reg_ctx
-            ->GetRegisterInfo(eRegisterKindGeneric,
-                              LLDB_REGNUM_GENERIC_ARG1 + i)
-            ->kinds[eRegisterKindLLDB];
-  }
-
-  unsigned int current_argument_register = 0;
-
-  for (value_index = 0; value_index < num_values; ++value_index) {
-    Value *value = values.GetValueAtIndex(value_index);
-
-    if (!value)
-      return false;
-
-    // We currently only support extracting values with Clang QualTypes. Do we
-    // care about others?
-    CompilerType compiler_type = value->GetCompilerType();
-    llvm::Optional<uint64_t> bit_size = compiler_type.GetBitSize(&thread);
-    if (!bit_size)
-      return false;
-    bool is_signed;
-
-    if (compiler_type.IsIntegerOrEnumerationType(is_signed)) {
-      ReadIntegerArgument(value->GetScalar(), *bit_size, is_signed, thread,
-                          argument_register_ids, current_argument_register,
-                          current_stack_argument);
-    } else if (compiler_type.IsPointerType()) {
-      ReadIntegerArgument(value->GetScalar(), *bit_size, false, thread,
-                          argument_register_ids, current_argument_register,
-                          current_stack_argument);
-    }
-  }
-
-  return true;
-}
-
-Status ABISysV_ppc64::SetReturnValueObject(lldb::StackFrameSP &frame_sp,
-                                           lldb::ValueObjectSP &new_value_sp) {
-  Status error;
-  if (!new_value_sp) {
-    error.SetErrorString("Empty value object for return value.");
-    return error;
-  }
-
-  CompilerType compiler_type = new_value_sp->GetCompilerType();
-  if (!compiler_type) {
-    error.SetErrorString("Null clang type for return value.");
-    return error;
-  }
-
-  Thread *thread = frame_sp->GetThread().get();
-
-  bool is_signed;
-  uint32_t count;
-  bool is_complex;
-
-  RegisterContext *reg_ctx = thread->GetRegisterContext().get();
-
-  bool set_it_simple = false;
-  if (compiler_type.IsIntegerOrEnumerationType(is_signed) ||
-      compiler_type.IsPointerType()) {
-    const RegisterInfo *reg_info = reg_ctx->GetRegisterInfoByName("r3", 0);
-
-    DataExtractor data;
-    Status data_error;
-    size_t num_bytes = new_value_sp->GetData(data, data_error);
-    if (data_error.Fail()) {
-      error.SetErrorStringWithFormat(
-          "Couldn't convert return value to raw data: %s",
-          data_error.AsCString());
-      return error;
-    }
-    lldb::offset_t offset = 0;
-    if (num_bytes <= 8) {
-      uint64_t raw_value = data.GetMaxU64(&offset, num_bytes);
-
-      if (reg_ctx->WriteRegisterFromUnsigned(reg_info, raw_value))
-        set_it_simple = true;
-    } else {
-      error.SetErrorString("We don't support returning longer than 64 bit "
-                           "integer values at present.");
-    }
-  } else if (compiler_type.IsFloatingPointType(count, is_complex)) {
-    if (is_complex)
-      error.SetErrorString(
-          "We don't support returning complex values at present");
-    else {
-      llvm::Optional<uint64_t> bit_width =
-          compiler_type.GetBitSize(frame_sp.get());
-      if (!bit_width) {
-        error.SetErrorString("can't get size of type");
-        return error;
-      }
-      if (*bit_width <= 64) {
-        DataExtractor data;
-        Status data_error;
-        size_t num_bytes = new_value_sp->GetData(data, data_error);
-        if (data_error.Fail()) {
-          error.SetErrorStringWithFormat(
-              "Couldn't convert return value to raw data: %s",
-              data_error.AsCString());
-          return error;
-        }
-
-        unsigned char buffer[16];
-        ByteOrder byte_order = data.GetByteOrder();
-
-        data.CopyByteOrderedData(0, num_bytes, buffer, 16, byte_order);
-        set_it_simple = true;
-      } else {
-        // FIXME - don't know how to do 80 bit long doubles yet.
-        error.SetErrorString(
-            "We don't support returning float values > 64 bits at present");
-      }
-    }
-  }
-
-  if (!set_it_simple) {
-    // Okay we've got a structure or something that doesn't fit in a simple
-    // register. We should figure out where it really goes, but we don't
-    // support this yet.
-    error.SetErrorString("We only support setting simple integer and float "
-                         "return types at present.");
-  }
-
-  return error;
-}
-
-//
-// ReturnValueExtractor
-//
-
-namespace {
-
-#define LOG_PREFIX "ReturnValueExtractor: "
-
-class ReturnValueExtractor {
-  // This class represents a register, from which data may be extracted.
-  //
-  // It may be constructed by directly specifying its index (where 0 is the
-  // first register used to return values) or by specifying the offset of a
-  // given struct field, in which case the appropriated register index will be
-  // calculated.
-  class Register {
-  public:
-    enum Type {
-      GPR, // General Purpose Register
-      FPR  // Floating Point Register
-    };
-
-    // main constructor
-    //
-    // offs - field offset in struct
-    Register(Type ty, uint32_t index, uint32_t offs, RegisterContext *reg_ctx,
-             ByteOrder byte_order)
-        : m_index(index), m_offs(offs % sizeof(uint64_t)),
-          m_avail(sizeof(uint64_t) - m_offs), m_type(ty), m_reg_ctx(reg_ctx),
-          m_byte_order(byte_order) {}
-
-    // explicit index, no offset
-    Register(Type ty, uint32_t index, RegisterContext *reg_ctx,
-             ByteOrder byte_order)
-        : Register(ty, index, 0, reg_ctx, byte_order) {}
-
-    // GPR, calculate index from offs
-    Register(uint32_t offs, RegisterContext *reg_ctx, ByteOrder byte_order)
-        : Register(GPR, offs / sizeof(uint64_t), offs, reg_ctx, byte_order) {}
-
-    uint32_t Index() const { return m_index; }
-
-    // register offset where data is located
-    uint32_t Offs() const { return m_offs; }
-
-    // available bytes in this register
-    uint32_t Avail() const { return m_avail; }
-
-    bool IsValid() const {
-      if (m_index > 7) {
-        LLDB_LOG(m_log, LOG_PREFIX
-                 "No more than 8 registers should be used to return values");
-        return false;
-      }
-      return true;
-    }
-
-    std::string GetName() const {
-      if (m_type == GPR)
-        return ("r" + llvm::Twine(m_index + 3)).str();
-      else
-        return ("f" + llvm::Twine(m_index + 1)).str();
-    }
-
-    // get raw register data
-    bool GetRawData(uint64_t &raw_data) {
-      const RegisterInfo *reg_info =
-          m_reg_ctx->GetRegisterInfoByName(GetName());
-      if (!reg_info) {
-        LLDB_LOG(m_log, LOG_PREFIX "Failed to get RegisterInfo");
-        return false;
-      }
-
-      RegisterValue reg_val;
-      if (!m_reg_ctx->ReadRegister(reg_info, reg_val)) {
-        LLDB_LOG(m_log, LOG_PREFIX "ReadRegister() failed");
-        return false;
-      }
-
-      Status error;
-      uint32_t rc = reg_val.GetAsMemoryData(
-          reg_info, &raw_data, sizeof(raw_data), m_byte_order, error);
-      if (rc != sizeof(raw_data)) {
-        LLDB_LOG(m_log, LOG_PREFIX "GetAsMemoryData() failed");
-        return false;
-      }
-
-      return true;
-    }
-
-  private:
-    uint32_t m_index;
-    uint32_t m_offs;
-    uint32_t m_avail;
-    Type m_type;
-    RegisterContext *m_reg_ctx;
-    ByteOrder m_byte_order;
-    Log *m_log =
-        lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS);
-  };
-
-  Register GetGPR(uint32_t index) const {
-    return Register(Register::GPR, index, m_reg_ctx, m_byte_order);
-  }
-
-  Register GetFPR(uint32_t index) const {
-    return Register(Register::FPR, index, m_reg_ctx, m_byte_order);
-  }
-
-  Register GetGPRByOffs(uint32_t offs) const {
-    return Register(offs, m_reg_ctx, m_byte_order);
-  }
-
-public:
-  // factory
-  static llvm::Expected<ReturnValueExtractor> Create(Thread &thread,
-                                                     CompilerType &type) {
-    RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-    if (!reg_ctx)
-      return llvm::make_error<llvm::StringError>(
-          LOG_PREFIX "Failed to get RegisterContext",
-          llvm::inconvertibleErrorCode());
-
-    ProcessSP process_sp = thread.GetProcess();
-    if (!process_sp)
-      return llvm::make_error<llvm::StringError>(
-          LOG_PREFIX "GetProcess() failed", llvm::inconvertibleErrorCode());
-
-    return ReturnValueExtractor(thread, type, reg_ctx, process_sp);
-  }
-
-  // main method: get value of the type specified at construction time
-  ValueObjectSP GetValue() {
-    const uint32_t type_flags = m_type.GetTypeInfo();
-
-    // call the appropriate type handler
-    ValueSP value_sp;
-    ValueObjectSP valobj_sp;
-    if (type_flags & eTypeIsScalar) {
-      if (type_flags & eTypeIsInteger) {
-        value_sp = GetIntegerValue(0);
-      } else if (type_flags & eTypeIsFloat) {
-        if (type_flags & eTypeIsComplex) {
-          LLDB_LOG(m_log, LOG_PREFIX "Complex numbers are not supported yet");
-          return ValueObjectSP();
-        } else {
-          value_sp = GetFloatValue(m_type, 0);
-        }
-      }
-    } else if (type_flags & eTypeIsPointer) {
-      value_sp = GetPointerValue(0);
-    }
-
-    if (value_sp) {
-      valobj_sp = ValueObjectConstResult::Create(
-          m_thread.GetStackFrameAtIndex(0).get(), *value_sp, ConstString(""));
-    } else if (type_flags & eTypeIsVector) {
-      valobj_sp = GetVectorValueObject();
-    } else if (type_flags & eTypeIsStructUnion || type_flags & eTypeIsClass) {
-      valobj_sp = GetStructValueObject();
-    }
-
-    return valobj_sp;
-  }
-
-private:
-  // data
-  Thread &m_thread;
-  CompilerType &m_type;
-  uint64_t m_byte_size;
-  std::unique_ptr<DataBufferHeap> m_data_up;
-  int32_t m_src_offs = 0;
-  int32_t m_dst_offs = 0;
-  bool m_packed = false;
-  Log *m_log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS);
-  RegisterContext *m_reg_ctx;
-  ProcessSP m_process_sp;
-  ByteOrder m_byte_order;
-  uint32_t m_addr_size;
-
-  // methods
-
-  // constructor
-  ReturnValueExtractor(Thread &thread, CompilerType &type,
-                       RegisterContext *reg_ctx, ProcessSP process_sp)
-      : m_thread(thread), m_type(type),
-        m_byte_size(m_type.GetByteSize(nullptr).getValueOr(0)),
-        m_data_up(new DataBufferHeap(m_byte_size, 0)), m_reg_ctx(reg_ctx),
-        m_process_sp(process_sp), m_byte_order(process_sp->GetByteOrder()),
-        m_addr_size(
-            process_sp->GetTarget().GetArchitecture().GetAddressByteSize()) {}
-
-  // build a new scalar value
-  ValueSP NewScalarValue(CompilerType &type) {
-    ValueSP value_sp(new Value);
-    value_sp->SetCompilerType(type);
-    value_sp->SetValueType(Value::eValueTypeScalar);
-    return value_sp;
-  }
-
-  // get an integer value in the specified register
-  ValueSP GetIntegerValue(uint32_t reg_index) {
-    uint64_t raw_value;
-    auto reg = GetGPR(reg_index);
-    if (!reg.GetRawData(raw_value))
-      return ValueSP();
-
-    // build value from data
-    ValueSP value_sp(NewScalarValue(m_type));
-
-    uint32_t type_flags = m_type.GetTypeInfo();
-    bool is_signed = (type_flags & eTypeIsSigned) != 0;
-
-    switch (m_byte_size) {
-    case sizeof(uint64_t):
-      if (is_signed)
-        value_sp->GetScalar() = (int64_t)(raw_value);
-      else
-        value_sp->GetScalar() = (uint64_t)(raw_value);
-      break;
-
-    case sizeof(uint32_t):
-      if (is_signed)
-        value_sp->GetScalar() = (int32_t)(raw_value & UINT32_MAX);
-      else
-        value_sp->GetScalar() = (uint32_t)(raw_value & UINT32_MAX);
-      break;
-
-    case sizeof(uint16_t):
-      if (is_signed)
-        value_sp->GetScalar() = (int16_t)(raw_value & UINT16_MAX);
-      else
-        value_sp->GetScalar() = (uint16_t)(raw_value & UINT16_MAX);
-      break;
-
-    case sizeof(uint8_t):
-      if (is_signed)
-        value_sp->GetScalar() = (int8_t)(raw_value & UINT8_MAX);
-      else
-        value_sp->GetScalar() = (uint8_t)(raw_value & UINT8_MAX);
-      break;
-
-    default:
-      llvm_unreachable("Invalid integer size");
-    }
-
-    return value_sp;
-  }
-
-  // get a floating point value on the specified register
-  ValueSP GetFloatValue(CompilerType &type, uint32_t reg_index) {
-    uint64_t raw_data;
-    auto reg = GetFPR(reg_index);
-    if (!reg.GetRawData(raw_data))
-      return {};
-
-    // build value from data
-    ValueSP value_sp(NewScalarValue(type));
-
-    DataExtractor de(&raw_data, sizeof(raw_data), m_byte_order, m_addr_size);
-
-    offset_t offset = 0;
-    llvm::Optional<uint64_t> byte_size = type.GetByteSize(nullptr);
-    if (!byte_size)
-      return {};
-    switch (*byte_size) {
-    case sizeof(float):
-      value_sp->GetScalar() = (float)de.GetDouble(&offset);
-      break;
-
-    case sizeof(double):
-      value_sp->GetScalar() = de.GetDouble(&offset);
-      break;
-
-    default:
-      llvm_unreachable("Invalid floating point size");
-    }
-
-    return value_sp;
-  }
-
-  // get pointer value from register
-  ValueSP GetPointerValue(uint32_t reg_index) {
-    uint64_t raw_data;
-    auto reg = GetGPR(reg_index);
-    if (!reg.GetRawData(raw_data))
-      return ValueSP();
-
-    // build value from raw data
-    ValueSP value_sp(NewScalarValue(m_type));
-    value_sp->GetScalar() = raw_data;
-    return value_sp;
-  }
-
-  // build the ValueObject from our data buffer
-  ValueObjectSP BuildValueObject() {
-    DataExtractor de(DataBufferSP(m_data_up.release()), m_byte_order,
-                     m_addr_size);
-    return ValueObjectConstResult::Create(&m_thread, m_type, ConstString(""),
-                                          de);
-  }
-
-  // get a vector return value
-  ValueObjectSP GetVectorValueObject() {
-    const uint32_t MAX_VRS = 2;
-
-    // get first V register used to return values
-    const RegisterInfo *vr[MAX_VRS];
-    vr[0] = m_reg_ctx->GetRegisterInfoByName("vr2");
-    if (!vr[0]) {
-      LLDB_LOG(m_log, LOG_PREFIX "Failed to get vr2 RegisterInfo");
-      return ValueObjectSP();
-    }
-
-    const uint32_t vr_size = vr[0]->byte_size;
-    size_t vrs = 1;
-    if (m_byte_size > 2 * vr_size) {
-      LLDB_LOG(
-          m_log, LOG_PREFIX
-          "Returning vectors that don't fit in 2 VR regs is not supported");
-      return ValueObjectSP();
-    }
-
-    // load vr3, if needed
-    if (m_byte_size > vr_size) {
-      vrs++;
-      vr[1] = m_reg_ctx->GetRegisterInfoByName("vr3");
-      if (!vr[1]) {
-        LLDB_LOG(m_log, LOG_PREFIX "Failed to get vr3 RegisterInfo");
-        return ValueObjectSP();
-      }
-    }
-
-    // Get the whole contents of vector registers and let the logic here
-    // arrange the data properly.
-
-    RegisterValue vr_val[MAX_VRS];
-    Status error;
-    std::unique_ptr<DataBufferHeap> vr_data(
-        new DataBufferHeap(vrs * vr_size, 0));
-
-    for (uint32_t i = 0; i < vrs; i++) {
-      if (!m_reg_ctx->ReadRegister(vr[i], vr_val[i])) {
-        LLDB_LOG(m_log, LOG_PREFIX "Failed to read vector register contents");
-        return ValueObjectSP();
-      }
-      if (!vr_val[i].GetAsMemoryData(vr[i], vr_data->GetBytes() + i * vr_size,
-                                     vr_size, m_byte_order, error)) {
-        LLDB_LOG(m_log, LOG_PREFIX "Failed to extract vector register bytes");
-        return ValueObjectSP();
-      }
-    }
-
-    // The compiler generated code seems to always put the vector elements at
-    // the end of the vector register, in case they don't occupy all of it.
-    // This offset variable handles this.
-    uint32_t offs = 0;
-    if (m_byte_size < vr_size)
-      offs = vr_size - m_byte_size;
-
-    // copy extracted data to our buffer
-    memcpy(m_data_up->GetBytes(), vr_data->GetBytes() + offs, m_byte_size);
-    return BuildValueObject();
-  }
-
-  // get a struct return value
-  ValueObjectSP GetStructValueObject() {
-    // case 1: get from stack
-    if (m_byte_size > 2 * sizeof(uint64_t)) {
-      uint64_t addr;
-      auto reg = GetGPR(0);
-      if (!reg.GetRawData(addr))
-        return {};
-
-      Status error;
-      size_t rc = m_process_sp->ReadMemory(addr, m_data_up->GetBytes(),
-                                           m_byte_size, error);
-      if (rc != m_byte_size) {
-        LLDB_LOG(m_log, LOG_PREFIX "Failed to read memory pointed by r3");
-        return ValueObjectSP();
-      }
-      return BuildValueObject();
-    }
-
-    // get number of children
-    const bool omit_empty_base_classes = true;
-    uint32_t n = m_type.GetNumChildren(omit_empty_base_classes, nullptr);
-    if (!n) {
-      LLDB_LOG(m_log, LOG_PREFIX "No children found in struct");
-      return {};
-    }
-
-    // case 2: homogeneous double or float aggregate
-    CompilerType elem_type;
-    if (m_type.IsHomogeneousAggregate(&elem_type)) {
-      uint32_t type_flags = elem_type.GetTypeInfo();
-      llvm::Optional<uint64_t> elem_size = elem_type.GetByteSize(nullptr);
-      if (!elem_size)
-        return {};
-      if (type_flags & eTypeIsComplex || !(type_flags & eTypeIsFloat)) {
-        LLDB_LOG(m_log,
-                 LOG_PREFIX "Unexpected type found in homogeneous aggregate");
-        return {};
-      }
-
-      for (uint32_t i = 0; i < n; i++) {
-        ValueSP val_sp = GetFloatValue(elem_type, i);
-        if (!val_sp)
-          return {};
-
-        // copy to buffer
-        Status error;
-        size_t rc = val_sp->GetScalar().GetAsMemoryData(
-            m_data_up->GetBytes() + m_dst_offs, *elem_size, m_byte_order,
-            error);
-        if (rc != *elem_size) {
-          LLDB_LOG(m_log, LOG_PREFIX "Failed to get float data");
-          return {};
-        }
-        m_dst_offs += *elem_size;
-      }
-      return BuildValueObject();
-    }
-
-    // case 3: get from GPRs
-
-    // first, check if this is a packed struct or not
-    ClangASTContext *ast =
-        llvm::dyn_cast<ClangASTContext>(m_type.GetTypeSystem());
-    if (ast) {
-      clang::RecordDecl *record_decl = ClangASTContext::GetAsRecordDecl(m_type);
-
-      if (record_decl) {
-        auto attrs = record_decl->attrs();
-        for (const auto &attr : attrs) {
-          if (attr->getKind() == clang::attr::Packed) {
-            m_packed = true;
-            break;
-          }
-        }
-      }
-    }
-
-    LLDB_LOG(m_log, LOG_PREFIX "{0} struct",
-             m_packed ? "packed" : "not packed");
-
-    for (uint32_t i = 0; i < n; i++) {
-      std::string name;
-      uint32_t size;
-      GetChildType(i, name, size);
-      // NOTE: the offset returned by GetChildCompilerTypeAtIndex()
-      //       can't be used because it never considers alignment bytes
-      //       between struct fields.
-      LLDB_LOG(m_log, LOG_PREFIX "field={0}, size={1}", name, size);
-      if (!ExtractField(size))
-        return ValueObjectSP();
-    }
-
-    return BuildValueObject();
-  }
-
-  // extract 'size' bytes at 'offs' from GPRs
-  bool ExtractFromRegs(int32_t offs, uint32_t size, void *buf) {
-    while (size) {
-      auto reg = GetGPRByOffs(offs);
-      if (!reg.IsValid())
-        return false;
-
-      uint32_t n = std::min(reg.Avail(), size);
-      uint64_t raw_data;
-
-      if (!reg.GetRawData(raw_data))
-        return false;
-
-      memcpy(buf, (char *)&raw_data + reg.Offs(), n);
-      offs += n;
-      size -= n;
-      buf = (char *)buf + n;
-    }
-    return true;
-  }
-
-  // extract one field from GPRs and put it in our buffer
-  bool ExtractField(uint32_t size) {
-    auto reg = GetGPRByOffs(m_src_offs);
-    if (!reg.IsValid())
-      return false;
-
-    // handle padding
-    if (!m_packed) {
-      uint32_t n = m_src_offs % size;
-
-      // not 'size' bytes aligned
-      if (n) {
-        LLDB_LOG(m_log,
-                 LOG_PREFIX "Extracting {0} alignment bytes at offset {1}", n,
-                 m_src_offs);
-        // get alignment bytes
-        if (!ExtractFromRegs(m_src_offs, n, m_data_up->GetBytes() + m_dst_offs))
-          return false;
-        m_src_offs += n;
-        m_dst_offs += n;
-      }
-    }
-
-    // get field
-    LLDB_LOG(m_log, LOG_PREFIX "Extracting {0} field bytes at offset {1}", size,
-             m_src_offs);
-    if (!ExtractFromRegs(m_src_offs, size, m_data_up->GetBytes() + m_dst_offs))
-      return false;
-    m_src_offs += size;
-    m_dst_offs += size;
-    return true;
-  }
-
-  // get child
-  CompilerType GetChildType(uint32_t i, std::string &name, uint32_t &size) {
-    // GetChild constant inputs
-    const bool transparent_pointers = false;
-    const bool omit_empty_base_classes = true;
-    const bool ignore_array_bounds = false;
-    // GetChild output params
-    int32_t child_offs;
-    uint32_t child_bitfield_bit_size;
-    uint32_t child_bitfield_bit_offset;
-    bool child_is_base_class;
-    bool child_is_deref_of_parent;
-    ValueObject *valobj = nullptr;
-    uint64_t language_flags;
-    ExecutionContext exe_ctx;
-    m_thread.CalculateExecutionContext(exe_ctx);
-
-    return m_type.GetChildCompilerTypeAtIndex(
-        &exe_ctx, i, transparent_pointers, omit_empty_base_classes,
-        ignore_array_bounds, name, size, child_offs, child_bitfield_bit_size,
-        child_bitfield_bit_offset, child_is_base_class,
-        child_is_deref_of_parent, valobj, language_flags);
-  }
-};
-
-#undef LOG_PREFIX
-
-} // anonymous namespace
-
-ValueObjectSP
-ABISysV_ppc64::GetReturnValueObjectSimple(Thread &thread,
-                                          CompilerType &type) const {
-  if (!type)
-    return ValueObjectSP();
-
-  auto exp_extractor = ReturnValueExtractor::Create(thread, type);
-  if (!exp_extractor) {
-    Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS);
-    LLDB_LOG_ERROR(log, exp_extractor.takeError(),
-                   "Extracting return value failed: {0}");
-    return ValueObjectSP();
-  }
-
-  return exp_extractor.get().GetValue();
-}
-
-ValueObjectSP ABISysV_ppc64::GetReturnValueObjectImpl(
-    Thread &thread, CompilerType &return_compiler_type) const {
-  return GetReturnValueObjectSimple(thread, return_compiler_type);
-}
-
-bool ABISysV_ppc64::CreateFunctionEntryUnwindPlan(UnwindPlan &unwind_plan) {
-  unwind_plan.Clear();
-  unwind_plan.SetRegisterKind(eRegisterKindDWARF);
-
-  uint32_t lr_reg_num;
-  uint32_t sp_reg_num;
-  uint32_t pc_reg_num;
-
-  if (GetByteOrder() == lldb::eByteOrderLittle) {
-    lr_reg_num = ppc64le_dwarf::dwarf_lr_ppc64le;
-    sp_reg_num = ppc64le_dwarf::dwarf_r1_ppc64le;
-    pc_reg_num = ppc64le_dwarf::dwarf_pc_ppc64le;
-  } else {
-    lr_reg_num = ppc64_dwarf::dwarf_lr_ppc64;
-    sp_reg_num = ppc64_dwarf::dwarf_r1_ppc64;
-    pc_reg_num = ppc64_dwarf::dwarf_pc_ppc64;
-  }
-
-  UnwindPlan::RowSP row(new UnwindPlan::Row);
-
-  // Our Call Frame Address is the stack pointer value
-  row->GetCFAValue().SetIsRegisterPlusOffset(sp_reg_num, 0);
-
-  // The previous PC is in the LR
-  row->SetRegisterLocationToRegister(pc_reg_num, lr_reg_num, true);
-  unwind_plan.AppendRow(row);
-
-  // All other registers are the same.
-
-  unwind_plan.SetSourceName("ppc64 at-func-entry default");
-  unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
-
-  return true;
-}
-
-bool ABISysV_ppc64::CreateDefaultUnwindPlan(UnwindPlan &unwind_plan) {
-  unwind_plan.Clear();
-  unwind_plan.SetRegisterKind(eRegisterKindDWARF);
-
-  uint32_t sp_reg_num;
-  uint32_t pc_reg_num;
-  uint32_t cr_reg_num;
-
-  if (GetByteOrder() == lldb::eByteOrderLittle) {
-    sp_reg_num = ppc64le_dwarf::dwarf_r1_ppc64le;
-    pc_reg_num = ppc64le_dwarf::dwarf_lr_ppc64le;
-    cr_reg_num = ppc64le_dwarf::dwarf_cr_ppc64le;
-  } else {
-    sp_reg_num = ppc64_dwarf::dwarf_r1_ppc64;
-    pc_reg_num = ppc64_dwarf::dwarf_lr_ppc64;
-    cr_reg_num = ppc64_dwarf::dwarf_cr_ppc64;
-  }
-
-  UnwindPlan::RowSP row(new UnwindPlan::Row);
-  const int32_t ptr_size = 8;
-  row->GetCFAValue().SetIsRegisterDereferenced(sp_reg_num);
-
-  row->SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, ptr_size * 2, true);
-  row->SetRegisterLocationToIsCFAPlusOffset(sp_reg_num, 0, true);
-  row->SetRegisterLocationToAtCFAPlusOffset(cr_reg_num, ptr_size, true);
-
-  unwind_plan.AppendRow(row);
-  unwind_plan.SetSourceName("ppc64 default unwind plan");
-  unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
-  unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
-  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
-  unwind_plan.SetReturnAddressRegister(pc_reg_num);
-  return true;
-}
-
-bool ABISysV_ppc64::RegisterIsVolatile(const RegisterInfo *reg_info) {
-  return !RegisterIsCalleeSaved(reg_info);
-}
-
-// See "Register Usage" in the
-// "System V Application Binary Interface"
-// "64-bit PowerPC ELF Application Binary Interface Supplement" current version
-// is 2 released 2015 at
-// https://members.openpowerfoundation.org/document/dl/576
-bool ABISysV_ppc64::RegisterIsCalleeSaved(const RegisterInfo *reg_info) {
-  if (reg_info) {
-    // Preserved registers are :
-    //    r1,r2,r13-r31
-    //    cr2-cr4 (partially preserved)
-    //    f14-f31 (not yet)
-    //    v20-v31 (not yet)
-    //    vrsave (not yet)
-
-    const char *name = reg_info->name;
-    if (name[0] == 'r') {
-      if ((name[1] == '1' || name[1] == '2') && name[2] == '\0')
-        return true;
-      if (name[1] == '1' && name[2] > '2')
-        return true;
-      if ((name[1] == '2' || name[1] == '3') && name[2] != '\0')
-        return true;
-    }
-
-    if (name[0] == 'f' && name[1] >= '0' && name[2] <= '9') {
-      if (name[2] == '\0')
-        return false;
-      if (name[1] == '1' && name[2] >= '4')
-        return true;
-      if ((name[1] == '2' || name[1] == '3') && name[2] != '\0')
-        return true;
-    }
-
-    if (name[0] == 's' && name[1] == 'p' && name[2] == '\0') // sp
-      return true;
-    if (name[0] == 'f' && name[1] == 'p' && name[2] == '\0') // fp
-      return false;
-    if (name[0] == 'p' && name[1] == 'c' && name[2] == '\0') // pc
-      return true;
-  }
-  return false;
-}
-
-void ABISysV_ppc64::Initialize() {
-  PluginManager::RegisterPlugin(
-      GetPluginNameStatic(), "System V ABI for ppc64 targets", CreateInstance);
-}
-
-void ABISysV_ppc64::Terminate() {
-  PluginManager::UnregisterPlugin(CreateInstance);
-}
-
-lldb_private::ConstString ABISysV_ppc64::GetPluginNameStatic() {
-  static ConstString g_name("sysv-ppc64");
-  return g_name;
-}
-
-// PluginInterface protocol
-
-lldb_private::ConstString ABISysV_ppc64::GetPluginName() {
-  return GetPluginNameStatic();
-}
-
-uint32_t ABISysV_ppc64::GetPluginVersion() { return 1; }
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h b/gnu/llvm/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h
deleted file mode 100644 (file)
index 1b58975..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-//===-- ABISysV_ppc64.h ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_ABISysV_ppc64_h_
-#define liblldb_ABISysV_ppc64_h_
-
-#include "lldb/Target/ABI.h"
-#include "lldb/lldb-private.h"
-
-class ABISysV_ppc64 : public lldb_private::ABI {
-public:
-  ~ABISysV_ppc64() override = default;
-
-  size_t GetRedZoneSize() const override;
-
-  bool PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp,
-                          lldb::addr_t functionAddress,
-                          lldb::addr_t returnAddress,
-                          llvm::ArrayRef<lldb::addr_t> args) const override;
-
-  bool GetArgumentValues(lldb_private::Thread &thread,
-                         lldb_private::ValueList &values) const override;
-
-  lldb_private::Status
-  SetReturnValueObject(lldb::StackFrameSP &frame_sp,
-                       lldb::ValueObjectSP &new_value) override;
-
-  lldb::ValueObjectSP
-  GetReturnValueObjectImpl(lldb_private::Thread &thread,
-                           lldb_private::CompilerType &type) const override;
-
-  bool
-  CreateFunctionEntryUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
-  bool CreateDefaultUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
-  bool RegisterIsVolatile(const lldb_private::RegisterInfo *reg_info) override;
-
-  // The SysV ppc64 ABI requires that stack frames be 16 byte aligned.
-  // When there is a trap handler on the stack, e.g. _sigtramp in userland
-  // code, we've seen that the stack pointer is often not aligned properly
-  // before the handler is invoked.  This means that lldb will stop the unwind
-  // early -- before the function which caused the trap.
-  //
-  // To work around this, we relax that alignment to be just word-size
-  // (8-bytes).
-  // Whitelisting the trap handlers for user space would be easy (_sigtramp) but
-  // in other environments there can be a large number of different functions
-  // involved in async traps.
-  bool CallFrameAddressIsValid(lldb::addr_t cfa) override {
-    // Make sure the stack call frame addresses are 8 byte aligned
-    if (cfa & (8ull - 1ull))
-      return false; // Not 8 byte aligned
-    if (cfa == 0)
-      return false; // Zero is not a valid stack address
-    return true;
-  }
-
-  bool CodeAddressIsValid(lldb::addr_t pc) override {
-    // We have a 64 bit address space, so anything is valid as opcodes
-    // aren't fixed width...
-    return true;
-  }
-
-  const lldb_private::RegisterInfo *
-  GetRegisterInfoArray(uint32_t &count) override;
-
-  // Static Functions
-
-  static void Initialize();
-
-  static void Terminate();
-
-  static lldb::ABISP CreateInstance(lldb::ProcessSP process_sp, const lldb_private::ArchSpec &arch);
-
-  static lldb_private::ConstString GetPluginNameStatic();
-
-  // PluginInterface protocol
-
-  lldb_private::ConstString GetPluginName() override;
-
-  uint32_t GetPluginVersion() override;
-
-protected:
-  void CreateRegisterMapIfNeeded();
-
-  lldb::ValueObjectSP
-  GetReturnValueObjectSimple(lldb_private::Thread &thread,
-                             lldb_private::CompilerType &ast_type) const;
-
-  bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info);
-
-private:
-  ABISysV_ppc64(lldb::ProcessSP process_sp,
-                std::unique_ptr<llvm::MCRegisterInfo> info_up)
-      : lldb_private::ABI(std::move(process_sp), std::move(info_up)) {
-    // Call CreateInstance instead.
-  }
-
-  lldb::ByteOrder GetByteOrder() const;
-};
-
-#endif // liblldb_ABISysV_ppc64_h_
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-ppc64/CMakeLists.txt b/gnu/llvm/lldb/source/Plugins/ABI/SysV-ppc64/CMakeLists.txt
deleted file mode 100644 (file)
index b31182d..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-add_lldb_library(lldbPluginABISysV_ppc64 PLUGIN
-  ABISysV_ppc64.cpp
-
-  LINK_LIBS
-    lldbCore
-    lldbSymbol
-    lldbTarget
-  LINK_COMPONENTS
-    Support
-  )
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.cpp b/gnu/llvm/lldb/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.cpp
deleted file mode 100644 (file)
index f4f803a..0000000
+++ /dev/null
@@ -1,744 +0,0 @@
-//===-- ABISysV_s390x.cpp ---------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "ABISysV_s390x.h"
-
-#include "llvm/ADT/STLExtras.h"
-#include "llvm/ADT/Triple.h"
-
-#include "lldb/Core/Module.h"
-#include "lldb/Core/PluginManager.h"
-#include "lldb/Core/Value.h"
-#include "lldb/Core/ValueObjectConstResult.h"
-#include "lldb/Core/ValueObjectMemory.h"
-#include "lldb/Core/ValueObjectRegister.h"
-#include "lldb/Symbol/UnwindPlan.h"
-#include "lldb/Target/Process.h"
-#include "lldb/Target/RegisterContext.h"
-#include "lldb/Target/StackFrame.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Target/Thread.h"
-#include "lldb/Utility/ConstString.h"
-#include "lldb/Utility/DataExtractor.h"
-#include "lldb/Utility/Log.h"
-#include "lldb/Utility/RegisterValue.h"
-#include "lldb/Utility/Status.h"
-
-using namespace lldb;
-using namespace lldb_private;
-
-enum dwarf_regnums {
-  // General Purpose Registers
-  dwarf_r0_s390x = 0,
-  dwarf_r1_s390x,
-  dwarf_r2_s390x,
-  dwarf_r3_s390x,
-  dwarf_r4_s390x,
-  dwarf_r5_s390x,
-  dwarf_r6_s390x,
-  dwarf_r7_s390x,
-  dwarf_r8_s390x,
-  dwarf_r9_s390x,
-  dwarf_r10_s390x,
-  dwarf_r11_s390x,
-  dwarf_r12_s390x,
-  dwarf_r13_s390x,
-  dwarf_r14_s390x,
-  dwarf_r15_s390x,
-  // Floating Point Registers / Vector Registers 0-15
-  dwarf_f0_s390x = 16,
-  dwarf_f2_s390x,
-  dwarf_f4_s390x,
-  dwarf_f6_s390x,
-  dwarf_f1_s390x,
-  dwarf_f3_s390x,
-  dwarf_f5_s390x,
-  dwarf_f7_s390x,
-  dwarf_f8_s390x,
-  dwarf_f10_s390x,
-  dwarf_f12_s390x,
-  dwarf_f14_s390x,
-  dwarf_f9_s390x,
-  dwarf_f11_s390x,
-  dwarf_f13_s390x,
-  dwarf_f15_s390x,
-  // Access Registers
-  dwarf_acr0_s390x = 48,
-  dwarf_acr1_s390x,
-  dwarf_acr2_s390x,
-  dwarf_acr3_s390x,
-  dwarf_acr4_s390x,
-  dwarf_acr5_s390x,
-  dwarf_acr6_s390x,
-  dwarf_acr7_s390x,
-  dwarf_acr8_s390x,
-  dwarf_acr9_s390x,
-  dwarf_acr10_s390x,
-  dwarf_acr11_s390x,
-  dwarf_acr12_s390x,
-  dwarf_acr13_s390x,
-  dwarf_acr14_s390x,
-  dwarf_acr15_s390x,
-  // Program Status Word
-  dwarf_pswm_s390x = 64,
-  dwarf_pswa_s390x,
-  // Vector Registers 16-31
-  dwarf_v16_s390x = 68,
-  dwarf_v18_s390x,
-  dwarf_v20_s390x,
-  dwarf_v22_s390x,
-  dwarf_v17_s390x,
-  dwarf_v19_s390x,
-  dwarf_v21_s390x,
-  dwarf_v23_s390x,
-  dwarf_v24_s390x,
-  dwarf_v26_s390x,
-  dwarf_v28_s390x,
-  dwarf_v30_s390x,
-  dwarf_v25_s390x,
-  dwarf_v27_s390x,
-  dwarf_v29_s390x,
-  dwarf_v31_s390x,
-};
-
-// RegisterKind: EHFrame, DWARF, Generic, Process Plugin, LLDB
-
-#define DEFINE_REG(name, size, alt, generic)                                   \
-  {                                                                            \
-    #name, alt, size, 0, eEncodingUint, eFormatHex,                            \
-        {dwarf_##name##_s390x, dwarf_##name##_s390x, generic,                  \
-         LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM },                           \
-         nullptr, nullptr, nullptr, 0                                          \
-  }
-
-static RegisterInfo g_register_infos[] = {
-    DEFINE_REG(r0, 8, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(r1, 8, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(r2, 8, "arg1", LLDB_REGNUM_GENERIC_ARG1),
-    DEFINE_REG(r3, 8, "arg2", LLDB_REGNUM_GENERIC_ARG2),
-    DEFINE_REG(r4, 8, "arg3", LLDB_REGNUM_GENERIC_ARG3),
-    DEFINE_REG(r5, 8, "arg4", LLDB_REGNUM_GENERIC_ARG4),
-    DEFINE_REG(r6, 8, "arg5", LLDB_REGNUM_GENERIC_ARG5),
-    DEFINE_REG(r7, 8, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(r8, 8, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(r9, 8, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(r10, 8, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(r11, 8, "fp", LLDB_REGNUM_GENERIC_FP),
-    DEFINE_REG(r12, 8, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(r13, 8, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(r14, 8, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(r15, 8, "sp", LLDB_REGNUM_GENERIC_SP),
-    DEFINE_REG(acr0, 4, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(acr1, 4, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(acr2, 4, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(acr3, 4, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(acr4, 4, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(acr5, 4, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(acr6, 4, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(acr7, 4, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(acr8, 4, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(acr9, 4, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(acr10, 4, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(acr11, 4, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(acr12, 4, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(acr13, 4, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(acr14, 4, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(acr15, 4, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(pswm, 8, "flags", LLDB_REGNUM_GENERIC_FLAGS),
-    DEFINE_REG(pswa, 8, "pc", LLDB_REGNUM_GENERIC_PC),
-    DEFINE_REG(f0, 8, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(f1, 8, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(f2, 8, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(f3, 8, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(f4, 8, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(f5, 8, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(f6, 8, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(f7, 8, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(f8, 8, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(f9, 8, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(f10, 8, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(f11, 8, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(f12, 8, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(f13, 8, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(f14, 8, nullptr, LLDB_INVALID_REGNUM),
-    DEFINE_REG(f15, 8, nullptr, LLDB_INVALID_REGNUM),
-};
-
-static const uint32_t k_num_register_infos =
-    llvm::array_lengthof(g_register_infos);
-static bool g_register_info_names_constified = false;
-
-const lldb_private::RegisterInfo *
-ABISysV_s390x::GetRegisterInfoArray(uint32_t &count) {
-  // Make the C-string names and alt_names for the register infos into const
-  // C-string values by having the ConstString unique the names in the global
-  // constant C-string pool.
-  if (!g_register_info_names_constified) {
-    g_register_info_names_constified = true;
-    for (uint32_t i = 0; i < k_num_register_infos; ++i) {
-      if (g_register_infos[i].name)
-        g_register_infos[i].name =
-            ConstString(g_register_infos[i].name).GetCString();
-      if (g_register_infos[i].alt_name)
-        g_register_infos[i].alt_name =
-            ConstString(g_register_infos[i].alt_name).GetCString();
-    }
-  }
-  count = k_num_register_infos;
-  return g_register_infos;
-}
-
-size_t ABISysV_s390x::GetRedZoneSize() const { return 0; }
-
-// Static Functions
-
-ABISP
-ABISysV_s390x::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
-  if (arch.GetTriple().getArch() == llvm::Triple::systemz) {
-    return ABISP(new ABISysV_s390x(std::move(process_sp), MakeMCRegisterInfo(arch)));
-  }
-  return ABISP();
-}
-
-bool ABISysV_s390x::PrepareTrivialCall(Thread &thread, addr_t sp,
-                                       addr_t func_addr, addr_t return_addr,
-                                       llvm::ArrayRef<addr_t> args) const {
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
-
-  if (log) {
-    StreamString s;
-    s.Printf("ABISysV_s390x::PrepareTrivialCall (tid = 0x%" PRIx64
-             ", sp = 0x%" PRIx64 ", func_addr = 0x%" PRIx64
-             ", return_addr = 0x%" PRIx64,
-             thread.GetID(), (uint64_t)sp, (uint64_t)func_addr,
-             (uint64_t)return_addr);
-
-    for (size_t i = 0; i < args.size(); ++i)
-      s.Printf(", arg%" PRIu64 " = 0x%" PRIx64, static_cast<uint64_t>(i + 1),
-               args[i]);
-    s.PutCString(")");
-    log->PutString(s.GetString());
-  }
-
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-  if (!reg_ctx)
-    return false;
-
-  const RegisterInfo *pc_reg_info =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC);
-  const RegisterInfo *sp_reg_info =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_SP);
-  const RegisterInfo *ra_reg_info = reg_ctx->GetRegisterInfoByName("r14", 0);
-  ProcessSP process_sp(thread.GetProcess());
-
-  // Allocate a new stack frame and space for stack arguments if necessary
-
-  addr_t arg_pos = 0;
-  if (args.size() > 5) {
-    sp -= 8 * (args.size() - 5);
-    arg_pos = sp;
-  }
-
-  sp -= 160;
-
-  // Process arguments
-
-  for (size_t i = 0; i < args.size(); ++i) {
-    if (i < 5) {
-      const RegisterInfo *reg_info = reg_ctx->GetRegisterInfo(
-          eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1 + i);
-      LLDB_LOGF(log, "About to write arg%" PRIu64 " (0x%" PRIx64 ") into %s",
-                static_cast<uint64_t>(i + 1), args[i], reg_info->name);
-      if (!reg_ctx->WriteRegisterFromUnsigned(reg_info, args[i]))
-        return false;
-    } else {
-      Status error;
-      LLDB_LOGF(log, "About to write arg%" PRIu64 " (0x%" PRIx64 ") onto stack",
-                static_cast<uint64_t>(i + 1), args[i]);
-      if (!process_sp->WritePointerToMemory(arg_pos, args[i], error))
-        return false;
-      arg_pos += 8;
-    }
-  }
-
-  // %r14 is set to the return address
-
-  LLDB_LOGF(log, "Writing RA: 0x%" PRIx64, (uint64_t)return_addr);
-
-  if (!reg_ctx->WriteRegisterFromUnsigned(ra_reg_info, return_addr))
-    return false;
-
-  // %r15 is set to the actual stack value.
-
-  LLDB_LOGF(log, "Writing SP: 0x%" PRIx64, (uint64_t)sp);
-
-  if (!reg_ctx->WriteRegisterFromUnsigned(sp_reg_info, sp))
-    return false;
-
-  // %pc is set to the address of the called function.
-
-  LLDB_LOGF(log, "Writing PC: 0x%" PRIx64, (uint64_t)func_addr);
-
-  if (!reg_ctx->WriteRegisterFromUnsigned(pc_reg_info, func_addr))
-    return false;
-
-  return true;
-}
-
-static bool ReadIntegerArgument(Scalar &scalar, unsigned int bit_width,
-                                bool is_signed, Thread &thread,
-                                uint32_t *argument_register_ids,
-                                unsigned int &current_argument_register,
-                                addr_t &current_stack_argument) {
-  if (bit_width > 64)
-    return false; // Scalar can't hold large integer arguments
-
-  if (current_argument_register < 5) {
-    scalar = thread.GetRegisterContext()->ReadRegisterAsUnsigned(
-        argument_register_ids[current_argument_register], 0);
-    current_argument_register++;
-    if (is_signed)
-      scalar.SignExtend(bit_width);
-  } else {
-    uint32_t byte_size = (bit_width + (8 - 1)) / 8;
-    Status error;
-    if (thread.GetProcess()->ReadScalarIntegerFromMemory(
-            current_stack_argument + 8 - byte_size, byte_size, is_signed,
-            scalar, error)) {
-      current_stack_argument += 8;
-      return true;
-    }
-    return false;
-  }
-  return true;
-}
-
-bool ABISysV_s390x::GetArgumentValues(Thread &thread, ValueList &values) const {
-  unsigned int num_values = values.GetSize();
-  unsigned int value_index;
-
-  // Extract the register context so we can read arguments from registers
-
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-
-  if (!reg_ctx)
-    return false;
-
-  // Get the pointer to the first stack argument so we have a place to start
-  // when reading data
-
-  addr_t sp = reg_ctx->GetSP(0);
-
-  if (!sp)
-    return false;
-
-  addr_t current_stack_argument = sp + 160;
-
-  uint32_t argument_register_ids[5];
-
-  argument_register_ids[0] =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1)
-          ->kinds[eRegisterKindLLDB];
-  argument_register_ids[1] =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG2)
-          ->kinds[eRegisterKindLLDB];
-  argument_register_ids[2] =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG3)
-          ->kinds[eRegisterKindLLDB];
-  argument_register_ids[3] =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG4)
-          ->kinds[eRegisterKindLLDB];
-  argument_register_ids[4] =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG5)
-          ->kinds[eRegisterKindLLDB];
-
-  unsigned int current_argument_register = 0;
-
-  for (value_index = 0; value_index < num_values; ++value_index) {
-    Value *value = values.GetValueAtIndex(value_index);
-
-    if (!value)
-      return false;
-
-    // We currently only support extracting values with Clang QualTypes. Do we
-    // care about others?
-    CompilerType compiler_type = value->GetCompilerType();
-    llvm::Optional<uint64_t> bit_size = compiler_type.GetBitSize(&thread);
-    if (!bit_size)
-      return false;
-    bool is_signed;
-
-    if (compiler_type.IsIntegerOrEnumerationType(is_signed)) {
-      ReadIntegerArgument(value->GetScalar(), *bit_size, is_signed, thread,
-                          argument_register_ids, current_argument_register,
-                          current_stack_argument);
-    } else if (compiler_type.IsPointerType()) {
-      ReadIntegerArgument(value->GetScalar(), *bit_size, false, thread,
-                          argument_register_ids, current_argument_register,
-                          current_stack_argument);
-    }
-  }
-
-  return true;
-}
-
-Status ABISysV_s390x::SetReturnValueObject(lldb::StackFrameSP &frame_sp,
-                                           lldb::ValueObjectSP &new_value_sp) {
-  Status error;
-  if (!new_value_sp) {
-    error.SetErrorString("Empty value object for return value.");
-    return error;
-  }
-
-  CompilerType compiler_type = new_value_sp->GetCompilerType();
-  if (!compiler_type) {
-    error.SetErrorString("Null clang type for return value.");
-    return error;
-  }
-
-  Thread *thread = frame_sp->GetThread().get();
-
-  bool is_signed;
-  uint32_t count;
-  bool is_complex;
-
-  RegisterContext *reg_ctx = thread->GetRegisterContext().get();
-
-  bool set_it_simple = false;
-  if (compiler_type.IsIntegerOrEnumerationType(is_signed) ||
-      compiler_type.IsPointerType()) {
-    const RegisterInfo *reg_info = reg_ctx->GetRegisterInfoByName("r2", 0);
-
-    DataExtractor data;
-    Status data_error;
-    size_t num_bytes = new_value_sp->GetData(data, data_error);
-    if (data_error.Fail()) {
-      error.SetErrorStringWithFormat(
-          "Couldn't convert return value to raw data: %s",
-          data_error.AsCString());
-      return error;
-    }
-    lldb::offset_t offset = 0;
-    if (num_bytes <= 8) {
-      uint64_t raw_value = data.GetMaxU64(&offset, num_bytes);
-
-      if (reg_ctx->WriteRegisterFromUnsigned(reg_info, raw_value))
-        set_it_simple = true;
-    } else {
-      error.SetErrorString("We don't support returning longer than 64 bit "
-                           "integer values at present.");
-    }
-  } else if (compiler_type.IsFloatingPointType(count, is_complex)) {
-    if (is_complex)
-      error.SetErrorString(
-          "We don't support returning complex values at present");
-    else {
-      llvm::Optional<uint64_t> bit_width =
-          compiler_type.GetBitSize(frame_sp.get());
-      if (!bit_width) {
-        error.SetErrorString("can't get type size");
-        return error;
-      }
-      if (*bit_width <= 64) {
-        const RegisterInfo *f0_info = reg_ctx->GetRegisterInfoByName("f0", 0);
-        RegisterValue f0_value;
-        DataExtractor data;
-        Status data_error;
-        size_t num_bytes = new_value_sp->GetData(data, data_error);
-        if (data_error.Fail()) {
-          error.SetErrorStringWithFormat(
-              "Couldn't convert return value to raw data: %s",
-              data_error.AsCString());
-          return error;
-        }
-
-        unsigned char buffer[8];
-        ByteOrder byte_order = data.GetByteOrder();
-
-        data.CopyByteOrderedData(0, num_bytes, buffer, 8, byte_order);
-        f0_value.SetBytes(buffer, 8, byte_order);
-        reg_ctx->WriteRegister(f0_info, f0_value);
-        set_it_simple = true;
-      } else {
-        // FIXME - don't know how to do long doubles yet.
-        error.SetErrorString(
-            "We don't support returning float values > 64 bits at present");
-      }
-    }
-  }
-
-  if (!set_it_simple) {
-    // Okay we've got a structure or something that doesn't fit in a simple
-    // register. We should figure out where it really goes, but we don't
-    // support this yet.
-    error.SetErrorString("We only support setting simple integer and float "
-                         "return types at present.");
-  }
-
-  return error;
-}
-
-ValueObjectSP ABISysV_s390x::GetReturnValueObjectSimple(
-    Thread &thread, CompilerType &return_compiler_type) const {
-  ValueObjectSP return_valobj_sp;
-  Value value;
-
-  if (!return_compiler_type)
-    return return_valobj_sp;
-
-  // value.SetContext (Value::eContextTypeClangType, return_value_type);
-  value.SetCompilerType(return_compiler_type);
-
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-  if (!reg_ctx)
-    return return_valobj_sp;
-
-  const uint32_t type_flags = return_compiler_type.GetTypeInfo();
-  if (type_flags & eTypeIsScalar) {
-    value.SetValueType(Value::eValueTypeScalar);
-
-    bool success = false;
-    if (type_flags & eTypeIsInteger) {
-      // Extract the register context so we can read arguments from registers.
-      llvm::Optional<uint64_t> byte_size =
-          return_compiler_type.GetByteSize(nullptr);
-      if (!byte_size)
-        return return_valobj_sp;
-      uint64_t raw_value = thread.GetRegisterContext()->ReadRegisterAsUnsigned(
-          reg_ctx->GetRegisterInfoByName("r2", 0), 0);
-      const bool is_signed = (type_flags & eTypeIsSigned) != 0;
-      switch (*byte_size) {
-      default:
-        break;
-
-      case sizeof(uint64_t):
-        if (is_signed)
-          value.GetScalar() = (int64_t)(raw_value);
-        else
-          value.GetScalar() = (uint64_t)(raw_value);
-        success = true;
-        break;
-
-      case sizeof(uint32_t):
-        if (is_signed)
-          value.GetScalar() = (int32_t)(raw_value & UINT32_MAX);
-        else
-          value.GetScalar() = (uint32_t)(raw_value & UINT32_MAX);
-        success = true;
-        break;
-
-      case sizeof(uint16_t):
-        if (is_signed)
-          value.GetScalar() = (int16_t)(raw_value & UINT16_MAX);
-        else
-          value.GetScalar() = (uint16_t)(raw_value & UINT16_MAX);
-        success = true;
-        break;
-
-      case sizeof(uint8_t):
-        if (is_signed)
-          value.GetScalar() = (int8_t)(raw_value & UINT8_MAX);
-        else
-          value.GetScalar() = (uint8_t)(raw_value & UINT8_MAX);
-        success = true;
-        break;
-      }
-    } else if (type_flags & eTypeIsFloat) {
-      if (type_flags & eTypeIsComplex) {
-        // Don't handle complex yet.
-      } else {
-        llvm::Optional<uint64_t> byte_size =
-            return_compiler_type.GetByteSize(nullptr);
-        if (byte_size && *byte_size <= sizeof(long double)) {
-          const RegisterInfo *f0_info = reg_ctx->GetRegisterInfoByName("f0", 0);
-          RegisterValue f0_value;
-          if (reg_ctx->ReadRegister(f0_info, f0_value)) {
-            DataExtractor data;
-            if (f0_value.GetData(data)) {
-              lldb::offset_t offset = 0;
-              if (*byte_size == sizeof(float)) {
-                value.GetScalar() = (float)data.GetFloat(&offset);
-                success = true;
-              } else if (*byte_size == sizeof(double)) {
-                value.GetScalar() = (double)data.GetDouble(&offset);
-                success = true;
-              } else if (*byte_size == sizeof(long double)) {
-                // Don't handle long double yet.
-              }
-            }
-          }
-        }
-      }
-    }
-
-    if (success)
-      return_valobj_sp = ValueObjectConstResult::Create(
-          thread.GetStackFrameAtIndex(0).get(), value, ConstString(""));
-  } else if (type_flags & eTypeIsPointer) {
-    unsigned r2_id =
-        reg_ctx->GetRegisterInfoByName("r2", 0)->kinds[eRegisterKindLLDB];
-    value.GetScalar() =
-        (uint64_t)thread.GetRegisterContext()->ReadRegisterAsUnsigned(r2_id, 0);
-    value.SetValueType(Value::eValueTypeScalar);
-    return_valobj_sp = ValueObjectConstResult::Create(
-        thread.GetStackFrameAtIndex(0).get(), value, ConstString(""));
-  }
-
-  return return_valobj_sp;
-}
-
-ValueObjectSP ABISysV_s390x::GetReturnValueObjectImpl(
-    Thread &thread, CompilerType &return_compiler_type) const {
-  ValueObjectSP return_valobj_sp;
-
-  if (!return_compiler_type)
-    return return_valobj_sp;
-
-  ExecutionContext exe_ctx(thread.shared_from_this());
-  return_valobj_sp = GetReturnValueObjectSimple(thread, return_compiler_type);
-  if (return_valobj_sp)
-    return return_valobj_sp;
-
-  RegisterContextSP reg_ctx_sp = thread.GetRegisterContext();
-  if (!reg_ctx_sp)
-    return return_valobj_sp;
-
-  if (return_compiler_type.IsAggregateType()) {
-    // FIXME: This is just taking a guess, r2 may very well no longer hold the
-    // return storage location.
-    // If we are going to do this right, when we make a new frame we should
-    // check to see if it uses a memory return, and if we are at the first
-    // instruction and if so stash away the return location.  Then we would
-    // only return the memory return value if we know it is valid.
-
-    unsigned r2_id =
-        reg_ctx_sp->GetRegisterInfoByName("r2", 0)->kinds[eRegisterKindLLDB];
-    lldb::addr_t storage_addr =
-        (uint64_t)thread.GetRegisterContext()->ReadRegisterAsUnsigned(r2_id, 0);
-    return_valobj_sp = ValueObjectMemory::Create(
-        &thread, "", Address(storage_addr, nullptr), return_compiler_type);
-  }
-
-  return return_valobj_sp;
-}
-
-bool ABISysV_s390x::CreateFunctionEntryUnwindPlan(UnwindPlan &unwind_plan) {
-  unwind_plan.Clear();
-  unwind_plan.SetRegisterKind(eRegisterKindDWARF);
-
-  UnwindPlan::RowSP row(new UnwindPlan::Row);
-
-  // Our Call Frame Address is the stack pointer value + 160
-  row->GetCFAValue().SetIsRegisterPlusOffset(dwarf_r15_s390x, 160);
-
-  // The previous PC is in r14
-  row->SetRegisterLocationToRegister(dwarf_pswa_s390x, dwarf_r14_s390x, true);
-
-  // All other registers are the same.
-  unwind_plan.AppendRow(row);
-  unwind_plan.SetSourceName("s390x at-func-entry default");
-  unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
-  return true;
-}
-
-bool ABISysV_s390x::CreateDefaultUnwindPlan(UnwindPlan &unwind_plan) {
-  // There's really no default way to unwind on s390x. Trust the .eh_frame CFI,
-  // which should always be good.
-  return false;
-}
-
-bool ABISysV_s390x::GetFallbackRegisterLocation(
-    const RegisterInfo *reg_info,
-    UnwindPlan::Row::RegisterLocation &unwind_regloc) {
-  // If a volatile register is being requested, we don't want to forward the
-  // next frame's register contents up the stack -- the register is not
-  // retrievable at this frame.
-  if (RegisterIsVolatile(reg_info)) {
-    unwind_regloc.SetUndefined();
-    return true;
-  }
-
-  return false;
-}
-
-bool ABISysV_s390x::RegisterIsVolatile(const RegisterInfo *reg_info) {
-  return !RegisterIsCalleeSaved(reg_info);
-}
-
-bool ABISysV_s390x::RegisterIsCalleeSaved(const RegisterInfo *reg_info) {
-  if (reg_info) {
-    // Preserved registers are :
-    //    r6-r13, r15
-    //    f8-f15
-
-    const char *name = reg_info->name;
-    if (name[0] == 'r') {
-      switch (name[1]) {
-      case '6': // r6
-      case '7': // r7
-      case '8': // r8
-      case '9': // r9
-        return name[2] == '\0';
-
-      case '1': // r10, r11, r12, r13, r15
-        if ((name[2] >= '0' && name[2] <= '3') || name[2] == '5')
-          return name[3] == '\0';
-        break;
-
-      default:
-        break;
-      }
-    }
-    if (name[0] == 'f') {
-      switch (name[1]) {
-      case '8': // r8
-      case '9': // r9
-        return name[2] == '\0';
-
-      case '1': // r10, r11, r12, r13, r14, r15
-        if (name[2] >= '0' && name[2] <= '5')
-          return name[3] == '\0';
-        break;
-
-      default:
-        break;
-      }
-    }
-
-    // Accept shorter-variant versions
-    if (name[0] == 's' && name[1] == 'p' && name[2] == '\0') // sp
-      return true;
-    if (name[0] == 'f' && name[1] == 'p' && name[2] == '\0') // fp
-      return true;
-    if (name[0] == 'p' && name[1] == 'c' && name[2] == '\0') // pc
-      return true;
-  }
-  return false;
-}
-
-void ABISysV_s390x::Initialize() {
-  PluginManager::RegisterPlugin(
-      GetPluginNameStatic(), "System V ABI for s390x targets", CreateInstance);
-}
-
-void ABISysV_s390x::Terminate() {
-  PluginManager::UnregisterPlugin(CreateInstance);
-}
-
-lldb_private::ConstString ABISysV_s390x::GetPluginNameStatic() {
-  static ConstString g_name("sysv-s390x");
-  return g_name;
-}
-
-// PluginInterface protocol
-
-lldb_private::ConstString ABISysV_s390x::GetPluginName() {
-  return GetPluginNameStatic();
-}
-
-uint32_t ABISysV_s390x::GetPluginVersion() { return 1; }
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.h b/gnu/llvm/lldb/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.h
deleted file mode 100644 (file)
index 671d6a1..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-//===-- ABISysV_s390x.h -----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_ABISysV_s390x_h_
-#define liblldb_ABISysV_s390x_h_
-
-#include "lldb/Target/ABI.h"
-#include "lldb/lldb-private.h"
-
-class ABISysV_s390x : public lldb_private::ABI {
-public:
-  ~ABISysV_s390x() override = default;
-
-  size_t GetRedZoneSize() const override;
-
-  bool PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp,
-                          lldb::addr_t functionAddress,
-                          lldb::addr_t returnAddress,
-                          llvm::ArrayRef<lldb::addr_t> args) const override;
-
-  bool GetArgumentValues(lldb_private::Thread &thread,
-                         lldb_private::ValueList &values) const override;
-
-  lldb_private::Status
-  SetReturnValueObject(lldb::StackFrameSP &frame_sp,
-                       lldb::ValueObjectSP &new_value) override;
-
-  lldb::ValueObjectSP
-  GetReturnValueObjectImpl(lldb_private::Thread &thread,
-                           lldb_private::CompilerType &type) const override;
-
-  bool
-  CreateFunctionEntryUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
-  bool CreateDefaultUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
-  bool RegisterIsVolatile(const lldb_private::RegisterInfo *reg_info) override;
-
-  bool GetFallbackRegisterLocation(
-      const lldb_private::RegisterInfo *reg_info,
-      lldb_private::UnwindPlan::Row::RegisterLocation &unwind_regloc) override;
-
-  bool CallFrameAddressIsValid(lldb::addr_t cfa) override {
-    // Make sure the stack call frame addresses are 8 byte aligned
-    if (cfa & (8ull - 1ull))
-      return false; // Not 8 byte aligned
-    if (cfa == 0)
-      return false; // Zero is not a valid stack address
-    return true;
-  }
-
-  bool CodeAddressIsValid(lldb::addr_t pc) override {
-    // Code addressed must be 2 byte aligned
-    return (pc & 1ull) == 0;
-  }
-
-  const lldb_private::RegisterInfo *
-  GetRegisterInfoArray(uint32_t &count) override;
-
-  // Static Functions
-
-  static void Initialize();
-
-  static void Terminate();
-
-  static lldb::ABISP CreateInstance(lldb::ProcessSP process_sp, const lldb_private::ArchSpec &arch);
-
-  static lldb_private::ConstString GetPluginNameStatic();
-
-  // PluginInterface protocol
-
-  lldb_private::ConstString GetPluginName() override;
-
-  uint32_t GetPluginVersion() override;
-
-protected:
-  void CreateRegisterMapIfNeeded();
-
-  lldb::ValueObjectSP
-  GetReturnValueObjectSimple(lldb_private::Thread &thread,
-                             lldb_private::CompilerType &ast_type) const;
-
-  bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info);
-
-private:
-  ABISysV_s390x(lldb::ProcessSP process_sp,
-                std::unique_ptr<llvm::MCRegisterInfo> info_up)
-      : lldb_private::ABI(std::move(process_sp), std::move(info_up)) {
-    // Call CreateInstance instead.
-  }
-};
-
-#endif // liblldb_ABISysV_s390x_h_
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-s390x/CMakeLists.txt b/gnu/llvm/lldb/source/Plugins/ABI/SysV-s390x/CMakeLists.txt
deleted file mode 100644 (file)
index f670f01..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-add_lldb_library(lldbPluginABISysV_s390x PLUGIN
-  ABISysV_s390x.cpp
-
-  LINK_LIBS
-    lldbCore
-    lldbSymbol
-    lldbTarget
-  LINK_COMPONENTS
-    Support
-  )
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp b/gnu/llvm/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp
deleted file mode 100644 (file)
index bf1c48f..0000000
+++ /dev/null
@@ -1,1101 +0,0 @@
-//===-- ABISysV_x86_64.cpp --------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "ABISysV_x86_64.h"
-
-#include "llvm/ADT/STLExtras.h"
-#include "llvm/ADT/StringSwitch.h"
-#include "llvm/ADT/Triple.h"
-
-#include "lldb/Core/Module.h"
-#include "lldb/Core/PluginManager.h"
-#include "lldb/Core/Value.h"
-#include "lldb/Core/ValueObjectConstResult.h"
-#include "lldb/Core/ValueObjectMemory.h"
-#include "lldb/Core/ValueObjectRegister.h"
-#include "lldb/Symbol/UnwindPlan.h"
-#include "lldb/Target/Process.h"
-#include "lldb/Target/RegisterContext.h"
-#include "lldb/Target/StackFrame.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Target/Thread.h"
-#include "lldb/Utility/ConstString.h"
-#include "lldb/Utility/DataExtractor.h"
-#include "lldb/Utility/Log.h"
-#include "lldb/Utility/RegisterValue.h"
-#include "lldb/Utility/Status.h"
-
-#include <vector>
-
-using namespace lldb;
-using namespace lldb_private;
-
-enum dwarf_regnums {
-  dwarf_rax = 0,
-  dwarf_rdx,
-  dwarf_rcx,
-  dwarf_rbx,
-  dwarf_rsi,
-  dwarf_rdi,
-  dwarf_rbp,
-  dwarf_rsp,
-  dwarf_r8,
-  dwarf_r9,
-  dwarf_r10,
-  dwarf_r11,
-  dwarf_r12,
-  dwarf_r13,
-  dwarf_r14,
-  dwarf_r15,
-  dwarf_rip,
-  dwarf_xmm0,
-  dwarf_xmm1,
-  dwarf_xmm2,
-  dwarf_xmm3,
-  dwarf_xmm4,
-  dwarf_xmm5,
-  dwarf_xmm6,
-  dwarf_xmm7,
-  dwarf_xmm8,
-  dwarf_xmm9,
-  dwarf_xmm10,
-  dwarf_xmm11,
-  dwarf_xmm12,
-  dwarf_xmm13,
-  dwarf_xmm14,
-  dwarf_xmm15,
-  dwarf_stmm0,
-  dwarf_stmm1,
-  dwarf_stmm2,
-  dwarf_stmm3,
-  dwarf_stmm4,
-  dwarf_stmm5,
-  dwarf_stmm6,
-  dwarf_stmm7,
-  dwarf_ymm0,
-  dwarf_ymm1,
-  dwarf_ymm2,
-  dwarf_ymm3,
-  dwarf_ymm4,
-  dwarf_ymm5,
-  dwarf_ymm6,
-  dwarf_ymm7,
-  dwarf_ymm8,
-  dwarf_ymm9,
-  dwarf_ymm10,
-  dwarf_ymm11,
-  dwarf_ymm12,
-  dwarf_ymm13,
-  dwarf_ymm14,
-  dwarf_ymm15,
-  dwarf_bnd0 = 126,
-  dwarf_bnd1,
-  dwarf_bnd2,
-  dwarf_bnd3
-};
-
-static RegisterInfo g_register_infos[] = {
-    // clang-format off
-    // NAME      ALT      SZ OFF  ENCODING         FORMAT                     EH_FRAME                DWARF                     GENERIC                     LLDB                  NATIVE
-    // ========  =======  == ===  =============    ===================        ======================= =====================     =========================== ===================== ======================
-    {"rax",      nullptr,  8,  0, eEncodingUint,   eFormatHex,               {dwarf_rax,              dwarf_rax,                LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"rbx",      nullptr,  8,  0, eEncodingUint,   eFormatHex,               {dwarf_rbx,              dwarf_rbx,                LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"rcx",      "arg4",   8,  0, eEncodingUint,   eFormatHex,               {dwarf_rcx,              dwarf_rcx,                LLDB_REGNUM_GENERIC_ARG4,   LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"rdx",      "arg3",   8,  0, eEncodingUint,   eFormatHex,               {dwarf_rdx,              dwarf_rdx,                LLDB_REGNUM_GENERIC_ARG3,   LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"rsi",      "arg2",   8,  0, eEncodingUint,   eFormatHex,               {dwarf_rsi,              dwarf_rsi,                LLDB_REGNUM_GENERIC_ARG2,   LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"rdi",      "arg1",   8,  0, eEncodingUint,   eFormatHex,               {dwarf_rdi,              dwarf_rdi,                LLDB_REGNUM_GENERIC_ARG1,   LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"rbp",      "fp",     8,  0, eEncodingUint,   eFormatHex,               {dwarf_rbp,              dwarf_rbp,                LLDB_REGNUM_GENERIC_FP,     LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"rsp",      "sp",     8,  0, eEncodingUint,   eFormatHex,               {dwarf_rsp,              dwarf_rsp,                LLDB_REGNUM_GENERIC_SP,     LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"r8",       "arg5",   8,  0, eEncodingUint,   eFormatHex,               {dwarf_r8,               dwarf_r8,                 LLDB_REGNUM_GENERIC_ARG5,   LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"r9",       "arg6",   8,  0, eEncodingUint,   eFormatHex,               {dwarf_r9,               dwarf_r9,                 LLDB_REGNUM_GENERIC_ARG6,   LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"r10",      nullptr,  8,  0, eEncodingUint,   eFormatHex,               {dwarf_r10,              dwarf_r10,                LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"r11",      nullptr,  8,  0, eEncodingUint,   eFormatHex,               {dwarf_r11,              dwarf_r11,                LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"r12",      nullptr,  8,  0, eEncodingUint,   eFormatHex,               {dwarf_r12,              dwarf_r12,                LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"r13",      nullptr,  8,  0, eEncodingUint,   eFormatHex,               {dwarf_r13,              dwarf_r13,                LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"r14",      nullptr,  8,  0, eEncodingUint,   eFormatHex,               {dwarf_r14,              dwarf_r14,                LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"r15",      nullptr,  8,  0, eEncodingUint,   eFormatHex,               {dwarf_r15,              dwarf_r15,                LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"rip",      "pc",     8,  0, eEncodingUint,   eFormatHex,               {dwarf_rip,              dwarf_rip,                LLDB_REGNUM_GENERIC_PC,     LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"rflags",   nullptr,  4,  0, eEncodingUint,   eFormatHex,               {LLDB_INVALID_REGNUM,    LLDB_INVALID_REGNUM,      LLDB_REGNUM_GENERIC_FLAGS,  LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"cs",       nullptr,  4,  0, eEncodingUint,   eFormatHex,               {LLDB_INVALID_REGNUM,    LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"ss",       nullptr,  4,  0, eEncodingUint,   eFormatHex,               {LLDB_INVALID_REGNUM,    LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"ds",       nullptr,  4,  0, eEncodingUint,   eFormatHex,               {LLDB_INVALID_REGNUM,    LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"es",       nullptr,  4,  0, eEncodingUint,   eFormatHex,               {LLDB_INVALID_REGNUM,    LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"fs",       nullptr,  4,  0, eEncodingUint,   eFormatHex,               {LLDB_INVALID_REGNUM,    LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"gs",       nullptr,  4,  0, eEncodingUint,   eFormatHex,               {LLDB_INVALID_REGNUM,    LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"stmm0",    nullptr, 10,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_stmm0,            dwarf_stmm0,              LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"stmm1",    nullptr, 10,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_stmm1,            dwarf_stmm1,              LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"stmm2",    nullptr, 10,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_stmm2,            dwarf_stmm2,              LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"stmm3",    nullptr, 10,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_stmm3,            dwarf_stmm3,              LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"stmm4",    nullptr, 10,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_stmm4,            dwarf_stmm4,              LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"stmm5",    nullptr, 10,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_stmm5,            dwarf_stmm5,              LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"stmm6",    nullptr, 10,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_stmm6,            dwarf_stmm6,              LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"stmm7",    nullptr, 10,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_stmm7,            dwarf_stmm7,              LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"fctrl",    nullptr,  4,  0, eEncodingUint,   eFormatHex,               {LLDB_INVALID_REGNUM,    LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"fstat",    nullptr,  4,  0, eEncodingUint,   eFormatHex,               {LLDB_INVALID_REGNUM,    LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"ftag",     nullptr,  4,  0, eEncodingUint,   eFormatHex,               {LLDB_INVALID_REGNUM,    LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"fiseg",    nullptr,  4,  0, eEncodingUint,   eFormatHex,               {LLDB_INVALID_REGNUM,    LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"fioff",    nullptr,  4,  0, eEncodingUint,   eFormatHex,               {LLDB_INVALID_REGNUM,    LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"foseg",    nullptr,  4,  0, eEncodingUint,   eFormatHex,               {LLDB_INVALID_REGNUM,    LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"fooff",    nullptr,  4,  0, eEncodingUint,   eFormatHex,               {LLDB_INVALID_REGNUM,    LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"fop",      nullptr,  4,  0, eEncodingUint,   eFormatHex,               {LLDB_INVALID_REGNUM,    LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"xmm0",     nullptr, 16,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_xmm0,             dwarf_xmm0,               LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"xmm1",     nullptr, 16,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_xmm1,             dwarf_xmm1,               LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"xmm2",     nullptr, 16,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_xmm2,             dwarf_xmm2,               LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"xmm3",     nullptr, 16,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_xmm3,             dwarf_xmm3,               LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"xmm4",     nullptr, 16,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_xmm4,             dwarf_xmm4,               LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"xmm5",     nullptr, 16,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_xmm5,             dwarf_xmm5,               LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"xmm6",     nullptr, 16,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_xmm6,             dwarf_xmm6,               LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"xmm7",     nullptr, 16,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_xmm7,             dwarf_xmm7,               LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"xmm8",     nullptr, 16,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_xmm8,             dwarf_xmm8,               LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"xmm9",     nullptr, 16,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_xmm9,             dwarf_xmm9,               LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"xmm10",    nullptr, 16,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_xmm10,            dwarf_xmm10,              LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"xmm11",    nullptr, 16,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_xmm11,            dwarf_xmm11,              LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"xmm12",    nullptr, 16,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_xmm12,            dwarf_xmm12,              LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"xmm13",    nullptr, 16,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_xmm13,            dwarf_xmm13,              LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"xmm14",    nullptr, 16,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_xmm14,            dwarf_xmm14,              LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"xmm15",    nullptr, 16,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_xmm15,            dwarf_xmm15,              LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"mxcsr",    nullptr,  4,  0, eEncodingUint,   eFormatHex,               {LLDB_INVALID_REGNUM,    LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"ymm0",     nullptr, 32,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_ymm0,             dwarf_ymm0,               LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"ymm1",     nullptr, 32,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_ymm1,             dwarf_ymm1,               LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"ymm2",     nullptr, 32,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_ymm2,             dwarf_ymm2,               LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"ymm3",     nullptr, 32,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_ymm3,             dwarf_ymm3,               LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"ymm4",     nullptr, 32,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_ymm4,             dwarf_ymm4,               LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"ymm5",     nullptr, 32,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_ymm5,             dwarf_ymm5,               LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"ymm6",     nullptr, 32,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_ymm6,             dwarf_ymm6,               LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"ymm7",     nullptr, 32,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_ymm7,             dwarf_ymm7,               LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"ymm8",     nullptr, 32,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_ymm8,             dwarf_ymm8,               LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"ymm9",     nullptr, 32,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_ymm9,             dwarf_ymm9,               LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"ymm10",    nullptr, 32,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_ymm10,            dwarf_ymm10,              LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"ymm11",    nullptr, 32,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_ymm11,            dwarf_ymm11,              LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"ymm12",    nullptr, 32,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_ymm12,            dwarf_ymm12,              LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"ymm13",    nullptr, 32,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_ymm13,            dwarf_ymm13,              LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"ymm14",    nullptr, 32,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_ymm14,            dwarf_ymm14,              LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"ymm15",    nullptr, 32,  0, eEncodingVector, eFormatVectorOfUInt8,     {dwarf_ymm15,            dwarf_ymm15,              LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"bnd0",     nullptr, 16,  0, eEncodingVector, eFormatVectorOfUInt64,    {dwarf_bnd0,             dwarf_bnd0,               LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"bnd1",     nullptr, 16,  0, eEncodingVector, eFormatVectorOfUInt64,    {dwarf_bnd1,             dwarf_bnd1,               LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"bnd2",     nullptr, 16,  0, eEncodingVector, eFormatVectorOfUInt64,    {dwarf_bnd2,             dwarf_bnd2,               LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"bnd3",     nullptr, 16,  0, eEncodingVector, eFormatVectorOfUInt64,    {dwarf_bnd3,             dwarf_bnd3,               LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"bndcfgu",  nullptr,  8,  0, eEncodingVector, eFormatVectorOfUInt8,     {LLDB_INVALID_REGNUM,    LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    {"bndstatus",nullptr,  8,  0, eEncodingVector, eFormatVectorOfUInt8,     {LLDB_INVALID_REGNUM,    LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM,  LLDB_INVALID_REGNUM},     nullptr,     nullptr,     nullptr,     0},
-    // clang-format on
-};
-
-static const uint32_t k_num_register_infos =
-    llvm::array_lengthof(g_register_infos);
-static bool g_register_info_names_constified = false;
-
-const lldb_private::RegisterInfo *
-ABISysV_x86_64::GetRegisterInfoArray(uint32_t &count) {
-  // Make the C-string names and alt_names for the register infos into const
-  // C-string values by having the ConstString unique the names in the global
-  // constant C-string pool.
-  if (!g_register_info_names_constified) {
-    g_register_info_names_constified = true;
-    for (uint32_t i = 0; i < k_num_register_infos; ++i) {
-      if (g_register_infos[i].name)
-        g_register_infos[i].name =
-            ConstString(g_register_infos[i].name).GetCString();
-      if (g_register_infos[i].alt_name)
-        g_register_infos[i].alt_name =
-            ConstString(g_register_infos[i].alt_name).GetCString();
-    }
-  }
-  count = k_num_register_infos;
-  return g_register_infos;
-}
-
-bool ABISysV_x86_64::GetPointerReturnRegister(const char *&name) {
-  name = "rax";
-  return true;
-}
-
-size_t ABISysV_x86_64::GetRedZoneSize() const { return 128; }
-
-// Static Functions
-
-ABISP
-ABISysV_x86_64::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
-  const llvm::Triple::ArchType arch_type = arch.GetTriple().getArch();
-  const llvm::Triple::OSType os_type = arch.GetTriple().getOS();
-  const llvm::Triple::EnvironmentType os_env =
-      arch.GetTriple().getEnvironment();
-  if (arch_type == llvm::Triple::x86_64) {
-    switch(os_type) {
-    case llvm::Triple::OSType::IOS:
-    case llvm::Triple::OSType::TvOS:
-    case llvm::Triple::OSType::WatchOS:
-      switch (os_env) {
-      case llvm::Triple::EnvironmentType::MacABI:
-      case llvm::Triple::EnvironmentType::Simulator:
-      case llvm::Triple::EnvironmentType::UnknownEnvironment:
-        // UnknownEnvironment is needed for older compilers that don't
-        // support the simulator environment.
-        return ABISP(new ABISysV_x86_64(std::move(process_sp),
-                                        MakeMCRegisterInfo(arch)));
-      default:
-        return ABISP();
-      }
-    case llvm::Triple::OSType::Darwin:
-    case llvm::Triple::OSType::FreeBSD:
-    case llvm::Triple::OSType::Linux:
-    case llvm::Triple::OSType::MacOSX:
-    case llvm::Triple::OSType::NetBSD:
-    case llvm::Triple::OSType::Solaris:
-    case llvm::Triple::OSType::UnknownOS:
-      return ABISP(
-          new ABISysV_x86_64(std::move(process_sp), MakeMCRegisterInfo(arch)));
-    default:
-      return ABISP();
-    }
-  }
-  return ABISP();
-}
-
-bool ABISysV_x86_64::PrepareTrivialCall(Thread &thread, addr_t sp,
-                                        addr_t func_addr, addr_t return_addr,
-                                        llvm::ArrayRef<addr_t> args) const {
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
-
-  if (log) {
-    StreamString s;
-    s.Printf("ABISysV_x86_64::PrepareTrivialCall (tid = 0x%" PRIx64
-             ", sp = 0x%" PRIx64 ", func_addr = 0x%" PRIx64
-             ", return_addr = 0x%" PRIx64,
-             thread.GetID(), (uint64_t)sp, (uint64_t)func_addr,
-             (uint64_t)return_addr);
-
-    for (size_t i = 0; i < args.size(); ++i)
-      s.Printf(", arg%" PRIu64 " = 0x%" PRIx64, static_cast<uint64_t>(i + 1),
-               args[i]);
-    s.PutCString(")");
-    log->PutString(s.GetString());
-  }
-
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-  if (!reg_ctx)
-    return false;
-
-  const RegisterInfo *reg_info = nullptr;
-
-  if (args.size() > 6) // TODO handle more than 6 arguments
-    return false;
-
-  for (size_t i = 0; i < args.size(); ++i) {
-    reg_info = reg_ctx->GetRegisterInfo(eRegisterKindGeneric,
-                                        LLDB_REGNUM_GENERIC_ARG1 + i);
-    LLDB_LOGF(log, "About to write arg%" PRIu64 " (0x%" PRIx64 ") into %s",
-              static_cast<uint64_t>(i + 1), args[i], reg_info->name);
-    if (!reg_ctx->WriteRegisterFromUnsigned(reg_info, args[i]))
-      return false;
-  }
-
-  // First, align the SP
-
-  LLDB_LOGF(log, "16-byte aligning SP: 0x%" PRIx64 " to 0x%" PRIx64,
-            (uint64_t)sp, (uint64_t)(sp & ~0xfull));
-
-  sp &= ~(0xfull); // 16-byte alignment
-
-  sp -= 8;
-
-  Status error;
-  const RegisterInfo *pc_reg_info =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC);
-  const RegisterInfo *sp_reg_info =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_SP);
-  ProcessSP process_sp(thread.GetProcess());
-
-  RegisterValue reg_value;
-  LLDB_LOGF(log,
-            "Pushing the return address onto the stack: 0x%" PRIx64
-            ": 0x%" PRIx64,
-            (uint64_t)sp, (uint64_t)return_addr);
-
-  // Save return address onto the stack
-  if (!process_sp->WritePointerToMemory(sp, return_addr, error))
-    return false;
-
-  // %rsp is set to the actual stack value.
-
-  LLDB_LOGF(log, "Writing SP: 0x%" PRIx64, (uint64_t)sp);
-
-  if (!reg_ctx->WriteRegisterFromUnsigned(sp_reg_info, sp))
-    return false;
-
-  // %rip is set to the address of the called function.
-
-  LLDB_LOGF(log, "Writing IP: 0x%" PRIx64, (uint64_t)func_addr);
-
-  if (!reg_ctx->WriteRegisterFromUnsigned(pc_reg_info, func_addr))
-    return false;
-
-  return true;
-}
-
-static bool ReadIntegerArgument(Scalar &scalar, unsigned int bit_width,
-                                bool is_signed, Thread &thread,
-                                uint32_t *argument_register_ids,
-                                unsigned int &current_argument_register,
-                                addr_t &current_stack_argument) {
-  if (bit_width > 64)
-    return false; // Scalar can't hold large integer arguments
-
-  if (current_argument_register < 6) {
-    scalar = thread.GetRegisterContext()->ReadRegisterAsUnsigned(
-        argument_register_ids[current_argument_register], 0);
-    current_argument_register++;
-    if (is_signed)
-      scalar.SignExtend(bit_width);
-  } else {
-    uint32_t byte_size = (bit_width + (8 - 1)) / 8;
-    Status error;
-    if (thread.GetProcess()->ReadScalarIntegerFromMemory(
-            current_stack_argument, byte_size, is_signed, scalar, error)) {
-      current_stack_argument += byte_size;
-      return true;
-    }
-    return false;
-  }
-  return true;
-}
-
-bool ABISysV_x86_64::GetArgumentValues(Thread &thread,
-                                       ValueList &values) const {
-  unsigned int num_values = values.GetSize();
-  unsigned int value_index;
-
-  // Extract the register context so we can read arguments from registers
-
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-
-  if (!reg_ctx)
-    return false;
-
-  // Get the pointer to the first stack argument so we have a place to start
-  // when reading data
-
-  addr_t sp = reg_ctx->GetSP(0);
-
-  if (!sp)
-    return false;
-
-  addr_t current_stack_argument = sp + 8; // jump over return address
-
-  uint32_t argument_register_ids[6];
-
-  argument_register_ids[0] =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1)
-          ->kinds[eRegisterKindLLDB];
-  argument_register_ids[1] =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG2)
-          ->kinds[eRegisterKindLLDB];
-  argument_register_ids[2] =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG3)
-          ->kinds[eRegisterKindLLDB];
-  argument_register_ids[3] =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG4)
-          ->kinds[eRegisterKindLLDB];
-  argument_register_ids[4] =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG5)
-          ->kinds[eRegisterKindLLDB];
-  argument_register_ids[5] =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG6)
-          ->kinds[eRegisterKindLLDB];
-
-  unsigned int current_argument_register = 0;
-
-  for (value_index = 0; value_index < num_values; ++value_index) {
-    Value *value = values.GetValueAtIndex(value_index);
-
-    if (!value)
-      return false;
-
-    // We currently only support extracting values with Clang QualTypes. Do we
-    // care about others?
-    CompilerType compiler_type = value->GetCompilerType();
-    llvm::Optional<uint64_t> bit_size = compiler_type.GetBitSize(&thread);
-    if (!bit_size)
-      return false;
-    bool is_signed;
-
-    if (compiler_type.IsIntegerOrEnumerationType(is_signed)) {
-      ReadIntegerArgument(value->GetScalar(), *bit_size, is_signed, thread,
-                          argument_register_ids, current_argument_register,
-                          current_stack_argument);
-    } else if (compiler_type.IsPointerType()) {
-      ReadIntegerArgument(value->GetScalar(), *bit_size, false, thread,
-                          argument_register_ids, current_argument_register,
-                          current_stack_argument);
-    }
-  }
-
-  return true;
-}
-
-Status ABISysV_x86_64::SetReturnValueObject(lldb::StackFrameSP &frame_sp,
-                                            lldb::ValueObjectSP &new_value_sp) {
-  Status error;
-  if (!new_value_sp) {
-    error.SetErrorString("Empty value object for return value.");
-    return error;
-  }
-
-  CompilerType compiler_type = new_value_sp->GetCompilerType();
-  if (!compiler_type) {
-    error.SetErrorString("Null clang type for return value.");
-    return error;
-  }
-
-  Thread *thread = frame_sp->GetThread().get();
-
-  bool is_signed;
-  uint32_t count;
-  bool is_complex;
-
-  RegisterContext *reg_ctx = thread->GetRegisterContext().get();
-
-  bool set_it_simple = false;
-  if (compiler_type.IsIntegerOrEnumerationType(is_signed) ||
-      compiler_type.IsPointerType()) {
-    const RegisterInfo *reg_info = reg_ctx->GetRegisterInfoByName("rax", 0);
-
-    DataExtractor data;
-    Status data_error;
-    size_t num_bytes = new_value_sp->GetData(data, data_error);
-    if (data_error.Fail()) {
-      error.SetErrorStringWithFormat(
-          "Couldn't convert return value to raw data: %s",
-          data_error.AsCString());
-      return error;
-    }
-    lldb::offset_t offset = 0;
-    if (num_bytes <= 8) {
-      uint64_t raw_value = data.GetMaxU64(&offset, num_bytes);
-
-      if (reg_ctx->WriteRegisterFromUnsigned(reg_info, raw_value))
-        set_it_simple = true;
-    } else {
-      error.SetErrorString("We don't support returning longer than 64 bit "
-                           "integer values at present.");
-    }
-  } else if (compiler_type.IsFloatingPointType(count, is_complex)) {
-    if (is_complex)
-      error.SetErrorString(
-          "We don't support returning complex values at present");
-    else {
-      llvm::Optional<uint64_t> bit_width =
-          compiler_type.GetBitSize(frame_sp.get());
-      if (!bit_width) {
-        error.SetErrorString("can't get type size");
-        return error;
-      }
-      if (*bit_width <= 64) {
-        const RegisterInfo *xmm0_info =
-            reg_ctx->GetRegisterInfoByName("xmm0", 0);
-        RegisterValue xmm0_value;
-        DataExtractor data;
-        Status data_error;
-        size_t num_bytes = new_value_sp->GetData(data, data_error);
-        if (data_error.Fail()) {
-          error.SetErrorStringWithFormat(
-              "Couldn't convert return value to raw data: %s",
-              data_error.AsCString());
-          return error;
-        }
-
-        unsigned char buffer[16];
-        ByteOrder byte_order = data.GetByteOrder();
-
-        data.CopyByteOrderedData(0, num_bytes, buffer, 16, byte_order);
-        xmm0_value.SetBytes(buffer, 16, byte_order);
-        reg_ctx->WriteRegister(xmm0_info, xmm0_value);
-        set_it_simple = true;
-      } else {
-        // FIXME - don't know how to do 80 bit long doubles yet.
-        error.SetErrorString(
-            "We don't support returning float values > 64 bits at present");
-      }
-    }
-  }
-
-  if (!set_it_simple) {
-    // Okay we've got a structure or something that doesn't fit in a simple
-    // register. We should figure out where it really goes, but we don't
-    // support this yet.
-    error.SetErrorString("We only support setting simple integer and float "
-                         "return types at present.");
-  }
-
-  return error;
-}
-
-ValueObjectSP ABISysV_x86_64::GetReturnValueObjectSimple(
-    Thread &thread, CompilerType &return_compiler_type) const {
-  ValueObjectSP return_valobj_sp;
-  Value value;
-
-  if (!return_compiler_type)
-    return return_valobj_sp;
-
-  // value.SetContext (Value::eContextTypeClangType, return_value_type);
-  value.SetCompilerType(return_compiler_type);
-
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-  if (!reg_ctx)
-    return return_valobj_sp;
-
-  const uint32_t type_flags = return_compiler_type.GetTypeInfo();
-  if (type_flags & eTypeIsScalar) {
-    value.SetValueType(Value::eValueTypeScalar);
-
-    bool success = false;
-    if (type_flags & eTypeIsInteger) {
-      // Extract the register context so we can read arguments from registers
-
-      llvm::Optional<uint64_t> byte_size =
-          return_compiler_type.GetByteSize(nullptr);
-      if (!byte_size)
-        return return_valobj_sp;
-      uint64_t raw_value = thread.GetRegisterContext()->ReadRegisterAsUnsigned(
-          reg_ctx->GetRegisterInfoByName("rax", 0), 0);
-      const bool is_signed = (type_flags & eTypeIsSigned) != 0;
-      switch (*byte_size) {
-      default:
-        break;
-
-      case sizeof(uint64_t):
-        if (is_signed)
-          value.GetScalar() = (int64_t)(raw_value);
-        else
-          value.GetScalar() = (uint64_t)(raw_value);
-        success = true;
-        break;
-
-      case sizeof(uint32_t):
-        if (is_signed)
-          value.GetScalar() = (int32_t)(raw_value & UINT32_MAX);
-        else
-          value.GetScalar() = (uint32_t)(raw_value & UINT32_MAX);
-        success = true;
-        break;
-
-      case sizeof(uint16_t):
-        if (is_signed)
-          value.GetScalar() = (int16_t)(raw_value & UINT16_MAX);
-        else
-          value.GetScalar() = (uint16_t)(raw_value & UINT16_MAX);
-        success = true;
-        break;
-
-      case sizeof(uint8_t):
-        if (is_signed)
-          value.GetScalar() = (int8_t)(raw_value & UINT8_MAX);
-        else
-          value.GetScalar() = (uint8_t)(raw_value & UINT8_MAX);
-        success = true;
-        break;
-      }
-    } else if (type_flags & eTypeIsFloat) {
-      if (type_flags & eTypeIsComplex) {
-        // Don't handle complex yet.
-      } else {
-        llvm::Optional<uint64_t> byte_size =
-            return_compiler_type.GetByteSize(nullptr);
-        if (byte_size && *byte_size <= sizeof(long double)) {
-          const RegisterInfo *xmm0_info =
-              reg_ctx->GetRegisterInfoByName("xmm0", 0);
-          RegisterValue xmm0_value;
-          if (reg_ctx->ReadRegister(xmm0_info, xmm0_value)) {
-            DataExtractor data;
-            if (xmm0_value.GetData(data)) {
-              lldb::offset_t offset = 0;
-              if (*byte_size == sizeof(float)) {
-                value.GetScalar() = (float)data.GetFloat(&offset);
-                success = true;
-              } else if (*byte_size == sizeof(double)) {
-                value.GetScalar() = (double)data.GetDouble(&offset);
-                success = true;
-              } else if (*byte_size == sizeof(long double)) {
-                // Don't handle long double since that can be encoded as 80 bit
-                // floats...
-              }
-            }
-          }
-        }
-      }
-    }
-
-    if (success)
-      return_valobj_sp = ValueObjectConstResult::Create(
-          thread.GetStackFrameAtIndex(0).get(), value, ConstString(""));
-  } else if (type_flags & eTypeIsPointer) {
-    unsigned rax_id =
-        reg_ctx->GetRegisterInfoByName("rax", 0)->kinds[eRegisterKindLLDB];
-    value.GetScalar() =
-        (uint64_t)thread.GetRegisterContext()->ReadRegisterAsUnsigned(rax_id,
-                                                                      0);
-    value.SetValueType(Value::eValueTypeScalar);
-    return_valobj_sp = ValueObjectConstResult::Create(
-        thread.GetStackFrameAtIndex(0).get(), value, ConstString(""));
-  } else if (type_flags & eTypeIsVector) {
-    llvm::Optional<uint64_t> byte_size =
-        return_compiler_type.GetByteSize(nullptr);
-    if (byte_size && *byte_size > 0) {
-      const RegisterInfo *altivec_reg =
-          reg_ctx->GetRegisterInfoByName("xmm0", 0);
-      if (altivec_reg == nullptr)
-        altivec_reg = reg_ctx->GetRegisterInfoByName("mm0", 0);
-
-      if (altivec_reg) {
-        if (*byte_size <= altivec_reg->byte_size) {
-          ProcessSP process_sp(thread.GetProcess());
-          if (process_sp) {
-            std::unique_ptr<DataBufferHeap> heap_data_up(
-                new DataBufferHeap(*byte_size, 0));
-            const ByteOrder byte_order = process_sp->GetByteOrder();
-            RegisterValue reg_value;
-            if (reg_ctx->ReadRegister(altivec_reg, reg_value)) {
-              Status error;
-              if (reg_value.GetAsMemoryData(
-                      altivec_reg, heap_data_up->GetBytes(),
-                      heap_data_up->GetByteSize(), byte_order, error)) {
-                DataExtractor data(DataBufferSP(heap_data_up.release()),
-                                   byte_order,
-                                   process_sp->GetTarget()
-                                       .GetArchitecture()
-                                       .GetAddressByteSize());
-                return_valobj_sp = ValueObjectConstResult::Create(
-                    &thread, return_compiler_type, ConstString(""), data);
-              }
-            }
-          }
-        } else if (*byte_size <= altivec_reg->byte_size * 2) {
-          const RegisterInfo *altivec_reg2 =
-              reg_ctx->GetRegisterInfoByName("xmm1", 0);
-          if (altivec_reg2) {
-            ProcessSP process_sp(thread.GetProcess());
-            if (process_sp) {
-              std::unique_ptr<DataBufferHeap> heap_data_up(
-                  new DataBufferHeap(*byte_size, 0));
-              const ByteOrder byte_order = process_sp->GetByteOrder();
-              RegisterValue reg_value;
-              RegisterValue reg_value2;
-              if (reg_ctx->ReadRegister(altivec_reg, reg_value) &&
-                  reg_ctx->ReadRegister(altivec_reg2, reg_value2)) {
-
-                Status error;
-                if (reg_value.GetAsMemoryData(
-                        altivec_reg, heap_data_up->GetBytes(),
-                        altivec_reg->byte_size, byte_order, error) &&
-                    reg_value2.GetAsMemoryData(
-                        altivec_reg2,
-                        heap_data_up->GetBytes() + altivec_reg->byte_size,
-                        heap_data_up->GetByteSize() - altivec_reg->byte_size,
-                        byte_order, error)) {
-                  DataExtractor data(DataBufferSP(heap_data_up.release()),
-                                     byte_order,
-                                     process_sp->GetTarget()
-                                         .GetArchitecture()
-                                         .GetAddressByteSize());
-                  return_valobj_sp = ValueObjectConstResult::Create(
-                      &thread, return_compiler_type, ConstString(""), data);
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-  }
-
-  return return_valobj_sp;
-}
-
-// The compiler will flatten the nested aggregate type into single
-// layer and push the value to stack
-// This helper function will flatten an aggregate type
-// and return true if it can be returned in register(s) by value
-// return false if the aggregate is in memory
-static bool FlattenAggregateType(
-    Thread &thread, ExecutionContext &exe_ctx,
-    CompilerType &return_compiler_type,
-    uint32_t data_byte_offset,
-    std::vector<uint32_t> &aggregate_field_offsets,
-    std::vector<CompilerType> &aggregate_compiler_types) {
-
-  const uint32_t num_children = return_compiler_type.GetNumFields();
-  for (uint32_t idx = 0; idx < num_children; ++idx) {
-    std::string name;
-    bool is_signed;
-    uint32_t count;
-    bool is_complex;
-
-    uint64_t field_bit_offset = 0;
-    CompilerType field_compiler_type = return_compiler_type.GetFieldAtIndex(
-        idx, name, &field_bit_offset, nullptr, nullptr);
-    llvm::Optional<uint64_t> field_bit_width =
-          field_compiler_type.GetBitSize(&thread);
-
-    // if we don't know the size of the field (e.g. invalid type), exit
-    if (!field_bit_width || *field_bit_width == 0) {
-      return false;
-    }
-
-    uint32_t field_byte_offset = field_bit_offset / 8 + data_byte_offset;
-
-    const uint32_t field_type_flags = field_compiler_type.GetTypeInfo();
-    if (field_compiler_type.IsIntegerOrEnumerationType(is_signed) ||
-        field_compiler_type.IsPointerType() ||
-        field_compiler_type.IsFloatingPointType(count, is_complex)) {
-      aggregate_field_offsets.push_back(field_byte_offset);
-      aggregate_compiler_types.push_back(field_compiler_type);
-    } else if (field_type_flags & eTypeHasChildren) {
-      if (!FlattenAggregateType(thread, exe_ctx, field_compiler_type,
-                                field_byte_offset, aggregate_field_offsets,
-                                aggregate_compiler_types)) {
-        return false;
-      }
-    }
-  }
-  return true;
-}
-
-ValueObjectSP ABISysV_x86_64::GetReturnValueObjectImpl(
-    Thread &thread, CompilerType &return_compiler_type) const {
-  ValueObjectSP return_valobj_sp;
-
-  if (!return_compiler_type)
-    return return_valobj_sp;
-
-  ExecutionContext exe_ctx(thread.shared_from_this());
-  return_valobj_sp = GetReturnValueObjectSimple(thread, return_compiler_type);
-  if (return_valobj_sp)
-    return return_valobj_sp;
-
-  RegisterContextSP reg_ctx_sp = thread.GetRegisterContext();
-  if (!reg_ctx_sp)
-    return return_valobj_sp;
-
-  llvm::Optional<uint64_t> bit_width = return_compiler_type.GetBitSize(&thread);
-  if (!bit_width)
-    return return_valobj_sp;
-  if (return_compiler_type.IsAggregateType()) {
-    Target *target = exe_ctx.GetTargetPtr();
-    bool is_memory = true;
-    std::vector<uint32_t> aggregate_field_offsets;
-    std::vector<CompilerType> aggregate_compiler_types;
-    if (return_compiler_type.GetTypeSystem()->CanPassInRegisters(
-          return_compiler_type) &&
-      *bit_width <= 128 &&
-      FlattenAggregateType(thread, exe_ctx, return_compiler_type,
-                          0, aggregate_field_offsets,
-                          aggregate_compiler_types)) {
-      ByteOrder byte_order = target->GetArchitecture().GetByteOrder();
-      DataBufferSP data_sp(new DataBufferHeap(16, 0));
-      DataExtractor return_ext(data_sp, byte_order,
-                               target->GetArchitecture().GetAddressByteSize());
-
-      const RegisterInfo *rax_info =
-          reg_ctx_sp->GetRegisterInfoByName("rax", 0);
-      const RegisterInfo *rdx_info =
-          reg_ctx_sp->GetRegisterInfoByName("rdx", 0);
-      const RegisterInfo *xmm0_info =
-          reg_ctx_sp->GetRegisterInfoByName("xmm0", 0);
-      const RegisterInfo *xmm1_info =
-          reg_ctx_sp->GetRegisterInfoByName("xmm1", 0);
-
-      RegisterValue rax_value, rdx_value, xmm0_value, xmm1_value;
-      reg_ctx_sp->ReadRegister(rax_info, rax_value);
-      reg_ctx_sp->ReadRegister(rdx_info, rdx_value);
-      reg_ctx_sp->ReadRegister(xmm0_info, xmm0_value);
-      reg_ctx_sp->ReadRegister(xmm1_info, xmm1_value);
-
-      DataExtractor rax_data, rdx_data, xmm0_data, xmm1_data;
-
-      rax_value.GetData(rax_data);
-      rdx_value.GetData(rdx_data);
-      xmm0_value.GetData(xmm0_data);
-      xmm1_value.GetData(xmm1_data);
-
-      uint32_t fp_bytes =
-          0; // Tracks how much of the xmm registers we've consumed so far
-      uint32_t integer_bytes =
-          0; // Tracks how much of the rax/rds registers we've consumed so far
-
-      // in case of the returned type is a subclass of non-abstract-base class
-      // it will have a padding to skip the base content
-      if (aggregate_field_offsets.size()) {
-        fp_bytes = aggregate_field_offsets[0];
-        integer_bytes = aggregate_field_offsets[0];
-      }
-
-      const uint32_t num_children = aggregate_compiler_types.size();
-
-      // Since we are in the small struct regime, assume we are not in memory.
-      is_memory = false;
-      for (uint32_t idx = 0; idx < num_children; idx++) {
-        bool is_signed;
-        uint32_t count;
-        bool is_complex;
-
-        CompilerType field_compiler_type = aggregate_compiler_types[idx];
-        uint32_t field_byte_width = (uint32_t) (*field_compiler_type.GetByteSize(&thread));
-        uint32_t field_byte_offset = aggregate_field_offsets[idx];
-
-        uint32_t field_bit_width = field_byte_width * 8;
-
-        DataExtractor *copy_from_extractor = nullptr;
-        uint32_t copy_from_offset = 0;
-
-        if (field_compiler_type.IsIntegerOrEnumerationType(is_signed) ||
-            field_compiler_type.IsPointerType()) {
-          if (integer_bytes < 8) {
-            if (integer_bytes + field_byte_width <= 8) {
-              // This is in RAX, copy from register to our result structure:
-              copy_from_extractor = &rax_data;
-              copy_from_offset = integer_bytes;
-              integer_bytes += field_byte_width;
-            } else {
-              // The next field wouldn't fit in the remaining space, so we
-              // pushed it to rdx.
-              copy_from_extractor = &rdx_data;
-              copy_from_offset = 0;
-              integer_bytes = 8 + field_byte_width;
-            }
-          } else if (integer_bytes + field_byte_width <= 16) {
-            copy_from_extractor = &rdx_data;
-            copy_from_offset = integer_bytes - 8;
-            integer_bytes += field_byte_width;
-          } else {
-            // The last field didn't fit.  I can't see how that would happen
-            // w/o the overall size being greater than 16 bytes.  For now,
-            // return a nullptr return value object.
-            return return_valobj_sp;
-          }
-        } else if (field_compiler_type.IsFloatingPointType(count, is_complex)) {
-          // Structs with long doubles are always passed in memory.
-          if (field_bit_width == 128) {
-            is_memory = true;
-            break;
-          } else if (field_bit_width == 64) {
-            // These have to be in a single xmm register.
-            if (fp_bytes == 0)
-              copy_from_extractor = &xmm0_data;
-            else
-              copy_from_extractor = &xmm1_data;
-
-            copy_from_offset = 0;
-            fp_bytes += field_byte_width;
-          } else if (field_bit_width == 32) {
-            // This one is kind of complicated.  If we are in an "eightbyte"
-            // with another float, we'll be stuffed into an xmm register with
-            // it.  If we are in an "eightbyte" with one or more ints, then we
-            // will be stuffed into the appropriate GPR with them.
-            bool in_gpr;
-            if (field_byte_offset % 8 == 0) {
-              // We are at the beginning of one of the eightbytes, so check the
-              // next element (if any)
-              if (idx == num_children - 1) {
-                in_gpr = false;
-              } else {
-                CompilerType next_field_compiler_type =
-                    aggregate_compiler_types[idx + 1];
-                if (next_field_compiler_type.IsIntegerOrEnumerationType(
-                        is_signed)) {
-                  in_gpr = true;
-                } else {
-                  copy_from_offset = 0;
-                  in_gpr = false;
-                }
-              }
-            } else if (field_byte_offset % 4 == 0) {
-              // We are inside of an eightbyte, so see if the field before us
-              // is floating point: This could happen if somebody put padding
-              // in the structure.
-              if (idx == 0) {
-                in_gpr = false;
-              } else {
-                CompilerType prev_field_compiler_type =
-                    aggregate_compiler_types[idx - 1];
-                if (prev_field_compiler_type.IsIntegerOrEnumerationType(
-                        is_signed)) {
-                  in_gpr = true;
-                } else {
-                  copy_from_offset = 4;
-                  in_gpr = false;
-                }
-              }
-            } else {
-              is_memory = true;
-              continue;
-            }
-
-            // Okay, we've figured out whether we are in GPR or XMM, now figure
-            // out which one.
-            if (in_gpr) {
-              if (integer_bytes < 8) {
-                // This is in RAX, copy from register to our result structure:
-                copy_from_extractor = &rax_data;
-                copy_from_offset = integer_bytes;
-                integer_bytes += field_byte_width;
-              } else {
-                copy_from_extractor = &rdx_data;
-                copy_from_offset = integer_bytes - 8;
-                integer_bytes += field_byte_width;
-              }
-            } else {
-              if (fp_bytes < 8)
-                copy_from_extractor = &xmm0_data;
-              else
-                copy_from_extractor = &xmm1_data;
-
-              fp_bytes += field_byte_width;
-            }
-          }
-        }
-        // These two tests are just sanity checks.  If I somehow get the type
-        // calculation wrong above it is better to just return nothing than to
-        // assert or crash.
-        if (!copy_from_extractor)
-          return return_valobj_sp;
-        if (copy_from_offset + field_byte_width >
-            copy_from_extractor->GetByteSize())
-          return return_valobj_sp;
-        copy_from_extractor->CopyByteOrderedData(
-            copy_from_offset, field_byte_width,
-            data_sp->GetBytes() + field_byte_offset, field_byte_width,
-            byte_order);
-      }
-      if (!is_memory) {
-        // The result is in our data buffer.  Let's make a variable object out
-        // of it:
-        return_valobj_sp = ValueObjectConstResult::Create(
-            &thread, return_compiler_type, ConstString(""), return_ext);
-      }
-    }
-
-    // FIXME: This is just taking a guess, rax may very well no longer hold the
-    // return storage location.
-    // If we are going to do this right, when we make a new frame we should
-    // check to see if it uses a memory return, and if we are at the first
-    // instruction and if so stash away the return location.  Then we would
-    // only return the memory return value if we know it is valid.
-
-    if (is_memory) {
-      unsigned rax_id =
-          reg_ctx_sp->GetRegisterInfoByName("rax", 0)->kinds[eRegisterKindLLDB];
-      lldb::addr_t storage_addr =
-          (uint64_t)thread.GetRegisterContext()->ReadRegisterAsUnsigned(rax_id,
-                                                                        0);
-      return_valobj_sp = ValueObjectMemory::Create(
-          &thread, "", Address(storage_addr, nullptr), return_compiler_type);
-    }
-  }
-
-  return return_valobj_sp;
-}
-
-// This defines the CFA as rsp+8
-// the saved pc is at CFA-8 (i.e. rsp+0)
-// The saved rsp is CFA+0
-
-bool ABISysV_x86_64::CreateFunctionEntryUnwindPlan(UnwindPlan &unwind_plan) {
-  unwind_plan.Clear();
-  unwind_plan.SetRegisterKind(eRegisterKindDWARF);
-
-  uint32_t sp_reg_num = dwarf_rsp;
-  uint32_t pc_reg_num = dwarf_rip;
-
-  UnwindPlan::RowSP row(new UnwindPlan::Row);
-  row->GetCFAValue().SetIsRegisterPlusOffset(sp_reg_num, 8);
-  row->SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, -8, false);
-  row->SetRegisterLocationToIsCFAPlusOffset(sp_reg_num, 0, true);
-  unwind_plan.AppendRow(row);
-  unwind_plan.SetSourceName("x86_64 at-func-entry default");
-  unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
-  return true;
-}
-
-// This defines the CFA as rbp+16
-// The saved pc is at CFA-8 (i.e. rbp+8)
-// The saved rbp is at CFA-16 (i.e. rbp+0)
-// The saved rsp is CFA+0
-
-bool ABISysV_x86_64::CreateDefaultUnwindPlan(UnwindPlan &unwind_plan) {
-  unwind_plan.Clear();
-  unwind_plan.SetRegisterKind(eRegisterKindDWARF);
-
-  uint32_t fp_reg_num = dwarf_rbp;
-  uint32_t sp_reg_num = dwarf_rsp;
-  uint32_t pc_reg_num = dwarf_rip;
-
-  UnwindPlan::RowSP row(new UnwindPlan::Row);
-
-  const int32_t ptr_size = 8;
-  row->GetCFAValue().SetIsRegisterPlusOffset(dwarf_rbp, 2 * ptr_size);
-  row->SetOffset(0);
-
-  row->SetRegisterLocationToAtCFAPlusOffset(fp_reg_num, ptr_size * -2, true);
-  row->SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, ptr_size * -1, true);
-  row->SetRegisterLocationToIsCFAPlusOffset(sp_reg_num, 0, true);
-
-  unwind_plan.AppendRow(row);
-  unwind_plan.SetSourceName("x86_64 default unwind plan");
-  unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
-  unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
-  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
-  return true;
-}
-
-bool ABISysV_x86_64::RegisterIsVolatile(const RegisterInfo *reg_info) {
-  return !RegisterIsCalleeSaved(reg_info);
-}
-
-// See "Register Usage" in the
-// "System V Application Binary Interface"
-// "AMD64 Architecture Processor Supplement" (or "x86-64(tm) Architecture
-// Processor Supplement" in earlier revisions) (this doc is also commonly
-// referred to as the x86-64/AMD64 psABI) Edited by Michael Matz, Jan Hubicka,
-// Andreas Jaeger, and Mark Mitchell current version is 0.99.6 released
-// 2012-07-02 at http://refspecs.linuxfoundation.org/elf/x86-64-abi-0.99.pdf
-// It's being revised & updated at https://github.com/hjl-tools/x86-psABI/
-
-bool ABISysV_x86_64::RegisterIsCalleeSaved(const RegisterInfo *reg_info) {
-  if (!reg_info)
-    return false;
-  assert(reg_info->name != nullptr && "unnamed register?");
-  std::string Name = std::string(reg_info->name);
-  bool IsCalleeSaved =
-      llvm::StringSwitch<bool>(Name)
-          .Cases("r12", "r13", "r14", "r15", "rbp", "ebp", "rbx", "ebx", true)
-          .Cases("rip", "eip", "rsp", "esp", "sp", "fp", "pc", true)
-          .Default(false);
-  return IsCalleeSaved;
-}
-
-void ABISysV_x86_64::Initialize() {
-  PluginManager::RegisterPlugin(
-      GetPluginNameStatic(), "System V ABI for x86_64 targets", CreateInstance);
-}
-
-void ABISysV_x86_64::Terminate() {
-  PluginManager::UnregisterPlugin(CreateInstance);
-}
-
-lldb_private::ConstString ABISysV_x86_64::GetPluginNameStatic() {
-  static ConstString g_name("sysv-x86_64");
-  return g_name;
-}
-
-// PluginInterface protocol
-
-lldb_private::ConstString ABISysV_x86_64::GetPluginName() {
-  return GetPluginNameStatic();
-}
-
-uint32_t ABISysV_x86_64::GetPluginVersion() { return 1; }
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h b/gnu/llvm/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h
deleted file mode 100644 (file)
index d445d8f..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-//===-- ABISysV_x86_64.h ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_ABISysV_x86_64_h_
-#define liblldb_ABISysV_x86_64_h_
-
-#include "lldb/Target/ABI.h"
-#include "lldb/lldb-private.h"
-
-class ABISysV_x86_64 : public lldb_private::ABI {
-public:
-  ~ABISysV_x86_64() override = default;
-
-  size_t GetRedZoneSize() const override;
-
-  bool PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp,
-                          lldb::addr_t functionAddress,
-                          lldb::addr_t returnAddress,
-                          llvm::ArrayRef<lldb::addr_t> args) const override;
-
-  bool GetArgumentValues(lldb_private::Thread &thread,
-                         lldb_private::ValueList &values) const override;
-
-  lldb_private::Status
-  SetReturnValueObject(lldb::StackFrameSP &frame_sp,
-                       lldb::ValueObjectSP &new_value) override;
-
-  lldb::ValueObjectSP
-  GetReturnValueObjectImpl(lldb_private::Thread &thread,
-                           lldb_private::CompilerType &type) const override;
-
-  bool
-  CreateFunctionEntryUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
-  bool CreateDefaultUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
-  bool RegisterIsVolatile(const lldb_private::RegisterInfo *reg_info) override;
-
-  // The SysV x86_64 ABI requires that stack frames be 16 byte aligned.
-  // When there is a trap handler on the stack, e.g. _sigtramp in userland
-  // code, we've seen that the stack pointer is often not aligned properly
-  // before the handler is invoked.  This means that lldb will stop the unwind
-  // early -- before the function which caused the trap.
-  //
-  // To work around this, we relax that alignment to be just word-size
-  // (8-bytes).
-  // Whitelisting the trap handlers for user space would be easy (_sigtramp) but
-  // in other environments there can be a large number of different functions
-  // involved in async traps.
-  bool CallFrameAddressIsValid(lldb::addr_t cfa) override {
-    // Make sure the stack call frame addresses are 8 byte aligned
-    if (cfa & (8ull - 1ull))
-      return false; // Not 8 byte aligned
-    if (cfa == 0)
-      return false; // Zero is not a valid stack address
-    return true;
-  }
-
-  bool CodeAddressIsValid(lldb::addr_t pc) override {
-    // We have a 64 bit address space, so anything is valid as opcodes
-    // aren't fixed width...
-    return true;
-  }
-
-  const lldb_private::RegisterInfo *
-  GetRegisterInfoArray(uint32_t &count) override;
-
-  bool GetPointerReturnRegister(const char *&name) override;
-
-  // Static Functions
-
-  static void Initialize();
-
-  static void Terminate();
-
-  static lldb::ABISP CreateInstance(lldb::ProcessSP process_sp, const lldb_private::ArchSpec &arch);
-
-  static lldb_private::ConstString GetPluginNameStatic();
-
-  // PluginInterface protocol
-
-  lldb_private::ConstString GetPluginName() override;
-
-  uint32_t GetPluginVersion() override;
-
-protected:
-  void CreateRegisterMapIfNeeded();
-
-  lldb::ValueObjectSP
-  GetReturnValueObjectSimple(lldb_private::Thread &thread,
-                             lldb_private::CompilerType &ast_type) const;
-
-  bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info);
-
-private:
-  ABISysV_x86_64(lldb::ProcessSP process_sp,
-                 std::unique_ptr<llvm::MCRegisterInfo> info_up)
-      : lldb_private::ABI(std::move(process_sp), std::move(info_up)) {
-    // Call CreateInstance instead.
-  }
-};
-
-#endif // liblldb_ABISysV_x86_64_h_
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/SysV-x86_64/CMakeLists.txt b/gnu/llvm/lldb/source/Plugins/ABI/SysV-x86_64/CMakeLists.txt
deleted file mode 100644 (file)
index 17644d7..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-add_lldb_library(lldbPluginABISysV_x86_64 PLUGIN
-  ABISysV_x86_64.cpp
-
-  LINK_LIBS
-    lldbCore
-    lldbSymbol
-    lldbTarget
-  LINK_COMPONENTS
-    Support
-  )
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/Windows-x86_64/ABIWindows_x86_64.cpp b/gnu/llvm/lldb/source/Plugins/ABI/Windows-x86_64/ABIWindows_x86_64.cpp
deleted file mode 100644 (file)
index ac24426..0000000
+++ /dev/null
@@ -1,1802 +0,0 @@
-//===-- ABIWindows_x86_64.cpp --------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "ABIWindows_x86_64.h"
-
-#include "llvm/ADT/STLExtras.h"
-#include "llvm/ADT/StringSwitch.h"
-#include "llvm/ADT/Triple.h"
-
-#include "lldb/Core/Module.h"
-#include "lldb/Core/PluginManager.h"
-#include "lldb/Core/Value.h"
-#include "lldb/Core/ValueObjectConstResult.h"
-#include "lldb/Core/ValueObjectMemory.h"
-#include "lldb/Core/ValueObjectRegister.h"
-#include "lldb/Symbol/UnwindPlan.h"
-#include "lldb/Target/Process.h"
-#include "lldb/Target/RegisterContext.h"
-#include "lldb/Target/StackFrame.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Target/Thread.h"
-#include "lldb/Utility/ConstString.h"
-#include "lldb/Utility/DataExtractor.h"
-#include "lldb/Utility/Log.h"
-#include "lldb/Utility/RegisterValue.h"
-#include "lldb/Utility/Status.h"
-
-using namespace lldb;
-using namespace lldb_private;
-
-enum dwarf_regnums {
-  dwarf_rax = 0,
-  dwarf_rdx,
-  dwarf_rcx,
-  dwarf_rbx,
-  dwarf_rsi,
-  dwarf_rdi,
-  dwarf_rbp,
-  dwarf_rsp,
-  dwarf_r8,
-  dwarf_r9,
-  dwarf_r10,
-  dwarf_r11,
-  dwarf_r12,
-  dwarf_r13,
-  dwarf_r14,
-  dwarf_r15,
-  dwarf_rip,
-  dwarf_xmm0,
-  dwarf_xmm1,
-  dwarf_xmm2,
-  dwarf_xmm3,
-  dwarf_xmm4,
-  dwarf_xmm5,
-  dwarf_xmm6,
-  dwarf_xmm7,
-  dwarf_xmm8,
-  dwarf_xmm9,
-  dwarf_xmm10,
-  dwarf_xmm11,
-  dwarf_xmm12,
-  dwarf_xmm13,
-  dwarf_xmm14,
-  dwarf_xmm15,
-  dwarf_stmm0,
-  dwarf_stmm1,
-  dwarf_stmm2,
-  dwarf_stmm3,
-  dwarf_stmm4,
-  dwarf_stmm5,
-  dwarf_stmm6,
-  dwarf_stmm7,
-  dwarf_ymm0,
-  dwarf_ymm1,
-  dwarf_ymm2,
-  dwarf_ymm3,
-  dwarf_ymm4,
-  dwarf_ymm5,
-  dwarf_ymm6,
-  dwarf_ymm7,
-  dwarf_ymm8,
-  dwarf_ymm9,
-  dwarf_ymm10,
-  dwarf_ymm11,
-  dwarf_ymm12,
-  dwarf_ymm13,
-  dwarf_ymm14,
-  dwarf_ymm15,
-  dwarf_bnd0 = 126,
-  dwarf_bnd1,
-  dwarf_bnd2,
-  dwarf_bnd3
-};
-
-static RegisterInfo g_register_infos[] = {
-    //  NAME      ALT      SZ OFF ENCODING         FORMAT              EH_FRAME
-    //  DWARF                 GENERIC                     PROCESS PLUGIN
-    //  LLDB NATIVE
-    //  ========  =======  == === =============    ===================
-    //  ======================= =====================
-    //  =========================== ===================== ======================
-    {"rax",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_rax, dwarf_rax, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"rbx",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_rbx, dwarf_rbx, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"rcx",
-     "arg1",
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_rcx, dwarf_rcx, LLDB_REGNUM_GENERIC_ARG1, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"rdx",
-     "arg2",
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_rdx, dwarf_rdx, LLDB_REGNUM_GENERIC_ARG2, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"rsi",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_rsi, dwarf_rsi, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"rdi",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_rdi, dwarf_rdi, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"rbp",
-     "fp",
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_rbp, dwarf_rbp, LLDB_REGNUM_GENERIC_FP, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"rsp",
-     "sp",
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_rsp, dwarf_rsp, LLDB_REGNUM_GENERIC_SP, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r8",
-     "arg3",
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r8, dwarf_r8, LLDB_REGNUM_GENERIC_ARG3, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r9",
-     "arg4",
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r9, dwarf_r9, LLDB_REGNUM_GENERIC_ARG4, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r10",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r10, dwarf_r10, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r11",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r11, dwarf_r11, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r12",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r12, dwarf_r12, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r13",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r13, dwarf_r13, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r14",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r14, dwarf_r14, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"r15",
-     nullptr,
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_r15, dwarf_r15, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"rip",
-     "pc",
-     8,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {dwarf_rip, dwarf_rip, LLDB_REGNUM_GENERIC_PC, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"rflags",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_REGNUM_GENERIC_FLAGS,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"cs",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ss",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ds",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"es",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"fs",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"gs",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"stmm0",
-     nullptr,
-     10,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_stmm0, dwarf_stmm0, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"stmm1",
-     nullptr,
-     10,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_stmm1, dwarf_stmm1, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"stmm2",
-     nullptr,
-     10,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_stmm2, dwarf_stmm2, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"stmm3",
-     nullptr,
-     10,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_stmm3, dwarf_stmm3, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"stmm4",
-     nullptr,
-     10,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_stmm4, dwarf_stmm4, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"stmm5",
-     nullptr,
-     10,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_stmm5, dwarf_stmm5, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"stmm6",
-     nullptr,
-     10,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_stmm6, dwarf_stmm6, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"stmm7",
-     nullptr,
-     10,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_stmm7, dwarf_stmm7, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"fctrl",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"fstat",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ftag",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"fiseg",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"fioff",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"foseg",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"fooff",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"fop",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"xmm0",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_xmm0, dwarf_xmm0, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"xmm1",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_xmm1, dwarf_xmm1, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"xmm2",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_xmm2, dwarf_xmm2, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"xmm3",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_xmm3, dwarf_xmm3, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"xmm4",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_xmm4, dwarf_xmm4, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"xmm5",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_xmm5, dwarf_xmm5, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"xmm6",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_xmm6, dwarf_xmm6, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"xmm7",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_xmm7, dwarf_xmm7, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"xmm8",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_xmm8, dwarf_xmm8, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"xmm9",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_xmm9, dwarf_xmm9, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"xmm10",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_xmm10, dwarf_xmm10, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"xmm11",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_xmm11, dwarf_xmm11, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"xmm12",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_xmm12, dwarf_xmm12, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"xmm13",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_xmm13, dwarf_xmm13, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"xmm14",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_xmm14, dwarf_xmm14, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"xmm15",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_xmm15, dwarf_xmm15, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"mxcsr",
-     nullptr,
-     4,
-     0,
-     eEncodingUint,
-     eFormatHex,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ymm0",
-     nullptr,
-     32,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_ymm0, dwarf_ymm0, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ymm1",
-     nullptr,
-     32,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_ymm1, dwarf_ymm1, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ymm2",
-     nullptr,
-     32,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_ymm2, dwarf_ymm2, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ymm3",
-     nullptr,
-     32,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_ymm3, dwarf_ymm3, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ymm4",
-     nullptr,
-     32,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_ymm4, dwarf_ymm4, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ymm5",
-     nullptr,
-     32,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_ymm5, dwarf_ymm5, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ymm6",
-     nullptr,
-     32,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_ymm6, dwarf_ymm6, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ymm7",
-     nullptr,
-     32,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_ymm7, dwarf_ymm7, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ymm8",
-     nullptr,
-     32,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_ymm8, dwarf_ymm8, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ymm9",
-     nullptr,
-     32,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_ymm9, dwarf_ymm9, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ymm10",
-     nullptr,
-     32,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_ymm10, dwarf_ymm10, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ymm11",
-     nullptr,
-     32,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_ymm11, dwarf_ymm11, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ymm12",
-     nullptr,
-     32,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_ymm12, dwarf_ymm12, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ymm13",
-     nullptr,
-     32,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_ymm13, dwarf_ymm13, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ymm14",
-     nullptr,
-     32,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_ymm14, dwarf_ymm14, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"ymm15",
-     nullptr,
-     32,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {dwarf_ymm15, dwarf_ymm15, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"bnd0",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt64,
-     {dwarf_bnd0, dwarf_bnd0, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"bnd1",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt64,
-     {dwarf_bnd1, dwarf_bnd1, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"bnd2",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt64,
-     {dwarf_bnd2, dwarf_bnd2, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"bnd3",
-     nullptr,
-     16,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt64,
-     {dwarf_bnd3, dwarf_bnd3, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"bndcfgu",
-     nullptr,
-     8,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0},
-    {"bndstatus",
-     nullptr,
-     8,
-     0,
-     eEncodingVector,
-     eFormatVectorOfUInt8,
-     {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
-      LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM},
-     nullptr,
-     nullptr,
-     nullptr,
-     0}};
-
-static const uint32_t k_num_register_infos =
-    llvm::array_lengthof(g_register_infos);
-static bool g_register_info_names_constified = false;
-
-const lldb_private::RegisterInfo *
-ABIWindows_x86_64::GetRegisterInfoArray(uint32_t &count) {
-  // Make the C-string names and alt_names for the register infos into const
-  // C-string values by having the ConstString unique the names in the global
-  // constant C-string pool.
-  if (!g_register_info_names_constified) {
-    g_register_info_names_constified = true;
-    for (uint32_t i = 0; i < k_num_register_infos; ++i) {
-      if (g_register_infos[i].name)
-        g_register_infos[i].name =
-            ConstString(g_register_infos[i].name).GetCString();
-      if (g_register_infos[i].alt_name)
-        g_register_infos[i].alt_name =
-            ConstString(g_register_infos[i].alt_name).GetCString();
-    }
-  }
-  count = k_num_register_infos;
-  return g_register_infos;
-}
-
-bool ABIWindows_x86_64::GetPointerReturnRegister(const char *&name) {
-  name = "rax";
-  return true;
-}
-
-size_t ABIWindows_x86_64::GetRedZoneSize() const { return 0; }
-
-//------------------------------------------------------------------
-// Static Functions
-//------------------------------------------------------------------
-
-ABISP
-ABIWindows_x86_64::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
-  if (arch.GetTriple().getArch() == llvm::Triple::x86_64 &&
-      arch.GetTriple().isOSWindows()) {
-    return ABISP(
-        new ABIWindows_x86_64(std::move(process_sp), MakeMCRegisterInfo(arch)));
-  }
-  return ABISP();
-}
-
-bool ABIWindows_x86_64::PrepareTrivialCall(Thread &thread, addr_t sp,
-                                           addr_t func_addr, addr_t return_addr,
-                                           llvm::ArrayRef<addr_t> args) const {
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
-
-  if (log) {
-    StreamString s;
-    s.Printf("ABIWindows_x86_64::PrepareTrivialCall (tid = 0x%" PRIx64
-             ", sp = 0x%" PRIx64 ", func_addr = 0x%" PRIx64
-             ", return_addr = 0x%" PRIx64,
-             thread.GetID(), (uint64_t)sp, (uint64_t)func_addr,
-             (uint64_t)return_addr);
-
-    for (size_t i = 0; i < args.size(); ++i)
-      s.Printf(", arg%" PRIu64 " = 0x%" PRIx64, static_cast<uint64_t>(i + 1),
-               args[i]);
-    s.PutCString(")");
-    log->PutString(s.GetString());
-  }
-
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-  if (!reg_ctx)
-    return false;
-
-  const RegisterInfo *reg_info = nullptr;
-
-  if (args.size() > 4) // Windows x64 only put first 4 arguments into registers
-    return false;
-
-  for (size_t i = 0; i < args.size(); ++i) {
-    reg_info = reg_ctx->GetRegisterInfo(eRegisterKindGeneric,
-                                        LLDB_REGNUM_GENERIC_ARG1 + i);
-    LLDB_LOGF(log, "About to write arg%" PRIu64 " (0x%" PRIx64 ") into %s",
-              static_cast<uint64_t>(i + 1), args[i], reg_info->name);
-    if (!reg_ctx->WriteRegisterFromUnsigned(reg_info, args[i]))
-      return false;
-  }
-
-  // First, align the SP
-
-  LLDB_LOGF(log, "16-byte aligning SP: 0x%" PRIx64 " to 0x%" PRIx64,
-            (uint64_t)sp, (uint64_t)(sp & ~0xfull));
-
-  sp &= ~(0xfull); // 16-byte alignment
-
-  sp -= 8; // return address
-
-  Status error;
-  const RegisterInfo *pc_reg_info =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC);
-  const RegisterInfo *sp_reg_info =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_SP);
-  ProcessSP process_sp(thread.GetProcess());
-
-  RegisterValue reg_value;
-  LLDB_LOGF(log,
-            "Pushing the return address onto the stack: 0x%" PRIx64
-            ": 0x%" PRIx64,
-            (uint64_t)sp, (uint64_t)return_addr);
-
-  // Save return address onto the stack
-  if (!process_sp->WritePointerToMemory(sp, return_addr, error))
-    return false;
-
-  // %rsp is set to the actual stack value.
-
-  LLDB_LOGF(log, "Writing SP: 0x%" PRIx64, (uint64_t)sp);
-
-  if (!reg_ctx->WriteRegisterFromUnsigned(sp_reg_info, sp))
-    return false;
-
-  // %rip is set to the address of the called function.
-
-  LLDB_LOGF(log, "Writing IP: 0x%" PRIx64, (uint64_t)func_addr);
-
-  if (!reg_ctx->WriteRegisterFromUnsigned(pc_reg_info, func_addr))
-    return false;
-
-  return true;
-}
-
-static bool ReadIntegerArgument(Scalar &scalar, unsigned int bit_width,
-                                bool is_signed, Thread &thread,
-                                uint32_t *argument_register_ids,
-                                unsigned int &current_argument_register,
-                                addr_t &current_stack_argument) {
-  if (bit_width > 64)
-    return false; // Scalar can't hold large integer arguments
-
-  if (current_argument_register < 4) { // Windows pass first 4 arguments to register
-    scalar = thread.GetRegisterContext()->ReadRegisterAsUnsigned(
-        argument_register_ids[current_argument_register], 0);
-    current_argument_register++;
-    if (is_signed)
-      scalar.SignExtend(bit_width);
-       return true;
-  }
-  uint32_t byte_size = (bit_width + (CHAR_BIT - 1)) / CHAR_BIT;
-  Status error;
-  if (thread.GetProcess()->ReadScalarIntegerFromMemory(
-          current_stack_argument, byte_size, is_signed, scalar, error)) {
-    current_stack_argument += byte_size;
-    return true;
-  }
-  return false;
-}
-
-bool ABIWindows_x86_64::GetArgumentValues(Thread &thread,
-                                       ValueList &values) const {
-  unsigned int num_values = values.GetSize();
-  unsigned int value_index;
-
-  // Extract the register context so we can read arguments from registers
-
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-
-  if (!reg_ctx)
-    return false;
-
-  // Get the pointer to the first stack argument so we have a place to start
-  // when reading data
-
-  addr_t sp = reg_ctx->GetSP(0);
-
-  if (!sp)
-    return false;
-
-  addr_t current_stack_argument = sp + 8; // jump over return address
-
-  uint32_t argument_register_ids[4];
-
-  argument_register_ids[0] =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1)
-          ->kinds[eRegisterKindLLDB];
-  argument_register_ids[1] =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG2)
-          ->kinds[eRegisterKindLLDB];
-  argument_register_ids[2] =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG3)
-          ->kinds[eRegisterKindLLDB];
-  argument_register_ids[3] =
-      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG4)
-          ->kinds[eRegisterKindLLDB];
-
-  unsigned int current_argument_register = 0;
-
-  for (value_index = 0; value_index < num_values; ++value_index) {
-    Value *value = values.GetValueAtIndex(value_index);
-
-    if (!value)
-      return false;
-
-    CompilerType compiler_type = value->GetCompilerType();
-    llvm::Optional<uint64_t> bit_size = compiler_type.GetBitSize(&thread);
-    if (!bit_size)
-      return false;
-    bool is_signed;
-
-    if (compiler_type.IsIntegerOrEnumerationType(is_signed)) {
-      ReadIntegerArgument(value->GetScalar(), *bit_size, is_signed, thread,
-                          argument_register_ids, current_argument_register,
-                          current_stack_argument);
-    } else if (compiler_type.IsPointerType()) {
-      ReadIntegerArgument(value->GetScalar(), *bit_size, false, thread,
-                          argument_register_ids, current_argument_register,
-                          current_stack_argument);
-    }
-  }
-
-  return true;
-}
-
-Status ABIWindows_x86_64::SetReturnValueObject(lldb::StackFrameSP &frame_sp,
-                                            lldb::ValueObjectSP &new_value_sp) {
-  Status error;
-  if (!new_value_sp) {
-    error.SetErrorString("Empty value object for return value.");
-    return error;
-  }
-
-  CompilerType compiler_type = new_value_sp->GetCompilerType();
-  if (!compiler_type) {
-    error.SetErrorString("Null clang type for return value.");
-    return error;
-  }
-
-  Thread *thread = frame_sp->GetThread().get();
-
-  bool is_signed;
-  uint32_t count;
-  bool is_complex;
-
-  RegisterContext *reg_ctx = thread->GetRegisterContext().get();
-
-  bool set_it_simple = false;
-  if (compiler_type.IsIntegerOrEnumerationType(is_signed) ||
-      compiler_type.IsPointerType()) {
-    const RegisterInfo *reg_info = reg_ctx->GetRegisterInfoByName("rax", 0);
-
-    DataExtractor data;
-    Status data_error;
-    size_t num_bytes = new_value_sp->GetData(data, data_error);
-    if (data_error.Fail()) {
-      error.SetErrorStringWithFormat(
-          "Couldn't convert return value to raw data: %s",
-          data_error.AsCString());
-      return error;
-    }
-    lldb::offset_t offset = 0;
-    if (num_bytes <= 8) {
-      uint64_t raw_value = data.GetMaxU64(&offset, num_bytes);
-
-      if (reg_ctx->WriteRegisterFromUnsigned(reg_info, raw_value))
-        set_it_simple = true;
-    } else {
-      error.SetErrorString("We don't support returning longer than 64 bit "
-                           "integer values at present.");
-    }
-  } else if (compiler_type.IsFloatingPointType(count, is_complex)) {
-    if (is_complex)
-      error.SetErrorString(
-          "We don't support returning complex values at present");
-    else {
-      llvm::Optional<uint64_t> bit_width =
-          compiler_type.GetBitSize(frame_sp.get());
-      if (!bit_width) {
-        error.SetErrorString("can't get type size");
-        return error;
-      }
-      if (*bit_width <= 64) {
-        const RegisterInfo *xmm0_info =
-            reg_ctx->GetRegisterInfoByName("xmm0", 0);
-        RegisterValue xmm0_value;
-        DataExtractor data;
-        Status data_error;
-        size_t num_bytes = new_value_sp->GetData(data, data_error);
-        if (data_error.Fail()) {
-          error.SetErrorStringWithFormat(
-              "Couldn't convert return value to raw data: %s",
-              data_error.AsCString());
-          return error;
-        }
-
-        unsigned char buffer[16];
-        ByteOrder byte_order = data.GetByteOrder();
-
-        data.CopyByteOrderedData(0, num_bytes, buffer, 16, byte_order);
-        xmm0_value.SetBytes(buffer, 16, byte_order);
-        reg_ctx->WriteRegister(xmm0_info, xmm0_value);
-        set_it_simple = true;
-      } else {
-        // Windows doesn't support 80 bit FP
-        error.SetErrorString(
-            "Windows-x86_64 doesn't allow FP larger than 64 bits.");
-      }
-    }
-  }
-
-  if (!set_it_simple) {
-    // Okay we've got a structure or something that doesn't fit in a simple
-    // register.
-    // TODO(wanyi): On Windows, if the return type is a struct:
-    // 1) smaller that 64 bits and return by value -> RAX
-    // 2) bigger than 64 bits, the caller will allocate memory for that struct
-    // and pass the struct pointer in RCX then return the pointer in RAX
-    error.SetErrorString("We only support setting simple integer and float "
-                         "return types at present.");
-  }
-
-  return error;
-}
-
-ValueObjectSP ABIWindows_x86_64::GetReturnValueObjectSimple(
-    Thread &thread, CompilerType &return_compiler_type) const {
-  ValueObjectSP return_valobj_sp;
-  Value value;
-
-  if (!return_compiler_type)
-    return return_valobj_sp;
-
-  value.SetCompilerType(return_compiler_type);
-
-  RegisterContext *reg_ctx = thread.GetRegisterContext().get();
-  if (!reg_ctx)
-    return return_valobj_sp;
-
-  const uint32_t type_flags = return_compiler_type.GetTypeInfo();
-  if (type_flags & eTypeIsScalar) {
-    value.SetValueType(Value::eValueTypeScalar);
-
-    bool success = false;
-    if (type_flags & eTypeIsInteger) {
-      // Extract the register context so we can read arguments from registers
-      llvm::Optional<uint64_t> byte_size =
-          return_compiler_type.GetByteSize(nullptr);
-      if (!byte_size)
-        return return_valobj_sp;
-      uint64_t raw_value = thread.GetRegisterContext()->ReadRegisterAsUnsigned(
-          reg_ctx->GetRegisterInfoByName("rax", 0), 0);
-      const bool is_signed = (type_flags & eTypeIsSigned) != 0;
-      switch (*byte_size) {
-      default:
-        break;
-
-      case sizeof(uint64_t):
-        if (is_signed)
-          value.GetScalar() = (int64_t)(raw_value);
-        else
-          value.GetScalar() = (uint64_t)(raw_value);
-        success = true;
-        break;
-
-      case sizeof(uint32_t):
-        if (is_signed)
-          value.GetScalar() = (int32_t)(raw_value & UINT32_MAX);
-        else
-          value.GetScalar() = (uint32_t)(raw_value & UINT32_MAX);
-        success = true;
-        break;
-
-      case sizeof(uint16_t):
-        if (is_signed)
-          value.GetScalar() = (int16_t)(raw_value & UINT16_MAX);
-        else
-          value.GetScalar() = (uint16_t)(raw_value & UINT16_MAX);
-        success = true;
-        break;
-
-      case sizeof(uint8_t):
-        if (is_signed)
-          value.GetScalar() = (int8_t)(raw_value & UINT8_MAX);
-        else
-          value.GetScalar() = (uint8_t)(raw_value & UINT8_MAX);
-        success = true;
-        break;
-      }
-    } else if (type_flags & eTypeIsFloat) {
-      if (type_flags & eTypeIsComplex) {
-        // Don't handle complex yet.
-      } else {
-        llvm::Optional<uint64_t> byte_size =
-            return_compiler_type.GetByteSize(nullptr);
-        if (byte_size && *byte_size <= sizeof(long double)) {
-          const RegisterInfo *xmm0_info =
-              reg_ctx->GetRegisterInfoByName("xmm0", 0);
-          RegisterValue xmm0_value;
-          if (reg_ctx->ReadRegister(xmm0_info, xmm0_value)) {
-            DataExtractor data;
-            if (xmm0_value.GetData(data)) {
-              lldb::offset_t offset = 0;
-              if (*byte_size == sizeof(float)) {
-                value.GetScalar() = (float)data.GetFloat(&offset);
-                success = true;
-              } else if (*byte_size == sizeof(double)) {
-                // double and long double are the same on windows
-                value.GetScalar() = (double)data.GetDouble(&offset);
-                success = true;
-              }
-            }
-          }
-        }
-      }
-    }
-
-    if (success)
-      return_valobj_sp = ValueObjectConstResult::Create(
-          thread.GetStackFrameAtIndex(0).get(), value, ConstString(""));
-  } else if ((type_flags & eTypeIsPointer) ||
-             (type_flags & eTypeInstanceIsPointer)) {
-    unsigned rax_id =
-        reg_ctx->GetRegisterInfoByName("rax", 0)->kinds[eRegisterKindLLDB];
-    value.GetScalar() =
-        (uint64_t)thread.GetRegisterContext()->ReadRegisterAsUnsigned(rax_id,
-                                                                      0);
-    value.SetValueType(Value::eValueTypeScalar);
-    return_valobj_sp = ValueObjectConstResult::Create(
-        thread.GetStackFrameAtIndex(0).get(), value, ConstString(""));
-  } else if (type_flags & eTypeIsVector) {
-    llvm::Optional<uint64_t> byte_size =
-        return_compiler_type.GetByteSize(nullptr);
-    if (byte_size && *byte_size > 0) {
-      const RegisterInfo *xmm_reg =
-          reg_ctx->GetRegisterInfoByName("xmm0", 0);
-      if (xmm_reg == nullptr)
-        xmm_reg = reg_ctx->GetRegisterInfoByName("mm0", 0);
-
-      if (xmm_reg) {
-        if (*byte_size <= xmm_reg->byte_size) {
-          ProcessSP process_sp(thread.GetProcess());
-          if (process_sp) {
-            std::unique_ptr<DataBufferHeap> heap_data_up(
-                new DataBufferHeap(*byte_size, 0));
-            const ByteOrder byte_order = process_sp->GetByteOrder();
-            RegisterValue reg_value;
-            if (reg_ctx->ReadRegister(xmm_reg, reg_value)) {
-              Status error;
-              if (reg_value.GetAsMemoryData(
-                      xmm_reg, heap_data_up->GetBytes(),
-                      heap_data_up->GetByteSize(), byte_order, error)) {
-                DataExtractor data(DataBufferSP(heap_data_up.release()),
-                                   byte_order,
-                                   process_sp->GetTarget()
-                                       .GetArchitecture()
-                                       .GetAddressByteSize());
-                return_valobj_sp = ValueObjectConstResult::Create(
-                    &thread, return_compiler_type, ConstString(""), data);
-              }
-            }
-          }
-        }
-      }
-    }
-  }
-
-  return return_valobj_sp;
-}
-
-// The compiler will flatten the nested aggregate type into single
-// layer and push the value to stack
-// This helper function will flatten an aggregate type
-// and return true if it can be returned in register(s) by value
-// return false if the aggregate is in memory
-static bool FlattenAggregateType(
-    Thread &thread, ExecutionContext &exe_ctx,
-    CompilerType &return_compiler_type,
-    uint32_t data_byte_offset,
-    std::vector<uint32_t> &aggregate_field_offsets,
-    std::vector<CompilerType> &aggregate_compiler_types) {
-
-  const uint32_t num_children = return_compiler_type.GetNumFields();
-  for (uint32_t idx = 0; idx < num_children; ++idx) {
-    std::string name;
-    bool is_signed;
-    uint32_t count;
-    bool is_complex;
-
-    uint64_t field_bit_offset = 0;
-    CompilerType field_compiler_type = return_compiler_type.GetFieldAtIndex(
-        idx, name, &field_bit_offset, nullptr, nullptr);
-    llvm::Optional<uint64_t> field_bit_width =
-          field_compiler_type.GetBitSize(&thread);
-
-    // if we don't know the size of the field (e.g. invalid type), exit
-    if (!field_bit_width || *field_bit_width == 0) {
-      return false;
-    }
-    // If there are any unaligned fields, this is stored in memory.
-    if (field_bit_offset % *field_bit_width != 0) {
-      return false;
-    }
-
-    // add overall offset
-    uint32_t field_byte_offset = field_bit_offset / 8 + data_byte_offset;
-
-    const uint32_t field_type_flags = field_compiler_type.GetTypeInfo();
-    if (field_compiler_type.IsIntegerOrEnumerationType(is_signed) ||
-        field_compiler_type.IsPointerType() ||
-        field_compiler_type.IsFloatingPointType(count, is_complex)) {
-      aggregate_field_offsets.push_back(field_byte_offset);
-      aggregate_compiler_types.push_back(field_compiler_type);
-    } else if (field_type_flags & eTypeHasChildren) {
-      if (!FlattenAggregateType(thread, exe_ctx, field_compiler_type,
-                                field_byte_offset, aggregate_field_offsets,
-                                aggregate_compiler_types)) {
-        return false;
-      }
-    }
-  }
-  return true;
-}
-
-ValueObjectSP ABIWindows_x86_64::GetReturnValueObjectImpl(
-    Thread &thread, CompilerType &return_compiler_type) const {
-  ValueObjectSP return_valobj_sp;
-
-  if (!return_compiler_type) {
-    return return_valobj_sp;
-  }
-
-  // try extract value as if it's a simple type
-  return_valobj_sp = GetReturnValueObjectSimple(thread, return_compiler_type);
-  if (return_valobj_sp) {
-    return return_valobj_sp;
-  }
-
-  RegisterContextSP reg_ctx_sp = thread.GetRegisterContext();
-  if (!reg_ctx_sp) {
-    return return_valobj_sp;
-  }
-
-  llvm::Optional<uint64_t> bit_width = return_compiler_type.GetBitSize(&thread);
-  if (!bit_width) {
-    return return_valobj_sp;
-  }
-
-  // if it's not simple or aggregate type, then we don't know how to handle it
-  if (!return_compiler_type.IsAggregateType()) {
-    return return_valobj_sp;
-  }
-
-  ExecutionContext exe_ctx(thread.shared_from_this());
-  Target *target = exe_ctx.GetTargetPtr();
-  uint32_t max_register_value_bit_width = 64;
-
-  // The scenario here is to have a struct/class which is POD
-  // if the return struct/class size is larger than 64 bits,
-  // the caller will allocate memory for it and pass the return addr in RCX
-  // then return the address in RAX
-
-  // if the struct is returned by value in register (RAX)
-  // its size has to be: 1, 2, 4, 8, 16, 32, or 64 bits (aligned)
-  // for floating point, the return value will be copied over to RAX
-  bool is_memory = *bit_width > max_register_value_bit_width ||
-                   *bit_width & (*bit_width - 1);
-  std::vector<uint32_t> aggregate_field_offsets;
-  std::vector<CompilerType> aggregate_compiler_types;
-  if (!is_memory &&
-      FlattenAggregateType(thread, exe_ctx, return_compiler_type,
-                           0, aggregate_field_offsets,
-                           aggregate_compiler_types)) {
-    ByteOrder byte_order = target->GetArchitecture().GetByteOrder();
-    DataBufferSP data_sp(
-        new DataBufferHeap(max_register_value_bit_width / 8, 0));
-    DataExtractor return_ext(data_sp, byte_order,
-        target->GetArchitecture().GetAddressByteSize());
-
-    // The only register used to return struct/class by value
-    const RegisterInfo *rax_info =
-        reg_ctx_sp->GetRegisterInfoByName("rax", 0);
-    RegisterValue rax_value;
-    reg_ctx_sp->ReadRegister(rax_info, rax_value);
-    DataExtractor rax_data;
-    rax_value.GetData(rax_data);
-
-    uint32_t used_bytes =
-        0; // Tracks how much of the rax registers we've consumed so far
-
-    // in case of the returned type is a subclass of non-abstract-base class
-    // it will have a padding to skip the base content
-    if (aggregate_field_offsets.size())
-      used_bytes = aggregate_field_offsets[0];
-
-    const uint32_t num_children = aggregate_compiler_types.size();
-    for (uint32_t idx = 0; idx < num_children; idx++) {
-      bool is_signed;
-      bool is_complex;
-      uint32_t count;
-
-      CompilerType field_compiler_type = aggregate_compiler_types[idx];
-      uint32_t field_byte_width = (uint32_t) (*field_compiler_type.GetByteSize(&thread));
-      uint32_t field_byte_offset = aggregate_field_offsets[idx];
-
-      // this is unlikely w/o the overall size being greater than 8 bytes
-      // For now, return a nullptr return value object.
-      if (used_bytes >= 8 || used_bytes + field_byte_width > 8) {
-        return return_valobj_sp;
-      }
-
-      DataExtractor *copy_from_extractor = nullptr;
-      uint32_t copy_from_offset = 0;
-      if (field_compiler_type.IsIntegerOrEnumerationType(is_signed) ||
-          field_compiler_type.IsPointerType() ||
-          field_compiler_type.IsFloatingPointType(count, is_complex)) {
-        copy_from_extractor = &rax_data;
-        copy_from_offset = used_bytes;
-        used_bytes += field_byte_width;
-      }
-      // These two tests are just sanity checks.  If I somehow get the type
-      // calculation wrong above it is better to just return nothing than to
-      // assert or crash.
-      if (!copy_from_extractor) {
-        return return_valobj_sp;
-      }
-      if (copy_from_offset + field_byte_width >
-          copy_from_extractor->GetByteSize()) {
-        return return_valobj_sp;
-      }
-      copy_from_extractor->CopyByteOrderedData(copy_from_offset,
-          field_byte_width, data_sp->GetBytes() + field_byte_offset,
-          field_byte_width, byte_order);
-    }
-    if (!is_memory) {
-      // The result is in our data buffer.  Let's make a variable object out
-      // of it:
-      return_valobj_sp = ValueObjectConstResult::Create(
-          &thread, return_compiler_type, ConstString(""), return_ext);
-    }
-  }
-
-  // The Windows x86_64 ABI specifies that the return address for MEMORY
-  // objects be placed in rax on exit from the function.
-
-  // FIXME: This is just taking a guess, rax may very well no longer hold the
-  // return storage location.
-  // If we are going to do this right, when we make a new frame we should
-  // check to see if it uses a memory return, and if we are at the first
-  // instruction and if so stash away the return location.  Then we would
-  // only return the memory return value if we know it is valid.
-  if (is_memory) {
-    unsigned rax_id =
-        reg_ctx_sp->GetRegisterInfoByName("rax", 0)->kinds[eRegisterKindLLDB];
-    lldb::addr_t storage_addr =
-        (uint64_t)thread.GetRegisterContext()->ReadRegisterAsUnsigned(rax_id,
-                                                                      0);
-    return_valobj_sp = ValueObjectMemory::Create(
-        &thread, "", Address(storage_addr, nullptr), return_compiler_type);
-  }
-  return return_valobj_sp;
-}
-
-// This defines the CFA as rsp+8
-// the saved pc is at CFA-8 (i.e. rsp+0)
-// The saved rsp is CFA+0
-
-bool ABIWindows_x86_64::CreateFunctionEntryUnwindPlan(UnwindPlan &unwind_plan) {
-  unwind_plan.Clear();
-  unwind_plan.SetRegisterKind(eRegisterKindDWARF);
-
-  uint32_t sp_reg_num = dwarf_rsp;
-  uint32_t pc_reg_num = dwarf_rip;
-
-  UnwindPlan::RowSP row(new UnwindPlan::Row);
-  row->GetCFAValue().SetIsRegisterPlusOffset(sp_reg_num, 8);
-  row->SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, -8, false);
-  row->SetRegisterLocationToIsCFAPlusOffset(sp_reg_num, 0, true);
-  unwind_plan.AppendRow(row);
-  unwind_plan.SetSourceName("x86_64 at-func-entry default");
-  unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
-  return true;
-}
-
-// Windows-x86_64 doesn't use %rbp
-// No available Unwind information for Windows-x86_64 (section .pdata)
-// Let's use SysV-x86_64 one for now
-bool ABIWindows_x86_64::CreateDefaultUnwindPlan(UnwindPlan &unwind_plan) {
-  unwind_plan.Clear();
-  unwind_plan.SetRegisterKind(eRegisterKindDWARF);
-
-  uint32_t fp_reg_num = dwarf_rbp;
-  uint32_t sp_reg_num = dwarf_rsp;
-  uint32_t pc_reg_num = dwarf_rip;
-
-  UnwindPlan::RowSP row(new UnwindPlan::Row);
-
-  const int32_t ptr_size = 8;
-  row->GetCFAValue().SetIsRegisterPlusOffset(dwarf_rbp, 2 * ptr_size);
-  row->SetOffset(0);
-
-  row->SetRegisterLocationToAtCFAPlusOffset(fp_reg_num, ptr_size * -2, true);
-  row->SetRegisterLocationToAtCFAPlusOffset(pc_reg_num, ptr_size * -1, true);
-  row->SetRegisterLocationToIsCFAPlusOffset(sp_reg_num, 0, true);
-
-  unwind_plan.AppendRow(row);
-  unwind_plan.SetSourceName("x86_64 default unwind plan");
-  unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
-  unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
-
-  return true;
-}
-
-bool ABIWindows_x86_64::RegisterIsVolatile(const RegisterInfo *reg_info) {
-  return !RegisterIsCalleeSaved(reg_info);
-}
-
-bool ABIWindows_x86_64::RegisterIsCalleeSaved(const RegisterInfo *reg_info) {
-  if (!reg_info)
-    return false;
-  assert(reg_info->name != nullptr && "unnamed register?");
-  std::string Name = std::string(reg_info->name);
-  bool IsCalleeSaved =
-      llvm::StringSwitch<bool>(Name)
-          .Cases("rbx", "ebx", "rbp", "ebp", "rdi", "edi", "rsi", "esi", true)
-          .Cases("rsp", "esp", "r12", "r13", "r14", "r15", "sp", "fp", true)
-          .Cases("xmm6", "xmm7", "xmm8", "xmm9", "xmm10", "xmm11", "xmm12",
-                 "xmm13", "xmm14", "xmm15", true)
-          .Default(false);
-  return IsCalleeSaved;
-}
-
-void ABIWindows_x86_64::Initialize() {
-  PluginManager::RegisterPlugin(
-      GetPluginNameStatic(), "Windows ABI for x86_64 targets", CreateInstance);
-}
-
-void ABIWindows_x86_64::Terminate() {
-  PluginManager::UnregisterPlugin(CreateInstance);
-}
-
-lldb_private::ConstString ABIWindows_x86_64::GetPluginNameStatic() {
-  static ConstString g_name("windows-x86_64");
-  return g_name;
-}
-
-//------------------------------------------------------------------
-// PluginInterface protocol
-//------------------------------------------------------------------
-
-lldb_private::ConstString ABIWindows_x86_64::GetPluginName() {
-  return GetPluginNameStatic();
-}
-
-uint32_t ABIWindows_x86_64::GetPluginVersion() { return 1; }
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/Windows-x86_64/ABIWindows_x86_64.h b/gnu/llvm/lldb/source/Plugins/ABI/Windows-x86_64/ABIWindows_x86_64.h
deleted file mode 100644 (file)
index 2366566..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-//===-- ABIWindows_x86_64.h ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_ABIWindows_x86_64_h_
-#define liblldb_ABIWindows_x86_64_h_
-
-#include "lldb/Target/ABI.h"
-#include "lldb/lldb-private.h"
-
-class ABIWindows_x86_64 : public lldb_private::ABI {
-public:
-  ~ABIWindows_x86_64() override = default;
-
-  size_t GetRedZoneSize() const override;
-
-  bool PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp,
-                          lldb::addr_t functionAddress,
-                          lldb::addr_t returnAddress,
-                          llvm::ArrayRef<lldb::addr_t> args) const override;
-
-  bool GetArgumentValues(lldb_private::Thread &thread,
-                         lldb_private::ValueList &values) const override;
-
-  lldb_private::Status
-  SetReturnValueObject(lldb::StackFrameSP &frame_sp,
-                       lldb::ValueObjectSP &new_value) override;
-
-  lldb::ValueObjectSP
-  GetReturnValueObjectImpl(lldb_private::Thread &thread,
-                           lldb_private::CompilerType &type) const override;
-
-  bool
-  CreateFunctionEntryUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
-  bool CreateDefaultUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
-
-  bool RegisterIsVolatile(const lldb_private::RegisterInfo *reg_info) override;
-
-  // In Windows_x86_64 ABI, stack will always be maintained 16-byte aligned
-  bool CallFrameAddressIsValid(lldb::addr_t cfa) override {
-         if (cfa & (16ull - 1ull))
-      return false; // Not 16 byte aligned
-    if (cfa == 0)
-      return false; // Zero is not a valid stack address
-    return true;
-  }
-
-  bool CodeAddressIsValid(lldb::addr_t pc) override {
-    // We have a 64 bit address space, so anything is valid as opcodes
-    // aren't fixed width...
-    return true;
-  }
-
-  const lldb_private::RegisterInfo *
-  GetRegisterInfoArray(uint32_t &count) override;
-
-  bool GetPointerReturnRegister(const char *&name) override;
-
-  //------------------------------------------------------------------
-  // Static Functions
-  //------------------------------------------------------------------
-
-  static void Initialize();
-
-  static void Terminate();
-
-  static lldb::ABISP CreateInstance(lldb::ProcessSP process_sp, const lldb_private::ArchSpec &arch);
-
-  static lldb_private::ConstString GetPluginNameStatic();
-
-  //------------------------------------------------------------------
-  // PluginInterface protocol
-  //------------------------------------------------------------------
-
-  lldb_private::ConstString GetPluginName() override;
-
-  uint32_t GetPluginVersion() override;
-
-protected:
-  void CreateRegisterMapIfNeeded();
-
-  lldb::ValueObjectSP
-  GetReturnValueObjectSimple(lldb_private::Thread &thread,
-                             lldb_private::CompilerType &ast_type) const;
-
-  bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info);
-
-private:
-  ABIWindows_x86_64(lldb::ProcessSP process_sp,
-                    std::unique_ptr<llvm::MCRegisterInfo> info_up)
-      : lldb_private::ABI(std::move(process_sp), std::move(info_up)) {
-    // Call CreateInstance instead.
-  }
-};
-
-#endif // liblldb_ABISysV_x86_64_h_
diff --git a/gnu/llvm/lldb/source/Plugins/ABI/Windows-x86_64/CMakeLists.txt b/gnu/llvm/lldb/source/Plugins/ABI/Windows-x86_64/CMakeLists.txt
deleted file mode 100644 (file)
index dab8736..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-add_lldb_library(lldbPluginABIWindows_x86_64 PLUGIN
-  ABIWindows_x86_64.cpp
-
-  LINK_LIBS
-    lldbCore
-    lldbSymbol
-    lldbTarget
-  LINK_COMPONENTS
-    Support
-  )
diff --git a/gnu/llvm/lldb/source/Plugins/Disassembler/llvm/CMakeLists.txt b/gnu/llvm/lldb/source/Plugins/Disassembler/llvm/CMakeLists.txt
deleted file mode 100644 (file)
index a25a436..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-add_lldb_library(lldbPluginDisassemblerLLVM PLUGIN
-  DisassemblerLLVMC.cpp
-
-  LINK_LIBS
-    lldbCore
-    lldbSymbol
-    lldbTarget
-  LINK_COMPONENTS
-    ${LLVM_TARGETS_TO_BUILD}
-    MC
-    MCDisassembler
-    RuntimeDyld
-    Support
-  )
diff --git a/gnu/llvm/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp b/gnu/llvm/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
deleted file mode 100644 (file)
index dbdb352..0000000
+++ /dev/null
@@ -1,1436 +0,0 @@
-//===-- DisassemblerLLVMC.cpp -----------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "DisassemblerLLVMC.h"
-
-#include "llvm-c/Disassembler.h"
-#include "llvm/ADT/SmallString.h"
-#include "llvm/MC/MCAsmInfo.h"
-#include "llvm/MC/MCContext.h"
-#include "llvm/MC/MCDisassembler/MCDisassembler.h"
-#include "llvm/MC/MCDisassembler/MCExternalSymbolizer.h"
-#include "llvm/MC/MCDisassembler/MCRelocationInfo.h"
-#include "llvm/MC/MCInst.h"
-#include "llvm/MC/MCInstPrinter.h"
-#include "llvm/MC/MCInstrInfo.h"
-#include "llvm/MC/MCRegisterInfo.h"
-#include "llvm/MC/MCSubtargetInfo.h"
-#include "llvm/MC/MCTargetOptions.h"
-#include "llvm/Support/ErrorHandling.h"
-#include "llvm/Support/ScopedPrinter.h"
-#include "llvm/Support/TargetRegistry.h"
-#include "llvm/Support/TargetSelect.h"
-
-#include "lldb/Core/Address.h"
-#include "lldb/Core/Module.h"
-#include "lldb/Symbol/SymbolContext.h"
-#include "lldb/Target/ExecutionContext.h"
-#include "lldb/Target/Process.h"
-#include "lldb/Target/RegisterContext.h"
-#include "lldb/Target/SectionLoadList.h"
-#include "lldb/Target/StackFrame.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Utility/DataExtractor.h"
-#include "lldb/Utility/Log.h"
-#include "lldb/Utility/RegularExpression.h"
-#include "lldb/Utility/Stream.h"
-
-using namespace lldb;
-using namespace lldb_private;
-
-class DisassemblerLLVMC::MCDisasmInstance {
-public:
-  static std::unique_ptr<MCDisasmInstance>
-  Create(const char *triple, const char *cpu, const char *features_str,
-         unsigned flavor, DisassemblerLLVMC &owner);
-
-  ~MCDisasmInstance() = default;
-
-  uint64_t GetMCInst(const uint8_t *opcode_data, size_t opcode_data_len,
-                     lldb::addr_t pc, llvm::MCInst &mc_inst) const;
-  void PrintMCInst(llvm::MCInst &mc_inst, std::string &inst_string,
-                   std::string &comments_string);
-  void SetStyle(bool use_hex_immed, HexImmediateStyle hex_style);
-  bool CanBranch(llvm::MCInst &mc_inst) const;
-  bool HasDelaySlot(llvm::MCInst &mc_inst) const;
-  bool IsCall(llvm::MCInst &mc_inst) const;
-
-private:
-  MCDisasmInstance(std::unique_ptr<llvm::MCInstrInfo> &&instr_info_up,
-                   std::unique_ptr<llvm::MCRegisterInfo> &&reg_info_up,
-                   std::unique_ptr<llvm::MCSubtargetInfo> &&subtarget_info_up,
-                   std::unique_ptr<llvm::MCAsmInfo> &&asm_info_up,
-                   std::unique_ptr<llvm::MCContext> &&context_up,
-                   std::unique_ptr<llvm::MCDisassembler> &&disasm_up,
-                   std::unique_ptr<llvm::MCInstPrinter> &&instr_printer_up);
-
-  std::unique_ptr<llvm::MCInstrInfo> m_instr_info_up;
-  std::unique_ptr<llvm::MCRegisterInfo> m_reg_info_up;
-  std::unique_ptr<llvm::MCSubtargetInfo> m_subtarget_info_up;
-  std::unique_ptr<llvm::MCAsmInfo> m_asm_info_up;
-  std::unique_ptr<llvm::MCContext> m_context_up;
-  std::unique_ptr<llvm::MCDisassembler> m_disasm_up;
-  std::unique_ptr<llvm::MCInstPrinter> m_instr_printer_up;
-};
-
-class InstructionLLVMC : public lldb_private::Instruction {
-public:
-  InstructionLLVMC(DisassemblerLLVMC &disasm,
-                   const lldb_private::Address &address,
-                   AddressClass addr_class)
-      : Instruction(address, addr_class),
-        m_disasm_wp(std::static_pointer_cast<DisassemblerLLVMC>(
-            disasm.shared_from_this())),
-        m_does_branch(eLazyBoolCalculate), m_has_delay_slot(eLazyBoolCalculate),
-        m_is_call(eLazyBoolCalculate), m_is_valid(false),
-        m_using_file_addr(false) {}
-
-  ~InstructionLLVMC() override = default;
-
-  bool DoesBranch() override {
-    if (m_does_branch == eLazyBoolCalculate) {
-      DisassemblerScope disasm(*this);
-      if (disasm) {
-        DataExtractor data;
-        if (m_opcode.GetData(data)) {
-          bool is_alternate_isa;
-          lldb::addr_t pc = m_address.GetFileAddress();
-
-          DisassemblerLLVMC::MCDisasmInstance *mc_disasm_ptr =
-              GetDisasmToUse(is_alternate_isa, disasm);
-          const uint8_t *opcode_data = data.GetDataStart();
-          const size_t opcode_data_len = data.GetByteSize();
-          llvm::MCInst inst;
-          const size_t inst_size =
-              mc_disasm_ptr->GetMCInst(opcode_data, opcode_data_len, pc, inst);
-          // Be conservative, if we didn't understand the instruction, say it
-          // might branch...
-          if (inst_size == 0)
-            m_does_branch = eLazyBoolYes;
-          else {
-            const bool can_branch = mc_disasm_ptr->CanBranch(inst);
-            if (can_branch)
-              m_does_branch = eLazyBoolYes;
-            else
-              m_does_branch = eLazyBoolNo;
-          }
-        }
-      }
-    }
-    return m_does_branch == eLazyBoolYes;
-  }
-
-  bool HasDelaySlot() override {
-    if (m_has_delay_slot == eLazyBoolCalculate) {
-      DisassemblerScope disasm(*this);
-      if (disasm) {
-        DataExtractor data;
-        if (m_opcode.GetData(data)) {
-          bool is_alternate_isa;
-          lldb::addr_t pc = m_address.GetFileAddress();
-
-          DisassemblerLLVMC::MCDisasmInstance *mc_disasm_ptr =
-              GetDisasmToUse(is_alternate_isa, disasm);
-          const uint8_t *opcode_data = data.GetDataStart();
-          const size_t opcode_data_len = data.GetByteSize();
-          llvm::MCInst inst;
-          const size_t inst_size =
-              mc_disasm_ptr->GetMCInst(opcode_data, opcode_data_len, pc, inst);
-          // if we didn't understand the instruction, say it doesn't have a
-          // delay slot...
-          if (inst_size == 0)
-            m_has_delay_slot = eLazyBoolNo;
-          else {
-            const bool has_delay_slot = mc_disasm_ptr->HasDelaySlot(inst);
-            if (has_delay_slot)
-              m_has_delay_slot = eLazyBoolYes;
-            else
-              m_has_delay_slot = eLazyBoolNo;
-          }
-        }
-      }
-    }
-    return m_has_delay_slot == eLazyBoolYes;
-  }
-
-  DisassemblerLLVMC::MCDisasmInstance *GetDisasmToUse(bool &is_alternate_isa) {
-    DisassemblerScope disasm(*this);
-    return GetDisasmToUse(is_alternate_isa, disasm);
-  }
-
-  size_t Decode(const lldb_private::Disassembler &disassembler,
-                const lldb_private::DataExtractor &data,
-                lldb::offset_t data_offset) override {
-    // All we have to do is read the opcode which can be easy for some
-    // architectures
-    bool got_op = false;
-    DisassemblerScope disasm(*this);
-    if (disasm) {
-      const ArchSpec &arch = disasm->GetArchitecture();
-      const lldb::ByteOrder byte_order = data.GetByteOrder();
-
-      const uint32_t min_op_byte_size = arch.GetMinimumOpcodeByteSize();
-      const uint32_t max_op_byte_size = arch.GetMaximumOpcodeByteSize();
-      if (min_op_byte_size == max_op_byte_size) {
-        // Fixed size instructions, just read that amount of data.
-        if (!data.ValidOffsetForDataOfSize(data_offset, min_op_byte_size))
-          return false;
-
-        switch (min_op_byte_size) {
-        case 1:
-          m_opcode.SetOpcode8(data.GetU8(&data_offset), byte_order);
-          got_op = true;
-          break;
-
-        case 2:
-          m_opcode.SetOpcode16(data.GetU16(&data_offset), byte_order);
-          got_op = true;
-          break;
-
-        case 4:
-          m_opcode.SetOpcode32(data.GetU32(&data_offset), byte_order);
-          got_op = true;
-          break;
-
-        case 8:
-          m_opcode.SetOpcode64(data.GetU64(&data_offset), byte_order);
-          got_op = true;
-          break;
-
-        default:
-          m_opcode.SetOpcodeBytes(data.PeekData(data_offset, min_op_byte_size),
-                                  min_op_byte_size);
-          got_op = true;
-          break;
-        }
-      }
-      if (!got_op) {
-        bool is_alternate_isa = false;
-        DisassemblerLLVMC::MCDisasmInstance *mc_disasm_ptr =
-            GetDisasmToUse(is_alternate_isa, disasm);
-
-        const llvm::Triple::ArchType machine = arch.GetMachine();
-        if (machine == llvm::Triple::arm || machine == llvm::Triple::thumb) {
-          if (machine == llvm::Triple::thumb || is_alternate_isa) {
-            uint32_t thumb_opcode = data.GetU16(&data_offset);
-            if ((thumb_opcode & 0xe000) != 0xe000 ||
-                ((thumb_opcode & 0x1800u) == 0)) {
-              m_opcode.SetOpcode16(thumb_opcode, byte_order);
-              m_is_valid = true;
-            } else {
-              thumb_opcode <<= 16;
-              thumb_opcode |= data.GetU16(&data_offset);
-              m_opcode.SetOpcode16_2(thumb_opcode, byte_order);
-              m_is_valid = true;
-            }
-          } else {
-            m_opcode.SetOpcode32(data.GetU32(&data_offset), byte_order);
-            m_is_valid = true;
-          }
-        } else {
-          // The opcode isn't evenly sized, so we need to actually use the llvm
-          // disassembler to parse it and get the size.
-          uint8_t *opcode_data =
-              const_cast<uint8_t *>(data.PeekData(data_offset, 1));
-          const size_t opcode_data_len = data.BytesLeft(data_offset);
-          const addr_t pc = m_address.GetFileAddress();
-          llvm::MCInst inst;
-
-          const size_t inst_size =
-              mc_disasm_ptr->GetMCInst(opcode_data, opcode_data_len, pc, inst);
-          if (inst_size == 0)
-            m_opcode.Clear();
-          else {
-            m_opcode.SetOpcodeBytes(opcode_data, inst_size);
-            m_is_valid = true;
-          }
-        }
-      }
-      return m_opcode.GetByteSize();
-    }
-    return 0;
-  }
-
-  void AppendComment(std::string &description) {
-    if (m_comment.empty())
-      m_comment.swap(description);
-    else {
-      m_comment.append(", ");
-      m_comment.append(description);
-    }
-  }
-
-  void CalculateMnemonicOperandsAndComment(
-      const lldb_private::ExecutionContext *exe_ctx) override {
-    DataExtractor data;
-    const AddressClass address_class = GetAddressClass();
-
-    if (m_opcode.GetData(data)) {
-      std::string out_string;
-      std::string comment_string;
-
-      DisassemblerScope disasm(*this, exe_ctx);
-      if (disasm) {
-        DisassemblerLLVMC::MCDisasmInstance *mc_disasm_ptr;
-
-        if (address_class == AddressClass::eCodeAlternateISA)
-          mc_disasm_ptr = disasm->m_alternate_disasm_up.get();
-        else
-          mc_disasm_ptr = disasm->m_disasm_up.get();
-
-        lldb::addr_t pc = m_address.GetFileAddress();
-        m_using_file_addr = true;
-
-        const bool data_from_file = disasm->m_data_from_file;
-        bool use_hex_immediates = true;
-        Disassembler::HexImmediateStyle hex_style = Disassembler::eHexStyleC;
-
-        if (exe_ctx) {
-          Target *target = exe_ctx->GetTargetPtr();
-          if (target) {
-            use_hex_immediates = target->GetUseHexImmediates();
-            hex_style = target->GetHexImmediateStyle();
-
-            if (!data_from_file) {
-              const lldb::addr_t load_addr = m_address.GetLoadAddress(target);
-              if (load_addr != LLDB_INVALID_ADDRESS) {
-                pc = load_addr;
-                m_using_file_addr = false;
-              }
-            }
-          }
-        }
-
-        const uint8_t *opcode_data = data.GetDataStart();
-        const size_t opcode_data_len = data.GetByteSize();
-        llvm::MCInst inst;
-        size_t inst_size =
-            mc_disasm_ptr->GetMCInst(opcode_data, opcode_data_len, pc, inst);
-
-        if (inst_size > 0) {
-          mc_disasm_ptr->SetStyle(use_hex_immediates, hex_style);
-          mc_disasm_ptr->PrintMCInst(inst, out_string, comment_string);
-
-          if (!comment_string.empty()) {
-            AppendComment(comment_string);
-          }
-        }
-
-        if (inst_size == 0) {
-          m_comment.assign("unknown opcode");
-          inst_size = m_opcode.GetByteSize();
-          StreamString mnemonic_strm;
-          lldb::offset_t offset = 0;
-          lldb::ByteOrder byte_order = data.GetByteOrder();
-          switch (inst_size) {
-          case 1: {
-            const uint8_t uval8 = data.GetU8(&offset);
-            m_opcode.SetOpcode8(uval8, byte_order);
-            m_opcode_name.assign(".byte");
-            mnemonic_strm.Printf("0x%2.2x", uval8);
-          } break;
-          case 2: {
-            const uint16_t uval16 = data.GetU16(&offset);
-            m_opcode.SetOpcode16(uval16, byte_order);
-            m_opcode_name.assign(".short");
-            mnemonic_strm.Printf("0x%4.4x", uval16);
-          } break;
-          case 4: {
-            const uint32_t uval32 = data.GetU32(&offset);
-            m_opcode.SetOpcode32(uval32, byte_order);
-            m_opcode_name.assign(".long");
-            mnemonic_strm.Printf("0x%8.8x", uval32);
-          } break;
-          case 8: {
-            const uint64_t uval64 = data.GetU64(&offset);
-            m_opcode.SetOpcode64(uval64, byte_order);
-            m_opcode_name.assign(".quad");
-            mnemonic_strm.Printf("0x%16.16" PRIx64, uval64);
-          } break;
-          default:
-            if (inst_size == 0)
-              return;
-            else {
-              const uint8_t *bytes = data.PeekData(offset, inst_size);
-              if (bytes == nullptr)
-                return;
-              m_opcode_name.assign(".byte");
-              m_opcode.SetOpcodeBytes(bytes, inst_size);
-              mnemonic_strm.Printf("0x%2.2x", bytes[0]);
-              for (uint32_t i = 1; i < inst_size; ++i)
-                mnemonic_strm.Printf(" 0x%2.2x", bytes[i]);
-            }
-            break;
-          }
-          m_mnemonics = mnemonic_strm.GetString();
-          return;
-        } else {
-          if (m_does_branch == eLazyBoolCalculate) {
-            const bool can_branch = mc_disasm_ptr->CanBranch(inst);
-            if (can_branch)
-              m_does_branch = eLazyBoolYes;
-            else
-              m_does_branch = eLazyBoolNo;
-          }
-        }
-
-        static RegularExpression s_regex(
-            llvm::StringRef("[ \t]*([^ ^\t]+)[ \t]*([^ ^\t].*)?"));
-
-        llvm::SmallVector<llvm::StringRef, 4> matches;
-        if (s_regex.Execute(out_string, &matches)) {
-          m_opcode_name = matches[1].str();
-          m_mnemonics = matches[2].str();
-        }
-      }
-    }
-  }
-
-  bool IsValid() const { return m_is_valid; }
-
-  bool UsingFileAddress() const { return m_using_file_addr; }
-  size_t GetByteSize() const { return m_opcode.GetByteSize(); }
-
-  /// Grants exclusive access to the disassembler and initializes it with the
-  /// given InstructionLLVMC and an optional ExecutionContext.
-  class DisassemblerScope {
-    std::shared_ptr<DisassemblerLLVMC> m_disasm;
-
-  public:
-    explicit DisassemblerScope(
-        InstructionLLVMC &i,
-        const lldb_private::ExecutionContext *exe_ctx = nullptr)
-        : m_disasm(i.m_disasm_wp.lock()) {
-      m_disasm->m_mutex.lock();
-      m_disasm->m_inst = &i;
-      m_disasm->m_exe_ctx = exe_ctx;
-    }
-    ~DisassemblerScope() { m_disasm->m_mutex.unlock(); }
-
-    /// Evaluates to true if this scope contains a valid disassembler.
-    operator bool() const { return static_cast<bool>(m_disasm); }
-
-    std::shared_ptr<DisassemblerLLVMC> operator->() { return m_disasm; }
-  };
-
-  static llvm::StringRef::const_iterator
-  ConsumeWhitespace(llvm::StringRef::const_iterator osi,
-                    llvm::StringRef::const_iterator ose) {
-    while (osi != ose) {
-      switch (*osi) {
-      default:
-        return osi;
-      case ' ':
-      case '\t':
-        break;
-      }
-      ++osi;
-    }
-
-    return osi;
-  }
-
-  static std::pair<bool, llvm::StringRef::const_iterator>
-  ConsumeChar(llvm::StringRef::const_iterator osi, const char c,
-              llvm::StringRef::const_iterator ose) {
-    bool found = false;
-
-    osi = ConsumeWhitespace(osi, ose);
-    if (osi != ose && *osi == c) {
-      found = true;
-      ++osi;
-    }
-
-    return std::make_pair(found, osi);
-  }
-
-  static std::pair<Operand, llvm::StringRef::const_iterator>
-  ParseRegisterName(llvm::StringRef::const_iterator osi,
-                    llvm::StringRef::const_iterator ose) {
-    Operand ret;
-    ret.m_type = Operand::Type::Register;
-    std::string str;
-
-    osi = ConsumeWhitespace(osi, ose);
-
-    while (osi != ose) {
-      if (*osi >= '0' && *osi <= '9') {
-        if (str.empty()) {
-          return std::make_pair(Operand(), osi);
-        } else {
-          str.push_back(*osi);
-        }
-      } else if (*osi >= 'a' && *osi <= 'z') {
-        str.push_back(*osi);
-      } else {
-        switch (*osi) {
-        default:
-          if (str.empty()) {
-            return std::make_pair(Operand(), osi);
-          } else {
-            ret.m_register = ConstString(str);
-            return std::make_pair(ret, osi);
-          }
-        case '%':
-          if (!str.empty()) {
-            return std::make_pair(Operand(), osi);
-          }
-          break;
-        }
-      }
-      ++osi;
-    }
-
-    ret.m_register = ConstString(str);
-    return std::make_pair(ret, osi);
-  }
-
-  static std::pair<Operand, llvm::StringRef::const_iterator>
-  ParseImmediate(llvm::StringRef::const_iterator osi,
-                 llvm::StringRef::const_iterator ose) {
-    Operand ret;
-    ret.m_type = Operand::Type::Immediate;
-    std::string str;
-    bool is_hex = false;
-
-    osi = ConsumeWhitespace(osi, ose);
-
-    while (osi != ose) {
-      if (*osi >= '0' && *osi <= '9') {
-        str.push_back(*osi);
-      } else if (*osi >= 'a' && *osi <= 'f') {
-        if (is_hex) {
-          str.push_back(*osi);
-        } else {
-          return std::make_pair(Operand(), osi);
-        }
-      } else {
-        switch (*osi) {
-        default:
-          if (str.empty()) {
-            return std::make_pair(Operand(), osi);
-          } else {
-            ret.m_immediate = strtoull(str.c_str(), nullptr, 0);
-            return std::make_pair(ret, osi);
-          }
-        case 'x':
-          if (!str.compare("0")) {
-            is_hex = true;
-            str.push_back(*osi);
-          } else {
-            return std::make_pair(Operand(), osi);
-          }
-          break;
-        case '#':
-        case '$':
-          if (!str.empty()) {
-            return std::make_pair(Operand(), osi);
-          }
-          break;
-        case '-':
-          if (str.empty()) {
-            ret.m_negative = true;
-          } else {
-            return std::make_pair(Operand(), osi);
-          }
-        }
-      }
-      ++osi;
-    }
-
-    ret.m_immediate = strtoull(str.c_str(), nullptr, 0);
-    return std::make_pair(ret, osi);
-  }
-
-  // -0x5(%rax,%rax,2)
-  static std::pair<Operand, llvm::StringRef::const_iterator>
-  ParseIntelIndexedAccess(llvm::StringRef::const_iterator osi,
-                          llvm::StringRef::const_iterator ose) {
-    std::pair<Operand, llvm::StringRef::const_iterator> offset_and_iterator =
-        ParseImmediate(osi, ose);
-    if (offset_and_iterator.first.IsValid()) {
-      osi = offset_and_iterator.second;
-    }
-
-    bool found = false;
-    std::tie(found, osi) = ConsumeChar(osi, '(', ose);
-    if (!found) {
-      return std::make_pair(Operand(), osi);
-    }
-
-    std::pair<Operand, llvm::StringRef::const_iterator> base_and_iterator =
-        ParseRegisterName(osi, ose);
-    if (base_and_iterator.first.IsValid()) {
-      osi = base_and_iterator.second;
-    } else {
-      return std::make_pair(Operand(), osi);
-    }
-
-    std::tie(found, osi) = ConsumeChar(osi, ',', ose);
-    if (!found) {
-      return std::make_pair(Operand(), osi);
-    }
-
-    std::pair<Operand, llvm::StringRef::const_iterator> index_and_iterator =
-        ParseRegisterName(osi, ose);
-    if (index_and_iterator.first.IsValid()) {
-      osi = index_and_iterator.second;
-    } else {
-      return std::make_pair(Operand(), osi);
-    }
-
-    std::tie(found, osi) = ConsumeChar(osi, ',', ose);
-    if (!found) {
-      return std::make_pair(Operand(), osi);
-    }
-
-    std::pair<Operand, llvm::StringRef::const_iterator>
-        multiplier_and_iterator = ParseImmediate(osi, ose);
-    if (index_and_iterator.first.IsValid()) {
-      osi = index_and_iterator.second;
-    } else {
-      return std::make_pair(Operand(), osi);
-    }
-
-    std::tie(found, osi) = ConsumeChar(osi, ')', ose);
-    if (!found) {
-      return std::make_pair(Operand(), osi);
-    }
-
-    Operand product;
-    product.m_type = Operand::Type::Product;
-    product.m_children.push_back(index_and_iterator.first);
-    product.m_children.push_back(multiplier_and_iterator.first);
-
-    Operand index;
-    index.m_type = Operand::Type::Sum;
-    index.m_children.push_back(base_and_iterator.first);
-    index.m_children.push_back(product);
-
-    if (offset_and_iterator.first.IsValid()) {
-      Operand offset;
-      offset.m_type = Operand::Type::Sum;
-      offset.m_children.push_back(offset_and_iterator.first);
-      offset.m_children.push_back(index);
-
-      Operand deref;
-      deref.m_type = Operand::Type::Dereference;
-      deref.m_children.push_back(offset);
-      return std::make_pair(deref, osi);
-    } else {
-      Operand deref;
-      deref.m_type = Operand::Type::Dereference;
-      deref.m_children.push_back(index);
-      return std::make_pair(deref, osi);
-    }
-  }
-
-  // -0x10(%rbp)
-  static std::pair<Operand, llvm::StringRef::const_iterator>
-  ParseIntelDerefAccess(llvm::StringRef::const_iterator osi,
-                        llvm::StringRef::const_iterator ose) {
-    std::pair<Operand, llvm::StringRef::const_iterator> offset_and_iterator =
-        ParseImmediate(osi, ose);
-    if (offset_and_iterator.first.IsValid()) {
-      osi = offset_and_iterator.second;
-    }
-
-    bool found = false;
-    std::tie(found, osi) = ConsumeChar(osi, '(', ose);
-    if (!found) {
-      return std::make_pair(Operand(), osi);
-    }
-
-    std::pair<Operand, llvm::StringRef::const_iterator> base_and_iterator =
-        ParseRegisterName(osi, ose);
-    if (base_and_iterator.first.IsValid()) {
-      osi = base_and_iterator.second;
-    } else {
-      return std::make_pair(Operand(), osi);
-    }
-
-    std::tie(found, osi) = ConsumeChar(osi, ')', ose);
-    if (!found) {
-      return std::make_pair(Operand(), osi);
-    }
-
-    if (offset_and_iterator.first.IsValid()) {
-      Operand offset;
-      offset.m_type = Operand::Type::Sum;
-      offset.m_children.push_back(offset_and_iterator.first);
-      offset.m_children.push_back(base_and_iterator.first);
-
-      Operand deref;
-      deref.m_type = Operand::Type::Dereference;
-      deref.m_children.push_back(offset);
-      return std::make_pair(deref, osi);
-    } else {
-      Operand deref;
-      deref.m_type = Operand::Type::Dereference;
-      deref.m_children.push_back(base_and_iterator.first);
-      return std::make_pair(deref, osi);
-    }
-  }
-
-  // [sp, #8]!
-  static std::pair<Operand, llvm::StringRef::const_iterator>
-  ParseARMOffsetAccess(llvm::StringRef::const_iterator osi,
-                       llvm::StringRef::const_iterator ose) {
-    bool found = false;
-    std::tie(found, osi) = ConsumeChar(osi, '[', ose);
-    if (!found) {
-      return std::make_pair(Operand(), osi);
-    }
-
-    std::pair<Operand, llvm::StringRef::const_iterator> base_and_iterator =
-        ParseRegisterName(osi, ose);
-    if (base_and_iterator.first.IsValid()) {
-      osi = base_and_iterator.second;
-    } else {
-      return std::make_pair(Operand(), osi);
-    }
-
-    std::tie(found, osi) = ConsumeChar(osi, ',', ose);
-    if (!found) {
-      return std::make_pair(Operand(), osi);
-    }
-
-    std::pair<Operand, llvm::StringRef::const_iterator> offset_and_iterator =
-        ParseImmediate(osi, ose);
-    if (offset_and_iterator.first.IsValid()) {
-      osi = offset_and_iterator.second;
-    }
-
-    std::tie(found, osi) = ConsumeChar(osi, ']', ose);
-    if (!found) {
-      return std::make_pair(Operand(), osi);
-    }
-
-    Operand offset;
-    offset.m_type = Operand::Type::Sum;
-    offset.m_children.push_back(offset_and_iterator.first);
-    offset.m_children.push_back(base_and_iterator.first);
-
-    Operand deref;
-    deref.m_type = Operand::Type::Dereference;
-    deref.m_children.push_back(offset);
-    return std::make_pair(deref, osi);
-  }
-
-  // [sp]
-  static std::pair<Operand, llvm::StringRef::const_iterator>
-  ParseARMDerefAccess(llvm::StringRef::const_iterator osi,
-                      llvm::StringRef::const_iterator ose) {
-    bool found = false;
-    std::tie(found, osi) = ConsumeChar(osi, '[', ose);
-    if (!found) {
-      return std::make_pair(Operand(), osi);
-    }
-
-    std::pair<Operand, llvm::StringRef::const_iterator> base_and_iterator =
-        ParseRegisterName(osi, ose);
-    if (base_and_iterator.first.IsValid()) {
-      osi = base_and_iterator.second;
-    } else {
-      return std::make_pair(Operand(), osi);
-    }
-
-    std::tie(found, osi) = ConsumeChar(osi, ']', ose);
-    if (!found) {
-      return std::make_pair(Operand(), osi);
-    }
-
-    Operand deref;
-    deref.m_type = Operand::Type::Dereference;
-    deref.m_children.push_back(base_and_iterator.first);
-    return std::make_pair(deref, osi);
-  }
-
-  static void DumpOperand(const Operand &op, Stream &s) {
-    switch (op.m_type) {
-    case Operand::Type::Dereference:
-      s.PutCString("*");
-      DumpOperand(op.m_children[0], s);
-      break;
-    case Operand::Type::Immediate:
-      if (op.m_negative) {
-        s.PutCString("-");
-      }
-      s.PutCString(llvm::to_string(op.m_immediate));
-      break;
-    case Operand::Type::Invalid:
-      s.PutCString("Invalid");
-      break;
-    case Operand::Type::Product:
-      s.PutCString("(");
-      DumpOperand(op.m_children[0], s);
-      s.PutCString("*");
-      DumpOperand(op.m_children[1], s);
-      s.PutCString(")");
-      break;
-    case Operand::Type::Register:
-      s.PutCString(op.m_register.AsCString());
-      break;
-    case Operand::Type::Sum:
-      s.PutCString("(");
-      DumpOperand(op.m_children[0], s);
-      s.PutCString("+");
-      DumpOperand(op.m_children[1], s);
-      s.PutCString(")");
-      break;
-    }
-  }
-
-  bool ParseOperands(
-      llvm::SmallVectorImpl<Instruction::Operand> &operands) override {
-    const char *operands_string = GetOperands(nullptr);
-
-    if (!operands_string) {
-      return false;
-    }
-
-    llvm::StringRef operands_ref(operands_string);
-
-    llvm::StringRef::const_iterator osi = operands_ref.begin();
-    llvm::StringRef::const_iterator ose = operands_ref.end();
-
-    while (osi != ose) {
-      Operand operand;
-      llvm::StringRef::const_iterator iter;
-
-      if ((std::tie(operand, iter) = ParseIntelIndexedAccess(osi, ose),
-           operand.IsValid()) ||
-          (std::tie(operand, iter) = ParseIntelDerefAccess(osi, ose),
-           operand.IsValid()) ||
-          (std::tie(operand, iter) = ParseARMOffsetAccess(osi, ose),
-           operand.IsValid()) ||
-          (std::tie(operand, iter) = ParseARMDerefAccess(osi, ose),
-           operand.IsValid()) ||
-          (std::tie(operand, iter) = ParseRegisterName(osi, ose),
-           operand.IsValid()) ||
-          (std::tie(operand, iter) = ParseImmediate(osi, ose),
-           operand.IsValid())) {
-        osi = iter;
-        operands.push_back(operand);
-      } else {
-        return false;
-      }
-
-      std::pair<bool, llvm::StringRef::const_iterator> found_and_iter =
-          ConsumeChar(osi, ',', ose);
-      if (found_and_iter.first) {
-        osi = found_and_iter.second;
-      }
-
-      osi = ConsumeWhitespace(osi, ose);
-    }
-
-    DisassemblerSP disasm_sp = m_disasm_wp.lock();
-
-    if (disasm_sp && operands.size() > 1) {
-      // TODO tie this into the MC Disassembler's notion of clobbers.
-      switch (disasm_sp->GetArchitecture().GetMachine()) {
-      default:
-        break;
-      case llvm::Triple::x86:
-      case llvm::Triple::x86_64:
-        operands[operands.size() - 1].m_clobbered = true;
-        break;
-      case llvm::Triple::arm:
-        operands[0].m_clobbered = true;
-        break;
-      }
-    }
-
-    if (Log *log =
-            lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS)) {
-      StreamString ss;
-
-      ss.Printf("[%s] expands to %zu operands:\n", operands_string,
-                operands.size());
-      for (const Operand &operand : operands) {
-        ss.PutCString("  ");
-        DumpOperand(operand, ss);
-        ss.PutCString("\n");
-      }
-
-      log->PutString(ss.GetString());
-    }
-
-    return true;
-  }
-
-  bool IsCall() override {
-    if (m_is_call == eLazyBoolCalculate) {
-      DisassemblerScope disasm(*this);
-      if (disasm) {
-        DataExtractor data;
-        if (m_opcode.GetData(data)) {
-          bool is_alternate_isa;
-          lldb::addr_t pc = m_address.GetFileAddress();
-
-          DisassemblerLLVMC::MCDisasmInstance *mc_disasm_ptr =
-              GetDisasmToUse(is_alternate_isa, disasm);
-          const uint8_t *opcode_data = data.GetDataStart();
-          const size_t opcode_data_len = data.GetByteSize();
-          llvm::MCInst inst;
-          const size_t inst_size =
-              mc_disasm_ptr->GetMCInst(opcode_data, opcode_data_len, pc, inst);
-          if (inst_size == 0) {
-            m_is_call = eLazyBoolNo;
-          } else {
-            if (mc_disasm_ptr->IsCall(inst))
-              m_is_call = eLazyBoolYes;
-            else
-              m_is_call = eLazyBoolNo;
-          }
-        }
-      }
-    }
-    return m_is_call == eLazyBoolYes;
-  }
-
-protected:
-  std::weak_ptr<DisassemblerLLVMC> m_disasm_wp;
-  LazyBool m_does_branch;
-  LazyBool m_has_delay_slot;
-  LazyBool m_is_call;
-  bool m_is_valid;
-  bool m_using_file_addr;
-
-private:
-  DisassemblerLLVMC::MCDisasmInstance *
-  GetDisasmToUse(bool &is_alternate_isa, DisassemblerScope &disasm) {
-    is_alternate_isa = false;
-    if (disasm) {
-      if (disasm->m_alternate_disasm_up) {
-        const AddressClass address_class = GetAddressClass();
-
-        if (address_class == AddressClass::eCodeAlternateISA) {
-          is_alternate_isa = true;
-          return disasm->m_alternate_disasm_up.get();
-        }
-      }
-      return disasm->m_disasm_up.get();
-    }
-    return nullptr;
-  }
-};
-
-std::unique_ptr<DisassemblerLLVMC::MCDisasmInstance>
-DisassemblerLLVMC::MCDisasmInstance::Create(const char *triple, const char *cpu,
-                                            const char *features_str,
-                                            unsigned flavor,
-                                            DisassemblerLLVMC &owner) {
-  using Instance = std::unique_ptr<DisassemblerLLVMC::MCDisasmInstance>;
-
-  std::string Status;
-  const llvm::Target *curr_target =
-      llvm::TargetRegistry::lookupTarget(triple, Status);
-  if (!curr_target)
-    return Instance();
-
-  std::unique_ptr<llvm::MCInstrInfo> instr_info_up(
-      curr_target->createMCInstrInfo());
-  if (!instr_info_up)
-    return Instance();
-
-  std::unique_ptr<llvm::MCRegisterInfo> reg_info_up(
-      curr_target->createMCRegInfo(triple));
-  if (!reg_info_up)
-    return Instance();
-
-  std::unique_ptr<llvm::MCSubtargetInfo> subtarget_info_up(
-      curr_target->createMCSubtargetInfo(triple, cpu, features_str));
-  if (!subtarget_info_up)
-    return Instance();
-
-  llvm::MCTargetOptions MCOptions;
-  std::unique_ptr<llvm::MCAsmInfo> asm_info_up(
-      curr_target->createMCAsmInfo(*reg_info_up, triple, MCOptions));
-  if (!asm_info_up)
-    return Instance();
-
-  std::unique_ptr<llvm::MCContext> context_up(
-      new llvm::MCContext(asm_info_up.get(), reg_info_up.get(), nullptr));
-  if (!context_up)
-    return Instance();
-
-  std::unique_ptr<llvm::MCDisassembler> disasm_up(
-      curr_target->createMCDisassembler(*subtarget_info_up, *context_up));
-  if (!disasm_up)
-    return Instance();
-
-  std::unique_ptr<llvm::MCRelocationInfo> rel_info_up(
-      curr_target->createMCRelocationInfo(triple, *context_up));
-  if (!rel_info_up)
-    return Instance();
-
-  std::unique_ptr<llvm::MCSymbolizer> symbolizer_up(
-      curr_target->createMCSymbolizer(
-          triple, nullptr, DisassemblerLLVMC::SymbolLookupCallback, &owner,
-          context_up.get(), std::move(rel_info_up)));
-  disasm_up->setSymbolizer(std::move(symbolizer_up));
-
-  unsigned asm_printer_variant =
-      flavor == ~0U ? asm_info_up->getAssemblerDialect() : flavor;
-
-  std::unique_ptr<llvm::MCInstPrinter> instr_printer_up(
-      curr_target->createMCInstPrinter(llvm::Triple{triple},
-                                       asm_printer_variant, *asm_info_up,
-                                       *instr_info_up, *reg_info_up));
-  if (!instr_printer_up)
-    return Instance();
-
-  return Instance(
-      new MCDisasmInstance(std::move(instr_info_up), std::move(reg_info_up),
-                           std::move(subtarget_info_up), std::move(asm_info_up),
-                           std::move(context_up), std::move(disasm_up),
-                           std::move(instr_printer_up)));
-}
-
-DisassemblerLLVMC::MCDisasmInstance::MCDisasmInstance(
-    std::unique_ptr<llvm::MCInstrInfo> &&instr_info_up,
-    std::unique_ptr<llvm::MCRegisterInfo> &&reg_info_up,
-    std::unique_ptr<llvm::MCSubtargetInfo> &&subtarget_info_up,
-    std::unique_ptr<llvm::MCAsmInfo> &&asm_info_up,
-    std::unique_ptr<llvm::MCContext> &&context_up,
-    std::unique_ptr<llvm::MCDisassembler> &&disasm_up,
-    std::unique_ptr<llvm::MCInstPrinter> &&instr_printer_up)
-    : m_instr_info_up(std::move(instr_info_up)),
-      m_reg_info_up(std::move(reg_info_up)),
-      m_subtarget_info_up(std::move(subtarget_info_up)),
-      m_asm_info_up(std::move(asm_info_up)),
-      m_context_up(std::move(context_up)), m_disasm_up(std::move(disasm_up)),
-      m_instr_printer_up(std::move(instr_printer_up)) {
-  assert(m_instr_info_up && m_reg_info_up && m_subtarget_info_up &&
-         m_asm_info_up && m_context_up && m_disasm_up && m_instr_printer_up);
-}
-
-uint64_t DisassemblerLLVMC::MCDisasmInstance::GetMCInst(
-    const uint8_t *opcode_data, size_t opcode_data_len, lldb::addr_t pc,
-    llvm::MCInst &mc_inst) const {
-  llvm::ArrayRef<uint8_t> data(opcode_data, opcode_data_len);
-  llvm::MCDisassembler::DecodeStatus status;
-
-  uint64_t new_inst_size;
-  status = m_disasm_up->getInstruction(mc_inst, new_inst_size, data, pc,
-                                       llvm::nulls());
-  if (status == llvm::MCDisassembler::Success)
-    return new_inst_size;
-  else
-    return 0;
-}
-
-void DisassemblerLLVMC::MCDisasmInstance::PrintMCInst(
-    llvm::MCInst &mc_inst, std::string &inst_string,
-    std::string &comments_string) {
-  llvm::raw_string_ostream inst_stream(inst_string);
-  llvm::raw_string_ostream comments_stream(comments_string);
-
-  m_instr_printer_up->setCommentStream(comments_stream);
-  m_instr_printer_up->printInst(&mc_inst, 0, llvm::StringRef(),
-                                *m_subtarget_info_up, inst_stream);
-  m_instr_printer_up->setCommentStream(llvm::nulls());
-  comments_stream.flush();
-
-  static std::string g_newlines("\r\n");
-
-  for (size_t newline_pos = 0;
-       (newline_pos = comments_string.find_first_of(g_newlines, newline_pos)) !=
-       comments_string.npos;
-       /**/) {
-    comments_string.replace(comments_string.begin() + newline_pos,
-                            comments_string.begin() + newline_pos + 1, 1, ' ');
-  }
-}
-
-void DisassemblerLLVMC::MCDisasmInstance::SetStyle(
-    bool use_hex_immed, HexImmediateStyle hex_style) {
-  m_instr_printer_up->setPrintImmHex(use_hex_immed);
-  switch (hex_style) {
-  case eHexStyleC:
-    m_instr_printer_up->setPrintHexStyle(llvm::HexStyle::C);
-    break;
-  case eHexStyleAsm:
-    m_instr_printer_up->setPrintHexStyle(llvm::HexStyle::Asm);
-    break;
-  }
-}
-
-bool DisassemblerLLVMC::MCDisasmInstance::CanBranch(
-    llvm::MCInst &mc_inst) const {
-  return m_instr_info_up->get(mc_inst.getOpcode())
-      .mayAffectControlFlow(mc_inst, *m_reg_info_up);
-}
-
-bool DisassemblerLLVMC::MCDisasmInstance::HasDelaySlot(
-    llvm::MCInst &mc_inst) const {
-  return m_instr_info_up->get(mc_inst.getOpcode()).hasDelaySlot();
-}
-
-bool DisassemblerLLVMC::MCDisasmInstance::IsCall(llvm::MCInst &mc_inst) const {
-  return m_instr_info_up->get(mc_inst.getOpcode()).isCall();
-}
-
-DisassemblerLLVMC::DisassemblerLLVMC(const ArchSpec &arch,
-                                     const char *flavor_string)
-    : Disassembler(arch, flavor_string), m_exe_ctx(nullptr), m_inst(nullptr),
-      m_data_from_file(false) {
-  if (!FlavorValidForArchSpec(arch, m_flavor.c_str())) {
-    m_flavor.assign("default");
-  }
-
-  unsigned flavor = ~0U;
-  llvm::Triple triple = arch.GetTriple();
-
-  // So far the only supported flavor is "intel" on x86.  The base class will
-  // set this correctly coming in.
-  if (triple.getArch() == llvm::Triple::x86 ||
-      triple.getArch() == llvm::Triple::x86_64) {
-    if (m_flavor == "intel") {
-      flavor = 1;
-    } else if (m_flavor == "att") {
-      flavor = 0;
-    }
-  }
-
-  ArchSpec thumb_arch(arch);
-  if (triple.getArch() == llvm::Triple::arm) {
-    std::string thumb_arch_name(thumb_arch.GetTriple().getArchName().str());
-    // Replace "arm" with "thumb" so we get all thumb variants correct
-    if (thumb_arch_name.size() > 3) {
-      thumb_arch_name.erase(0, 3);
-      thumb_arch_name.insert(0, "thumb");
-    } else {
-      thumb_arch_name = "thumbv8.2a";
-    }
-    thumb_arch.GetTriple().setArchName(llvm::StringRef(thumb_arch_name));
-  }
-
-  // If no sub architecture specified then use the most recent arm architecture
-  // so the disassembler will return all instruction. Without it we will see a
-  // lot of unknow opcode in case the code uses instructions which are not
-  // available in the oldest arm version (used when no sub architecture is
-  // specified)
-  if (triple.getArch() == llvm::Triple::arm &&
-      triple.getSubArch() == llvm::Triple::NoSubArch)
-    triple.setArchName("armv8.2a");
-
-  std::string features_str = "";
-  const char *triple_str = triple.getTriple().c_str();
-
-  // ARM Cortex M0-M7 devices only execute thumb instructions
-  if (arch.IsAlwaysThumbInstructions()) {
-    triple_str = thumb_arch.GetTriple().getTriple().c_str();
-    features_str += "+fp-armv8,";
-  }
-
-  const char *cpu = "";
-
-  switch (arch.GetCore()) {
-  case ArchSpec::eCore_mips32:
-  case ArchSpec::eCore_mips32el:
-    cpu = "mips32";
-    break;
-  case ArchSpec::eCore_mips32r2:
-  case ArchSpec::eCore_mips32r2el:
-    cpu = "mips32r2";
-    break;
-  case ArchSpec::eCore_mips32r3:
-  case ArchSpec::eCore_mips32r3el:
-    cpu = "mips32r3";
-    break;
-  case ArchSpec::eCore_mips32r5:
-  case ArchSpec::eCore_mips32r5el:
-    cpu = "mips32r5";
-    break;
-  case ArchSpec::eCore_mips32r6:
-  case ArchSpec::eCore_mips32r6el:
-    cpu = "mips32r6";
-    break;
-  case ArchSpec::eCore_mips64:
-  case ArchSpec::eCore_mips64el:
-    cpu = "mips64";
-    break;
-  case ArchSpec::eCore_mips64r2:
-  case ArchSpec::eCore_mips64r2el:
-    cpu = "mips64r2";
-    break;
-  case ArchSpec::eCore_mips64r3:
-  case ArchSpec::eCore_mips64r3el:
-    cpu = "mips64r3";
-    break;
-  case ArchSpec::eCore_mips64r5:
-  case ArchSpec::eCore_mips64r5el:
-    cpu = "mips64r5";
-    break;
-  case ArchSpec::eCore_mips64r6:
-  case ArchSpec::eCore_mips64r6el:
-    cpu = "mips64r6";
-    break;
-  default:
-    cpu = "";
-    break;
-  }
-
-  if (arch.IsMIPS()) {
-    uint32_t arch_flags = arch.GetFlags();
-    if (arch_flags & ArchSpec::eMIPSAse_msa)
-      features_str += "+msa,";
-    if (arch_flags & ArchSpec::eMIPSAse_dsp)
-      features_str += "+dsp,";
-    if (arch_flags & ArchSpec::eMIPSAse_dspr2)
-      features_str += "+dspr2,";
-  }
-
-  // If any AArch64 variant, enable the ARMv8.5 ISA with SVE extensions so we
-  // can disassemble newer instructions.
-  if (triple.getArch() == llvm::Triple::aarch64 || 
-      triple.getArch() == llvm::Triple::aarch64_32)
-    features_str += "+v8.5a,+sve2";
-
-  if ((triple.getArch() == llvm::Triple::aarch64 ||
-       triple.getArch() == llvm::Triple::aarch64_32)
-      && triple.getVendor() == llvm::Triple::Apple) {
-    cpu = "apple-latest";
-  }
-
-  // We use m_disasm_up.get() to tell whether we are valid or not, so if this
-  // isn't good for some reason, we won't be valid and FindPlugin will fail and
-  // we won't get used.
-  m_disasm_up = MCDisasmInstance::Create(triple_str, cpu, features_str.c_str(),
-                                         flavor, *this);
-
-  llvm::Triple::ArchType llvm_arch = triple.getArch();
-
-  // For arm CPUs that can execute arm or thumb instructions, also create a
-  // thumb instruction disassembler.
-  if (llvm_arch == llvm::Triple::arm) {
-    std::string thumb_triple(thumb_arch.GetTriple().getTriple());
-    m_alternate_disasm_up =
-        MCDisasmInstance::Create(thumb_triple.c_str(), "", features_str.c_str(),
-                                 flavor, *this);
-    if (!m_alternate_disasm_up)
-      m_disasm_up.reset();
-
-  } else if (arch.IsMIPS()) {
-    /* Create alternate disassembler for MIPS16 and microMIPS */
-    uint32_t arch_flags = arch.GetFlags();
-    if (arch_flags & ArchSpec::eMIPSAse_mips16)
-      features_str += "+mips16,";
-    else if (arch_flags & ArchSpec::eMIPSAse_micromips)
-      features_str += "+micromips,";
-
-    m_alternate_disasm_up = MCDisasmInstance::Create(
-        triple_str, cpu, features_str.c_str(), flavor, *this);
-    if (!m_alternate_disasm_up)
-      m_disasm_up.reset();
-  }
-}
-
-DisassemblerLLVMC::~DisassemblerLLVMC() = default;
-
-Disassembler *DisassemblerLLVMC::CreateInstance(const ArchSpec &arch,
-                                                const char *flavor) {
-  if (arch.GetTriple().getArch() != llvm::Triple::UnknownArch) {
-    std::unique_ptr<DisassemblerLLVMC> disasm_up(
-        new DisassemblerLLVMC(arch, flavor));
-
-    if (disasm_up.get() && disasm_up->IsValid())
-      return disasm_up.release();
-  }
-  return nullptr;
-}
-
-size_t DisassemblerLLVMC::DecodeInstructions(const Address &base_addr,
-                                             const DataExtractor &data,
-                                             lldb::offset_t data_offset,
-                                             size_t num_instructions,
-                                             bool append, bool data_from_file) {
-  if (!append)
-    m_instruction_list.Clear();
-
-  if (!IsValid())
-    return 0;
-
-  m_data_from_file = data_from_file;
-  uint32_t data_cursor = data_offset;
-  const size_t data_byte_size = data.GetByteSize();
-  uint32_t instructions_parsed = 0;
-  Address inst_addr(base_addr);
-
-  while (data_cursor < data_byte_size &&
-         instructions_parsed < num_instructions) {
-
-    AddressClass address_class = AddressClass::eCode;
-
-    if (m_alternate_disasm_up)
-      address_class = inst_addr.GetAddressClass();
-
-    InstructionSP inst_sp(
-        new InstructionLLVMC(*this, inst_addr, address_class));
-
-    if (!inst_sp)
-      break;
-
-    uint32_t inst_size = inst_sp->Decode(*this, data, data_cursor);
-
-    if (inst_size == 0)
-      break;
-
-    m_instruction_list.Append(inst_sp);
-    data_cursor += inst_size;
-    inst_addr.Slide(inst_size);
-    instructions_parsed++;
-  }
-
-  return data_cursor - data_offset;
-}
-
-void DisassemblerLLVMC::Initialize() {
-  PluginManager::RegisterPlugin(GetPluginNameStatic(),
-                                "Disassembler that uses LLVM MC to disassemble "
-                                "i386, x86_64, ARM, and ARM64.",
-                                CreateInstance);
-
-  llvm::InitializeAllTargetInfos();
-  llvm::InitializeAllTargetMCs();
-  llvm::InitializeAllAsmParsers();
-  llvm::InitializeAllDisassemblers();
-}
-
-void DisassemblerLLVMC::Terminate() {
-  PluginManager::UnregisterPlugin(CreateInstance);
-}
-
-ConstString DisassemblerLLVMC::GetPluginNameStatic() {
-  static ConstString g_name("llvm-mc");
-  return g_name;
-}
-
-int DisassemblerLLVMC::OpInfoCallback(void *disassembler, uint64_t pc,
-                                      uint64_t offset, uint64_t size,
-                                      int tag_type, void *tag_bug) {
-  return static_cast<DisassemblerLLVMC *>(disassembler)
-      ->OpInfo(pc, offset, size, tag_type, tag_bug);
-}
-
-const char *DisassemblerLLVMC::SymbolLookupCallback(void *disassembler,
-                                                    uint64_t value,
-                                                    uint64_t *type, uint64_t pc,
-                                                    const char **name) {
-  return static_cast<DisassemblerLLVMC *>(disassembler)
-      ->SymbolLookup(value, type, pc, name);
-}
-
-bool DisassemblerLLVMC::FlavorValidForArchSpec(
-    const lldb_private::ArchSpec &arch, const char *flavor) {
-  llvm::Triple triple = arch.GetTriple();
-  if (flavor == nullptr || strcmp(flavor, "default") == 0)
-    return true;
-
-  if (triple.getArch() == llvm::Triple::x86 ||
-      triple.getArch() == llvm::Triple::x86_64) {
-    return strcmp(flavor, "intel") == 0 || strcmp(flavor, "att") == 0;
-  } else
-    return false;
-}
-
-bool DisassemblerLLVMC::IsValid() const { return m_disasm_up.operator bool(); }
-
-int DisassemblerLLVMC::OpInfo(uint64_t PC, uint64_t Offset, uint64_t Size,
-                              int tag_type, void *tag_bug) {
-  switch (tag_type) {
-  default:
-    break;
-  case 1:
-    memset(tag_bug, 0, sizeof(::LLVMOpInfo1));
-    break;
-  }
-  return 0;
-}
-
-const char *DisassemblerLLVMC::SymbolLookup(uint64_t value, uint64_t *type_ptr,
-                                            uint64_t pc, const char **name) {
-  if (*type_ptr) {
-    if (m_exe_ctx && m_inst) {
-      // std::string remove_this_prior_to_checkin;
-      Target *target = m_exe_ctx ? m_exe_ctx->GetTargetPtr() : nullptr;
-      Address value_so_addr;
-      Address pc_so_addr;
-      if (m_inst->UsingFileAddress()) {
-        ModuleSP module_sp(m_inst->GetAddress().GetModule());
-        if (module_sp) {
-          module_sp->ResolveFileAddress(value, value_so_addr);
-          module_sp->ResolveFileAddress(pc, pc_so_addr);
-        }
-      } else if (target && !target->GetSectionLoadList().IsEmpty()) {
-        target->GetSectionLoadList().ResolveLoadAddress(value, value_so_addr);
-        target->GetSectionLoadList().ResolveLoadAddress(pc, pc_so_addr);
-      }
-
-      SymbolContext sym_ctx;
-      const SymbolContextItem resolve_scope =
-          eSymbolContextFunction | eSymbolContextSymbol;
-      if (pc_so_addr.IsValid() && pc_so_addr.GetModule()) {
-        pc_so_addr.GetModule()->ResolveSymbolContextForAddress(
-            pc_so_addr, resolve_scope, sym_ctx);
-      }
-
-      if (value_so_addr.IsValid() && value_so_addr.GetSection()) {
-        StreamString ss;
-
-        bool format_omitting_current_func_name = false;
-        if (sym_ctx.symbol || sym_ctx.function) {
-          AddressRange range;
-          if (sym_ctx.GetAddressRange(resolve_scope, 0, false, range) &&
-              range.GetBaseAddress().IsValid() &&
-              range.ContainsLoadAddress(value_so_addr, target)) {
-            format_omitting_current_func_name = true;
-          }
-        }
-
-        // If the "value" address (the target address we're symbolicating) is
-        // inside the same SymbolContext as the current instruction pc
-        // (pc_so_addr), don't print the full function name - just print it
-        // with DumpStyleNoFunctionName style, e.g. "<+36>".
-        if (format_omitting_current_func_name) {
-          value_so_addr.Dump(&ss, target, Address::DumpStyleNoFunctionName,
-                             Address::DumpStyleSectionNameOffset);
-        } else {
-          value_so_addr.Dump(
-              &ss, target,
-              Address::DumpStyleResolvedDescriptionNoFunctionArguments,
-              Address::DumpStyleSectionNameOffset);
-        }
-
-        if (!ss.GetString().empty()) {
-          // If Address::Dump returned a multi-line description, most commonly
-          // seen when we have multiple levels of inlined functions at an
-          // address, only show the first line.
-          std::string str = ss.GetString();
-          size_t first_eol_char = str.find_first_of("\r\n");
-          if (first_eol_char != std::string::npos) {
-            str.erase(first_eol_char);
-          }
-          m_inst->AppendComment(str);
-        }
-      }
-    }
-  }
-
-  *type_ptr = LLVMDisassembler_ReferenceType_InOut_None;
-  *name = nullptr;
-  return nullptr;
-}
-
-// PluginInterface protocol
-ConstString DisassemblerLLVMC::GetPluginName() { return GetPluginNameStatic(); }
-
-uint32_t DisassemblerLLVMC::GetPluginVersion() { return 1; }
diff --git a/gnu/llvm/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h b/gnu/llvm/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h
deleted file mode 100644 (file)
index fd57750..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-//===-- DisassemblerLLVMC.h -------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_DisassemblerLLVMC_h_
-#define liblldb_DisassemblerLLVMC_h_
-
-#include <memory>
-#include <mutex>
-#include <string>
-
-#include "lldb/Core/Address.h"
-#include "lldb/Core/Disassembler.h"
-#include "lldb/Core/PluginManager.h"
-
-class InstructionLLVMC;
-
-class DisassemblerLLVMC : public lldb_private::Disassembler {
-public:
-  DisassemblerLLVMC(const lldb_private::ArchSpec &arch,
-                    const char *flavor /* = NULL */);
-
-  ~DisassemblerLLVMC() override;
-
-  // Static Functions
-  static void Initialize();
-
-  static void Terminate();
-
-  static lldb_private::ConstString GetPluginNameStatic();
-
-  static lldb_private::Disassembler *
-  CreateInstance(const lldb_private::ArchSpec &arch, const char *flavor);
-
-  size_t DecodeInstructions(const lldb_private::Address &base_addr,
-                            const lldb_private::DataExtractor &data,
-                            lldb::offset_t data_offset, size_t num_instructions,
-                            bool append, bool data_from_file) override;
-
-  // PluginInterface protocol
-  lldb_private::ConstString GetPluginName() override;
-
-  uint32_t GetPluginVersion() override;
-
-protected:
-  friend class InstructionLLVMC;
-
-  bool FlavorValidForArchSpec(const lldb_private::ArchSpec &arch,
-                              const char *flavor) override;
-
-  bool IsValid() const;
-
-  int OpInfo(uint64_t PC, uint64_t Offset, uint64_t Size, int TagType,
-             void *TagBug);
-
-  const char *SymbolLookup(uint64_t ReferenceValue, uint64_t *ReferenceType,
-                           uint64_t ReferencePC, const char **ReferenceName);
-
-  static int OpInfoCallback(void *DisInfo, uint64_t PC, uint64_t Offset,
-                            uint64_t Size, int TagType, void *TagBug);
-
-  static const char *SymbolLookupCallback(void *DisInfo,
-                                          uint64_t ReferenceValue,
-                                          uint64_t *ReferenceType,
-                                          uint64_t ReferencePC,
-                                          const char **ReferenceName);
-
-  const lldb_private::ExecutionContext *m_exe_ctx;
-  InstructionLLVMC *m_inst;
-  std::mutex m_mutex;
-  bool m_data_from_file;
-
-  // Since we need to make two actual MC Disassemblers for ARM (ARM & THUMB),
-  // and there's a bit of goo to set up and own in the MC disassembler world,
-  // this class was added to manage the actual disassemblers.
-  class MCDisasmInstance;
-  std::unique_ptr<MCDisasmInstance> m_disasm_up;
-  std::unique_ptr<MCDisasmInstance> m_alternate_disasm_up;
-};
-
-#endif // liblldb_DisassemblerLLVM_h_
index 15b3805..5af6e17 100644 (file)
@@ -419,6 +419,7 @@ bool DYLDRendezvous::SOEntryIsMainExecutable(const SOEntry &entry) {
   switch (triple.getOS()) {
   case llvm::Triple::FreeBSD:
   case llvm::Triple::NetBSD:
+  case llvm::Triple::OpenBSD:
     return entry.file_spec == m_exe_file_spec;
   case llvm::Triple::Linux:
     if (triple.isAndroid())
index ac60af5..0b68e6d 100644 (file)
@@ -62,7 +62,8 @@ DynamicLoader *DynamicLoaderPOSIXDYLD::CreateInstance(Process *process,
         process->GetTarget().GetArchitecture().GetTriple();
     if (triple_ref.getOS() == llvm::Triple::FreeBSD ||
         triple_ref.getOS() == llvm::Triple::Linux ||
-        triple_ref.getOS() == llvm::Triple::NetBSD)
+        triple_ref.getOS() == llvm::Triple::NetBSD ||
+        triple_ref.getOS() == llvm::Triple::OpenBSD)
       create = true;
   }
 
diff --git a/gnu/llvm/lldb/source/Plugins/InstrumentationRuntime/ASan/ASanRuntime.cpp b/gnu/llvm/lldb/source/Plugins/InstrumentationRuntime/ASan/ASanRuntime.cpp
deleted file mode 100644 (file)
index 2e5dd59..0000000
+++ /dev/null
@@ -1,325 +0,0 @@
-//===-- ASanRuntime.cpp -----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "ASanRuntime.h"
-
-#include "lldb/Breakpoint/StoppointCallbackContext.h"
-#include "lldb/Core/Debugger.h"
-#include "lldb/Core/Module.h"
-#include "lldb/Core/PluginInterface.h"
-#include "lldb/Core/PluginManager.h"
-#include "lldb/Core/StreamFile.h"
-#include "lldb/Core/ValueObject.h"
-#include "lldb/Expression/UserExpression.h"
-#include "lldb/Interpreter/CommandReturnObject.h"
-#include "lldb/Symbol/Symbol.h"
-#include "lldb/Target/InstrumentationRuntimeStopInfo.h"
-#include "lldb/Target/StopInfo.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Target/Thread.h"
-#include "lldb/Utility/RegularExpression.h"
-#include "lldb/Utility/Stream.h"
-
-#include "llvm/ADT/StringSwitch.h"
-
-using namespace lldb;
-using namespace lldb_private;
-
-lldb::InstrumentationRuntimeSP
-AddressSanitizerRuntime::CreateInstance(const lldb::ProcessSP &process_sp) {
-  return InstrumentationRuntimeSP(new AddressSanitizerRuntime(process_sp));
-}
-
-void AddressSanitizerRuntime::Initialize() {
-  PluginManager::RegisterPlugin(
-      GetPluginNameStatic(), "AddressSanitizer instrumentation runtime plugin.",
-      CreateInstance, GetTypeStatic);
-}
-
-void AddressSanitizerRuntime::Terminate() {
-  PluginManager::UnregisterPlugin(CreateInstance);
-}
-
-lldb_private::ConstString AddressSanitizerRuntime::GetPluginNameStatic() {
-  return ConstString("AddressSanitizer");
-}
-
-lldb::InstrumentationRuntimeType AddressSanitizerRuntime::GetTypeStatic() {
-  return eInstrumentationRuntimeTypeAddressSanitizer;
-}
-
-AddressSanitizerRuntime::~AddressSanitizerRuntime() { Deactivate(); }
-
-const RegularExpression &
-AddressSanitizerRuntime::GetPatternForRuntimeLibrary() {
-  // FIXME: This shouldn't include the "dylib" suffix.
-  static RegularExpression regex(
-      llvm::StringRef("libclang_rt.asan_(.*)_dynamic\\.dylib"));
-  return regex;
-}
-
-bool AddressSanitizerRuntime::CheckIfRuntimeIsValid(
-    const lldb::ModuleSP module_sp) {
-  const Symbol *symbol = module_sp->FindFirstSymbolWithNameAndType(
-      ConstString("__asan_get_alloc_stack"), lldb::eSymbolTypeAny);
-
-  return symbol != nullptr;
-}
-
-const char *address_sanitizer_retrieve_report_data_prefix = R"(
-extern "C"
-{
-int __asan_report_present();
-void *__asan_get_report_pc();
-void *__asan_get_report_bp();
-void *__asan_get_report_sp();
-void *__asan_get_report_address();
-const char *__asan_get_report_description();
-int __asan_get_report_access_type();
-size_t __asan_get_report_access_size();
-}
-)";
-
-const char *address_sanitizer_retrieve_report_data_command = R"(
-struct {
-    int present;
-    int access_type;
-    void *pc;
-    void *bp;
-    void *sp;
-    void *address;
-    size_t access_size;
-    const char *description;
-} t;
-
-t.present = __asan_report_present();
-t.access_type = __asan_get_report_access_type();
-t.pc = __asan_get_report_pc();
-t.bp = __asan_get_report_bp();
-t.sp = __asan_get_report_sp();
-t.address = __asan_get_report_address();
-t.access_size = __asan_get_report_access_size();
-t.description = __asan_get_report_description();
-t
-)";
-
-StructuredData::ObjectSP AddressSanitizerRuntime::RetrieveReportData() {
-  ProcessSP process_sp = GetProcessSP();
-  if (!process_sp)
-    return StructuredData::ObjectSP();
-
-  ThreadSP thread_sp =
-      process_sp->GetThreadList().GetExpressionExecutionThread();
-  StackFrameSP frame_sp = thread_sp->GetSelectedFrame();
-
-  if (!frame_sp)
-    return StructuredData::ObjectSP();
-
-  EvaluateExpressionOptions options;
-  options.SetUnwindOnError(true);
-  options.SetTryAllThreads(true);
-  options.SetStopOthers(true);
-  options.SetIgnoreBreakpoints(true);
-  options.SetTimeout(process_sp->GetUtilityExpressionTimeout());
-  options.SetPrefix(address_sanitizer_retrieve_report_data_prefix);
-  options.SetAutoApplyFixIts(false);
-  options.SetLanguage(eLanguageTypeObjC_plus_plus);
-
-  ValueObjectSP return_value_sp;
-  ExecutionContext exe_ctx;
-  Status eval_error;
-  frame_sp->CalculateExecutionContext(exe_ctx);
-  ExpressionResults result = UserExpression::Evaluate(
-      exe_ctx, options, address_sanitizer_retrieve_report_data_command, "",
-      return_value_sp, eval_error);
-  if (result != eExpressionCompleted) {
-    process_sp->GetTarget().GetDebugger().GetAsyncOutputStream()->Printf(
-        "Warning: Cannot evaluate AddressSanitizer expression:\n%s\n",
-        eval_error.AsCString());
-    return StructuredData::ObjectSP();
-  }
-
-  int present = return_value_sp->GetValueForExpressionPath(".present")
-                    ->GetValueAsUnsigned(0);
-  if (present != 1)
-    return StructuredData::ObjectSP();
-
-  addr_t pc =
-      return_value_sp->GetValueForExpressionPath(".pc")->GetValueAsUnsigned(0);
-  /* commented out because rdar://problem/18533301
-  addr_t bp =
-  return_value_sp->GetValueForExpressionPath(".bp")->GetValueAsUnsigned(0);
-  addr_t sp =
-  return_value_sp->GetValueForExpressionPath(".sp")->GetValueAsUnsigned(0);
-  */
-  addr_t address = return_value_sp->GetValueForExpressionPath(".address")
-                       ->GetValueAsUnsigned(0);
-  addr_t access_type =
-      return_value_sp->GetValueForExpressionPath(".access_type")
-          ->GetValueAsUnsigned(0);
-  addr_t access_size =
-      return_value_sp->GetValueForExpressionPath(".access_size")
-          ->GetValueAsUnsigned(0);
-  addr_t description_ptr =
-      return_value_sp->GetValueForExpressionPath(".description")
-          ->GetValueAsUnsigned(0);
-  std::string description;
-  Status error;
-  process_sp->ReadCStringFromMemory(description_ptr, description, error);
-
-  StructuredData::Dictionary *dict = new StructuredData::Dictionary();
-  dict->AddStringItem("instrumentation_class", "AddressSanitizer");
-  dict->AddStringItem("stop_type", "fatal_error");
-  dict->AddIntegerItem("pc", pc);
-  /* commented out because rdar://problem/18533301
-  dict->AddIntegerItem("bp", bp);
-  dict->AddIntegerItem("sp", sp);
-  */
-  dict->AddIntegerItem("address", address);
-  dict->AddIntegerItem("access_type", access_type);
-  dict->AddIntegerItem("access_size", access_size);
-  dict->AddStringItem("description", description);
-
-  return StructuredData::ObjectSP(dict);
-}
-
-std::string
-AddressSanitizerRuntime::FormatDescription(StructuredData::ObjectSP report) {
-  std::string description = report->GetAsDictionary()
-                                ->GetValueForKey("description")
-                                ->GetAsString()
-                                ->GetValue();
-  return llvm::StringSwitch<std::string>(description)
-      .Case("heap-use-after-free", "Use of deallocated memory")
-      .Case("heap-buffer-overflow", "Heap buffer overflow")
-      .Case("stack-buffer-underflow", "Stack buffer underflow")
-      .Case("initialization-order-fiasco", "Initialization order problem")
-      .Case("stack-buffer-overflow", "Stack buffer overflow")
-      .Case("stack-use-after-return", "Use of stack memory after return")
-      .Case("use-after-poison", "Use of poisoned memory")
-      .Case("container-overflow", "Container overflow")
-      .Case("stack-use-after-scope", "Use of out-of-scope stack memory")
-      .Case("global-buffer-overflow", "Global buffer overflow")
-      .Case("unknown-crash", "Invalid memory access")
-      .Case("stack-overflow", "Stack space exhausted")
-      .Case("null-deref", "Dereference of null pointer")
-      .Case("wild-jump", "Jump to non-executable address")
-      .Case("wild-addr-write", "Write through wild pointer")
-      .Case("wild-addr-read", "Read from wild pointer")
-      .Case("wild-addr", "Access through wild pointer")
-      .Case("signal", "Deadly signal")
-      .Case("double-free", "Deallocation of freed memory")
-      .Case("new-delete-type-mismatch",
-            "Deallocation size different from allocation size")
-      .Case("bad-free", "Deallocation of non-allocated memory")
-      .Case("alloc-dealloc-mismatch",
-            "Mismatch between allocation and deallocation APIs")
-      .Case("bad-malloc_usable_size", "Invalid argument to malloc_usable_size")
-      .Case("bad-__sanitizer_get_allocated_size",
-            "Invalid argument to __sanitizer_get_allocated_size")
-      .Case("param-overlap",
-            "Call to function disallowing overlapping memory ranges")
-      .Case("negative-size-param", "Negative size used when accessing memory")
-      .Case("bad-__sanitizer_annotate_contiguous_container",
-            "Invalid argument to __sanitizer_annotate_contiguous_container")
-      .Case("odr-violation", "Symbol defined in multiple translation units")
-      .Case(
-          "invalid-pointer-pair",
-          "Comparison or arithmetic on pointers from different memory regions")
-      // for unknown report codes just show the code
-      .Default("AddressSanitizer detected: " + description);
-}
-
-bool AddressSanitizerRuntime::NotifyBreakpointHit(
-    void *baton, StoppointCallbackContext *context, user_id_t break_id,
-    user_id_t break_loc_id) {
-  assert(baton && "null baton");
-  if (!baton)
-    return false;
-
-  AddressSanitizerRuntime *const instance =
-      static_cast<AddressSanitizerRuntime *>(baton);
-
-  ProcessSP process_sp = instance->GetProcessSP();
-
-  if (process_sp->GetModIDRef().IsLastResumeForUserExpression())
-    return false;
-
-  StructuredData::ObjectSP report = instance->RetrieveReportData();
-  std::string description;
-  if (report) {
-    description = instance->FormatDescription(report);
-  }
-  // Make sure this is the right process
-  if (process_sp && process_sp == context->exe_ctx_ref.GetProcessSP()) {
-    ThreadSP thread_sp = context->exe_ctx_ref.GetThreadSP();
-    if (thread_sp)
-      thread_sp->SetStopInfo(InstrumentationRuntimeStopInfo::
-                                 CreateStopReasonWithInstrumentationData(
-                                     *thread_sp, description, report));
-
-    StreamFileSP stream_sp(
-        process_sp->GetTarget().GetDebugger().GetOutputStreamSP());
-    if (stream_sp) {
-      stream_sp->Printf("AddressSanitizer report breakpoint hit. Use 'thread "
-                        "info -s' to get extended information about the "
-                        "report.\n");
-    }
-    return true; // Return true to stop the target
-  } else
-    return false; // Let target run
-}
-
-void AddressSanitizerRuntime::Activate() {
-  if (IsActive())
-    return;
-
-  ProcessSP process_sp = GetProcessSP();
-  if (!process_sp)
-    return;
-
-  ConstString symbol_name("__asan::AsanDie()");
-  const Symbol *symbol = GetRuntimeModuleSP()->FindFirstSymbolWithNameAndType(
-      symbol_name, eSymbolTypeCode);
-
-  if (symbol == nullptr)
-    return;
-
-  if (!symbol->ValueIsAddress() || !symbol->GetAddressRef().IsValid())
-    return;
-
-  Target &target = process_sp->GetTarget();
-  addr_t symbol_address = symbol->GetAddressRef().GetOpcodeLoadAddress(&target);
-
-  if (symbol_address == LLDB_INVALID_ADDRESS)
-    return;
-
-  bool internal = true;
-  bool hardware = false;
-  Breakpoint *breakpoint =
-      process_sp->GetTarget()
-          .CreateBreakpoint(symbol_address, internal, hardware)
-          .get();
-  breakpoint->SetCallback(AddressSanitizerRuntime::NotifyBreakpointHit, this,
-                          true);
-  breakpoint->SetBreakpointKind("address-sanitizer-report");
-  SetBreakpointID(breakpoint->GetID());
-
-  SetActive(true);
-}
-
-void AddressSanitizerRuntime::Deactivate() {
-  if (GetBreakpointID() != LLDB_INVALID_BREAK_ID) {
-    ProcessSP process_sp = GetProcessSP();
-    if (process_sp) {
-      process_sp->GetTarget().RemoveBreakpointByID(GetBreakpointID());
-      SetBreakpointID(LLDB_INVALID_BREAK_ID);
-    }
-  }
-  SetActive(false);
-}
diff --git a/gnu/llvm/lldb/source/Plugins/InstrumentationRuntime/ASan/ASanRuntime.h b/gnu/llvm/lldb/source/Plugins/InstrumentationRuntime/ASan/ASanRuntime.h
deleted file mode 100644 (file)
index 0771e62..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-//===-- ASanRuntime.h -------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_AddressSanitizerRuntime_h_
-#define liblldb_AddressSanitizerRuntime_h_
-
-#include "lldb/Target/InstrumentationRuntime.h"
-#include "lldb/Target/Process.h"
-#include "lldb/Utility/StructuredData.h"
-#include "lldb/lldb-private.h"
-
-namespace lldb_private {
-
-class AddressSanitizerRuntime : public lldb_private::InstrumentationRuntime {
-public:
-  ~AddressSanitizerRuntime() override;
-
-  static lldb::InstrumentationRuntimeSP
-  CreateInstance(const lldb::ProcessSP &process_sp);
-
-  static void Initialize();
-
-  static void Terminate();
-
-  static lldb_private::ConstString GetPluginNameStatic();
-
-  static lldb::InstrumentationRuntimeType GetTypeStatic();
-
-  lldb_private::ConstString GetPluginName() override {
-    return GetPluginNameStatic();
-  }
-
-  virtual lldb::InstrumentationRuntimeType GetType() { return GetTypeStatic(); }
-
-  uint32_t GetPluginVersion() override { return 1; }
-
-private:
-  AddressSanitizerRuntime(const lldb::ProcessSP &process_sp)
-      : lldb_private::InstrumentationRuntime(process_sp) {}
-
-  const RegularExpression &GetPatternForRuntimeLibrary() override;
-
-  bool CheckIfRuntimeIsValid(const lldb::ModuleSP module_sp) override;
-
-  void Activate() override;
-
-  void Deactivate();
-
-  static bool NotifyBreakpointHit(void *baton,
-                                  StoppointCallbackContext *context,
-                                  lldb::user_id_t break_id,
-                                  lldb::user_id_t break_loc_id);
-
-  StructuredData::ObjectSP RetrieveReportData();
-
-  std::string FormatDescription(StructuredData::ObjectSP report);
-};
-
-} // namespace lldb_private
-
-#endif // liblldb_AddressSanitizerRuntime_h_
diff --git a/gnu/llvm/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.cpp b/gnu/llvm/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.cpp
deleted file mode 100644 (file)
index b73b6c0..0000000
+++ /dev/null
@@ -1,274 +0,0 @@
-//===-- MainThreadCheckerRuntime.cpp ----------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "MainThreadCheckerRuntime.h"
-
-#include "lldb/Breakpoint/StoppointCallbackContext.h"
-#include "lldb/Core/Module.h"
-#include "lldb/Core/PluginManager.h"
-#include "lldb/Symbol/Symbol.h"
-#include "lldb/Symbol/SymbolContext.h"
-#include "lldb/Symbol/Variable.h"
-#include "lldb/Symbol/VariableList.h"
-#include "lldb/Target/InstrumentationRuntimeStopInfo.h"
-#include "lldb/Target/RegisterContext.h"
-#include "lldb/Target/SectionLoadList.h"
-#include "lldb/Target/StopInfo.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Target/Thread.h"
-#include "lldb/Utility/RegularExpression.h"
-#include "Plugins/Process/Utility/HistoryThread.h"
-
-#include <memory>
-
-using namespace lldb;
-using namespace lldb_private;
-
-MainThreadCheckerRuntime::~MainThreadCheckerRuntime() {
-  Deactivate();
-}
-
-lldb::InstrumentationRuntimeSP
-MainThreadCheckerRuntime::CreateInstance(const lldb::ProcessSP &process_sp) {
-  return InstrumentationRuntimeSP(new MainThreadCheckerRuntime(process_sp));
-}
-
-void MainThreadCheckerRuntime::Initialize() {
-  PluginManager::RegisterPlugin(
-      GetPluginNameStatic(), "MainThreadChecker instrumentation runtime plugin.",
-      CreateInstance, GetTypeStatic);
-}
-
-void MainThreadCheckerRuntime::Terminate() {
-  PluginManager::UnregisterPlugin(CreateInstance);
-}
-
-lldb_private::ConstString MainThreadCheckerRuntime::GetPluginNameStatic() {
-  return ConstString("MainThreadChecker");
-}
-
-lldb::InstrumentationRuntimeType MainThreadCheckerRuntime::GetTypeStatic() {
-  return eInstrumentationRuntimeTypeMainThreadChecker;
-}
-
-const RegularExpression &
-MainThreadCheckerRuntime::GetPatternForRuntimeLibrary() {
-  static RegularExpression regex(llvm::StringRef("libMainThreadChecker.dylib"));
-  return regex;
-}
-
-bool MainThreadCheckerRuntime::CheckIfRuntimeIsValid(
-    const lldb::ModuleSP module_sp) {
-  static ConstString test_sym("__main_thread_checker_on_report");
-  const Symbol *symbol =
-      module_sp->FindFirstSymbolWithNameAndType(test_sym, lldb::eSymbolTypeAny);
-  return symbol != nullptr;
-}
-
-StructuredData::ObjectSP
-MainThreadCheckerRuntime::RetrieveReportData(ExecutionContextRef exe_ctx_ref) {
-  ProcessSP process_sp = GetProcessSP();
-  if (!process_sp)
-    return StructuredData::ObjectSP();
-
-  ThreadSP thread_sp = exe_ctx_ref.GetThreadSP();
-  StackFrameSP frame_sp = thread_sp->GetSelectedFrame();
-  ModuleSP runtime_module_sp = GetRuntimeModuleSP();
-  Target &target = process_sp->GetTarget();
-
-  if (!frame_sp)
-    return StructuredData::ObjectSP();
-
-  RegisterContextSP regctx_sp = frame_sp->GetRegisterContext();
-  if (!regctx_sp)
-    return StructuredData::ObjectSP();
-
-  const RegisterInfo *reginfo = regctx_sp->GetRegisterInfoByName("arg1");
-  if (!reginfo)
-    return StructuredData::ObjectSP();
-
-  uint64_t apiname_ptr = regctx_sp->ReadRegisterAsUnsigned(reginfo, 0);
-  if (!apiname_ptr)
-    return StructuredData::ObjectSP();
-
-  std::string apiName = "";
-  Status read_error;
-  target.ReadCStringFromMemory(apiname_ptr, apiName, read_error);
-  if (read_error.Fail())
-    return StructuredData::ObjectSP();
-
-  std::string className = "";
-  std::string selector = "";
-  if (apiName.substr(0, 2) == "-[") {
-    size_t spacePos = apiName.find(" ");
-    if (spacePos != std::string::npos) {
-      className = apiName.substr(2, spacePos - 2);
-      selector = apiName.substr(spacePos + 1, apiName.length() - spacePos - 2);
-    }
-  }
-
-  // Gather the PCs of the user frames in the backtrace.
-  StructuredData::Array *trace = new StructuredData::Array();
-  auto trace_sp = StructuredData::ObjectSP(trace);
-  StackFrameSP responsible_frame;
-  for (unsigned I = 0; I < thread_sp->GetStackFrameCount(); ++I) {
-    StackFrameSP frame = thread_sp->GetStackFrameAtIndex(I);
-    Address addr = frame->GetFrameCodeAddress();
-    if (addr.GetModule() == runtime_module_sp) // Skip PCs from the runtime.
-      continue;
-
-    // The first non-runtime frame is responsible for the bug.
-    if (!responsible_frame)
-      responsible_frame = frame;
-
-    // First frame in stacktrace should point to a real PC, not return address.
-    if (I != 0 && trace->GetSize() == 0) {
-      addr.Slide(-1);
-    }
-
-    lldb::addr_t PC = addr.GetLoadAddress(&target);
-    trace->AddItem(StructuredData::ObjectSP(new StructuredData::Integer(PC)));
-  }
-
-  auto *d = new StructuredData::Dictionary();
-  auto dict_sp = StructuredData::ObjectSP(d);
-  d->AddStringItem("instrumentation_class", "MainThreadChecker");
-  d->AddStringItem("api_name", apiName);
-  d->AddStringItem("class_name", className);
-  d->AddStringItem("selector", selector);
-  d->AddStringItem("description",
-                   apiName + " must be used from main thread only");
-  d->AddIntegerItem("tid", thread_sp->GetIndexID());
-  d->AddItem("trace", trace_sp);
-  return dict_sp;
-}
-
-bool MainThreadCheckerRuntime::NotifyBreakpointHit(
-    void *baton, StoppointCallbackContext *context, user_id_t break_id,
-    user_id_t break_loc_id) {
-  assert(baton && "null baton");
-  if (!baton)
-    return false; ///< false => resume execution.
-
-  MainThreadCheckerRuntime *const instance =
-      static_cast<MainThreadCheckerRuntime *>(baton);
-
-  ProcessSP process_sp = instance->GetProcessSP();
-  ThreadSP thread_sp = context->exe_ctx_ref.GetThreadSP();
-  if (!process_sp || !thread_sp ||
-      process_sp != context->exe_ctx_ref.GetProcessSP())
-    return false;
-
-  if (process_sp->GetModIDRef().IsLastResumeForUserExpression())
-    return false;
-
-  StructuredData::ObjectSP report =
-      instance->RetrieveReportData(context->exe_ctx_ref);
-
-  if (report) {
-    std::string description = report->GetAsDictionary()
-                                ->GetValueForKey("description")
-                                ->GetAsString()
-                                ->GetValue();
-    thread_sp->SetStopInfo(
-        InstrumentationRuntimeStopInfo::CreateStopReasonWithInstrumentationData(
-            *thread_sp, description, report));
-    return true;
-  }
-
-  return false;
-}
-
-void MainThreadCheckerRuntime::Activate() {
-  if (IsActive())
-    return;
-
-  ProcessSP process_sp = GetProcessSP();
-  if (!process_sp)
-    return;
-
-  ModuleSP runtime_module_sp = GetRuntimeModuleSP();
-
-  ConstString symbol_name("__main_thread_checker_on_report");
-  const Symbol *symbol = runtime_module_sp->FindFirstSymbolWithNameAndType(
-      symbol_name, eSymbolTypeCode);
-
-  if (symbol == nullptr)
-    return;
-
-  if (!symbol->ValueIsAddress() || !symbol->GetAddressRef().IsValid())
-    return;
-
-  Target &target = process_sp->GetTarget();
-  addr_t symbol_address = symbol->GetAddressRef().GetOpcodeLoadAddress(&target);
-
-  if (symbol_address == LLDB_INVALID_ADDRESS)
-    return;
-
-  Breakpoint *breakpoint =
-      process_sp->GetTarget()
-          .CreateBreakpoint(symbol_address, /*internal=*/true,
-                            /*hardware=*/false)
-          .get();
-  breakpoint->SetCallback(MainThreadCheckerRuntime::NotifyBreakpointHit, this,
-                          true);
-  breakpoint->SetBreakpointKind("main-thread-checker-report");
-  SetBreakpointID(breakpoint->GetID());
-
-  SetActive(true);
-}
-
-void MainThreadCheckerRuntime::Deactivate() {
-  SetActive(false);
-
-  auto BID = GetBreakpointID();
-  if (BID == LLDB_INVALID_BREAK_ID)
-    return;
-
-  if (ProcessSP process_sp = GetProcessSP()) {
-    process_sp->GetTarget().RemoveBreakpointByID(BID);
-    SetBreakpointID(LLDB_INVALID_BREAK_ID);
-  }
-}
-
-lldb::ThreadCollectionSP
-MainThreadCheckerRuntime::GetBacktracesFromExtendedStopInfo(
-    StructuredData::ObjectSP info) {
-  ThreadCollectionSP threads;
-  threads = std::make_shared<ThreadCollection>();
-
-  ProcessSP process_sp = GetProcessSP();
-
-  if (info->GetObjectForDotSeparatedPath("instrumentation_class")
-      ->GetStringValue() != "MainThreadChecker")
-    return threads;
-
-  std::vector<lldb::addr_t> PCs;
-  auto trace = info->GetObjectForDotSeparatedPath("trace")->GetAsArray();
-  trace->ForEach([&PCs](StructuredData::Object *PC) -> bool {
-    PCs.push_back(PC->GetAsInteger()->GetValue());
-    return true;
-  });
-
-  if (PCs.empty())
-    return threads;
-
-  StructuredData::ObjectSP thread_id_obj =
-      info->GetObjectForDotSeparatedPath("tid");
-  tid_t tid = thread_id_obj ? thread_id_obj->GetIntegerValue() : 0;
-
-  HistoryThread *history_thread = new HistoryThread(*process_sp, tid, PCs);
-  ThreadSP new_thread_sp(history_thread);
-
-  // Save this in the Process' ExtendedThreadList so a strong pointer retains
-  // the object
-  process_sp->GetExtendedThreadList().AddThread(new_thread_sp);
-  threads->AddThread(new_thread_sp);
-
-  return threads;
-}
diff --git a/gnu/llvm/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.h b/gnu/llvm/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.h
deleted file mode 100644 (file)
index 1dcbc0f..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-//===-- MainThreadCheckerRuntime.h ------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_MainThreadCheckerRuntime_h_
-#define liblldb_MainThreadCheckerRuntime_h_
-
-#include "lldb/Target/ABI.h"
-#include "lldb/Target/InstrumentationRuntime.h"
-#include "lldb/Utility/StructuredData.h"
-#include "lldb/lldb-private.h"
-
-namespace lldb_private {
-  
-  class MainThreadCheckerRuntime : public lldb_private::InstrumentationRuntime {
-  public:
-    ~MainThreadCheckerRuntime() override;
-    
-    static lldb::InstrumentationRuntimeSP
-    CreateInstance(const lldb::ProcessSP &process_sp);
-    
-    static void Initialize();
-    
-    static void Terminate();
-    
-    static lldb_private::ConstString GetPluginNameStatic();
-    
-    static lldb::InstrumentationRuntimeType GetTypeStatic();
-    
-    lldb_private::ConstString GetPluginName() override {
-      return GetPluginNameStatic();
-    }
-    
-    virtual lldb::InstrumentationRuntimeType GetType() { return GetTypeStatic(); }
-    
-    uint32_t GetPluginVersion() override { return 1; }
-    
-    lldb::ThreadCollectionSP
-    GetBacktracesFromExtendedStopInfo(StructuredData::ObjectSP info) override;
-    
-  private:
-    MainThreadCheckerRuntime(const lldb::ProcessSP &process_sp)
-    : lldb_private::InstrumentationRuntime(process_sp) {}
-    
-    const RegularExpression &GetPatternForRuntimeLibrary() override;
-    
-    bool CheckIfRuntimeIsValid(const lldb::ModuleSP module_sp) override;
-    
-    void Activate() override;
-    
-    void Deactivate();
-    
-    static bool NotifyBreakpointHit(void *baton,
-                                    StoppointCallbackContext *context,
-                                    lldb::user_id_t break_id,
-                                    lldb::user_id_t break_loc_id);
-    
-    StructuredData::ObjectSP RetrieveReportData(ExecutionContextRef exe_ctx_ref);
-  };
-  
-} // namespace lldb_private
-
-#endif // liblldb_MainThreadCheckerRuntime_h_
diff --git a/gnu/llvm/lldb/source/Plugins/InstrumentationRuntime/TSan/TSanRuntime.cpp b/gnu/llvm/lldb/source/Plugins/InstrumentationRuntime/TSan/TSanRuntime.cpp
deleted file mode 100644 (file)
index 45a3aee..0000000
+++ /dev/null
@@ -1,1064 +0,0 @@
-//===-- TSanRuntime.cpp -----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "TSanRuntime.h"
-
-#include "Plugins/Process/Utility/HistoryThread.h"
-#include "lldb/Breakpoint/StoppointCallbackContext.h"
-#include "lldb/Core/Debugger.h"
-#include "lldb/Core/Module.h"
-#include "lldb/Core/PluginInterface.h"
-#include "lldb/Core/PluginManager.h"
-#include "lldb/Core/StreamFile.h"
-#include "lldb/Core/ValueObject.h"
-#include "lldb/Expression/UserExpression.h"
-#include "lldb/Interpreter/CommandReturnObject.h"
-#include "lldb/Symbol/Symbol.h"
-#include "lldb/Symbol/SymbolContext.h"
-#include "lldb/Symbol/Variable.h"
-#include "lldb/Symbol/VariableList.h"
-#include "lldb/Target/InstrumentationRuntimeStopInfo.h"
-#include "lldb/Target/SectionLoadList.h"
-#include "lldb/Target/StopInfo.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Target/Thread.h"
-#include "lldb/Utility/RegularExpression.h"
-#include "lldb/Utility/Stream.h"
-
-#include <memory>
-
-using namespace lldb;
-using namespace lldb_private;
-
-lldb::InstrumentationRuntimeSP
-ThreadSanitizerRuntime::CreateInstance(const lldb::ProcessSP &process_sp) {
-  return InstrumentationRuntimeSP(new ThreadSanitizerRuntime(process_sp));
-}
-
-void ThreadSanitizerRuntime::Initialize() {
-  PluginManager::RegisterPlugin(
-      GetPluginNameStatic(), "ThreadSanitizer instrumentation runtime plugin.",
-      CreateInstance, GetTypeStatic);
-}
-
-void ThreadSanitizerRuntime::Terminate() {
-  PluginManager::UnregisterPlugin(CreateInstance);
-}
-
-lldb_private::ConstString ThreadSanitizerRuntime::GetPluginNameStatic() {
-  return ConstString("ThreadSanitizer");
-}
-
-lldb::InstrumentationRuntimeType ThreadSanitizerRuntime::GetTypeStatic() {
-  return eInstrumentationRuntimeTypeThreadSanitizer;
-}
-
-ThreadSanitizerRuntime::~ThreadSanitizerRuntime() { Deactivate(); }
-
-const char *thread_sanitizer_retrieve_report_data_prefix = R"(
-extern "C"
-{
-    void *__tsan_get_current_report();
-    int __tsan_get_report_data(void *report, const char **description, int *count,
-                               int *stack_count, int *mop_count, int *loc_count,
-                               int *mutex_count, int *thread_count,
-                               int *unique_tid_count, void **sleep_trace,
-                               unsigned long trace_size);
-    int __tsan_get_report_stack(void *report, unsigned long idx, void **trace,
-                                unsigned long trace_size);
-    int __tsan_get_report_mop(void *report, unsigned long idx, int *tid, void **addr,
-                              int *size, int *write, int *atomic, void **trace,
-                              unsigned long trace_size);
-    int __tsan_get_report_loc(void *report, unsigned long idx, const char **type,
-                              void **addr, unsigned long *start, unsigned long *size, int *tid,
-                              int *fd, int *suppressable, void **trace,
-                              unsigned long trace_size);
-    int __tsan_get_report_mutex(void *report, unsigned long idx, unsigned long *mutex_id, void **addr,
-                                int *destroyed, void **trace, unsigned long trace_size);
-    int __tsan_get_report_thread(void *report, unsigned long idx, int *tid, unsigned long *os_id,
-                                 int *running, const char **name, int *parent_tid,
-                                 void **trace, unsigned long trace_size);
-    int __tsan_get_report_unique_tid(void *report, unsigned long idx, int *tid);
-  
-    // TODO: dlsym won't work on Windows.
-    void *dlsym(void* handle, const char* symbol);
-    int (*ptr__tsan_get_report_loc_object_type)(void *report, unsigned long idx, const char **object_type);
-}
-
-const int REPORT_TRACE_SIZE = 128;
-const int REPORT_ARRAY_SIZE = 4;
-
-struct data {
-    void *report;
-    const char *description;
-    int report_count;
-    
-    void *sleep_trace[REPORT_TRACE_SIZE];
-    
-    int stack_count;
-    struct {
-        int idx;
-        void *trace[REPORT_TRACE_SIZE];
-    } stacks[REPORT_ARRAY_SIZE];
-    
-    int mop_count;
-    struct {
-        int idx;
-        int tid;
-        int size;
-        int write;
-        int atomic;
-        void *addr;
-        void *trace[REPORT_TRACE_SIZE];
-    } mops[REPORT_ARRAY_SIZE];
-    
-    int loc_count;
-    struct {
-        int idx;
-        const char *type;
-        void *addr;
-        unsigned long start;
-        unsigned long size;
-        int tid;
-        int fd;
-        int suppressable;
-        void *trace[REPORT_TRACE_SIZE];
-        const char *object_type;
-    } locs[REPORT_ARRAY_SIZE];
-    
-    int mutex_count;
-    struct {
-        int idx;
-        unsigned long mutex_id;
-        void *addr;
-        int destroyed;
-        void *trace[REPORT_TRACE_SIZE];
-    } mutexes[REPORT_ARRAY_SIZE];
-    
-    int thread_count;
-    struct {
-        int idx;
-        int tid;
-        unsigned long os_id;
-        int running;
-        const char *name;
-        int parent_tid;
-        void *trace[REPORT_TRACE_SIZE];
-    } threads[REPORT_ARRAY_SIZE];
-    
-    int unique_tid_count;
-    struct {
-        int idx;
-        int tid;
-    } unique_tids[REPORT_ARRAY_SIZE];
-};
-)";
-
-const char *thread_sanitizer_retrieve_report_data_command = R"(
-data t = {0};
-
-ptr__tsan_get_report_loc_object_type = (typeof(ptr__tsan_get_report_loc_object_type))(void *)dlsym((void*)-2 /*RTLD_DEFAULT*/, "__tsan_get_report_loc_object_type");
-
-t.report = __tsan_get_current_report();
-__tsan_get_report_data(t.report, &t.description, &t.report_count, &t.stack_count, &t.mop_count, &t.loc_count, &t.mutex_count, &t.thread_count, &t.unique_tid_count, t.sleep_trace, REPORT_TRACE_SIZE);
-
-if (t.stack_count > REPORT_ARRAY_SIZE) t.stack_count = REPORT_ARRAY_SIZE;
-for (int i = 0; i < t.stack_count; i++) {
-    t.stacks[i].idx = i;
-    __tsan_get_report_stack(t.report, i, t.stacks[i].trace, REPORT_TRACE_SIZE);
-}
-
-if (t.mop_count > REPORT_ARRAY_SIZE) t.mop_count = REPORT_ARRAY_SIZE;
-for (int i = 0; i < t.mop_count; i++) {
-    t.mops[i].idx = i;
-    __tsan_get_report_mop(t.report, i, &t.mops[i].tid, &t.mops[i].addr, &t.mops[i].size, &t.mops[i].write, &t.mops[i].atomic, t.mops[i].trace, REPORT_TRACE_SIZE);
-}
-
-if (t.loc_count > REPORT_ARRAY_SIZE) t.loc_count = REPORT_ARRAY_SIZE;
-for (int i = 0; i < t.loc_count; i++) {
-    t.locs[i].idx = i;
-    __tsan_get_report_loc(t.report, i, &t.locs[i].type, &t.locs[i].addr, &t.locs[i].start, &t.locs[i].size, &t.locs[i].tid, &t.locs[i].fd, &t.locs[i].suppressable, t.locs[i].trace, REPORT_TRACE_SIZE);
-    if (ptr__tsan_get_report_loc_object_type)
-        ptr__tsan_get_report_loc_object_type(t.report, i, &t.locs[i].object_type);
-}
-
-if (t.mutex_count > REPORT_ARRAY_SIZE) t.mutex_count = REPORT_ARRAY_SIZE;
-for (int i = 0; i < t.mutex_count; i++) {
-    t.mutexes[i].idx = i;
-    __tsan_get_report_mutex(t.report, i, &t.mutexes[i].mutex_id, &t.mutexes[i].addr, &t.mutexes[i].destroyed, t.mutexes[i].trace, REPORT_TRACE_SIZE);
-}
-
-if (t.thread_count > REPORT_ARRAY_SIZE) t.thread_count = REPORT_ARRAY_SIZE;
-for (int i = 0; i < t.thread_count; i++) {
-    t.threads[i].idx = i;
-    __tsan_get_report_thread(t.report, i, &t.threads[i].tid, &t.threads[i].os_id, &t.threads[i].running, &t.threads[i].name, &t.threads[i].parent_tid, t.threads[i].trace, REPORT_TRACE_SIZE);
-}
-
-if (t.unique_tid_count > REPORT_ARRAY_SIZE) t.unique_tid_count = REPORT_ARRAY_SIZE;
-for (int i = 0; i < t.unique_tid_count; i++) {
-    t.unique_tids[i].idx = i;
-    __tsan_get_report_unique_tid(t.report, i, &t.unique_tids[i].tid);
-}
-
-t;
-)";
-
-static StructuredData::Array *
-CreateStackTrace(ValueObjectSP o,
-                 const std::string &trace_item_name = ".trace") {
-  StructuredData::Array *trace = new StructuredData::Array();
-  ValueObjectSP trace_value_object =
-      o->GetValueForExpressionPath(trace_item_name.c_str());
-  size_t count = trace_value_object->GetNumChildren();
-  for (size_t j = 0; j < count; j++) {
-    addr_t trace_addr =
-        trace_value_object->GetChildAtIndex(j, true)->GetValueAsUnsigned(0);
-    if (trace_addr == 0)
-      break;
-    trace->AddItem(
-        StructuredData::ObjectSP(new StructuredData::Integer(trace_addr)));
-  }
-  return trace;
-}
-
-static StructuredData::Array *ConvertToStructuredArray(
-    ValueObjectSP return_value_sp, const std::string &items_name,
-    const std::string &count_name,
-    std::function<void(ValueObjectSP o, StructuredData::Dictionary *dict)> const
-        &callback) {
-  StructuredData::Array *array = new StructuredData::Array();
-  unsigned int count =
-      return_value_sp->GetValueForExpressionPath(count_name.c_str())
-          ->GetValueAsUnsigned(0);
-  ValueObjectSP objects =
-      return_value_sp->GetValueForExpressionPath(items_name.c_str());
-  for (unsigned int i = 0; i < count; i++) {
-    ValueObjectSP o = objects->GetChildAtIndex(i, true);
-    StructuredData::Dictionary *dict = new StructuredData::Dictionary();
-
-    callback(o, dict);
-
-    array->AddItem(StructuredData::ObjectSP(dict));
-  }
-  return array;
-}
-
-static std::string RetrieveString(ValueObjectSP return_value_sp,
-                                  ProcessSP process_sp,
-                                  const std::string &expression_path) {
-  addr_t ptr =
-      return_value_sp->GetValueForExpressionPath(expression_path.c_str())
-          ->GetValueAsUnsigned(0);
-  std::string str;
-  Status error;
-  process_sp->ReadCStringFromMemory(ptr, str, error);
-  return str;
-}
-
-static void
-GetRenumberedThreadIds(ProcessSP process_sp, ValueObjectSP data,
-                       std::map<uint64_t, user_id_t> &thread_id_map) {
-  ConvertToStructuredArray(
-      data, ".threads", ".thread_count",
-      [process_sp, &thread_id_map](ValueObjectSP o,
-                                   StructuredData::Dictionary *dict) {
-        uint64_t thread_id =
-            o->GetValueForExpressionPath(".tid")->GetValueAsUnsigned(0);
-        uint64_t thread_os_id =
-            o->GetValueForExpressionPath(".os_id")->GetValueAsUnsigned(0);
-        user_id_t lldb_user_id = 0;
-
-        bool can_update = true;
-        ThreadSP lldb_thread = process_sp->GetThreadList().FindThreadByID(
-            thread_os_id, can_update);
-        if (lldb_thread) {
-          lldb_user_id = lldb_thread->GetIndexID();
-        } else {
-          // This isn't a live thread anymore.  Ask process to assign a new
-          // Index ID (or return an old one if we've already seen this
-          // thread_os_id). It will also make sure that no new threads are
-          // assigned this Index ID.
-          lldb_user_id = process_sp->AssignIndexIDToThread(thread_os_id);
-        }
-
-        thread_id_map[thread_id] = lldb_user_id;
-      });
-}
-
-static user_id_t Renumber(uint64_t id,
-                          std::map<uint64_t, user_id_t> &thread_id_map) {
-  auto IT = thread_id_map.find(id);
-  if (IT == thread_id_map.end())
-    return 0;
-
-  return IT->second;
-}
-
-StructuredData::ObjectSP
-ThreadSanitizerRuntime::RetrieveReportData(ExecutionContextRef exe_ctx_ref) {
-  ProcessSP process_sp = GetProcessSP();
-  if (!process_sp)
-    return StructuredData::ObjectSP();
-
-  ThreadSP thread_sp = exe_ctx_ref.GetThreadSP();
-  StackFrameSP frame_sp = thread_sp->GetSelectedFrame();
-
-  if (!frame_sp)
-    return StructuredData::ObjectSP();
-
-  EvaluateExpressionOptions options;
-  options.SetUnwindOnError(true);
-  options.SetTryAllThreads(true);
-  options.SetStopOthers(true);
-  options.SetIgnoreBreakpoints(true);
-  options.SetTimeout(process_sp->GetUtilityExpressionTimeout());
-  options.SetPrefix(thread_sanitizer_retrieve_report_data_prefix);
-  options.SetAutoApplyFixIts(false);
-  options.SetLanguage(eLanguageTypeObjC_plus_plus);
-
-  ValueObjectSP main_value;
-  ExecutionContext exe_ctx;
-  Status eval_error;
-  frame_sp->CalculateExecutionContext(exe_ctx);
-  ExpressionResults result = UserExpression::Evaluate(
-      exe_ctx, options, thread_sanitizer_retrieve_report_data_command, "",
-      main_value, eval_error);
-  if (result != eExpressionCompleted) {
-    process_sp->GetTarget().GetDebugger().GetAsyncOutputStream()->Printf(
-        "Warning: Cannot evaluate ThreadSanitizer expression:\n%s\n",
-        eval_error.AsCString());
-    return StructuredData::ObjectSP();
-  }
-
-  std::map<uint64_t, user_id_t> thread_id_map;
-  GetRenumberedThreadIds(process_sp, main_value, thread_id_map);
-
-  StructuredData::Dictionary *dict = new StructuredData::Dictionary();
-  dict->AddStringItem("instrumentation_class", "ThreadSanitizer");
-  dict->AddStringItem("issue_type",
-                      RetrieveString(main_value, process_sp, ".description"));
-  dict->AddIntegerItem("report_count",
-                       main_value->GetValueForExpressionPath(".report_count")
-                           ->GetValueAsUnsigned(0));
-  dict->AddItem("sleep_trace", StructuredData::ObjectSP(CreateStackTrace(
-                                   main_value, ".sleep_trace")));
-
-  StructuredData::Array *stacks = ConvertToStructuredArray(
-      main_value, ".stacks", ".stack_count",
-      [thread_sp](ValueObjectSP o, StructuredData::Dictionary *dict) {
-        dict->AddIntegerItem(
-            "index",
-            o->GetValueForExpressionPath(".idx")->GetValueAsUnsigned(0));
-        dict->AddItem("trace", StructuredData::ObjectSP(CreateStackTrace(o)));
-        // "stacks" happen on the current thread
-        dict->AddIntegerItem("thread_id", thread_sp->GetIndexID());
-      });
-  dict->AddItem("stacks", StructuredData::ObjectSP(stacks));
-
-  StructuredData::Array *mops = ConvertToStructuredArray(
-      main_value, ".mops", ".mop_count",
-      [&thread_id_map](ValueObjectSP o, StructuredData::Dictionary *dict) {
-        dict->AddIntegerItem(
-            "index",
-            o->GetValueForExpressionPath(".idx")->GetValueAsUnsigned(0));
-        dict->AddIntegerItem(
-            "thread_id",
-            Renumber(
-                o->GetValueForExpressionPath(".tid")->GetValueAsUnsigned(0),
-                thread_id_map));
-        dict->AddIntegerItem(
-            "size",
-            o->GetValueForExpressionPath(".size")->GetValueAsUnsigned(0));
-        dict->AddBooleanItem(
-            "is_write",
-            o->GetValueForExpressionPath(".write")->GetValueAsUnsigned(0));
-        dict->AddBooleanItem(
-            "is_atomic",
-            o->GetValueForExpressionPath(".atomic")->GetValueAsUnsigned(0));
-        dict->AddIntegerItem(
-            "address",
-            o->GetValueForExpressionPath(".addr")->GetValueAsUnsigned(0));
-        dict->AddItem("trace", StructuredData::ObjectSP(CreateStackTrace(o)));
-      });
-  dict->AddItem("mops", StructuredData::ObjectSP(mops));
-
-  StructuredData::Array *locs = ConvertToStructuredArray(
-      main_value, ".locs", ".loc_count",
-      [process_sp, &thread_id_map](ValueObjectSP o,
-                                   StructuredData::Dictionary *dict) {
-        dict->AddIntegerItem(
-            "index",
-            o->GetValueForExpressionPath(".idx")->GetValueAsUnsigned(0));
-        dict->AddStringItem("type", RetrieveString(o, process_sp, ".type"));
-        dict->AddIntegerItem(
-            "address",
-            o->GetValueForExpressionPath(".addr")->GetValueAsUnsigned(0));
-        dict->AddIntegerItem(
-            "start",
-            o->GetValueForExpressionPath(".start")->GetValueAsUnsigned(0));
-        dict->AddIntegerItem(
-            "size",
-            o->GetValueForExpressionPath(".size")->GetValueAsUnsigned(0));
-        dict->AddIntegerItem(
-            "thread_id",
-            Renumber(
-                o->GetValueForExpressionPath(".tid")->GetValueAsUnsigned(0),
-                thread_id_map));
-        dict->AddIntegerItem(
-            "file_descriptor",
-            o->GetValueForExpressionPath(".fd")->GetValueAsUnsigned(0));
-        dict->AddIntegerItem("suppressable",
-                             o->GetValueForExpressionPath(".suppressable")
-                                 ->GetValueAsUnsigned(0));
-        dict->AddItem("trace", StructuredData::ObjectSP(CreateStackTrace(o)));
-        dict->AddStringItem("object_type",
-                            RetrieveString(o, process_sp, ".object_type"));
-      });
-  dict->AddItem("locs", StructuredData::ObjectSP(locs));
-
-  StructuredData::Array *mutexes = ConvertToStructuredArray(
-      main_value, ".mutexes", ".mutex_count",
-      [](ValueObjectSP o, StructuredData::Dictionary *dict) {
-        dict->AddIntegerItem(
-            "index",
-            o->GetValueForExpressionPath(".idx")->GetValueAsUnsigned(0));
-        dict->AddIntegerItem(
-            "mutex_id",
-            o->GetValueForExpressionPath(".mutex_id")->GetValueAsUnsigned(0));
-        dict->AddIntegerItem(
-            "address",
-            o->GetValueForExpressionPath(".addr")->GetValueAsUnsigned(0));
-        dict->AddIntegerItem(
-            "destroyed",
-            o->GetValueForExpressionPath(".destroyed")->GetValueAsUnsigned(0));
-        dict->AddItem("trace", StructuredData::ObjectSP(CreateStackTrace(o)));
-      });
-  dict->AddItem("mutexes", StructuredData::ObjectSP(mutexes));
-
-  StructuredData::Array *threads = ConvertToStructuredArray(
-      main_value, ".threads", ".thread_count",
-      [process_sp, &thread_id_map](ValueObjectSP o,
-                                   StructuredData::Dictionary *dict) {
-        dict->AddIntegerItem(
-            "index",
-            o->GetValueForExpressionPath(".idx")->GetValueAsUnsigned(0));
-        dict->AddIntegerItem(
-            "thread_id",
-            Renumber(
-                o->GetValueForExpressionPath(".tid")->GetValueAsUnsigned(0),
-                thread_id_map));
-        dict->AddIntegerItem(
-            "thread_os_id",
-            o->GetValueForExpressionPath(".os_id")->GetValueAsUnsigned(0));
-        dict->AddIntegerItem(
-            "running",
-            o->GetValueForExpressionPath(".running")->GetValueAsUnsigned(0));
-        dict->AddStringItem("name", RetrieveString(o, process_sp, ".name"));
-        dict->AddIntegerItem(
-            "parent_thread_id",
-            Renumber(o->GetValueForExpressionPath(".parent_tid")
-                         ->GetValueAsUnsigned(0),
-                     thread_id_map));
-        dict->AddItem("trace", StructuredData::ObjectSP(CreateStackTrace(o)));
-      });
-  dict->AddItem("threads", StructuredData::ObjectSP(threads));
-
-  StructuredData::Array *unique_tids = ConvertToStructuredArray(
-      main_value, ".unique_tids", ".unique_tid_count",
-      [&thread_id_map](ValueObjectSP o, StructuredData::Dictionary *dict) {
-        dict->AddIntegerItem(
-            "index",
-            o->GetValueForExpressionPath(".idx")->GetValueAsUnsigned(0));
-        dict->AddIntegerItem(
-            "tid",
-            Renumber(
-                o->GetValueForExpressionPath(".tid")->GetValueAsUnsigned(0),
-                thread_id_map));
-      });
-  dict->AddItem("unique_tids", StructuredData::ObjectSP(unique_tids));
-
-  return StructuredData::ObjectSP(dict);
-}
-
-std::string
-ThreadSanitizerRuntime::FormatDescription(StructuredData::ObjectSP report) {
-  std::string description = report->GetAsDictionary()
-                                ->GetValueForKey("issue_type")
-                                ->GetAsString()
-                                ->GetValue();
-
-  if (description == "data-race") {
-    return "Data race";
-  } else if (description == "data-race-vptr") {
-    return "Data race on C++ virtual pointer";
-  } else if (description == "heap-use-after-free") {
-    return "Use of deallocated memory";
-  } else if (description == "heap-use-after-free-vptr") {
-    return "Use of deallocated C++ virtual pointer";
-  } else if (description == "thread-leak") {
-    return "Thread leak";
-  } else if (description == "locked-mutex-destroy") {
-    return "Destruction of a locked mutex";
-  } else if (description == "mutex-double-lock") {
-    return "Double lock of a mutex";
-  } else if (description == "mutex-invalid-access") {
-    return "Use of an uninitialized or destroyed mutex";
-  } else if (description == "mutex-bad-unlock") {
-    return "Unlock of an unlocked mutex (or by a wrong thread)";
-  } else if (description == "mutex-bad-read-lock") {
-    return "Read lock of a write locked mutex";
-  } else if (description == "mutex-bad-read-unlock") {
-    return "Read unlock of a write locked mutex";
-  } else if (description == "signal-unsafe-call") {
-    return "Signal-unsafe call inside a signal handler";
-  } else if (description == "errno-in-signal-handler") {
-    return "Overwrite of errno in a signal handler";
-  } else if (description == "lock-order-inversion") {
-    return "Lock order inversion (potential deadlock)";
-  } else if (description == "external-race") {
-    return "Race on a library object";
-  } else if (description == "swift-access-race") {
-    return "Swift access race";
-  }
-
-  // for unknown report codes just show the code
-  return description;
-}
-
-static std::string Sprintf(const char *format, ...) {
-  StreamString s;
-  va_list args;
-  va_start(args, format);
-  s.PrintfVarArg(format, args);
-  va_end(args);
-  return s.GetString();
-}
-
-static std::string GetSymbolNameFromAddress(ProcessSP process_sp, addr_t addr) {
-  lldb_private::Address so_addr;
-  if (!process_sp->GetTarget().GetSectionLoadList().ResolveLoadAddress(addr,
-                                                                       so_addr))
-    return "";
-
-  lldb_private::Symbol *symbol = so_addr.CalculateSymbolContextSymbol();
-  if (!symbol)
-    return "";
-
-  std::string sym_name = symbol->GetName().GetCString();
-  return sym_name;
-}
-
-static void GetSymbolDeclarationFromAddress(ProcessSP process_sp, addr_t addr,
-                                            Declaration &decl) {
-  lldb_private::Address so_addr;
-  if (!process_sp->GetTarget().GetSectionLoadList().ResolveLoadAddress(addr,
-                                                                       so_addr))
-    return;
-
-  lldb_private::Symbol *symbol = so_addr.CalculateSymbolContextSymbol();
-  if (!symbol)
-    return;
-
-  ConstString sym_name = symbol->GetMangled().GetName(
-      lldb::eLanguageTypeUnknown, Mangled::ePreferMangled);
-
-  ModuleSP module = symbol->CalculateSymbolContextModule();
-  if (!module)
-    return;
-
-  VariableList var_list;
-  module->FindGlobalVariables(sym_name, nullptr, 1U, var_list);
-  if (var_list.GetSize() < 1)
-    return;
-
-  VariableSP var = var_list.GetVariableAtIndex(0);
-  decl = var->GetDeclaration();
-}
-
-addr_t ThreadSanitizerRuntime::GetFirstNonInternalFramePc(
-    StructuredData::ObjectSP trace, bool skip_one_frame) {
-  ProcessSP process_sp = GetProcessSP();
-  ModuleSP runtime_module_sp = GetRuntimeModuleSP();
-
-  StructuredData::Array *trace_array = trace->GetAsArray();
-  for (size_t i = 0; i < trace_array->GetSize(); i++) {
-    if (skip_one_frame && i == 0)
-      continue;
-
-    addr_t addr;
-    if (!trace_array->GetItemAtIndexAsInteger(i, addr))
-      continue;
-
-    lldb_private::Address so_addr;
-    if (!process_sp->GetTarget().GetSectionLoadList().ResolveLoadAddress(
-            addr, so_addr))
-      continue;
-
-    if (so_addr.GetModule() == runtime_module_sp)
-      continue;
-
-    return addr;
-  }
-
-  return 0;
-}
-
-std::string
-ThreadSanitizerRuntime::GenerateSummary(StructuredData::ObjectSP report) {
-  ProcessSP process_sp = GetProcessSP();
-
-  std::string summary = report->GetAsDictionary()
-                            ->GetValueForKey("description")
-                            ->GetAsString()
-                            ->GetValue();
-  bool skip_one_frame =
-      report->GetObjectForDotSeparatedPath("issue_type")->GetStringValue() ==
-      "external-race";
-
-  addr_t pc = 0;
-  if (report->GetAsDictionary()
-          ->GetValueForKey("mops")
-          ->GetAsArray()
-          ->GetSize() > 0)
-    pc = GetFirstNonInternalFramePc(report->GetAsDictionary()
-                                        ->GetValueForKey("mops")
-                                        ->GetAsArray()
-                                        ->GetItemAtIndex(0)
-                                        ->GetAsDictionary()
-                                        ->GetValueForKey("trace"),
-                                    skip_one_frame);
-
-  if (report->GetAsDictionary()
-          ->GetValueForKey("stacks")
-          ->GetAsArray()
-          ->GetSize() > 0)
-    pc = GetFirstNonInternalFramePc(report->GetAsDictionary()
-                                        ->GetValueForKey("stacks")
-                                        ->GetAsArray()
-                                        ->GetItemAtIndex(0)
-                                        ->GetAsDictionary()
-                                        ->GetValueForKey("trace"),
-                                    skip_one_frame);
-
-  if (pc != 0) {
-    summary = summary + " in " + GetSymbolNameFromAddress(process_sp, pc);
-  }
-
-  if (report->GetAsDictionary()
-          ->GetValueForKey("locs")
-          ->GetAsArray()
-          ->GetSize() > 0) {
-    StructuredData::ObjectSP loc = report->GetAsDictionary()
-                                       ->GetValueForKey("locs")
-                                       ->GetAsArray()
-                                       ->GetItemAtIndex(0);
-    std::string object_type = loc->GetAsDictionary()
-                                  ->GetValueForKey("object_type")
-                                  ->GetAsString()
-                                  ->GetValue();
-    if (!object_type.empty()) {
-      summary = "Race on " + object_type + " object";
-    }
-    addr_t addr = loc->GetAsDictionary()
-                      ->GetValueForKey("address")
-                      ->GetAsInteger()
-                      ->GetValue();
-    if (addr == 0)
-      addr = loc->GetAsDictionary()
-                 ->GetValueForKey("start")
-                 ->GetAsInteger()
-                 ->GetValue();
-
-    if (addr != 0) {
-      std::string global_name = GetSymbolNameFromAddress(process_sp, addr);
-      if (!global_name.empty()) {
-        summary = summary + " at " + global_name;
-      } else {
-        summary = summary + " at " + Sprintf("0x%llx", addr);
-      }
-    } else {
-      int fd = loc->GetAsDictionary()
-                   ->GetValueForKey("file_descriptor")
-                   ->GetAsInteger()
-                   ->GetValue();
-      if (fd != 0) {
-        summary = summary + " on file descriptor " + Sprintf("%d", fd);
-      }
-    }
-  }
-
-  return summary;
-}
-
-addr_t
-ThreadSanitizerRuntime::GetMainRacyAddress(StructuredData::ObjectSP report) {
-  addr_t result = (addr_t)-1;
-
-  report->GetObjectForDotSeparatedPath("mops")->GetAsArray()->ForEach(
-      [&result](StructuredData::Object *o) -> bool {
-        addr_t addr =
-            o->GetObjectForDotSeparatedPath("address")->GetIntegerValue();
-        if (addr < result)
-          result = addr;
-        return true;
-      });
-
-  return (result == (addr_t)-1) ? 0 : result;
-}
-
-std::string ThreadSanitizerRuntime::GetLocationDescription(
-    StructuredData::ObjectSP report, addr_t &global_addr,
-    std::string &global_name, std::string &filename, uint32_t &line) {
-  std::string result = "";
-
-  ProcessSP process_sp = GetProcessSP();
-
-  if (report->GetAsDictionary()
-          ->GetValueForKey("locs")
-          ->GetAsArray()
-          ->GetSize() > 0) {
-    StructuredData::ObjectSP loc = report->GetAsDictionary()
-                                       ->GetValueForKey("locs")
-                                       ->GetAsArray()
-                                       ->GetItemAtIndex(0);
-    std::string type =
-        loc->GetAsDictionary()->GetValueForKey("type")->GetStringValue();
-    if (type == "global") {
-      global_addr = loc->GetAsDictionary()
-                        ->GetValueForKey("address")
-                        ->GetAsInteger()
-                        ->GetValue();
-      global_name = GetSymbolNameFromAddress(process_sp, global_addr);
-      if (!global_name.empty()) {
-        result = Sprintf("'%s' is a global variable (0x%llx)",
-                         global_name.c_str(), global_addr);
-      } else {
-        result = Sprintf("0x%llx is a global variable", global_addr);
-      }
-
-      Declaration decl;
-      GetSymbolDeclarationFromAddress(process_sp, global_addr, decl);
-      if (decl.GetFile()) {
-        filename = decl.GetFile().GetPath();
-        line = decl.GetLine();
-      }
-    } else if (type == "heap") {
-      addr_t addr = loc->GetAsDictionary()
-                        ->GetValueForKey("start")
-                        ->GetAsInteger()
-                        ->GetValue();
-      long size = loc->GetAsDictionary()
-                      ->GetValueForKey("size")
-                      ->GetAsInteger()
-                      ->GetValue();
-      std::string object_type = loc->GetAsDictionary()
-                                    ->GetValueForKey("object_type")
-                                    ->GetAsString()
-                                    ->GetValue();
-      if (!object_type.empty()) {
-        result = Sprintf("Location is a %ld-byte %s object at 0x%llx", size,
-                         object_type.c_str(), addr);
-      } else {
-        result =
-            Sprintf("Location is a %ld-byte heap object at 0x%llx", size, addr);
-      }
-    } else if (type == "stack") {
-      int tid = loc->GetAsDictionary()
-                    ->GetValueForKey("thread_id")
-                    ->GetAsInteger()
-                    ->GetValue();
-      result = Sprintf("Location is stack of thread %d", tid);
-    } else if (type == "tls") {
-      int tid = loc->GetAsDictionary()
-                    ->GetValueForKey("thread_id")
-                    ->GetAsInteger()
-                    ->GetValue();
-      result = Sprintf("Location is TLS of thread %d", tid);
-    } else if (type == "fd") {
-      int fd = loc->GetAsDictionary()
-                   ->GetValueForKey("file_descriptor")
-                   ->GetAsInteger()
-                   ->GetValue();
-      result = Sprintf("Location is file descriptor %d", fd);
-    }
-  }
-
-  return result;
-}
-
-bool ThreadSanitizerRuntime::NotifyBreakpointHit(
-    void *baton, StoppointCallbackContext *context, user_id_t break_id,
-    user_id_t break_loc_id) {
-  assert(baton && "null baton");
-  if (!baton)
-    return false;
-
-  ThreadSanitizerRuntime *const instance =
-      static_cast<ThreadSanitizerRuntime *>(baton);
-
-  ProcessSP process_sp = instance->GetProcessSP();
-
-  if (process_sp->GetModIDRef().IsLastResumeForUserExpression())
-    return false;
-
-  StructuredData::ObjectSP report =
-      instance->RetrieveReportData(context->exe_ctx_ref);
-  std::string stop_reason_description;
-  if (report) {
-    std::string issue_description = instance->FormatDescription(report);
-    report->GetAsDictionary()->AddStringItem("description", issue_description);
-    stop_reason_description = issue_description + " detected";
-    report->GetAsDictionary()->AddStringItem("stop_description",
-                                             stop_reason_description);
-    std::string summary = instance->GenerateSummary(report);
-    report->GetAsDictionary()->AddStringItem("summary", summary);
-    addr_t main_address = instance->GetMainRacyAddress(report);
-    report->GetAsDictionary()->AddIntegerItem("memory_address", main_address);
-
-    addr_t global_addr = 0;
-    std::string global_name = "";
-    std::string location_filename = "";
-    uint32_t location_line = 0;
-    std::string location_description = instance->GetLocationDescription(
-        report, global_addr, global_name, location_filename, location_line);
-    report->GetAsDictionary()->AddStringItem("location_description",
-                                             location_description);
-    if (global_addr != 0) {
-      report->GetAsDictionary()->AddIntegerItem("global_address", global_addr);
-    }
-    if (!global_name.empty()) {
-      report->GetAsDictionary()->AddStringItem("global_name", global_name);
-    }
-    if (location_filename != "") {
-      report->GetAsDictionary()->AddStringItem("location_filename",
-                                               location_filename);
-      report->GetAsDictionary()->AddIntegerItem("location_line", location_line);
-    }
-
-    bool all_addresses_are_same = true;
-    report->GetObjectForDotSeparatedPath("mops")->GetAsArray()->ForEach(
-        [&all_addresses_are_same,
-         main_address](StructuredData::Object *o) -> bool {
-          addr_t addr =
-              o->GetObjectForDotSeparatedPath("address")->GetIntegerValue();
-          if (main_address != addr)
-            all_addresses_are_same = false;
-          return true;
-        });
-    report->GetAsDictionary()->AddBooleanItem("all_addresses_are_same",
-                                              all_addresses_are_same);
-  }
-
-  // Make sure this is the right process
-  if (process_sp && process_sp == context->exe_ctx_ref.GetProcessSP()) {
-    ThreadSP thread_sp = context->exe_ctx_ref.GetThreadSP();
-    if (thread_sp)
-      thread_sp->SetStopInfo(
-          InstrumentationRuntimeStopInfo::
-              CreateStopReasonWithInstrumentationData(
-                  *thread_sp, stop_reason_description, report));
-
-    StreamFile &s = process_sp->GetTarget().GetDebugger().GetOutputStream();
-    s.Printf("ThreadSanitizer report breakpoint hit. Use 'thread "
-             "info -s' to get extended information about the "
-             "report.\n");
-
-    return true; // Return true to stop the target
-  } else
-    return false; // Let target run
-}
-
-const RegularExpression &ThreadSanitizerRuntime::GetPatternForRuntimeLibrary() {
-  static RegularExpression regex(llvm::StringRef("libclang_rt.tsan_"));
-  return regex;
-}
-
-bool ThreadSanitizerRuntime::CheckIfRuntimeIsValid(
-    const lldb::ModuleSP module_sp) {
-  static ConstString g_tsan_get_current_report("__tsan_get_current_report");
-  const Symbol *symbol = module_sp->FindFirstSymbolWithNameAndType(
-      g_tsan_get_current_report, lldb::eSymbolTypeAny);
-  return symbol != nullptr;
-}
-
-void ThreadSanitizerRuntime::Activate() {
-  if (IsActive())
-    return;
-
-  ProcessSP process_sp = GetProcessSP();
-  if (!process_sp)
-    return;
-
-  ConstString symbol_name("__tsan_on_report");
-  const Symbol *symbol = GetRuntimeModuleSP()->FindFirstSymbolWithNameAndType(
-      symbol_name, eSymbolTypeCode);
-
-  if (symbol == nullptr)
-    return;
-
-  if (!symbol->ValueIsAddress() || !symbol->GetAddressRef().IsValid())
-    return;
-
-  Target &target = process_sp->GetTarget();
-  addr_t symbol_address = symbol->GetAddressRef().GetOpcodeLoadAddress(&target);
-
-  if (symbol_address == LLDB_INVALID_ADDRESS)
-    return;
-
-  bool internal = true;
-  bool hardware = false;
-  Breakpoint *breakpoint =
-      process_sp->GetTarget()
-          .CreateBreakpoint(symbol_address, internal, hardware)
-          .get();
-  breakpoint->SetCallback(ThreadSanitizerRuntime::NotifyBreakpointHit, this,
-                          true);
-  breakpoint->SetBreakpointKind("thread-sanitizer-report");
-  SetBreakpointID(breakpoint->GetID());
-
-  SetActive(true);
-}
-
-void ThreadSanitizerRuntime::Deactivate() {
-  if (GetBreakpointID() != LLDB_INVALID_BREAK_ID) {
-    ProcessSP process_sp = GetProcessSP();
-    if (process_sp) {
-      process_sp->GetTarget().RemoveBreakpointByID(GetBreakpointID());
-      SetBreakpointID(LLDB_INVALID_BREAK_ID);
-    }
-  }
-  SetActive(false);
-}
-static std::string GenerateThreadName(const std::string &path,
-                                      StructuredData::Object *o,
-                                      StructuredData::ObjectSP main_info) {
-  std::string result = "additional information";
-
-  if (path == "mops") {
-    int size = o->GetObjectForDotSeparatedPath("size")->GetIntegerValue();
-    int thread_id =
-        o->GetObjectForDotSeparatedPath("thread_id")->GetIntegerValue();
-    bool is_write =
-        o->GetObjectForDotSeparatedPath("is_write")->GetBooleanValue();
-    bool is_atomic =
-        o->GetObjectForDotSeparatedPath("is_atomic")->GetBooleanValue();
-    addr_t addr = o->GetObjectForDotSeparatedPath("address")->GetIntegerValue();
-
-    std::string addr_string = Sprintf(" at 0x%llx", addr);
-
-    if (main_info->GetObjectForDotSeparatedPath("all_addresses_are_same")
-            ->GetBooleanValue()) {
-      addr_string = "";
-    }
-
-    if (main_info->GetObjectForDotSeparatedPath("issue_type")
-            ->GetStringValue() == "external-race") {
-      result = Sprintf("%s access by thread %d",
-                       is_write ? "mutating" : "read-only", thread_id);
-    } else if (main_info->GetObjectForDotSeparatedPath("issue_type")
-                   ->GetStringValue() == "swift-access-race") {
-      result = Sprintf("modifying access by thread %d", thread_id);
-    } else {
-      result = Sprintf("%s%s of size %d%s by thread %d",
-                       is_atomic ? "atomic " : "", is_write ? "write" : "read",
-                       size, addr_string.c_str(), thread_id);
-    }
-  }
-
-  if (path == "threads") {
-    int thread_id =
-        o->GetObjectForDotSeparatedPath("thread_id")->GetIntegerValue();
-    result = Sprintf("Thread %d created", thread_id);
-  }
-
-  if (path == "locs") {
-    std::string type =
-        o->GetAsDictionary()->GetValueForKey("type")->GetStringValue();
-    int thread_id =
-        o->GetObjectForDotSeparatedPath("thread_id")->GetIntegerValue();
-    int fd =
-        o->GetObjectForDotSeparatedPath("file_descriptor")->GetIntegerValue();
-    if (type == "heap") {
-      result = Sprintf("Heap block allocated by thread %d", thread_id);
-    } else if (type == "fd") {
-      result =
-          Sprintf("File descriptor %d created by thread %t", fd, thread_id);
-    }
-  }
-
-  if (path == "mutexes") {
-    int mutex_id =
-        o->GetObjectForDotSeparatedPath("mutex_id")->GetIntegerValue();
-
-    result = Sprintf("Mutex M%d created", mutex_id);
-  }
-
-  if (path == "stacks") {
-    int thread_id =
-        o->GetObjectForDotSeparatedPath("thread_id")->GetIntegerValue();
-    result = Sprintf("Thread %d", thread_id);
-  }
-
-  result[0] = toupper(result[0]);
-
-  return result;
-}
-
-static void AddThreadsForPath(const std::string &path,
-                              ThreadCollectionSP threads, ProcessSP process_sp,
-                              StructuredData::ObjectSP info) {
-  info->GetObjectForDotSeparatedPath(path)->GetAsArray()->ForEach(
-      [process_sp, threads, path, info](StructuredData::Object *o) -> bool {
-        std::vector<lldb::addr_t> pcs;
-        o->GetObjectForDotSeparatedPath("trace")->GetAsArray()->ForEach(
-            [&pcs](StructuredData::Object *pc) -> bool {
-              pcs.push_back(pc->GetAsInteger()->GetValue());
-              return true;
-            });
-
-        if (pcs.size() == 0)
-          return true;
-
-        StructuredData::ObjectSP thread_id_obj =
-            o->GetObjectForDotSeparatedPath("thread_os_id");
-        tid_t tid = thread_id_obj ? thread_id_obj->GetIntegerValue() : 0;
-
-        HistoryThread *history_thread =
-            new HistoryThread(*process_sp, tid, pcs);
-        ThreadSP new_thread_sp(history_thread);
-        new_thread_sp->SetName(GenerateThreadName(path, o, info).c_str());
-
-        // Save this in the Process' ExtendedThreadList so a strong pointer
-        // retains the object
-        process_sp->GetExtendedThreadList().AddThread(new_thread_sp);
-        threads->AddThread(new_thread_sp);
-
-        return true;
-      });
-}
-
-lldb::ThreadCollectionSP
-ThreadSanitizerRuntime::GetBacktracesFromExtendedStopInfo(
-    StructuredData::ObjectSP info) {
-  ThreadCollectionSP threads;
-  threads = std::make_shared<ThreadCollection>();
-
-  if (info->GetObjectForDotSeparatedPath("instrumentation_class")
-          ->GetStringValue() != "ThreadSanitizer")
-    return threads;
-
-  ProcessSP process_sp = GetProcessSP();
-
-  AddThreadsForPath("stacks", threads, process_sp, info);
-  AddThreadsForPath("mops", threads, process_sp, info);
-  AddThreadsForPath("locs", threads, process_sp, info);
-  AddThreadsForPath("mutexes", threads, process_sp, info);
-  AddThreadsForPath("threads", threads, process_sp, info);
-
-  return threads;
-}
diff --git a/gnu/llvm/lldb/source/Plugins/InstrumentationRuntime/TSan/TSanRuntime.h b/gnu/llvm/lldb/source/Plugins/InstrumentationRuntime/TSan/TSanRuntime.h
deleted file mode 100644 (file)
index db8bb1d..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-//===-- TSanRuntime.h -------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_ThreadSanitizerRuntime_h_
-#define liblldb_ThreadSanitizerRuntime_h_
-
-#include "lldb/Target/ABI.h"
-#include "lldb/Target/InstrumentationRuntime.h"
-#include "lldb/Utility/StructuredData.h"
-#include "lldb/lldb-private.h"
-
-namespace lldb_private {
-
-class ThreadSanitizerRuntime : public lldb_private::InstrumentationRuntime {
-public:
-  ~ThreadSanitizerRuntime() override;
-
-  static lldb::InstrumentationRuntimeSP
-  CreateInstance(const lldb::ProcessSP &process_sp);
-
-  static void Initialize();
-
-  static void Terminate();
-
-  static lldb_private::ConstString GetPluginNameStatic();
-
-  static lldb::InstrumentationRuntimeType GetTypeStatic();
-
-  lldb_private::ConstString GetPluginName() override {
-    return GetPluginNameStatic();
-  }
-
-  virtual lldb::InstrumentationRuntimeType GetType() { return GetTypeStatic(); }
-
-  uint32_t GetPluginVersion() override { return 1; }
-
-  lldb::ThreadCollectionSP
-  GetBacktracesFromExtendedStopInfo(StructuredData::ObjectSP info) override;
-
-private:
-  ThreadSanitizerRuntime(const lldb::ProcessSP &process_sp)
-      : lldb_private::InstrumentationRuntime(process_sp) {}
-
-  const RegularExpression &GetPatternForRuntimeLibrary() override;
-
-  bool CheckIfRuntimeIsValid(const lldb::ModuleSP module_sp) override;
-
-  void Activate() override;
-
-  void Deactivate();
-
-  static bool NotifyBreakpointHit(void *baton,
-                                  StoppointCallbackContext *context,
-                                  lldb::user_id_t break_id,
-                                  lldb::user_id_t break_loc_id);
-
-  StructuredData::ObjectSP RetrieveReportData(ExecutionContextRef exe_ctx_ref);
-
-  std::string FormatDescription(StructuredData::ObjectSP report);
-
-  std::string GenerateSummary(StructuredData::ObjectSP report);
-
-  lldb::addr_t GetMainRacyAddress(StructuredData::ObjectSP report);
-
-  std::string GetLocationDescription(StructuredData::ObjectSP report,
-                                     lldb::addr_t &global_addr,
-                                     std::string &global_name,
-                                     std::string &filename, uint32_t &line);
-
-  lldb::addr_t GetFirstNonInternalFramePc(StructuredData::ObjectSP trace,
-                                          bool skip_one_frame = false);
-};
-
-} // namespace lldb_private
-
-#endif // liblldb_ThreadSanitizerRuntime_h_
diff --git a/gnu/llvm/lldb/source/Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.cpp b/gnu/llvm/lldb/source/Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.cpp
deleted file mode 100644 (file)
index 137ecab..0000000
+++ /dev/null
@@ -1,341 +0,0 @@
-//===-- UBSanRuntime.cpp ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "UBSanRuntime.h"
-
-#include "Plugins/Process/Utility/HistoryThread.h"
-#include "lldb/Breakpoint/StoppointCallbackContext.h"
-#include "lldb/Core/Debugger.h"
-#include "lldb/Core/Module.h"
-#include "lldb/Core/PluginInterface.h"
-#include "lldb/Core/PluginManager.h"
-#include "lldb/Core/StreamFile.h"
-#include "lldb/Core/ValueObject.h"
-#include "lldb/Expression/UserExpression.h"
-#include "lldb/Interpreter/CommandReturnObject.h"
-#include "lldb/Symbol/Symbol.h"
-#include "lldb/Symbol/SymbolContext.h"
-#include "lldb/Symbol/Variable.h"
-#include "lldb/Symbol/VariableList.h"
-#include "lldb/Target/InstrumentationRuntimeStopInfo.h"
-#include "lldb/Target/SectionLoadList.h"
-#include "lldb/Target/StopInfo.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Target/Thread.h"
-#include "lldb/Utility/RegularExpression.h"
-#include "lldb/Utility/Stream.h"
-#include <ctype.h>
-
-#include <memory>
-
-using namespace lldb;
-using namespace lldb_private;
-
-UndefinedBehaviorSanitizerRuntime::~UndefinedBehaviorSanitizerRuntime() {
-  Deactivate();
-}
-
-lldb::InstrumentationRuntimeSP
-UndefinedBehaviorSanitizerRuntime::CreateInstance(
-    const lldb::ProcessSP &process_sp) {
-  return InstrumentationRuntimeSP(
-      new UndefinedBehaviorSanitizerRuntime(process_sp));
-}
-
-void UndefinedBehaviorSanitizerRuntime::Initialize() {
-  PluginManager::RegisterPlugin(
-      GetPluginNameStatic(),
-      "UndefinedBehaviorSanitizer instrumentation runtime plugin.",
-      CreateInstance, GetTypeStatic);
-}
-
-void UndefinedBehaviorSanitizerRuntime::Terminate() {
-  PluginManager::UnregisterPlugin(CreateInstance);
-}
-
-lldb_private::ConstString
-UndefinedBehaviorSanitizerRuntime::GetPluginNameStatic() {
-  return ConstString("UndefinedBehaviorSanitizer");
-}
-
-lldb::InstrumentationRuntimeType
-UndefinedBehaviorSanitizerRuntime::GetTypeStatic() {
-  return eInstrumentationRuntimeTypeUndefinedBehaviorSanitizer;
-}
-
-static const char *ub_sanitizer_retrieve_report_data_prefix = R"(
-extern "C" {
-void
-__ubsan_get_current_report_data(const char **OutIssueKind,
-    const char **OutMessage, const char **OutFilename, unsigned *OutLine,
-    unsigned *OutCol, char **OutMemoryAddr);
-}
-
-struct data {
-  const char *issue_kind;
-  const char *message;
-  const char *filename;
-  unsigned line;
-  unsigned col;
-  char *memory_addr;
-};
-)";
-
-static const char *ub_sanitizer_retrieve_report_data_command = R"(
-data t;
-__ubsan_get_current_report_data(&t.issue_kind, &t.message, &t.filename, &t.line,
-                                &t.col, &t.memory_addr);
-t;
-)";
-
-static addr_t RetrieveUnsigned(ValueObjectSP return_value_sp,
-                               ProcessSP process_sp,
-                               const std::string &expression_path) {
-  return return_value_sp->GetValueForExpressionPath(expression_path.c_str())
-      ->GetValueAsUnsigned(0);
-}
-
-static std::string RetrieveString(ValueObjectSP return_value_sp,
-                                  ProcessSP process_sp,
-                                  const std::string &expression_path) {
-  addr_t ptr = RetrieveUnsigned(return_value_sp, process_sp, expression_path);
-  std::string str;
-  Status error;
-  process_sp->ReadCStringFromMemory(ptr, str, error);
-  return str;
-}
-
-StructuredData::ObjectSP UndefinedBehaviorSanitizerRuntime::RetrieveReportData(
-    ExecutionContextRef exe_ctx_ref) {
-  ProcessSP process_sp = GetProcessSP();
-  if (!process_sp)
-    return StructuredData::ObjectSP();
-
-  ThreadSP thread_sp = exe_ctx_ref.GetThreadSP();
-  StackFrameSP frame_sp = thread_sp->GetSelectedFrame();
-  ModuleSP runtime_module_sp = GetRuntimeModuleSP();
-  Target &target = process_sp->GetTarget();
-
-  if (!frame_sp)
-    return StructuredData::ObjectSP();
-
-  StreamFileSP Stream = target.GetDebugger().GetOutputStreamSP();
-
-  EvaluateExpressionOptions options;
-  options.SetUnwindOnError(true);
-  options.SetTryAllThreads(true);
-  options.SetStopOthers(true);
-  options.SetIgnoreBreakpoints(true);
-  options.SetTimeout(process_sp->GetUtilityExpressionTimeout());
-  options.SetPrefix(ub_sanitizer_retrieve_report_data_prefix);
-  options.SetAutoApplyFixIts(false);
-  options.SetLanguage(eLanguageTypeObjC_plus_plus);
-
-  ValueObjectSP main_value;
-  ExecutionContext exe_ctx;
-  Status eval_error;
-  frame_sp->CalculateExecutionContext(exe_ctx);
-  ExpressionResults result = UserExpression::Evaluate(
-      exe_ctx, options, ub_sanitizer_retrieve_report_data_command, "",
-      main_value, eval_error);
-  if (result != eExpressionCompleted) {
-    target.GetDebugger().GetAsyncOutputStream()->Printf(
-        "Warning: Cannot evaluate UndefinedBehaviorSanitizer expression:\n%s\n",
-        eval_error.AsCString());
-    return StructuredData::ObjectSP();
-  }
-
-  // Gather the PCs of the user frames in the backtrace.
-  StructuredData::Array *trace = new StructuredData::Array();
-  auto trace_sp = StructuredData::ObjectSP(trace);
-  for (unsigned I = 0; I < thread_sp->GetStackFrameCount(); ++I) {
-    const Address FCA =
-        thread_sp->GetStackFrameAtIndex(I)->GetFrameCodeAddress();
-    if (FCA.GetModule() == runtime_module_sp) // Skip PCs from the runtime.
-      continue;
-
-    lldb::addr_t PC = FCA.GetLoadAddress(&target);
-    trace->AddItem(StructuredData::ObjectSP(new StructuredData::Integer(PC)));
-  }
-
-  std::string IssueKind = RetrieveString(main_value, process_sp, ".issue_kind");
-  std::string ErrMessage = RetrieveString(main_value, process_sp, ".message");
-  std::string Filename = RetrieveString(main_value, process_sp, ".filename");
-  unsigned Line = RetrieveUnsigned(main_value, process_sp, ".line");
-  unsigned Col = RetrieveUnsigned(main_value, process_sp, ".col");
-  uintptr_t MemoryAddr =
-      RetrieveUnsigned(main_value, process_sp, ".memory_addr");
-
-  auto *d = new StructuredData::Dictionary();
-  auto dict_sp = StructuredData::ObjectSP(d);
-  d->AddStringItem("instrumentation_class", "UndefinedBehaviorSanitizer");
-  d->AddStringItem("description", IssueKind);
-  d->AddStringItem("summary", ErrMessage);
-  d->AddStringItem("filename", Filename);
-  d->AddIntegerItem("line", Line);
-  d->AddIntegerItem("col", Col);
-  d->AddIntegerItem("memory_address", MemoryAddr);
-  d->AddIntegerItem("tid", thread_sp->GetID());
-  d->AddItem("trace", trace_sp);
-  return dict_sp;
-}
-
-static std::string GetStopReasonDescription(StructuredData::ObjectSP report) {
-  llvm::StringRef stop_reason_description_ref;
-  report->GetAsDictionary()->GetValueForKeyAsString("description",
-                                                    stop_reason_description_ref);
-  std::string stop_reason_description = stop_reason_description_ref;
-
-  if (!stop_reason_description.size()) {
-    stop_reason_description = "Undefined behavior detected";
-  } else {
-    stop_reason_description[0] = toupper(stop_reason_description[0]);
-    for (unsigned I = 1; I < stop_reason_description.size(); ++I)
-      if (stop_reason_description[I] == '-')
-        stop_reason_description[I] = ' ';
-  }
-  return stop_reason_description;
-}
-
-bool UndefinedBehaviorSanitizerRuntime::NotifyBreakpointHit(
-    void *baton, StoppointCallbackContext *context, user_id_t break_id,
-    user_id_t break_loc_id) {
-  assert(baton && "null baton");
-  if (!baton)
-    return false; ///< false => resume execution.
-
-  UndefinedBehaviorSanitizerRuntime *const instance =
-      static_cast<UndefinedBehaviorSanitizerRuntime *>(baton);
-
-  ProcessSP process_sp = instance->GetProcessSP();
-  ThreadSP thread_sp = context->exe_ctx_ref.GetThreadSP();
-  if (!process_sp || !thread_sp ||
-      process_sp != context->exe_ctx_ref.GetProcessSP())
-    return false;
-
-  if (process_sp->GetModIDRef().IsLastResumeForUserExpression())
-    return false;
-
-  StructuredData::ObjectSP report =
-      instance->RetrieveReportData(context->exe_ctx_ref);
-
-  if (report) {
-    thread_sp->SetStopInfo(
-        InstrumentationRuntimeStopInfo::CreateStopReasonWithInstrumentationData(
-            *thread_sp, GetStopReasonDescription(report), report));
-    return true;
-  }
-
-  return false;
-}
-
-const RegularExpression &
-UndefinedBehaviorSanitizerRuntime::GetPatternForRuntimeLibrary() {
-  static RegularExpression regex(llvm::StringRef("libclang_rt\\.(a|t|ub)san_"));
-  return regex;
-}
-
-bool UndefinedBehaviorSanitizerRuntime::CheckIfRuntimeIsValid(
-    const lldb::ModuleSP module_sp) {
-  static ConstString ubsan_test_sym("__ubsan_on_report");
-  const Symbol *symbol = module_sp->FindFirstSymbolWithNameAndType(
-      ubsan_test_sym, lldb::eSymbolTypeAny);
-  return symbol != nullptr;
-}
-
-// FIXME: Factor out all the logic we have in common with the {a,t}san plugins.
-void UndefinedBehaviorSanitizerRuntime::Activate() {
-  if (IsActive())
-    return;
-
-  ProcessSP process_sp = GetProcessSP();
-  if (!process_sp)
-    return;
-
-  ModuleSP runtime_module_sp = GetRuntimeModuleSP();
-
-  ConstString symbol_name("__ubsan_on_report");
-  const Symbol *symbol = runtime_module_sp->FindFirstSymbolWithNameAndType(
-      symbol_name, eSymbolTypeCode);
-
-  if (symbol == nullptr)
-    return;
-
-  if (!symbol->ValueIsAddress() || !symbol->GetAddressRef().IsValid())
-    return;
-
-  Target &target = process_sp->GetTarget();
-  addr_t symbol_address = symbol->GetAddressRef().GetOpcodeLoadAddress(&target);
-
-  if (symbol_address == LLDB_INVALID_ADDRESS)
-    return;
-
-  Breakpoint *breakpoint =
-      process_sp->GetTarget()
-          .CreateBreakpoint(symbol_address, /*internal=*/true,
-                            /*hardware=*/false)
-          .get();
-  breakpoint->SetCallback(
-      UndefinedBehaviorSanitizerRuntime::NotifyBreakpointHit, this, true);
-  breakpoint->SetBreakpointKind("undefined-behavior-sanitizer-report");
-  SetBreakpointID(breakpoint->GetID());
-
-  SetActive(true);
-}
-
-void UndefinedBehaviorSanitizerRuntime::Deactivate() {
-  SetActive(false);
-
-  auto BID = GetBreakpointID();
-  if (BID == LLDB_INVALID_BREAK_ID)
-    return;
-
-  if (ProcessSP process_sp = GetProcessSP()) {
-    process_sp->GetTarget().RemoveBreakpointByID(BID);
-    SetBreakpointID(LLDB_INVALID_BREAK_ID);
-  }
-}
-
-lldb::ThreadCollectionSP
-UndefinedBehaviorSanitizerRuntime::GetBacktracesFromExtendedStopInfo(
-    StructuredData::ObjectSP info) {
-  ThreadCollectionSP threads;
-  threads = std::make_shared<ThreadCollection>();
-
-  ProcessSP process_sp = GetProcessSP();
-
-  if (info->GetObjectForDotSeparatedPath("instrumentation_class")
-          ->GetStringValue() != "UndefinedBehaviorSanitizer")
-    return threads;
-
-  std::vector<lldb::addr_t> PCs;
-  auto trace = info->GetObjectForDotSeparatedPath("trace")->GetAsArray();
-  trace->ForEach([&PCs](StructuredData::Object *PC) -> bool {
-    PCs.push_back(PC->GetAsInteger()->GetValue());
-    return true;
-  });
-
-  if (PCs.empty())
-    return threads;
-
-  StructuredData::ObjectSP thread_id_obj =
-      info->GetObjectForDotSeparatedPath("tid");
-  tid_t tid = thread_id_obj ? thread_id_obj->GetIntegerValue() : 0;
-
-  HistoryThread *history_thread = new HistoryThread(*process_sp, tid, PCs);
-  ThreadSP new_thread_sp(history_thread);
-  std::string stop_reason_description = GetStopReasonDescription(info);
-  new_thread_sp->SetName(stop_reason_description.c_str());
-
-  // Save this in the Process' ExtendedThreadList so a strong pointer retains
-  // the object
-  process_sp->GetExtendedThreadList().AddThread(new_thread_sp);
-  threads->AddThread(new_thread_sp);
-
-  return threads;
-}
diff --git a/gnu/llvm/lldb/source/Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.h b/gnu/llvm/lldb/source/Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.h
deleted file mode 100644 (file)
index 1d854b7..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-//===-- UBSanRuntime.h ------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_UndefinedBehaviorSanitizerRuntime_h_
-#define liblldb_UndefinedBehaviorSanitizerRuntime_h_
-
-#include "lldb/Target/ABI.h"
-#include "lldb/Target/InstrumentationRuntime.h"
-#include "lldb/Utility/StructuredData.h"
-#include "lldb/lldb-private.h"
-
-namespace lldb_private {
-
-class UndefinedBehaviorSanitizerRuntime
-    : public lldb_private::InstrumentationRuntime {
-public:
-  ~UndefinedBehaviorSanitizerRuntime() override;
-
-  static lldb::InstrumentationRuntimeSP
-  CreateInstance(const lldb::ProcessSP &process_sp);
-
-  static void Initialize();
-
-  static void Terminate();
-
-  static lldb_private::ConstString GetPluginNameStatic();
-
-  static lldb::InstrumentationRuntimeType GetTypeStatic();
-
-  lldb_private::ConstString GetPluginName() override {
-    return GetPluginNameStatic();
-  }
-
-  virtual lldb::InstrumentationRuntimeType GetType() { return GetTypeStatic(); }
-
-  uint32_t GetPluginVersion() override { return 1; }
-
-  lldb::ThreadCollectionSP
-  GetBacktracesFromExtendedStopInfo(StructuredData::ObjectSP info) override;
-
-private:
-  UndefinedBehaviorSanitizerRuntime(const lldb::ProcessSP &process_sp)
-      : lldb_private::InstrumentationRuntime(process_sp) {}
-
-  const RegularExpression &GetPatternForRuntimeLibrary() override;
-
-  bool CheckIfRuntimeIsValid(const lldb::ModuleSP module_sp) override;
-
-  void Activate() override;
-
-  void Deactivate();
-
-  static bool NotifyBreakpointHit(void *baton,
-                                  StoppointCallbackContext *context,
-                                  lldb::user_id_t break_id,
-                                  lldb::user_id_t break_loc_id);
-
-  StructuredData::ObjectSP RetrieveReportData(ExecutionContextRef exe_ctx_ref);
-};
-
-} // namespace lldb_private
-
-#endif // liblldb_UndefinedBehaviorSanitizerRuntime_h_
diff --git a/gnu/llvm/lldb/source/Plugins/LanguageRuntime/Go/CMakeLists.txt b/gnu/llvm/lldb/source/Plugins/LanguageRuntime/Go/CMakeLists.txt
deleted file mode 100644 (file)
index 62418de..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-set(LLVM_NO_RTTI 1)
-
-add_lldb_library(lldbPluginLanguageRuntimeGo PLUGIN
-  LINK_LIBS
-    lldbBreakpoint
-    lldbCore
-    lldbSymbol
-    lldbTarget
-  LINK_COMPONENTS
-    Support
-  )
index bca575b..c54e832 100644 (file)
@@ -2750,11 +2750,13 @@ Symtab *ObjectFileELF::GetSymtab() {
     //      also be present.
     const ELFDynamic *symbol = FindDynamicSymbol(DT_JMPREL);
     if (symbol) {
+      const ELFDynamic *pltrelsz = FindDynamicSymbol(DT_PLTRELSZ);
+      assert(pltrelsz != NULL);
       // Synthesize trampoline symbols to help navigate the PLT.
       addr_t addr = symbol->d_ptr;
       Section *reloc_section =
           section_list->FindSectionContainingFileAddress(addr).get();
-      if (reloc_section) {
+      if (reloc_section && pltrelsz->d_val > 0) {
         user_id_t reloc_id = reloc_section->GetID();
         const ELFSectionHeaderInfo *reloc_header =
             GetSectionHeaderByIndex(reloc_id);
index a743970..98f255f 100644 (file)
@@ -93,7 +93,7 @@ ConstString PlatformOpenBSD::GetPluginName() {
 }
 
 void PlatformOpenBSD::Initialize() {
-  Platform::Initialize();
+  PlatformPOSIX::Initialize();
 
   if (g_initialize_count++ == 0) {
 #if defined(__OpenBSD__)
@@ -192,9 +192,128 @@ void PlatformOpenBSD::GetStatus(Stream &strm) {
 #endif
 }
 
-// OpenBSD processes cannot yet be launched by spawning and attaching.
 bool PlatformOpenBSD::CanDebugProcess() {
-  return false;
+       if (IsHost()) {
+               return true;
+       } else {
+               // If we're connected, we can debug.
+               return IsConnected();
+       }
+}
+
+// For local debugging, OpenBSD will override the debug logic to use llgs-launch
+// rather than lldb-launch, llgs-attach.  This differs from current lldb-
+// launch, debugserver-attach approach on MacOSX.
+lldb::ProcessSP
+PlatformOpenBSD::DebugProcess(ProcessLaunchInfo &launch_info, Debugger &debugger,
+                             Target *target, // Can be NULL, if NULL create a new
+                                             // target, else use existing one
+                             Status &error) {
+  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PLATFORM));
+  LLDB_LOG(log, "target {0}", target);
+
+  // If we're a remote host, use standard behavior from parent class.
+  if (!IsHost())
+    return PlatformPOSIX::DebugProcess(launch_info, debugger, target, error);
+
+  //
+  // For local debugging, we'll insist on having ProcessGDBRemote create the
+  // process.
+  //
+
+  ProcessSP process_sp;
+
+  // Make sure we stop at the entry point
+  launch_info.GetFlags().Set(eLaunchFlagDebug);
+
+  // We always launch the process we are going to debug in a separate process
+  // group, since then we can handle ^C interrupts ourselves w/o having to
+  // worry about the target getting them as well.
+  launch_info.SetLaunchInSeparateProcessGroup(true);
+
+  // Ensure we have a target.
+  if (target == nullptr) {
+    LLDB_LOG(log, "creating new target");
+    TargetSP new_target_sp;
+    error = debugger.GetTargetList().CreateTarget(debugger, "", "", eLoadDependentsNo,
+                                                  nullptr, new_target_sp);
+    if (error.Fail()) {
+      LLDB_LOG(log, "failed to create new target: {0}", error);
+      return process_sp;
+    }
+
+    target = new_target_sp.get();
+    if (!target) {
+      error.SetErrorString("CreateTarget() returned nullptr");
+      LLDB_LOG(log, "error: {0}", error);
+      return process_sp;
+    }
+  }
+
+  // Mark target as currently selected target.
+  debugger.GetTargetList().SetSelectedTarget(target);
+
+  // Now create the gdb-remote process.
+  LLDB_LOG(log, "having target create process with gdb-remote plugin");
+  process_sp = target->CreateProcess(
+      launch_info.GetListener(), "gdb-remote", nullptr);
+
+  if (!process_sp) {
+    error.SetErrorString("CreateProcess() failed for gdb-remote process");
+    LLDB_LOG(log, "error: {0}", error);
+    return process_sp;
+  }
+
+  LLDB_LOG(log, "successfully created process");
+  // Adjust launch for a hijacker.
+  ListenerSP listener_sp;
+  if (!launch_info.GetHijackListener()) {
+    LLDB_LOG(log, "setting up hijacker");
+    listener_sp =
+        Listener::MakeListener("lldb.PlatformOpenBSD.DebugProcess.hijack");
+    launch_info.SetHijackListener(listener_sp);
+    process_sp->HijackProcessEvents(listener_sp);
+  }
+
+  // Log file actions.
+  if (log) {
+    LLDB_LOG(log, "launching process with the following file actions:");
+    StreamString stream;
+    size_t i = 0;
+    const FileAction *file_action;
+    while ((file_action = launch_info.GetFileActionAtIndex(i++)) != nullptr) {
+      file_action->Dump(stream);
+      LLDB_LOG(log, "{0}", stream.GetData());
+      stream.Clear();
+    }
+  }
+
+  // Do the launch.
+  error = process_sp->Launch(launch_info);
+  if (error.Success()) {
+    // Handle the hijacking of process events.
+    if (listener_sp) {
+      const StateType state = process_sp->WaitForProcessToStop(
+          llvm::None, NULL, false, listener_sp);
+
+      LLDB_LOG(log, "pid {0} state {0}", process_sp->GetID(), state);
+    }
+
+    // Hook up process PTY if we have one (which we should for local debugging
+    // with llgs).
+    int pty_fd = launch_info.GetPTY().ReleasePrimaryFileDescriptor();
+    if (pty_fd != PseudoTerminal::invalid_fd) {
+      process_sp->SetSTDIOFileDescriptor(pty_fd);
+      LLDB_LOG(log, "hooked up STDIO pty to process");
+    } else
+      LLDB_LOG(log, "not using process STDIO pty");
+  } else {
+    LLDB_LOG(log, "process launch failed: {0}", error);
+    // FIXME figure out appropriate cleanup here.  Do we delete the target? Do
+    // we delete the process?  Does our caller do that?
+  }
+
+  return process_sp;
 }
 
 void PlatformOpenBSD::CalculateTrapHandlerSymbolNames() {
@@ -215,3 +334,13 @@ MmapArgList PlatformOpenBSD::GetMmapArgumentList(const ArchSpec &arch,
   MmapArgList args({addr, length, prot, flags_platform, fd, offset});
   return args;
 }
+
+FileSpec PlatformOpenBSD::LocateExecutable(const char *basename) {
+
+  std::string check = std::string("/usr/bin/") + basename;
+  if (access(check.c_str(), X_OK) == 0) {
+    return FileSpec(check);
+  }
+
+  return FileSpec();
+}
index 9cfe32c..8d9e867 100644 (file)
@@ -46,6 +46,9 @@ public:
 
   bool CanDebugProcess() override;
 
+  lldb::ProcessSP DebugProcess(ProcessLaunchInfo &launch_info, Debugger &debugger,
+                               Target *target, Status &error) override;
+
   void CalculateTrapHandlerSymbolNames() override;
 
   MmapArgList GetMmapArgumentList(const ArchSpec &arch, lldb::addr_t addr,
@@ -53,6 +56,8 @@ public:
                                   unsigned flags, lldb::addr_t fd,
                                   lldb::addr_t offset) override;
 
+  lldb_private::FileSpec LocateExecutable(const char *basename) override;
+
 private:
   PlatformOpenBSD(const PlatformOpenBSD &) = delete;
   const PlatformOpenBSD &operator=(const PlatformOpenBSD &) = delete;
index fdeb211..bc80f93 100644 (file)
@@ -7,6 +7,9 @@ elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
 elseif (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
   add_subdirectory(NetBSD)
   add_subdirectory(POSIX)
+elseif (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
+  add_subdirectory(OpenBSD)
+  add_subdirectory(POSIX)
 elseif (CMAKE_SYSTEM_NAME MATCHES "Windows")
   add_subdirectory(Windows/Common)
 elseif (CMAKE_SYSTEM_NAME MATCHES "Darwin")
diff --git a/gnu/llvm/lldb/source/Plugins/Process/Darwin/CFBundle.cpp b/gnu/llvm/lldb/source/Plugins/Process/Darwin/CFBundle.cpp
deleted file mode 100644 (file)
index 3cdd2fa..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-//===-- CFBundle.cpp --------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-//  Created by Greg Clayton on 1/16/08.
-//
-//===----------------------------------------------------------------------===//
-
-#include "CFBundle.h"
-#include "CFString.h"
-
-// CFBundle constructor
-CFBundle::CFBundle(const char *path)
-    : CFReleaser<CFBundleRef>(), m_bundle_url() {
-  if (path && path[0])
-    SetPath(path);
-}
-
-// CFBundle copy constructor
-CFBundle::CFBundle(const CFBundle &rhs)
-    : CFReleaser<CFBundleRef>(rhs), m_bundle_url(rhs.m_bundle_url) {}
-
-// CFBundle copy constructor
-CFBundle &CFBundle::operator=(const CFBundle &rhs) {
-  *this = rhs;
-  return *this;
-}
-
-// Destructor
-CFBundle::~CFBundle() {}
-
-// Set the path for a bundle by supplying a
-bool CFBundle::SetPath(const char *path) {
-  CFAllocatorRef alloc = kCFAllocatorDefault;
-  // Release our old bundle and ULR
-  reset(); // This class is a CFReleaser<CFBundleRef>
-  m_bundle_url.reset();
-  // Make a CFStringRef from the supplied path
-  CFString cf_path;
-  cf_path.SetFileSystemRepresentation(path);
-  if (cf_path.get()) {
-    // Make our Bundle URL
-    m_bundle_url.reset(::CFURLCreateWithFileSystemPath(
-        alloc, cf_path.get(), kCFURLPOSIXPathStyle, true));
-    if (m_bundle_url.get()) {
-      reset(::CFBundleCreate(alloc, m_bundle_url.get()));
-    }
-  }
-  return get() != NULL;
-}
-
-CFStringRef CFBundle::GetIdentifier() const {
-  CFBundleRef bundle = get();
-  if (bundle != NULL)
-    return ::CFBundleGetIdentifier(bundle);
-  return NULL;
-}
-
-CFURLRef CFBundle::CopyExecutableURL() const {
-  CFBundleRef bundle = get();
-  if (bundle != NULL)
-    return CFBundleCopyExecutableURL(bundle);
-  return NULL;
-}
diff --git a/gnu/llvm/lldb/source/Plugins/Process/Darwin/CFBundle.h b/gnu/llvm/lldb/source/Plugins/Process/Darwin/CFBundle.h
deleted file mode 100644 (file)
index f49dc30..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-//===-- CFBundle.h ----------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-//  Created by Greg Clayton on 1/16/08.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef __CFBundle_h__
-#define __CFBundle_h__
-
-#include "CFUtils.h"
-
-class CFBundle : public CFReleaser<CFBundleRef> {
-public:
-  // Constructors and Destructors
-  CFBundle(const char *path = NULL);
-  CFBundle(const CFBundle &rhs);
-  CFBundle &operator=(const CFBundle &rhs);
-  virtual ~CFBundle();
-  bool SetPath(const char *path);
-
-  CFStringRef GetIdentifier() const;
-
-  CFURLRef CopyExecutableURL() const;
-
-protected:
-  CFReleaser<CFURLRef> m_bundle_url;
-};
-
-#endif // #ifndef __CFBundle_h__
diff --git a/gnu/llvm/lldb/source/Plugins/Process/Darwin/CFString.cpp b/gnu/llvm/lldb/source/Plugins/Process/Darwin/CFString.cpp
deleted file mode 100644 (file)
index 4dcc05c..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-//===-- CFString.cpp --------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-//  Created by Greg Clayton on 1/16/08.
-//
-//===----------------------------------------------------------------------===//
-
-#include "CFString.h"
-#include <glob.h>
-#include <string>
-
-// CFString constructor
-CFString::CFString(CFStringRef s) : CFReleaser<CFStringRef>(s) {}
-
-// CFString copy constructor
-CFString::CFString(const CFString &rhs) : CFReleaser<CFStringRef>(rhs) {}
-
-// CFString copy constructor
-CFString &CFString::operator=(const CFString &rhs) {
-  if (this != &rhs)
-    *this = rhs;
-  return *this;
-}
-
-CFString::CFString(const char *cstr, CFStringEncoding cstr_encoding)
-    : CFReleaser<CFStringRef>() {
-  if (cstr && cstr[0]) {
-    reset(
-        ::CFStringCreateWithCString(kCFAllocatorDefault, cstr, cstr_encoding));
-  }
-}
-
-// Destructor
-CFString::~CFString() {}
-
-const char *CFString::GetFileSystemRepresentation(std::string &s) {
-  return CFString::FileSystemRepresentation(get(), s);
-}
-
-CFStringRef CFString::SetFileSystemRepresentation(const char *path) {
-  CFStringRef new_value = NULL;
-  if (path && path[0])
-    new_value =
-        ::CFStringCreateWithFileSystemRepresentation(kCFAllocatorDefault, path);
-  reset(new_value);
-  return get();
-}
-
-CFStringRef CFString::SetFileSystemRepresentationFromCFType(CFTypeRef cf_type) {
-  CFStringRef new_value = NULL;
-  if (cf_type != NULL) {
-    CFTypeID cf_type_id = ::CFGetTypeID(cf_type);
-
-    if (cf_type_id == ::CFStringGetTypeID()) {
-      // Retain since we are using the existing object
-      new_value = (CFStringRef)::CFRetain(cf_type);
-    } else if (cf_type_id == ::CFURLGetTypeID()) {
-      new_value =
-          ::CFURLCopyFileSystemPath((CFURLRef)cf_type, kCFURLPOSIXPathStyle);
-    }
-  }
-  reset(new_value);
-  return get();
-}
-
-CFStringRef
-CFString::SetFileSystemRepresentationAndExpandTilde(const char *path) {
-  std::string expanded_path;
-  if (CFString::GlobPath(path, expanded_path))
-    SetFileSystemRepresentation(expanded_path.c_str());
-  else
-    reset();
-  return get();
-}
-
-const char *CFString::UTF8(std::string &str) {
-  return CFString::UTF8(get(), str);
-}
-
-// Static function that puts a copy of the UTF8 contents of CF_STR into STR and
-// returns the C string pointer that is contained in STR when successful, else
-// NULL is returned. This allows the std::string parameter to own the extracted
-// string,
-// and also allows that string to be returned as a C string pointer that can be
-// used.
-
-const char *CFString::UTF8(CFStringRef cf_str, std::string &str) {
-  if (cf_str) {
-    const CFStringEncoding encoding = kCFStringEncodingUTF8;
-    CFIndex max_utf8_str_len = CFStringGetLength(cf_str);
-    max_utf8_str_len =
-        CFStringGetMaximumSizeForEncoding(max_utf8_str_len, encoding);
-    if (max_utf8_str_len > 0) {
-      str.resize(max_utf8_str_len);
-      if (!str.empty()) {
-        if (CFStringGetCString(cf_str, &str[0], str.size(), encoding)) {
-          str.resize(strlen(str.c_str()));
-          return str.c_str();
-        }
-      }
-    }
-  }
-  return NULL;
-}
-
-// Static function that puts a copy of the file system representation of CF_STR
-// into STR and returns the C string pointer that is contained in STR when
-// successful, else NULL is returned. This allows the std::string parameter to
-// own the extracted string, and also allows that string to be returned as a C
-// string pointer that can be used.
-
-const char *CFString::FileSystemRepresentation(CFStringRef cf_str,
-                                               std::string &str) {
-  if (cf_str) {
-    CFIndex max_length =
-        ::CFStringGetMaximumSizeOfFileSystemRepresentation(cf_str);
-    if (max_length > 0) {
-      str.resize(max_length);
-      if (!str.empty()) {
-        if (::CFStringGetFileSystemRepresentation(cf_str, &str[0],
-                                                  str.size())) {
-          str.erase(::strlen(str.c_str()));
-          return str.c_str();
-        }
-      }
-    }
-  }
-  str.erase();
-  return NULL;
-}
-
-CFIndex CFString::GetLength() const {
-  CFStringRef str = get();
-  if (str)
-    return CFStringGetLength(str);
-  return 0;
-}
-
-const char *CFString::GlobPath(const char *path, std::string &expanded_path) {
-  glob_t globbuf;
-  if (::glob(path, GLOB_TILDE, NULL, &globbuf) == 0) {
-    expanded_path = globbuf.gl_pathv[0];
-    ::globfree(&globbuf);
-  } else
-    expanded_path.clear();
-
-  return expanded_path.c_str();
-}
diff --git a/gnu/llvm/lldb/source/Plugins/Process/Darwin/CFString.h b/gnu/llvm/lldb/source/Plugins/Process/Darwin/CFString.h
deleted file mode 100644 (file)
index d1bd568..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-//===-- CFString.h ----------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-//  Created by Greg Clayton on 1/16/08.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef __CFString_h__
-#define __CFString_h__
-
-#include "CFUtils.h"
-#include <iosfwd>
-
-class CFString : public CFReleaser<CFStringRef> {
-public:
-  // Constructors and Destructors
-  CFString(CFStringRef cf_str = NULL);
-  CFString(const char *s, CFStringEncoding encoding = kCFStringEncodingUTF8);
-  CFString(const CFString &rhs);
-  CFString &operator=(const CFString &rhs);
-  virtual ~CFString();
-
-  const char *GetFileSystemRepresentation(std::string &str);
-  CFStringRef SetFileSystemRepresentation(const char *path);
-  CFStringRef SetFileSystemRepresentationFromCFType(CFTypeRef cf_type);
-  CFStringRef SetFileSystemRepresentationAndExpandTilde(const char *path);
-  const char *UTF8(std::string &str);
-  CFIndex GetLength() const;
-  static const char *UTF8(CFStringRef cf_str, std::string &str);
-  static const char *FileSystemRepresentation(CFStringRef cf_str,
-                                              std::string &str);
-  static const char *GlobPath(const char *path, std::string &expanded_path);
-};
-
-#endif // #ifndef __CFString_h__
diff --git a/gnu/llvm/lldb/source/Plugins/Process/Darwin/CFUtils.h b/gnu/llvm/lldb/source/Plugins/Process/Darwin/CFUtils.h
deleted file mode 100644 (file)
index b567524..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-//===-- CFUtils.h -----------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-//  Created by Greg Clayton on 3/5/07.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef __CFUtils_h__
-#define __CFUtils_h__
-
-#include <CoreFoundation/CoreFoundation.h>
-
-#ifdef __cplusplus
-
-// Templatized CF helper class that can own any CF pointer and will
-// call CFRelease() on any valid pointer it owns unless that pointer is
-// explicitly released using the release() member function.
-template <class T> class CFReleaser {
-public:
-  // Type names for the avlue
-  typedef T element_type;
-
-  // Constructors and destructors
-  CFReleaser(T ptr = NULL) : _ptr(ptr) {}
-  CFReleaser(const CFReleaser &copy) : _ptr(copy.get()) {
-    if (get())
-      ::CFRetain(get());
-  }
-  virtual ~CFReleaser() { reset(); }
-
-  // Assignments
-  CFReleaser &operator=(const CFReleaser<T> &copy) {
-    if (copy != *this) {
-      // Replace our owned pointer with the new one
-      reset(copy.get());
-      // Retain the current pointer that we own
-      if (get())
-        ::CFRetain(get());
-    }
-  }
-  // Get the address of the contained type
-  T *ptr_address() { return &_ptr; }
-
-  // Access the pointer itself
-  const T get() const { return _ptr; }
-  T get() { return _ptr; }
-
-  // Set a new value for the pointer and CFRelease our old
-  // value if we had a valid one.
-  void reset(T ptr = NULL) {
-    if (ptr != _ptr) {
-      if (_ptr != NULL)
-        ::CFRelease(_ptr);
-      _ptr = ptr;
-    }
-  }
-
-  // Release ownership without calling CFRelease
-  T release() {
-    T tmp = _ptr;
-    _ptr = NULL;
-    return tmp;
-  }
-
-private:
-  element_type _ptr;
-};
-
-#endif // #ifdef __cplusplus
-#endif // #ifndef __CFUtils_h__
diff --git a/gnu/llvm/lldb/source/Plugins/Process/Darwin/DarwinProcessLauncher.cpp b/gnu/llvm/lldb/source/Plugins/Process/Darwin/DarwinProcessLauncher.cpp
deleted file mode 100644 (file)
index f70ef97..0000000
+++ /dev/null
@@ -1,638 +0,0 @@
-//===-- DarwinProcessLauncher.cpp -------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-//
-//  DarwinProcessLauncher.cpp
-//  lldb
-//
-//  Created by Todd Fiala on 8/30/16.
-//
-//
-
-#include "DarwinProcessLauncher.h"
-
-// C includes
-#include <spawn.h>
-#include <sys/ptrace.h>
-#include <sys/stat.h>
-#include <sys/sysctl.h>
-
-#ifndef _POSIX_SPAWN_DISABLE_ASLR
-#define _POSIX_SPAWN_DISABLE_ASLR 0x0100
-#endif
-
-// LLDB includes
-#include "lldb/lldb-enumerations.h"
-
-#include "lldb/Host/PseudoTerminal.h"
-#include "lldb/Target/ProcessLaunchInfo.h"
-#include "lldb/Utility/Log.h"
-#include "lldb/Utility/Status.h"
-#include "lldb/Utility/StreamString.h"
-#include "llvm/Support/Errno.h"
-
-#include "CFBundle.h"
-#include "CFString.h"
-
-using namespace lldb;
-using namespace lldb_private;
-using namespace lldb_private::process_darwin;
-using namespace lldb_private::darwin_process_launcher;
-
-namespace {
-static LaunchFlavor g_launch_flavor = LaunchFlavor::Default;
-}
-
-namespace lldb_private {
-namespace darwin_process_launcher {
-
-static uint32_t GetCPUTypeForLocalProcess(::pid_t pid) {
-  int mib[CTL_MAXNAME] = {
-      0,
-  };
-  size_t len = CTL_MAXNAME;
-  if (::sysctlnametomib("sysctl.proc_cputype", mib, &len))
-    return 0;
-
-  mib[len] = pid;
-  len++;
-
-  cpu_type_t cpu;
-  size_t cpu_len = sizeof(cpu);
-  if (::sysctl(mib, static_cast<u_int>(len), &cpu, &cpu_len, 0, 0))
-    cpu = 0;
-  return cpu;
-}
-
-static bool ResolveExecutablePath(const char *path, char *resolved_path,
-                                  size_t resolved_path_size) {
-  if (path == NULL || path[0] == '\0')
-    return false;
-
-  char max_path[PATH_MAX];
-  std::string result;
-  CFString::GlobPath(path, result);
-
-  if (result.empty())
-    result = path;
-
-  struct stat path_stat;
-  if (::stat(path, &path_stat) == 0) {
-    if ((path_stat.st_mode & S_IFMT) == S_IFDIR) {
-      CFBundle bundle(path);
-      CFReleaser<CFURLRef> url(bundle.CopyExecutableURL());
-      if (url.get()) {
-        if (::CFURLGetFileSystemRepresentation(
-                url.get(), true, (UInt8 *)resolved_path, resolved_path_size))
-          return true;
-      }
-    }
-  }
-
-  if (realpath(path, max_path)) {
-    // Found the path relatively...
-    ::strncpy(resolved_path, max_path, resolved_path_size);
-    return strlen(resolved_path) + 1 < resolved_path_size;
-  } else {
-    // Not a relative path, check the PATH environment variable if the
-    const char *PATH = getenv("PATH");
-    if (PATH) {
-      const char *curr_path_start = PATH;
-      const char *curr_path_end;
-      while (curr_path_start && *curr_path_start) {
-        curr_path_end = strchr(curr_path_start, ':');
-        if (curr_path_end == NULL) {
-          result.assign(curr_path_start);
-          curr_path_start = NULL;
-        } else if (curr_path_end > curr_path_start) {
-          size_t len = curr_path_end - curr_path_start;
-          result.assign(curr_path_start, len);
-          curr_path_start += len + 1;
-        } else
-          break;
-
-        result += '/';
-        result += path;
-        struct stat s;
-        if (stat(result.c_str(), &s) == 0) {
-          ::strncpy(resolved_path, result.c_str(), resolved_path_size);
-          return result.size() + 1 < resolved_path_size;
-        }
-      }
-    }
-  }
-  return false;
-}
-
-// TODO check if we have a general purpose fork and exec.  We may be
-// able to get rid of this entirely.
-static Status ForkChildForPTraceDebugging(const char *path, char const *argv[],
-                                          char const *envp[], ::pid_t *pid,
-                                          int *pty_fd) {
-  Status error;
-  if (!path || !argv || !envp || !pid || !pty_fd) {
-    error.SetErrorString("invalid arguments");
-    return error;
-  }
-
-  // Use a fork that ties the child process's stdin/out/err to a pseudo
-  // terminal so we can read it in our MachProcess::STDIOThread as unbuffered
-  // io.
-  PseudoTerminal pty;
-  char fork_error[256];
-  memset(fork_error, 0, sizeof(fork_error));
-  *pid = static_cast<::pid_t>(pty.Fork(fork_error, sizeof(fork_error)));
-  if (*pid < 0) {
-    // Status during fork.
-    *pid = static_cast<::pid_t>(LLDB_INVALID_PROCESS_ID);
-    error.SetErrorStringWithFormat("%s(): fork failed: %s", __FUNCTION__,
-                                   fork_error);
-    return error;
-  } else if (pid == 0) {
-    // Child process
-
-    // Debug this process.
-    ::ptrace(PT_TRACE_ME, 0, 0, 0);
-
-    // Get BSD signals as mach exceptions.
-    ::ptrace(PT_SIGEXC, 0, 0, 0);
-
-    // If our parent is setgid, lets make sure we don't inherit those extra
-    // powers due to nepotism.
-    if (::setgid(getgid()) == 0) {
-      // Let the child have its own process group. We need to execute this call
-      // in both the child and parent to avoid a race condition between the two
-      // processes.
-
-      // Set the child process group to match its pid.
-      ::setpgid(0, 0);
-
-      // Sleep a bit to before the exec call.
-      ::sleep(1);
-
-      // Turn this process into the given executable.
-      ::execv(path, (char *const *)argv);
-    }
-    // Exit with error code. Child process should have taken over in above exec
-    // call and if the exec fails it will exit the child process below.
-    ::exit(127);
-  } else {
-    // Parent process
-    // Let the child have its own process group. We need to execute this call
-    // in both the child and parent to avoid a race condition between the two
-    // processes.
-
-    // Set the child process group to match its pid
-    ::setpgid(*pid, *pid);
-    if (pty_fd) {
-      // Release our master pty file descriptor so the pty class doesn't close
-      // it and so we can continue to use it in our STDIO thread
-      *pty_fd = pty.ReleaseMasterFileDescriptor();
-    }
-  }
-  return error;
-}
-
-static Status
-CreatePosixSpawnFileAction(const FileAction &action,
-                           posix_spawn_file_actions_t *file_actions) {
-  Status error;
-
-  // Log it.
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-  if (log) {
-    StreamString stream;
-    stream.PutCString("converting file action for posix_spawn(): ");
-    action.Dump(stream);
-    stream.Flush();
-    log->PutCString(stream.GetString().c_str());
-  }
-
-  // Validate args.
-  if (!file_actions) {
-    error.SetErrorString("mandatory file_actions arg is null");
-    return error;
-  }
-
-  // Build the posix file action.
-  switch (action.GetAction()) {
-  case FileAction::eFileActionOpen: {
-    const int error_code = ::posix_spawn_file_actions_addopen(
-        file_actions, action.GetFD(), action.GetPath(),
-        action.GetActionArgument(), 0);
-    if (error_code != 0) {
-      error.SetError(error_code, eErrorTypePOSIX);
-      return error;
-    }
-    break;
-  }
-
-  case FileAction::eFileActionClose: {
-    const int error_code =
-        ::posix_spawn_file_actions_addclose(file_actions, action.GetFD());
-    if (error_code != 0) {
-      error.SetError(error_code, eErrorTypePOSIX);
-      return error;
-    }
-    break;
-  }
-
-  case FileAction::eFileActionDuplicate: {
-    const int error_code = ::posix_spawn_file_actions_adddup2(
-        file_actions, action.GetFD(), action.GetActionArgument());
-    if (error_code != 0) {
-      error.SetError(error_code, eErrorTypePOSIX);
-      return error;
-    }
-    break;
-  }
-
-  case FileAction::eFileActionNone:
-  default:
-    LLDB_LOGF(log, "%s(): unsupported file action %u", __FUNCTION__,
-              action.GetAction());
-    break;
-  }
-
-  return error;
-}
-
-static Status PosixSpawnChildForPTraceDebugging(const char *path,
-                                                ProcessLaunchInfo &launch_info,
-                                                ::pid_t *pid,
-                                                cpu_type_t *actual_cpu_type) {
-  Status error;
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-
-  if (!pid) {
-    error.SetErrorStringWithFormat("%s(): pid arg cannot be null",
-                                   __FUNCTION__);
-    return error;
-  }
-
-  posix_spawnattr_t attr;
-  short flags;
-  if (log) {
-    StreamString stream;
-    stream.Printf("%s(path='%s',...)\n", __FUNCTION__, path);
-    launch_info.Dump(stream, nullptr);
-    stream.Flush();
-    log->PutCString(stream.GetString().c_str());
-  }
-
-  int error_code;
-  if ((error_code = ::posix_spawnattr_init(&attr)) != 0) {
-    LLDB_LOGF(log, "::posix_spawnattr_init(&attr) failed");
-    error.SetError(error_code, eErrorTypePOSIX);
-    return error;
-  }
-
-  // Ensure we clean up the spawnattr structure however we exit this function.
-  std::unique_ptr<posix_spawnattr_t, int (*)(posix_spawnattr_t *)> spawnattr_up(
-      &attr, ::posix_spawnattr_destroy);
-
-  flags = POSIX_SPAWN_START_SUSPENDED | POSIX_SPAWN_SETSIGDEF |
-          POSIX_SPAWN_SETSIGMASK;
-  if (launch_info.GetFlags().Test(eLaunchFlagDisableASLR))
-    flags |= _POSIX_SPAWN_DISABLE_ASLR;
-
-  sigset_t no_signals;
-  sigset_t all_signals;
-  sigemptyset(&no_signals);
-  sigfillset(&all_signals);
-  ::posix_spawnattr_setsigmask(&attr, &no_signals);
-  ::posix_spawnattr_setsigdefault(&attr, &all_signals);
-
-  if ((error_code = ::posix_spawnattr_setflags(&attr, flags)) != 0) {
-    LLDB_LOG(log,
-             "::posix_spawnattr_setflags(&attr, "
-             "POSIX_SPAWN_START_SUSPENDED{0}) failed: {1}",
-             flags & _POSIX_SPAWN_DISABLE_ASLR ? " | _POSIX_SPAWN_DISABLE_ASLR"
-                                               : "",
-             llvm::sys::StrError(error_code));
-    error.SetError(error_code, eErrorTypePOSIX);
-    return error;
-  }
-
-#if !defined(__arm__)
-
-  // We don't need to do this for ARM, and we really shouldn't now that we have
-  // multiple CPU subtypes and no posix_spawnattr call that allows us to set
-  // which CPU subtype to launch...
-  cpu_type_t desired_cpu_type = launch_info.GetArchitecture().GetMachOCPUType();
-  if (desired_cpu_type != LLDB_INVALID_CPUTYPE) {
-    size_t ocount = 0;
-    error_code =
-        ::posix_spawnattr_setbinpref_np(&attr, 1, &desired_cpu_type, &ocount);
-    if (error_code != 0) {
-      LLDB_LOG(log,
-               "::posix_spawnattr_setbinpref_np(&attr, 1, "
-               "cpu_type = {0:x8}, count => {1}): {2}",
-               desired_cpu_type, ocount, llvm::sys::StrError(error_code));
-      error.SetError(error_code, eErrorTypePOSIX);
-      return error;
-    }
-    if (ocount != 1) {
-      error.SetErrorStringWithFormat("posix_spawnattr_setbinpref_np "
-                                     "did not set the expected number "
-                                     "of cpu_type entries: expected 1 "
-                                     "but was %zu",
-                                     ocount);
-      return error;
-    }
-  }
-#endif
-
-  posix_spawn_file_actions_t file_actions;
-  if ((error_code = ::posix_spawn_file_actions_init(&file_actions)) != 0) {
-    LLDB_LOG(log, "::posix_spawn_file_actions_init(&file_actions) failed: {0}",
-             llvm::sys::StrError(error_code));
-    error.SetError(error_code, eErrorTypePOSIX);
-    return error;
-  }
-
-  // Ensure we clean up file actions however we exit this.  When the
-  // file_actions_up below goes out of scope, we'll get our file action
-  // cleanup.
-  std::unique_ptr<posix_spawn_file_actions_t,
-                  int (*)(posix_spawn_file_actions_t *)>
-      file_actions_up(&file_actions, ::posix_spawn_file_actions_destroy);
-
-  // We assume the caller has setup the file actions appropriately.  We are not
-  // in the business of figuring out what we really need here. lldb-server will
-  // have already called FinalizeFileActions() as well to button these up
-  // properly.
-  const size_t num_actions = launch_info.GetNumFileActions();
-  for (size_t action_index = 0; action_index < num_actions; ++action_index) {
-    const FileAction *const action =
-        launch_info.GetFileActionAtIndex(action_index);
-    if (!action)
-      continue;
-
-    error = CreatePosixSpawnFileAction(*action, &file_actions);
-    if (!error.Success()) {
-      LLDB_LOGF(log,
-                "%s(): error converting FileAction to posix_spawn "
-                "file action: %s",
-                __FUNCTION__, error.AsCString());
-      return error;
-    }
-  }
-
-  // TODO: Verify if we can set the working directory back immediately
-  // after the posix_spawnp call without creating a race condition???
-  const char *const working_directory =
-      launch_info.GetWorkingDirectory().GetCString();
-  if (working_directory && working_directory[0])
-    ::chdir(working_directory);
-
-  auto argv = launch_info.GetArguments().GetArgumentVector();
-  auto envp = launch_info.GetEnvironmentEntries().GetArgumentVector();
-  error_code = ::posix_spawnp(pid, path, &file_actions, &attr,
-                              (char *const *)argv, (char *const *)envp);
-  if (error_code != 0) {
-    LLDB_LOG(log,
-             "::posix_spawnp(pid => {0}, path = '{1}', file_actions "
-             "= {2}, attr = {3}, argv = {4}, envp = {5}) failed: {6}",
-             pid, path, &file_actions, &attr, argv, envp,
-             llvm::sys::StrError(error_code));
-    error.SetError(error_code, eErrorTypePOSIX);
-    return error;
-  }
-
-  // Validate we got a pid.
-  if (pid == LLDB_INVALID_PROCESS_ID) {
-    error.SetErrorString("posix_spawn() did not indicate a failure but it "
-                         "failed to return a pid, aborting.");
-    return error;
-  }
-
-  if (actual_cpu_type) {
-    *actual_cpu_type = GetCPUTypeForLocalProcess(*pid);
-    LLDB_LOGF(log,
-              "%s(): cpu type for launched process pid=%i: "
-              "cpu_type=0x%8.8x",
-              __FUNCTION__, *pid, *actual_cpu_type);
-  }
-
-  return error;
-}
-
-Status LaunchInferior(ProcessLaunchInfo &launch_info, int *pty_master_fd,
-                      LaunchFlavor *launch_flavor) {
-  Status error;
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-
-  if (!launch_flavor) {
-    error.SetErrorString("mandatory launch_flavor field was null");
-    return error;
-  }
-
-  if (log) {
-    StreamString stream;
-    stream.Printf("NativeProcessDarwin::%s(): launching with the "
-                  "following launch info:",
-                  __FUNCTION__);
-    launch_info.Dump(stream, nullptr);
-    stream.Flush();
-    log->PutCString(stream.GetString().c_str());
-  }
-
-  // Retrieve the binary name given to us.
-  char given_path[PATH_MAX];
-  given_path[0] = '\0';
-  launch_info.GetExecutableFile().GetPath(given_path, sizeof(given_path));
-
-  // Determine the manner in which we'll launch.
-  *launch_flavor = g_launch_flavor;
-  if (*launch_flavor == LaunchFlavor::Default) {
-    // Our default launch method is posix spawn
-    *launch_flavor = LaunchFlavor::PosixSpawn;
-#if defined WITH_FBS
-    // Check if we have an app bundle, if so launch using BackBoard Services.
-    if (strstr(given_path, ".app")) {
-      *launch_flavor = eLaunchFlavorFBS;
-    }
-#elif defined WITH_BKS
-    // Check if we have an app bundle, if so launch using BackBoard Services.
-    if (strstr(given_path, ".app")) {
-      *launch_flavor = eLaunchFlavorBKS;
-    }
-#elif defined WITH_SPRINGBOARD
-    // Check if we have an app bundle, if so launch using SpringBoard.
-    if (strstr(given_path, ".app")) {
-      *launch_flavor = eLaunchFlavorSpringBoard;
-    }
-#endif
-  }
-
-  // Attempt to resolve the binary name to an absolute path.
-  char resolved_path[PATH_MAX];
-  resolved_path[0] = '\0';
-
-  LLDB_LOGF(log, "%s(): attempting to resolve given binary path: \"%s\"",
-            __FUNCTION__, given_path);
-
-  // If we fail to resolve the path to our executable, then just use what we
-  // were given and hope for the best
-  if (!ResolveExecutablePath(given_path, resolved_path,
-                             sizeof(resolved_path))) {
-    LLDB_LOGF(log,
-              "%s(): failed to resolve binary path, using "
-              "what was given verbatim and hoping for the best",
-              __FUNCTION__);
-    ::strncpy(resolved_path, given_path, sizeof(resolved_path));
-  } else {
-    LLDB_LOGF(log, "%s(): resolved given binary path to: \"%s\"", __FUNCTION__,
-              resolved_path);
-  }
-
-  char launch_err_str[PATH_MAX];
-  launch_err_str[0] = '\0';
-
-  // TODO figure out how to handle QSetProcessEvent
-  // const char *process_event = ctx.GetProcessEvent();
-
-  // Ensure the binary is there.
-  struct stat path_stat;
-  if (::stat(resolved_path, &path_stat) == -1) {
-    error.SetErrorToErrno();
-    return error;
-  }
-
-  // Fork a child process for debugging
-  // state_callback(eStateLaunching);
-
-  const auto argv = launch_info.GetArguments().GetConstArgumentVector();
-  const auto envp =
-      launch_info.GetEnvironmentEntries().GetConstArgumentVector();
-
-  switch (*launch_flavor) {
-  case LaunchFlavor::ForkExec: {
-    ::pid_t pid = LLDB_INVALID_PROCESS_ID;
-    error = ForkChildForPTraceDebugging(resolved_path, argv, envp, &pid,
-                                        pty_master_fd);
-    if (error.Success()) {
-      launch_info.SetProcessID(static_cast<lldb::pid_t>(pid));
-    } else {
-      // Reset any variables that might have been set during a failed launch
-      // attempt.
-      if (pty_master_fd)
-        *pty_master_fd = -1;
-
-      // We're done.
-      return error;
-    }
-  } break;
-
-#ifdef WITH_FBS
-  case LaunchFlavor::FBS: {
-    const char *app_ext = strstr(path, ".app");
-    if (app_ext && (app_ext[4] == '\0' || app_ext[4] == '/')) {
-      std::string app_bundle_path(path, app_ext + strlen(".app"));
-      m_flags |= eMachProcessFlagsUsingFBS;
-      if (BoardServiceLaunchForDebug(app_bundle_path.c_str(), argv, envp,
-                                     no_stdio, disable_aslr, event_data,
-                                     launch_err) != 0)
-        return m_pid; // A successful SBLaunchForDebug() returns and assigns a
-                      // non-zero m_pid.
-      else
-        break; // We tried a FBS launch, but didn't succeed lets get out
-    }
-  } break;
-#endif
-
-#ifdef WITH_BKS
-  case LaunchFlavor::BKS: {
-    const char *app_ext = strstr(path, ".app");
-    if (app_ext && (app_ext[4] == '\0' || app_ext[4] == '/')) {
-      std::string app_bundle_path(path, app_ext + strlen(".app"));
-      m_flags |= eMachProcessFlagsUsingBKS;
-      if (BoardServiceLaunchForDebug(app_bundle_path.c_str(), argv, envp,
-                                     no_stdio, disable_aslr, event_data,
-                                     launch_err) != 0)
-        return m_pid; // A successful SBLaunchForDebug() returns and assigns a
-                      // non-zero m_pid.
-      else
-        break; // We tried a BKS launch, but didn't succeed lets get out
-    }
-  } break;
-#endif
-
-#ifdef WITH_SPRINGBOARD
-  case LaunchFlavor::SpringBoard: {
-    //  .../whatever.app/whatever ?
-    //  Or .../com.apple.whatever.app/whatever -- be careful of ".app" in
-    //  "com.apple.whatever" here
-    const char *app_ext = strstr(path, ".app/");
-    if (app_ext == NULL) {
-      // .../whatever.app ?
-      int len = strlen(path);
-      if (len > 5) {
-        if (strcmp(path + len - 4, ".app") == 0) {
-          app_ext = path + len - 4;
-        }
-      }
-    }
-    if (app_ext) {
-      std::string app_bundle_path(path, app_ext + strlen(".app"));
-      if (SBLaunchForDebug(app_bundle_path.c_str(), argv, envp, no_stdio,
-                           disable_aslr, launch_err) != 0)
-        return m_pid; // A successful SBLaunchForDebug() returns and assigns a
-                      // non-zero m_pid.
-      else
-        break; // We tried a springboard launch, but didn't succeed lets get out
-    }
-  } break;
-#endif
-
-  case LaunchFlavor::PosixSpawn: {
-    ::pid_t pid = LLDB_INVALID_PROCESS_ID;
-
-    // Retrieve paths for stdin/stdout/stderr.
-    cpu_type_t actual_cpu_type = 0;
-    error = PosixSpawnChildForPTraceDebugging(resolved_path, launch_info, &pid,
-                                              &actual_cpu_type);
-    if (error.Success()) {
-      launch_info.SetProcessID(static_cast<lldb::pid_t>(pid));
-      if (pty_master_fd)
-        *pty_master_fd = launch_info.GetPTY().ReleaseMasterFileDescriptor();
-    } else {
-      // Reset any variables that might have been set during a failed launch
-      // attempt.
-      if (pty_master_fd)
-        *pty_master_fd = -1;
-
-      // We're done.
-      return error;
-    }
-    break;
-  }
-
-  default:
-    // Invalid launch flavor.
-    error.SetErrorStringWithFormat("NativeProcessDarwin::%s(): unknown "
-                                   "launch flavor %d",
-                                   __FUNCTION__, (int)*launch_flavor);
-    return error;
-  }
-
-  if (launch_info.GetProcessID() == LLDB_INVALID_PROCESS_ID) {
-    // If we don't have a valid process ID and no one has set the error, then
-    // return a generic error.
-    if (error.Success())
-      error.SetErrorStringWithFormat("%s(): failed to launch, no reason "
-                                     "specified",
-                                     __FUNCTION__);
-  }
-
-  // We're done with the launch side of the operation.
-  return error;
-}
-}
-} // namespaces
diff --git a/gnu/llvm/lldb/source/Plugins/Process/Darwin/DarwinProcessLauncher.h b/gnu/llvm/lldb/source/Plugins/Process/Darwin/DarwinProcessLauncher.h
deleted file mode 100644 (file)
index 0e65b56..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-//===-- DarwinProcessLauncher.h ---------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef DarwinProcessLauncher_h
-#define DarwinProcessLauncher_h
-
-// C headers
-#include <mach/machine.h>
-#include <sys/types.h>
-
-// C++ headers
-#include <functional>
-
-// LLDB headers
-#include "lldb/lldb-enumerations.h"
-#include "lldb/lldb-forward.h"
-
-#include "LaunchFlavor.h"
-
-namespace lldb_private {
-namespace darwin_process_launcher {
-// =============================================================================
-/// Launches a process for debugging.
-///
-/// \param[inout] launch_info
-///     Specifies details about the process to launch (e.g. path, architecture,
-///     etc.).  On output, includes the launched ProcessID (pid).
-///
-/// \param[out] pty_master_fd
-///     Returns the master side of the pseudo-terminal used to communicate
-///     with stdin/stdout from the launched process.  May be nullptr.
-///
-/// \param[out] launch_flavor
-///     Contains the launch flavor used when launching the process.
-// =============================================================================
-Status
-LaunchInferior(ProcessLaunchInfo &launch_info, int *pty_master_fd,
-               lldb_private::process_darwin::LaunchFlavor *launch_flavor);
-
-} // darwin_process_launcher
-} // lldb_private
-
-#endif /* DarwinProcessLauncher_h */
diff --git a/gnu/llvm/lldb/source/Plugins/Process/Darwin/LaunchFlavor.h b/gnu/llvm/lldb/source/Plugins/Process/Darwin/LaunchFlavor.h
deleted file mode 100644 (file)
index cfd76d1..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-//===-- LaunchFlavor.h ---------------------------------------- -*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LaunchFlavor_h
-#define LaunchFlavor_h
-
-namespace lldb_private {
-namespace process_darwin {
-
-enum class LaunchFlavor {
-  Default = 0,
-  PosixSpawn = 1,
-  ForkExec = 2,
-#ifdef WITH_SPRINGBOARD
-  SpringBoard = 3,
-#endif
-#ifdef WITH_BKS
-  BKS = 4,
-#endif
-#ifdef WITH_FBS
-  FBS = 5
-#endif
-};
-}
-} // namespaces
-
-#endif /* LaunchFlavor_h */
diff --git a/gnu/llvm/lldb/source/Plugins/Process/Darwin/MachException.cpp b/gnu/llvm/lldb/source/Plugins/Process/Darwin/MachException.cpp
deleted file mode 100644 (file)
index 073ad64..0000000
+++ /dev/null
@@ -1,514 +0,0 @@
-//===-- MachException.cpp ---------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-//  Created by Greg Clayton on 6/18/07.
-//
-//===----------------------------------------------------------------------===//
-
-#include "MachException.h"
-
-// C includes
-#include <errno.h>
-#include <sys/ptrace.h>
-#include <sys/types.h>
-
-// C++ includes
-#include <mutex>
-
-// LLDB includes
-#include "lldb/Target/UnixSignals.h"
-#include "lldb/Utility/LLDBAssert.h"
-#include "lldb/Utility/Log.h"
-#include "lldb/Utility/Status.h"
-#include "lldb/Utility/Stream.h"
-
-using namespace lldb;
-using namespace lldb_private;
-using namespace lldb_private::process_darwin;
-
-// Routine mach_exception_raise
-extern "C" kern_return_t
-catch_mach_exception_raise(mach_port_t exception_port, mach_port_t thread,
-                           mach_port_t task, exception_type_t exception,
-                           mach_exception_data_t code,
-                           mach_msg_type_number_t codeCnt);
-
-extern "C" kern_return_t catch_mach_exception_raise_state(
-    mach_port_t exception_port, exception_type_t exception,
-    const mach_exception_data_t code, mach_msg_type_number_t codeCnt,
-    int *flavor, const thread_state_t old_state,
-    mach_msg_type_number_t old_stateCnt, thread_state_t new_state,
-    mach_msg_type_number_t *new_stateCnt);
-
-// Routine mach_exception_raise_state_identity
-extern "C" kern_return_t catch_mach_exception_raise_state_identity(
-    mach_port_t exception_port, mach_port_t thread, mach_port_t task,
-    exception_type_t exception, mach_exception_data_t code,
-    mach_msg_type_number_t codeCnt, int *flavor, thread_state_t old_state,
-    mach_msg_type_number_t old_stateCnt, thread_state_t new_state,
-    mach_msg_type_number_t *new_stateCnt);
-
-extern "C" boolean_t mach_exc_server(mach_msg_header_t *InHeadP,
-                                     mach_msg_header_t *OutHeadP);
-
-static MachException::Data *g_message = NULL;
-
-extern "C" kern_return_t catch_mach_exception_raise_state(
-    mach_port_t exc_port, exception_type_t exc_type,
-    const mach_exception_data_t exc_data, mach_msg_type_number_t exc_data_count,
-    int *flavor, const thread_state_t old_state,
-    mach_msg_type_number_t old_stateCnt, thread_state_t new_state,
-    mach_msg_type_number_t *new_stateCnt) {
-  // TODO change to LIBLLDB_LOG_EXCEPTION
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE));
-  if (log) {
-    LLDB_LOGF(log,
-              "::%s(exc_port = 0x%4.4x, exc_type = %d (%s), "
-              "exc_data = 0x%llx, exc_data_count = %d)",
-              __FUNCTION__, exc_port, exc_type, MachException::Name(exc_type),
-              (uint64_t)exc_data, exc_data_count);
-  }
-  return KERN_FAILURE;
-}
-
-extern "C" kern_return_t catch_mach_exception_raise_state_identity(
-    mach_port_t exc_port, mach_port_t thread_port, mach_port_t task_port,
-    exception_type_t exc_type, mach_exception_data_t exc_data,
-    mach_msg_type_number_t exc_data_count, int *flavor,
-    thread_state_t old_state, mach_msg_type_number_t old_stateCnt,
-    thread_state_t new_state, mach_msg_type_number_t *new_stateCnt) {
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE));
-  if (log) {
-    LLDB_LOGF(log,
-              "::%s(exc_port = 0x%4.4x, thd_port = 0x%4.4x, "
-              "tsk_port = 0x%4.4x, exc_type = %d (%s), exc_data[%d] = "
-              "{ 0x%llx, 0x%llx })",
-              __FUNCTION__, exc_port, thread_port, task_port, exc_type,
-              MachException::Name(exc_type), exc_data_count,
-              (uint64_t)(exc_data_count > 0 ? exc_data[0] : 0xBADDBADD),
-              (uint64_t)(exc_data_count > 1 ? exc_data[1] : 0xBADDBADD));
-  }
-
-  return KERN_FAILURE;
-}
-
-extern "C" kern_return_t
-catch_mach_exception_raise(mach_port_t exc_port, mach_port_t thread_port,
-                           mach_port_t task_port, exception_type_t exc_type,
-                           mach_exception_data_t exc_data,
-                           mach_msg_type_number_t exc_data_count) {
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE));
-  if (log) {
-    LLDB_LOGF(log,
-              "::%s(exc_port = 0x%4.4x, thd_port = 0x%4.4x, "
-              "tsk_port = 0x%4.4x, exc_type = %d (%s), exc_data[%d] "
-              "= { 0x%llx, 0x%llx })",
-              __FUNCTION__, exc_port, thread_port, task_port, exc_type,
-              MachException::Name(exc_type), exc_data_count,
-              (uint64_t)(exc_data_count > 0 ? exc_data[0] : 0xBADDBADD),
-              (uint64_t)(exc_data_count > 1 ? exc_data[1] : 0xBADDBADD));
-  }
-
-  if (task_port == g_message->task_port) {
-    g_message->task_port = task_port;
-    g_message->thread_port = thread_port;
-    g_message->exc_type = exc_type;
-    g_message->exc_data.resize(exc_data_count);
-    ::memcpy(&g_message->exc_data[0], exc_data,
-             g_message->exc_data.size() * sizeof(mach_exception_data_type_t));
-    return KERN_SUCCESS;
-  }
-  return KERN_FAILURE;
-}
-
-bool MachException::Data::GetStopInfo(struct ThreadStopInfo *stop_info,
-                                      const UnixSignals &signals,
-                                      Stream &stream) const {
-  if (!stop_info)
-    return false;
-
-  // Zero out the structure.
-  memset(stop_info, 0, sizeof(struct ThreadStopInfo));
-
-  if (exc_type == 0) {
-    stop_info->reason = eStopReasonInvalid;
-    return true;
-  }
-
-  // We always stop with a mach exception.
-  stop_info->reason = eStopReasonException;
-  // Save the EXC_XXXX exception type.
-  stop_info->details.exception.type = exc_type;
-
-  // Fill in a text description
-  const char *exc_name = MachException::Name(exc_type);
-  if (exc_name)
-    stream.Printf("%s", exc_name);
-  else
-    stream.Printf("%i", exc_type);
-
-  stop_info->details.exception.data_count = exc_data.size();
-
-  int soft_signal = SoftSignal();
-  if (soft_signal) {
-    const char *sig_str = signals.GetSignalAsCString(soft_signal);
-    stream.Printf(" EXC_SOFT_SIGNAL( %i ( %s ))", soft_signal,
-                  sig_str ? sig_str : "unknown signal");
-  } else {
-    // No special disassembly for exception data, just print it.
-    size_t idx;
-    stream.Printf(" data[%llu] = {",
-                  (uint64_t)stop_info->details.exception.data_count);
-
-    for (idx = 0; idx < stop_info->details.exception.data_count; ++idx) {
-      stream.Printf(
-          "0x%llx%c", (uint64_t)exc_data[idx],
-          ((idx + 1 == stop_info->details.exception.data_count) ? '}' : ','));
-    }
-  }
-
-  // Copy the exception data
-  for (size_t i = 0; i < stop_info->details.exception.data_count; i++)
-    stop_info->details.exception.data[i] = exc_data[i];
-
-  return true;
-}
-
-Status MachException::Message::Receive(mach_port_t port,
-                                       mach_msg_option_t options,
-                                       mach_msg_timeout_t timeout,
-                                       mach_port_t notify_port) {
-  Status error;
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE));
-
-  mach_msg_timeout_t mach_msg_timeout =
-      options & MACH_RCV_TIMEOUT ? timeout : 0;
-  if (log && ((options & MACH_RCV_TIMEOUT) == 0)) {
-    // Dump this log message if we have no timeout in case it never returns
-    LLDB_LOGF(log,
-              "::mach_msg(msg->{bits = %#x, size = %u remote_port = %#x, "
-              "local_port = %#x, reserved = 0x%x, id = 0x%x}, "
-              "option = %#x, send_size = 0, rcv_size = %llu, "
-              "rcv_name = %#x, timeout = %u, notify = %#x)",
-              exc_msg.hdr.msgh_bits, exc_msg.hdr.msgh_size,
-              exc_msg.hdr.msgh_remote_port, exc_msg.hdr.msgh_local_port,
-              exc_msg.hdr.msgh_reserved, exc_msg.hdr.msgh_id, options,
-              (uint64_t)sizeof(exc_msg.data), port, mach_msg_timeout,
-              notify_port);
-  }
-
-  mach_msg_return_t mach_err =
-      ::mach_msg(&exc_msg.hdr,
-                 options,              // options
-                 0,                    // Send size
-                 sizeof(exc_msg.data), // Receive size
-                 port,                 // exception port to watch for
-                                       // exception on
-                 mach_msg_timeout,     // timeout in msec (obeyed only
-                                       // if MACH_RCV_TIMEOUT is ORed
-                                       // into the options parameter)
-                 notify_port);
-  error.SetError(mach_err, eErrorTypeMachKernel);
-
-  // Dump any errors we get
-  if (error.Fail() && log) {
-    LLDB_LOGF(log,
-              "::mach_msg(msg->{bits = %#x, size = %u remote_port = %#x, "
-              "local_port = %#x, reserved = 0x%x, id = 0x%x}, "
-              "option = %#x, send_size = %u, rcv_size = %lu, rcv_name "
-              "= %#x, timeout = %u, notify = %#x) failed: %s",
-              exc_msg.hdr.msgh_bits, exc_msg.hdr.msgh_size,
-              exc_msg.hdr.msgh_remote_port, exc_msg.hdr.msgh_local_port,
-              exc_msg.hdr.msgh_reserved, exc_msg.hdr.msgh_id, options, 0,
-              sizeof(exc_msg.data), port, mach_msg_timeout, notify_port,
-              error.AsCString());
-  }
-  return error;
-}
-
-void MachException::Message::Dump(Stream &stream) const {
-  stream.Printf("  exc_msg { bits = 0x%8.8x size = 0x%8.8x remote-port = "
-                "0x%8.8x local-port = 0x%8.8x reserved = 0x%8.8x id = "
-                "0x%8.8x }\n",
-                exc_msg.hdr.msgh_bits, exc_msg.hdr.msgh_size,
-                exc_msg.hdr.msgh_remote_port, exc_msg.hdr.msgh_local_port,
-                exc_msg.hdr.msgh_reserved, exc_msg.hdr.msgh_id);
-
-  stream.Printf("  reply_msg { bits = 0x%8.8x size = 0x%8.8x remote-port = "
-                "0x%8.8x local-port = 0x%8.8x reserved = 0x%8.8x id = "
-                "0x%8.8x }",
-                reply_msg.hdr.msgh_bits, reply_msg.hdr.msgh_size,
-                reply_msg.hdr.msgh_remote_port, reply_msg.hdr.msgh_local_port,
-                reply_msg.hdr.msgh_reserved, reply_msg.hdr.msgh_id);
-}
-
-bool MachException::Message::CatchExceptionRaise(task_t task) {
-  bool success = false;
-  state.task_port = task;
-  g_message = &state;
-  // The exc_server function is the MIG generated server handling function to
-  // handle messages from the kernel relating to the occurrence of an exception
-  // in a thread. Such messages are delivered to the exception port set via
-  // thread_set_exception_ports or task_set_exception_ports. When an exception
-  // occurs in a thread, the thread sends an exception message to its exception
-  // port, blocking in the kernel waiting for the receipt of a reply. The
-  // exc_server function performs all necessary argument handling for this
-  // kernel message and calls catch_exception_raise,
-  // catch_exception_raise_state or catch_exception_raise_state_identity, which
-  // should handle the exception. If the called routine returns KERN_SUCCESS, a
-  // reply message will be sent, allowing the thread to continue from the point
-  // of the exception; otherwise, no reply message is sent and the called
-  // routine must have dealt with the exception thread directly.
-  if (mach_exc_server(&exc_msg.hdr, &reply_msg.hdr)) {
-    success = true;
-  } else {
-    Log *log(
-        GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE));
-    LLDB_LOGF(log,
-              "MachException::Message::%s(): mach_exc_server "
-              "returned zero...",
-              __FUNCTION__);
-  }
-  g_message = NULL;
-  return success;
-}
-
-Status MachException::Message::Reply(::pid_t inferior_pid, task_t inferior_task,
-                                     int signal) {
-  // Reply to the exception...
-  Status error;
-
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE));
-
-  // If we had a soft signal, we need to update the thread first so it can
-  // continue without signaling
-  int soft_signal = state.SoftSignal();
-  if (soft_signal) {
-    int state_pid = -1;
-    if (inferior_task == state.task_port) {
-      // This is our task, so we can update the signal to send to it
-      state_pid = inferior_pid;
-      soft_signal = signal;
-    } else {
-      auto mach_err = ::pid_for_task(state.task_port, &state_pid);
-      if (mach_err) {
-        error.SetError(mach_err, eErrorTypeMachKernel);
-        LLDB_LOGF(log,
-                  "MachException::Message::%s(): pid_for_task() "
-                  "failed: %s",
-                  __FUNCTION__, error.AsCString());
-        return error;
-      }
-    }
-
-    lldbassert(state_pid != -1);
-    if (state_pid != -1) {
-      errno = 0;
-      caddr_t thread_port_caddr = (caddr_t)(uintptr_t)state.thread_port;
-      if (::ptrace(PT_THUPDATE, state_pid, thread_port_caddr, soft_signal) != 0)
-        error.SetError(errno, eErrorTypePOSIX);
-
-      if (!error.Success()) {
-        LLDB_LOGF(log,
-                  "::ptrace(request = PT_THUPDATE, pid = "
-                  "0x%4.4x, tid = 0x%4.4x, signal = %i)",
-                  state_pid, state.thread_port, soft_signal);
-        return error;
-      }
-    }
-  }
-
-  LLDB_LOGF(log,
-            "::mach_msg ( msg->{bits = %#x, size = %u, remote_port "
-            "= %#x, local_port = %#x, reserved = 0x%x, id = 0x%x}, "
-            "option = %#x, send_size = %u, rcv_size = %u, rcv_name "
-            "= %#x, timeout = %u, notify = %#x)",
-            reply_msg.hdr.msgh_bits, reply_msg.hdr.msgh_size,
-            reply_msg.hdr.msgh_remote_port, reply_msg.hdr.msgh_local_port,
-            reply_msg.hdr.msgh_reserved, reply_msg.hdr.msgh_id,
-            MACH_SEND_MSG | MACH_SEND_INTERRUPT, reply_msg.hdr.msgh_size, 0,
-            MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-
-  auto mach_err =
-      ::mach_msg(&reply_msg.hdr, MACH_SEND_MSG | MACH_SEND_INTERRUPT,
-                 reply_msg.hdr.msgh_size, 0, MACH_PORT_NULL,
-                 MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-  if (mach_err)
-    error.SetError(mach_err, eErrorTypeMachKernel);
-
-  // Log our error if we have one.
-  if (error.Fail() && log) {
-    if (error.GetError() == MACH_SEND_INTERRUPTED) {
-      log->PutCString("::mach_msg() - send interrupted");
-      // TODO: keep retrying to reply???
-    } else if (state.task_port == inferior_task) {
-      LLDB_LOGF(log,
-                "mach_msg(): returned an error when replying "
-                "to a mach exception: error = %u (%s)",
-                error.GetError(), error.AsCString());
-    } else {
-      LLDB_LOGF(log, "::mach_msg() - failed (child of task): %u (%s)",
-                error.GetError(), error.AsCString());
-    }
-  }
-
-  return error;
-}
-
-#define PREV_EXC_MASK_ALL                                                      \
-  (EXC_MASK_BAD_ACCESS | EXC_MASK_BAD_INSTRUCTION | EXC_MASK_ARITHMETIC |      \
-   EXC_MASK_EMULATION | EXC_MASK_SOFTWARE | EXC_MASK_BREAKPOINT |              \
-   EXC_MASK_SYSCALL | EXC_MASK_MACH_SYSCALL | EXC_MASK_RPC_ALERT |             \
-   EXC_MASK_MACHINE)
-
-// Don't listen for EXC_RESOURCE, it should really get handled by the system
-// handler.
-
-#ifndef EXC_RESOURCE
-#define EXC_RESOURCE 11
-#endif
-
-#ifndef EXC_MASK_RESOURCE
-#define EXC_MASK_RESOURCE (1 << EXC_RESOURCE)
-#endif
-
-#define LLDB_EXC_MASK (EXC_MASK_ALL & ~EXC_MASK_RESOURCE)
-
-Status MachException::PortInfo::Save(task_t task) {
-  Status error;
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE));
-
-  LLDB_LOGF(log, "MachException::PortInfo::%s(task = 0x%4.4x)", __FUNCTION__,
-            task);
-
-  // Be careful to be able to have debugserver built on a newer OS than what it
-  // is currently running on by being able to start with all exceptions and
-  // back off to just what is supported on the current system
-  mask = LLDB_EXC_MASK;
-
-  count = (sizeof(ports) / sizeof(ports[0]));
-  auto mach_err = ::task_get_exception_ports(task, mask, masks, &count, ports,
-                                             behaviors, flavors);
-  if (mach_err)
-    error.SetError(mach_err, eErrorTypeMachKernel);
-
-  if (log) {
-    if (error.Success()) {
-      LLDB_LOGF(log,
-                "::task_get_exception_ports(task = 0x%4.4x, mask = "
-                "0x%x, maskCnt => %u, ports, behaviors, flavors)",
-                task, mask, count);
-    } else {
-      LLDB_LOGF(log,
-                "::task_get_exception_ports(task = 0x%4.4x, mask = 0x%x, "
-                "maskCnt => %u, ports, behaviors, flavors) error: %u (%s)",
-                task, mask, count, error.GetError(), error.AsCString());
-    }
-  }
-
-  if ((error.GetError() == KERN_INVALID_ARGUMENT) &&
-      (mask != PREV_EXC_MASK_ALL)) {
-    mask = PREV_EXC_MASK_ALL;
-    count = (sizeof(ports) / sizeof(ports[0]));
-    mach_err = ::task_get_exception_ports(task, mask, masks, &count, ports,
-                                          behaviors, flavors);
-    error.SetError(mach_err, eErrorTypeMachKernel);
-    if (log) {
-      if (error.Success()) {
-        LLDB_LOGF(log,
-                  "::task_get_exception_ports(task = 0x%4.4x, "
-                  "mask = 0x%x, maskCnt => %u, ports, behaviors, "
-                  "flavors)",
-                  task, mask, count);
-      } else {
-        LLDB_LOGF(log,
-                  "::task_get_exception_ports(task = 0x%4.4x, mask = "
-                  "0x%x, maskCnt => %u, ports, behaviors, flavors) "
-                  "error: %u (%s)",
-                  task, mask, count, error.GetError(), error.AsCString());
-      }
-    }
-  }
-  if (error.Fail()) {
-    mask = 0;
-    count = 0;
-  }
-  return error;
-}
-
-Status MachException::PortInfo::Restore(task_t task) {
-  Status error;
-
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE));
-
-  LLDB_LOGF(log, "MachException::PortInfo::Restore(task = 0x%4.4x)", task);
-
-  uint32_t i = 0;
-  if (count > 0) {
-    for (i = 0; i < count; i++) {
-      auto mach_err = ::task_set_exception_ports(task, masks[i], ports[i],
-                                                 behaviors[i], flavors[i]);
-      if (mach_err)
-        error.SetError(mach_err, eErrorTypeMachKernel);
-      if (log) {
-        if (error.Success()) {
-          LLDB_LOGF(log,
-                    "::task_set_exception_ports(task = 0x%4.4x, "
-                    "exception_mask = 0x%8.8x, new_port = 0x%4.4x, "
-                    "behavior = 0x%8.8x, new_flavor = 0x%8.8x)",
-                    task, masks[i], ports[i], behaviors[i], flavors[i]);
-        } else {
-          LLDB_LOGF(log,
-                    "::task_set_exception_ports(task = 0x%4.4x, "
-                    "exception_mask = 0x%8.8x, new_port = 0x%4.4x, "
-                    "behavior = 0x%8.8x, new_flavor = 0x%8.8x): "
-                    "error %u (%s)",
-                    task, masks[i], ports[i], behaviors[i], flavors[i],
-                    error.GetError(), error.AsCString());
-        }
-      }
-
-      // Bail if we encounter any errors
-      if (error.Fail())
-        break;
-    }
-  }
-
-  count = 0;
-  return error;
-}
-
-const char *MachException::Name(exception_type_t exc_type) {
-  switch (exc_type) {
-  case EXC_BAD_ACCESS:
-    return "EXC_BAD_ACCESS";
-  case EXC_BAD_INSTRUCTION:
-    return "EXC_BAD_INSTRUCTION";
-  case EXC_ARITHMETIC:
-    return "EXC_ARITHMETIC";
-  case EXC_EMULATION:
-    return "EXC_EMULATION";
-  case EXC_SOFTWARE:
-    return "EXC_SOFTWARE";
-  case EXC_BREAKPOINT:
-    return "EXC_BREAKPOINT";
-  case EXC_SYSCALL:
-    return "EXC_SYSCALL";
-  case EXC_MACH_SYSCALL:
-    return "EXC_MACH_SYSCALL";
-  case EXC_RPC_ALERT:
-    return "EXC_RPC_ALERT";
-#ifdef EXC_CRASH
-  case EXC_CRASH:
-    return "EXC_CRASH";
-#endif
-  default:
-    break;
-  }
-  return NULL;
-}
diff --git a/gnu/llvm/lldb/source/Plugins/Process/Darwin/MachException.h b/gnu/llvm/lldb/source/Plugins/Process/Darwin/MachException.h
deleted file mode 100644 (file)
index 18e4917..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-//===-- MachException.h -----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-//  Created by Greg Clayton on 6/18/07.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef __MachException_h__
-#define __MachException_h__
-
-#include <mach/mach.h>
-#include <vector>
-
-#include "lldb/Host/Debug.h"
-#include "lldb/lldb-private-forward.h"
-#include "lldb/lldb-types.h"
-
-namespace lldb_private {
-namespace process_darwin {
-
-typedef union MachMessageTag {
-  mach_msg_header_t hdr;
-  char data[1024];
-} MachMessage;
-
-class MachException {
-public:
-  struct PortInfo {
-    exception_mask_t mask; // the exception mask for this device which may be a
-                           // subset of EXC_MASK_ALL...
-    exception_mask_t masks[EXC_TYPES_COUNT];
-    mach_port_t ports[EXC_TYPES_COUNT];
-    exception_behavior_t behaviors[EXC_TYPES_COUNT];
-    thread_state_flavor_t flavors[EXC_TYPES_COUNT];
-    mach_msg_type_number_t count;
-
-    Status Save(task_t task);
-
-    Status Restore(task_t task);
-  };
-
-  struct Data {
-    task_t task_port;
-    thread_t thread_port;
-    exception_type_t exc_type;
-    std::vector<mach_exception_data_type_t> exc_data;
-    Data()
-        : task_port(TASK_NULL), thread_port(THREAD_NULL), exc_type(0),
-          exc_data() {}
-
-    void Clear() {
-      task_port = TASK_NULL;
-      thread_port = THREAD_NULL;
-      exc_type = 0;
-      exc_data.clear();
-    }
-
-    bool IsValid() const {
-      return task_port != TASK_NULL && thread_port != THREAD_NULL &&
-             exc_type != 0;
-    }
-
-    // Return the SoftSignal for this MachException data, or zero if there is
-    // none
-    int SoftSignal() const {
-      if (exc_type == EXC_SOFTWARE && exc_data.size() == 2 &&
-          exc_data[0] == EXC_SOFT_SIGNAL)
-        return static_cast<int>(exc_data[1]);
-      return 0;
-    }
-
-    bool IsBreakpoint() const {
-      return (exc_type == EXC_BREAKPOINT ||
-              ((exc_type == EXC_SOFTWARE) && exc_data[0] == 1));
-    }
-
-    bool GetStopInfo(ThreadStopInfo *stop_info, const UnixSignals &signals,
-                     Stream &stream) const;
-  };
-
-  struct Message {
-    MachMessage exc_msg;
-    MachMessage reply_msg;
-    Data state;
-
-    Message() : state() {
-      memset(&exc_msg, 0, sizeof(exc_msg));
-      memset(&reply_msg, 0, sizeof(reply_msg));
-    }
-
-    bool CatchExceptionRaise(task_t task);
-
-    Status Reply(::pid_t inferior_pid, task_t inferior_task, int signal);
-
-    Status Receive(mach_port_t receive_port, mach_msg_option_t options,
-                   mach_msg_timeout_t timeout,
-                   mach_port_t notify_port = MACH_PORT_NULL);
-
-    void Dump(Stream &stream) const;
-
-    typedef std::vector<Message> collection;
-    typedef collection::iterator iterator;
-    typedef collection::const_iterator const_iterator;
-  };
-
-  enum {
-    e_actionForward, // Forward signal to inferior process
-    e_actionStop,    // Stop when this signal is received
-  };
-  struct Action {
-    task_t task_port;          // Set to TASK_NULL for any TASK
-    thread_t thread_port;      // Set to THREAD_NULL for any thread
-    exception_type_t exc_mask; // Mach exception mask to watch for
-    std::vector<mach_exception_data_type_t> exc_data_mask; // Mask to apply to
-                                                           // exception data, or
-                                                           // empty to ignore
-                                                           // exc_data value for
-                                                           // exception
-    std::vector<mach_exception_data_type_t> exc_data_value; // Value to compare
-                                                            // to exception data
-                                                            // after masking, or
-                                                            // empty to ignore
-                                                            // exc_data value
-                                                            // for exception
-    uint8_t flags; // Action flags describing what to do with the exception
-  };
-
-  static const char *Name(exception_type_t exc_type);
-};
-
-} // namespace process_darwin
-} // namespace lldb_private
-
-#endif
diff --git a/gnu/llvm/lldb/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp b/gnu/llvm/lldb/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp
deleted file mode 100644 (file)
index 18dbdda..0000000
+++ /dev/null
@@ -1,1535 +0,0 @@
-//===-- NativeProcessDarwin.cpp ---------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "NativeProcessDarwin.h"
-
-// C includes
-#include <mach/mach_init.h>
-#include <mach/mach_traps.h>
-#include <sys/ptrace.h>
-#include <sys/stat.h>
-#include <sys/sysctl.h>
-#include <sys/types.h>
-
-// C++ includes
-// LLDB includes
-#include "lldb/Host/PseudoTerminal.h"
-#include "lldb/Target/ProcessLaunchInfo.h"
-#include "lldb/Utility/Log.h"
-#include "lldb/Utility/State.h"
-#include "lldb/Utility/StreamString.h"
-
-#include "CFBundle.h"
-#include "CFString.h"
-#include "DarwinProcessLauncher.h"
-
-#include "MachException.h"
-
-#include "llvm/Support/FileSystem.h"
-
-using namespace lldb;
-using namespace lldb_private;
-using namespace lldb_private::process_darwin;
-using namespace lldb_private::darwin_process_launcher;
-
-// Hidden Impl
-
-namespace {
-struct hack_task_dyld_info {
-  mach_vm_address_t all_image_info_addr;
-  mach_vm_size_t all_image_info_size;
-};
-}
-
-// Public Static Methods
-
-Status NativeProcessProtocol::Launch(
-    ProcessLaunchInfo &launch_info,
-    NativeProcessProtocol::NativeDelegate &native_delegate, MainLoop &mainloop,
-    NativeProcessProtocolSP &native_process_sp) {
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-
-  Status error;
-
-  // Verify the working directory is valid if one was specified.
-  FileSpec working_dir(launch_info.GetWorkingDirectory());
-  if (working_dir) {
-    FileInstance::Instance().Resolve(working_dir);
-    if (!FileSystem::Instance().IsDirectory(working_dir)) {
-      error.SetErrorStringWithFormat("No such file or directory: %s",
-                                   working_dir.GetCString());
-      return error;
-    }
-  }
-
-  // Launch the inferior.
-  int pty_master_fd = -1;
-  LaunchFlavor launch_flavor = LaunchFlavor::Default;
-
-  error = LaunchInferior(launch_info, &pty_master_fd, &launch_flavor);
-
-  // Handle launch failure.
-  if (!error.Success()) {
-    LLDB_LOGF(log,
-              "NativeProcessDarwin::%s() failed to launch process: "
-              "%s",
-              __FUNCTION__, error.AsCString());
-    return error;
-  }
-
-  // Handle failure to return a pid.
-  if (launch_info.GetProcessID() == LLDB_INVALID_PROCESS_ID) {
-    LLDB_LOGF(log,
-              "NativeProcessDarwin::%s() launch succeeded but no "
-              "pid was returned!  Aborting.",
-              __FUNCTION__);
-    return error;
-  }
-
-  // Create the Darwin native process impl.
-  std::shared_ptr<NativeProcessDarwin> np_darwin_sp(
-      new NativeProcessDarwin(launch_info.GetProcessID(), pty_master_fd));
-  if (!np_darwin_sp->RegisterNativeDelegate(native_delegate)) {
-    native_process_sp.reset();
-    error.SetErrorStringWithFormat("failed to register the native delegate");
-    return error;
-  }
-
-  // Finalize the processing needed to debug the launched process with a
-  // NativeProcessDarwin instance.
-  error = np_darwin_sp->FinalizeLaunch(launch_flavor, mainloop);
-  if (!error.Success()) {
-    LLDB_LOGF(log,
-              "NativeProcessDarwin::%s() aborting, failed to finalize"
-              " the launching of the process: %s",
-              __FUNCTION__, error.AsCString());
-    return error;
-  }
-
-  // Return the process and process id to the caller through the launch args.
-  native_process_sp = np_darwin_sp;
-  return error;
-}
-
-Status NativeProcessProtocol::Attach(
-    lldb::pid_t pid, NativeProcessProtocol::NativeDelegate &native_delegate,
-    MainLoop &mainloop, NativeProcessProtocolSP &native_process_sp) {
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-  LLDB_LOGF(log, "NativeProcessDarwin::%s(pid = %" PRIi64 ")", __FUNCTION__,
-            pid);
-
-  // Retrieve the architecture for the running process.
-  ArchSpec process_arch;
-  Status error = ResolveProcessArchitecture(pid, process_arch);
-  if (!error.Success())
-    return error;
-
-  // TODO get attach to return this value.
-  const int pty_master_fd = -1;
-  std::shared_ptr<NativeProcessDarwin> native_process_darwin_sp(
-      new NativeProcessDarwin(pid, pty_master_fd));
-
-  if (!native_process_darwin_sp->RegisterNativeDelegate(native_delegate)) {
-    error.SetErrorStringWithFormat("failed to register the native "
-                                   "delegate");
-    return error;
-  }
-
-  native_process_darwin_sp->AttachToInferior(mainloop, pid, error);
-  if (!error.Success())
-    return error;
-
-  native_process_sp = native_process_darwin_sp;
-  return error;
-}
-
-// ctor/dtor
-
-NativeProcessDarwin::NativeProcessDarwin(lldb::pid_t pid, int pty_master_fd)
-    : NativeProcessProtocol(pid), m_task(TASK_NULL), m_did_exec(false),
-      m_cpu_type(0), m_exception_port(MACH_PORT_NULL), m_exc_port_info(),
-      m_exception_thread(nullptr), m_exception_messages_mutex(),
-      m_sent_interrupt_signo(0), m_auto_resume_signo(0), m_thread_list(),
-      m_thread_actions(), m_waitpid_pipe(), m_waitpid_thread(nullptr),
-      m_waitpid_reader_handle() {
-  // TODO add this to the NativeProcessProtocol constructor.
-  m_terminal_fd = pty_master_fd;
-}
-
-NativeProcessDarwin::~NativeProcessDarwin() {}
-
-// Instance methods
-
-Status NativeProcessDarwin::FinalizeLaunch(LaunchFlavor launch_flavor,
-                                           MainLoop &main_loop) {
-  Status error;
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-
-  error = StartExceptionThread();
-  if (!error.Success()) {
-    LLDB_LOGF(log,
-              "NativeProcessDarwin::%s(): failure starting the "
-              "mach exception port monitor thread: %s",
-              __FUNCTION__, error.AsCString());
-
-    // Terminate the inferior process.  There's nothing meaningful we can do if
-    // we can't receive signals and exceptions.  Since we launched the process,
-    // it's fair game for us to kill it.
-    ::ptrace(PT_KILL, m_pid, 0, 0);
-    SetState(eStateExited);
-
-    return error;
-  }
-
-  StartSTDIOThread();
-
-  if (launch_flavor == LaunchFlavor::PosixSpawn) {
-    SetState(eStateAttaching);
-    errno = 0;
-    int err = ::ptrace(PT_ATTACHEXC, m_pid, 0, 0);
-    if (err == 0) {
-      // m_flags |= eMachProcessFlagsAttached;
-      LLDB_LOGF(log,
-                "NativeProcessDarwin::%s(): successfully spawned "
-                "process with pid %" PRIu64,
-                __FUNCTION__, m_pid);
-    } else {
-      error.SetErrorToErrno();
-      SetState(eStateExited);
-      LLDB_LOGF(log,
-                "NativeProcessDarwin::%s(): error: failed to "
-                "attach to spawned pid %" PRIu64 " (error=%d (%s))",
-                __FUNCTION__, m_pid, (int)error.GetError(), error.AsCString());
-      return error;
-    }
-  }
-
-  LLDB_LOGF(log, "NativeProcessDarwin::%s(): new pid is %" PRIu64 "...",
-            __FUNCTION__, m_pid);
-
-  // Spawn a thread to reap our child inferior process...
-  error = StartWaitpidThread(main_loop);
-  if (error.Fail()) {
-    LLDB_LOGF(log,
-              "NativeProcessDarwin::%s(): failed to start waitpid() "
-              "thread: %s",
-              __FUNCTION__, error.AsCString());
-    kill(SIGKILL, static_cast<::pid_t>(m_pid));
-    return error;
-  }
-
-  if (TaskPortForProcessID(error) == TASK_NULL) {
-    // We failed to get the task for our process ID which is bad. Kill our
-    // process; otherwise, it will be stopped at the entry point and get
-    // reparented to someone else and never go away.
-    LLDB_LOGF(log,
-              "NativeProcessDarwin::%s(): could not get task port "
-              "for process, sending SIGKILL and exiting: %s",
-              __FUNCTION__, error.AsCString());
-    kill(SIGKILL, static_cast<::pid_t>(m_pid));
-    return error;
-  }
-
-  // Indicate that we're stopped, as we always launch suspended.
-  SetState(eStateStopped);
-
-  // Success.
-  return error;
-}
-
-Status NativeProcessDarwin::SaveExceptionPortInfo() {
-  return m_exc_port_info.Save(m_task);
-}
-
-bool NativeProcessDarwin::ProcessUsingSpringBoard() const {
-  // TODO implement flags
-  // return (m_flags & eMachProcessFlagsUsingSBS) != 0;
-  return false;
-}
-
-bool NativeProcessDarwin::ProcessUsingBackBoard() const {
-  // TODO implement flags
-  // return (m_flags & eMachProcessFlagsUsingBKS) != 0;
-  return false;
-}
-
-// Called by the exception thread when an exception has been received from our
-// process. The exception message is completely filled and the exception data
-// has already been copied.
-void NativeProcessDarwin::ExceptionMessageReceived(
-    const MachException::Message &message) {
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE));
-
-  std::lock_guard<std::recursive_mutex> locker(m_exception_messages_mutex);
-  if (m_exception_messages.empty()) {
-    // Suspend the task the moment we receive our first exception message.
-    SuspendTask();
-  }
-
-  // Use a locker to automatically unlock our mutex in case of exceptions Add
-  // the exception to our internal exception stack
-  m_exception_messages.push_back(message);
-
-  LLDB_LOGF(log, "NativeProcessDarwin::%s(): new queued message count: %lu",
-            __FUNCTION__, m_exception_messages.size());
-}
-
-void *NativeProcessDarwin::ExceptionThread(void *arg) {
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE));
-  if (!arg) {
-    LLDB_LOGF(log,
-              "NativeProcessDarwin::%s(): cannot run mach exception "
-              "thread, mandatory process arg was null",
-              __FUNCTION__);
-    return nullptr;
-  }
-
-  return reinterpret_cast<NativeProcessDarwin *>(arg)->DoExceptionThread();
-}
-
-void *NativeProcessDarwin::DoExceptionThread() {
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE));
-
-  LLDB_LOGF(log, "NativeProcessDarwin::%s(arg=%p) starting thread...",
-            __FUNCTION__, this);
-
-  pthread_setname_np("exception monitoring thread");
-
-  // Ensure we don't get CPU starved.
-  MaybeRaiseThreadPriority();
-
-  // We keep a count of the number of consecutive exceptions received so we
-  // know to grab all exceptions without a timeout. We do this to get a bunch
-  // of related exceptions on our exception port so we can process then
-  // together. When we have multiple threads, we can get an exception per
-  // thread and they will come in consecutively. The main loop in this thread
-  // can stop periodically if needed to service things related to this process.
-  //
-  // [did we lose some words here?]
-  //
-  // flag set in the options, so we will wait forever for an exception on
-  // 0 our exception port. After we get one exception, we then will use the
-  // MACH_RCV_TIMEOUT option with a zero timeout to grab all other current
-  // exceptions for our process. After we have received the last pending
-  // exception, we will get a timeout which enables us to then notify our main
-  // thread that we have an exception bundle available. We then wait for the
-  // main thread to tell this exception thread to start trying to get
-  // exceptions messages again and we start again with a mach_msg read with
-  // infinite timeout.
-  //
-  // We choose to park a thread on this, rather than polling, because the
-  // polling is expensive.  On devices, we need to minimize overhead caused by
-  // the process monitor.
-  uint32_t num_exceptions_received = 0;
-  Status error;
-  task_t task = m_task;
-  mach_msg_timeout_t periodic_timeout = 0;
-
-#if defined(WITH_SPRINGBOARD) && !defined(WITH_BKS)
-  mach_msg_timeout_t watchdog_elapsed = 0;
-  mach_msg_timeout_t watchdog_timeout = 60 * 1000;
-  ::pid_t pid = (::pid_t)process->GetID();
-  CFReleaser<SBSWatchdogAssertionRef> watchdog;
-
-  if (process->ProcessUsingSpringBoard()) {
-    // Request a renewal for every 60 seconds if we attached using SpringBoard.
-    watchdog.reset(::SBSWatchdogAssertionCreateForPID(nullptr, pid, 60));
-    LLDB_LOGF(log,
-              "::SBSWatchdogAssertionCreateForPID(NULL, %4.4x, 60) "
-              "=> %p",
-              pid, watchdog.get());
-
-    if (watchdog.get()) {
-      ::SBSWatchdogAssertionRenew(watchdog.get());
-
-      CFTimeInterval watchdogRenewalInterval =
-          ::SBSWatchdogAssertionGetRenewalInterval(watchdog.get());
-      LLDB_LOGF(log,
-                "::SBSWatchdogAssertionGetRenewalInterval(%p) => "
-                "%g seconds",
-                watchdog.get(), watchdogRenewalInterval);
-      if (watchdogRenewalInterval > 0.0) {
-        watchdog_timeout = (mach_msg_timeout_t)watchdogRenewalInterval * 1000;
-        if (watchdog_timeout > 3000) {
-          // Give us a second to renew our timeout.
-          watchdog_timeout -= 1000;
-        } else if (watchdog_timeout > 1000) {
-          // Give us a quarter of a second to renew our timeout.
-          watchdog_timeout -= 250;
-        }
-      }
-    }
-    if (periodic_timeout == 0 || periodic_timeout > watchdog_timeout)
-      periodic_timeout = watchdog_timeout;
-  }
-#endif // #if defined (WITH_SPRINGBOARD) && !defined (WITH_BKS)
-
-#ifdef WITH_BKS
-  CFReleaser<BKSWatchdogAssertionRef> watchdog;
-  if (process->ProcessUsingBackBoard()) {
-    ::pid_t pid = process->GetID();
-    CFAllocatorRef alloc = kCFAllocatorDefault;
-    watchdog.reset(::BKSWatchdogAssertionCreateForPID(alloc, pid));
-  }
-#endif // #ifdef WITH_BKS
-
-  // Do we want to use a weak pointer to the NativeProcessDarwin here, in which
-  // case we can guarantee we don't whack the process monitor if we race
-  // between this thread and the main one on shutdown?
-  while (IsExceptionPortValid()) {
-    ::pthread_testcancel();
-
-    MachException::Message exception_message;
-
-    if (num_exceptions_received > 0) {
-      // We don't want a timeout here, just receive as many exceptions as we
-      // can since we already have one.  We want to get all currently available
-      // exceptions for this task at once.
-      error = exception_message.Receive(
-          GetExceptionPort(),
-          MACH_RCV_MSG | MACH_RCV_INTERRUPT | MACH_RCV_TIMEOUT, 0);
-    } else if (periodic_timeout > 0) {
-      // We need to stop periodically in this loop, so try and get a mach
-      // message with a valid timeout (ms).
-      error = exception_message.Receive(GetExceptionPort(),
-                                        MACH_RCV_MSG | MACH_RCV_INTERRUPT |
-                                            MACH_RCV_TIMEOUT,
-                                        periodic_timeout);
-    } else {
-      // We don't need to parse all current exceptions or stop periodically,
-      // just wait for an exception forever.
-      error = exception_message.Receive(GetExceptionPort(),
-                                        MACH_RCV_MSG | MACH_RCV_INTERRUPT, 0);
-    }
-
-    if (error.Success()) {
-      // We successfully received an exception.
-      if (exception_message.CatchExceptionRaise(task)) {
-        ++num_exceptions_received;
-        ExceptionMessageReceived(exception_message);
-      }
-    } else {
-      if (error.GetError() == MACH_RCV_INTERRUPTED) {
-        // We were interrupted.
-
-        // If we have no task port we should exit this thread, as it implies
-        // the inferior went down.
-        if (!IsExceptionPortValid()) {
-          LLDB_LOGF(log,
-                    "NativeProcessDarwin::%s(): the inferior "
-                    "exception port is no longer valid, "
-                    "canceling exception thread...",
-                    __FUNCTION__);
-          // Should we be setting a process state here?
-          break;
-        }
-
-        // Make sure the inferior task is still valid.
-        if (IsTaskValid()) {
-          // Task is still ok.
-          LLDB_LOGF(log,
-                    "NativeProcessDarwin::%s(): interrupted, but "
-                    "the inferior task iss till valid, "
-                    "continuing...",
-                    __FUNCTION__);
-          continue;
-        } else {
-          // The inferior task is no longer valid.  Time to exit as the process
-          // has gone away.
-          LLDB_LOGF(log,
-                    "NativeProcessDarwin::%s(): the inferior task "
-                    "has exited, and so will we...",
-                    __FUNCTION__);
-          // Does this race at all with our waitpid()?
-          SetState(eStateExited);
-          break;
-        }
-      } else if (error.GetError() == MACH_RCV_TIMED_OUT) {
-        // We timed out when waiting for exceptions.
-
-        if (num_exceptions_received > 0) {
-          // We were receiving all current exceptions with a timeout of zero.
-          // It is time to go back to our normal looping mode.
-          num_exceptions_received = 0;
-
-          // Notify our main thread we have a complete exception message bundle
-          // available.  Get the possibly updated task port back from the
-          // process in case we exec'ed and our task port changed.
-          task = ExceptionMessageBundleComplete();
-
-          // In case we use a timeout value when getting exceptions, make sure
-          // our task is still valid.
-          if (IsTaskValid(task)) {
-            // Task is still ok.
-            LLDB_LOGF(log,
-                      "NativeProcessDarwin::%s(): got a timeout, "
-                      "continuing...",
-                      __FUNCTION__);
-            continue;
-          } else {
-            // The inferior task is no longer valid.  Time to exit as the
-            // process has gone away.
-            LLDB_LOGF(log,
-                      "NativeProcessDarwin::%s(): the inferior "
-                      "task has exited, and so will we...",
-                      __FUNCTION__);
-            // Does this race at all with our waitpid()?
-            SetState(eStateExited);
-            break;
-          }
-        }
-
-#if defined(WITH_SPRINGBOARD) && !defined(WITH_BKS)
-        if (watchdog.get()) {
-          watchdog_elapsed += periodic_timeout;
-          if (watchdog_elapsed >= watchdog_timeout) {
-            LLDB_LOGF(log, "SBSWatchdogAssertionRenew(%p)", watchdog.get());
-            ::SBSWatchdogAssertionRenew(watchdog.get());
-            watchdog_elapsed = 0;
-          }
-        }
-#endif
-      } else {
-        LLDB_LOGF(log,
-                  "NativeProcessDarwin::%s(): continuing after "
-                  "receiving an unexpected error: %u (%s)",
-                  __FUNCTION__, error.GetError(), error.AsCString());
-        // TODO: notify of error?
-      }
-    }
-  }
-
-#if defined(WITH_SPRINGBOARD) && !defined(WITH_BKS)
-  if (watchdog.get()) {
-    // TODO: change SBSWatchdogAssertionRelease to SBSWatchdogAssertionCancel
-    // when we
-    // all are up and running on systems that support it. The SBS framework has
-    // a #define that will forward SBSWatchdogAssertionRelease to
-    // SBSWatchdogAssertionCancel for now so it should still build either way.
-    DNBLogThreadedIf(LOG_TASK, "::SBSWatchdogAssertionRelease(%p)",
-                     watchdog.get());
-    ::SBSWatchdogAssertionRelease(watchdog.get());
-  }
-#endif // #if defined (WITH_SPRINGBOARD) && !defined (WITH_BKS)
-
-  LLDB_LOGF(log, "NativeProcessDarwin::%s(%p): thread exiting...", __FUNCTION__,
-            this);
-  return nullptr;
-}
-
-Status NativeProcessDarwin::StartExceptionThread() {
-  Status error;
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-  LLDB_LOGF(log, "NativeProcessDarwin::%s() called", __FUNCTION__);
-
-  // Make sure we've looked up the inferior port.
-  TaskPortForProcessID(error);
-
-  // Ensure the inferior task is valid.
-  if (!IsTaskValid()) {
-    error.SetErrorStringWithFormat("cannot start exception thread: "
-                                   "task 0x%4.4x is not valid",
-                                   m_task);
-    return error;
-  }
-
-  // Get the mach port for the process monitor.
-  mach_port_t task_self = mach_task_self();
-
-  // Allocate an exception port that we will use to track our child process
-  auto mach_err = ::mach_port_allocate(task_self, MACH_PORT_RIGHT_RECEIVE,
-                                       &m_exception_port);
-  error.SetError(mach_err, eErrorTypeMachKernel);
-  if (error.Fail()) {
-    LLDB_LOGF(log,
-              "NativeProcessDarwin::%s(): mach_port_allocate("
-              "task_self=0x%4.4x, MACH_PORT_RIGHT_RECEIVE, "
-              "&m_exception_port) failed: %u (%s)",
-              __FUNCTION__, task_self, error.GetError(), error.AsCString());
-    return error;
-  }
-
-  // Add the ability to send messages on the new exception port
-  mach_err = ::mach_port_insert_right(
-      task_self, m_exception_port, m_exception_port, MACH_MSG_TYPE_MAKE_SEND);
-  error.SetError(mach_err, eErrorTypeMachKernel);
-  if (error.Fail()) {
-    LLDB_LOGF(log,
-              "NativeProcessDarwin::%s(): mach_port_insert_right("
-              "task_self=0x%4.4x, m_exception_port=0x%4.4x, "
-              "m_exception_port=0x%4.4x, MACH_MSG_TYPE_MAKE_SEND) "
-              "failed: %u (%s)",
-              __FUNCTION__, task_self, m_exception_port, m_exception_port,
-              error.GetError(), error.AsCString());
-    return error;
-  }
-
-  // Save the original state of the exception ports for our child process.
-  error = SaveExceptionPortInfo();
-  if (error.Fail() || (m_exc_port_info.mask == 0)) {
-    LLDB_LOGF(log,
-              "NativeProcessDarwin::%s(): SaveExceptionPortInfo() "
-              "failed, cannot install exception handler: %s",
-              __FUNCTION__, error.AsCString());
-    return error;
-  }
-
-  // Set the ability to get all exceptions on this port.
-  mach_err = ::task_set_exception_ports(
-      m_task, m_exc_port_info.mask, m_exception_port,
-      EXCEPTION_DEFAULT | MACH_EXCEPTION_CODES, THREAD_STATE_NONE);
-  error.SetError(mach_err, eErrorTypeMachKernel);
-  if (error.Fail()) {
-    LLDB_LOGF(log,
-              "::task_set_exception_ports (task = 0x%4.4x, "
-              "exception_mask = 0x%8.8x, new_port = 0x%4.4x, "
-              "behavior = 0x%8.8x, new_flavor = 0x%8.8x) failed: "
-              "%u (%s)",
-              m_task, m_exc_port_info.mask, m_exception_port,
-              (EXCEPTION_DEFAULT | MACH_EXCEPTION_CODES), THREAD_STATE_NONE,
-              error.GetError(), error.AsCString());
-    return error;
-  }
-
-  // Create the exception thread.
-  auto pthread_err =
-      ::pthread_create(&m_exception_thread, nullptr, ExceptionThread, this);
-  error.SetError(pthread_err, eErrorTypePOSIX);
-  if (error.Fail()) {
-    LLDB_LOGF(log,
-              "NativeProcessDarwin::%s(): failed to create Mach "
-              "exception-handling thread: %u (%s)",
-              __FUNCTION__, error.GetError(), error.AsCString());
-  }
-
-  return error;
-}
-
-lldb::addr_t
-NativeProcessDarwin::GetDYLDAllImageInfosAddress(Status &error) const {
-  error.Clear();
-
-  struct hack_task_dyld_info dyld_info;
-  mach_msg_type_number_t count = TASK_DYLD_INFO_COUNT;
-  // Make sure that COUNT isn't bigger than our hacked up struct
-  // hack_task_dyld_info.  If it is, then make COUNT smaller to match.
-  if (count > (sizeof(struct hack_task_dyld_info) / sizeof(natural_t))) {
-    count = (sizeof(struct hack_task_dyld_info) / sizeof(natural_t));
-  }
-
-  TaskPortForProcessID(error);
-  if (error.Fail())
-    return LLDB_INVALID_ADDRESS;
-
-  auto mach_err =
-      ::task_info(m_task, TASK_DYLD_INFO, (task_info_t)&dyld_info, &count);
-  error.SetError(mach_err, eErrorTypeMachKernel);
-  if (error.Success()) {
-    // We now have the address of the all image infos structure.
-    return dyld_info.all_image_info_addr;
-  }
-
-  // We don't have it.
-  return LLDB_INVALID_ADDRESS;
-}
-
-uint32_t NativeProcessDarwin::GetCPUTypeForLocalProcess(::pid_t pid) {
-  int mib[CTL_MAXNAME] = {
-      0,
-  };
-  size_t len = CTL_MAXNAME;
-
-  if (::sysctlnametomib("sysctl.proc_cputype", mib, &len))
-    return 0;
-
-  mib[len] = pid;
-  len++;
-
-  cpu_type_t cpu;
-  size_t cpu_len = sizeof(cpu);
-  if (::sysctl(mib, static_cast<u_int>(len), &cpu, &cpu_len, 0, 0))
-    cpu = 0;
-  return cpu;
-}
-
-uint32_t NativeProcessDarwin::GetCPUType() const {
-  if (m_cpu_type == 0 && m_pid != 0)
-    m_cpu_type = GetCPUTypeForLocalProcess(m_pid);
-  return m_cpu_type;
-}
-
-task_t NativeProcessDarwin::ExceptionMessageBundleComplete() {
-  // We have a complete bundle of exceptions for our child process.
-  Status error;
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE));
-
-  std::lock_guard<std::recursive_mutex> locker(m_exception_messages_mutex);
-  LLDB_LOGF(log,
-            "NativeProcessDarwin::%s(): processing %lu exception "
-            "messages.",
-            __FUNCTION__, m_exception_messages.size());
-
-  if (m_exception_messages.empty()) {
-    // Not particularly useful...
-    return m_task;
-  }
-
-  bool auto_resume = false;
-  m_did_exec = false;
-
-  // First check for any SIGTRAP and make sure we didn't exec
-  const task_t task = m_task;
-  size_t i;
-  if (m_pid != 0) {
-    bool received_interrupt = false;
-    uint32_t num_task_exceptions = 0;
-    for (i = 0; i < m_exception_messages.size(); ++i) {
-      if (m_exception_messages[i].state.task_port != task) {
-        // This is an exception that is not for our inferior, ignore.
-        continue;
-      }
-
-      // This is an exception for the inferior.
-      ++num_task_exceptions;
-      const int signo = m_exception_messages[i].state.SoftSignal();
-      if (signo == SIGTRAP) {
-        // SIGTRAP could mean that we exec'ed. We need to check the
-        // dyld all_image_infos.infoArray to see if it is NULL and if so, say
-        // that we exec'ed.
-        const addr_t aii_addr = GetDYLDAllImageInfosAddress(error);
-        if (aii_addr == LLDB_INVALID_ADDRESS)
-          break;
-
-        const addr_t info_array_count_addr = aii_addr + 4;
-        uint32_t info_array_count = 0;
-        size_t bytes_read = 0;
-        Status read_error;
-        read_error = ReadMemory(info_array_count_addr, // source addr
-                                &info_array_count,     // dest addr
-                                4,                     // byte count
-                                bytes_read);           // #bytes read
-        if (read_error.Success() && (bytes_read == 4)) {
-          if (info_array_count == 0) {
-            // We got the all infos address, and there are zero entries.  We
-            // think we exec'd.
-            m_did_exec = true;
-
-            // Force the task port to update itself in case the task port
-            // changed after exec
-            const task_t old_task = m_task;
-            const bool force_update = true;
-            const task_t new_task = TaskPortForProcessID(error, force_update);
-            if (old_task != new_task) {
-              LLDB_LOGF(log,
-                        "exec: inferior task port changed "
-                        "from 0x%4.4x to 0x%4.4x",
-                        old_task, new_task);
-            }
-          }
-        } else {
-          LLDB_LOGF(log,
-                    "NativeProcessDarwin::%s() warning: "
-                    "failed to read all_image_infos."
-                    "infoArrayCount from 0x%8.8llx",
-                    __FUNCTION__, info_array_count_addr);
-        }
-      } else if ((m_sent_interrupt_signo != 0) &&
-                 (signo == m_sent_interrupt_signo)) {
-        // We just received the interrupt that we sent to ourselves.
-        received_interrupt = true;
-      }
-    }
-
-    if (m_did_exec) {
-      cpu_type_t process_cpu_type = GetCPUTypeForLocalProcess(m_pid);
-      if (m_cpu_type != process_cpu_type) {
-        LLDB_LOGF(log,
-                  "NativeProcessDarwin::%s(): arch changed from "
-                  "0x%8.8x to 0x%8.8x",
-                  __FUNCTION__, m_cpu_type, process_cpu_type);
-        m_cpu_type = process_cpu_type;
-        // TODO figure out if we need to do something here.
-        // DNBArchProtocol::SetArchitecture (process_cpu_type);
-      }
-      m_thread_list.Clear();
-
-      // TODO hook up breakpoints.
-      // m_breakpoints.DisableAll();
-    }
-
-    if (m_sent_interrupt_signo != 0) {
-      if (received_interrupt) {
-        LLDB_LOGF(log,
-                  "NativeProcessDarwin::%s(): process "
-                  "successfully interrupted with signal %i",
-                  __FUNCTION__, m_sent_interrupt_signo);
-
-        // Mark that we received the interrupt signal
-        m_sent_interrupt_signo = 0;
-        // Now check if we had a case where:
-        // 1 - We called NativeProcessDarwin::Interrupt() but we stopped
-        //     for another reason.
-        // 2 - We called NativeProcessDarwin::Resume() (but still
-        //     haven't gotten the interrupt signal).
-        // 3 - We are now incorrectly stopped because we are handling
-        //     the interrupt signal we missed.
-        // 4 - We might need to resume if we stopped only with the
-        //     interrupt signal that we never handled.
-        if (m_auto_resume_signo != 0) {
-          // Only auto_resume if we stopped with _only_ the interrupt signal.
-          if (num_task_exceptions == 1) {
-            auto_resume = true;
-            LLDB_LOGF(log,
-                      "NativeProcessDarwin::%s(): auto "
-                      "resuming due to unhandled interrupt "
-                      "signal %i",
-                      __FUNCTION__, m_auto_resume_signo);
-          }
-          m_auto_resume_signo = 0;
-        }
-      } else {
-        LLDB_LOGF(log,
-                  "NativeProcessDarwin::%s(): didn't get signal "
-                  "%i after MachProcess::Interrupt()",
-                  __FUNCTION__, m_sent_interrupt_signo);
-      }
-    }
-  }
-
-  // Let all threads recover from stopping and do any clean up based on the
-  // previous thread state (if any).
-  m_thread_list.ProcessDidStop(*this);
-
-  // Let each thread know of any exceptions
-  for (i = 0; i < m_exception_messages.size(); ++i) {
-    // Let the thread list forward all exceptions on down to each thread.
-    if (m_exception_messages[i].state.task_port == task) {
-      // This exception is for our inferior.
-      m_thread_list.NotifyException(m_exception_messages[i].state);
-    }
-
-    if (log) {
-      StreamString stream;
-      m_exception_messages[i].Dump(stream);
-      stream.Flush();
-      log->PutCString(stream.GetString().c_str());
-    }
-  }
-
-  if (log) {
-    StreamString stream;
-    m_thread_list.Dump(stream);
-    stream.Flush();
-    log->PutCString(stream.GetString().c_str());
-  }
-
-  bool step_more = false;
-  if (m_thread_list.ShouldStop(step_more) && (auto_resume == false)) {
-// TODO - need to hook up event system here. !!!!
-#if 0
-        // Wait for the eEventProcessRunningStateChanged event to be reset
-        // before changing state to stopped to avoid race condition with very
-        // fast start/stops.
-        struct timespec timeout;
-
-        //DNBTimer::OffsetTimeOfDay(&timeout, 0, 250 * 1000);   // Wait for 250 ms
-        DNBTimer::OffsetTimeOfDay(&timeout, 1, 0);  // Wait for 250 ms
-        m_events.WaitForEventsToReset(eEventProcessRunningStateChanged,
-                                      &timeout);
-#endif
-    SetState(eStateStopped);
-  } else {
-    // Resume without checking our current state.
-    PrivateResume();
-  }
-
-  return m_task;
-}
-
-void NativeProcessDarwin::StartSTDIOThread() {
-  // TODO implement
-}
-
-Status NativeProcessDarwin::StartWaitpidThread(MainLoop &main_loop) {
-  Status error;
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-
-  // Strategy: create a thread that sits on waitpid(), waiting for the inferior
-  // process to die, reaping it in the process.  Arrange for the thread to have
-  // a pipe file descriptor that it can send a byte over when the waitpid
-  // completes.  Have the main loop have a read object for the other side of
-  // the pipe, and have the callback for the read do the process termination
-  // message sending.
-
-  // Create a single-direction communication channel.
-  const bool child_inherits = false;
-  error = m_waitpid_pipe.CreateNew(child_inherits);
-  if (error.Fail()) {
-    LLDB_LOGF(log,
-              "NativeProcessDarwin::%s(): failed to create waitpid "
-              "communication pipe: %s",
-              __FUNCTION__, error.AsCString());
-    return error;
-  }
-
-  // Hook up the waitpid reader callback.
-
-  // TODO make PipePOSIX derive from IOObject.  This is goofy here.
-  const bool transfer_ownership = false;
-  auto io_sp = IOObjectSP(new NativeFile(m_waitpid_pipe.GetReadFileDescriptor(),
-                                         transfer_ownership));
-  m_waitpid_reader_handle = main_loop.RegisterReadObject(
-      io_sp, [this](MainLoopBase &) { HandleWaitpidResult(); }, error);
-
-  // Create the thread.
-  auto pthread_err =
-      ::pthread_create(&m_waitpid_thread, nullptr, WaitpidThread, this);
-  error.SetError(pthread_err, eErrorTypePOSIX);
-  if (error.Fail()) {
-    LLDB_LOGF(log,
-              "NativeProcessDarwin::%s(): failed to create waitpid "
-              "handling thread: %u (%s)",
-              __FUNCTION__, error.GetError(), error.AsCString());
-    return error;
-  }
-
-  return error;
-}
-
-void *NativeProcessDarwin::WaitpidThread(void *arg) {
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-  if (!arg) {
-    LLDB_LOGF(log,
-              "NativeProcessDarwin::%s(): cannot run waitpid "
-              "thread, mandatory process arg was null",
-              __FUNCTION__);
-    return nullptr;
-  }
-
-  return reinterpret_cast<NativeProcessDarwin *>(arg)->DoWaitpidThread();
-}
-
-void NativeProcessDarwin::MaybeRaiseThreadPriority() {
-#if defined(__arm__) || defined(__arm64__) || defined(__aarch64__)
-  struct sched_param thread_param;
-  int thread_sched_policy;
-  if (pthread_getschedparam(pthread_self(), &thread_sched_policy,
-                            &thread_param) == 0) {
-    thread_param.sched_priority = 47;
-    pthread_setschedparam(pthread_self(), thread_sched_policy, &thread_param);
-  }
-#endif
-}
-
-void *NativeProcessDarwin::DoWaitpidThread() {
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-
-  if (m_pid == LLDB_INVALID_PROCESS_ID) {
-    LLDB_LOGF(log,
-              "NativeProcessDarwin::%s(): inferior process ID is "
-              "not set, cannot waitpid on it",
-              __FUNCTION__);
-    return nullptr;
-  }
-
-  // Name the thread.
-  pthread_setname_np("waitpid thread");
-
-  // Ensure we don't get CPU starved.
-  MaybeRaiseThreadPriority();
-
-  Status error;
-  int status = -1;
-
-  while (1) {
-    // Do a waitpid.
-    ::pid_t child_pid = ::waitpid(m_pid, &status, 0);
-    if (child_pid < 0)
-      error.SetErrorToErrno();
-    if (error.Fail()) {
-      if (error.GetError() == EINTR) {
-        // This is okay, we can keep going.
-        LLDB_LOGF(log,
-                  "NativeProcessDarwin::%s(): waitpid(pid = %" PRIu64
-                  ", &status, 0) interrupted, continuing",
-                  __FUNCTION__, m_pid);
-        continue;
-      }
-
-      // This error is not okay, abort.
-      LLDB_LOGF(log,
-                "NativeProcessDarwin::%s(): waitpid(pid = %" PRIu64
-                ", &status, 0) aborting due to error: %u (%s)",
-                __FUNCTION__, m_pid, error.GetError(), error.AsCString());
-      break;
-    }
-
-    // Log the successful result.
-    LLDB_LOGF(log,
-              "NativeProcessDarwin::%s(): waitpid(pid = %" PRIu64
-              ", &status, 0) => %i, status = %i",
-              __FUNCTION__, m_pid, child_pid, status);
-
-    // Handle the result.
-    if (WIFSTOPPED(status)) {
-      LLDB_LOGF(log,
-                "NativeProcessDarwin::%s(): waitpid(pid = %" PRIu64
-                ") received a stop, continuing waitpid() loop",
-                __FUNCTION__, m_pid);
-      continue;
-    } else // if (WIFEXITED(status) || WIFSIGNALED(status))
-    {
-      LLDB_LOGF(log,
-                "NativeProcessDarwin::%s(pid = %" PRIu64 "): "
-                "waitpid thread is setting exit status for pid = "
-                "%i to %i",
-                __FUNCTION__, m_pid, child_pid, status);
-
-      error = SendInferiorExitStatusToMainLoop(child_pid, status);
-      return nullptr;
-    }
-  }
-
-  // We should never exit as long as our child process is alive.  If we get
-  // here, something completely unexpected went wrong and we should exit.
-  LLDB_LOGF(log,
-            "NativeProcessDarwin::%s(): internal error: waitpid thread "
-            "exited out of its main loop in an unexpected way. pid = %" PRIu64
-            ". Sending exit status of -1.",
-            __FUNCTION__, m_pid);
-
-  error = SendInferiorExitStatusToMainLoop((::pid_t)m_pid, -1);
-  return nullptr;
-}
-
-Status NativeProcessDarwin::SendInferiorExitStatusToMainLoop(::pid_t pid,
-                                                             int status) {
-  Status error;
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-
-  size_t bytes_written = 0;
-
-  // Send the pid.
-  error = m_waitpid_pipe.Write(&pid, sizeof(pid), bytes_written);
-  if (error.Fail() || (bytes_written < sizeof(pid))) {
-    LLDB_LOGF(log,
-              "NativeProcessDarwin::%s() - failed to write "
-              "waitpid exiting pid to the pipe.  Client will not "
-              "hear about inferior exit status!",
-              __FUNCTION__);
-    return error;
-  }
-
-  // Send the status.
-  bytes_written = 0;
-  error = m_waitpid_pipe.Write(&status, sizeof(status), bytes_written);
-  if (error.Fail() || (bytes_written < sizeof(status))) {
-    LLDB_LOGF(log,
-              "NativeProcessDarwin::%s() - failed to write "
-              "waitpid exit result to the pipe.  Client will not "
-              "hear about inferior exit status!",
-              __FUNCTION__);
-  }
-  return error;
-}
-
-Status NativeProcessDarwin::HandleWaitpidResult() {
-  Status error;
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-
-  // Read the pid.
-  const bool notify_status = true;
-
-  ::pid_t pid = -1;
-  size_t bytes_read = 0;
-  error = m_waitpid_pipe.Read(&pid, sizeof(pid), bytes_read);
-  if (error.Fail() || (bytes_read < sizeof(pid))) {
-    LLDB_LOGF(log,
-              "NativeProcessDarwin::%s() - failed to read "
-              "waitpid exiting pid from the pipe.  Will notify "
-              "as if parent process died with exit status -1.",
-              __FUNCTION__);
-    SetExitStatus(WaitStatus(WaitStatus::Exit, -1), notify_status);
-    return error;
-  }
-
-  // Read the status.
-  int status = -1;
-  error = m_waitpid_pipe.Read(&status, sizeof(status), bytes_read);
-  if (error.Fail() || (bytes_read < sizeof(status))) {
-    LLDB_LOGF(log,
-              "NativeProcessDarwin::%s() - failed to read "
-              "waitpid exit status from the pipe.  Will notify "
-              "as if parent process died with exit status -1.",
-              __FUNCTION__);
-    SetExitStatus(WaitStatus(WaitStatus::Exit, -1), notify_status);
-    return error;
-  }
-
-  // Notify the monitor that our state has changed.
-  LLDB_LOGF(log,
-            "NativeProcessDarwin::%s(): main loop received waitpid "
-            "exit status info: pid=%i (%s), status=%i",
-            __FUNCTION__, pid,
-            (pid == m_pid) ? "the inferior" : "not the inferior", status);
-
-  SetExitStatus(WaitStatus::Decode(status), notify_status);
-  return error;
-}
-
-task_t NativeProcessDarwin::TaskPortForProcessID(Status &error,
-                                                 bool force) const {
-  if ((m_task == TASK_NULL) || force) {
-    Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-    if (m_pid == LLDB_INVALID_PROCESS_ID) {
-      LLDB_LOGF(log,
-                "NativeProcessDarwin::%s(): cannot get task due "
-                "to invalid pid",
-                __FUNCTION__);
-      return TASK_NULL;
-    }
-
-    const uint32_t num_retries = 10;
-    const uint32_t usec_interval = 10000;
-
-    mach_port_t task_self = mach_task_self();
-    task_t task = TASK_NULL;
-
-    for (uint32_t i = 0; i < num_retries; i++) {
-      kern_return_t err = ::task_for_pid(task_self, m_pid, &task);
-      if (err == 0) {
-        // Succeeded.  Save and return it.
-        error.Clear();
-        m_task = task;
-        LLDB_LOGF(log,
-                  "NativeProcessDarwin::%s(): ::task_for_pid("
-                  "stub_port = 0x%4.4x, pid = %llu, &task) "
-                  "succeeded: inferior task port = 0x%4.4x",
-                  __FUNCTION__, task_self, m_pid, m_task);
-        return m_task;
-      } else {
-        // Failed to get the task for the inferior process.
-        error.SetError(err, eErrorTypeMachKernel);
-        if (log) {
-          LLDB_LOGF(log,
-                    "NativeProcessDarwin::%s(): ::task_for_pid("
-                    "stub_port = 0x%4.4x, pid = %llu, &task) "
-                    "failed, err = 0x%8.8x (%s)",
-                    __FUNCTION__, task_self, m_pid, err, error.AsCString());
-        }
-      }
-
-      // Sleep a bit and try again
-      ::usleep(usec_interval);
-    }
-
-    // We failed to get the task for the inferior process. Ensure that it is
-    // cleared out.
-    m_task = TASK_NULL;
-  }
-  return m_task;
-}
-
-void NativeProcessDarwin::AttachToInferior(MainLoop &mainloop, lldb::pid_t pid,
-                                           Status &error) {
-  error.SetErrorString("TODO: implement");
-}
-
-Status NativeProcessDarwin::PrivateResume() {
-  Status error;
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-
-  std::lock_guard<std::recursive_mutex> locker(m_exception_messages_mutex);
-  m_auto_resume_signo = m_sent_interrupt_signo;
-
-  if (log) {
-    if (m_auto_resume_signo)
-      LLDB_LOGF(log,
-                "NativeProcessDarwin::%s(): task 0x%x resuming (with "
-                "unhandled interrupt signal %i)...",
-                __FUNCTION__, m_task, m_auto_resume_signo);
-    else
-      LLDB_LOGF(log, "NativeProcessDarwin::%s(): task 0x%x resuming...",
-                __FUNCTION__, m_task);
-  }
-
-  error = ReplyToAllExceptions();
-  if (error.Fail()) {
-    LLDB_LOGF(log,
-              "NativeProcessDarwin::%s(): aborting, failed to "
-              "reply to exceptions: %s",
-              __FUNCTION__, error.AsCString());
-    return error;
-  }
-  //    bool stepOverBreakInstruction = step;
-
-  // Let the thread prepare to resume and see if any threads want us to step
-  // over a breakpoint instruction (ProcessWillResume will modify the value of
-  // stepOverBreakInstruction).
-  m_thread_list.ProcessWillResume(*this, m_thread_actions);
-
-  // Set our state accordingly
-  if (m_thread_actions.NumActionsWithState(eStateStepping))
-    SetState(eStateStepping);
-  else
-    SetState(eStateRunning);
-
-  // Now resume our task.
-  error = ResumeTask();
-  return error;
-}
-
-Status NativeProcessDarwin::ReplyToAllExceptions() {
-  Status error;
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE));
-
-  TaskPortForProcessID(error);
-  if (error.Fail()) {
-    LLDB_LOGF(log, "NativeProcessDarwin::%s(): no task port, aborting",
-              __FUNCTION__);
-    return error;
-  }
-
-  std::lock_guard<std::recursive_mutex> locker(m_exception_messages_mutex);
-  if (m_exception_messages.empty()) {
-    // We're done.
-    return error;
-  }
-
-  size_t index = 0;
-  for (auto &message : m_exception_messages) {
-    if (log) {
-      LLDB_LOGF(log,
-                "NativeProcessDarwin::%s(): replying to exception "
-                "%zu...",
-                __FUNCTION__, index++);
-    }
-
-    int thread_reply_signal = 0;
-
-    const tid_t tid =
-        m_thread_list.GetThreadIDByMachPortNumber(message.state.thread_port);
-    const ResumeAction *action = nullptr;
-    if (tid != LLDB_INVALID_THREAD_ID)
-      action = m_thread_actions.GetActionForThread(tid, false);
-
-    if (action) {
-      thread_reply_signal = action->signal;
-      if (thread_reply_signal)
-        m_thread_actions.SetSignalHandledForThread(tid);
-    }
-
-    error = message.Reply(m_pid, m_task, thread_reply_signal);
-    if (error.Fail() && log) {
-      // We log any error here, but we don't stop the exception response
-      // handling.
-      LLDB_LOGF(log,
-                "NativeProcessDarwin::%s(): failed to reply to "
-                "exception: %s",
-                __FUNCTION__, error.AsCString());
-      error.Clear();
-    }
-  }
-
-  // Erase all exception message as we should have used and replied to them all
-  // already.
-  m_exception_messages.clear();
-  return error;
-}
-
-Status NativeProcessDarwin::ResumeTask() {
-  Status error;
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-
-  TaskPortForProcessID(error);
-  if (error.Fail()) {
-    LLDB_LOGF(log,
-              "NativeProcessDarwin::%s(): failed to get task port "
-              "for process when attempting to resume: %s",
-              __FUNCTION__, error.AsCString());
-    return error;
-  }
-  if (m_task == TASK_NULL) {
-    error.SetErrorString("task port retrieval succeeded but task port is "
-                         "null when attempting to resume the task");
-    return error;
-  }
-
-  LLDB_LOGF(log,
-            "NativeProcessDarwin::%s(): requesting resume of task "
-            "0x%4.4x",
-            __FUNCTION__, m_task);
-
-  // Get the BasicInfo struct to verify that we're suspended before we try to
-  // resume the task.
-  struct task_basic_info task_info;
-  error = GetTaskBasicInfo(m_task, &task_info);
-  if (error.Fail()) {
-    LLDB_LOGF(log,
-              "NativeProcessDarwin::%s(): failed to get task "
-              "BasicInfo when attempting to resume: %s",
-              __FUNCTION__, error.AsCString());
-    return error;
-  }
-
-  // task_resume isn't counted like task_suspend calls are, so if the task is
-  // not suspended, don't try and resume it since it is already running
-  if (task_info.suspend_count > 0) {
-    auto mach_err = ::task_resume(m_task);
-    error.SetError(mach_err, eErrorTypeMachKernel);
-    if (log) {
-      if (error.Success())
-        LLDB_LOGF(log, "::task_resume(target_task = 0x%4.4x): success", m_task);
-      else
-        LLDB_LOGF(log, "::task_resume(target_task = 0x%4.4x) error: %s", m_task,
-                  error.AsCString());
-    }
-  } else {
-    LLDB_LOGF(log,
-              "::task_resume(target_task = 0x%4.4x): ignored, "
-              "already running",
-              m_task);
-  }
-
-  return error;
-}
-
-bool NativeProcessDarwin::IsTaskValid() const {
-  if (m_task == TASK_NULL)
-    return false;
-
-  struct task_basic_info task_info;
-  return GetTaskBasicInfo(m_task, &task_info).Success();
-}
-
-bool NativeProcessDarwin::IsTaskValid(task_t task) const {
-  if (task == TASK_NULL)
-    return false;
-
-  struct task_basic_info task_info;
-  return GetTaskBasicInfo(task, &task_info).Success();
-}
-
-mach_port_t NativeProcessDarwin::GetExceptionPort() const {
-  return m_exception_port;
-}
-
-bool NativeProcessDarwin::IsExceptionPortValid() const {
-  return MACH_PORT_VALID(m_exception_port);
-}
-
-Status
-NativeProcessDarwin::GetTaskBasicInfo(task_t task,
-                                      struct task_basic_info *info) const {
-  Status error;
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-
-  // Validate args.
-  if (info == NULL) {
-    error.SetErrorStringWithFormat("NativeProcessDarwin::%s(): mandatory "
-                                   "info arg is null",
-                                   __FUNCTION__);
-    return error;
-  }
-
-  // Grab the task if we don't already have it.
-  if (task == TASK_NULL) {
-    error.SetErrorStringWithFormat("NativeProcessDarwin::%s(): given task "
-                                   "is invalid",
-                                   __FUNCTION__);
-  }
-
-  mach_msg_type_number_t count = TASK_BASIC_INFO_COUNT;
-  auto err = ::task_info(m_task, TASK_BASIC_INFO, (task_info_t)info, &count);
-  error.SetError(err, eErrorTypeMachKernel);
-  if (error.Fail()) {
-    LLDB_LOGF(log,
-              "::task_info(target_task = 0x%4.4x, "
-              "flavor = TASK_BASIC_INFO, task_info_out => %p, "
-              "task_info_outCnt => %u) failed: %u (%s)",
-              m_task, info, count, error.GetError(), error.AsCString());
-    return error;
-  }
-
-  Log *verbose_log(
-      GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE));
-  if (verbose_log) {
-    float user = (float)info->user_time.seconds +
-                 (float)info->user_time.microseconds / 1000000.0f;
-    float system = (float)info->user_time.seconds +
-                   (float)info->user_time.microseconds / 1000000.0f;
-    verbose_LLDB_LOGF(log,
-                      "task_basic_info = { suspend_count = %i, "
-                      "virtual_size = 0x%8.8llx, resident_size = "
-                      "0x%8.8llx, user_time = %f, system_time = %f }",
-                      info->suspend_count, (uint64_t)info->virtual_size,
-                      (uint64_t)info->resident_size, user, system);
-  }
-  return error;
-}
-
-Status NativeProcessDarwin::SuspendTask() {
-  Status error;
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-
-  if (m_task == TASK_NULL) {
-    error.SetErrorString("task port is null, cannot suspend task");
-    LLDB_LOGF(log, "NativeProcessDarwin::%s() failed: %s", __FUNCTION__,
-              error.AsCString());
-    return error;
-  }
-
-  auto mach_err = ::task_suspend(m_task);
-  error.SetError(mach_err, eErrorTypeMachKernel);
-  if (error.Fail() && log)
-    LLDB_LOGF(log, "::task_suspend(target_task = 0x%4.4x)", m_task);
-
-  return error;
-}
-
-Status NativeProcessDarwin::Resume(const ResumeActionList &resume_actions) {
-  Status error;
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-
-  LLDB_LOGF(log, "NativeProcessDarwin::%s() called", __FUNCTION__);
-
-  if (CanResume()) {
-    m_thread_actions = resume_actions;
-    error = PrivateResume();
-    return error;
-  }
-
-  auto state = GetState();
-  if (state == eStateRunning) {
-    LLDB_LOGF(log,
-              "NativeProcessDarwin::%s(): task 0x%x is already "
-              "running, ignoring...",
-              __FUNCTION__, TaskPortForProcessID(error));
-    return error;
-  }
-
-  // We can't resume from this state.
-  error.SetErrorStringWithFormat("task 0x%x has state %s, can't resume",
-                                 TaskPortForProcessID(error),
-                                 StateAsCString(state));
-  return error;
-}
-
-Status NativeProcessDarwin::Halt() {
-  Status error;
-  error.SetErrorString("TODO: implement");
-  return error;
-}
-
-Status NativeProcessDarwin::Detach() {
-  Status error;
-  error.SetErrorString("TODO: implement");
-  return error;
-}
-
-Status NativeProcessDarwin::Signal(int signo) {
-  Status error;
-  error.SetErrorString("TODO: implement");
-  return error;
-}
-
-Status NativeProcessDarwin::Interrupt() {
-  Status error;
-  error.SetErrorString("TODO: implement");
-  return error;
-}
-
-Status NativeProcessDarwin::Kill() {
-  Status error;
-  error.SetErrorString("TODO: implement");
-  return error;
-}
-
-Status NativeProcessDarwin::GetMemoryRegionInfo(lldb::addr_t load_addr,
-                                                MemoryRegionInfo &range_info) {
-  Status error;
-  error.SetErrorString("TODO: implement");
-  return error;
-}
-
-Status NativeProcessDarwin::ReadMemory(lldb::addr_t addr, void *buf,
-                                       size_t size, size_t &bytes_read) {
-  Status error;
-  error.SetErrorString("TODO: implement");
-  return error;
-}
-
-Status NativeProcessDarwin::ReadMemoryWithoutTrap(lldb::addr_t addr, void *buf,
-                                                  size_t size,
-                                                  size_t &bytes_read) {
-  Status error;
-  error.SetErrorString("TODO: implement");
-  return error;
-}
-
-Status NativeProcessDarwin::WriteMemory(lldb::addr_t addr, const void *buf,
-                                        size_t size, size_t &bytes_written) {
-  Status error;
-  error.SetErrorString("TODO: implement");
-  return error;
-}
-
-Status NativeProcessDarwin::AllocateMemory(size_t size, uint32_t permissions,
-                                           lldb::addr_t &addr) {
-  Status error;
-  error.SetErrorString("TODO: implement");
-  return error;
-}
-
-Status NativeProcessDarwin::DeallocateMemory(lldb::addr_t addr) {
-  Status error;
-  error.SetErrorString("TODO: implement");
-  return error;
-}
-
-lldb::addr_t NativeProcessDarwin::GetSharedLibraryInfoAddress() {
-  return LLDB_INVALID_ADDRESS;
-}
-
-size_t NativeProcessDarwin::UpdateThreads() { return 0; }
-
-bool NativeProcessDarwin::GetArchitecture(ArchSpec &arch) const {
-  return false;
-}
-
-Status NativeProcessDarwin::SetBreakpoint(lldb::addr_t addr, uint32_t size,
-                                          bool hardware) {
-  Status error;
-  error.SetErrorString("TODO: implement");
-  return error;
-}
-
-void NativeProcessDarwin::DoStopIDBumped(uint32_t newBumpId) {}
-
-Status NativeProcessDarwin::GetLoadedModuleFileSpec(const char *module_path,
-                                                    FileSpec &file_spec) {
-  Status error;
-  error.SetErrorString("TODO: implement");
-  return error;
-}
-
-Status NativeProcessDarwin::GetFileLoadAddress(const llvm::StringRef &file_name,
-                                               lldb::addr_t &load_addr) {
-  Status error;
-  error.SetErrorString("TODO: implement");
-  return error;
-}
-
-// NativeProcessProtocol protected interface
-Status NativeProcessDarwin::GetSoftwareBreakpointTrapOpcode(
-    size_t trap_opcode_size_hint, size_t &actual_opcode_size,
-    const uint8_t *&trap_opcode_bytes) {
-  Status error;
-  error.SetErrorString("TODO: implement");
-  return error;
-}
diff --git a/gnu/llvm/lldb/source/Plugins/Process/Darwin/NativeProcessDarwin.h b/gnu/llvm/lldb/source/Plugins/Process/Darwin/NativeProcessDarwin.h
deleted file mode 100644 (file)
index 6741d4d..0000000
+++ /dev/null
@@ -1,337 +0,0 @@
-//===-- NativeProcessDarwin.h --------------------------------- -*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef NativeProcessDarwin_h
-#define NativeProcessDarwin_h
-
-// NOTE: this code should only be compiled on Apple Darwin systems.  It is
-// not cross-platform code and is not intended to build on any other platform.
-// Therefore, platform-specific headers and code are okay here.
-
-// C includes
-#include <mach/mach_types.h>
-
-// C++ includes
-#include <mutex>
-#include <unordered_set>
-
-#include "lldb/Host/Debug.h"
-#include "lldb/Host/HostThread.h"
-#include "lldb/Host/Pipe.h"
-#include "lldb/Host/common/NativeProcessProtocol.h"
-#include "lldb/Target/MemoryRegionInfo.h"
-#include "lldb/Utility/ArchSpec.h"
-#include "lldb/Utility/FileSpec.h"
-#include "lldb/lldb-types.h"
-
-#include "LaunchFlavor.h"
-#include "MachException.h"
-#include "NativeThreadDarwin.h"
-#include "NativeThreadListDarwin.h"
-
-namespace lldb_private {
-class Status;
-class Scalar;
-
-namespace process_darwin {
-
-/// \class NativeProcessDarwin
-/// Manages communication with the inferior (debugee) process.
-///
-/// Upon construction, this class prepares and launches an inferior process
-/// for debugging.
-///
-/// Changes in the inferior process state are broadcasted.
-class NativeProcessDarwin : public NativeProcessProtocol {
-  friend Status NativeProcessProtocol::Launch(
-      ProcessLaunchInfo &launch_info, NativeDelegate &native_delegate,
-      MainLoop &mainloop, NativeProcessProtocolSP &process_sp);
-
-  friend Status NativeProcessProtocol::Attach(
-      lldb::pid_t pid, NativeProcessProtocol::NativeDelegate &native_delegate,
-      MainLoop &mainloop, NativeProcessProtocolSP &process_sp);
-
-public:
-  ~NativeProcessDarwin() override;
-
-  // NativeProcessProtocol Interface
-  Status Resume(const ResumeActionList &resume_actions) override;
-
-  Status Halt() override;
-
-  Status Detach() override;
-
-  Status Signal(int signo) override;
-
-  Status Interrupt() override;
-
-  Status Kill() override;
-
-  Status GetMemoryRegionInfo(lldb::addr_t load_addr,
-                             MemoryRegionInfo &range_info) override;
-
-  Status ReadMemory(lldb::addr_t addr, void *buf, size_t size,
-                    size_t &bytes_read) override;
-
-  Status ReadMemoryWithoutTrap(lldb::addr_t addr, void *buf, size_t size,
-                               size_t &bytes_read) override;
-
-  Status WriteMemory(lldb::addr_t addr, const void *buf, size_t size,
-                     size_t &bytes_written) override;
-
-  Status AllocateMemory(size_t size, uint32_t permissions,
-                        lldb::addr_t &addr) override;
-
-  Status DeallocateMemory(lldb::addr_t addr) override;
-
-  lldb::addr_t GetSharedLibraryInfoAddress() override;
-
-  size_t UpdateThreads() override;
-
-  bool GetArchitecture(ArchSpec &arch) const override;
-
-  Status SetBreakpoint(lldb::addr_t addr, uint32_t size,
-                       bool hardware) override;
-
-  void DoStopIDBumped(uint32_t newBumpId) override;
-
-  Status GetLoadedModuleFileSpec(const char *module_path,
-                                 FileSpec &file_spec) override;
-
-  Status GetFileLoadAddress(const llvm::StringRef &file_name,
-                            lldb::addr_t &load_addr) override;
-
-  NativeThreadDarwinSP GetThreadByID(lldb::tid_t id);
-
-  task_t GetTask() const { return m_task; }
-
-  // Interface used by NativeRegisterContext-derived classes.
-  static Status PtraceWrapper(int req, lldb::pid_t pid, void *addr = nullptr,
-                              void *data = nullptr, size_t data_size = 0,
-                              long *result = nullptr);
-
-  bool SupportHardwareSingleStepping() const;
-
-protected:
-  // NativeProcessProtocol protected interface
-  Status
-  GetSoftwareBreakpointTrapOpcode(size_t trap_opcode_size_hint,
-                                  size_t &actual_opcode_size,
-                                  const uint8_t *&trap_opcode_bytes) override;
-
-private:
-  /// Mach task-related Member Variables
-
-  // The task port for the inferior process.
-  mutable task_t m_task;
-
-  // True if the inferior process did an exec since we started
-  // monitoring it.
-  bool m_did_exec;
-
-  // The CPU type of this process.
-  mutable cpu_type_t m_cpu_type;
-
-  /// Exception/Signal Handling Member Variables
-
-  // Exception port on which we will receive child exceptions
-  mach_port_t m_exception_port;
-
-  // Saved state of the child exception port prior to us installing
-  // our own intercepting port.
-  MachException::PortInfo m_exc_port_info;
-
-  // The thread that runs the Mach exception read and reply handler.
-  pthread_t m_exception_thread;
-
-  // TODO see if we can remove this if we get the exception collection
-  // and distribution to happen in a single-threaded fashion.
-  std::recursive_mutex m_exception_messages_mutex;
-
-  // A collection of exception messages caught when listening to the
-  // exception port.
-  MachException::Message::collection m_exception_messages;
-
-  // When we call MachProcess::Interrupt(), we want to send this
-  // signal (if non-zero).
-  int m_sent_interrupt_signo;
-
-  // If we resume the process and still haven't received our
-  // interrupt signal (if this is non-zero).
-  int m_auto_resume_signo;
-
-  /// Thread-related Member Variables
-  NativeThreadListDarwin m_thread_list;
-  ResumeActionList m_thread_actions;
-
-  /// Process Lifetime Member Variable
-
-  // The pipe over which the waitpid thread and the main loop will
-  // communicate.
-  Pipe m_waitpid_pipe;
-
-  // The thread that runs the waitpid handler.
-  pthread_t m_waitpid_thread;
-
-  // waitpid reader callback handle.
-  MainLoop::ReadHandleUP m_waitpid_reader_handle;
-
-  // Private Instance Methods
-  NativeProcessDarwin(lldb::pid_t pid, int pty_master_fd);
-
-  /// Finalize the launch.
-  ///
-  /// This method associates the NativeProcessDarwin instance with the host
-  /// process that was just launched.  It peforms actions like attaching a
-  /// listener to the inferior exception port, ptracing the process, and the
-  /// like.
-  ///
-  /// \param[in] launch_flavor
-  ///     The launch flavor that was used to launch the process.
-  ///
-  /// \param[in] main_loop
-  ///     The main loop that will run the process monitor.  Work
-  ///     that needs to be done (e.g. reading files) gets registered
-  ///     here along with callbacks to process the work.
-  ///
-  /// \return
-  ///     Any error that occurred during the aforementioned
-  ///     operations.  Failure here will force termination of the
-  ///     launched process and debugging session.
-  Status FinalizeLaunch(LaunchFlavor launch_flavor, MainLoop &main_loop);
-
-  Status SaveExceptionPortInfo();
-
-  void ExceptionMessageReceived(const MachException::Message &message);
-
-  void MaybeRaiseThreadPriority();
-
-  Status StartExceptionThread();
-
-  Status SendInferiorExitStatusToMainLoop(::pid_t pid, int status);
-
-  Status HandleWaitpidResult();
-
-  bool ProcessUsingSpringBoard() const;
-
-  bool ProcessUsingBackBoard() const;
-
-  static void *ExceptionThread(void *arg);
-
-  void *DoExceptionThread();
-
-  lldb::addr_t GetDYLDAllImageInfosAddress(Status &error) const;
-
-  static uint32_t GetCPUTypeForLocalProcess(::pid_t pid);
-
-  uint32_t GetCPUType() const;
-
-  task_t ExceptionMessageBundleComplete();
-
-  void StartSTDIOThread();
-
-  Status StartWaitpidThread(MainLoop &main_loop);
-
-  static void *WaitpidThread(void *arg);
-
-  void *DoWaitpidThread();
-
-  task_t TaskPortForProcessID(Status &error, bool force = false) const;
-
-  /// Attaches to an existing process.  Forms the implementation of
-  /// Process::DoAttach.
-  void AttachToInferior(MainLoop &mainloop, lldb::pid_t pid, Status &error);
-
-  ::pid_t Attach(lldb::pid_t pid, Status &error);
-
-  Status PrivateResume();
-
-  Status ReplyToAllExceptions();
-
-  Status ResumeTask();
-
-  bool IsTaskValid() const;
-
-  bool IsTaskValid(task_t task) const;
-
-  mach_port_t GetExceptionPort() const;
-
-  bool IsExceptionPortValid() const;
-
-  Status GetTaskBasicInfo(task_t task, struct task_basic_info *info) const;
-
-  Status SuspendTask();
-
-  static Status SetDefaultPtraceOpts(const lldb::pid_t);
-
-  static void *MonitorThread(void *baton);
-
-  void MonitorCallback(lldb::pid_t pid, bool exited, int signal, int status);
-
-  void WaitForNewThread(::pid_t tid);
-
-  void MonitorSIGTRAP(const siginfo_t &info, NativeThreadDarwin &thread);
-
-  void MonitorTrace(NativeThreadDarwin &thread);
-
-  void MonitorBreakpoint(NativeThreadDarwin &thread);
-
-  void MonitorWatchpoint(NativeThreadDarwin &thread, uint32_t wp_index);
-
-  void MonitorSignal(const siginfo_t &info, NativeThreadDarwin &thread,
-                     bool exited);
-
-  Status SetupSoftwareSingleStepping(NativeThreadDarwin &thread);
-
-  bool HasThreadNoLock(lldb::tid_t thread_id);
-
-  bool StopTrackingThread(lldb::tid_t thread_id);
-
-  NativeThreadDarwinSP AddThread(lldb::tid_t thread_id);
-
-  Status GetSoftwareBreakpointPCOffset(uint32_t &actual_opcode_size);
-
-  Status FixupBreakpointPCAsNeeded(NativeThreadDarwin &thread);
-
-  /// Writes a siginfo_t structure corresponding to the given thread
-  /// ID to the memory region pointed to by \p siginfo.
-  Status GetSignalInfo(lldb::tid_t tid, void *siginfo);
-
-  /// Writes the raw event message code (vis-a-vis PTRACE_GETEVENTMSG)
-  /// corresponding to the given thread ID to the memory pointed to by @p
-  /// message.
-  Status GetEventMessage(lldb::tid_t tid, unsigned long *message);
-
-  void NotifyThreadDeath(lldb::tid_t tid);
-
-  Status Detach(lldb::tid_t tid);
-
-  // This method is requests a stop on all threads which are still
-  // running. It sets up a deferred delegate notification, which will
-  // fire once threads report as stopped. The triggerring_tid will be
-  // set as the current thread (main stop reason).
-  void StopRunningThreads(lldb::tid_t triggering_tid);
-
-  // Notify the delegate if all threads have stopped.
-  void SignalIfAllThreadsStopped();
-
-  // Resume the given thread, optionally passing it the given signal.
-  // The type of resume operation (continue, single-step) depends on
-  // the state parameter.
-  Status ResumeThread(NativeThreadDarwin &thread, lldb::StateType state,
-                      int signo);
-
-  void ThreadWasCreated(NativeThreadDarwin &thread);
-
-  void SigchldHandler();
-};
-
-} // namespace process_darwin
-} // namespace lldb_private
-
-#endif /* NativeProcessDarwin_h */
diff --git a/gnu/llvm/lldb/source/Plugins/Process/Darwin/NativeThreadDarwin.cpp b/gnu/llvm/lldb/source/Plugins/Process/Darwin/NativeThreadDarwin.cpp
deleted file mode 100644 (file)
index bcd6d8c..0000000
+++ /dev/null
@@ -1,281 +0,0 @@
-//===-- NativeThreadDarwin.cpp -------------------------------- -*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "NativeThreadDarwin.h"
-
-// C includes
-#include <libproc.h>
-
-// LLDB includes
-#include "lldb/Utility/Stream.h"
-
-#include "NativeProcessDarwin.h"
-
-using namespace lldb;
-using namespace lldb_private;
-using namespace lldb_private::process_darwin;
-
-uint64_t NativeThreadDarwin::GetGloballyUniqueThreadIDForMachPortID(
-    ::thread_t mach_port_id) {
-  thread_identifier_info_data_t tident;
-  mach_msg_type_number_t tident_count = THREAD_IDENTIFIER_INFO_COUNT;
-
-  auto mach_err = ::thread_info(mach_port_id, THREAD_IDENTIFIER_INFO,
-                                (thread_info_t)&tident, &tident_count);
-  if (mach_err != KERN_SUCCESS) {
-    // When we fail to get thread info for the supposed port, assume it is
-    // really a globally unique thread id already, or return the best thing we
-    // can, which is the thread port.
-    return mach_port_id;
-  }
-  return tident.thread_id;
-}
-
-NativeThreadDarwin::NativeThreadDarwin(NativeProcessDarwin *process,
-                                       bool is_64_bit,
-                                       lldb::tid_t unique_thread_id,
-                                       ::thread_t mach_thread_port)
-    : NativeThreadProtocol(process, unique_thread_id),
-      m_mach_thread_port(mach_thread_port), m_basic_info(),
-      m_proc_threadinfo() {}
-
-bool NativeThreadDarwin::GetIdentifierInfo() {
-  // Don't try to get the thread info once and cache it for the life of the
-  // thread.  It changes over time, for instance if the thread name changes,
-  // then the thread_handle also changes...  So you have to refetch it every
-  // time.
-  mach_msg_type_number_t count = THREAD_IDENTIFIER_INFO_COUNT;
-  kern_return_t kret = ::thread_info(m_mach_thread_port, THREAD_IDENTIFIER_INFO,
-                                     (thread_info_t)&m_ident_info, &count);
-  return kret == KERN_SUCCESS;
-
-  return false;
-}
-
-std::string NativeThreadDarwin::GetName() {
-  std::string name;
-
-  if (GetIdentifierInfo()) {
-    auto process_sp = GetProcess();
-    if (!process_sp) {
-      name = "<unavailable>";
-      return name;
-    }
-
-    int len = ::proc_pidinfo(process_sp->GetID(), PROC_PIDTHREADINFO,
-                             m_ident_info.thread_handle, &m_proc_threadinfo,
-                             sizeof(m_proc_threadinfo));
-
-    if (len && m_proc_threadinfo.pth_name[0])
-      name = m_proc_threadinfo.pth_name;
-  }
-  return name;
-}
-
-lldb::StateType NativeThreadDarwin::GetState() {
-  // TODO implement
-  return eStateInvalid;
-}
-
-bool NativeThreadDarwin::GetStopReason(ThreadStopInfo &stop_info,
-                                       std::string &description) {
-  // TODO implement
-  return false;
-}
-
-NativeRegisterContextSP NativeThreadDarwin::GetRegisterContext() {
-  // TODO implement
-  return NativeRegisterContextSP();
-}
-
-Status NativeThreadDarwin::SetWatchpoint(lldb::addr_t addr, size_t size,
-                                         uint32_t watch_flags, bool hardware) {
-  Status error;
-  error.SetErrorString("not yet implemented");
-  return error;
-}
-
-Status NativeThreadDarwin::RemoveWatchpoint(lldb::addr_t addr) {
-  Status error;
-  error.SetErrorString("not yet implemented");
-  return error;
-}
-
-void NativeThreadDarwin::Dump(Stream &stream) const {
-// This is what we really want once we have the thread class wired up.
-#if 0
-    DNBLogThreaded("[%3u] #%3u tid: 0x%8.8" PRIx64 ", pc: 0x%16.16" PRIx64 ", sp: 0x%16.16" PRIx64 ", user: %d.%6.6d, system: %d.%6.6d, cpu: %2d, policy: %2d, run_state: %2d (%s), flags: %2d, suspend_count: %2d (current %2d), sleep_time: %d",
-                   index,
-                   m_seq_id,
-                   m_unique_id,
-                   GetPC(INVALID_NUB_ADDRESS),
-                   GetSP(INVALID_NUB_ADDRESS),
-                   m_basic_info.user_time.seconds,      m_basic_info.user_time.microseconds,
-                   m_basic_info.system_time.seconds,    m_basic_info.system_time.microseconds,
-                   m_basic_info.cpu_usage,
-                   m_basic_info.policy,
-                   m_basic_info.run_state,
-                   thread_run_state,
-                   m_basic_info.flags,
-                   m_basic_info.suspend_count, m_suspend_count,
-                   m_basic_info.sleep_time);
-
-#else
-  // Here's all we have right now.
-  stream.Printf("tid: 0x%8.8" PRIx64 ", thread port: 0x%4.4x", GetID(),
-                m_mach_thread_port);
-#endif
-}
-
-bool NativeThreadDarwin::NotifyException(MachException::Data &exc) {
-// TODO implement this.
-#if 0
-    // Allow the arch specific protocol to process (MachException::Data &)exc
-    // first before possible reassignment of m_stop_exception with exc. See
-    // also MachThread::GetStopException().
-    bool handled = m_arch_up->NotifyException(exc);
-
-    if (m_stop_exception.IsValid())
-    {
-        // We may have more than one exception for a thread, but we need to
-        // only remember the one that we will say is the reason we stopped. We
-        // may have been single stepping and also gotten a signal exception, so
-        // just remember the most pertinent one.
-        if (m_stop_exception.IsBreakpoint())
-            m_stop_exception = exc;
-    }
-    else
-    {
-        m_stop_exception = exc;
-    }
-
-    return handled;
-#else
-  // Pretend we handled it.
-  return true;
-#endif
-}
-
-bool NativeThreadDarwin::ShouldStop(bool &step_more) const {
-// TODO: implement this
-#if 0
-    // See if this thread is at a breakpoint?
-    DNBBreakpoint *bp = CurrentBreakpoint();
-
-    if (bp)
-    {
-        // This thread is sitting at a breakpoint, ask the breakpoint if we
-        // should be stopping here.
-        return true;
-    }
-    else
-    {
-        if (m_arch_up->StepNotComplete())
-        {
-            step_more = true;
-            return false;
-        }
-        // The thread state is used to let us know what the thread was trying
-        // to do. MachThread::ThreadWillResume() will set the thread state to
-        // various values depending if the thread was the current thread and if
-        // it was to be single stepped, or resumed.
-        if (GetState() == eStateRunning)
-        {
-            // If our state is running, then we should continue as we are in
-            // the process of stepping over a breakpoint.
-            return false;
-        }
-        else
-        {
-            // Stop if we have any kind of valid exception for this thread.
-            if (GetStopException().IsValid())
-                return true;
-        }
-    }
-    return false;
-#else
-  return false;
-#endif
-}
-
-void NativeThreadDarwin::ThreadDidStop() {
-// TODO implement this.
-#if 0
-    // This thread has existed prior to resuming under debug nub control, and
-    // has just been stopped. Do any cleanup that needs to be done after
-    // running.
-
-    // The thread state and breakpoint will still have the same values as they
-    // had prior to resuming the thread, so it makes it easy to check if we
-    // were trying to step a thread, or we tried to resume while being at a
-    // breakpoint.
-
-    // When this method gets called, the process state is still in the state it
-    // was in while running so we can act accordingly.
-    m_arch_up->ThreadDidStop();
-
-
-    // We may have suspended this thread so the primary thread could step
-    // without worrying about race conditions, so lets restore our suspend
-    // count.
-    RestoreSuspendCountAfterStop();
-
-    // Update the basic information for a thread
-    MachThread::GetBasicInfo(m_mach_port_number, &m_basic_info);
-
-    if (m_basic_info.suspend_count > 0)
-        SetState(eStateSuspended);
-    else
-        SetState(eStateStopped);
-#endif
-}
-
-bool NativeThreadDarwin::MachPortNumberIsValid(::thread_t thread) {
-  return thread != (::thread_t)(0);
-}
-
-const struct thread_basic_info *NativeThreadDarwin::GetBasicInfo() const {
-  if (GetBasicInfo(m_mach_thread_port, &m_basic_info))
-    return &m_basic_info;
-  return NULL;
-}
-
-bool NativeThreadDarwin::GetBasicInfo(::thread_t thread,
-                                      struct thread_basic_info *basicInfoPtr) {
-  if (MachPortNumberIsValid(thread)) {
-    unsigned int info_count = THREAD_BASIC_INFO_COUNT;
-    kern_return_t err = ::thread_info(thread, THREAD_BASIC_INFO,
-                                      (thread_info_t)basicInfoPtr, &info_count);
-    if (err == KERN_SUCCESS)
-      return true;
-  }
-  ::memset(basicInfoPtr, 0, sizeof(struct thread_basic_info));
-  return false;
-}
-
-bool NativeThreadDarwin::IsUserReady() const {
-  if (m_basic_info.run_state == 0)
-    GetBasicInfo();
-
-  switch (m_basic_info.run_state) {
-  default:
-  case TH_STATE_UNINTERRUPTIBLE:
-    break;
-
-  case TH_STATE_RUNNING:
-  case TH_STATE_STOPPED:
-  case TH_STATE_WAITING:
-  case TH_STATE_HALTED:
-    return true;
-  }
-  return false;
-}
-
-NativeProcessDarwinSP NativeThreadDarwin::GetNativeProcessDarwinSP() {
-  return std::static_pointer_cast<NativeProcessDarwin>(GetProcess());
-}
diff --git a/gnu/llvm/lldb/source/Plugins/Process/Darwin/NativeThreadDarwin.h b/gnu/llvm/lldb/source/Plugins/Process/Darwin/NativeThreadDarwin.h
deleted file mode 100644 (file)
index 616a9a7..0000000
+++ /dev/null
@@ -1,165 +0,0 @@
-//===-- NativeThreadDarwin.h ---------------------------------- -*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef NativeThreadDarwin_H
-#define NativeThreadDarwin_H
-
-// C includes
-#include <mach/mach_types.h>
-#include <sched.h>
-#include <sys/proc_info.h>
-
-// C++ includes
-#include <map>
-#include <memory>
-#include <string>
-
-// LLDB includes
-#include "lldb/Host/common/NativeThreadProtocol.h"
-#include "lldb/lldb-private-forward.h"
-
-#include "MachException.h"
-
-namespace lldb_private {
-namespace process_darwin {
-
-class NativeProcessDarwin;
-using NativeProcessDarwinSP = std::shared_ptr<NativeProcessDarwin>;
-
-class NativeThreadListDarwin;
-
-class NativeThreadDarwin : public NativeThreadProtocol {
-  friend class NativeProcessDarwin;
-  friend class NativeThreadListDarwin;
-
-public:
-  static uint64_t
-  GetGloballyUniqueThreadIDForMachPortID(::thread_t mach_port_id);
-
-  NativeThreadDarwin(NativeProcessDarwin *process, bool is_64_bit,
-                     lldb::tid_t unique_thread_id = 0,
-                     ::thread_t mach_thread_port = 0);
-
-  // NativeThreadProtocol Interface
-  std::string GetName() override;
-
-  lldb::StateType GetState() override;
-
-  bool GetStopReason(ThreadStopInfo &stop_info,
-                     std::string &description) override;
-
-  NativeRegisterContextSP GetRegisterContext() override;
-
-  Status SetWatchpoint(lldb::addr_t addr, size_t size, uint32_t watch_flags,
-                       bool hardware) override;
-
-  Status RemoveWatchpoint(lldb::addr_t addr) override;
-
-  // New methods that are fine for others to call.
-  void Dump(Stream &stream) const;
-
-private:
-  // Interface for friend classes
-
-  /// Resumes the thread.  If \p signo is anything but
-  /// LLDB_INVALID_SIGNAL_NUMBER, deliver that signal to the thread.
-  Status Resume(uint32_t signo);
-
-  /// Single steps the thread.  If \p signo is anything but
-  /// LLDB_INVALID_SIGNAL_NUMBER, deliver that signal to the thread.
-  Status SingleStep(uint32_t signo);
-
-  bool NotifyException(MachException::Data &exc);
-
-  bool ShouldStop(bool &step_more) const;
-
-  void ThreadDidStop();
-
-  void SetStoppedBySignal(uint32_t signo, const siginfo_t *info = nullptr);
-
-  /// Return true if the thread is stopped.
-  /// If stopped by a signal, indicate the signo in the signo
-  /// argument.  Otherwise, return LLDB_INVALID_SIGNAL_NUMBER.
-  bool IsStopped(int *signo);
-
-  const struct thread_basic_info *GetBasicInfo() const;
-
-  static bool GetBasicInfo(::thread_t thread,
-                           struct thread_basic_info *basicInfoPtr);
-
-  bool IsUserReady() const;
-
-  void SetStoppedByExec();
-
-  void SetStoppedByBreakpoint();
-
-  void SetStoppedByWatchpoint(uint32_t wp_index);
-
-  bool IsStoppedAtBreakpoint();
-
-  bool IsStoppedAtWatchpoint();
-
-  void SetStoppedByTrace();
-
-  void SetStoppedWithNoReason();
-
-  void SetExited();
-
-  Status RequestStop();
-
-  /// Return the mach thread port number for this thread.
-  ///
-  /// \return
-  ///     The mach port number for this thread.  Returns NULL_THREAD
-  ///     when the thread is invalid.
-  thread_t GetMachPortNumber() const { return m_mach_thread_port; }
-
-  static bool MachPortNumberIsValid(::thread_t thread);
-
-  // Private interface
-  bool GetIdentifierInfo();
-
-  void MaybeLogStateChange(lldb::StateType new_state);
-
-  NativeProcessDarwinSP GetNativeProcessDarwinSP();
-
-  void SetStopped();
-
-  inline void MaybePrepareSingleStepWorkaround();
-
-  inline void MaybeCleanupSingleStepWorkaround();
-
-  // Member Variables
-
-  // The mach thread port for the thread.
-  ::thread_t m_mach_thread_port;
-
-  // The most recently-retrieved thread basic info.
-  mutable ::thread_basic_info m_basic_info;
-
-  struct proc_threadinfo m_proc_threadinfo;
-
-  thread_identifier_info_data_t m_ident_info;
-
-#if 0
-    lldb::StateType m_state;
-    ThreadStopInfo m_stop_info;
-    NativeRegisterContextSP m_reg_context_sp;
-    std::string m_stop_description;
-    using WatchpointIndexMap = std::map<lldb::addr_t, uint32_t>;
-    WatchpointIndexMap m_watchpoint_index_map;
-    // cpu_set_t m_original_cpu_set; // For single-step workaround.
-#endif
-};
-
-typedef std::shared_ptr<NativeThreadDarwin> NativeThreadDarwinSP;
-
-} // namespace process_darwin
-} // namespace lldb_private
-
-#endif // #ifndef NativeThreadDarwin_H
diff --git a/gnu/llvm/lldb/source/Plugins/Process/Darwin/NativeThreadListDarwin.cpp b/gnu/llvm/lldb/source/Plugins/Process/Darwin/NativeThreadListDarwin.cpp
deleted file mode 100644 (file)
index 1faa5b2..0000000
+++ /dev/null
@@ -1,702 +0,0 @@
-//===-- NativeThreadListDarwin.cpp ------------------------------------*- C++
-//-*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-//  Created by Greg Clayton on 6/19/07.
-//
-//===----------------------------------------------------------------------===//
-
-#include "NativeThreadListDarwin.h"
-
-// C includes
-#include <inttypes.h>
-#include <mach/vm_map.h>
-#include <sys/sysctl.h>
-
-// LLDB includes
-#include "lldb/Utility/Log.h"
-#include "lldb/Utility/Status.h"
-#include "lldb/Utility/Stream.h"
-#include "lldb/lldb-enumerations.h"
-
-#include "NativeProcessDarwin.h"
-#include "NativeThreadDarwin.h"
-
-using namespace lldb;
-using namespace lldb_private;
-using namespace lldb_private::process_darwin;
-
-NativeThreadListDarwin::NativeThreadListDarwin()
-    : m_threads(), m_threads_mutex(), m_is_64_bit(false) {}
-
-NativeThreadListDarwin::~NativeThreadListDarwin() {}
-
-// These methods will be accessed directly from NativeThreadDarwin
-#if 0
-nub_state_t
-NativeThreadListDarwin::GetState(nub_thread_t tid)
-{
-    MachThreadSP thread_sp (GetThreadByID (tid));
-    if (thread_sp)
-        return thread_sp->GetState();
-    return eStateInvalid;
-}
-
-const char *
-NativeThreadListDarwin::GetName (nub_thread_t tid)
-{
-    MachThreadSP thread_sp (GetThreadByID (tid));
-    if (thread_sp)
-        return thread_sp->GetName();
-    return NULL;
-}
-#endif
-
-// TODO: figure out if we need to add this to NativeThreadDarwin yet.
-#if 0
-ThreadInfo::QoS
-NativeThreadListDarwin::GetRequestedQoS (nub_thread_t tid, nub_addr_t tsd, uint64_t dti_qos_class_index)
-{
-    MachThreadSP thread_sp (GetThreadByID (tid));
-    if (thread_sp)
-        return thread_sp->GetRequestedQoS(tsd, dti_qos_class_index);
-    return ThreadInfo::QoS();
-}
-
-nub_addr_t
-NativeThreadListDarwin::GetPThreadT (nub_thread_t tid)
-{
-    MachThreadSP thread_sp (GetThreadByID (tid));
-    if (thread_sp)
-        return thread_sp->GetPThreadT();
-    return INVALID_NUB_ADDRESS;
-}
-
-nub_addr_t
-NativeThreadListDarwin::GetDispatchQueueT (nub_thread_t tid)
-{
-    MachThreadSP thread_sp (GetThreadByID (tid));
-    if (thread_sp)
-        return thread_sp->GetDispatchQueueT();
-    return INVALID_NUB_ADDRESS;
-}
-
-nub_addr_t
-NativeThreadListDarwin::GetTSDAddressForThread (nub_thread_t tid, uint64_t plo_pthread_tsd_base_address_offset, uint64_t plo_pthread_tsd_base_offset, uint64_t plo_pthread_tsd_entry_size)
-{
-    MachThreadSP thread_sp (GetThreadByID (tid));
-    if (thread_sp)
-        return thread_sp->GetTSDAddressForThread(plo_pthread_tsd_base_address_offset, plo_pthread_tsd_base_offset, plo_pthread_tsd_entry_size);
-    return INVALID_NUB_ADDRESS;
-}
-#endif
-
-// TODO implement these
-#if 0
-nub_thread_t
-NativeThreadListDarwin::SetCurrentThread(nub_thread_t tid)
-{
-    MachThreadSP thread_sp (GetThreadByID (tid));
-    if (thread_sp)
-    {
-        m_current_thread = thread_sp;
-        return tid;
-    }
-    return INVALID_NUB_THREAD;
-}
-
-
-bool
-NativeThreadListDarwin::GetThreadStoppedReason(nub_thread_t tid, struct DNBThreadStopInfo *stop_info) const
-{
-    MachThreadSP thread_sp (GetThreadByID (tid));
-    if (thread_sp)
-        return thread_sp->GetStopException().GetStopInfo(stop_info);
-    return false;
-}
-
-bool
-NativeThreadListDarwin::GetIdentifierInfo (nub_thread_t tid, thread_identifier_info_data_t *ident_info)
-{
-    thread_t mach_port_number = GetMachPortNumberByThreadID (tid);
-
-    mach_msg_type_number_t count = THREAD_IDENTIFIER_INFO_COUNT;
-    return ::thread_info (mach_port_number, THREAD_IDENTIFIER_INFO, (thread_info_t)ident_info, &count) == KERN_SUCCESS;
-}
-
-void
-NativeThreadListDarwin::DumpThreadStoppedReason (nub_thread_t tid) const
-{
-    MachThreadSP thread_sp (GetThreadByID (tid));
-    if (thread_sp)
-        thread_sp->GetStopException().DumpStopReason();
-}
-
-const char *
-NativeThreadListDarwin::GetThreadInfo (nub_thread_t tid) const
-{
-    MachThreadSP thread_sp (GetThreadByID (tid));
-    if (thread_sp)
-        return thread_sp->GetBasicInfoAsString();
-    return NULL;
-}
-
-#endif
-
-NativeThreadDarwinSP
-NativeThreadListDarwin::GetThreadByID(lldb::tid_t tid) const {
-  std::lock_guard<std::recursive_mutex> locker(m_threads_mutex);
-  for (auto thread_sp : m_threads) {
-    if (thread_sp && (thread_sp->GetID() == tid))
-      return thread_sp;
-  }
-  return NativeThreadDarwinSP();
-}
-
-NativeThreadDarwinSP NativeThreadListDarwin::GetThreadByMachPortNumber(
-    ::thread_t mach_port_number) const {
-  std::lock_guard<std::recursive_mutex> locker(m_threads_mutex);
-  for (auto thread_sp : m_threads) {
-    if (thread_sp && (thread_sp->GetMachPortNumber() == mach_port_number))
-      return thread_sp;
-  }
-  return NativeThreadDarwinSP();
-}
-
-lldb::tid_t NativeThreadListDarwin::GetThreadIDByMachPortNumber(
-    ::thread_t mach_port_number) const {
-  std::lock_guard<std::recursive_mutex> locker(m_threads_mutex);
-  for (auto thread_sp : m_threads) {
-    if (thread_sp && (thread_sp->GetMachPortNumber() == mach_port_number))
-      return thread_sp->GetID();
-  }
-  return LLDB_INVALID_THREAD_ID;
-}
-
-// TODO implement
-#if 0
-thread_t
-NativeThreadListDarwin::GetMachPortNumberByThreadID (nub_thread_t globally_unique_id) const
-{
-    PTHREAD_MUTEX_LOCKER (locker, m_threads_mutex);
-    MachThreadSP thread_sp;
-    const size_t num_threads = m_threads.size();
-    for (size_t idx = 0; idx < num_threads; ++idx)
-    {
-        if (m_threads[idx]->ThreadID() == globally_unique_id)
-        {
-            return m_threads[idx]->MachPortNumber();
-        }
-    }
-    return 0;
-}
-
-bool
-NativeThreadListDarwin::GetRegisterValue (nub_thread_t tid, uint32_t set, uint32_t reg, DNBRegisterValue *reg_value ) const
-{
-    MachThreadSP thread_sp (GetThreadByID (tid));
-    if (thread_sp)
-        return thread_sp->GetRegisterValue(set, reg, reg_value);
-
-    return false;
-}
-
-bool
-NativeThreadListDarwin::SetRegisterValue (nub_thread_t tid, uint32_t set, uint32_t reg, const DNBRegisterValue *reg_value ) const
-{
-    MachThreadSP thread_sp (GetThreadByID (tid));
-    if (thread_sp)
-        return thread_sp->SetRegisterValue(set, reg, reg_value);
-
-    return false;
-}
-
-nub_size_t
-NativeThreadListDarwin::GetRegisterContext (nub_thread_t tid, void *buf, size_t buf_len)
-{
-    MachThreadSP thread_sp (GetThreadByID (tid));
-    if (thread_sp)
-        return thread_sp->GetRegisterContext (buf, buf_len);
-    return 0;
-}
-
-nub_size_t
-NativeThreadListDarwin::SetRegisterContext (nub_thread_t tid, const void *buf, size_t buf_len)
-{
-    MachThreadSP thread_sp (GetThreadByID (tid));
-    if (thread_sp)
-        return thread_sp->SetRegisterContext (buf, buf_len);
-    return 0;
-}
-
-uint32_t
-NativeThreadListDarwin::SaveRegisterState (nub_thread_t tid)
-{
-    MachThreadSP thread_sp (GetThreadByID (tid));
-    if (thread_sp)
-        return thread_sp->SaveRegisterState ();
-    return 0;
-}
-
-bool
-NativeThreadListDarwin::RestoreRegisterState (nub_thread_t tid, uint32_t save_id)
-{
-    MachThreadSP thread_sp (GetThreadByID (tid));
-    if (thread_sp)
-        return thread_sp->RestoreRegisterState (save_id);
-    return 0;
-}
-#endif
-
-size_t NativeThreadListDarwin::GetNumberOfThreads() const {
-  std::lock_guard<std::recursive_mutex> locker(m_threads_mutex);
-  return static_cast<size_t>(m_threads.size());
-}
-
-// TODO implement
-#if 0
-nub_thread_t
-NativeThreadListDarwin::ThreadIDAtIndex (nub_size_t idx) const
-{
-    PTHREAD_MUTEX_LOCKER (locker, m_threads_mutex);
-    if (idx < m_threads.size())
-        return m_threads[idx]->ThreadID();
-    return INVALID_NUB_THREAD;
-}
-
-nub_thread_t
-NativeThreadListDarwin::CurrentThreadID ( )
-{
-    MachThreadSP thread_sp;
-    CurrentThread(thread_sp);
-    if (thread_sp.get())
-        return thread_sp->ThreadID();
-    return INVALID_NUB_THREAD;
-}
-
-#endif
-
-bool NativeThreadListDarwin::NotifyException(MachException::Data &exc) {
-  auto thread_sp = GetThreadByMachPortNumber(exc.thread_port);
-  if (thread_sp) {
-    thread_sp->NotifyException(exc);
-    return true;
-  }
-  return false;
-}
-
-void NativeThreadListDarwin::Clear() {
-  std::lock_guard<std::recursive_mutex> locker(m_threads_mutex);
-  m_threads.clear();
-}
-
-uint32_t NativeThreadListDarwin::UpdateThreadList(NativeProcessDarwin &process,
-                                                  bool update,
-                                                  collection *new_threads) {
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD));
-
-  std::lock_guard<std::recursive_mutex> locker(m_threads_mutex);
-  LLDB_LOGF(log,
-            "NativeThreadListDarwin::%s() (pid = %" PRIu64 ", update = "
-            "%u) process stop count = %u",
-            __FUNCTION__, process.GetID(), update, process.GetStopID());
-
-  if (process.GetStopID() == 0) {
-    // On our first stop, we'll record details like 32/64 bitness and select
-    // the proper architecture implementation.
-    //
-    int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, (int)process.GetID()};
-
-    struct kinfo_proc processInfo;
-    size_t bufsize = sizeof(processInfo);
-    if ((sysctl(mib, (unsigned)(sizeof(mib) / sizeof(int)), &processInfo,
-                &bufsize, NULL, 0) == 0) &&
-        (bufsize > 0)) {
-      if (processInfo.kp_proc.p_flag & P_LP64)
-        m_is_64_bit = true;
-    }
-
-// TODO implement architecture selection and abstraction.
-#if 0
-#if defined(__i386__) || defined(__x86_64__)
-        if (m_is_64_bit)
-            DNBArchProtocol::SetArchitecture(CPU_TYPE_X86_64);
-        else
-            DNBArchProtocol::SetArchitecture(CPU_TYPE_I386);
-#elif defined(__arm__) || defined(__arm64__) || defined(__aarch64__)
-        if (m_is_64_bit)
-            DNBArchProtocol::SetArchitecture(CPU_TYPE_ARM64);
-        else
-            DNBArchProtocol::SetArchitecture(CPU_TYPE_ARM);
-#endif
-#endif
-  }
-
-  if (m_threads.empty() || update) {
-    thread_array_t thread_list = nullptr;
-    mach_msg_type_number_t thread_list_count = 0;
-    task_t task = process.GetTask();
-
-    Status error;
-    auto mach_err = ::task_threads(task, &thread_list, &thread_list_count);
-    error.SetError(mach_err, eErrorTypeMachKernel);
-    if (error.Fail()) {
-      LLDB_LOGF(log,
-                "::task_threads(task = 0x%4.4x, thread_list => %p, "
-                "thread_list_count => %u) failed: %u (%s)",
-                task, thread_list, thread_list_count, error.GetError(),
-                error.AsCString());
-      return 0;
-    }
-
-    if (thread_list_count > 0) {
-      collection currThreads;
-      size_t idx;
-      // Iterator through the current thread list and see which threads we
-      // already have in our list (keep them), which ones we don't (add them),
-      // and which ones are not around anymore (remove them).
-      for (idx = 0; idx < thread_list_count; ++idx) {
-        // Get the Mach thread port.
-        const ::thread_t mach_port_num = thread_list[idx];
-
-        // Get the unique thread id for the mach port number.
-        uint64_t unique_thread_id =
-            NativeThreadDarwin::GetGloballyUniqueThreadIDForMachPortID(
-                mach_port_num);
-
-        // Retrieve the thread if it exists.
-        auto thread_sp = GetThreadByID(unique_thread_id);
-        if (thread_sp) {
-          // We are already tracking it. Keep the existing native thread
-          // instance.
-          currThreads.push_back(thread_sp);
-        } else {
-          // We don't have a native thread instance for this thread. Create it
-          // now.
-          thread_sp.reset(new NativeThreadDarwin(
-              &process, m_is_64_bit, unique_thread_id, mach_port_num));
-
-          // Add the new thread regardless of its is user ready state. Make
-          // sure the thread is ready to be displayed and shown to users before
-          // we add this thread to our list...
-          if (thread_sp->IsUserReady()) {
-            if (new_threads)
-              new_threads->push_back(thread_sp);
-
-            currThreads.push_back(thread_sp);
-          }
-        }
-      }
-
-      m_threads.swap(currThreads);
-      m_current_thread.reset();
-
-      // Free the vm memory given to us by ::task_threads()
-      vm_size_t thread_list_size =
-          (vm_size_t)(thread_list_count * sizeof(::thread_t));
-      ::vm_deallocate(::mach_task_self(), (vm_address_t)thread_list,
-                      thread_list_size);
-    }
-  }
-  return static_cast<uint32_t>(m_threads.size());
-}
-
-// TODO implement
-#if 0
-
-void
-NativeThreadListDarwin::CurrentThread (MachThreadSP& thread_sp)
-{
-    // locker will keep a mutex locked until it goes out of scope
-    PTHREAD_MUTEX_LOCKER (locker, m_threads_mutex);
-    if (m_current_thread.get() == NULL)
-    {
-        // Figure out which thread is going to be our current thread. This is
-        // currently done by finding the first thread in the list that has a
-        // valid exception.
-        const size_t num_threads = m_threads.size();
-        for (uint32_t idx = 0; idx < num_threads; ++idx)
-        {
-            if (m_threads[idx]->GetStopException().IsValid())
-            {
-                m_current_thread = m_threads[idx];
-                break;
-            }
-        }
-    }
-    thread_sp = m_current_thread;
-}
-
-#endif
-
-void NativeThreadListDarwin::Dump(Stream &stream) const {
-  bool first = true;
-
-  std::lock_guard<std::recursive_mutex> locker(m_threads_mutex);
-  for (auto thread_sp : m_threads) {
-    if (thread_sp) {
-      // Handle newlines between thread entries.
-      if (first)
-        first = false;
-      else
-        stream.PutChar('\n');
-      thread_sp->Dump(stream);
-    }
-  }
-}
-
-void NativeThreadListDarwin::ProcessWillResume(
-    NativeProcessDarwin &process, const ResumeActionList &thread_actions) {
-  std::lock_guard<std::recursive_mutex> locker(m_threads_mutex);
-
-  // Update our thread list, because sometimes libdispatch or the kernel will
-  // spawn threads while a task is suspended.
-  NativeThreadListDarwin::collection new_threads;
-
-// TODO implement this.
-#if 0
-    // First figure out if we were planning on running only one thread, and if
-    // so, force that thread to resume.
-    bool run_one_thread;
-    thread_t solo_thread = THREAD_NULL;
-    if ((thread_actions.GetSize() > 0) &&
-        (thread_actions.NumActionsWithState(eStateStepping) +
-         thread_actions.NumActionsWithState (eStateRunning) == 1))
-    {
-        run_one_thread = true;
-        const DNBThreadResumeAction *action_ptr = thread_actions.GetFirst();
-        size_t num_actions = thread_actions.GetSize();
-        for (size_t i = 0; i < num_actions; i++, action_ptr++)
-        {
-            if (action_ptr->state == eStateStepping || action_ptr->state == eStateRunning)
-            {
-                solo_thread = action_ptr->tid;
-                break;
-            }
-        }
-    }
-    else
-        run_one_thread = false;
-#endif
-
-  UpdateThreadList(process, true, &new_threads);
-
-#if 0
-    DNBThreadResumeAction resume_new_threads = { -1U, eStateRunning, 0, INVALID_NUB_ADDRESS };
-    // If we are planning to run only one thread, any new threads should be
-    // suspended.
-    if (run_one_thread)
-        resume_new_threads.state = eStateSuspended;
-
-    const size_t num_new_threads = new_threads.size();
-    const size_t num_threads = m_threads.size();
-    for (uint32_t idx = 0; idx < num_threads; ++idx)
-    {
-        MachThread *thread = m_threads[idx].get();
-        bool handled = false;
-        for (uint32_t new_idx = 0; new_idx < num_new_threads; ++new_idx)
-        {
-            if (thread == new_threads[new_idx].get())
-            {
-                thread->ThreadWillResume(&resume_new_threads);
-                handled = true;
-                break;
-            }
-        }
-
-        if (!handled)
-        {
-            const DNBThreadResumeAction *thread_action = thread_actions.GetActionForThread (thread->ThreadID(), true);
-            // There must always be a thread action for every thread.
-            assert (thread_action);
-            bool others_stopped = false;
-            if (solo_thread == thread->ThreadID())
-                others_stopped = true;
-            thread->ThreadWillResume (thread_action, others_stopped);
-        }
-    }
-    
-    if (new_threads.size())
-    {
-        for (uint32_t idx = 0; idx < num_new_threads; ++idx)
-        {
-            DNBLogThreadedIf (LOG_THREAD, "NativeThreadListDarwin::ProcessWillResume (pid = %4.4x) stop-id=%u, resuming newly discovered thread: 0x%8.8" PRIx64 ", thread-is-user-ready=%i)",
-                              process->ProcessID(), 
-                              process->StopCount(), 
-                              new_threads[idx]->ThreadID(),
-                              new_threads[idx]->IsUserReady());
-        }
-    }
-#endif
-}
-
-uint32_t NativeThreadListDarwin::ProcessDidStop(NativeProcessDarwin &process) {
-  std::lock_guard<std::recursive_mutex> locker(m_threads_mutex);
-
-  // Update our thread list.
-  UpdateThreadList(process, true);
-
-  for (auto thread_sp : m_threads) {
-    if (thread_sp)
-      thread_sp->ThreadDidStop();
-  }
-  return (uint32_t)m_threads.size();
-}
-
-// Check each thread in our thread list to see if we should notify our client
-// of the current halt in execution.
-//
-// Breakpoints can have callback functions associated with them than can return
-// true to stop, or false to continue executing the inferior.
-//
-// RETURNS
-//    true if we should stop and notify our clients
-//    false if we should resume our child process and skip notification
-bool NativeThreadListDarwin::ShouldStop(bool &step_more) {
-  std::lock_guard<std::recursive_mutex> locker(m_threads_mutex);
-  for (auto thread_sp : m_threads) {
-    if (thread_sp && thread_sp->ShouldStop(step_more))
-      return true;
-  }
-  return false;
-}
-
-// Implement.
-#if 0
-
-void
-NativeThreadListDarwin::NotifyBreakpointChanged (const DNBBreakpoint *bp)
-{
-    PTHREAD_MUTEX_LOCKER (locker, m_threads_mutex);
-    const size_t num_threads = m_threads.size();
-    for (uint32_t idx = 0; idx < num_threads; ++idx)
-    {
-        m_threads[idx]->NotifyBreakpointChanged(bp);
-    }
-}
-
-
-uint32_t
-NativeThreadListDarwin::EnableHardwareBreakpoint (const DNBBreakpoint* bp) const
-{
-    if (bp != NULL)
-    {
-        const size_t num_threads = m_threads.size();
-        for (uint32_t idx = 0; idx < num_threads; ++idx)
-            m_threads[idx]->EnableHardwareBreakpoint(bp);
-    }
-    return INVALID_NUB_HW_INDEX;
-}
-
-bool
-NativeThreadListDarwin::DisableHardwareBreakpoint (const DNBBreakpoint* bp) const
-{
-    if (bp != NULL)
-    {
-        const size_t num_threads = m_threads.size();
-        for (uint32_t idx = 0; idx < num_threads; ++idx)
-            m_threads[idx]->DisableHardwareBreakpoint(bp);
-    }
-    return false;
-}
-
-// DNBWatchpointSet() -> MachProcess::CreateWatchpoint() ->
-// MachProcess::EnableWatchpoint() ->
-// NativeThreadListDarwin::EnableHardwareWatchpoint().
-uint32_t
-NativeThreadListDarwin::EnableHardwareWatchpoint (const DNBBreakpoint* wp) const
-{
-    uint32_t hw_index = INVALID_NUB_HW_INDEX;
-    if (wp != NULL)
-    {
-        PTHREAD_MUTEX_LOCKER (locker, m_threads_mutex);
-        const size_t num_threads = m_threads.size();
-        // On Mac OS X we have to prime the control registers for new threads.
-        // We do this using the control register data for the first thread, for
-        // lack of a better way of choosing.
-        bool also_set_on_task = true;
-        for (uint32_t idx = 0; idx < num_threads; ++idx)
-        {                
-            if ((hw_index = m_threads[idx]->EnableHardwareWatchpoint(wp, also_set_on_task)) == INVALID_NUB_HW_INDEX)
-            {
-                // We know that idx failed for some reason.  Let's rollback the
-                // transaction for [0, idx).
-                for (uint32_t i = 0; i < idx; ++i)
-                    m_threads[i]->RollbackTransForHWP();
-                return INVALID_NUB_HW_INDEX;
-            }
-            also_set_on_task = false;
-        }
-        // Notify each thread to commit the pending transaction.
-        for (uint32_t idx = 0; idx < num_threads; ++idx)
-            m_threads[idx]->FinishTransForHWP();
-
-    }
-    return hw_index;
-}
-
-bool
-NativeThreadListDarwin::DisableHardwareWatchpoint (const DNBBreakpoint* wp) const
-{
-    if (wp != NULL)
-    {
-        PTHREAD_MUTEX_LOCKER (locker, m_threads_mutex);
-        const size_t num_threads = m_threads.size();
-        
-        // On Mac OS X we have to prime the control registers for new threads.
-        // We do this using the control register data for the first thread, for
-        // lack of a better way of choosing.
-        bool also_set_on_task = true;
-        for (uint32_t idx = 0; idx < num_threads; ++idx)
-        {
-            if (!m_threads[idx]->DisableHardwareWatchpoint(wp, also_set_on_task))
-            {
-                // We know that idx failed for some reason.  Let's rollback the
-                // transaction for [0, idx).
-                for (uint32_t i = 0; i < idx; ++i)
-                    m_threads[i]->RollbackTransForHWP();
-                return false;
-            }
-            also_set_on_task = false;
-        }
-        // Notify each thread to commit the pending transaction.
-        for (uint32_t idx = 0; idx < num_threads; ++idx)
-            m_threads[idx]->FinishTransForHWP();
-
-        return true;
-    }
-    return false;
-}
-
-uint32_t
-NativeThreadListDarwin::NumSupportedHardwareWatchpoints () const
-{
-    PTHREAD_MUTEX_LOCKER (locker, m_threads_mutex);
-    const size_t num_threads = m_threads.size();
-    // Use an arbitrary thread to retrieve the number of supported hardware
-    // watchpoints.
-    if (num_threads)
-        return m_threads[0]->NumSupportedHardwareWatchpoints();
-    return 0;
-}
-
-uint32_t
-NativeThreadListDarwin::GetThreadIndexForThreadStoppedWithSignal (const int signo) const
-{
-    PTHREAD_MUTEX_LOCKER (locker, m_threads_mutex);
-    uint32_t should_stop = false;
-    const size_t num_threads = m_threads.size();
-    for (uint32_t idx = 0; !should_stop && idx < num_threads; ++idx)
-    {
-        if (m_threads[idx]->GetStopException().SoftSignal () == signo)
-            return idx;
-    }
-    return UINT32_MAX;
-}
-
-#endif
diff --git a/gnu/llvm/lldb/source/Plugins/Process/Darwin/NativeThreadListDarwin.h b/gnu/llvm/lldb/source/Plugins/Process/Darwin/NativeThreadListDarwin.h
deleted file mode 100644 (file)
index 9ab0a7c..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-//===-- NativeThreadListDarwin.h --------------------------------------*- C++
-//-*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-//  Created by Greg Clayton on 6/19/07.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef __NativeThreadListDarwin_h__
-#define __NativeThreadListDarwin_h__
-
-#include <memory>
-#include <mutex>
-#include <vector>
-
-#include "lldb/lldb-private-forward.h"
-#include "lldb/lldb-types.h"
-
-#include "MachException.h"
-
-// #include "ThreadInfo.h"
-
-namespace lldb_private {
-namespace process_darwin {
-
-class NativeBreakpointDarwin;
-class NativeProcessDarwin;
-
-class NativeThreadDarwin;
-using NativeThreadDarwinSP = std::shared_ptr<NativeThreadDarwin>;
-
-class NativeThreadListDarwin {
-public:
-  NativeThreadListDarwin();
-  ~NativeThreadListDarwin();
-
-  void Clear();
-
-  void Dump(Stream &stream) const;
-
-// These methods will be accessed directly from NativeThreadDarwin
-#if 0
-    bool            GetRegisterValue (nub_thread_t tid, uint32_t set, uint32_t reg, DNBRegisterValue *reg_value) const;
-    bool            SetRegisterValue (nub_thread_t tid, uint32_t set, uint32_t reg, const DNBRegisterValue *reg_value) const;
-    nub_size_t      GetRegisterContext (nub_thread_t tid, void *buf, size_t buf_len);
-    nub_size_t      SetRegisterContext (nub_thread_t tid, const void *buf, size_t buf_len);
-    uint32_t        SaveRegisterState (nub_thread_t tid);
-    bool            RestoreRegisterState (nub_thread_t tid, uint32_t save_id);
-#endif
-
-  const char *GetThreadInfo(lldb::tid_t tid) const;
-
-  void ProcessWillResume(NativeProcessDarwin &process,
-                         const ResumeActionList &thread_actions);
-
-  uint32_t ProcessDidStop(NativeProcessDarwin &process);
-
-  bool NotifyException(MachException::Data &exc);
-
-  bool ShouldStop(bool &step_more);
-
-// These methods will be accessed directly from NativeThreadDarwin
-#if 0
-    const char *    GetName (nub_thread_t tid);
-    nub_state_t     GetState (nub_thread_t tid);
-    nub_thread_t    SetCurrentThread (nub_thread_t tid);
-#endif
-
-// TODO: figure out if we need to add this to NativeThreadDarwin yet.
-#if 0
-    ThreadInfo::QoS GetRequestedQoS (nub_thread_t tid, nub_addr_t tsd, uint64_t dti_qos_class_index);
-    nub_addr_t      GetPThreadT (nub_thread_t tid);
-    nub_addr_t      GetDispatchQueueT (nub_thread_t tid);
-    nub_addr_t      GetTSDAddressForThread (nub_thread_t tid, uint64_t plo_pthread_tsd_base_address_offset, uint64_t plo_pthread_tsd_base_offset, uint64_t plo_pthread_tsd_entry_size);
-#endif
-
-// These methods will be accessed directly from NativeThreadDarwin
-#if 0
-    bool            GetThreadStoppedReason (nub_thread_t tid, struct DNBThreadStopInfo *stop_info) const;
-    void            DumpThreadStoppedReason (nub_thread_t tid) const;
-    bool            GetIdentifierInfo (nub_thread_t tid, thread_identifier_info_data_t *ident_info);
-#endif
-
-  size_t GetNumberOfThreads() const;
-
-  lldb::tid_t ThreadIDAtIndex(size_t idx) const;
-
-  lldb::tid_t GetCurrentThreadID();
-
-  NativeThreadDarwinSP GetCurrentThread();
-
-  void NotifyBreakpointChanged(const NativeBreakpointDarwin *bp);
-
-  uint32_t EnableHardwareBreakpoint(const NativeBreakpointDarwin *bp) const;
-
-  bool DisableHardwareBreakpoint(const NativeBreakpointDarwin *bp) const;
-
-  uint32_t EnableHardwareWatchpoint(const NativeBreakpointDarwin *wp) const;
-
-  bool DisableHardwareWatchpoint(const NativeBreakpointDarwin *wp) const;
-
-  uint32_t GetNumberOfSupportedHardwareWatchpoints() const;
-
-  size_t GetThreadIndexForThreadStoppedWithSignal(const int signo) const;
-
-  NativeThreadDarwinSP GetThreadByID(lldb::tid_t tid) const;
-
-  NativeThreadDarwinSP
-  GetThreadByMachPortNumber(::thread_t mach_port_number) const;
-
-  lldb::tid_t GetThreadIDByMachPortNumber(::thread_t mach_port_number) const;
-
-  thread_t GetMachPortNumberByThreadID(lldb::tid_t globally_unique_id) const;
-
-protected:
-  typedef std::vector<NativeThreadDarwinSP> collection;
-  typedef collection::iterator iterator;
-  typedef collection::const_iterator const_iterator;
-
-  // Consider having this return an lldb_private::Status.
-  uint32_t UpdateThreadList(NativeProcessDarwin &process, bool update,
-                            collection *num_threads = nullptr);
-
-  collection m_threads;
-  mutable std::recursive_mutex m_threads_mutex;
-  NativeThreadDarwinSP m_current_thread;
-  bool m_is_64_bit;
-};
-
-} // namespace process_darwin
-} // namespace lldb_private
-
-#endif // #ifndef __NativeThreadListDarwin_h__
index 424dc34..bfd712c 100644 (file)
@@ -1,4 +1,4 @@
-add_lldb_library(lldbPluginProcessOpenBSD PLUGIN
+add_lldb_library(lldbPluginProcessOpenBSD
   NativeProcessOpenBSD.cpp
   NativeRegisterContextOpenBSD.cpp
   NativeRegisterContextOpenBSD_arch.cpp
index c0b0aaa..87351a8 100644 (file)
@@ -102,7 +102,7 @@ NativeProcessOpenBSD::Factory::Launch(ProcessLaunchInfo &launch_info,
            Info.GetArchitecture().GetArchitectureName());
 
   std::unique_ptr<NativeProcessOpenBSD> process_up(new NativeProcessOpenBSD(
-      pid, launch_info.GetPTY().ReleaseMasterFileDescriptor(), native_delegate,
+      pid, launch_info.GetPTY().ReleasePrimaryFileDescriptor(), native_delegate,
       Info.GetArchitecture(), mainloop));
 
   status = process_up->ReinitializeThreads();
index 76ffde5..53b8af1 100644 (file)
@@ -11,6 +11,7 @@ add_lldb_library(lldbPluginProcessUtility
   MipsLinuxSignals.cpp
   NativeRegisterContextRegisterInfo.cpp
   NetBSDSignals.cpp
+  OpenBSDSignals.cpp
   RegisterContextDarwin_arm.cpp
   RegisterContextDarwin_arm64.cpp
   RegisterContextDarwin_i386.cpp
diff --git a/gnu/llvm/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp b/gnu/llvm/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
deleted file mode 100644 (file)
index 49a589f..0000000
+++ /dev/null
@@ -1,2198 +0,0 @@
-//===-- RegisterContextLLDB.cpp --------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "lldb/Core/Address.h"
-#include "lldb/Core/AddressRange.h"
-#include "lldb/Core/Module.h"
-#include "lldb/Core/Value.h"
-#include "lldb/Expression/DWARFExpression.h"
-#include "lldb/Symbol/ArmUnwindInfo.h"
-#include "lldb/Symbol/CallFrameInfo.h"
-#include "lldb/Symbol/DWARFCallFrameInfo.h"
-#include "lldb/Symbol/FuncUnwinders.h"
-#include "lldb/Symbol/Function.h"
-#include "lldb/Symbol/ObjectFile.h"
-#include "lldb/Symbol/Symbol.h"
-#include "lldb/Symbol/SymbolContext.h"
-#include "lldb/Symbol/SymbolFile.h"
-#include "lldb/Target/ABI.h"
-#include "lldb/Target/DynamicLoader.h"
-#include "lldb/Target/ExecutionContext.h"
-#include "lldb/Target/Platform.h"
-#include "lldb/Target/Process.h"
-#include "lldb/Target/SectionLoadList.h"
-#include "lldb/Target/StackFrame.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Target/Thread.h"
-#include "lldb/Utility/DataBufferHeap.h"
-#include "lldb/Utility/Log.h"
-#include "lldb/Utility/RegisterValue.h"
-#include "lldb/lldb-private.h"
-
-#include "RegisterContextLLDB.h"
-
-#include <memory>
-
-using namespace lldb;
-using namespace lldb_private;
-
-static ConstString GetSymbolOrFunctionName(const SymbolContext &sym_ctx) {
-  if (sym_ctx.symbol)
-    return sym_ctx.symbol->GetName();
-  else if (sym_ctx.function)
-    return sym_ctx.function->GetName();
-  return ConstString();
-}
-
-RegisterContextLLDB::RegisterContextLLDB(Thread &thread,
-                                         const SharedPtr &next_frame,
-                                         SymbolContext &sym_ctx,
-                                         uint32_t frame_number,
-                                         UnwindLLDB &unwind_lldb)
-    : RegisterContext(thread, frame_number), m_thread(thread),
-      m_fast_unwind_plan_sp(), m_full_unwind_plan_sp(),
-      m_fallback_unwind_plan_sp(), m_all_registers_available(false),
-      m_frame_type(-1), m_cfa(LLDB_INVALID_ADDRESS),
-      m_afa(LLDB_INVALID_ADDRESS), m_start_pc(),
-      m_current_pc(), m_current_offset(0), m_current_offset_backed_up_one(0),
-      m_sym_ctx(sym_ctx), m_sym_ctx_valid(false), m_frame_number(frame_number),
-      m_registers(), m_parent_unwind(unwind_lldb) {
-  m_sym_ctx.Clear(false);
-  m_sym_ctx_valid = false;
-
-  if (IsFrameZero()) {
-    InitializeZerothFrame();
-  } else {
-    InitializeNonZerothFrame();
-  }
-
-  // This same code exists over in the GetFullUnwindPlanForFrame() but it may
-  // not have been executed yet
-  if (IsFrameZero() || next_frame->m_frame_type == eTrapHandlerFrame ||
-      next_frame->m_frame_type == eDebuggerFrame) {
-    m_all_registers_available = true;
-  }
-}
-
-bool RegisterContextLLDB::IsUnwindPlanValidForCurrentPC(
-    lldb::UnwindPlanSP unwind_plan_sp, int &valid_pc_offset) {
-  if (!unwind_plan_sp)
-    return false;
-
-  // check if m_current_pc is valid
-  if (unwind_plan_sp->PlanValidAtAddress(m_current_pc)) {
-    // yes - current offset can be used as is
-    valid_pc_offset = m_current_offset;
-    return true;
-  }
-
-  // if m_current_offset <= 0, we've got nothing else to try
-  if (m_current_offset <= 0)
-    return false;
-
-  // check pc - 1 to see if it's valid
-  Address pc_minus_one(m_current_pc);
-  pc_minus_one.SetOffset(m_current_pc.GetOffset() - 1);
-  if (unwind_plan_sp->PlanValidAtAddress(pc_minus_one)) {
-    // *valid_pc_offset = m_current_offset - 1;
-    valid_pc_offset = m_current_pc.GetOffset() - 1;
-    return true;
-  }
-
-  return false;
-}
-
-// Initialize a RegisterContextLLDB which is the first frame of a stack -- the
-// zeroth frame or currently executing frame.
-
-void RegisterContextLLDB::InitializeZerothFrame() {
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_UNWIND));
-  ExecutionContext exe_ctx(m_thread.shared_from_this());
-  RegisterContextSP reg_ctx_sp = m_thread.GetRegisterContext();
-
-  if (reg_ctx_sp.get() == nullptr) {
-    m_frame_type = eNotAValidFrame;
-    UnwindLogMsg("frame does not have a register context");
-    return;
-  }
-
-  addr_t current_pc = reg_ctx_sp->GetPC();
-
-  if (current_pc == LLDB_INVALID_ADDRESS) {
-    m_frame_type = eNotAValidFrame;
-    UnwindLogMsg("frame does not have a pc");
-    return;
-  }
-
-  Process *process = exe_ctx.GetProcessPtr();
-
-  // Let ABIs fixup code addresses to make sure they are valid. In ARM ABIs
-  // this will strip bit zero in case we read a PC from memory or from the LR.
-  // (which would be a no-op in frame 0 where we get it from the register set,
-  // but still a good idea to make the call here for other ABIs that may
-  // exist.)
-  ABI *abi = process->GetABI().get();
-  if (abi)
-    current_pc = abi->FixCodeAddress(current_pc);
-
-  // Initialize m_current_pc, an Address object, based on current_pc, an
-  // addr_t.
-  m_current_pc.SetLoadAddress(current_pc, &process->GetTarget());
-
-  // If we don't have a Module for some reason, we're not going to find
-  // symbol/function information - just stick in some reasonable defaults and
-  // hope we can unwind past this frame.
-  ModuleSP pc_module_sp(m_current_pc.GetModule());
-  if (!m_current_pc.IsValid() || !pc_module_sp) {
-    UnwindLogMsg("using architectural default unwind method");
-  }
-
-  AddressRange addr_range;
-  m_sym_ctx_valid = m_current_pc.ResolveFunctionScope(m_sym_ctx, &addr_range);
-
-  if (m_sym_ctx.symbol) {
-    UnwindLogMsg("with pc value of 0x%" PRIx64 ", symbol name is '%s'",
-                 current_pc, GetSymbolOrFunctionName(m_sym_ctx).AsCString(""));
-  } else if (m_sym_ctx.function) {
-    UnwindLogMsg("with pc value of 0x%" PRIx64 ", function name is '%s'",
-                 current_pc, GetSymbolOrFunctionName(m_sym_ctx).AsCString(""));
-  } else {
-    UnwindLogMsg("with pc value of 0x%" PRIx64
-                 ", no symbol/function name is known.",
-                 current_pc);
-  }
-
-  if (IsTrapHandlerSymbol(process, m_sym_ctx)) {
-    m_frame_type = eTrapHandlerFrame;
-  } else {
-    // FIXME:  Detect eDebuggerFrame here.
-    m_frame_type = eNormalFrame;
-  }
-
-  // If we were able to find a symbol/function, set addr_range to the bounds of
-  // that symbol/function. else treat the current pc value as the start_pc and
-  // record no offset.
-  if (addr_range.GetBaseAddress().IsValid()) {
-    m_start_pc = addr_range.GetBaseAddress();
-    if (m_current_pc.GetSection() == m_start_pc.GetSection()) {
-      m_current_offset = m_current_pc.GetOffset() - m_start_pc.GetOffset();
-    } else if (m_current_pc.GetModule() == m_start_pc.GetModule()) {
-      // This means that whatever symbol we kicked up isn't really correct ---
-      // we should not cross section boundaries ... We really should NULL out
-      // the function/symbol in this case unless there is a bad assumption here
-      // due to inlined functions?
-      m_current_offset =
-          m_current_pc.GetFileAddress() - m_start_pc.GetFileAddress();
-    }
-    m_current_offset_backed_up_one = m_current_offset;
-  } else {
-    m_start_pc = m_current_pc;
-    m_current_offset = -1;
-    m_current_offset_backed_up_one = -1;
-  }
-
-  // We've set m_frame_type and m_sym_ctx before these calls.
-
-  m_fast_unwind_plan_sp = GetFastUnwindPlanForFrame();
-  m_full_unwind_plan_sp = GetFullUnwindPlanForFrame();
-
-  UnwindPlan::RowSP active_row;
-  lldb::RegisterKind row_register_kind = eRegisterKindGeneric;
-  if (m_full_unwind_plan_sp &&
-      m_full_unwind_plan_sp->PlanValidAtAddress(m_current_pc)) {
-    active_row =
-        m_full_unwind_plan_sp->GetRowForFunctionOffset(m_current_offset);
-    row_register_kind = m_full_unwind_plan_sp->GetRegisterKind();
-    if (active_row.get() && log) {
-      StreamString active_row_strm;
-      active_row->Dump(active_row_strm, m_full_unwind_plan_sp.get(), &m_thread,
-                       m_start_pc.GetLoadAddress(exe_ctx.GetTargetPtr()));
-      UnwindLogMsg("%s", active_row_strm.GetData());
-    }
-  }
-
-  if (!active_row.get()) {
-    UnwindLogMsg("could not find an unwindplan row for this frame's pc");
-    m_frame_type = eNotAValidFrame;
-    return;
-  }
-
-  if (!ReadFrameAddress(row_register_kind, active_row->GetCFAValue(), m_cfa)) {
-    // Try the fall back unwind plan since the
-    // full unwind plan failed.
-    FuncUnwindersSP func_unwinders_sp;
-    UnwindPlanSP call_site_unwind_plan;
-    bool cfa_status = false;
-
-    if (m_sym_ctx_valid) {
-      func_unwinders_sp =
-          pc_module_sp->GetUnwindTable().GetFuncUnwindersContainingAddress(
-              m_current_pc, m_sym_ctx);
-    }
-
-    if (func_unwinders_sp.get() != nullptr)
-      call_site_unwind_plan = func_unwinders_sp->GetUnwindPlanAtCallSite(
-          process->GetTarget(), m_thread);
-
-    if (call_site_unwind_plan.get() != nullptr) {
-      m_fallback_unwind_plan_sp = call_site_unwind_plan;
-      if (TryFallbackUnwindPlan())
-        cfa_status = true;
-    }
-    if (!cfa_status) {
-      UnwindLogMsg("could not read CFA value for first frame.");
-      m_frame_type = eNotAValidFrame;
-      return;
-    }
-  } else
-    ReadFrameAddress(row_register_kind, active_row->GetAFAValue(), m_afa);
-
-  UnwindLogMsg("initialized frame current pc is 0x%" PRIx64 " cfa is 0x%" PRIx64
-               " afa is 0x%" PRIx64 " using %s UnwindPlan",
-               (uint64_t)m_current_pc.GetLoadAddress(exe_ctx.GetTargetPtr()),
-               (uint64_t)m_cfa,
-               (uint64_t)m_afa,
-               m_full_unwind_plan_sp->GetSourceName().GetCString());
-}
-
-// Initialize a RegisterContextLLDB for the non-zeroth frame -- rely on the
-// RegisterContextLLDB "below" it to provide things like its current pc value.
-
-void RegisterContextLLDB::InitializeNonZerothFrame() {
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_UNWIND));
-  if (IsFrameZero()) {
-    m_frame_type = eNotAValidFrame;
-    UnwindLogMsg("non-zeroth frame tests positive for IsFrameZero -- that "
-                 "shouldn't happen.");
-    return;
-  }
-
-  if (!GetNextFrame().get() || !GetNextFrame()->IsValid()) {
-    m_frame_type = eNotAValidFrame;
-    UnwindLogMsg("Could not get next frame, marking this frame as invalid.");
-    return;
-  }
-  if (!m_thread.GetRegisterContext()) {
-    m_frame_type = eNotAValidFrame;
-    UnwindLogMsg("Could not get register context for this thread, marking this "
-                 "frame as invalid.");
-    return;
-  }
-
-  addr_t pc;
-  if (!ReadGPRValue(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC, pc)) {
-    UnwindLogMsg("could not get pc value");
-    m_frame_type = eNotAValidFrame;
-    return;
-  }
-
-  ExecutionContext exe_ctx(m_thread.shared_from_this());
-  Process *process = exe_ctx.GetProcessPtr();
-  // Let ABIs fixup code addresses to make sure they are valid. In ARM ABIs
-  // this will strip bit zero in case we read a PC from memory or from the LR.
-  ABI *abi = process->GetABI().get();
-  if (abi)
-    pc = abi->FixCodeAddress(pc);
-
-  if (log) {
-    UnwindLogMsg("pc = 0x%" PRIx64, pc);
-    addr_t reg_val;
-    if (ReadGPRValue(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_FP, reg_val))
-      UnwindLogMsg("fp = 0x%" PRIx64, reg_val);
-    if (ReadGPRValue(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_SP, reg_val))
-      UnwindLogMsg("sp = 0x%" PRIx64, reg_val);
-  }
-
-  // A pc of 0x0 means it's the end of the stack crawl unless we're above a trap
-  // handler function
-  bool above_trap_handler = false;
-  if (GetNextFrame().get() && GetNextFrame()->IsValid() &&
-      GetNextFrame()->IsTrapHandlerFrame())
-    above_trap_handler = true;
-
-  if (pc == 0 || pc == 0x1) {
-    if (!above_trap_handler) {
-      m_frame_type = eNotAValidFrame;
-      UnwindLogMsg("this frame has a pc of 0x0");
-      return;
-    }
-  }
-
-  const bool allow_section_end = true;
-  m_current_pc.SetLoadAddress(pc, &process->GetTarget(), allow_section_end);
-
-  // If we don't have a Module for some reason, we're not going to find
-  // symbol/function information - just stick in some reasonable defaults and
-  // hope we can unwind past this frame.
-  ModuleSP pc_module_sp(m_current_pc.GetModule());
-  if (!m_current_pc.IsValid() || !pc_module_sp) {
-    UnwindLogMsg("using architectural default unwind method");
-
-    // Test the pc value to see if we know it's in an unmapped/non-executable
-    // region of memory.
-    uint32_t permissions;
-    if (process->GetLoadAddressPermissions(pc, permissions) &&
-        (permissions & ePermissionsExecutable) == 0) {
-      // If this is the second frame off the stack, we may have unwound the
-      // first frame incorrectly.  But using the architecture default unwind
-      // plan may get us back on track -- albeit possibly skipping a real
-      // frame.  Give this frame a clearly-invalid pc and see if we can get any
-      // further.
-      if (GetNextFrame().get() && GetNextFrame()->IsValid() &&
-          GetNextFrame()->IsFrameZero()) {
-        UnwindLogMsg("had a pc of 0x%" PRIx64 " which is not in executable "
-                                              "memory but on frame 1 -- "
-                                              "allowing it once.",
-                     (uint64_t)pc);
-        m_frame_type = eSkipFrame;
-      } else {
-        // anywhere other than the second frame, a non-executable pc means
-        // we're off in the weeds -- stop now.
-        m_frame_type = eNotAValidFrame;
-        UnwindLogMsg("pc is in a non-executable section of memory and this "
-                     "isn't the 2nd frame in the stack walk.");
-        return;
-      }
-    }
-
-    if (abi) {
-      m_fast_unwind_plan_sp.reset();
-      m_full_unwind_plan_sp =
-          std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric);
-      abi->CreateDefaultUnwindPlan(*m_full_unwind_plan_sp);
-      if (m_frame_type != eSkipFrame) // don't override eSkipFrame
-      {
-        m_frame_type = eNormalFrame;
-      }
-      m_all_registers_available = false;
-      m_current_offset = -1;
-      m_current_offset_backed_up_one = -1;
-      RegisterKind row_register_kind = m_full_unwind_plan_sp->GetRegisterKind();
-      UnwindPlan::RowSP row = m_full_unwind_plan_sp->GetRowForFunctionOffset(0);
-      if (row.get()) {
-        if (!ReadFrameAddress(row_register_kind, row->GetCFAValue(), m_cfa)) {
-          UnwindLogMsg("failed to get cfa value");
-          if (m_frame_type != eSkipFrame) // don't override eSkipFrame
-          {
-            m_frame_type = eNotAValidFrame;
-          }
-          return;
-        }
-
-        ReadFrameAddress(row_register_kind, row->GetAFAValue(), m_afa);
-
-        // A couple of sanity checks..
-        if (m_cfa == LLDB_INVALID_ADDRESS || m_cfa == 0 || m_cfa == 1) {
-          UnwindLogMsg("could not find a valid cfa address");
-          m_frame_type = eNotAValidFrame;
-          return;
-        }
-
-        // m_cfa should point into the stack memory; if we can query memory
-        // region permissions, see if the memory is allocated & readable.
-        if (process->GetLoadAddressPermissions(m_cfa, permissions) &&
-            (permissions & ePermissionsReadable) == 0) {
-          m_frame_type = eNotAValidFrame;
-          UnwindLogMsg(
-              "the CFA points to a region of memory that is not readable");
-          return;
-        }
-      } else {
-        UnwindLogMsg("could not find a row for function offset zero");
-        m_frame_type = eNotAValidFrame;
-        return;
-      }
-
-      if (CheckIfLoopingStack()) {
-        TryFallbackUnwindPlan();
-        if (CheckIfLoopingStack()) {
-          UnwindLogMsg("same CFA address as next frame, assuming the unwind is "
-                       "looping - stopping");
-          m_frame_type = eNotAValidFrame;
-          return;
-        }
-      }
-
-      UnwindLogMsg("initialized frame cfa is 0x%" PRIx64 " afa is 0x%" PRIx64,
-                   (uint64_t)m_cfa, (uint64_t)m_afa);
-      return;
-    }
-    m_frame_type = eNotAValidFrame;
-    UnwindLogMsg("could not find any symbol for this pc, or a default unwind "
-                 "plan, to continue unwind.");
-    return;
-  }
-
-  AddressRange addr_range;
-  m_sym_ctx_valid = m_current_pc.ResolveFunctionScope(m_sym_ctx, &addr_range);
-
-  if (m_sym_ctx.symbol) {
-    UnwindLogMsg("with pc value of 0x%" PRIx64 ", symbol name is '%s'", pc,
-                 GetSymbolOrFunctionName(m_sym_ctx).AsCString(""));
-  } else if (m_sym_ctx.function) {
-    UnwindLogMsg("with pc value of 0x%" PRIx64 ", function name is '%s'", pc,
-                 GetSymbolOrFunctionName(m_sym_ctx).AsCString(""));
-  } else {
-    UnwindLogMsg("with pc value of 0x%" PRIx64
-                 ", no symbol/function name is known.",
-                 pc);
-  }
-
-  bool decr_pc_and_recompute_addr_range;
-
-  if (!m_sym_ctx_valid) {
-    // Always decrement and recompute if the symbol lookup failed
-    decr_pc_and_recompute_addr_range = true;
-  } else if (GetNextFrame()->m_frame_type == eTrapHandlerFrame ||
-             GetNextFrame()->m_frame_type == eDebuggerFrame) {
-    // Don't decrement if we're "above" an asynchronous event like
-    // sigtramp.
-    decr_pc_and_recompute_addr_range = false;
-  } else if (!addr_range.GetBaseAddress().IsValid() ||
-             addr_range.GetBaseAddress().GetSection() != m_current_pc.GetSection() ||
-             addr_range.GetBaseAddress().GetOffset() != m_current_pc.GetOffset()) {
-    // If our "current" pc isn't the start of a function, no need
-    // to decrement and recompute.
-    decr_pc_and_recompute_addr_range = false;
-  } else if (IsTrapHandlerSymbol(process, m_sym_ctx)) {
-    // Signal dispatch may set the return address of the handler it calls to
-    // point to the first byte of a return trampoline (like __kernel_rt_sigreturn),
-    // so do not decrement and recompute if the symbol we already found is a trap
-    // handler.
-    decr_pc_and_recompute_addr_range = false;
-  } else {
-    // Decrement to find the function containing the call.
-    decr_pc_and_recompute_addr_range = true;
-  }
-
-  // We need to back up the pc by 1 byte and re-search for the Symbol to handle
-  // the case where the "saved pc" value is pointing to the next function, e.g.
-  // if a function ends with a CALL instruction.
-  // FIXME this may need to be an architectural-dependent behavior; if so we'll
-  // need to add a member function
-  // to the ABI plugin and consult that.
-  if (decr_pc_and_recompute_addr_range) {
-    UnwindLogMsg("Backing up the pc value of 0x%" PRIx64
-                 " by 1 and re-doing symbol lookup; old symbol was %s",
-                 pc, GetSymbolOrFunctionName(m_sym_ctx).AsCString(""));
-    Address temporary_pc;
-    temporary_pc.SetLoadAddress(pc - 1, &process->GetTarget());
-    m_sym_ctx.Clear(false);
-    m_sym_ctx_valid = temporary_pc.ResolveFunctionScope(m_sym_ctx, &addr_range);
-
-    UnwindLogMsg("Symbol is now %s",
-                 GetSymbolOrFunctionName(m_sym_ctx).AsCString(""));
-  }
-
-  // If we were able to find a symbol/function, set addr_range_ptr to the
-  // bounds of that symbol/function. else treat the current pc value as the
-  // start_pc and record no offset.
-  if (addr_range.GetBaseAddress().IsValid()) {
-    m_start_pc = addr_range.GetBaseAddress();
-    m_current_offset = pc - m_start_pc.GetLoadAddress(&process->GetTarget());
-    m_current_offset_backed_up_one = m_current_offset;
-    if (decr_pc_and_recompute_addr_range &&
-        m_current_offset_backed_up_one > 0) {
-      m_current_offset_backed_up_one--;
-      if (m_sym_ctx_valid) {
-        m_current_pc.SetLoadAddress(pc - 1, &process->GetTarget());
-      }
-    }
-  } else {
-    m_start_pc = m_current_pc;
-    m_current_offset = -1;
-    m_current_offset_backed_up_one = -1;
-  }
-
-  if (IsTrapHandlerSymbol(process, m_sym_ctx)) {
-    m_frame_type = eTrapHandlerFrame;
-  } else {
-    // FIXME:  Detect eDebuggerFrame here.
-    if (m_frame_type != eSkipFrame) // don't override eSkipFrame
-    {
-      m_frame_type = eNormalFrame;
-    }
-  }
-
-  // We've set m_frame_type and m_sym_ctx before this call.
-  m_fast_unwind_plan_sp = GetFastUnwindPlanForFrame();
-
-  UnwindPlan::RowSP active_row;
-  RegisterKind row_register_kind = eRegisterKindGeneric;
-
-  // Try to get by with just the fast UnwindPlan if possible - the full
-  // UnwindPlan may be expensive to get (e.g. if we have to parse the entire
-  // eh_frame section of an ObjectFile for the first time.)
-
-  if (m_fast_unwind_plan_sp &&
-      m_fast_unwind_plan_sp->PlanValidAtAddress(m_current_pc)) {
-    active_row =
-        m_fast_unwind_plan_sp->GetRowForFunctionOffset(m_current_offset);
-    row_register_kind = m_fast_unwind_plan_sp->GetRegisterKind();
-    PropagateTrapHandlerFlagFromUnwindPlan(m_fast_unwind_plan_sp);
-    if (active_row.get() && log) {
-      StreamString active_row_strm;
-      active_row->Dump(active_row_strm, m_fast_unwind_plan_sp.get(), &m_thread,
-                       m_start_pc.GetLoadAddress(exe_ctx.GetTargetPtr()));
-      UnwindLogMsg("active row: %s", active_row_strm.GetData());
-    }
-  } else {
-    m_full_unwind_plan_sp = GetFullUnwindPlanForFrame();
-    int valid_offset = -1;
-    if (IsUnwindPlanValidForCurrentPC(m_full_unwind_plan_sp, valid_offset)) {
-      active_row = m_full_unwind_plan_sp->GetRowForFunctionOffset(valid_offset);
-      row_register_kind = m_full_unwind_plan_sp->GetRegisterKind();
-      PropagateTrapHandlerFlagFromUnwindPlan(m_full_unwind_plan_sp);
-      if (active_row.get() && log) {
-        StreamString active_row_strm;
-        active_row->Dump(active_row_strm, m_full_unwind_plan_sp.get(),
-                         &m_thread,
-                         m_start_pc.GetLoadAddress(exe_ctx.GetTargetPtr()));
-        UnwindLogMsg("active row: %s", active_row_strm.GetData());
-      }
-    }
-  }
-
-  if (!active_row.get()) {
-    m_frame_type = eNotAValidFrame;
-    UnwindLogMsg("could not find unwind row for this pc");
-    return;
-  }
-
-  if (!ReadFrameAddress(row_register_kind, active_row->GetCFAValue(), m_cfa)) {
-    UnwindLogMsg("failed to get cfa");
-    m_frame_type = eNotAValidFrame;
-    return;
-  }
-
-  ReadFrameAddress(row_register_kind, active_row->GetAFAValue(), m_afa);
-
-  UnwindLogMsg("m_cfa = 0x%" PRIx64 " m_afa = 0x%" PRIx64, m_cfa, m_afa);
-
-  if (CheckIfLoopingStack()) {
-    TryFallbackUnwindPlan();
-    if (CheckIfLoopingStack()) {
-      UnwindLogMsg("same CFA address as next frame, assuming the unwind is "
-                   "looping - stopping");
-      m_frame_type = eNotAValidFrame;
-      return;
-    }
-  }
-
-  UnwindLogMsg("initialized frame current pc is 0x%" PRIx64
-               " cfa is 0x%" PRIx64 " afa is 0x%" PRIx64,
-               (uint64_t)m_current_pc.GetLoadAddress(exe_ctx.GetTargetPtr()),
-               (uint64_t)m_cfa,
-               (uint64_t)m_afa);
-}
-
-bool RegisterContextLLDB::CheckIfLoopingStack() {
-  // If we have a bad stack setup, we can get the same CFA value multiple times
-  // -- or even more devious, we can actually oscillate between two CFA values.
-  // Detect that here and break out to avoid a possible infinite loop in lldb
-  // trying to unwind the stack. To detect when we have the same CFA value
-  // multiple times, we compare the
-  // CFA of the current
-  // frame with the 2nd next frame because in some specail case (e.g. signal
-  // hanlders, hand written assembly without ABI compiance) we can have 2
-  // frames with the same
-  // CFA (in theory we
-  // can have arbitrary number of frames with the same CFA, but more then 2 is
-  // very very unlikely)
-
-  RegisterContextLLDB::SharedPtr next_frame = GetNextFrame();
-  if (next_frame) {
-    RegisterContextLLDB::SharedPtr next_next_frame = next_frame->GetNextFrame();
-    addr_t next_next_frame_cfa = LLDB_INVALID_ADDRESS;
-    if (next_next_frame && next_next_frame->GetCFA(next_next_frame_cfa)) {
-      if (next_next_frame_cfa == m_cfa) {
-        // We have a loop in the stack unwind
-        return true;
-      }
-    }
-  }
-  return false;
-}
-
-bool RegisterContextLLDB::IsFrameZero() const { return m_frame_number == 0; }
-
-// Find a fast unwind plan for this frame, if possible.
-//
-// On entry to this method,
-//
-//   1. m_frame_type should already be set to eTrapHandlerFrame/eDebuggerFrame
-//   if either of those are correct,
-//   2. m_sym_ctx should already be filled in, and
-//   3. m_current_pc should have the current pc value for this frame
-//   4. m_current_offset_backed_up_one should have the current byte offset into
-//   the function, maybe backed up by 1, -1 if unknown
-
-UnwindPlanSP RegisterContextLLDB::GetFastUnwindPlanForFrame() {
-  UnwindPlanSP unwind_plan_sp;
-  ModuleSP pc_module_sp(m_current_pc.GetModule());
-
-  if (!m_current_pc.IsValid() || !pc_module_sp ||
-      pc_module_sp->GetObjectFile() == nullptr)
-    return unwind_plan_sp;
-
-  if (IsFrameZero())
-    return unwind_plan_sp;
-
-  FuncUnwindersSP func_unwinders_sp(
-      pc_module_sp->GetUnwindTable().GetFuncUnwindersContainingAddress(
-          m_current_pc, m_sym_ctx));
-  if (!func_unwinders_sp)
-    return unwind_plan_sp;
-
-  // If we're in _sigtramp(), unwinding past this frame requires special
-  // knowledge.
-  if (m_frame_type == eTrapHandlerFrame || m_frame_type == eDebuggerFrame)
-    return unwind_plan_sp;
-
-  unwind_plan_sp = func_unwinders_sp->GetUnwindPlanFastUnwind(
-      *m_thread.CalculateTarget(), m_thread);
-  if (unwind_plan_sp) {
-    if (unwind_plan_sp->PlanValidAtAddress(m_current_pc)) {
-      Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_UNWIND));
-      if (log && log->GetVerbose()) {
-        if (m_fast_unwind_plan_sp)
-          UnwindLogMsgVerbose("frame, and has a fast UnwindPlan");
-        else
-          UnwindLogMsgVerbose("frame");
-      }
-      m_frame_type = eNormalFrame;
-      return unwind_plan_sp;
-    } else {
-      unwind_plan_sp.reset();
-    }
-  }
-  return unwind_plan_sp;
-}
-
-// On entry to this method,
-//
-//   1. m_frame_type should already be set to eTrapHandlerFrame/eDebuggerFrame
-//   if either of those are correct,
-//   2. m_sym_ctx should already be filled in, and
-//   3. m_current_pc should have the current pc value for this frame
-//   4. m_current_offset_backed_up_one should have the current byte offset into
-//   the function, maybe backed up by 1, -1 if unknown
-
-UnwindPlanSP RegisterContextLLDB::GetFullUnwindPlanForFrame() {
-  UnwindPlanSP unwind_plan_sp;
-  UnwindPlanSP arch_default_unwind_plan_sp;
-  ExecutionContext exe_ctx(m_thread.shared_from_this());
-  Process *process = exe_ctx.GetProcessPtr();
-  ABI *abi = process ? process->GetABI().get() : nullptr;
-  if (abi) {
-    arch_default_unwind_plan_sp =
-        std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric);
-    abi->CreateDefaultUnwindPlan(*arch_default_unwind_plan_sp);
-  } else {
-    UnwindLogMsg(
-        "unable to get architectural default UnwindPlan from ABI plugin");
-  }
-
-  bool behaves_like_zeroth_frame = false;
-  if (IsFrameZero() || GetNextFrame()->m_frame_type == eTrapHandlerFrame ||
-      GetNextFrame()->m_frame_type == eDebuggerFrame) {
-    behaves_like_zeroth_frame = true;
-    // If this frame behaves like a 0th frame (currently executing or
-    // interrupted asynchronously), all registers can be retrieved.
-    m_all_registers_available = true;
-  }
-
-  // If we've done a jmp 0x0 / bl 0x0 (called through a null function pointer)
-  // so the pc is 0x0 in the zeroth frame, we need to use the "unwind at first
-  // instruction" arch default UnwindPlan Also, if this Process can report on
-  // memory region attributes, any non-executable region means we jumped
-  // through a bad function pointer - handle the same way as 0x0. Note, if we
-  // have a symbol context & a symbol, we don't want to follow this code path.
-  // This is for jumping to memory regions without any information available.
-
-  if ((!m_sym_ctx_valid ||
-       (m_sym_ctx.function == nullptr && m_sym_ctx.symbol == nullptr)) &&
-      behaves_like_zeroth_frame && m_current_pc.IsValid()) {
-    uint32_t permissions;
-    addr_t current_pc_addr =
-        m_current_pc.GetLoadAddress(exe_ctx.GetTargetPtr());
-    if (current_pc_addr == 0 ||
-        (process &&
-         process->GetLoadAddressPermissions(current_pc_addr, permissions) &&
-         (permissions & ePermissionsExecutable) == 0)) {
-      if (abi) {
-        unwind_plan_sp =
-            std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric);
-        abi->CreateFunctionEntryUnwindPlan(*unwind_plan_sp);
-        m_frame_type = eNormalFrame;
-        return unwind_plan_sp;
-      }
-    }
-  }
-
-  // No Module for the current pc, try using the architecture default unwind.
-  ModuleSP pc_module_sp(m_current_pc.GetModule());
-  if (!m_current_pc.IsValid() || !pc_module_sp ||
-      pc_module_sp->GetObjectFile() == nullptr) {
-    m_frame_type = eNormalFrame;
-    return arch_default_unwind_plan_sp;
-  }
-
-  FuncUnwindersSP func_unwinders_sp;
-  if (m_sym_ctx_valid) {
-    func_unwinders_sp =
-        pc_module_sp->GetUnwindTable().GetFuncUnwindersContainingAddress(
-            m_current_pc, m_sym_ctx);
-  }
-
-  // No FuncUnwinders available for this pc (stripped function symbols, lldb
-  // could not augment its function table with another source, like
-  // LC_FUNCTION_STARTS or eh_frame in ObjectFileMachO). See if eh_frame or the
-  // .ARM.exidx tables have unwind information for this address, else fall back
-  // to the architectural default unwind.
-  if (!func_unwinders_sp) {
-    m_frame_type = eNormalFrame;
-
-    if (!pc_module_sp || !pc_module_sp->GetObjectFile() ||
-        !m_current_pc.IsValid())
-      return arch_default_unwind_plan_sp;
-
-    // Even with -fomit-frame-pointer, we can try eh_frame to get back on
-    // track.
-    DWARFCallFrameInfo *eh_frame =
-        pc_module_sp->GetUnwindTable().GetEHFrameInfo();
-    if (eh_frame) {
-      unwind_plan_sp = std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric);
-      if (eh_frame->GetUnwindPlan(m_current_pc, *unwind_plan_sp))
-        return unwind_plan_sp;
-      else
-        unwind_plan_sp.reset();
-    }
-
-    ArmUnwindInfo *arm_exidx =
-        pc_module_sp->GetUnwindTable().GetArmUnwindInfo();
-    if (arm_exidx) {
-      unwind_plan_sp = std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric);
-      if (arm_exidx->GetUnwindPlan(exe_ctx.GetTargetRef(), m_current_pc,
-                                   *unwind_plan_sp))
-        return unwind_plan_sp;
-      else
-        unwind_plan_sp.reset();
-    }
-
-    CallFrameInfo *object_file_unwind =
-        pc_module_sp->GetUnwindTable().GetObjectFileUnwindInfo();
-    if (object_file_unwind) {
-      unwind_plan_sp = std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric);
-      if (object_file_unwind->GetUnwindPlan(m_current_pc, *unwind_plan_sp))
-        return unwind_plan_sp;
-      else
-        unwind_plan_sp.reset();
-    }
-
-    return arch_default_unwind_plan_sp;
-  }
-
-  // If we're in _sigtramp(), unwinding past this frame requires special
-  // knowledge.  On Mac OS X this knowledge is properly encoded in the eh_frame
-  // section, so prefer that if available. On other platforms we may need to
-  // provide a platform-specific UnwindPlan which encodes the details of how to
-  // unwind out of sigtramp.
-  if (m_frame_type == eTrapHandlerFrame && process) {
-    m_fast_unwind_plan_sp.reset();
-    unwind_plan_sp =
-        func_unwinders_sp->GetEHFrameUnwindPlan(process->GetTarget());
-    if (!unwind_plan_sp)
-      unwind_plan_sp =
-          func_unwinders_sp->GetObjectFileUnwindPlan(process->GetTarget());
-    if (unwind_plan_sp && unwind_plan_sp->PlanValidAtAddress(m_current_pc) &&
-        unwind_plan_sp->GetSourcedFromCompiler() == eLazyBoolYes) {
-      return unwind_plan_sp;
-    }
-  }
-
-  // Ask the DynamicLoader if the eh_frame CFI should be trusted in this frame
-  // even when it's frame zero This comes up if we have hand-written functions
-  // in a Module and hand-written eh_frame.  The assembly instruction
-  // inspection may fail and the eh_frame CFI were probably written with some
-  // care to do the right thing.  It'd be nice if there was a way to ask the
-  // eh_frame directly if it is asynchronous (can be trusted at every
-  // instruction point) or synchronous (the normal case - only at call sites).
-  // But there is not.
-  if (process && process->GetDynamicLoader() &&
-      process->GetDynamicLoader()->AlwaysRelyOnEHUnwindInfo(m_sym_ctx)) {
-    // We must specifically call the GetEHFrameUnwindPlan() method here --
-    // normally we would call GetUnwindPlanAtCallSite() -- because CallSite may
-    // return an unwind plan sourced from either eh_frame (that's what we
-    // intend) or compact unwind (this won't work)
-    unwind_plan_sp =
-        func_unwinders_sp->GetEHFrameUnwindPlan(process->GetTarget());
-    if (!unwind_plan_sp)
-      unwind_plan_sp =
-          func_unwinders_sp->GetObjectFileUnwindPlan(process->GetTarget());
-    if (unwind_plan_sp && unwind_plan_sp->PlanValidAtAddress(m_current_pc)) {
-      UnwindLogMsgVerbose("frame uses %s for full UnwindPlan because the "
-                          "DynamicLoader suggested we prefer it",
-                          unwind_plan_sp->GetSourceName().GetCString());
-      return unwind_plan_sp;
-    }
-  }
-
-  // Typically the NonCallSite UnwindPlan is the unwind created by inspecting
-  // the assembly language instructions
-  if (behaves_like_zeroth_frame && process) {
-    unwind_plan_sp = func_unwinders_sp->GetUnwindPlanAtNonCallSite(
-        process->GetTarget(), m_thread);
-    if (unwind_plan_sp && unwind_plan_sp->PlanValidAtAddress(m_current_pc)) {
-      if (unwind_plan_sp->GetSourcedFromCompiler() == eLazyBoolNo) {
-        // We probably have an UnwindPlan created by inspecting assembly
-        // instructions. The assembly profilers work really well with compiler-
-        // generated functions but hand- written assembly can be problematic.
-        // We set the eh_frame based unwind plan as our fallback unwind plan if
-        // instruction emulation doesn't work out even for non call sites if it
-        // is available and use the architecture default unwind plan if it is
-        // not available. The eh_frame unwind plan is more reliable even on non
-        // call sites then the architecture default plan and for hand written
-        // assembly code it is often written in a way that it valid at all
-        // location what helps in the most common cases when the instruction
-        // emulation fails.
-        UnwindPlanSP call_site_unwind_plan =
-            func_unwinders_sp->GetUnwindPlanAtCallSite(process->GetTarget(),
-                                                       m_thread);
-        if (call_site_unwind_plan &&
-            call_site_unwind_plan.get() != unwind_plan_sp.get() &&
-            call_site_unwind_plan->GetSourceName() !=
-                unwind_plan_sp->GetSourceName()) {
-          m_fallback_unwind_plan_sp = call_site_unwind_plan;
-        } else {
-          m_fallback_unwind_plan_sp = arch_default_unwind_plan_sp;
-        }
-      }
-      UnwindLogMsgVerbose("frame uses %s for full UnwindPlan because this "
-                          "is the non-call site unwind plan and this is a "
-                          "zeroth frame",
-                          unwind_plan_sp->GetSourceName().GetCString());
-      return unwind_plan_sp;
-    }
-
-    // If we're on the first instruction of a function, and we have an
-    // architectural default UnwindPlan for the initial instruction of a
-    // function, use that.
-    if (m_current_offset == 0) {
-      unwind_plan_sp =
-          func_unwinders_sp->GetUnwindPlanArchitectureDefaultAtFunctionEntry(
-              m_thread);
-      if (unwind_plan_sp) {
-        UnwindLogMsgVerbose("frame uses %s for full UnwindPlan because we are at "
-                            "the first instruction of a function",
-                            unwind_plan_sp->GetSourceName().GetCString());
-        return unwind_plan_sp;
-      }
-    }
-  }
-
-  // Typically this is unwind info from an eh_frame section intended for
-  // exception handling; only valid at call sites
-  if (process) {
-    unwind_plan_sp = func_unwinders_sp->GetUnwindPlanAtCallSite(
-        process->GetTarget(), m_thread);
-  }
-  int valid_offset = -1;
-  if (IsUnwindPlanValidForCurrentPC(unwind_plan_sp, valid_offset)) {
-    UnwindLogMsgVerbose("frame uses %s for full UnwindPlan because this "
-                        "is the call-site unwind plan",
-                        unwind_plan_sp->GetSourceName().GetCString());
-    return unwind_plan_sp;
-  }
-
-  // We'd prefer to use an UnwindPlan intended for call sites when we're at a
-  // call site but if we've struck out on that, fall back to using the non-
-  // call-site assembly inspection UnwindPlan if possible.
-  if (process) {
-    unwind_plan_sp = func_unwinders_sp->GetUnwindPlanAtNonCallSite(
-        process->GetTarget(), m_thread);
-  }
-  if (unwind_plan_sp &&
-      unwind_plan_sp->GetSourcedFromCompiler() == eLazyBoolNo) {
-    // We probably have an UnwindPlan created by inspecting assembly
-    // instructions. The assembly profilers work really well with compiler-
-    // generated functions but hand- written assembly can be problematic. We
-    // set the eh_frame based unwind plan as our fallback unwind plan if
-    // instruction emulation doesn't work out even for non call sites if it is
-    // available and use the architecture default unwind plan if it is not
-    // available. The eh_frame unwind plan is more reliable even on non call
-    // sites then the architecture default plan and for hand written assembly
-    // code it is often written in a way that it valid at all location what
-    // helps in the most common cases when the instruction emulation fails.
-    UnwindPlanSP call_site_unwind_plan =
-        func_unwinders_sp->GetUnwindPlanAtCallSite(process->GetTarget(),
-                                                   m_thread);
-    if (call_site_unwind_plan &&
-        call_site_unwind_plan.get() != unwind_plan_sp.get() &&
-        call_site_unwind_plan->GetSourceName() !=
-            unwind_plan_sp->GetSourceName()) {
-      m_fallback_unwind_plan_sp = call_site_unwind_plan;
-    } else {
-      m_fallback_unwind_plan_sp = arch_default_unwind_plan_sp;
-    }
-  }
-
-  if (IsUnwindPlanValidForCurrentPC(unwind_plan_sp, valid_offset)) {
-    UnwindLogMsgVerbose("frame uses %s for full UnwindPlan because we "
-                        "failed to find a call-site unwind plan that would work",
-                        unwind_plan_sp->GetSourceName().GetCString());
-    return unwind_plan_sp;
-  }
-
-  // If nothing else, use the architectural default UnwindPlan and hope that
-  // does the job.
-  if (arch_default_unwind_plan_sp)
-    UnwindLogMsgVerbose(
-        "frame uses %s for full UnwindPlan because we are falling back "
-        "to the arch default plan",
-        arch_default_unwind_plan_sp->GetSourceName().GetCString());
-  else
-    UnwindLogMsg(
-        "Unable to find any UnwindPlan for full unwind of this frame.");
-
-  return arch_default_unwind_plan_sp;
-}
-
-void RegisterContextLLDB::InvalidateAllRegisters() {
-  m_frame_type = eNotAValidFrame;
-}
-
-size_t RegisterContextLLDB::GetRegisterCount() {
-  return m_thread.GetRegisterContext()->GetRegisterCount();
-}
-
-const RegisterInfo *RegisterContextLLDB::GetRegisterInfoAtIndex(size_t reg) {
-  return m_thread.GetRegisterContext()->GetRegisterInfoAtIndex(reg);
-}
-
-size_t RegisterContextLLDB::GetRegisterSetCount() {
-  return m_thread.GetRegisterContext()->GetRegisterSetCount();
-}
-
-const RegisterSet *RegisterContextLLDB::GetRegisterSet(size_t reg_set) {
-  return m_thread.GetRegisterContext()->GetRegisterSet(reg_set);
-}
-
-uint32_t RegisterContextLLDB::ConvertRegisterKindToRegisterNumber(
-    lldb::RegisterKind kind, uint32_t num) {
-  return m_thread.GetRegisterContext()->ConvertRegisterKindToRegisterNumber(
-      kind, num);
-}
-
-bool RegisterContextLLDB::ReadRegisterValueFromRegisterLocation(
-    lldb_private::UnwindLLDB::RegisterLocation regloc,
-    const RegisterInfo *reg_info, RegisterValue &value) {
-  if (!IsValid())
-    return false;
-  bool success = false;
-
-  switch (regloc.type) {
-  case UnwindLLDB::RegisterLocation::eRegisterInLiveRegisterContext: {
-    const RegisterInfo *other_reg_info =
-        GetRegisterInfoAtIndex(regloc.location.register_number);
-
-    if (!other_reg_info)
-      return false;
-
-    success =
-        m_thread.GetRegisterContext()->ReadRegister(other_reg_info, value);
-  } break;
-  case UnwindLLDB::RegisterLocation::eRegisterInRegister: {
-    const RegisterInfo *other_reg_info =
-        GetRegisterInfoAtIndex(regloc.location.register_number);
-
-    if (!other_reg_info)
-      return false;
-
-    if (IsFrameZero()) {
-      success =
-          m_thread.GetRegisterContext()->ReadRegister(other_reg_info, value);
-    } else {
-      success = GetNextFrame()->ReadRegister(other_reg_info, value);
-    }
-  } break;
-  case UnwindLLDB::RegisterLocation::eRegisterValueInferred:
-    success =
-        value.SetUInt(regloc.location.inferred_value, reg_info->byte_size);
-    break;
-
-  case UnwindLLDB::RegisterLocation::eRegisterNotSaved:
-    break;
-  case UnwindLLDB::RegisterLocation::eRegisterSavedAtHostMemoryLocation:
-    llvm_unreachable("FIXME debugger inferior function call unwind");
-  case UnwindLLDB::RegisterLocation::eRegisterSavedAtMemoryLocation: {
-    Status error(ReadRegisterValueFromMemory(
-        reg_info, regloc.location.target_memory_location, reg_info->byte_size,
-        value));
-    success = error.Success();
-  } break;
-  default:
-    llvm_unreachable("Unknown RegisterLocation type.");
-  }
-  return success;
-}
-
-bool RegisterContextLLDB::WriteRegisterValueToRegisterLocation(
-    lldb_private::UnwindLLDB::RegisterLocation regloc,
-    const RegisterInfo *reg_info, const RegisterValue &value) {
-  if (!IsValid())
-    return false;
-
-  bool success = false;
-
-  switch (regloc.type) {
-  case UnwindLLDB::RegisterLocation::eRegisterInLiveRegisterContext: {
-    const RegisterInfo *other_reg_info =
-        GetRegisterInfoAtIndex(regloc.location.register_number);
-    success =
-        m_thread.GetRegisterContext()->WriteRegister(other_reg_info, value);
-  } break;
-  case UnwindLLDB::RegisterLocation::eRegisterInRegister: {
-    const RegisterInfo *other_reg_info =
-        GetRegisterInfoAtIndex(regloc.location.register_number);
-    if (IsFrameZero()) {
-      success =
-          m_thread.GetRegisterContext()->WriteRegister(other_reg_info, value);
-    } else {
-      success = GetNextFrame()->WriteRegister(other_reg_info, value);
-    }
-  } break;
-  case UnwindLLDB::RegisterLocation::eRegisterValueInferred:
-  case UnwindLLDB::RegisterLocation::eRegisterNotSaved:
-    break;
-  case UnwindLLDB::RegisterLocation::eRegisterSavedAtHostMemoryLocation:
-    llvm_unreachable("FIXME debugger inferior function call unwind");
-  case UnwindLLDB::RegisterLocation::eRegisterSavedAtMemoryLocation: {
-    Status error(WriteRegisterValueToMemory(
-        reg_info, regloc.location.target_memory_location, reg_info->byte_size,
-        value));
-    success = error.Success();
-  } break;
-  default:
-    llvm_unreachable("Unknown RegisterLocation type.");
-  }
-  return success;
-}
-
-bool RegisterContextLLDB::IsValid() const {
-  return m_frame_type != eNotAValidFrame;
-}
-
-// After the final stack frame in a stack walk we'll get one invalid
-// (eNotAValidFrame) stack frame -- one past the end of the stack walk.  But
-// higher-level code will need to tell the differnece between "the unwind plan
-// below this frame failed" versus "we successfully completed the stack walk"
-// so this method helps to disambiguate that.
-
-bool RegisterContextLLDB::IsTrapHandlerFrame() const {
-  return m_frame_type == eTrapHandlerFrame;
-}
-
-// A skip frame is a bogus frame on the stack -- but one where we're likely to
-// find a real frame farther
-// up the stack if we keep looking.  It's always the second frame in an unwind
-// (i.e. the first frame after frame zero) where unwinding can be the
-// trickiest.  Ideally we'll mark up this frame in some way so the user knows
-// we're displaying bad data and we may have skipped one frame of their real
-// program in the process of getting back on track.
-
-bool RegisterContextLLDB::IsSkipFrame() const {
-  return m_frame_type == eSkipFrame;
-}
-
-bool RegisterContextLLDB::IsTrapHandlerSymbol(
-    lldb_private::Process *process,
-    const lldb_private::SymbolContext &m_sym_ctx) const {
-  PlatformSP platform_sp(process->GetTarget().GetPlatform());
-  if (platform_sp) {
-    const std::vector<ConstString> trap_handler_names(
-        platform_sp->GetTrapHandlerSymbolNames());
-    for (ConstString name : trap_handler_names) {
-      if ((m_sym_ctx.function && m_sym_ctx.function->GetName() == name) ||
-          (m_sym_ctx.symbol && m_sym_ctx.symbol->GetName() == name)) {
-        return true;
-      }
-    }
-  }
-  const std::vector<ConstString> user_specified_trap_handler_names(
-      m_parent_unwind.GetUserSpecifiedTrapHandlerFunctionNames());
-  for (ConstString name : user_specified_trap_handler_names) {
-    if ((m_sym_ctx.function && m_sym_ctx.function->GetName() == name) ||
-        (m_sym_ctx.symbol && m_sym_ctx.symbol->GetName() == name)) {
-      return true;
-    }
-  }
-
-  return false;
-}
-
-// Answer the question: Where did THIS frame save the CALLER frame ("previous"
-// frame)'s register value?
-
-enum UnwindLLDB::RegisterSearchResult
-RegisterContextLLDB::SavedLocationForRegister(
-    uint32_t lldb_regnum, lldb_private::UnwindLLDB::RegisterLocation &regloc) {
-  RegisterNumber regnum(m_thread, eRegisterKindLLDB, lldb_regnum);
-
-  // Have we already found this register location?
-  if (!m_registers.empty()) {
-    std::map<uint32_t,
-             lldb_private::UnwindLLDB::RegisterLocation>::const_iterator
-        iterator;
-    iterator = m_registers.find(regnum.GetAsKind(eRegisterKindLLDB));
-    if (iterator != m_registers.end()) {
-      regloc = iterator->second;
-      UnwindLogMsg("supplying caller's saved %s (%d)'s location, cached",
-                   regnum.GetName(), regnum.GetAsKind(eRegisterKindLLDB));
-      return UnwindLLDB::RegisterSearchResult::eRegisterFound;
-    }
-  }
-
-  // Look through the available UnwindPlans for the register location.
-
-  UnwindPlan::Row::RegisterLocation unwindplan_regloc;
-  bool have_unwindplan_regloc = false;
-  RegisterKind unwindplan_registerkind = kNumRegisterKinds;
-
-  if (m_fast_unwind_plan_sp) {
-    UnwindPlan::RowSP active_row =
-        m_fast_unwind_plan_sp->GetRowForFunctionOffset(m_current_offset);
-    unwindplan_registerkind = m_fast_unwind_plan_sp->GetRegisterKind();
-    if (regnum.GetAsKind(unwindplan_registerkind) == LLDB_INVALID_REGNUM) {
-      UnwindLogMsg("could not convert lldb regnum %s (%d) into %d RegisterKind "
-                   "reg numbering scheme",
-                   regnum.GetName(), regnum.GetAsKind(eRegisterKindLLDB),
-                   (int)unwindplan_registerkind);
-      return UnwindLLDB::RegisterSearchResult::eRegisterNotFound;
-    }
-    if (active_row->GetRegisterInfo(regnum.GetAsKind(unwindplan_registerkind),
-                                    unwindplan_regloc)) {
-      UnwindLogMsg(
-          "supplying caller's saved %s (%d)'s location using FastUnwindPlan",
-          regnum.GetName(), regnum.GetAsKind(eRegisterKindLLDB));
-      have_unwindplan_regloc = true;
-    }
-  }
-
-  if (!have_unwindplan_regloc) {
-    // m_full_unwind_plan_sp being NULL means that we haven't tried to find a
-    // full UnwindPlan yet
-    if (!m_full_unwind_plan_sp)
-      m_full_unwind_plan_sp = GetFullUnwindPlanForFrame();
-
-    if (m_full_unwind_plan_sp) {
-      RegisterNumber pc_regnum(m_thread, eRegisterKindGeneric,
-                               LLDB_REGNUM_GENERIC_PC);
-
-      UnwindPlan::RowSP active_row =
-          m_full_unwind_plan_sp->GetRowForFunctionOffset(m_current_offset);
-      unwindplan_registerkind = m_full_unwind_plan_sp->GetRegisterKind();
-
-      RegisterNumber return_address_reg;
-
-      // If we're fetching the saved pc and this UnwindPlan defines a
-      // ReturnAddress register (e.g. lr on arm), look for the return address
-      // register number in the UnwindPlan's row.
-      if (pc_regnum.IsValid() && pc_regnum == regnum &&
-          m_full_unwind_plan_sp->GetReturnAddressRegister() !=
-              LLDB_INVALID_REGNUM) {
-
-        return_address_reg.init(
-            m_thread, m_full_unwind_plan_sp->GetRegisterKind(),
-            m_full_unwind_plan_sp->GetReturnAddressRegister());
-        regnum = return_address_reg;
-        UnwindLogMsg("requested caller's saved PC but this UnwindPlan uses a "
-                     "RA reg; getting %s (%d) instead",
-                     return_address_reg.GetName(),
-                     return_address_reg.GetAsKind(eRegisterKindLLDB));
-      } else {
-        if (regnum.GetAsKind(unwindplan_registerkind) == LLDB_INVALID_REGNUM) {
-          if (unwindplan_registerkind == eRegisterKindGeneric) {
-            UnwindLogMsg("could not convert lldb regnum %s (%d) into "
-                         "eRegisterKindGeneric reg numbering scheme",
-                         regnum.GetName(), regnum.GetAsKind(eRegisterKindLLDB));
-          } else {
-            UnwindLogMsg("could not convert lldb regnum %s (%d) into %d "
-                         "RegisterKind reg numbering scheme",
-                         regnum.GetName(), regnum.GetAsKind(eRegisterKindLLDB),
-                         (int)unwindplan_registerkind);
-          }
-          return UnwindLLDB::RegisterSearchResult::eRegisterNotFound;
-        }
-      }
-
-      if (regnum.IsValid() &&
-          active_row->GetRegisterInfo(regnum.GetAsKind(unwindplan_registerkind),
-                                      unwindplan_regloc)) {
-        have_unwindplan_regloc = true;
-        UnwindLogMsg(
-            "supplying caller's saved %s (%d)'s location using %s UnwindPlan",
-            regnum.GetName(), regnum.GetAsKind(eRegisterKindLLDB),
-            m_full_unwind_plan_sp->GetSourceName().GetCString());
-      }
-
-      // This is frame 0 and we're retrieving the PC and it's saved in a Return
-      // Address register and it hasn't been saved anywhere yet -- that is,
-      // it's still live in the actual register. Handle this specially.
-
-      if (!have_unwindplan_regloc && return_address_reg.IsValid() &&
-          IsFrameZero()) {
-        if (return_address_reg.GetAsKind(eRegisterKindLLDB) !=
-            LLDB_INVALID_REGNUM) {
-          lldb_private::UnwindLLDB::RegisterLocation new_regloc;
-          new_regloc.type =
-              UnwindLLDB::RegisterLocation::eRegisterInLiveRegisterContext;
-          new_regloc.location.register_number =
-              return_address_reg.GetAsKind(eRegisterKindLLDB);
-          m_registers[regnum.GetAsKind(eRegisterKindLLDB)] = new_regloc;
-          regloc = new_regloc;
-          UnwindLogMsg("supplying caller's register %s (%d) from the live "
-                       "RegisterContext at frame 0, saved in %d",
-                       return_address_reg.GetName(),
-                       return_address_reg.GetAsKind(eRegisterKindLLDB),
-                       return_address_reg.GetAsKind(eRegisterKindLLDB));
-          return UnwindLLDB::RegisterSearchResult::eRegisterFound;
-        }
-      }
-
-      // If this architecture stores the return address in a register (it
-      // defines a Return Address register) and we're on a non-zero stack frame
-      // and the Full UnwindPlan says that the pc is stored in the
-      // RA registers (e.g. lr on arm), then we know that the full unwindplan is
-      // not trustworthy -- this
-      // is an impossible situation and the instruction emulation code has
-      // likely been misled. If this stack frame meets those criteria, we need
-      // to throw away the Full UnwindPlan that the instruction emulation came
-      // up with and fall back to the architecture's Default UnwindPlan so the
-      // stack walk can get past this point.
-
-      // Special note:  If the Full UnwindPlan was generated from the compiler,
-      // don't second-guess it when we're at a call site location.
-
-      // arch_default_ra_regnum is the return address register # in the Full
-      // UnwindPlan register numbering
-      RegisterNumber arch_default_ra_regnum(m_thread, eRegisterKindGeneric,
-                                            LLDB_REGNUM_GENERIC_RA);
-
-      if (arch_default_ra_regnum.GetAsKind(unwindplan_registerkind) !=
-              LLDB_INVALID_REGNUM &&
-          pc_regnum == regnum && unwindplan_regloc.IsInOtherRegister() &&
-          unwindplan_regloc.GetRegisterNumber() ==
-              arch_default_ra_regnum.GetAsKind(unwindplan_registerkind) &&
-          m_full_unwind_plan_sp->GetSourcedFromCompiler() != eLazyBoolYes &&
-          !m_all_registers_available) {
-        UnwindLogMsg("%s UnwindPlan tried to restore the pc from the link "
-                     "register but this is a non-zero frame",
-                     m_full_unwind_plan_sp->GetSourceName().GetCString());
-
-        // Throw away the full unwindplan; install the arch default unwindplan
-        if (ForceSwitchToFallbackUnwindPlan()) {
-          // Update for the possibly new unwind plan
-          unwindplan_registerkind = m_full_unwind_plan_sp->GetRegisterKind();
-          UnwindPlan::RowSP active_row =
-              m_full_unwind_plan_sp->GetRowForFunctionOffset(m_current_offset);
-
-          // Sanity check: Verify that we can fetch a pc value and CFA value
-          // with this unwind plan
-
-          RegisterNumber arch_default_pc_reg(m_thread, eRegisterKindGeneric,
-                                             LLDB_REGNUM_GENERIC_PC);
-          bool can_fetch_pc_value = false;
-          bool can_fetch_cfa = false;
-          addr_t cfa_value;
-          if (active_row) {
-            if (arch_default_pc_reg.GetAsKind(unwindplan_registerkind) !=
-                    LLDB_INVALID_REGNUM &&
-                active_row->GetRegisterInfo(
-                    arch_default_pc_reg.GetAsKind(unwindplan_registerkind),
-                    unwindplan_regloc)) {
-              can_fetch_pc_value = true;
-            }
-            if (ReadFrameAddress(unwindplan_registerkind,
-                                 active_row->GetCFAValue(), cfa_value)) {
-              can_fetch_cfa = true;
-            }
-          }
-
-          have_unwindplan_regloc = can_fetch_pc_value && can_fetch_cfa;
-        } else {
-          // We were unable to fall back to another unwind plan
-          have_unwindplan_regloc = false;
-        }
-      }
-    }
-  }
-
-  ExecutionContext exe_ctx(m_thread.shared_from_this());
-  Process *process = exe_ctx.GetProcessPtr();
-  if (!have_unwindplan_regloc) {
-    // If the UnwindPlan failed to give us an unwind location for this
-    // register, we may be able to fall back to some ABI-defined default.  For
-    // example, some ABIs allow to determine the caller's SP via the CFA. Also,
-    // the ABI may set volatile registers to the undefined state.
-    ABI *abi = process ? process->GetABI().get() : nullptr;
-    if (abi) {
-      const RegisterInfo *reg_info =
-          GetRegisterInfoAtIndex(regnum.GetAsKind(eRegisterKindLLDB));
-      if (reg_info &&
-          abi->GetFallbackRegisterLocation(reg_info, unwindplan_regloc)) {
-        UnwindLogMsg(
-            "supplying caller's saved %s (%d)'s location using ABI default",
-            regnum.GetName(), regnum.GetAsKind(eRegisterKindLLDB));
-        have_unwindplan_regloc = true;
-      }
-    }
-  }
-
-  if (!have_unwindplan_regloc) {
-    if (IsFrameZero()) {
-      // This is frame 0 - we should return the actual live register context
-      // value
-      lldb_private::UnwindLLDB::RegisterLocation new_regloc;
-      new_regloc.type =
-          UnwindLLDB::RegisterLocation::eRegisterInLiveRegisterContext;
-      new_regloc.location.register_number = regnum.GetAsKind(eRegisterKindLLDB);
-      m_registers[regnum.GetAsKind(eRegisterKindLLDB)] = new_regloc;
-      regloc = new_regloc;
-      UnwindLogMsg("supplying caller's register %s (%d) from the live "
-                   "RegisterContext at frame 0",
-                   regnum.GetName(), regnum.GetAsKind(eRegisterKindLLDB));
-      return UnwindLLDB::RegisterSearchResult::eRegisterFound;
-    } else {
-      std::string unwindplan_name("");
-      if (m_full_unwind_plan_sp) {
-        unwindplan_name += "via '";
-        unwindplan_name += m_full_unwind_plan_sp->GetSourceName().AsCString();
-        unwindplan_name += "'";
-      }
-      UnwindLogMsg("no save location for %s (%d) %s", regnum.GetName(),
-                   regnum.GetAsKind(eRegisterKindLLDB),
-                   unwindplan_name.c_str());
-    }
-    return UnwindLLDB::RegisterSearchResult::eRegisterNotFound;
-  }
-
-  // unwindplan_regloc has valid contents about where to retrieve the register
-  if (unwindplan_regloc.IsUnspecified()) {
-    lldb_private::UnwindLLDB::RegisterLocation new_regloc;
-    new_regloc.type = UnwindLLDB::RegisterLocation::eRegisterNotSaved;
-    m_registers[regnum.GetAsKind(eRegisterKindLLDB)] = new_regloc;
-    UnwindLogMsg("save location for %s (%d) is unspecified, continue searching",
-                 regnum.GetName(), regnum.GetAsKind(eRegisterKindLLDB));
-    return UnwindLLDB::RegisterSearchResult::eRegisterNotFound;
-  }
-
-  if (unwindplan_regloc.IsUndefined()) {
-    UnwindLogMsg(
-        "did not supply reg location for %s (%d) because it is volatile",
-        regnum.GetName(), regnum.GetAsKind(eRegisterKindLLDB));
-    return UnwindLLDB::RegisterSearchResult::eRegisterIsVolatile;
-  }
-
-  if (unwindplan_regloc.IsSame()) {
-    if (!IsFrameZero() &&
-        (regnum.GetAsKind(eRegisterKindGeneric) == LLDB_REGNUM_GENERIC_PC ||
-         regnum.GetAsKind(eRegisterKindGeneric) == LLDB_REGNUM_GENERIC_RA)) {
-      UnwindLogMsg("register %s (%d) is marked as 'IsSame' - it is a pc or "
-                   "return address reg on a non-zero frame -- treat as if we "
-                   "have no information",
-                   regnum.GetName(), regnum.GetAsKind(eRegisterKindLLDB));
-      return UnwindLLDB::RegisterSearchResult::eRegisterNotFound;
-    } else {
-      regloc.type = UnwindLLDB::RegisterLocation::eRegisterInRegister;
-      regloc.location.register_number = regnum.GetAsKind(eRegisterKindLLDB);
-      m_registers[regnum.GetAsKind(eRegisterKindLLDB)] = regloc;
-      UnwindLogMsg(
-          "supplying caller's register %s (%d), saved in register %s (%d)",
-          regnum.GetName(), regnum.GetAsKind(eRegisterKindLLDB),
-          regnum.GetName(), regnum.GetAsKind(eRegisterKindLLDB));
-      return UnwindLLDB::RegisterSearchResult::eRegisterFound;
-    }
-  }
-
-  if (unwindplan_regloc.IsCFAPlusOffset()) {
-    int offset = unwindplan_regloc.GetOffset();
-    regloc.type = UnwindLLDB::RegisterLocation::eRegisterValueInferred;
-    regloc.location.inferred_value = m_cfa + offset;
-    m_registers[regnum.GetAsKind(eRegisterKindLLDB)] = regloc;
-    UnwindLogMsg("supplying caller's register %s (%d), value is CFA plus "
-                 "offset %d [value is 0x%" PRIx64 "]",
-                 regnum.GetName(), regnum.GetAsKind(eRegisterKindLLDB), offset,
-                 regloc.location.inferred_value);
-    return UnwindLLDB::RegisterSearchResult::eRegisterFound;
-  }
-
-  if (unwindplan_regloc.IsAtCFAPlusOffset()) {
-    int offset = unwindplan_regloc.GetOffset();
-    regloc.type = UnwindLLDB::RegisterLocation::eRegisterSavedAtMemoryLocation;
-    regloc.location.target_memory_location = m_cfa + offset;
-    m_registers[regnum.GetAsKind(eRegisterKindLLDB)] = regloc;
-    UnwindLogMsg("supplying caller's register %s (%d) from the stack, saved at "
-                 "CFA plus offset %d [saved at 0x%" PRIx64 "]",
-                 regnum.GetName(), regnum.GetAsKind(eRegisterKindLLDB), offset,
-                 regloc.location.target_memory_location);
-    return UnwindLLDB::RegisterSearchResult::eRegisterFound;
-  }
-
-  if (unwindplan_regloc.IsAFAPlusOffset()) {
-    if (m_afa == LLDB_INVALID_ADDRESS)
-        return UnwindLLDB::RegisterSearchResult::eRegisterNotFound;
-
-    int offset = unwindplan_regloc.GetOffset();
-    regloc.type = UnwindLLDB::RegisterLocation::eRegisterValueInferred;
-    regloc.location.inferred_value = m_afa + offset;
-    m_registers[regnum.GetAsKind(eRegisterKindLLDB)] = regloc;
-    UnwindLogMsg("supplying caller's register %s (%d), value is AFA plus "
-                 "offset %d [value is 0x%" PRIx64 "]",
-                 regnum.GetName(), regnum.GetAsKind(eRegisterKindLLDB), offset,
-                 regloc.location.inferred_value);
-    return UnwindLLDB::RegisterSearchResult::eRegisterFound;
-  }
-
-  if (unwindplan_regloc.IsAtAFAPlusOffset()) {
-    if (m_afa == LLDB_INVALID_ADDRESS)
-        return UnwindLLDB::RegisterSearchResult::eRegisterNotFound;
-
-    int offset = unwindplan_regloc.GetOffset();
-    regloc.type = UnwindLLDB::RegisterLocation::eRegisterSavedAtMemoryLocation;
-    regloc.location.target_memory_location = m_afa + offset;
-    m_registers[regnum.GetAsKind(eRegisterKindLLDB)] = regloc;
-    UnwindLogMsg("supplying caller's register %s (%d) from the stack, saved at "
-                 "AFA plus offset %d [saved at 0x%" PRIx64 "]",
-                 regnum.GetName(), regnum.GetAsKind(eRegisterKindLLDB), offset,
-                 regloc.location.target_memory_location);
-    return UnwindLLDB::RegisterSearchResult::eRegisterFound;
-  }
-
-  if (unwindplan_regloc.IsInOtherRegister()) {
-    uint32_t unwindplan_regnum = unwindplan_regloc.GetRegisterNumber();
-    RegisterNumber row_regnum(m_thread, unwindplan_registerkind,
-                              unwindplan_regnum);
-    if (row_regnum.GetAsKind(eRegisterKindLLDB) == LLDB_INVALID_REGNUM) {
-      UnwindLogMsg("could not supply caller's %s (%d) location - was saved in "
-                   "another reg but couldn't convert that regnum",
-                   regnum.GetName(), regnum.GetAsKind(eRegisterKindLLDB));
-      return UnwindLLDB::RegisterSearchResult::eRegisterNotFound;
-    }
-    regloc.type = UnwindLLDB::RegisterLocation::eRegisterInRegister;
-    regloc.location.register_number = row_regnum.GetAsKind(eRegisterKindLLDB);
-    m_registers[regnum.GetAsKind(eRegisterKindLLDB)] = regloc;
-    UnwindLogMsg(
-        "supplying caller's register %s (%d), saved in register %s (%d)",
-        regnum.GetName(), regnum.GetAsKind(eRegisterKindLLDB),
-        row_regnum.GetName(), row_regnum.GetAsKind(eRegisterKindLLDB));
-    return UnwindLLDB::RegisterSearchResult::eRegisterFound;
-  }
-
-  if (unwindplan_regloc.IsDWARFExpression() ||
-      unwindplan_regloc.IsAtDWARFExpression()) {
-    DataExtractor dwarfdata(unwindplan_regloc.GetDWARFExpressionBytes(),
-                            unwindplan_regloc.GetDWARFExpressionLength(),
-                            process->GetByteOrder(),
-                            process->GetAddressByteSize());
-    ModuleSP opcode_ctx;
-    DWARFExpression dwarfexpr(opcode_ctx, dwarfdata, nullptr);
-    dwarfexpr.SetRegisterKind(unwindplan_registerkind);
-    Value cfa_val = Scalar(m_cfa);
-    cfa_val.SetValueType(Value::eValueTypeLoadAddress);
-    Value result;
-    Status error;
-    if (dwarfexpr.Evaluate(&exe_ctx, this, 0, &cfa_val, nullptr, result,
-                           &error)) {
-      addr_t val;
-      val = result.GetScalar().ULongLong();
-      if (unwindplan_regloc.IsDWARFExpression()) {
-        regloc.type = UnwindLLDB::RegisterLocation::eRegisterValueInferred;
-        regloc.location.inferred_value = val;
-        m_registers[regnum.GetAsKind(eRegisterKindLLDB)] = regloc;
-        UnwindLogMsg("supplying caller's register %s (%d) via DWARF expression "
-                     "(IsDWARFExpression)",
-                     regnum.GetName(), regnum.GetAsKind(eRegisterKindLLDB));
-        return UnwindLLDB::RegisterSearchResult::eRegisterFound;
-      } else {
-        regloc.type =
-            UnwindLLDB::RegisterLocation::eRegisterSavedAtMemoryLocation;
-        regloc.location.target_memory_location = val;
-        m_registers[regnum.GetAsKind(eRegisterKindLLDB)] = regloc;
-        UnwindLogMsg("supplying caller's register %s (%d) via DWARF expression "
-                     "(IsAtDWARFExpression)",
-                     regnum.GetName(), regnum.GetAsKind(eRegisterKindLLDB));
-        return UnwindLLDB::RegisterSearchResult::eRegisterFound;
-      }
-    }
-    UnwindLogMsg("tried to use IsDWARFExpression or IsAtDWARFExpression for %s "
-                 "(%d) but failed",
-                 regnum.GetName(), regnum.GetAsKind(eRegisterKindLLDB));
-    return UnwindLLDB::RegisterSearchResult::eRegisterNotFound;
-  }
-
-  UnwindLogMsg("no save location for %s (%d) in this stack frame",
-               regnum.GetName(), regnum.GetAsKind(eRegisterKindLLDB));
-
-  // FIXME UnwindPlan::Row types atDWARFExpression and isDWARFExpression are
-  // unsupported.
-
-  return UnwindLLDB::RegisterSearchResult::eRegisterNotFound;
-}
-
-// TryFallbackUnwindPlan() -- this method is a little tricky.
-//
-// When this is called, the frame above -- the caller frame, the "previous"
-// frame -- is invalid or bad.
-//
-// Instead of stopping the stack walk here, we'll try a different UnwindPlan
-// and see if we can get a valid frame above us.
-//
-// This most often happens when an unwind plan based on assembly instruction
-// inspection is not correct -- mostly with hand-written assembly functions or
-// functions where the stack frame is set up "out of band", e.g. the kernel
-// saved the register context and then called an asynchronous trap handler like
-// _sigtramp.
-//
-// Often in these cases, if we just do a dumb stack walk we'll get past this
-// tricky frame and our usual techniques can continue to be used.
-
-bool RegisterContextLLDB::TryFallbackUnwindPlan() {
-  if (m_fallback_unwind_plan_sp.get() == nullptr)
-    return false;
-
-  if (m_full_unwind_plan_sp.get() == nullptr)
-    return false;
-
-  if (m_full_unwind_plan_sp.get() == m_fallback_unwind_plan_sp.get() ||
-      m_full_unwind_plan_sp->GetSourceName() ==
-          m_fallback_unwind_plan_sp->GetSourceName()) {
-    return false;
-  }
-
-  // If a compiler generated unwind plan failed, trying the arch default
-  // unwindplan isn't going to do any better.
-  if (m_full_unwind_plan_sp->GetSourcedFromCompiler() == eLazyBoolYes)
-    return false;
-
-  // Get the caller's pc value and our own CFA value. Swap in the fallback
-  // unwind plan, re-fetch the caller's pc value and CFA value. If they're the
-  // same, then the fallback unwind plan provides no benefit.
-
-  RegisterNumber pc_regnum(m_thread, eRegisterKindGeneric,
-                           LLDB_REGNUM_GENERIC_PC);
-
-  addr_t old_caller_pc_value = LLDB_INVALID_ADDRESS;
-  addr_t new_caller_pc_value = LLDB_INVALID_ADDRESS;
-  UnwindLLDB::RegisterLocation regloc;
-  if (SavedLocationForRegister(pc_regnum.GetAsKind(eRegisterKindLLDB),
-                               regloc) ==
-      UnwindLLDB::RegisterSearchResult::eRegisterFound) {
-    const RegisterInfo *reg_info =
-        GetRegisterInfoAtIndex(pc_regnum.GetAsKind(eRegisterKindLLDB));
-    if (reg_info) {
-      RegisterValue reg_value;
-      if (ReadRegisterValueFromRegisterLocation(regloc, reg_info, reg_value)) {
-        old_caller_pc_value = reg_value.GetAsUInt64();
-      }
-    }
-  }
-
-  // This is a tricky wrinkle!  If SavedLocationForRegister() detects a really
-  // impossible register location for the full unwind plan, it may call
-  // ForceSwitchToFallbackUnwindPlan() which in turn replaces the full
-  // unwindplan with the fallback... in short, we're done, we're using the
-  // fallback UnwindPlan. We checked if m_fallback_unwind_plan_sp was nullptr
-  // at the top -- the only way it became nullptr since then is via
-  // SavedLocationForRegister().
-  if (m_fallback_unwind_plan_sp.get() == nullptr)
-    return true;
-
-  // Switch the full UnwindPlan to be the fallback UnwindPlan.  If we decide
-  // this isn't working, we need to restore. We'll also need to save & restore
-  // the value of the m_cfa ivar.  Save is down below a bit in 'old_cfa'.
-  UnwindPlanSP original_full_unwind_plan_sp = m_full_unwind_plan_sp;
-  addr_t old_cfa = m_cfa;
-  addr_t old_afa = m_afa;
-
-  m_registers.clear();
-
-  m_full_unwind_plan_sp = m_fallback_unwind_plan_sp;
-
-  UnwindPlan::RowSP active_row =
-      m_fallback_unwind_plan_sp->GetRowForFunctionOffset(m_current_offset);
-
-  if (active_row &&
-      active_row->GetCFAValue().GetValueType() !=
-          UnwindPlan::Row::FAValue::unspecified) {
-    addr_t new_cfa;
-    if (!ReadFrameAddress(m_fallback_unwind_plan_sp->GetRegisterKind(),
-                            active_row->GetCFAValue(), new_cfa) ||
-        new_cfa == 0 || new_cfa == 1 || new_cfa == LLDB_INVALID_ADDRESS) {
-      UnwindLogMsg("failed to get cfa with fallback unwindplan");
-      m_fallback_unwind_plan_sp.reset();
-      m_full_unwind_plan_sp = original_full_unwind_plan_sp;
-      return false;
-    }
-    m_cfa = new_cfa;
-
-    ReadFrameAddress(m_fallback_unwind_plan_sp->GetRegisterKind(),
-                     active_row->GetAFAValue(), m_afa);
-
-    if (SavedLocationForRegister(pc_regnum.GetAsKind(eRegisterKindLLDB),
-                                 regloc) ==
-        UnwindLLDB::RegisterSearchResult::eRegisterFound) {
-      const RegisterInfo *reg_info =
-          GetRegisterInfoAtIndex(pc_regnum.GetAsKind(eRegisterKindLLDB));
-      if (reg_info) {
-        RegisterValue reg_value;
-        if (ReadRegisterValueFromRegisterLocation(regloc, reg_info,
-                                                  reg_value)) {
-          new_caller_pc_value = reg_value.GetAsUInt64();
-        }
-      }
-    }
-
-    if (new_caller_pc_value == LLDB_INVALID_ADDRESS) {
-      UnwindLogMsg("failed to get a pc value for the caller frame with the "
-                   "fallback unwind plan");
-      m_fallback_unwind_plan_sp.reset();
-      m_full_unwind_plan_sp = original_full_unwind_plan_sp;
-      m_cfa = old_cfa;
-      m_afa = old_afa;
-      return false;
-    }
-
-    if (old_caller_pc_value == new_caller_pc_value &&
-        m_cfa == old_cfa &&
-        m_afa == old_afa) {
-      UnwindLogMsg("fallback unwind plan got the same values for this frame "
-                   "CFA and caller frame pc, not using");
-      m_fallback_unwind_plan_sp.reset();
-      m_full_unwind_plan_sp = original_full_unwind_plan_sp;
-      return false;
-    }
-
-    UnwindLogMsg("trying to unwind from this function with the UnwindPlan '%s' "
-                 "because UnwindPlan '%s' failed.",
-                 m_fallback_unwind_plan_sp->GetSourceName().GetCString(),
-                 original_full_unwind_plan_sp->GetSourceName().GetCString());
-
-    // We've copied the fallback unwind plan into the full - now clear the
-    // fallback.
-    m_fallback_unwind_plan_sp.reset();
-    PropagateTrapHandlerFlagFromUnwindPlan(m_full_unwind_plan_sp);
-  }
-
-  return true;
-}
-
-bool RegisterContextLLDB::ForceSwitchToFallbackUnwindPlan() {
-  if (m_fallback_unwind_plan_sp.get() == nullptr)
-    return false;
-
-  if (m_full_unwind_plan_sp.get() == nullptr)
-    return false;
-
-  if (m_full_unwind_plan_sp.get() == m_fallback_unwind_plan_sp.get() ||
-      m_full_unwind_plan_sp->GetSourceName() ==
-          m_fallback_unwind_plan_sp->GetSourceName()) {
-    return false;
-  }
-
-  UnwindPlan::RowSP active_row =
-      m_fallback_unwind_plan_sp->GetRowForFunctionOffset(m_current_offset);
-
-  if (active_row &&
-      active_row->GetCFAValue().GetValueType() !=
-          UnwindPlan::Row::FAValue::unspecified) {
-    addr_t new_cfa;
-    if (!ReadFrameAddress(m_fallback_unwind_plan_sp->GetRegisterKind(),
-                            active_row->GetCFAValue(), new_cfa) ||
-        new_cfa == 0 || new_cfa == 1 || new_cfa == LLDB_INVALID_ADDRESS) {
-      UnwindLogMsg("failed to get cfa with fallback unwindplan");
-      m_fallback_unwind_plan_sp.reset();
-      return false;
-    }
-
-    ReadFrameAddress(m_fallback_unwind_plan_sp->GetRegisterKind(),
-                     active_row->GetAFAValue(), m_afa);
-
-    m_full_unwind_plan_sp = m_fallback_unwind_plan_sp;
-    m_fallback_unwind_plan_sp.reset();
-
-    m_registers.clear();
-
-    m_cfa = new_cfa;
-
-    PropagateTrapHandlerFlagFromUnwindPlan(m_full_unwind_plan_sp);
-
-    UnwindLogMsg("switched unconditionally to the fallback unwindplan %s",
-                 m_full_unwind_plan_sp->GetSourceName().GetCString());
-    return true;
-  }
-  return false;
-}
-
-void RegisterContextLLDB::PropagateTrapHandlerFlagFromUnwindPlan(
-    lldb::UnwindPlanSP unwind_plan) {
-  if (unwind_plan->GetUnwindPlanForSignalTrap() != eLazyBoolYes) {
-    // Unwind plan does not indicate trap handler.  Do nothing.  We may
-    // already be flagged as trap handler flag due to the symbol being
-    // in the trap handler symbol list, and that should take precedence.
-    return;
-  } else if (m_frame_type != eNormalFrame) {
-    // If this is already a trap handler frame, nothing to do.
-    // If this is a skip or debug or invalid frame, don't override that.
-    return;
-  }
-
-  m_frame_type = eTrapHandlerFrame;
-
-  if (m_current_offset_backed_up_one != m_current_offset) {
-    // We backed up the pc by 1 to compute the symbol context, but
-    // now need to undo that because the pc of the trap handler
-    // frame may in fact be the first instruction of a signal return
-    // trampoline, rather than the instruction after a call.  This
-    // happens on systems where the signal handler dispatch code, rather
-    // than calling the handler and being returned to, jumps to the
-    // handler after pushing the address of a return trampoline on the
-    // stack -- on these systems, when the handler returns, control will
-    // be transferred to the return trampoline, so that's the best
-    // symbol we can present in the callstack.
-    UnwindLogMsg("Resetting current offset and re-doing symbol lookup; "
-                 "old symbol was %s",
-                 GetSymbolOrFunctionName(m_sym_ctx).AsCString(""));
-    m_current_offset_backed_up_one = m_current_offset;
-
-    AddressRange addr_range;
-    m_sym_ctx_valid = m_current_pc.ResolveFunctionScope(m_sym_ctx, &addr_range);
-
-    UnwindLogMsg("Symbol is now %s",
-                 GetSymbolOrFunctionName(m_sym_ctx).AsCString(""));
-
-    ExecutionContext exe_ctx(m_thread.shared_from_this());
-    Process *process = exe_ctx.GetProcessPtr();
-    Target *target = &process->GetTarget();
-
-    m_start_pc = addr_range.GetBaseAddress();
-    m_current_offset =
-        m_current_pc.GetLoadAddress(target) - m_start_pc.GetLoadAddress(target);
-  }
-}
-
-bool RegisterContextLLDB::ReadFrameAddress(
-    lldb::RegisterKind row_register_kind, UnwindPlan::Row::FAValue &fa,
-    addr_t &address) {
-  RegisterValue reg_value;
-
-  address = LLDB_INVALID_ADDRESS;
-  addr_t cfa_reg_contents;
-
-  switch (fa.GetValueType()) {
-  case UnwindPlan::Row::FAValue::isRegisterDereferenced: {
-    RegisterNumber cfa_reg(m_thread, row_register_kind,
-                           fa.GetRegisterNumber());
-    if (ReadGPRValue(cfa_reg, cfa_reg_contents)) {
-      const RegisterInfo *reg_info =
-          GetRegisterInfoAtIndex(cfa_reg.GetAsKind(eRegisterKindLLDB));
-      RegisterValue reg_value;
-      if (reg_info) {
-        Status error = ReadRegisterValueFromMemory(
-            reg_info, cfa_reg_contents, reg_info->byte_size, reg_value);
-        if (error.Success()) {
-          address = reg_value.GetAsUInt64();
-          UnwindLogMsg(
-              "CFA value via dereferencing reg %s (%d): reg has val 0x%" PRIx64
-              ", CFA value is 0x%" PRIx64,
-              cfa_reg.GetName(), cfa_reg.GetAsKind(eRegisterKindLLDB),
-              cfa_reg_contents, address);
-          return true;
-        } else {
-          UnwindLogMsg("Tried to deref reg %s (%d) [0x%" PRIx64
-                       "] but memory read failed.",
-                       cfa_reg.GetName(), cfa_reg.GetAsKind(eRegisterKindLLDB),
-                       cfa_reg_contents);
-        }
-      }
-    }
-    break;
-  }
-  case UnwindPlan::Row::FAValue::isRegisterPlusOffset: {
-    RegisterNumber cfa_reg(m_thread, row_register_kind,
-                           fa.GetRegisterNumber());
-    if (ReadGPRValue(cfa_reg, cfa_reg_contents)) {
-      if (cfa_reg_contents == LLDB_INVALID_ADDRESS || cfa_reg_contents == 0 ||
-          cfa_reg_contents == 1) {
-        UnwindLogMsg(
-            "Got an invalid CFA register value - reg %s (%d), value 0x%" PRIx64,
-            cfa_reg.GetName(), cfa_reg.GetAsKind(eRegisterKindLLDB),
-            cfa_reg_contents);
-        cfa_reg_contents = LLDB_INVALID_ADDRESS;
-        return false;
-      }
-      address = cfa_reg_contents + fa.GetOffset();
-      UnwindLogMsg(
-          "CFA is 0x%" PRIx64 ": Register %s (%d) contents are 0x%" PRIx64
-          ", offset is %d",
-          address, cfa_reg.GetName(), cfa_reg.GetAsKind(eRegisterKindLLDB),
-          cfa_reg_contents, fa.GetOffset());
-      return true;
-    }
-    break;
-  }
-  case UnwindPlan::Row::FAValue::isDWARFExpression: {
-    ExecutionContext exe_ctx(m_thread.shared_from_this());
-    Process *process = exe_ctx.GetProcessPtr();
-    DataExtractor dwarfdata(fa.GetDWARFExpressionBytes(),
-                            fa.GetDWARFExpressionLength(),
-                            process->GetByteOrder(),
-                            process->GetAddressByteSize());
-    ModuleSP opcode_ctx;
-    DWARFExpression dwarfexpr(opcode_ctx, dwarfdata, nullptr);
-    dwarfexpr.SetRegisterKind(row_register_kind);
-    Value result;
-    Status error;
-    if (dwarfexpr.Evaluate(&exe_ctx, this, 0, nullptr, nullptr, result,
-                           &error)) {
-      address = result.GetScalar().ULongLong();
-
-      UnwindLogMsg("CFA value set by DWARF expression is 0x%" PRIx64,
-                   address);
-      return true;
-    }
-    UnwindLogMsg("Failed to set CFA value via DWARF expression: %s",
-                 error.AsCString());
-    break;
-  }
-  case UnwindPlan::Row::FAValue::isRaSearch: {
-    Process &process = *m_thread.GetProcess();
-    lldb::addr_t return_address_hint = GetReturnAddressHint(fa.GetOffset());
-    if (return_address_hint == LLDB_INVALID_ADDRESS)
-      return false;
-    const unsigned max_iterations = 256;
-    for (unsigned i = 0; i < max_iterations; ++i) {
-      Status st;
-      lldb::addr_t candidate_addr =
-          return_address_hint + i * process.GetAddressByteSize();
-      lldb::addr_t candidate =
-          process.ReadPointerFromMemory(candidate_addr, st);
-      if (st.Fail()) {
-        UnwindLogMsg("Cannot read memory at 0x%" PRIx64 ": %s", candidate_addr,
-                     st.AsCString());
-        return false;
-      }
-      Address addr;
-      uint32_t permissions;
-      if (process.GetLoadAddressPermissions(candidate, permissions) &&
-          permissions & lldb::ePermissionsExecutable) {
-        address = candidate_addr;
-        UnwindLogMsg("Heuristically found CFA: 0x%" PRIx64, address);
-        return true;
-      }
-    }
-    UnwindLogMsg("No suitable CFA found");
-    break;
-  }
-  default:
-    return false;
-  }
-  return false;
-}
-
-lldb::addr_t RegisterContextLLDB::GetReturnAddressHint(int32_t plan_offset) {
-  addr_t hint;
-  if (!ReadGPRValue(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_SP, hint))
-    return LLDB_INVALID_ADDRESS;
-  if (!m_sym_ctx.module_sp || !m_sym_ctx.symbol)
-    return LLDB_INVALID_ADDRESS;
-
-  hint += plan_offset;
-
-  if (auto next = GetNextFrame()) {
-    if (!next->m_sym_ctx.module_sp || !next->m_sym_ctx.symbol)
-      return LLDB_INVALID_ADDRESS;
-    if (auto expected_size =
-            next->m_sym_ctx.module_sp->GetSymbolFile()->GetParameterStackSize(
-                *next->m_sym_ctx.symbol))
-      hint += *expected_size;
-    else {
-      UnwindLogMsgVerbose("Could not retrieve parameter size: %s",
-                          llvm::toString(expected_size.takeError()).c_str());
-      return LLDB_INVALID_ADDRESS;
-    }
-  }
-  return hint;
-}
-
-// Retrieve a general purpose register value for THIS frame, as saved by the
-// NEXT frame, i.e. the frame that
-// this frame called.  e.g.
-//
-//  foo () { }
-//  bar () { foo (); }
-//  main () { bar (); }
-//
-//  stopped in foo() so
-//     frame 0 - foo
-//     frame 1 - bar
-//     frame 2 - main
-//  and this RegisterContext is for frame 1 (bar) - if we want to get the pc
-//  value for frame 1, we need to ask
-//  where frame 0 (the "next" frame) saved that and retrieve the value.
-
-bool RegisterContextLLDB::ReadGPRValue(lldb::RegisterKind register_kind,
-                                       uint32_t regnum, addr_t &value) {
-  if (!IsValid())
-    return false;
-
-  uint32_t lldb_regnum;
-  if (register_kind == eRegisterKindLLDB) {
-    lldb_regnum = regnum;
-  } else if (!m_thread.GetRegisterContext()->ConvertBetweenRegisterKinds(
-                 register_kind, regnum, eRegisterKindLLDB, lldb_regnum)) {
-    return false;
-  }
-
-  const RegisterInfo *reg_info = GetRegisterInfoAtIndex(lldb_regnum);
-  RegisterValue reg_value;
-  // if this is frame 0 (currently executing frame), get the requested reg
-  // contents from the actual thread registers
-  if (IsFrameZero()) {
-    if (m_thread.GetRegisterContext()->ReadRegister(reg_info, reg_value)) {
-      value = reg_value.GetAsUInt64();
-      return true;
-    }
-    return false;
-  }
-
-  bool pc_register = false;
-  uint32_t generic_regnum;
-  if (register_kind == eRegisterKindGeneric &&
-      (regnum == LLDB_REGNUM_GENERIC_PC || regnum == LLDB_REGNUM_GENERIC_RA)) {
-    pc_register = true;
-  } else if (m_thread.GetRegisterContext()->ConvertBetweenRegisterKinds(
-                 register_kind, regnum, eRegisterKindGeneric, generic_regnum) &&
-             (generic_regnum == LLDB_REGNUM_GENERIC_PC ||
-              generic_regnum == LLDB_REGNUM_GENERIC_RA)) {
-    pc_register = true;
-  }
-
-  lldb_private::UnwindLLDB::RegisterLocation regloc;
-  if (!m_parent_unwind.SearchForSavedLocationForRegister(
-          lldb_regnum, regloc, m_frame_number - 1, pc_register)) {
-    return false;
-  }
-  if (ReadRegisterValueFromRegisterLocation(regloc, reg_info, reg_value)) {
-    value = reg_value.GetAsUInt64();
-    return true;
-  }
-  return false;
-}
-
-bool RegisterContextLLDB::ReadGPRValue(const RegisterNumber &regnum,
-                                       addr_t &value) {
-  return ReadGPRValue(regnum.GetRegisterKind(), regnum.GetRegisterNumber(),
-                      value);
-}
-
-// Find the value of a register in THIS frame
-
-bool RegisterContextLLDB::ReadRegister(const RegisterInfo *reg_info,
-                                       RegisterValue &value) {
-  if (!IsValid())
-    return false;
-
-  const uint32_t lldb_regnum = reg_info->kinds[eRegisterKindLLDB];
-  UnwindLogMsgVerbose("looking for register saved location for reg %d",
-                      lldb_regnum);
-
-  // If this is the 0th frame, hand this over to the live register context
-  if (IsFrameZero()) {
-    UnwindLogMsgVerbose("passing along to the live register context for reg %d",
-                        lldb_regnum);
-    return m_thread.GetRegisterContext()->ReadRegister(reg_info, value);
-  }
-
-  bool is_pc_regnum = false;
-  if (reg_info->kinds[eRegisterKindGeneric] == LLDB_REGNUM_GENERIC_PC ||
-      reg_info->kinds[eRegisterKindGeneric] == LLDB_REGNUM_GENERIC_RA) {
-    is_pc_regnum = true;
-  }
-
-  lldb_private::UnwindLLDB::RegisterLocation regloc;
-  // Find out where the NEXT frame saved THIS frame's register contents
-  if (!m_parent_unwind.SearchForSavedLocationForRegister(
-          lldb_regnum, regloc, m_frame_number - 1, is_pc_regnum))
-    return false;
-
-  return ReadRegisterValueFromRegisterLocation(regloc, reg_info, value);
-}
-
-bool RegisterContextLLDB::WriteRegister(const RegisterInfo *reg_info,
-                                        const RegisterValue &value) {
-  if (!IsValid())
-    return false;
-
-  const uint32_t lldb_regnum = reg_info->kinds[eRegisterKindLLDB];
-  UnwindLogMsgVerbose("looking for register saved location for reg %d",
-                      lldb_regnum);
-
-  // If this is the 0th frame, hand this over to the live register context
-  if (IsFrameZero()) {
-    UnwindLogMsgVerbose("passing along to the live register context for reg %d",
-                        lldb_regnum);
-    return m_thread.GetRegisterContext()->WriteRegister(reg_info, value);
-  }
-
-  lldb_private::UnwindLLDB::RegisterLocation regloc;
-  // Find out where the NEXT frame saved THIS frame's register contents
-  if (!m_parent_unwind.SearchForSavedLocationForRegister(
-          lldb_regnum, regloc, m_frame_number - 1, false))
-    return false;
-
-  return WriteRegisterValueToRegisterLocation(regloc, reg_info, value);
-}
-
-// Don't need to implement this one
-bool RegisterContextLLDB::ReadAllRegisterValues(lldb::DataBufferSP &data_sp) {
-  return false;
-}
-
-// Don't need to implement this one
-bool RegisterContextLLDB::WriteAllRegisterValues(
-    const lldb::DataBufferSP &data_sp) {
-  return false;
-}
-
-// Retrieve the pc value for THIS from
-
-bool RegisterContextLLDB::GetCFA(addr_t &cfa) {
-  if (!IsValid()) {
-    return false;
-  }
-  if (m_cfa == LLDB_INVALID_ADDRESS) {
-    return false;
-  }
-  cfa = m_cfa;
-  return true;
-}
-
-RegisterContextLLDB::SharedPtr RegisterContextLLDB::GetNextFrame() const {
-  RegisterContextLLDB::SharedPtr regctx;
-  if (m_frame_number == 0)
-    return regctx;
-  return m_parent_unwind.GetRegisterContextForFrameNum(m_frame_number - 1);
-}
-
-RegisterContextLLDB::SharedPtr RegisterContextLLDB::GetPrevFrame() const {
-  RegisterContextLLDB::SharedPtr regctx;
-  return m_parent_unwind.GetRegisterContextForFrameNum(m_frame_number + 1);
-}
-
-// Retrieve the address of the start of the function of THIS frame
-
-bool RegisterContextLLDB::GetStartPC(addr_t &start_pc) {
-  if (!IsValid())
-    return false;
-
-  if (!m_start_pc.IsValid()) {
-        bool read_successfully = ReadPC (start_pc);
-        if (read_successfully)
-        {
-            ProcessSP process_sp (m_thread.GetProcess());
-            if (process_sp)
-            {
-                ABI *abi = process_sp->GetABI().get();
-                if (abi)
-                    start_pc = abi->FixCodeAddress(start_pc);
-            }
-        }
-        return read_successfully;
-  }
-  start_pc = m_start_pc.GetLoadAddress(CalculateTarget().get());
-  return true;
-}
-
-// Retrieve the current pc value for THIS frame, as saved by the NEXT frame.
-
-bool RegisterContextLLDB::ReadPC(addr_t &pc) {
-  if (!IsValid())
-    return false;
-
-  bool above_trap_handler = false;
-  if (GetNextFrame().get() && GetNextFrame()->IsValid() &&
-      GetNextFrame()->IsTrapHandlerFrame())
-    above_trap_handler = true;
-
-  if (ReadGPRValue(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC, pc)) {
-    // A pc value of 0 or 1 is impossible in the middle of the stack -- it
-    // indicates the end of a stack walk.
-    // On the currently executing frame (or such a frame interrupted
-    // asynchronously by sigtramp et al) this may occur if code has jumped
-    // through a NULL pointer -- we want to be able to unwind past that frame
-    // to help find the bug.
-
-    ProcessSP process_sp (m_thread.GetProcess());
-    if (process_sp)
-    {
-        ABI *abi = process_sp->GetABI().get();
-        if (abi)
-            pc = abi->FixCodeAddress(pc);
-    }
-
-    return !(m_all_registers_available == false &&
-             above_trap_handler == false && (pc == 0 || pc == 1));
-  } else {
-    return false;
-  }
-}
-
-void RegisterContextLLDB::UnwindLogMsg(const char *fmt, ...) {
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_UNWIND));
-  if (log) {
-    va_list args;
-    va_start(args, fmt);
-
-    char *logmsg;
-    if (vasprintf(&logmsg, fmt, args) == -1 || logmsg == nullptr) {
-      if (logmsg)
-        free(logmsg);
-      va_end(args);
-      return;
-    }
-    va_end(args);
-
-    LLDB_LOGF(log, "%*sth%d/fr%u %s",
-              m_frame_number < 100 ? m_frame_number : 100, "",
-              m_thread.GetIndexID(), m_frame_number, logmsg);
-    free(logmsg);
-  }
-}
-
-void RegisterContextLLDB::UnwindLogMsgVerbose(const char *fmt, ...) {
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_UNWIND));
-  if (log && log->GetVerbose()) {
-    va_list args;
-    va_start(args, fmt);
-
-    char *logmsg;
-    if (vasprintf(&logmsg, fmt, args) == -1 || logmsg == nullptr) {
-      if (logmsg)
-        free(logmsg);
-      va_end(args);
-      return;
-    }
-    va_end(args);
-
-    LLDB_LOGF(log, "%*sth%d/fr%u %s",
-              m_frame_number < 100 ? m_frame_number : 100, "",
-              m_thread.GetIndexID(), m_frame_number, logmsg);
-    free(logmsg);
-  }
-}
diff --git a/gnu/llvm/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.h b/gnu/llvm/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.h
deleted file mode 100644 (file)
index 114ac35..0000000
+++ /dev/null
@@ -1,259 +0,0 @@
-//===-- RegisterContextLLDB.h --------------------------------------------*- C++
-//-*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef lldb_RegisterContextLLDB_h_
-#define lldb_RegisterContextLLDB_h_
-
-#include <vector>
-
-#include "UnwindLLDB.h"
-#include "lldb/Symbol/SymbolContext.h"
-#include "lldb/Symbol/UnwindPlan.h"
-#include "lldb/Target/RegisterContext.h"
-#include "lldb/Target/RegisterNumber.h"
-#include "lldb/lldb-private.h"
-
-namespace lldb_private {
-
-class UnwindLLDB;
-
-class RegisterContextLLDB : public lldb_private::RegisterContext {
-public:
-  typedef std::shared_ptr<RegisterContextLLDB> SharedPtr;
-
-  RegisterContextLLDB(lldb_private::Thread &thread, const SharedPtr &next_frame,
-                      lldb_private::SymbolContext &sym_ctx,
-                      uint32_t frame_number,
-                      lldb_private::UnwindLLDB &unwind_lldb);
-
-  ~RegisterContextLLDB() override = default;
-
-  void InvalidateAllRegisters() override;
-
-  size_t GetRegisterCount() override;
-
-  const lldb_private::RegisterInfo *GetRegisterInfoAtIndex(size_t reg) override;
-
-  size_t GetRegisterSetCount() override;
-
-  const lldb_private::RegisterSet *GetRegisterSet(size_t reg_set) override;
-
-  bool ReadRegister(const lldb_private::RegisterInfo *reg_info,
-                    lldb_private::RegisterValue &value) override;
-
-  bool WriteRegister(const lldb_private::RegisterInfo *reg_info,
-                     const lldb_private::RegisterValue &value) override;
-
-  bool ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
-
-  bool WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
-
-  uint32_t ConvertRegisterKindToRegisterNumber(lldb::RegisterKind kind,
-                                               uint32_t num) override;
-
-  bool IsValid() const;
-
-  bool IsTrapHandlerFrame() const;
-
-  bool GetCFA(lldb::addr_t &cfa);
-
-  bool GetStartPC(lldb::addr_t &start_pc);
-
-  bool ReadPC(lldb::addr_t &start_pc);
-
-private:
-  enum FrameType {
-    eNormalFrame,
-    eTrapHandlerFrame,
-    eDebuggerFrame, // a debugger inferior function call frame; we get caller's
-                    // registers from debugger
-    eSkipFrame,     // The unwind resulted in a bogus frame but may get back on
-                    // track so we don't want to give up yet
-    eNotAValidFrame // this frame is invalid for some reason - most likely it is
-                    // past the top (end) of the stack
-  };
-
-  // UnwindLLDB needs to pass around references to RegisterLocations
-  friend class UnwindLLDB;
-
-  // Returns true if we have an unwind loop -- the same stack frame unwinding
-  // multiple times.
-  bool CheckIfLoopingStack();
-
-  // Indicates whether this frame is frame zero -- the currently
-  // executing frame -- or not.
-  bool IsFrameZero() const;
-
-  void InitializeZerothFrame();
-
-  void InitializeNonZerothFrame();
-
-  SharedPtr GetNextFrame() const;
-
-  SharedPtr GetPrevFrame() const;
-
-  // A SkipFrame occurs when the unwind out of frame 0 didn't go right -- we've
-  // got one bogus frame at frame #1.
-  // There is a good chance we'll get back on track if we follow the frame
-  // pointer chain (or whatever is appropriate
-  // on this ABI) so we allow one invalid frame to be in the stack.  Ideally
-  // we'll mark this frame specially at some
-  // point and indicate to the user that the unwinder had a hiccup.  Often when
-  // this happens we will miss a frame of
-  // the program's actual stack in the unwind and we want to flag that for the
-  // user somehow.
-  bool IsSkipFrame() const;
-
-  /// Determines if a SymbolContext is a trap handler or not
-  ///
-  /// Given a SymbolContext, determines if this is a trap handler function
-  /// aka asynchronous signal handler.
-  ///
-  /// \return
-  ///     Returns true if the SymbolContext is a trap handler.
-  bool IsTrapHandlerSymbol(lldb_private::Process *process,
-                           const lldb_private::SymbolContext &m_sym_ctx) const;
-
-  /// Check if the given unwind plan indicates a signal trap handler, and
-  /// update frame type and symbol context if so.
-  void PropagateTrapHandlerFlagFromUnwindPlan(lldb::UnwindPlanSP unwind_plan);
-
-  // Provide a location for where THIS function saved the CALLER's register
-  // value
-  // Or a frame "below" this one saved it, i.e. a function called by this one,
-  // preserved a register that this
-  // function didn't modify/use.
-  //
-  // The RegisterLocation type may be set to eRegisterNotAvailable -- this will
-  // happen for a volatile register
-  // being queried mid-stack.  Instead of floating frame 0's contents of that
-  // register up the stack (which may
-  // or may not be the value of that reg when the function was executing), we
-  // won't return any value.
-  //
-  // If a non-volatile register (a "preserved" register) is requested mid-stack
-  // and no frames "below" the requested
-  // stack have saved the register anywhere, it is safe to assume that frame 0's
-  // register values are still the same
-  // as the requesting frame's.
-  lldb_private::UnwindLLDB::RegisterSearchResult
-  SavedLocationForRegister(uint32_t lldb_regnum,
-                           lldb_private::UnwindLLDB::RegisterLocation &regloc);
-
-  bool ReadRegisterValueFromRegisterLocation(
-      lldb_private::UnwindLLDB::RegisterLocation regloc,
-      const lldb_private::RegisterInfo *reg_info,
-      lldb_private::RegisterValue &value);
-
-  bool WriteRegisterValueToRegisterLocation(
-      lldb_private::UnwindLLDB::RegisterLocation regloc,
-      const lldb_private::RegisterInfo *reg_info,
-      const lldb_private::RegisterValue &value);
-
-  /// If the unwind has to the caller frame has failed, try something else
-  ///
-  /// If lldb is using an assembly language based UnwindPlan for a frame and
-  /// the unwind to the caller frame fails, try falling back to a generic
-  /// UnwindPlan (architecture default unwindplan) to see if that might work
-  /// better.  This is mostly helping to work around problems where the
-  /// assembly language inspection fails on hand-written assembly code.
-  ///
-  /// \return
-  ///     Returns true if a fallback unwindplan was found & was installed.
-  bool TryFallbackUnwindPlan();
-
-  /// Switch to the fallback unwind plan unconditionally without any safety
-  /// checks that it is providing better results than the normal unwind plan.
-  ///
-  /// The only time it is valid to call this method is if the full unwindplan is
-  /// found to be fundamentally incorrect/impossible.
-  ///
-  /// Returns true if it was able to install the fallback unwind plan.
-  bool ForceSwitchToFallbackUnwindPlan();
-
-  // Get the contents of a general purpose (address-size) register for this
-  // frame
-  // (usually retrieved from the next frame)
-  bool ReadGPRValue(lldb::RegisterKind register_kind, uint32_t regnum,
-                    lldb::addr_t &value);
-
-  bool ReadGPRValue(const RegisterNumber &reg_num, lldb::addr_t &value);
-
-  // Get the Frame Address register for a given frame.
-  bool ReadFrameAddress(lldb::RegisterKind register_kind,
-                          UnwindPlan::Row::FAValue &fa, lldb::addr_t &address);
-
-  lldb::UnwindPlanSP GetFastUnwindPlanForFrame();
-
-  lldb::UnwindPlanSP GetFullUnwindPlanForFrame();
-
-  void UnwindLogMsg(const char *fmt, ...) __attribute__((format(printf, 2, 3)));
-
-  void UnwindLogMsgVerbose(const char *fmt, ...)
-      __attribute__((format(printf, 2, 3)));
-
-  bool IsUnwindPlanValidForCurrentPC(lldb::UnwindPlanSP unwind_plan_sp,
-                                     int &valid_pc_offset);
-
-  lldb::addr_t GetReturnAddressHint(int32_t plan_offset);
-
-  lldb_private::Thread &m_thread;
-
-  ///
-  // The following tell us how to retrieve the CALLER's register values (ie the
-  // "previous" frame, aka the frame above)
-  // i.e. where THIS frame saved them
-  ///
-
-  lldb::UnwindPlanSP m_fast_unwind_plan_sp; // may be NULL
-  lldb::UnwindPlanSP m_full_unwind_plan_sp;
-  lldb::UnwindPlanSP m_fallback_unwind_plan_sp; // may be NULL
-
-  bool m_all_registers_available; // Can we retrieve all regs or just
-                                  // nonvolatile regs?
-  int m_frame_type;               // enum FrameType
-
-  lldb::addr_t m_cfa;
-  lldb::addr_t m_afa;
-  lldb_private::Address m_start_pc;
-  lldb_private::Address m_current_pc;
-
-  int m_current_offset; // how far into the function we've executed; -1 if
-                        // unknown
-                        // 0 if no instructions have been executed yet.
-
-  int m_current_offset_backed_up_one; // how far into the function we've
-                                      // executed; -1 if unknown
-  // 0 if no instructions have been executed yet.
-  // On architectures where the return address on the stack points
-  // to the instruction after the CALL, this value will have 1
-  // subtracted from it.  Else a function that ends in a CALL will
-  // have an offset pointing into the next function's address range.
-  // m_current_pc has the actual address of the "current" pc.
-
-  lldb_private::SymbolContext &m_sym_ctx;
-  bool m_sym_ctx_valid; // if ResolveSymbolContextForAddress fails, don't try to
-                        // use m_sym_ctx
-
-  uint32_t m_frame_number; // What stack frame this RegisterContext is
-
-  std::map<uint32_t, lldb_private::UnwindLLDB::RegisterLocation>
-      m_registers; // where to find reg values for this frame
-
-  lldb_private::UnwindLLDB &m_parent_unwind; // The UnwindLLDB that is creating
-                                             // this RegisterContextLLDB
-
-  // For RegisterContextLLDB only
-
-  DISALLOW_COPY_AND_ASSIGN(RegisterContextLLDB);
-};
-
-} // namespace lldb_private
-
-#endif // lldb_RegisterContextLLDB_h_
diff --git a/gnu/llvm/lldb/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.cpp b/gnu/llvm/lldb/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.cpp
deleted file mode 100644 (file)
index bc78c1d..0000000
+++ /dev/null
@@ -1,160 +0,0 @@
-//===-- RegisterContextMacOSXFrameBackchain.cpp -----------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "RegisterContextMacOSXFrameBackchain.h"
-
-#include "lldb/Target/Thread.h"
-#include "lldb/Utility/DataBufferHeap.h"
-#include "lldb/Utility/DataExtractor.h"
-#include "lldb/Utility/RegisterValue.h"
-#include "lldb/Utility/Scalar.h"
-#include "lldb/Utility/StreamString.h"
-#include "lldb/Utility/StringExtractorGDBRemote.h"
-
-using namespace lldb;
-using namespace lldb_private;
-
-// RegisterContextMacOSXFrameBackchain constructor
-RegisterContextMacOSXFrameBackchain::RegisterContextMacOSXFrameBackchain(
-    Thread &thread, uint32_t concrete_frame_idx,
-    const UnwindMacOSXFrameBackchain::Cursor &cursor)
-    : RegisterContext(thread, concrete_frame_idx), m_cursor(cursor),
-      m_cursor_is_valid(true) {}
-
-// Destructor
-RegisterContextMacOSXFrameBackchain::~RegisterContextMacOSXFrameBackchain() {}
-
-void RegisterContextMacOSXFrameBackchain::InvalidateAllRegisters() {
-  m_cursor_is_valid = false;
-}
-
-size_t RegisterContextMacOSXFrameBackchain::GetRegisterCount() {
-  return m_thread.GetRegisterContext()->GetRegisterCount();
-}
-
-const RegisterInfo *
-RegisterContextMacOSXFrameBackchain::GetRegisterInfoAtIndex(size_t reg) {
-  return m_thread.GetRegisterContext()->GetRegisterInfoAtIndex(reg);
-}
-
-size_t RegisterContextMacOSXFrameBackchain::GetRegisterSetCount() {
-  return m_thread.GetRegisterContext()->GetRegisterSetCount();
-}
-
-const RegisterSet *
-RegisterContextMacOSXFrameBackchain::GetRegisterSet(size_t reg_set) {
-  return m_thread.GetRegisterContext()->GetRegisterSet(reg_set);
-}
-
-bool RegisterContextMacOSXFrameBackchain::ReadRegister(
-    const RegisterInfo *reg_info, RegisterValue &value) {
-  if (!m_cursor_is_valid)
-    return false;
-
-  uint64_t reg_value = LLDB_INVALID_ADDRESS;
-
-  switch (reg_info->kinds[eRegisterKindGeneric]) {
-  case LLDB_REGNUM_GENERIC_PC:
-    if (m_cursor.pc == LLDB_INVALID_ADDRESS)
-      return false;
-    reg_value = m_cursor.pc;
-    break;
-
-  case LLDB_REGNUM_GENERIC_FP:
-    if (m_cursor.fp == LLDB_INVALID_ADDRESS)
-      return false;
-    reg_value = m_cursor.fp;
-    break;
-
-  default:
-    return false;
-  }
-
-  switch (reg_info->encoding) {
-  case eEncodingInvalid:
-  case eEncodingVector:
-    break;
-
-  case eEncodingUint:
-  case eEncodingSint:
-    value.SetUInt(reg_value, reg_info->byte_size);
-    return true;
-
-  case eEncodingIEEE754:
-    switch (reg_info->byte_size) {
-    case sizeof(float):
-      if (sizeof(float) == sizeof(uint32_t)) {
-        value.SetUInt32(reg_value, RegisterValue::eTypeFloat);
-        return true;
-      } else if (sizeof(float) == sizeof(uint64_t)) {
-        value.SetUInt64(reg_value, RegisterValue::eTypeFloat);
-        return true;
-      }
-      break;
-
-    case sizeof(double):
-      if (sizeof(double) == sizeof(uint32_t)) {
-        value.SetUInt32(reg_value, RegisterValue::eTypeDouble);
-        return true;
-      } else if (sizeof(double) == sizeof(uint64_t)) {
-        value.SetUInt64(reg_value, RegisterValue::eTypeDouble);
-        return true;
-      }
-      break;
-
-// TOOD: need a better way to detect when "long double" types are
-// the same bytes size as "double"
-#if !defined(__arm__) && !defined(__arm64__) && !defined(__aarch64__) &&       \
-    !defined(_MSC_VER) && !defined(__mips__) && !defined(__powerpc__) &&       \
-    !defined(__ANDROID__)
-    case sizeof(long double):
-      if (sizeof(long double) == sizeof(uint32_t)) {
-        value.SetUInt32(reg_value, RegisterValue::eTypeLongDouble);
-        return true;
-      } else if (sizeof(long double) == sizeof(uint64_t)) {
-        value.SetUInt64(reg_value, RegisterValue::eTypeLongDouble);
-        return true;
-      }
-      break;
-#endif
-    }
-    break;
-  }
-  return false;
-}
-
-bool RegisterContextMacOSXFrameBackchain::WriteRegister(
-    const RegisterInfo *reg_info, const RegisterValue &value) {
-  // Not supported yet. We could easily add support for this by remembering the
-  // address of each entry (it would need to be part of the cursor)
-  return false;
-}
-
-bool RegisterContextMacOSXFrameBackchain::ReadAllRegisterValues(
-    lldb::DataBufferSP &data_sp) {
-  // libunwind frames can't handle this it doesn't always have all register
-  // values. This call should only be called on frame zero anyway so there
-  // shouldn't be any problem
-  return false;
-}
-
-bool RegisterContextMacOSXFrameBackchain::WriteAllRegisterValues(
-    const lldb::DataBufferSP &data_sp) {
-  // Since this class doesn't respond to "ReadAllRegisterValues()", it must not
-  // have been the one that saved all the register values. So we just let the
-  // thread's register context (the register context for frame zero) do the
-  // writing.
-  return m_thread.GetRegisterContext()->WriteAllRegisterValues(data_sp);
-}
-
-uint32_t
-RegisterContextMacOSXFrameBackchain::ConvertRegisterKindToRegisterNumber(
-    lldb::RegisterKind kind, uint32_t num) {
-  return m_thread.GetRegisterContext()->ConvertRegisterKindToRegisterNumber(
-      kind, num);
-}
diff --git a/gnu/llvm/lldb/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.h b/gnu/llvm/lldb/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.h
deleted file mode 100644 (file)
index 36e5538..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-//===-- RegisterContextMacOSXFrameBackchain.h -------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef lldb_RegisterContextMacOSXFrameBackchain_h_
-#define lldb_RegisterContextMacOSXFrameBackchain_h_
-
-#include "lldb/Target/RegisterContext.h"
-#include "lldb/lldb-private.h"
-
-#include "UnwindMacOSXFrameBackchain.h"
-
-class RegisterContextMacOSXFrameBackchain
-    : public lldb_private::RegisterContext {
-public:
-  RegisterContextMacOSXFrameBackchain(
-      lldb_private::Thread &thread, uint32_t concrete_frame_idx,
-      const UnwindMacOSXFrameBackchain::Cursor &cursor);
-
-  ~RegisterContextMacOSXFrameBackchain() override;
-
-  void InvalidateAllRegisters() override;
-
-  size_t GetRegisterCount() override;
-
-  const lldb_private::RegisterInfo *GetRegisterInfoAtIndex(size_t reg) override;
-
-  size_t GetRegisterSetCount() override;
-
-  const lldb_private::RegisterSet *GetRegisterSet(size_t reg_set) override;
-
-  bool ReadRegister(const lldb_private::RegisterInfo *reg_info,
-                    lldb_private::RegisterValue &value) override;
-
-  bool WriteRegister(const lldb_private::RegisterInfo *reg_info,
-                     const lldb_private::RegisterValue &value) override;
-
-  bool ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
-
-  bool WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
-
-  uint32_t ConvertRegisterKindToRegisterNumber(lldb::RegisterKind kind,
-                                               uint32_t num) override;
-
-private:
-  UnwindMacOSXFrameBackchain::Cursor m_cursor;
-  bool m_cursor_is_valid;
-
-  DISALLOW_COPY_AND_ASSIGN(RegisterContextMacOSXFrameBackchain);
-};
-
-#endif // lldb_RegisterContextMacOSXFrameBackchain_h_
diff --git a/gnu/llvm/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp b/gnu/llvm/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp
deleted file mode 100644 (file)
index 74fc90e..0000000
+++ /dev/null
@@ -1,519 +0,0 @@
-//===-- UnwindLLDB.cpp -------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "lldb/Core/Module.h"
-#include "lldb/Symbol/FuncUnwinders.h"
-#include "lldb/Symbol/Function.h"
-#include "lldb/Symbol/UnwindPlan.h"
-#include "lldb/Target/ABI.h"
-#include "lldb/Target/Process.h"
-#include "lldb/Target/RegisterContext.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Target/Thread.h"
-#include "lldb/Utility/Log.h"
-
-#include "RegisterContextLLDB.h"
-#include "UnwindLLDB.h"
-
-using namespace lldb;
-using namespace lldb_private;
-
-UnwindLLDB::UnwindLLDB(Thread &thread)
-    : Unwind(thread), m_frames(), m_unwind_complete(false),
-      m_user_supplied_trap_handler_functions() {
-  ProcessSP process_sp(thread.GetProcess());
-  if (process_sp) {
-    Args args;
-    process_sp->GetTarget().GetUserSpecifiedTrapHandlerNames(args);
-    size_t count = args.GetArgumentCount();
-    for (size_t i = 0; i < count; i++) {
-      const char *func_name = args.GetArgumentAtIndex(i);
-      m_user_supplied_trap_handler_functions.push_back(ConstString(func_name));
-    }
-  }
-}
-
-uint32_t UnwindLLDB::DoGetFrameCount() {
-  if (!m_unwind_complete) {
-//#define DEBUG_FRAME_SPEED 1
-#if DEBUG_FRAME_SPEED
-#define FRAME_COUNT 10000
-    using namespace std::chrono;
-    auto time_value = steady_clock::now();
-#endif
-    if (!AddFirstFrame())
-      return 0;
-
-    ProcessSP process_sp(m_thread.GetProcess());
-    ABI *abi = process_sp ? process_sp->GetABI().get() : nullptr;
-
-    while (AddOneMoreFrame(abi)) {
-#if DEBUG_FRAME_SPEED
-      if ((m_frames.size() % FRAME_COUNT) == 0) {
-        const auto now = steady_clock::now();
-        const auto delta_t = now - time_value;
-        printf("%u frames in %.9f ms (%g frames/sec)\n", FRAME_COUNT,
-               duration<double, std::milli>(delta_t).count(),
-               (float)FRAME_COUNT / duration<double>(delta_t).count());
-        time_value = now;
-      }
-#endif
-    }
-  }
-  return m_frames.size();
-}
-
-bool UnwindLLDB::AddFirstFrame() {
-  if (m_frames.size() > 0)
-    return true;
-
-  ProcessSP process_sp(m_thread.GetProcess());
-  ABI *abi = process_sp ? process_sp->GetABI().get() : nullptr;
-
-  // First, set up the 0th (initial) frame
-  CursorSP first_cursor_sp(new Cursor());
-  RegisterContextLLDBSP reg_ctx_sp(new RegisterContextLLDB(
-      m_thread, RegisterContextLLDBSP(), first_cursor_sp->sctx, 0, *this));
-  if (reg_ctx_sp.get() == nullptr)
-    goto unwind_done;
-
-  if (!reg_ctx_sp->IsValid())
-    goto unwind_done;
-
-  if (!reg_ctx_sp->GetCFA(first_cursor_sp->cfa))
-    goto unwind_done;
-
-  if (!reg_ctx_sp->ReadPC(first_cursor_sp->start_pc))
-    goto unwind_done;
-
-  // Everything checks out, so release the auto pointer value and let the
-  // cursor own it in its shared pointer
-  first_cursor_sp->reg_ctx_lldb_sp = reg_ctx_sp;
-  m_frames.push_back(first_cursor_sp);
-
-  // Update the Full Unwind Plan for this frame if not valid
-  UpdateUnwindPlanForFirstFrameIfInvalid(abi);
-
-  return true;
-
-unwind_done:
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_UNWIND));
-  if (log) {
-    LLDB_LOGF(log, "th%d Unwind of this thread is complete.",
-              m_thread.GetIndexID());
-  }
-  m_unwind_complete = true;
-  return false;
-}
-
-UnwindLLDB::CursorSP UnwindLLDB::GetOneMoreFrame(ABI *abi) {
-  assert(m_frames.size() != 0 &&
-         "Get one more frame called with empty frame list");
-
-  // If we've already gotten to the end of the stack, don't bother to try
-  // again...
-  if (m_unwind_complete)
-    return nullptr;
-
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_UNWIND));
-
-  CursorSP prev_frame = m_frames.back();
-  uint32_t cur_idx = m_frames.size();
-
-  CursorSP cursor_sp(new Cursor());
-  RegisterContextLLDBSP reg_ctx_sp(new RegisterContextLLDB(
-      m_thread, prev_frame->reg_ctx_lldb_sp, cursor_sp->sctx, cur_idx, *this));
-
-  uint64_t max_stack_depth = m_thread.GetMaxBacktraceDepth();
-
-  // We want to detect an unwind that cycles erroneously and stop backtracing.
-  // Don't want this maximum unwind limit to be too low -- if you have a
-  // backtrace with an "infinitely recursing" bug, it will crash when the stack
-  // blows out and the first 35,000 frames are uninteresting - it's the top
-  // most 5 frames that you actually care about.  So you can't just cap the
-  // unwind at 10,000 or something. Realistically anything over around 200,000
-  // is going to blow out the stack space. If we're still unwinding at that
-  // point, we're probably never going to finish.
-  if (cur_idx >= max_stack_depth) {
-    LLDB_LOGF(log,
-              "%*sFrame %d unwound too many frames, assuming unwind has "
-              "gone astray, stopping.",
-              cur_idx < 100 ? cur_idx : 100, "", cur_idx);
-    return nullptr;
-  }
-
-  if (reg_ctx_sp.get() == nullptr) {
-    // If the RegisterContextLLDB has a fallback UnwindPlan, it will switch to
-    // that and return true.  Subsequent calls to TryFallbackUnwindPlan() will
-    // return false.
-    if (prev_frame->reg_ctx_lldb_sp->TryFallbackUnwindPlan()) {
-      // TryFallbackUnwindPlan for prev_frame succeeded and updated
-      // reg_ctx_lldb_sp field of prev_frame. However, cfa field of prev_frame
-      // still needs to be updated. Hence updating it.
-      if (!(prev_frame->reg_ctx_lldb_sp->GetCFA(prev_frame->cfa)))
-        return nullptr;
-
-      return GetOneMoreFrame(abi);
-    }
-
-    LLDB_LOGF(log, "%*sFrame %d did not get a RegisterContext, stopping.",
-              cur_idx < 100 ? cur_idx : 100, "", cur_idx);
-    return nullptr;
-  }
-
-  if (!reg_ctx_sp->IsValid()) {
-    // We failed to get a valid RegisterContext. See if the regctx below this
-    // on the stack has a fallback unwind plan it can use. Subsequent calls to
-    // TryFallbackUnwindPlan() will return false.
-    if (prev_frame->reg_ctx_lldb_sp->TryFallbackUnwindPlan()) {
-      // TryFallbackUnwindPlan for prev_frame succeeded and updated
-      // reg_ctx_lldb_sp field of prev_frame. However, cfa field of prev_frame
-      // still needs to be updated. Hence updating it.
-      if (!(prev_frame->reg_ctx_lldb_sp->GetCFA(prev_frame->cfa)))
-        return nullptr;
-
-      return GetOneMoreFrame(abi);
-    }
-
-    LLDB_LOGF(log,
-              "%*sFrame %d invalid RegisterContext for this frame, "
-              "stopping stack walk",
-              cur_idx < 100 ? cur_idx : 100, "", cur_idx);
-    return nullptr;
-  }
-  if (!reg_ctx_sp->GetCFA(cursor_sp->cfa)) {
-    // If the RegisterContextLLDB has a fallback UnwindPlan, it will switch to
-    // that and return true.  Subsequent calls to TryFallbackUnwindPlan() will
-    // return false.
-    if (prev_frame->reg_ctx_lldb_sp->TryFallbackUnwindPlan()) {
-      // TryFallbackUnwindPlan for prev_frame succeeded and updated
-      // reg_ctx_lldb_sp field of prev_frame. However, cfa field of prev_frame
-      // still needs to be updated. Hence updating it.
-      if (!(prev_frame->reg_ctx_lldb_sp->GetCFA(prev_frame->cfa)))
-        return nullptr;
-
-      return GetOneMoreFrame(abi);
-    }
-
-    LLDB_LOGF(log,
-              "%*sFrame %d did not get CFA for this frame, stopping stack walk",
-              cur_idx < 100 ? cur_idx : 100, "", cur_idx);
-    return nullptr;
-  }
-  if (abi && !abi->CallFrameAddressIsValid(cursor_sp->cfa)) {
-    // On Mac OS X, the _sigtramp asynchronous signal trampoline frame may not
-    // have its (constructed) CFA aligned correctly -- don't do the abi
-    // alignment check for these.
-    if (!reg_ctx_sp->IsTrapHandlerFrame()) {
-      // See if we can find a fallback unwind plan for THIS frame.  It may be
-      // that the UnwindPlan we're using for THIS frame was bad and gave us a
-      // bad CFA. If that's not it, then see if we can change the UnwindPlan
-      // for the frame below us ("NEXT") -- see if using that other UnwindPlan
-      // gets us a better unwind state.
-      if (!reg_ctx_sp->TryFallbackUnwindPlan() ||
-          !reg_ctx_sp->GetCFA(cursor_sp->cfa) ||
-          !abi->CallFrameAddressIsValid(cursor_sp->cfa)) {
-        if (prev_frame->reg_ctx_lldb_sp->TryFallbackUnwindPlan()) {
-          // TryFallbackUnwindPlan for prev_frame succeeded and updated
-          // reg_ctx_lldb_sp field of prev_frame. However, cfa field of
-          // prev_frame still needs to be updated. Hence updating it.
-          if (!(prev_frame->reg_ctx_lldb_sp->GetCFA(prev_frame->cfa)))
-            return nullptr;
-
-          return GetOneMoreFrame(abi);
-        }
-
-        LLDB_LOGF(log,
-                  "%*sFrame %d did not get a valid CFA for this frame, "
-                  "stopping stack walk",
-                  cur_idx < 100 ? cur_idx : 100, "", cur_idx);
-        return nullptr;
-      } else {
-        LLDB_LOGF(log,
-                  "%*sFrame %d had a bad CFA value but we switched the "
-                  "UnwindPlan being used and got one that looks more "
-                  "realistic.",
-                  cur_idx < 100 ? cur_idx : 100, "", cur_idx);
-      }
-    }
-  }
-  if (!reg_ctx_sp->ReadPC(cursor_sp->start_pc)) {
-    // If the RegisterContextLLDB has a fallback UnwindPlan, it will switch to
-    // that and return true.  Subsequent calls to TryFallbackUnwindPlan() will
-    // return false.
-    if (prev_frame->reg_ctx_lldb_sp->TryFallbackUnwindPlan()) {
-      // TryFallbackUnwindPlan for prev_frame succeeded and updated
-      // reg_ctx_lldb_sp field of prev_frame. However, cfa field of prev_frame
-      // still needs to be updated. Hence updating it.
-      if (!(prev_frame->reg_ctx_lldb_sp->GetCFA(prev_frame->cfa)))
-        return nullptr;
-
-      return GetOneMoreFrame(abi);
-    }
-
-    LLDB_LOGF(log,
-              "%*sFrame %d did not get PC for this frame, stopping stack walk",
-              cur_idx < 100 ? cur_idx : 100, "", cur_idx);
-    return nullptr;
-  }
-  if (abi && !abi->CodeAddressIsValid(cursor_sp->start_pc)) {
-    // If the RegisterContextLLDB has a fallback UnwindPlan, it will switch to
-    // that and return true.  Subsequent calls to TryFallbackUnwindPlan() will
-    // return false.
-    if (prev_frame->reg_ctx_lldb_sp->TryFallbackUnwindPlan()) {
-      // TryFallbackUnwindPlan for prev_frame succeeded and updated
-      // reg_ctx_lldb_sp field of prev_frame. However, cfa field of prev_frame
-      // still needs to be updated. Hence updating it.
-      if (!(prev_frame->reg_ctx_lldb_sp->GetCFA(prev_frame->cfa)))
-        return nullptr;
-
-      return GetOneMoreFrame(abi);
-    }
-
-    LLDB_LOGF(log, "%*sFrame %d did not get a valid PC, stopping stack walk",
-              cur_idx < 100 ? cur_idx : 100, "", cur_idx);
-    return nullptr;
-  }
-  // Infinite loop where the current cursor is the same as the previous one...
-  if (prev_frame->start_pc == cursor_sp->start_pc &&
-      prev_frame->cfa == cursor_sp->cfa) {
-    LLDB_LOGF(log,
-              "th%d pc of this frame is the same as the previous frame and "
-              "CFAs for both frames are identical -- stopping unwind",
-              m_thread.GetIndexID());
-    return nullptr;
-  }
-
-  cursor_sp->reg_ctx_lldb_sp = reg_ctx_sp;
-  return cursor_sp;
-}
-
-void UnwindLLDB::UpdateUnwindPlanForFirstFrameIfInvalid(ABI *abi) {
-  // This function is called for First Frame only.
-  assert(m_frames.size() == 1 && "No. of cursor frames are not 1");
-
-  bool old_m_unwind_complete = m_unwind_complete;
-  CursorSP old_m_candidate_frame = m_candidate_frame;
-
-  // Try to unwind 2 more frames using the Unwinder. It uses Full UnwindPlan
-  // and if Full UnwindPlan fails, then uses FallBack UnwindPlan. Also update
-  // the cfa of Frame 0 (if required).
-  AddOneMoreFrame(abi);
-
-  // Remove all the frames added by above function as the purpose of using
-  // above function was just to check whether Unwinder of Frame 0 works or not.
-  for (uint32_t i = 1; i < m_frames.size(); i++)
-    m_frames.pop_back();
-
-  // Restore status after calling AddOneMoreFrame
-  m_unwind_complete = old_m_unwind_complete;
-  m_candidate_frame = old_m_candidate_frame;
-  return;
-}
-
-bool UnwindLLDB::AddOneMoreFrame(ABI *abi) {
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_UNWIND));
-
-  // Frame zero is a little different
-  if (m_frames.empty())
-    return false;
-
-  // If we've already gotten to the end of the stack, don't bother to try
-  // again...
-  if (m_unwind_complete)
-    return false;
-
-  CursorSP new_frame = m_candidate_frame;
-  if (new_frame == nullptr)
-    new_frame = GetOneMoreFrame(abi);
-
-  if (new_frame == nullptr) {
-    LLDB_LOGF(log, "th%d Unwind of this thread is complete.",
-              m_thread.GetIndexID());
-    m_unwind_complete = true;
-    return false;
-  }
-
-  m_frames.push_back(new_frame);
-
-  // If we can get one more frame further then accept that we get back a
-  // correct frame.
-  m_candidate_frame = GetOneMoreFrame(abi);
-  if (m_candidate_frame)
-    return true;
-
-  // We can't go further from the frame returned by GetOneMore frame. Lets try
-  // to get a different frame with using the fallback unwind plan.
-  if (!m_frames[m_frames.size() - 2]
-           ->reg_ctx_lldb_sp->TryFallbackUnwindPlan()) {
-    // We don't have a valid fallback unwind plan. Accept the frame as it is.
-    // This is a valid situation when we are at the bottom of the stack.
-    return true;
-  }
-
-  // Remove the possibly incorrect frame from the frame list and try to add a
-  // different one with the newly selected fallback unwind plan.
-  m_frames.pop_back();
-  CursorSP new_frame_v2 = GetOneMoreFrame(abi);
-  if (new_frame_v2 == nullptr) {
-    // We haven't got a new frame from the fallback unwind plan. Accept the
-    // frame from the original unwind plan. This is a valid situation when we
-    // are at the bottom of the stack.
-    m_frames.push_back(new_frame);
-    return true;
-  }
-
-  // Push the new frame to the list and try to continue from this frame. If we
-  // can get a new frame then accept it as the correct one.
-  m_frames.push_back(new_frame_v2);
-  m_candidate_frame = GetOneMoreFrame(abi);
-  if (m_candidate_frame) {
-    // If control reached here then TryFallbackUnwindPlan had succeeded for
-    // Cursor::m_frames[m_frames.size() - 2]. It also succeeded to Unwind next
-    // 2 frames i.e. m_frames[m_frames.size() - 1] and a frame after that. For
-    // Cursor::m_frames[m_frames.size() - 2], reg_ctx_lldb_sp field was already
-    // updated during TryFallbackUnwindPlan call above. However, cfa field
-    // still needs to be updated. Hence updating it here and then returning.
-    return m_frames[m_frames.size() - 2]->reg_ctx_lldb_sp->GetCFA(
-        m_frames[m_frames.size() - 2]->cfa);
-  }
-
-  // The new frame hasn't helped in unwinding. Fall back to the original one as
-  // the default unwind plan is usually more reliable then the fallback one.
-  m_frames.pop_back();
-  m_frames.push_back(new_frame);
-  return true;
-}
-
-bool UnwindLLDB::DoGetFrameInfoAtIndex(uint32_t idx, addr_t &cfa, addr_t &pc,
-                                       bool &behaves_like_zeroth_frame) {
-  if (m_frames.size() == 0) {
-    if (!AddFirstFrame())
-      return false;
-  }
-
-  ProcessSP process_sp(m_thread.GetProcess());
-  ABI *abi = process_sp ? process_sp->GetABI().get() : nullptr;
-
-  while (idx >= m_frames.size() && AddOneMoreFrame(abi))
-    ;
-
-  if (idx < m_frames.size()) {
-    cfa = m_frames[idx]->cfa;
-    pc = m_frames[idx]->start_pc;
-    if (idx == 0) {
-      // Frame zero always behaves like it.
-      behaves_like_zeroth_frame = true;
-    } else if (m_frames[idx - 1]->reg_ctx_lldb_sp->IsTrapHandlerFrame()) {
-      // This could be an asynchronous signal, thus the
-      // pc might point to the interrupted instruction rather
-      // than a post-call instruction
-      behaves_like_zeroth_frame = true;
-    } else if (m_frames[idx]->reg_ctx_lldb_sp->IsTrapHandlerFrame()) {
-      // This frame may result from signal processing installing
-      // a pointer to the first byte of a signal-return trampoline
-      // in the return address slot of the frame below, so this
-      // too behaves like the zeroth frame (i.e. the pc might not
-      // be pointing just past a call in it)
-      behaves_like_zeroth_frame = true;
-    } else {
-      behaves_like_zeroth_frame = false;
-    }
-    return true;
-  }
-  return false;
-}
-
-lldb::RegisterContextSP
-UnwindLLDB::DoCreateRegisterContextForFrame(StackFrame *frame) {
-  lldb::RegisterContextSP reg_ctx_sp;
-  uint32_t idx = frame->GetConcreteFrameIndex();
-
-  if (idx == 0) {
-    return m_thread.GetRegisterContext();
-  }
-
-  if (m_frames.size() == 0) {
-    if (!AddFirstFrame())
-      return reg_ctx_sp;
-  }
-
-  ProcessSP process_sp(m_thread.GetProcess());
-  ABI *abi = process_sp ? process_sp->GetABI().get() : nullptr;
-
-  while (idx >= m_frames.size()) {
-    if (!AddOneMoreFrame(abi))
-      break;
-  }
-
-  const uint32_t num_frames = m_frames.size();
-  if (idx < num_frames) {
-    Cursor *frame_cursor = m_frames[idx].get();
-    reg_ctx_sp = frame_cursor->reg_ctx_lldb_sp;
-  }
-  return reg_ctx_sp;
-}
-
-UnwindLLDB::RegisterContextLLDBSP
-UnwindLLDB::GetRegisterContextForFrameNum(uint32_t frame_num) {
-  RegisterContextLLDBSP reg_ctx_sp;
-  if (frame_num < m_frames.size())
-    reg_ctx_sp = m_frames[frame_num]->reg_ctx_lldb_sp;
-  return reg_ctx_sp;
-}
-
-bool UnwindLLDB::SearchForSavedLocationForRegister(
-    uint32_t lldb_regnum, lldb_private::UnwindLLDB::RegisterLocation &regloc,
-    uint32_t starting_frame_num, bool pc_reg) {
-  int64_t frame_num = starting_frame_num;
-  if (static_cast<size_t>(frame_num) >= m_frames.size())
-    return false;
-
-  // Never interrogate more than one level while looking for the saved pc
-  // value. If the value isn't saved by frame_num, none of the frames lower on
-  // the stack will have a useful value.
-  if (pc_reg) {
-    UnwindLLDB::RegisterSearchResult result;
-    result = m_frames[frame_num]->reg_ctx_lldb_sp->SavedLocationForRegister(
-        lldb_regnum, regloc);
-    return result == UnwindLLDB::RegisterSearchResult::eRegisterFound;
-  }
-  while (frame_num >= 0) {
-    UnwindLLDB::RegisterSearchResult result;
-    result = m_frames[frame_num]->reg_ctx_lldb_sp->SavedLocationForRegister(
-        lldb_regnum, regloc);
-
-    // We descended down to the live register context aka stack frame 0 and are
-    // reading the value out of a live register.
-    if (result == UnwindLLDB::RegisterSearchResult::eRegisterFound &&
-        regloc.type ==
-            UnwindLLDB::RegisterLocation::eRegisterInLiveRegisterContext) {
-      return true;
-    }
-
-    // If we have unwind instructions saying that register N is saved in
-    // register M in the middle of the stack (and N can equal M here, meaning
-    // the register was not used in this function), then change the register
-    // number we're looking for to M and keep looking for a concrete  location
-    // down the stack, or an actual value from a live RegisterContext at frame
-    // 0.
-    if (result == UnwindLLDB::RegisterSearchResult::eRegisterFound &&
-        regloc.type == UnwindLLDB::RegisterLocation::eRegisterInRegister &&
-        frame_num > 0) {
-      result = UnwindLLDB::RegisterSearchResult::eRegisterNotFound;
-      lldb_regnum = regloc.location.register_number;
-    }
-
-    if (result == UnwindLLDB::RegisterSearchResult::eRegisterFound)
-      return true;
-    if (result == UnwindLLDB::RegisterSearchResult::eRegisterIsVolatile)
-      return false;
-    frame_num--;
-  }
-  return false;
-}
diff --git a/gnu/llvm/lldb/source/Plugins/Process/Utility/UnwindLLDB.h b/gnu/llvm/lldb/source/Plugins/Process/Utility/UnwindLLDB.h
deleted file mode 100644 (file)
index ff5db39..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-//===-- UnwindLLDB.h --------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef lldb_UnwindLLDB_h_
-#define lldb_UnwindLLDB_h_
-
-#include <vector>
-
-#include "lldb/Symbol/FuncUnwinders.h"
-#include "lldb/Symbol/SymbolContext.h"
-#include "lldb/Symbol/UnwindPlan.h"
-#include "lldb/Target/RegisterContext.h"
-#include "lldb/Target/Unwind.h"
-#include "lldb/Utility/ConstString.h"
-#include "lldb/lldb-public.h"
-
-namespace lldb_private {
-
-class RegisterContextLLDB;
-
-class UnwindLLDB : public lldb_private::Unwind {
-public:
-  UnwindLLDB(lldb_private::Thread &thread);
-
-  ~UnwindLLDB() override = default;
-
-  enum RegisterSearchResult {
-    eRegisterFound = 0,
-    eRegisterNotFound,
-    eRegisterIsVolatile
-  };
-
-protected:
-  friend class lldb_private::RegisterContextLLDB;
-
-  struct RegisterLocation {
-    enum RegisterLocationTypes {
-      eRegisterNotSaved = 0, // register was not preserved by callee.  If
-                             // volatile reg, is unavailable
-      eRegisterSavedAtMemoryLocation, // register is saved at a specific word of
-                                      // target mem (target_memory_location)
-      eRegisterInRegister, // register is available in a (possible other)
-                           // register (register_number)
-      eRegisterSavedAtHostMemoryLocation, // register is saved at a word in
-                                          // lldb's address space
-      eRegisterValueInferred,        // register val was computed (and is in
-                                     // inferred_value)
-      eRegisterInLiveRegisterContext // register value is in a live (stack frame
-                                     // #0) register
-    };
-    int type;
-    union {
-      lldb::addr_t target_memory_location;
-      uint32_t
-          register_number; // in eRegisterKindLLDB register numbering system
-      void *host_memory_location;
-      uint64_t inferred_value; // eRegisterValueInferred - e.g. stack pointer ==
-                               // cfa + offset
-    } location;
-  };
-
-  void DoClear() override {
-    m_frames.clear();
-    m_candidate_frame.reset();
-    m_unwind_complete = false;
-  }
-
-  uint32_t DoGetFrameCount() override;
-
-  bool DoGetFrameInfoAtIndex(uint32_t frame_idx, lldb::addr_t &cfa,
-                             lldb::addr_t &start_pc,
-                             bool &behaves_like_zeroth_frame) override;
-
-  lldb::RegisterContextSP
-  DoCreateRegisterContextForFrame(lldb_private::StackFrame *frame) override;
-
-  typedef std::shared_ptr<RegisterContextLLDB> RegisterContextLLDBSP;
-
-  // Needed to retrieve the "next" frame (e.g. frame 2 needs to retrieve frame
-  // 1's RegisterContextLLDB)
-  // The RegisterContext for frame_num must already exist or this returns an
-  // empty shared pointer.
-  RegisterContextLLDBSP GetRegisterContextForFrameNum(uint32_t frame_num);
-
-  // Iterate over the RegisterContextLLDB's in our m_frames vector, look for the
-  // first one that
-  // has a saved location for this reg.
-  bool SearchForSavedLocationForRegister(
-      uint32_t lldb_regnum, lldb_private::UnwindLLDB::RegisterLocation &regloc,
-      uint32_t starting_frame_num, bool pc_register);
-
-  /// Provide the list of user-specified trap handler functions
-  ///
-  /// The Platform is one source of trap handler function names; that
-  /// may be augmented via a setting.  The setting needs to be converted
-  /// into an array of ConstStrings before it can be used - we only want
-  /// to do that once per thread so it's here in the UnwindLLDB object.
-  ///
-  /// \return
-  ///     Vector of ConstStrings of trap handler function names.  May be
-  ///     empty.
-  const std::vector<ConstString> &GetUserSpecifiedTrapHandlerFunctionNames() {
-    return m_user_supplied_trap_handler_functions;
-  }
-
-private:
-  struct Cursor {
-    lldb::addr_t start_pc; // The start address of the function/symbol for this
-                           // frame - current pc if unknown
-    lldb::addr_t cfa;      // The canonical frame address for this stack frame
-    lldb_private::SymbolContext sctx; // A symbol context we'll contribute to &
-                                      // provide to the StackFrame creation
-    RegisterContextLLDBSP
-        reg_ctx_lldb_sp; // These are all RegisterContextLLDB's
-
-    Cursor()
-        : start_pc(LLDB_INVALID_ADDRESS), cfa(LLDB_INVALID_ADDRESS), sctx(),
-          reg_ctx_lldb_sp() {}
-
-  private:
-    DISALLOW_COPY_AND_ASSIGN(Cursor);
-  };
-
-  typedef std::shared_ptr<Cursor> CursorSP;
-  std::vector<CursorSP> m_frames;
-  CursorSP m_candidate_frame;
-  bool m_unwind_complete; // If this is true, we've enumerated all the frames in
-                          // the stack, and m_frames.size() is the
-  // number of frames, etc.  Otherwise we've only gone as far as directly asked,
-  // and m_frames.size()
-  // is how far we've currently gone.
-
-  std::vector<ConstString> m_user_supplied_trap_handler_functions;
-
-  // Check if Full UnwindPlan of First frame is valid or not.
-  // If not then try Fallback UnwindPlan of the frame. If Fallback
-  // UnwindPlan succeeds then update the Full UnwindPlan with the
-  // Fallback UnwindPlan.
-  void UpdateUnwindPlanForFirstFrameIfInvalid(ABI *abi);
-
-  CursorSP GetOneMoreFrame(ABI *abi);
-
-  bool AddOneMoreFrame(ABI *abi);
-
-  bool AddFirstFrame();
-
-  // For UnwindLLDB only
-  DISALLOW_COPY_AND_ASSIGN(UnwindLLDB);
-};
-
-} // namespace lldb_private
-
-#endif // lldb_UnwindLLDB_h_
diff --git a/gnu/llvm/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp b/gnu/llvm/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp
deleted file mode 100644 (file)
index 558edee..0000000
+++ /dev/null
@@ -1,247 +0,0 @@
-//===-- UnwindMacOSXFrameBackchain.cpp --------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "lldb/Symbol/Function.h"
-#include "lldb/Symbol/ObjectFile.h"
-#include "lldb/Symbol/Symbol.h"
-#include "lldb/Target/ExecutionContext.h"
-#include "lldb/Target/Process.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Target/Thread.h"
-#include "lldb/Utility/ArchSpec.h"
-
-#include "RegisterContextMacOSXFrameBackchain.h"
-
-#include <memory>
-
-using namespace lldb;
-using namespace lldb_private;
-
-UnwindMacOSXFrameBackchain::UnwindMacOSXFrameBackchain(Thread &thread)
-    : Unwind(thread), m_cursors() {}
-
-uint32_t UnwindMacOSXFrameBackchain::DoGetFrameCount() {
-  if (m_cursors.empty()) {
-    ExecutionContext exe_ctx(m_thread.shared_from_this());
-    Target *target = exe_ctx.GetTargetPtr();
-    if (target) {
-      const ArchSpec &target_arch = target->GetArchitecture();
-      // Frame zero should always be supplied by the thread...
-      exe_ctx.SetFrameSP(m_thread.GetStackFrameAtIndex(0));
-
-      if (target_arch.GetAddressByteSize() == 8)
-        GetStackFrameData_x86_64(exe_ctx);
-      else
-        GetStackFrameData_i386(exe_ctx);
-    }
-  }
-  return m_cursors.size();
-}
-
-bool UnwindMacOSXFrameBackchain::DoGetFrameInfoAtIndex(
-    uint32_t idx, addr_t &cfa, addr_t &pc, bool &behaves_like_zeroth_frame) {
-  const uint32_t frame_count = GetFrameCount();
-  if (idx < frame_count) {
-    if (m_cursors[idx].pc == LLDB_INVALID_ADDRESS)
-      return false;
-    if (m_cursors[idx].fp == LLDB_INVALID_ADDRESS)
-      return false;
-
-    pc = m_cursors[idx].pc;
-    cfa = m_cursors[idx].fp;
-    behaves_like_zeroth_frame = (idx == 0);
-
-    return true;
-  }
-  return false;
-}
-
-lldb::RegisterContextSP
-UnwindMacOSXFrameBackchain::DoCreateRegisterContextForFrame(StackFrame *frame) {
-  lldb::RegisterContextSP reg_ctx_sp;
-  uint32_t concrete_idx = frame->GetConcreteFrameIndex();
-  const uint32_t frame_count = GetFrameCount();
-  if (concrete_idx < frame_count)
-    reg_ctx_sp = std::make_shared<RegisterContextMacOSXFrameBackchain>(
-        m_thread, concrete_idx, m_cursors[concrete_idx]);
-  return reg_ctx_sp;
-}
-
-size_t UnwindMacOSXFrameBackchain::GetStackFrameData_i386(
-    const ExecutionContext &exe_ctx) {
-  m_cursors.clear();
-
-  StackFrame *first_frame = exe_ctx.GetFramePtr();
-
-  Process *process = exe_ctx.GetProcessPtr();
-  if (process == nullptr)
-    return 0;
-
-  struct Frame_i386 {
-    uint32_t fp;
-    uint32_t pc;
-  };
-
-  RegisterContext *reg_ctx = m_thread.GetRegisterContext().get();
-  assert(reg_ctx);
-
-  Cursor cursor;
-  cursor.pc = reg_ctx->GetPC(LLDB_INVALID_ADDRESS);
-  cursor.fp = reg_ctx->GetFP(0);
-
-  Frame_i386 frame = {static_cast<uint32_t>(cursor.fp),
-                      static_cast<uint32_t>(cursor.pc)};
-
-  m_cursors.push_back(cursor);
-
-  const size_t k_frame_size = sizeof(frame);
-  Status error;
-  while (frame.fp != 0 && frame.pc != 0 && ((frame.fp & 7) == 0)) {
-    // Read both the FP and PC (8 bytes)
-    if (process->ReadMemory(frame.fp, &frame.fp, k_frame_size, error) !=
-        k_frame_size)
-      break;
-    if (frame.pc >= 0x1000) {
-      cursor.pc = frame.pc;
-      cursor.fp = frame.fp;
-      m_cursors.push_back(cursor);
-    }
-  }
-  if (!m_cursors.empty()) {
-    lldb::addr_t first_frame_pc = m_cursors.front().pc;
-    if (first_frame_pc != LLDB_INVALID_ADDRESS) {
-      const SymbolContextItem resolve_scope =
-          eSymbolContextModule | eSymbolContextCompUnit |
-          eSymbolContextFunction | eSymbolContextSymbol;
-
-      SymbolContext first_frame_sc(
-          first_frame->GetSymbolContext(resolve_scope));
-      const AddressRange *addr_range_ptr = nullptr;
-      AddressRange range;
-      if (first_frame_sc.function)
-        addr_range_ptr = &first_frame_sc.function->GetAddressRange();
-      else if (first_frame_sc.symbol) {
-        range.GetBaseAddress() = first_frame_sc.symbol->GetAddress();
-        range.SetByteSize(first_frame_sc.symbol->GetByteSize());
-        addr_range_ptr = &range;
-      }
-
-      if (addr_range_ptr) {
-        if (first_frame->GetFrameCodeAddress() ==
-            addr_range_ptr->GetBaseAddress()) {
-          // We are at the first instruction, so we can recover the previous PC
-          // by dereferencing the SP
-          lldb::addr_t first_frame_sp = reg_ctx->GetSP(0);
-          // Read the real second frame return address into frame.pc
-          if (first_frame_sp &&
-              process->ReadMemory(first_frame_sp, &frame.pc, sizeof(frame.pc),
-                                  error) == sizeof(frame.pc)) {
-            cursor.fp = m_cursors.front().fp;
-            cursor.pc = frame.pc; // Set the new second frame PC
-
-            // Insert the second frame
-            m_cursors.insert(m_cursors.begin() + 1, cursor);
-
-            m_cursors.front().fp = first_frame_sp;
-          }
-        }
-      }
-    }
-  }
-  //    uint32_t i=0;
-  //    printf("      PC                 FP\n");
-  //    printf("      ------------------ ------------------ \n");
-  //    for (i=0; i<m_cursors.size(); ++i)
-  //    {
-  //        printf("[%3u] 0x%16.16" PRIx64 " 0x%16.16" PRIx64 "\n", i,
-  //        m_cursors[i].pc, m_cursors[i].fp);
-  //    }
-  return m_cursors.size();
-}
-
-size_t UnwindMacOSXFrameBackchain::GetStackFrameData_x86_64(
-    const ExecutionContext &exe_ctx) {
-  m_cursors.clear();
-
-  Process *process = exe_ctx.GetProcessPtr();
-  if (process == nullptr)
-    return 0;
-
-  StackFrame *first_frame = exe_ctx.GetFramePtr();
-
-  struct Frame_x86_64 {
-    uint64_t fp;
-    uint64_t pc;
-  };
-
-  RegisterContext *reg_ctx = m_thread.GetRegisterContext().get();
-  assert(reg_ctx);
-
-  Cursor cursor;
-  cursor.pc = reg_ctx->GetPC(LLDB_INVALID_ADDRESS);
-  cursor.fp = reg_ctx->GetFP(0);
-
-  Frame_x86_64 frame = {cursor.fp, cursor.pc};
-
-  m_cursors.push_back(cursor);
-  Status error;
-  const size_t k_frame_size = sizeof(frame);
-  while (frame.fp != 0 && frame.pc != 0 && ((frame.fp & 7) == 0)) {
-    // Read both the FP and PC (16 bytes)
-    if (process->ReadMemory(frame.fp, &frame.fp, k_frame_size, error) !=
-        k_frame_size)
-      break;
-
-    if (frame.pc >= 0x1000) {
-      cursor.pc = frame.pc;
-      cursor.fp = frame.fp;
-      m_cursors.push_back(cursor);
-    }
-  }
-  if (!m_cursors.empty()) {
-    lldb::addr_t first_frame_pc = m_cursors.front().pc;
-    if (first_frame_pc != LLDB_INVALID_ADDRESS) {
-      const SymbolContextItem resolve_scope =
-          eSymbolContextModule | eSymbolContextCompUnit |
-          eSymbolContextFunction | eSymbolContextSymbol;
-
-      SymbolContext first_frame_sc(
-          first_frame->GetSymbolContext(resolve_scope));
-      const AddressRange *addr_range_ptr = nullptr;
-      AddressRange range;
-      if (first_frame_sc.function)
-        addr_range_ptr = &first_frame_sc.function->GetAddressRange();
-      else if (first_frame_sc.symbol) {
-        range.GetBaseAddress() = first_frame_sc.symbol->GetAddress();
-        range.SetByteSize(first_frame_sc.symbol->GetByteSize());
-        addr_range_ptr = &range;
-      }
-
-      if (addr_range_ptr) {
-        if (first_frame->GetFrameCodeAddress() ==
-            addr_range_ptr->GetBaseAddress()) {
-          // We are at the first instruction, so we can recover the previous PC
-          // by dereferencing the SP
-          lldb::addr_t first_frame_sp = reg_ctx->GetSP(0);
-          // Read the real second frame return address into frame.pc
-          if (process->ReadMemory(first_frame_sp, &frame.pc, sizeof(frame.pc),
-                                  error) == sizeof(frame.pc)) {
-            cursor.fp = m_cursors.front().fp;
-            cursor.pc = frame.pc; // Set the new second frame PC
-
-            // Insert the second frame
-            m_cursors.insert(m_cursors.begin() + 1, cursor);
-
-            m_cursors.front().fp = first_frame_sp;
-          }
-        }
-      }
-    }
-  }
-  return m_cursors.size();
-}
diff --git a/gnu/llvm/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.h b/gnu/llvm/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.h
deleted file mode 100644 (file)
index f0bde90..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-//===-- UnwindMacOSXFrameBackchain.h ----------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef lldb_UnwindMacOSXFrameBackchain_h_
-#define lldb_UnwindMacOSXFrameBackchain_h_
-
-#include <vector>
-
-#include "lldb/Target/Unwind.h"
-#include "lldb/lldb-private.h"
-
-class UnwindMacOSXFrameBackchain : public lldb_private::Unwind {
-public:
-  UnwindMacOSXFrameBackchain(lldb_private::Thread &thread);
-
-  ~UnwindMacOSXFrameBackchain() override = default;
-
-protected:
-  void DoClear() override { m_cursors.clear(); }
-
-  uint32_t DoGetFrameCount() override;
-
-  bool DoGetFrameInfoAtIndex(uint32_t frame_idx, lldb::addr_t &cfa,
-                             lldb::addr_t &pc,
-                             bool &behaves_like_zeroth_frame) override;
-
-  lldb::RegisterContextSP
-  DoCreateRegisterContextForFrame(lldb_private::StackFrame *frame) override;
-
-  friend class RegisterContextMacOSXFrameBackchain;
-
-  struct Cursor {
-    lldb::addr_t pc; // Program counter
-    lldb::addr_t fp; // Frame pointer for us with backchain
-  };
-
-private:
-  std::vector<Cursor> m_cursors;
-
-  size_t GetStackFrameData_i386(const lldb_private::ExecutionContext &exe_ctx);
-
-  size_t
-  GetStackFrameData_x86_64(const lldb_private::ExecutionContext &exe_ctx);
-
-  // For UnwindMacOSXFrameBackchain only
-  DISALLOW_COPY_AND_ASSIGN(UnwindMacOSXFrameBackchain);
-};
-
-#endif // lldb_UnwindMacOSXFrameBackchain_h_
index 08d4898..529fcc5 100644 (file)
@@ -843,7 +843,7 @@ GDBRemoteCommunicationServerCommon::Handle_qSupported(
   response.PutCString(";QListThreadsInStopReply+");
   response.PutCString(";qEcho+");
   response.PutCString(";qXfer:features:read+");
-#if defined(__linux__) || defined(__NetBSD__)
+#if defined(__linux__) || defined(__NetBSD__) || defined(__OpenBSD__)
   response.PutCString(";QPassSignals+");
   response.PutCString(";qXfer:auxv:read+");
   response.PutCString(";qXfer:libraries-svr4:read+");
diff --git a/gnu/llvm/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwoDwp.cpp b/gnu/llvm/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwoDwp.cpp
deleted file mode 100644 (file)
index 4288dcb..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-//===-- SymbolFileDWARFDwoDwp.cpp -------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "SymbolFileDWARFDwoDwp.h"
-
-#include "lldb/Core/Section.h"
-#include "lldb/Expression/DWARFExpression.h"
-#include "lldb/Symbol/ObjectFile.h"
-#include "lldb/Utility/LLDBAssert.h"
-
-#include "DWARFUnit.h"
-#include "DWARFDebugInfo.h"
-
-using namespace lldb;
-using namespace lldb_private;
-
-char SymbolFileDWARFDwoDwp::ID;
-
-SymbolFileDWARFDwoDwp::SymbolFileDWARFDwoDwp(SymbolFileDWARFDwp *dwp_symfile,
-                                             ObjectFileSP objfile,
-                                             DWARFCompileUnit &dwarf_cu,
-                                             uint64_t dwo_id)
-    : SymbolFileDWARFDwo(objfile, dwarf_cu), m_dwp_symfile(dwp_symfile),
-      m_dwo_id(dwo_id) {}
-
-void SymbolFileDWARFDwoDwp::LoadSectionData(lldb::SectionType sect_type,
-                                            DWARFDataExtractor &data) {
-  if (m_dwp_symfile->LoadSectionData(m_dwo_id, sect_type, data))
-    return;
-
-  SymbolFileDWARF::LoadSectionData(sect_type, data);
-}
diff --git a/gnu/llvm/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwoDwp.h b/gnu/llvm/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwoDwp.h
deleted file mode 100644 (file)
index a55795b..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-//===-- SymbolFileDWARFDwoDwp.h ---------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef SymbolFileDWARFDwoDwp_SymbolFileDWARFDwoDwp_h_
-#define SymbolFileDWARFDwoDwp_SymbolFileDWARFDwoDwp_h_
-
-#include "SymbolFileDWARFDwo.h"
-#include "SymbolFileDWARFDwp.h"
-
-class SymbolFileDWARFDwoDwp : public SymbolFileDWARFDwo {
-  /// LLVM RTTI support.
-  static char ID;
-
-public:
-  /// LLVM RTTI support.
-  /// \{
-  bool isA(const void *ClassID) const override {
-    return ClassID == &ID || SymbolFileDWARFDwo::isA(ClassID);
-  }
-  static bool classof(const SymbolFile *obj) { return obj->isA(&ID); }
-  /// \}
-  SymbolFileDWARFDwoDwp(SymbolFileDWARFDwp *dwp_symfile,
-                        lldb::ObjectFileSP objfile, DWARFCompileUnit &dwarf_cu,
-                        uint64_t dwo_id);
-
-protected:
-  void LoadSectionData(lldb::SectionType sect_type,
-                       lldb_private::DWARFDataExtractor &data) override;
-
-  SymbolFileDWARFDwp *m_dwp_symfile;
-  uint64_t m_dwo_id;
-};
-
-#endif // SymbolFileDWARFDwoDwp_SymbolFileDWARFDwoDwp_h_
diff --git a/gnu/llvm/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.cpp b/gnu/llvm/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.cpp
deleted file mode 100644 (file)
index 08e6e1c..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-//===-- SymbolFileDWARFDwp.cpp ----------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "SymbolFileDWARFDwp.h"
-
-#include "lldb/Core/Section.h"
-#include "lldb/Symbol/ObjectFile.h"
-
-#include "SymbolFileDWARFDwoDwp.h"
-
-static llvm::DWARFSectionKind
-lldbSectTypeToLlvmSectionKind(lldb::SectionType type) {
-  switch (type) {
-  case lldb::eSectionTypeDWARFDebugInfo:
-    return llvm::DW_SECT_INFO;
-  // case lldb::eSectionTypeDWARFDebugTypes:
-  //   return llvm::DW_SECT_TYPES;
-  case lldb::eSectionTypeDWARFDebugAbbrev:
-    return llvm::DW_SECT_ABBREV;
-  case lldb::eSectionTypeDWARFDebugLine:
-    return llvm::DW_SECT_LINE;
-  case lldb::eSectionTypeDWARFDebugLoc:
-    return llvm::DW_SECT_LOC; 
-  case lldb::eSectionTypeDWARFDebugStrOffsets:
-    return llvm::DW_SECT_STR_OFFSETS;
-  // case lldb::eSectionTypeDWARFDebugMacinfo:
-  //   return llvm::DW_SECT_MACINFO;
-  case lldb::eSectionTypeDWARFDebugMacro:
-    return llvm::DW_SECT_MACRO;
-  default:
-    // Note: 0 is an invalid dwarf section kind.
-    return llvm::DWARFSectionKind(0);
-  }
-}
-
-std::unique_ptr<SymbolFileDWARFDwp>
-SymbolFileDWARFDwp::Create(lldb::ModuleSP module_sp,
-                           const lldb_private::FileSpec &file_spec) {
-  const lldb::offset_t file_offset = 0;
-  lldb::DataBufferSP file_data_sp;
-  lldb::offset_t file_data_offset = 0;
-  lldb::ObjectFileSP obj_file = lldb_private::ObjectFile::FindPlugin(
-      module_sp, &file_spec, file_offset,
-      lldb_private::FileSystem::Instance().GetByteSize(file_spec), file_data_sp,
-      file_data_offset);
-  if (obj_file == nullptr)
-    return nullptr;
-
-  std::unique_ptr<SymbolFileDWARFDwp> dwp_symfile(
-      new SymbolFileDWARFDwp(module_sp, obj_file));
-
-  lldb_private::DWARFDataExtractor debug_cu_index;
-  if (!dwp_symfile->LoadRawSectionData(lldb::eSectionTypeDWARFDebugCuIndex,
-                                       debug_cu_index))
-    return nullptr;
-
-  llvm::DataExtractor llvm_debug_cu_index(
-      llvm::StringRef(debug_cu_index.PeekCStr(0), debug_cu_index.GetByteSize()),
-      debug_cu_index.GetByteOrder() == lldb::eByteOrderLittle,
-      debug_cu_index.GetAddressByteSize());
-  if (!dwp_symfile->m_debug_cu_index.parse(llvm_debug_cu_index))
-    return nullptr;
-  dwp_symfile->InitDebugCUIndexMap();
-  return dwp_symfile;
-}
-
-void SymbolFileDWARFDwp::InitDebugCUIndexMap() {
-  m_debug_cu_index_map.clear();
-  for (const auto &entry : m_debug_cu_index.getRows())
-    m_debug_cu_index_map.emplace(entry.getSignature(), &entry);
-}
-
-SymbolFileDWARFDwp::SymbolFileDWARFDwp(lldb::ModuleSP module_sp,
-                                       lldb::ObjectFileSP obj_file)
-    : m_obj_file(std::move(obj_file)), m_debug_cu_index(llvm::DW_SECT_INFO) 
-{}
-
-std::unique_ptr<SymbolFileDWARFDwo>
-SymbolFileDWARFDwp::GetSymbolFileForDwoId(DWARFCompileUnit &dwarf_cu,
-                                          uint64_t dwo_id) {
-  return std::unique_ptr<SymbolFileDWARFDwo>(
-      new SymbolFileDWARFDwoDwp(this, m_obj_file, dwarf_cu, dwo_id));
-}
-
-bool SymbolFileDWARFDwp::LoadSectionData(
-    uint64_t dwo_id, lldb::SectionType sect_type,
-    lldb_private::DWARFDataExtractor &data) {
-  lldb_private::DWARFDataExtractor section_data;
-  if (!LoadRawSectionData(sect_type, section_data))
-    return false;
-
-  auto it = m_debug_cu_index_map.find(dwo_id);
-  if (it == m_debug_cu_index_map.end())
-    return false;
-
-  auto *offsets =
-      it->second->getOffset(lldbSectTypeToLlvmSectionKind(sect_type));
-  if (offsets) {
-    data.SetData(section_data, offsets->Offset, offsets->Length);
-  } else {
-    data.SetData(section_data, 0, section_data.GetByteSize());
-  }
-  return true;
-}
-
-bool SymbolFileDWARFDwp::LoadRawSectionData(
-    lldb::SectionType sect_type, lldb_private::DWARFDataExtractor &data) {
-  std::lock_guard<std::mutex> lock(m_sections_mutex);
-
-  auto it = m_sections.find(sect_type);
-  if (it != m_sections.end()) {
-    if (it->second.GetByteSize() == 0)
-      return false;
-
-    data = it->second;
-    return true;
-  }
-
-  const lldb_private::SectionList *section_list =
-      m_obj_file->GetSectionList(false /* update_module_section_list */);
-  if (section_list) {
-    lldb::SectionSP section_sp(
-        section_list->FindSectionByType(sect_type, true));
-    if (section_sp) {
-      if (m_obj_file->ReadSectionData(section_sp.get(), data) != 0) {
-        m_sections[sect_type] = data;
-        return true;
-      }
-    }
-  }
-  m_sections[sect_type].Clear();
-  return false;
-}
diff --git a/gnu/llvm/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.h b/gnu/llvm/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.h
deleted file mode 100644 (file)
index ef06b9d..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-//===-- SymbolFileDWARFDwp.h ------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef SymbolFileDWARFDwp_SymbolFileDWARFDwp_h_
-#define SymbolFileDWARFDwp_SymbolFileDWARFDwp_h_
-
-#include <memory>
-
-#include "llvm/DebugInfo/DWARF/DWARFUnitIndex.h"
-
-#include "lldb/Core/Module.h"
-
-#include "DWARFDataExtractor.h"
-#include "SymbolFileDWARFDwo.h"
-
-class SymbolFileDWARFDwp {
-public:
-  static std::unique_ptr<SymbolFileDWARFDwp>
-  Create(lldb::ModuleSP module_sp, const lldb_private::FileSpec &file_spec);
-
-  std::unique_ptr<SymbolFileDWARFDwo>
-  GetSymbolFileForDwoId(DWARFCompileUnit &dwarf_cu, uint64_t dwo_id);
-
-  bool LoadSectionData(uint64_t dwo_id, lldb::SectionType sect_type,
-                       lldb_private::DWARFDataExtractor &data);
-
-private:
-  explicit SymbolFileDWARFDwp(lldb::ModuleSP module_sp,
-                              lldb::ObjectFileSP obj_file);
-
-  bool LoadRawSectionData(lldb::SectionType sect_type,
-                          lldb_private::DWARFDataExtractor &data);
-  
-  void InitDebugCUIndexMap();
-
-  lldb::ObjectFileSP m_obj_file;
-
-  std::mutex m_sections_mutex;
-  std::map<lldb::SectionType, lldb_private::DWARFDataExtractor> m_sections;
-
-  llvm::DWARFUnitIndex m_debug_cu_index;
-  std::map<uint64_t, const llvm::DWARFUnitIndex::Entry *> m_debug_cu_index_map;
-};
-
-#endif // SymbolFileDWARFDwp_SymbolFileDWARFDwp_h_
index 36e7b90..8e68f75 100644 (file)
@@ -870,6 +870,18 @@ int16_t x86AssemblyInspectionEngine::extract_2_signed(uint8_t *b) {
   return v;
 }
 
+// movq $0x????????(%rip), $reg [(0x4c || 0x48) 0x8b ?? ?? ?? ?? ??]
+// xorq $off(%rsp), $reg        [(0x4c || 0x48) 0x33 ?? 0x24]
+bool x86AssemblyInspectionEngine::retguard_prologue_p(size_t offset, int insn_len) {
+  uint8_t *p = m_cur_insn;
+  if (offset == 0 && insn_len == 7)
+    return (*p == 0x48 || *p == 0x4c) && (*(p + 1) == 0x8b);
+  else if (offset == 7 && insn_len == 4)
+    return (*p == 0x48 || *p == 0x4c) && (*(p + 1) == 0x33) && (*(p + 3) == 0x24);
+
+  return false;
+}
+
 uint32_t x86AssemblyInspectionEngine::extract_4(uint8_t *b) {
   uint32_t v = 0;
   for (int i = 3; i >= 0; i--)
@@ -1601,6 +1613,7 @@ bool x86AssemblyInspectionEngine::FindFirstNonPrologueInstruction(
     if (push_rbp_pattern_p() || mov_rsp_rbp_pattern_p() ||
         sub_rsp_pattern_p(scratch) || push_reg_p(regno) ||
         mov_reg_to_local_stack_frame_p(regno, scratch) ||
+        retguard_prologue_p(offset, insn_len) ||
         (lea_rsp_pattern_p(scratch) && offset == 0)) {
       offset += insn_len;
       continue;
index f39dce1..d0b6f65 100644 (file)
@@ -114,6 +114,7 @@ private:
   bool call_next_insn_pattern_p();
   bool mov_reg_to_local_stack_frame_p(int &regno, int &rbp_offset);
   bool ret_pattern_p();
+  bool retguard_prologue_p(size_t offset, int insn_len);
   bool jmp_to_reg_p();
   bool pc_rel_branch_or_jump_p (const int instruction_length, int &offset);
   bool non_local_branch_p (const lldb::addr_t current_func_text_offset, 
diff --git a/gnu/llvm/lldb/source/Symbol/ClangASTContext.cpp b/gnu/llvm/lldb/source/Symbol/ClangASTContext.cpp
deleted file mode 100644 (file)
index ac3bce1..0000000
+++ /dev/null
@@ -1,9298 +0,0 @@
-//===-- ClangASTContext.cpp -------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "lldb/Symbol/ClangASTContext.h"
-
-#include "llvm/Support/FormatAdapters.h"
-#include "llvm/Support/FormatVariadic.h"
-
-#include <mutex>
-#include <string>
-#include <vector>
-
-#include "clang/AST/ASTContext.h"
-#include "clang/AST/ASTImporter.h"
-#include "clang/AST/Attr.h"
-#include "clang/AST/CXXInheritance.h"
-#include "clang/AST/DeclObjC.h"
-#include "clang/AST/DeclTemplate.h"
-#include "clang/AST/Mangle.h"
-#include "clang/AST/RecordLayout.h"
-#include "clang/AST/Type.h"
-#include "clang/AST/VTableBuilder.h"
-#include "clang/Basic/Builtins.h"
-#include "clang/Basic/Diagnostic.h"
-#include "clang/Basic/FileManager.h"
-#include "clang/Basic/FileSystemOptions.h"
-#include "clang/Basic/LangStandard.h"
-#include "clang/Basic/SourceManager.h"
-#include "clang/Basic/TargetInfo.h"
-#include "clang/Basic/TargetOptions.h"
-#include "clang/Frontend/FrontendOptions.h"
-#include "clang/Sema/Sema.h"
-
-#include "llvm/Support/Signals.h"
-#include "llvm/Support/Threading.h"
-
-#include "Plugins/ExpressionParser/Clang/ClangFunctionCaller.h"
-#include "Plugins/ExpressionParser/Clang/ClangPersistentVariables.h"
-#include "Plugins/ExpressionParser/Clang/ClangUserExpression.h"
-#include "Plugins/ExpressionParser/Clang/ClangUtilityFunction.h"
-#include "lldb/Utility/ArchSpec.h"
-#include "lldb/Utility/Flags.h"
-
-#include "lldb/Core/DumpDataExtractor.h"
-#include "lldb/Core/Module.h"
-#include "lldb/Core/PluginManager.h"
-#include "lldb/Core/StreamFile.h"
-#include "lldb/Core/ThreadSafeDenseMap.h"
-#include "lldb/Core/UniqueCStringMap.h"
-#include "lldb/Symbol/ClangASTImporter.h"
-#include "lldb/Symbol/ClangASTMetadata.h"
-#include "lldb/Symbol/ClangExternalASTSourceCallbacks.h"
-#include "lldb/Symbol/ClangUtil.h"
-#include "lldb/Symbol/ObjectFile.h"
-#include "lldb/Symbol/SymbolFile.h"
-#include "lldb/Target/ExecutionContext.h"
-#include "lldb/Target/Language.h"
-#include "lldb/Target/Process.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Utility/DataExtractor.h"
-#include "lldb/Utility/LLDBAssert.h"
-#include "lldb/Utility/Log.h"
-#include "lldb/Utility/RegularExpression.h"
-#include "lldb/Utility/Scalar.h"
-
-#include "Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h"
-#include "Plugins/SymbolFile/DWARF/DWARFASTParserClang.h"
-#include "Plugins/SymbolFile/PDB/PDBASTParser.h"
-
-#include <stdio.h>
-
-#include <mutex>
-
-using namespace lldb;
-using namespace lldb_private;
-using namespace clang;
-using llvm::StringSwitch;
-
-namespace {
-#ifdef LLDB_CONFIGURATION_DEBUG
-static void VerifyDecl(clang::Decl *decl) {
-  assert(decl && "VerifyDecl called with nullptr?");
-  decl->getAccess();
-}
-#endif
-
-static inline bool
-ClangASTContextSupportsLanguage(lldb::LanguageType language) {
-  return language == eLanguageTypeUnknown || // Clang is the default type system
-         lldb_private::Language::LanguageIsC(language) ||
-         lldb_private::Language::LanguageIsCPlusPlus(language) ||
-         lldb_private::Language::LanguageIsObjC(language) ||
-         lldb_private::Language::LanguageIsPascal(language) ||
-         // Use Clang for Rust until there is a proper language plugin for it
-         language == eLanguageTypeRust ||
-         language == eLanguageTypeExtRenderScript ||
-         // Use Clang for D until there is a proper language plugin for it
-         language == eLanguageTypeD ||
-         // Open Dylan compiler debug info is designed to be Clang-compatible
-         language == eLanguageTypeDylan;
-}
-
-// Checks whether m1 is an overload of m2 (as opposed to an override). This is
-// called by addOverridesForMethod to distinguish overrides (which share a
-// vtable entry) from overloads (which require distinct entries).
-bool isOverload(clang::CXXMethodDecl *m1, clang::CXXMethodDecl *m2) {
-  // FIXME: This should detect covariant return types, but currently doesn't.
-  lldbassert(&m1->getASTContext() == &m2->getASTContext() &&
-             "Methods should have the same AST context");
-  clang::ASTContext &context = m1->getASTContext();
-
-  const auto *m1Type = llvm::cast<clang::FunctionProtoType>(
-      context.getCanonicalType(m1->getType()));
-
-  const auto *m2Type = llvm::cast<clang::FunctionProtoType>(
-      context.getCanonicalType(m2->getType()));
-
-  auto compareArgTypes = [&context](const clang::QualType &m1p,
-                                    const clang::QualType &m2p) {
-    return context.hasSameType(m1p.getUnqualifiedType(),
-                               m2p.getUnqualifiedType());
-  };
-
-  // FIXME: In C++14 and later, we can just pass m2Type->param_type_end()
-  //        as a fourth parameter to std::equal().
-  return (m1->getNumParams() != m2->getNumParams()) ||
-         !std::equal(m1Type->param_type_begin(), m1Type->param_type_end(),
-                     m2Type->param_type_begin(), compareArgTypes);
-}
-
-// If decl is a virtual method, walk the base classes looking for methods that
-// decl overrides. This table of overridden methods is used by IRGen to
-// determine the vtable layout for decl's parent class.
-void addOverridesForMethod(clang::CXXMethodDecl *decl) {
-  if (!decl->isVirtual())
-    return;
-
-  clang::CXXBasePaths paths;
-
-  auto find_overridden_methods =
-      [decl](const clang::CXXBaseSpecifier *specifier,
-             clang::CXXBasePath &path) {
-        if (auto *base_record = llvm::dyn_cast<clang::CXXRecordDecl>(
-                specifier->getType()->getAs<clang::RecordType>()->getDecl())) {
-
-          clang::DeclarationName name = decl->getDeclName();
-
-          // If this is a destructor, check whether the base class destructor is
-          // virtual.
-          if (name.getNameKind() == clang::DeclarationName::CXXDestructorName)
-            if (auto *baseDtorDecl = base_record->getDestructor()) {
-              if (baseDtorDecl->isVirtual()) {
-                path.Decls = baseDtorDecl;
-                return true;
-              } else
-                return false;
-            }
-
-          // Otherwise, search for name in the base class.
-          for (path.Decls = base_record->lookup(name); !path.Decls.empty();
-               path.Decls = path.Decls.slice(1)) {
-            if (auto *method_decl =
-                    llvm::dyn_cast<clang::CXXMethodDecl>(path.Decls.front()))
-              if (method_decl->isVirtual() && !isOverload(decl, method_decl)) {
-                path.Decls = method_decl;
-                return true;
-              }
-          }
-        }
-
-        return false;
-      };
-
-  if (decl->getParent()->lookupInBases(find_overridden_methods, paths)) {
-    for (auto *overridden_decl : paths.found_decls())
-      decl->addOverriddenMethod(
-          llvm::cast<clang::CXXMethodDecl>(overridden_decl));
-  }
-}
-}
-
-static lldb::addr_t GetVTableAddress(Process &process,
-                                     VTableContextBase &vtable_ctx,
-                                     ValueObject &valobj,
-                                     const ASTRecordLayout &record_layout) {
-  // Retrieve type info
-  CompilerType pointee_type;
-  CompilerType this_type(valobj.GetCompilerType());
-  uint32_t type_info = this_type.GetTypeInfo(&pointee_type);
-  if (!type_info)
-    return LLDB_INVALID_ADDRESS;
-
-  // Check if it's a pointer or reference
-  bool ptr_or_ref = false;
-  if (type_info & (eTypeIsPointer | eTypeIsReference)) {
-    ptr_or_ref = true;
-    type_info = pointee_type.GetTypeInfo();
-  }
-
-  // We process only C++ classes
-  const uint32_t cpp_class = eTypeIsClass | eTypeIsCPlusPlus;
-  if ((type_info & cpp_class) != cpp_class)
-    return LLDB_INVALID_ADDRESS;
-
-  // Calculate offset to VTable pointer
-  lldb::offset_t vbtable_ptr_offset =
-      vtable_ctx.isMicrosoft() ? record_layout.getVBPtrOffset().getQuantity()
-                               : 0;
-
-  if (ptr_or_ref) {
-    // We have a pointer / ref to object, so read
-    // VTable pointer from process memory
-
-    if (valobj.GetAddressTypeOfChildren() != eAddressTypeLoad)
-      return LLDB_INVALID_ADDRESS;
-
-    auto vbtable_ptr_addr = valobj.GetValueAsUnsigned(LLDB_INVALID_ADDRESS);
-    if (vbtable_ptr_addr == LLDB_INVALID_ADDRESS)
-      return LLDB_INVALID_ADDRESS;
-
-    vbtable_ptr_addr += vbtable_ptr_offset;
-
-    Status err;
-    return process.ReadPointerFromMemory(vbtable_ptr_addr, err);
-  }
-
-  // We have an object already read from process memory,
-  // so just extract VTable pointer from it
-
-  DataExtractor data;
-  Status err;
-  auto size = valobj.GetData(data, err);
-  if (err.Fail() || vbtable_ptr_offset + data.GetAddressByteSize() > size)
-    return LLDB_INVALID_ADDRESS;
-
-  return data.GetPointer(&vbtable_ptr_offset);
-}
-
-static int64_t ReadVBaseOffsetFromVTable(Process &process,
-                                         VTableContextBase &vtable_ctx,
-                                         lldb::addr_t vtable_ptr,
-                                         const CXXRecordDecl *cxx_record_decl,
-                                         const CXXRecordDecl *base_class_decl) {
-  if (vtable_ctx.isMicrosoft()) {
-    clang::MicrosoftVTableContext &msoft_vtable_ctx =
-        static_cast<clang::MicrosoftVTableContext &>(vtable_ctx);
-
-    // Get the index into the virtual base table. The
-    // index is the index in uint32_t from vbtable_ptr
-    const unsigned vbtable_index =
-        msoft_vtable_ctx.getVBTableIndex(cxx_record_decl, base_class_decl);
-    const lldb::addr_t base_offset_addr = vtable_ptr + vbtable_index * 4;
-    Status err;
-    return process.ReadSignedIntegerFromMemory(base_offset_addr, 4, INT64_MAX,
-                                               err);
-  }
-
-  clang::ItaniumVTableContext &itanium_vtable_ctx =
-      static_cast<clang::ItaniumVTableContext &>(vtable_ctx);
-
-  clang::CharUnits base_offset_offset =
-      itanium_vtable_ctx.getVirtualBaseOffsetOffset(cxx_record_decl,
-                                                    base_class_decl);
-  const lldb::addr_t base_offset_addr =
-      vtable_ptr + base_offset_offset.getQuantity();
-  const uint32_t base_offset_size = process.GetAddressByteSize();
-  Status err;
-  return process.ReadSignedIntegerFromMemory(base_offset_addr, base_offset_size,
-                                             INT64_MAX, err);
-}
-
-static bool GetVBaseBitOffset(VTableContextBase &vtable_ctx,
-                              ValueObject &valobj,
-                              const ASTRecordLayout &record_layout,
-                              const CXXRecordDecl *cxx_record_decl,
-                              const CXXRecordDecl *base_class_decl,
-                              int32_t &bit_offset) {
-  ExecutionContext exe_ctx(valobj.GetExecutionContextRef());
-  Process *process = exe_ctx.GetProcessPtr();
-  if (!process)
-    return false;
-
-  lldb::addr_t vtable_ptr =
-      GetVTableAddress(*process, vtable_ctx, valobj, record_layout);
-  if (vtable_ptr == LLDB_INVALID_ADDRESS)
-    return false;
-
-  auto base_offset = ReadVBaseOffsetFromVTable(
-      *process, vtable_ctx, vtable_ptr, cxx_record_decl, base_class_decl);
-  if (base_offset == INT64_MAX)
-    return false;
-
-  bit_offset = base_offset * 8;
-
-  return true;
-}
-
-typedef lldb_private::ThreadSafeDenseMap<clang::ASTContext *, ClangASTContext *>
-    ClangASTMap;
-
-static ClangASTMap &GetASTMap() {
-  static ClangASTMap *g_map_ptr = nullptr;
-  static llvm::once_flag g_once_flag;
-  llvm::call_once(g_once_flag, []() {
-    g_map_ptr = new ClangASTMap(); // leaked on purpose to avoid spins
-  });
-  return *g_map_ptr;
-}
-
-char ClangASTContext::ID;
-
-bool ClangASTContext::IsOperator(llvm::StringRef name,
-                                 clang::OverloadedOperatorKind &op_kind) {
-  // All operators have to start with "operator".
-  if (!name.consume_front("operator"))
-    return false;
-
-  // Remember if there was a space after "operator". This is necessary to
-  // check for collisions with strangely named functions like "operatorint()".
-  bool space_after_operator = name.consume_front(" ");
-
-  op_kind = StringSwitch<clang::OverloadedOperatorKind>(name)
-                .Case("+", clang::OO_Plus)
-                .Case("+=", clang::OO_PlusEqual)
-                .Case("++", clang::OO_PlusPlus)
-                .Case("-", clang::OO_Minus)
-                .Case("-=", clang::OO_MinusEqual)
-                .Case("--", clang::OO_MinusMinus)
-                .Case("->", clang::OO_Arrow)
-                .Case("->*", clang::OO_ArrowStar)
-                .Case("*", clang::OO_Star)
-                .Case("*=", clang::OO_StarEqual)
-                .Case("/", clang::OO_Slash)
-                .Case("/=", clang::OO_SlashEqual)
-                .Case("%", clang::OO_Percent)
-                .Case("%=", clang::OO_PercentEqual)
-                .Case("^", clang::OO_Caret)
-                .Case("^=", clang::OO_CaretEqual)
-                .Case("&", clang::OO_Amp)
-                .Case("&=", clang::OO_AmpEqual)
-                .Case("&&", clang::OO_AmpAmp)
-                .Case("|", clang::OO_Pipe)
-                .Case("|=", clang::OO_PipeEqual)
-                .Case("||", clang::OO_PipePipe)
-                .Case("~", clang::OO_Tilde)
-                .Case("!", clang::OO_Exclaim)
-                .Case("!=", clang::OO_ExclaimEqual)
-                .Case("=", clang::OO_Equal)
-                .Case("==", clang::OO_EqualEqual)
-                .Case("<", clang::OO_Less)
-                .Case("<<", clang::OO_LessLess)
-                .Case("<<=", clang::OO_LessLessEqual)
-                .Case("<=", clang::OO_LessEqual)
-                .Case(">", clang::OO_Greater)
-                .Case(">>", clang::OO_GreaterGreater)
-                .Case(">>=", clang::OO_GreaterGreaterEqual)
-                .Case(">=", clang::OO_GreaterEqual)
-                .Case("()", clang::OO_Call)
-                .Case("[]", clang::OO_Subscript)
-                .Case(",", clang::OO_Comma)
-                .Default(clang::NUM_OVERLOADED_OPERATORS);
-
-  // We found a fitting operator, so we can exit now.
-  if (op_kind != clang::NUM_OVERLOADED_OPERATORS)
-    return true;
-
-  // After the "operator " or "operator" part is something unknown. This means
-  // it's either one of the named operators (new/delete), a conversion operator
-  // (e.g. operator bool) or a function which name starts with "operator"
-  // (e.g. void operatorbool).
-
-  // If it's a function that starts with operator it can't have a space after
-  // "operator" because identifiers can't contain spaces.
-  // E.g. "operator int" (conversion operator)
-  //  vs. "operatorint" (function with colliding name).
-  if (!space_after_operator)
-    return false; // not an operator.
-
-  // Now the operator is either one of the named operators or a conversion
-  // operator.
-  op_kind = StringSwitch<clang::OverloadedOperatorKind>(name)
-                .Case("new", clang::OO_New)
-                .Case("new[]", clang::OO_Array_New)
-                .Case("delete", clang::OO_Delete)
-                .Case("delete[]", clang::OO_Array_Delete)
-                // conversion operators hit this case.
-                .Default(clang::NUM_OVERLOADED_OPERATORS);
-
-  return true;
-}
-
-clang::AccessSpecifier
-ClangASTContext::ConvertAccessTypeToAccessSpecifier(AccessType access) {
-  switch (access) {
-  default:
-    break;
-  case eAccessNone:
-    return AS_none;
-  case eAccessPublic:
-    return AS_public;
-  case eAccessPrivate:
-    return AS_private;
-  case eAccessProtected:
-    return AS_protected;
-  }
-  return AS_none;
-}
-
-static void ParseLangArgs(LangOptions &Opts, InputKind IK, const char *triple) {
-  // FIXME: Cleanup per-file based stuff.
-
-  // Set some properties which depend solely on the input kind; it would be
-  // nice to move these to the language standard, and have the driver resolve
-  // the input kind + language standard.
-  if (IK.getLanguage() == clang::Language::Asm) {
-    Opts.AsmPreprocessor = 1;
-  } else if (IK.isObjectiveC()) {
-    Opts.ObjC = 1;
-  }
-
-  LangStandard::Kind LangStd = LangStandard::lang_unspecified;
-
-  if (LangStd == LangStandard::lang_unspecified) {
-    // Based on the base language, pick one.
-    switch (IK.getLanguage()) {
-    case clang::Language::Unknown:
-    case clang::Language::LLVM_IR:
-    case clang::Language::RenderScript:
-      llvm_unreachable("Invalid input kind!");
-    case clang::Language::OpenCL:
-      LangStd = LangStandard::lang_opencl10;
-      break;
-    case clang::Language::CUDA:
-      LangStd = LangStandard::lang_cuda;
-      break;
-    case clang::Language::Asm:
-    case clang::Language::C:
-    case clang::Language::ObjC:
-      LangStd = LangStandard::lang_gnu99;
-      break;
-    case clang::Language::CXX:
-    case clang::Language::ObjCXX:
-      LangStd = LangStandard::lang_gnucxx98;
-      break;
-    case clang::Language::HIP:
-      LangStd = LangStandard::lang_hip;
-      break;
-    }
-  }
-
-  const LangStandard &Std = LangStandard::getLangStandardForKind(LangStd);
-  Opts.LineComment = Std.hasLineComments();
-  Opts.C99 = Std.isC99();
-  Opts.CPlusPlus = Std.isCPlusPlus();
-  Opts.CPlusPlus11 = Std.isCPlusPlus11();
-  Opts.Digraphs = Std.hasDigraphs();
-  Opts.GNUMode = Std.isGNUMode();
-  Opts.GNUInline = !Std.isC99();
-  Opts.HexFloats = Std.hasHexFloats();
-  Opts.ImplicitInt = Std.hasImplicitInt();
-
-  Opts.WChar = true;
-
-  // OpenCL has some additional defaults.
-  if (LangStd == LangStandard::lang_opencl10) {
-    Opts.OpenCL = 1;
-    Opts.AltiVec = 1;
-    Opts.CXXOperatorNames = 1;
-    Opts.setLaxVectorConversions(LangOptions::LaxVectorConversionKind::All);
-  }
-
-  // OpenCL and C++ both have bool, true, false keywords.
-  Opts.Bool = Opts.OpenCL || Opts.CPlusPlus;
-
-  Opts.setValueVisibilityMode(DefaultVisibility);
-
-  // Mimicing gcc's behavior, trigraphs are only enabled if -trigraphs is
-  // specified, or -std is set to a conforming mode.
-  Opts.Trigraphs = !Opts.GNUMode;
-  Opts.CharIsSigned = ArchSpec(triple).CharIsSignedByDefault();
-  Opts.OptimizeSize = 0;
-
-  // FIXME: Eliminate this dependency.
-  //    unsigned Opt =
-  //    Args.hasArg(OPT_Os) ? 2 : getLastArgIntValue(Args, OPT_O, 0, Diags);
-  //    Opts.Optimize = Opt != 0;
-  unsigned Opt = 0;
-
-  // This is the __NO_INLINE__ define, which just depends on things like the
-  // optimization level and -fno-inline, not actually whether the backend has
-  // inlining enabled.
-  //
-  // FIXME: This is affected by other options (-fno-inline).
-  Opts.NoInlineDefine = !Opt;
-}
-
-ClangASTContext::ClangASTContext(llvm::Triple target_triple) {
-  if (!target_triple.str().empty())
-    SetTargetTriple(target_triple.str());
-  // The caller didn't pass an ASTContext so create a new one for this
-  // ClangASTContext.
-  CreateASTContext();
-}
-
-ClangASTContext::ClangASTContext(ASTContext &existing_ctxt) {
-  SetTargetTriple(existing_ctxt.getTargetInfo().getTriple().str());
-
-  m_ast_up.reset(&existing_ctxt);
-  GetASTMap().Insert(&existing_ctxt, this);
-}
-
-// Destructor
-ClangASTContext::~ClangASTContext() { Finalize(); }
-
-ConstString ClangASTContext::GetPluginNameStatic() {
-  return ConstString("clang");
-}
-
-ConstString ClangASTContext::GetPluginName() {
-  return ClangASTContext::GetPluginNameStatic();
-}
-
-uint32_t ClangASTContext::GetPluginVersion() { return 1; }
-
-lldb::TypeSystemSP ClangASTContext::CreateInstance(lldb::LanguageType language,
-                                                   lldb_private::Module *module,
-                                                   Target *target) {
-  if (!ClangASTContextSupportsLanguage(language))
-    return lldb::TypeSystemSP();
-  ArchSpec arch;
-  if (module)
-    arch = module->GetArchitecture();
-  else if (target)
-    arch = target->GetArchitecture();
-
-  if (!arch.IsValid())
-    return lldb::TypeSystemSP();
-
-  llvm::Triple triple = arch.GetTriple();
-  // LLVM wants this to be set to iOS or MacOSX; if we're working on
-  // a bare-boards type image, change the triple for llvm's benefit.
-  if (triple.getVendor() == llvm::Triple::Apple &&
-      triple.getOS() == llvm::Triple::UnknownOS) {
-    if (triple.getArch() == llvm::Triple::arm ||
-        triple.getArch() == llvm::Triple::aarch64 ||
-        triple.getArch() == llvm::Triple::aarch64_32 ||
-        triple.getArch() == llvm::Triple::thumb) {
-      triple.setOS(llvm::Triple::IOS);
-    } else {
-      triple.setOS(llvm::Triple::MacOSX);
-    }
-  }
-
-  if (module)
-    return std::make_shared<ClangASTContext>(triple);
-  else if (target && target->IsValid())
-    return std::make_shared<ClangASTContextForExpressions>(*target, triple);
-  return lldb::TypeSystemSP();
-}
-
-LanguageSet ClangASTContext::GetSupportedLanguagesForTypes() {
-  LanguageSet languages;
-  languages.Insert(lldb::eLanguageTypeC89);
-  languages.Insert(lldb::eLanguageTypeC);
-  languages.Insert(lldb::eLanguageTypeC11);
-  languages.Insert(lldb::eLanguageTypeC_plus_plus);
-  languages.Insert(lldb::eLanguageTypeC99);
-  languages.Insert(lldb::eLanguageTypeObjC);
-  languages.Insert(lldb::eLanguageTypeObjC_plus_plus);
-  languages.Insert(lldb::eLanguageTypeC_plus_plus_03);
-  languages.Insert(lldb::eLanguageTypeC_plus_plus_11);
-  languages.Insert(lldb::eLanguageTypeC11);
-  languages.Insert(lldb::eLanguageTypeC_plus_plus_14);
-  return languages;
-}
-
-LanguageSet ClangASTContext::GetSupportedLanguagesForExpressions() {
-  LanguageSet languages;
-  languages.Insert(lldb::eLanguageTypeC_plus_plus);
-  languages.Insert(lldb::eLanguageTypeObjC_plus_plus);
-  languages.Insert(lldb::eLanguageTypeC_plus_plus_03);
-  languages.Insert(lldb::eLanguageTypeC_plus_plus_11);
-  languages.Insert(lldb::eLanguageTypeC_plus_plus_14);
-  return languages;
-}
-
-void ClangASTContext::Initialize() {
-  PluginManager::RegisterPlugin(
-      GetPluginNameStatic(), "clang base AST context plug-in", CreateInstance,
-      GetSupportedLanguagesForTypes(), GetSupportedLanguagesForExpressions());
-}
-
-void ClangASTContext::Terminate() {
-  PluginManager::UnregisterPlugin(CreateInstance);
-}
-
-void ClangASTContext::Finalize() {
-  assert(m_ast_up);
-  GetASTMap().Erase(m_ast_up.get());
-  if (!m_ast_owned)
-    m_ast_up.release();
-
-  m_builtins_up.reset();
-  m_selector_table_up.reset();
-  m_identifier_table_up.reset();
-  m_target_info_up.reset();
-  m_target_options_rp.reset();
-  m_diagnostics_engine_up.reset();
-  m_source_manager_up.reset();
-  m_language_options_up.reset();
-}
-
-void ClangASTContext::setSema(Sema *s) {
-  // Ensure that the new sema actually belongs to our ASTContext.
-  assert(s == nullptr || &s->getASTContext() == m_ast_up.get());
-  m_sema = s;
-}
-
-const char *ClangASTContext::GetTargetTriple() {
-  return m_target_triple.c_str();
-}
-
-void ClangASTContext::SetTargetTriple(llvm::StringRef target_triple) {
-  m_target_triple = target_triple.str();
-}
-
-void ClangASTContext::SetExternalSource(
-    llvm::IntrusiveRefCntPtr<ExternalASTSource> &ast_source_up) {
-  ASTContext &ast = getASTContext();
-  ast.setExternalSource(ast_source_up);
-  ast.getTranslationUnitDecl()->setHasExternalLexicalStorage(true);
-}
-
-ASTContext &ClangASTContext::getASTContext() {
-  assert(m_ast_up);
-  return *m_ast_up;
-}
-
-class NullDiagnosticConsumer : public DiagnosticConsumer {
-public:
-  NullDiagnosticConsumer() {
-    m_log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS);
-  }
-
-  void HandleDiagnostic(DiagnosticsEngine::Level DiagLevel,
-                        const clang::Diagnostic &info) override {
-    if (m_log) {
-      llvm::SmallVector<char, 32> diag_str(10);
-      info.FormatDiagnostic(diag_str);
-      diag_str.push_back('\0');
-      LLDB_LOGF(m_log, "Compiler diagnostic: %s\n", diag_str.data());
-    }
-  }
-
-  DiagnosticConsumer *clone(DiagnosticsEngine &Diags) const {
-    return new NullDiagnosticConsumer();
-  }
-
-private:
-  Log *m_log;
-};
-
-void ClangASTContext::CreateASTContext() {
-  assert(!m_ast_up);
-  m_ast_owned = true;
-
-  m_language_options_up.reset(new LangOptions());
-  ParseLangArgs(*m_language_options_up, clang::Language::ObjCXX,
-                GetTargetTriple());
-
-  m_identifier_table_up.reset(
-      new IdentifierTable(*m_language_options_up, nullptr));
-  m_builtins_up.reset(new Builtin::Context());
-
-  m_selector_table_up.reset(new SelectorTable());
-
-  clang::FileSystemOptions file_system_options;
-  m_file_manager_up.reset(new clang::FileManager(
-      file_system_options, FileSystem::Instance().GetVirtualFileSystem()));
-
-  llvm::IntrusiveRefCntPtr<DiagnosticIDs> diag_id_sp(new DiagnosticIDs());
-  m_diagnostics_engine_up.reset(
-      new DiagnosticsEngine(diag_id_sp, new DiagnosticOptions()));
-
-  m_source_manager_up.reset(
-      new clang::SourceManager(*m_diagnostics_engine_up, *m_file_manager_up));
-  m_ast_up.reset(new ASTContext(*m_language_options_up, *m_source_manager_up,
-                                *m_identifier_table_up, *m_selector_table_up,
-                                *m_builtins_up));
-
-  m_diagnostic_consumer_up.reset(new NullDiagnosticConsumer);
-  m_ast_up->getDiagnostics().setClient(m_diagnostic_consumer_up.get(), false);
-
-  // This can be NULL if we don't know anything about the architecture or if
-  // the target for an architecture isn't enabled in the llvm/clang that we
-  // built
-  TargetInfo *target_info = getTargetInfo();
-  if (target_info)
-    m_ast_up->InitBuiltinTypes(*target_info);
-
-  GetASTMap().Insert(m_ast_up.get(), this);
-
-  llvm::IntrusiveRefCntPtr<clang::ExternalASTSource> ast_source_up(
-      new ClangExternalASTSourceCallbacks(*this));
-  SetExternalSource(ast_source_up);
-}
-
-ClangASTContext *ClangASTContext::GetASTContext(clang::ASTContext *ast) {
-  ClangASTContext *clang_ast = GetASTMap().Lookup(ast);
-  return clang_ast;
-}
-
-clang::MangleContext *ClangASTContext::getMangleContext() {
-  if (m_mangle_ctx_up == nullptr)
-    m_mangle_ctx_up.reset(getASTContext().createMangleContext());
-  return m_mangle_ctx_up.get();
-}
-
-std::shared_ptr<clang::TargetOptions> &ClangASTContext::getTargetOptions() {
-  if (m_target_options_rp == nullptr && !m_target_triple.empty()) {
-    m_target_options_rp = std::make_shared<clang::TargetOptions>();
-    if (m_target_options_rp != nullptr)
-      m_target_options_rp->Triple = m_target_triple;
-  }
-  return m_target_options_rp;
-}
-
-TargetInfo *ClangASTContext::getTargetInfo() {
-  // target_triple should be something like "x86_64-apple-macosx"
-  if (m_target_info_up == nullptr && !m_target_triple.empty())
-    m_target_info_up.reset(TargetInfo::CreateTargetInfo(
-        getASTContext().getDiagnostics(), getTargetOptions()));
-  return m_target_info_up.get();
-}
-
-#pragma mark Basic Types
-
-static inline bool QualTypeMatchesBitSize(const uint64_t bit_size,
-                                          ASTContext &ast, QualType qual_type) {
-  uint64_t qual_type_bit_size = ast.getTypeSize(qual_type);
-  return qual_type_bit_size == bit_size;
-}
-
-CompilerType
-ClangASTContext::GetBuiltinTypeForEncodingAndBitSize(Encoding encoding,
-                                                     size_t bit_size) {
-  ASTContext &ast = getASTContext();
-  switch (encoding) {
-  case eEncodingInvalid:
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.VoidPtrTy))
-      return GetType(ast.VoidPtrTy);
-    break;
-
-  case eEncodingUint:
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedCharTy))
-      return GetType(ast.UnsignedCharTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedShortTy))
-      return GetType(ast.UnsignedShortTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedIntTy))
-      return GetType(ast.UnsignedIntTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedLongTy))
-      return GetType(ast.UnsignedLongTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedLongLongTy))
-      return GetType(ast.UnsignedLongLongTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedInt128Ty))
-      return GetType(ast.UnsignedInt128Ty);
-    break;
-
-  case eEncodingSint:
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.SignedCharTy))
-      return GetType(ast.SignedCharTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.ShortTy))
-      return GetType(ast.ShortTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.IntTy))
-      return GetType(ast.IntTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.LongTy))
-      return GetType(ast.LongTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.LongLongTy))
-      return GetType(ast.LongLongTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.Int128Ty))
-      return GetType(ast.Int128Ty);
-    break;
-
-  case eEncodingIEEE754:
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.FloatTy))
-      return GetType(ast.FloatTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.DoubleTy))
-      return GetType(ast.DoubleTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.LongDoubleTy))
-      return GetType(ast.LongDoubleTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.HalfTy))
-      return GetType(ast.HalfTy);
-    break;
-
-  case eEncodingVector:
-    // Sanity check that bit_size is a multiple of 8's.
-    if (bit_size && !(bit_size & 0x7u))
-      return GetType(ast.getExtVectorType(ast.UnsignedCharTy, bit_size / 8));
-    break;
-  }
-
-  return CompilerType();
-}
-
-lldb::BasicType
-ClangASTContext::GetBasicTypeEnumeration(ConstString name) {
-  if (name) {
-    typedef UniqueCStringMap<lldb::BasicType> TypeNameToBasicTypeMap;
-    static TypeNameToBasicTypeMap g_type_map;
-    static llvm::once_flag g_once_flag;
-    llvm::call_once(g_once_flag, []() {
-      // "void"
-      g_type_map.Append(ConstString("void"), eBasicTypeVoid);
-
-      // "char"
-      g_type_map.Append(ConstString("char"), eBasicTypeChar);
-      g_type_map.Append(ConstString("signed char"), eBasicTypeSignedChar);
-      g_type_map.Append(ConstString("unsigned char"), eBasicTypeUnsignedChar);
-      g_type_map.Append(ConstString("wchar_t"), eBasicTypeWChar);
-      g_type_map.Append(ConstString("signed wchar_t"), eBasicTypeSignedWChar);
-      g_type_map.Append(ConstString("unsigned wchar_t"),
-                        eBasicTypeUnsignedWChar);
-      // "short"
-      g_type_map.Append(ConstString("short"), eBasicTypeShort);
-      g_type_map.Append(ConstString("short int"), eBasicTypeShort);
-      g_type_map.Append(ConstString("unsigned short"), eBasicTypeUnsignedShort);
-      g_type_map.Append(ConstString("unsigned short int"),
-                        eBasicTypeUnsignedShort);
-
-      // "int"
-      g_type_map.Append(ConstString("int"), eBasicTypeInt);
-      g_type_map.Append(ConstString("signed int"), eBasicTypeInt);
-      g_type_map.Append(ConstString("unsigned int"), eBasicTypeUnsignedInt);
-      g_type_map.Append(ConstString("unsigned"), eBasicTypeUnsignedInt);
-
-      // "long"
-      g_type_map.Append(ConstString("long"), eBasicTypeLong);
-      g_type_map.Append(ConstString("long int"), eBasicTypeLong);
-      g_type_map.Append(ConstString("unsigned long"), eBasicTypeUnsignedLong);
-      g_type_map.Append(ConstString("unsigned long int"),
-                        eBasicTypeUnsignedLong);
-
-      // "long long"
-      g_type_map.Append(ConstString("long long"), eBasicTypeLongLong);
-      g_type_map.Append(ConstString("long long int"), eBasicTypeLongLong);
-      g_type_map.Append(ConstString("unsigned long long"),
-                        eBasicTypeUnsignedLongLong);
-      g_type_map.Append(ConstString("unsigned long long int"),
-                        eBasicTypeUnsignedLongLong);
-
-      // "int128"
-      g_type_map.Append(ConstString("__int128_t"), eBasicTypeInt128);
-      g_type_map.Append(ConstString("__uint128_t"), eBasicTypeUnsignedInt128);
-
-      // Miscellaneous
-      g_type_map.Append(ConstString("bool"), eBasicTypeBool);
-      g_type_map.Append(ConstString("float"), eBasicTypeFloat);
-      g_type_map.Append(ConstString("double"), eBasicTypeDouble);
-      g_type_map.Append(ConstString("long double"), eBasicTypeLongDouble);
-      g_type_map.Append(ConstString("id"), eBasicTypeObjCID);
-      g_type_map.Append(ConstString("SEL"), eBasicTypeObjCSel);
-      g_type_map.Append(ConstString("nullptr"), eBasicTypeNullPtr);
-      g_type_map.Sort();
-    });
-
-    return g_type_map.Find(name, eBasicTypeInvalid);
-  }
-  return eBasicTypeInvalid;
-}
-
-uint32_t ClangASTContext::GetPointerByteSize() {
-  if (m_pointer_byte_size == 0)
-    if (auto size = GetBasicType(lldb::eBasicTypeVoid)
-                        .GetPointerType()
-                        .GetByteSize(nullptr))
-      m_pointer_byte_size = *size;
-  return m_pointer_byte_size;
-}
-
-CompilerType ClangASTContext::GetBasicType(lldb::BasicType basic_type) {
-  clang::ASTContext &ast = getASTContext();
-
-  lldb::opaque_compiler_type_t clang_type =
-      GetOpaqueCompilerType(&ast, basic_type);
-
-  if (clang_type)
-    return CompilerType(this, clang_type);
-  return CompilerType();
-}
-
-CompilerType ClangASTContext::GetBuiltinTypeForDWARFEncodingAndBitSize(
-    llvm::StringRef type_name, uint32_t dw_ate, uint32_t bit_size) {
-  ASTContext &ast = getASTContext();
-
-  switch (dw_ate) {
-  default:
-    break;
-
-  case DW_ATE_address:
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.VoidPtrTy))
-      return GetType(ast.VoidPtrTy);
-    break;
-
-  case DW_ATE_boolean:
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.BoolTy))
-      return GetType(ast.BoolTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedCharTy))
-      return GetType(ast.UnsignedCharTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedShortTy))
-      return GetType(ast.UnsignedShortTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedIntTy))
-      return GetType(ast.UnsignedIntTy);
-    break;
-
-  case DW_ATE_lo_user:
-    // This has been seen to mean DW_AT_complex_integer
-    if (type_name.contains("complex")) {
-      CompilerType complex_int_clang_type =
-          GetBuiltinTypeForDWARFEncodingAndBitSize("int", DW_ATE_signed,
-                                                   bit_size / 2);
-      return GetType(
-          ast.getComplexType(ClangUtil::GetQualType(complex_int_clang_type)));
-    }
-    break;
-
-  case DW_ATE_complex_float:
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.FloatComplexTy))
-      return GetType(ast.FloatComplexTy);
-    else if (QualTypeMatchesBitSize(bit_size, ast, ast.DoubleComplexTy))
-      return GetType(ast.DoubleComplexTy);
-    else if (QualTypeMatchesBitSize(bit_size, ast, ast.LongDoubleComplexTy))
-      return GetType(ast.LongDoubleComplexTy);
-    else {
-      CompilerType complex_float_clang_type =
-          GetBuiltinTypeForDWARFEncodingAndBitSize("float", DW_ATE_float,
-                                                   bit_size / 2);
-      return GetType(
-          ast.getComplexType(ClangUtil::GetQualType(complex_float_clang_type)));
-    }
-    break;
-
-  case DW_ATE_float:
-    if (type_name == "float" &&
-        QualTypeMatchesBitSize(bit_size, ast, ast.FloatTy))
-      return GetType(ast.FloatTy);
-    if (type_name == "double" &&
-        QualTypeMatchesBitSize(bit_size, ast, ast.DoubleTy))
-      return GetType(ast.DoubleTy);
-    if (type_name == "long double" &&
-        QualTypeMatchesBitSize(bit_size, ast, ast.LongDoubleTy))
-      return GetType(ast.LongDoubleTy);
-    // Fall back to not requiring a name match
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.FloatTy))
-      return GetType(ast.FloatTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.DoubleTy))
-      return GetType(ast.DoubleTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.LongDoubleTy))
-      return GetType(ast.LongDoubleTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.HalfTy))
-      return GetType(ast.HalfTy);
-    break;
-
-  case DW_ATE_signed:
-    if (!type_name.empty()) {
-      if (type_name == "wchar_t" &&
-          QualTypeMatchesBitSize(bit_size, ast, ast.WCharTy) &&
-          (getTargetInfo() &&
-           TargetInfo::isTypeSigned(getTargetInfo()->getWCharType())))
-        return GetType(ast.WCharTy);
-      if (type_name == "void" &&
-          QualTypeMatchesBitSize(bit_size, ast, ast.VoidTy))
-        return GetType(ast.VoidTy);
-      if (type_name.contains("long long") &&
-          QualTypeMatchesBitSize(bit_size, ast, ast.LongLongTy))
-        return GetType(ast.LongLongTy);
-      if (type_name.contains("long") &&
-          QualTypeMatchesBitSize(bit_size, ast, ast.LongTy))
-        return GetType(ast.LongTy);
-      if (type_name.contains("short") &&
-          QualTypeMatchesBitSize(bit_size, ast, ast.ShortTy))
-        return GetType(ast.ShortTy);
-      if (type_name.contains("char")) {
-        if (QualTypeMatchesBitSize(bit_size, ast, ast.CharTy))
-          return GetType(ast.CharTy);
-        if (QualTypeMatchesBitSize(bit_size, ast, ast.SignedCharTy))
-          return GetType(ast.SignedCharTy);
-      }
-      if (type_name.contains("int")) {
-        if (QualTypeMatchesBitSize(bit_size, ast, ast.IntTy))
-          return GetType(ast.IntTy);
-        if (QualTypeMatchesBitSize(bit_size, ast, ast.Int128Ty))
-          return GetType(ast.Int128Ty);
-      }
-    }
-    // We weren't able to match up a type name, just search by size
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.CharTy))
-      return GetType(ast.CharTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.ShortTy))
-      return GetType(ast.ShortTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.IntTy))
-      return GetType(ast.IntTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.LongTy))
-      return GetType(ast.LongTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.LongLongTy))
-      return GetType(ast.LongLongTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.Int128Ty))
-      return GetType(ast.Int128Ty);
-    break;
-
-  case DW_ATE_signed_char:
-    if (ast.getLangOpts().CharIsSigned && type_name == "char") {
-      if (QualTypeMatchesBitSize(bit_size, ast, ast.CharTy))
-        return GetType(ast.CharTy);
-    }
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.SignedCharTy))
-      return GetType(ast.SignedCharTy);
-    break;
-
-  case DW_ATE_unsigned:
-    if (!type_name.empty()) {
-      if (type_name == "wchar_t") {
-        if (QualTypeMatchesBitSize(bit_size, ast, ast.WCharTy)) {
-          if (!(getTargetInfo() &&
-                TargetInfo::isTypeSigned(getTargetInfo()->getWCharType())))
-            return GetType(ast.WCharTy);
-        }
-      }
-      if (type_name.contains("long long")) {
-        if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedLongLongTy))
-          return GetType(ast.UnsignedLongLongTy);
-      } else if (type_name.contains("long")) {
-        if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedLongTy))
-          return GetType(ast.UnsignedLongTy);
-      } else if (type_name.contains("short")) {
-        if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedShortTy))
-          return GetType(ast.UnsignedShortTy);
-      } else if (type_name.contains("char")) {
-        if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedCharTy))
-          return GetType(ast.UnsignedCharTy);
-      } else if (type_name.contains("int")) {
-        if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedIntTy))
-          return GetType(ast.UnsignedIntTy);
-        if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedInt128Ty))
-          return GetType(ast.UnsignedInt128Ty);
-      }
-    }
-    // We weren't able to match up a type name, just search by size
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedCharTy))
-      return GetType(ast.UnsignedCharTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedShortTy))
-      return GetType(ast.UnsignedShortTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedIntTy))
-      return GetType(ast.UnsignedIntTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedLongTy))
-      return GetType(ast.UnsignedLongTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedLongLongTy))
-      return GetType(ast.UnsignedLongLongTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedInt128Ty))
-      return GetType(ast.UnsignedInt128Ty);
-    break;
-
-  case DW_ATE_unsigned_char:
-    if (!ast.getLangOpts().CharIsSigned && type_name == "char") {
-      if (QualTypeMatchesBitSize(bit_size, ast, ast.CharTy))
-        return GetType(ast.CharTy);
-    }
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedCharTy))
-      return GetType(ast.UnsignedCharTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedShortTy))
-      return GetType(ast.UnsignedShortTy);
-    break;
-
-  case DW_ATE_imaginary_float:
-    break;
-
-  case DW_ATE_UTF:
-    if (!type_name.empty()) {
-      if (type_name == "char16_t")
-        return GetType(ast.Char16Ty);
-      if (type_name == "char32_t")
-        return GetType(ast.Char32Ty);
-      if (type_name == "char8_t")
-        return GetType(ast.Char8Ty);
-    }
-    break;
-  }
-  // This assert should fire for anything that we don't catch above so we know
-  // to fix any issues we run into.
-  if (!type_name.empty()) {
-    std::string type_name_str = type_name.str();
-    Host::SystemLog(Host::eSystemLogError,
-                    "error: need to add support for DW_TAG_base_type '%s' "
-                    "encoded with DW_ATE = 0x%x, bit_size = %u\n",
-                    type_name_str.c_str(), dw_ate, bit_size);
-  } else {
-    Host::SystemLog(Host::eSystemLogError, "error: need to add support for "
-                                           "DW_TAG_base_type encoded with "
-                                           "DW_ATE = 0x%x, bit_size = %u\n",
-                    dw_ate, bit_size);
-  }
-  return CompilerType();
-}
-
-CompilerType ClangASTContext::GetCStringType(bool is_const) {
-  ASTContext &ast = getASTContext();
-  QualType char_type(ast.CharTy);
-
-  if (is_const)
-    char_type.addConst();
-
-  return GetType(ast.getPointerType(char_type));
-}
-
-bool ClangASTContext::AreTypesSame(CompilerType type1, CompilerType type2,
-                                   bool ignore_qualifiers) {
-  ClangASTContext *ast =
-      llvm::dyn_cast_or_null<ClangASTContext>(type1.GetTypeSystem());
-  if (!ast || ast != type2.GetTypeSystem())
-    return false;
-
-  if (type1.GetOpaqueQualType() == type2.GetOpaqueQualType())
-    return true;
-
-  QualType type1_qual = ClangUtil::GetQualType(type1);
-  QualType type2_qual = ClangUtil::GetQualType(type2);
-
-  if (ignore_qualifiers) {
-    type1_qual = type1_qual.getUnqualifiedType();
-    type2_qual = type2_qual.getUnqualifiedType();
-  }
-
-  return ast->getASTContext().hasSameType(type1_qual, type2_qual);
-}
-
-CompilerType ClangASTContext::GetTypeForDecl(void *opaque_decl) {
-  if (!opaque_decl)
-    return CompilerType();
-
-  clang::Decl *decl = static_cast<clang::Decl *>(opaque_decl);
-  if (auto *named_decl = llvm::dyn_cast<clang::NamedDecl>(decl))
-    return GetTypeForDecl(named_decl);
-  return CompilerType();
-}
-
-CompilerDeclContext ClangASTContext::CreateDeclContext(DeclContext *ctx) {
-  // Check that the DeclContext actually belongs to this ASTContext.
-  assert(&ctx->getParentASTContext() == &getASTContext());
-  return CompilerDeclContext(this, ctx);
-}
-
-CompilerType ClangASTContext::GetTypeForDecl(clang::NamedDecl *decl) {
-  if (clang::ObjCInterfaceDecl *interface_decl =
-      llvm::dyn_cast<clang::ObjCInterfaceDecl>(decl))
-    return GetTypeForDecl(interface_decl);
-  if (clang::TagDecl *tag_decl = llvm::dyn_cast<clang::TagDecl>(decl))
-    return GetTypeForDecl(tag_decl);
-  return CompilerType();
-}
-
-CompilerType ClangASTContext::GetTypeForDecl(TagDecl *decl) {
-  return GetType(getASTContext().getTagDeclType(decl));
-}
-
-CompilerType ClangASTContext::GetTypeForDecl(ObjCInterfaceDecl *decl) {
-  return GetType(getASTContext().getObjCInterfaceType(decl));
-}
-
-#pragma mark Structure, Unions, Classes
-
-CompilerType ClangASTContext::CreateRecordType(DeclContext *decl_ctx,
-                                               AccessType access_type,
-                                               llvm::StringRef name, int kind,
-                                               LanguageType language,
-                                               ClangASTMetadata *metadata,
-                                               bool exports_symbols) {
-  ASTContext &ast = getASTContext();
-
-  if (decl_ctx == nullptr)
-    decl_ctx = ast.getTranslationUnitDecl();
-
-  if (language == eLanguageTypeObjC ||
-      language == eLanguageTypeObjC_plus_plus) {
-    bool isForwardDecl = true;
-    bool isInternal = false;
-    return CreateObjCClass(name, decl_ctx, isForwardDecl, isInternal, metadata);
-  }
-
-  // NOTE: Eventually CXXRecordDecl will be merged back into RecordDecl and
-  // we will need to update this code. I was told to currently always use the
-  // CXXRecordDecl class since we often don't know from debug information if
-  // something is struct or a class, so we default to always use the more
-  // complete definition just in case.
-
-  bool has_name = !name.empty();
-
-  CXXRecordDecl *decl = CXXRecordDecl::Create(
-      ast, (TagDecl::TagKind)kind, decl_ctx, SourceLocation(), SourceLocation(),
-      has_name ? &ast.Idents.get(name) : nullptr);
-
-  if (!has_name) {
-    // In C++ a lambda is also represented as an unnamed class. This is
-    // different from an *anonymous class* that the user wrote:
-    //
-    // struct A {
-    //  // anonymous class (GNU/MSVC extension)
-    //  struct {
-    //    int x;
-    //  };
-    //  // unnamed class within a class
-    //  struct {
-    //    int y;
-    //  } B;
-    // };
-    //
-    // void f() {
-    //    // unammed class outside of a class
-    //    struct {
-    //      int z;
-    //    } C;
-    // }
-    //
-    // Anonymous classes is a GNU/MSVC extension that clang supports. It
-    // requires the anonymous class be embedded within a class. So the new
-    // heuristic verifies this condition.
-    if (isa<CXXRecordDecl>(decl_ctx) && exports_symbols)
-      decl->setAnonymousStructOrUnion(true);
-  }
-
-  if (decl) {
-    if (metadata)
-      SetMetadata(decl, *metadata);
-
-    if (access_type != eAccessNone)
-      decl->setAccess(ConvertAccessTypeToAccessSpecifier(access_type));
-
-    if (decl_ctx)
-      decl_ctx->addDecl(decl);
-
-    return GetType(ast.getTagDeclType(decl));
-  }
-  return CompilerType();
-}
-
-namespace {
-  bool IsValueParam(const clang::TemplateArgument &argument) {
-    return argument.getKind() == TemplateArgument::Integral;
-  }
-}
-
-static TemplateParameterList *CreateTemplateParameterList(
-    ASTContext *ast,
-    const ClangASTContext::TemplateParameterInfos &template_param_infos,
-    llvm::SmallVector<NamedDecl *, 8> &template_param_decls) {
-  const bool parameter_pack = false;
-  const bool is_typename = false;
-  const unsigned depth = 0;
-  const size_t num_template_params = template_param_infos.args.size();
-  DeclContext *const decl_context =
-      ast->getTranslationUnitDecl(); // Is this the right decl context?,
-  for (size_t i = 0; i < num_template_params; ++i) {
-    const char *name = template_param_infos.names[i];
-
-    IdentifierInfo *identifier_info = nullptr;
-    if (name && name[0])
-      identifier_info = &ast->Idents.get(name);
-    if (IsValueParam(template_param_infos.args[i])) {
-      template_param_decls.push_back(NonTypeTemplateParmDecl::Create(
-          *ast, decl_context,
-          SourceLocation(), SourceLocation(), depth, i, identifier_info,
-          template_param_infos.args[i].getIntegralType(), parameter_pack,
-          nullptr));
-
-    } else {
-      template_param_decls.push_back(TemplateTypeParmDecl::Create(
-          *ast, decl_context,
-          SourceLocation(), SourceLocation(), depth, i, identifier_info,
-          is_typename, parameter_pack));
-    }
-  }
-
-  if (template_param_infos.packed_args) {
-    IdentifierInfo *identifier_info = nullptr;
-    if (template_param_infos.pack_name && template_param_infos.pack_name[0])
-      identifier_info = &ast->Idents.get(template_param_infos.pack_name);
-    const bool parameter_pack_true = true;
-
-    if (!template_param_infos.packed_args->args.empty() &&
-        IsValueParam(template_param_infos.packed_args->args[0])) {
-      template_param_decls.push_back(NonTypeTemplateParmDecl::Create(
-          *ast, decl_context, SourceLocation(), SourceLocation(), depth,
-          num_template_params, identifier_info,
-          template_param_infos.packed_args->args[0].getIntegralType(),
-          parameter_pack_true, nullptr));
-    } else {
-      template_param_decls.push_back(TemplateTypeParmDecl::Create(
-          *ast, decl_context, SourceLocation(), SourceLocation(), depth,
-          num_template_params, identifier_info, is_typename,
-          parameter_pack_true));
-    }
-  }
-  clang::Expr *const requires_clause = nullptr; // TODO: Concepts
-  TemplateParameterList *template_param_list = TemplateParameterList::Create(
-      *ast, SourceLocation(), SourceLocation(), template_param_decls,
-      SourceLocation(), requires_clause);
-  return template_param_list;
-}
-
-clang::FunctionTemplateDecl *ClangASTContext::CreateFunctionTemplateDecl(
-    clang::DeclContext *decl_ctx, clang::FunctionDecl *func_decl,
-    const char *name, const TemplateParameterInfos &template_param_infos) {
-  //    /// Create a function template node.
-  ASTContext &ast = getASTContext();
-
-  llvm::SmallVector<NamedDecl *, 8> template_param_decls;
-
-  TemplateParameterList *template_param_list = CreateTemplateParameterList(
-      &ast, template_param_infos, template_param_decls);
-  FunctionTemplateDecl *func_tmpl_decl = FunctionTemplateDecl::Create(
-      ast, decl_ctx, func_decl->getLocation(), func_decl->getDeclName(),
-      template_param_list, func_decl);
-
-  for (size_t i = 0, template_param_decl_count = template_param_decls.size();
-       i < template_param_decl_count; ++i) {
-    // TODO: verify which decl context we should put template_param_decls into..
-    template_param_decls[i]->setDeclContext(func_decl);
-  }
-  // Function templates inside a record need to have an access specifier.
-  // It doesn't matter what access specifier we give the template as LLDB
-  // anyway allows accessing everything inside a record.
-  if (decl_ctx->isRecord())
-    func_tmpl_decl->setAccess(clang::AccessSpecifier::AS_public);
-
-  return func_tmpl_decl;
-}
-
-void ClangASTContext::CreateFunctionTemplateSpecializationInfo(
-    FunctionDecl *func_decl, clang::FunctionTemplateDecl *func_tmpl_decl,
-    const TemplateParameterInfos &infos) {
-  TemplateArgumentList *template_args_ptr =
-      TemplateArgumentList::CreateCopy(func_decl->getASTContext(), infos.args);
-
-  func_decl->setFunctionTemplateSpecialization(func_tmpl_decl,
-                                               template_args_ptr, nullptr);
-}
-
-ClassTemplateDecl *ClangASTContext::CreateClassTemplateDecl(
-    DeclContext *decl_ctx, lldb::AccessType access_type, const char *class_name,
-    int kind, const TemplateParameterInfos &template_param_infos) {
-  ASTContext &ast = getASTContext();
-
-  ClassTemplateDecl *class_template_decl = nullptr;
-  if (decl_ctx == nullptr)
-    decl_ctx = ast.getTranslationUnitDecl();
-
-  IdentifierInfo &identifier_info = ast.Idents.get(class_name);
-  DeclarationName decl_name(&identifier_info);
-
-  clang::DeclContext::lookup_result result = decl_ctx->lookup(decl_name);
-
-  for (NamedDecl *decl : result) {
-    class_template_decl = dyn_cast<clang::ClassTemplateDecl>(decl);
-    if (class_template_decl)
-      return class_template_decl;
-  }
-
-  llvm::SmallVector<NamedDecl *, 8> template_param_decls;
-
-  TemplateParameterList *template_param_list = CreateTemplateParameterList(
-      &ast, template_param_infos, template_param_decls);
-
-  CXXRecordDecl *template_cxx_decl = CXXRecordDecl::Create(
-      ast, (TagDecl::TagKind)kind,
-      decl_ctx, // What decl context do we use here? TU? The actual decl
-                // context?
-      SourceLocation(), SourceLocation(), &identifier_info);
-
-  for (size_t i = 0, template_param_decl_count = template_param_decls.size();
-       i < template_param_decl_count; ++i) {
-    template_param_decls[i]->setDeclContext(template_cxx_decl);
-  }
-
-  // With templated classes, we say that a class is templated with
-  // specializations, but that the bare class has no functions.
-  // template_cxx_decl->startDefinition();
-  // template_cxx_decl->completeDefinition();
-
-  class_template_decl = ClassTemplateDecl::Create(
-      ast,
-      decl_ctx, // What decl context do we use here? TU? The actual decl
-                // context?
-      SourceLocation(), decl_name, template_param_list, template_cxx_decl);
-  template_cxx_decl->setDescribedClassTemplate(class_template_decl);
-
-  if (class_template_decl) {
-    if (access_type != eAccessNone)
-      class_template_decl->setAccess(
-          ConvertAccessTypeToAccessSpecifier(access_type));
-
-    // if (TagDecl *ctx_tag_decl = dyn_cast<TagDecl>(decl_ctx))
-    //    CompleteTagDeclarationDefinition(GetTypeForDecl(ctx_tag_decl));
-
-    decl_ctx->addDecl(class_template_decl);
-
-#ifdef LLDB_CONFIGURATION_DEBUG
-    VerifyDecl(class_template_decl);
-#endif
-  }
-
-  return class_template_decl;
-}
-
-TemplateTemplateParmDecl *
-ClangASTContext::CreateTemplateTemplateParmDecl(const char *template_name) {
-  ASTContext &ast = getASTContext();
-
-  auto *decl_ctx = ast.getTranslationUnitDecl();
-
-  IdentifierInfo &identifier_info = ast.Idents.get(template_name);
-  llvm::SmallVector<NamedDecl *, 8> template_param_decls;
-
-  ClangASTContext::TemplateParameterInfos template_param_infos;
-  TemplateParameterList *template_param_list = CreateTemplateParameterList(
-      &ast, template_param_infos, template_param_decls);
-
-  // LLDB needs to create those decls only to be able to display a
-  // type that includes a template template argument. Only the name matters for
-  // this purpose, so we use dummy values for the other characterisitcs of the
-  // type.
-  return TemplateTemplateParmDecl::Create(
-      ast, decl_ctx, SourceLocation(),
-      /*Depth*/ 0, /*Position*/ 0,
-      /*IsParameterPack*/ false, &identifier_info, template_param_list);
-}
-
-ClassTemplateSpecializationDecl *
-ClangASTContext::CreateClassTemplateSpecializationDecl(
-    DeclContext *decl_ctx, ClassTemplateDecl *class_template_decl, int kind,
-    const TemplateParameterInfos &template_param_infos) {
-  ASTContext &ast = getASTContext();
-  llvm::SmallVector<clang::TemplateArgument, 2> args(
-      template_param_infos.args.size() +
-      (template_param_infos.packed_args ? 1 : 0));
-  std::copy(template_param_infos.args.begin(), template_param_infos.args.end(),
-            args.begin());
-  if (template_param_infos.packed_args) {
-    args[args.size() - 1] = TemplateArgument::CreatePackCopy(
-        ast, template_param_infos.packed_args->args);
-  }
-  ClassTemplateSpecializationDecl *class_template_specialization_decl =
-      ClassTemplateSpecializationDecl::Create(
-          ast, (TagDecl::TagKind)kind, decl_ctx, SourceLocation(),
-          SourceLocation(), class_template_decl, args, nullptr);
-
-  class_template_specialization_decl->setSpecializationKind(
-      TSK_ExplicitSpecialization);
-
-  return class_template_specialization_decl;
-}
-
-CompilerType ClangASTContext::CreateClassTemplateSpecializationType(
-    ClassTemplateSpecializationDecl *class_template_specialization_decl) {
-  if (class_template_specialization_decl) {
-    ASTContext &ast = getASTContext();
-    return GetType(ast.getTagDeclType(class_template_specialization_decl));
-  }
-  return CompilerType();
-}
-
-static inline bool check_op_param(bool is_method,
-                                  clang::OverloadedOperatorKind op_kind,
-                                  bool unary, bool binary,
-                                  uint32_t num_params) {
-  // Special-case call since it can take any number of operands
-  if (op_kind == OO_Call)
-    return true;
-
-  // The parameter count doesn't include "this"
-  if (is_method)
-    ++num_params;
-  if (num_params == 1)
-    return unary;
-  if (num_params == 2)
-    return binary;
-  else
-    return false;
-}
-
-bool ClangASTContext::CheckOverloadedOperatorKindParameterCount(
-    bool is_method, clang::OverloadedOperatorKind op_kind,
-    uint32_t num_params) {
-  switch (op_kind) {
-  default:
-    break;
-  // C++ standard allows any number of arguments to new/delete
-  case OO_New:
-  case OO_Array_New:
-  case OO_Delete:
-  case OO_Array_Delete:
-    return true;
-  }
-
-#define OVERLOADED_OPERATOR(Name, Spelling, Token, Unary, Binary, MemberOnly)  \
-  case OO_##Name:                                                              \
-    return check_op_param(is_method, op_kind, Unary, Binary, num_params);
-  switch (op_kind) {
-#include "clang/Basic/OperatorKinds.def"
-  default:
-    break;
-  }
-  return false;
-}
-
-clang::AccessSpecifier
-ClangASTContext::UnifyAccessSpecifiers(clang::AccessSpecifier lhs,
-                                       clang::AccessSpecifier rhs) {
-  // Make the access equal to the stricter of the field and the nested field's
-  // access
-  if (lhs == AS_none || rhs == AS_none)
-    return AS_none;
-  if (lhs == AS_private || rhs == AS_private)
-    return AS_private;
-  if (lhs == AS_protected || rhs == AS_protected)
-    return AS_protected;
-  return AS_public;
-}
-
-bool ClangASTContext::FieldIsBitfield(FieldDecl *field,
-                                      uint32_t &bitfield_bit_size) {
-  ASTContext &ast = getASTContext();
-  if (field == nullptr)
-    return false;
-
-  if (field->isBitField()) {
-    Expr *bit_width_expr = field->getBitWidth();
-    if (bit_width_expr) {
-      llvm::APSInt bit_width_apsint;
-      if (bit_width_expr->isIntegerConstantExpr(bit_width_apsint, ast)) {
-        bitfield_bit_size = bit_width_apsint.getLimitedValue(UINT32_MAX);
-        return true;
-      }
-    }
-  }
-  return false;
-}
-
-bool ClangASTContext::RecordHasFields(const RecordDecl *record_decl) {
-  if (record_decl == nullptr)
-    return false;
-
-  if (!record_decl->field_empty())
-    return true;
-
-  // No fields, lets check this is a CXX record and check the base classes
-  const CXXRecordDecl *cxx_record_decl = dyn_cast<CXXRecordDecl>(record_decl);
-  if (cxx_record_decl) {
-    CXXRecordDecl::base_class_const_iterator base_class, base_class_end;
-    for (base_class = cxx_record_decl->bases_begin(),
-        base_class_end = cxx_record_decl->bases_end();
-         base_class != base_class_end; ++base_class) {
-      const CXXRecordDecl *base_class_decl = cast<CXXRecordDecl>(
-          base_class->getType()->getAs<RecordType>()->getDecl());
-      if (RecordHasFields(base_class_decl))
-        return true;
-    }
-  }
-  return false;
-}
-
-#pragma mark Objective-C Classes
-
-CompilerType ClangASTContext::CreateObjCClass(llvm::StringRef name,
-                                              DeclContext *decl_ctx,
-                                              bool isForwardDecl,
-                                              bool isInternal,
-                                              ClangASTMetadata *metadata) {
-  ASTContext &ast = getASTContext();
-  assert(!name.empty());
-  if (decl_ctx == nullptr)
-    decl_ctx = ast.getTranslationUnitDecl();
-
-  ObjCInterfaceDecl *decl = ObjCInterfaceDecl::Create(
-      ast, decl_ctx, SourceLocation(), &ast.Idents.get(name), nullptr, nullptr,
-      SourceLocation(),
-      /*isForwardDecl,*/
-      isInternal);
-
-  if (decl && metadata)
-    SetMetadata(decl, *metadata);
-
-  return GetType(ast.getObjCInterfaceType(decl));
-}
-
-static inline bool BaseSpecifierIsEmpty(const CXXBaseSpecifier *b) {
-  return !ClangASTContext::RecordHasFields(b->getType()->getAsCXXRecordDecl());
-}
-
-uint32_t
-ClangASTContext::GetNumBaseClasses(const CXXRecordDecl *cxx_record_decl,
-                                   bool omit_empty_base_classes) {
-  uint32_t num_bases = 0;
-  if (cxx_record_decl) {
-    if (omit_empty_base_classes) {
-      CXXRecordDecl::base_class_const_iterator base_class, base_class_end;
-      for (base_class = cxx_record_decl->bases_begin(),
-          base_class_end = cxx_record_decl->bases_end();
-           base_class != base_class_end; ++base_class) {
-        // Skip empty base classes
-        if (omit_empty_base_classes) {
-          if (BaseSpecifierIsEmpty(base_class))
-            continue;
-        }
-        ++num_bases;
-      }
-    } else
-      num_bases = cxx_record_decl->getNumBases();
-  }
-  return num_bases;
-}
-
-#pragma mark Namespace Declarations
-
-NamespaceDecl *ClangASTContext::GetUniqueNamespaceDeclaration(
-    const char *name, DeclContext *decl_ctx, bool is_inline) {
-  NamespaceDecl *namespace_decl = nullptr;
-  ASTContext &ast = getASTContext();
-  TranslationUnitDecl *translation_unit_decl = ast.getTranslationUnitDecl();
-  if (decl_ctx == nullptr)
-    decl_ctx = translation_unit_decl;
-
-  if (name) {
-    IdentifierInfo &identifier_info = ast.Idents.get(name);
-    DeclarationName decl_name(&identifier_info);
-    clang::DeclContext::lookup_result result = decl_ctx->lookup(decl_name);
-    for (NamedDecl *decl : result) {
-      namespace_decl = dyn_cast<clang::NamespaceDecl>(decl);
-      if (namespace_decl)
-        return namespace_decl;
-    }
-
-    namespace_decl =
-        NamespaceDecl::Create(ast, decl_ctx, is_inline, SourceLocation(),
-                              SourceLocation(), &identifier_info, nullptr);
-
-    decl_ctx->addDecl(namespace_decl);
-  } else {
-    if (decl_ctx == translation_unit_decl) {
-      namespace_decl = translation_unit_decl->getAnonymousNamespace();
-      if (namespace_decl)
-        return namespace_decl;
-
-      namespace_decl =
-          NamespaceDecl::Create(ast, decl_ctx, false, SourceLocation(),
-                                SourceLocation(), nullptr, nullptr);
-      translation_unit_decl->setAnonymousNamespace(namespace_decl);
-      translation_unit_decl->addDecl(namespace_decl);
-      assert(namespace_decl == translation_unit_decl->getAnonymousNamespace());
-    } else {
-      NamespaceDecl *parent_namespace_decl = cast<NamespaceDecl>(decl_ctx);
-      if (parent_namespace_decl) {
-        namespace_decl = parent_namespace_decl->getAnonymousNamespace();
-        if (namespace_decl)
-          return namespace_decl;
-        namespace_decl =
-            NamespaceDecl::Create(ast, decl_ctx, false, SourceLocation(),
-                                  SourceLocation(), nullptr, nullptr);
-        parent_namespace_decl->setAnonymousNamespace(namespace_decl);
-        parent_namespace_decl->addDecl(namespace_decl);
-        assert(namespace_decl ==
-               parent_namespace_decl->getAnonymousNamespace());
-      } else {
-        assert(false && "GetUniqueNamespaceDeclaration called with no name and "
-                        "no namespace as decl_ctx");
-      }
-    }
-  }
-#ifdef LLDB_CONFIGURATION_DEBUG
-  VerifyDecl(namespace_decl);
-#endif
-  return namespace_decl;
-}
-
-clang::BlockDecl *
-ClangASTContext::CreateBlockDeclaration(clang::DeclContext *ctx) {
-  if (ctx != nullptr) {
-    clang::BlockDecl *decl =
-        clang::BlockDecl::Create(getASTContext(), ctx, clang::SourceLocation());
-    ctx->addDecl(decl);
-    return decl;
-  }
-  return nullptr;
-}
-
-clang::DeclContext *FindLCABetweenDecls(clang::DeclContext *left,
-                                        clang::DeclContext *right,
-                                        clang::DeclContext *root) {
-  if (root == nullptr)
-    return nullptr;
-
-  std::set<clang::DeclContext *> path_left;
-  for (clang::DeclContext *d = left; d != nullptr; d = d->getParent())
-    path_left.insert(d);
-
-  for (clang::DeclContext *d = right; d != nullptr; d = d->getParent())
-    if (path_left.find(d) != path_left.end())
-      return d;
-
-  return nullptr;
-}
-
-clang::UsingDirectiveDecl *ClangASTContext::CreateUsingDirectiveDeclaration(
-    clang::DeclContext *decl_ctx, clang::NamespaceDecl *ns_decl) {
-  if (decl_ctx != nullptr && ns_decl != nullptr) {
-    auto *translation_unit = getASTContext().getTranslationUnitDecl();
-    clang::UsingDirectiveDecl *using_decl = clang::UsingDirectiveDecl::Create(
-        getASTContext(), decl_ctx, clang::SourceLocation(),
-        clang::SourceLocation(), clang::NestedNameSpecifierLoc(),
-        clang::SourceLocation(), ns_decl,
-        FindLCABetweenDecls(decl_ctx, ns_decl, translation_unit));
-    decl_ctx->addDecl(using_decl);
-    return using_decl;
-  }
-  return nullptr;
-}
-
-clang::UsingDecl *
-ClangASTContext::CreateUsingDeclaration(clang::DeclContext *current_decl_ctx,
-                                        clang::NamedDecl *target) {
-  if (current_decl_ctx != nullptr && target != nullptr) {
-    clang::UsingDecl *using_decl = clang::UsingDecl::Create(
-        getASTContext(), current_decl_ctx, clang::SourceLocation(),
-        clang::NestedNameSpecifierLoc(), clang::DeclarationNameInfo(), false);
-    clang::UsingShadowDecl *shadow_decl = clang::UsingShadowDecl::Create(
-        getASTContext(), current_decl_ctx, clang::SourceLocation(), using_decl,
-        target);
-    using_decl->addShadowDecl(shadow_decl);
-    current_decl_ctx->addDecl(using_decl);
-    return using_decl;
-  }
-  return nullptr;
-}
-
-clang::VarDecl *ClangASTContext::CreateVariableDeclaration(
-    clang::DeclContext *decl_context, const char *name, clang::QualType type) {
-  if (decl_context != nullptr) {
-    clang::VarDecl *var_decl = clang::VarDecl::Create(
-        getASTContext(), decl_context, clang::SourceLocation(),
-        clang::SourceLocation(),
-        name && name[0] ? &getASTContext().Idents.getOwn(name) : nullptr, type,
-        nullptr, clang::SC_None);
-    var_decl->setAccess(clang::AS_public);
-    decl_context->addDecl(var_decl);
-    return var_decl;
-  }
-  return nullptr;
-}
-
-lldb::opaque_compiler_type_t
-ClangASTContext::GetOpaqueCompilerType(clang::ASTContext *ast,
-                                       lldb::BasicType basic_type) {
-  switch (basic_type) {
-  case eBasicTypeVoid:
-    return ast->VoidTy.getAsOpaquePtr();
-  case eBasicTypeChar:
-    return ast->CharTy.getAsOpaquePtr();
-  case eBasicTypeSignedChar:
-    return ast->SignedCharTy.getAsOpaquePtr();
-  case eBasicTypeUnsignedChar:
-    return ast->UnsignedCharTy.getAsOpaquePtr();
-  case eBasicTypeWChar:
-    return ast->getWCharType().getAsOpaquePtr();
-  case eBasicTypeSignedWChar:
-    return ast->getSignedWCharType().getAsOpaquePtr();
-  case eBasicTypeUnsignedWChar:
-    return ast->getUnsignedWCharType().getAsOpaquePtr();
-  case eBasicTypeChar16:
-    return ast->Char16Ty.getAsOpaquePtr();
-  case eBasicTypeChar32:
-    return ast->Char32Ty.getAsOpaquePtr();
-  case eBasicTypeShort:
-    return ast->ShortTy.getAsOpaquePtr();
-  case eBasicTypeUnsignedShort:
-    return ast->UnsignedShortTy.getAsOpaquePtr();
-  case eBasicTypeInt:
-    return ast->IntTy.getAsOpaquePtr();
-  case eBasicTypeUnsignedInt:
-    return ast->UnsignedIntTy.getAsOpaquePtr();
-  case eBasicTypeLong:
-    return ast->LongTy.getAsOpaquePtr();
-  case eBasicTypeUnsignedLong:
-    return ast->UnsignedLongTy.getAsOpaquePtr();
-  case eBasicTypeLongLong:
-    return ast->LongLongTy.getAsOpaquePtr();
-  case eBasicTypeUnsignedLongLong:
-    return ast->UnsignedLongLongTy.getAsOpaquePtr();
-  case eBasicTypeInt128:
-    return ast->Int128Ty.getAsOpaquePtr();
-  case eBasicTypeUnsignedInt128:
-    return ast->UnsignedInt128Ty.getAsOpaquePtr();
-  case eBasicTypeBool:
-    return ast->BoolTy.getAsOpaquePtr();
-  case eBasicTypeHalf:
-    return ast->HalfTy.getAsOpaquePtr();
-  case eBasicTypeFloat:
-    return ast->FloatTy.getAsOpaquePtr();
-  case eBasicTypeDouble:
-    return ast->DoubleTy.getAsOpaquePtr();
-  case eBasicTypeLongDouble:
-    return ast->LongDoubleTy.getAsOpaquePtr();
-  case eBasicTypeFloatComplex:
-    return ast->FloatComplexTy.getAsOpaquePtr();
-  case eBasicTypeDoubleComplex:
-    return ast->DoubleComplexTy.getAsOpaquePtr();
-  case eBasicTypeLongDoubleComplex:
-    return ast->LongDoubleComplexTy.getAsOpaquePtr();
-  case eBasicTypeObjCID:
-    return ast->getObjCIdType().getAsOpaquePtr();
-  case eBasicTypeObjCClass:
-    return ast->getObjCClassType().getAsOpaquePtr();
-  case eBasicTypeObjCSel:
-    return ast->getObjCSelType().getAsOpaquePtr();
-  case eBasicTypeNullPtr:
-    return ast->NullPtrTy.getAsOpaquePtr();
-  default:
-    return nullptr;
-  }
-}
-
-#pragma mark Function Types
-
-clang::DeclarationName
-ClangASTContext::GetDeclarationName(const char *name,
-                                    const CompilerType &function_clang_type) {
-  if (!name || !name[0])
-    return clang::DeclarationName();
-
-  clang::OverloadedOperatorKind op_kind = clang::NUM_OVERLOADED_OPERATORS;
-  if (!IsOperator(name, op_kind) || op_kind == clang::NUM_OVERLOADED_OPERATORS)
-    return DeclarationName(&getASTContext().Idents.get(
-        name)); // Not operator, but a regular function.
-
-  // Check the number of operator parameters. Sometimes we have seen bad DWARF
-  // that doesn't correctly describe operators and if we try to create a method
-  // and add it to the class, clang will assert and crash, so we need to make
-  // sure things are acceptable.
-  clang::QualType method_qual_type(ClangUtil::GetQualType(function_clang_type));
-  const clang::FunctionProtoType *function_type =
-      llvm::dyn_cast<clang::FunctionProtoType>(method_qual_type.getTypePtr());
-  if (function_type == nullptr)
-    return clang::DeclarationName();
-
-  const bool is_method = false;
-  const unsigned int num_params = function_type->getNumParams();
-  if (!ClangASTContext::CheckOverloadedOperatorKindParameterCount(
-          is_method, op_kind, num_params))
-    return clang::DeclarationName();
-
-  return getASTContext().DeclarationNames.getCXXOperatorName(op_kind);
-}
-
-FunctionDecl *ClangASTContext::CreateFunctionDeclaration(
-    DeclContext *decl_ctx, const char *name,
-    const CompilerType &function_clang_type, int storage, bool is_inline) {
-  FunctionDecl *func_decl = nullptr;
-  ASTContext &ast = getASTContext();
-  if (decl_ctx == nullptr)
-    decl_ctx = ast.getTranslationUnitDecl();
-
-  const bool hasWrittenPrototype = true;
-  const bool isConstexprSpecified = false;
-
-  clang::DeclarationName declarationName =
-      GetDeclarationName(name, function_clang_type);
-  func_decl = FunctionDecl::Create(
-      ast, decl_ctx, SourceLocation(), SourceLocation(), declarationName,
-      ClangUtil::GetQualType(function_clang_type), nullptr,
-      (clang::StorageClass)storage, is_inline, hasWrittenPrototype,
-      isConstexprSpecified ? CSK_constexpr : CSK_unspecified);
-  if (func_decl)
-    decl_ctx->addDecl(func_decl);
-
-#ifdef LLDB_CONFIGURATION_DEBUG
-  VerifyDecl(func_decl);
-#endif
-
-  return func_decl;
-}
-
-CompilerType
-ClangASTContext::CreateFunctionType(const CompilerType &result_type,
-                                    const CompilerType *args, unsigned num_args,
-                                    bool is_variadic, unsigned type_quals,
-                                    clang::CallingConv cc) {
-  if (!result_type || !ClangUtil::IsClangType(result_type))
-    return CompilerType(); // invalid return type
-
-  std::vector<QualType> qual_type_args;
-  if (num_args > 0 && args == nullptr)
-    return CompilerType(); // invalid argument array passed in
-
-  // Verify that all arguments are valid and the right type
-  for (unsigned i = 0; i < num_args; ++i) {
-    if (args[i]) {
-      // Make sure we have a clang type in args[i] and not a type from another
-      // language whose name might match
-      const bool is_clang_type = ClangUtil::IsClangType(args[i]);
-      lldbassert(is_clang_type);
-      if (is_clang_type)
-        qual_type_args.push_back(ClangUtil::GetQualType(args[i]));
-      else
-        return CompilerType(); //  invalid argument type (must be a clang type)
-    } else
-      return CompilerType(); // invalid argument type (empty)
-  }
-
-  // TODO: Detect calling convention in DWARF?
-  FunctionProtoType::ExtProtoInfo proto_info;
-  proto_info.ExtInfo = cc;
-  proto_info.Variadic = is_variadic;
-  proto_info.ExceptionSpec = EST_None;
-  proto_info.TypeQuals = clang::Qualifiers::fromFastMask(type_quals);
-  proto_info.RefQualifier = RQ_None;
-
-  return GetType(getASTContext().getFunctionType(
-      ClangUtil::GetQualType(result_type), qual_type_args, proto_info));
-}
-
-ParmVarDecl *ClangASTContext::CreateParameterDeclaration(
-    clang::DeclContext *decl_ctx, const char *name,
-    const CompilerType &param_type, int storage, bool add_decl) {
-  ASTContext &ast = getASTContext();
-  auto *decl =
-      ParmVarDecl::Create(ast, decl_ctx, SourceLocation(), SourceLocation(),
-                          name && name[0] ? &ast.Idents.get(name) : nullptr,
-                          ClangUtil::GetQualType(param_type), nullptr,
-                          (clang::StorageClass)storage, nullptr);
-  if (add_decl)
-    decl_ctx->addDecl(decl);
-
-  return decl;
-}
-
-void ClangASTContext::SetFunctionParameters(FunctionDecl *function_decl,
-                                            ParmVarDecl **params,
-                                            unsigned num_params) {
-  if (function_decl)
-    function_decl->setParams(ArrayRef<ParmVarDecl *>(params, num_params));
-}
-
-CompilerType
-ClangASTContext::CreateBlockPointerType(const CompilerType &function_type) {
-  QualType block_type = m_ast_up->getBlockPointerType(
-      clang::QualType::getFromOpaquePtr(function_type.GetOpaqueQualType()));
-
-  return GetType(block_type);
-}
-
-#pragma mark Array Types
-
-CompilerType ClangASTContext::CreateArrayType(const CompilerType &element_type,
-                                              size_t element_count,
-                                              bool is_vector) {
-  if (element_type.IsValid()) {
-    ASTContext &ast = getASTContext();
-
-    if (is_vector) {
-      return GetType(ast.getExtVectorType(ClangUtil::GetQualType(element_type),
-                                          element_count));
-    } else {
-
-      llvm::APInt ap_element_count(64, element_count);
-      if (element_count == 0) {
-        return GetType(ast.getIncompleteArrayType(
-            ClangUtil::GetQualType(element_type), clang::ArrayType::Normal, 0));
-      } else {
-        return GetType(ast.getConstantArrayType(
-            ClangUtil::GetQualType(element_type), ap_element_count, nullptr,
-            clang::ArrayType::Normal, 0));
-      }
-    }
-  }
-  return CompilerType();
-}
-
-CompilerType ClangASTContext::CreateStructForIdentifier(
-    ConstString type_name,
-    const std::initializer_list<std::pair<const char *, CompilerType>>
-        &type_fields,
-    bool packed) {
-  CompilerType type;
-  if (!type_name.IsEmpty() &&
-      (type = GetTypeForIdentifier<clang::CXXRecordDecl>(type_name))
-          .IsValid()) {
-    lldbassert(0 && "Trying to create a type for an existing name");
-    return type;
-  }
-
-  type = CreateRecordType(nullptr, lldb::eAccessPublic, type_name.GetCString(),
-                          clang::TTK_Struct, lldb::eLanguageTypeC);
-  StartTagDeclarationDefinition(type);
-  for (const auto &field : type_fields)
-    AddFieldToRecordType(type, field.first, field.second, lldb::eAccessPublic,
-                         0);
-  if (packed)
-    SetIsPacked(type);
-  CompleteTagDeclarationDefinition(type);
-  return type;
-}
-
-CompilerType ClangASTContext::GetOrCreateStructForIdentifier(
-    ConstString type_name,
-    const std::initializer_list<std::pair<const char *, CompilerType>>
-        &type_fields,
-    bool packed) {
-  CompilerType type;
-  if ((type = GetTypeForIdentifier<clang::CXXRecordDecl>(type_name)).IsValid())
-    return type;
-
-  return CreateStructForIdentifier(type_name, type_fields, packed);
-}
-
-#pragma mark Enumeration Types
-
-CompilerType
-ClangASTContext::CreateEnumerationType(const char *name, DeclContext *decl_ctx,
-                                       const Declaration &decl,
-                                       const CompilerType &integer_clang_type,
-                                       bool is_scoped) {
-  // TODO: Do something intelligent with the Declaration object passed in
-  // like maybe filling in the SourceLocation with it...
-  ASTContext &ast = getASTContext();
-
-  // TODO: ask about these...
-  //    const bool IsFixed = false;
-
-  EnumDecl *enum_decl = EnumDecl::Create(
-      ast, decl_ctx, SourceLocation(), SourceLocation(),
-      name && name[0] ? &ast.Idents.get(name) : nullptr, nullptr,
-      is_scoped, // IsScoped
-      is_scoped, // IsScopedUsingClassTag
-      false);    // IsFixed
-
-  if (enum_decl) {
-    if (decl_ctx)
-      decl_ctx->addDecl(enum_decl);
-
-    // TODO: check if we should be setting the promotion type too?
-    enum_decl->setIntegerType(ClangUtil::GetQualType(integer_clang_type));
-
-    enum_decl->setAccess(AS_public); // TODO respect what's in the debug info
-
-    return GetType(ast.getTagDeclType(enum_decl));
-  }
-  return CompilerType();
-}
-
-CompilerType ClangASTContext::GetIntTypeFromBitSize(size_t bit_size,
-                                                    bool is_signed) {
-  clang::ASTContext &ast = getASTContext();
-
-  if (is_signed) {
-    if (bit_size == ast.getTypeSize(ast.SignedCharTy))
-      return GetType(ast.SignedCharTy);
-
-    if (bit_size == ast.getTypeSize(ast.ShortTy))
-      return GetType(ast.ShortTy);
-
-    if (bit_size == ast.getTypeSize(ast.IntTy))
-      return GetType(ast.IntTy);
-
-    if (bit_size == ast.getTypeSize(ast.LongTy))
-      return GetType(ast.LongTy);
-
-    if (bit_size == ast.getTypeSize(ast.LongLongTy))
-      return GetType(ast.LongLongTy);
-
-    if (bit_size == ast.getTypeSize(ast.Int128Ty))
-      return GetType(ast.Int128Ty);
-  } else {
-    if (bit_size == ast.getTypeSize(ast.UnsignedCharTy))
-      return GetType(ast.UnsignedCharTy);
-
-    if (bit_size == ast.getTypeSize(ast.UnsignedShortTy))
-      return GetType(ast.UnsignedShortTy);
-
-    if (bit_size == ast.getTypeSize(ast.UnsignedIntTy))
-      return GetType(ast.UnsignedIntTy);
-
-    if (bit_size == ast.getTypeSize(ast.UnsignedLongTy))
-      return GetType(ast.UnsignedLongTy);
-
-    if (bit_size == ast.getTypeSize(ast.UnsignedLongLongTy))
-      return GetType(ast.UnsignedLongLongTy);
-
-    if (bit_size == ast.getTypeSize(ast.UnsignedInt128Ty))
-      return GetType(ast.UnsignedInt128Ty);
-  }
-  return CompilerType();
-}
-
-CompilerType ClangASTContext::GetPointerSizedIntType(bool is_signed) {
-  return GetIntTypeFromBitSize(
-      getASTContext().getTypeSize(getASTContext().VoidPtrTy), is_signed);
-}
-
-void ClangASTContext::DumpDeclContextHiearchy(clang::DeclContext *decl_ctx) {
-  if (decl_ctx) {
-    DumpDeclContextHiearchy(decl_ctx->getParent());
-
-    clang::NamedDecl *named_decl = llvm::dyn_cast<clang::NamedDecl>(decl_ctx);
-    if (named_decl) {
-      printf("%20s: %s\n", decl_ctx->getDeclKindName(),
-             named_decl->getDeclName().getAsString().c_str());
-    } else {
-      printf("%20s\n", decl_ctx->getDeclKindName());
-    }
-  }
-}
-
-void ClangASTContext::DumpDeclHiearchy(clang::Decl *decl) {
-  if (decl == nullptr)
-    return;
-  DumpDeclContextHiearchy(decl->getDeclContext());
-
-  clang::RecordDecl *record_decl = llvm::dyn_cast<clang::RecordDecl>(decl);
-  if (record_decl) {
-    printf("%20s: %s%s\n", decl->getDeclKindName(),
-           record_decl->getDeclName().getAsString().c_str(),
-           record_decl->isInjectedClassName() ? " (injected class name)" : "");
-
-  } else {
-    clang::NamedDecl *named_decl = llvm::dyn_cast<clang::NamedDecl>(decl);
-    if (named_decl) {
-      printf("%20s: %s\n", decl->getDeclKindName(),
-             named_decl->getDeclName().getAsString().c_str());
-    } else {
-      printf("%20s\n", decl->getDeclKindName());
-    }
-  }
-}
-
-bool ClangASTContext::DeclsAreEquivalent(clang::Decl *lhs_decl,
-                                         clang::Decl *rhs_decl) {
-  if (lhs_decl && rhs_decl) {
-    // Make sure the decl kinds match first
-    const clang::Decl::Kind lhs_decl_kind = lhs_decl->getKind();
-    const clang::Decl::Kind rhs_decl_kind = rhs_decl->getKind();
-
-    if (lhs_decl_kind == rhs_decl_kind) {
-      // Now check that the decl contexts kinds are all equivalent before we
-      // have to check any names of the decl contexts...
-      clang::DeclContext *lhs_decl_ctx = lhs_decl->getDeclContext();
-      clang::DeclContext *rhs_decl_ctx = rhs_decl->getDeclContext();
-      if (lhs_decl_ctx && rhs_decl_ctx) {
-        while (true) {
-          if (lhs_decl_ctx && rhs_decl_ctx) {
-            const clang::Decl::Kind lhs_decl_ctx_kind =
-                lhs_decl_ctx->getDeclKind();
-            const clang::Decl::Kind rhs_decl_ctx_kind =
-                rhs_decl_ctx->getDeclKind();
-            if (lhs_decl_ctx_kind == rhs_decl_ctx_kind) {
-              lhs_decl_ctx = lhs_decl_ctx->getParent();
-              rhs_decl_ctx = rhs_decl_ctx->getParent();
-
-              if (lhs_decl_ctx == nullptr && rhs_decl_ctx == nullptr)
-                break;
-            } else
-              return false;
-          } else
-            return false;
-        }
-
-        // Now make sure the name of the decls match
-        clang::NamedDecl *lhs_named_decl =
-            llvm::dyn_cast<clang::NamedDecl>(lhs_decl);
-        clang::NamedDecl *rhs_named_decl =
-            llvm::dyn_cast<clang::NamedDecl>(rhs_decl);
-        if (lhs_named_decl && rhs_named_decl) {
-          clang::DeclarationName lhs_decl_name = lhs_named_decl->getDeclName();
-          clang::DeclarationName rhs_decl_name = rhs_named_decl->getDeclName();
-          if (lhs_decl_name.getNameKind() == rhs_decl_name.getNameKind()) {
-            if (lhs_decl_name.getAsString() != rhs_decl_name.getAsString())
-              return false;
-          } else
-            return false;
-        } else
-          return false;
-
-        // We know that the decl context kinds all match, so now we need to
-        // make sure the names match as well
-        lhs_decl_ctx = lhs_decl->getDeclContext();
-        rhs_decl_ctx = rhs_decl->getDeclContext();
-        while (true) {
-          switch (lhs_decl_ctx->getDeclKind()) {
-          case clang::Decl::TranslationUnit:
-            // We don't care about the translation unit names
-            return true;
-          default: {
-            clang::NamedDecl *lhs_named_decl =
-                llvm::dyn_cast<clang::NamedDecl>(lhs_decl_ctx);
-            clang::NamedDecl *rhs_named_decl =
-                llvm::dyn_cast<clang::NamedDecl>(rhs_decl_ctx);
-            if (lhs_named_decl && rhs_named_decl) {
-              clang::DeclarationName lhs_decl_name =
-                  lhs_named_decl->getDeclName();
-              clang::DeclarationName rhs_decl_name =
-                  rhs_named_decl->getDeclName();
-              if (lhs_decl_name.getNameKind() == rhs_decl_name.getNameKind()) {
-                if (lhs_decl_name.getAsString() != rhs_decl_name.getAsString())
-                  return false;
-              } else
-                return false;
-            } else
-              return false;
-          } break;
-          }
-          lhs_decl_ctx = lhs_decl_ctx->getParent();
-          rhs_decl_ctx = rhs_decl_ctx->getParent();
-        }
-      }
-    }
-  }
-  return false;
-}
-bool ClangASTContext::GetCompleteDecl(clang::ASTContext *ast,
-                                      clang::Decl *decl) {
-  if (!decl)
-    return false;
-
-  ExternalASTSource *ast_source = ast->getExternalSource();
-
-  if (!ast_source)
-    return false;
-
-  if (clang::TagDecl *tag_decl = llvm::dyn_cast<clang::TagDecl>(decl)) {
-    if (tag_decl->isCompleteDefinition())
-      return true;
-
-    if (!tag_decl->hasExternalLexicalStorage())
-      return false;
-
-    ast_source->CompleteType(tag_decl);
-
-    return !tag_decl->getTypeForDecl()->isIncompleteType();
-  } else if (clang::ObjCInterfaceDecl *objc_interface_decl =
-                 llvm::dyn_cast<clang::ObjCInterfaceDecl>(decl)) {
-    if (objc_interface_decl->getDefinition())
-      return true;
-
-    if (!objc_interface_decl->hasExternalLexicalStorage())
-      return false;
-
-    ast_source->CompleteType(objc_interface_decl);
-
-    return !objc_interface_decl->getTypeForDecl()->isIncompleteType();
-  } else {
-    return false;
-  }
-}
-
-void ClangASTContext::SetMetadataAsUserID(const clang::Decl *decl,
-                                          user_id_t user_id) {
-  ClangASTMetadata meta_data;
-  meta_data.SetUserID(user_id);
-  SetMetadata(decl, meta_data);
-}
-
-void ClangASTContext::SetMetadataAsUserID(const clang::Type *type,
-                                          user_id_t user_id) {
-  ClangASTMetadata meta_data;
-  meta_data.SetUserID(user_id);
-  SetMetadata(type, meta_data);
-}
-
-void ClangASTContext::SetMetadata(const clang::Decl *object,
-                                  ClangASTMetadata &metadata) {
-  m_decl_metadata[object] = metadata;
-}
-
-void ClangASTContext::SetMetadata(const clang::Type *object,
-                                  ClangASTMetadata &metadata) {
-  m_type_metadata[object] = metadata;
-}
-
-ClangASTMetadata *ClangASTContext::GetMetadata(const clang::Decl *object) {
-  auto It = m_decl_metadata.find(object);
-  if (It != m_decl_metadata.end())
-    return &It->second;
-  return nullptr;
-}
-
-ClangASTMetadata *ClangASTContext::GetMetadata(const clang::Type *object) {
-  auto It = m_type_metadata.find(object);
-  if (It != m_type_metadata.end())
-    return &It->second;
-  return nullptr;
-}
-
-bool ClangASTContext::SetTagTypeKind(clang::QualType tag_qual_type,
-                                     int kind) const {
-  const clang::Type *clang_type = tag_qual_type.getTypePtr();
-  if (clang_type) {
-    const clang::TagType *tag_type = llvm::dyn_cast<clang::TagType>(clang_type);
-    if (tag_type) {
-      clang::TagDecl *tag_decl =
-          llvm::dyn_cast<clang::TagDecl>(tag_type->getDecl());
-      if (tag_decl) {
-        tag_decl->setTagKind((clang::TagDecl::TagKind)kind);
-        return true;
-      }
-    }
-  }
-  return false;
-}
-
-bool ClangASTContext::SetDefaultAccessForRecordFields(
-    clang::RecordDecl *record_decl, int default_accessibility,
-    int *assigned_accessibilities, size_t num_assigned_accessibilities) {
-  if (record_decl) {
-    uint32_t field_idx;
-    clang::RecordDecl::field_iterator field, field_end;
-    for (field = record_decl->field_begin(),
-        field_end = record_decl->field_end(), field_idx = 0;
-         field != field_end; ++field, ++field_idx) {
-      // If no accessibility was assigned, assign the correct one
-      if (field_idx < num_assigned_accessibilities &&
-          assigned_accessibilities[field_idx] == clang::AS_none)
-        field->setAccess((clang::AccessSpecifier)default_accessibility);
-    }
-    return true;
-  }
-  return false;
-}
-
-clang::DeclContext *
-ClangASTContext::GetDeclContextForType(const CompilerType &type) {
-  return GetDeclContextForType(ClangUtil::GetQualType(type));
-}
-
-/// Aggressively desugar the provided type, skipping past various kinds of
-/// syntactic sugar and other constructs one typically wants to ignore.
-/// The \p mask argument allows one to skip certain kinds of simplifications,
-/// when one wishes to handle a certain kind of type directly.
-static QualType
-RemoveWrappingTypes(QualType type, ArrayRef<clang::Type::TypeClass> mask = {}) {
-  while (true) {
-    if (find(mask, type->getTypeClass()) != mask.end())
-      return type;
-    switch (type->getTypeClass()) {
-    // This is not fully correct as _Atomic is more than sugar, but it is
-    // sufficient for the purposes we care about.
-    case clang::Type::Atomic:
-      type = cast<clang::AtomicType>(type)->getValueType();
-      break;
-    case clang::Type::Auto:
-    case clang::Type::Decltype:
-    case clang::Type::Elaborated:
-    case clang::Type::Paren:
-    case clang::Type::Typedef:
-    case clang::Type::TypeOf:
-    case clang::Type::TypeOfExpr:
-      type = type->getLocallyUnqualifiedSingleStepDesugaredType();
-      break;
-    default:
-      return type;
-    }
-  }
-}
-
-clang::DeclContext *
-ClangASTContext::GetDeclContextForType(clang::QualType type) {
-  if (type.isNull())
-    return nullptr;
-
-  clang::QualType qual_type = RemoveWrappingTypes(type.getCanonicalType());
-  const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-  switch (type_class) {
-  case clang::Type::ObjCInterface:
-    return llvm::cast<clang::ObjCObjectType>(qual_type.getTypePtr())
-        ->getInterface();
-  case clang::Type::ObjCObjectPointer:
-    return GetDeclContextForType(
-        llvm::cast<clang::ObjCObjectPointerType>(qual_type.getTypePtr())
-            ->getPointeeType());
-  case clang::Type::Record:
-    return llvm::cast<clang::RecordType>(qual_type)->getDecl();
-  case clang::Type::Enum:
-    return llvm::cast<clang::EnumType>(qual_type)->getDecl();
-  default:
-    break;
-  }
-  // No DeclContext in this type...
-  return nullptr;
-}
-
-static bool GetCompleteQualType(clang::ASTContext *ast,
-                                clang::QualType qual_type,
-                                bool allow_completion = true) {
-  qual_type = RemoveWrappingTypes(qual_type);
-  const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-  switch (type_class) {
-  case clang::Type::ConstantArray:
-  case clang::Type::IncompleteArray:
-  case clang::Type::VariableArray: {
-    const clang::ArrayType *array_type =
-        llvm::dyn_cast<clang::ArrayType>(qual_type.getTypePtr());
-
-    if (array_type)
-      return GetCompleteQualType(ast, array_type->getElementType(),
-                                 allow_completion);
-  } break;
-  case clang::Type::Record: {
-    clang::CXXRecordDecl *cxx_record_decl = qual_type->getAsCXXRecordDecl();
-    if (cxx_record_decl) {
-      if (cxx_record_decl->hasExternalLexicalStorage()) {
-        const bool is_complete = cxx_record_decl->isCompleteDefinition();
-        const bool fields_loaded =
-            cxx_record_decl->hasLoadedFieldsFromExternalStorage();
-        if (is_complete && fields_loaded)
-          return true;
-
-        if (!allow_completion)
-          return false;
-
-        // Call the field_begin() accessor to for it to use the external source
-        // to load the fields...
-        clang::ExternalASTSource *external_ast_source =
-            ast->getExternalSource();
-        if (external_ast_source) {
-          external_ast_source->CompleteType(cxx_record_decl);
-          if (cxx_record_decl->isCompleteDefinition()) {
-            cxx_record_decl->field_begin();
-            cxx_record_decl->setHasLoadedFieldsFromExternalStorage(true);
-          }
-        }
-      }
-    }
-    const clang::TagType *tag_type =
-        llvm::cast<clang::TagType>(qual_type.getTypePtr());
-    return !tag_type->isIncompleteType();
-  } break;
-
-  case clang::Type::Enum: {
-    const clang::TagType *tag_type =
-        llvm::dyn_cast<clang::TagType>(qual_type.getTypePtr());
-    if (tag_type) {
-      clang::TagDecl *tag_decl = tag_type->getDecl();
-      if (tag_decl) {
-        if (tag_decl->getDefinition())
-          return true;
-
-        if (!allow_completion)
-          return false;
-
-        if (tag_decl->hasExternalLexicalStorage()) {
-          if (ast) {
-            clang::ExternalASTSource *external_ast_source =
-                ast->getExternalSource();
-            if (external_ast_source) {
-              external_ast_source->CompleteType(tag_decl);
-              return !tag_type->isIncompleteType();
-            }
-          }
-        }
-        return false;
-      }
-    }
-
-  } break;
-  case clang::Type::ObjCObject:
-  case clang::Type::ObjCInterface: {
-    const clang::ObjCObjectType *objc_class_type =
-        llvm::dyn_cast<clang::ObjCObjectType>(qual_type);
-    if (objc_class_type) {
-      clang::ObjCInterfaceDecl *class_interface_decl =
-          objc_class_type->getInterface();
-      // We currently can't complete objective C types through the newly added
-      // ASTContext because it only supports TagDecl objects right now...
-      if (class_interface_decl) {
-        if (class_interface_decl->getDefinition())
-          return true;
-
-        if (!allow_completion)
-          return false;
-
-        if (class_interface_decl->hasExternalLexicalStorage()) {
-          if (ast) {
-            clang::ExternalASTSource *external_ast_source =
-                ast->getExternalSource();
-            if (external_ast_source) {
-              external_ast_source->CompleteType(class_interface_decl);
-              return !objc_class_type->isIncompleteType();
-            }
-          }
-        }
-        return false;
-      }
-    }
-  } break;
-
-  case clang::Type::Attributed:
-    return GetCompleteQualType(
-        ast, llvm::cast<clang::AttributedType>(qual_type)->getModifiedType(),
-        allow_completion);
-
-  default:
-    break;
-  }
-
-  return true;
-}
-
-static clang::ObjCIvarDecl::AccessControl
-ConvertAccessTypeToObjCIvarAccessControl(AccessType access) {
-  switch (access) {
-  case eAccessNone:
-    return clang::ObjCIvarDecl::None;
-  case eAccessPublic:
-    return clang::ObjCIvarDecl::Public;
-  case eAccessPrivate:
-    return clang::ObjCIvarDecl::Private;
-  case eAccessProtected:
-    return clang::ObjCIvarDecl::Protected;
-  case eAccessPackage:
-    return clang::ObjCIvarDecl::Package;
-  }
-  return clang::ObjCIvarDecl::None;
-}
-
-// Tests
-
-bool ClangASTContext::IsAggregateType(lldb::opaque_compiler_type_t type) {
-  clang::QualType qual_type(RemoveWrappingTypes(GetCanonicalQualType(type)));
-
-  const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-  switch (type_class) {
-  case clang::Type::IncompleteArray:
-  case clang::Type::VariableArray:
-  case clang::Type::ConstantArray:
-  case clang::Type::ExtVector:
-  case clang::Type::Vector:
-  case clang::Type::Record:
-  case clang::Type::ObjCObject:
-  case clang::Type::ObjCInterface:
-    return true;
-  default:
-    break;
-  }
-  // The clang type does have a value
-  return false;
-}
-
-bool ClangASTContext::IsAnonymousType(lldb::opaque_compiler_type_t type) {
-  clang::QualType qual_type(RemoveWrappingTypes(GetCanonicalQualType(type)));
-
-  const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-  switch (type_class) {
-  case clang::Type::Record: {
-    if (const clang::RecordType *record_type =
-            llvm::dyn_cast_or_null<clang::RecordType>(
-                qual_type.getTypePtrOrNull())) {
-      if (const clang::RecordDecl *record_decl = record_type->getDecl()) {
-        return record_decl->isAnonymousStructOrUnion();
-      }
-    }
-    break;
-  }
-  default:
-    break;
-  }
-  // The clang type does have a value
-  return false;
-}
-
-bool ClangASTContext::IsArrayType(lldb::opaque_compiler_type_t type,
-                                  CompilerType *element_type_ptr,
-                                  uint64_t *size, bool *is_incomplete) {
-  clang::QualType qual_type(RemoveWrappingTypes(GetCanonicalQualType(type)));
-
-  const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-  switch (type_class) {
-  default:
-    break;
-
-  case clang::Type::ConstantArray:
-    if (element_type_ptr)
-      element_type_ptr->SetCompilerType(
-          this, llvm::cast<clang::ConstantArrayType>(qual_type)
-                    ->getElementType()
-                    .getAsOpaquePtr());
-    if (size)
-      *size = llvm::cast<clang::ConstantArrayType>(qual_type)
-                  ->getSize()
-                  .getLimitedValue(ULLONG_MAX);
-    if (is_incomplete)
-      *is_incomplete = false;
-    return true;
-
-  case clang::Type::IncompleteArray:
-    if (element_type_ptr)
-      element_type_ptr->SetCompilerType(
-          this, llvm::cast<clang::IncompleteArrayType>(qual_type)
-                    ->getElementType()
-                    .getAsOpaquePtr());
-    if (size)
-      *size = 0;
-    if (is_incomplete)
-      *is_incomplete = true;
-    return true;
-
-  case clang::Type::VariableArray:
-    if (element_type_ptr)
-      element_type_ptr->SetCompilerType(
-          this, llvm::cast<clang::VariableArrayType>(qual_type)
-                    ->getElementType()
-                    .getAsOpaquePtr());
-    if (size)
-      *size = 0;
-    if (is_incomplete)
-      *is_incomplete = false;
-    return true;
-
-  case clang::Type::DependentSizedArray:
-    if (element_type_ptr)
-      element_type_ptr->SetCompilerType(
-          this, llvm::cast<clang::DependentSizedArrayType>(qual_type)
-                    ->getElementType()
-                    .getAsOpaquePtr());
-    if (size)
-      *size = 0;
-    if (is_incomplete)
-      *is_incomplete = false;
-    return true;
-  }
-  if (element_type_ptr)
-    element_type_ptr->Clear();
-  if (size)
-    *size = 0;
-  if (is_incomplete)
-    *is_incomplete = false;
-  return false;
-}
-
-bool ClangASTContext::IsVectorType(lldb::opaque_compiler_type_t type,
-                                   CompilerType *element_type, uint64_t *size) {
-  clang::QualType qual_type(GetCanonicalQualType(type));
-
-  const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-  switch (type_class) {
-  case clang::Type::Vector: {
-    const clang::VectorType *vector_type =
-        qual_type->getAs<clang::VectorType>();
-    if (vector_type) {
-      if (size)
-        *size = vector_type->getNumElements();
-      if (element_type)
-        *element_type = GetType(vector_type->getElementType());
-    }
-    return true;
-  } break;
-  case clang::Type::ExtVector: {
-    const clang::ExtVectorType *ext_vector_type =
-        qual_type->getAs<clang::ExtVectorType>();
-    if (ext_vector_type) {
-      if (size)
-        *size = ext_vector_type->getNumElements();
-      if (element_type)
-        *element_type =
-            CompilerType(this, ext_vector_type->getElementType().getAsOpaquePtr());
-    }
-    return true;
-  }
-  default:
-    break;
-  }
-  return false;
-}
-
-bool ClangASTContext::IsRuntimeGeneratedType(
-    lldb::opaque_compiler_type_t type) {
-  clang::DeclContext *decl_ctx = GetDeclContextForType(GetQualType(type));
-  if (!decl_ctx)
-    return false;
-
-  if (!llvm::isa<clang::ObjCInterfaceDecl>(decl_ctx))
-    return false;
-
-  clang::ObjCInterfaceDecl *result_iface_decl =
-      llvm::dyn_cast<clang::ObjCInterfaceDecl>(decl_ctx);
-
-  ClangASTMetadata *ast_metadata = GetMetadata(result_iface_decl);
-  if (!ast_metadata)
-    return false;
-  return (ast_metadata->GetISAPtr() != 0);
-}
-
-bool ClangASTContext::IsCharType(lldb::opaque_compiler_type_t type) {
-  return GetQualType(type).getUnqualifiedType()->isCharType();
-}
-
-bool ClangASTContext::IsCompleteType(lldb::opaque_compiler_type_t type) {
-  const bool allow_completion = false;
-  return GetCompleteQualType(&getASTContext(), GetQualType(type),
-                             allow_completion);
-}
-
-bool ClangASTContext::IsConst(lldb::opaque_compiler_type_t type) {
-  return GetQualType(type).isConstQualified();
-}
-
-bool ClangASTContext::IsCStringType(lldb::opaque_compiler_type_t type,
-                                    uint32_t &length) {
-  CompilerType pointee_or_element_clang_type;
-  length = 0;
-  Flags type_flags(GetTypeInfo(type, &pointee_or_element_clang_type));
-
-  if (!pointee_or_element_clang_type.IsValid())
-    return false;
-
-  if (type_flags.AnySet(eTypeIsArray | eTypeIsPointer)) {
-    if (pointee_or_element_clang_type.IsCharType()) {
-      if (type_flags.Test(eTypeIsArray)) {
-        // We know the size of the array and it could be a C string since it is
-        // an array of characters
-        length = llvm::cast<clang::ConstantArrayType>(
-                     GetCanonicalQualType(type).getTypePtr())
-                     ->getSize()
-                     .getLimitedValue();
-      }
-      return true;
-    }
-  }
-  return false;
-}
-
-bool ClangASTContext::IsFunctionType(lldb::opaque_compiler_type_t type,
-                                     bool *is_variadic_ptr) {
-  if (type) {
-    clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
-
-    if (qual_type->isFunctionType()) {
-      if (is_variadic_ptr) {
-        const clang::FunctionProtoType *function_proto_type =
-            llvm::dyn_cast<clang::FunctionProtoType>(qual_type.getTypePtr());
-        if (function_proto_type)
-          *is_variadic_ptr = function_proto_type->isVariadic();
-        else
-          *is_variadic_ptr = false;
-      }
-      return true;
-    }
-
-    const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-    switch (type_class) {
-    default:
-      break;
-    case clang::Type::LValueReference:
-    case clang::Type::RValueReference: {
-      const clang::ReferenceType *reference_type =
-          llvm::cast<clang::ReferenceType>(qual_type.getTypePtr());
-      if (reference_type)
-        return IsFunctionType(reference_type->getPointeeType().getAsOpaquePtr(),
-                              nullptr);
-    } break;
-    }
-  }
-  return false;
-}
-
-// Used to detect "Homogeneous Floating-point Aggregates"
-uint32_t
-ClangASTContext::IsHomogeneousAggregate(lldb::opaque_compiler_type_t type,
-                                        CompilerType *base_type_ptr) {
-  if (!type)
-    return 0;
-
-  clang::QualType qual_type(RemoveWrappingTypes(GetCanonicalQualType(type)));
-  const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-  switch (type_class) {
-  case clang::Type::Record:
-    if (GetCompleteType(type)) {
-      const clang::CXXRecordDecl *cxx_record_decl =
-          qual_type->getAsCXXRecordDecl();
-      if (cxx_record_decl) {
-        if (cxx_record_decl->getNumBases() || cxx_record_decl->isDynamicClass())
-          return 0;
-      }
-      const clang::RecordType *record_type =
-          llvm::cast<clang::RecordType>(qual_type.getTypePtr());
-      if (record_type) {
-        const clang::RecordDecl *record_decl = record_type->getDecl();
-        if (record_decl) {
-          // We are looking for a structure that contains only floating point
-          // types
-          clang::RecordDecl::field_iterator field_pos,
-              field_end = record_decl->field_end();
-          uint32_t num_fields = 0;
-          bool is_hva = false;
-          bool is_hfa = false;
-          clang::QualType base_qual_type;
-          uint64_t base_bitwidth = 0;
-          for (field_pos = record_decl->field_begin(); field_pos != field_end;
-               ++field_pos) {
-            clang::QualType field_qual_type = field_pos->getType();
-            uint64_t field_bitwidth = getASTContext().getTypeSize(qual_type);
-            if (field_qual_type->isFloatingType()) {
-              if (field_qual_type->isComplexType())
-                return 0;
-              else {
-                if (num_fields == 0)
-                  base_qual_type = field_qual_type;
-                else {
-                  if (is_hva)
-                    return 0;
-                  is_hfa = true;
-                  if (field_qual_type.getTypePtr() !=
-                      base_qual_type.getTypePtr())
-                    return 0;
-                }
-              }
-            } else if (field_qual_type->isVectorType() ||
-                       field_qual_type->isExtVectorType()) {
-              if (num_fields == 0) {
-                base_qual_type = field_qual_type;
-                base_bitwidth = field_bitwidth;
-              } else {
-                if (is_hfa)
-                  return 0;
-                is_hva = true;
-                if (base_bitwidth != field_bitwidth)
-                  return 0;
-                if (field_qual_type.getTypePtr() != base_qual_type.getTypePtr())
-                  return 0;
-              }
-            } else
-              return 0;
-            ++num_fields;
-          }
-          if (base_type_ptr)
-            *base_type_ptr = CompilerType(this, base_qual_type.getAsOpaquePtr());
-          return num_fields;
-        }
-      }
-    }
-    break;
-
-  default:
-    break;
-  }
-  return 0;
-}
-
-size_t ClangASTContext::GetNumberOfFunctionArguments(
-    lldb::opaque_compiler_type_t type) {
-  if (type) {
-    clang::QualType qual_type(GetCanonicalQualType(type));
-    const clang::FunctionProtoType *func =
-        llvm::dyn_cast<clang::FunctionProtoType>(qual_type.getTypePtr());
-    if (func)
-      return func->getNumParams();
-  }
-  return 0;
-}
-
-CompilerType
-ClangASTContext::GetFunctionArgumentAtIndex(lldb::opaque_compiler_type_t type,
-                                            const size_t index) {
-  if (type) {
-    clang::QualType qual_type(GetQualType(type));
-    const clang::FunctionProtoType *func =
-        llvm::dyn_cast<clang::FunctionProtoType>(qual_type.getTypePtr());
-    if (func) {
-      if (index < func->getNumParams())
-        return CompilerType(this, func->getParamType(index).getAsOpaquePtr());
-    }
-  }
-  return CompilerType();
-}
-
-bool ClangASTContext::IsFunctionPointerType(lldb::opaque_compiler_type_t type) {
-  if (type) {
-    clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
-
-    if (qual_type->isFunctionPointerType())
-      return true;
-
-    const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-    switch (type_class) {
-    default:
-      break;
-
-    case clang::Type::LValueReference:
-    case clang::Type::RValueReference: {
-      const clang::ReferenceType *reference_type =
-          llvm::cast<clang::ReferenceType>(qual_type.getTypePtr());
-      if (reference_type)
-        return IsFunctionPointerType(
-            reference_type->getPointeeType().getAsOpaquePtr());
-    } break;
-    }
-  }
-  return false;
-}
-
-bool ClangASTContext::IsBlockPointerType(
-    lldb::opaque_compiler_type_t type,
-    CompilerType *function_pointer_type_ptr) {
-  if (type) {
-    clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
-
-    if (qual_type->isBlockPointerType()) {
-      if (function_pointer_type_ptr) {
-        const clang::BlockPointerType *block_pointer_type =
-            qual_type->getAs<clang::BlockPointerType>();
-        QualType pointee_type = block_pointer_type->getPointeeType();
-        QualType function_pointer_type = m_ast_up->getPointerType(pointee_type);
-        *function_pointer_type_ptr =
-            CompilerType(this, function_pointer_type.getAsOpaquePtr());
-      }
-      return true;
-    }
-
-    const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-    switch (type_class) {
-    default:
-      break;
-
-    case clang::Type::LValueReference:
-    case clang::Type::RValueReference: {
-      const clang::ReferenceType *reference_type =
-          llvm::cast<clang::ReferenceType>(qual_type.getTypePtr());
-      if (reference_type)
-        return IsBlockPointerType(
-            reference_type->getPointeeType().getAsOpaquePtr(),
-            function_pointer_type_ptr);
-    } break;
-    }
-  }
-  return false;
-}
-
-bool ClangASTContext::IsIntegerType(lldb::opaque_compiler_type_t type,
-                                    bool &is_signed) {
-  if (!type)
-    return false;
-
-  clang::QualType qual_type(GetCanonicalQualType(type));
-  const clang::BuiltinType *builtin_type =
-      llvm::dyn_cast<clang::BuiltinType>(qual_type->getCanonicalTypeInternal());
-
-  if (builtin_type) {
-    if (builtin_type->isInteger()) {
-      is_signed = builtin_type->isSignedInteger();
-      return true;
-    }
-  }
-
-  return false;
-}
-
-bool ClangASTContext::IsEnumerationType(lldb::opaque_compiler_type_t type,
-                                        bool &is_signed) {
-  if (type) {
-    const clang::EnumType *enum_type = llvm::dyn_cast<clang::EnumType>(
-        GetCanonicalQualType(type)->getCanonicalTypeInternal());
-
-    if (enum_type) {
-      IsIntegerType(enum_type->getDecl()->getIntegerType().getAsOpaquePtr(),
-                    is_signed);
-      return true;
-    }
-  }
-
-  return false;
-}
-
-bool ClangASTContext::IsPointerType(lldb::opaque_compiler_type_t type,
-                                    CompilerType *pointee_type) {
-  if (type) {
-    clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
-    const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-    switch (type_class) {
-    case clang::Type::Builtin:
-      switch (llvm::cast<clang::BuiltinType>(qual_type)->getKind()) {
-      default:
-        break;
-      case clang::BuiltinType::ObjCId:
-      case clang::BuiltinType::ObjCClass:
-        return true;
-      }
-      return false;
-    case clang::Type::ObjCObjectPointer:
-      if (pointee_type)
-        pointee_type->SetCompilerType(
-            this, llvm::cast<clang::ObjCObjectPointerType>(qual_type)
-                      ->getPointeeType()
-                      .getAsOpaquePtr());
-      return true;
-    case clang::Type::BlockPointer:
-      if (pointee_type)
-        pointee_type->SetCompilerType(
-            this, llvm::cast<clang::BlockPointerType>(qual_type)
-                      ->getPointeeType()
-                      .getAsOpaquePtr());
-      return true;
-    case clang::Type::Pointer:
-      if (pointee_type)
-        pointee_type->SetCompilerType(this,
-                                      llvm::cast<clang::PointerType>(qual_type)
-                                          ->getPointeeType()
-                                          .getAsOpaquePtr());
-      return true;
-    case clang::Type::MemberPointer:
-      if (pointee_type)
-        pointee_type->SetCompilerType(
-            this, llvm::cast<clang::MemberPointerType>(qual_type)
-                      ->getPointeeType()
-                      .getAsOpaquePtr());
-      return true;
-    default:
-      break;
-    }
-  }
-  if (pointee_type)
-    pointee_type->Clear();
-  return false;
-}
-
-bool ClangASTContext::IsPointerOrReferenceType(
-    lldb::opaque_compiler_type_t type, CompilerType *pointee_type) {
-  if (type) {
-    clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
-    const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-    switch (type_class) {
-    case clang::Type::Builtin:
-      switch (llvm::cast<clang::BuiltinType>(qual_type)->getKind()) {
-      default:
-        break;
-      case clang::BuiltinType::ObjCId:
-      case clang::BuiltinType::ObjCClass:
-        return true;
-      }
-      return false;
-    case clang::Type::ObjCObjectPointer:
-      if (pointee_type)
-        pointee_type->SetCompilerType(
-            this, llvm::cast<clang::ObjCObjectPointerType>(qual_type)
-                                 ->getPointeeType().getAsOpaquePtr());
-      return true;
-    case clang::Type::BlockPointer:
-      if (pointee_type)
-        pointee_type->SetCompilerType(
-            this, llvm::cast<clang::BlockPointerType>(qual_type)
-                      ->getPointeeType()
-                      .getAsOpaquePtr());
-      return true;
-    case clang::Type::Pointer:
-      if (pointee_type)
-        pointee_type->SetCompilerType(this,
-                                      llvm::cast<clang::PointerType>(qual_type)
-                                          ->getPointeeType()
-                                          .getAsOpaquePtr());
-      return true;
-    case clang::Type::MemberPointer:
-      if (pointee_type)
-        pointee_type->SetCompilerType(
-            this, llvm::cast<clang::MemberPointerType>(qual_type)
-                      ->getPointeeType()
-                      .getAsOpaquePtr());
-      return true;
-    case clang::Type::LValueReference:
-      if (pointee_type)
-        pointee_type->SetCompilerType(
-            this, llvm::cast<clang::LValueReferenceType>(qual_type)
-                      ->desugar()
-                      .getAsOpaquePtr());
-      return true;
-    case clang::Type::RValueReference:
-      if (pointee_type)
-        pointee_type->SetCompilerType(
-            this, llvm::cast<clang::RValueReferenceType>(qual_type)
-                      ->desugar()
-                      .getAsOpaquePtr());
-      return true;
-    default:
-      break;
-    }
-  }
-  if (pointee_type)
-    pointee_type->Clear();
-  return false;
-}
-
-bool ClangASTContext::IsReferenceType(lldb::opaque_compiler_type_t type,
-                                      CompilerType *pointee_type,
-                                      bool *is_rvalue) {
-  if (type) {
-    clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
-    const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-
-    switch (type_class) {
-    case clang::Type::LValueReference:
-      if (pointee_type)
-        pointee_type->SetCompilerType(
-            this, llvm::cast<clang::LValueReferenceType>(qual_type)
-                      ->desugar()
-                      .getAsOpaquePtr());
-      if (is_rvalue)
-        *is_rvalue = false;
-      return true;
-    case clang::Type::RValueReference:
-      if (pointee_type)
-        pointee_type->SetCompilerType(
-            this, llvm::cast<clang::RValueReferenceType>(qual_type)
-                      ->desugar()
-                      .getAsOpaquePtr());
-      if (is_rvalue)
-        *is_rvalue = true;
-      return true;
-
-    default:
-      break;
-    }
-  }
-  if (pointee_type)
-    pointee_type->Clear();
-  return false;
-}
-
-bool ClangASTContext::IsFloatingPointType(lldb::opaque_compiler_type_t type,
-                                          uint32_t &count, bool &is_complex) {
-  if (type) {
-    clang::QualType qual_type(GetCanonicalQualType(type));
-
-    if (const clang::BuiltinType *BT = llvm::dyn_cast<clang::BuiltinType>(
-            qual_type->getCanonicalTypeInternal())) {
-      clang::BuiltinType::Kind kind = BT->getKind();
-      if (kind >= clang::BuiltinType::Float &&
-          kind <= clang::BuiltinType::LongDouble) {
-        count = 1;
-        is_complex = false;
-        return true;
-      }
-    } else if (const clang::ComplexType *CT =
-                   llvm::dyn_cast<clang::ComplexType>(
-                       qual_type->getCanonicalTypeInternal())) {
-      if (IsFloatingPointType(CT->getElementType().getAsOpaquePtr(), count,
-                              is_complex)) {
-        count = 2;
-        is_complex = true;
-        return true;
-      }
-    } else if (const clang::VectorType *VT = llvm::dyn_cast<clang::VectorType>(
-                   qual_type->getCanonicalTypeInternal())) {
-      if (IsFloatingPointType(VT->getElementType().getAsOpaquePtr(), count,
-                              is_complex)) {
-        count = VT->getNumElements();
-        is_complex = false;
-        return true;
-      }
-    }
-  }
-  count = 0;
-  is_complex = false;
-  return false;
-}
-
-bool ClangASTContext::IsDefined(lldb::opaque_compiler_type_t type) {
-  if (!type)
-    return false;
-
-  clang::QualType qual_type(GetQualType(type));
-  const clang::TagType *tag_type =
-      llvm::dyn_cast<clang::TagType>(qual_type.getTypePtr());
-  if (tag_type) {
-    clang::TagDecl *tag_decl = tag_type->getDecl();
-    if (tag_decl)
-      return tag_decl->isCompleteDefinition();
-    return false;
-  } else {
-    const clang::ObjCObjectType *objc_class_type =
-        llvm::dyn_cast<clang::ObjCObjectType>(qual_type);
-    if (objc_class_type) {
-      clang::ObjCInterfaceDecl *class_interface_decl =
-          objc_class_type->getInterface();
-      if (class_interface_decl)
-        return class_interface_decl->getDefinition() != nullptr;
-      return false;
-    }
-  }
-  return true;
-}
-
-bool ClangASTContext::IsObjCClassType(const CompilerType &type) {
-  if (ClangUtil::IsClangType(type)) {
-    clang::QualType qual_type(ClangUtil::GetCanonicalQualType(type));
-
-    const clang::ObjCObjectPointerType *obj_pointer_type =
-        llvm::dyn_cast<clang::ObjCObjectPointerType>(qual_type);
-
-    if (obj_pointer_type)
-      return obj_pointer_type->isObjCClassType();
-  }
-  return false;
-}
-
-bool ClangASTContext::IsObjCObjectOrInterfaceType(const CompilerType &type) {
-  if (ClangUtil::IsClangType(type))
-    return ClangUtil::GetCanonicalQualType(type)->isObjCObjectOrInterfaceType();
-  return false;
-}
-
-bool ClangASTContext::IsClassType(lldb::opaque_compiler_type_t type) {
-  if (!type)
-    return false;
-  clang::QualType qual_type(GetCanonicalQualType(type));
-  const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-  return (type_class == clang::Type::Record);
-}
-
-bool ClangASTContext::IsEnumType(lldb::opaque_compiler_type_t type) {
-  if (!type)
-    return false;
-  clang::QualType qual_type(GetCanonicalQualType(type));
-  const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-  return (type_class == clang::Type::Enum);
-}
-
-bool ClangASTContext::IsPolymorphicClass(lldb::opaque_compiler_type_t type) {
-  if (type) {
-    clang::QualType qual_type(GetCanonicalQualType(type));
-    const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-    switch (type_class) {
-    case clang::Type::Record:
-      if (GetCompleteType(type)) {
-        const clang::RecordType *record_type =
-            llvm::cast<clang::RecordType>(qual_type.getTypePtr());
-        const clang::RecordDecl *record_decl = record_type->getDecl();
-        if (record_decl) {
-          const clang::CXXRecordDecl *cxx_record_decl =
-              llvm::dyn_cast<clang::CXXRecordDecl>(record_decl);
-          if (cxx_record_decl)
-            return cxx_record_decl->isPolymorphic();
-        }
-      }
-      break;
-
-    default:
-      break;
-    }
-  }
-  return false;
-}
-
-bool ClangASTContext::IsPossibleDynamicType(lldb::opaque_compiler_type_t type,
-                                            CompilerType *dynamic_pointee_type,
-                                            bool check_cplusplus,
-                                            bool check_objc) {
-  clang::QualType pointee_qual_type;
-  if (type) {
-    clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
-    bool success = false;
-    const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-    switch (type_class) {
-    case clang::Type::Builtin:
-      if (check_objc &&
-          llvm::cast<clang::BuiltinType>(qual_type)->getKind() ==
-              clang::BuiltinType::ObjCId) {
-        if (dynamic_pointee_type)
-          dynamic_pointee_type->SetCompilerType(this, type);
-        return true;
-      }
-      break;
-
-    case clang::Type::ObjCObjectPointer:
-      if (check_objc) {
-        if (auto objc_pointee_type =
-                qual_type->getPointeeType().getTypePtrOrNull()) {
-          if (auto objc_object_type =
-                  llvm::dyn_cast_or_null<clang::ObjCObjectType>(
-                      objc_pointee_type)) {
-            if (objc_object_type->isObjCClass())
-              return false;
-          }
-        }
-        if (dynamic_pointee_type)
-          dynamic_pointee_type->SetCompilerType(
-              this, llvm::cast<clang::ObjCObjectPointerType>(qual_type)
-                        ->getPointeeType()
-                        .getAsOpaquePtr());
-        return true;
-      }
-      break;
-
-    case clang::Type::Pointer:
-      pointee_qual_type =
-          llvm::cast<clang::PointerType>(qual_type)->getPointeeType();
-      success = true;
-      break;
-
-    case clang::Type::LValueReference:
-    case clang::Type::RValueReference:
-      pointee_qual_type =
-          llvm::cast<clang::ReferenceType>(qual_type)->getPointeeType();
-      success = true;
-      break;
-
-    default:
-      break;
-    }
-
-    if (success) {
-      // Check to make sure what we are pointing too is a possible dynamic C++
-      // type We currently accept any "void *" (in case we have a class that
-      // has been watered down to an opaque pointer) and virtual C++ classes.
-      const clang::Type::TypeClass pointee_type_class =
-          pointee_qual_type.getCanonicalType()->getTypeClass();
-      switch (pointee_type_class) {
-      case clang::Type::Builtin:
-        switch (llvm::cast<clang::BuiltinType>(pointee_qual_type)->getKind()) {
-        case clang::BuiltinType::UnknownAny:
-        case clang::BuiltinType::Void:
-          if (dynamic_pointee_type)
-            dynamic_pointee_type->SetCompilerType(
-                this, pointee_qual_type.getAsOpaquePtr());
-          return true;
-        default:
-          break;
-        }
-        break;
-
-      case clang::Type::Record:
-        if (check_cplusplus) {
-          clang::CXXRecordDecl *cxx_record_decl =
-              pointee_qual_type->getAsCXXRecordDecl();
-          if (cxx_record_decl) {
-            bool is_complete = cxx_record_decl->isCompleteDefinition();
-
-            if (is_complete)
-              success = cxx_record_decl->isDynamicClass();
-            else {
-              ClangASTMetadata *metadata = GetMetadata(cxx_record_decl);
-              if (metadata)
-                success = metadata->GetIsDynamicCXXType();
-              else {
-                is_complete = GetType(pointee_qual_type).GetCompleteType();
-                if (is_complete)
-                  success = cxx_record_decl->isDynamicClass();
-                else
-                  success = false;
-              }
-            }
-
-            if (success) {
-              if (dynamic_pointee_type)
-                dynamic_pointee_type->SetCompilerType(
-                    this, pointee_qual_type.getAsOpaquePtr());
-              return true;
-            }
-          }
-        }
-        break;
-
-      case clang::Type::ObjCObject:
-      case clang::Type::ObjCInterface:
-        if (check_objc) {
-          if (dynamic_pointee_type)
-            dynamic_pointee_type->SetCompilerType(
-                this, pointee_qual_type.getAsOpaquePtr());
-          return true;
-        }
-        break;
-
-      default:
-        break;
-      }
-    }
-  }
-  if (dynamic_pointee_type)
-    dynamic_pointee_type->Clear();
-  return false;
-}
-
-bool ClangASTContext::IsScalarType(lldb::opaque_compiler_type_t type) {
-  if (!type)
-    return false;
-
-  return (GetTypeInfo(type, nullptr) & eTypeIsScalar) != 0;
-}
-
-bool ClangASTContext::IsTypedefType(lldb::opaque_compiler_type_t type) {
-  if (!type)
-    return false;
-  return GetQualType(type)->getTypeClass() == clang::Type::Typedef;
-}
-
-bool ClangASTContext::IsVoidType(lldb::opaque_compiler_type_t type) {
-  if (!type)
-    return false;
-  return GetCanonicalQualType(type)->isVoidType();
-}
-
-bool ClangASTContext::CanPassInRegisters(const CompilerType &type) {
-  if (auto *record_decl =
-      ClangASTContext::GetAsRecordDecl(type)) {
-    return record_decl->canPassInRegisters();
-  }
-  return false;
-}
-
-bool ClangASTContext::SupportsLanguage(lldb::LanguageType language) {
-  return ClangASTContextSupportsLanguage(language);
-}
-
-Optional<std::string>
-ClangASTContext::GetCXXClassName(const CompilerType &type) {
-  if (!type)
-    return llvm::None;
-
-  clang::QualType qual_type(ClangUtil::GetCanonicalQualType(type));
-  if (qual_type.isNull())
-    return llvm::None;
-
-  clang::CXXRecordDecl *cxx_record_decl = qual_type->getAsCXXRecordDecl();
-  if (!cxx_record_decl)
-    return llvm::None;
-
-  return std::string(cxx_record_decl->getIdentifier()->getNameStart());
-}
-
-bool ClangASTContext::IsCXXClassType(const CompilerType &type) {
-  if (!type)
-    return false;
-
-  clang::QualType qual_type(ClangUtil::GetCanonicalQualType(type));
-  return !qual_type.isNull() && qual_type->getAsCXXRecordDecl() != nullptr;
-}
-
-bool ClangASTContext::IsBeingDefined(lldb::opaque_compiler_type_t type) {
-  if (!type)
-    return false;
-  clang::QualType qual_type(GetCanonicalQualType(type));
-  const clang::TagType *tag_type = llvm::dyn_cast<clang::TagType>(qual_type);
-  if (tag_type)
-    return tag_type->isBeingDefined();
-  return false;
-}
-
-bool ClangASTContext::IsObjCObjectPointerType(const CompilerType &type,
-                                              CompilerType *class_type_ptr) {
-  if (!ClangUtil::IsClangType(type))
-    return false;
-
-  clang::QualType qual_type(ClangUtil::GetCanonicalQualType(type));
-
-  if (!qual_type.isNull() && qual_type->isObjCObjectPointerType()) {
-    if (class_type_ptr) {
-      if (!qual_type->isObjCClassType() && !qual_type->isObjCIdType()) {
-        const clang::ObjCObjectPointerType *obj_pointer_type =
-            llvm::dyn_cast<clang::ObjCObjectPointerType>(qual_type);
-        if (obj_pointer_type == nullptr)
-          class_type_ptr->Clear();
-        else
-          class_type_ptr->SetCompilerType(
-              type.GetTypeSystem(),
-              clang::QualType(obj_pointer_type->getInterfaceType(), 0)
-                  .getAsOpaquePtr());
-      }
-    }
-    return true;
-  }
-  if (class_type_ptr)
-    class_type_ptr->Clear();
-  return false;
-}
-
-// Type Completion
-
-bool ClangASTContext::GetCompleteType(lldb::opaque_compiler_type_t type) {
-  if (!type)
-    return false;
-  const bool allow_completion = true;
-  return GetCompleteQualType(&getASTContext(), GetQualType(type),
-                             allow_completion);
-}
-
-ConstString ClangASTContext::GetTypeName(lldb::opaque_compiler_type_t type) {
-  std::string type_name;
-  if (type) {
-    clang::PrintingPolicy printing_policy(getASTContext().getPrintingPolicy());
-    clang::QualType qual_type(GetQualType(type));
-    printing_policy.SuppressTagKeyword = true;
-    const clang::TypedefType *typedef_type =
-        qual_type->getAs<clang::TypedefType>();
-    if (typedef_type) {
-      const clang::TypedefNameDecl *typedef_decl = typedef_type->getDecl();
-      type_name = typedef_decl->getQualifiedNameAsString();
-    } else {
-      type_name = qual_type.getAsString(printing_policy);
-    }
-  }
-  return ConstString(type_name);
-}
-
-uint32_t
-ClangASTContext::GetTypeInfo(lldb::opaque_compiler_type_t type,
-                             CompilerType *pointee_or_element_clang_type) {
-  if (!type)
-    return 0;
-
-  if (pointee_or_element_clang_type)
-    pointee_or_element_clang_type->Clear();
-
-  clang::QualType qual_type =
-      RemoveWrappingTypes(GetQualType(type), {clang::Type::Typedef});
-
-  const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-  switch (type_class) {
-  case clang::Type::Attributed:
-    return GetTypeInfo(
-        qual_type->getAs<clang::AttributedType>()
-            ->getModifiedType().getAsOpaquePtr(),
-        pointee_or_element_clang_type);
-  case clang::Type::Builtin: {
-    const clang::BuiltinType *builtin_type = llvm::dyn_cast<clang::BuiltinType>(
-        qual_type->getCanonicalTypeInternal());
-
-    uint32_t builtin_type_flags = eTypeIsBuiltIn | eTypeHasValue;
-    switch (builtin_type->getKind()) {
-    case clang::BuiltinType::ObjCId:
-    case clang::BuiltinType::ObjCClass:
-      if (pointee_or_element_clang_type)
-        pointee_or_element_clang_type->SetCompilerType(
-            this, getASTContext().ObjCBuiltinClassTy.getAsOpaquePtr());
-      builtin_type_flags |= eTypeIsPointer | eTypeIsObjC;
-      break;
-
-    case clang::BuiltinType::ObjCSel:
-      if (pointee_or_element_clang_type)
-        pointee_or_element_clang_type->SetCompilerType(
-            this, getASTContext().CharTy.getAsOpaquePtr());
-      builtin_type_flags |= eTypeIsPointer | eTypeIsObjC;
-      break;
-
-    case clang::BuiltinType::Bool:
-    case clang::BuiltinType::Char_U:
-    case clang::BuiltinType::UChar:
-    case clang::BuiltinType::WChar_U:
-    case clang::BuiltinType::Char16:
-    case clang::BuiltinType::Char32:
-    case clang::BuiltinType::UShort:
-    case clang::BuiltinType::UInt:
-    case clang::BuiltinType::ULong:
-    case clang::BuiltinType::ULongLong:
-    case clang::BuiltinType::UInt128:
-    case clang::BuiltinType::Char_S:
-    case clang::BuiltinType::SChar:
-    case clang::BuiltinType::WChar_S:
-    case clang::BuiltinType::Short:
-    case clang::BuiltinType::Int:
-    case clang::BuiltinType::Long:
-    case clang::BuiltinType::LongLong:
-    case clang::BuiltinType::Int128:
-    case clang::BuiltinType::Float:
-    case clang::BuiltinType::Double:
-    case clang::BuiltinType::LongDouble:
-      builtin_type_flags |= eTypeIsScalar;
-      if (builtin_type->isInteger()) {
-        builtin_type_flags |= eTypeIsInteger;
-        if (builtin_type->isSignedInteger())
-          builtin_type_flags |= eTypeIsSigned;
-      } else if (builtin_type->isFloatingPoint())
-        builtin_type_flags |= eTypeIsFloat;
-      break;
-    default:
-      break;
-    }
-    return builtin_type_flags;
-  }
-
-  case clang::Type::BlockPointer:
-    if (pointee_or_element_clang_type)
-      pointee_or_element_clang_type->SetCompilerType(
-          this, qual_type->getPointeeType().getAsOpaquePtr());
-    return eTypeIsPointer | eTypeHasChildren | eTypeIsBlock;
-
-  case clang::Type::Complex: {
-    uint32_t complex_type_flags =
-        eTypeIsBuiltIn | eTypeHasValue | eTypeIsComplex;
-    const clang::ComplexType *complex_type = llvm::dyn_cast<clang::ComplexType>(
-        qual_type->getCanonicalTypeInternal());
-    if (complex_type) {
-      clang::QualType complex_element_type(complex_type->getElementType());
-      if (complex_element_type->isIntegerType())
-        complex_type_flags |= eTypeIsFloat;
-      else if (complex_element_type->isFloatingType())
-        complex_type_flags |= eTypeIsInteger;
-    }
-    return complex_type_flags;
-  } break;
-
-  case clang::Type::ConstantArray:
-  case clang::Type::DependentSizedArray:
-  case clang::Type::IncompleteArray:
-  case clang::Type::VariableArray:
-    if (pointee_or_element_clang_type)
-      pointee_or_element_clang_type->SetCompilerType(
-          this, llvm::cast<clang::ArrayType>(qual_type.getTypePtr())
-                    ->getElementType()
-                    .getAsOpaquePtr());
-    return eTypeHasChildren | eTypeIsArray;
-
-  case clang::Type::DependentName:
-    return 0;
-  case clang::Type::DependentSizedExtVector:
-    return eTypeHasChildren | eTypeIsVector;
-  case clang::Type::DependentTemplateSpecialization:
-    return eTypeIsTemplate;
-
-  case clang::Type::Enum:
-    if (pointee_or_element_clang_type)
-      pointee_or_element_clang_type->SetCompilerType(
-          this, llvm::cast<clang::EnumType>(qual_type)
-                    ->getDecl()
-                    ->getIntegerType()
-                    .getAsOpaquePtr());
-    return eTypeIsEnumeration | eTypeHasValue;
-
-  case clang::Type::FunctionProto:
-    return eTypeIsFuncPrototype | eTypeHasValue;
-  case clang::Type::FunctionNoProto:
-    return eTypeIsFuncPrototype | eTypeHasValue;
-  case clang::Type::InjectedClassName:
-    return 0;
-
-  case clang::Type::LValueReference:
-  case clang::Type::RValueReference:
-    if (pointee_or_element_clang_type)
-      pointee_or_element_clang_type->SetCompilerType(
-          this, llvm::cast<clang::ReferenceType>(qual_type.getTypePtr())
-                    ->getPointeeType()
-                    .getAsOpaquePtr());
-    return eTypeHasChildren | eTypeIsReference | eTypeHasValue;
-
-  case clang::Type::MemberPointer:
-    return eTypeIsPointer | eTypeIsMember | eTypeHasValue;
-
-  case clang::Type::ObjCObjectPointer:
-    if (pointee_or_element_clang_type)
-      pointee_or_element_clang_type->SetCompilerType(
-          this, qual_type->getPointeeType().getAsOpaquePtr());
-    return eTypeHasChildren | eTypeIsObjC | eTypeIsClass | eTypeIsPointer |
-           eTypeHasValue;
-
-  case clang::Type::ObjCObject:
-    return eTypeHasChildren | eTypeIsObjC | eTypeIsClass;
-  case clang::Type::ObjCInterface:
-    return eTypeHasChildren | eTypeIsObjC | eTypeIsClass;
-
-  case clang::Type::Pointer:
-    if (pointee_or_element_clang_type)
-      pointee_or_element_clang_type->SetCompilerType(
-          this, qual_type->getPointeeType().getAsOpaquePtr());
-    return eTypeHasChildren | eTypeIsPointer | eTypeHasValue;
-
-  case clang::Type::Record:
-    if (qual_type->getAsCXXRecordDecl())
-      return eTypeHasChildren | eTypeIsClass | eTypeIsCPlusPlus;
-    else
-      return eTypeHasChildren | eTypeIsStructUnion;
-    break;
-  case clang::Type::SubstTemplateTypeParm:
-    return eTypeIsTemplate;
-  case clang::Type::TemplateTypeParm:
-    return eTypeIsTemplate;
-  case clang::Type::TemplateSpecialization:
-    return eTypeIsTemplate;
-
-  case clang::Type::Typedef:
-    return eTypeIsTypedef | GetType(llvm::cast<clang::TypedefType>(qual_type)
-                                        ->getDecl()
-                                        ->getUnderlyingType())
-                                .GetTypeInfo(pointee_or_element_clang_type);
-  case clang::Type::UnresolvedUsing:
-    return 0;
-
-  case clang::Type::ExtVector:
-  case clang::Type::Vector: {
-    uint32_t vector_type_flags = eTypeHasChildren | eTypeIsVector;
-    const clang::VectorType *vector_type = llvm::dyn_cast<clang::VectorType>(
-        qual_type->getCanonicalTypeInternal());
-    if (vector_type) {
-      if (vector_type->isIntegerType())
-        vector_type_flags |= eTypeIsFloat;
-      else if (vector_type->isFloatingType())
-        vector_type_flags |= eTypeIsInteger;
-    }
-    return vector_type_flags;
-  }
-  default:
-    return 0;
-  }
-  return 0;
-}
-
-lldb::LanguageType
-ClangASTContext::GetMinimumLanguage(lldb::opaque_compiler_type_t type) {
-  if (!type)
-    return lldb::eLanguageTypeC;
-
-  // If the type is a reference, then resolve it to what it refers to first:
-  clang::QualType qual_type(GetCanonicalQualType(type).getNonReferenceType());
-  if (qual_type->isAnyPointerType()) {
-    if (qual_type->isObjCObjectPointerType())
-      return lldb::eLanguageTypeObjC;
-    if (qual_type->getPointeeCXXRecordDecl())
-      return lldb::eLanguageTypeC_plus_plus;
-
-    clang::QualType pointee_type(qual_type->getPointeeType());
-    if (pointee_type->getPointeeCXXRecordDecl())
-      return lldb::eLanguageTypeC_plus_plus;
-    if (pointee_type->isObjCObjectOrInterfaceType())
-      return lldb::eLanguageTypeObjC;
-    if (pointee_type->isObjCClassType())
-      return lldb::eLanguageTypeObjC;
-    if (pointee_type.getTypePtr() ==
-        getASTContext().ObjCBuiltinIdTy.getTypePtr())
-      return lldb::eLanguageTypeObjC;
-  } else {
-    if (qual_type->isObjCObjectOrInterfaceType())
-      return lldb::eLanguageTypeObjC;
-    if (qual_type->getAsCXXRecordDecl())
-      return lldb::eLanguageTypeC_plus_plus;
-    switch (qual_type->getTypeClass()) {
-    default:
-      break;
-    case clang::Type::Builtin:
-      switch (llvm::cast<clang::BuiltinType>(qual_type)->getKind()) {
-      default:
-      case clang::BuiltinType::Void:
-      case clang::BuiltinType::Bool:
-      case clang::BuiltinType::Char_U:
-      case clang::BuiltinType::UChar:
-      case clang::BuiltinType::WChar_U:
-      case clang::BuiltinType::Char16:
-      case clang::BuiltinType::Char32:
-      case clang::BuiltinType::UShort:
-      case clang::BuiltinType::UInt:
-      case clang::BuiltinType::ULong:
-      case clang::BuiltinType::ULongLong:
-      case clang::BuiltinType::UInt128:
-      case clang::BuiltinType::Char_S:
-      case clang::BuiltinType::SChar:
-      case clang::BuiltinType::WChar_S:
-      case clang::BuiltinType::Short:
-      case clang::BuiltinType::Int:
-      case clang::BuiltinType::Long:
-      case clang::BuiltinType::LongLong:
-      case clang::BuiltinType::Int128:
-      case clang::BuiltinType::Float:
-      case clang::BuiltinType::Double:
-      case clang::BuiltinType::LongDouble:
-        break;
-
-      case clang::BuiltinType::NullPtr:
-        return eLanguageTypeC_plus_plus;
-
-      case clang::BuiltinType::ObjCId:
-      case clang::BuiltinType::ObjCClass:
-      case clang::BuiltinType::ObjCSel:
-        return eLanguageTypeObjC;
-
-      case clang::BuiltinType::Dependent:
-      case clang::BuiltinType::Overload:
-      case clang::BuiltinType::BoundMember:
-      case clang::BuiltinType::UnknownAny:
-        break;
-      }
-      break;
-    case clang::Type::Typedef:
-      return GetType(llvm::cast<clang::TypedefType>(qual_type)
-                         ->getDecl()
-                         ->getUnderlyingType())
-          .GetMinimumLanguage();
-    }
-  }
-  return lldb::eLanguageTypeC;
-}
-
-lldb::TypeClass
-ClangASTContext::GetTypeClass(lldb::opaque_compiler_type_t type) {
-  if (!type)
-    return lldb::eTypeClassInvalid;
-
-  clang::QualType qual_type =
-      RemoveWrappingTypes(GetQualType(type), {clang::Type::Typedef});
-
-  switch (qual_type->getTypeClass()) {
-  case clang::Type::Atomic:
-  case clang::Type::Auto:
-  case clang::Type::Decltype:
-  case clang::Type::Elaborated:
-  case clang::Type::Paren:
-  case clang::Type::TypeOf:
-  case clang::Type::TypeOfExpr:
-    llvm_unreachable("Handled in RemoveWrappingTypes!");
-  case clang::Type::UnaryTransform:
-    break;
-  case clang::Type::FunctionNoProto:
-    return lldb::eTypeClassFunction;
-  case clang::Type::FunctionProto:
-    return lldb::eTypeClassFunction;
-  case clang::Type::IncompleteArray:
-    return lldb::eTypeClassArray;
-  case clang::Type::VariableArray:
-    return lldb::eTypeClassArray;
-  case clang::Type::ConstantArray:
-    return lldb::eTypeClassArray;
-  case clang::Type::DependentSizedArray:
-    return lldb::eTypeClassArray;
-  case clang::Type::DependentSizedExtVector:
-    return lldb::eTypeClassVector;
-  case clang::Type::DependentVector:
-    return lldb::eTypeClassVector;
-  case clang::Type::ExtVector:
-    return lldb::eTypeClassVector;
-  case clang::Type::Vector:
-    return lldb::eTypeClassVector;
-  case clang::Type::Builtin:
-    return lldb::eTypeClassBuiltin;
-  case clang::Type::ObjCObjectPointer:
-    return lldb::eTypeClassObjCObjectPointer;
-  case clang::Type::BlockPointer:
-    return lldb::eTypeClassBlockPointer;
-  case clang::Type::Pointer:
-    return lldb::eTypeClassPointer;
-  case clang::Type::LValueReference:
-    return lldb::eTypeClassReference;
-  case clang::Type::RValueReference:
-    return lldb::eTypeClassReference;
-  case clang::Type::MemberPointer:
-    return lldb::eTypeClassMemberPointer;
-  case clang::Type::Complex:
-    if (qual_type->isComplexType())
-      return lldb::eTypeClassComplexFloat;
-    else
-      return lldb::eTypeClassComplexInteger;
-  case clang::Type::ObjCObject:
-    return lldb::eTypeClassObjCObject;
-  case clang::Type::ObjCInterface:
-    return lldb::eTypeClassObjCInterface;
-  case clang::Type::Record: {
-    const clang::RecordType *record_type =
-        llvm::cast<clang::RecordType>(qual_type.getTypePtr());
-    const clang::RecordDecl *record_decl = record_type->getDecl();
-    if (record_decl->isUnion())
-      return lldb::eTypeClassUnion;
-    else if (record_decl->isStruct())
-      return lldb::eTypeClassStruct;
-    else
-      return lldb::eTypeClassClass;
-  } break;
-  case clang::Type::Enum:
-    return lldb::eTypeClassEnumeration;
-  case clang::Type::Typedef:
-    return lldb::eTypeClassTypedef;
-  case clang::Type::UnresolvedUsing:
-    break;
-
-  case clang::Type::Attributed:
-    break;
-  case clang::Type::TemplateTypeParm:
-    break;
-  case clang::Type::SubstTemplateTypeParm:
-    break;
-  case clang::Type::SubstTemplateTypeParmPack:
-    break;
-  case clang::Type::InjectedClassName:
-    break;
-  case clang::Type::DependentName:
-    break;
-  case clang::Type::DependentTemplateSpecialization:
-    break;
-  case clang::Type::PackExpansion:
-    break;
-
-  case clang::Type::TemplateSpecialization:
-    break;
-  case clang::Type::DeducedTemplateSpecialization:
-    break;
-  case clang::Type::Pipe:
-    break;
-
-  // pointer type decayed from an array or function type.
-  case clang::Type::Decayed:
-    break;
-  case clang::Type::Adjusted:
-    break;
-  case clang::Type::ObjCTypeParam:
-    break;
-
-  case clang::Type::DependentAddressSpace:
-    break;
-  case clang::Type::MacroQualified:
-    break;
-  }
-  // We don't know hot to display this type...
-  return lldb::eTypeClassOther;
-}
-
-unsigned ClangASTContext::GetTypeQualifiers(lldb::opaque_compiler_type_t type) {
-  if (type)
-    return GetQualType(type).getQualifiers().getCVRQualifiers();
-  return 0;
-}
-
-// Creating related types
-
-CompilerType
-ClangASTContext::GetArrayElementType(lldb::opaque_compiler_type_t type,
-                                     uint64_t *stride) {
-  if (type) {
-    clang::QualType qual_type(GetQualType(type));
-
-    const clang::Type *array_eletype =
-        qual_type.getTypePtr()->getArrayElementTypeNoTypeQual();
-
-    if (!array_eletype)
-      return CompilerType();
-
-    CompilerType element_type = GetType(clang::QualType(array_eletype, 0));
-
-    // TODO: the real stride will be >= this value.. find the real one!
-    if (stride)
-      if (Optional<uint64_t> size = element_type.GetByteSize(nullptr))
-        *stride = *size;
-
-    return element_type;
-  }
-  return CompilerType();
-}
-
-CompilerType ClangASTContext::GetArrayType(lldb::opaque_compiler_type_t type,
-                                           uint64_t size) {
-  if (type) {
-    clang::QualType qual_type(GetCanonicalQualType(type));
-    clang::ASTContext &ast_ctx = getASTContext();
-    if (size != 0)
-      return GetType(ast_ctx.getConstantArrayType(
-          qual_type, llvm::APInt(64, size), nullptr,
-          clang::ArrayType::ArraySizeModifier::Normal, 0));
-    else
-      return GetType(ast_ctx.getIncompleteArrayType(
-          qual_type, clang::ArrayType::ArraySizeModifier::Normal, 0));
-  }
-
-  return CompilerType();
-}
-
-CompilerType
-ClangASTContext::GetCanonicalType(lldb::opaque_compiler_type_t type) {
-  if (type)
-    return GetType(GetCanonicalQualType(type));
-  return CompilerType();
-}
-
-static clang::QualType GetFullyUnqualifiedType_Impl(clang::ASTContext *ast,
-                                                    clang::QualType qual_type) {
-  if (qual_type->isPointerType())
-    qual_type = ast->getPointerType(
-        GetFullyUnqualifiedType_Impl(ast, qual_type->getPointeeType()));
-  else
-    qual_type = qual_type.getUnqualifiedType();
-  qual_type.removeLocalConst();
-  qual_type.removeLocalRestrict();
-  qual_type.removeLocalVolatile();
-  return qual_type;
-}
-
-CompilerType
-ClangASTContext::GetFullyUnqualifiedType(lldb::opaque_compiler_type_t type) {
-  if (type)
-    return GetType(
-        GetFullyUnqualifiedType_Impl(&getASTContext(), GetQualType(type)));
-  return CompilerType();
-}
-
-int ClangASTContext::GetFunctionArgumentCount(
-    lldb::opaque_compiler_type_t type) {
-  if (type) {
-    const clang::FunctionProtoType *func =
-        llvm::dyn_cast<clang::FunctionProtoType>(GetCanonicalQualType(type));
-    if (func)
-      return func->getNumParams();
-  }
-  return -1;
-}
-
-CompilerType ClangASTContext::GetFunctionArgumentTypeAtIndex(
-    lldb::opaque_compiler_type_t type, size_t idx) {
-  if (type) {
-    const clang::FunctionProtoType *func =
-        llvm::dyn_cast<clang::FunctionProtoType>(GetQualType(type));
-    if (func) {
-      const uint32_t num_args = func->getNumParams();
-      if (idx < num_args)
-        return GetType(func->getParamType(idx));
-    }
-  }
-  return CompilerType();
-}
-
-CompilerType
-ClangASTContext::GetFunctionReturnType(lldb::opaque_compiler_type_t type) {
-  if (type) {
-    clang::QualType qual_type(GetQualType(type));
-    const clang::FunctionProtoType *func =
-        llvm::dyn_cast<clang::FunctionProtoType>(qual_type.getTypePtr());
-    if (func)
-      return GetType(func->getReturnType());
-  }
-  return CompilerType();
-}
-
-size_t
-ClangASTContext::GetNumMemberFunctions(lldb::opaque_compiler_type_t type) {
-  size_t num_functions = 0;
-  if (type) {
-    clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
-    switch (qual_type->getTypeClass()) {
-    case clang::Type::Record:
-      if (GetCompleteQualType(&getASTContext(), qual_type)) {
-        const clang::RecordType *record_type =
-            llvm::cast<clang::RecordType>(qual_type.getTypePtr());
-        const clang::RecordDecl *record_decl = record_type->getDecl();
-        assert(record_decl);
-        const clang::CXXRecordDecl *cxx_record_decl =
-            llvm::dyn_cast<clang::CXXRecordDecl>(record_decl);
-        if (cxx_record_decl)
-          num_functions = std::distance(cxx_record_decl->method_begin(),
-                                        cxx_record_decl->method_end());
-      }
-      break;
-
-    case clang::Type::ObjCObjectPointer: {
-      const clang::ObjCObjectPointerType *objc_class_type =
-          qual_type->getAs<clang::ObjCObjectPointerType>();
-      const clang::ObjCInterfaceType *objc_interface_type =
-          objc_class_type->getInterfaceType();
-      if (objc_interface_type &&
-          GetCompleteType(static_cast<lldb::opaque_compiler_type_t>(
-              const_cast<clang::ObjCInterfaceType *>(objc_interface_type)))) {
-        clang::ObjCInterfaceDecl *class_interface_decl =
-            objc_interface_type->getDecl();
-        if (class_interface_decl) {
-          num_functions = std::distance(class_interface_decl->meth_begin(),
-                                        class_interface_decl->meth_end());
-        }
-      }
-      break;
-    }
-
-    case clang::Type::ObjCObject:
-    case clang::Type::ObjCInterface:
-      if (GetCompleteType(type)) {
-        const clang::ObjCObjectType *objc_class_type =
-            llvm::dyn_cast<clang::ObjCObjectType>(qual_type.getTypePtr());
-        if (objc_class_type) {
-          clang::ObjCInterfaceDecl *class_interface_decl =
-              objc_class_type->getInterface();
-          if (class_interface_decl)
-            num_functions = std::distance(class_interface_decl->meth_begin(),
-                                          class_interface_decl->meth_end());
-        }
-      }
-      break;
-
-    default:
-      break;
-    }
-  }
-  return num_functions;
-}
-
-TypeMemberFunctionImpl
-ClangASTContext::GetMemberFunctionAtIndex(lldb::opaque_compiler_type_t type,
-                                          size_t idx) {
-  std::string name;
-  MemberFunctionKind kind(MemberFunctionKind::eMemberFunctionKindUnknown);
-  CompilerType clang_type;
-  CompilerDecl clang_decl;
-  if (type) {
-    clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
-    switch (qual_type->getTypeClass()) {
-    case clang::Type::Record:
-      if (GetCompleteQualType(&getASTContext(), qual_type)) {
-        const clang::RecordType *record_type =
-            llvm::cast<clang::RecordType>(qual_type.getTypePtr());
-        const clang::RecordDecl *record_decl = record_type->getDecl();
-        assert(record_decl);
-        const clang::CXXRecordDecl *cxx_record_decl =
-            llvm::dyn_cast<clang::CXXRecordDecl>(record_decl);
-        if (cxx_record_decl) {
-          auto method_iter = cxx_record_decl->method_begin();
-          auto method_end = cxx_record_decl->method_end();
-          if (idx <
-              static_cast<size_t>(std::distance(method_iter, method_end))) {
-            std::advance(method_iter, idx);
-            clang::CXXMethodDecl *cxx_method_decl =
-                method_iter->getCanonicalDecl();
-            if (cxx_method_decl) {
-              name = cxx_method_decl->getDeclName().getAsString();
-              if (cxx_method_decl->isStatic())
-                kind = lldb::eMemberFunctionKindStaticMethod;
-              else if (llvm::isa<clang::CXXConstructorDecl>(cxx_method_decl))
-                kind = lldb::eMemberFunctionKindConstructor;
-              else if (llvm::isa<clang::CXXDestructorDecl>(cxx_method_decl))
-                kind = lldb::eMemberFunctionKindDestructor;
-              else
-                kind = lldb::eMemberFunctionKindInstanceMethod;
-              clang_type = GetType(cxx_method_decl->getType());
-              clang_decl = CompilerDecl(this, cxx_method_decl);
-            }
-          }
-        }
-      }
-      break;
-
-    case clang::Type::ObjCObjectPointer: {
-      const clang::ObjCObjectPointerType *objc_class_type =
-          qual_type->getAs<clang::ObjCObjectPointerType>();
-      const clang::ObjCInterfaceType *objc_interface_type =
-          objc_class_type->getInterfaceType();
-      if (objc_interface_type &&
-          GetCompleteType(static_cast<lldb::opaque_compiler_type_t>(
-              const_cast<clang::ObjCInterfaceType *>(objc_interface_type)))) {
-        clang::ObjCInterfaceDecl *class_interface_decl =
-            objc_interface_type->getDecl();
-        if (class_interface_decl) {
-          auto method_iter = class_interface_decl->meth_begin();
-          auto method_end = class_interface_decl->meth_end();
-          if (idx <
-              static_cast<size_t>(std::distance(method_iter, method_end))) {
-            std::advance(method_iter, idx);
-            clang::ObjCMethodDecl *objc_method_decl =
-                method_iter->getCanonicalDecl();
-            if (objc_method_decl) {
-              clang_decl = CompilerDecl(this, objc_method_decl);
-              name = objc_method_decl->getSelector().getAsString();
-              if (objc_method_decl->isClassMethod())
-                kind = lldb::eMemberFunctionKindStaticMethod;
-              else
-                kind = lldb::eMemberFunctionKindInstanceMethod;
-            }
-          }
-        }
-      }
-      break;
-    }
-
-    case clang::Type::ObjCObject:
-    case clang::Type::ObjCInterface:
-      if (GetCompleteType(type)) {
-        const clang::ObjCObjectType *objc_class_type =
-            llvm::dyn_cast<clang::ObjCObjectType>(qual_type.getTypePtr());
-        if (objc_class_type) {
-          clang::ObjCInterfaceDecl *class_interface_decl =
-              objc_class_type->getInterface();
-          if (class_interface_decl) {
-            auto method_iter = class_interface_decl->meth_begin();
-            auto method_end = class_interface_decl->meth_end();
-            if (idx <
-                static_cast<size_t>(std::distance(method_iter, method_end))) {
-              std::advance(method_iter, idx);
-              clang::ObjCMethodDecl *objc_method_decl =
-                  method_iter->getCanonicalDecl();
-              if (objc_method_decl) {
-                clang_decl = CompilerDecl(this, objc_method_decl);
-                name = objc_method_decl->getSelector().getAsString();
-                if (objc_method_decl->isClassMethod())
-                  kind = lldb::eMemberFunctionKindStaticMethod;
-                else
-                  kind = lldb::eMemberFunctionKindInstanceMethod;
-              }
-            }
-          }
-        }
-      }
-      break;
-
-    default:
-      break;
-    }
-  }
-
-  if (kind == eMemberFunctionKindUnknown)
-    return TypeMemberFunctionImpl();
-  else
-    return TypeMemberFunctionImpl(clang_type, clang_decl, name, kind);
-}
-
-CompilerType
-ClangASTContext::GetNonReferenceType(lldb::opaque_compiler_type_t type) {
-  if (type)
-    return GetType(GetQualType(type).getNonReferenceType());
-  return CompilerType();
-}
-
-CompilerType ClangASTContext::CreateTypedefType(
-    const CompilerType &type, const char *typedef_name,
-    const CompilerDeclContext &compiler_decl_ctx) {
-  if (type && typedef_name && typedef_name[0]) {
-    ClangASTContext *ast =
-        llvm::dyn_cast<ClangASTContext>(type.GetTypeSystem());
-    if (!ast)
-      return CompilerType();
-    clang::ASTContext &clang_ast = ast->getASTContext();
-    clang::QualType qual_type(ClangUtil::GetQualType(type));
-
-    clang::DeclContext *decl_ctx =
-        ClangASTContext::DeclContextGetAsDeclContext(compiler_decl_ctx);
-    if (decl_ctx == nullptr)
-      decl_ctx = ast->getASTContext().getTranslationUnitDecl();
-
-    clang::TypedefDecl *decl = clang::TypedefDecl::Create(
-        clang_ast, decl_ctx, clang::SourceLocation(), clang::SourceLocation(),
-        &clang_ast.Idents.get(typedef_name),
-        clang_ast.getTrivialTypeSourceInfo(qual_type));
-
-    decl->setAccess(clang::AS_public); // TODO respect proper access specifier
-
-    decl_ctx->addDecl(decl);
-
-    // Get a uniqued clang::QualType for the typedef decl type
-    return ast->GetType(clang_ast.getTypedefType(decl));
-  }
-  return CompilerType();
-}
-
-CompilerType
-ClangASTContext::GetPointeeType(lldb::opaque_compiler_type_t type) {
-  if (type) {
-    clang::QualType qual_type(GetQualType(type));
-    return GetType(qual_type.getTypePtr()->getPointeeType());
-  }
-  return CompilerType();
-}
-
-CompilerType
-ClangASTContext::GetPointerType(lldb::opaque_compiler_type_t type) {
-  if (type) {
-    clang::QualType qual_type(GetQualType(type));
-
-    const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-    switch (type_class) {
-    case clang::Type::ObjCObject:
-    case clang::Type::ObjCInterface:
-      return GetType(getASTContext().getObjCObjectPointerType(qual_type));
-
-    default:
-      return GetType(getASTContext().getPointerType(qual_type));
-    }
-  }
-  return CompilerType();
-}
-
-CompilerType
-ClangASTContext::GetLValueReferenceType(lldb::opaque_compiler_type_t type) {
-  if (type)
-    return GetType(getASTContext().getLValueReferenceType(GetQualType(type)));
-  else
-    return CompilerType();
-}
-
-CompilerType
-ClangASTContext::GetRValueReferenceType(lldb::opaque_compiler_type_t type) {
-  if (type)
-    return GetType(getASTContext().getRValueReferenceType(GetQualType(type)));
-  else
-    return CompilerType();
-}
-
-CompilerType ClangASTContext::GetAtomicType(lldb::opaque_compiler_type_t type) {
-  if (!type)
-    return CompilerType();
-  return GetType(getASTContext().getAtomicType(GetQualType(type)));
-}
-
-CompilerType
-ClangASTContext::AddConstModifier(lldb::opaque_compiler_type_t type) {
-  if (type) {
-    clang::QualType result(GetQualType(type));
-    result.addConst();
-    return GetType(result);
-  }
-  return CompilerType();
-}
-
-CompilerType
-ClangASTContext::AddVolatileModifier(lldb::opaque_compiler_type_t type) {
-  if (type) {
-    clang::QualType result(GetQualType(type));
-    result.addVolatile();
-    return GetType(result);
-  }
-  return CompilerType();
-}
-
-CompilerType
-ClangASTContext::AddRestrictModifier(lldb::opaque_compiler_type_t type) {
-  if (type) {
-    clang::QualType result(GetQualType(type));
-    result.addRestrict();
-    return GetType(result);
-  }
-  return CompilerType();
-}
-
-CompilerType
-ClangASTContext::CreateTypedef(lldb::opaque_compiler_type_t type,
-                               const char *typedef_name,
-                               const CompilerDeclContext &compiler_decl_ctx) {
-  if (type) {
-    clang::ASTContext &clang_ast = getASTContext();
-    clang::QualType qual_type(GetQualType(type));
-
-    clang::DeclContext *decl_ctx =
-        ClangASTContext::DeclContextGetAsDeclContext(compiler_decl_ctx);
-    if (decl_ctx == nullptr)
-      decl_ctx = getASTContext().getTranslationUnitDecl();
-
-    clang::TypedefDecl *decl = clang::TypedefDecl::Create(
-        clang_ast, decl_ctx, clang::SourceLocation(), clang::SourceLocation(),
-        &clang_ast.Idents.get(typedef_name),
-        clang_ast.getTrivialTypeSourceInfo(qual_type));
-
-    clang::TagDecl *tdecl = nullptr;
-    if (!qual_type.isNull()) {
-      if (const clang::RecordType *rt = qual_type->getAs<clang::RecordType>())
-        tdecl = rt->getDecl();
-      if (const clang::EnumType *et = qual_type->getAs<clang::EnumType>())
-        tdecl = et->getDecl();
-    }
-
-    // Check whether this declaration is an anonymous struct, union, or enum,
-    // hidden behind a typedef. If so, we try to check whether we have a
-    // typedef tag to attach to the original record declaration
-    if (tdecl && !tdecl->getIdentifier() && !tdecl->getTypedefNameForAnonDecl())
-      tdecl->setTypedefNameForAnonDecl(decl);
-
-    decl->setAccess(clang::AS_public); // TODO respect proper access specifier
-
-    // Get a uniqued clang::QualType for the typedef decl type
-    return GetType(clang_ast.getTypedefType(decl));
-  }
-  return CompilerType();
-}
-
-CompilerType
-ClangASTContext::GetTypedefedType(lldb::opaque_compiler_type_t type) {
-  if (type) {
-    const clang::TypedefType *typedef_type =
-        llvm::dyn_cast<clang::TypedefType>(GetQualType(type));
-    if (typedef_type)
-      return GetType(typedef_type->getDecl()->getUnderlyingType());
-  }
-  return CompilerType();
-}
-
-// Create related types using the current type's AST
-
-CompilerType ClangASTContext::GetBasicTypeFromAST(lldb::BasicType basic_type) {
-  return ClangASTContext::GetBasicType(basic_type);
-}
-// Exploring the type
-
-const llvm::fltSemantics &
-ClangASTContext::GetFloatTypeSemantics(size_t byte_size) {
-  clang::ASTContext &ast = getASTContext();
-  const size_t bit_size = byte_size * 8;
-  if (bit_size == ast.getTypeSize(ast.FloatTy))
-    return ast.getFloatTypeSemantics(ast.FloatTy);
-  else if (bit_size == ast.getTypeSize(ast.DoubleTy))
-    return ast.getFloatTypeSemantics(ast.DoubleTy);
-  else if (bit_size == ast.getTypeSize(ast.LongDoubleTy))
-    return ast.getFloatTypeSemantics(ast.LongDoubleTy);
-  else if (bit_size == ast.getTypeSize(ast.HalfTy))
-    return ast.getFloatTypeSemantics(ast.HalfTy);
-  return llvm::APFloatBase::Bogus();
-}
-
-Optional<uint64_t>
-ClangASTContext::GetBitSize(lldb::opaque_compiler_type_t type,
-                            ExecutionContextScope *exe_scope) {
-  if (GetCompleteType(type)) {
-    clang::QualType qual_type(GetCanonicalQualType(type));
-    const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-    switch (type_class) {
-    case clang::Type::Record:
-      if (GetCompleteType(type))
-        return getASTContext().getTypeSize(qual_type);
-      else
-        return None;
-      break;
-
-    case clang::Type::ObjCInterface:
-    case clang::Type::ObjCObject: {
-      ExecutionContext exe_ctx(exe_scope);
-      Process *process = exe_ctx.GetProcessPtr();
-      if (process) {
-        ObjCLanguageRuntime *objc_runtime = ObjCLanguageRuntime::Get(*process);
-        if (objc_runtime) {
-          uint64_t bit_size = 0;
-          if (objc_runtime->GetTypeBitSize(GetType(qual_type), bit_size))
-            return bit_size;
-        }
-      } else {
-        static bool g_printed = false;
-        if (!g_printed) {
-          StreamString s;
-          DumpTypeDescription(type, &s);
-
-          llvm::outs() << "warning: trying to determine the size of type ";
-          llvm::outs() << s.GetString() << "\n";
-          llvm::outs() << "without a valid ExecutionContext. this is not "
-                          "reliable. please file a bug against LLDB.\n";
-          llvm::outs() << "backtrace:\n";
-          llvm::sys::PrintStackTrace(llvm::outs());
-          llvm::outs() << "\n";
-          g_printed = true;
-        }
-      }
-    }
-      LLVM_FALLTHROUGH;
-    default:
-      const uint32_t bit_size = getASTContext().getTypeSize(qual_type);
-      if (bit_size == 0) {
-        if (qual_type->isIncompleteArrayType())
-          return getASTContext().getTypeSize(
-              qual_type->getArrayElementTypeNoTypeQual()
-                  ->getCanonicalTypeUnqualified());
-      }
-      if (qual_type->isObjCObjectOrInterfaceType())
-        return bit_size +
-               getASTContext().getTypeSize(getASTContext().ObjCBuiltinClassTy);
-      // Function types actually have a size of 0, that's not an error.
-      if (qual_type->isFunctionProtoType())
-        return bit_size;
-      if (bit_size)
-        return bit_size;
-    }
-  }
-  return None;
-}
-
-llvm::Optional<size_t>
-ClangASTContext::GetTypeBitAlign(lldb::opaque_compiler_type_t type,
-                                 ExecutionContextScope *exe_scope) {
-  if (GetCompleteType(type))
-    return getASTContext().getTypeAlign(GetQualType(type));
-  return {};
-}
-
-lldb::Encoding ClangASTContext::GetEncoding(lldb::opaque_compiler_type_t type,
-                                            uint64_t &count) {
-  if (!type)
-    return lldb::eEncodingInvalid;
-
-  count = 1;
-  clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
-
-  switch (qual_type->getTypeClass()) {
-  case clang::Type::Atomic:
-  case clang::Type::Auto:
-  case clang::Type::Decltype:
-  case clang::Type::Elaborated:
-  case clang::Type::Paren:
-  case clang::Type::Typedef:
-  case clang::Type::TypeOf:
-  case clang::Type::TypeOfExpr:
-    llvm_unreachable("Handled in RemoveWrappingTypes!");
-
-  case clang::Type::UnaryTransform:
-    break;
-
-  case clang::Type::FunctionNoProto:
-  case clang::Type::FunctionProto:
-    break;
-
-  case clang::Type::IncompleteArray:
-  case clang::Type::VariableArray:
-    break;
-
-  case clang::Type::ConstantArray:
-    break;
-
-  case clang::Type::DependentVector:
-  case clang::Type::ExtVector:
-  case clang::Type::Vector:
-    // TODO: Set this to more than one???
-    break;
-
-  case clang::Type::Builtin:
-    switch (llvm::cast<clang::BuiltinType>(qual_type)->getKind()) {
-    case clang::BuiltinType::Void:
-      break;
-
-    case clang::BuiltinType::Bool:
-    case clang::BuiltinType::Char_S:
-    case clang::BuiltinType::SChar:
-    case clang::BuiltinType::WChar_S:
-    case clang::BuiltinType::Short:
-    case clang::BuiltinType::Int:
-    case clang::BuiltinType::Long:
-    case clang::BuiltinType::LongLong:
-    case clang::BuiltinType::Int128:
-      return lldb::eEncodingSint;
-
-    case clang::BuiltinType::Char_U:
-    case clang::BuiltinType::UChar:
-    case clang::BuiltinType::WChar_U:
-    case clang::BuiltinType::Char8:
-    case clang::BuiltinType::Char16:
-    case clang::BuiltinType::Char32:
-    case clang::BuiltinType::UShort:
-    case clang::BuiltinType::UInt:
-    case clang::BuiltinType::ULong:
-    case clang::BuiltinType::ULongLong:
-    case clang::BuiltinType::UInt128:
-      return lldb::eEncodingUint;
-
-    // Fixed point types. Note that they are currently ignored.
-    case clang::BuiltinType::ShortAccum:
-    case clang::BuiltinType::Accum:
-    case clang::BuiltinType::LongAccum:
-    case clang::BuiltinType::UShortAccum:
-    case clang::BuiltinType::UAccum:
-    case clang::BuiltinType::ULongAccum:
-    case clang::BuiltinType::ShortFract:
-    case clang::BuiltinType::Fract:
-    case clang::BuiltinType::LongFract:
-    case clang::BuiltinType::UShortFract:
-    case clang::BuiltinType::UFract:
-    case clang::BuiltinType::ULongFract:
-    case clang::BuiltinType::SatShortAccum:
-    case clang::BuiltinType::SatAccum:
-    case clang::BuiltinType::SatLongAccum:
-    case clang::BuiltinType::SatUShortAccum:
-    case clang::BuiltinType::SatUAccum:
-    case clang::BuiltinType::SatULongAccum:
-    case clang::BuiltinType::SatShortFract:
-    case clang::BuiltinType::SatFract:
-    case clang::BuiltinType::SatLongFract:
-    case clang::BuiltinType::SatUShortFract:
-    case clang::BuiltinType::SatUFract:
-    case clang::BuiltinType::SatULongFract:
-      break;
-
-    case clang::BuiltinType::Half:
-    case clang::BuiltinType::Float:
-    case clang::BuiltinType::Float16:
-    case clang::BuiltinType::Float128:
-    case clang::BuiltinType::Double:
-    case clang::BuiltinType::LongDouble:
-      return lldb::eEncodingIEEE754;
-
-    case clang::BuiltinType::ObjCClass:
-    case clang::BuiltinType::ObjCId:
-    case clang::BuiltinType::ObjCSel:
-      return lldb::eEncodingUint;
-
-    case clang::BuiltinType::NullPtr:
-      return lldb::eEncodingUint;
-
-    case clang::BuiltinType::Kind::ARCUnbridgedCast:
-    case clang::BuiltinType::Kind::BoundMember:
-    case clang::BuiltinType::Kind::BuiltinFn:
-    case clang::BuiltinType::Kind::Dependent:
-    case clang::BuiltinType::Kind::OCLClkEvent:
-    case clang::BuiltinType::Kind::OCLEvent:
-    case clang::BuiltinType::Kind::OCLImage1dRO:
-    case clang::BuiltinType::Kind::OCLImage1dWO:
-    case clang::BuiltinType::Kind::OCLImage1dRW:
-    case clang::BuiltinType::Kind::OCLImage1dArrayRO:
-    case clang::BuiltinType::Kind::OCLImage1dArrayWO:
-    case clang::BuiltinType::Kind::OCLImage1dArrayRW:
-    case clang::BuiltinType::Kind::OCLImage1dBufferRO:
-    case clang::BuiltinType::Kind::OCLImage1dBufferWO:
-    case clang::BuiltinType::Kind::OCLImage1dBufferRW:
-    case clang::BuiltinType::Kind::OCLImage2dRO:
-    case clang::BuiltinType::Kind::OCLImage2dWO:
-    case clang::BuiltinType::Kind::OCLImage2dRW:
-    case clang::BuiltinType::Kind::OCLImage2dArrayRO:
-    case clang::BuiltinType::Kind::OCLImage2dArrayWO:
-    case clang::BuiltinType::Kind::OCLImage2dArrayRW:
-    case clang::BuiltinType::Kind::OCLImage2dArrayDepthRO:
-    case clang::BuiltinType::Kind::OCLImage2dArrayDepthWO:
-    case clang::BuiltinType::Kind::OCLImage2dArrayDepthRW:
-    case clang::BuiltinType::Kind::OCLImage2dArrayMSAARO:
-    case clang::BuiltinType::Kind::OCLImage2dArrayMSAAWO:
-    case clang::BuiltinType::Kind::OCLImage2dArrayMSAARW:
-    case clang::BuiltinType::Kind::OCLImage2dArrayMSAADepthRO:
-    case clang::BuiltinType::Kind::OCLImage2dArrayMSAADepthWO:
-    case clang::BuiltinType::Kind::OCLImage2dArrayMSAADepthRW:
-    case clang::BuiltinType::Kind::OCLImage2dDepthRO:
-    case clang::BuiltinType::Kind::OCLImage2dDepthWO:
-    case clang::BuiltinType::Kind::OCLImage2dDepthRW:
-    case clang::BuiltinType::Kind::OCLImage2dMSAARO:
-    case clang::BuiltinType::Kind::OCLImage2dMSAAWO:
-    case clang::BuiltinType::Kind::OCLImage2dMSAARW:
-    case clang::BuiltinType::Kind::OCLImage2dMSAADepthRO:
-    case clang::BuiltinType::Kind::OCLImage2dMSAADepthWO:
-    case clang::BuiltinType::Kind::OCLImage2dMSAADepthRW:
-    case clang::BuiltinType::Kind::OCLImage3dRO:
-    case clang::BuiltinType::Kind::OCLImage3dWO:
-    case clang::BuiltinType::Kind::OCLImage3dRW:
-    case clang::BuiltinType::Kind::OCLQueue:
-    case clang::BuiltinType::Kind::OCLReserveID:
-    case clang::BuiltinType::Kind::OCLSampler:
-    case clang::BuiltinType::Kind::OMPArraySection:
-    case clang::BuiltinType::Kind::Overload:
-    case clang::BuiltinType::Kind::PseudoObject:
-    case clang::BuiltinType::Kind::UnknownAny:
-      break;
-
-    case clang::BuiltinType::OCLIntelSubgroupAVCMcePayload:
-    case clang::BuiltinType::OCLIntelSubgroupAVCImePayload:
-    case clang::BuiltinType::OCLIntelSubgroupAVCRefPayload:
-    case clang::BuiltinType::OCLIntelSubgroupAVCSicPayload:
-    case clang::BuiltinType::OCLIntelSubgroupAVCMceResult:
-    case clang::BuiltinType::OCLIntelSubgroupAVCImeResult:
-    case clang::BuiltinType::OCLIntelSubgroupAVCRefResult:
-    case clang::BuiltinType::OCLIntelSubgroupAVCSicResult:
-    case clang::BuiltinType::OCLIntelSubgroupAVCImeResultSingleRefStreamout:
-    case clang::BuiltinType::OCLIntelSubgroupAVCImeResultDualRefStreamout:
-    case clang::BuiltinType::OCLIntelSubgroupAVCImeSingleRefStreamin:
-    case clang::BuiltinType::OCLIntelSubgroupAVCImeDualRefStreamin:
-      break;
-
-    case clang::BuiltinType::SveBool:
-    case clang::BuiltinType::SveInt8:
-    case clang::BuiltinType::SveInt16:
-    case clang::BuiltinType::SveInt32:
-    case clang::BuiltinType::SveInt64:
-    case clang::BuiltinType::SveUint8:
-    case clang::BuiltinType::SveUint16:
-    case clang::BuiltinType::SveUint32:
-    case clang::BuiltinType::SveUint64:
-    case clang::BuiltinType::SveFloat16:
-    case clang::BuiltinType::SveFloat32:
-    case clang::BuiltinType::SveFloat64:
-      break;
-    }
-    break;
-  // All pointer types are represented as unsigned integer encodings. We may
-  // nee to add a eEncodingPointer if we ever need to know the difference
-  case clang::Type::ObjCObjectPointer:
-  case clang::Type::BlockPointer:
-  case clang::Type::Pointer:
-  case clang::Type::LValueReference:
-  case clang::Type::RValueReference:
-  case clang::Type::MemberPointer:
-    return lldb::eEncodingUint;
-  case clang::Type::Complex: {
-    lldb::Encoding encoding = lldb::eEncodingIEEE754;
-    if (qual_type->isComplexType())
-      encoding = lldb::eEncodingIEEE754;
-    else {
-      const clang::ComplexType *complex_type =
-          qual_type->getAsComplexIntegerType();
-      if (complex_type)
-        encoding = GetType(complex_type->getElementType()).GetEncoding(count);
-      else
-        encoding = lldb::eEncodingSint;
-    }
-    count = 2;
-    return encoding;
-  }
-
-  case clang::Type::ObjCInterface:
-    break;
-  case clang::Type::Record:
-    break;
-  case clang::Type::Enum:
-    return lldb::eEncodingSint;
-  case clang::Type::DependentSizedArray:
-  case clang::Type::DependentSizedExtVector:
-  case clang::Type::UnresolvedUsing:
-  case clang::Type::Attributed:
-  case clang::Type::TemplateTypeParm:
-  case clang::Type::SubstTemplateTypeParm:
-  case clang::Type::SubstTemplateTypeParmPack:
-  case clang::Type::InjectedClassName:
-  case clang::Type::DependentName:
-  case clang::Type::DependentTemplateSpecialization:
-  case clang::Type::PackExpansion:
-  case clang::Type::ObjCObject:
-
-  case clang::Type::TemplateSpecialization:
-  case clang::Type::DeducedTemplateSpecialization:
-  case clang::Type::Adjusted:
-  case clang::Type::Pipe:
-    break;
-
-  // pointer type decayed from an array or function type.
-  case clang::Type::Decayed:
-    break;
-  case clang::Type::ObjCTypeParam:
-    break;
-
-  case clang::Type::DependentAddressSpace:
-    break;
-  case clang::Type::MacroQualified:
-    break;
-  }
-  count = 0;
-  return lldb::eEncodingInvalid;
-}
-
-lldb::Format ClangASTContext::GetFormat(lldb::opaque_compiler_type_t type) {
-  if (!type)
-    return lldb::eFormatDefault;
-
-  clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
-
-  switch (qual_type->getTypeClass()) {
-  case clang::Type::Atomic:
-  case clang::Type::Auto:
-  case clang::Type::Decltype:
-  case clang::Type::Elaborated:
-  case clang::Type::Paren:
-  case clang::Type::Typedef:
-  case clang::Type::TypeOf:
-  case clang::Type::TypeOfExpr:
-    llvm_unreachable("Handled in RemoveWrappingTypes!");
-  case clang::Type::UnaryTransform:
-    break;
-
-  case clang::Type::FunctionNoProto:
-  case clang::Type::FunctionProto:
-    break;
-
-  case clang::Type::IncompleteArray:
-  case clang::Type::VariableArray:
-    break;
-
-  case clang::Type::ConstantArray:
-    return lldb::eFormatVoid; // no value
-
-  case clang::Type::DependentVector:
-  case clang::Type::ExtVector:
-  case clang::Type::Vector:
-    break;
-
-  case clang::Type::Builtin:
-    switch (llvm::cast<clang::BuiltinType>(qual_type)->getKind()) {
-    // default: assert(0 && "Unknown builtin type!");
-    case clang::BuiltinType::UnknownAny:
-    case clang::BuiltinType::Void:
-    case clang::BuiltinType::BoundMember:
-      break;
-
-    case clang::BuiltinType::Bool:
-      return lldb::eFormatBoolean;
-    case clang::BuiltinType::Char_S:
-    case clang::BuiltinType::SChar:
-    case clang::BuiltinType::WChar_S:
-    case clang::BuiltinType::Char_U:
-    case clang::BuiltinType::UChar:
-    case clang::BuiltinType::WChar_U:
-      return lldb::eFormatChar;
-    case clang::BuiltinType::Char16:
-      return lldb::eFormatUnicode16;
-    case clang::BuiltinType::Char32:
-      return lldb::eFormatUnicode32;
-    case clang::BuiltinType::UShort:
-      return lldb::eFormatUnsigned;
-    case clang::BuiltinType::Short:
-      return lldb::eFormatDecimal;
-    case clang::BuiltinType::UInt:
-      return lldb::eFormatUnsigned;
-    case clang::BuiltinType::Int:
-      return lldb::eFormatDecimal;
-    case clang::BuiltinType::ULong:
-      return lldb::eFormatUnsigned;
-    case clang::BuiltinType::Long:
-      return lldb::eFormatDecimal;
-    case clang::BuiltinType::ULongLong:
-      return lldb::eFormatUnsigned;
-    case clang::BuiltinType::LongLong:
-      return lldb::eFormatDecimal;
-    case clang::BuiltinType::UInt128:
-      return lldb::eFormatUnsigned;
-    case clang::BuiltinType::Int128:
-      return lldb::eFormatDecimal;
-    case clang::BuiltinType::Half:
-    case clang::BuiltinType::Float:
-    case clang::BuiltinType::Double:
-    case clang::BuiltinType::LongDouble:
-      return lldb::eFormatFloat;
-    default:
-      return lldb::eFormatHex;
-    }
-    break;
-  case clang::Type::ObjCObjectPointer:
-    return lldb::eFormatHex;
-  case clang::Type::BlockPointer:
-    return lldb::eFormatHex;
-  case clang::Type::Pointer:
-    return lldb::eFormatHex;
-  case clang::Type::LValueReference:
-  case clang::Type::RValueReference:
-    return lldb::eFormatHex;
-  case clang::Type::MemberPointer:
-    break;
-  case clang::Type::Complex: {
-    if (qual_type->isComplexType())
-      return lldb::eFormatComplex;
-    else
-      return lldb::eFormatComplexInteger;
-  }
-  case clang::Type::ObjCInterface:
-    break;
-  case clang::Type::Record:
-    break;
-  case clang::Type::Enum:
-    return lldb::eFormatEnum;
-  case clang::Type::DependentSizedArray:
-  case clang::Type::DependentSizedExtVector:
-  case clang::Type::UnresolvedUsing:
-  case clang::Type::Attributed:
-  case clang::Type::TemplateTypeParm:
-  case clang::Type::SubstTemplateTypeParm:
-  case clang::Type::SubstTemplateTypeParmPack:
-  case clang::Type::InjectedClassName:
-  case clang::Type::DependentName:
-  case clang::Type::DependentTemplateSpecialization:
-  case clang::Type::PackExpansion:
-  case clang::Type::ObjCObject:
-
-  case clang::Type::TemplateSpecialization:
-  case clang::Type::DeducedTemplateSpecialization:
-  case clang::Type::Adjusted:
-  case clang::Type::Pipe:
-    break;
-
-  // pointer type decayed from an array or function type.
-  case clang::Type::Decayed:
-    break;
-  case clang::Type::ObjCTypeParam:
-    break;
-
-  case clang::Type::DependentAddressSpace:
-    break;
-  case clang::Type::MacroQualified:
-    break;
-  }
-  // We don't know hot to display this type...
-  return lldb::eFormatBytes;
-}
-
-static bool ObjCDeclHasIVars(clang::ObjCInterfaceDecl *class_interface_decl,
-                             bool check_superclass) {
-  while (class_interface_decl) {
-    if (class_interface_decl->ivar_size() > 0)
-      return true;
-
-    if (check_superclass)
-      class_interface_decl = class_interface_decl->getSuperClass();
-    else
-      break;
-  }
-  return false;
-}
-
-static Optional<SymbolFile::ArrayInfo>
-GetDynamicArrayInfo(ClangASTContext &ast, SymbolFile *sym_file,
-                    clang::QualType qual_type,
-                    const ExecutionContext *exe_ctx) {
-  if (qual_type->isIncompleteArrayType())
-    if (auto *metadata = ast.GetMetadata(qual_type.getTypePtr()))
-      return sym_file->GetDynamicArrayInfoForUID(metadata->GetUserID(),
-                                                 exe_ctx);
-  return llvm::None;
-}
-
-uint32_t ClangASTContext::GetNumChildren(lldb::opaque_compiler_type_t type,
-                                         bool omit_empty_base_classes,
-                                         const ExecutionContext *exe_ctx) {
-  if (!type)
-    return 0;
-
-  uint32_t num_children = 0;
-  clang::QualType qual_type(RemoveWrappingTypes(GetQualType(type)));
-  const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-  switch (type_class) {
-  case clang::Type::Builtin:
-    switch (llvm::cast<clang::BuiltinType>(qual_type)->getKind()) {
-    case clang::BuiltinType::ObjCId:    // child is Class
-    case clang::BuiltinType::ObjCClass: // child is Class
-      num_children = 1;
-      break;
-
-    default:
-      break;
-    }
-    break;
-
-  case clang::Type::Complex:
-    return 0;
-  case clang::Type::Record:
-    if (GetCompleteQualType(&getASTContext(), qual_type)) {
-      const clang::RecordType *record_type =
-          llvm::cast<clang::RecordType>(qual_type.getTypePtr());
-      const clang::RecordDecl *record_decl = record_type->getDecl();
-      assert(record_decl);
-      const clang::CXXRecordDecl *cxx_record_decl =
-          llvm::dyn_cast<clang::CXXRecordDecl>(record_decl);
-      if (cxx_record_decl) {
-        if (omit_empty_base_classes) {
-          // Check each base classes to see if it or any of its base classes
-          // contain any fields. This can help limit the noise in variable
-          // views by not having to show base classes that contain no members.
-          clang::CXXRecordDecl::base_class_const_iterator base_class,
-              base_class_end;
-          for (base_class = cxx_record_decl->bases_begin(),
-              base_class_end = cxx_record_decl->bases_end();
-               base_class != base_class_end; ++base_class) {
-            const clang::CXXRecordDecl *base_class_decl =
-                llvm::cast<clang::CXXRecordDecl>(
-                    base_class->getType()
-                        ->getAs<clang::RecordType>()
-                        ->getDecl());
-
-            // Skip empty base classes
-            if (!ClangASTContext::RecordHasFields(base_class_decl))
-              continue;
-
-            num_children++;
-          }
-        } else {
-          // Include all base classes
-          num_children += cxx_record_decl->getNumBases();
-        }
-      }
-      clang::RecordDecl::field_iterator field, field_end;
-      for (field = record_decl->field_begin(),
-          field_end = record_decl->field_end();
-           field != field_end; ++field)
-        ++num_children;
-    }
-    break;
-
-  case clang::Type::ObjCObject:
-  case clang::Type::ObjCInterface:
-    if (GetCompleteQualType(&getASTContext(), qual_type)) {
-      const clang::ObjCObjectType *objc_class_type =
-          llvm::dyn_cast<clang::ObjCObjectType>(qual_type.getTypePtr());
-      assert(objc_class_type);
-      if (objc_class_type) {
-        clang::ObjCInterfaceDecl *class_interface_decl =
-            objc_class_type->getInterface();
-
-        if (class_interface_decl) {
-
-          clang::ObjCInterfaceDecl *superclass_interface_decl =
-              class_interface_decl->getSuperClass();
-          if (superclass_interface_decl) {
-            if (omit_empty_base_classes) {
-              if (ObjCDeclHasIVars(superclass_interface_decl, true))
-                ++num_children;
-            } else
-              ++num_children;
-          }
-
-          num_children += class_interface_decl->ivar_size();
-        }
-      }
-    }
-    break;
-
-  case clang::Type::ObjCObjectPointer: {
-    const clang::ObjCObjectPointerType *pointer_type =
-        llvm::cast<clang::ObjCObjectPointerType>(qual_type.getTypePtr());
-    clang::QualType pointee_type = pointer_type->getPointeeType();
-    uint32_t num_pointee_children =
-        GetType(pointee_type).GetNumChildren(omit_empty_base_classes, exe_ctx);
-    // If this type points to a simple type, then it has 1 child
-    if (num_pointee_children == 0)
-      num_children = 1;
-    else
-      num_children = num_pointee_children;
-  } break;
-
-  case clang::Type::Vector:
-  case clang::Type::ExtVector:
-    num_children =
-        llvm::cast<clang::VectorType>(qual_type.getTypePtr())->getNumElements();
-    break;
-
-  case clang::Type::ConstantArray:
-    num_children = llvm::cast<clang::ConstantArrayType>(qual_type.getTypePtr())
-                       ->getSize()
-                       .getLimitedValue();
-    break;
-  case clang::Type::IncompleteArray:
-    if (auto array_info =
-            GetDynamicArrayInfo(*this, GetSymbolFile(), qual_type, exe_ctx))
-      // Only 1-dimensional arrays are supported.
-      num_children = array_info->element_orders.size()
-                         ? array_info->element_orders.back()
-                         : 0;
-    break;
-
-  case clang::Type::Pointer: {
-    const clang::PointerType *pointer_type =
-        llvm::cast<clang::PointerType>(qual_type.getTypePtr());
-    clang::QualType pointee_type(pointer_type->getPointeeType());
-    uint32_t num_pointee_children =
-        GetType(pointee_type).GetNumChildren(omit_empty_base_classes, exe_ctx);
-    if (num_pointee_children == 0) {
-      // We have a pointer to a pointee type that claims it has no children. We
-      // will want to look at
-      num_children = GetNumPointeeChildren(pointee_type);
-    } else
-      num_children = num_pointee_children;
-  } break;
-
-  case clang::Type::LValueReference:
-  case clang::Type::RValueReference: {
-    const clang::ReferenceType *reference_type =
-        llvm::cast<clang::ReferenceType>(qual_type.getTypePtr());
-    clang::QualType pointee_type = reference_type->getPointeeType();
-    uint32_t num_pointee_children =
-        GetType(pointee_type).GetNumChildren(omit_empty_base_classes, exe_ctx);
-    // If this type points to a simple type, then it has 1 child
-    if (num_pointee_children == 0)
-      num_children = 1;
-    else
-      num_children = num_pointee_children;
-  } break;
-
-  default:
-    break;
-  }
-  return num_children;
-}
-
-CompilerType ClangASTContext::GetBuiltinTypeByName(ConstString name) {
-  return GetBasicType(GetBasicTypeEnumeration(name));
-}
-
-lldb::BasicType
-ClangASTContext::GetBasicTypeEnumeration(lldb::opaque_compiler_type_t type) {
-  if (type) {
-    clang::QualType qual_type(GetQualType(type));
-    const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-    if (type_class == clang::Type::Builtin) {
-      switch (llvm::cast<clang::BuiltinType>(qual_type)->getKind()) {
-      case clang::BuiltinType::Void:
-        return eBasicTypeVoid;
-      case clang::BuiltinType::Bool:
-        return eBasicTypeBool;
-      case clang::BuiltinType::Char_S:
-        return eBasicTypeSignedChar;
-      case clang::BuiltinType::Char_U:
-        return eBasicTypeUnsignedChar;
-      case clang::BuiltinType::Char16:
-        return eBasicTypeChar16;
-      case clang::BuiltinType::Char32:
-        return eBasicTypeChar32;
-      case clang::BuiltinType::UChar:
-        return eBasicTypeUnsignedChar;
-      case clang::BuiltinType::SChar:
-        return eBasicTypeSignedChar;
-      case clang::BuiltinType::WChar_S:
-        return eBasicTypeSignedWChar;
-      case clang::BuiltinType::WChar_U:
-        return eBasicTypeUnsignedWChar;
-      case clang::BuiltinType::Short:
-        return eBasicTypeShort;
-      case clang::BuiltinType::UShort:
-        return eBasicTypeUnsignedShort;
-      case clang::BuiltinType::Int:
-        return eBasicTypeInt;
-      case clang::BuiltinType::UInt:
-        return eBasicTypeUnsignedInt;
-      case clang::BuiltinType::Long:
-        return eBasicTypeLong;
-      case clang::BuiltinType::ULong:
-        return eBasicTypeUnsignedLong;
-      case clang::BuiltinType::LongLong:
-        return eBasicTypeLongLong;
-      case clang::BuiltinType::ULongLong:
-        return eBasicTypeUnsignedLongLong;
-      case clang::BuiltinType::Int128:
-        return eBasicTypeInt128;
-      case clang::BuiltinType::UInt128:
-        return eBasicTypeUnsignedInt128;
-
-      case clang::BuiltinType::Half:
-        return eBasicTypeHalf;
-      case clang::BuiltinType::Float:
-        return eBasicTypeFloat;
-      case clang::BuiltinType::Double:
-        return eBasicTypeDouble;
-      case clang::BuiltinType::LongDouble:
-        return eBasicTypeLongDouble;
-
-      case clang::BuiltinType::NullPtr:
-        return eBasicTypeNullPtr;
-      case clang::BuiltinType::ObjCId:
-        return eBasicTypeObjCID;
-      case clang::BuiltinType::ObjCClass:
-        return eBasicTypeObjCClass;
-      case clang::BuiltinType::ObjCSel:
-        return eBasicTypeObjCSel;
-      default:
-        return eBasicTypeOther;
-      }
-    }
-  }
-  return eBasicTypeInvalid;
-}
-
-void ClangASTContext::ForEachEnumerator(
-    lldb::opaque_compiler_type_t type,
-    std::function<bool(const CompilerType &integer_type,
-                       ConstString name,
-                       const llvm::APSInt &value)> const &callback) {
-  const clang::EnumType *enum_type =
-      llvm::dyn_cast<clang::EnumType>(GetCanonicalQualType(type));
-  if (enum_type) {
-    const clang::EnumDecl *enum_decl = enum_type->getDecl();
-    if (enum_decl) {
-      CompilerType integer_type = GetType(enum_decl->getIntegerType());
-
-      clang::EnumDecl::enumerator_iterator enum_pos, enum_end_pos;
-      for (enum_pos = enum_decl->enumerator_begin(),
-          enum_end_pos = enum_decl->enumerator_end();
-           enum_pos != enum_end_pos; ++enum_pos) {
-        ConstString name(enum_pos->getNameAsString().c_str());
-        if (!callback(integer_type, name, enum_pos->getInitVal()))
-          break;
-      }
-    }
-  }
-}
-
-#pragma mark Aggregate Types
-
-uint32_t ClangASTContext::GetNumFields(lldb::opaque_compiler_type_t type) {
-  if (!type)
-    return 0;
-
-  uint32_t count = 0;
-  clang::QualType qual_type(RemoveWrappingTypes(GetCanonicalQualType(type)));
-  const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-  switch (type_class) {
-  case clang::Type::Record:
-    if (GetCompleteType(type)) {
-      const clang::RecordType *record_type =
-          llvm::dyn_cast<clang::RecordType>(qual_type.getTypePtr());
-      if (record_type) {
-        clang::RecordDecl *record_decl = record_type->getDecl();
-        if (record_decl) {
-          uint32_t field_idx = 0;
-          clang::RecordDecl::field_iterator field, field_end;
-          for (field = record_decl->field_begin(),
-              field_end = record_decl->field_end();
-               field != field_end; ++field)
-            ++field_idx;
-          count = field_idx;
-        }
-      }
-    }
-    break;
-
-  case clang::Type::ObjCObjectPointer: {
-    const clang::ObjCObjectPointerType *objc_class_type =
-        qual_type->getAs<clang::ObjCObjectPointerType>();
-    const clang::ObjCInterfaceType *objc_interface_type =
-        objc_class_type->getInterfaceType();
-    if (objc_interface_type &&
-        GetCompleteType(static_cast<lldb::opaque_compiler_type_t>(
-            const_cast<clang::ObjCInterfaceType *>(objc_interface_type)))) {
-      clang::ObjCInterfaceDecl *class_interface_decl =
-          objc_interface_type->getDecl();
-      if (class_interface_decl) {
-        count = class_interface_decl->ivar_size();
-      }
-    }
-    break;
-  }
-
-  case clang::Type::ObjCObject:
-  case clang::Type::ObjCInterface:
-    if (GetCompleteType(type)) {
-      const clang::ObjCObjectType *objc_class_type =
-          llvm::dyn_cast<clang::ObjCObjectType>(qual_type.getTypePtr());
-      if (objc_class_type) {
-        clang::ObjCInterfaceDecl *class_interface_decl =
-            objc_class_type->getInterface();
-
-        if (class_interface_decl)
-          count = class_interface_decl->ivar_size();
-      }
-    }
-    break;
-
-  default:
-    break;
-  }
-  return count;
-}
-
-static lldb::opaque_compiler_type_t
-GetObjCFieldAtIndex(clang::ASTContext *ast,
-                    clang::ObjCInterfaceDecl *class_interface_decl, size_t idx,
-                    std::string &name, uint64_t *bit_offset_ptr,
-                    uint32_t *bitfield_bit_size_ptr, bool *is_bitfield_ptr) {
-  if (class_interface_decl) {
-    if (idx < (class_interface_decl->ivar_size())) {
-      clang::ObjCInterfaceDecl::ivar_iterator ivar_pos,
-          ivar_end = class_interface_decl->ivar_end();
-      uint32_t ivar_idx = 0;
-
-      for (ivar_pos = class_interface_decl->ivar_begin(); ivar_pos != ivar_end;
-           ++ivar_pos, ++ivar_idx) {
-        if (ivar_idx == idx) {
-          const clang::ObjCIvarDecl *ivar_decl = *ivar_pos;
-
-          clang::QualType ivar_qual_type(ivar_decl->getType());
-
-          name.assign(ivar_decl->getNameAsString());
-
-          if (bit_offset_ptr) {
-            const clang::ASTRecordLayout &interface_layout =
-                ast->getASTObjCInterfaceLayout(class_interface_decl);
-            *bit_offset_ptr = interface_layout.getFieldOffset(ivar_idx);
-          }
-
-          const bool is_bitfield = ivar_pos->isBitField();
-
-          if (bitfield_bit_size_ptr) {
-            *bitfield_bit_size_ptr = 0;
-
-            if (is_bitfield && ast) {
-              clang::Expr *bitfield_bit_size_expr = ivar_pos->getBitWidth();
-              clang::Expr::EvalResult result;
-              if (bitfield_bit_size_expr &&
-                  bitfield_bit_size_expr->EvaluateAsInt(result, *ast)) {
-                llvm::APSInt bitfield_apsint = result.Val.getInt();
-                *bitfield_bit_size_ptr = bitfield_apsint.getLimitedValue();
-              }
-            }
-          }
-          if (is_bitfield_ptr)
-            *is_bitfield_ptr = is_bitfield;
-
-          return ivar_qual_type.getAsOpaquePtr();
-        }
-      }
-    }
-  }
-  return nullptr;
-}
-
-CompilerType ClangASTContext::GetFieldAtIndex(lldb::opaque_compiler_type_t type,
-                                              size_t idx, std::string &name,
-                                              uint64_t *bit_offset_ptr,
-                                              uint32_t *bitfield_bit_size_ptr,
-                                              bool *is_bitfield_ptr) {
-  if (!type)
-    return CompilerType();
-
-  clang::QualType qual_type(RemoveWrappingTypes(GetCanonicalQualType(type)));
-  const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-  switch (type_class) {
-  case clang::Type::Record:
-    if (GetCompleteType(type)) {
-      const clang::RecordType *record_type =
-          llvm::cast<clang::RecordType>(qual_type.getTypePtr());
-      const clang::RecordDecl *record_decl = record_type->getDecl();
-      uint32_t field_idx = 0;
-      clang::RecordDecl::field_iterator field, field_end;
-      for (field = record_decl->field_begin(),
-          field_end = record_decl->field_end();
-           field != field_end; ++field, ++field_idx) {
-        if (idx == field_idx) {
-          // Print the member type if requested
-          // Print the member name and equal sign
-          name.assign(field->getNameAsString());
-
-          // Figure out the type byte size (field_type_info.first) and
-          // alignment (field_type_info.second) from the AST context.
-          if (bit_offset_ptr) {
-            const clang::ASTRecordLayout &record_layout =
-                getASTContext().getASTRecordLayout(record_decl);
-            *bit_offset_ptr = record_layout.getFieldOffset(field_idx);
-          }
-
-          const bool is_bitfield = field->isBitField();
-
-          if (bitfield_bit_size_ptr) {
-            *bitfield_bit_size_ptr = 0;
-
-            if (is_bitfield) {
-              clang::Expr *bitfield_bit_size_expr = field->getBitWidth();
-              clang::Expr::EvalResult result;
-              if (bitfield_bit_size_expr &&
-                  bitfield_bit_size_expr->EvaluateAsInt(result,
-                                                        getASTContext())) {
-                llvm::APSInt bitfield_apsint = result.Val.getInt();
-                *bitfield_bit_size_ptr = bitfield_apsint.getLimitedValue();
-              }
-            }
-          }
-          if (is_bitfield_ptr)
-            *is_bitfield_ptr = is_bitfield;
-
-          return GetType(field->getType());
-        }
-      }
-    }
-    break;
-
-  case clang::Type::ObjCObjectPointer: {
-    const clang::ObjCObjectPointerType *objc_class_type =
-        qual_type->getAs<clang::ObjCObjectPointerType>();
-    const clang::ObjCInterfaceType *objc_interface_type =
-        objc_class_type->getInterfaceType();
-    if (objc_interface_type &&
-        GetCompleteType(static_cast<lldb::opaque_compiler_type_t>(
-            const_cast<clang::ObjCInterfaceType *>(objc_interface_type)))) {
-      clang::ObjCInterfaceDecl *class_interface_decl =
-          objc_interface_type->getDecl();
-      if (class_interface_decl) {
-        return CompilerType(
-            this, GetObjCFieldAtIndex(&getASTContext(), class_interface_decl,
-                                      idx, name, bit_offset_ptr,
-                                      bitfield_bit_size_ptr, is_bitfield_ptr));
-      }
-    }
-    break;
-  }
-
-  case clang::Type::ObjCObject:
-  case clang::Type::ObjCInterface:
-    if (GetCompleteType(type)) {
-      const clang::ObjCObjectType *objc_class_type =
-          llvm::dyn_cast<clang::ObjCObjectType>(qual_type.getTypePtr());
-      assert(objc_class_type);
-      if (objc_class_type) {
-        clang::ObjCInterfaceDecl *class_interface_decl =
-            objc_class_type->getInterface();
-        return CompilerType(
-            this, GetObjCFieldAtIndex(&getASTContext(), class_interface_decl,
-                                      idx, name, bit_offset_ptr,
-                                      bitfield_bit_size_ptr, is_bitfield_ptr));
-      }
-    }
-    break;
-
-  default:
-    break;
-  }
-  return CompilerType();
-}
-
-uint32_t
-ClangASTContext::GetNumDirectBaseClasses(lldb::opaque_compiler_type_t type) {
-  uint32_t count = 0;
-  clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
-  const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-  switch (type_class) {
-  case clang::Type::Record:
-    if (GetCompleteType(type)) {
-      const clang::CXXRecordDecl *cxx_record_decl =
-          qual_type->getAsCXXRecordDecl();
-      if (cxx_record_decl)
-        count = cxx_record_decl->getNumBases();
-    }
-    break;
-
-  case clang::Type::ObjCObjectPointer:
-    count = GetPointeeType(type).GetNumDirectBaseClasses();
-    break;
-
-  case clang::Type::ObjCObject:
-    if (GetCompleteType(type)) {
-      const clang::ObjCObjectType *objc_class_type =
-          qual_type->getAsObjCQualifiedInterfaceType();
-      if (objc_class_type) {
-        clang::ObjCInterfaceDecl *class_interface_decl =
-            objc_class_type->getInterface();
-
-        if (class_interface_decl && class_interface_decl->getSuperClass())
-          count = 1;
-      }
-    }
-    break;
-  case clang::Type::ObjCInterface:
-    if (GetCompleteType(type)) {
-      const clang::ObjCInterfaceType *objc_interface_type =
-          qual_type->getAs<clang::ObjCInterfaceType>();
-      if (objc_interface_type) {
-        clang::ObjCInterfaceDecl *class_interface_decl =
-            objc_interface_type->getInterface();
-
-        if (class_interface_decl && class_interface_decl->getSuperClass())
-          count = 1;
-      }
-    }
-    break;
-
-  default:
-    break;
-  }
-  return count;
-}
-
-uint32_t
-ClangASTContext::GetNumVirtualBaseClasses(lldb::opaque_compiler_type_t type) {
-  uint32_t count = 0;
-  clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
-  const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-  switch (type_class) {
-  case clang::Type::Record:
-    if (GetCompleteType(type)) {
-      const clang::CXXRecordDecl *cxx_record_decl =
-          qual_type->getAsCXXRecordDecl();
-      if (cxx_record_decl)
-        count = cxx_record_decl->getNumVBases();
-    }
-    break;
-
-  default:
-    break;
-  }
-  return count;
-}
-
-CompilerType ClangASTContext::GetDirectBaseClassAtIndex(
-    lldb::opaque_compiler_type_t type, size_t idx, uint32_t *bit_offset_ptr) {
-  clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
-  const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-  switch (type_class) {
-  case clang::Type::Record:
-    if (GetCompleteType(type)) {
-      const clang::CXXRecordDecl *cxx_record_decl =
-          qual_type->getAsCXXRecordDecl();
-      if (cxx_record_decl) {
-        uint32_t curr_idx = 0;
-        clang::CXXRecordDecl::base_class_const_iterator base_class,
-            base_class_end;
-        for (base_class = cxx_record_decl->bases_begin(),
-            base_class_end = cxx_record_decl->bases_end();
-             base_class != base_class_end; ++base_class, ++curr_idx) {
-          if (curr_idx == idx) {
-            if (bit_offset_ptr) {
-              const clang::ASTRecordLayout &record_layout =
-                  getASTContext().getASTRecordLayout(cxx_record_decl);
-              const clang::CXXRecordDecl *base_class_decl =
-                  llvm::cast<clang::CXXRecordDecl>(
-                      base_class->getType()
-                          ->getAs<clang::RecordType>()
-                          ->getDecl());
-              if (base_class->isVirtual())
-                *bit_offset_ptr =
-                    record_layout.getVBaseClassOffset(base_class_decl)
-                        .getQuantity() *
-                    8;
-              else
-                *bit_offset_ptr =
-                    record_layout.getBaseClassOffset(base_class_decl)
-                        .getQuantity() *
-                    8;
-            }
-            return GetType(base_class->getType());
-          }
-        }
-      }
-    }
-    break;
-
-  case clang::Type::ObjCObjectPointer:
-    return GetPointeeType(type).GetDirectBaseClassAtIndex(idx, bit_offset_ptr);
-
-  case clang::Type::ObjCObject:
-    if (idx == 0 && GetCompleteType(type)) {
-      const clang::ObjCObjectType *objc_class_type =
-          qual_type->getAsObjCQualifiedInterfaceType();
-      if (objc_class_type) {
-        clang::ObjCInterfaceDecl *class_interface_decl =
-            objc_class_type->getInterface();
-
-        if (class_interface_decl) {
-          clang::ObjCInterfaceDecl *superclass_interface_decl =
-              class_interface_decl->getSuperClass();
-          if (superclass_interface_decl) {
-            if (bit_offset_ptr)
-              *bit_offset_ptr = 0;
-            return GetType(getASTContext().getObjCInterfaceType(
-                superclass_interface_decl));
-          }
-        }
-      }
-    }
-    break;
-  case clang::Type::ObjCInterface:
-    if (idx == 0 && GetCompleteType(type)) {
-      const clang::ObjCObjectType *objc_interface_type =
-          qual_type->getAs<clang::ObjCInterfaceType>();
-      if (objc_interface_type) {
-        clang::ObjCInterfaceDecl *class_interface_decl =
-            objc_interface_type->getInterface();
-
-        if (class_interface_decl) {
-          clang::ObjCInterfaceDecl *superclass_interface_decl =
-              class_interface_decl->getSuperClass();
-          if (superclass_interface_decl) {
-            if (bit_offset_ptr)
-              *bit_offset_ptr = 0;
-            return GetType(getASTContext().getObjCInterfaceType(
-                superclass_interface_decl));
-          }
-        }
-      }
-    }
-    break;
-
-  default:
-    break;
-  }
-  return CompilerType();
-}
-
-CompilerType ClangASTContext::GetVirtualBaseClassAtIndex(
-    lldb::opaque_compiler_type_t type, size_t idx, uint32_t *bit_offset_ptr) {
-  clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
-  const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-  switch (type_class) {
-  case clang::Type::Record:
-    if (GetCompleteType(type)) {
-      const clang::CXXRecordDecl *cxx_record_decl =
-          qual_type->getAsCXXRecordDecl();
-      if (cxx_record_decl) {
-        uint32_t curr_idx = 0;
-        clang::CXXRecordDecl::base_class_const_iterator base_class,
-            base_class_end;
-        for (base_class = cxx_record_decl->vbases_begin(),
-            base_class_end = cxx_record_decl->vbases_end();
-             base_class != base_class_end; ++base_class, ++curr_idx) {
-          if (curr_idx == idx) {
-            if (bit_offset_ptr) {
-              const clang::ASTRecordLayout &record_layout =
-                  getASTContext().getASTRecordLayout(cxx_record_decl);
-              const clang::CXXRecordDecl *base_class_decl =
-                  llvm::cast<clang::CXXRecordDecl>(
-                      base_class->getType()
-                          ->getAs<clang::RecordType>()
-                          ->getDecl());
-              *bit_offset_ptr =
-                  record_layout.getVBaseClassOffset(base_class_decl)
-                      .getQuantity() *
-                  8;
-            }
-            return GetType(base_class->getType());
-          }
-        }
-      }
-    }
-    break;
-
-  default:
-    break;
-  }
-  return CompilerType();
-}
-
-// If a pointer to a pointee type (the clang_type arg) says that it has no
-// children, then we either need to trust it, or override it and return a
-// different result. For example, an "int *" has one child that is an integer,
-// but a function pointer doesn't have any children. Likewise if a Record type
-// claims it has no children, then there really is nothing to show.
-uint32_t ClangASTContext::GetNumPointeeChildren(clang::QualType type) {
-  if (type.isNull())
-    return 0;
-
-  clang::QualType qual_type = RemoveWrappingTypes(type.getCanonicalType());
-  const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-  switch (type_class) {
-  case clang::Type::Builtin:
-    switch (llvm::cast<clang::BuiltinType>(qual_type)->getKind()) {
-    case clang::BuiltinType::UnknownAny:
-    case clang::BuiltinType::Void:
-    case clang::BuiltinType::NullPtr:
-    case clang::BuiltinType::OCLEvent:
-    case clang::BuiltinType::OCLImage1dRO:
-    case clang::BuiltinType::OCLImage1dWO:
-    case clang::BuiltinType::OCLImage1dRW:
-    case clang::BuiltinType::OCLImage1dArrayRO:
-    case clang::BuiltinType::OCLImage1dArrayWO:
-    case clang::BuiltinType::OCLImage1dArrayRW:
-    case clang::BuiltinType::OCLImage1dBufferRO:
-    case clang::BuiltinType::OCLImage1dBufferWO:
-    case clang::BuiltinType::OCLImage1dBufferRW:
-    case clang::BuiltinType::OCLImage2dRO:
-    case clang::BuiltinType::OCLImage2dWO:
-    case clang::BuiltinType::OCLImage2dRW:
-    case clang::BuiltinType::OCLImage2dArrayRO:
-    case clang::BuiltinType::OCLImage2dArrayWO:
-    case clang::BuiltinType::OCLImage2dArrayRW:
-    case clang::BuiltinType::OCLImage3dRO:
-    case clang::BuiltinType::OCLImage3dWO:
-    case clang::BuiltinType::OCLImage3dRW:
-    case clang::BuiltinType::OCLSampler:
-      return 0;
-    case clang::BuiltinType::Bool:
-    case clang::BuiltinType::Char_U:
-    case clang::BuiltinType::UChar:
-    case clang::BuiltinType::WChar_U:
-    case clang::BuiltinType::Char16:
-    case clang::BuiltinType::Char32:
-    case clang::BuiltinType::UShort:
-    case clang::BuiltinType::UInt:
-    case clang::BuiltinType::ULong:
-    case clang::BuiltinType::ULongLong:
-    case clang::BuiltinType::UInt128:
-    case clang::BuiltinType::Char_S:
-    case clang::BuiltinType::SChar:
-    case clang::BuiltinType::WChar_S:
-    case clang::BuiltinType::Short:
-    case clang::BuiltinType::Int:
-    case clang::BuiltinType::Long:
-    case clang::BuiltinType::LongLong:
-    case clang::BuiltinType::Int128:
-    case clang::BuiltinType::Float:
-    case clang::BuiltinType::Double:
-    case clang::BuiltinType::LongDouble:
-    case clang::BuiltinType::Dependent:
-    case clang::BuiltinType::Overload:
-    case clang::BuiltinType::ObjCId:
-    case clang::BuiltinType::ObjCClass:
-    case clang::BuiltinType::ObjCSel:
-    case clang::BuiltinType::BoundMember:
-    case clang::BuiltinType::Half:
-    case clang::BuiltinType::ARCUnbridgedCast:
-    case clang::BuiltinType::PseudoObject:
-    case clang::BuiltinType::BuiltinFn:
-    case clang::BuiltinType::OMPArraySection:
-      return 1;
-    default:
-      return 0;
-    }
-    break;
-
-  case clang::Type::Complex:
-    return 1;
-  case clang::Type::Pointer:
-    return 1;
-  case clang::Type::BlockPointer:
-    return 0; // If block pointers don't have debug info, then no children for
-              // them
-  case clang::Type::LValueReference:
-    return 1;
-  case clang::Type::RValueReference:
-    return 1;
-  case clang::Type::MemberPointer:
-    return 0;
-  case clang::Type::ConstantArray:
-    return 0;
-  case clang::Type::IncompleteArray:
-    return 0;
-  case clang::Type::VariableArray:
-    return 0;
-  case clang::Type::DependentSizedArray:
-    return 0;
-  case clang::Type::DependentSizedExtVector:
-    return 0;
-  case clang::Type::Vector:
-    return 0;
-  case clang::Type::ExtVector:
-    return 0;
-  case clang::Type::FunctionProto:
-    return 0; // When we function pointers, they have no children...
-  case clang::Type::FunctionNoProto:
-    return 0; // When we function pointers, they have no children...
-  case clang::Type::UnresolvedUsing:
-    return 0;
-  case clang::Type::Record:
-    return 0;
-  case clang::Type::Enum:
-    return 1;
-  case clang::Type::TemplateTypeParm:
-    return 1;
-  case clang::Type::SubstTemplateTypeParm:
-    return 1;
-  case clang::Type::TemplateSpecialization:
-    return 1;
-  case clang::Type::InjectedClassName:
-    return 0;
-  case clang::Type::DependentName:
-    return 1;
-  case clang::Type::DependentTemplateSpecialization:
-    return 1;
-  case clang::Type::ObjCObject:
-    return 0;
-  case clang::Type::ObjCInterface:
-    return 0;
-  case clang::Type::ObjCObjectPointer:
-    return 1;
-  default:
-    break;
-  }
-  return 0;
-}
-
-CompilerType ClangASTContext::GetChildCompilerTypeAtIndex(
-    lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx, size_t idx,
-    bool transparent_pointers, bool omit_empty_base_classes,
-    bool ignore_array_bounds, std::string &child_name,
-    uint32_t &child_byte_size, int32_t &child_byte_offset,
-    uint32_t &child_bitfield_bit_size, uint32_t &child_bitfield_bit_offset,
-    bool &child_is_base_class, bool &child_is_deref_of_parent,
-    ValueObject *valobj, uint64_t &language_flags) {
-  if (!type)
-    return CompilerType();
-
-  auto get_exe_scope = [&exe_ctx]() {
-    return exe_ctx ? exe_ctx->GetBestExecutionContextScope() : nullptr;
-  };
-
-  clang::QualType parent_qual_type(
-      RemoveWrappingTypes(GetCanonicalQualType(type)));
-  const clang::Type::TypeClass parent_type_class =
-      parent_qual_type->getTypeClass();
-  child_bitfield_bit_size = 0;
-  child_bitfield_bit_offset = 0;
-  child_is_base_class = false;
-  language_flags = 0;
-
-  const bool idx_is_valid =
-      idx < GetNumChildren(type, omit_empty_base_classes, exe_ctx);
-  int32_t bit_offset;
-  switch (parent_type_class) {
-  case clang::Type::Builtin:
-    if (idx_is_valid) {
-      switch (llvm::cast<clang::BuiltinType>(parent_qual_type)->getKind()) {
-      case clang::BuiltinType::ObjCId:
-      case clang::BuiltinType::ObjCClass:
-        child_name = "isa";
-        child_byte_size =
-            getASTContext().getTypeSize(getASTContext().ObjCBuiltinClassTy) /
-            CHAR_BIT;
-        return GetType(getASTContext().ObjCBuiltinClassTy);
-
-      default:
-        break;
-      }
-    }
-    break;
-
-  case clang::Type::Record:
-    if (idx_is_valid && GetCompleteType(type)) {
-      const clang::RecordType *record_type =
-          llvm::cast<clang::RecordType>(parent_qual_type.getTypePtr());
-      const clang::RecordDecl *record_decl = record_type->getDecl();
-      assert(record_decl);
-      const clang::ASTRecordLayout &record_layout =
-          getASTContext().getASTRecordLayout(record_decl);
-      uint32_t child_idx = 0;
-
-      const clang::CXXRecordDecl *cxx_record_decl =
-          llvm::dyn_cast<clang::CXXRecordDecl>(record_decl);
-      if (cxx_record_decl) {
-        // We might have base classes to print out first
-        clang::CXXRecordDecl::base_class_const_iterator base_class,
-            base_class_end;
-        for (base_class = cxx_record_decl->bases_begin(),
-            base_class_end = cxx_record_decl->bases_end();
-             base_class != base_class_end; ++base_class) {
-          const clang::CXXRecordDecl *base_class_decl = nullptr;
-
-          // Skip empty base classes
-          if (omit_empty_base_classes) {
-            base_class_decl = llvm::cast<clang::CXXRecordDecl>(
-                base_class->getType()->getAs<clang::RecordType>()->getDecl());
-            if (!ClangASTContext::RecordHasFields(base_class_decl))
-              continue;
-          }
-
-          if (idx == child_idx) {
-            if (base_class_decl == nullptr)
-              base_class_decl = llvm::cast<clang::CXXRecordDecl>(
-                  base_class->getType()->getAs<clang::RecordType>()->getDecl());
-
-            if (base_class->isVirtual()) {
-              bool handled = false;
-              if (valobj) {
-                clang::VTableContextBase *vtable_ctx =
-                    getASTContext().getVTableContext();
-                if (vtable_ctx)
-                  handled = GetVBaseBitOffset(*vtable_ctx, *valobj,
-                                              record_layout, cxx_record_decl,
-                                              base_class_decl, bit_offset);
-              }
-              if (!handled)
-                bit_offset = record_layout.getVBaseClassOffset(base_class_decl)
-                                 .getQuantity() *
-                             8;
-            } else
-              bit_offset = record_layout.getBaseClassOffset(base_class_decl)
-                               .getQuantity() *
-                           8;
-
-            // Base classes should be a multiple of 8 bits in size
-            child_byte_offset = bit_offset / 8;
-            CompilerType base_class_clang_type = GetType(base_class->getType());
-            child_name = base_class_clang_type.GetTypeName().AsCString("");
-            Optional<uint64_t> size =
-                base_class_clang_type.GetBitSize(get_exe_scope());
-            if (!size)
-              return {};
-            uint64_t base_class_clang_type_bit_size = *size;
-
-            // Base classes bit sizes should be a multiple of 8 bits in size
-            assert(base_class_clang_type_bit_size % 8 == 0);
-            child_byte_size = base_class_clang_type_bit_size / 8;
-            child_is_base_class = true;
-            return base_class_clang_type;
-          }
-          // We don't increment the child index in the for loop since we might
-          // be skipping empty base classes
-          ++child_idx;
-        }
-      }
-      // Make sure index is in range...
-      uint32_t field_idx = 0;
-      clang::RecordDecl::field_iterator field, field_end;
-      for (field = record_decl->field_begin(),
-          field_end = record_decl->field_end();
-           field != field_end; ++field, ++field_idx, ++child_idx) {
-        if (idx == child_idx) {
-          // Print the member type if requested
-          // Print the member name and equal sign
-          child_name.assign(field->getNameAsString());
-
-          // Figure out the type byte size (field_type_info.first) and
-          // alignment (field_type_info.second) from the AST context.
-          CompilerType field_clang_type = GetType(field->getType());
-          assert(field_idx < record_layout.getFieldCount());
-          Optional<uint64_t> size =
-              field_clang_type.GetByteSize(get_exe_scope());
-          if (!size)
-            return {};
-          child_byte_size = *size;
-          const uint32_t child_bit_size = child_byte_size * 8;
-
-          // Figure out the field offset within the current struct/union/class
-          // type
-          bit_offset = record_layout.getFieldOffset(field_idx);
-          if (FieldIsBitfield(*field, child_bitfield_bit_size)) {
-            child_bitfield_bit_offset = bit_offset % child_bit_size;
-            const uint32_t child_bit_offset =
-                bit_offset - child_bitfield_bit_offset;
-            child_byte_offset = child_bit_offset / 8;
-          } else {
-            child_byte_offset = bit_offset / 8;
-          }
-
-          return field_clang_type;
-        }
-      }
-    }
-    break;
-
-  case clang::Type::ObjCObject:
-  case clang::Type::ObjCInterface:
-    if (idx_is_valid && GetCompleteType(type)) {
-      const clang::ObjCObjectType *objc_class_type =
-          llvm::dyn_cast<clang::ObjCObjectType>(parent_qual_type.getTypePtr());
-      assert(objc_class_type);
-      if (objc_class_type) {
-        uint32_t child_idx = 0;
-        clang::ObjCInterfaceDecl *class_interface_decl =
-            objc_class_type->getInterface();
-
-        if (class_interface_decl) {
-
-          const clang::ASTRecordLayout &interface_layout =
-              getASTContext().getASTObjCInterfaceLayout(class_interface_decl);
-          clang::ObjCInterfaceDecl *superclass_interface_decl =
-              class_interface_decl->getSuperClass();
-          if (superclass_interface_decl) {
-            if (omit_empty_base_classes) {
-              CompilerType base_class_clang_type =
-                  GetType(getASTContext().getObjCInterfaceType(
-                      superclass_interface_decl));
-              if (base_class_clang_type.GetNumChildren(omit_empty_base_classes,
-                                                       exe_ctx) > 0) {
-                if (idx == 0) {
-                  clang::QualType ivar_qual_type(
-                      getASTContext().getObjCInterfaceType(
-                          superclass_interface_decl));
-
-                  child_name.assign(
-                      superclass_interface_decl->getNameAsString());
-
-                  clang::TypeInfo ivar_type_info =
-                      getASTContext().getTypeInfo(ivar_qual_type.getTypePtr());
-
-                  child_byte_size = ivar_type_info.Width / 8;
-                  child_byte_offset = 0;
-                  child_is_base_class = true;
-
-                  return GetType(ivar_qual_type);
-                }
-
-                ++child_idx;
-              }
-            } else
-              ++child_idx;
-          }
-
-          const uint32_t superclass_idx = child_idx;
-
-          if (idx < (child_idx + class_interface_decl->ivar_size())) {
-            clang::ObjCInterfaceDecl::ivar_iterator ivar_pos,
-                ivar_end = class_interface_decl->ivar_end();
-
-            for (ivar_pos = class_interface_decl->ivar_begin();
-                 ivar_pos != ivar_end; ++ivar_pos) {
-              if (child_idx == idx) {
-                clang::ObjCIvarDecl *ivar_decl = *ivar_pos;
-
-                clang::QualType ivar_qual_type(ivar_decl->getType());
-
-                child_name.assign(ivar_decl->getNameAsString());
-
-                clang::TypeInfo ivar_type_info =
-                    getASTContext().getTypeInfo(ivar_qual_type.getTypePtr());
-
-                child_byte_size = ivar_type_info.Width / 8;
-
-                // Figure out the field offset within the current
-                // struct/union/class type For ObjC objects, we can't trust the
-                // bit offset we get from the Clang AST, since that doesn't
-                // account for the space taken up by unbacked properties, or
-                // from the changing size of base classes that are newer than
-                // this class. So if we have a process around that we can ask
-                // about this object, do so.
-                child_byte_offset = LLDB_INVALID_IVAR_OFFSET;
-                Process *process = nullptr;
-                if (exe_ctx)
-                  process = exe_ctx->GetProcessPtr();
-                if (process) {
-                  ObjCLanguageRuntime *objc_runtime =
-                      ObjCLanguageRuntime::Get(*process);
-                  if (objc_runtime != nullptr) {
-                    CompilerType parent_ast_type = GetType(parent_qual_type);
-                    child_byte_offset = objc_runtime->GetByteOffsetForIvar(
-                        parent_ast_type, ivar_decl->getNameAsString().c_str());
-                  }
-                }
-
-                // Setting this to INT32_MAX to make sure we don't compute it
-                // twice...
-                bit_offset = INT32_MAX;
-
-                if (child_byte_offset ==
-                    static_cast<int32_t>(LLDB_INVALID_IVAR_OFFSET)) {
-                  bit_offset = interface_layout.getFieldOffset(child_idx -
-                                                               superclass_idx);
-                  child_byte_offset = bit_offset / 8;
-                }
-
-                // Note, the ObjC Ivar Byte offset is just that, it doesn't
-                // account for the bit offset of a bitfield within its
-                // containing object.  So regardless of where we get the byte
-                // offset from, we still need to get the bit offset for
-                // bitfields from the layout.
-
-                if (FieldIsBitfield(ivar_decl, child_bitfield_bit_size)) {
-                  if (bit_offset == INT32_MAX)
-                    bit_offset = interface_layout.getFieldOffset(
-                        child_idx - superclass_idx);
-
-                  child_bitfield_bit_offset = bit_offset % 8;
-                }
-                return GetType(ivar_qual_type);
-              }
-              ++child_idx;
-            }
-          }
-        }
-      }
-    }
-    break;
-
-  case clang::Type::ObjCObjectPointer:
-    if (idx_is_valid) {
-      CompilerType pointee_clang_type(GetPointeeType(type));
-
-      if (transparent_pointers && pointee_clang_type.IsAggregateType()) {
-        child_is_deref_of_parent = false;
-        bool tmp_child_is_deref_of_parent = false;
-        return pointee_clang_type.GetChildCompilerTypeAtIndex(
-            exe_ctx, idx, transparent_pointers, omit_empty_base_classes,
-            ignore_array_bounds, child_name, child_byte_size, child_byte_offset,
-            child_bitfield_bit_size, child_bitfield_bit_offset,
-            child_is_base_class, tmp_child_is_deref_of_parent, valobj,
-            language_flags);
-      } else {
-        child_is_deref_of_parent = true;
-        const char *parent_name =
-            valobj ? valobj->GetName().GetCString() : nullptr;
-        if (parent_name) {
-          child_name.assign(1, '*');
-          child_name += parent_name;
-        }
-
-        // We have a pointer to an simple type
-        if (idx == 0 && pointee_clang_type.GetCompleteType()) {
-          if (Optional<uint64_t> size =
-                  pointee_clang_type.GetByteSize(get_exe_scope())) {
-            child_byte_size = *size;
-            child_byte_offset = 0;
-            return pointee_clang_type;
-          }
-        }
-      }
-    }
-    break;
-
-  case clang::Type::Vector:
-  case clang::Type::ExtVector:
-    if (idx_is_valid) {
-      const clang::VectorType *array =
-          llvm::cast<clang::VectorType>(parent_qual_type.getTypePtr());
-      if (array) {
-        CompilerType element_type = GetType(array->getElementType());
-        if (element_type.GetCompleteType()) {
-          char element_name[64];
-          ::snprintf(element_name, sizeof(element_name), "[%" PRIu64 "]",
-                     static_cast<uint64_t>(idx));
-          child_name.assign(element_name);
-          if (Optional<uint64_t> size =
-                  element_type.GetByteSize(get_exe_scope())) {
-            child_byte_size = *size;
-            child_byte_offset = (int32_t)idx * (int32_t)child_byte_size;
-            return element_type;
-          }
-        }
-      }
-    }
-    break;
-
-  case clang::Type::ConstantArray:
-  case clang::Type::IncompleteArray:
-    if (ignore_array_bounds || idx_is_valid) {
-      const clang::ArrayType *array = GetQualType(type)->getAsArrayTypeUnsafe();
-      if (array) {
-        CompilerType element_type = GetType(array->getElementType());
-        if (element_type.GetCompleteType()) {
-          child_name = llvm::formatv("[{0}]", idx);
-          if (Optional<uint64_t> size =
-                  element_type.GetByteSize(get_exe_scope())) {
-            child_byte_size = *size;
-            child_byte_offset = (int32_t)idx * (int32_t)child_byte_size;
-            return element_type;
-          }
-        }
-      }
-    }
-    break;
-
-  case clang::Type::Pointer: {
-    CompilerType pointee_clang_type(GetPointeeType(type));
-
-    // Don't dereference "void *" pointers
-    if (pointee_clang_type.IsVoidType())
-      return CompilerType();
-
-    if (transparent_pointers && pointee_clang_type.IsAggregateType()) {
-      child_is_deref_of_parent = false;
-      bool tmp_child_is_deref_of_parent = false;
-      return pointee_clang_type.GetChildCompilerTypeAtIndex(
-          exe_ctx, idx, transparent_pointers, omit_empty_base_classes,
-          ignore_array_bounds, child_name, child_byte_size, child_byte_offset,
-          child_bitfield_bit_size, child_bitfield_bit_offset,
-          child_is_base_class, tmp_child_is_deref_of_parent, valobj,
-          language_flags);
-    } else {
-      child_is_deref_of_parent = true;
-
-      const char *parent_name =
-          valobj ? valobj->GetName().GetCString() : nullptr;
-      if (parent_name) {
-        child_name.assign(1, '*');
-        child_name += parent_name;
-      }
-
-      // We have a pointer to an simple type
-      if (idx == 0) {
-        if (Optional<uint64_t> size =
-                pointee_clang_type.GetByteSize(get_exe_scope())) {
-          child_byte_size = *size;
-          child_byte_offset = 0;
-          return pointee_clang_type;
-        }
-      }
-    }
-    break;
-  }
-
-  case clang::Type::LValueReference:
-  case clang::Type::RValueReference:
-    if (idx_is_valid) {
-      const clang::ReferenceType *reference_type =
-          llvm::cast<clang::ReferenceType>(parent_qual_type.getTypePtr());
-      CompilerType pointee_clang_type =
-          GetType(reference_type->getPointeeType());
-      if (transparent_pointers && pointee_clang_type.IsAggregateType()) {
-        child_is_deref_of_parent = false;
-        bool tmp_child_is_deref_of_parent = false;
-        return pointee_clang_type.GetChildCompilerTypeAtIndex(
-            exe_ctx, idx, transparent_pointers, omit_empty_base_classes,
-            ignore_array_bounds, child_name, child_byte_size, child_byte_offset,
-            child_bitfield_bit_size, child_bitfield_bit_offset,
-            child_is_base_class, tmp_child_is_deref_of_parent, valobj,
-            language_flags);
-      } else {
-        const char *parent_name =
-            valobj ? valobj->GetName().GetCString() : nullptr;
-        if (parent_name) {
-          child_name.assign(1, '&');
-          child_name += parent_name;
-        }
-
-        // We have a pointer to an simple type
-        if (idx == 0) {
-          if (Optional<uint64_t> size =
-                  pointee_clang_type.GetByteSize(get_exe_scope())) {
-            child_byte_size = *size;
-            child_byte_offset = 0;
-            return pointee_clang_type;
-          }
-        }
-      }
-    }
-    break;
-
-  default:
-    break;
-  }
-  return CompilerType();
-}
-
-static uint32_t GetIndexForRecordBase(const clang::RecordDecl *record_decl,
-                                      const clang::CXXBaseSpecifier *base_spec,
-                                      bool omit_empty_base_classes) {
-  uint32_t child_idx = 0;
-
-  const clang::CXXRecordDecl *cxx_record_decl =
-      llvm::dyn_cast<clang::CXXRecordDecl>(record_decl);
-
-  //    const char *super_name = record_decl->getNameAsCString();
-  //    const char *base_name =
-  //    base_spec->getType()->getAs<clang::RecordType>()->getDecl()->getNameAsCString();
-  //    printf ("GetIndexForRecordChild (%s, %s)\n", super_name, base_name);
-  //
-  if (cxx_record_decl) {
-    clang::CXXRecordDecl::base_class_const_iterator base_class, base_class_end;
-    for (base_class = cxx_record_decl->bases_begin(),
-        base_class_end = cxx_record_decl->bases_end();
-         base_class != base_class_end; ++base_class) {
-      if (omit_empty_base_classes) {
-        if (BaseSpecifierIsEmpty(base_class))
-          continue;
-      }
-
-      //            printf ("GetIndexForRecordChild (%s, %s) base[%u] = %s\n",
-      //            super_name, base_name,
-      //                    child_idx,
-      //                    base_class->getType()->getAs<clang::RecordType>()->getDecl()->getNameAsCString());
-      //
-      //
-      if (base_class == base_spec)
-        return child_idx;
-      ++child_idx;
-    }
-  }
-
-  return UINT32_MAX;
-}
-
-static uint32_t GetIndexForRecordChild(const clang::RecordDecl *record_decl,
-                                       clang::NamedDecl *canonical_decl,
-                                       bool omit_empty_base_classes) {
-  uint32_t child_idx = ClangASTContext::GetNumBaseClasses(
-      llvm::dyn_cast<clang::CXXRecordDecl>(record_decl),
-      omit_empty_base_classes);
-
-  clang::RecordDecl::field_iterator field, field_end;
-  for (field = record_decl->field_begin(), field_end = record_decl->field_end();
-       field != field_end; ++field, ++child_idx) {
-    if (field->getCanonicalDecl() == canonical_decl)
-      return child_idx;
-  }
-
-  return UINT32_MAX;
-}
-
-// Look for a child member (doesn't include base classes, but it does include
-// their members) in the type hierarchy. Returns an index path into
-// "clang_type" on how to reach the appropriate member.
-//
-//    class A
-//    {
-//    public:
-//        int m_a;
-//        int m_b;
-//    };
-//
-//    class B
-//    {
-//    };
-//
-//    class C :
-//        public B,
-//        public A
-//    {
-//    };
-//
-// If we have a clang type that describes "class C", and we wanted to looked
-// "m_b" in it:
-//
-// With omit_empty_base_classes == false we would get an integer array back
-// with: { 1,  1 } The first index 1 is the child index for "class A" within
-// class C The second index 1 is the child index for "m_b" within class A
-//
-// With omit_empty_base_classes == true we would get an integer array back
-// with: { 0,  1 } The first index 0 is the child index for "class A" within
-// class C (since class B doesn't have any members it doesn't count) The second
-// index 1 is the child index for "m_b" within class A
-
-size_t ClangASTContext::GetIndexOfChildMemberWithName(
-    lldb::opaque_compiler_type_t type, const char *name,
-    bool omit_empty_base_classes, std::vector<uint32_t> &child_indexes) {
-  if (type && name && name[0]) {
-    clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
-    const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-    switch (type_class) {
-    case clang::Type::Record:
-      if (GetCompleteType(type)) {
-        const clang::RecordType *record_type =
-            llvm::cast<clang::RecordType>(qual_type.getTypePtr());
-        const clang::RecordDecl *record_decl = record_type->getDecl();
-
-        assert(record_decl);
-        uint32_t child_idx = 0;
-
-        const clang::CXXRecordDecl *cxx_record_decl =
-            llvm::dyn_cast<clang::CXXRecordDecl>(record_decl);
-
-        // Try and find a field that matches NAME
-        clang::RecordDecl::field_iterator field, field_end;
-        llvm::StringRef name_sref(name);
-        for (field = record_decl->field_begin(),
-            field_end = record_decl->field_end();
-             field != field_end; ++field, ++child_idx) {
-          llvm::StringRef field_name = field->getName();
-          if (field_name.empty()) {
-            CompilerType field_type = GetType(field->getType());
-            child_indexes.push_back(child_idx);
-            if (field_type.GetIndexOfChildMemberWithName(
-                    name, omit_empty_base_classes, child_indexes))
-              return child_indexes.size();
-            child_indexes.pop_back();
-
-          } else if (field_name.equals(name_sref)) {
-            // We have to add on the number of base classes to this index!
-            child_indexes.push_back(
-                child_idx + ClangASTContext::GetNumBaseClasses(
-                                cxx_record_decl, omit_empty_base_classes));
-            return child_indexes.size();
-          }
-        }
-
-        if (cxx_record_decl) {
-          const clang::RecordDecl *parent_record_decl = cxx_record_decl;
-
-          // printf ("parent = %s\n", parent_record_decl->getNameAsCString());
-
-          // const Decl *root_cdecl = cxx_record_decl->getCanonicalDecl();
-          // Didn't find things easily, lets let clang do its thang...
-          clang::IdentifierInfo &ident_ref =
-              getASTContext().Idents.get(name_sref);
-          clang::DeclarationName decl_name(&ident_ref);
-
-          clang::CXXBasePaths paths;
-          if (cxx_record_decl->lookupInBases(
-                  [decl_name](const clang::CXXBaseSpecifier *specifier,
-                              clang::CXXBasePath &path) {
-                    return clang::CXXRecordDecl::FindOrdinaryMember(
-                        specifier, path, decl_name);
-                  },
-                  paths)) {
-            clang::CXXBasePaths::const_paths_iterator path,
-                path_end = paths.end();
-            for (path = paths.begin(); path != path_end; ++path) {
-              const size_t num_path_elements = path->size();
-              for (size_t e = 0; e < num_path_elements; ++e) {
-                clang::CXXBasePathElement elem = (*path)[e];
-
-                child_idx = GetIndexForRecordBase(parent_record_decl, elem.Base,
-                                                  omit_empty_base_classes);
-                if (child_idx == UINT32_MAX) {
-                  child_indexes.clear();
-                  return 0;
-                } else {
-                  child_indexes.push_back(child_idx);
-                  parent_record_decl = llvm::cast<clang::RecordDecl>(
-                      elem.Base->getType()
-                          ->getAs<clang::RecordType>()
-                          ->getDecl());
-                }
-              }
-              for (clang::NamedDecl *path_decl : path->Decls) {
-                child_idx = GetIndexForRecordChild(
-                    parent_record_decl, path_decl, omit_empty_base_classes);
-                if (child_idx == UINT32_MAX) {
-                  child_indexes.clear();
-                  return 0;
-                } else {
-                  child_indexes.push_back(child_idx);
-                }
-              }
-            }
-            return child_indexes.size();
-          }
-        }
-      }
-      break;
-
-    case clang::Type::ObjCObject:
-    case clang::Type::ObjCInterface:
-      if (GetCompleteType(type)) {
-        llvm::StringRef name_sref(name);
-        const clang::ObjCObjectType *objc_class_type =
-            llvm::dyn_cast<clang::ObjCObjectType>(qual_type.getTypePtr());
-        assert(objc_class_type);
-        if (objc_class_type) {
-          uint32_t child_idx = 0;
-          clang::ObjCInterfaceDecl *class_interface_decl =
-              objc_class_type->getInterface();
-
-          if (class_interface_decl) {
-            clang::ObjCInterfaceDecl::ivar_iterator ivar_pos,
-                ivar_end = class_interface_decl->ivar_end();
-            clang::ObjCInterfaceDecl *superclass_interface_decl =
-                class_interface_decl->getSuperClass();
-
-            for (ivar_pos = class_interface_decl->ivar_begin();
-                 ivar_pos != ivar_end; ++ivar_pos, ++child_idx) {
-              const clang::ObjCIvarDecl *ivar_decl = *ivar_pos;
-
-              if (ivar_decl->getName().equals(name_sref)) {
-                if ((!omit_empty_base_classes && superclass_interface_decl) ||
-                    (omit_empty_base_classes &&
-                     ObjCDeclHasIVars(superclass_interface_decl, true)))
-                  ++child_idx;
-
-                child_indexes.push_back(child_idx);
-                return child_indexes.size();
-              }
-            }
-
-            if (superclass_interface_decl) {
-              // The super class index is always zero for ObjC classes, so we
-              // push it onto the child indexes in case we find an ivar in our
-              // superclass...
-              child_indexes.push_back(0);
-
-              CompilerType superclass_clang_type =
-                  GetType(getASTContext().getObjCInterfaceType(
-                      superclass_interface_decl));
-              if (superclass_clang_type.GetIndexOfChildMemberWithName(
-                      name, omit_empty_base_classes, child_indexes)) {
-                // We did find an ivar in a superclass so just return the
-                // results!
-                return child_indexes.size();
-              }
-
-              // We didn't find an ivar matching "name" in our superclass, pop
-              // the superclass zero index that we pushed on above.
-              child_indexes.pop_back();
-            }
-          }
-        }
-      }
-      break;
-
-    case clang::Type::ObjCObjectPointer: {
-      CompilerType objc_object_clang_type = GetType(
-          llvm::cast<clang::ObjCObjectPointerType>(qual_type.getTypePtr())
-              ->getPointeeType());
-      return objc_object_clang_type.GetIndexOfChildMemberWithName(
-          name, omit_empty_base_classes, child_indexes);
-    } break;
-
-    case clang::Type::ConstantArray: {
-      //                const clang::ConstantArrayType *array =
-      //                llvm::cast<clang::ConstantArrayType>(parent_qual_type.getTypePtr());
-      //                const uint64_t element_count =
-      //                array->getSize().getLimitedValue();
-      //
-      //                if (idx < element_count)
-      //                {
-      //                    std::pair<uint64_t, unsigned> field_type_info =
-      //                    ast->getTypeInfo(array->getElementType());
-      //
-      //                    char element_name[32];
-      //                    ::snprintf (element_name, sizeof (element_name),
-      //                    "%s[%u]", parent_name ? parent_name : "", idx);
-      //
-      //                    child_name.assign(element_name);
-      //                    assert(field_type_info.first % 8 == 0);
-      //                    child_byte_size = field_type_info.first / 8;
-      //                    child_byte_offset = idx * child_byte_size;
-      //                    return array->getElementType().getAsOpaquePtr();
-      //                }
-    } break;
-
-    //        case clang::Type::MemberPointerType:
-    //            {
-    //                MemberPointerType *mem_ptr_type =
-    //                llvm::cast<MemberPointerType>(qual_type.getTypePtr());
-    //                clang::QualType pointee_type =
-    //                mem_ptr_type->getPointeeType();
-    //
-    //                if (ClangASTContext::IsAggregateType
-    //                (pointee_type.getAsOpaquePtr()))
-    //                {
-    //                    return GetIndexOfChildWithName (ast,
-    //                                                    mem_ptr_type->getPointeeType().getAsOpaquePtr(),
-    //                                                    name);
-    //                }
-    //            }
-    //            break;
-    //
-    case clang::Type::LValueReference:
-    case clang::Type::RValueReference: {
-      const clang::ReferenceType *reference_type =
-          llvm::cast<clang::ReferenceType>(qual_type.getTypePtr());
-      clang::QualType pointee_type(reference_type->getPointeeType());
-      CompilerType pointee_clang_type = GetType(pointee_type);
-
-      if (pointee_clang_type.IsAggregateType()) {
-        return pointee_clang_type.GetIndexOfChildMemberWithName(
-            name, omit_empty_base_classes, child_indexes);
-      }
-    } break;
-
-    case clang::Type::Pointer: {
-      CompilerType pointee_clang_type(GetPointeeType(type));
-
-      if (pointee_clang_type.IsAggregateType()) {
-        return pointee_clang_type.GetIndexOfChildMemberWithName(
-            name, omit_empty_base_classes, child_indexes);
-      }
-    } break;
-
-    default:
-      break;
-    }
-  }
-  return 0;
-}
-
-// Get the index of the child of "clang_type" whose name matches. This function
-// doesn't descend into the children, but only looks one level deep and name
-// matches can include base class names.
-
-uint32_t
-ClangASTContext::GetIndexOfChildWithName(lldb::opaque_compiler_type_t type,
-                                         const char *name,
-                                         bool omit_empty_base_classes) {
-  if (type && name && name[0]) {
-    clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
-
-    const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-
-    switch (type_class) {
-    case clang::Type::Record:
-      if (GetCompleteType(type)) {
-        const clang::RecordType *record_type =
-            llvm::cast<clang::RecordType>(qual_type.getTypePtr());
-        const clang::RecordDecl *record_decl = record_type->getDecl();
-
-        assert(record_decl);
-        uint32_t child_idx = 0;
-
-        const clang::CXXRecordDecl *cxx_record_decl =
-            llvm::dyn_cast<clang::CXXRecordDecl>(record_decl);
-
-        if (cxx_record_decl) {
-          clang::CXXRecordDecl::base_class_const_iterator base_class,
-              base_class_end;
-          for (base_class = cxx_record_decl->bases_begin(),
-              base_class_end = cxx_record_decl->bases_end();
-               base_class != base_class_end; ++base_class) {
-            // Skip empty base classes
-            clang::CXXRecordDecl *base_class_decl =
-                llvm::cast<clang::CXXRecordDecl>(
-                    base_class->getType()
-                        ->getAs<clang::RecordType>()
-                        ->getDecl());
-            if (omit_empty_base_classes &&
-                !ClangASTContext::RecordHasFields(base_class_decl))
-              continue;
-
-            CompilerType base_class_clang_type = GetType(base_class->getType());
-            std::string base_class_type_name(
-                base_class_clang_type.GetTypeName().AsCString(""));
-            if (base_class_type_name == name)
-              return child_idx;
-            ++child_idx;
-          }
-        }
-
-        // Try and find a field that matches NAME
-        clang::RecordDecl::field_iterator field, field_end;
-        llvm::StringRef name_sref(name);
-        for (field = record_decl->field_begin(),
-            field_end = record_decl->field_end();
-             field != field_end; ++field, ++child_idx) {
-          if (field->getName().equals(name_sref))
-            return child_idx;
-        }
-      }
-      break;
-
-    case clang::Type::ObjCObject:
-    case clang::Type::ObjCInterface:
-      if (GetCompleteType(type)) {
-        llvm::StringRef name_sref(name);
-        const clang::ObjCObjectType *objc_class_type =
-            llvm::dyn_cast<clang::ObjCObjectType>(qual_type.getTypePtr());
-        assert(objc_class_type);
-        if (objc_class_type) {
-          uint32_t child_idx = 0;
-          clang::ObjCInterfaceDecl *class_interface_decl =
-              objc_class_type->getInterface();
-
-          if (class_interface_decl) {
-            clang::ObjCInterfaceDecl::ivar_iterator ivar_pos,
-                ivar_end = class_interface_decl->ivar_end();
-            clang::ObjCInterfaceDecl *superclass_interface_decl =
-                class_interface_decl->getSuperClass();
-
-            for (ivar_pos = class_interface_decl->ivar_begin();
-                 ivar_pos != ivar_end; ++ivar_pos, ++child_idx) {
-              const clang::ObjCIvarDecl *ivar_decl = *ivar_pos;
-
-              if (ivar_decl->getName().equals(name_sref)) {
-                if ((!omit_empty_base_classes && superclass_interface_decl) ||
-                    (omit_empty_base_classes &&
-                     ObjCDeclHasIVars(superclass_interface_decl, true)))
-                  ++child_idx;
-
-                return child_idx;
-              }
-            }
-
-            if (superclass_interface_decl) {
-              if (superclass_interface_decl->getName().equals(name_sref))
-                return 0;
-            }
-          }
-        }
-      }
-      break;
-
-    case clang::Type::ObjCObjectPointer: {
-      CompilerType pointee_clang_type = GetType(
-          llvm::cast<clang::ObjCObjectPointerType>(qual_type.getTypePtr())
-              ->getPointeeType());
-      return pointee_clang_type.GetIndexOfChildWithName(
-          name, omit_empty_base_classes);
-    } break;
-
-    case clang::Type::ConstantArray: {
-      //                const clang::ConstantArrayType *array =
-      //                llvm::cast<clang::ConstantArrayType>(parent_qual_type.getTypePtr());
-      //                const uint64_t element_count =
-      //                array->getSize().getLimitedValue();
-      //
-      //                if (idx < element_count)
-      //                {
-      //                    std::pair<uint64_t, unsigned> field_type_info =
-      //                    ast->getTypeInfo(array->getElementType());
-      //
-      //                    char element_name[32];
-      //                    ::snprintf (element_name, sizeof (element_name),
-      //                    "%s[%u]", parent_name ? parent_name : "", idx);
-      //
-      //                    child_name.assign(element_name);
-      //                    assert(field_type_info.first % 8 == 0);
-      //                    child_byte_size = field_type_info.first / 8;
-      //                    child_byte_offset = idx * child_byte_size;
-      //                    return array->getElementType().getAsOpaquePtr();
-      //                }
-    } break;
-
-    //        case clang::Type::MemberPointerType:
-    //            {
-    //                MemberPointerType *mem_ptr_type =
-    //                llvm::cast<MemberPointerType>(qual_type.getTypePtr());
-    //                clang::QualType pointee_type =
-    //                mem_ptr_type->getPointeeType();
-    //
-    //                if (ClangASTContext::IsAggregateType
-    //                (pointee_type.getAsOpaquePtr()))
-    //                {
-    //                    return GetIndexOfChildWithName (ast,
-    //                                                    mem_ptr_type->getPointeeType().getAsOpaquePtr(),
-    //                                                    name);
-    //                }
-    //            }
-    //            break;
-    //
-    case clang::Type::LValueReference:
-    case clang::Type::RValueReference: {
-      const clang::ReferenceType *reference_type =
-          llvm::cast<clang::ReferenceType>(qual_type.getTypePtr());
-      CompilerType pointee_type = GetType(reference_type->getPointeeType());
-
-      if (pointee_type.IsAggregateType()) {
-        return pointee_type.GetIndexOfChildWithName(name,
-                                                    omit_empty_base_classes);
-      }
-    } break;
-
-    case clang::Type::Pointer: {
-      const clang::PointerType *pointer_type =
-          llvm::cast<clang::PointerType>(qual_type.getTypePtr());
-      CompilerType pointee_type = GetType(pointer_type->getPointeeType());
-
-      if (pointee_type.IsAggregateType()) {
-        return pointee_type.GetIndexOfChildWithName(name,
-                                                    omit_empty_base_classes);
-      } else {
-        //                    if (parent_name)
-        //                    {
-        //                        child_name.assign(1, '*');
-        //                        child_name += parent_name;
-        //                    }
-        //
-        //                    // We have a pointer to an simple type
-        //                    if (idx == 0)
-        //                    {
-        //                        std::pair<uint64_t, unsigned> clang_type_info
-        //                        = ast->getTypeInfo(pointee_type);
-        //                        assert(clang_type_info.first % 8 == 0);
-        //                        child_byte_size = clang_type_info.first / 8;
-        //                        child_byte_offset = 0;
-        //                        return pointee_type.getAsOpaquePtr();
-        //                    }
-      }
-    } break;
-
-    default:
-      break;
-    }
-  }
-  return UINT32_MAX;
-}
-
-size_t
-ClangASTContext::GetNumTemplateArguments(lldb::opaque_compiler_type_t type) {
-  if (!type)
-    return 0;
-
-  clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
-  const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-  switch (type_class) {
-  case clang::Type::Record:
-    if (GetCompleteType(type)) {
-      const clang::CXXRecordDecl *cxx_record_decl =
-          qual_type->getAsCXXRecordDecl();
-      if (cxx_record_decl) {
-        const clang::ClassTemplateSpecializationDecl *template_decl =
-            llvm::dyn_cast<clang::ClassTemplateSpecializationDecl>(
-                cxx_record_decl);
-        if (template_decl)
-          return template_decl->getTemplateArgs().size();
-      }
-    }
-    break;
-
-  default:
-    break;
-  }
-
-  return 0;
-}
-
-const clang::ClassTemplateSpecializationDecl *
-ClangASTContext::GetAsTemplateSpecialization(
-    lldb::opaque_compiler_type_t type) {
-  if (!type)
-    return nullptr;
-
-  clang::QualType qual_type(RemoveWrappingTypes(GetCanonicalQualType(type)));
-  const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-  switch (type_class) {
-  case clang::Type::Record: {
-    if (! GetCompleteType(type))
-      return nullptr;
-    const clang::CXXRecordDecl *cxx_record_decl =
-        qual_type->getAsCXXRecordDecl();
-    if (!cxx_record_decl)
-      return nullptr;
-    return llvm::dyn_cast<clang::ClassTemplateSpecializationDecl>(
-        cxx_record_decl);
-  }
-
-  default:
-    return nullptr;
-  }
-}
-
-lldb::TemplateArgumentKind
-ClangASTContext::GetTemplateArgumentKind(lldb::opaque_compiler_type_t type,
-                                         size_t arg_idx) {
-  const clang::ClassTemplateSpecializationDecl *template_decl =
-      GetAsTemplateSpecialization(type);
-  if (! template_decl || arg_idx >= template_decl->getTemplateArgs().size())
-    return eTemplateArgumentKindNull;
-
-  switch (template_decl->getTemplateArgs()[arg_idx].getKind()) {
-  case clang::TemplateArgument::Null:
-    return eTemplateArgumentKindNull;
-
-  case clang::TemplateArgument::NullPtr:
-    return eTemplateArgumentKindNullPtr;
-
-  case clang::TemplateArgument::Type:
-    return eTemplateArgumentKindType;
-
-  case clang::TemplateArgument::Declaration:
-    return eTemplateArgumentKindDeclaration;
-
-  case clang::TemplateArgument::Integral:
-    return eTemplateArgumentKindIntegral;
-
-  case clang::TemplateArgument::Template:
-    return eTemplateArgumentKindTemplate;
-
-  case clang::TemplateArgument::TemplateExpansion:
-    return eTemplateArgumentKindTemplateExpansion;
-
-  case clang::TemplateArgument::Expression:
-    return eTemplateArgumentKindExpression;
-
-  case clang::TemplateArgument::Pack:
-    return eTemplateArgumentKindPack;
-  }
-  llvm_unreachable("Unhandled clang::TemplateArgument::ArgKind");
-}
-
-CompilerType
-ClangASTContext::GetTypeTemplateArgument(lldb::opaque_compiler_type_t type,
-                                         size_t idx) {
-  const clang::ClassTemplateSpecializationDecl *template_decl =
-      GetAsTemplateSpecialization(type);
-  if (!template_decl || idx >= template_decl->getTemplateArgs().size())
-    return CompilerType();
-
-  const clang::TemplateArgument &template_arg =
-      template_decl->getTemplateArgs()[idx];
-  if (template_arg.getKind() != clang::TemplateArgument::Type)
-    return CompilerType();
-
-  return GetType(template_arg.getAsType());
-}
-
-Optional<CompilerType::IntegralTemplateArgument>
-ClangASTContext::GetIntegralTemplateArgument(lldb::opaque_compiler_type_t type,
-                                             size_t idx) {
-  const clang::ClassTemplateSpecializationDecl *template_decl =
-      GetAsTemplateSpecialization(type);
-  if (! template_decl || idx >= template_decl->getTemplateArgs().size())
-    return llvm::None;
-
-  const clang::TemplateArgument &template_arg =
-      template_decl->getTemplateArgs()[idx];
-  if (template_arg.getKind() != clang::TemplateArgument::Integral)
-    return llvm::None;
-
-  return {
-      {template_arg.getAsIntegral(), GetType(template_arg.getIntegralType())}};
-}
-
-CompilerType ClangASTContext::GetTypeForFormatters(void *type) {
-  if (type)
-    return ClangUtil::RemoveFastQualifiers(CompilerType(this, type));
-  return CompilerType();
-}
-
-clang::EnumDecl *ClangASTContext::GetAsEnumDecl(const CompilerType &type) {
-  const clang::EnumType *enutype =
-      llvm::dyn_cast<clang::EnumType>(ClangUtil::GetCanonicalQualType(type));
-  if (enutype)
-    return enutype->getDecl();
-  return nullptr;
-}
-
-clang::RecordDecl *ClangASTContext::GetAsRecordDecl(const CompilerType &type) {
-  const clang::RecordType *record_type =
-      llvm::dyn_cast<clang::RecordType>(ClangUtil::GetCanonicalQualType(type));
-  if (record_type)
-    return record_type->getDecl();
-  return nullptr;
-}
-
-clang::TagDecl *ClangASTContext::GetAsTagDecl(const CompilerType &type) {
-  return ClangUtil::GetAsTagDecl(type);
-}
-
-clang::TypedefNameDecl *
-ClangASTContext::GetAsTypedefDecl(const CompilerType &type) {
-  const clang::TypedefType *typedef_type =
-      llvm::dyn_cast<clang::TypedefType>(ClangUtil::GetQualType(type));
-  if (typedef_type)
-    return typedef_type->getDecl();
-  return nullptr;
-}
-
-clang::CXXRecordDecl *
-ClangASTContext::GetAsCXXRecordDecl(lldb::opaque_compiler_type_t type) {
-  return GetCanonicalQualType(type)->getAsCXXRecordDecl();
-}
-
-clang::ObjCInterfaceDecl *
-ClangASTContext::GetAsObjCInterfaceDecl(const CompilerType &type) {
-  const clang::ObjCObjectType *objc_class_type =
-      llvm::dyn_cast<clang::ObjCObjectType>(
-          ClangUtil::GetCanonicalQualType(type));
-  if (objc_class_type)
-    return objc_class_type->getInterface();
-  return nullptr;
-}
-
-clang::FieldDecl *ClangASTContext::AddFieldToRecordType(
-    const CompilerType &type, llvm::StringRef name,
-    const CompilerType &field_clang_type, AccessType access,
-    uint32_t bitfield_bit_size) {
-  if (!type.IsValid() || !field_clang_type.IsValid())
-    return nullptr;
-  ClangASTContext *ast =
-      llvm::dyn_cast_or_null<ClangASTContext>(type.GetTypeSystem());
-  if (!ast)
-    return nullptr;
-  clang::ASTContext &clang_ast = ast->getASTContext();
-  clang::IdentifierInfo *ident = nullptr;
-  if (!name.empty())
-    ident = &clang_ast.Idents.get(name);
-
-  clang::FieldDecl *field = nullptr;
-
-  clang::Expr *bit_width = nullptr;
-  if (bitfield_bit_size != 0) {
-    llvm::APInt bitfield_bit_size_apint(clang_ast.getTypeSize(clang_ast.IntTy),
-                                        bitfield_bit_size);
-    bit_width = new (clang_ast)
-        clang::IntegerLiteral(clang_ast, bitfield_bit_size_apint,
-                              clang_ast.IntTy, clang::SourceLocation());
-  }
-
-  clang::RecordDecl *record_decl = ast->GetAsRecordDecl(type);
-  if (record_decl) {
-    field = clang::FieldDecl::Create(
-        clang_ast, record_decl, clang::SourceLocation(),
-        clang::SourceLocation(),
-        ident,                                    // Identifier
-        ClangUtil::GetQualType(field_clang_type), // Field type
-        nullptr,                                  // TInfo *
-        bit_width,                                // BitWidth
-        false,                                    // Mutable
-        clang::ICIS_NoInit);                      // HasInit
-
-    if (name.empty()) {
-      // Determine whether this field corresponds to an anonymous struct or
-      // union.
-      if (const clang::TagType *TagT =
-              field->getType()->getAs<clang::TagType>()) {
-        if (clang::RecordDecl *Rec =
-                llvm::dyn_cast<clang::RecordDecl>(TagT->getDecl()))
-          if (!Rec->getDeclName()) {
-            Rec->setAnonymousStructOrUnion(true);
-            field->setImplicit();
-          }
-      }
-    }
-
-    if (field) {
-      field->setAccess(
-          ClangASTContext::ConvertAccessTypeToAccessSpecifier(access));
-
-      record_decl->addDecl(field);
-
-#ifdef LLDB_CONFIGURATION_DEBUG
-      VerifyDecl(field);
-#endif
-    }
-  } else {
-    clang::ObjCInterfaceDecl *class_interface_decl =
-        ast->GetAsObjCInterfaceDecl(type);
-
-    if (class_interface_decl) {
-      const bool is_synthesized = false;
-
-      field_clang_type.GetCompleteType();
-
-      field = clang::ObjCIvarDecl::Create(
-          clang_ast, class_interface_decl, clang::SourceLocation(),
-          clang::SourceLocation(),
-          ident,                                    // Identifier
-          ClangUtil::GetQualType(field_clang_type), // Field type
-          nullptr,                                  // TypeSourceInfo *
-          ConvertAccessTypeToObjCIvarAccessControl(access), bit_width,
-          is_synthesized);
-
-      if (field) {
-        class_interface_decl->addDecl(field);
-
-#ifdef LLDB_CONFIGURATION_DEBUG
-        VerifyDecl(field);
-#endif
-      }
-    }
-  }
-  return field;
-}
-
-void ClangASTContext::BuildIndirectFields(const CompilerType &type) {
-  if (!type)
-    return;
-
-  ClangASTContext *ast = llvm::dyn_cast<ClangASTContext>(type.GetTypeSystem());
-  if (!ast)
-    return;
-
-  clang::RecordDecl *record_decl = ast->GetAsRecordDecl(type);
-
-  if (!record_decl)
-    return;
-
-  typedef llvm::SmallVector<clang::IndirectFieldDecl *, 1> IndirectFieldVector;
-
-  IndirectFieldVector indirect_fields;
-  clang::RecordDecl::field_iterator field_pos;
-  clang::RecordDecl::field_iterator field_end_pos = record_decl->field_end();
-  clang::RecordDecl::field_iterator last_field_pos = field_end_pos;
-  for (field_pos = record_decl->field_begin(); field_pos != field_end_pos;
-       last_field_pos = field_pos++) {
-    if (field_pos->isAnonymousStructOrUnion()) {
-      clang::QualType field_qual_type = field_pos->getType();
-
-      const clang::RecordType *field_record_type =
-          field_qual_type->getAs<clang::RecordType>();
-
-      if (!field_record_type)
-        continue;
-
-      clang::RecordDecl *field_record_decl = field_record_type->getDecl();
-
-      if (!field_record_decl)
-        continue;
-
-      for (clang::RecordDecl::decl_iterator
-               di = field_record_decl->decls_begin(),
-               de = field_record_decl->decls_end();
-           di != de; ++di) {
-        if (clang::FieldDecl *nested_field_decl =
-                llvm::dyn_cast<clang::FieldDecl>(*di)) {
-          clang::NamedDecl **chain =
-              new (ast->getASTContext()) clang::NamedDecl *[2];
-          chain[0] = *field_pos;
-          chain[1] = nested_field_decl;
-          clang::IndirectFieldDecl *indirect_field =
-              clang::IndirectFieldDecl::Create(
-                  ast->getASTContext(), record_decl, clang::SourceLocation(),
-                  nested_field_decl->getIdentifier(),
-                  nested_field_decl->getType(), {chain, 2});
-
-          indirect_field->setImplicit();
-
-          indirect_field->setAccess(ClangASTContext::UnifyAccessSpecifiers(
-              field_pos->getAccess(), nested_field_decl->getAccess()));
-
-          indirect_fields.push_back(indirect_field);
-        } else if (clang::IndirectFieldDecl *nested_indirect_field_decl =
-                       llvm::dyn_cast<clang::IndirectFieldDecl>(*di)) {
-          size_t nested_chain_size =
-              nested_indirect_field_decl->getChainingSize();
-          clang::NamedDecl **chain = new (ast->getASTContext())
-              clang::NamedDecl *[nested_chain_size + 1];
-          chain[0] = *field_pos;
-
-          int chain_index = 1;
-          for (clang::IndirectFieldDecl::chain_iterator
-                   nci = nested_indirect_field_decl->chain_begin(),
-                   nce = nested_indirect_field_decl->chain_end();
-               nci < nce; ++nci) {
-            chain[chain_index] = *nci;
-            chain_index++;
-          }
-
-          clang::IndirectFieldDecl *indirect_field =
-              clang::IndirectFieldDecl::Create(
-                  ast->getASTContext(), record_decl, clang::SourceLocation(),
-                  nested_indirect_field_decl->getIdentifier(),
-                  nested_indirect_field_decl->getType(),
-                  {chain, nested_chain_size + 1});
-
-          indirect_field->setImplicit();
-
-          indirect_field->setAccess(ClangASTContext::UnifyAccessSpecifiers(
-              field_pos->getAccess(), nested_indirect_field_decl->getAccess()));
-
-          indirect_fields.push_back(indirect_field);
-        }
-      }
-    }
-  }
-
-  // Check the last field to see if it has an incomplete array type as its last
-  // member and if it does, the tell the record decl about it
-  if (last_field_pos != field_end_pos) {
-    if (last_field_pos->getType()->isIncompleteArrayType())
-      record_decl->hasFlexibleArrayMember();
-  }
-
-  for (IndirectFieldVector::iterator ifi = indirect_fields.begin(),
-                                     ife = indirect_fields.end();
-       ifi < ife; ++ifi) {
-    record_decl->addDecl(*ifi);
-  }
-}
-
-void ClangASTContext::SetIsPacked(const CompilerType &type) {
-  if (type) {
-    ClangASTContext *ast =
-        llvm::dyn_cast<ClangASTContext>(type.GetTypeSystem());
-    if (ast) {
-      clang::RecordDecl *record_decl = GetAsRecordDecl(type);
-
-      if (!record_decl)
-        return;
-
-      record_decl->addAttr(
-          clang::PackedAttr::CreateImplicit(ast->getASTContext()));
-    }
-  }
-}
-
-clang::VarDecl *ClangASTContext::AddVariableToRecordType(
-    const CompilerType &type, llvm::StringRef name,
-    const CompilerType &var_type, AccessType access) {
-  if (!type.IsValid() || !var_type.IsValid())
-    return nullptr;
-
-  ClangASTContext *ast = llvm::dyn_cast<ClangASTContext>(type.GetTypeSystem());
-  if (!ast)
-    return nullptr;
-
-  clang::RecordDecl *record_decl = ast->GetAsRecordDecl(type);
-  if (!record_decl)
-    return nullptr;
-
-  clang::VarDecl *var_decl = nullptr;
-  clang::IdentifierInfo *ident = nullptr;
-  if (!name.empty())
-    ident = &ast->getASTContext().Idents.get(name);
-
-  var_decl = clang::VarDecl::Create(
-      ast->getASTContext(),             // ASTContext &
-      record_decl,                      // DeclContext *
-      clang::SourceLocation(),          // clang::SourceLocation StartLoc
-      clang::SourceLocation(),          // clang::SourceLocation IdLoc
-      ident,                            // clang::IdentifierInfo *
-      ClangUtil::GetQualType(var_type), // Variable clang::QualType
-      nullptr,                          // TypeSourceInfo *
-      clang::SC_Static);                // StorageClass
-  if (!var_decl)
-    return nullptr;
-
-  var_decl->setAccess(
-      ClangASTContext::ConvertAccessTypeToAccessSpecifier(access));
-  record_decl->addDecl(var_decl);
-
-#ifdef LLDB_CONFIGURATION_DEBUG
-  VerifyDecl(var_decl);
-#endif
-
-  return var_decl;
-}
-
-clang::CXXMethodDecl *ClangASTContext::AddMethodToCXXRecordType(
-    lldb::opaque_compiler_type_t type, llvm::StringRef name,
-    const char *mangled_name, const CompilerType &method_clang_type,
-    lldb::AccessType access, bool is_virtual, bool is_static, bool is_inline,
-    bool is_explicit, bool is_attr_used, bool is_artificial) {
-  if (!type || !method_clang_type.IsValid() || name.empty())
-    return nullptr;
-
-  clang::QualType record_qual_type(GetCanonicalQualType(type));
-
-  clang::CXXRecordDecl *cxx_record_decl =
-      record_qual_type->getAsCXXRecordDecl();
-
-  if (cxx_record_decl == nullptr)
-    return nullptr;
-
-  clang::QualType method_qual_type(ClangUtil::GetQualType(method_clang_type));
-
-  clang::CXXMethodDecl *cxx_method_decl = nullptr;
-
-  clang::DeclarationName decl_name(&getASTContext().Idents.get(name));
-
-  const clang::FunctionType *function_type =
-      llvm::dyn_cast<clang::FunctionType>(method_qual_type.getTypePtr());
-
-  if (function_type == nullptr)
-    return nullptr;
-
-  const clang::FunctionProtoType *method_function_prototype(
-      llvm::dyn_cast<clang::FunctionProtoType>(function_type));
-
-  if (!method_function_prototype)
-    return nullptr;
-
-  unsigned int num_params = method_function_prototype->getNumParams();
-
-  clang::CXXDestructorDecl *cxx_dtor_decl(nullptr);
-  clang::CXXConstructorDecl *cxx_ctor_decl(nullptr);
-
-  if (is_artificial)
-    return nullptr; // skip everything artificial
-
-  const clang::ExplicitSpecifier explicit_spec(
-      nullptr /*expr*/, is_explicit
-                            ? clang::ExplicitSpecKind::ResolvedTrue
-                            : clang::ExplicitSpecKind::ResolvedFalse);
-  if (name.startswith("~")) {
-    cxx_dtor_decl = clang::CXXDestructorDecl::Create(
-        getASTContext(), cxx_record_decl, clang::SourceLocation(),
-        clang::DeclarationNameInfo(
-            getASTContext().DeclarationNames.getCXXDestructorName(
-                getASTContext().getCanonicalType(record_qual_type)),
-            clang::SourceLocation()),
-        method_qual_type, nullptr, is_inline, is_artificial,
-        ConstexprSpecKind::CSK_unspecified);
-    cxx_method_decl = cxx_dtor_decl;
-  } else if (decl_name == cxx_record_decl->getDeclName()) {
-    cxx_ctor_decl = clang::CXXConstructorDecl::Create(
-        getASTContext(), cxx_record_decl, clang::SourceLocation(),
-        clang::DeclarationNameInfo(
-            getASTContext().DeclarationNames.getCXXConstructorName(
-                getASTContext().getCanonicalType(record_qual_type)),
-            clang::SourceLocation()),
-        method_qual_type,
-        nullptr, // TypeSourceInfo *
-        explicit_spec, is_inline, is_artificial, CSK_unspecified);
-    cxx_method_decl = cxx_ctor_decl;
-  } else {
-    clang::StorageClass SC = is_static ? clang::SC_Static : clang::SC_None;
-    clang::OverloadedOperatorKind op_kind = clang::NUM_OVERLOADED_OPERATORS;
-
-    if (IsOperator(name, op_kind)) {
-      if (op_kind != clang::NUM_OVERLOADED_OPERATORS) {
-        // Check the number of operator parameters. Sometimes we have seen bad
-        // DWARF that doesn't correctly describe operators and if we try to
-        // create a method and add it to the class, clang will assert and
-        // crash, so we need to make sure things are acceptable.
-        const bool is_method = true;
-        if (!ClangASTContext::CheckOverloadedOperatorKindParameterCount(
-                is_method, op_kind, num_params))
-          return nullptr;
-        cxx_method_decl = clang::CXXMethodDecl::Create(
-            getASTContext(), cxx_record_decl, clang::SourceLocation(),
-            clang::DeclarationNameInfo(
-                getASTContext().DeclarationNames.getCXXOperatorName(op_kind),
-                clang::SourceLocation()),
-            method_qual_type,
-            nullptr, // TypeSourceInfo *
-            SC, is_inline, CSK_unspecified, clang::SourceLocation());
-      } else if (num_params == 0) {
-        // Conversion operators don't take params...
-        cxx_method_decl = clang::CXXConversionDecl::Create(
-            getASTContext(), cxx_record_decl, clang::SourceLocation(),
-            clang::DeclarationNameInfo(
-                getASTContext().DeclarationNames.getCXXConversionFunctionName(
-                    getASTContext().getCanonicalType(
-                        function_type->getReturnType())),
-                clang::SourceLocation()),
-            method_qual_type,
-            nullptr, // TypeSourceInfo *
-            is_inline, explicit_spec, CSK_unspecified, clang::SourceLocation());
-      }
-    }
-
-    if (cxx_method_decl == nullptr) {
-      cxx_method_decl = clang::CXXMethodDecl::Create(
-          getASTContext(), cxx_record_decl, clang::SourceLocation(),
-          clang::DeclarationNameInfo(decl_name, clang::SourceLocation()),
-          method_qual_type,
-          nullptr, // TypeSourceInfo *
-          SC, is_inline, CSK_unspecified, clang::SourceLocation());
-    }
-  }
-
-  clang::AccessSpecifier access_specifier =
-      ClangASTContext::ConvertAccessTypeToAccessSpecifier(access);
-
-  cxx_method_decl->setAccess(access_specifier);
-  cxx_method_decl->setVirtualAsWritten(is_virtual);
-
-  if (is_attr_used)
-    cxx_method_decl->addAttr(clang::UsedAttr::CreateImplicit(getASTContext()));
-
-  if (mangled_name != nullptr) {
-    cxx_method_decl->addAttr(clang::AsmLabelAttr::CreateImplicit(
-        getASTContext(), mangled_name, /*literal=*/false));
-  }
-
-  // Populate the method decl with parameter decls
-
-  llvm::SmallVector<clang::ParmVarDecl *, 12> params;
-
-  for (unsigned param_index = 0; param_index < num_params; ++param_index) {
-    params.push_back(clang::ParmVarDecl::Create(
-        getASTContext(), cxx_method_decl, clang::SourceLocation(),
-        clang::SourceLocation(),
-        nullptr, // anonymous
-        method_function_prototype->getParamType(param_index), nullptr,
-        clang::SC_None, nullptr));
-  }
-
-  cxx_method_decl->setParams(llvm::ArrayRef<clang::ParmVarDecl *>(params));
-
-  cxx_record_decl->addDecl(cxx_method_decl);
-
-  // Sometimes the debug info will mention a constructor (default/copy/move),
-  // destructor, or assignment operator (copy/move) but there won't be any
-  // version of this in the code. So we check if the function was artificially
-  // generated and if it is trivial and this lets the compiler/backend know
-  // that it can inline the IR for these when it needs to and we can avoid a
-  // "missing function" error when running expressions.
-
-  if (is_artificial) {
-    if (cxx_ctor_decl && ((cxx_ctor_decl->isDefaultConstructor() &&
-                           cxx_record_decl->hasTrivialDefaultConstructor()) ||
-                          (cxx_ctor_decl->isCopyConstructor() &&
-                           cxx_record_decl->hasTrivialCopyConstructor()) ||
-                          (cxx_ctor_decl->isMoveConstructor() &&
-                           cxx_record_decl->hasTrivialMoveConstructor()))) {
-      cxx_ctor_decl->setDefaulted();
-      cxx_ctor_decl->setTrivial(true);
-    } else if (cxx_dtor_decl) {
-      if (cxx_record_decl->hasTrivialDestructor()) {
-        cxx_dtor_decl->setDefaulted();
-        cxx_dtor_decl->setTrivial(true);
-      }
-    } else if ((cxx_method_decl->isCopyAssignmentOperator() &&
-                cxx_record_decl->hasTrivialCopyAssignment()) ||
-               (cxx_method_decl->isMoveAssignmentOperator() &&
-                cxx_record_decl->hasTrivialMoveAssignment())) {
-      cxx_method_decl->setDefaulted();
-      cxx_method_decl->setTrivial(true);
-    }
-  }
-
-#ifdef LLDB_CONFIGURATION_DEBUG
-  VerifyDecl(cxx_method_decl);
-#endif
-
-  return cxx_method_decl;
-}
-
-void ClangASTContext::AddMethodOverridesForCXXRecordType(
-    lldb::opaque_compiler_type_t type) {
-  if (auto *record = GetAsCXXRecordDecl(type))
-    for (auto *method : record->methods())
-      addOverridesForMethod(method);
-}
-
-#pragma mark C++ Base Classes
-
-std::unique_ptr<clang::CXXBaseSpecifier>
-ClangASTContext::CreateBaseClassSpecifier(lldb::opaque_compiler_type_t type,
-                                          AccessType access, bool is_virtual,
-                                          bool base_of_class) {
-  if (!type)
-    return nullptr;
-
-  return std::make_unique<clang::CXXBaseSpecifier>(
-      clang::SourceRange(), is_virtual, base_of_class,
-      ClangASTContext::ConvertAccessTypeToAccessSpecifier(access),
-      getASTContext().getTrivialTypeSourceInfo(GetQualType(type)),
-      clang::SourceLocation());
-}
-
-bool ClangASTContext::TransferBaseClasses(
-    lldb::opaque_compiler_type_t type,
-    std::vector<std::unique_ptr<clang::CXXBaseSpecifier>> bases) {
-  if (!type)
-    return false;
-  clang::CXXRecordDecl *cxx_record_decl = GetAsCXXRecordDecl(type);
-  if (!cxx_record_decl)
-    return false;
-  std::vector<clang::CXXBaseSpecifier *> raw_bases;
-  raw_bases.reserve(bases.size());
-
-  // Clang will make a copy of them, so it's ok that we pass pointers that we're
-  // about to destroy.
-  for (auto &b : bases)
-    raw_bases.push_back(b.get());
-  cxx_record_decl->setBases(raw_bases.data(), raw_bases.size());
-  return true;
-}
-
-bool ClangASTContext::SetObjCSuperClass(
-    const CompilerType &type, const CompilerType &superclass_clang_type) {
-  ClangASTContext *ast =
-      llvm::dyn_cast_or_null<ClangASTContext>(type.GetTypeSystem());
-  if (!ast)
-    return false;
-  clang::ASTContext &clang_ast = ast->getASTContext();
-
-  if (type && superclass_clang_type.IsValid() &&
-      superclass_clang_type.GetTypeSystem() == type.GetTypeSystem()) {
-    clang::ObjCInterfaceDecl *class_interface_decl =
-        GetAsObjCInterfaceDecl(type);
-    clang::ObjCInterfaceDecl *super_interface_decl =
-        GetAsObjCInterfaceDecl(superclass_clang_type);
-    if (class_interface_decl && super_interface_decl) {
-      class_interface_decl->setSuperClass(clang_ast.getTrivialTypeSourceInfo(
-          clang_ast.getObjCInterfaceType(super_interface_decl)));
-      return true;
-    }
-  }
-  return false;
-}
-
-bool ClangASTContext::AddObjCClassProperty(
-    const CompilerType &type, const char *property_name,
-    const CompilerType &property_clang_type, clang::ObjCIvarDecl *ivar_decl,
-    const char *property_setter_name, const char *property_getter_name,
-    uint32_t property_attributes, ClangASTMetadata *metadata) {
-  if (!type || !property_clang_type.IsValid() || property_name == nullptr ||
-      property_name[0] == '\0')
-    return false;
-  ClangASTContext *ast = llvm::dyn_cast<ClangASTContext>(type.GetTypeSystem());
-  if (!ast)
-    return false;
-  clang::ASTContext &clang_ast = ast->getASTContext();
-
-  clang::ObjCInterfaceDecl *class_interface_decl = GetAsObjCInterfaceDecl(type);
-  if (!class_interface_decl)
-    return false;
-
-  CompilerType property_clang_type_to_access;
-
-  if (property_clang_type.IsValid())
-    property_clang_type_to_access = property_clang_type;
-  else if (ivar_decl)
-    property_clang_type_to_access = ast->GetType(ivar_decl->getType());
-
-  if (!class_interface_decl || !property_clang_type_to_access.IsValid())
-    return false;
-
-  clang::TypeSourceInfo *prop_type_source;
-  if (ivar_decl)
-    prop_type_source = clang_ast.getTrivialTypeSourceInfo(ivar_decl->getType());
-  else
-    prop_type_source = clang_ast.getTrivialTypeSourceInfo(
-        ClangUtil::GetQualType(property_clang_type));
-
-  clang::ObjCPropertyDecl *property_decl = clang::ObjCPropertyDecl::Create(
-      clang_ast, class_interface_decl,
-      clang::SourceLocation(), // Source Location
-      &clang_ast.Idents.get(property_name),
-      clang::SourceLocation(), // Source Location for AT
-      clang::SourceLocation(), // Source location for (
-      ivar_decl ? ivar_decl->getType()
-                : ClangUtil::GetQualType(property_clang_type),
-      prop_type_source);
-
-  if (!property_decl)
-    return false;
-
-  if (metadata)
-    ast->SetMetadata(property_decl, *metadata);
-
-  class_interface_decl->addDecl(property_decl);
-
-  clang::Selector setter_sel, getter_sel;
-
-  if (property_setter_name) {
-    std::string property_setter_no_colon(property_setter_name,
-                                         strlen(property_setter_name) - 1);
-    clang::IdentifierInfo *setter_ident =
-        &clang_ast.Idents.get(property_setter_no_colon);
-    setter_sel = clang_ast.Selectors.getSelector(1, &setter_ident);
-  } else if (!(property_attributes & DW_APPLE_PROPERTY_readonly)) {
-    std::string setter_sel_string("set");
-    setter_sel_string.push_back(::toupper(property_name[0]));
-    setter_sel_string.append(&property_name[1]);
-    clang::IdentifierInfo *setter_ident =
-        &clang_ast.Idents.get(setter_sel_string);
-    setter_sel = clang_ast.Selectors.getSelector(1, &setter_ident);
-  }
-  property_decl->setSetterName(setter_sel);
-  property_decl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_setter);
-
-  if (property_getter_name != nullptr) {
-    clang::IdentifierInfo *getter_ident =
-        &clang_ast.Idents.get(property_getter_name);
-    getter_sel = clang_ast.Selectors.getSelector(0, &getter_ident);
-  } else {
-    clang::IdentifierInfo *getter_ident = &clang_ast.Idents.get(property_name);
-    getter_sel = clang_ast.Selectors.getSelector(0, &getter_ident);
-  }
-  property_decl->setGetterName(getter_sel);
-  property_decl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_getter);
-
-  if (ivar_decl)
-    property_decl->setPropertyIvarDecl(ivar_decl);
-
-  if (property_attributes & DW_APPLE_PROPERTY_readonly)
-    property_decl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_readonly);
-  if (property_attributes & DW_APPLE_PROPERTY_readwrite)
-    property_decl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_readwrite);
-  if (property_attributes & DW_APPLE_PROPERTY_assign)
-    property_decl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_assign);
-  if (property_attributes & DW_APPLE_PROPERTY_retain)
-    property_decl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_retain);
-  if (property_attributes & DW_APPLE_PROPERTY_copy)
-    property_decl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_copy);
-  if (property_attributes & DW_APPLE_PROPERTY_nonatomic)
-    property_decl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_nonatomic);
-  if (property_attributes & ObjCPropertyDecl::OBJC_PR_nullability)
-    property_decl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_nullability);
-  if (property_attributes & ObjCPropertyDecl::OBJC_PR_null_resettable)
-    property_decl->setPropertyAttributes(
-        ObjCPropertyDecl::OBJC_PR_null_resettable);
-  if (property_attributes & ObjCPropertyDecl::OBJC_PR_class)
-    property_decl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_class);
-
-  const bool isInstance =
-      (property_attributes & ObjCPropertyDecl::OBJC_PR_class) == 0;
-
-  clang::ObjCMethodDecl *getter = nullptr;
-  if (!getter_sel.isNull())
-    getter = isInstance ? class_interface_decl->lookupInstanceMethod(getter_sel)
-                        : class_interface_decl->lookupClassMethod(getter_sel);
-  if (!getter_sel.isNull() && !getter) {
-    const bool isVariadic = false;
-    const bool isPropertyAccessor = false;
-    const bool isSynthesizedAccessorStub = false;
-    const bool isImplicitlyDeclared = true;
-    const bool isDefined = false;
-    const clang::ObjCMethodDecl::ImplementationControl impControl =
-        clang::ObjCMethodDecl::None;
-    const bool HasRelatedResultType = false;
-
-    getter = clang::ObjCMethodDecl::Create(
-        clang_ast, clang::SourceLocation(), clang::SourceLocation(), getter_sel,
-        ClangUtil::GetQualType(property_clang_type_to_access), nullptr,
-        class_interface_decl, isInstance, isVariadic, isPropertyAccessor,
-        isSynthesizedAccessorStub, isImplicitlyDeclared, isDefined, impControl,
-        HasRelatedResultType);
-
-    if (getter) {
-      if (metadata)
-        ast->SetMetadata(getter, *metadata);
-
-      getter->setMethodParams(clang_ast, llvm::ArrayRef<clang::ParmVarDecl *>(),
-                              llvm::ArrayRef<clang::SourceLocation>());
-      class_interface_decl->addDecl(getter);
-    }
-  }
-  if (getter) {
-    getter->setPropertyAccessor(true);
-    property_decl->setGetterMethodDecl(getter);
-  }
-
-  clang::ObjCMethodDecl *setter = nullptr;
-    setter = isInstance ? class_interface_decl->lookupInstanceMethod(setter_sel)
-                        : class_interface_decl->lookupClassMethod(setter_sel);
-  if (!setter_sel.isNull() && !setter) {
-    clang::QualType result_type = clang_ast.VoidTy;
-    const bool isVariadic = false;
-    const bool isPropertyAccessor = true;
-    const bool isSynthesizedAccessorStub = false;
-    const bool isImplicitlyDeclared = true;
-    const bool isDefined = false;
-    const clang::ObjCMethodDecl::ImplementationControl impControl =
-        clang::ObjCMethodDecl::None;
-    const bool HasRelatedResultType = false;
-
-    setter = clang::ObjCMethodDecl::Create(
-        clang_ast, clang::SourceLocation(), clang::SourceLocation(), setter_sel,
-        result_type, nullptr, class_interface_decl, isInstance, isVariadic,
-        isPropertyAccessor, isSynthesizedAccessorStub, isImplicitlyDeclared,
-        isDefined, impControl, HasRelatedResultType);
-
-    if (setter) {
-      if (metadata)
-        ast->SetMetadata(setter, *metadata);
-
-      llvm::SmallVector<clang::ParmVarDecl *, 1> params;
-      params.push_back(clang::ParmVarDecl::Create(
-          clang_ast, setter, clang::SourceLocation(), clang::SourceLocation(),
-          nullptr, // anonymous
-          ClangUtil::GetQualType(property_clang_type_to_access), nullptr,
-          clang::SC_Auto, nullptr));
-
-      setter->setMethodParams(clang_ast,
-                              llvm::ArrayRef<clang::ParmVarDecl *>(params),
-                              llvm::ArrayRef<clang::SourceLocation>());
-
-      class_interface_decl->addDecl(setter);
-    }
-  }
-  if (setter) {
-    setter->setPropertyAccessor(true);
-    property_decl->setSetterMethodDecl(setter);
-  }
-
-  return true;
-}
-
-bool ClangASTContext::IsObjCClassTypeAndHasIVars(const CompilerType &type,
-                                                 bool check_superclass) {
-  clang::ObjCInterfaceDecl *class_interface_decl = GetAsObjCInterfaceDecl(type);
-  if (class_interface_decl)
-    return ObjCDeclHasIVars(class_interface_decl, check_superclass);
-  return false;
-}
-
-clang::ObjCMethodDecl *ClangASTContext::AddMethodToObjCObjectType(
-    const CompilerType &type,
-    const char *name, // the full symbol name as seen in the symbol table
-                      // (lldb::opaque_compiler_type_t type, "-[NString
-                      // stringWithCString:]")
-    const CompilerType &method_clang_type, lldb::AccessType access,
-    bool is_artificial, bool is_variadic, bool is_objc_direct_call) {
-  if (!type || !method_clang_type.IsValid())
-    return nullptr;
-
-  clang::ObjCInterfaceDecl *class_interface_decl = GetAsObjCInterfaceDecl(type);
-
-  if (class_interface_decl == nullptr)
-    return nullptr;
-  ClangASTContext *lldb_ast =
-      llvm::dyn_cast<ClangASTContext>(type.GetTypeSystem());
-  if (lldb_ast == nullptr)
-    return nullptr;
-  clang::ASTContext &ast = lldb_ast->getASTContext();
-
-  const char *selector_start = ::strchr(name, ' ');
-  if (selector_start == nullptr)
-    return nullptr;
-
-  selector_start++;
-  llvm::SmallVector<clang::IdentifierInfo *, 12> selector_idents;
-
-  size_t len = 0;
-  const char *start;
-  // printf ("name = '%s'\n", name);
-
-  unsigned num_selectors_with_args = 0;
-  for (start = selector_start; start && *start != '\0' && *start != ']';
-       start += len) {
-    len = ::strcspn(start, ":]");
-    bool has_arg = (start[len] == ':');
-    if (has_arg)
-      ++num_selectors_with_args;
-    selector_idents.push_back(&ast.Idents.get(llvm::StringRef(start, len)));
-    if (has_arg)
-      len += 1;
-  }
-
-  if (selector_idents.size() == 0)
-    return nullptr;
-
-  clang::Selector method_selector = ast.Selectors.getSelector(
-      num_selectors_with_args ? selector_idents.size() : 0,
-      selector_idents.data());
-
-  clang::QualType method_qual_type(ClangUtil::GetQualType(method_clang_type));
-
-  // Populate the method decl with parameter decls
-  const clang::Type *method_type(method_qual_type.getTypePtr());
-
-  if (method_type == nullptr)
-    return nullptr;
-
-  const clang::FunctionProtoType *method_function_prototype(
-      llvm::dyn_cast<clang::FunctionProtoType>(method_type));
-
-  if (!method_function_prototype)
-    return nullptr;
-
-  const bool isInstance = (name[0] == '-');
-  const bool isVariadic = is_variadic;
-  const bool isPropertyAccessor = false;
-  const bool isSynthesizedAccessorStub = false;
-  /// Force this to true because we don't have source locations.
-  const bool isImplicitlyDeclared = true;
-  const bool isDefined = false;
-  const clang::ObjCMethodDecl::ImplementationControl impControl =
-      clang::ObjCMethodDecl::None;
-  const bool HasRelatedResultType = false;
-
-  const unsigned num_args = method_function_prototype->getNumParams();
-
-  if (num_args != num_selectors_with_args)
-    return nullptr; // some debug information is corrupt.  We are not going to
-                    // deal with it.
-
-  clang::ObjCMethodDecl *objc_method_decl = clang::ObjCMethodDecl::Create(
-      ast,
-      clang::SourceLocation(), // beginLoc,
-      clang::SourceLocation(), // endLoc,
-      method_selector, method_function_prototype->getReturnType(),
-      nullptr, // TypeSourceInfo *ResultTInfo,
-      lldb_ast->GetDeclContextForType(ClangUtil::GetQualType(type)), isInstance,
-      isVariadic, isPropertyAccessor, isSynthesizedAccessorStub,
-      isImplicitlyDeclared, isDefined, impControl, HasRelatedResultType);
-
-  if (objc_method_decl == nullptr)
-    return nullptr;
-
-  if (num_args > 0) {
-    llvm::SmallVector<clang::ParmVarDecl *, 12> params;
-
-    for (unsigned param_index = 0; param_index < num_args; ++param_index) {
-      params.push_back(clang::ParmVarDecl::Create(
-          ast, objc_method_decl, clang::SourceLocation(),
-          clang::SourceLocation(),
-          nullptr, // anonymous
-          method_function_prototype->getParamType(param_index), nullptr,
-          clang::SC_Auto, nullptr));
-    }
-
-    objc_method_decl->setMethodParams(
-        ast, llvm::ArrayRef<clang::ParmVarDecl *>(params),
-        llvm::ArrayRef<clang::SourceLocation>());
-  }
-
-  if (is_objc_direct_call) {
-    // Add a the objc_direct attribute to the declaration we generate that
-    // we generate a direct method call for this ObjCMethodDecl.
-    objc_method_decl->addAttr(
-        clang::ObjCDirectAttr::CreateImplicit(ast, SourceLocation()));
-    // Usually Sema is creating implicit parameters (e.g., self) when it
-    // parses the method. We don't have a parsing Sema when we build our own
-    // AST here so we manually need to create these implicit parameters to
-    // make the direct call code generation happy.
-    objc_method_decl->createImplicitParams(ast, class_interface_decl);
-  }
-
-  class_interface_decl->addDecl(objc_method_decl);
-
-#ifdef LLDB_CONFIGURATION_DEBUG
-  VerifyDecl(objc_method_decl);
-#endif
-
-  return objc_method_decl;
-}
-
-bool ClangASTContext::SetHasExternalStorage(lldb::opaque_compiler_type_t type,
-                                            bool has_extern) {
-  if (!type)
-    return false;
-
-  clang::QualType qual_type(RemoveWrappingTypes(GetCanonicalQualType(type)));
-
-  const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-  switch (type_class) {
-  case clang::Type::Record: {
-    clang::CXXRecordDecl *cxx_record_decl = qual_type->getAsCXXRecordDecl();
-    if (cxx_record_decl) {
-      cxx_record_decl->setHasExternalLexicalStorage(has_extern);
-      cxx_record_decl->setHasExternalVisibleStorage(has_extern);
-      return true;
-    }
-  } break;
-
-  case clang::Type::Enum: {
-    clang::EnumDecl *enum_decl =
-        llvm::cast<clang::EnumType>(qual_type)->getDecl();
-    if (enum_decl) {
-      enum_decl->setHasExternalLexicalStorage(has_extern);
-      enum_decl->setHasExternalVisibleStorage(has_extern);
-      return true;
-    }
-  } break;
-
-  case clang::Type::ObjCObject:
-  case clang::Type::ObjCInterface: {
-    const clang::ObjCObjectType *objc_class_type =
-        llvm::dyn_cast<clang::ObjCObjectType>(qual_type.getTypePtr());
-    assert(objc_class_type);
-    if (objc_class_type) {
-      clang::ObjCInterfaceDecl *class_interface_decl =
-          objc_class_type->getInterface();
-
-      if (class_interface_decl) {
-        class_interface_decl->setHasExternalLexicalStorage(has_extern);
-        class_interface_decl->setHasExternalVisibleStorage(has_extern);
-        return true;
-      }
-    }
-  } break;
-
-  default:
-    break;
-  }
-  return false;
-}
-
-#pragma mark TagDecl
-
-bool ClangASTContext::StartTagDeclarationDefinition(const CompilerType &type) {
-  clang::QualType qual_type(ClangUtil::GetQualType(type));
-  if (!qual_type.isNull()) {
-    const clang::TagType *tag_type = qual_type->getAs<clang::TagType>();
-    if (tag_type) {
-      clang::TagDecl *tag_decl = tag_type->getDecl();
-      if (tag_decl) {
-        tag_decl->startDefinition();
-        return true;
-      }
-    }
-
-    const clang::ObjCObjectType *object_type =
-        qual_type->getAs<clang::ObjCObjectType>();
-    if (object_type) {
-      clang::ObjCInterfaceDecl *interface_decl = object_type->getInterface();
-      if (interface_decl) {
-        interface_decl->startDefinition();
-        return true;
-      }
-    }
-  }
-  return false;
-}
-
-bool ClangASTContext::CompleteTagDeclarationDefinition(
-    const CompilerType &type) {
-  clang::QualType qual_type(ClangUtil::GetQualType(type));
-  if (qual_type.isNull())
-    return false;
-
-  // Make sure we use the same methodology as
-  // ClangASTContext::StartTagDeclarationDefinition() as to how we start/end
-  // the definition.
-  const clang::TagType *tag_type = qual_type->getAs<clang::TagType>();
-  if (tag_type) {
-    clang::TagDecl *tag_decl = tag_type->getDecl();
-
-    if (auto *cxx_record_decl = llvm::dyn_cast<CXXRecordDecl>(tag_decl)) {
-      if (!cxx_record_decl->isCompleteDefinition())
-        cxx_record_decl->completeDefinition();
-      cxx_record_decl->setHasLoadedFieldsFromExternalStorage(true);
-      cxx_record_decl->setHasExternalLexicalStorage(false);
-      cxx_record_decl->setHasExternalVisibleStorage(false);
-      return true;
-    }
-  }
-
-  const clang::EnumType *enutype = qual_type->getAs<clang::EnumType>();
-
-  if (!enutype)
-    return false;
-  clang::EnumDecl *enum_decl = enutype->getDecl();
-
-  if (enum_decl->isCompleteDefinition())
-    return true;
-
-  ClangASTContext *lldb_ast =
-      llvm::dyn_cast<ClangASTContext>(type.GetTypeSystem());
-  if (lldb_ast == nullptr)
-    return false;
-  clang::ASTContext &ast = lldb_ast->getASTContext();
-
-  /// TODO This really needs to be fixed.
-
-  QualType integer_type(enum_decl->getIntegerType());
-  if (!integer_type.isNull()) {
-    unsigned NumPositiveBits = 1;
-    unsigned NumNegativeBits = 0;
-
-    clang::QualType promotion_qual_type;
-    // If the enum integer type is less than an integer in bit width,
-    // then we must promote it to an integer size.
-    if (ast.getTypeSize(enum_decl->getIntegerType()) <
-        ast.getTypeSize(ast.IntTy)) {
-      if (enum_decl->getIntegerType()->isSignedIntegerType())
-        promotion_qual_type = ast.IntTy;
-      else
-        promotion_qual_type = ast.UnsignedIntTy;
-    } else
-      promotion_qual_type = enum_decl->getIntegerType();
-
-    enum_decl->completeDefinition(enum_decl->getIntegerType(),
-                                  promotion_qual_type, NumPositiveBits,
-                                  NumNegativeBits);
-  }
-  return true;
-}
-
-clang::EnumConstantDecl *ClangASTContext::AddEnumerationValueToEnumerationType(
-    const CompilerType &enum_type, const Declaration &decl, const char *name,
-    const llvm::APSInt &value) {
-
-  if (!enum_type || ConstString(name).IsEmpty())
-    return nullptr;
-
-  lldbassert(enum_type.GetTypeSystem() == static_cast<TypeSystem *>(this));
-
-  lldb::opaque_compiler_type_t enum_opaque_compiler_type =
-      enum_type.GetOpaqueQualType();
-
-  if (!enum_opaque_compiler_type)
-    return nullptr;
-
-  clang::QualType enum_qual_type(
-      GetCanonicalQualType(enum_opaque_compiler_type));
-
-  const clang::Type *clang_type = enum_qual_type.getTypePtr();
-
-  if (!clang_type)
-    return nullptr;
-
-  const clang::EnumType *enutype = llvm::dyn_cast<clang::EnumType>(clang_type);
-
-  if (!enutype)
-    return nullptr;
-
-  clang::EnumConstantDecl *enumerator_decl = clang::EnumConstantDecl::Create(
-      getASTContext(), enutype->getDecl(), clang::SourceLocation(),
-      name ? &getASTContext().Idents.get(name) : nullptr, // Identifier
-      clang::QualType(enutype, 0), nullptr, value);
-
-  if (!enumerator_decl)
-    return nullptr;
-
-  enutype->getDecl()->addDecl(enumerator_decl);
-
-#ifdef LLDB_CONFIGURATION_DEBUG
-  VerifyDecl(enumerator_decl);
-#endif
-
-  return enumerator_decl;
-}
-
-clang::EnumConstantDecl *ClangASTContext::AddEnumerationValueToEnumerationType(
-    const CompilerType &enum_type, const Declaration &decl, const char *name,
-    int64_t enum_value, uint32_t enum_value_bit_size) {
-  CompilerType underlying_type =
-      GetEnumerationIntegerType(enum_type.GetOpaqueQualType());
-  bool is_signed = false;
-  underlying_type.IsIntegerType(is_signed);
-
-  llvm::APSInt value(enum_value_bit_size, is_signed);
-  value = enum_value;
-
-  return AddEnumerationValueToEnumerationType(enum_type, decl, name, value);
-}
-
-CompilerType
-ClangASTContext::GetEnumerationIntegerType(lldb::opaque_compiler_type_t type) {
-  clang::QualType enum_qual_type(GetCanonicalQualType(type));
-  const clang::Type *clang_type = enum_qual_type.getTypePtr();
-  if (clang_type) {
-    const clang::EnumType *enutype =
-        llvm::dyn_cast<clang::EnumType>(clang_type);
-    if (enutype) {
-      clang::EnumDecl *enum_decl = enutype->getDecl();
-      if (enum_decl)
-        return GetType(enum_decl->getIntegerType());
-    }
-  }
-  return CompilerType();
-}
-
-CompilerType
-ClangASTContext::CreateMemberPointerType(const CompilerType &type,
-                                         const CompilerType &pointee_type) {
-  if (type && pointee_type.IsValid() &&
-      type.GetTypeSystem() == pointee_type.GetTypeSystem()) {
-    ClangASTContext *ast =
-        llvm::dyn_cast<ClangASTContext>(type.GetTypeSystem());
-    if (!ast)
-      return CompilerType();
-    return ast->GetType(ast->getASTContext().getMemberPointerType(
-        ClangUtil::GetQualType(pointee_type),
-        ClangUtil::GetQualType(type).getTypePtr()));
-  }
-  return CompilerType();
-}
-
-// Dumping types
-#define DEPTH_INCREMENT 2
-
-#ifndef NDEBUG
-LLVM_DUMP_METHOD void
-ClangASTContext::dump(lldb::opaque_compiler_type_t type) const {
-  if (!type)
-    return;
-  clang::QualType qual_type(GetQualType(type));
-  qual_type.dump();
-}
-#endif
-
-void ClangASTContext::Dump(Stream &s) {
-  Decl *tu = Decl::castFromDeclContext(GetTranslationUnitDecl());
-  tu->dump(s.AsRawOstream());
-}
-
-void ClangASTContext::DumpFromSymbolFile(Stream &s,
-                                         llvm::StringRef symbol_name) {
-  SymbolFile *symfile = GetSymbolFile();
-
-  if (!symfile)
-    return;
-
-  lldb_private::TypeList type_list;
-  symfile->GetTypes(nullptr, eTypeClassAny, type_list);
-  size_t ntypes = type_list.GetSize();
-
-  for (size_t i = 0; i < ntypes; ++i) {
-    TypeSP type = type_list.GetTypeAtIndex(i);
-
-    if (!symbol_name.empty())
-      if (symbol_name != type->GetName().GetStringRef())
-        continue;
-
-    s << type->GetName().AsCString() << "\n";
-
-    CompilerType full_type = type->GetFullCompilerType();
-    if (clang::TagDecl *tag_decl = GetAsTagDecl(full_type)) {
-      tag_decl->dump(s.AsRawOstream());
-      continue;
-    }
-    if (clang::TypedefNameDecl *typedef_decl = GetAsTypedefDecl(full_type)) {
-      typedef_decl->dump(s.AsRawOstream());
-      continue;
-    }
-    if (auto *objc_obj = llvm::dyn_cast<clang::ObjCObjectType>(
-            ClangUtil::GetQualType(full_type).getTypePtr())) {
-      if (clang::ObjCInterfaceDecl *interface_decl = objc_obj->getInterface()) {
-        interface_decl->dump(s.AsRawOstream());
-        continue;
-      }
-    }
-    GetCanonicalQualType(full_type.GetOpaqueQualType()).dump(s.AsRawOstream());
-  }
-}
-
-void ClangASTContext::DumpValue(
-    lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx, Stream *s,
-    lldb::Format format, const lldb_private::DataExtractor &data,
-    lldb::offset_t data_byte_offset, size_t data_byte_size,
-    uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset, bool show_types,
-    bool show_summary, bool verbose, uint32_t depth) {
-  if (!type)
-    return;
-
-  clang::QualType qual_type(GetQualType(type));
-  switch (qual_type->getTypeClass()) {
-  case clang::Type::Record:
-    if (GetCompleteType(type)) {
-      const clang::RecordType *record_type =
-          llvm::cast<clang::RecordType>(qual_type.getTypePtr());
-      const clang::RecordDecl *record_decl = record_type->getDecl();
-      assert(record_decl);
-      uint32_t field_bit_offset = 0;
-      uint32_t field_byte_offset = 0;
-      const clang::ASTRecordLayout &record_layout =
-          getASTContext().getASTRecordLayout(record_decl);
-      uint32_t child_idx = 0;
-
-      const clang::CXXRecordDecl *cxx_record_decl =
-          llvm::dyn_cast<clang::CXXRecordDecl>(record_decl);
-      if (cxx_record_decl) {
-        // We might have base classes to print out first
-        clang::CXXRecordDecl::base_class_const_iterator base_class,
-            base_class_end;
-        for (base_class = cxx_record_decl->bases_begin(),
-            base_class_end = cxx_record_decl->bases_end();
-             base_class != base_class_end; ++base_class) {
-          const clang::CXXRecordDecl *base_class_decl =
-              llvm::cast<clang::CXXRecordDecl>(
-                  base_class->getType()->getAs<clang::RecordType>()->getDecl());
-
-          // Skip empty base classes
-          if (!verbose && !ClangASTContext::RecordHasFields(base_class_decl))
-            continue;
-
-          if (base_class->isVirtual())
-            field_bit_offset =
-                record_layout.getVBaseClassOffset(base_class_decl)
-                    .getQuantity() *
-                8;
-          else
-            field_bit_offset = record_layout.getBaseClassOffset(base_class_decl)
-                                   .getQuantity() *
-                               8;
-          field_byte_offset = field_bit_offset / 8;
-          assert(field_bit_offset % 8 == 0);
-          if (child_idx == 0)
-            s->PutChar('{');
-          else
-            s->PutChar(',');
-
-          clang::QualType base_class_qual_type = base_class->getType();
-          std::string base_class_type_name(base_class_qual_type.getAsString());
-
-          // Indent and print the base class type name
-          s->Format("\n{0}{1}", llvm::fmt_repeat(" ", depth + DEPTH_INCREMENT),
-                    base_class_type_name);
-
-          clang::TypeInfo base_class_type_info =
-              getASTContext().getTypeInfo(base_class_qual_type);
-
-          // Dump the value of the member
-          CompilerType base_clang_type = GetType(base_class_qual_type);
-          base_clang_type.DumpValue(
-              exe_ctx,
-              s, // Stream to dump to
-              base_clang_type
-                  .GetFormat(), // The format with which to display the member
-              data, // Data buffer containing all bytes for this type
-              data_byte_offset + field_byte_offset, // Offset into "data" where
-                                                    // to grab value from
-              base_class_type_info.Width / 8, // Size of this type in bytes
-              0,                              // Bitfield bit size
-              0,                              // Bitfield bit offset
-              show_types,   // Boolean indicating if we should show the variable
-                            // types
-              show_summary, // Boolean indicating if we should show a summary
-                            // for the current type
-              verbose,      // Verbose output?
-              depth + DEPTH_INCREMENT); // Scope depth for any types that have
-                                        // children
-
-          ++child_idx;
-        }
-      }
-      uint32_t field_idx = 0;
-      clang::RecordDecl::field_iterator field, field_end;
-      for (field = record_decl->field_begin(),
-          field_end = record_decl->field_end();
-           field != field_end; ++field, ++field_idx, ++child_idx) {
-        // Print the starting squiggly bracket (if this is the first member) or
-        // comma (for member 2 and beyond) for the struct/union/class member.
-        if (child_idx == 0)
-          s->PutChar('{');
-        else
-          s->PutChar(',');
-
-        // Indent
-        s->Printf("\n%*s", depth + DEPTH_INCREMENT, "");
-
-        clang::QualType field_type = field->getType();
-        // Print the member type if requested
-        // Figure out the type byte size (field_type_info.first) and alignment
-        // (field_type_info.second) from the AST context.
-        clang::TypeInfo field_type_info =
-            getASTContext().getTypeInfo(field_type);
-        assert(field_idx < record_layout.getFieldCount());
-        // Figure out the field offset within the current struct/union/class
-        // type
-        field_bit_offset = record_layout.getFieldOffset(field_idx);
-        field_byte_offset = field_bit_offset / 8;
-        uint32_t field_bitfield_bit_size = 0;
-        uint32_t field_bitfield_bit_offset = 0;
-        if (FieldIsBitfield(*field, field_bitfield_bit_size))
-          field_bitfield_bit_offset = field_bit_offset % 8;
-
-        if (show_types) {
-          std::string field_type_name(field_type.getAsString());
-          if (field_bitfield_bit_size > 0)
-            s->Printf("(%s:%u) ", field_type_name.c_str(),
-                      field_bitfield_bit_size);
-          else
-            s->Printf("(%s) ", field_type_name.c_str());
-        }
-        // Print the member name and equal sign
-        s->Printf("%s = ", field->getNameAsString().c_str());
-
-        // Dump the value of the member
-        CompilerType field_clang_type = GetType(field_type);
-        field_clang_type.DumpValue(
-            exe_ctx,
-            s, // Stream to dump to
-            field_clang_type
-                .GetFormat(), // The format with which to display the member
-            data,             // Data buffer containing all bytes for this type
-            data_byte_offset + field_byte_offset, // Offset into "data" where to
-                                                  // grab value from
-            field_type_info.Width / 8,            // Size of this type in bytes
-            field_bitfield_bit_size,              // Bitfield bit size
-            field_bitfield_bit_offset,            // Bitfield bit offset
-            show_types,   // Boolean indicating if we should show the variable
-                          // types
-            show_summary, // Boolean indicating if we should show a summary for
-                          // the current type
-            verbose,      // Verbose output?
-            depth + DEPTH_INCREMENT); // Scope depth for any types that have
-                                      // children
-      }
-
-      // Indent the trailing squiggly bracket
-      if (child_idx > 0)
-        s->Printf("\n%*s}", depth, "");
-    }
-    return;
-
-  case clang::Type::Enum:
-    if (GetCompleteType(type)) {
-      const clang::EnumType *enutype =
-          llvm::cast<clang::EnumType>(qual_type.getTypePtr());
-      const clang::EnumDecl *enum_decl = enutype->getDecl();
-      assert(enum_decl);
-      clang::EnumDecl::enumerator_iterator enum_pos, enum_end_pos;
-      lldb::offset_t offset = data_byte_offset;
-      const int64_t enum_value = data.GetMaxU64Bitfield(
-          &offset, data_byte_size, bitfield_bit_size, bitfield_bit_offset);
-      for (enum_pos = enum_decl->enumerator_begin(),
-          enum_end_pos = enum_decl->enumerator_end();
-           enum_pos != enum_end_pos; ++enum_pos) {
-        if (enum_pos->getInitVal() == enum_value) {
-          s->Printf("%s", enum_pos->getNameAsString().c_str());
-          return;
-        }
-      }
-      // If we have gotten here we didn't get find the enumerator in the enum
-      // decl, so just print the integer.
-      s->Printf("%" PRIi64, enum_value);
-    }
-    return;
-
-  case clang::Type::ConstantArray: {
-    const clang::ConstantArrayType *array =
-        llvm::cast<clang::ConstantArrayType>(qual_type.getTypePtr());
-    bool is_array_of_characters = false;
-    clang::QualType element_qual_type = array->getElementType();
-
-    const clang::Type *canonical_type =
-        element_qual_type->getCanonicalTypeInternal().getTypePtr();
-    if (canonical_type)
-      is_array_of_characters = canonical_type->isCharType();
-
-    const uint64_t element_count = array->getSize().getLimitedValue();
-
-    clang::TypeInfo field_type_info =
-        getASTContext().getTypeInfo(element_qual_type);
-
-    uint32_t element_idx = 0;
-    uint32_t element_offset = 0;
-    uint64_t element_byte_size = field_type_info.Width / 8;
-    uint32_t element_stride = element_byte_size;
-
-    if (is_array_of_characters) {
-      s->PutChar('"');
-      DumpDataExtractor(data, s, data_byte_offset, lldb::eFormatChar,
-                        element_byte_size, element_count, UINT32_MAX,
-                        LLDB_INVALID_ADDRESS, 0, 0);
-      s->PutChar('"');
-      return;
-    } else {
-      CompilerType element_clang_type = GetType(element_qual_type);
-      lldb::Format element_format = element_clang_type.GetFormat();
-
-      for (element_idx = 0; element_idx < element_count; ++element_idx) {
-        // Print the starting squiggly bracket (if this is the first member) or
-        // comman (for member 2 and beyong) for the struct/union/class member.
-        if (element_idx == 0)
-          s->PutChar('{');
-        else
-          s->PutChar(',');
-
-        // Indent and print the index
-        s->Printf("\n%*s[%u] ", depth + DEPTH_INCREMENT, "", element_idx);
-
-        // Figure out the field offset within the current struct/union/class
-        // type
-        element_offset = element_idx * element_stride;
-
-        // Dump the value of the member
-        element_clang_type.DumpValue(
-            exe_ctx,
-            s,              // Stream to dump to
-            element_format, // The format with which to display the element
-            data,           // Data buffer containing all bytes for this type
-            data_byte_offset +
-                element_offset, // Offset into "data" where to grab value from
-            element_byte_size,  // Size of this type in bytes
-            0,                  // Bitfield bit size
-            0,                  // Bitfield bit offset
-            show_types,   // Boolean indicating if we should show the variable
-                          // types
-            show_summary, // Boolean indicating if we should show a summary for
-                          // the current type
-            verbose,      // Verbose output?
-            depth + DEPTH_INCREMENT); // Scope depth for any types that have
-                                      // children
-      }
-
-      // Indent the trailing squiggly bracket
-      if (element_idx > 0)
-        s->Printf("\n%*s}", depth, "");
-    }
-  }
-    return;
-
-  case clang::Type::Typedef: {
-    clang::QualType typedef_qual_type =
-        llvm::cast<clang::TypedefType>(qual_type)
-            ->getDecl()
-            ->getUnderlyingType();
-
-    CompilerType typedef_clang_type = GetType(typedef_qual_type);
-    lldb::Format typedef_format = typedef_clang_type.GetFormat();
-    clang::TypeInfo typedef_type_info =
-        getASTContext().getTypeInfo(typedef_qual_type);
-    uint64_t typedef_byte_size = typedef_type_info.Width / 8;
-
-    return typedef_clang_type.DumpValue(
-        exe_ctx,
-        s,                   // Stream to dump to
-        typedef_format,      // The format with which to display the element
-        data,                // Data buffer containing all bytes for this type
-        data_byte_offset,    // Offset into "data" where to grab value from
-        typedef_byte_size,   // Size of this type in bytes
-        bitfield_bit_size,   // Bitfield bit size
-        bitfield_bit_offset, // Bitfield bit offset
-        show_types,   // Boolean indicating if we should show the variable types
-        show_summary, // Boolean indicating if we should show a summary for the
-                      // current type
-        verbose,      // Verbose output?
-        depth);       // Scope depth for any types that have children
-  } break;
-
-  case clang::Type::Auto: {
-    clang::QualType elaborated_qual_type =
-        llvm::cast<clang::AutoType>(qual_type)->getDeducedType();
-    CompilerType elaborated_clang_type = GetType(elaborated_qual_type);
-    lldb::Format elaborated_format = elaborated_clang_type.GetFormat();
-    clang::TypeInfo elaborated_type_info =
-        getASTContext().getTypeInfo(elaborated_qual_type);
-    uint64_t elaborated_byte_size = elaborated_type_info.Width / 8;
-
-    return elaborated_clang_type.DumpValue(
-        exe_ctx,
-        s,                    // Stream to dump to
-        elaborated_format,    // The format with which to display the element
-        data,                 // Data buffer containing all bytes for this type
-        data_byte_offset,     // Offset into "data" where to grab value from
-        elaborated_byte_size, // Size of this type in bytes
-        bitfield_bit_size,    // Bitfield bit size
-        bitfield_bit_offset,  // Bitfield bit offset
-        show_types,   // Boolean indicating if we should show the variable types
-        show_summary, // Boolean indicating if we should show a summary for the
-                      // current type
-        verbose,      // Verbose output?
-        depth);       // Scope depth for any types that have children
-  } break;
-
-  case clang::Type::Elaborated: {
-    clang::QualType elaborated_qual_type =
-        llvm::cast<clang::ElaboratedType>(qual_type)->getNamedType();
-    CompilerType elaborated_clang_type = GetType(elaborated_qual_type);
-    lldb::Format elaborated_format = elaborated_clang_type.GetFormat();
-    clang::TypeInfo elaborated_type_info =
-        getASTContext().getTypeInfo(elaborated_qual_type);
-    uint64_t elaborated_byte_size = elaborated_type_info.Width / 8;
-
-    return elaborated_clang_type.DumpValue(
-        exe_ctx,
-        s,                    // Stream to dump to
-        elaborated_format,    // The format with which to display the element
-        data,                 // Data buffer containing all bytes for this type
-        data_byte_offset,     // Offset into "data" where to grab value from
-        elaborated_byte_size, // Size of this type in bytes
-        bitfield_bit_size,    // Bitfield bit size
-        bitfield_bit_offset,  // Bitfield bit offset
-        show_types,   // Boolean indicating if we should show the variable types
-        show_summary, // Boolean indicating if we should show a summary for the
-                      // current type
-        verbose,      // Verbose output?
-        depth);       // Scope depth for any types that have children
-  } break;
-
-  case clang::Type::Paren: {
-    clang::QualType desugar_qual_type =
-        llvm::cast<clang::ParenType>(qual_type)->desugar();
-    CompilerType desugar_clang_type = GetType(desugar_qual_type);
-
-    lldb::Format desugar_format = desugar_clang_type.GetFormat();
-    clang::TypeInfo desugar_type_info =
-        getASTContext().getTypeInfo(desugar_qual_type);
-    uint64_t desugar_byte_size = desugar_type_info.Width / 8;
-
-    return desugar_clang_type.DumpValue(
-        exe_ctx,
-        s,                   // Stream to dump to
-        desugar_format,      // The format with which to display the element
-        data,                // Data buffer containing all bytes for this type
-        data_byte_offset,    // Offset into "data" where to grab value from
-        desugar_byte_size,   // Size of this type in bytes
-        bitfield_bit_size,   // Bitfield bit size
-        bitfield_bit_offset, // Bitfield bit offset
-        show_types,   // Boolean indicating if we should show the variable types
-        show_summary, // Boolean indicating if we should show a summary for the
-                      // current type
-        verbose,      // Verbose output?
-        depth);       // Scope depth for any types that have children
-  } break;
-
-  default:
-    // We are down to a scalar type that we just need to display.
-    DumpDataExtractor(data, s, data_byte_offset, format, data_byte_size, 1,
-                      UINT32_MAX, LLDB_INVALID_ADDRESS, bitfield_bit_size,
-                      bitfield_bit_offset);
-
-    if (show_summary)
-      DumpSummary(type, exe_ctx, s, data, data_byte_offset, data_byte_size);
-    break;
-  }
-}
-
-static bool DumpEnumValue(const clang::QualType &qual_type, Stream *s,
-                          const DataExtractor &data, lldb::offset_t byte_offset,
-                          size_t byte_size, uint32_t bitfield_bit_offset,
-                          uint32_t bitfield_bit_size) {
-  const clang::EnumType *enutype =
-      llvm::cast<clang::EnumType>(qual_type.getTypePtr());
-  const clang::EnumDecl *enum_decl = enutype->getDecl();
-  assert(enum_decl);
-  lldb::offset_t offset = byte_offset;
-  const uint64_t enum_svalue = data.GetMaxS64Bitfield(
-      &offset, byte_size, bitfield_bit_size, bitfield_bit_offset);
-  bool can_be_bitfield = true;
-  uint64_t covered_bits = 0;
-  int num_enumerators = 0;
-
-  // Try to find an exact match for the value.
-  // At the same time, we're applying a heuristic to determine whether we want
-  // to print this enum as a bitfield. We're likely dealing with a bitfield if
-  // every enumrator is either a one bit value or a superset of the previous
-  // enumerators. Also 0 doesn't make sense when the enumerators are used as
-  // flags.
-  for (auto enumerator : enum_decl->enumerators()) {
-    uint64_t val = enumerator->getInitVal().getSExtValue();
-    val = llvm::SignExtend64(val, 8*byte_size);
-    if (llvm::countPopulation(val) != 1 && (val & ~covered_bits) != 0)
-      can_be_bitfield = false;
-    covered_bits |= val;
-    ++num_enumerators;
-    if (val == enum_svalue) {
-      // Found an exact match, that's all we need to do.
-      s->PutCString(enumerator->getNameAsString());
-      return true;
-    }
-  }
-
-  // Unsigned values make more sense for flags.
-  offset = byte_offset;
-  const uint64_t enum_uvalue = data.GetMaxU64Bitfield(
-      &offset, byte_size, bitfield_bit_size, bitfield_bit_offset);
-
-  // No exact match, but we don't think this is a bitfield. Print the value as
-  // decimal.
-  if (!can_be_bitfield) {
-    if (qual_type->isSignedIntegerOrEnumerationType())
-      s->Printf("%" PRIi64, enum_svalue);
-    else
-      s->Printf("%" PRIu64, enum_uvalue);
-    return true;
-  }
-
-  uint64_t remaining_value = enum_uvalue;
-  std::vector<std::pair<uint64_t, llvm::StringRef>> values;
-  values.reserve(num_enumerators);
-  for (auto enumerator : enum_decl->enumerators())
-    if (auto val = enumerator->getInitVal().getZExtValue())
-      values.emplace_back(val, enumerator->getName());
-
-  // Sort in reverse order of the number of the population count,  so that in
-  // `enum {A, B, ALL = A|B }` we visit ALL first. Use a stable sort so that
-  // A | C where A is declared before C is displayed in this order.
-  std::stable_sort(values.begin(), values.end(), [](const auto &a, const auto &b) {
-        return llvm::countPopulation(a.first) > llvm::countPopulation(b.first);
-      });
-
-  for (const auto &val : values) {
-    if ((remaining_value & val.first) != val.first)
-      continue;
-    remaining_value &= ~val.first;
-    s->PutCString(val.second);
-    if (remaining_value)
-      s->PutCString(" | ");
-  }
-
-  // If there is a remainder that is not covered by the value, print it as hex.
-  if (remaining_value)
-    s->Printf("0x%" PRIx64, remaining_value);
-
-  return true;
-}
-
-bool ClangASTContext::DumpTypeValue(
-    lldb::opaque_compiler_type_t type, Stream *s, lldb::Format format,
-    const lldb_private::DataExtractor &data, lldb::offset_t byte_offset,
-    size_t byte_size, uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset,
-    ExecutionContextScope *exe_scope) {
-  if (!type)
-    return false;
-  if (IsAggregateType(type)) {
-    return false;
-  } else {
-    clang::QualType qual_type(GetQualType(type));
-
-    const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-
-    if (type_class == clang::Type::Elaborated) {
-      qual_type = llvm::cast<clang::ElaboratedType>(qual_type)->getNamedType();
-      return DumpTypeValue(qual_type.getAsOpaquePtr(), s, format, data, byte_offset, byte_size,
-                           bitfield_bit_size, bitfield_bit_offset, exe_scope);
-    }
-
-    switch (type_class) {
-    case clang::Type::Typedef: {
-      clang::QualType typedef_qual_type =
-          llvm::cast<clang::TypedefType>(qual_type)
-              ->getDecl()
-              ->getUnderlyingType();
-      CompilerType typedef_clang_type = GetType(typedef_qual_type);
-      if (format == eFormatDefault)
-        format = typedef_clang_type.GetFormat();
-      clang::TypeInfo typedef_type_info =
-          getASTContext().getTypeInfo(typedef_qual_type);
-      uint64_t typedef_byte_size = typedef_type_info.Width / 8;
-
-      return typedef_clang_type.DumpTypeValue(
-          s,
-          format,            // The format with which to display the element
-          data,              // Data buffer containing all bytes for this type
-          byte_offset,       // Offset into "data" where to grab value from
-          typedef_byte_size, // Size of this type in bytes
-          bitfield_bit_size, // Size in bits of a bitfield value, if zero don't
-                             // treat as a bitfield
-          bitfield_bit_offset, // Offset in bits of a bitfield value if
-                               // bitfield_bit_size != 0
-          exe_scope);
-    } break;
-
-    case clang::Type::Enum:
-      // If our format is enum or default, show the enumeration value as its
-      // enumeration string value, else just display it as requested.
-      if ((format == eFormatEnum || format == eFormatDefault) &&
-          GetCompleteType(type))
-        return DumpEnumValue(qual_type, s, data, byte_offset, byte_size,
-                             bitfield_bit_offset, bitfield_bit_size);
-      // format was not enum, just fall through and dump the value as
-      // requested....
-      LLVM_FALLTHROUGH;
-
-    default:
-      // We are down to a scalar type that we just need to display.
-      {
-        uint32_t item_count = 1;
-        // A few formats, we might need to modify our size and count for
-        // depending
-        // on how we are trying to display the value...
-        switch (format) {
-        default:
-        case eFormatBoolean:
-        case eFormatBinary:
-        case eFormatComplex:
-        case eFormatCString: // NULL terminated C strings
-        case eFormatDecimal:
-        case eFormatEnum:
-        case eFormatHex:
-        case eFormatHexUppercase:
-        case eFormatFloat:
-        case eFormatOctal:
-        case eFormatOSType:
-        case eFormatUnsigned:
-        case eFormatPointer:
-        case eFormatVectorOfChar:
-        case eFormatVectorOfSInt8:
-        case eFormatVectorOfUInt8:
-        case eFormatVectorOfSInt16:
-        case eFormatVectorOfUInt16:
-        case eFormatVectorOfSInt32:
-        case eFormatVectorOfUInt32:
-        case eFormatVectorOfSInt64:
-        case eFormatVectorOfUInt64:
-        case eFormatVectorOfFloat32:
-        case eFormatVectorOfFloat64:
-        case eFormatVectorOfUInt128:
-          break;
-
-        case eFormatChar:
-        case eFormatCharPrintable:
-        case eFormatCharArray:
-        case eFormatBytes:
-        case eFormatBytesWithASCII:
-          item_count = byte_size;
-          byte_size = 1;
-          break;
-
-        case eFormatUnicode16:
-          item_count = byte_size / 2;
-          byte_size = 2;
-          break;
-
-        case eFormatUnicode32:
-          item_count = byte_size / 4;
-          byte_size = 4;
-          break;
-        }
-        return DumpDataExtractor(data, s, byte_offset, format, byte_size,
-                                 item_count, UINT32_MAX, LLDB_INVALID_ADDRESS,
-                                 bitfield_bit_size, bitfield_bit_offset,
-                                 exe_scope);
-      }
-      break;
-    }
-  }
-  return false;
-}
-
-void ClangASTContext::DumpSummary(lldb::opaque_compiler_type_t type,
-                                  ExecutionContext *exe_ctx, Stream *s,
-                                  const lldb_private::DataExtractor &data,
-                                  lldb::offset_t data_byte_offset,
-                                  size_t data_byte_size) {
-  uint32_t length = 0;
-  if (IsCStringType(type, length)) {
-    if (exe_ctx) {
-      Process *process = exe_ctx->GetProcessPtr();
-      if (process) {
-        lldb::offset_t offset = data_byte_offset;
-        lldb::addr_t pointer_address = data.GetMaxU64(&offset, data_byte_size);
-        std::vector<uint8_t> buf;
-        if (length > 0)
-          buf.resize(length);
-        else
-          buf.resize(256);
-
-        DataExtractor cstr_data(&buf.front(), buf.size(),
-                                process->GetByteOrder(), 4);
-        buf.back() = '\0';
-        size_t bytes_read;
-        size_t total_cstr_len = 0;
-        Status error;
-        while ((bytes_read = process->ReadMemory(pointer_address, &buf.front(),
-                                                 buf.size(), error)) > 0) {
-          const size_t len = strlen((const char *)&buf.front());
-          if (len == 0)
-            break;
-          if (total_cstr_len == 0)
-            s->PutCString(" \"");
-          DumpDataExtractor(cstr_data, s, 0, lldb::eFormatChar, 1, len,
-                            UINT32_MAX, LLDB_INVALID_ADDRESS, 0, 0);
-          total_cstr_len += len;
-          if (len < buf.size())
-            break;
-          pointer_address += total_cstr_len;
-        }
-        if (total_cstr_len > 0)
-          s->PutChar('"');
-      }
-    }
-  }
-}
-
-void ClangASTContext::DumpTypeDescription(lldb::opaque_compiler_type_t type) {
-  StreamFile s(stdout, false);
-  DumpTypeDescription(type, &s);
-
-  CompilerType ct(this, type);
-  const clang::Type *clang_type = ClangUtil::GetQualType(ct).getTypePtr();
-  ClangASTMetadata *metadata = GetMetadata(clang_type);
-  if (metadata) {
-    metadata->Dump(&s);
-  }
-}
-
-void ClangASTContext::DumpTypeDescription(lldb::opaque_compiler_type_t type,
-                                          Stream *s) {
-  if (type) {
-    clang::QualType qual_type =
-        RemoveWrappingTypes(GetQualType(type), {clang::Type::Typedef});
-
-    llvm::SmallVector<char, 1024> buf;
-    llvm::raw_svector_ostream llvm_ostrm(buf);
-
-    const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-    switch (type_class) {
-    case clang::Type::ObjCObject:
-    case clang::Type::ObjCInterface: {
-      GetCompleteType(type);
-
-      const clang::ObjCObjectType *objc_class_type =
-          llvm::dyn_cast<clang::ObjCObjectType>(qual_type.getTypePtr());
-      assert(objc_class_type);
-      if (objc_class_type) {
-        clang::ObjCInterfaceDecl *class_interface_decl =
-            objc_class_type->getInterface();
-        if (class_interface_decl) {
-          clang::PrintingPolicy policy = getASTContext().getPrintingPolicy();
-          class_interface_decl->print(llvm_ostrm, policy, s->GetIndentLevel());
-        }
-      }
-    } break;
-
-    case clang::Type::Typedef: {
-      const clang::TypedefType *typedef_type =
-          qual_type->getAs<clang::TypedefType>();
-      if (typedef_type) {
-        const clang::TypedefNameDecl *typedef_decl = typedef_type->getDecl();
-        std::string clang_typedef_name(
-            typedef_decl->getQualifiedNameAsString());
-        if (!clang_typedef_name.empty()) {
-          s->PutCString("typedef ");
-          s->PutCString(clang_typedef_name);
-        }
-      }
-    } break;
-
-    case clang::Type::Record: {
-      GetCompleteType(type);
-
-      const clang::RecordType *record_type =
-          llvm::cast<clang::RecordType>(qual_type.getTypePtr());
-      const clang::RecordDecl *record_decl = record_type->getDecl();
-      const clang::CXXRecordDecl *cxx_record_decl =
-          llvm::dyn_cast<clang::CXXRecordDecl>(record_decl);
-
-      if (cxx_record_decl)
-        cxx_record_decl->print(llvm_ostrm, getASTContext().getPrintingPolicy(),
-                               s->GetIndentLevel());
-      else
-        record_decl->print(llvm_ostrm, getASTContext().getPrintingPolicy(),
-                           s->GetIndentLevel());
-    } break;
-
-    default: {
-      const clang::TagType *tag_type =
-          llvm::dyn_cast<clang::TagType>(qual_type.getTypePtr());
-      if (tag_type) {
-        clang::TagDecl *tag_decl = tag_type->getDecl();
-        if (tag_decl)
-          tag_decl->print(llvm_ostrm, 0);
-      } else {
-        std::string clang_type_name(qual_type.getAsString());
-        if (!clang_type_name.empty())
-          s->PutCString(clang_type_name);
-      }
-    }
-    }
-
-    if (buf.size() > 0) {
-      s->Write(buf.data(), buf.size());
-    }
-  }
-}
-
-void ClangASTContext::DumpTypeName(const CompilerType &type) {
-  if (ClangUtil::IsClangType(type)) {
-    clang::QualType qual_type(
-        ClangUtil::GetCanonicalQualType(ClangUtil::RemoveFastQualifiers(type)));
-
-    const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-    switch (type_class) {
-    case clang::Type::Record: {
-      const clang::CXXRecordDecl *cxx_record_decl =
-          qual_type->getAsCXXRecordDecl();
-      if (cxx_record_decl)
-        printf("class %s", cxx_record_decl->getName().str().c_str());
-    } break;
-
-    case clang::Type::Enum: {
-      clang::EnumDecl *enum_decl =
-          llvm::cast<clang::EnumType>(qual_type)->getDecl();
-      if (enum_decl) {
-        printf("enum %s", enum_decl->getName().str().c_str());
-      }
-    } break;
-
-    case clang::Type::ObjCObject:
-    case clang::Type::ObjCInterface: {
-      const clang::ObjCObjectType *objc_class_type =
-          llvm::dyn_cast<clang::ObjCObjectType>(qual_type);
-      if (objc_class_type) {
-        clang::ObjCInterfaceDecl *class_interface_decl =
-            objc_class_type->getInterface();
-        // We currently can't complete objective C types through the newly
-        // added ASTContext because it only supports TagDecl objects right
-        // now...
-        if (class_interface_decl)
-          printf("@class %s", class_interface_decl->getName().str().c_str());
-      }
-    } break;
-
-    case clang::Type::Typedef:
-      printf("typedef %s", llvm::cast<clang::TypedefType>(qual_type)
-                               ->getDecl()
-                               ->getName()
-                               .str()
-                               .c_str());
-      break;
-
-    case clang::Type::Auto:
-      printf("auto ");
-      return DumpTypeName(CompilerType(type.GetTypeSystem(),
-                                       llvm::cast<clang::AutoType>(qual_type)
-                                           ->getDeducedType()
-                                           .getAsOpaquePtr()));
-
-    case clang::Type::Elaborated:
-      printf("elaborated ");
-      return DumpTypeName(CompilerType(
-          type.GetTypeSystem(), llvm::cast<clang::ElaboratedType>(qual_type)
-                                    ->getNamedType()
-                                    .getAsOpaquePtr()));
-
-    case clang::Type::Paren:
-      printf("paren ");
-      return DumpTypeName(CompilerType(
-          type.GetTypeSystem(),
-          llvm::cast<clang::ParenType>(qual_type)->desugar().getAsOpaquePtr()));
-
-    default:
-      printf("ClangASTContext::DumpTypeName() type_class = %u", type_class);
-      break;
-    }
-  }
-}
-
-clang::ClassTemplateDecl *ClangASTContext::ParseClassTemplateDecl(
-    clang::DeclContext *decl_ctx, lldb::AccessType access_type,
-    const char *parent_name, int tag_decl_kind,
-    const ClangASTContext::TemplateParameterInfos &template_param_infos) {
-  if (template_param_infos.IsValid()) {
-    std::string template_basename(parent_name);
-    template_basename.erase(template_basename.find('<'));
-
-    return CreateClassTemplateDecl(decl_ctx, access_type,
-                                   template_basename.c_str(), tag_decl_kind,
-                                   template_param_infos);
-  }
-  return nullptr;
-}
-
-void ClangASTContext::CompleteTagDecl(clang::TagDecl *decl) {
-  SymbolFile *sym_file = GetSymbolFile();
-  if (sym_file) {
-    CompilerType clang_type = GetTypeForDecl(decl);
-    if (clang_type)
-      sym_file->CompleteType(clang_type);
-  }
-}
-
-void ClangASTContext::CompleteObjCInterfaceDecl(
-    clang::ObjCInterfaceDecl *decl) {
-  SymbolFile *sym_file = GetSymbolFile();
-  if (sym_file) {
-    CompilerType clang_type = GetTypeForDecl(decl);
-    if (clang_type)
-      sym_file->CompleteType(clang_type);
-  }
-}
-
-DWARFASTParser *ClangASTContext::GetDWARFParser() {
-  if (!m_dwarf_ast_parser_up)
-    m_dwarf_ast_parser_up.reset(new DWARFASTParserClang(*this));
-  return m_dwarf_ast_parser_up.get();
-}
-
-PDBASTParser *ClangASTContext::GetPDBParser() {
-  if (!m_pdb_ast_parser_up)
-    m_pdb_ast_parser_up.reset(new PDBASTParser(*this));
-  return m_pdb_ast_parser_up.get();
-}
-
-bool ClangASTContext::LayoutRecordType(
-    const clang::RecordDecl *record_decl, uint64_t &bit_size,
-    uint64_t &alignment,
-    llvm::DenseMap<const clang::FieldDecl *, uint64_t> &field_offsets,
-    llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits>
-        &base_offsets,
-    llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits>
-        &vbase_offsets) {
-  lldb_private::ClangASTImporter *importer = nullptr;
-  if (m_dwarf_ast_parser_up)
-    importer = &m_dwarf_ast_parser_up->GetClangASTImporter();
-  if (!importer && m_pdb_ast_parser_up)
-    importer = &m_pdb_ast_parser_up->GetClangASTImporter();
-  if (!importer)
-    return false;
-
-  return importer->LayoutRecordType(record_decl, bit_size, alignment,
-                                    field_offsets, base_offsets, vbase_offsets);
-}
-
-// CompilerDecl override functions
-
-ConstString ClangASTContext::DeclGetName(void *opaque_decl) {
-  if (opaque_decl) {
-    clang::NamedDecl *nd =
-        llvm::dyn_cast<NamedDecl>((clang::Decl *)opaque_decl);
-    if (nd != nullptr)
-      return ConstString(nd->getDeclName().getAsString());
-  }
-  return ConstString();
-}
-
-ConstString ClangASTContext::DeclGetMangledName(void *opaque_decl) {
-  if (opaque_decl) {
-    clang::NamedDecl *nd =
-        llvm::dyn_cast<clang::NamedDecl>((clang::Decl *)opaque_decl);
-    if (nd != nullptr && !llvm::isa<clang::ObjCMethodDecl>(nd)) {
-      clang::MangleContext *mc = getMangleContext();
-      if (mc && mc->shouldMangleCXXName(nd)) {
-        llvm::SmallVector<char, 1024> buf;
-        llvm::raw_svector_ostream llvm_ostrm(buf);
-        if (llvm::isa<clang::CXXConstructorDecl>(nd)) {
-          mc->mangleCXXCtor(llvm::dyn_cast<clang::CXXConstructorDecl>(nd),
-                            Ctor_Complete, llvm_ostrm);
-        } else if (llvm::isa<clang::CXXDestructorDecl>(nd)) {
-          mc->mangleCXXDtor(llvm::dyn_cast<clang::CXXDestructorDecl>(nd),
-                            Dtor_Complete, llvm_ostrm);
-        } else {
-          mc->mangleName(nd, llvm_ostrm);
-        }
-        if (buf.size() > 0)
-          return ConstString(buf.data(), buf.size());
-      }
-    }
-  }
-  return ConstString();
-}
-
-CompilerDeclContext ClangASTContext::DeclGetDeclContext(void *opaque_decl) {
-  if (opaque_decl)
-    return CreateDeclContext(((clang::Decl *)opaque_decl)->getDeclContext());
-  return CompilerDeclContext();
-}
-
-CompilerType ClangASTContext::DeclGetFunctionReturnType(void *opaque_decl) {
-  if (clang::FunctionDecl *func_decl =
-          llvm::dyn_cast<clang::FunctionDecl>((clang::Decl *)opaque_decl))
-    return GetType(func_decl->getReturnType());
-  if (clang::ObjCMethodDecl *objc_method =
-          llvm::dyn_cast<clang::ObjCMethodDecl>((clang::Decl *)opaque_decl))
-    return GetType(objc_method->getReturnType());
-  else
-    return CompilerType();
-}
-
-size_t ClangASTContext::DeclGetFunctionNumArguments(void *opaque_decl) {
-  if (clang::FunctionDecl *func_decl =
-          llvm::dyn_cast<clang::FunctionDecl>((clang::Decl *)opaque_decl))
-    return func_decl->param_size();
-  if (clang::ObjCMethodDecl *objc_method =
-          llvm::dyn_cast<clang::ObjCMethodDecl>((clang::Decl *)opaque_decl))
-    return objc_method->param_size();
-  else
-    return 0;
-}
-
-CompilerType ClangASTContext::DeclGetFunctionArgumentType(void *opaque_decl,
-                                                          size_t idx) {
-  if (clang::FunctionDecl *func_decl =
-          llvm::dyn_cast<clang::FunctionDecl>((clang::Decl *)opaque_decl)) {
-    if (idx < func_decl->param_size()) {
-      ParmVarDecl *var_decl = func_decl->getParamDecl(idx);
-      if (var_decl)
-        return GetType(var_decl->getOriginalType());
-    }
-  } else if (clang::ObjCMethodDecl *objc_method =
-                 llvm::dyn_cast<clang::ObjCMethodDecl>(
-                     (clang::Decl *)opaque_decl)) {
-    if (idx < objc_method->param_size())
-      return GetType(objc_method->parameters()[idx]->getOriginalType());
-  }
-  return CompilerType();
-}
-
-// CompilerDeclContext functions
-
-std::vector<CompilerDecl> ClangASTContext::DeclContextFindDeclByName(
-    void *opaque_decl_ctx, ConstString name, const bool ignore_using_decls) {
-  std::vector<CompilerDecl> found_decls;
-  if (opaque_decl_ctx) {
-    DeclContext *root_decl_ctx = (DeclContext *)opaque_decl_ctx;
-    std::set<DeclContext *> searched;
-    std::multimap<DeclContext *, DeclContext *> search_queue;
-    SymbolFile *symbol_file = GetSymbolFile();
-
-    for (clang::DeclContext *decl_context = root_decl_ctx;
-         decl_context != nullptr && found_decls.empty();
-         decl_context = decl_context->getParent()) {
-      search_queue.insert(std::make_pair(decl_context, decl_context));
-
-      for (auto it = search_queue.find(decl_context); it != search_queue.end();
-           it++) {
-        if (!searched.insert(it->second).second)
-          continue;
-        symbol_file->ParseDeclsForContext(
-            CreateDeclContext(it->second));
-
-        for (clang::Decl *child : it->second->decls()) {
-          if (clang::UsingDirectiveDecl *ud =
-                  llvm::dyn_cast<clang::UsingDirectiveDecl>(child)) {
-            if (ignore_using_decls)
-              continue;
-            clang::DeclContext *from = ud->getCommonAncestor();
-            if (searched.find(ud->getNominatedNamespace()) == searched.end())
-              search_queue.insert(
-                  std::make_pair(from, ud->getNominatedNamespace()));
-          } else if (clang::UsingDecl *ud =
-                         llvm::dyn_cast<clang::UsingDecl>(child)) {
-            if (ignore_using_decls)
-              continue;
-            for (clang::UsingShadowDecl *usd : ud->shadows()) {
-              clang::Decl *target = usd->getTargetDecl();
-              if (clang::NamedDecl *nd =
-                      llvm::dyn_cast<clang::NamedDecl>(target)) {
-                IdentifierInfo *ii = nd->getIdentifier();
-                if (ii != nullptr &&
-                    ii->getName().equals(name.AsCString(nullptr)))
-                  found_decls.push_back(CompilerDecl(this, nd));
-              }
-            }
-          } else if (clang::NamedDecl *nd =
-                         llvm::dyn_cast<clang::NamedDecl>(child)) {
-            IdentifierInfo *ii = nd->getIdentifier();
-            if (ii != nullptr && ii->getName().equals(name.AsCString(nullptr)))
-              found_decls.push_back(CompilerDecl(this, nd));
-          }
-        }
-      }
-    }
-  }
-  return found_decls;
-}
-
-// Look for child_decl_ctx's lookup scope in frame_decl_ctx and its parents,
-// and return the number of levels it took to find it, or
-// LLDB_INVALID_DECL_LEVEL if not found.  If the decl was imported via a using
-// declaration, its name and/or type, if set, will be used to check that the
-// decl found in the scope is a match.
-//
-// The optional name is required by languages (like C++) to handle using
-// declarations like:
-//
-//     void poo();
-//     namespace ns {
-//         void foo();
-//         void goo();
-//     }
-//     void bar() {
-//         using ns::foo;
-//         // CountDeclLevels returns 0 for 'foo', 1 for 'poo', and
-//         // LLDB_INVALID_DECL_LEVEL for 'goo'.
-//     }
-//
-// The optional type is useful in the case that there's a specific overload
-// that we're looking for that might otherwise be shadowed, like:
-//
-//     void foo(int);
-//     namespace ns {
-//         void foo();
-//     }
-//     void bar() {
-//         using ns::foo;
-//         // CountDeclLevels returns 0 for { 'foo', void() },
-//         // 1 for { 'foo', void(int) }, and
-//         // LLDB_INVALID_DECL_LEVEL for { 'foo', void(int, int) }.
-//     }
-//
-// NOTE: Because file statics are at the TranslationUnit along with globals, a
-// function at file scope will return the same level as a function at global
-// scope. Ideally we'd like to treat the file scope as an additional scope just
-// below the global scope.  More work needs to be done to recognise that, if
-// the decl we're trying to look up is static, we should compare its source
-// file with that of the current scope and return a lower number for it.
-uint32_t ClangASTContext::CountDeclLevels(clang::DeclContext *frame_decl_ctx,
-                                          clang::DeclContext *child_decl_ctx,
-                                          ConstString *child_name,
-                                          CompilerType *child_type) {
-  if (frame_decl_ctx) {
-    std::set<DeclContext *> searched;
-    std::multimap<DeclContext *, DeclContext *> search_queue;
-    SymbolFile *symbol_file = GetSymbolFile();
-
-    // Get the lookup scope for the decl we're trying to find.
-    clang::DeclContext *parent_decl_ctx = child_decl_ctx->getParent();
-
-    // Look for it in our scope's decl context and its parents.
-    uint32_t level = 0;
-    for (clang::DeclContext *decl_ctx = frame_decl_ctx; decl_ctx != nullptr;
-         decl_ctx = decl_ctx->getParent()) {
-      if (!decl_ctx->isLookupContext())
-        continue;
-      if (decl_ctx == parent_decl_ctx)
-        // Found it!
-        return level;
-      search_queue.insert(std::make_pair(decl_ctx, decl_ctx));
-      for (auto it = search_queue.find(decl_ctx); it != search_queue.end();
-           it++) {
-        if (searched.find(it->second) != searched.end())
-          continue;
-
-        // Currently DWARF has one shared translation unit for all Decls at top
-        // level, so this would erroneously find using statements anywhere.  So
-        // don't look at the top-level translation unit.
-        // TODO fix this and add a testcase that depends on it.
-
-        if (llvm::isa<clang::TranslationUnitDecl>(it->second))
-          continue;
-
-        searched.insert(it->second);
-        symbol_file->ParseDeclsForContext(
-            CreateDeclContext(it->second));
-
-        for (clang::Decl *child : it->second->decls()) {
-          if (clang::UsingDirectiveDecl *ud =
-                  llvm::dyn_cast<clang::UsingDirectiveDecl>(child)) {
-            clang::DeclContext *ns = ud->getNominatedNamespace();
-            if (ns == parent_decl_ctx)
-              // Found it!
-              return level;
-            clang::DeclContext *from = ud->getCommonAncestor();
-            if (searched.find(ns) == searched.end())
-              search_queue.insert(std::make_pair(from, ns));
-          } else if (child_name) {
-            if (clang::UsingDecl *ud =
-                    llvm::dyn_cast<clang::UsingDecl>(child)) {
-              for (clang::UsingShadowDecl *usd : ud->shadows()) {
-                clang::Decl *target = usd->getTargetDecl();
-                clang::NamedDecl *nd = llvm::dyn_cast<clang::NamedDecl>(target);
-                if (!nd)
-                  continue;
-                // Check names.
-                IdentifierInfo *ii = nd->getIdentifier();
-                if (ii == nullptr ||
-                    !ii->getName().equals(child_name->AsCString(nullptr)))
-                  continue;
-                // Check types, if one was provided.
-                if (child_type) {
-                  CompilerType clang_type = GetTypeForDecl(nd);
-                  if (!AreTypesSame(clang_type, *child_type,
-                                    /*ignore_qualifiers=*/true))
-                    continue;
-                }
-                // Found it!
-                return level;
-              }
-            }
-          }
-        }
-      }
-      ++level;
-    }
-  }
-  return LLDB_INVALID_DECL_LEVEL;
-}
-
-ConstString ClangASTContext::DeclContextGetName(void *opaque_decl_ctx) {
-  if (opaque_decl_ctx) {
-    clang::NamedDecl *named_decl =
-        llvm::dyn_cast<clang::NamedDecl>((clang::DeclContext *)opaque_decl_ctx);
-    if (named_decl)
-      return ConstString(named_decl->getName());
-  }
-  return ConstString();
-}
-
-ConstString
-ClangASTContext::DeclContextGetScopeQualifiedName(void *opaque_decl_ctx) {
-  if (opaque_decl_ctx) {
-    clang::NamedDecl *named_decl =
-        llvm::dyn_cast<clang::NamedDecl>((clang::DeclContext *)opaque_decl_ctx);
-    if (named_decl)
-      return ConstString(
-          llvm::StringRef(named_decl->getQualifiedNameAsString()));
-  }
-  return ConstString();
-}
-
-bool ClangASTContext::DeclContextIsClassMethod(
-    void *opaque_decl_ctx, lldb::LanguageType *language_ptr,
-    bool *is_instance_method_ptr, ConstString *language_object_name_ptr) {
-  if (opaque_decl_ctx) {
-    clang::DeclContext *decl_ctx = (clang::DeclContext *)opaque_decl_ctx;
-    if (ObjCMethodDecl *objc_method =
-            llvm::dyn_cast<clang::ObjCMethodDecl>(decl_ctx)) {
-      if (is_instance_method_ptr)
-        *is_instance_method_ptr = objc_method->isInstanceMethod();
-      if (language_ptr)
-        *language_ptr = eLanguageTypeObjC;
-      if (language_object_name_ptr)
-        language_object_name_ptr->SetCString("self");
-      return true;
-    } else if (CXXMethodDecl *cxx_method =
-                   llvm::dyn_cast<clang::CXXMethodDecl>(decl_ctx)) {
-      if (is_instance_method_ptr)
-        *is_instance_method_ptr = cxx_method->isInstance();
-      if (language_ptr)
-        *language_ptr = eLanguageTypeC_plus_plus;
-      if (language_object_name_ptr)
-        language_object_name_ptr->SetCString("this");
-      return true;
-    } else if (clang::FunctionDecl *function_decl =
-                   llvm::dyn_cast<clang::FunctionDecl>(decl_ctx)) {
-      ClangASTMetadata *metadata = GetMetadata(function_decl);
-      if (metadata && metadata->HasObjectPtr()) {
-        if (is_instance_method_ptr)
-          *is_instance_method_ptr = true;
-        if (language_ptr)
-          *language_ptr = eLanguageTypeObjC;
-        if (language_object_name_ptr)
-          language_object_name_ptr->SetCString(metadata->GetObjectPtrName());
-        return true;
-      }
-    }
-  }
-  return false;
-}
-
-bool ClangASTContext::DeclContextIsContainedInLookup(
-    void *opaque_decl_ctx, void *other_opaque_decl_ctx) {
-  auto *decl_ctx = (clang::DeclContext *)opaque_decl_ctx;
-  auto *other = (clang::DeclContext *)other_opaque_decl_ctx;
-
-  do {
-    // A decl context always includes its own contents in its lookup.
-    if (decl_ctx == other)
-      return true;
-
-    // If we have an inline namespace, then the lookup of the parent context
-    // also includes the inline namespace contents.
-  } while (other->isInlineNamespace() && (other = other->getParent()));
-
-  return false;
-}
-
-static bool IsClangDeclContext(const CompilerDeclContext &dc) {
-  return dc.IsValid() && isa<ClangASTContext>(dc.GetTypeSystem());
-}
-
-clang::DeclContext *
-ClangASTContext::DeclContextGetAsDeclContext(const CompilerDeclContext &dc) {
-  if (IsClangDeclContext(dc))
-    return (clang::DeclContext *)dc.GetOpaqueDeclContext();
-  return nullptr;
-}
-
-ObjCMethodDecl *
-ClangASTContext::DeclContextGetAsObjCMethodDecl(const CompilerDeclContext &dc) {
-  if (IsClangDeclContext(dc))
-    return llvm::dyn_cast<clang::ObjCMethodDecl>(
-        (clang::DeclContext *)dc.GetOpaqueDeclContext());
-  return nullptr;
-}
-
-CXXMethodDecl *
-ClangASTContext::DeclContextGetAsCXXMethodDecl(const CompilerDeclContext &dc) {
-  if (IsClangDeclContext(dc))
-    return llvm::dyn_cast<clang::CXXMethodDecl>(
-        (clang::DeclContext *)dc.GetOpaqueDeclContext());
-  return nullptr;
-}
-
-clang::FunctionDecl *
-ClangASTContext::DeclContextGetAsFunctionDecl(const CompilerDeclContext &dc) {
-  if (IsClangDeclContext(dc))
-    return llvm::dyn_cast<clang::FunctionDecl>(
-        (clang::DeclContext *)dc.GetOpaqueDeclContext());
-  return nullptr;
-}
-
-clang::NamespaceDecl *
-ClangASTContext::DeclContextGetAsNamespaceDecl(const CompilerDeclContext &dc) {
-  if (IsClangDeclContext(dc))
-    return llvm::dyn_cast<clang::NamespaceDecl>(
-        (clang::DeclContext *)dc.GetOpaqueDeclContext());
-  return nullptr;
-}
-
-ClangASTMetadata *
-ClangASTContext::DeclContextGetMetaData(const CompilerDeclContext &dc,
-                                        const Decl *object) {
-  ClangASTContext *ast = llvm::cast<ClangASTContext>(dc.GetTypeSystem());
-  return ast->GetMetadata(object);
-}
-
-clang::ASTContext *
-ClangASTContext::DeclContextGetClangASTContext(const CompilerDeclContext &dc) {
-  ClangASTContext *ast =
-      llvm::dyn_cast_or_null<ClangASTContext>(dc.GetTypeSystem());
-  if (ast)
-    return &ast->getASTContext();
-  return nullptr;
-}
-
-ClangASTContextForExpressions::ClangASTContextForExpressions(
-    Target &target, llvm::Triple triple)
-    : ClangASTContext(triple), m_target_wp(target.shared_from_this()),
-      m_persistent_variables(new ClangPersistentVariables) {
-  m_scratch_ast_source_up.reset(new ClangASTSource(
-      target.shared_from_this(), target.GetClangASTImporter()));
-  m_scratch_ast_source_up->InstallASTContext(*this);
-  llvm::IntrusiveRefCntPtr<clang::ExternalASTSource> proxy_ast_source(
-      m_scratch_ast_source_up->CreateProxy());
-  SetExternalSource(proxy_ast_source);
-}
-
-void ClangASTContextForExpressions::Finalize() {
-  ClangASTContext::Finalize();
-  m_scratch_ast_source_up.reset();
-}
-
-UserExpression *ClangASTContextForExpressions::GetUserExpression(
-    llvm::StringRef expr, llvm::StringRef prefix, lldb::LanguageType language,
-    Expression::ResultType desired_type,
-    const EvaluateExpressionOptions &options,
-    ValueObject *ctx_obj) {
-  TargetSP target_sp = m_target_wp.lock();
-  if (!target_sp)
-    return nullptr;
-
-  return new ClangUserExpression(*target_sp.get(), expr, prefix, language,
-                                 desired_type, options, ctx_obj);
-}
-
-FunctionCaller *ClangASTContextForExpressions::GetFunctionCaller(
-    const CompilerType &return_type, const Address &function_address,
-    const ValueList &arg_value_list, const char *name) {
-  TargetSP target_sp = m_target_wp.lock();
-  if (!target_sp)
-    return nullptr;
-
-  Process *process = target_sp->GetProcessSP().get();
-  if (!process)
-    return nullptr;
-
-  return new ClangFunctionCaller(*process, return_type, function_address,
-                                 arg_value_list, name);
-}
-
-UtilityFunction *
-ClangASTContextForExpressions::GetUtilityFunction(const char *text,
-                                                  const char *name) {
-  TargetSP target_sp = m_target_wp.lock();
-  if (!target_sp)
-    return nullptr;
-
-  return new ClangUtilityFunction(*target_sp.get(), text, name);
-}
-
-PersistentExpressionState *
-ClangASTContextForExpressions::GetPersistentExpressionState() {
-  return m_persistent_variables.get();
-}
diff --git a/gnu/llvm/lldb/source/Symbol/ClangASTImporter.cpp b/gnu/llvm/lldb/source/Symbol/ClangASTImporter.cpp
deleted file mode 100644 (file)
index 8cb4042..0000000
+++ /dev/null
@@ -1,1165 +0,0 @@
-//===-- ClangASTImporter.cpp ------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "lldb/Symbol/ClangASTImporter.h"
-#include "lldb/Core/Module.h"
-#include "lldb/Symbol/ClangASTContext.h"
-#include "lldb/Symbol/ClangASTMetadata.h"
-#include "lldb/Symbol/ClangUtil.h"
-#include "lldb/Utility/LLDBAssert.h"
-#include "lldb/Utility/Log.h"
-#include "clang/AST/Decl.h"
-#include "clang/AST/DeclCXX.h"
-#include "clang/AST/DeclObjC.h"
-#include "clang/Sema/Lookup.h"
-#include "clang/Sema/Sema.h"
-#include "llvm/Support/raw_ostream.h"
-
-#include <memory>
-
-using namespace lldb_private;
-using namespace clang;
-
-CompilerType ClangASTImporter::CopyType(ClangASTContext &dst_ast,
-                                        const CompilerType &src_type) {
-  clang::ASTContext &dst_clang_ast = dst_ast.getASTContext();
-
-  ClangASTContext *src_ast =
-      llvm::dyn_cast_or_null<ClangASTContext>(src_type.GetTypeSystem());
-  if (!src_ast)
-    return CompilerType();
-
-  clang::ASTContext &src_clang_ast = src_ast->getASTContext();
-
-  clang::QualType src_qual_type = ClangUtil::GetQualType(src_type);
-
-  ImporterDelegateSP delegate_sp(GetDelegate(&dst_clang_ast, &src_clang_ast));
-  if (!delegate_sp)
-    return CompilerType();
-
-  ASTImporterDelegate::CxxModuleScope std_scope(*delegate_sp, &dst_clang_ast);
-
-  llvm::Expected<QualType> ret_or_error = delegate_sp->Import(src_qual_type);
-  if (!ret_or_error) {
-    Log *log =
-      lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS);
-    LLDB_LOG_ERROR(log, ret_or_error.takeError(),
-        "Couldn't import type: {0}");
-    return CompilerType();
-  }
-
-  lldb::opaque_compiler_type_t dst_clang_type = ret_or_error->getAsOpaquePtr();
-
-  if (dst_clang_type)
-    return CompilerType(&dst_ast, dst_clang_type);
-  return CompilerType();
-}
-
-clang::Decl *ClangASTImporter::CopyDecl(clang::ASTContext *dst_ast,
-                                        clang::Decl *decl) {
-  ImporterDelegateSP delegate_sp;
-
-  clang::ASTContext *src_ast = &decl->getASTContext();
-  delegate_sp = GetDelegate(dst_ast, src_ast);
-
-  ASTImporterDelegate::CxxModuleScope std_scope(*delegate_sp, dst_ast);
-
-  if (!delegate_sp)
-    return nullptr;
-
-  llvm::Expected<clang::Decl *> result = delegate_sp->Import(decl);
-  if (!result) {
-    Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
-    LLDB_LOG_ERROR(log, result.takeError(), "Couldn't import decl: {0}");
-    if (log) {
-      lldb::user_id_t user_id = LLDB_INVALID_UID;
-      ClangASTMetadata *metadata = GetDeclMetadata(decl);
-      if (metadata)
-        user_id = metadata->GetUserID();
-
-      if (NamedDecl *named_decl = dyn_cast<NamedDecl>(decl))
-        LLDB_LOGF(log,
-                  "  [ClangASTImporter] WARNING: Failed to import a %s "
-                  "'%s', metadata 0x%" PRIx64,
-                  decl->getDeclKindName(),
-                  named_decl->getNameAsString().c_str(), user_id);
-      else
-        LLDB_LOGF(log,
-                  "  [ClangASTImporter] WARNING: Failed to import a %s, "
-                  "metadata 0x%" PRIx64,
-                  decl->getDeclKindName(), user_id);
-    }
-    return nullptr;
-  }
-
-  return *result;
-}
-
-class DeclContextOverride {
-private:
-  struct Backup {
-    clang::DeclContext *decl_context;
-    clang::DeclContext *lexical_decl_context;
-  };
-
-  llvm::DenseMap<clang::Decl *, Backup> m_backups;
-
-  void OverrideOne(clang::Decl *decl) {
-    if (m_backups.find(decl) != m_backups.end()) {
-      return;
-    }
-
-    m_backups[decl] = {decl->getDeclContext(), decl->getLexicalDeclContext()};
-
-    decl->setDeclContext(decl->getASTContext().getTranslationUnitDecl());
-    decl->setLexicalDeclContext(decl->getASTContext().getTranslationUnitDecl());
-  }
-
-  bool ChainPassesThrough(
-      clang::Decl *decl, clang::DeclContext *base,
-      clang::DeclContext *(clang::Decl::*contextFromDecl)(),
-      clang::DeclContext *(clang::DeclContext::*contextFromContext)()) {
-    for (DeclContext *decl_ctx = (decl->*contextFromDecl)(); decl_ctx;
-         decl_ctx = (decl_ctx->*contextFromContext)()) {
-      if (decl_ctx == base) {
-        return true;
-      }
-    }
-
-    return false;
-  }
-
-  clang::Decl *GetEscapedChild(clang::Decl *decl,
-                               clang::DeclContext *base = nullptr) {
-    if (base) {
-      // decl's DeclContext chains must pass through base.
-
-      if (!ChainPassesThrough(decl, base, &clang::Decl::getDeclContext,
-                              &clang::DeclContext::getParent) ||
-          !ChainPassesThrough(decl, base, &clang::Decl::getLexicalDeclContext,
-                              &clang::DeclContext::getLexicalParent)) {
-        return decl;
-      }
-    } else {
-      base = clang::dyn_cast<clang::DeclContext>(decl);
-
-      if (!base) {
-        return nullptr;
-      }
-    }
-
-    if (clang::DeclContext *context =
-            clang::dyn_cast<clang::DeclContext>(decl)) {
-      for (clang::Decl *decl : context->decls()) {
-        if (clang::Decl *escaped_child = GetEscapedChild(decl)) {
-          return escaped_child;
-        }
-      }
-    }
-
-    return nullptr;
-  }
-
-  void Override(clang::Decl *decl) {
-    if (clang::Decl *escaped_child = GetEscapedChild(decl)) {
-      Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
-
-      LLDB_LOGF(log,
-                "    [ClangASTImporter] DeclContextOverride couldn't "
-                "override (%sDecl*)%p - its child (%sDecl*)%p escapes",
-                decl->getDeclKindName(), static_cast<void *>(decl),
-                escaped_child->getDeclKindName(),
-                static_cast<void *>(escaped_child));
-      lldbassert(0 && "Couldn't override!");
-    }
-
-    OverrideOne(decl);
-  }
-
-public:
-  DeclContextOverride() {}
-
-  void OverrideAllDeclsFromContainingFunction(clang::Decl *decl) {
-    for (DeclContext *decl_context = decl->getLexicalDeclContext();
-         decl_context; decl_context = decl_context->getLexicalParent()) {
-      DeclContext *redecl_context = decl_context->getRedeclContext();
-
-      if (llvm::isa<FunctionDecl>(redecl_context) &&
-          llvm::isa<TranslationUnitDecl>(redecl_context->getLexicalParent())) {
-        for (clang::Decl *child_decl : decl_context->decls()) {
-          Override(child_decl);
-        }
-      }
-    }
-  }
-
-  ~DeclContextOverride() {
-    for (const std::pair<clang::Decl *, Backup> &backup : m_backups) {
-      backup.first->setDeclContext(backup.second.decl_context);
-      backup.first->setLexicalDeclContext(backup.second.lexical_decl_context);
-    }
-  }
-};
-
-namespace {
-/// Completes all imported TagDecls at the end of the scope.
-///
-/// While in a CompleteTagDeclsScope, every decl that could be completed will
-/// be completed at the end of the scope (including all Decls that are
-/// imported while completing the original Decls).
-class CompleteTagDeclsScope : public ClangASTImporter::NewDeclListener {
-  ClangASTImporter::ImporterDelegateSP m_delegate;
-  llvm::SmallVector<NamedDecl *, 32> m_decls_to_complete;
-  llvm::SmallPtrSet<NamedDecl *, 32> m_decls_already_completed;
-  clang::ASTContext *m_dst_ctx;
-  clang::ASTContext *m_src_ctx;
-  ClangASTImporter &importer;
-
-public:
-  /// Constructs a CompleteTagDeclsScope.
-  /// \param importer The ClangASTImporter that we should observe.
-  /// \param dst_ctx The ASTContext to which Decls are imported.
-  /// \param src_ctx The ASTContext from which Decls are imported.
-  explicit CompleteTagDeclsScope(ClangASTImporter &importer,
-                            clang::ASTContext *dst_ctx,
-                            clang::ASTContext *src_ctx)
-      : m_delegate(importer.GetDelegate(dst_ctx, src_ctx)), m_dst_ctx(dst_ctx),
-        m_src_ctx(src_ctx), importer(importer) {
-    m_delegate->SetImportListener(this);
-  }
-
-  virtual ~CompleteTagDeclsScope() {
-    ClangASTImporter::ASTContextMetadataSP to_context_md =
-        importer.GetContextMetadata(m_dst_ctx);
-
-    // Complete all decls we collected until now.
-    while (!m_decls_to_complete.empty()) {
-      NamedDecl *decl = m_decls_to_complete.pop_back_val();
-      m_decls_already_completed.insert(decl);
-
-      // We should only complete decls coming from the source context.
-      assert(to_context_md->m_origins[decl].ctx == m_src_ctx);
-
-      Decl *original_decl = to_context_md->m_origins[decl].decl;
-
-      // Complete the decl now.
-      ClangASTContext::GetCompleteDecl(m_src_ctx, original_decl);
-      if (auto *tag_decl = dyn_cast<TagDecl>(decl)) {
-        if (auto *original_tag_decl = dyn_cast<TagDecl>(original_decl)) {
-          if (original_tag_decl->isCompleteDefinition()) {
-            m_delegate->ImportDefinitionTo(tag_decl, original_tag_decl);
-            tag_decl->setCompleteDefinition(true);
-          }
-        }
-
-        tag_decl->setHasExternalLexicalStorage(false);
-        tag_decl->setHasExternalVisibleStorage(false);
-      } else if (auto *container_decl = dyn_cast<ObjCContainerDecl>(decl)) {
-        container_decl->setHasExternalLexicalStorage(false);
-        container_decl->setHasExternalVisibleStorage(false);
-      }
-
-      to_context_md->m_origins.erase(decl);
-    }
-
-    // Stop listening to imported decls. We do this after clearing the
-    // Decls we needed to import to catch all Decls they might have pulled in.
-    m_delegate->RemoveImportListener();
-  }
-
-  void NewDeclImported(clang::Decl *from, clang::Decl *to) override {
-    // Filter out decls that we can't complete later.
-    if (!isa<TagDecl>(to) && !isa<ObjCInterfaceDecl>(to))
-      return;
-    RecordDecl *from_record_decl = dyn_cast<RecordDecl>(from);
-    // We don't need to complete injected class name decls.
-    if (from_record_decl && from_record_decl->isInjectedClassName())
-      return;
-
-    NamedDecl *to_named_decl = dyn_cast<NamedDecl>(to);
-    // Check if we already completed this type.
-    if (m_decls_already_completed.count(to_named_decl) != 0)
-      return;
-    m_decls_to_complete.push_back(to_named_decl);
-  }
-};
-} // namespace
-
-CompilerType ClangASTImporter::DeportType(ClangASTContext &dst,
-                                          const CompilerType &src_type) {
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
-
-  ClangASTContext *src_ctxt =
-      llvm::cast<ClangASTContext>(src_type.GetTypeSystem());
-
-  LLDB_LOG(log,
-           "    [ClangASTImporter] DeportType called on ({0}Type*){1:x} "
-           "from (ASTContext*){2:x} to (ASTContext*){3:x}",
-           src_type.GetTypeName(), src_type.GetOpaqueQualType(),
-           &src_ctxt->getASTContext(), &dst.getASTContext());
-
-  DeclContextOverride decl_context_override;
-
-  if (auto *t = ClangUtil::GetQualType(src_type)->getAs<TagType>())
-    decl_context_override.OverrideAllDeclsFromContainingFunction(t->getDecl());
-
-  CompleteTagDeclsScope complete_scope(*this, &dst.getASTContext(),
-                                       &src_ctxt->getASTContext());
-  return CopyType(dst, src_type);
-}
-
-clang::Decl *ClangASTImporter::DeportDecl(clang::ASTContext *dst_ctx,
-                                          clang::Decl *decl) {
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
-
-  clang::ASTContext *src_ctx = &decl->getASTContext();
-  LLDB_LOGF(log,
-            "    [ClangASTImporter] DeportDecl called on (%sDecl*)%p from "
-            "(ASTContext*)%p to (ASTContext*)%p",
-            decl->getDeclKindName(), static_cast<void *>(decl),
-            static_cast<void *>(src_ctx), static_cast<void *>(dst_ctx));
-
-  DeclContextOverride decl_context_override;
-
-  decl_context_override.OverrideAllDeclsFromContainingFunction(decl);
-
-  clang::Decl *result;
-  {
-    CompleteTagDeclsScope complete_scope(*this, dst_ctx, src_ctx);
-    result = CopyDecl(dst_ctx, decl);
-  }
-
-  if (!result)
-    return nullptr;
-
-  LLDB_LOGF(
-      log,
-      "    [ClangASTImporter] DeportDecl deported (%sDecl*)%p to (%sDecl*)%p",
-      decl->getDeclKindName(), static_cast<void *>(decl),
-      result->getDeclKindName(), static_cast<void *>(result));
-
-  return result;
-}
-
-bool ClangASTImporter::CanImport(const CompilerType &type) {
-  if (!ClangUtil::IsClangType(type))
-    return false;
-
-  // TODO: remove external completion BOOL
-  // CompleteAndFetchChildren should get the Decl out and check for the
-
-  clang::QualType qual_type(
-      ClangUtil::GetCanonicalQualType(ClangUtil::RemoveFastQualifiers(type)));
-
-  const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-  switch (type_class) {
-  case clang::Type::Record: {
-    const clang::CXXRecordDecl *cxx_record_decl =
-        qual_type->getAsCXXRecordDecl();
-    if (cxx_record_decl) {
-      if (GetDeclOrigin(cxx_record_decl).Valid())
-        return true;
-    }
-  } break;
-
-  case clang::Type::Enum: {
-    clang::EnumDecl *enum_decl =
-        llvm::cast<clang::EnumType>(qual_type)->getDecl();
-    if (enum_decl) {
-      if (GetDeclOrigin(enum_decl).Valid())
-        return true;
-    }
-  } break;
-
-  case clang::Type::ObjCObject:
-  case clang::Type::ObjCInterface: {
-    const clang::ObjCObjectType *objc_class_type =
-        llvm::dyn_cast<clang::ObjCObjectType>(qual_type);
-    if (objc_class_type) {
-      clang::ObjCInterfaceDecl *class_interface_decl =
-          objc_class_type->getInterface();
-      // We currently can't complete objective C types through the newly added
-      // ASTContext because it only supports TagDecl objects right now...
-      if (class_interface_decl) {
-        if (GetDeclOrigin(class_interface_decl).Valid())
-          return true;
-      }
-    }
-  } break;
-
-  case clang::Type::Typedef:
-    return CanImport(CompilerType(type.GetTypeSystem(),
-                                  llvm::cast<clang::TypedefType>(qual_type)
-                                      ->getDecl()
-                                      ->getUnderlyingType()
-                                      .getAsOpaquePtr()));
-
-  case clang::Type::Auto:
-    return CanImport(CompilerType(type.GetTypeSystem(),
-                                  llvm::cast<clang::AutoType>(qual_type)
-                                      ->getDeducedType()
-                                      .getAsOpaquePtr()));
-
-  case clang::Type::Elaborated:
-    return CanImport(CompilerType(type.GetTypeSystem(),
-                                  llvm::cast<clang::ElaboratedType>(qual_type)
-                                      ->getNamedType()
-                                      .getAsOpaquePtr()));
-
-  case clang::Type::Paren:
-    return CanImport(CompilerType(
-        type.GetTypeSystem(),
-        llvm::cast<clang::ParenType>(qual_type)->desugar().getAsOpaquePtr()));
-
-  default:
-    break;
-  }
-
-  return false;
-}
-
-bool ClangASTImporter::Import(const CompilerType &type) {
-  if (!ClangUtil::IsClangType(type))
-    return false;
-  // TODO: remove external completion BOOL
-  // CompleteAndFetchChildren should get the Decl out and check for the
-
-  clang::QualType qual_type(
-      ClangUtil::GetCanonicalQualType(ClangUtil::RemoveFastQualifiers(type)));
-
-  const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-  switch (type_class) {
-  case clang::Type::Record: {
-    const clang::CXXRecordDecl *cxx_record_decl =
-        qual_type->getAsCXXRecordDecl();
-    if (cxx_record_decl) {
-      if (GetDeclOrigin(cxx_record_decl).Valid())
-        return CompleteAndFetchChildren(qual_type);
-    }
-  } break;
-
-  case clang::Type::Enum: {
-    clang::EnumDecl *enum_decl =
-        llvm::cast<clang::EnumType>(qual_type)->getDecl();
-    if (enum_decl) {
-      if (GetDeclOrigin(enum_decl).Valid())
-        return CompleteAndFetchChildren(qual_type);
-    }
-  } break;
-
-  case clang::Type::ObjCObject:
-  case clang::Type::ObjCInterface: {
-    const clang::ObjCObjectType *objc_class_type =
-        llvm::dyn_cast<clang::ObjCObjectType>(qual_type);
-    if (objc_class_type) {
-      clang::ObjCInterfaceDecl *class_interface_decl =
-          objc_class_type->getInterface();
-      // We currently can't complete objective C types through the newly added
-      // ASTContext because it only supports TagDecl objects right now...
-      if (class_interface_decl) {
-        if (GetDeclOrigin(class_interface_decl).Valid())
-          return CompleteAndFetchChildren(qual_type);
-      }
-    }
-  } break;
-
-  case clang::Type::Typedef:
-    return Import(CompilerType(type.GetTypeSystem(),
-                               llvm::cast<clang::TypedefType>(qual_type)
-                                   ->getDecl()
-                                   ->getUnderlyingType()
-                                   .getAsOpaquePtr()));
-
-  case clang::Type::Auto:
-    return Import(CompilerType(type.GetTypeSystem(),
-                               llvm::cast<clang::AutoType>(qual_type)
-                                   ->getDeducedType()
-                                   .getAsOpaquePtr()));
-
-  case clang::Type::Elaborated:
-    return Import(CompilerType(type.GetTypeSystem(),
-                               llvm::cast<clang::ElaboratedType>(qual_type)
-                                   ->getNamedType()
-                                   .getAsOpaquePtr()));
-
-  case clang::Type::Paren:
-    return Import(CompilerType(
-        type.GetTypeSystem(),
-        llvm::cast<clang::ParenType>(qual_type)->desugar().getAsOpaquePtr()));
-
-  default:
-    break;
-  }
-  return false;
-}
-
-bool ClangASTImporter::CompleteType(const CompilerType &compiler_type) {
-  if (!CanImport(compiler_type))
-    return false;
-
-  if (Import(compiler_type)) {
-    ClangASTContext::CompleteTagDeclarationDefinition(compiler_type);
-    return true;
-  }
-
-  ClangASTContext::SetHasExternalStorage(compiler_type.GetOpaqueQualType(),
-                                         false);
-  return false;
-}
-
-bool ClangASTImporter::LayoutRecordType(
-    const clang::RecordDecl *record_decl, uint64_t &bit_size,
-    uint64_t &alignment,
-    llvm::DenseMap<const clang::FieldDecl *, uint64_t> &field_offsets,
-    llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits>
-        &base_offsets,
-    llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits>
-        &vbase_offsets) {
-  RecordDeclToLayoutMap::iterator pos =
-      m_record_decl_to_layout_map.find(record_decl);
-  bool success = false;
-  base_offsets.clear();
-  vbase_offsets.clear();
-  if (pos != m_record_decl_to_layout_map.end()) {
-    bit_size = pos->second.bit_size;
-    alignment = pos->second.alignment;
-    field_offsets.swap(pos->second.field_offsets);
-    base_offsets.swap(pos->second.base_offsets);
-    vbase_offsets.swap(pos->second.vbase_offsets);
-    m_record_decl_to_layout_map.erase(pos);
-    success = true;
-  } else {
-    bit_size = 0;
-    alignment = 0;
-    field_offsets.clear();
-  }
-  return success;
-}
-
-void ClangASTImporter::SetRecordLayout(clang::RecordDecl *decl,
-                                        const LayoutInfo &layout) {
-  m_record_decl_to_layout_map.insert(std::make_pair(decl, layout));
-}
-
-void ClangASTImporter::CompleteDecl(clang::Decl *decl) {
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
-
-  LLDB_LOGF(log, "    [ClangASTImporter] CompleteDecl called on (%sDecl*)%p",
-            decl->getDeclKindName(), static_cast<void *>(decl));
-
-  if (ObjCInterfaceDecl *interface_decl = dyn_cast<ObjCInterfaceDecl>(decl)) {
-    if (!interface_decl->getDefinition()) {
-      interface_decl->startDefinition();
-      CompleteObjCInterfaceDecl(interface_decl);
-    }
-  } else if (ObjCProtocolDecl *protocol_decl =
-                 dyn_cast<ObjCProtocolDecl>(decl)) {
-    if (!protocol_decl->getDefinition())
-      protocol_decl->startDefinition();
-  } else if (TagDecl *tag_decl = dyn_cast<TagDecl>(decl)) {
-    if (!tag_decl->getDefinition() && !tag_decl->isBeingDefined()) {
-      tag_decl->startDefinition();
-      CompleteTagDecl(tag_decl);
-      tag_decl->setCompleteDefinition(true);
-    }
-  } else {
-    assert(0 && "CompleteDecl called on a Decl that can't be completed");
-  }
-}
-
-bool ClangASTImporter::CompleteTagDecl(clang::TagDecl *decl) {
-  DeclOrigin decl_origin = GetDeclOrigin(decl);
-
-  if (!decl_origin.Valid())
-    return false;
-
-  if (!ClangASTContext::GetCompleteDecl(decl_origin.ctx, decl_origin.decl))
-    return false;
-
-  ImporterDelegateSP delegate_sp(
-      GetDelegate(&decl->getASTContext(), decl_origin.ctx));
-
-  ASTImporterDelegate::CxxModuleScope std_scope(*delegate_sp,
-                                                &decl->getASTContext());
-  if (delegate_sp)
-    delegate_sp->ImportDefinitionTo(decl, decl_origin.decl);
-
-  return true;
-}
-
-bool ClangASTImporter::CompleteTagDeclWithOrigin(clang::TagDecl *decl,
-                                                 clang::TagDecl *origin_decl) {
-  clang::ASTContext *origin_ast_ctx = &origin_decl->getASTContext();
-
-  if (!ClangASTContext::GetCompleteDecl(origin_ast_ctx, origin_decl))
-    return false;
-
-  ImporterDelegateSP delegate_sp(
-      GetDelegate(&decl->getASTContext(), origin_ast_ctx));
-
-  if (delegate_sp)
-    delegate_sp->ImportDefinitionTo(decl, origin_decl);
-
-  ASTContextMetadataSP context_md = GetContextMetadata(&decl->getASTContext());
-
-  OriginMap &origins = context_md->m_origins;
-
-  origins[decl] = DeclOrigin(origin_ast_ctx, origin_decl);
-
-  return true;
-}
-
-bool ClangASTImporter::CompleteObjCInterfaceDecl(
-    clang::ObjCInterfaceDecl *interface_decl) {
-  DeclOrigin decl_origin = GetDeclOrigin(interface_decl);
-
-  if (!decl_origin.Valid())
-    return false;
-
-  if (!ClangASTContext::GetCompleteDecl(decl_origin.ctx, decl_origin.decl))
-    return false;
-
-  ImporterDelegateSP delegate_sp(
-      GetDelegate(&interface_decl->getASTContext(), decl_origin.ctx));
-
-  if (delegate_sp)
-    delegate_sp->ImportDefinitionTo(interface_decl, decl_origin.decl);
-
-  if (ObjCInterfaceDecl *super_class = interface_decl->getSuperClass())
-    RequireCompleteType(clang::QualType(super_class->getTypeForDecl(), 0));
-
-  return true;
-}
-
-bool ClangASTImporter::CompleteAndFetchChildren(clang::QualType type) {
-  if (!RequireCompleteType(type))
-    return false;
-
-  Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS);
-
-  if (const TagType *tag_type = type->getAs<TagType>()) {
-    TagDecl *tag_decl = tag_type->getDecl();
-
-    DeclOrigin decl_origin = GetDeclOrigin(tag_decl);
-
-    if (!decl_origin.Valid())
-      return false;
-
-    ImporterDelegateSP delegate_sp(
-        GetDelegate(&tag_decl->getASTContext(), decl_origin.ctx));
-
-    ASTImporterDelegate::CxxModuleScope std_scope(*delegate_sp,
-                                                  &tag_decl->getASTContext());
-
-    TagDecl *origin_tag_decl = llvm::dyn_cast<TagDecl>(decl_origin.decl);
-
-    for (Decl *origin_child_decl : origin_tag_decl->decls()) {
-      llvm::Expected<Decl *> imported_or_err =
-          delegate_sp->Import(origin_child_decl);
-      if (!imported_or_err) {
-        LLDB_LOG_ERROR(log, imported_or_err.takeError(),
-                       "Couldn't import decl: {0}");
-        return false;
-      }
-    }
-
-    if (RecordDecl *record_decl = dyn_cast<RecordDecl>(origin_tag_decl))
-      record_decl->setHasLoadedFieldsFromExternalStorage(true);
-
-    return true;
-  }
-
-  if (const ObjCObjectType *objc_object_type = type->getAs<ObjCObjectType>()) {
-    if (ObjCInterfaceDecl *objc_interface_decl =
-            objc_object_type->getInterface()) {
-      DeclOrigin decl_origin = GetDeclOrigin(objc_interface_decl);
-
-      if (!decl_origin.Valid())
-        return false;
-
-      ImporterDelegateSP delegate_sp(
-          GetDelegate(&objc_interface_decl->getASTContext(), decl_origin.ctx));
-
-      ObjCInterfaceDecl *origin_interface_decl =
-          llvm::dyn_cast<ObjCInterfaceDecl>(decl_origin.decl);
-
-      for (Decl *origin_child_decl : origin_interface_decl->decls()) {
-        llvm::Expected<Decl *> imported_or_err =
-            delegate_sp->Import(origin_child_decl);
-        if (!imported_or_err) {
-          LLDB_LOG_ERROR(log, imported_or_err.takeError(),
-                         "Couldn't import decl: {0}");
-          return false;
-        }
-      }
-
-      return true;
-    }
-    return false;
-  }
-
-  return true;
-}
-
-bool ClangASTImporter::RequireCompleteType(clang::QualType type) {
-  if (type.isNull())
-    return false;
-
-  if (const TagType *tag_type = type->getAs<TagType>()) {
-    TagDecl *tag_decl = tag_type->getDecl();
-
-    if (tag_decl->getDefinition() || tag_decl->isBeingDefined())
-      return true;
-
-    return CompleteTagDecl(tag_decl);
-  }
-  if (const ObjCObjectType *objc_object_type = type->getAs<ObjCObjectType>()) {
-    if (ObjCInterfaceDecl *objc_interface_decl =
-            objc_object_type->getInterface())
-      return CompleteObjCInterfaceDecl(objc_interface_decl);
-    return false;
-  }
-  if (const ArrayType *array_type = type->getAsArrayTypeUnsafe())
-    return RequireCompleteType(array_type->getElementType());
-  if (const AtomicType *atomic_type = type->getAs<AtomicType>())
-    return RequireCompleteType(atomic_type->getPointeeType());
-
-  return true;
-}
-
-ClangASTMetadata *ClangASTImporter::GetDeclMetadata(const clang::Decl *decl) {
-  DeclOrigin decl_origin = GetDeclOrigin(decl);
-
-  if (decl_origin.Valid()) {
-    ClangASTContext *ast = ClangASTContext::GetASTContext(decl_origin.ctx);
-    return ast->GetMetadata(decl_origin.decl);
-  }
-  ClangASTContext *ast = ClangASTContext::GetASTContext(&decl->getASTContext());
-  return ast->GetMetadata(decl);
-}
-
-ClangASTImporter::DeclOrigin
-ClangASTImporter::GetDeclOrigin(const clang::Decl *decl) {
-  ASTContextMetadataSP context_md = GetContextMetadata(&decl->getASTContext());
-
-  OriginMap &origins = context_md->m_origins;
-
-  OriginMap::iterator iter = origins.find(decl);
-
-  if (iter != origins.end())
-    return iter->second;
-  return DeclOrigin();
-}
-
-void ClangASTImporter::SetDeclOrigin(const clang::Decl *decl,
-                                     clang::Decl *original_decl) {
-  ASTContextMetadataSP context_md = GetContextMetadata(&decl->getASTContext());
-
-  OriginMap &origins = context_md->m_origins;
-
-  OriginMap::iterator iter = origins.find(decl);
-
-  if (iter != origins.end()) {
-    iter->second.decl = original_decl;
-    iter->second.ctx = &original_decl->getASTContext();
-    return;
-  }
-  origins[decl] = DeclOrigin(&original_decl->getASTContext(), original_decl);
-}
-
-void ClangASTImporter::RegisterNamespaceMap(const clang::NamespaceDecl *decl,
-                                            NamespaceMapSP &namespace_map) {
-  ASTContextMetadataSP context_md = GetContextMetadata(&decl->getASTContext());
-
-  context_md->m_namespace_maps[decl] = namespace_map;
-}
-
-ClangASTImporter::NamespaceMapSP
-ClangASTImporter::GetNamespaceMap(const clang::NamespaceDecl *decl) {
-  ASTContextMetadataSP context_md = GetContextMetadata(&decl->getASTContext());
-
-  NamespaceMetaMap &namespace_maps = context_md->m_namespace_maps;
-
-  NamespaceMetaMap::iterator iter = namespace_maps.find(decl);
-
-  if (iter != namespace_maps.end())
-    return iter->second;
-  return NamespaceMapSP();
-}
-
-void ClangASTImporter::BuildNamespaceMap(const clang::NamespaceDecl *decl) {
-  assert(decl);
-  ASTContextMetadataSP context_md = GetContextMetadata(&decl->getASTContext());
-
-  const DeclContext *parent_context = decl->getDeclContext();
-  const NamespaceDecl *parent_namespace =
-      dyn_cast<NamespaceDecl>(parent_context);
-  NamespaceMapSP parent_map;
-
-  if (parent_namespace)
-    parent_map = GetNamespaceMap(parent_namespace);
-
-  NamespaceMapSP new_map;
-
-  new_map = std::make_shared<NamespaceMap>();
-
-  if (context_md->m_map_completer) {
-    std::string namespace_string = decl->getDeclName().getAsString();
-
-    context_md->m_map_completer->CompleteNamespaceMap(
-        new_map, ConstString(namespace_string.c_str()), parent_map);
-  }
-
-  context_md->m_namespace_maps[decl] = new_map;
-}
-
-void ClangASTImporter::ForgetDestination(clang::ASTContext *dst_ast) {
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
-
-  LLDB_LOGF(log,
-            "    [ClangASTImporter] Forgetting destination (ASTContext*)%p",
-            static_cast<void *>(dst_ast));
-
-  m_metadata_map.erase(dst_ast);
-}
-
-void ClangASTImporter::ForgetSource(clang::ASTContext *dst_ast,
-                                    clang::ASTContext *src_ast) {
-  ASTContextMetadataSP md = MaybeGetContextMetadata(dst_ast);
-
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
-
-  LLDB_LOGF(log,
-            "    [ClangASTImporter] Forgetting source->dest "
-            "(ASTContext*)%p->(ASTContext*)%p",
-            static_cast<void *>(src_ast), static_cast<void *>(dst_ast));
-
-  if (!md)
-    return;
-
-  md->m_delegates.erase(src_ast);
-
-  for (OriginMap::iterator iter = md->m_origins.begin();
-       iter != md->m_origins.end();) {
-    if (iter->second.ctx == src_ast)
-      md->m_origins.erase(iter++);
-    else
-      ++iter;
-  }
-}
-
-ClangASTImporter::MapCompleter::~MapCompleter() { return; }
-
-llvm::Expected<Decl *>
-ClangASTImporter::ASTImporterDelegate::ImportImpl(Decl *From) {
-  if (m_std_handler) {
-    llvm::Optional<Decl *> D = m_std_handler->Import(From);
-    if (D) {
-      // Make sure we don't use this decl later to map it back to it's original
-      // decl. The decl the CxxModuleHandler created has nothing to do with
-      // the one from debug info, and linking those two would just cause the
-      // ASTImporter to try 'updating' the module decl with the minimal one from
-      // the debug info.
-      m_decls_to_ignore.insert(*D);
-      return *D;
-    }
-  }
-
-  // Check which ASTContext this declaration originally came from.
-  DeclOrigin origin = m_master.GetDeclOrigin(From);
-  // If it originally came from the target ASTContext then we can just
-  // pretend that the original is the one we imported. This can happen for
-  // example when inspecting a persistent declaration from the scratch
-  // ASTContext (which will provide the declaration when parsing the
-  // expression and then we later try to copy the declaration back to the
-  // scratch ASTContext to store the result).
-  // Without this check we would ask the ASTImporter to import a declaration
-  // into the same ASTContext where it came from (which doesn't make a lot of
-  // sense).
-  if (origin.Valid() && origin.ctx == &getToContext()) {
-      RegisterImportedDecl(From, origin.decl);
-      return origin.decl;
-  }
-
-  // This declaration came originally from another ASTContext. Instead of
-  // copying our potentially incomplete 'From' Decl we instead go to the
-  // original ASTContext and copy the original to the target. This is not
-  // only faster than first completing our current decl and then copying it
-  // to the target, but it also prevents that indirectly copying the same
-  // declaration to the same target requires the ASTImporter to merge all
-  // the different decls that appear to come from different ASTContexts (even
-  // though all these different source ASTContexts just got a copy from
-  // one source AST).
-  if (origin.Valid()) {
-    auto R = m_master.CopyDecl(&getToContext(), origin.decl);
-    if (R) {
-      RegisterImportedDecl(From, R);
-      return R;
-    }
-  }
-
-  return ASTImporter::ImportImpl(From);
-}
-
-void ClangASTImporter::ASTImporterDelegate::ImportDefinitionTo(
-    clang::Decl *to, clang::Decl *from) {
-  ASTImporter::Imported(from, to);
-
-  /*
-  if (to_objc_interface)
-      to_objc_interface->startDefinition();
-
-  CXXRecordDecl *to_cxx_record = dyn_cast<CXXRecordDecl>(to);
-
-  if (to_cxx_record)
-      to_cxx_record->startDefinition();
-  */
-
-  Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS);
-
-  if (llvm::Error err = ImportDefinition(from)) {
-    LLDB_LOG_ERROR(log, std::move(err),
-                   "[ClangASTImporter] Error during importing definition: {0}");
-    return;
-  }
-
-  if (clang::TagDecl *to_tag = dyn_cast<clang::TagDecl>(to)) {
-    if (clang::TagDecl *from_tag = dyn_cast<clang::TagDecl>(from)) {
-      to_tag->setCompleteDefinition(from_tag->isCompleteDefinition());
-
-      if (Log *log_ast =
-              lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_AST)) {
-        std::string name_string;
-        if (NamedDecl *from_named_decl = dyn_cast<clang::NamedDecl>(from)) {
-          llvm::raw_string_ostream name_stream(name_string);
-          from_named_decl->printName(name_stream);
-          name_stream.flush();
-        }
-        LLDB_LOG(log_ast, "==== [ClangASTImporter][TUDecl: {0}] Imported "
-                          "({1}Decl*){2}, named {3} (from "
-                          "(Decl*){4})",
-                 static_cast<void *>(to->getTranslationUnitDecl()),
-                 from->getDeclKindName(), static_cast<void *>(to), name_string,
-                 static_cast<void *>(from));
-
-        // Log the AST of the TU.
-        std::string ast_string;
-        llvm::raw_string_ostream ast_stream(ast_string);
-        to->getTranslationUnitDecl()->dump(ast_stream);
-        LLDB_LOG(log_ast, "{0}", ast_string);
-      }
-    }
-  }
-
-  // If we're dealing with an Objective-C class, ensure that the inheritance
-  // has been set up correctly.  The ASTImporter may not do this correctly if
-  // the class was originally sourced from symbols.
-
-  if (ObjCInterfaceDecl *to_objc_interface = dyn_cast<ObjCInterfaceDecl>(to)) {
-    do {
-      ObjCInterfaceDecl *to_superclass = to_objc_interface->getSuperClass();
-
-      if (to_superclass)
-        break; // we're not going to override it if it's set
-
-      ObjCInterfaceDecl *from_objc_interface =
-          dyn_cast<ObjCInterfaceDecl>(from);
-
-      if (!from_objc_interface)
-        break;
-
-      ObjCInterfaceDecl *from_superclass = from_objc_interface->getSuperClass();
-
-      if (!from_superclass)
-        break;
-
-      llvm::Expected<Decl *> imported_from_superclass_decl =
-          Import(from_superclass);
-
-      if (!imported_from_superclass_decl) {
-        LLDB_LOG_ERROR(log, imported_from_superclass_decl.takeError(),
-                       "Couldn't import decl: {0}");
-        break;
-      }
-
-      ObjCInterfaceDecl *imported_from_superclass =
-          dyn_cast<ObjCInterfaceDecl>(*imported_from_superclass_decl);
-
-      if (!imported_from_superclass)
-        break;
-
-      if (!to_objc_interface->hasDefinition())
-        to_objc_interface->startDefinition();
-
-      to_objc_interface->setSuperClass(m_source_ctx->getTrivialTypeSourceInfo(
-          m_source_ctx->getObjCInterfaceType(imported_from_superclass)));
-    } while (false);
-  }
-}
-
-void ClangASTImporter::ASTImporterDelegate::Imported(clang::Decl *from,
-                                                     clang::Decl *to) {
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
-
-  // Some decls shouldn't be tracked here because they were not created by
-  // copying 'from' to 'to'. Just exit early for those.
-  if (m_decls_to_ignore.find(to) != m_decls_to_ignore.end())
-    return clang::ASTImporter::Imported(from, to);
-
-  lldb::user_id_t user_id = LLDB_INVALID_UID;
-  ClangASTMetadata *metadata = m_master.GetDeclMetadata(from);
-  if (metadata)
-    user_id = metadata->GetUserID();
-
-  if (log) {
-    if (NamedDecl *from_named_decl = dyn_cast<clang::NamedDecl>(from)) {
-      std::string name_string;
-      llvm::raw_string_ostream name_stream(name_string);
-      from_named_decl->printName(name_stream);
-      name_stream.flush();
-
-      LLDB_LOGF(log,
-                "    [ClangASTImporter] Imported (%sDecl*)%p, named %s (from "
-                "(Decl*)%p), metadata 0x%" PRIx64,
-                from->getDeclKindName(), static_cast<void *>(to),
-                name_string.c_str(), static_cast<void *>(from), user_id);
-    } else {
-      LLDB_LOGF(log,
-                "    [ClangASTImporter] Imported (%sDecl*)%p (from "
-                "(Decl*)%p), metadata 0x%" PRIx64,
-                from->getDeclKindName(), static_cast<void *>(to),
-                static_cast<void *>(from), user_id);
-    }
-  }
-
-  ASTContextMetadataSP to_context_md =
-      m_master.GetContextMetadata(&to->getASTContext());
-  ASTContextMetadataSP from_context_md =
-      m_master.MaybeGetContextMetadata(m_source_ctx);
-
-  if (from_context_md) {
-    OriginMap &origins = from_context_md->m_origins;
-
-    OriginMap::iterator origin_iter = origins.find(from);
-
-    if (origin_iter != origins.end()) {
-      if (to_context_md->m_origins.find(to) == to_context_md->m_origins.end() ||
-          user_id != LLDB_INVALID_UID) {
-        if (origin_iter->second.ctx != &to->getASTContext())
-          to_context_md->m_origins[to] = origin_iter->second;
-      }
-
-      ImporterDelegateSP direct_completer =
-          m_master.GetDelegate(&to->getASTContext(), origin_iter->second.ctx);
-
-      if (direct_completer.get() != this)
-        direct_completer->ASTImporter::Imported(origin_iter->second.decl, to);
-
-      LLDB_LOGF(log,
-                "    [ClangASTImporter] Propagated origin "
-                "(Decl*)%p/(ASTContext*)%p from (ASTContext*)%p to "
-                "(ASTContext*)%p",
-                static_cast<void *>(origin_iter->second.decl),
-                static_cast<void *>(origin_iter->second.ctx),
-                static_cast<void *>(&from->getASTContext()),
-                static_cast<void *>(&to->getASTContext()));
-    } else {
-      if (m_new_decl_listener)
-        m_new_decl_listener->NewDeclImported(from, to);
-
-      if (to_context_md->m_origins.find(to) == to_context_md->m_origins.end() ||
-          user_id != LLDB_INVALID_UID) {
-        to_context_md->m_origins[to] = DeclOrigin(m_source_ctx, from);
-      }
-
-      LLDB_LOGF(log,
-                "    [ClangASTImporter] Decl has no origin information in "
-                "(ASTContext*)%p",
-                static_cast<void *>(&from->getASTContext()));
-    }
-
-    if (clang::NamespaceDecl *to_namespace =
-            dyn_cast<clang::NamespaceDecl>(to)) {
-      clang::NamespaceDecl *from_namespace =
-          dyn_cast<clang::NamespaceDecl>(from);
-
-      NamespaceMetaMap &namespace_maps = from_context_md->m_namespace_maps;
-
-      NamespaceMetaMap::iterator namespace_map_iter =
-          namespace_maps.find(from_namespace);
-
-      if (namespace_map_iter != namespace_maps.end())
-        to_context_md->m_namespace_maps[to_namespace] =
-            namespace_map_iter->second;
-    }
-  } else {
-    to_context_md->m_origins[to] = DeclOrigin(m_source_ctx, from);
-
-    LLDB_LOGF(log,
-              "    [ClangASTImporter] Sourced origin "
-              "(Decl*)%p/(ASTContext*)%p into (ASTContext*)%p",
-              static_cast<void *>(from), static_cast<void *>(m_source_ctx),
-              static_cast<void *>(&to->getASTContext()));
-  }
-
-  if (TagDecl *from_tag_decl = dyn_cast<TagDecl>(from)) {
-    TagDecl *to_tag_decl = dyn_cast<TagDecl>(to);
-
-    to_tag_decl->setHasExternalLexicalStorage();
-    to_tag_decl->getPrimaryContext()->setMustBuildLookupTable();
-
-    LLDB_LOGF(
-        log,
-        "    [ClangASTImporter] To is a TagDecl - attributes %s%s [%s->%s]",
-        (to_tag_decl->hasExternalLexicalStorage() ? " Lexical" : ""),
-        (to_tag_decl->hasExternalVisibleStorage() ? " Visible" : ""),
-        (from_tag_decl->isCompleteDefinition() ? "complete" : "incomplete"),
-        (to_tag_decl->isCompleteDefinition() ? "complete" : "incomplete"));
-  }
-
-  if (isa<NamespaceDecl>(from)) {
-    NamespaceDecl *to_namespace_decl = dyn_cast<NamespaceDecl>(to);
-
-    m_master.BuildNamespaceMap(to_namespace_decl);
-
-    to_namespace_decl->setHasExternalVisibleStorage();
-  }
-
-  if (isa<ObjCContainerDecl>(from)) {
-    ObjCContainerDecl *to_container_decl = dyn_cast<ObjCContainerDecl>(to);
-
-    to_container_decl->setHasExternalLexicalStorage();
-    to_container_decl->setHasExternalVisibleStorage();
-
-    /*to_interface_decl->setExternallyCompleted();*/
-
-    if (log) {
-      if (ObjCInterfaceDecl *to_interface_decl =
-              llvm::dyn_cast<ObjCInterfaceDecl>(to_container_decl)) {
-        LLDB_LOGF(
-            log,
-            "    [ClangASTImporter] To is an ObjCInterfaceDecl - attributes "
-            "%s%s%s",
-            (to_interface_decl->hasExternalLexicalStorage() ? " Lexical" : ""),
-            (to_interface_decl->hasExternalVisibleStorage() ? " Visible" : ""),
-            (to_interface_decl->hasDefinition() ? " HasDefinition" : ""));
-      } else {
-        LLDB_LOGF(
-            log, "    [ClangASTImporter] To is an %sDecl - attributes %s%s",
-            ((Decl *)to_container_decl)->getDeclKindName(),
-            (to_container_decl->hasExternalLexicalStorage() ? " Lexical" : ""),
-            (to_container_decl->hasExternalVisibleStorage() ? " Visible" : ""));
-      }
-    }
-  }
-}
-
-clang::Decl *
-ClangASTImporter::ASTImporterDelegate::GetOriginalDecl(clang::Decl *To) {
-  return m_master.GetDeclOrigin(To).decl;
-}
diff --git a/gnu/llvm/lldb/source/Symbol/ClangASTMetadata.cpp b/gnu/llvm/lldb/source/Symbol/ClangASTMetadata.cpp
deleted file mode 100644 (file)
index 31b012f..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-//===-- ClangASTMetadata.cpp ------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "lldb/Symbol/ClangASTMetadata.h"
-#include "lldb/Utility/Stream.h"
-
-using namespace lldb_private;
-
-void ClangASTMetadata::Dump(Stream *s) {
-  lldb::user_id_t uid = GetUserID();
-
-  if (uid != LLDB_INVALID_UID) {
-    s->Printf("uid=0x%" PRIx64, uid);
-  }
-
-  uint64_t isa_ptr = GetISAPtr();
-  if (isa_ptr != 0) {
-    s->Printf("isa_ptr=0x%" PRIx64, isa_ptr);
-  }
-
-  const char *obj_ptr_name = GetObjectPtrName();
-  if (obj_ptr_name) {
-    s->Printf("obj_ptr_name=\"%s\" ", obj_ptr_name);
-  }
-
-  if (m_is_dynamic_cxx) {
-    s->Printf("is_dynamic_cxx=%i ", m_is_dynamic_cxx);
-  }
-  s->EOL();
-}
diff --git a/gnu/llvm/lldb/source/Symbol/ClangExternalASTSourceCallbacks.cpp b/gnu/llvm/lldb/source/Symbol/ClangExternalASTSourceCallbacks.cpp
deleted file mode 100644 (file)
index 008c2ac..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-//===-- ClangExternalASTSourceCallbacks.cpp ---------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "lldb/Symbol/ClangExternalASTSourceCallbacks.h"
-#include "lldb/Symbol/ClangASTContext.h"
-
-#include "clang/AST/Decl.h"
-
-using namespace lldb_private;
-
-void ClangExternalASTSourceCallbacks::CompleteType(clang::TagDecl *tag_decl) {
-  m_ast.CompleteTagDecl(tag_decl);
-}
-
-void ClangExternalASTSourceCallbacks::CompleteType(
-    clang::ObjCInterfaceDecl *objc_decl) {
-  m_ast.CompleteObjCInterfaceDecl(objc_decl);
-}
-
-bool ClangExternalASTSourceCallbacks::layoutRecordType(
-    const clang::RecordDecl *Record, uint64_t &Size, uint64_t &Alignment,
-    llvm::DenseMap<const clang::FieldDecl *, uint64_t> &FieldOffsets,
-    llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits> &BaseOffsets,
-    llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits>
-        &VirtualBaseOffsets) {
-  return m_ast.LayoutRecordType(Record, Size, Alignment, FieldOffsets,
-                                BaseOffsets, VirtualBaseOffsets);
-}
-
-void ClangExternalASTSourceCallbacks::FindExternalLexicalDecls(
-    const clang::DeclContext *decl_ctx,
-    llvm::function_ref<bool(clang::Decl::Kind)> IsKindWeWant,
-    llvm::SmallVectorImpl<clang::Decl *> &decls) {
-  if (decl_ctx) {
-    clang::TagDecl *tag_decl = llvm::dyn_cast<clang::TagDecl>(
-        const_cast<clang::DeclContext *>(decl_ctx));
-    if (tag_decl)
-      CompleteType(tag_decl);
-  }
-}
diff --git a/gnu/llvm/lldb/source/Symbol/ClangUtil.cpp b/gnu/llvm/lldb/source/Symbol/ClangUtil.cpp
deleted file mode 100644 (file)
index 52ea4f5..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-//===-- ClangUtil.cpp -------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-// A collection of helper methods and data structures for manipulating clang
-// types and decls.
-//===----------------------------------------------------------------------===//
-
-#include "lldb/Symbol/ClangUtil.h"
-#include "lldb/Symbol/ClangASTContext.h"
-
-using namespace clang;
-using namespace lldb_private;
-
-bool ClangUtil::IsClangType(const CompilerType &ct) {
-  // Invalid types are never Clang types.
-  if (!ct)
-    return false;
-
-  if (llvm::dyn_cast_or_null<ClangASTContext>(ct.GetTypeSystem()) == nullptr)
-    return false;
-
-  if (!ct.GetOpaqueQualType())
-    return false;
-
-  return true;
-}
-
-QualType ClangUtil::GetQualType(const CompilerType &ct) {
-  // Make sure we have a clang type before making a clang::QualType
-  if (!IsClangType(ct))
-    return QualType();
-
-  return QualType::getFromOpaquePtr(ct.GetOpaqueQualType());
-}
-
-QualType ClangUtil::GetCanonicalQualType(const CompilerType &ct) {
-  if (!IsClangType(ct))
-    return QualType();
-
-  return GetQualType(ct).getCanonicalType();
-}
-
-CompilerType ClangUtil::RemoveFastQualifiers(const CompilerType &ct) {
-  if (!IsClangType(ct))
-    return ct;
-
-  QualType qual_type(GetQualType(ct));
-  qual_type.removeLocalFastQualifiers();
-  return CompilerType(ct.GetTypeSystem(), qual_type.getAsOpaquePtr());
-}
-
-clang::TagDecl *ClangUtil::GetAsTagDecl(const CompilerType &type) {
-  clang::QualType qual_type = ClangUtil::GetCanonicalQualType(type);
-  if (qual_type.isNull())
-    return nullptr;
-
-  return qual_type->getAsTagDecl();
-}
-
-std::string ClangUtil::DumpDecl(const clang::Decl *d) {
-  if (!d)
-    return "nullptr";
-
-  std::string result;
-  llvm::raw_string_ostream stream(result);
-  bool deserialize = false;
-  d->dump(stream, deserialize);
-
-  stream.flush();
-  return result;
-}
-
-std::string ClangUtil::ToString(const clang::Type *t) {
-  return clang::QualType(t, 0).getAsString();
-}
-
-std::string ClangUtil::ToString(const CompilerType &c) {
-  return ClangUtil::GetQualType(c).getAsString();
-}
diff --git a/gnu/llvm/lldb/source/Symbol/CxxModuleHandler.cpp b/gnu/llvm/lldb/source/Symbol/CxxModuleHandler.cpp
deleted file mode 100644 (file)
index 19e80e5..0000000
+++ /dev/null
@@ -1,289 +0,0 @@
-//===-- CxxModuleHandler.cpp ------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "lldb/Symbol/CxxModuleHandler.h"
-
-#include "lldb/Symbol/ClangASTContext.h"
-#include "lldb/Utility/Log.h"
-#include "clang/Sema/Lookup.h"
-#include "llvm/Support/Error.h"
-
-using namespace lldb_private;
-using namespace clang;
-
-CxxModuleHandler::CxxModuleHandler(ASTImporter &importer, ASTContext *target)
-    : m_importer(&importer),
-      m_sema(ClangASTContext::GetASTContext(target)->getSema()) {
-
-  std::initializer_list<const char *> supported_names = {
-      // containers
-      "deque",
-      "forward_list",
-      "list",
-      "queue",
-      "stack",
-      "vector",
-      // pointers
-      "shared_ptr",
-      "unique_ptr",
-      "weak_ptr",
-      // utility
-      "allocator",
-  };
-  m_supported_templates.insert(supported_names.begin(), supported_names.end());
-}
-
-/// Builds a list of scopes that point into the given context.
-///
-/// \param sema The sema that will be using the scopes.
-/// \param ctxt The context that the scope should look into.
-/// \param result A list of scopes. The scopes need to be freed by the caller
-///               (except the TUScope which is owned by the sema).
-static void makeScopes(Sema &sema, DeclContext *ctxt,
-                       std::vector<Scope *> &result) {
-  // FIXME: The result should be a list of unique_ptrs, but the TUScope makes
-  // this currently impossible as it's owned by the Sema.
-
-  if (auto parent = ctxt->getParent()) {
-    makeScopes(sema, parent, result);
-
-    Scope *scope =
-        new Scope(result.back(), Scope::DeclScope, sema.getDiagnostics());
-    scope->setEntity(ctxt);
-    result.push_back(scope);
-  } else
-    result.push_back(sema.TUScope);
-}
-
-/// Uses the Sema to look up the given name in the given DeclContext.
-static std::unique_ptr<LookupResult>
-emulateLookupInCtxt(Sema &sema, llvm::StringRef name, DeclContext *ctxt) {
-  IdentifierInfo &ident = sema.getASTContext().Idents.get(name);
-
-  std::unique_ptr<LookupResult> lookup_result;
-  lookup_result.reset(new LookupResult(sema, DeclarationName(&ident),
-                                       SourceLocation(),
-                                       Sema::LookupOrdinaryName));
-
-  // Usually during parsing we already encountered the scopes we would use. But
-  // here don't have these scopes so we have to emulate the behavior of the
-  // Sema during parsing.
-  std::vector<Scope *> scopes;
-  makeScopes(sema, ctxt, scopes);
-
-  // Now actually perform the lookup with the sema.
-  sema.LookupName(*lookup_result, scopes.back());
-
-  // Delete all the allocated scopes beside the translation unit scope (which
-  // has depth 0).
-  for (Scope *s : scopes)
-    if (s->getDepth() != 0)
-      delete s;
-
-  return lookup_result;
-}
-
-/// Error class for handling problems when finding a certain DeclContext.
-struct MissingDeclContext : public llvm::ErrorInfo<MissingDeclContext> {
-
-  static char ID;
-
-  MissingDeclContext(DeclContext *context, std::string error)
-      : m_context(context), m_error(error) {}
-
-  DeclContext *m_context;
-  std::string m_error;
-
-  void log(llvm::raw_ostream &OS) const override {
-    OS << llvm::formatv("error when reconstructing context of kind {0}:{1}",
-                        m_context->getDeclKindName(), m_error);
-  }
-
-  std::error_code convertToErrorCode() const override {
-    return llvm::inconvertibleErrorCode();
-  }
-};
-
-char MissingDeclContext::ID = 0;
-
-/// Given a foreign decl context, this function finds the equivalent local
-/// decl context in the ASTContext of the given Sema. Potentially deserializes
-/// decls from the 'std' module if necessary.
-static llvm::Expected<DeclContext *>
-getEqualLocalDeclContext(Sema &sema, DeclContext *foreign_ctxt) {
-
-  // Inline namespaces don't matter for lookups, so let's skip them.
-  while (foreign_ctxt && foreign_ctxt->isInlineNamespace())
-    foreign_ctxt = foreign_ctxt->getParent();
-
-  // If the foreign context is the TU, we just return the local TU.
-  if (foreign_ctxt->isTranslationUnit())
-    return sema.getASTContext().getTranslationUnitDecl();
-
-  // Recursively find/build the parent DeclContext.
-  llvm::Expected<DeclContext *> parent =
-      getEqualLocalDeclContext(sema, foreign_ctxt->getParent());
-  if (!parent)
-    return parent;
-
-  // We currently only support building namespaces.
-  if (foreign_ctxt->isNamespace()) {
-    NamedDecl *ns = llvm::dyn_cast<NamedDecl>(foreign_ctxt);
-    llvm::StringRef ns_name = ns->getName();
-
-    auto lookup_result = emulateLookupInCtxt(sema, ns_name, *parent);
-    for (NamedDecl *named_decl : *lookup_result) {
-      if (DeclContext *DC = llvm::dyn_cast<DeclContext>(named_decl))
-        return DC->getPrimaryContext();
-    }
-    return llvm::make_error<MissingDeclContext>(
-        foreign_ctxt,
-        "Couldn't find namespace " + ns->getQualifiedNameAsString());
-  }
-
-  return llvm::make_error<MissingDeclContext>(foreign_ctxt, "Unknown context ");
-}
-
-/// Returns true iff tryInstantiateStdTemplate supports instantiating a template
-/// with the given template arguments.
-static bool templateArgsAreSupported(ArrayRef<TemplateArgument> a) {
-  for (const TemplateArgument &arg : a) {
-    switch (arg.getKind()) {
-    case TemplateArgument::Type:
-    case TemplateArgument::Integral:
-      break;
-    default:
-      // TemplateArgument kind hasn't been handled yet.
-      return false;
-    }
-  }
-  return true;
-}
-
-/// Constructor function for Clang declarations. Ensures that the created
-/// declaration is registered with the ASTImporter.
-template <typename T, typename... Args>
-T *createDecl(ASTImporter &importer, Decl *from_d, Args &&... args) {
-  T *to_d = T::Create(std::forward<Args>(args)...);
-  importer.RegisterImportedDecl(from_d, to_d);
-  return to_d;
-}
-
-llvm::Optional<Decl *> CxxModuleHandler::tryInstantiateStdTemplate(Decl *d) {
-  Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS);
-
-  // If we don't have a template to instiantiate, then there is nothing to do.
-  auto td = dyn_cast<ClassTemplateSpecializationDecl>(d);
-  if (!td)
-    return {};
-
-  // We only care about templates in the std namespace.
-  if (!td->getDeclContext()->isStdNamespace())
-    return {};
-
-  // We have a whitelist of supported template names.
-  if (m_supported_templates.find(td->getName()) == m_supported_templates.end())
-    return {};
-
-  // Early check if we even support instantiating this template. We do this
-  // before we import anything into the target AST.
-  auto &foreign_args = td->getTemplateInstantiationArgs();
-  if (!templateArgsAreSupported(foreign_args.asArray()))
-    return {};
-
-  // Find the local DeclContext that corresponds to the DeclContext of our
-  // decl we want to import.
-  llvm::Expected<DeclContext *> to_context =
-      getEqualLocalDeclContext(*m_sema, td->getDeclContext());
-  if (!to_context) {
-    LLDB_LOG_ERROR(log, to_context.takeError(),
-                   "Got error while searching equal local DeclContext for decl "
-                   "'{1}':\n{0}",
-                   td->getName());
-    return {};
-  }
-
-  // Look up the template in our local context.
-  std::unique_ptr<LookupResult> lookup =
-      emulateLookupInCtxt(*m_sema, td->getName(), *to_context);
-
-  ClassTemplateDecl *new_class_template = nullptr;
-  for (auto LD : *lookup) {
-    if ((new_class_template = dyn_cast<ClassTemplateDecl>(LD)))
-      break;
-  }
-  if (!new_class_template)
-    return {};
-
-  // Import the foreign template arguments.
-  llvm::SmallVector<TemplateArgument, 4> imported_args;
-
-  // If this logic is changed, also update templateArgsAreSupported.
-  for (const TemplateArgument &arg : foreign_args.asArray()) {
-    switch (arg.getKind()) {
-    case TemplateArgument::Type: {
-      llvm::Expected<QualType> type = m_importer->Import(arg.getAsType());
-      if (!type) {
-        LLDB_LOG_ERROR(log, type.takeError(), "Couldn't import type: {0}");
-        return {};
-      }
-      imported_args.push_back(TemplateArgument(*type));
-      break;
-    }
-    case TemplateArgument::Integral: {
-      llvm::APSInt integral = arg.getAsIntegral();
-      llvm::Expected<QualType> type =
-          m_importer->Import(arg.getIntegralType());
-      if (!type) {
-        LLDB_LOG_ERROR(log, type.takeError(), "Couldn't import type: {0}");
-        return {};
-      }
-      imported_args.push_back(
-          TemplateArgument(d->getASTContext(), integral, *type));
-      break;
-    }
-    default:
-      assert(false && "templateArgsAreSupported not updated?");
-    }
-  }
-
-  // Find the class template specialization declaration that
-  // corresponds to these arguments.
-  void *InsertPos = nullptr;
-  ClassTemplateSpecializationDecl *result =
-      new_class_template->findSpecialization(imported_args, InsertPos);
-
-  if (result) {
-    // We found an existing specialization in the module that fits our arguments
-    // so we can treat it as the result and register it with the ASTImporter.
-    m_importer->RegisterImportedDecl(d, result);
-    return result;
-  }
-
-  // Instantiate the template.
-  result = createDecl<ClassTemplateSpecializationDecl>(
-      *m_importer, d, m_sema->getASTContext(),
-      new_class_template->getTemplatedDecl()->getTagKind(),
-      new_class_template->getDeclContext(),
-      new_class_template->getTemplatedDecl()->getLocation(),
-      new_class_template->getLocation(), new_class_template, imported_args,
-      nullptr);
-
-  new_class_template->AddSpecialization(result, InsertPos);
-  if (new_class_template->isOutOfLine())
-    result->setLexicalDeclContext(
-        new_class_template->getLexicalDeclContext());
-  return result;
-}
-
-llvm::Optional<Decl *> CxxModuleHandler::Import(Decl *d) {
-  if (!isValid())
-    return {};
-
-  return tryInstantiateStdTemplate(d);
-}
index dce32ad..eef3586 100644 (file)
@@ -11,6 +11,7 @@
 #include "Plugins/Process/Utility/LinuxSignals.h"
 #include "Plugins/Process/Utility/MipsLinuxSignals.h"
 #include "Plugins/Process/Utility/NetBSDSignals.h"
+#include "Plugins/Process/Utility/OpenBSDSignals.h"
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Host/StringConvert.h"
 #include "lldb/Utility/ArchSpec.h"
@@ -42,8 +43,9 @@ lldb::UnixSignalsSP UnixSignals::Create(const ArchSpec &arch) {
     }
   }
   case llvm::Triple::FreeBSD:
-  case llvm::Triple::OpenBSD:
     return std::make_shared<FreeBSDSignals>();
+  case llvm::Triple::OpenBSD:
+    return std::make_shared<OpenBSDSignals>();
   case llvm::Triple::NetBSD:
     return std::make_shared<NetBSDSignals>();
   default:
index ca1ce4b..9cfed9e 100644 (file)
@@ -205,6 +205,8 @@ static const CoreDefinition g_core_definitions[] = {
      ArchSpec::eCore_x86_64_x86_64, "x86_64"},
     {eByteOrderLittle, 8, 1, 15, llvm::Triple::x86_64,
      ArchSpec::eCore_x86_64_x86_64h, "x86_64h"},
+    {eByteOrderLittle, 8, 1, 15, llvm::Triple::x86_64,
+     ArchSpec::eCore_x86_64_amd64, "amd64"},
     {eByteOrderLittle, 4, 4, 4, llvm::Triple::hexagon,
      ArchSpec::eCore_hexagon_generic, "hexagon"},
     {eByteOrderLittle, 4, 4, 4, llvm::Triple::hexagon,
@@ -1208,9 +1210,17 @@ static bool cores_match(const ArchSpec::Core core1, const ArchSpec::Core core2,
 
   case ArchSpec::eCore_x86_64_x86_64h:
     if (!enforce_exact_match) {
+      if (core2 == ArchSpec::eCore_x86_64_x86_64)
+        return true;
       try_inverse = false;
+    }
+    break;
+
+  case ArchSpec::eCore_x86_64_amd64:
+    if (!enforce_exact_match) {
       if (core2 == ArchSpec::eCore_x86_64_x86_64)
         return true;
+      try_inverse = false;
     }
     break;
 
diff --git a/gnu/llvm/lldb/source/Utility/SharingPtr.cpp b/gnu/llvm/lldb/source/Utility/SharingPtr.cpp
deleted file mode 100644 (file)
index 45f2a77..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-//===---------------------SharingPtr.cpp ------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "lldb/Utility/SharingPtr.h"
-
-#if defined(ENABLE_SP_LOGGING)
-
-// If ENABLE_SP_LOGGING is defined, then log all shared pointer assignments and
-// allow them to be queried using a pointer by a call to:
-#include <assert.h>
-#include <execinfo.h>
-
-#include "llvm/ADT/STLExtras.h"
-
-#include <map>
-#include <mutex>
-#include <vector>
-
-class Backtrace {
-public:
-  Backtrace();
-
-  ~Backtrace();
-
-  void GetFrames();
-
-  void Dump() const;
-
-private:
-  void *m_sp_this;
-  std::vector<void *> m_frames;
-};
-
-Backtrace::Backtrace() : m_frames() {}
-
-Backtrace::~Backtrace() {}
-
-void Backtrace::GetFrames() {
-  void *frames[1024];
-  const int count = ::backtrace(frames, llvm::array_lengthof(frames));
-  if (count > 2)
-    m_frames.assign(frames + 2, frames + (count - 2));
-}
-
-void Backtrace::Dump() const {
-  if (!m_frames.empty())
-    ::backtrace_symbols_fd(m_frames.data(), m_frames.size(), STDOUT_FILENO);
-  write(STDOUT_FILENO, "\n\n", 2);
-}
-
-extern "C" void track_sp(void *sp_this, void *ptr, long use_count) {
-  typedef std::pair<void *, Backtrace> PtrBacktracePair;
-  typedef std::map<void *, PtrBacktracePair> PtrToBacktraceMap;
-  static std::mutex g_mutex;
-  std::lock_guard<std::mutex> guard(g_mutex);
-  static PtrToBacktraceMap g_map;
-
-  if (sp_this) {
-    printf("sp(%p) -> %p %lu\n", sp_this, ptr, use_count);
-
-    if (ptr) {
-      Backtrace bt;
-      bt.GetFrames();
-      g_map[sp_this] = std::make_pair(ptr, bt);
-    } else {
-      g_map.erase(sp_this);
-    }
-  } else {
-    if (ptr)
-      printf("Searching for shared pointers that are tracking %p: ", ptr);
-    else
-      printf("Dump all live shared pointres: ");
-
-    uint32_t matches = 0;
-    PtrToBacktraceMap::iterator pos, end = g_map.end();
-    for (pos = g_map.begin(); pos != end; ++pos) {
-      if (ptr == NULL || pos->second.first == ptr) {
-        ++matches;
-        printf("\nsp(%p): %p\n", pos->first, pos->second.first);
-        pos->second.second.Dump();
-      }
-    }
-    if (matches == 0) {
-      printf("none.\n");
-    }
-  }
-}
-// Put dump_sp_refs in the lldb namespace to it gets through our exports lists
-// filter in the LLDB.framework or lldb.so
-namespace lldb {
-
-void dump_sp_refs(void *ptr) {
-  // Use a specially crafted call to "track_sp" which will dump info on all
-  // live shared pointers that reference "ptr"
-  track_sp(NULL, ptr, 0);
-}
-}
-
-#endif
-
-namespace lldb_private {
-
-namespace imp {
-
-shared_count::~shared_count() {}
-
-void shared_count::add_shared() {
-#ifdef _MSC_VER
-  _InterlockedIncrement(&shared_owners_);
-#else
-  ++shared_owners_;
-#endif
-}
-
-void shared_count::release_shared() {
-#ifdef _MSC_VER
-  if (_InterlockedDecrement(&shared_owners_) == -1)
-#else
-  if (--shared_owners_ == -1)
-#endif
-  {
-    on_zero_shared();
-    delete this;
-  }
-}
-
-} // imp
-
-} // namespace lldb
diff --git a/gnu/llvm/lldb/tools/debugserver/source/MacOSX/ppc/DNBArchImpl.cpp b/gnu/llvm/lldb/tools/debugserver/source/MacOSX/ppc/DNBArchImpl.cpp
deleted file mode 100644 (file)
index c6671b5..0000000
+++ /dev/null
@@ -1,487 +0,0 @@
-//===-- DNBArchImpl.cpp -----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-//  Created by Greg Clayton on 6/25/07.
-//
-//===----------------------------------------------------------------------===//
-
-#if defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__)
-
-#if __DARWIN_UNIX03
-#define PREFIX_DOUBLE_UNDERSCORE_DARWIN_UNIX03(reg) __##reg
-#else
-#define PREFIX_DOUBLE_UNDERSCORE_DARWIN_UNIX03(reg) reg
-#endif
-
-#include "MacOSX/ppc/DNBArchImpl.h"
-#include "DNBBreakpoint.h"
-#include "DNBLog.h"
-#include "DNBRegisterInfo.h"
-#include "MacOSX/MachThread.h"
-
-static const uint8_t g_breakpoint_opcode[] = {0x7F, 0xC0, 0x00, 0x08};
-
-const uint8_t *DNBArchMachPPC::SoftwareBreakpointOpcode(nub_size_t size) {
-  if (size == 4)
-    return g_breakpoint_opcode;
-  return NULL;
-}
-
-uint32_t DNBArchMachPPC::GetCPUType() { return CPU_TYPE_POWERPC; }
-
-uint64_t DNBArchMachPPC::GetPC(uint64_t failValue) {
-  // Get program counter
-  if (GetGPRState(false) == KERN_SUCCESS)
-    return m_state.gpr.PREFIX_DOUBLE_UNDERSCORE_DARWIN_UNIX03(srr0);
-  return failValue;
-}
-
-kern_return_t DNBArchMachPPC::SetPC(uint64_t value) {
-  // Get program counter
-  kern_return_t err = GetGPRState(false);
-  if (err == KERN_SUCCESS) {
-    m_state.gpr.PREFIX_DOUBLE_UNDERSCORE_DARWIN_UNIX03(srr0) = value;
-    err = SetGPRState();
-  }
-  return err == KERN_SUCCESS;
-}
-
-uint64_t DNBArchMachPPC::GetSP(uint64_t failValue) {
-  // Get stack pointer
-  if (GetGPRState(false) == KERN_SUCCESS)
-    return m_state.gpr.PREFIX_DOUBLE_UNDERSCORE_DARWIN_UNIX03(r1);
-  return failValue;
-}
-
-kern_return_t DNBArchMachPPC::GetGPRState(bool force) {
-  if (force || m_state.GetError(e_regSetGPR, Read)) {
-    mach_msg_type_number_t count = e_regSetWordSizeGPR;
-    m_state.SetError(e_regSetGPR, Read,
-                     ::thread_get_state(m_thread->MachPortNumber(), e_regSetGPR,
-                                        (thread_state_t)&m_state.gpr, &count));
-  }
-  return m_state.GetError(e_regSetGPR, Read);
-}
-
-kern_return_t DNBArchMachPPC::GetFPRState(bool force) {
-  if (force || m_state.GetError(e_regSetFPR, Read)) {
-    mach_msg_type_number_t count = e_regSetWordSizeFPR;
-    m_state.SetError(e_regSetFPR, Read,
-                     ::thread_get_state(m_thread->MachPortNumber(), e_regSetFPR,
-                                        (thread_state_t)&m_state.fpr, &count));
-  }
-  return m_state.GetError(e_regSetFPR, Read);
-}
-
-kern_return_t DNBArchMachPPC::GetEXCState(bool force) {
-  if (force || m_state.GetError(e_regSetEXC, Read)) {
-    mach_msg_type_number_t count = e_regSetWordSizeEXC;
-    m_state.SetError(e_regSetEXC, Read,
-                     ::thread_get_state(m_thread->MachPortNumber(), e_regSetEXC,
-                                        (thread_state_t)&m_state.exc, &count));
-  }
-  return m_state.GetError(e_regSetEXC, Read);
-}
-
-kern_return_t DNBArchMachPPC::GetVECState(bool force) {
-  if (force || m_state.GetError(e_regSetVEC, Read)) {
-    mach_msg_type_number_t count = e_regSetWordSizeVEC;
-    m_state.SetError(e_regSetVEC, Read,
-                     ::thread_get_state(m_thread->MachPortNumber(), e_regSetVEC,
-                                        (thread_state_t)&m_state.vec, &count));
-  }
-  return m_state.GetError(e_regSetVEC, Read);
-}
-
-kern_return_t DNBArchMachPPC::SetGPRState() {
-  m_state.SetError(e_regSetGPR, Write,
-                   ::thread_set_state(m_thread->MachPortNumber(), e_regSetGPR,
-                                      (thread_state_t)&m_state.gpr,
-                                      e_regSetWordSizeGPR));
-  return m_state.GetError(e_regSetGPR, Write);
-}
-
-kern_return_t DNBArchMachPPC::SetFPRState() {
-  m_state.SetError(e_regSetFPR, Write,
-                   ::thread_set_state(m_thread->MachPortNumber(), e_regSetFPR,
-                                      (thread_state_t)&m_state.fpr,
-                                      e_regSetWordSizeFPR));
-  return m_state.GetError(e_regSetFPR, Write);
-}
-
-kern_return_t DNBArchMachPPC::SetEXCState() {
-  m_state.SetError(e_regSetEXC, Write,
-                   ::thread_set_state(m_thread->MachPortNumber(), e_regSetEXC,
-                                      (thread_state_t)&m_state.exc,
-                                      e_regSetWordSizeEXC));
-  return m_state.GetError(e_regSetEXC, Write);
-}
-
-kern_return_t DNBArchMachPPC::SetVECState() {
-  m_state.SetError(e_regSetVEC, Write,
-                   ::thread_set_state(m_thread->MachPortNumber(), e_regSetVEC,
-                                      (thread_state_t)&m_state.vec,
-                                      e_regSetWordSizeVEC));
-  return m_state.GetError(e_regSetVEC, Write);
-}
-
-bool DNBArchMachPPC::ThreadWillResume() {
-  bool success = true;
-
-  // Do we need to step this thread? If so, let the mach thread tell us so.
-  if (m_thread->IsStepping()) {
-    // This is the primary thread, let the arch do anything it needs
-    success = EnableHardwareSingleStep(true) == KERN_SUCCESS;
-  }
-  return success;
-}
-
-bool DNBArchMachPPC::ThreadDidStop() {
-  bool success = true;
-
-  m_state.InvalidateAllRegisterStates();
-
-  // Are we stepping a single instruction?
-  if (GetGPRState(true) == KERN_SUCCESS) {
-    // We are single stepping, was this the primary thread?
-    if (m_thread->IsStepping()) {
-      // This was the primary thread, we need to clear the trace
-      // bit if so.
-      success = EnableHardwareSingleStep(false) == KERN_SUCCESS;
-    } else {
-      // The MachThread will automatically restore the suspend count
-      // in ThreadDidStop(), so we don't need to do anything here if
-      // we weren't the primary thread the last time
-    }
-  }
-  return success;
-}
-
-// Set the single step bit in the processor status register.
-kern_return_t DNBArchMachPPC::EnableHardwareSingleStep(bool enable) {
-  DNBLogThreadedIf(LOG_STEP,
-                   "DNBArchMachPPC::EnableHardwareSingleStep( enable = %d )",
-                   enable);
-  if (GetGPRState(false) == KERN_SUCCESS) {
-    const uint32_t trace_bit = 0x400;
-    if (enable)
-      m_state.gpr.PREFIX_DOUBLE_UNDERSCORE_DARWIN_UNIX03(srr1) |= trace_bit;
-    else
-      m_state.gpr.PREFIX_DOUBLE_UNDERSCORE_DARWIN_UNIX03(srr1) &= ~trace_bit;
-    return SetGPRState();
-  }
-  return m_state.GetError(e_regSetGPR, Read);
-}
-
-// Register information definitions for 32 bit PowerPC.
-
-enum gpr_regnums {
-  e_regNumGPR_srr0,
-  e_regNumGPR_srr1,
-  e_regNumGPR_r0,
-  e_regNumGPR_r1,
-  e_regNumGPR_r2,
-  e_regNumGPR_r3,
-  e_regNumGPR_r4,
-  e_regNumGPR_r5,
-  e_regNumGPR_r6,
-  e_regNumGPR_r7,
-  e_regNumGPR_r8,
-  e_regNumGPR_r9,
-  e_regNumGPR_r10,
-  e_regNumGPR_r11,
-  e_regNumGPR_r12,
-  e_regNumGPR_r13,
-  e_regNumGPR_r14,
-  e_regNumGPR_r15,
-  e_regNumGPR_r16,
-  e_regNumGPR_r17,
-  e_regNumGPR_r18,
-  e_regNumGPR_r19,
-  e_regNumGPR_r20,
-  e_regNumGPR_r21,
-  e_regNumGPR_r22,
-  e_regNumGPR_r23,
-  e_regNumGPR_r24,
-  e_regNumGPR_r25,
-  e_regNumGPR_r26,
-  e_regNumGPR_r27,
-  e_regNumGPR_r28,
-  e_regNumGPR_r29,
-  e_regNumGPR_r30,
-  e_regNumGPR_r31,
-  e_regNumGPR_cr,
-  e_regNumGPR_xer,
-  e_regNumGPR_lr,
-  e_regNumGPR_ctr,
-  e_regNumGPR_mq,
-  e_regNumGPR_vrsave
-};
-
-// General purpose registers
-static DNBRegisterInfo g_gpr_registers[] = {
-    {"srr0", Uint, 4, Hex},   {"srr1", Uint, 4, Hex}, {"r0", Uint, 4, Hex},
-    {"r1", Uint, 4, Hex},     {"r2", Uint, 4, Hex},   {"r3", Uint, 4, Hex},
-    {"r4", Uint, 4, Hex},     {"r5", Uint, 4, Hex},   {"r6", Uint, 4, Hex},
-    {"r7", Uint, 4, Hex},     {"r8", Uint, 4, Hex},   {"r9", Uint, 4, Hex},
-    {"r10", Uint, 4, Hex},    {"r11", Uint, 4, Hex},  {"r12", Uint, 4, Hex},
-    {"r13", Uint, 4, Hex},    {"r14", Uint, 4, Hex},  {"r15", Uint, 4, Hex},
-    {"r16", Uint, 4, Hex},    {"r17", Uint, 4, Hex},  {"r18", Uint, 4, Hex},
-    {"r19", Uint, 4, Hex},    {"r20", Uint, 4, Hex},  {"r21", Uint, 4, Hex},
-    {"r22", Uint, 4, Hex},    {"r23", Uint, 4, Hex},  {"r24", Uint, 4, Hex},
-    {"r25", Uint, 4, Hex},    {"r26", Uint, 4, Hex},  {"r27", Uint, 4, Hex},
-    {"r28", Uint, 4, Hex},    {"r29", Uint, 4, Hex},  {"r30", Uint, 4, Hex},
-    {"r31", Uint, 4, Hex},    {"cr", Uint, 4, Hex},   {"xer", Uint, 4, Hex},
-    {"lr", Uint, 4, Hex},     {"ctr", Uint, 4, Hex},  {"mq", Uint, 4, Hex},
-    {"vrsave", Uint, 4, Hex},
-};
-
-// Floating point registers
-static DNBRegisterInfo g_fpr_registers[] = {
-    {"fp0", IEEE754, 8, Float},  {"fp1", IEEE754, 8, Float},
-    {"fp2", IEEE754, 8, Float},  {"fp3", IEEE754, 8, Float},
-    {"fp4", IEEE754, 8, Float},  {"fp5", IEEE754, 8, Float},
-    {"fp6", IEEE754, 8, Float},  {"fp7", IEEE754, 8, Float},
-    {"fp8", IEEE754, 8, Float},  {"fp9", IEEE754, 8, Float},
-    {"fp10", IEEE754, 8, Float}, {"fp11", IEEE754, 8, Float},
-    {"fp12", IEEE754, 8, Float}, {"fp13", IEEE754, 8, Float},
-    {"fp14", IEEE754, 8, Float}, {"fp15", IEEE754, 8, Float},
-    {"fp16", IEEE754, 8, Float}, {"fp17", IEEE754, 8, Float},
-    {"fp18", IEEE754, 8, Float}, {"fp19", IEEE754, 8, Float},
-    {"fp20", IEEE754, 8, Float}, {"fp21", IEEE754, 8, Float},
-    {"fp22", IEEE754, 8, Float}, {"fp23", IEEE754, 8, Float},
-    {"fp24", IEEE754, 8, Float}, {"fp25", IEEE754, 8, Float},
-    {"fp26", IEEE754, 8, Float}, {"fp27", IEEE754, 8, Float},
-    {"fp28", IEEE754, 8, Float}, {"fp29", IEEE754, 8, Float},
-    {"fp30", IEEE754, 8, Float}, {"fp31", IEEE754, 8, Float},
-    {"fpscr", Uint, 4, Hex}};
-
-// Exception registers
-
-static DNBRegisterInfo g_exc_registers[] = {{"dar", Uint, 4, Hex},
-                                            {"dsisr", Uint, 4, Hex},
-                                            {"exception", Uint, 4, Hex}};
-
-// Altivec registers
-static DNBRegisterInfo g_vec_registers[] = {
-    {"vr0", Vector, 16, VectorOfFloat32},
-    {"vr1", Vector, 16, VectorOfFloat32},
-    {"vr2", Vector, 16, VectorOfFloat32},
-    {"vr3", Vector, 16, VectorOfFloat32},
-    {"vr4", Vector, 16, VectorOfFloat32},
-    {"vr5", Vector, 16, VectorOfFloat32},
-    {"vr6", Vector, 16, VectorOfFloat32},
-    {"vr7", Vector, 16, VectorOfFloat32},
-    {"vr8", Vector, 16, VectorOfFloat32},
-    {"vr9", Vector, 16, VectorOfFloat32},
-    {"vr10", Vector, 16, VectorOfFloat32},
-    {"vr11", Vector, 16, VectorOfFloat32},
-    {"vr12", Vector, 16, VectorOfFloat32},
-    {"vr13", Vector, 16, VectorOfFloat32},
-    {"vr14", Vector, 16, VectorOfFloat32},
-    {"vr15", Vector, 16, VectorOfFloat32},
-    {"vr16", Vector, 16, VectorOfFloat32},
-    {"vr17", Vector, 16, VectorOfFloat32},
-    {"vr18", Vector, 16, VectorOfFloat32},
-    {"vr19", Vector, 16, VectorOfFloat32},
-    {"vr20", Vector, 16, VectorOfFloat32},
-    {"vr21", Vector, 16, VectorOfFloat32},
-    {"vr22", Vector, 16, VectorOfFloat32},
-    {"vr23", Vector, 16, VectorOfFloat32},
-    {"vr24", Vector, 16, VectorOfFloat32},
-    {"vr25", Vector, 16, VectorOfFloat32},
-    {"vr26", Vector, 16, VectorOfFloat32},
-    {"vr27", Vector, 16, VectorOfFloat32},
-    {"vr28", Vector, 16, VectorOfFloat32},
-    {"vr29", Vector, 16, VectorOfFloat32},
-    {"vr30", Vector, 16, VectorOfFloat32},
-    {"vr31", Vector, 16, VectorOfFloat32},
-    {"vscr", Uint, 16, Hex},
-    {"vrvalid", Uint, 4, Hex}};
-
-// Number of registers in each register set
-const size_t k_num_gpr_registers =
-    sizeof(g_gpr_registers) / sizeof(DNBRegisterInfo);
-const size_t k_num_fpr_registers =
-    sizeof(g_fpr_registers) / sizeof(DNBRegisterInfo);
-const size_t k_num_exc_registers =
-    sizeof(g_exc_registers) / sizeof(DNBRegisterInfo);
-const size_t k_num_vec_registers =
-    sizeof(g_vec_registers) / sizeof(DNBRegisterInfo);
-// Total number of registers for this architecture
-const size_t k_num_ppc_registers = k_num_gpr_registers + k_num_fpr_registers +
-                                   k_num_exc_registers + k_num_vec_registers;
-
-// Register set definitions. The first definitions at register set index
-// of zero is for all registers, followed by other registers sets. The
-// register information for the all register set need not be filled in.
-static const DNBRegisterSetInfo g_reg_sets[] = {
-    {"PowerPC Registers", NULL, k_num_ppc_registers},
-    {"General Purpose Registers", g_gpr_registers, k_num_gpr_registers},
-    {"Floating Point Registers", g_fpr_registers, k_num_fpr_registers},
-    {"Exception State Registers", g_exc_registers, k_num_exc_registers},
-    {"Altivec Registers", g_vec_registers, k_num_vec_registers}};
-// Total number of register sets for this architecture
-const size_t k_num_register_sets =
-    sizeof(g_reg_sets) / sizeof(DNBRegisterSetInfo);
-
-const DNBRegisterSetInfo *
-DNBArchMachPPC::GetRegisterSetInfo(nub_size_t *num_reg_sets) const {
-  *num_reg_sets = k_num_register_sets;
-  return g_reg_sets;
-}
-
-bool DNBArchMachPPC::GetRegisterValue(uint32_t set, uint32_t reg,
-                                      DNBRegisterValue *value) const {
-  if (set == REGISTER_SET_GENERIC) {
-    switch (reg) {
-    case GENERIC_REGNUM_PC: // Program Counter
-      set = e_regSetGPR;
-      reg = e_regNumGPR_srr0;
-      break;
-
-    case GENERIC_REGNUM_SP: // Stack Pointer
-      set = e_regSetGPR;
-      reg = e_regNumGPR_r1;
-      break;
-
-    case GENERIC_REGNUM_FP: // Frame Pointer
-      // Return false for now instead of returning r30 as gcc 3.x would
-      // use a variety of registers for the FP and it takes inspecting
-      // the stack to make sure there is a frame pointer before we can
-      // determine the FP.
-      return false;
-
-    case GENERIC_REGNUM_RA: // Return Address
-      set = e_regSetGPR;
-      reg = e_regNumGPR_lr;
-      break;
-
-    case GENERIC_REGNUM_FLAGS: // Processor flags register
-      set = e_regSetGPR;
-      reg = e_regNumGPR_srr1;
-      break;
-
-    default:
-      return false;
-    }
-  }
-
-  if (!m_state.RegsAreValid(set))
-    return false;
-
-  const DNBRegisterInfo *regInfo = m_thread->GetRegisterInfo(set, reg);
-  if (regInfo) {
-    value->info = *regInfo;
-    switch (set) {
-    case e_regSetGPR:
-      if (reg < k_num_gpr_registers) {
-        value->value.uint32 =
-            (&m_state.gpr.PREFIX_DOUBLE_UNDERSCORE_DARWIN_UNIX03(srr0))[reg];
-        return true;
-      }
-      break;
-
-    case e_regSetFPR:
-      if (reg < 32) {
-        value->value.float64 =
-            m_state.fpr.PREFIX_DOUBLE_UNDERSCORE_DARWIN_UNIX03(fpregs)[reg];
-        return true;
-      } else if (reg == 32) {
-        value->value.uint32 =
-            m_state.fpr.PREFIX_DOUBLE_UNDERSCORE_DARWIN_UNIX03(fpscr);
-        return true;
-      }
-      break;
-
-    case e_regSetEXC:
-      if (reg < k_num_exc_registers) {
-        value->value.uint32 =
-            (&m_state.exc.PREFIX_DOUBLE_UNDERSCORE_DARWIN_UNIX03(dar))[reg];
-        return true;
-      }
-      break;
-
-    case e_regSetVEC:
-      if (reg < k_num_vec_registers) {
-        if (reg < 33) // FP0 - FP31 and VSCR
-        {
-          // Copy all 4 uint32 values for this vector register
-          value->value.v_uint32[0] =
-              m_state.vec.PREFIX_DOUBLE_UNDERSCORE_DARWIN_UNIX03(save_vr)[reg]
-                                                                         [0];
-          value->value.v_uint32[1] =
-              m_state.vec.PREFIX_DOUBLE_UNDERSCORE_DARWIN_UNIX03(save_vr)[reg]
-                                                                         [1];
-          value->value.v_uint32[2] =
-              m_state.vec.PREFIX_DOUBLE_UNDERSCORE_DARWIN_UNIX03(save_vr)[reg]
-                                                                         [2];
-          value->value.v_uint32[3] =
-              m_state.vec.PREFIX_DOUBLE_UNDERSCORE_DARWIN_UNIX03(save_vr)[reg]
-                                                                         [3];
-          return true;
-        } else if (reg == 34) // VRVALID
-        {
-          value->value.uint32 =
-              m_state.vec.PREFIX_DOUBLE_UNDERSCORE_DARWIN_UNIX03(save_vrvalid);
-          return true;
-        }
-      }
-      break;
-    }
-  }
-  return false;
-}
-
-kern_return_t DNBArchMachPPC::GetRegisterState(int set, bool force) {
-  switch (set) {
-  case e_regSetALL:
-    return GetGPRState(force) | GetFPRState(force) | GetEXCState(force) |
-           GetVECState(force);
-  case e_regSetGPR:
-    return GetGPRState(force);
-  case e_regSetFPR:
-    return GetFPRState(force);
-  case e_regSetEXC:
-    return GetEXCState(force);
-  case e_regSetVEC:
-    return GetVECState(force);
-  default:
-    break;
-  }
-  return KERN_INVALID_ARGUMENT;
-}
-
-kern_return_t DNBArchMachPPC::SetRegisterState(int set) {
-  // Make sure we have a valid context to set.
-  kern_return_t err = GetRegisterState(set, false);
-  if (err != KERN_SUCCESS)
-    return err;
-
-  switch (set) {
-  case e_regSetALL:
-    return SetGPRState() | SetFPRState() | SetEXCState() | SetVECState();
-  case e_regSetGPR:
-    return SetGPRState();
-  case e_regSetFPR:
-    return SetFPRState();
-  case e_regSetEXC:
-    return SetEXCState();
-  case e_regSetVEC:
-    return SetVECState();
-  default:
-    break;
-  }
-  return KERN_INVALID_ARGUMENT;
-}
-
-bool DNBArchMachPPC::RegisterSetStateIsValid(int set) const {
-  return m_state.RegsAreValid(set);
-}
-
-#endif // #if defined (__powerpc__) || defined (__ppc__) || defined (__ppc64__)
diff --git a/gnu/llvm/lldb/tools/debugserver/source/MacOSX/ppc/DNBArchImpl.h b/gnu/llvm/lldb/tools/debugserver/source/MacOSX/ppc/DNBArchImpl.h
deleted file mode 100644 (file)
index 7d20f18..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-//===-- DNBArchImpl.h -------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-//  Created by Greg Clayton on 6/25/07.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef __DebugNubArchMachPPC_h__
-#define __DebugNubArchMachPPC_h__
-
-#if defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__)
-
-#include "DNBArch.h"
-
-class MachThread;
-
-class DNBArchMachPPC : public DNBArchProtocol {
-public:
-  DNBArchMachPPC(MachThread *thread) : m_thread(thread), m_state() {}
-
-  virtual ~DNBArchMachPPC() {}
-
-  virtual const DNBRegisterSetInfo *
-  GetRegisterSetInfo(nub_size_t *num_reg_sets) const;
-  virtual bool GetRegisterValue(uint32_t set, uint32_t reg,
-                                DNBRegisterValue *value) const;
-  virtual kern_return_t GetRegisterState(int set, bool force);
-  virtual kern_return_t SetRegisterState(int set);
-  virtual bool RegisterSetStateIsValid(int set) const;
-
-  virtual uint64_t GetPC(uint64_t failValue); // Get program counter
-  virtual kern_return_t SetPC(uint64_t value);
-  virtual uint64_t GetSP(uint64_t failValue); // Get stack pointer
-  virtual bool ThreadWillResume();
-  virtual bool ThreadDidStop();
-
-  static const uint8_t *SoftwareBreakpointOpcode(nub_size_t byte_size);
-  static uint32_t GetCPUType();
-
-protected:
-  kern_return_t EnableHardwareSingleStep(bool enable);
-
-  enum RegisterSet {
-    e_regSetALL = REGISTER_SET_ALL,
-    e_regSetGPR,
-    e_regSetFPR,
-    e_regSetEXC,
-    e_regSetVEC,
-    kNumRegisterSets
-  };
-
-  typedef enum RegisterSetWordSizeTag {
-    e_regSetWordSizeGPR = PPC_THREAD_STATE_COUNT,
-    e_regSetWordSizeFPR = PPC_FLOAT_STATE_COUNT,
-    e_regSetWordSizeEXC = PPC_EXCEPTION_STATE_COUNT,
-    e_regSetWordSizeVEC = PPC_VECTOR_STATE_COUNT
-  } RegisterSetWordSize;
-
-  enum { Read = 0, Write = 1, kNumErrors = 2 };
-
-  struct State {
-    ppc_thread_state_t gpr;
-    ppc_float_state_t fpr;
-    ppc_exception_state_t exc;
-    ppc_vector_state_t vec;
-    kern_return_t gpr_errs[2]; // Read/Write errors
-    kern_return_t fpr_errs[2]; // Read/Write errors
-    kern_return_t exc_errs[2]; // Read/Write errors
-    kern_return_t vec_errs[2]; // Read/Write errors
-
-    State() {
-      uint32_t i;
-      for (i = 0; i < kNumErrors; i++) {
-        gpr_errs[i] = -1;
-        fpr_errs[i] = -1;
-        exc_errs[i] = -1;
-        vec_errs[i] = -1;
-      }
-    }
-    void InvalidateAllRegisterStates() { SetError(e_regSetALL, Read, -1); }
-    kern_return_t GetError(int set, uint32_t err_idx) const {
-      if (err_idx < kNumErrors) {
-        switch (set) {
-        // When getting all errors, just OR all values together to see if
-        // we got any kind of error.
-        case e_regSetALL:
-          return gpr_errs[err_idx] | fpr_errs[err_idx] | exc_errs[err_idx] |
-                 vec_errs[err_idx];
-        case e_regSetGPR:
-          return gpr_errs[err_idx];
-        case e_regSetFPR:
-          return fpr_errs[err_idx];
-        case e_regSetEXC:
-          return exc_errs[err_idx];
-        case e_regSetVEC:
-          return vec_errs[err_idx];
-        default:
-          break;
-        }
-      }
-      return -1;
-    }
-    bool SetError(int set, uint32_t err_idx, kern_return_t err) {
-      if (err_idx < kNumErrors) {
-        switch (set) {
-        case e_regSetALL:
-          gpr_errs[err_idx] = fpr_errs[err_idx] = exc_errs[err_idx] =
-              vec_errs[err_idx] = err;
-          return true;
-
-        case e_regSetGPR:
-          gpr_errs[err_idx] = err;
-          return true;
-
-        case e_regSetFPR:
-          fpr_errs[err_idx] = err;
-          return true;
-
-        case e_regSetEXC:
-          exc_errs[err_idx] = err;
-          return true;
-
-        case e_regSetVEC:
-          vec_errs[err_idx] = err;
-          return true;
-
-        default:
-          break;
-        }
-      }
-      return false;
-    }
-    bool RegsAreValid(int set) const {
-      return GetError(set, Read) == KERN_SUCCESS;
-    }
-  };
-
-  kern_return_t GetGPRState(bool force);
-  kern_return_t GetFPRState(bool force);
-  kern_return_t GetEXCState(bool force);
-  kern_return_t GetVECState(bool force);
-
-  kern_return_t SetGPRState();
-  kern_return_t SetFPRState();
-  kern_return_t SetEXCState();
-  kern_return_t SetVECState();
-
-protected:
-  MachThread *m_thread;
-  State m_state;
-};
-
-#endif // #if defined (__powerpc__) || defined (__ppc__) || defined (__ppc64__)
-#endif // #ifndef __DebugNubArchMachPPC_h__
diff --git a/gnu/llvm/lldb/tools/lldb-mi/lldb-mi.exports b/gnu/llvm/lldb/tools/lldb-mi/lldb-mi.exports
deleted file mode 100644 (file)
index e69de29..0000000
index 7443c6c..739bdc3 100644 (file)
@@ -8,6 +8,10 @@ if(CMAKE_SYSTEM_NAME MATCHES "NetBSD")
   list(APPEND LLDB_PLUGINS lldbPluginProcessNetBSD)
 endif()
 
+if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
+  list(APPEND LLDB_PLUGINS lldbPluginProcessOpenBSD)
+endif()
+
 if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
   list(APPEND LLDB_PLUGINS lldbPluginObjectFileMachO)
 elseif(CMAKE_SYSTEM_NAME MATCHES "Windows")
index 5f06503..9648a6a 100644 (file)
@@ -40,6 +40,8 @@
 #include "Plugins/Process/Linux/NativeProcessLinux.h"
 #elif defined(__NetBSD__)
 #include "Plugins/Process/NetBSD/NativeProcessNetBSD.h"
+#elif defined(__OpenBSD__)
+#include "Plugins/Process/OpenBSD/NativeProcessOpenBSD.h"
 #elif defined(_WIN32)
 #include "Plugins/Process/Windows/Common/NativeProcessWindows.h"
 #endif
@@ -63,6 +65,8 @@ namespace {
 typedef process_linux::NativeProcessLinux::Factory NativeProcessFactory;
 #elif defined(__NetBSD__)
 typedef process_netbsd::NativeProcessNetBSD::Factory NativeProcessFactory;
+#elif defined(__OpenBSD__)
+typedef process_openbsd::NativeProcessOpenBSD::Factory NativeProcessFactory;
 #elif defined(_WIN32)
 typedef NativeProcessWindows::Factory NativeProcessFactory;
 #else
diff --git a/gnu/llvm/lldb/unittests/Host/TaskPoolTest.cpp b/gnu/llvm/lldb/unittests/Host/TaskPoolTest.cpp
deleted file mode 100644 (file)
index fea5442..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "gtest/gtest.h"
-
-#include "lldb/Host/TaskPool.h"
-
-using namespace lldb_private;
-
-TEST(TaskPoolTest, AddTask) {
-  auto fn = [](int x) { return x * x + 1; };
-
-  auto f1 = TaskPool::AddTask(fn, 1);
-  auto f2 = TaskPool::AddTask(fn, 2);
-  auto f3 = TaskPool::AddTask(fn, 3);
-  auto f4 = TaskPool::AddTask(fn, 4);
-
-  ASSERT_EQ(10, f3.get());
-  ASSERT_EQ(2, f1.get());
-  ASSERT_EQ(17, f4.get());
-  ASSERT_EQ(5, f2.get());
-}
-
-TEST(TaskPoolTest, RunTasks) {
-  std::vector<int> r(4);
-
-  auto fn = [](int x, int &y) { y = x * x + 1; };
-
-  TaskPool::RunTasks([fn, &r]() { fn(1, r[0]); }, [fn, &r]() { fn(2, r[1]); },
-                     [fn, &r]() { fn(3, r[2]); }, [fn, &r]() { fn(4, r[3]); });
-
-  ASSERT_EQ(2, r[0]);
-  ASSERT_EQ(5, r[1]);
-  ASSERT_EQ(10, r[2]);
-  ASSERT_EQ(17, r[3]);
-}
-
-TEST(TaskPoolTest, TaskMap) {
-  int data[4];
-  auto fn = [&data](int x) { data[x] = x * x; };
-
-  TaskMapOverInt(0, 4, fn);
-
-  ASSERT_EQ(data[0], 0);
-  ASSERT_EQ(data[1], 1);
-  ASSERT_EQ(data[2], 4);
-  ASSERT_EQ(data[3], 9);
-}
diff --git a/gnu/llvm/lldb/unittests/Symbol/TestClangASTContext.cpp b/gnu/llvm/lldb/unittests/Symbol/TestClangASTContext.cpp
deleted file mode 100644 (file)
index 99ef3ed..0000000
+++ /dev/null
@@ -1,525 +0,0 @@
-//===-- TestClangASTContext.cpp ---------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "TestingSupport/SubsystemRAII.h"
-#include "TestingSupport/Symbol/ClangTestUtils.h"
-#include "lldb/Host/FileSystem.h"
-#include "lldb/Host/HostInfo.h"
-#include "lldb/Symbol/ClangASTContext.h"
-#include "lldb/Symbol/ClangUtil.h"
-#include "lldb/Symbol/Declaration.h"
-#include "clang/AST/DeclCXX.h"
-#include "clang/AST/ExprCXX.h"
-#include "gtest/gtest.h"
-
-using namespace clang;
-using namespace lldb;
-using namespace lldb_private;
-
-class TestClangASTContext : public testing::Test {
-public:
-  SubsystemRAII<FileSystem, HostInfo> subsystems;
-
-  void SetUp() override {
-    m_ast.reset(new ClangASTContext(HostInfo::GetTargetTriple()));
-  }
-
-  void TearDown() override { m_ast.reset(); }
-
-protected:
-  std::unique_ptr<ClangASTContext> m_ast;
-
-  QualType GetBasicQualType(BasicType type) const {
-    return ClangUtil::GetQualType(m_ast->GetBasicTypeFromAST(type));
-  }
-
-  QualType GetBasicQualType(const char *name) const {
-    return ClangUtil::GetQualType(
-        m_ast->GetBuiltinTypeByName(ConstString(name)));
-  }
-};
-
-TEST_F(TestClangASTContext, TestGetBasicTypeFromEnum) {
-  clang::ASTContext &context = m_ast->getASTContext();
-
-  EXPECT_TRUE(
-      context.hasSameType(GetBasicQualType(eBasicTypeBool), context.BoolTy));
-  EXPECT_TRUE(
-      context.hasSameType(GetBasicQualType(eBasicTypeChar), context.CharTy));
-  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeChar16),
-                                  context.Char16Ty));
-  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeChar32),
-                                  context.Char32Ty));
-  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeDouble),
-                                  context.DoubleTy));
-  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeDoubleComplex),
-                                  context.DoubleComplexTy));
-  EXPECT_TRUE(
-      context.hasSameType(GetBasicQualType(eBasicTypeFloat), context.FloatTy));
-  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeFloatComplex),
-                                  context.FloatComplexTy));
-  EXPECT_TRUE(
-      context.hasSameType(GetBasicQualType(eBasicTypeHalf), context.HalfTy));
-  EXPECT_TRUE(
-      context.hasSameType(GetBasicQualType(eBasicTypeInt), context.IntTy));
-  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeInt128),
-                                  context.Int128Ty));
-  EXPECT_TRUE(
-      context.hasSameType(GetBasicQualType(eBasicTypeLong), context.LongTy));
-  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeLongDouble),
-                                  context.LongDoubleTy));
-  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeLongDoubleComplex),
-                                  context.LongDoubleComplexTy));
-  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeLongLong),
-                                  context.LongLongTy));
-  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeNullPtr),
-                                  context.NullPtrTy));
-  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeObjCClass),
-                                  context.getObjCClassType()));
-  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeObjCID),
-                                  context.getObjCIdType()));
-  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeObjCSel),
-                                  context.getObjCSelType()));
-  EXPECT_TRUE(
-      context.hasSameType(GetBasicQualType(eBasicTypeShort), context.ShortTy));
-  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeSignedChar),
-                                  context.SignedCharTy));
-  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeUnsignedChar),
-                                  context.UnsignedCharTy));
-  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeUnsignedInt),
-                                  context.UnsignedIntTy));
-  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeUnsignedInt128),
-                                  context.UnsignedInt128Ty));
-  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeUnsignedLong),
-                                  context.UnsignedLongTy));
-  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeUnsignedLongLong),
-                                  context.UnsignedLongLongTy));
-  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeUnsignedShort),
-                                  context.UnsignedShortTy));
-  EXPECT_TRUE(
-      context.hasSameType(GetBasicQualType(eBasicTypeVoid), context.VoidTy));
-  EXPECT_TRUE(
-      context.hasSameType(GetBasicQualType(eBasicTypeWChar), context.WCharTy));
-}
-
-TEST_F(TestClangASTContext, TestGetBasicTypeFromName) {
-  EXPECT_EQ(GetBasicQualType(eBasicTypeChar), GetBasicQualType("char"));
-  EXPECT_EQ(GetBasicQualType(eBasicTypeSignedChar),
-            GetBasicQualType("signed char"));
-  EXPECT_EQ(GetBasicQualType(eBasicTypeUnsignedChar),
-            GetBasicQualType("unsigned char"));
-  EXPECT_EQ(GetBasicQualType(eBasicTypeWChar), GetBasicQualType("wchar_t"));
-  EXPECT_EQ(GetBasicQualType(eBasicTypeSignedWChar),
-            GetBasicQualType("signed wchar_t"));
-  EXPECT_EQ(GetBasicQualType(eBasicTypeUnsignedWChar),
-            GetBasicQualType("unsigned wchar_t"));
-  EXPECT_EQ(GetBasicQualType(eBasicTypeShort), GetBasicQualType("short"));
-  EXPECT_EQ(GetBasicQualType(eBasicTypeShort), GetBasicQualType("short int"));
-  EXPECT_EQ(GetBasicQualType(eBasicTypeUnsignedShort),
-            GetBasicQualType("unsigned short"));
-  EXPECT_EQ(GetBasicQualType(eBasicTypeUnsignedShort),
-            GetBasicQualType("unsigned short int"));
-  EXPECT_EQ(GetBasicQualType(eBasicTypeInt), GetBasicQualType("int"));
-  EXPECT_EQ(GetBasicQualType(eBasicTypeInt), GetBasicQualType("signed int"));
-  EXPECT_EQ(GetBasicQualType(eBasicTypeUnsignedInt),
-            GetBasicQualType("unsigned int"));
-  EXPECT_EQ(GetBasicQualType(eBasicTypeUnsignedInt),
-            GetBasicQualType("unsigned"));
-  EXPECT_EQ(GetBasicQualType(eBasicTypeLong), GetBasicQualType("long"));
-  EXPECT_EQ(GetBasicQualType(eBasicTypeLong), GetBasicQualType("long int"));
-  EXPECT_EQ(GetBasicQualType(eBasicTypeUnsignedLong),
-            GetBasicQualType("unsigned long"));
-  EXPECT_EQ(GetBasicQualType(eBasicTypeUnsignedLong),
-            GetBasicQualType("unsigned long int"));
-  EXPECT_EQ(GetBasicQualType(eBasicTypeLongLong),
-            GetBasicQualType("long long"));
-  EXPECT_EQ(GetBasicQualType(eBasicTypeLongLong),
-            GetBasicQualType("long long int"));
-  EXPECT_EQ(GetBasicQualType(eBasicTypeUnsignedLongLong),
-            GetBasicQualType("unsigned long long"));
-  EXPECT_EQ(GetBasicQualType(eBasicTypeUnsignedLongLong),
-            GetBasicQualType("unsigned long long int"));
-  EXPECT_EQ(GetBasicQualType(eBasicTypeInt128), GetBasicQualType("__int128_t"));
-  EXPECT_EQ(GetBasicQualType(eBasicTypeUnsignedInt128),
-            GetBasicQualType("__uint128_t"));
-  EXPECT_EQ(GetBasicQualType(eBasicTypeVoid), GetBasicQualType("void"));
-  EXPECT_EQ(GetBasicQualType(eBasicTypeBool), GetBasicQualType("bool"));
-  EXPECT_EQ(GetBasicQualType(eBasicTypeFloat), GetBasicQualType("float"));
-  EXPECT_EQ(GetBasicQualType(eBasicTypeDouble), GetBasicQualType("double"));
-  EXPECT_EQ(GetBasicQualType(eBasicTypeLongDouble),
-            GetBasicQualType("long double"));
-  EXPECT_EQ(GetBasicQualType(eBasicTypeObjCID), GetBasicQualType("id"));
-  EXPECT_EQ(GetBasicQualType(eBasicTypeObjCSel), GetBasicQualType("SEL"));
-  EXPECT_EQ(GetBasicQualType(eBasicTypeNullPtr), GetBasicQualType("nullptr"));
-}
-
-void VerifyEncodingAndBitSize(ClangASTContext &clang_context,
-                              lldb::Encoding encoding, unsigned int bit_size) {
-  clang::ASTContext &context = clang_context.getASTContext();
-
-  CompilerType type =
-      clang_context.GetBuiltinTypeForEncodingAndBitSize(encoding, bit_size);
-  EXPECT_TRUE(type.IsValid());
-
-  QualType qtype = ClangUtil::GetQualType(type);
-  EXPECT_FALSE(qtype.isNull());
-  if (qtype.isNull())
-    return;
-
-  uint64_t actual_size = context.getTypeSize(qtype);
-  EXPECT_EQ(bit_size, actual_size);
-
-  const clang::Type *type_ptr = qtype.getTypePtr();
-  EXPECT_NE(nullptr, type_ptr);
-  if (!type_ptr)
-    return;
-
-  EXPECT_TRUE(type_ptr->isBuiltinType());
-  switch (encoding) {
-  case eEncodingSint:
-    EXPECT_TRUE(type_ptr->isSignedIntegerType());
-    break;
-  case eEncodingUint:
-    EXPECT_TRUE(type_ptr->isUnsignedIntegerType());
-    break;
-  case eEncodingIEEE754:
-    EXPECT_TRUE(type_ptr->isFloatingType());
-    break;
-  default:
-    FAIL() << "Unexpected encoding";
-    break;
-  }
-}
-
-TEST_F(TestClangASTContext, TestBuiltinTypeForEncodingAndBitSize) {
-  // Make sure we can get types of every possible size in every possible
-  // encoding.
-  // We can't make any guarantee about which specific type we get, because the
-  // standard
-  // isn't that specific.  We only need to make sure the compiler hands us some
-  // type that
-  // is both a builtin type and matches the requested bit size.
-  VerifyEncodingAndBitSize(*m_ast, eEncodingSint, 8);
-  VerifyEncodingAndBitSize(*m_ast, eEncodingSint, 16);
-  VerifyEncodingAndBitSize(*m_ast, eEncodingSint, 32);
-  VerifyEncodingAndBitSize(*m_ast, eEncodingSint, 64);
-  VerifyEncodingAndBitSize(*m_ast, eEncodingSint, 128);
-
-  VerifyEncodingAndBitSize(*m_ast, eEncodingUint, 8);
-  VerifyEncodingAndBitSize(*m_ast, eEncodingUint, 16);
-  VerifyEncodingAndBitSize(*m_ast, eEncodingUint, 32);
-  VerifyEncodingAndBitSize(*m_ast, eEncodingUint, 64);
-  VerifyEncodingAndBitSize(*m_ast, eEncodingUint, 128);
-
-  VerifyEncodingAndBitSize(*m_ast, eEncodingIEEE754, 32);
-  VerifyEncodingAndBitSize(*m_ast, eEncodingIEEE754, 64);
-}
-
-TEST_F(TestClangASTContext, TestIsClangType) {
-  clang::ASTContext &context = m_ast->getASTContext();
-  lldb::opaque_compiler_type_t bool_ctype =
-      ClangASTContext::GetOpaqueCompilerType(&context, lldb::eBasicTypeBool);
-  CompilerType bool_type(m_ast.get(), bool_ctype);
-  CompilerType record_type = m_ast->CreateRecordType(
-      nullptr, lldb::eAccessPublic, "FooRecord", clang::TTK_Struct,
-      lldb::eLanguageTypeC_plus_plus, nullptr);
-  // Clang builtin type and record type should pass
-  EXPECT_TRUE(ClangUtil::IsClangType(bool_type));
-  EXPECT_TRUE(ClangUtil::IsClangType(record_type));
-
-  // Default constructed type should fail
-  EXPECT_FALSE(ClangUtil::IsClangType(CompilerType()));
-}
-
-TEST_F(TestClangASTContext, TestRemoveFastQualifiers) {
-  CompilerType record_type = m_ast->CreateRecordType(
-      nullptr, lldb::eAccessPublic, "FooRecord", clang::TTK_Struct,
-      lldb::eLanguageTypeC_plus_plus, nullptr);
-  QualType qt;
-
-  qt = ClangUtil::GetQualType(record_type);
-  EXPECT_EQ(0u, qt.getLocalFastQualifiers());
-  record_type = record_type.AddConstModifier();
-  record_type = record_type.AddVolatileModifier();
-  record_type = record_type.AddRestrictModifier();
-  qt = ClangUtil::GetQualType(record_type);
-  EXPECT_NE(0u, qt.getLocalFastQualifiers());
-  record_type = ClangUtil::RemoveFastQualifiers(record_type);
-  qt = ClangUtil::GetQualType(record_type);
-  EXPECT_EQ(0u, qt.getLocalFastQualifiers());
-}
-
-TEST_F(TestClangASTContext, TestConvertAccessTypeToAccessSpecifier) {
-  EXPECT_EQ(AS_none,
-            ClangASTContext::ConvertAccessTypeToAccessSpecifier(eAccessNone));
-  EXPECT_EQ(AS_none, ClangASTContext::ConvertAccessTypeToAccessSpecifier(
-                         eAccessPackage));
-  EXPECT_EQ(AS_public,
-            ClangASTContext::ConvertAccessTypeToAccessSpecifier(eAccessPublic));
-  EXPECT_EQ(AS_private, ClangASTContext::ConvertAccessTypeToAccessSpecifier(
-                            eAccessPrivate));
-  EXPECT_EQ(AS_protected, ClangASTContext::ConvertAccessTypeToAccessSpecifier(
-                              eAccessProtected));
-}
-
-TEST_F(TestClangASTContext, TestUnifyAccessSpecifiers) {
-  // Unifying two of the same type should return the same type
-  EXPECT_EQ(AS_public,
-            ClangASTContext::UnifyAccessSpecifiers(AS_public, AS_public));
-  EXPECT_EQ(AS_private,
-            ClangASTContext::UnifyAccessSpecifiers(AS_private, AS_private));
-  EXPECT_EQ(AS_protected,
-            ClangASTContext::UnifyAccessSpecifiers(AS_protected, AS_protected));
-
-  // Otherwise the result should be the strictest of the two.
-  EXPECT_EQ(AS_private,
-            ClangASTContext::UnifyAccessSpecifiers(AS_private, AS_public));
-  EXPECT_EQ(AS_private,
-            ClangASTContext::UnifyAccessSpecifiers(AS_private, AS_protected));
-  EXPECT_EQ(AS_private,
-            ClangASTContext::UnifyAccessSpecifiers(AS_public, AS_private));
-  EXPECT_EQ(AS_private,
-            ClangASTContext::UnifyAccessSpecifiers(AS_protected, AS_private));
-  EXPECT_EQ(AS_protected,
-            ClangASTContext::UnifyAccessSpecifiers(AS_protected, AS_public));
-  EXPECT_EQ(AS_protected,
-            ClangASTContext::UnifyAccessSpecifiers(AS_public, AS_protected));
-
-  // None is stricter than everything (by convention)
-  EXPECT_EQ(AS_none,
-            ClangASTContext::UnifyAccessSpecifiers(AS_none, AS_public));
-  EXPECT_EQ(AS_none,
-            ClangASTContext::UnifyAccessSpecifiers(AS_none, AS_protected));
-  EXPECT_EQ(AS_none,
-            ClangASTContext::UnifyAccessSpecifiers(AS_none, AS_private));
-  EXPECT_EQ(AS_none,
-            ClangASTContext::UnifyAccessSpecifiers(AS_public, AS_none));
-  EXPECT_EQ(AS_none,
-            ClangASTContext::UnifyAccessSpecifiers(AS_protected, AS_none));
-  EXPECT_EQ(AS_none,
-            ClangASTContext::UnifyAccessSpecifiers(AS_private, AS_none));
-}
-
-TEST_F(TestClangASTContext, TestRecordHasFields) {
-  CompilerType int_type = m_ast->GetBasicType(eBasicTypeInt);
-
-  // Test that a record with no fields returns false
-  CompilerType empty_base = m_ast->CreateRecordType(
-      nullptr, lldb::eAccessPublic, "EmptyBase", clang::TTK_Struct,
-      lldb::eLanguageTypeC_plus_plus, nullptr);
-  ClangASTContext::StartTagDeclarationDefinition(empty_base);
-  ClangASTContext::CompleteTagDeclarationDefinition(empty_base);
-
-  RecordDecl *empty_base_decl = ClangASTContext::GetAsRecordDecl(empty_base);
-  EXPECT_NE(nullptr, empty_base_decl);
-  EXPECT_FALSE(ClangASTContext::RecordHasFields(empty_base_decl));
-
-  // Test that a record with direct fields returns true
-  CompilerType non_empty_base = m_ast->CreateRecordType(
-      nullptr, lldb::eAccessPublic, "NonEmptyBase", clang::TTK_Struct,
-      lldb::eLanguageTypeC_plus_plus, nullptr);
-  ClangASTContext::StartTagDeclarationDefinition(non_empty_base);
-  FieldDecl *non_empty_base_field_decl = m_ast->AddFieldToRecordType(
-      non_empty_base, "MyField", int_type, eAccessPublic, 0);
-  ClangASTContext::CompleteTagDeclarationDefinition(non_empty_base);
-  RecordDecl *non_empty_base_decl =
-      ClangASTContext::GetAsRecordDecl(non_empty_base);
-  EXPECT_NE(nullptr, non_empty_base_decl);
-  EXPECT_NE(nullptr, non_empty_base_field_decl);
-  EXPECT_TRUE(ClangASTContext::RecordHasFields(non_empty_base_decl));
-
-  std::vector<std::unique_ptr<clang::CXXBaseSpecifier>> bases;
-
-  // Test that a record with no direct fields, but fields in a base returns true
-  CompilerType empty_derived = m_ast->CreateRecordType(
-      nullptr, lldb::eAccessPublic, "EmptyDerived", clang::TTK_Struct,
-      lldb::eLanguageTypeC_plus_plus, nullptr);
-  ClangASTContext::StartTagDeclarationDefinition(empty_derived);
-  std::unique_ptr<clang::CXXBaseSpecifier> non_empty_base_spec =
-      m_ast->CreateBaseClassSpecifier(non_empty_base.GetOpaqueQualType(),
-                                      lldb::eAccessPublic, false, false);
-  bases.push_back(std::move(non_empty_base_spec));
-  bool result = m_ast->TransferBaseClasses(empty_derived.GetOpaqueQualType(),
-                                           std::move(bases));
-  ClangASTContext::CompleteTagDeclarationDefinition(empty_derived);
-  EXPECT_TRUE(result);
-  CXXRecordDecl *empty_derived_non_empty_base_cxx_decl =
-      m_ast->GetAsCXXRecordDecl(empty_derived.GetOpaqueQualType());
-  RecordDecl *empty_derived_non_empty_base_decl =
-      ClangASTContext::GetAsRecordDecl(empty_derived);
-  EXPECT_EQ(1u, ClangASTContext::GetNumBaseClasses(
-                    empty_derived_non_empty_base_cxx_decl, false));
-  EXPECT_TRUE(
-      ClangASTContext::RecordHasFields(empty_derived_non_empty_base_decl));
-
-  // Test that a record with no direct fields, but fields in a virtual base
-  // returns true
-  CompilerType empty_derived2 = m_ast->CreateRecordType(
-      nullptr, lldb::eAccessPublic, "EmptyDerived2", clang::TTK_Struct,
-      lldb::eLanguageTypeC_plus_plus, nullptr);
-  ClangASTContext::StartTagDeclarationDefinition(empty_derived2);
-  std::unique_ptr<CXXBaseSpecifier> non_empty_vbase_spec =
-      m_ast->CreateBaseClassSpecifier(non_empty_base.GetOpaqueQualType(),
-                                      lldb::eAccessPublic, true, false);
-  bases.push_back(std::move(non_empty_vbase_spec));
-  result = m_ast->TransferBaseClasses(empty_derived2.GetOpaqueQualType(),
-                                      std::move(bases));
-  ClangASTContext::CompleteTagDeclarationDefinition(empty_derived2);
-  EXPECT_TRUE(result);
-  CXXRecordDecl *empty_derived_non_empty_vbase_cxx_decl =
-      m_ast->GetAsCXXRecordDecl(empty_derived2.GetOpaqueQualType());
-  RecordDecl *empty_derived_non_empty_vbase_decl =
-      ClangASTContext::GetAsRecordDecl(empty_derived2);
-  EXPECT_EQ(1u, ClangASTContext::GetNumBaseClasses(
-                    empty_derived_non_empty_vbase_cxx_decl, false));
-  EXPECT_TRUE(
-      ClangASTContext::RecordHasFields(empty_derived_non_empty_vbase_decl));
-}
-
-TEST_F(TestClangASTContext, TemplateArguments) {
-  ClangASTContext::TemplateParameterInfos infos;
-  infos.names.push_back("T");
-  infos.args.push_back(TemplateArgument(m_ast->getASTContext().IntTy));
-  infos.names.push_back("I");
-  llvm::APSInt arg(llvm::APInt(8, 47));
-  infos.args.push_back(TemplateArgument(m_ast->getASTContext(), arg,
-                                        m_ast->getASTContext().IntTy));
-
-  // template<typename T, int I> struct foo;
-  ClassTemplateDecl *decl = m_ast->CreateClassTemplateDecl(
-      m_ast->GetTranslationUnitDecl(), eAccessPublic, "foo", TTK_Struct, infos);
-  ASSERT_NE(decl, nullptr);
-
-  // foo<int, 47>
-  ClassTemplateSpecializationDecl *spec_decl =
-      m_ast->CreateClassTemplateSpecializationDecl(
-          m_ast->GetTranslationUnitDecl(), decl, TTK_Struct, infos);
-  ASSERT_NE(spec_decl, nullptr);
-  CompilerType type = m_ast->CreateClassTemplateSpecializationType(spec_decl);
-  ASSERT_TRUE(type);
-  m_ast->StartTagDeclarationDefinition(type);
-  m_ast->CompleteTagDeclarationDefinition(type);
-
-  // typedef foo<int, 47> foo_def;
-  CompilerType typedef_type = m_ast->CreateTypedefType(
-      type, "foo_def", m_ast->CreateDeclContext(m_ast->GetTranslationUnitDecl()));
-
-  CompilerType auto_type(
-      m_ast.get(),
-      m_ast->getASTContext()
-          .getAutoType(ClangUtil::GetCanonicalQualType(typedef_type),
-                       clang::AutoTypeKeyword::Auto, false)
-          .getAsOpaquePtr());
-
-  CompilerType int_type(m_ast.get(),
-                        m_ast->getASTContext().IntTy.getAsOpaquePtr());
-  for (CompilerType t : {type, typedef_type, auto_type}) {
-    SCOPED_TRACE(t.GetTypeName().AsCString());
-
-    EXPECT_EQ(m_ast->GetTemplateArgumentKind(t.GetOpaqueQualType(), 0),
-              eTemplateArgumentKindType);
-    EXPECT_EQ(m_ast->GetTypeTemplateArgument(t.GetOpaqueQualType(), 0),
-              int_type);
-    EXPECT_EQ(llvm::None,
-              m_ast->GetIntegralTemplateArgument(t.GetOpaqueQualType(), 0));
-
-    EXPECT_EQ(m_ast->GetTemplateArgumentKind(t.GetOpaqueQualType(), 1),
-              eTemplateArgumentKindIntegral);
-    EXPECT_EQ(m_ast->GetTypeTemplateArgument(t.GetOpaqueQualType(), 1),
-              CompilerType());
-    auto result = m_ast->GetIntegralTemplateArgument(t.GetOpaqueQualType(), 1);
-    ASSERT_NE(llvm::None, result);
-    EXPECT_EQ(arg, result->value);
-    EXPECT_EQ(int_type, result->type);
-  }
-}
-
-static QualType makeConstInt(clang::ASTContext &ctxt) {
-  QualType result(ctxt.IntTy);
-  result.addConst();
-  return result;
-}
-
-TEST_F(TestClangASTContext, TestGetTypeClassDeclType) {
-  clang::ASTContext &ctxt = m_ast->getASTContext();
-  auto *nullptr_expr = new (ctxt) CXXNullPtrLiteralExpr(ctxt.NullPtrTy, SourceLocation());
-  QualType t = ctxt.getDecltypeType(nullptr_expr, makeConstInt(ctxt));
-  EXPECT_EQ(lldb::eTypeClassBuiltin, m_ast->GetTypeClass(t.getAsOpaquePtr()));
-}
-
-TEST_F(TestClangASTContext, TestGetTypeClassTypeOf) {
-  clang::ASTContext &ctxt = m_ast->getASTContext();
-  QualType t = ctxt.getTypeOfType(makeConstInt(ctxt));
-  EXPECT_EQ(lldb::eTypeClassBuiltin, m_ast->GetTypeClass(t.getAsOpaquePtr()));
-}
-
-TEST_F(TestClangASTContext, TestGetTypeClassTypeOfExpr) {
-  clang::ASTContext &ctxt = m_ast->getASTContext();
-  auto *nullptr_expr = new (ctxt) CXXNullPtrLiteralExpr(ctxt.NullPtrTy, SourceLocation());
-  QualType t = ctxt.getTypeOfExprType(nullptr_expr);
-  EXPECT_EQ(lldb::eTypeClassBuiltin, m_ast->GetTypeClass(t.getAsOpaquePtr()));
-}
-
-TEST_F(TestClangASTContext, TestGetTypeClassNested) {
-  clang::ASTContext &ctxt = m_ast->getASTContext();
-  QualType t_base = ctxt.getTypeOfType(makeConstInt(ctxt));
-  QualType t = ctxt.getTypeOfType(t_base);
-  EXPECT_EQ(lldb::eTypeClassBuiltin, m_ast->GetTypeClass(t.getAsOpaquePtr()));
-}
-
-TEST_F(TestClangASTContext, TestFunctionTemplateConstruction) {
-  // Tests creating a function template.
-
-  CompilerType int_type = m_ast->GetBasicType(lldb::eBasicTypeInt);
-  clang::TranslationUnitDecl *TU = m_ast->GetTranslationUnitDecl();
-
-  // Prepare the declarations/types we need for the template.
-  CompilerType clang_type =
-      m_ast->CreateFunctionType(int_type, nullptr, 0U, false, 0U);
-  FunctionDecl *func =
-      m_ast->CreateFunctionDeclaration(TU, "foo", clang_type, 0, false);
-  ClangASTContext::TemplateParameterInfos empty_params;
-
-  // Create the actual function template.
-  clang::FunctionTemplateDecl *func_template =
-      m_ast->CreateFunctionTemplateDecl(TU, func, "foo", empty_params);
-
-  EXPECT_EQ(TU, func_template->getDeclContext());
-  EXPECT_EQ("foo", func_template->getName());
-  EXPECT_EQ(clang::AccessSpecifier::AS_none, func_template->getAccess());
-}
-
-TEST_F(TestClangASTContext, TestFunctionTemplateInRecordConstruction) {
-  // Tests creating a function template inside a record.
-
-  CompilerType int_type = m_ast->GetBasicType(lldb::eBasicTypeInt);
-  clang::TranslationUnitDecl *TU = m_ast->GetTranslationUnitDecl();
-
-  // Create a record we can put the function template int.
-  CompilerType record_type =
-      clang_utils::createRecordWithField(*m_ast, "record", int_type, "field");
-  clang::TagDecl *record = ClangUtil::GetAsTagDecl(record_type);
-
-  // Prepare the declarations/types we need for the template.
-  CompilerType clang_type =
-      m_ast->CreateFunctionType(int_type, nullptr, 0U, false, 0U);
-  // We create the FunctionDecl for the template in the TU DeclContext because:
-  // 1. FunctionDecls can't be in a Record (only CXXMethodDecls can).
-  // 2. It is mirroring the behavior of DWARFASTParserClang::ParseSubroutine.
-  FunctionDecl *func =
-      m_ast->CreateFunctionDeclaration(TU, "foo", clang_type, 0, false);
-  ClangASTContext::TemplateParameterInfos empty_params;
-
-  // Create the actual function template.
-  clang::FunctionTemplateDecl *func_template =
-      m_ast->CreateFunctionTemplateDecl(record, func, "foo", empty_params);
-
-  EXPECT_EQ(record, func_template->getDeclContext());
-  EXPECT_EQ("foo", func_template->getName());
-  EXPECT_EQ(clang::AccessSpecifier::AS_public, func_template->getAccess());
-}
index 6c8bfa1..b3ad351 100644 (file)
@@ -679,6 +679,83 @@ TEST_F(TestArm64InstEmulation, TestRegisterDoubleSpills) {
   }
 }
 
+TEST_F(TestArm64InstEmulation, TestRetguardEmptyFunction) {
+  ArchSpec arch("arm64-unknown-openbsd6.4");
+  std::unique_ptr<UnwindAssemblyInstEmulation> engine(
+      static_cast<UnwindAssemblyInstEmulation *>(
+          UnwindAssemblyInstEmulation::CreateInstance(arch)));
+  ASSERT_NE(nullptr, engine);
+
+  UnwindPlan::RowSP row_sp;
+  AddressRange sample_range;
+  UnwindPlan unwind_plan(eRegisterKindLLDB);
+  UnwindPlan::Row::RegisterLocation regloc;
+
+  // void main() { } compiled on arm64-unknown-openbsd6.4 with -fret-protector
+  uint8_t data[] = {
+       0x2f, 0x37, 0x00, 0xf0, //  0:  adrp    x15, #7237632
+       0xef, 0x35, 0x43, 0xf9, //  4:  ldr     x15, [x15, #1640]
+       0xef, 0x01, 0x1e, 0xca, //  8:  eor     x15, x15, x30
+       0xef, 0x0f, 0x1f, 0xf8, // 12:  str     x15, [sp, #-16]!
+       0xef, 0x07, 0x41, 0xf8, // 16:  ldr     x15, [sp], #16
+       0x29, 0x37, 0x00, 0xf0, // 20:  adrp    x9, #7237632
+       0x29, 0x35, 0x43, 0xf9, // 24:  ldr     x9, [x9, #1640]
+       0xef, 0x01, 0x1e, 0xca, // 28:  eor     x15, x15, x30
+       0xef, 0x01, 0x09, 0xeb, // 32:  subs    x15, x15, x9
+       0x4f, 0x00, 0x00, 0xb4, // 36:  cbz     x15, #8
+       0x20, 0x00, 0x20, 0xd4, // 40:  brk     #0x1
+       0xc0, 0x03, 0x5f, 0xd6, // 44:  ret
+  };
+
+  // UnwindPlan we expect
+  //  0: CFA=sp+0
+  // 16: CFA=sp+16
+  // 20: CFA=sp+0
+  sample_range = AddressRange(0x1000, sizeof(data));
+
+  EXPECT_TRUE(engine->GetNonCallSiteUnwindPlanFromAssembly(
+      sample_range, data, sizeof(data), unwind_plan));
+
+  //  0: CFA=sp+0
+  row_sp = unwind_plan.GetRowForFunctionOffset(0);
+  EXPECT_EQ(0ull, row_sp->GetOffset());
+  EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == gpr_sp_arm64);
+  EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
+  EXPECT_EQ(0, row_sp->GetCFAValue().GetOffset());
+
+  row_sp = unwind_plan.GetRowForFunctionOffset(4);
+  EXPECT_EQ(0ull, row_sp->GetOffset());
+  row_sp = unwind_plan.GetRowForFunctionOffset(8);
+  EXPECT_EQ(0ull, row_sp->GetOffset());
+  row_sp = unwind_plan.GetRowForFunctionOffset(12);
+  EXPECT_EQ(0ull, row_sp->GetOffset());
+
+  // 16: CFA=sp+16
+  row_sp = unwind_plan.GetRowForFunctionOffset(16);
+  EXPECT_EQ(16ull, row_sp->GetOffset());
+  EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == gpr_sp_arm64);
+  EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
+  EXPECT_EQ(16, row_sp->GetCFAValue().GetOffset());
+
+  // 20: CFA=sp+0
+  row_sp = unwind_plan.GetRowForFunctionOffset(20);
+  EXPECT_EQ(20ull, row_sp->GetOffset());
+  EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == gpr_sp_arm64);
+  EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
+  EXPECT_EQ(0, row_sp->GetCFAValue().GetOffset());
+
+  row_sp = unwind_plan.GetRowForFunctionOffset(24);
+  EXPECT_EQ(20ull, row_sp->GetOffset());
+  row_sp = unwind_plan.GetRowForFunctionOffset(28);
+  EXPECT_EQ(20ull, row_sp->GetOffset());
+  row_sp = unwind_plan.GetRowForFunctionOffset(32);
+  EXPECT_EQ(20ull, row_sp->GetOffset());
+  row_sp = unwind_plan.GetRowForFunctionOffset(36);
+  EXPECT_EQ(20ull, row_sp->GetOffset());
+  row_sp = unwind_plan.GetRowForFunctionOffset(40);
+  EXPECT_EQ(20ull, row_sp->GetOffset());
+}
+
 TEST_F(TestArm64InstEmulation, TestCFARegisterTrackedAcrossJumps) {
   ArchSpec arch("arm64-apple-ios10");
   std::unique_ptr<UnwindAssemblyInstEmulation> engine(
index 277cc14..8267ecb 100644 (file)
@@ -2643,6 +2643,181 @@ TEST_F(Testx86AssemblyInspectionEngine, TestDisassemblyJunkBytes) {
 
 }
 
+TEST_F(Testx86AssemblyInspectionEngine, TestRetguard64bitFrameFunction) {
+  std::unique_ptr<x86AssemblyInspectionEngine> engine = Getx86_64Inspector();
+
+  // 'int main() { }' compiled for amd64-unknown-openbsd6.4 with -fret-protector
+  uint8_t data[] = {
+      0x4c, 0x8b, 0x1d, 0xf1, 0x0c, 0x00, 0x00, // offset 0  -- movq 3313(%rip), %r11
+      0x4c, 0x33, 0x1c, 0x24,                   // offset 7  -- xorq (%rsp), %r11
+      0x55,                                     // offset 11 -- pushq %rbp
+      0x48, 0x89, 0xe5,                         // offset 12 -- movq %rsp, %rbp
+      0x41, 0x53,                               // offset 15 -- pushq %r11
+      0x31, 0xc0,                               // offset 17 -- xorl %eax, %eax
+      0x41, 0x5b,                               // offset 19 -- popq %r11
+      0x5d,                                     // offset 21 -- popq %rbp
+      0x4c, 0x33, 0x1c, 0x24,                   // offset 22 -- xorq (%rsp), %r11
+      0x4c, 0x3b, 0x1d, 0xd7, 0x0c, 0x00, 0x00, // offset 26 -- cmp 3287(%rsp), %r11
+      0x0f, 0x84, 0x02, 0x00, 0x00, 0x00,       // offset 33 -- je +2
+      0xcc,                                     // offset 39 -- int3
+      0xcc,                                     // offset 40 -- int3
+      0xc3                                      // offset 41 -- retq
+  };
+
+  AddressRange sample_range(0x1000, sizeof(data));
+
+  UnwindPlan unwind_plan(eRegisterKindLLDB);
+  EXPECT_TRUE(engine->GetNonCallSiteUnwindPlanFromAssembly(
+      data, sizeof(data), sample_range, unwind_plan));
+
+  // We expect 4 rows in the unwind plan, corresponding to offsets
+  // 0:  CFA=rsp+8  => rsp=CFA+0, rip=[CFA-8]
+  // 12: CFA=rsp+16 => rsp=CFA+0, rip=[CFA-8], rbp=[CFA-16]
+  // 15: CFA=rbp+16 => rsp=CFA+0, rip=[CFA-8], rbp=[CFA-16]
+  // 22: CFA=rsp+8  => rsp=CFA+0, rip=[CFA-8]
+
+  EXPECT_TRUE(unwind_plan.GetInitialCFARegister() == k_rsp);
+  EXPECT_TRUE(unwind_plan.GetUnwindPlanValidAtAllInstructions() ==
+              eLazyBoolYes);
+  EXPECT_TRUE(unwind_plan.GetSourcedFromCompiler() == eLazyBoolNo);
+
+  UnwindPlan::Row::RegisterLocation regloc;
+
+  // 0:  CFA=rsp+8  => rsp=CFA+0, rip=[CFA-8]
+  UnwindPlan::RowSP row_sp = unwind_plan.GetRowForFunctionOffset(0);
+  EXPECT_EQ(0ull, row_sp->GetOffset());
+  EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
+  EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
+  EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
+
+  EXPECT_TRUE(row_sp->GetRegisterInfo(k_rsp, regloc));
+  EXPECT_TRUE(regloc.IsCFAPlusOffset());
+  EXPECT_EQ(0, regloc.GetOffset());
+
+  EXPECT_TRUE(row_sp->GetRegisterInfo(k_rip, regloc));
+  EXPECT_TRUE(regloc.IsAtCFAPlusOffset());
+  EXPECT_EQ(-8, regloc.GetOffset());
+
+  row_sp = unwind_plan.GetRowForFunctionOffset(7);
+  EXPECT_EQ(0ull, row_sp->GetOffset());
+  row_sp = unwind_plan.GetRowForFunctionOffset(11);
+  EXPECT_EQ(0ull, row_sp->GetOffset());
+
+  // 12: CFA=rsp+16 => rsp=CFA+0, rip=[CFA-8], rbp=[CFA-16]
+  row_sp = unwind_plan.GetRowForFunctionOffset(12);
+  EXPECT_EQ(12ull, row_sp->GetOffset());
+  EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
+  EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
+  EXPECT_EQ(16, row_sp->GetCFAValue().GetOffset());
+
+  EXPECT_TRUE(row_sp->GetRegisterInfo(k_rsp, regloc));
+  EXPECT_TRUE(regloc.IsCFAPlusOffset());
+  EXPECT_EQ(0, regloc.GetOffset());
+
+  EXPECT_TRUE(row_sp->GetRegisterInfo(k_rip, regloc));
+  EXPECT_TRUE(regloc.IsAtCFAPlusOffset());
+  EXPECT_EQ(-8, regloc.GetOffset());
+
+  EXPECT_TRUE(row_sp->GetRegisterInfo(k_rbp, regloc));
+  EXPECT_TRUE(regloc.IsAtCFAPlusOffset());
+  EXPECT_EQ(-16, regloc.GetOffset());
+
+  // 15: CFA=rbp+16 => rsp=CFA+0, rip=[CFA-8], rbp=[CFA-16]
+  row_sp = unwind_plan.GetRowForFunctionOffset(15);
+  EXPECT_EQ(15ull, row_sp->GetOffset());
+  EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rbp);
+  EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
+  EXPECT_EQ(16, row_sp->GetCFAValue().GetOffset());
+
+  EXPECT_TRUE(row_sp->GetRegisterInfo(k_rsp, regloc));
+  EXPECT_TRUE(regloc.IsCFAPlusOffset());
+  EXPECT_EQ(0, regloc.GetOffset());
+
+  EXPECT_TRUE(row_sp->GetRegisterInfo(k_rip, regloc));
+  EXPECT_TRUE(regloc.IsAtCFAPlusOffset());
+  EXPECT_EQ(-8, regloc.GetOffset());
+
+  EXPECT_TRUE(row_sp->GetRegisterInfo(k_rbp, regloc));
+  EXPECT_TRUE(regloc.IsAtCFAPlusOffset());
+  EXPECT_EQ(-16, regloc.GetOffset());
+
+  row_sp = unwind_plan.GetRowForFunctionOffset(17);
+  EXPECT_EQ(15ull, row_sp->GetOffset());
+  row_sp = unwind_plan.GetRowForFunctionOffset(19);
+  EXPECT_EQ(15ull, row_sp->GetOffset());
+  row_sp = unwind_plan.GetRowForFunctionOffset(21);
+  EXPECT_EQ(15ull, row_sp->GetOffset());
+
+  // 22: CFA=rsp+8  => rsp=CFA+0, rip=[CFA-8]
+  row_sp = unwind_plan.GetRowForFunctionOffset(22);
+  EXPECT_EQ(22ull, row_sp->GetOffset());
+  EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
+  EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
+  EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
+
+  EXPECT_TRUE(row_sp->GetRegisterInfo(k_rsp, regloc));
+  EXPECT_TRUE(regloc.IsCFAPlusOffset());
+  EXPECT_EQ(0, regloc.GetOffset());
+
+  EXPECT_TRUE(row_sp->GetRegisterInfo(k_rip, regloc));
+  EXPECT_TRUE(regloc.IsAtCFAPlusOffset());
+  EXPECT_EQ(-8, regloc.GetOffset());
+
+  row_sp = unwind_plan.GetRowForFunctionOffset(26);
+  EXPECT_EQ(22ull, row_sp->GetOffset());
+  row_sp = unwind_plan.GetRowForFunctionOffset(33);
+  EXPECT_EQ(22ull, row_sp->GetOffset());
+  row_sp = unwind_plan.GetRowForFunctionOffset(39);
+  EXPECT_EQ(22ull, row_sp->GetOffset());
+  row_sp = unwind_plan.GetRowForFunctionOffset(40);
+  EXPECT_EQ(22ull, row_sp->GetOffset());
+  row_sp = unwind_plan.GetRowForFunctionOffset(41);
+  EXPECT_EQ(22ull, row_sp->GetOffset());
+}
+
+TEST_F(Testx86AssemblyInspectionEngine, TestSimple64bitPrologueDetection) {
+  std::unique_ptr<x86AssemblyInspectionEngine> engine = Getx86_64Inspector();
+
+  // 'int main() { }' compiled for x86_64-apple-macosx with clang
+  uint8_t data[] = {
+      0x55,             // offset 0 -- pushq %rbp
+      0x48, 0x89, 0xe5, // offset 1 -- movq %rsp, %rbp
+      0x31, 0xc0,       // offset 4 -- xorl %eax, %eax
+      0x5d,             // offset 6 -- popq %rbp
+      0xc3              // offset 7 -- retq
+  };
+
+  size_t offset = 0;
+  EXPECT_TRUE(engine->FindFirstNonPrologueInstruction(data, sizeof(data), offset));
+  EXPECT_EQ(4ull, offset);
+}
+
+TEST_F(Testx86AssemblyInspectionEngine, TestRetguard64bitPrologueDetection) {
+  std::unique_ptr<x86AssemblyInspectionEngine> engine = Getx86_64Inspector();
+
+  // 'int main() { }' compiled for amd64-unknown-openbsd6.4 with -fret-protector
+  uint8_t data[] = {
+      0x4c, 0x8b, 0x1d, 0xf1, 0x0c, 0x00, 0x00, // offset 0  -- movq 3313(%rip), %r11
+      0x4c, 0x33, 0x1c, 0x24,                   // offset 7  -- xorq (%rsp), %r11
+      0x55,                                     // offset 11 -- pushq %rbp
+      0x48, 0x89, 0xe5,                         // offset 12 -- movq %rsp, %rbp
+      0x41, 0x53,                               // offset 15 -- pushq %r11
+      0x31, 0xc0,                               // offset 17 -- xorl %eax, %eax
+      0x41, 0x5b,                               // offset 19 -- popq %r11
+      0x5d,                                     // offset 21 -- popq %rbp
+      0x4c, 0x33, 0x1c, 0x24,                   // offset 22 -- xorq (%rsp), %r11
+      0x4c, 0x3b, 0x1d, 0xd7, 0x0c, 0x00, 0x00, // offset 26 -- cmp 3287(%rsp), %r11
+      0x0f, 0x84, 0x02, 0x00, 0x00, 0x00,       // offset 33 -- je +2
+      0xcc,                                     // offset 39 -- int3
+      0xcc,                                     // offset 40 -- int3
+      0xc3                                      // offset 41 -- retq
+  };
+
+  size_t offset = 0;
+  EXPECT_TRUE(engine->FindFirstNonPrologueInstruction(data, sizeof(data), offset));
+  EXPECT_EQ(17ull, offset);
+}
+
 TEST_F(Testx86AssemblyInspectionEngine, TestReturnDetect) {
   std::unique_ptr<x86AssemblyInspectionEngine> engine = Getx86_64Inspector();
 
@@ -2670,6 +2845,11 @@ TEST_F(Testx86AssemblyInspectionEngine, TestReturnDetect) {
 
   UnwindPlan unwind_plan(eRegisterKindLLDB);
   EXPECT_TRUE(engine->GetNonCallSiteUnwindPlanFromAssembly(
+  UnwindPlan::RowSP row_sp = unwind_plan.GetRowForFunctionOffset(0);
+  EXPECT_EQ(0ull, row_sp->GetOffset());
+  EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
+  EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
+  EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
       data, sizeof(data), sample_range, unwind_plan));
 
   // Expect following unwind rows:
diff --git a/gnu/llvm/llvm/.arcconfig b/gnu/llvm/llvm/.arcconfig
deleted file mode 100644 (file)
index a8e665b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-{
-  "repository.callsign" : "L",
-  "conduit_uri" : "https://reviews.llvm.org/"
-}
diff --git a/gnu/llvm/llvm/examples/LLJITExamples/CMakeLists.txt b/gnu/llvm/llvm/examples/LLJITExamples/CMakeLists.txt
deleted file mode 100644 (file)
index 3aaaa2c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-add_subdirectory(LLJITDumpObjects)
-add_subdirectory(LLJITWithObjectCache)
-add_subdirectory(LLJITWithCustomObjectLinkingLayer)
diff --git a/gnu/llvm/llvm/examples/LLJITExamples/ExampleModules.h b/gnu/llvm/llvm/examples/LLJITExamples/ExampleModules.h
deleted file mode 100644 (file)
index ae0089f..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-//===----- ExampleModules.h - IR modules for LLJIT examples -----*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// Example modules for LLJIT examples
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_EXAMPLES_HOWTOUSELLJIT_EXAMPLEMODULES_H
-#define LLVM_EXAMPLES_HOWTOUSELLJIT_EXAMPLEMODULES_H
-
-#include "llvm/ADT/StringRef.h"
-#include "llvm/ExecutionEngine/Orc/ThreadSafeModule.h"
-#include "llvm/IR/LLVMContext.h"
-#include "llvm/IR/Module.h"
-#include "llvm/IRReader/IRReader.h"
-#include "llvm/Support/Error.h"
-#include "llvm/Support/SourceMgr.h"
-
-const llvm::StringRef Add1Example =
-    R"(
-  define i32 @add1(i32 %x) {
-  entry:
-    %r = add nsw i32 %x, 1
-    ret i32 %r
-  }
-)";
-
-inline llvm::Expected<llvm::orc::ThreadSafeModule>
-parseExampleModule(llvm::StringRef Source, llvm::StringRef Name) {
-  using namespace llvm;
-  using namespace llvm::orc;
-
-  auto Ctx = std::make_unique<LLVMContext>();
-  SMDiagnostic Err;
-  auto M = parseIR(MemoryBufferRef(Source, Name), Err, *Ctx);
-
-  if (!M) {
-    std::string ErrMsg;
-    {
-      raw_string_ostream ErrStream(ErrMsg);
-      Err.print("", ErrStream);
-    }
-    return make_error<StringError>(std::move(ErrMsg), inconvertibleErrorCode());
-  }
-
-  return ThreadSafeModule(std::move(M), std::move(Ctx));
-}
-
-#endif // LLVM_EXAMPLES_HOWTOUSELLJIT_EXAMPLEMODULES_H
diff --git a/gnu/llvm/llvm/examples/LLJITExamples/LLJITDumpObjects/CMakeLists.txt b/gnu/llvm/llvm/examples/LLJITExamples/LLJITDumpObjects/CMakeLists.txt
deleted file mode 100644 (file)
index bf3bc71..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-set(LLVM_LINK_COMPONENTS
-  Core
-  ExecutionEngine
-  IRReader
-  OrcJIT
-  Support
-  nativecodegen
-  )
-
-add_llvm_example(LLJITDumpObjects
-  LLJITDumpObjects.cpp
-  )
diff --git a/gnu/llvm/llvm/examples/LLJITExamples/LLJITDumpObjects/LLJITDumpObjects.cpp b/gnu/llvm/llvm/examples/LLJITExamples/LLJITDumpObjects/LLJITDumpObjects.cpp
deleted file mode 100644 (file)
index 875292a..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-//===----- LLJITDumpObjects.cpp - How to dump JIT'd objects with LLJIT ----===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/ADT/StringMap.h"
-#include "llvm/ExecutionEngine/Orc/DebugUtils.h"
-#include "llvm/ExecutionEngine/Orc/LLJIT.h"
-#include "llvm/Support/InitLLVM.h"
-#include "llvm/Support/TargetSelect.h"
-#include "llvm/Support/raw_ostream.h"
-
-#include "../ExampleModules.h"
-
-using namespace llvm;
-using namespace llvm::orc;
-
-ExitOnError ExitOnErr;
-
-cl::opt<bool> DumpJITdObjects("dump-jitted-objects",
-                              cl::desc("dump jitted objects"), cl::Optional,
-                              cl::init(true));
-
-cl::opt<std::string> DumpDir("dump-dir",
-                             cl::desc("directory to dump objects to"),
-                             cl::Optional, cl::init(""));
-
-cl::opt<std::string> DumpFileStem("dump-file-stem",
-                                  cl::desc("Override default dump names"),
-                                  cl::Optional, cl::init(""));
-
-int main(int argc, char *argv[]) {
-  // Initialize LLVM.
-  InitLLVM X(argc, argv);
-
-  InitializeNativeTarget();
-  InitializeNativeTargetAsmPrinter();
-
-  cl::ParseCommandLineOptions(argc, argv, "HowToUseLLJIT");
-  ExitOnErr.setBanner(std::string(argv[0]) + ": ");
-
-  outs()
-      << "Usage notes:\n"
-         "  Use -debug-only=orc on debug builds to see log messages of objects "
-         "being dumped\n"
-         "  Specify -dump-dir to specify a dump directory\n"
-         "  Specify -dump-file-stem to override the dump file stem\n"
-         "  Specify -dump-jitted-objects=false to disable dumping\n";
-
-  auto J = ExitOnErr(LLJITBuilder().create());
-
-  if (DumpJITdObjects)
-    J->getObjTransformLayer().setTransform(DumpObjects(DumpDir, DumpFileStem));
-
-  auto M = ExitOnErr(parseExampleModule(Add1Example, "add1"));
-
-  ExitOnErr(J->addIRModule(std::move(M)));
-
-  // Look up the JIT'd function, cast it to a function pointer, then call it.
-  auto Add1Sym = ExitOnErr(J->lookup("add1"));
-  int (*Add1)(int) = (int (*)(int))Add1Sym.getAddress();
-
-  int Result = Add1(42);
-  outs() << "add1(42) = " << Result << "\n";
-
-  return 0;
-}
diff --git a/gnu/llvm/llvm/examples/LLJITExamples/LLJITWithCustomObjectLinkingLayer/CMakeLists.txt b/gnu/llvm/llvm/examples/LLJITExamples/LLJITWithCustomObjectLinkingLayer/CMakeLists.txt
deleted file mode 100644 (file)
index 6034fc6..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-set(LLVM_LINK_COMPONENTS
-  Core
-  IRReader
-  JITLink
-  OrcJIT
-  Support
-  nativecodegen
-  )
-
-add_llvm_example(LLJITWithCustomObjectLinkingLayer
-  LLJITWithCustomObjectLinkingLayer.cpp
-  )
diff --git a/gnu/llvm/llvm/examples/LLJITExamples/LLJITWithCustomObjectLinkingLayer/LLJITWithCustomObjectLinkingLayer.cpp b/gnu/llvm/llvm/examples/LLJITExamples/LLJITWithCustomObjectLinkingLayer/LLJITWithCustomObjectLinkingLayer.cpp
deleted file mode 100644 (file)
index 04607d7..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-//===--------------- LLJITWithCustomObjectLinkingLayer.cpp ----------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This file shows how to switch LLJIT to use a custom object linking layer (we
-// use ObjectLinkingLayer, which is backed by JITLink, as an example).
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/ADT/StringMap.h"
-#include "llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h"
-#include "llvm/ExecutionEngine/Orc/LLJIT.h"
-#include "llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h"
-#include "llvm/Support/InitLLVM.h"
-#include "llvm/Support/TargetSelect.h"
-#include "llvm/Support/raw_ostream.h"
-
-#include "../ExampleModules.h"
-
-using namespace llvm;
-using namespace llvm::orc;
-
-ExitOnError ExitOnErr;
-
-int main(int argc, char *argv[]) {
-  // Initialize LLVM.
-  InitLLVM X(argc, argv);
-
-  InitializeNativeTarget();
-  InitializeNativeTargetAsmPrinter();
-
-  cl::ParseCommandLineOptions(argc, argv, "HowToUseLLJIT");
-  ExitOnErr.setBanner(std::string(argv[0]) + ": ");
-
-  // Detect the host and set code model to small.
-  auto JTMB = ExitOnErr(JITTargetMachineBuilder::detectHost());
-  JTMB.setCodeModel(CodeModel::Small);
-
-  // Create an LLJIT instance with an ObjectLinkingLayer as the base layer.
-  auto J = ExitOnErr(
-      LLJITBuilder()
-          .setJITTargetMachineBuilder(std::move(JTMB))
-          .setObjectLinkingLayerCreator(
-              [&](ExecutionSession &ES, const Triple &TT) {
-                return std::make_unique<ObjectLinkingLayer>(
-                    ES, std::make_unique<jitlink::InProcessMemoryManager>());
-              })
-          .create());
-
-  auto M = ExitOnErr(parseExampleModule(Add1Example, "add1"));
-
-  ExitOnErr(J->addIRModule(std::move(M)));
-
-  // Look up the JIT'd function, cast it to a function pointer, then call it.
-  auto Add1Sym = ExitOnErr(J->lookup("add1"));
-  int (*Add1)(int) = (int (*)(int))Add1Sym.getAddress();
-
-  int Result = Add1(42);
-  outs() << "add1(42) = " << Result << "\n";
-
-  return 0;
-}
diff --git a/gnu/llvm/llvm/examples/LLJITExamples/LLJITWithObjectCache/CMakeLists.txt b/gnu/llvm/llvm/examples/LLJITExamples/LLJITWithObjectCache/CMakeLists.txt
deleted file mode 100644 (file)
index c5f8fd6..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-set(LLVM_LINK_COMPONENTS
-  Core
-  ExecutionEngine
-  IRReader
-  OrcJIT
-  Support
-  nativecodegen
-  )
-
-add_llvm_example(LLJITWithObjectCache
-  LLJITWithObjectCache.cpp
-  )
diff --git a/gnu/llvm/llvm/examples/LLJITExamples/LLJITWithObjectCache/LLJITWithObjectCache.cpp b/gnu/llvm/llvm/examples/LLJITExamples/LLJITWithObjectCache/LLJITWithObjectCache.cpp
deleted file mode 100644 (file)
index c7e4051..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-//===--- LLJITWithObjectCache.cpp - An LLJIT example with an ObjectCache --===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/ADT/StringMap.h"
-#include "llvm/ExecutionEngine/ObjectCache.h"
-#include "llvm/ExecutionEngine/Orc/LLJIT.h"
-#include "llvm/IR/Function.h"
-#include "llvm/IR/IRBuilder.h"
-#include "llvm/IR/Module.h"
-#include "llvm/Support/InitLLVM.h"
-#include "llvm/Support/TargetSelect.h"
-#include "llvm/Support/raw_ostream.h"
-
-#include "../ExampleModules.h"
-
-using namespace llvm;
-using namespace llvm::orc;
-
-ExitOnError ExitOnErr;
-
-class MyObjectCache : public ObjectCache {
-public:
-  void notifyObjectCompiled(const Module *M,
-                            MemoryBufferRef ObjBuffer) override {
-    CachedObjects[M->getModuleIdentifier()] = MemoryBuffer::getMemBufferCopy(
-        ObjBuffer.getBuffer(), ObjBuffer.getBufferIdentifier());
-  }
-
-  std::unique_ptr<MemoryBuffer> getObject(const Module *M) override {
-    auto I = CachedObjects.find(M->getModuleIdentifier());
-    if (I == CachedObjects.end()) {
-      dbgs() << "No object for " << M->getModuleIdentifier()
-             << " in cache. Compiling.\n";
-      return nullptr;
-    }
-
-    dbgs() << "Object for " << M->getModuleIdentifier()
-           << " loaded from cache.\n";
-    return MemoryBuffer::getMemBuffer(I->second->getMemBufferRef());
-  }
-
-private:
-  StringMap<std::unique_ptr<MemoryBuffer>> CachedObjects;
-};
-
-void runJITWithCache(ObjectCache &ObjCache) {
-
-  // Create an LLJIT instance with a custom IRCompiler.
-  auto J = ExitOnErr(
-      LLJITBuilder()
-          .setCompileFunctionCreator(
-              [&](JITTargetMachineBuilder JTMB)
-                  -> Expected<std::unique_ptr<IRCompileLayer::IRCompiler>> {
-                auto TM = JTMB.createTargetMachine();
-                if (!TM)
-                  return TM.takeError();
-                return std::make_unique<TMOwningSimpleCompiler>(std::move(*TM),
-                                                                &ObjCache);
-              })
-          .create());
-
-  auto M = ExitOnErr(parseExampleModule(Add1Example, "add1"));
-
-  ExitOnErr(J->addIRModule(std::move(M)));
-
-  // Look up the JIT'd function, cast it to a function pointer, then call it.
-  auto Add1Sym = ExitOnErr(J->lookup("add1"));
-  int (*Add1)(int) = (int (*)(int))Add1Sym.getAddress();
-
-  int Result = Add1(42);
-  outs() << "add1(42) = " << Result << "\n";
-}
-
-int main(int argc, char *argv[]) {
-  // Initialize LLVM.
-  InitLLVM X(argc, argv);
-
-  InitializeNativeTarget();
-  InitializeNativeTargetAsmPrinter();
-
-  cl::ParseCommandLineOptions(argc, argv, "HowToUseLLJIT");
-  ExitOnErr.setBanner(std::string(argv[0]) + ": ");
-
-  MyObjectCache MyCache;
-
-  runJITWithCache(MyCache);
-  runJITWithCache(MyCache);
-
-  return 0;
-}
diff --git a/gnu/llvm/llvm/include/llvm/Analysis/OrderedBasicBlock.h b/gnu/llvm/llvm/include/llvm/Analysis/OrderedBasicBlock.h
deleted file mode 100644 (file)
index ae64c01..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-//===- llvm/Analysis/OrderedBasicBlock.h --------------------- -*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines the OrderedBasicBlock class. OrderedBasicBlock maintains
-// an interface where clients can query if one instruction comes before another
-// in a BasicBlock. Since BasicBlock currently lacks a reliable way to query
-// relative position between instructions one can use OrderedBasicBlock to do
-// such queries. OrderedBasicBlock is lazily built on a source BasicBlock and
-// maintains an internal Instruction -> Position map. A OrderedBasicBlock
-// instance should be discarded whenever the source BasicBlock changes.
-//
-// It's currently used by the CaptureTracker in order to find relative
-// positions of a pair of instructions inside a BasicBlock.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_ANALYSIS_ORDEREDBASICBLOCK_H
-#define LLVM_ANALYSIS_ORDEREDBASICBLOCK_H
-
-#include "llvm/ADT/DenseMap.h"
-#include "llvm/IR/BasicBlock.h"
-
-namespace llvm {
-
-class Instruction;
-class BasicBlock;
-
-class OrderedBasicBlock {
-private:
-  /// Map a instruction to its position in a BasicBlock.
-  SmallDenseMap<const Instruction *, unsigned, 32> NumberedInsts;
-
-  /// Keep track of last instruction inserted into \p NumberedInsts.
-  /// It speeds up queries for uncached instructions by providing a start point
-  /// for new queries in OrderedBasicBlock::comesBefore.
-  BasicBlock::const_iterator LastInstFound;
-
-  /// The position/number to tag the next instruction to be found.
-  unsigned NextInstPos;
-
-  /// The source BasicBlock to map.
-  const BasicBlock *BB;
-
-  /// Given no cached results, find if \p A comes before \p B in \p BB.
-  /// Cache and number out instruction while walking \p BB.
-  bool comesBefore(const Instruction *A, const Instruction *B);
-
-public:
-  OrderedBasicBlock(const BasicBlock *BasicB);
-
-  /// Find out whether \p A dominates \p B, meaning whether \p A
-  /// comes before \p B in \p BB. This is a simplification that considers
-  /// cached instruction positions and ignores other basic blocks, being
-  /// only relevant to compare relative instructions positions inside \p BB.
-  /// Returns false for A == B.
-  bool dominates(const Instruction *A, const Instruction *B);
-
-  /// Remove \p from the ordering, if it is present.
-  void eraseInstruction(const Instruction *I);
-
-  /// Replace \p Old with \p New in the ordering. \p New is assigned the
-  /// numbering of \p Old, so it must be inserted at the same position in the
-  /// IR.
-  void replaceInstruction(const Instruction *Old, const Instruction *New);
-};
-
-} // End llvm namespace
-
-#endif
diff --git a/gnu/llvm/llvm/include/llvm/Analysis/OrderedInstructions.h b/gnu/llvm/llvm/include/llvm/Analysis/OrderedInstructions.h
deleted file mode 100644 (file)
index 967b146..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-//===- llvm/Transforms/Utils/OrderedInstructions.h -------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines an efficient way to check for dominance relation between 2
-// instructions.
-//
-// This interface dispatches to appropriate dominance check given 2
-// instructions, i.e. in case the instructions are in the same basic block,
-// OrderedBasicBlock (with instruction numbering and caching) are used.
-// Otherwise, dominator tree is used.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_ANALYSIS_ORDEREDINSTRUCTIONS_H
-#define LLVM_ANALYSIS_ORDEREDINSTRUCTIONS_H
-
-#include "llvm/ADT/DenseMap.h"
-#include "llvm/Analysis/OrderedBasicBlock.h"
-#include "llvm/IR/Dominators.h"
-#include "llvm/IR/Operator.h"
-
-namespace llvm {
-
-class OrderedInstructions {
-  /// Used to check dominance for instructions in same basic block.
-  mutable DenseMap<const BasicBlock *, std::unique_ptr<OrderedBasicBlock>>
-      OBBMap;
-
-  /// The dominator tree of the parent function.
-  DominatorTree *DT;
-
-  /// Return true if the first instruction comes before the second in the
-  /// same basic block. It will create an ordered basic block, if it does
-  /// not yet exist in OBBMap.
-  bool localDominates(const Instruction *, const Instruction *) const;
-
-public:
-  /// Constructor.
-  OrderedInstructions(DominatorTree *DT) : DT(DT) {}
-
-  /// Return true if first instruction dominates the second.
-  bool dominates(const Instruction *, const Instruction *) const;
-
-  /// Return true if the first instruction comes before the second in the
-  /// dominator tree DFS traversal if they are in different basic blocks,
-  /// or if the first instruction comes before the second in the same basic
-  /// block.
-  bool dfsBefore(const Instruction *, const Instruction *) const;
-
-  /// Invalidate the OrderedBasicBlock cache when its basic block changes.
-  /// i.e. If an instruction is deleted or added to the basic block, the user
-  /// should call this function to invalidate the OrderedBasicBlock cache for
-  /// this basic block.
-  void invalidateBlock(const BasicBlock *BB) { OBBMap.erase(BB); }
-};
-
-} // end namespace llvm
-
-#endif // LLVM_ANALYSIS_ORDEREDINSTRUCTIONS_H
diff --git a/gnu/llvm/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h b/gnu/llvm/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h
deleted file mode 100644 (file)
index b4d7274..0000000
+++ /dev/null
@@ -1,415 +0,0 @@
-//===---- llvm/Analysis/ScalarEvolutionExpander.h - SCEV Exprs --*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines the classes used to generate code from scalar expressions.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_ANALYSIS_SCALAREVOLUTIONEXPANDER_H
-#define LLVM_ANALYSIS_SCALAREVOLUTIONEXPANDER_H
-
-#include "llvm/ADT/DenseMap.h"
-#include "llvm/ADT/DenseSet.h"
-#include "llvm/ADT/Optional.h"
-#include "llvm/Analysis/ScalarEvolutionExpressions.h"
-#include "llvm/Analysis/ScalarEvolutionNormalization.h"
-#include "llvm/Analysis/TargetFolder.h"
-#include "llvm/IR/IRBuilder.h"
-#include "llvm/IR/ValueHandle.h"
-
-namespace llvm {
-  class TargetTransformInfo;
-
-  /// Return true if the given expression is safe to expand in the sense that
-  /// all materialized values are safe to speculate anywhere their operands are
-  /// defined.
-  bool isSafeToExpand(const SCEV *S, ScalarEvolution &SE);
-
-  /// Return true if the given expression is safe to expand in the sense that
-  /// all materialized values are defined and safe to speculate at the specified
-  /// location and their operands are defined at this location.
-  bool isSafeToExpandAt(const SCEV *S, const Instruction *InsertionPoint,
-                        ScalarEvolution &SE);
-
-  /// This class uses information about analyze scalars to rewrite expressions
-  /// in canonical form.
-  ///
-  /// Clients should create an instance of this class when rewriting is needed,
-  /// and destroy it when finished to allow the release of the associated
-  /// memory.
-  class SCEVExpander : public SCEVVisitor<SCEVExpander, Value*> {
-    ScalarEvolution &SE;
-    const DataLayout &DL;
-
-    // New instructions receive a name to identify them with the current pass.
-    const char* IVName;
-
-    // InsertedExpressions caches Values for reuse, so must track RAUW.
-    DenseMap<std::pair<const SCEV *, Instruction *>, TrackingVH<Value>>
-        InsertedExpressions;
-
-    // InsertedValues only flags inserted instructions so needs no RAUW.
-    DenseSet<AssertingVH<Value>> InsertedValues;
-    DenseSet<AssertingVH<Value>> InsertedPostIncValues;
-
-    /// A memoization of the "relevant" loop for a given SCEV.
-    DenseMap<const SCEV *, const Loop *> RelevantLoops;
-
-    /// Addrecs referring to any of the given loops are expanded in post-inc
-    /// mode. For example, expanding {1,+,1}<L> in post-inc mode returns the add
-    /// instruction that adds one to the phi for {0,+,1}<L>, as opposed to a new
-    /// phi starting at 1. This is only supported in non-canonical mode.
-    PostIncLoopSet PostIncLoops;
-
-    /// When this is non-null, addrecs expanded in the loop it indicates should
-    /// be inserted with increments at IVIncInsertPos.
-    const Loop *IVIncInsertLoop;
-
-    /// When expanding addrecs in the IVIncInsertLoop loop, insert the IV
-    /// increment at this position.
-    Instruction *IVIncInsertPos;
-
-    /// Phis that complete an IV chain. Reuse
-    DenseSet<AssertingVH<PHINode>> ChainedPhis;
-
-    /// When true, SCEVExpander tries to expand expressions in "canonical" form.
-    /// When false, expressions are expanded in a more literal form.
-    ///
-    /// In "canonical" form addrecs are expanded as arithmetic based on a
-    /// canonical induction variable. Note that CanonicalMode doesn't guarantee
-    /// that all expressions are expanded in "canonical" form. For some
-    /// expressions literal mode can be preferred.
-    bool CanonicalMode;
-
-    /// When invoked from LSR, the expander is in "strength reduction" mode. The
-    /// only difference is that phi's are only reused if they are already in
-    /// "expanded" form.
-    bool LSRMode;
-
-    typedef IRBuilder<TargetFolder> BuilderType;
-    BuilderType Builder;
-
-    // RAII object that stores the current insertion point and restores it when
-    // the object is destroyed. This includes the debug location.  Duplicated
-    // from InsertPointGuard to add SetInsertPoint() which is used to updated
-    // InsertPointGuards stack when insert points are moved during SCEV
-    // expansion.
-    class SCEVInsertPointGuard {
-      IRBuilderBase &Builder;
-      AssertingVH<BasicBlock> Block;
-      BasicBlock::iterator Point;
-      DebugLoc DbgLoc;
-      SCEVExpander *SE;
-
-      SCEVInsertPointGuard(const SCEVInsertPointGuard &) = delete;
-      SCEVInsertPointGuard &operator=(const SCEVInsertPointGuard &) = delete;
-
-    public:
-      SCEVInsertPointGuard(IRBuilderBase &B, SCEVExpander *SE)
-          : Builder(B), Block(B.GetInsertBlock()), Point(B.GetInsertPoint()),
-            DbgLoc(B.getCurrentDebugLocation()), SE(SE) {
-        SE->InsertPointGuards.push_back(this);
-      }
-
-      ~SCEVInsertPointGuard() {
-        // These guards should always created/destroyed in FIFO order since they
-        // are used to guard lexically scoped blocks of code in
-        // ScalarEvolutionExpander.
-        assert(SE->InsertPointGuards.back() == this);
-        SE->InsertPointGuards.pop_back();
-        Builder.restoreIP(IRBuilderBase::InsertPoint(Block, Point));
-        Builder.SetCurrentDebugLocation(DbgLoc);
-      }
-
-      BasicBlock::iterator GetInsertPoint() const { return Point; }
-      void SetInsertPoint(BasicBlock::iterator I) { Point = I; }
-    };
-
-    /// Stack of pointers to saved insert points, used to keep insert points
-    /// consistent when instructions are moved.
-    SmallVector<SCEVInsertPointGuard *, 8> InsertPointGuards;
-
-#ifndef NDEBUG
-    const char *DebugType;
-#endif
-
-    friend struct SCEVVisitor<SCEVExpander, Value*>;
-
-  public:
-    /// Construct a SCEVExpander in "canonical" mode.
-    explicit SCEVExpander(ScalarEvolution &se, const DataLayout &DL,
-                          const char *name)
-        : SE(se), DL(DL), IVName(name), IVIncInsertLoop(nullptr),
-          IVIncInsertPos(nullptr), CanonicalMode(true), LSRMode(false),
-          Builder(se.getContext(), TargetFolder(DL)) {
-#ifndef NDEBUG
-      DebugType = "";
-#endif
-    }
-
-    ~SCEVExpander() {
-      // Make sure the insert point guard stack is consistent.
-      assert(InsertPointGuards.empty());
-    }
-
-#ifndef NDEBUG
-    void setDebugType(const char* s) { DebugType = s; }
-#endif
-
-    /// Erase the contents of the InsertedExpressions map so that users trying
-    /// to expand the same expression into multiple BasicBlocks or different
-    /// places within the same BasicBlock can do so.
-    void clear() {
-      InsertedExpressions.clear();
-      InsertedValues.clear();
-      InsertedPostIncValues.clear();
-      ChainedPhis.clear();
-    }
-
-    /// Return true for expressions that may incur non-trivial cost to evaluate
-    /// at runtime.
-    ///
-    /// At is an optional parameter which specifies point in code where user is
-    /// going to expand this expression. Sometimes this knowledge can lead to a
-    /// more accurate cost estimation.
-    bool isHighCostExpansion(const SCEV *Expr, Loop *L,
-                             const Instruction *At = nullptr) {
-      SmallPtrSet<const SCEV *, 8> Processed;
-      return isHighCostExpansionHelper(Expr, L, At, Processed);
-    }
-
-    /// This method returns the canonical induction variable of the specified
-    /// type for the specified loop (inserting one if there is none).  A
-    /// canonical induction variable starts at zero and steps by one on each
-    /// iteration.
-    PHINode *getOrInsertCanonicalInductionVariable(const Loop *L, Type *Ty);
-
-    /// Return the induction variable increment's IV operand.
-    Instruction *getIVIncOperand(Instruction *IncV, Instruction *InsertPos,
-                                 bool allowScale);
-
-    /// Utility for hoisting an IV increment.
-    bool hoistIVInc(Instruction *IncV, Instruction *InsertPos);
-
-    /// replace congruent phis with their most canonical representative. Return
-    /// the number of phis eliminated.
-    unsigned replaceCongruentIVs(Loop *L, const DominatorTree *DT,
-                                 SmallVectorImpl<WeakTrackingVH> &DeadInsts,
-                                 const TargetTransformInfo *TTI = nullptr);
-
-    /// Insert code to directly compute the specified SCEV expression into the
-    /// program.  The inserted code is inserted into the specified block.
-    Value *expandCodeFor(const SCEV *SH, Type *Ty, Instruction *I);
-
-    /// Insert code to directly compute the specified SCEV expression into the
-    /// program.  The inserted code is inserted into the SCEVExpander's current
-    /// insertion point. If a type is specified, the result will be expanded to
-    /// have that type, with a cast if necessary.
-    Value *expandCodeFor(const SCEV *SH, Type *Ty = nullptr);
-
-
-    /// Generates a code sequence that evaluates this predicate.  The inserted
-    /// instructions will be at position \p Loc.  The result will be of type i1
-    /// and will have a value of 0 when the predicate is false and 1 otherwise.
-    Value *expandCodeForPredicate(const SCEVPredicate *Pred, Instruction *Loc);
-
-    /// A specialized variant of expandCodeForPredicate, handling the case when
-    /// we are expanding code for a SCEVEqualPredicate.
-    Value *expandEqualPredicate(const SCEVEqualPredicate *Pred,
-                                Instruction *Loc);
-
-    /// Generates code that evaluates if the \p AR expression will overflow.
-    Value *generateOverflowCheck(const SCEVAddRecExpr *AR, Instruction *Loc,
-                                 bool Signed);
-
-    /// A specialized variant of expandCodeForPredicate, handling the case when
-    /// we are expanding code for a SCEVWrapPredicate.
-    Value *expandWrapPredicate(const SCEVWrapPredicate *P, Instruction *Loc);
-
-    /// A specialized variant of expandCodeForPredicate, handling the case when
-    /// we are expanding code for a SCEVUnionPredicate.
-    Value *expandUnionPredicate(const SCEVUnionPredicate *Pred,
-                                Instruction *Loc);
-
-    /// Set the current IV increment loop and position.
-    void setIVIncInsertPos(const Loop *L, Instruction *Pos) {
-      assert(!CanonicalMode &&
-             "IV increment positions are not supported in CanonicalMode");
-      IVIncInsertLoop = L;
-      IVIncInsertPos = Pos;
-    }
-
-    /// Enable post-inc expansion for addrecs referring to the given
-    /// loops. Post-inc expansion is only supported in non-canonical mode.
-    void setPostInc(const PostIncLoopSet &L) {
-      assert(!CanonicalMode &&
-             "Post-inc expansion is not supported in CanonicalMode");
-      PostIncLoops = L;
-    }
-
-    /// Disable all post-inc expansion.
-    void clearPostInc() {
-      PostIncLoops.clear();
-
-      // When we change the post-inc loop set, cached expansions may no
-      // longer be valid.
-      InsertedPostIncValues.clear();
-    }
-
-    /// Disable the behavior of expanding expressions in canonical form rather
-    /// than in a more literal form. Non-canonical mode is useful for late
-    /// optimization passes.
-    void disableCanonicalMode() { CanonicalMode = false; }
-
-    void enableLSRMode() { LSRMode = true; }
-
-    /// Set the current insertion point. This is useful if multiple calls to
-    /// expandCodeFor() are going to be made with the same insert point and the
-    /// insert point may be moved during one of the expansions (e.g. if the
-    /// insert point is not a block terminator).
-    void setInsertPoint(Instruction *IP) {
-      assert(IP);
-      Builder.SetInsertPoint(IP);
-    }
-
-    /// Clear the current insertion point. This is useful if the instruction
-    /// that had been serving as the insertion point may have been deleted.
-    void clearInsertPoint() { Builder.ClearInsertionPoint(); }
-
-    /// Set location information used by debugging information.
-    void SetCurrentDebugLocation(DebugLoc L) {
-      Builder.SetCurrentDebugLocation(std::move(L));
-    }
-
-    /// Get location information used by debugging information.
-    const DebugLoc &getCurrentDebugLocation() const {
-      return Builder.getCurrentDebugLocation();
-    }
-
-    /// Return true if the specified instruction was inserted by the code
-    /// rewriter.  If so, the client should not modify the instruction.
-    bool isInsertedInstruction(Instruction *I) const {
-      return InsertedValues.count(I) || InsertedPostIncValues.count(I);
-    }
-
-    void setChainedPhi(PHINode *PN) { ChainedPhis.insert(PN); }
-
-    /// Try to find existing LLVM IR value for S available at the point At.
-    Value *getExactExistingExpansion(const SCEV *S, const Instruction *At,
-                                     Loop *L);
-
-    /// Try to find the ValueOffsetPair for S. The function is mainly used to
-    /// check whether S can be expanded cheaply.  If this returns a non-None
-    /// value, we know we can codegen the `ValueOffsetPair` into a suitable
-    /// expansion identical with S so that S can be expanded cheaply.
-    ///
-    /// L is a hint which tells in which loop to look for the suitable value.
-    /// On success return value which is equivalent to the expanded S at point
-    /// At. Return nullptr if value was not found.
-    ///
-    /// Note that this function does not perform an exhaustive search. I.e if it
-    /// didn't find any value it does not mean that there is no such value.
-    ///
-    Optional<ScalarEvolution::ValueOffsetPair>
-    getRelatedExistingExpansion(const SCEV *S, const Instruction *At, Loop *L);
-
-  private:
-    LLVMContext &getContext() const { return SE.getContext(); }
-
-    /// Recursive helper function for isHighCostExpansion.
-    bool isHighCostExpansionHelper(const SCEV *S, Loop *L,
-                                   const Instruction *At,
-                                   SmallPtrSetImpl<const SCEV *> &Processed);
-
-    /// Insert the specified binary operator, doing a small amount of work to
-    /// avoid inserting an obviously redundant operation, and hoisting to an
-    /// outer loop when the opportunity is there and it is safe.
-    Value *InsertBinop(Instruction::BinaryOps Opcode, Value *LHS, Value *RHS,
-                       SCEV::NoWrapFlags Flags, bool IsSafeToHoist);
-
-    /// Arrange for there to be a cast of V to Ty at IP, reusing an existing
-    /// cast if a suitable one exists, moving an existing cast if a suitable one
-    /// exists but isn't in the right place, or creating a new one.
-    Value *ReuseOrCreateCast(Value *V, Type *Ty,
-                             Instruction::CastOps Op,
-                             BasicBlock::iterator IP);
-
-    /// Insert a cast of V to the specified type, which must be possible with a
-    /// noop cast, doing what we can to share the casts.
-    Value *InsertNoopCastOfTo(Value *V, Type *Ty);
-
-    /// Expand a SCEVAddExpr with a pointer type into a GEP instead of using
-    /// ptrtoint+arithmetic+inttoptr.
-    Value *expandAddToGEP(const SCEV *const *op_begin,
-                          const SCEV *const *op_end,
-                          PointerType *PTy, Type *Ty, Value *V);
-    Value *expandAddToGEP(const SCEV *Op, PointerType *PTy, Type *Ty, Value *V);
-
-    /// Find a previous Value in ExprValueMap for expand.
-    ScalarEvolution::ValueOffsetPair
-    FindValueInExprValueMap(const SCEV *S, const Instruction *InsertPt);
-
-    Value *expand(const SCEV *S);
-
-    /// Determine the most "relevant" loop for the given SCEV.
-    const Loop *getRelevantLoop(const SCEV *);
-
-    Value *visitConstant(const SCEVConstant *S) {
-      return S->getValue();
-    }
-
-    Value *visitTruncateExpr(const SCEVTruncateExpr *S);
-
-    Value *visitZeroExtendExpr(const SCEVZeroExtendExpr *S);
-
-    Value *visitSignExtendExpr(const SCEVSignExtendExpr *S);
-
-    Value *visitAddExpr(const SCEVAddExpr *S);
-
-    Value *visitMulExpr(const SCEVMulExpr *S);
-
-    Value *visitUDivExpr(const SCEVUDivExpr *S);
-
-    Value *visitAddRecExpr(const SCEVAddRecExpr *S);
-
-    Value *visitSMaxExpr(const SCEVSMaxExpr *S);
-
-    Value *visitUMaxExpr(const SCEVUMaxExpr *S);
-
-    Value *visitSMinExpr(const SCEVSMinExpr *S);
-
-    Value *visitUMinExpr(const SCEVUMinExpr *S);
-
-    Value *visitUnknown(const SCEVUnknown *S) {
-      return S->getValue();
-    }
-
-    void rememberInstruction(Value *I);
-
-    bool isNormalAddRecExprPHI(PHINode *PN, Instruction *IncV, const Loop *L);
-
-    bool isExpandedAddRecExprPHI(PHINode *PN, Instruction *IncV, const Loop *L);
-
-    Value *expandAddRecExprLiterally(const SCEVAddRecExpr *);
-    PHINode *getAddRecExprPHILiterally(const SCEVAddRecExpr *Normalized,
-                                       const Loop *L,
-                                       Type *ExpandTy,
-                                       Type *IntTy,
-                                       Type *&TruncTy,
-                                       bool &InvertStep);
-    Value *expandIVInc(PHINode *PN, Value *StepV, const Loop *L,
-                       Type *ExpandTy, Type *IntTy, bool useSubtract);
-
-    void hoistBeforePos(DominatorTree *DT, Instruction *InstToHoist,
-                        Instruction *Pos, PHINode *LoopPhi);
-
-    void fixupInsertPoints(Instruction *I);
-  };
-}
-
-#endif
index f0337ef..19b33b6 100644 (file)
@@ -393,6 +393,8 @@ HANDLE_DW_AT(0x2133, GNU_addr_base, 0, GNU)
 HANDLE_DW_AT(0x2134, GNU_pubnames, 0, GNU)
 HANDLE_DW_AT(0x2135, GNU_pubtypes, 0, GNU)
 HANDLE_DW_AT(0x2136, GNU_discriminator, 0, GNU)
+// Sun Extension
+HANDLE_DW_AT(0x2224, SUN_amd64_parmdump, 0, GNU)
 // Borland extensions.
 HANDLE_DW_AT(0x3b11, BORLAND_property_read, 0, BORLAND)
 HANDLE_DW_AT(0x3b12, BORLAND_property_write, 0, BORLAND)
index 0eb9508..90dff29 100644 (file)
@@ -375,6 +375,11 @@ public:
   /// correctness.
   void emitAlignment(Align Alignment, const GlobalObject *GV = nullptr) const;
 
+  /// Emit an alignment directive to the specified power of two boundary,
+  /// like emitAlignment, but call emitTrapToAlignment to fill with
+  /// trap instructions instead of NOPs.
+  void emitTrapAlignment(Align Alignment, const GlobalObject *GO = nullptr) const;
+
   /// Lower the specified LLVM Constant to an MCExpr.
   virtual const MCExpr *lowerConstant(const Constant *CV);
 
@@ -436,6 +441,11 @@ public:
     llvm_unreachable("EmitInstruction not implemented");
   }
 
+  /// Emit an alignment directive to the specified power
+  /// of two boundary, but use Trap instructions for alignment
+  /// sections that should never be executed.
+  virtual void emitTrapToAlignment(Align Alignment) const;
+
   /// Return the symbol for the specified constant pool entry.
   virtual MCSymbol *GetCPISymbol(unsigned CPID) const;
 
diff --git a/gnu/llvm/llvm/include/llvm/CodeGen/CommandFlags.inc b/gnu/llvm/llvm/include/llvm/CodeGen/CommandFlags.inc
deleted file mode 100644 (file)
index 8739b64..0000000
+++ /dev/null
@@ -1,428 +0,0 @@
-//===-- CommandFlags.h - Command Line Flags Interface -----------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This file contains codegen-specific flags that are shared between different
-// command line tools. The tools "llc" and "opt" both use this file to prevent
-// flag duplication.
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/ADT/StringExtras.h"
-#include "llvm/IR/Instructions.h"
-#include "llvm/IR/Intrinsics.h"
-#include "llvm/IR/Module.h"
-#include "llvm/MC/MCTargetOptionsCommandFlags.inc"
-#include "llvm/MC/SubtargetFeature.h"
-#include "llvm/Support/CodeGen.h"
-#include "llvm/Support/CommandLine.h"
-#include "llvm/Support/Host.h"
-#include "llvm/Target/TargetMachine.h"
-#include "llvm/Target/TargetOptions.h"
-#include <string>
-using namespace llvm;
-
-static cl::opt<std::string>
-    MArch("march",
-          cl::desc("Architecture to generate code for (see --version)"));
-
-static cl::opt<std::string>
-    MCPU("mcpu",
-         cl::desc("Target a specific cpu type (-mcpu=help for details)"),
-         cl::value_desc("cpu-name"), cl::init(""));
-
-static cl::list<std::string>
-    MAttrs("mattr", cl::CommaSeparated,
-           cl::desc("Target specific attributes (-mattr=help for details)"),
-           cl::value_desc("a1,+a2,-a3,..."));
-
-static cl::opt<Reloc::Model> RelocModel(
-    "relocation-model", cl::desc("Choose relocation model"),
-    cl::values(
-        clEnumValN(Reloc::Static, "static", "Non-relocatable code"),
-        clEnumValN(Reloc::PIC_, "pic",
-                   "Fully relocatable, position independent code"),
-        clEnumValN(Reloc::DynamicNoPIC, "dynamic-no-pic",
-                   "Relocatable external references, non-relocatable code"),
-        clEnumValN(Reloc::ROPI, "ropi",
-                   "Code and read-only data relocatable, accessed PC-relative"),
-        clEnumValN(
-            Reloc::RWPI, "rwpi",
-            "Read-write data relocatable, accessed relative to static base"),
-        clEnumValN(Reloc::ROPI_RWPI, "ropi-rwpi",
-                   "Combination of ropi and rwpi")));
-
-LLVM_ATTRIBUTE_UNUSED static Optional<Reloc::Model> getRelocModel() {
-  if (RelocModel.getNumOccurrences()) {
-    Reloc::Model R = RelocModel;
-    return R;
-  }
-  return None;
-}
-
-static cl::opt<ThreadModel::Model> TMModel(
-    "thread-model", cl::desc("Choose threading model"),
-    cl::init(ThreadModel::POSIX),
-    cl::values(clEnumValN(ThreadModel::POSIX, "posix", "POSIX thread model"),
-               clEnumValN(ThreadModel::Single, "single",
-                          "Single thread model")));
-
-static cl::opt<llvm::CodeModel::Model> CMModel(
-    "code-model", cl::desc("Choose code model"),
-    cl::values(clEnumValN(CodeModel::Tiny, "tiny", "Tiny code model"),
-               clEnumValN(CodeModel::Small, "small", "Small code model"),
-               clEnumValN(CodeModel::Kernel, "kernel", "Kernel code model"),
-               clEnumValN(CodeModel::Medium, "medium", "Medium code model"),
-               clEnumValN(CodeModel::Large, "large", "Large code model")));
-
-LLVM_ATTRIBUTE_UNUSED static Optional<CodeModel::Model> getCodeModel() {
-  if (CMModel.getNumOccurrences()) {
-    CodeModel::Model M = CMModel;
-    return M;
-  }
-  return None;
-}
-
-static cl::opt<llvm::ExceptionHandling> ExceptionModel(
-    "exception-model", cl::desc("exception model"),
-    cl::init(ExceptionHandling::None),
-    cl::values(
-        clEnumValN(ExceptionHandling::None, "default",
-                   "default exception handling model"),
-        clEnumValN(ExceptionHandling::DwarfCFI, "dwarf",
-                   "DWARF-like CFI based exception handling"),
-        clEnumValN(ExceptionHandling::SjLj, "sjlj", "SjLj exception handling"),
-        clEnumValN(ExceptionHandling::ARM, "arm", "ARM EHABI exceptions"),
-        clEnumValN(ExceptionHandling::WinEH, "wineh",
-                   "Windows exception model"),
-        clEnumValN(ExceptionHandling::Wasm, "wasm",
-                   "WebAssembly exception handling")));
-
-static cl::opt<CodeGenFileType> FileType(
-    "filetype", cl::init(CGFT_AssemblyFile),
-    cl::desc(
-        "Choose a file type (not all types are supported by all targets):"),
-    cl::values(clEnumValN(CGFT_AssemblyFile, "asm",
-                          "Emit an assembly ('.s') file"),
-               clEnumValN(CGFT_ObjectFile, "obj",
-                          "Emit a native object ('.o') file"),
-               clEnumValN(CGFT_Null, "null",
-                          "Emit nothing, for performance testing")));
-
-static cl::opt<llvm::FramePointer::FP> FramePointerUsage(
-    "frame-pointer", cl::desc("Specify frame pointer elimination optimization"),
-    cl::init(llvm::FramePointer::None),
-    cl::values(
-        clEnumValN(llvm::FramePointer::All, "all",
-                   "Disable frame pointer elimination"),
-        clEnumValN(llvm::FramePointer::NonLeaf, "non-leaf",
-                   "Disable frame pointer elimination for non-leaf frame"),
-        clEnumValN(llvm::FramePointer::None, "none",
-                   "Enable frame pointer elimination")));
-
-static cl::opt<bool> EnableUnsafeFPMath(
-    "enable-unsafe-fp-math",
-    cl::desc("Enable optimizations that may decrease FP precision"),
-    cl::init(false));
-
-static cl::opt<bool> EnableNoInfsFPMath(
-    "enable-no-infs-fp-math",
-    cl::desc("Enable FP math optimizations that assume no +-Infs"),
-    cl::init(false));
-
-static cl::opt<bool> EnableNoNaNsFPMath(
-    "enable-no-nans-fp-math",
-    cl::desc("Enable FP math optimizations that assume no NaNs"),
-    cl::init(false));
-
-static cl::opt<bool> EnableNoSignedZerosFPMath(
-    "enable-no-signed-zeros-fp-math",
-    cl::desc("Enable FP math optimizations that assume "
-             "the sign of 0 is insignificant"),
-    cl::init(false));
-
-static cl::opt<bool>
-    EnableNoTrappingFPMath("enable-no-trapping-fp-math",
-                           cl::desc("Enable setting the FP exceptions build "
-                                    "attribute not to use exceptions"),
-                           cl::init(false));
-
-static cl::opt<llvm::FPDenormal::DenormalMode> DenormalFPMath(
-    "denormal-fp-math",
-    cl::desc("Select which denormal numbers the code is permitted to require"),
-    cl::init(FPDenormal::IEEE),
-    cl::values(clEnumValN(FPDenormal::IEEE, "ieee",
-                          "IEEE 754 denormal numbers"),
-               clEnumValN(FPDenormal::PreserveSign, "preserve-sign",
-                          "the sign of a  flushed-to-zero number is preserved "
-                          "in the sign of 0"),
-               clEnumValN(FPDenormal::PositiveZero, "positive-zero",
-                          "denormals are flushed to positive zero")));
-
-static cl::opt<bool> EnableHonorSignDependentRoundingFPMath(
-    "enable-sign-dependent-rounding-fp-math", cl::Hidden,
-    cl::desc("Force codegen to assume rounding mode can change dynamically"),
-    cl::init(false));
-
-static cl::opt<llvm::FloatABI::ABIType> FloatABIForCalls(
-    "float-abi", cl::desc("Choose float ABI type"), cl::init(FloatABI::Default),
-    cl::values(clEnumValN(FloatABI::Default, "default",
-                          "Target default float ABI type"),
-               clEnumValN(FloatABI::Soft, "soft",
-                          "Soft float ABI (implied by -soft-float)"),
-               clEnumValN(FloatABI::Hard, "hard",
-                          "Hard float ABI (uses FP registers)")));
-
-static cl::opt<llvm::FPOpFusion::FPOpFusionMode> FuseFPOps(
-    "fp-contract", cl::desc("Enable aggressive formation of fused FP ops"),
-    cl::init(FPOpFusion::Standard),
-    cl::values(
-        clEnumValN(FPOpFusion::Fast, "fast", "Fuse FP ops whenever profitable"),
-        clEnumValN(FPOpFusion::Standard, "on", "Only fuse 'blessed' FP ops."),
-        clEnumValN(FPOpFusion::Strict, "off",
-                   "Only fuse FP ops when the result won't be affected.")));
-
-static cl::opt<bool> DontPlaceZerosInBSS(
-    "nozero-initialized-in-bss",
-    cl::desc("Don't place zero-initialized symbols into bss section"),
-    cl::init(false));
-
-static cl::opt<bool> EnableGuaranteedTailCallOpt(
-    "tailcallopt",
-    cl::desc(
-        "Turn fastcc calls into tail calls by (potentially) changing ABI."),
-    cl::init(false));
-
-static cl::opt<bool> DisableTailCalls("disable-tail-calls",
-                                      cl::desc("Never emit tail calls"),
-                                      cl::init(false));
-
-static cl::opt<bool> StackSymbolOrdering("stack-symbol-ordering",
-                                         cl::desc("Order local stack symbols."),
-                                         cl::init(true));
-
-static cl::opt<unsigned>
-    OverrideStackAlignment("stack-alignment",
-                           cl::desc("Override default stack alignment"),
-                           cl::init(0));
-
-static cl::opt<bool>
-    StackRealign("stackrealign",
-                 cl::desc("Force align the stack to the minimum alignment"),
-                 cl::init(false));
-
-static cl::opt<std::string> TrapFuncName(
-    "trap-func", cl::Hidden,
-    cl::desc("Emit a call to trap function rather than a trap instruction"),
-    cl::init(""));
-
-static cl::opt<bool> UseCtors("use-ctors",
-                              cl::desc("Use .ctors instead of .init_array."),
-                              cl::init(false));
-
-static cl::opt<bool> RelaxELFRelocations(
-    "relax-elf-relocations",
-    cl::desc("Emit GOTPCRELX/REX_GOTPCRELX instead of GOTPCREL on x86-64 ELF"),
-    cl::init(false));
-
-static cl::opt<bool> DataSections("data-sections",
-                                  cl::desc("Emit data into separate sections"),
-                                  cl::init(false));
-
-static cl::opt<bool>
-    FunctionSections("function-sections",
-                     cl::desc("Emit functions into separate sections"),
-                     cl::init(false));
-
-static cl::opt<unsigned> TLSSize("tls-size",
-                                 cl::desc("Bit size of immediate TLS offsets"),
-                                 cl::init(0));
-
-static cl::opt<bool> EmulatedTLS("emulated-tls",
-                                 cl::desc("Use emulated TLS model"),
-                                 cl::init(false));
-
-static cl::opt<bool>
-    UniqueSectionNames("unique-section-names",
-                       cl::desc("Give unique names to every section"),
-                       cl::init(true));
-
-static cl::opt<llvm::EABI>
-    EABIVersion("meabi", cl::desc("Set EABI type (default depends on triple):"),
-                cl::init(EABI::Default),
-                cl::values(clEnumValN(EABI::Default, "default",
-                                      "Triple default EABI version"),
-                           clEnumValN(EABI::EABI4, "4", "EABI version 4"),
-                           clEnumValN(EABI::EABI5, "5", "EABI version 5"),
-                           clEnumValN(EABI::GNU, "gnu", "EABI GNU")));
-
-static cl::opt<DebuggerKind> DebuggerTuningOpt(
-    "debugger-tune", cl::desc("Tune debug info for a particular debugger"),
-    cl::init(DebuggerKind::Default),
-    cl::values(clEnumValN(DebuggerKind::GDB, "gdb", "gdb"),
-               clEnumValN(DebuggerKind::LLDB, "lldb", "lldb"),
-               clEnumValN(DebuggerKind::SCE, "sce", "SCE targets (e.g. PS4)")));
-
-static cl::opt<bool> EnableStackSizeSection(
-    "stack-size-section",
-    cl::desc("Emit a section containing stack size metadata"), cl::init(false));
-
-static cl::opt<bool>
-    EnableAddrsig("addrsig", cl::desc("Emit an address-significance table"),
-                  cl::init(false));
-
-static cl::opt<bool>
-    EnableDebugEntryValues("debug-entry-values",
-                           cl::desc("Emit debug info about parameter's entry values"),
-                           cl::init(false));
-
-static cl::opt<bool>
-    ForceDwarfFrameSection("force-dwarf-frame-section",
-                           cl::desc("Always emit a debug frame section."),
-                           cl::init(false));
-
-// Common utility function tightly tied to the options listed here. Initializes
-// a TargetOptions object with CodeGen flags and returns it.
-static TargetOptions InitTargetOptionsFromCodeGenFlags() {
-  TargetOptions Options;
-  Options.AllowFPOpFusion = FuseFPOps;
-  Options.UnsafeFPMath = EnableUnsafeFPMath;
-  Options.NoInfsFPMath = EnableNoInfsFPMath;
-  Options.NoNaNsFPMath = EnableNoNaNsFPMath;
-  Options.NoSignedZerosFPMath = EnableNoSignedZerosFPMath;
-  Options.NoTrappingFPMath = EnableNoTrappingFPMath;
-  Options.FPDenormalMode = DenormalFPMath;
-  Options.HonorSignDependentRoundingFPMathOption =
-      EnableHonorSignDependentRoundingFPMath;
-  if (FloatABIForCalls != FloatABI::Default)
-    Options.FloatABIType = FloatABIForCalls;
-  Options.NoZerosInBSS = DontPlaceZerosInBSS;
-  Options.GuaranteedTailCallOpt = EnableGuaranteedTailCallOpt;
-  Options.StackAlignmentOverride = OverrideStackAlignment;
-  Options.StackSymbolOrdering = StackSymbolOrdering;
-  Options.UseInitArray = !UseCtors;
-  Options.RelaxELFRelocations = RelaxELFRelocations;
-  Options.DataSections = DataSections;
-  Options.FunctionSections = FunctionSections;
-  Options.UniqueSectionNames = UniqueSectionNames;
-  Options.TLSSize = TLSSize;
-  Options.EmulatedTLS = EmulatedTLS;
-  Options.ExplicitEmulatedTLS = EmulatedTLS.getNumOccurrences() > 0;
-  Options.ExceptionModel = ExceptionModel;
-  Options.EmitStackSizeSection = EnableStackSizeSection;
-  Options.EmitAddrsig = EnableAddrsig;
-  Options.EnableDebugEntryValues = EnableDebugEntryValues;
-  Options.ForceDwarfFrameSection = ForceDwarfFrameSection;
-
-  Options.MCOptions = InitMCTargetOptionsFromFlags();
-
-  Options.ThreadModel = TMModel;
-  Options.EABIVersion = EABIVersion;
-  Options.DebuggerTuning = DebuggerTuningOpt;
-
-  return Options;
-}
-
-LLVM_ATTRIBUTE_UNUSED static std::string getCPUStr() {
-  // If user asked for the 'native' CPU, autodetect here. If autodection fails,
-  // this will set the CPU to an empty string which tells the target to
-  // pick a basic default.
-  if (MCPU == "native")
-    return sys::getHostCPUName();
-
-  return MCPU;
-}
-
-LLVM_ATTRIBUTE_UNUSED static std::string getFeaturesStr() {
-  SubtargetFeatures Features;
-
-  // If user asked for the 'native' CPU, we need to autodetect features.
-  // This is necessary for x86 where the CPU might not support all the
-  // features the autodetected CPU name lists in the target. For example,
-  // not all Sandybridge processors support AVX.
-  if (MCPU == "native") {
-    StringMap<bool> HostFeatures;
-    if (sys::getHostCPUFeatures(HostFeatures))
-      for (auto &F : HostFeatures)
-        Features.AddFeature(F.first(), F.second);
-  }
-
-  for (unsigned i = 0; i != MAttrs.size(); ++i)
-    Features.AddFeature(MAttrs[i]);
-
-  return Features.getString();
-}
-
-LLVM_ATTRIBUTE_UNUSED static std::vector<std::string> getFeatureList() {
-  SubtargetFeatures Features;
-
-  // If user asked for the 'native' CPU, we need to autodetect features.
-  // This is necessary for x86 where the CPU might not support all the
-  // features the autodetected CPU name lists in the target. For example,
-  // not all Sandybridge processors support AVX.
-  if (MCPU == "native") {
-    StringMap<bool> HostFeatures;
-    if (sys::getHostCPUFeatures(HostFeatures))
-      for (auto &F : HostFeatures)
-        Features.AddFeature(F.first(), F.second);
-  }
-
-  for (unsigned i = 0; i != MAttrs.size(); ++i)
-    Features.AddFeature(MAttrs[i]);
-
-  return Features.getFeatures();
-}
-
-/// Set function attributes of function \p F based on CPU, Features, and command
-/// line flags.
-LLVM_ATTRIBUTE_UNUSED static void
-setFunctionAttributes(StringRef CPU, StringRef Features, Function &F) {
-  auto &Ctx = F.getContext();
-  AttributeList Attrs = F.getAttributes();
-  AttrBuilder NewAttrs;
-
-  if (!CPU.empty() && !F.hasFnAttribute("target-cpu"))
-    NewAttrs.addAttribute("target-cpu", CPU);
-  if (!Features.empty())
-    NewAttrs.addAttribute("target-features", Features);
-  if (FramePointerUsage.getNumOccurrences() > 0) {
-    if (FramePointerUsage == llvm::FramePointer::All)
-      NewAttrs.addAttribute("frame-pointer", "all");
-    else if (FramePointerUsage == llvm::FramePointer::NonLeaf)
-      NewAttrs.addAttribute("frame-pointer", "non-leaf");
-    else if (FramePointerUsage == llvm::FramePointer::None)
-      NewAttrs.addAttribute("frame-pointer", "none");
-  }
-  if (DisableTailCalls.getNumOccurrences() > 0)
-    NewAttrs.addAttribute("disable-tail-calls",
-                          toStringRef(DisableTailCalls));
-  if (StackRealign)
-    NewAttrs.addAttribute("stackrealign");
-
-  if (TrapFuncName.getNumOccurrences() > 0)
-    for (auto &B : F)
-      for (auto &I : B)
-        if (auto *Call = dyn_cast<CallInst>(&I))
-          if (const auto *F = Call->getCalledFunction())
-            if (F->getIntrinsicID() == Intrinsic::debugtrap ||
-                F->getIntrinsicID() == Intrinsic::trap)
-              Call->addAttribute(
-                llvm::AttributeList::FunctionIndex,
-                Attribute::get(Ctx, "trap-func-name", TrapFuncName));
-
-  // Let NewAttrs override Attrs.
-  F.setAttributes(
-    Attrs.addAttributes(Ctx, AttributeList::FunctionIndex, NewAttrs));
-}
-
-/// Set function attributes of functions in Module M based on CPU,
-/// Features, and command line flags.
-LLVM_ATTRIBUTE_UNUSED static void
-setFunctionAttributes(StringRef CPU, StringRef Features, Module &M) {
-  for (Function &F : M)
-    setFunctionAttributes(CPU, Features, F);
-}
diff --git a/gnu/llvm/llvm/include/llvm/CodeGen/GlobalISel/Types.h b/gnu/llvm/llvm/include/llvm/CodeGen/GlobalISel/Types.h
deleted file mode 100644 (file)
index 4fd7043..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-//===- llvm/CodeGen/GlobalISel/Types.h - Types used by GISel ----*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-///
-/// \file
-/// This file describes high level types that are used by several passes or
-/// APIs involved in the GlobalISel pipeline.
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CODEGEN_GLOBALISEL_TYPES_H
-#define LLVM_CODEGEN_GLOBALISEL_TYPES_H
-
-#include "llvm/ADT/DenseMap.h"
-
-namespace llvm {
-
-class Value;
-
-/// Map a value to a virtual register.
-/// For now, we chose to map aggregate types to on single virtual
-/// register. This might be revisited if it turns out to be inefficient.
-/// PR26161 tracks that.
-/// Note: We need to expose this type to the target hooks for thing like
-/// ABI lowering that would be used during IRTranslation.
-using ValueToVReg = DenseMap<const Value *, unsigned>;
-
-} // end namespace llvm
-
-#endif // LLVM_CODEGEN_GLOBALISEL_TYPES_H
index 5cd7f9c..fafada6 100644 (file)
@@ -273,6 +273,15 @@ private:
   /// The frame index for the stack protector.
   int StackProtectorIdx = -1;
 
+  struct ReturnProtector {
+    /// The register to use for return protector calculations
+    unsigned Register = 0;
+    /// Set to true if this function needs return protectors
+    bool Needed = false;
+    /// Does the return protector cookie need to be stored in frame
+    bool NeedsStore = true;
+  } RPI;
+
   /// The frame index for the function context. Used for SjLj exceptions.
   int FunctionContextIdx = -1;
 
@@ -354,6 +363,17 @@ public:
   void setStackProtectorIndex(int I) { StackProtectorIdx = I; }
   bool hasStackProtectorIndex() const { return StackProtectorIdx != -1; }
 
+  /// Get / Set return protector calculation register
+  unsigned getReturnProtectorRegister() const { return RPI.Register; }
+  void setReturnProtectorRegister(unsigned I) { RPI.Register = I; }
+  bool hasReturnProtectorRegister() const { return RPI.Register != 0; }
+  /// Get / Set if this frame needs a return protector
+  void setReturnProtectorNeeded(bool I) { RPI.Needed = I; }
+  bool getReturnProtectorNeeded() const { return RPI.Needed; }
+  /// Get / Set if the return protector cookie needs to be stored in frame
+  void setReturnProtectorNeedsStore(bool I) { RPI.NeedsStore = I; }
+  bool getReturnProtectorNeedsStore() const { return RPI.NeedsStore; }
+
   /// Return the index for the function context object.
   /// This object is used for SjLj exceptions.
   int getFunctionContextIndex() const { return FunctionContextIdx; }
index 9e5b444..6de0d5f 100644 (file)
@@ -334,6 +334,9 @@ namespace llvm {
   ///
   FunctionPass *createStackProtectorPass();
 
+  // createReturnProtectorPass - This pass add return protectors to functions.
+  FunctionPass *createReturnProtectorPass();
+
   /// createMachineVerifierPass - This pass verifies cenerated machine code
   /// instructions for correctness.
   ///
index d658043..0269bcb 100644 (file)
@@ -14,6 +14,7 @@
 #define LLVM_CODEGEN_TARGETFRAMELOWERING_H
 
 #include "llvm/CodeGen/MachineBasicBlock.h"
+#include "llvm/CodeGen/ReturnProtectorLowering.h"
 #include <vector>
 
 namespace llvm {
@@ -208,6 +209,10 @@ public:
   virtual void emitEpilogue(MachineFunction &MF,
                             MachineBasicBlock &MBB) const = 0;
 
+  virtual const ReturnProtectorLowering *getReturnProtector() const {
+    return nullptr;
+  }
+
   /// With basic block sections, emit callee saved frame moves for basic blocks
   /// that are in a different section.
   virtual void
diff --git a/gnu/llvm/llvm/include/llvm/IR/CFGDiff.h b/gnu/llvm/llvm/include/llvm/IR/CFGDiff.h
deleted file mode 100644 (file)
index 57b62dd..0000000
+++ /dev/null
@@ -1,284 +0,0 @@
-//===- CFGDiff.h - Define a CFG snapshot. -----------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines specializations of GraphTraits that allows generic
-// algorithms to see a different snapshot of a CFG.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_IR_CFGDIFF_H
-#define LLVM_IR_CFGDIFF_H
-
-#include "llvm/ADT/GraphTraits.h"
-#include "llvm/ADT/iterator.h"
-#include "llvm/ADT/iterator_range.h"
-#include "llvm/IR/BasicBlock.h"
-#include "llvm/IR/CFG.h"
-#include "llvm/Support/CFGUpdate.h"
-#include "llvm/Support/type_traits.h"
-#include <cassert>
-#include <cstddef>
-#include <iterator>
-
-// Two booleans are used to define orders in graphs:
-// InverseGraph defines when we need to reverse the whole graph and is as such
-// also equivalent to applying updates in reverse.
-// InverseEdge defines whether we want to change the edges direction. E.g., for
-// a non-inversed graph, the children are naturally the successors when
-// InverseEdge is false and the predecessors when InverseEdge is true.
-
-// We define two base clases that call into GraphDiff, one for successors
-// (CFGSuccessors), where InverseEdge is false, and one for predecessors
-// (CFGPredecessors), where InverseEdge is true.
-// FIXME: Further refactoring may merge the two base classes into a single one
-// templated / parametrized on using succ_iterator/pred_iterator and false/true
-// for the InverseEdge.
-
-// CFGViewSuccessors and CFGViewPredecessors, both can be parametrized to
-// consider the graph inverted or not (i.e. InverseGraph). Successors
-// implicitly has InverseEdge = false and Predecessors implicitly has
-// InverseEdge = true (see calls to GraphDiff methods in there). The GraphTraits
-// instantiations that follow define the value of InverseGraph.
-
-// GraphTraits instantiations:
-// - GraphDiff<BasicBlock *> is equivalent to InverseGraph = false
-// - GraphDiff<Inverse<BasicBlock *>> is equivalent to InverseGraph = true
-// - second pair item is BasicBlock *, then InverseEdge = false (so it inherits
-// from CFGViewSuccessors).
-// - second pair item is Inverse<BasicBlock *>, then InverseEdge = true (so it
-// inherits from CFGViewPredecessors).
-
-// The 4 GraphTraits are as follows:
-// 1. std::pair<const GraphDiff<BasicBlock *> *, BasicBlock *>> :
-//        CFGViewSuccessors<false>
-// Regular CFG, children means successors, InverseGraph = false,
-// InverseEdge = false.
-// 2. std::pair<const GraphDiff<Inverse<BasicBlock *>> *, BasicBlock *>> :
-//        CFGViewSuccessors<true>
-// Reverse the graph, get successors but reverse-apply updates,
-// InverseGraph = true, InverseEdge = false.
-// 3. std::pair<const GraphDiff<BasicBlock *> *, Inverse<BasicBlock *>>> :
-//        CFGViewPredecessors<false>
-// Regular CFG, reverse edges, so children mean predecessors,
-// InverseGraph = false, InverseEdge = true.
-// 4. std::pair<const GraphDiff<Inverse<BasicBlock *>> *, Inverse<BasicBlock *>>
-//        : CFGViewPredecessors<true>
-// Reverse the graph and the edges, InverseGraph = true, InverseEdge = true.
-
-namespace llvm {
-
-// GraphDiff defines a CFG snapshot: given a set of Update<NodePtr>, provide
-// utilities to skip edges marked as deleted and return a set of edges marked as
-// newly inserted. The current diff treats the CFG as a graph rather than a
-// multigraph. Added edges are pruned to be unique, and deleted edges will
-// remove all existing edges between two blocks.
-template <typename NodePtr, bool InverseGraph = false> class GraphDiff {
-  using UpdateMapType = SmallDenseMap<NodePtr, SmallVector<NodePtr, 2>>;
-  UpdateMapType SuccInsert;
-  UpdateMapType SuccDelete;
-  UpdateMapType PredInsert;
-  UpdateMapType PredDelete;
-  // Using a singleton empty vector for all BasicBlock requests with no
-  // children.
-  SmallVector<NodePtr, 1> Empty;
-
-  void printMap(raw_ostream &OS, const UpdateMapType &M) const {
-    for (auto Pair : M)
-      for (auto Child : Pair.second) {
-        OS << "(";
-        Pair.first->printAsOperand(OS, false);
-        OS << ", ";
-        Child->printAsOperand(OS, false);
-        OS << ") ";
-      }
-    OS << "\n";
-  }
-
-public:
-  GraphDiff() {}
-  GraphDiff(ArrayRef<cfg::Update<NodePtr>> Updates) {
-    SmallVector<cfg::Update<NodePtr>, 4> LegalizedUpdates;
-    cfg::LegalizeUpdates<NodePtr>(Updates, LegalizedUpdates, InverseGraph);
-    for (auto U : LegalizedUpdates) {
-      if (U.getKind() == cfg::UpdateKind::Insert) {
-        SuccInsert[U.getFrom()].push_back(U.getTo());
-        PredInsert[U.getTo()].push_back(U.getFrom());
-      } else {
-        SuccDelete[U.getFrom()].push_back(U.getTo());
-        PredDelete[U.getTo()].push_back(U.getFrom());
-      }
-    }
-  }
-
-  bool ignoreChild(const NodePtr BB, NodePtr EdgeEnd, bool InverseEdge) const {
-    auto &DeleteChildren =
-        (InverseEdge != InverseGraph) ? PredDelete : SuccDelete;
-    auto It = DeleteChildren.find(BB);
-    if (It == DeleteChildren.end())
-      return false;
-    auto &EdgesForBB = It->second;
-    return llvm::find(EdgesForBB, EdgeEnd) != EdgesForBB.end();
-  }
-
-  iterator_range<typename SmallVectorImpl<NodePtr>::const_iterator>
-  getAddedChildren(const NodePtr BB, bool InverseEdge) const {
-    auto &InsertChildren =
-        (InverseEdge != InverseGraph) ? PredInsert : SuccInsert;
-    auto It = InsertChildren.find(BB);
-    if (It == InsertChildren.end())
-      return make_range(Empty.begin(), Empty.end());
-    return make_range(It->second.begin(), It->second.end());
-  }
-
-  void print(raw_ostream &OS) const {
-    OS << "===== GraphDiff: CFG edge changes to create a CFG snapshot. \n"
-          "===== (Note: notion of children/inverse_children depends on "
-          "the direction of edges and the graph.)\n";
-    OS << "Children to insert:\n\t";
-    printMap(OS, SuccInsert);
-    OS << "Children to delete:\n\t";
-    printMap(OS, SuccDelete);
-    OS << "Inverse_children to insert:\n\t";
-    printMap(OS, PredInsert);
-    OS << "Inverse_children to delete:\n\t";
-    printMap(OS, PredDelete);
-    OS << "\n";
-  }
-
-#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-  LLVM_DUMP_METHOD void dump() const { print(dbgs()); }
-#endif
-};
-
-template <bool InverseGraph = false> struct CFGViewSuccessors {
-  using DataRef = const GraphDiff<BasicBlock *, InverseGraph> *;
-  using NodeRef = std::pair<DataRef, BasicBlock *>;
-
-  using ExistingChildIterator =
-      WrappedPairNodeDataIterator<succ_iterator, NodeRef, DataRef>;
-  struct DeletedEdgesFilter {
-    BasicBlock *BB;
-    DeletedEdgesFilter(BasicBlock *BB) : BB(BB){};
-    bool operator()(NodeRef N) const {
-      return !N.first->ignoreChild(BB, N.second, false);
-    }
-  };
-  using FilterExistingChildrenIterator =
-      filter_iterator<ExistingChildIterator, DeletedEdgesFilter>;
-
-  using vec_iterator = SmallVectorImpl<BasicBlock *>::const_iterator;
-  using AddNewChildrenIterator =
-      WrappedPairNodeDataIterator<vec_iterator, NodeRef, DataRef>;
-  using ChildIteratorType =
-      concat_iterator<NodeRef, FilterExistingChildrenIterator,
-                      AddNewChildrenIterator>;
-
-  static ChildIteratorType child_begin(NodeRef N) {
-    auto InsertVec = N.first->getAddedChildren(N.second, false);
-    // filter iterator init:
-    auto firstit = make_filter_range(
-        make_range<ExistingChildIterator>({succ_begin(N.second), N.first},
-                                          {succ_end(N.second), N.first}),
-        DeletedEdgesFilter(N.second));
-    // new inserts iterator init:
-    auto secondit = make_range<AddNewChildrenIterator>(
-        {InsertVec.begin(), N.first}, {InsertVec.end(), N.first});
-
-    return concat_iterator<NodeRef, FilterExistingChildrenIterator,
-                           AddNewChildrenIterator>(firstit, secondit);
-  }
-
-  static ChildIteratorType child_end(NodeRef N) {
-    auto InsertVec = N.first->getAddedChildren(N.second, false);
-    // filter iterator init:
-    auto firstit = make_filter_range(
-        make_range<ExistingChildIterator>({succ_end(N.second), N.first},
-                                          {succ_end(N.second), N.first}),
-        DeletedEdgesFilter(N.second));
-    // new inserts iterator init:
-    auto secondit = make_range<AddNewChildrenIterator>(
-        {InsertVec.end(), N.first}, {InsertVec.end(), N.first});
-
-    return concat_iterator<NodeRef, FilterExistingChildrenIterator,
-                           AddNewChildrenIterator>(firstit, secondit);
-  }
-};
-
-template <bool InverseGraph = false> struct CFGViewPredecessors {
-  using DataRef = const GraphDiff<BasicBlock *, InverseGraph> *;
-  using NodeRef = std::pair<DataRef, BasicBlock *>;
-
-  using ExistingChildIterator =
-      WrappedPairNodeDataIterator<pred_iterator, NodeRef, DataRef>;
-  struct DeletedEdgesFilter {
-    BasicBlock *BB;
-    DeletedEdgesFilter(BasicBlock *BB) : BB(BB){};
-    bool operator()(NodeRef N) const {
-      return !N.first->ignoreChild(BB, N.second, true);
-    }
-  };
-  using FilterExistingChildrenIterator =
-      filter_iterator<ExistingChildIterator, DeletedEdgesFilter>;
-
-  using vec_iterator = SmallVectorImpl<BasicBlock *>::const_iterator;
-  using AddNewChildrenIterator =
-      WrappedPairNodeDataIterator<vec_iterator, NodeRef, DataRef>;
-  using ChildIteratorType =
-      concat_iterator<NodeRef, FilterExistingChildrenIterator,
-                      AddNewChildrenIterator>;
-
-  static ChildIteratorType child_begin(NodeRef N) {
-    auto InsertVec = N.first->getAddedChildren(N.second, true);
-    // filter iterator init:
-    auto firstit = make_filter_range(
-        make_range<ExistingChildIterator>({pred_begin(N.second), N.first},
-                                          {pred_end(N.second), N.first}),
-        DeletedEdgesFilter(N.second));
-    // new inserts iterator init:
-    auto secondit = make_range<AddNewChildrenIterator>(
-        {InsertVec.begin(), N.first}, {InsertVec.end(), N.first});
-
-    return concat_iterator<NodeRef, FilterExistingChildrenIterator,
-                           AddNewChildrenIterator>(firstit, secondit);
-  }
-
-  static ChildIteratorType child_end(NodeRef N) {
-    auto InsertVec = N.first->getAddedChildren(N.second, true);
-    // filter iterator init:
-    auto firstit = make_filter_range(
-        make_range<ExistingChildIterator>({pred_end(N.second), N.first},
-                                          {pred_end(N.second), N.first}),
-        DeletedEdgesFilter(N.second));
-    // new inserts iterator init:
-    auto secondit = make_range<AddNewChildrenIterator>(
-        {InsertVec.end(), N.first}, {InsertVec.end(), N.first});
-
-    return concat_iterator<NodeRef, FilterExistingChildrenIterator,
-                           AddNewChildrenIterator>(firstit, secondit);
-  }
-};
-
-template <>
-struct GraphTraits<
-    std::pair<const GraphDiff<BasicBlock *, false> *, BasicBlock *>>
-    : CFGViewSuccessors<false> {};
-template <>
-struct GraphTraits<
-    std::pair<const GraphDiff<BasicBlock *, true> *, BasicBlock *>>
-    : CFGViewSuccessors<true> {};
-template <>
-struct GraphTraits<
-    std::pair<const GraphDiff<BasicBlock *, false> *, Inverse<BasicBlock *>>>
-    : CFGViewPredecessors<false> {};
-template <>
-struct GraphTraits<
-    std::pair<const GraphDiff<BasicBlock *, true> *, Inverse<BasicBlock *>>>
-    : CFGViewPredecessors<true> {};
-} // end namespace llvm
-
-#endif // LLVM_IR_CFGDIFF_H
diff --git a/gnu/llvm/llvm/include/llvm/IR/CallSite.h b/gnu/llvm/llvm/include/llvm/IR/CallSite.h
deleted file mode 100644 (file)
index 0e957c4..0000000
+++ /dev/null
@@ -1,926 +0,0 @@
-//===- CallSite.h - Abstract Call & Invoke instrs ---------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines the CallSite class, which is a handy wrapper for code that
-// wants to treat Call, Invoke and CallBr instructions in a generic way. When
-// in non-mutation context (e.g. an analysis) ImmutableCallSite should be used.
-// Finally, when some degree of customization is necessary between these two
-// extremes, CallSiteBase<> can be supplied with fine-tuned parameters.
-//
-// NOTE: These classes are supposed to have "value semantics". So they should be
-// passed by value, not by reference; they should not be "new"ed or "delete"d.
-// They are efficiently copyable, assignable and constructable, with cost
-// equivalent to copying a pointer (notice that they have only a single data
-// member). The internal representation carries a flag which indicates which of
-// the three variants is enclosed. This allows for cheaper checks when various
-// accessors of CallSite are employed.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_IR_CALLSITE_H
-#define LLVM_IR_CALLSITE_H
-
-#include "llvm/ADT/Optional.h"
-#include "llvm/ADT/PointerIntPair.h"
-#include "llvm/ADT/iterator_range.h"
-#include "llvm/IR/Attributes.h"
-#include "llvm/IR/CallingConv.h"
-#include "llvm/IR/Function.h"
-#include "llvm/IR/InstrTypes.h"
-#include "llvm/IR/Instruction.h"
-#include "llvm/IR/Instructions.h"
-#include "llvm/IR/Use.h"
-#include "llvm/IR/User.h"
-#include "llvm/IR/Value.h"
-#include "llvm/Support/Casting.h"
-#include <cassert>
-#include <cstdint>
-#include <iterator>
-
-namespace llvm {
-
-namespace Intrinsic {
-typedef unsigned ID;
-}
-
-template <typename FunTy = const Function, typename BBTy = const BasicBlock,
-          typename ValTy = const Value, typename UserTy = const User,
-          typename UseTy = const Use, typename InstrTy = const Instruction,
-          typename CallTy = const CallInst,
-          typename InvokeTy = const InvokeInst,
-          typename CallBrTy = const CallBrInst,
-          typename IterTy = User::const_op_iterator>
-class CallSiteBase {
-protected:
-  PointerIntPair<InstrTy *, 2, int> I;
-
-  CallSiteBase() = default;
-  CallSiteBase(CallTy *CI) : I(CI, 1) { assert(CI); }
-  CallSiteBase(InvokeTy *II) : I(II, 0) { assert(II); }
-  CallSiteBase(CallBrTy *CBI) : I(CBI, 2) { assert(CBI); }
-  explicit CallSiteBase(ValTy *II) { *this = get(II); }
-
-private:
-  /// This static method is like a constructor. It will create an appropriate
-  /// call site for a Call, Invoke or CallBr instruction, but it can also create
-  /// a null initialized CallSiteBase object for something which is NOT a call
-  /// site.
-  static CallSiteBase get(ValTy *V) {
-    if (InstrTy *II = dyn_cast<InstrTy>(V)) {
-      if (II->getOpcode() == Instruction::Call)
-        return CallSiteBase(static_cast<CallTy*>(II));
-      if (II->getOpcode() == Instruction::Invoke)
-        return CallSiteBase(static_cast<InvokeTy*>(II));
-      if (II->getOpcode() == Instruction::CallBr)
-        return CallSiteBase(static_cast<CallBrTy *>(II));
-    }
-    return CallSiteBase();
-  }
-
-public:
-  /// Return true if a CallInst is enclosed.
-  bool isCall() const { return I.getInt() == 1; }
-
-  /// Return true if a InvokeInst is enclosed. !I.getInt() may also signify a
-  /// NULL instruction pointer, so check that.
-  bool isInvoke() const { return getInstruction() && I.getInt() == 0; }
-
-  /// Return true if a CallBrInst is enclosed.
-  bool isCallBr() const { return I.getInt() == 2; }
-
-  InstrTy *getInstruction() const { return I.getPointer(); }
-  InstrTy *operator->() const { return I.getPointer(); }
-  explicit operator bool() const { return I.getPointer(); }
-
-  /// Get the basic block containing the call site.
-  BBTy* getParent() const { return getInstruction()->getParent(); }
-
-  /// Return the pointer to function that is being called.
-  ValTy *getCalledValue() const {
-    assert(getInstruction() && "Not a call, invoke or callbr instruction!");
-    return *getCallee();
-  }
-
-  /// Return the function being called if this is a direct call, otherwise
-  /// return null (if it's an indirect call).
-  FunTy *getCalledFunction() const {
-    return dyn_cast<FunTy>(getCalledValue());
-  }
-
-  /// Return true if the callsite is an indirect call.
-  bool isIndirectCall() const {
-    const Value *V = getCalledValue();
-    if (!V)
-      return false;
-    if (isa<FunTy>(V) || isa<Constant>(V))
-      return false;
-    if (const CallBase *CB = dyn_cast<CallBase>(getInstruction()))
-      if (CB->isInlineAsm())
-        return false;
-    return true;
-  }
-
-  /// Set the callee to the specified value.  Unlike the function of the same
-  /// name on CallBase, does not modify the type!
-  void setCalledFunction(Value *V) {
-    assert(getInstruction() && "Not a call, callbr, or invoke instruction!");
-    assert(cast<PointerType>(V->getType())->getElementType() ==
-               cast<CallBase>(getInstruction())->getFunctionType() &&
-           "New callee type does not match FunctionType on call");
-    *getCallee() = V;
-  }
-
-  /// Return the intrinsic ID of the intrinsic called by this CallSite,
-  /// or Intrinsic::not_intrinsic if the called function is not an
-  /// intrinsic, or if this CallSite is an indirect call.
-  Intrinsic::ID getIntrinsicID() const {
-    if (auto *F = getCalledFunction())
-      return F->getIntrinsicID();
-    // Don't use Intrinsic::not_intrinsic, as it will require pulling
-    // Intrinsics.h into every header that uses CallSite.
-    return static_cast<Intrinsic::ID>(0);
-  }
-
-  /// Determine whether the passed iterator points to the callee operand's Use.
-  bool isCallee(Value::const_user_iterator UI) const {
-    return isCallee(&UI.getUse());
-  }
-
-  /// Determine whether this Use is the callee operand's Use.
-  bool isCallee(const Use *U) const { return getCallee() == U; }
-
-  /// Determine whether the passed iterator points to an argument operand.
-  bool isArgOperand(Value::const_user_iterator UI) const {
-    return isArgOperand(&UI.getUse());
-  }
-
-  /// Determine whether the passed use points to an argument operand.
-  bool isArgOperand(const Use *U) const {
-    assert(getInstruction() == U->getUser());
-    return arg_begin() <= U && U < arg_end();
-  }
-
-  /// Determine whether the passed iterator points to a bundle operand.
-  bool isBundleOperand(Value::const_user_iterator UI) const {
-    return isBundleOperand(&UI.getUse());
-  }
-
-  /// Determine whether the passed use points to a bundle operand.
-  bool isBundleOperand(const Use *U) const {
-    assert(getInstruction() == U->getUser());
-    if (!hasOperandBundles())
-      return false;
-    unsigned OperandNo = U - (*this)->op_begin();
-    return getBundleOperandsStartIndex() <= OperandNo &&
-           OperandNo < getBundleOperandsEndIndex();
-  }
-
-  /// Determine whether the passed iterator points to a data operand.
-  bool isDataOperand(Value::const_user_iterator UI) const {
-    return isDataOperand(&UI.getUse());
-  }
-
-  /// Determine whether the passed use points to a data operand.
-  bool isDataOperand(const Use *U) const {
-    return data_operands_begin() <= U && U < data_operands_end();
-  }
-
-  ValTy *getArgument(unsigned ArgNo) const {
-    assert(arg_begin() + ArgNo < arg_end() && "Argument # out of range!");
-    return *(arg_begin() + ArgNo);
-  }
-
-  void setArgument(unsigned ArgNo, Value* newVal) {
-    assert(getInstruction() && "Not a call, invoke or callbr instruction!");
-    assert(arg_begin() + ArgNo < arg_end() && "Argument # out of range!");
-    getInstruction()->setOperand(ArgNo, newVal);
-  }
-
-  /// Given a value use iterator, returns the argument that corresponds to it.
-  /// Iterator must actually correspond to an argument.
-  unsigned getArgumentNo(Value::const_user_iterator I) const {
-    return getArgumentNo(&I.getUse());
-  }
-
-  /// Given a use for an argument, get the argument number that corresponds to
-  /// it.
-  unsigned getArgumentNo(const Use *U) const {
-    assert(getInstruction() && "Not a call, invoke or callbr instruction!");
-    assert(isArgOperand(U) && "Argument # out of range!");
-    return U - arg_begin();
-  }
-
-  /// The type of iterator to use when looping over actual arguments at this
-  /// call site.
-  using arg_iterator = IterTy;
-
-  iterator_range<IterTy> args() const {
-    return make_range(arg_begin(), arg_end());
-  }
-  bool arg_empty() const { return arg_end() == arg_begin(); }
-  unsigned arg_size() const { return unsigned(arg_end() - arg_begin()); }
-
-  /// Given a value use iterator, return the data operand corresponding to it.
-  /// Iterator must actually correspond to a data operand.
-  unsigned getDataOperandNo(Value::const_user_iterator UI) const {
-    return getDataOperandNo(&UI.getUse());
-  }
-
-  /// Given a use for a data operand, get the data operand number that
-  /// corresponds to it.
-  unsigned getDataOperandNo(const Use *U) const {
-    assert(getInstruction() && "Not a call, invoke or callbr instruction!");
-    assert(isDataOperand(U) && "Data operand # out of range!");
-    return U - data_operands_begin();
-  }
-
-  /// Type of iterator to use when looping over data operands at this call site
-  /// (see below).
-  using data_operand_iterator = IterTy;
-
-  /// data_operands_begin/data_operands_end - Return iterators iterating over
-  /// the call / invoke / callbr argument list and bundle operands. For invokes,
-  /// this is the set of instruction operands except the invoke target and the
-  /// two successor blocks; for calls this is the set of instruction operands
-  /// except the call target; for callbrs the number of labels to skip must be
-  /// determined first.
-
-  IterTy data_operands_begin() const {
-    assert(getInstruction() && "Not a call or invoke instruction!");
-    return cast<CallBase>(getInstruction())->data_operands_begin();
-  }
-  IterTy data_operands_end() const {
-    assert(getInstruction() && "Not a call or invoke instruction!");
-    return cast<CallBase>(getInstruction())->data_operands_end();
-  }
-  iterator_range<IterTy> data_ops() const {
-    return make_range(data_operands_begin(), data_operands_end());
-  }
-  bool data_operands_empty() const {
-    return data_operands_end() == data_operands_begin();
-  }
-  unsigned data_operands_size() const {
-    return std::distance(data_operands_begin(), data_operands_end());
-  }
-
-  /// Return the type of the instruction that generated this call site.
-  Type *getType() const { return (*this)->getType(); }
-
-  /// Return the caller function for this call site.
-  FunTy *getCaller() const { return (*this)->getParent()->getParent(); }
-
-  /// Tests if this call site must be tail call optimized. Only a CallInst can
-  /// be tail call optimized.
-  bool isMustTailCall() const {
-    return isCall() && cast<CallInst>(getInstruction())->isMustTailCall();
-  }
-
-  /// Tests if this call site is marked as a tail call.
-  bool isTailCall() const {
-    return isCall() && cast<CallInst>(getInstruction())->isTailCall();
-  }
-
-#define CALLSITE_DELEGATE_GETTER(METHOD)                                       \
-  InstrTy *II = getInstruction();                                              \
-  return isCall() ? cast<CallInst>(II)->METHOD                                 \
-                  : isCallBr() ? cast<CallBrInst>(II)->METHOD                  \
-                                : cast<InvokeInst>(II)->METHOD
-
-#define CALLSITE_DELEGATE_SETTER(METHOD)                                       \
-  InstrTy *II = getInstruction();                                              \
-  if (isCall())                                                                \
-    cast<CallInst>(II)->METHOD;                                                \
-  else if (isCallBr())                                                         \
-    cast<CallBrInst>(II)->METHOD;                                              \
-  else                                                                         \
-    cast<InvokeInst>(II)->METHOD
-
-  unsigned getNumArgOperands() const {
-    CALLSITE_DELEGATE_GETTER(getNumArgOperands());
-  }
-
-  ValTy *getArgOperand(unsigned i) const {
-    CALLSITE_DELEGATE_GETTER(getArgOperand(i));
-  }
-
-  ValTy *getReturnedArgOperand() const {
-    CALLSITE_DELEGATE_GETTER(getReturnedArgOperand());
-  }
-
-  bool isInlineAsm() const {
-    return cast<CallBase>(getInstruction())->isInlineAsm();
-  }
-
-  /// Get the calling convention of the call.
-  CallingConv::ID getCallingConv() const {
-    CALLSITE_DELEGATE_GETTER(getCallingConv());
-  }
-  /// Set the calling convention of the call.
-  void setCallingConv(CallingConv::ID CC) {
-    CALLSITE_DELEGATE_SETTER(setCallingConv(CC));
-  }
-
-  FunctionType *getFunctionType() const {
-    CALLSITE_DELEGATE_GETTER(getFunctionType());
-  }
-
-  void mutateFunctionType(FunctionType *Ty) const {
-    CALLSITE_DELEGATE_SETTER(mutateFunctionType(Ty));
-  }
-
-  /// Get the parameter attributes of the call.
-  AttributeList getAttributes() const {
-    CALLSITE_DELEGATE_GETTER(getAttributes());
-  }
-  /// Set the parameter attributes of the call.
-  void setAttributes(AttributeList PAL) {
-    CALLSITE_DELEGATE_SETTER(setAttributes(PAL));
-  }
-
-  void addAttribute(unsigned i, Attribute::AttrKind Kind) {
-    CALLSITE_DELEGATE_SETTER(addAttribute(i, Kind));
-  }
-
-  void addAttribute(unsigned i, Attribute Attr) {
-    CALLSITE_DELEGATE_SETTER(addAttribute(i, Attr));
-  }
-
-  void addParamAttr(unsigned ArgNo, Attribute::AttrKind Kind) {
-    CALLSITE_DELEGATE_SETTER(addParamAttr(ArgNo, Kind));
-  }
-
-  void removeAttribute(unsigned i, Attribute::AttrKind Kind) {
-    CALLSITE_DELEGATE_SETTER(removeAttribute(i, Kind));
-  }
-
-  void removeAttribute(unsigned i, StringRef Kind) {
-    CALLSITE_DELEGATE_SETTER(removeAttribute(i, Kind));
-  }
-
-  void removeParamAttr(unsigned ArgNo, Attribute::AttrKind Kind) {
-    CALLSITE_DELEGATE_SETTER(removeParamAttr(ArgNo, Kind));
-  }
-
-  /// Return true if this function has the given attribute.
-  bool hasFnAttr(Attribute::AttrKind Kind) const {
-    CALLSITE_DELEGATE_GETTER(hasFnAttr(Kind));
-  }
-
-  /// Return true if this function has the given attribute.
-  bool hasFnAttr(StringRef Kind) const {
-    CALLSITE_DELEGATE_GETTER(hasFnAttr(Kind));
-  }
-
-  /// Return true if this return value has the given attribute.
-  bool hasRetAttr(Attribute::AttrKind Kind) const {
-    CALLSITE_DELEGATE_GETTER(hasRetAttr(Kind));
-  }
-
-  /// Return true if the call or the callee has the given attribute.
-  bool paramHasAttr(unsigned ArgNo, Attribute::AttrKind Kind) const {
-    CALLSITE_DELEGATE_GETTER(paramHasAttr(ArgNo, Kind));
-  }
-
-  Attribute getAttribute(unsigned i, Attribute::AttrKind Kind) const {
-    CALLSITE_DELEGATE_GETTER(getAttribute(i, Kind));
-  }
-
-  Attribute getAttribute(unsigned i, StringRef Kind) const {
-    CALLSITE_DELEGATE_GETTER(getAttribute(i, Kind));
-  }
-
-  /// Return true if the data operand at index \p i directly or indirectly has
-  /// the attribute \p A.
-  ///
-  /// Normal call, invoke or callbr arguments have per operand attributes, as
-  /// specified in the attribute set attached to this instruction, while operand
-  /// bundle operands may have some attributes implied by the type of its
-  /// containing operand bundle.
-  bool dataOperandHasImpliedAttr(unsigned i, Attribute::AttrKind Kind) const {
-    CALLSITE_DELEGATE_GETTER(dataOperandHasImpliedAttr(i, Kind));
-  }
-
-  /// Extract the alignment of the return value.
-  unsigned getRetAlignment() const {
-    CALLSITE_DELEGATE_GETTER(getRetAlignment());
-  }
-
-  /// Extract the alignment for a call or parameter (0=unknown).
-  unsigned getParamAlignment(unsigned ArgNo) const {
-    CALLSITE_DELEGATE_GETTER(getParamAlignment(ArgNo));
-  }
-
-  /// Extract the byval type for a call or parameter (nullptr=unknown).
-  Type *getParamByValType(unsigned ArgNo) const {
-    CALLSITE_DELEGATE_GETTER(getParamByValType(ArgNo));
-  }
-
-  /// Extract the number of dereferenceable bytes for a call or parameter
-  /// (0=unknown).
-  uint64_t getDereferenceableBytes(unsigned i) const {
-    CALLSITE_DELEGATE_GETTER(getDereferenceableBytes(i));
-  }
-
-  /// Extract the number of dereferenceable_or_null bytes for a call or
-  /// parameter (0=unknown).
-  uint64_t getDereferenceableOrNullBytes(unsigned i) const {
-    CALLSITE_DELEGATE_GETTER(getDereferenceableOrNullBytes(i));
-  }
-
-  /// Determine if the return value is marked with NoAlias attribute.
-  bool returnDoesNotAlias() const {
-    CALLSITE_DELEGATE_GETTER(returnDoesNotAlias());
-  }
-
-  /// Return true if the call should not be treated as a call to a builtin.
-  bool isNoBuiltin() const {
-    CALLSITE_DELEGATE_GETTER(isNoBuiltin());
-  }
-
-  /// Return true if the call requires strict floating point semantics.
-  bool isStrictFP() const {
-    CALLSITE_DELEGATE_GETTER(isStrictFP());
-  }
-
-  /// Return true if the call should not be inlined.
-  bool isNoInline() const {
-    CALLSITE_DELEGATE_GETTER(isNoInline());
-  }
-  void setIsNoInline(bool Value = true) {
-    CALLSITE_DELEGATE_SETTER(setIsNoInline(Value));
-  }
-
-  /// Determine if the call does not access memory.
-  bool doesNotAccessMemory() const {
-    CALLSITE_DELEGATE_GETTER(doesNotAccessMemory());
-  }
-  void setDoesNotAccessMemory() {
-    CALLSITE_DELEGATE_SETTER(setDoesNotAccessMemory());
-  }
-
-  /// Determine if the call does not access or only reads memory.
-  bool onlyReadsMemory() const {
-    CALLSITE_DELEGATE_GETTER(onlyReadsMemory());
-  }
-  void setOnlyReadsMemory() {
-    CALLSITE_DELEGATE_SETTER(setOnlyReadsMemory());
-  }
-
-  /// Determine if the call does not access or only writes memory.
-  bool doesNotReadMemory() const {
-    CALLSITE_DELEGATE_GETTER(doesNotReadMemory());
-  }
-  void setDoesNotReadMemory() {
-    CALLSITE_DELEGATE_SETTER(setDoesNotReadMemory());
-  }
-
-  /// Determine if the call can access memmory only using pointers based
-  /// on its arguments.
-  bool onlyAccessesArgMemory() const {
-    CALLSITE_DELEGATE_GETTER(onlyAccessesArgMemory());
-  }
-  void setOnlyAccessesArgMemory() {
-    CALLSITE_DELEGATE_SETTER(setOnlyAccessesArgMemory());
-  }
-
-  /// Determine if the function may only access memory that is
-  /// inaccessible from the IR.
-  bool onlyAccessesInaccessibleMemory() const {
-    CALLSITE_DELEGATE_GETTER(onlyAccessesInaccessibleMemory());
-  }
-  void setOnlyAccessesInaccessibleMemory() {
-    CALLSITE_DELEGATE_SETTER(setOnlyAccessesInaccessibleMemory());
-  }
-
-  /// Determine if the function may only access memory that is
-  /// either inaccessible from the IR or pointed to by its arguments.
-  bool onlyAccessesInaccessibleMemOrArgMem() const {
-    CALLSITE_DELEGATE_GETTER(onlyAccessesInaccessibleMemOrArgMem());
-  }
-  void setOnlyAccessesInaccessibleMemOrArgMem() {
-    CALLSITE_DELEGATE_SETTER(setOnlyAccessesInaccessibleMemOrArgMem());
-  }
-
-  /// Determine if the call cannot return.
-  bool doesNotReturn() const {
-    CALLSITE_DELEGATE_GETTER(doesNotReturn());
-  }
-  void setDoesNotReturn() {
-    CALLSITE_DELEGATE_SETTER(setDoesNotReturn());
-  }
-
-  /// Determine if the call cannot unwind.
-  bool doesNotThrow() const {
-    CALLSITE_DELEGATE_GETTER(doesNotThrow());
-  }
-  void setDoesNotThrow() {
-    CALLSITE_DELEGATE_SETTER(setDoesNotThrow());
-  }
-
-  /// Determine if the call can be duplicated.
-  bool cannotDuplicate() const {
-    CALLSITE_DELEGATE_GETTER(cannotDuplicate());
-  }
-  void setCannotDuplicate() {
-    CALLSITE_DELEGATE_SETTER(setCannotDuplicate());
-  }
-
-  /// Determine if the call is convergent.
-  bool isConvergent() const {
-    CALLSITE_DELEGATE_GETTER(isConvergent());
-  }
-  void setConvergent() {
-    CALLSITE_DELEGATE_SETTER(setConvergent());
-  }
-  void setNotConvergent() {
-    CALLSITE_DELEGATE_SETTER(setNotConvergent());
-  }
-
-  unsigned getNumOperandBundles() const {
-    CALLSITE_DELEGATE_GETTER(getNumOperandBundles());
-  }
-
-  bool hasOperandBundles() const {
-    CALLSITE_DELEGATE_GETTER(hasOperandBundles());
-  }
-
-  unsigned getBundleOperandsStartIndex() const {
-    CALLSITE_DELEGATE_GETTER(getBundleOperandsStartIndex());
-  }
-
-  unsigned getBundleOperandsEndIndex() const {
-    CALLSITE_DELEGATE_GETTER(getBundleOperandsEndIndex());
-  }
-
-  unsigned getNumTotalBundleOperands() const {
-    CALLSITE_DELEGATE_GETTER(getNumTotalBundleOperands());
-  }
-
-  OperandBundleUse getOperandBundleAt(unsigned Index) const {
-    CALLSITE_DELEGATE_GETTER(getOperandBundleAt(Index));
-  }
-
-  Optional<OperandBundleUse> getOperandBundle(StringRef Name) const {
-    CALLSITE_DELEGATE_GETTER(getOperandBundle(Name));
-  }
-
-  Optional<OperandBundleUse> getOperandBundle(uint32_t ID) const {
-    CALLSITE_DELEGATE_GETTER(getOperandBundle(ID));
-  }
-
-  unsigned countOperandBundlesOfType(uint32_t ID) const {
-    CALLSITE_DELEGATE_GETTER(countOperandBundlesOfType(ID));
-  }
-
-  bool isBundleOperand(unsigned Idx) const {
-    CALLSITE_DELEGATE_GETTER(isBundleOperand(Idx));
-  }
-
-  IterTy arg_begin() const {
-    CALLSITE_DELEGATE_GETTER(arg_begin());
-  }
-
-  IterTy arg_end() const {
-    CALLSITE_DELEGATE_GETTER(arg_end());
-  }
-
-#undef CALLSITE_DELEGATE_GETTER
-#undef CALLSITE_DELEGATE_SETTER
-
-  void getOperandBundlesAsDefs(SmallVectorImpl<OperandBundleDef> &Defs) const {
-    // Since this is actually a getter that "looks like" a setter, don't use the
-    // above macros to avoid confusion.
-    cast<CallBase>(getInstruction())->getOperandBundlesAsDefs(Defs);
-  }
-
-  /// Determine whether this data operand is not captured.
-  bool doesNotCapture(unsigned OpNo) const {
-    return dataOperandHasImpliedAttr(OpNo + 1, Attribute::NoCapture);
-  }
-
-  /// Determine whether this argument is passed by value.
-  bool isByValArgument(unsigned ArgNo) const {
-    return paramHasAttr(ArgNo, Attribute::ByVal);
-  }
-
-  /// Determine whether this argument is passed in an alloca.
-  bool isInAllocaArgument(unsigned ArgNo) const {
-    return paramHasAttr(ArgNo, Attribute::InAlloca);
-  }
-
-  /// Determine whether this argument is passed by value or in an alloca.
-  bool isByValOrInAllocaArgument(unsigned ArgNo) const {
-    return paramHasAttr(ArgNo, Attribute::ByVal) ||
-           paramHasAttr(ArgNo, Attribute::InAlloca);
-  }
-
-  /// Determine if there are is an inalloca argument. Only the last argument can
-  /// have the inalloca attribute.
-  bool hasInAllocaArgument() const {
-    return !arg_empty() && paramHasAttr(arg_size() - 1, Attribute::InAlloca);
-  }
-
-  bool doesNotAccessMemory(unsigned OpNo) const {
-    return dataOperandHasImpliedAttr(OpNo + 1, Attribute::ReadNone);
-  }
-
-  bool onlyReadsMemory(unsigned OpNo) const {
-    return dataOperandHasImpliedAttr(OpNo + 1, Attribute::ReadOnly) ||
-           dataOperandHasImpliedAttr(OpNo + 1, Attribute::ReadNone);
-  }
-
-  bool doesNotReadMemory(unsigned OpNo) const {
-    return dataOperandHasImpliedAttr(OpNo + 1, Attribute::WriteOnly) ||
-           dataOperandHasImpliedAttr(OpNo + 1, Attribute::ReadNone);
-  }
-
-  /// Return true if the return value is known to be not null.
-  /// This may be because it has the nonnull attribute, or because at least
-  /// one byte is dereferenceable and the pointer is in addrspace(0).
-  bool isReturnNonNull() const {
-    if (hasRetAttr(Attribute::NonNull))
-      return true;
-    else if (getDereferenceableBytes(AttributeList::ReturnIndex) > 0 &&
-             !NullPointerIsDefined(getCaller(),
-                                   getType()->getPointerAddressSpace()))
-      return true;
-
-    return false;
-  }
-
-  /// Returns true if this CallSite passes the given Value* as an argument to
-  /// the called function.
-  bool hasArgument(const Value *Arg) const {
-    for (arg_iterator AI = this->arg_begin(), E = this->arg_end(); AI != E;
-         ++AI)
-      if (AI->get() == Arg)
-        return true;
-    return false;
-  }
-
-private:
-  IterTy getCallee() const {
-    return cast<CallBase>(getInstruction())->op_end() - 1;
-  }
-};
-
-class CallSite : public CallSiteBase<Function, BasicBlock, Value, User, Use,
-                                     Instruction, CallInst, InvokeInst,
-                                     CallBrInst, User::op_iterator> {
-public:
-  CallSite() = default;
-  CallSite(CallSiteBase B) : CallSiteBase(B) {}
-  CallSite(CallInst *CI) : CallSiteBase(CI) {}
-  CallSite(InvokeInst *II) : CallSiteBase(II) {}
-  CallSite(CallBrInst *CBI) : CallSiteBase(CBI) {}
-  explicit CallSite(Instruction *II) : CallSiteBase(II) {}
-  explicit CallSite(Value *V) : CallSiteBase(V) {}
-
-  bool operator==(const CallSite &CS) const { return I == CS.I; }
-  bool operator!=(const CallSite &CS) const { return I != CS.I; }
-  bool operator<(const CallSite &CS) const {
-    return getInstruction() < CS.getInstruction();
-  }
-
-private:
-  friend struct DenseMapInfo<CallSite>;
-
-  User::op_iterator getCallee() const;
-};
-
-/// Establish a view to a call site for examination.
-class ImmutableCallSite : public CallSiteBase<> {
-public:
-  ImmutableCallSite() = default;
-  ImmutableCallSite(const CallInst *CI) : CallSiteBase(CI) {}
-  ImmutableCallSite(const InvokeInst *II) : CallSiteBase(II) {}
-  ImmutableCallSite(const CallBrInst *CBI) : CallSiteBase(CBI) {}
-  explicit ImmutableCallSite(const Instruction *II) : CallSiteBase(II) {}
-  explicit ImmutableCallSite(const Value *V) : CallSiteBase(V) {}
-  ImmutableCallSite(CallSite CS) : CallSiteBase(CS.getInstruction()) {}
-};
-
-/// AbstractCallSite
-///
-/// An abstract call site is a wrapper that allows to treat direct,
-/// indirect, and callback calls the same. If an abstract call site
-/// represents a direct or indirect call site it behaves like a stripped
-/// down version of a normal call site object. The abstract call site can
-/// also represent a callback call, thus the fact that the initially
-/// called function (=broker) may invoke a third one (=callback callee).
-/// In this case, the abstract call site hides the middle man, hence the
-/// broker function. The result is a representation of the callback call,
-/// inside the broker, but in the context of the original call to the broker.
-///
-/// There are up to three functions involved when we talk about callback call
-/// sites. The caller (1), which invokes the broker function. The broker
-/// function (2), that will invoke the callee zero or more times. And finally
-/// the callee (3), which is the target of the callback call.
-///
-/// The abstract call site will handle the mapping from parameters to arguments
-/// depending on the semantic of the broker function. However, it is important
-/// to note that the mapping is often partial. Thus, some arguments of the
-/// call/invoke instruction are mapped to parameters of the callee while others
-/// are not.
-class AbstractCallSite {
-public:
-
-  /// The encoding of a callback with regards to the underlying instruction.
-  struct CallbackInfo {
-
-    /// For direct/indirect calls the parameter encoding is empty. If it is not,
-    /// the abstract call site represents a callback. In that case, the first
-    /// element of the encoding vector represents which argument of the call
-    /// site CS is the callback callee. The remaining elements map parameters
-    /// (identified by their position) to the arguments that will be passed
-    /// through (also identified by position but in the call site instruction).
-    ///
-    /// NOTE that we use LLVM argument numbers (starting at 0) and not
-    /// clang/source argument numbers (starting at 1). The -1 entries represent
-    /// unknown values that are passed to the callee.
-    using ParameterEncodingTy = SmallVector<int, 0>;
-    ParameterEncodingTy ParameterEncoding;
-
-  };
-
-private:
-
-  /// The underlying call site:
-  ///   caller -> callee,             if this is a direct or indirect call site
-  ///   caller -> broker function,    if this is a callback call site
-  CallSite CS;
-
-  /// The encoding of a callback with regards to the underlying instruction.
-  CallbackInfo CI;
-
-public:
-  /// Sole constructor for abstract call sites (ACS).
-  ///
-  /// An abstract call site can only be constructed through a llvm::Use because
-  /// each operand (=use) of an instruction could potentially be a different
-  /// abstract call site. Furthermore, even if the value of the llvm::Use is the
-  /// same, and the user is as well, the abstract call sites might not be.
-  ///
-  /// If a use is not associated with an abstract call site the constructed ACS
-  /// will evaluate to false if converted to a boolean.
-  ///
-  /// If the use is the callee use of a call or invoke instruction, the
-  /// constructed abstract call site will behave as a llvm::CallSite would.
-  ///
-  /// If the use is not a callee use of a call or invoke instruction, the
-  /// callback metadata is used to determine the argument <-> parameter mapping
-  /// as well as the callee of the abstract call site.
-  AbstractCallSite(const Use *U);
-
-  /// Add operand uses of \p ICS that represent callback uses into \p CBUses.
-  ///
-  /// All uses added to \p CBUses can be used to create abstract call sites for
-  /// which AbstractCallSite::isCallbackCall() will return true.
-  static void getCallbackUses(ImmutableCallSite ICS,
-                              SmallVectorImpl<const Use *> &CBUses);
-
-  /// Conversion operator to conveniently check for a valid/initialized ACS.
-  explicit operator bool() const { return (bool)CS; }
-
-  /// Return the underlying instruction.
-  Instruction *getInstruction() const { return CS.getInstruction(); }
-
-  /// Return the call site abstraction for the underlying instruction.
-  CallSite getCallSite() const { return CS; }
-
-  /// Return true if this ACS represents a direct call.
-  bool isDirectCall() const {
-    return !isCallbackCall() && !CS.isIndirectCall();
-  }
-
-  /// Return true if this ACS represents an indirect call.
-  bool isIndirectCall() const {
-    return !isCallbackCall() && CS.isIndirectCall();
-  }
-
-  /// Return true if this ACS represents a callback call.
-  bool isCallbackCall() const {
-    // For a callback call site the callee is ALWAYS stored first in the
-    // transitive values vector. Thus, a non-empty vector indicates a callback.
-    return !CI.ParameterEncoding.empty();
-  }
-
-  /// Return true if @p UI is the use that defines the callee of this ACS.
-  bool isCallee(Value::const_user_iterator UI) const {
-    return isCallee(&UI.getUse());
-  }
-
-  /// Return true if @p U is the use that defines the callee of this ACS.
-  bool isCallee(const Use *U) const {
-    if (isDirectCall())
-      return CS.isCallee(U);
-
-    assert(!CI.ParameterEncoding.empty() &&
-           "Callback without parameter encoding!");
-
-    return (int)CS.getArgumentNo(U) == CI.ParameterEncoding[0];
-  }
-
-  /// Return the number of parameters of the callee.
-  unsigned getNumArgOperands() const {
-    if (isDirectCall())
-      return CS.getNumArgOperands();
-    // Subtract 1 for the callee encoding.
-    return CI.ParameterEncoding.size() - 1;
-  }
-
-  /// Return the operand index of the underlying instruction associated with @p
-  /// Arg.
-  int getCallArgOperandNo(Argument &Arg) const {
-    return getCallArgOperandNo(Arg.getArgNo());
-  }
-
-  /// Return the operand index of the underlying instruction associated with
-  /// the function parameter number @p ArgNo or -1 if there is none.
-  int getCallArgOperandNo(unsigned ArgNo) const {
-    if (isDirectCall())
-      return ArgNo;
-    // Add 1 for the callee encoding.
-    return CI.ParameterEncoding[ArgNo + 1];
-  }
-
-  /// Return the operand of the underlying instruction associated with @p Arg.
-  Value *getCallArgOperand(Argument &Arg) const {
-    return getCallArgOperand(Arg.getArgNo());
-  }
-
-  /// Return the operand of the underlying instruction associated with the
-  /// function parameter number @p ArgNo or nullptr if there is none.
-  Value *getCallArgOperand(unsigned ArgNo) const {
-    if (isDirectCall())
-      return CS.getArgOperand(ArgNo);
-    // Add 1 for the callee encoding.
-    return CI.ParameterEncoding[ArgNo + 1] >= 0
-               ? CS.getArgOperand(CI.ParameterEncoding[ArgNo + 1])
-               : nullptr;
-  }
-
-  /// Return the operand index of the underlying instruction associated with the
-  /// callee of this ACS. Only valid for callback calls!
-  int getCallArgOperandNoForCallee() const {
-    assert(isCallbackCall());
-    assert(CI.ParameterEncoding.size() && CI.ParameterEncoding[0] >= 0);
-    return CI.ParameterEncoding[0];
-  }
-
-  /// Return the use of the callee value in the underlying instruction. Only
-  /// valid for callback calls!
-  const Use &getCalleeUseForCallback() const {
-    int CalleeArgIdx = getCallArgOperandNoForCallee();
-    assert(CalleeArgIdx >= 0 &&
-           unsigned(CalleeArgIdx) < getInstruction()->getNumOperands());
-    return getInstruction()->getOperandUse(CalleeArgIdx);
-  }
-
-  /// Return the pointer to function that is being called.
-  Value *getCalledValue() const {
-    if (isDirectCall())
-      return CS.getCalledValue();
-    return CS.getArgOperand(getCallArgOperandNoForCallee());
-  }
-
-  /// Return the function being called if this is a direct call, otherwise
-  /// return null (if it's an indirect call).
-  Function *getCalledFunction() const {
-    Value *V = getCalledValue();
-    return V ? dyn_cast<Function>(V->stripPointerCasts()) : nullptr;
-  }
-};
-
-template <> struct DenseMapInfo<CallSite> {
-  using BaseInfo = DenseMapInfo<decltype(CallSite::I)>;
-
-  static CallSite getEmptyKey() {
-    CallSite CS;
-    CS.I = BaseInfo::getEmptyKey();
-    return CS;
-  }
-
-  static CallSite getTombstoneKey() {
-    CallSite CS;
-    CS.I = BaseInfo::getTombstoneKey();
-    return CS;
-  }
-
-  static unsigned getHashValue(const CallSite &CS) {
-    return BaseInfo::getHashValue(CS.I);
-  }
-
-  static bool isEqual(const CallSite &LHS, const CallSite &RHS) {
-    return LHS == RHS;
-  }
-};
-
-} // end namespace llvm
-
-#endif // LLVM_IR_CALLSITE_H
diff --git a/gnu/llvm/llvm/include/llvm/IR/RemarkStreamer.h b/gnu/llvm/llvm/include/llvm/IR/RemarkStreamer.h
deleted file mode 100644 (file)
index 9ea12e8..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-//===- llvm/IR/RemarkStreamer.h - Remark Streamer ---------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This file declares the main interface for outputting remarks.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_IR_REMARKSTREAMER_H
-#define LLVM_IR_REMARKSTREAMER_H
-
-#include "llvm/IR/DiagnosticInfo.h"
-#include "llvm/Remarks/RemarkSerializer.h"
-#include "llvm/Support/Error.h"
-#include "llvm/Support/Regex.h"
-#include "llvm/Support/ToolOutputFile.h"
-#include "llvm/Support/raw_ostream.h"
-#include <string>
-#include <vector>
-
-namespace llvm {
-/// Streamer for remarks.
-class RemarkStreamer {
-  /// The regex used to filter remarks based on the passes that emit them.
-  Optional<Regex> PassFilter;
-  /// The object used to serialize the remarks to a specific format.
-  std::unique_ptr<remarks::RemarkSerializer> RemarkSerializer;
-  /// The filename that the remark diagnostics are emitted to.
-  const Optional<std::string> Filename;
-
-  /// Convert diagnostics into remark objects.
-  /// The lifetime of the members of the result is bound to the lifetime of
-  /// the LLVM diagnostics.
-  remarks::Remark toRemark(const DiagnosticInfoOptimizationBase &Diag);
-
-public:
-  RemarkStreamer(std::unique_ptr<remarks::RemarkSerializer> RemarkSerializer,
-                 Optional<StringRef> Filename = None);
-  /// Return the filename that the remark diagnostics are emitted to.
-  Optional<StringRef> getFilename() const {
-    return Filename ? Optional<StringRef>(*Filename) : None;
-  }
-  /// Return stream that the remark diagnostics are emitted to.
-  raw_ostream &getStream() { return RemarkSerializer->OS; }
-  /// Return the serializer used for this stream.
-  remarks::RemarkSerializer &getSerializer() { return *RemarkSerializer; }
-  /// Set a pass filter based on a regex \p Filter.
-  /// Returns an error if the regex is invalid.
-  Error setFilter(StringRef Filter);
-  /// Emit a diagnostic through the streamer.
-  void emit(const DiagnosticInfoOptimizationBase &Diag);
-  /// Check if the remarks also need to have associated metadata in a section.
-  bool needsSection() const;
-};
-
-template <typename ThisError>
-struct RemarkSetupErrorInfo : public ErrorInfo<ThisError> {
-  std::string Msg;
-  std::error_code EC;
-
-  RemarkSetupErrorInfo(Error E) {
-    handleAllErrors(std::move(E), [&](const ErrorInfoBase &EIB) {
-      Msg = EIB.message();
-      EC = EIB.convertToErrorCode();
-    });
-  }
-
-  void log(raw_ostream &OS) const override { OS << Msg; }
-  std::error_code convertToErrorCode() const override { return EC; }
-};
-
-struct RemarkSetupFileError : RemarkSetupErrorInfo<RemarkSetupFileError> {
-  static char ID;
-  using RemarkSetupErrorInfo<RemarkSetupFileError>::RemarkSetupErrorInfo;
-};
-
-struct RemarkSetupPatternError : RemarkSetupErrorInfo<RemarkSetupPatternError> {
-  static char ID;
-  using RemarkSetupErrorInfo<RemarkSetupPatternError>::RemarkSetupErrorInfo;
-};
-
-struct RemarkSetupFormatError : RemarkSetupErrorInfo<RemarkSetupFormatError> {
-  static char ID;
-  using RemarkSetupErrorInfo<RemarkSetupFormatError>::RemarkSetupErrorInfo;
-};
-
-/// Setup optimization remarks that output to a file.
-Expected<std::unique_ptr<ToolOutputFile>>
-setupOptimizationRemarks(LLVMContext &Context, StringRef RemarksFilename,
-                         StringRef RemarksPasses, StringRef RemarksFormat,
-                         bool RemarksWithHotness,
-                         unsigned RemarksHotnessThreshold = 0);
-
-/// Setup optimization remarks that output directly to a raw_ostream.
-/// \p OS is managed by the caller and should be open for writing as long as \p
-/// Context is streaming remarks to it.
-Error setupOptimizationRemarks(LLVMContext &Context, raw_ostream &OS,
-                               StringRef RemarksPasses, StringRef RemarksFormat,
-                               bool RemarksWithHotness,
-                               unsigned RemarksHotnessThreshold = 0);
-
-} // end namespace llvm
-
-#endif // LLVM_IR_REMARKSTREAMER_H
index 06e8507..790f76d 100644 (file)
@@ -372,6 +372,7 @@ void initializeRegionViewerPass(PassRegistry&);
 void initializeRegisterCoalescerPass(PassRegistry&);
 void initializeRenameIndependentSubregsPass(PassRegistry&);
 void initializeResetMachineFunctionPass(PassRegistry&);
+void initializeReturnProtectorPass(PassRegistry&);
 void initializeReversePostOrderFunctionAttrsLegacyPassPass(PassRegistry&);
 void initializeRewriteStatepointsForGCLegacyPassPass(PassRegistry &);
 void initializeRewriteSymbolsLegacyPassPass(PassRegistry&);
diff --git a/gnu/llvm/llvm/include/llvm/MC/MCTargetOptionsCommandFlags.inc b/gnu/llvm/llvm/include/llvm/MC/MCTargetOptionsCommandFlags.inc
deleted file mode 100644 (file)
index 93e21b6..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-//===-- MCTargetOptionsCommandFlags.h --------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This file contains machine code-specific flags that are shared between
-// different command line tools.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_MC_MCTARGETOPTIONSCOMMANDFLAGS_H
-#define LLVM_MC_MCTARGETOPTIONSCOMMANDFLAGS_H
-
-#include "llvm/MC/MCTargetOptions.h"
-#include "llvm/Support/CommandLine.h"
-using namespace llvm;
-
-static cl::opt<bool> RelaxAll("mc-relax-all",
-                       cl::desc("When used with filetype=obj, "
-                                "relax all fixups in the emitted object file"));
-
-static cl::opt<bool> IncrementalLinkerCompatible(
-    "incremental-linker-compatible",
-    cl::desc(
-        "When used with filetype=obj, "
-        "emit an object file which can be used with an incremental linker"));
-
-static cl::opt<int> DwarfVersion("dwarf-version", cl::desc("Dwarf version"),
-                          cl::init(0));
-
-static cl::opt<bool> ShowMCInst("asm-show-inst",
-                         cl::desc("Emit internal instruction representation to "
-                                  "assembly file"));
-
-static cl::opt<bool> FatalWarnings("fatal-warnings",
-                            cl::desc("Treat warnings as errors"));
-
-static cl::opt<bool> NoWarn("no-warn", cl::desc("Suppress all warnings"));
-static cl::alias NoWarnW("W", cl::desc("Alias for --no-warn"), cl::aliasopt(NoWarn));
-
-static cl::opt<bool> NoDeprecatedWarn("no-deprecated-warn",
-                               cl::desc("Suppress all deprecated warnings"));
-
-static cl::opt<std::string>
-ABIName("target-abi", cl::Hidden,
-        cl::desc("The name of the ABI to be targeted from the backend."),
-        cl::init(""));
-
-static MCTargetOptions InitMCTargetOptionsFromFlags() {
-  MCTargetOptions Options;
-  Options.MCRelaxAll = RelaxAll;
-  Options.MCIncrementalLinkerCompatible = IncrementalLinkerCompatible;
-  Options.DwarfVersion = DwarfVersion;
-  Options.ShowMCInst = ShowMCInst;
-  Options.ABIName = ABIName;
-  Options.MCFatalWarnings = FatalWarnings;
-  Options.MCNoWarn = NoWarn;
-  Options.MCNoDeprecatedWarn = NoDeprecatedWarn;
-  return Options;
-}
-
-#endif
diff --git a/gnu/llvm/llvm/include/llvm/Support/StringPool.h b/gnu/llvm/llvm/include/llvm/Support/StringPool.h
deleted file mode 100644 (file)
index a4f4591..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-//===- StringPool.h - Interned string pool ----------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This file declares an interned string pool, which helps reduce the cost of
-// strings by using the same storage for identical strings.
-//
-// To intern a string:
-//
-//   StringPool Pool;
-//   PooledStringPtr Str = Pool.intern("wakka wakka");
-//
-// To use the value of an interned string, use operator bool and operator*:
-//
-//   if (Str)
-//     cerr << "the string is" << *Str << "\n";
-//
-// Pooled strings are immutable, but you can change a PooledStringPtr to point
-// to another instance. So that interned strings can eventually be freed,
-// strings in the string pool are reference-counted (automatically).
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_SUPPORT_STRINGPOOL_H
-#define LLVM_SUPPORT_STRINGPOOL_H
-
-#include "llvm/ADT/StringMap.h"
-#include "llvm/ADT/StringRef.h"
-#include <cassert>
-
-namespace llvm {
-
-  class PooledStringPtr;
-
-  /// StringPool - An interned string pool. Use the intern method to add a
-  /// string. Strings are removed automatically as PooledStringPtrs are
-  /// destroyed.
-  class StringPool {
-    /// PooledString - This is the value of an entry in the pool's interning
-    /// table.
-    struct PooledString {
-      StringPool *Pool = nullptr;  ///< So the string can remove itself.
-      unsigned Refcount = 0;       ///< Number of referencing PooledStringPtrs.
-
-    public:
-      PooledString() = default;
-    };
-
-    friend class PooledStringPtr;
-
-    using table_t = StringMap<PooledString>;
-    using entry_t = StringMapEntry<PooledString>;
-    table_t InternTable;
-
-  public:
-    StringPool();
-    ~StringPool();
-
-    /// intern - Adds a string to the pool and returns a reference-counted
-    /// pointer to it. No additional memory is allocated if the string already
-    /// exists in the pool.
-    PooledStringPtr intern(StringRef Str);
-
-    /// empty - Checks whether the pool is empty. Returns true if so.
-    ///
-    inline bool empty() const { return InternTable.empty(); }
-  };
-
-  /// PooledStringPtr - A pointer to an interned string. Use operator bool to
-  /// test whether the pointer is valid, and operator * to get the string if so.
-  /// This is a lightweight value class with storage requirements equivalent to
-  /// a single pointer, but it does have reference-counting overhead when
-  /// copied.
-  class PooledStringPtr {
-    using entry_t = StringPool::entry_t;
-
-    entry_t *S = nullptr;
-
-  public:
-    PooledStringPtr() = default;
-
-    explicit PooledStringPtr(entry_t *E) : S(E) {
-      if (S) ++S->getValue().Refcount;
-    }
-
-    PooledStringPtr(const PooledStringPtr &That) : S(That.S) {
-      if (S) ++S->getValue().Refcount;
-    }
-
-    PooledStringPtr &operator=(const PooledStringPtr &That) {
-      if (S != That.S) {
-        clear();
-        S = That.S;
-        if (S) ++S->getValue().Refcount;
-      }
-      return *this;
-    }
-
-    void clear() {
-      if (!S)
-        return;
-      if (--S->getValue().Refcount == 0) {
-        S->getValue().Pool->InternTable.remove(S);
-        S->Destroy();
-      }
-      S = nullptr;
-    }
-
-    ~PooledStringPtr() { clear(); }
-
-    inline const char *begin() const {
-      assert(*this && "Attempt to dereference empty PooledStringPtr!");
-      return S->getKeyData();
-    }
-
-    inline const char *end() const {
-      assert(*this && "Attempt to dereference empty PooledStringPtr!");
-      return S->getKeyData() + S->getKeyLength();
-    }
-
-    inline unsigned size() const {
-      assert(*this && "Attempt to dereference empty PooledStringPtr!");
-      return S->getKeyLength();
-    }
-
-    inline const char *operator*() const { return begin(); }
-    inline explicit operator bool() const { return S != nullptr; }
-
-    inline bool operator==(const PooledStringPtr &That) const { return S == That.S; }
-    inline bool operator!=(const PooledStringPtr &That) const { return S != That.S; }
-  };
-
-} // end namespace llvm
-
-#endif // LLVM_SUPPORT_STRINGPOOL_H
diff --git a/gnu/llvm/llvm/lib/Analysis/OrderedBasicBlock.cpp b/gnu/llvm/llvm/lib/Analysis/OrderedBasicBlock.cpp
deleted file mode 100644 (file)
index 48f2a40..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-//===- OrderedBasicBlock.cpp --------------------------------- -*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This file implements the OrderedBasicBlock class. OrderedBasicBlock
-// maintains an interface where clients can query if one instruction comes
-// before another in a BasicBlock. Since BasicBlock currently lacks a reliable
-// way to query relative position between instructions one can use
-// OrderedBasicBlock to do such queries. OrderedBasicBlock is lazily built on a
-// source BasicBlock and maintains an internal Instruction -> Position map. A
-// OrderedBasicBlock instance should be discarded whenever the source
-// BasicBlock changes.
-//
-// It's currently used by the CaptureTracker in order to find relative
-// positions of a pair of instructions inside a BasicBlock.
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/Analysis/OrderedBasicBlock.h"
-#include "llvm/IR/Instruction.h"
-using namespace llvm;
-
-OrderedBasicBlock::OrderedBasicBlock(const BasicBlock *BasicB)
-    : NextInstPos(0), BB(BasicB) {
-  LastInstFound = BB->end();
-}
-
-/// Given no cached results, find if \p A comes before \p B in \p BB.
-/// Cache and number out instruction while walking \p BB.
-bool OrderedBasicBlock::comesBefore(const Instruction *A,
-                                    const Instruction *B) {
-  const Instruction *Inst = nullptr;
-  assert(!(LastInstFound == BB->end() && NextInstPos != 0) &&
-         "Instruction supposed to be in NumberedInsts");
-  assert(A->getParent() == BB && "Instruction supposed to be in the block!");
-  assert(B->getParent() == BB && "Instruction supposed to be in the block!");
-
-  // Start the search with the instruction found in the last lookup round.
-  auto II = BB->begin();
-  auto IE = BB->end();
-  if (LastInstFound != IE)
-    II = std::next(LastInstFound);
-
-  // Number all instructions up to the point where we find 'A' or 'B'.
-  for (; II != IE; ++II) {
-    Inst = cast<Instruction>(II);
-    NumberedInsts[Inst] = NextInstPos++;
-    if (Inst == A || Inst == B)
-      break;
-  }
-
-  assert(II != IE && "Instruction not found?");
-  assert((Inst == A || Inst == B) && "Should find A or B");
-  LastInstFound = II;
-  return Inst != B;
-}
-
-/// Find out whether \p A dominates \p B, meaning whether \p A
-/// comes before \p B in \p BB. This is a simplification that considers
-/// cached instruction positions and ignores other basic blocks, being
-/// only relevant to compare relative instructions positions inside \p BB.
-bool OrderedBasicBlock::dominates(const Instruction *A, const Instruction *B) {
-  assert(A->getParent() == B->getParent() &&
-         "Instructions must be in the same basic block!");
-  assert(A->getParent() == BB && "Instructions must be in the tracked block!");
-
-  // First we lookup the instructions. If they don't exist, lookup will give us
-  // back ::end(). If they both exist, we compare the numbers. Otherwise, if NA
-  // exists and NB doesn't, it means NA must come before NB because we would
-  // have numbered NB as well if it didn't. The same is true for NB. If it
-  // exists, but NA does not, NA must come after it. If neither exist, we need
-  // to number the block and cache the results (by calling comesBefore).
-  auto NAI = NumberedInsts.find(A);
-  auto NBI = NumberedInsts.find(B);
-  if (NAI != NumberedInsts.end() && NBI != NumberedInsts.end())
-    return NAI->second < NBI->second;
-  if (NAI != NumberedInsts.end())
-    return true;
-  if (NBI != NumberedInsts.end())
-    return false;
-
-  return comesBefore(A, B);
-}
-
-void OrderedBasicBlock::eraseInstruction(const Instruction *I) {
-  if (LastInstFound != BB->end() && I == &*LastInstFound) {
-    if (LastInstFound == BB->begin()) {
-      LastInstFound = BB->end();
-      NextInstPos = 0;
-    } else
-      LastInstFound--;
-  }
-
-  NumberedInsts.erase(I);
-}
-
-void OrderedBasicBlock::replaceInstruction(const Instruction *Old,
-                                           const Instruction *New) {
-  auto OI = NumberedInsts.find(Old);
-  if (OI == NumberedInsts.end())
-    return;
-
-  NumberedInsts.insert({New, OI->second});
-  if (LastInstFound != BB->end() && Old == &*LastInstFound)
-    LastInstFound = New->getIterator();
-  NumberedInsts.erase(Old);
-}
diff --git a/gnu/llvm/llvm/lib/Analysis/OrderedInstructions.cpp b/gnu/llvm/llvm/lib/Analysis/OrderedInstructions.cpp
deleted file mode 100644 (file)
index e947e5e..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-//===-- OrderedInstructions.cpp - Instruction dominance function ---------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines utility to check dominance relation of 2 instructions.
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/Analysis/OrderedInstructions.h"
-using namespace llvm;
-
-bool OrderedInstructions::localDominates(const Instruction *InstA,
-                                         const Instruction *InstB) const {
-  assert(InstA->getParent() == InstB->getParent() &&
-         "Instructions must be in the same basic block");
-
-  const BasicBlock *IBB = InstA->getParent();
-  auto OBB = OBBMap.find(IBB);
-  if (OBB == OBBMap.end())
-    OBB = OBBMap.insert({IBB, std::make_unique<OrderedBasicBlock>(IBB)}).first;
-  return OBB->second->dominates(InstA, InstB);
-}
-
-/// Given 2 instructions, use OrderedBasicBlock to check for dominance relation
-/// if the instructions are in the same basic block, Otherwise, use dominator
-/// tree.
-bool OrderedInstructions::dominates(const Instruction *InstA,
-                                    const Instruction *InstB) const {
-  // Use ordered basic block to do dominance check in case the 2 instructions
-  // are in the same basic block.
-  if (InstA->getParent() == InstB->getParent())
-    return localDominates(InstA, InstB);
-  return DT->dominates(InstA->getParent(), InstB->getParent());
-}
-
-bool OrderedInstructions::dfsBefore(const Instruction *InstA,
-                                    const Instruction *InstB) const {
-  // Use ordered basic block in case the 2 instructions are in the same basic
-  // block.
-  if (InstA->getParent() == InstB->getParent())
-    return localDominates(InstA, InstB);
-
-  DomTreeNode *DA = DT->getNode(InstA->getParent());
-  DomTreeNode *DB = DT->getNode(InstB->getParent());
-  return DA->getDFSNumIn() < DB->getDFSNumIn();
-}
diff --git a/gnu/llvm/llvm/lib/Analysis/ScalarEvolutionExpander.cpp b/gnu/llvm/llvm/lib/Analysis/ScalarEvolutionExpander.cpp
deleted file mode 100644 (file)
index dc5d02a..0000000
+++ /dev/null
@@ -1,2452 +0,0 @@
-//===- ScalarEvolutionExpander.cpp - Scalar Evolution Analysis ------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This file contains the implementation of the scalar evolution expander,
-// which is used to generate the code corresponding to a given scalar evolution
-// expression.
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/Analysis/ScalarEvolutionExpander.h"
-#include "llvm/ADT/STLExtras.h"
-#include "llvm/ADT/SmallSet.h"
-#include "llvm/Analysis/InstructionSimplify.h"
-#include "llvm/Analysis/LoopInfo.h"
-#include "llvm/Analysis/TargetTransformInfo.h"
-#include "llvm/IR/DataLayout.h"
-#include "llvm/IR/Dominators.h"
-#include "llvm/IR/IntrinsicInst.h"
-#include "llvm/IR/LLVMContext.h"
-#include "llvm/IR/Module.h"
-#include "llvm/IR/PatternMatch.h"
-#include "llvm/Support/Debug.h"
-#include "llvm/Support/raw_ostream.h"
-
-using namespace llvm;
-using namespace PatternMatch;
-
-/// ReuseOrCreateCast - Arrange for there to be a cast of V to Ty at IP,
-/// reusing an existing cast if a suitable one exists, moving an existing
-/// cast if a suitable one exists but isn't in the right place, or
-/// creating a new one.
-Value *SCEVExpander::ReuseOrCreateCast(Value *V, Type *Ty,
-                                       Instruction::CastOps Op,
-                                       BasicBlock::iterator IP) {
-  // This function must be called with the builder having a valid insertion
-  // point. It doesn't need to be the actual IP where the uses of the returned
-  // cast will be added, but it must dominate such IP.
-  // We use this precondition to produce a cast that will dominate all its
-  // uses. In particular, this is crucial for the case where the builder's
-  // insertion point *is* the point where we were asked to put the cast.
-  // Since we don't know the builder's insertion point is actually
-  // where the uses will be added (only that it dominates it), we are
-  // not allowed to move it.
-  BasicBlock::iterator BIP = Builder.GetInsertPoint();
-
-  Instruction *Ret = nullptr;
-
-  // Check to see if there is already a cast!
-  for (User *U : V->users())
-    if (U->getType() == Ty)
-      if (CastInst *CI = dyn_cast<CastInst>(U))
-        if (CI->getOpcode() == Op) {
-          // If the cast isn't where we want it, create a new cast at IP.
-          // Likewise, do not reuse a cast at BIP because it must dominate
-          // instructions that might be inserted before BIP.
-          if (BasicBlock::iterator(CI) != IP || BIP == IP) {
-            // Create a new cast, and leave the old cast in place in case
-            // it is being used as an insert point.
-            Ret = CastInst::Create(Op, V, Ty, "", &*IP);
-            Ret->takeName(CI);
-            CI->replaceAllUsesWith(Ret);
-            break;
-          }
-          Ret = CI;
-          break;
-        }
-
-  // Create a new cast.
-  if (!Ret)
-    Ret = CastInst::Create(Op, V, Ty, V->getName(), &*IP);
-
-  // We assert at the end of the function since IP might point to an
-  // instruction with different dominance properties than a cast
-  // (an invoke for example) and not dominate BIP (but the cast does).
-  assert(SE.DT.dominates(Ret, &*BIP));
-
-  rememberInstruction(Ret);
-  return Ret;
-}
-
-static BasicBlock::iterator findInsertPointAfter(Instruction *I,
-                                                 BasicBlock *MustDominate) {
-  BasicBlock::iterator IP = ++I->getIterator();
-  if (auto *II = dyn_cast<InvokeInst>(I))
-    IP = II->getNormalDest()->begin();
-
-  while (isa<PHINode>(IP))
-    ++IP;
-
-  if (isa<FuncletPadInst>(IP) || isa<LandingPadInst>(IP)) {
-    ++IP;
-  } else if (isa<CatchSwitchInst>(IP)) {
-    IP = MustDominate->getFirstInsertionPt();
-  } else {
-    assert(!IP->isEHPad() && "unexpected eh pad!");
-  }
-
-  return IP;
-}
-
-/// InsertNoopCastOfTo - Insert a cast of V to the specified type,
-/// which must be possible with a noop cast, doing what we can to share
-/// the casts.
-Value *SCEVExpander::InsertNoopCastOfTo(Value *V, Type *Ty) {
-  Instruction::CastOps Op = CastInst::getCastOpcode(V, false, Ty, false);
-  assert((Op == Instruction::BitCast ||
-          Op == Instruction::PtrToInt ||
-          Op == Instruction::IntToPtr) &&
-         "InsertNoopCastOfTo cannot perform non-noop casts!");
-  assert(SE.getTypeSizeInBits(V->getType()) == SE.getTypeSizeInBits(Ty) &&
-         "InsertNoopCastOfTo cannot change sizes!");
-
-  // Short-circuit unnecessary bitcasts.
-  if (Op == Instruction::BitCast) {
-    if (V->getType() == Ty)
-      return V;
-    if (CastInst *CI = dyn_cast<CastInst>(V)) {
-      if (CI->getOperand(0)->getType() == Ty)
-        return CI->getOperand(0);
-    }
-  }
-  // Short-circuit unnecessary inttoptr<->ptrtoint casts.
-  if ((Op == Instruction::PtrToInt || Op == Instruction::IntToPtr) &&
-      SE.getTypeSizeInBits(Ty) == SE.getTypeSizeInBits(V->getType())) {
-    if (CastInst *CI = dyn_cast<CastInst>(V))
-      if ((CI->getOpcode() == Instruction::PtrToInt ||
-           CI->getOpcode() == Instruction::IntToPtr) &&
-          SE.getTypeSizeInBits(CI->getType()) ==
-          SE.getTypeSizeInBits(CI->getOperand(0)->getType()))
-        return CI->getOperand(0);
-    if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V))
-      if ((CE->getOpcode() == Instruction::PtrToInt ||
-           CE->getOpcode() == Instruction::IntToPtr) &&
-          SE.getTypeSizeInBits(CE->getType()) ==
-          SE.getTypeSizeInBits(CE->getOperand(0)->getType()))
-        return CE->getOperand(0);
-  }
-
-  // Fold a cast of a constant.
-  if (Constant *C = dyn_cast<Constant>(V))
-    return ConstantExpr::getCast(Op, C, Ty);
-
-  // Cast the argument at the beginning of the entry block, after
-  // any bitcasts of other arguments.
-  if (Argument *A = dyn_cast<Argument>(V)) {
-    BasicBlock::iterator IP = A->getParent()->getEntryBlock().begin();
-    while ((isa<BitCastInst>(IP) &&
-            isa<Argument>(cast<BitCastInst>(IP)->getOperand(0)) &&
-            cast<BitCastInst>(IP)->getOperand(0) != A) ||
-           isa<DbgInfoIntrinsic>(IP))
-      ++IP;
-    return ReuseOrCreateCast(A, Ty, Op, IP);
-  }
-
-  // Cast the instruction immediately after the instruction.
-  Instruction *I = cast<Instruction>(V);
-  BasicBlock::iterator IP = findInsertPointAfter(I, Builder.GetInsertBlock());
-  return ReuseOrCreateCast(I, Ty, Op, IP);
-}
-
-/// InsertBinop - Insert the specified binary operator, doing a small amount
-/// of work to avoid inserting an obviously redundant operation, and hoisting
-/// to an outer loop when the opportunity is there and it is safe.
-Value *SCEVExpander::InsertBinop(Instruction::BinaryOps Opcode,
-                                 Value *LHS, Value *RHS,
-                                 SCEV::NoWrapFlags Flags, bool IsSafeToHoist) {
-  // Fold a binop with constant operands.
-  if (Constant *CLHS = dyn_cast<Constant>(LHS))
-    if (Constant *CRHS = dyn_cast<Constant>(RHS))
-      return ConstantExpr::get(Opcode, CLHS, CRHS);
-
-  // Do a quick scan to see if we have this binop nearby.  If so, reuse it.
-  unsigned ScanLimit = 6;
-  BasicBlock::iterator BlockBegin = Builder.GetInsertBlock()->begin();
-  // Scanning starts from the last instruction before the insertion point.
-  BasicBlock::iterator IP = Builder.GetInsertPoint();
-  if (IP != BlockBegin) {
-    --IP;
-    for (; ScanLimit; --IP, --ScanLimit) {
-      // Don't count dbg.value against the ScanLimit, to avoid perturbing the
-      // generated code.
-      if (isa<DbgInfoIntrinsic>(IP))
-        ScanLimit++;
-
-      auto canGenerateIncompatiblePoison = [&Flags](Instruction *I) {
-        // Ensure that no-wrap flags match.
-        if (isa<OverflowingBinaryOperator>(I)) {
-          if (I->hasNoSignedWrap() != (Flags & SCEV::FlagNSW))
-            return true;
-          if (I->hasNoUnsignedWrap() != (Flags & SCEV::FlagNUW))
-            return true;
-        }
-        // Conservatively, do not use any instruction which has any of exact
-        // flags installed.
-        if (isa<PossiblyExactOperator>(I) && I->isExact())
-          return true;
-        return false;
-      };
-      if (IP->getOpcode() == (unsigned)Opcode && IP->getOperand(0) == LHS &&
-          IP->getOperand(1) == RHS && !canGenerateIncompatiblePoison(&*IP))
-        return &*IP;
-      if (IP == BlockBegin) break;
-    }
-  }
-
-  // Save the original insertion point so we can restore it when we're done.
-  DebugLoc Loc = Builder.GetInsertPoint()->getDebugLoc();
-  SCEVInsertPointGuard Guard(Builder, this);
-
-  if (IsSafeToHoist) {
-    // Move the insertion point out of as many loops as we can.
-    while (const Loop *L = SE.LI.getLoopFor(Builder.GetInsertBlock())) {
-      if (!L->isLoopInvariant(LHS) || !L->isLoopInvariant(RHS)) break;
-      BasicBlock *Preheader = L->getLoopPreheader();
-      if (!Preheader) break;
-
-      // Ok, move up a level.
-      Builder.SetInsertPoint(Preheader->getTerminator());
-    }
-  }
-
-  // If we haven't found this binop, insert it.
-  Instruction *BO = cast<Instruction>(Builder.CreateBinOp(Opcode, LHS, RHS));
-  BO->setDebugLoc(Loc);
-  if (Flags & SCEV::FlagNUW)
-    BO->setHasNoUnsignedWrap();
-  if (Flags & SCEV::FlagNSW)
-    BO->setHasNoSignedWrap();
-  rememberInstruction(BO);
-
-  return BO;
-}
-
-/// FactorOutConstant - Test if S is divisible by Factor, using signed
-/// division. If so, update S with Factor divided out and return true.
-/// S need not be evenly divisible if a reasonable remainder can be
-/// computed.
-static bool FactorOutConstant(const SCEV *&S, const SCEV *&Remainder,
-                              const SCEV *Factor, ScalarEvolution &SE,
-                              const DataLayout &DL) {
-  // Everything is divisible by one.
-  if (Factor->isOne())
-    return true;
-
-  // x/x == 1.
-  if (S == Factor) {
-    S = SE.getConstant(S->getType(), 1);
-    return true;
-  }
-
-  // For a Constant, check for a multiple of the given factor.
-  if (const SCEVConstant *C = dyn_cast<SCEVConstant>(S)) {
-    // 0/x == 0.
-    if (C->isZero())
-      return true;
-    // Check for divisibility.
-    if (const SCEVConstant *FC = dyn_cast<SCEVConstant>(Factor)) {
-      ConstantInt *CI =
-          ConstantInt::get(SE.getContext(), C->getAPInt().sdiv(FC->getAPInt()));
-      // If the quotient is zero and the remainder is non-zero, reject
-      // the value at this scale. It will be considered for subsequent
-      // smaller scales.
-      if (!CI->isZero()) {
-        const SCEV *Div = SE.getConstant(CI);
-        S = Div;
-        Remainder = SE.getAddExpr(
-            Remainder, SE.getConstant(C->getAPInt().srem(FC->getAPInt())));
-        return true;
-      }
-    }
-  }
-
-  // In a Mul, check if there is a constant operand which is a multiple
-  // of the given factor.
-  if (const SCEVMulExpr *M = dyn_cast<SCEVMulExpr>(S)) {
-    // Size is known, check if there is a constant operand which is a multiple
-    // of the given factor. If so, we can factor it.
-    const SCEVConstant *FC = cast<SCEVConstant>(Factor);
-    if (const SCEVConstant *C = dyn_cast<SCEVConstant>(M->getOperand(0)))
-      if (!C->getAPInt().srem(FC->getAPInt())) {
-        SmallVector<const SCEV *, 4> NewMulOps(M->op_begin(), M->op_end());
-        NewMulOps[0] = SE.getConstant(C->getAPInt().sdiv(FC->getAPInt()));
-        S = SE.getMulExpr(NewMulOps);
-        return true;
-      }
-  }
-
-  // In an AddRec, check if both start and step are divisible.
-  if (const SCEVAddRecExpr *A = dyn_cast<SCEVAddRecExpr>(S)) {
-    const SCEV *Step = A->getStepRecurrence(SE);
-    const SCEV *StepRem = SE.getConstant(Step->getType(), 0);
-    if (!FactorOutConstant(Step, StepRem, Factor, SE, DL))
-      return false;
-    if (!StepRem->isZero())
-      return false;
-    const SCEV *Start = A->getStart();
-    if (!FactorOutConstant(Start, Remainder, Factor, SE, DL))
-      return false;
-    S = SE.getAddRecExpr(Start, Step, A->getLoop(),
-                         A->getNoWrapFlags(SCEV::FlagNW));
-    return true;
-  }
-
-  return false;
-}
-
-/// SimplifyAddOperands - Sort and simplify a list of add operands. NumAddRecs
-/// is the number of SCEVAddRecExprs present, which are kept at the end of
-/// the list.
-///
-static void SimplifyAddOperands(SmallVectorImpl<const SCEV *> &Ops,
-                                Type *Ty,
-                                ScalarEvolution &SE) {
-  unsigned NumAddRecs = 0;
-  for (unsigned i = Ops.size(); i > 0 && isa<SCEVAddRecExpr>(Ops[i-1]); --i)
-    ++NumAddRecs;
-  // Group Ops into non-addrecs and addrecs.
-  SmallVector<const SCEV *, 8> NoAddRecs(Ops.begin(), Ops.end() - NumAddRecs);
-  SmallVector<const SCEV *, 8> AddRecs(Ops.end() - NumAddRecs, Ops.end());
-  // Let ScalarEvolution sort and simplify the non-addrecs list.
-  const SCEV *Sum = NoAddRecs.empty() ?
-                    SE.getConstant(Ty, 0) :
-                    SE.getAddExpr(NoAddRecs);
-  // If it returned an add, use the operands. Otherwise it simplified
-  // the sum into a single value, so just use that.
-  Ops.clear();
-  if (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(Sum))
-    Ops.append(Add->op_begin(), Add->op_end());
-  else if (!Sum->isZero())
-    Ops.push_back(Sum);
-  // Then append the addrecs.
-  Ops.append(AddRecs.begin(), AddRecs.end());
-}
-
-/// SplitAddRecs - Flatten a list of add operands, moving addrec start values
-/// out to the top level. For example, convert {a + b,+,c} to a, b, {0,+,d}.
-/// This helps expose more opportunities for folding parts of the expressions
-/// into GEP indices.
-///
-static void SplitAddRecs(SmallVectorImpl<const SCEV *> &Ops,
-                         Type *Ty,
-                         ScalarEvolution &SE) {
-  // Find the addrecs.
-  SmallVector<const SCEV *, 8> AddRecs;
-  for (unsigned i = 0, e = Ops.size(); i != e; ++i)
-    while (const SCEVAddRecExpr *A = dyn_cast<SCEVAddRecExpr>(Ops[i])) {
-      const SCEV *Start = A->getStart();
-      if (Start->isZero()) break;
-      const SCEV *Zero = SE.getConstant(Ty, 0);
-      AddRecs.push_back(SE.getAddRecExpr(Zero,
-                                         A->getStepRecurrence(SE),
-                                         A->getLoop(),
-                                         A->getNoWrapFlags(SCEV::FlagNW)));
-      if (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(Start)) {
-        Ops[i] = Zero;
-        Ops.append(Add->op_begin(), Add->op_end());
-        e += Add->getNumOperands();
-      } else {
-        Ops[i] = Start;
-      }
-    }
-  if (!AddRecs.empty()) {
-    // Add the addrecs onto the end of the list.
-    Ops.append(AddRecs.begin(), AddRecs.end());
-    // Resort the operand list, moving any constants to the front.
-    SimplifyAddOperands(Ops, Ty, SE);
-  }
-}
-
-/// expandAddToGEP - Expand an addition expression with a pointer type into
-/// a GEP instead of using ptrtoint+arithmetic+inttoptr. This helps
-/// BasicAliasAnalysis and other passes analyze the result. See the rules
-/// for getelementptr vs. inttoptr in
-/// http://llvm.org/docs/LangRef.html#pointeraliasing
-/// for details.
-///
-/// Design note: The correctness of using getelementptr here depends on
-/// ScalarEvolution not recognizing inttoptr and ptrtoint operators, as
-/// they may introduce pointer arithmetic which may not be safely converted
-/// into getelementptr.
-///
-/// Design note: It might seem desirable for this function to be more
-/// loop-aware. If some of the indices are loop-invariant while others
-/// aren't, it might seem desirable to emit multiple GEPs, keeping the
-/// loop-invariant portions of the overall computation outside the loop.
-/// However, there are a few reasons this is not done here. Hoisting simple
-/// arithmetic is a low-level optimization that often isn't very
-/// important until late in the optimization process. In fact, passes
-/// like InstructionCombining will combine GEPs, even if it means
-/// pushing loop-invariant computation down into loops, so even if the
-/// GEPs were split here, the work would quickly be undone. The
-/// LoopStrengthReduction pass, which is usually run quite late (and
-/// after the last InstructionCombining pass), takes care of hoisting
-/// loop-invariant portions of expressions, after considering what
-/// can be folded using target addressing modes.
-///
-Value *SCEVExpander::expandAddToGEP(const SCEV *const *op_begin,
-                                    const SCEV *const *op_end,
-                                    PointerType *PTy,
-                                    Type *Ty,
-                                    Value *V) {
-  Type *OriginalElTy = PTy->getElementType();
-  Type *ElTy = OriginalElTy;
-  SmallVector<Value *, 4> GepIndices;
-  SmallVector<const SCEV *, 8> Ops(op_begin, op_end);
-  bool AnyNonZeroIndices = false;
-
-  // Split AddRecs up into parts as either of the parts may be usable
-  // without the other.
-  SplitAddRecs(Ops, Ty, SE);
-
-  Type *IntIdxTy = DL.getIndexType(PTy);
-
-  // Descend down the pointer's type and attempt to convert the other
-  // operands into GEP indices, at each level. The first index in a GEP
-  // indexes into the array implied by the pointer operand; the rest of
-  // the indices index into the element or field type selected by the
-  // preceding index.
-  for (;;) {
-    // If the scale size is not 0, attempt to factor out a scale for
-    // array indexing.
-    SmallVector<const SCEV *, 8> ScaledOps;
-    if (ElTy->isSized()) {
-      const SCEV *ElSize = SE.getSizeOfExpr(IntIdxTy, ElTy);
-      if (!ElSize->isZero()) {
-        SmallVector<const SCEV *, 8> NewOps;
-        for (const SCEV *Op : Ops) {
-          const SCEV *Remainder = SE.getConstant(Ty, 0);
-          if (FactorOutConstant(Op, Remainder, ElSize, SE, DL)) {
-            // Op now has ElSize factored out.
-            ScaledOps.push_back(Op);
-            if (!Remainder->isZero())
-              NewOps.push_back(Remainder);
-            AnyNonZeroIndices = true;
-          } else {
-            // The operand was not divisible, so add it to the list of operands
-            // we'll scan next iteration.
-            NewOps.push_back(Op);
-          }
-        }
-        // If we made any changes, update Ops.
-        if (!ScaledOps.empty()) {
-          Ops = NewOps;
-          SimplifyAddOperands(Ops, Ty, SE);
-        }
-      }
-    }
-
-    // Record the scaled array index for this level of the type. If
-    // we didn't find any operands that could be factored, tentatively
-    // assume that element zero was selected (since the zero offset
-    // would obviously be folded away).
-    Value *Scaled = ScaledOps.empty() ?
-                    Constant::getNullValue(Ty) :
-                    expandCodeFor(SE.getAddExpr(ScaledOps), Ty);
-    GepIndices.push_back(Scaled);
-
-    // Collect struct field index operands.
-    while (StructType *STy = dyn_cast<StructType>(ElTy)) {
-      bool FoundFieldNo = false;
-      // An empty struct has no fields.
-      if (STy->getNumElements() == 0) break;
-      // Field offsets are known. See if a constant offset falls within any of
-      // the struct fields.
-      if (Ops.empty())
-        break;
-      if (const SCEVConstant *C = dyn_cast<SCEVConstant>(Ops[0]))
-        if (SE.getTypeSizeInBits(C->getType()) <= 64) {
-          const StructLayout &SL = *DL.getStructLayout(STy);
-          uint64_t FullOffset = C->getValue()->getZExtValue();
-          if (FullOffset < SL.getSizeInBytes()) {
-            unsigned ElIdx = SL.getElementContainingOffset(FullOffset);
-            GepIndices.push_back(
-                ConstantInt::get(Type::getInt32Ty(Ty->getContext()), ElIdx));
-            ElTy = STy->getTypeAtIndex(ElIdx);
-            Ops[0] =
-                SE.getConstant(Ty, FullOffset - SL.getElementOffset(ElIdx));
-            AnyNonZeroIndices = true;
-            FoundFieldNo = true;
-          }
-        }
-      // If no struct field offsets were found, tentatively assume that
-      // field zero was selected (since the zero offset would obviously
-      // be folded away).
-      if (!FoundFieldNo) {
-        ElTy = STy->getTypeAtIndex(0u);
-        GepIndices.push_back(
-          Constant::getNullValue(Type::getInt32Ty(Ty->getContext())));
-      }
-    }
-
-    if (ArrayType *ATy = dyn_cast<ArrayType>(ElTy))
-      ElTy = ATy->getElementType();
-    else
-      break;
-  }
-
-  // If none of the operands were convertible to proper GEP indices, cast
-  // the base to i8* and do an ugly getelementptr with that. It's still
-  // better than ptrtoint+arithmetic+inttoptr at least.
-  if (!AnyNonZeroIndices) {
-    // Cast the base to i8*.
-    V = InsertNoopCastOfTo(V,
-       Type::getInt8PtrTy(Ty->getContext(), PTy->getAddressSpace()));
-
-    assert(!isa<Instruction>(V) ||
-           SE.DT.dominates(cast<Instruction>(V), &*Builder.GetInsertPoint()));
-
-    // Expand the operands for a plain byte offset.
-    Value *Idx = expandCodeFor(SE.getAddExpr(Ops), Ty);
-
-    // Fold a GEP with constant operands.
-    if (Constant *CLHS = dyn_cast<Constant>(V))
-      if (Constant *CRHS = dyn_cast<Constant>(Idx))
-        return ConstantExpr::getGetElementPtr(Type::getInt8Ty(Ty->getContext()),
-                                              CLHS, CRHS);
-
-    // Do a quick scan to see if we have this GEP nearby.  If so, reuse it.
-    unsigned ScanLimit = 6;
-    BasicBlock::iterator BlockBegin = Builder.GetInsertBlock()->begin();
-    // Scanning starts from the last instruction before the insertion point.
-    BasicBlock::iterator IP = Builder.GetInsertPoint();
-    if (IP != BlockBegin) {
-      --IP;
-      for (; ScanLimit; --IP, --ScanLimit) {
-        // Don't count dbg.value against the ScanLimit, to avoid perturbing the
-        // generated code.
-        if (isa<DbgInfoIntrinsic>(IP))
-          ScanLimit++;
-        if (IP->getOpcode() == Instruction::GetElementPtr &&
-            IP->getOperand(0) == V && IP->getOperand(1) == Idx)
-          return &*IP;
-        if (IP == BlockBegin) break;
-      }
-    }
-
-    // Save the original insertion point so we can restore it when we're done.
-    SCEVInsertPointGuard Guard(Builder, this);
-
-    // Move the insertion point out of as many loops as we can.
-    while (const Loop *L = SE.LI.getLoopFor(Builder.GetInsertBlock())) {
-      if (!L->isLoopInvariant(V) || !L->isLoopInvariant(Idx)) break;
-      BasicBlock *Preheader = L->getLoopPreheader();
-      if (!Preheader) break;
-
-      // Ok, move up a level.
-      Builder.SetInsertPoint(Preheader->getTerminator());
-    }
-
-    // Emit a GEP.
-    Value *GEP = Builder.CreateGEP(Builder.getInt8Ty(), V, Idx, "uglygep");
-    rememberInstruction(GEP);
-
-    return GEP;
-  }
-
-  {
-    SCEVInsertPointGuard Guard(Builder, this);
-
-    // Move the insertion point out of as many loops as we can.
-    while (const Loop *L = SE.LI.getLoopFor(Builder.GetInsertBlock())) {
-      if (!L->isLoopInvariant(V)) break;
-
-      bool AnyIndexNotLoopInvariant = any_of(
-          GepIndices, [L](Value *Op) { return !L->isLoopInvariant(Op); });
-
-      if (AnyIndexNotLoopInvariant)
-        break;
-
-      BasicBlock *Preheader = L->getLoopPreheader();
-      if (!Preheader) break;
-
-      // Ok, move up a level.
-      Builder.SetInsertPoint(Preheader->getTerminator());
-    }
-
-    // Insert a pretty getelementptr. Note that this GEP is not marked inbounds,
-    // because ScalarEvolution may have changed the address arithmetic to
-    // compute a value which is beyond the end of the allocated object.
-    Value *Casted = V;
-    if (V->getType() != PTy)
-      Casted = InsertNoopCastOfTo(Casted, PTy);
-    Value *GEP = Builder.CreateGEP(OriginalElTy, Casted, GepIndices, "scevgep");
-    Ops.push_back(SE.getUnknown(GEP));
-    rememberInstruction(GEP);
-  }
-
-  return expand(SE.getAddExpr(Ops));
-}
-
-Value *SCEVExpander::expandAddToGEP(const SCEV *Op, PointerType *PTy, Type *Ty,
-                                    Value *V) {
-  const SCEV *const Ops[1] = {Op};
-  return expandAddToGEP(Ops, Ops + 1, PTy, Ty, V);
-}
-
-/// PickMostRelevantLoop - Given two loops pick the one that's most relevant for
-/// SCEV expansion. If they are nested, this is the most nested. If they are
-/// neighboring, pick the later.
-static const Loop *PickMostRelevantLoop(const Loop *A, const Loop *B,
-                                        DominatorTree &DT) {
-  if (!A) return B;
-  if (!B) return A;
-  if (A->contains(B)) return B;
-  if (B->contains(A)) return A;
-  if (DT.dominates(A->getHeader(), B->getHeader())) return B;
-  if (DT.dominates(B->getHeader(), A->getHeader())) return A;
-  return A; // Arbitrarily break the tie.
-}
-
-/// getRelevantLoop - Get the most relevant loop associated with the given
-/// expression, according to PickMostRelevantLoop.
-const Loop *SCEVExpander::getRelevantLoop(const SCEV *S) {
-  // Test whether we've already computed the most relevant loop for this SCEV.
-  auto Pair = RelevantLoops.insert(std::make_pair(S, nullptr));
-  if (!Pair.second)
-    return Pair.first->second;
-
-  if (isa<SCEVConstant>(S))
-    // A constant has no relevant loops.
-    return nullptr;
-  if (const SCEVUnknown *U = dyn_cast<SCEVUnknown>(S)) {
-    if (const Instruction *I = dyn_cast<Instruction>(U->getValue()))
-      return Pair.first->second = SE.LI.getLoopFor(I->getParent());
-    // A non-instruction has no relevant loops.
-    return nullptr;
-  }
-  if (const SCEVNAryExpr *N = dyn_cast<SCEVNAryExpr>(S)) {
-    const Loop *L = nullptr;
-    if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S))
-      L = AR->getLoop();
-    for (const SCEV *Op : N->operands())
-      L = PickMostRelevantLoop(L, getRelevantLoop(Op), SE.DT);
-    return RelevantLoops[N] = L;
-  }
-  if (const SCEVCastExpr *C = dyn_cast<SCEVCastExpr>(S)) {
-    const Loop *Result = getRelevantLoop(C->getOperand());
-    return RelevantLoops[C] = Result;
-  }
-  if (const SCEVUDivExpr *D = dyn_cast<SCEVUDivExpr>(S)) {
-    const Loop *Result = PickMostRelevantLoop(
-        getRelevantLoop(D->getLHS()), getRelevantLoop(D->getRHS()), SE.DT);
-    return RelevantLoops[D] = Result;
-  }
-  llvm_unreachable("Unexpected SCEV type!");
-}
-
-namespace {
-
-/// LoopCompare - Compare loops by PickMostRelevantLoop.
-class LoopCompare {
-  DominatorTree &DT;
-public:
-  explicit LoopCompare(DominatorTree &dt) : DT(dt) {}
-
-  bool operator()(std::pair<const Loop *, const SCEV *> LHS,
-                  std::pair<const Loop *, const SCEV *> RHS) const {
-    // Keep pointer operands sorted at the end.
-    if (LHS.second->getType()->isPointerTy() !=
-        RHS.second->getType()->isPointerTy())
-      return LHS.second->getType()->isPointerTy();
-
-    // Compare loops with PickMostRelevantLoop.
-    if (LHS.first != RHS.first)
-      return PickMostRelevantLoop(LHS.first, RHS.first, DT) != LHS.first;
-
-    // If one operand is a non-constant negative and the other is not,
-    // put the non-constant negative on the right so that a sub can
-    // be used instead of a negate and add.
-    if (LHS.second->isNonConstantNegative()) {
-      if (!RHS.second->isNonConstantNegative())
-        return false;
-    } else if (RHS.second->isNonConstantNegative())
-      return true;
-
-    // Otherwise they are equivalent according to this comparison.
-    return false;
-  }
-};
-
-}
-
-Value *SCEVExpander::visitAddExpr(const SCEVAddExpr *S) {
-  Type *Ty = SE.getEffectiveSCEVType(S->getType());
-
-  // Collect all the add operands in a loop, along with their associated loops.
-  // Iterate in reverse so that constants are emitted last, all else equal, and
-  // so that pointer operands are inserted first, which the code below relies on
-  // to form more involved GEPs.
-  SmallVector<std::pair<const Loop *, const SCEV *>, 8> OpsAndLoops;
-  for (std::reverse_iterator<SCEVAddExpr::op_iterator> I(S->op_end()),
-       E(S->op_begin()); I != E; ++I)
-    OpsAndLoops.push_back(std::make_pair(getRelevantLoop(*I), *I));
-
-  // Sort by loop. Use a stable sort so that constants follow non-constants and
-  // pointer operands precede non-pointer operands.
-  llvm::stable_sort(OpsAndLoops, LoopCompare(SE.DT));
-
-  // Emit instructions to add all the operands. Hoist as much as possible
-  // out of loops, and form meaningful getelementptrs where possible.
-  Value *Sum = nullptr;
-  for (auto I = OpsAndLoops.begin(), E = OpsAndLoops.end(); I != E;) {
-    const Loop *CurLoop = I->first;
-    const SCEV *Op = I->second;
-    if (!Sum) {
-      // This is the first operand. Just expand it.
-      Sum = expand(Op);
-      ++I;
-    } else if (PointerType *PTy = dyn_cast<PointerType>(Sum->getType())) {
-      // The running sum expression is a pointer. Try to form a getelementptr
-      // at this level with that as the base.
-      SmallVector<const SCEV *, 4> NewOps;
-      for (; I != E && I->first == CurLoop; ++I) {
-        // If the operand is SCEVUnknown and not instructions, peek through
-        // it, to enable more of it to be folded into the GEP.
-        const SCEV *X = I->second;
-        if (const SCEVUnknown *U = dyn_cast<SCEVUnknown>(X))
-          if (!isa<Instruction>(U->getValue()))
-            X = SE.getSCEV(U->getValue());
-        NewOps.push_back(X);
-      }
-      Sum = expandAddToGEP(NewOps.begin(), NewOps.end(), PTy, Ty, Sum);
-    } else if (PointerType *PTy = dyn_cast<PointerType>(Op->getType())) {
-      // The running sum is an integer, and there's a pointer at this level.
-      // Try to form a getelementptr. If the running sum is instructions,
-      // use a SCEVUnknown to avoid re-analyzing them.
-      SmallVector<const SCEV *, 4> NewOps;
-      NewOps.push_back(isa<Instruction>(Sum) ? SE.getUnknown(Sum) :
-                                               SE.getSCEV(Sum));
-      for (++I; I != E && I->first == CurLoop; ++I)
-        NewOps.push_back(I->second);
-      Sum = expandAddToGEP(NewOps.begin(), NewOps.end(), PTy, Ty, expand(Op));
-    } else if (Op->isNonConstantNegative()) {
-      // Instead of doing a negate and add, just do a subtract.
-      Value *W = expandCodeFor(SE.getNegativeSCEV(Op), Ty);
-      Sum = InsertNoopCastOfTo(Sum, Ty);
-      Sum = InsertBinop(Instruction::Sub, Sum, W, SCEV::FlagAnyWrap,
-                        /*IsSafeToHoist*/ true);
-      ++I;
-    } else {
-      // A simple add.
-      Value *W = expandCodeFor(Op, Ty);
-      Sum = InsertNoopCastOfTo(Sum, Ty);
-      // Canonicalize a constant to the RHS.
-      if (isa<Constant>(Sum)) std::swap(Sum, W);
-      Sum = InsertBinop(Instruction::Add, Sum, W, S->getNoWrapFlags(),
-                        /*IsSafeToHoist*/ true);
-      ++I;
-    }
-  }
-
-  return Sum;
-}
-
-Value *SCEVExpander::visitMulExpr(const SCEVMulExpr *S) {
-  Type *Ty = SE.getEffectiveSCEVType(S->getType());
-
-  // Collect all the mul operands in a loop, along with their associated loops.
-  // Iterate in reverse so that constants are emitted last, all else equal.
-  SmallVector<std::pair<const Loop *, const SCEV *>, 8> OpsAndLoops;
-  for (std::reverse_iterator<SCEVMulExpr::op_iterator> I(S->op_end()),
-       E(S->op_begin()); I != E; ++I)
-    OpsAndLoops.push_back(std::make_pair(getRelevantLoop(*I), *I));
-
-  // Sort by loop. Use a stable sort so that constants follow non-constants.
-  llvm::stable_sort(OpsAndLoops, LoopCompare(SE.DT));
-
-  // Emit instructions to mul all the operands. Hoist as much as possible
-  // out of loops.
-  Value *Prod = nullptr;
-  auto I = OpsAndLoops.begin();
-
-  // Expand the calculation of X pow N in the following manner:
-  // Let N = P1 + P2 + ... + PK, where all P are powers of 2. Then:
-  // X pow N = (X pow P1) * (X pow P2) * ... * (X pow PK).
-  const auto ExpandOpBinPowN = [this, &I, &OpsAndLoops, &Ty]() {
-    auto E = I;
-    // Calculate how many times the same operand from the same loop is included
-    // into this power.
-    uint64_t Exponent = 0;
-    const uint64_t MaxExponent = UINT64_MAX >> 1;
-    // No one sane will ever try to calculate such huge exponents, but if we
-    // need this, we stop on UINT64_MAX / 2 because we need to exit the loop
-    // below when the power of 2 exceeds our Exponent, and we want it to be
-    // 1u << 31 at most to not deal with unsigned overflow.
-    while (E != OpsAndLoops.end() && *I == *E && Exponent != MaxExponent) {
-      ++Exponent;
-      ++E;
-    }
-    assert(Exponent > 0 && "Trying to calculate a zeroth exponent of operand?");
-
-    // Calculate powers with exponents 1, 2, 4, 8 etc. and include those of them
-    // that are needed into the result.
-    Value *P = expandCodeFor(I->second, Ty);
-    Value *Result = nullptr;
-    if (Exponent & 1)
-      Result = P;
-    for (uint64_t BinExp = 2; BinExp <= Exponent; BinExp <<= 1) {
-      P = InsertBinop(Instruction::Mul, P, P, SCEV::FlagAnyWrap,
-                      /*IsSafeToHoist*/ true);
-      if (Exponent & BinExp)
-        Result = Result ? InsertBinop(Instruction::Mul, Result, P,
-                                      SCEV::FlagAnyWrap,
-                                      /*IsSafeToHoist*/ true)
-                        : P;
-    }
-
-    I = E;
-    assert(Result && "Nothing was expanded?");
-    return Result;
-  };
-
-  while (I != OpsAndLoops.end()) {
-    if (!Prod) {
-      // This is the first operand. Just expand it.
-      Prod = ExpandOpBinPowN();
-    } else if (I->second->isAllOnesValue()) {
-      // Instead of doing a multiply by negative one, just do a negate.
-      Prod = InsertNoopCastOfTo(Prod, Ty);
-      Prod = InsertBinop(Instruction::Sub, Constant::getNullValue(Ty), Prod,
-                         SCEV::FlagAnyWrap, /*IsSafeToHoist*/ true);
-      ++I;
-    } else {
-      // A simple mul.
-      Value *W = ExpandOpBinPowN();
-      Prod = InsertNoopCastOfTo(Prod, Ty);
-      // Canonicalize a constant to the RHS.
-      if (isa<Constant>(Prod)) std::swap(Prod, W);
-      const APInt *RHS;
-      if (match(W, m_Power2(RHS))) {
-        // Canonicalize Prod*(1<<C) to Prod<<C.
-        assert(!Ty->isVectorTy() && "vector types are not SCEVable");
-        auto NWFlags = S->getNoWrapFlags();
-        // clear nsw flag if shl will produce poison value.
-        if (RHS->logBase2() == RHS->getBitWidth() - 1)
-          NWFlags = ScalarEvolution::clearFlags(NWFlags, SCEV::FlagNSW);
-        Prod = InsertBinop(Instruction::Shl, Prod,
-                           ConstantInt::get(Ty, RHS->logBase2()), NWFlags,
-                           /*IsSafeToHoist*/ true);
-      } else {
-        Prod = InsertBinop(Instruction::Mul, Prod, W, S->getNoWrapFlags(),
-                           /*IsSafeToHoist*/ true);
-      }
-    }
-  }
-
-  return Prod;
-}
-
-Value *SCEVExpander::visitUDivExpr(const SCEVUDivExpr *S) {
-  Type *Ty = SE.getEffectiveSCEVType(S->getType());
-
-  Value *LHS = expandCodeFor(S->getLHS(), Ty);
-  if (const SCEVConstant *SC = dyn_cast<SCEVConstant>(S->getRHS())) {
-    const APInt &RHS = SC->getAPInt();
-    if (RHS.isPowerOf2())
-      return InsertBinop(Instruction::LShr, LHS,
-                         ConstantInt::get(Ty, RHS.logBase2()),
-                         SCEV::FlagAnyWrap, /*IsSafeToHoist*/ true);
-  }
-
-  Value *RHS = expandCodeFor(S->getRHS(), Ty);
-  return InsertBinop(Instruction::UDiv, LHS, RHS, SCEV::FlagAnyWrap,
-                     /*IsSafeToHoist*/ SE.isKnownNonZero(S->getRHS()));
-}
-
-/// Move parts of Base into Rest to leave Base with the minimal
-/// expression that provides a pointer operand suitable for a
-/// GEP expansion.
-static void ExposePointerBase(const SCEV *&Base, const SCEV *&Rest,
-                              ScalarEvolution &SE) {
-  while (const SCEVAddRecExpr *A = dyn_cast<SCEVAddRecExpr>(Base)) {
-    Base = A->getStart();
-    Rest = SE.getAddExpr(Rest,
-                         SE.getAddRecExpr(SE.getConstant(A->getType(), 0),
-                                          A->getStepRecurrence(SE),
-                                          A->getLoop(),
-                                          A->getNoWrapFlags(SCEV::FlagNW)));
-  }
-  if (const SCEVAddExpr *A = dyn_cast<SCEVAddExpr>(Base)) {
-    Base = A->getOperand(A->getNumOperands()-1);
-    SmallVector<const SCEV *, 8> NewAddOps(A->op_begin(), A->op_end());
-    NewAddOps.back() = Rest;
-    Rest = SE.getAddExpr(NewAddOps);
-    ExposePointerBase(Base, Rest, SE);
-  }
-}
-
-/// Determine if this is a well-behaved chain of instructions leading back to
-/// the PHI. If so, it may be reused by expanded expressions.
-bool SCEVExpander::isNormalAddRecExprPHI(PHINode *PN, Instruction *IncV,
-                                         const Loop *L) {
-  if (IncV->getNumOperands() == 0 || isa<PHINode>(IncV) ||
-      (isa<CastInst>(IncV) && !isa<BitCastInst>(IncV)))
-    return false;
-  // If any of the operands don't dominate the insert position, bail.
-  // Addrec operands are always loop-invariant, so this can only happen
-  // if there are instructions which haven't been hoisted.
-  if (L == IVIncInsertLoop) {
-    for (User::op_iterator OI = IncV->op_begin()+1,
-           OE = IncV->op_end(); OI != OE; ++OI)
-      if (Instruction *OInst = dyn_cast<Instruction>(OI))
-        if (!SE.DT.dominates(OInst, IVIncInsertPos))
-          return false;
-  }
-  // Advance to the next instruction.
-  IncV = dyn_cast<Instruction>(IncV->getOperand(0));
-  if (!IncV)
-    return false;
-
-  if (IncV->mayHaveSideEffects())
-    return false;
-
-  if (IncV == PN)
-    return true;
-
-  return isNormalAddRecExprPHI(PN, IncV, L);
-}
-
-/// getIVIncOperand returns an induction variable increment's induction
-/// variable operand.
-///
-/// If allowScale is set, any type of GEP is allowed as long as the nonIV
-/// operands dominate InsertPos.
-///
-/// If allowScale is not set, ensure that a GEP increment conforms to one of the
-/// simple patterns generated by getAddRecExprPHILiterally and
-/// expandAddtoGEP. If the pattern isn't recognized, return NULL.
-Instruction *SCEVExpander::getIVIncOperand(Instruction *IncV,
-                                           Instruction *InsertPos,
-                                           bool allowScale) {
-  if (IncV == InsertPos)
-    return nullptr;
-
-  switch (IncV->getOpcode()) {
-  default:
-    return nullptr;
-  // Check for a simple Add/Sub or GEP of a loop invariant step.
-  case Instruction::Add:
-  case Instruction::Sub: {
-    Instruction *OInst = dyn_cast<Instruction>(IncV->getOperand(1));
-    if (!OInst || SE.DT.dominates(OInst, InsertPos))
-      return dyn_cast<Instruction>(IncV->getOperand(0));
-    return nullptr;
-  }
-  case Instruction::BitCast:
-    return dyn_cast<Instruction>(IncV->getOperand(0));
-  case Instruction::GetElementPtr:
-    for (auto I = IncV->op_begin() + 1, E = IncV->op_end(); I != E; ++I) {
-      if (isa<Constant>(*I))
-        continue;
-      if (Instruction *OInst = dyn_cast<Instruction>(*I)) {
-        if (!SE.DT.dominates(OInst, InsertPos))
-          return nullptr;
-      }
-      if (allowScale) {
-        // allow any kind of GEP as long as it can be hoisted.
-        continue;
-      }
-      // This must be a pointer addition of constants (pretty), which is already
-      // handled, or some number of address-size elements (ugly). Ugly geps
-      // have 2 operands. i1* is used by the expander to represent an
-      // address-size element.
-      if (IncV->getNumOperands() != 2)
-        return nullptr;
-      unsigned AS = cast<PointerType>(IncV->getType())->getAddressSpace();
-      if (IncV->getType() != Type::getInt1PtrTy(SE.getContext(), AS)
-          && IncV->getType() != Type::getInt8PtrTy(SE.getContext(), AS))
-        return nullptr;
-      break;
-    }
-    return dyn_cast<Instruction>(IncV->getOperand(0));
-  }
-}
-
-/// If the insert point of the current builder or any of the builders on the
-/// stack of saved builders has 'I' as its insert point, update it to point to
-/// the instruction after 'I'.  This is intended to be used when the instruction
-/// 'I' is being moved.  If this fixup is not done and 'I' is moved to a
-/// different block, the inconsistent insert point (with a mismatched
-/// Instruction and Block) can lead to an instruction being inserted in a block
-/// other than its parent.
-void SCEVExpander::fixupInsertPoints(Instruction *I) {
-  BasicBlock::iterator It(*I);
-  BasicBlock::iterator NewInsertPt = std::next(It);
-  if (Builder.GetInsertPoint() == It)
-    Builder.SetInsertPoint(&*NewInsertPt);
-  for (auto *InsertPtGuard : InsertPointGuards)
-    if (InsertPtGuard->GetInsertPoint() == It)
-      InsertPtGuard->SetInsertPoint(NewInsertPt);
-}
-
-/// hoistStep - Attempt to hoist a simple IV increment above InsertPos to make
-/// it available to other uses in this loop. Recursively hoist any operands,
-/// until we reach a value that dominates InsertPos.
-bool SCEVExpander::hoistIVInc(Instruction *IncV, Instruction *InsertPos) {
-  if (SE.DT.dominates(IncV, InsertPos))
-      return true;
-
-  // InsertPos must itself dominate IncV so that IncV's new position satisfies
-  // its existing users.
-  if (isa<PHINode>(InsertPos) ||
-      !SE.DT.dominates(InsertPos->getParent(), IncV->getParent()))
-    return false;
-
-  if (!SE.LI.movementPreservesLCSSAForm(IncV, InsertPos))
-    return false;
-
-  // Check that the chain of IV operands leading back to Phi can be hoisted.
-  SmallVector<Instruction*, 4> IVIncs;
-  for(;;) {
-    Instruction *Oper = getIVIncOperand(IncV, InsertPos, /*allowScale*/true);
-    if (!Oper)
-      return false;
-    // IncV is safe to hoist.
-    IVIncs.push_back(IncV);
-    IncV = Oper;
-    if (SE.DT.dominates(IncV, InsertPos))
-      break;
-  }
-  for (auto I = IVIncs.rbegin(), E = IVIncs.rend(); I != E; ++I) {
-    fixupInsertPoints(*I);
-    (*I)->moveBefore(InsertPos);
-  }
-  return true;
-}
-
-/// Determine if this cyclic phi is in a form that would have been generated by
-/// LSR. We don't care if the phi was actually expanded in this pass, as long
-/// as it is in a low-cost form, for example, no implied multiplication. This
-/// should match any patterns generated by getAddRecExprPHILiterally and
-/// expandAddtoGEP.
-bool SCEVExpander::isExpandedAddRecExprPHI(PHINode *PN, Instruction *IncV,
-                                           const Loop *L) {
-  for(Instruction *IVOper = IncV;
-      (IVOper = getIVIncOperand(IVOper, L->getLoopPreheader()->getTerminator(),
-                                /*allowScale=*/false));) {
-    if (IVOper == PN)
-      return true;
-  }
-  return false;
-}
-
-/// expandIVInc - Expand an IV increment at Builder's current InsertPos.
-/// Typically this is the LatchBlock terminator or IVIncInsertPos, but we may
-/// need to materialize IV increments elsewhere to handle difficult situations.
-Value *SCEVExpander::expandIVInc(PHINode *PN, Value *StepV, const Loop *L,
-                                 Type *ExpandTy, Type *IntTy,
-                                 bool useSubtract) {
-  Value *IncV;
-  // If the PHI is a pointer, use a GEP, otherwise use an add or sub.
-  if (ExpandTy->isPointerTy()) {
-    PointerType *GEPPtrTy = cast<PointerType>(ExpandTy);
-    // If the step isn't constant, don't use an implicitly scaled GEP, because
-    // that would require a multiply inside the loop.
-    if (!isa<ConstantInt>(StepV))
-      GEPPtrTy = PointerType::get(Type::getInt1Ty(SE.getContext()),
-                                  GEPPtrTy->getAddressSpace());
-    IncV = expandAddToGEP(SE.getSCEV(StepV), GEPPtrTy, IntTy, PN);
-    if (IncV->getType() != PN->getType()) {
-      IncV = Builder.CreateBitCast(IncV, PN->getType());
-      rememberInstruction(IncV);
-    }
-  } else {
-    IncV = useSubtract ?
-      Builder.CreateSub(PN, StepV, Twine(IVName) + ".iv.next") :
-      Builder.CreateAdd(PN, StepV, Twine(IVName) + ".iv.next");
-    rememberInstruction(IncV);
-  }
-  return IncV;
-}
-
-/// Hoist the addrec instruction chain rooted in the loop phi above the
-/// position. This routine assumes that this is possible (has been checked).
-void SCEVExpander::hoistBeforePos(DominatorTree *DT, Instruction *InstToHoist,
-                                  Instruction *Pos, PHINode *LoopPhi) {
-  do {
-    if (DT->dominates(InstToHoist, Pos))
-      break;
-    // Make sure the increment is where we want it. But don't move it
-    // down past a potential existing post-inc user.
-    fixupInsertPoints(InstToHoist);
-    InstToHoist->moveBefore(Pos);
-    Pos = InstToHoist;
-    InstToHoist = cast<Instruction>(InstToHoist->getOperand(0));
-  } while (InstToHoist != LoopPhi);
-}
-
-/// Check whether we can cheaply express the requested SCEV in terms of
-/// the available PHI SCEV by truncation and/or inversion of the step.
-static bool canBeCheaplyTransformed(ScalarEvolution &SE,
-                                    const SCEVAddRecExpr *Phi,
-                                    const SCEVAddRecExpr *Requested,
-                                    bool &InvertStep) {
-  Type *PhiTy = SE.getEffectiveSCEVType(Phi->getType());
-  Type *RequestedTy = SE.getEffectiveSCEVType(Requested->getType());
-
-  if (RequestedTy->getIntegerBitWidth() > PhiTy->getIntegerBitWidth())
-    return false;
-
-  // Try truncate it if necessary.
-  Phi = dyn_cast<SCEVAddRecExpr>(SE.getTruncateOrNoop(Phi, RequestedTy));
-  if (!Phi)
-    return false;
-
-  // Check whether truncation will help.
-  if (Phi == Requested) {
-    InvertStep = false;
-    return true;
-  }
-
-  // Check whether inverting will help: {R,+,-1} == R - {0,+,1}.
-  if (SE.getAddExpr(Requested->getStart(),
-                    SE.getNegativeSCEV(Requested)) == Phi) {
-    InvertStep = true;
-    return true;
-  }
-
-  return false;
-}
-
-static bool IsIncrementNSW(ScalarEvolution &SE, const SCEVAddRecExpr *AR) {
-  if (!isa<IntegerType>(AR->getType()))
-    return false;
-
-  unsigned BitWidth = cast<IntegerType>(AR->getType())->getBitWidth();
-  Type *WideTy = IntegerType::get(AR->getType()->getContext(), BitWidth * 2);
-  const SCEV *Step = AR->getStepRecurrence(SE);
-  const SCEV *OpAfterExtend = SE.getAddExpr(SE.getSignExtendExpr(Step, WideTy),
-                                            SE.getSignExtendExpr(AR, WideTy));
-  const SCEV *ExtendAfterOp =
-    SE.getSignExtendExpr(SE.getAddExpr(AR, Step), WideTy);
-  return ExtendAfterOp == OpAfterExtend;
-}
-
-static bool IsIncrementNUW(ScalarEvolution &SE, const SCEVAddRecExpr *AR) {
-  if (!isa<IntegerType>(AR->getType()))
-    return false;
-
-  unsigned BitWidth = cast<IntegerType>(AR->getType())->getBitWidth();
-  Type *WideTy = IntegerType::get(AR->getType()->getContext(), BitWidth * 2);
-  const SCEV *Step = AR->getStepRecurrence(SE);
-  const SCEV *OpAfterExtend = SE.getAddExpr(SE.getZeroExtendExpr(Step, WideTy),
-                                            SE.getZeroExtendExpr(AR, WideTy));
-  const SCEV *ExtendAfterOp =
-    SE.getZeroExtendExpr(SE.getAddExpr(AR, Step), WideTy);
-  return ExtendAfterOp == OpAfterExtend;
-}
-
-/// getAddRecExprPHILiterally - Helper for expandAddRecExprLiterally. Expand
-/// the base addrec, which is the addrec without any non-loop-dominating
-/// values, and return the PHI.
-PHINode *
-SCEVExpander::getAddRecExprPHILiterally(const SCEVAddRecExpr *Normalized,
-                                        const Loop *L,
-                                        Type *ExpandTy,
-                                        Type *IntTy,
-                                        Type *&TruncTy,
-                                        bool &InvertStep) {
-  assert((!IVIncInsertLoop||IVIncInsertPos) && "Uninitialized insert position");
-
-  // Reuse a previously-inserted PHI, if present.
-  BasicBlock *LatchBlock = L->getLoopLatch();
-  if (LatchBlock) {
-    PHINode *AddRecPhiMatch = nullptr;
-    Instruction *IncV = nullptr;
-    TruncTy = nullptr;
-    InvertStep = false;
-
-    // Only try partially matching scevs that need truncation and/or
-    // step-inversion if we know this loop is outside the current loop.
-    bool TryNonMatchingSCEV =
-        IVIncInsertLoop &&
-        SE.DT.properlyDominates(LatchBlock, IVIncInsertLoop->getHeader());
-
-    for (PHINode &PN : L->getHeader()->phis()) {
-      if (!SE.isSCEVable(PN.getType()))
-        continue;
-
-      const SCEVAddRecExpr *PhiSCEV = dyn_cast<SCEVAddRecExpr>(SE.getSCEV(&PN));
-      if (!PhiSCEV)
-        continue;
-
-      bool IsMatchingSCEV = PhiSCEV == Normalized;
-      // We only handle truncation and inversion of phi recurrences for the
-      // expanded expression if the expanded expression's loop dominates the
-      // loop we insert to. Check now, so we can bail out early.
-      if (!IsMatchingSCEV && !TryNonMatchingSCEV)
-          continue;
-
-      // TODO: this possibly can be reworked to avoid this cast at all.
-      Instruction *TempIncV =
-          dyn_cast<Instruction>(PN.getIncomingValueForBlock(LatchBlock));
-      if (!TempIncV)
-        continue;
-
-      // Check whether we can reuse this PHI node.
-      if (LSRMode) {
-        if (!isExpandedAddRecExprPHI(&PN, TempIncV, L))
-          continue;
-        if (L == IVIncInsertLoop && !hoistIVInc(TempIncV, IVIncInsertPos))
-          continue;
-      } else {
-        if (!isNormalAddRecExprPHI(&PN, TempIncV, L))
-          continue;
-      }
-
-      // Stop if we have found an exact match SCEV.
-      if (IsMatchingSCEV) {
-        IncV = TempIncV;
-        TruncTy = nullptr;
-        InvertStep = false;
-        AddRecPhiMatch = &PN;
-        break;
-      }
-
-      // Try whether the phi can be translated into the requested form
-      // (truncated and/or offset by a constant).
-      if ((!TruncTy || InvertStep) &&
-          canBeCheaplyTransformed(SE, PhiSCEV, Normalized, InvertStep)) {
-        // Record the phi node. But don't stop we might find an exact match
-        // later.
-        AddRecPhiMatch = &PN;
-        IncV = TempIncV;
-        TruncTy = SE.getEffectiveSCEVType(Normalized->getType());
-      }
-    }
-
-    if (AddRecPhiMatch) {
-      // Potentially, move the increment. We have made sure in
-      // isExpandedAddRecExprPHI or hoistIVInc that this is possible.
-      if (L == IVIncInsertLoop)
-        hoistBeforePos(&SE.DT, IncV, IVIncInsertPos, AddRecPhiMatch);
-
-      // Ok, the add recurrence looks usable.
-      // Remember this PHI, even in post-inc mode.
-      InsertedValues.insert(AddRecPhiMatch);
-      // Remember the increment.
-      rememberInstruction(IncV);
-      return AddRecPhiMatch;
-    }
-  }
-
-  // Save the original insertion point so we can restore it when we're done.
-  SCEVInsertPointGuard Guard(Builder, this);
-
-  // Another AddRec may need to be recursively expanded below. For example, if
-  // this AddRec is quadratic, the StepV may itself be an AddRec in this
-  // loop. Remove this loop from the PostIncLoops set before expanding such
-  // AddRecs. Otherwise, we cannot find a valid position for the step
-  // (i.e. StepV can never dominate its loop header).  Ideally, we could do
-  // SavedIncLoops.swap(PostIncLoops), but we generally have a single element,
-  // so it's not worth implementing SmallPtrSet::swap.
-  PostIncLoopSet SavedPostIncLoops = PostIncLoops;
-  PostIncLoops.clear();
-
-  // Expand code for the start value into the loop preheader.
-  assert(L->getLoopPreheader() &&
-         "Can't expand add recurrences without a loop preheader!");
-  Value *StartV = expandCodeFor(Normalized->getStart(), ExpandTy,
-                                L->getLoopPreheader()->getTerminator());
-
-  // StartV must have been be inserted into L's preheader to dominate the new
-  // phi.
-  assert(!isa<Instruction>(StartV) ||
-         SE.DT.properlyDominates(cast<Instruction>(StartV)->getParent(),
-                                 L->getHeader()));
-
-  // Expand code for the step value. Do this before creating the PHI so that PHI
-  // reuse code doesn't see an incomplete PHI.
-  const SCEV *Step = Normalized->getStepRecurrence(SE);
-  // If the stride is negative, insert a sub instead of an add for the increment
-  // (unless it's a constant, because subtracts of constants are canonicalized
-  // to adds).
-  bool useSubtract = !ExpandTy->isPointerTy() && Step->isNonConstantNegative();
-  if (useSubtract)
-    Step = SE.getNegativeSCEV(Step);
-  // Expand the step somewhere that dominates the loop header.
-  Value *StepV = expandCodeFor(Step, IntTy, &L->getHeader()->front());
-
-  // The no-wrap behavior proved by IsIncrement(NUW|NSW) is only applicable if
-  // we actually do emit an addition.  It does not apply if we emit a
-  // subtraction.
-  bool IncrementIsNUW = !useSubtract && IsIncrementNUW(SE, Normalized);
-  bool IncrementIsNSW = !useSubtract && IsIncrementNSW(SE, Normalized);
-
-  // Create the PHI.
-  BasicBlock *Header = L->getHeader();
-  Builder.SetInsertPoint(Header, Header->begin());
-  pred_iterator HPB = pred_begin(Header), HPE = pred_end(Header);
-  PHINode *PN = Builder.CreatePHI(ExpandTy, std::distance(HPB, HPE),
-                                  Twine(IVName) + ".iv");
-  rememberInstruction(PN);
-
-  // Create the step instructions and populate the PHI.
-  for (pred_iterator HPI = HPB; HPI != HPE; ++HPI) {
-    BasicBlock *Pred = *HPI;
-
-    // Add a start value.
-    if (!L->contains(Pred)) {
-      PN->addIncoming(StartV, Pred);
-      continue;
-    }
-
-    // Create a step value and add it to the PHI.
-    // If IVIncInsertLoop is non-null and equal to the addrec's loop, insert the
-    // instructions at IVIncInsertPos.
-    Instruction *InsertPos = L == IVIncInsertLoop ?
-      IVIncInsertPos : Pred->getTerminator();
-    Builder.SetInsertPoint(InsertPos);
-    Value *IncV = expandIVInc(PN, StepV, L, ExpandTy, IntTy, useSubtract);
-
-    if (isa<OverflowingBinaryOperator>(IncV)) {
-      if (IncrementIsNUW)
-        cast<BinaryOperator>(IncV)->setHasNoUnsignedWrap();
-      if (IncrementIsNSW)
-        cast<BinaryOperator>(IncV)->setHasNoSignedWrap();
-    }
-    PN->addIncoming(IncV, Pred);
-  }
-
-  // After expanding subexpressions, restore the PostIncLoops set so the caller
-  // can ensure that IVIncrement dominates the current uses.
-  PostIncLoops = SavedPostIncLoops;
-
-  // Remember this PHI, even in post-inc mode.
-  InsertedValues.insert(PN);
-
-  return PN;
-}
-
-Value *SCEVExpander::expandAddRecExprLiterally(const SCEVAddRecExpr *S) {
-  Type *STy = S->getType();
-  Type *IntTy = SE.getEffectiveSCEVType(STy);
-  const Loop *L = S->getLoop();
-
-  // Determine a normalized form of this expression, which is the expression
-  // before any post-inc adjustment is made.
-  const SCEVAddRecExpr *Normalized = S;
-  if (PostIncLoops.count(L)) {
-    PostIncLoopSet Loops;
-    Loops.insert(L);
-    Normalized = cast<SCEVAddRecExpr>(normalizeForPostIncUse(S, Loops, SE));
-  }
-
-  // Strip off any non-loop-dominating component from the addrec start.
-  const SCEV *Start = Normalized->getStart();
-  const SCEV *PostLoopOffset = nullptr;
-  if (!SE.properlyDominates(Start, L->getHeader())) {
-    PostLoopOffset = Start;
-    Start = SE.getConstant(Normalized->getType(), 0);
-    Normalized = cast<SCEVAddRecExpr>(
-      SE.getAddRecExpr(Start, Normalized->getStepRecurrence(SE),
-                       Normalized->getLoop(),
-                       Normalized->getNoWrapFlags(SCEV::FlagNW)));
-  }
-
-  // Strip off any non-loop-dominating component from the addrec step.
-  const SCEV *Step = Normalized->getStepRecurrence(SE);
-  const SCEV *PostLoopScale = nullptr;
-  if (!SE.dominates(Step, L->getHeader())) {
-    PostLoopScale = Step;
-    Step = SE.getConstant(Normalized->getType(), 1);
-    if (!Start->isZero()) {
-        // The normalization below assumes that Start is constant zero, so if
-        // it isn't re-associate Start to PostLoopOffset.
-        assert(!PostLoopOffset && "Start not-null but PostLoopOffset set?");
-        PostLoopOffset = Start;
-        Start = SE.getConstant(Normalized->getType(), 0);
-    }
-    Normalized =
-      cast<SCEVAddRecExpr>(SE.getAddRecExpr(
-                             Start, Step, Normalized->getLoop(),
-                             Normalized->getNoWrapFlags(SCEV::FlagNW)));
-  }
-
-  // Expand the core addrec. If we need post-loop scaling, force it to
-  // expand to an integer type to avoid the need for additional casting.
-  Type *ExpandTy = PostLoopScale ? IntTy : STy;
-  // We can't use a pointer type for the addrec if the pointer type is
-  // non-integral.
-  Type *AddRecPHIExpandTy =
-      DL.isNonIntegralPointerType(STy) ? Normalized->getType() : ExpandTy;
-
-  // In some cases, we decide to reuse an existing phi node but need to truncate
-  // it and/or invert the step.
-  Type *TruncTy = nullptr;
-  bool InvertStep = false;
-  PHINode *PN = getAddRecExprPHILiterally(Normalized, L, AddRecPHIExpandTy,
-                                          IntTy, TruncTy, InvertStep);
-
-  // Accommodate post-inc mode, if necessary.
-  Value *Result;
-  if (!PostIncLoops.count(L))
-    Result = PN;
-  else {
-    // In PostInc mode, use the post-incremented value.
-    BasicBlock *LatchBlock = L->getLoopLatch();
-    assert(LatchBlock && "PostInc mode requires a unique loop latch!");
-    Result = PN->getIncomingValueForBlock(LatchBlock);
-
-    // For an expansion to use the postinc form, the client must call
-    // expandCodeFor with an InsertPoint that is either outside the PostIncLoop
-    // or dominated by IVIncInsertPos.
-    if (isa<Instruction>(Result) &&
-        !SE.DT.dominates(cast<Instruction>(Result),
-                         &*Builder.GetInsertPoint())) {
-      // The induction variable's postinc expansion does not dominate this use.
-      // IVUsers tries to prevent this case, so it is rare. However, it can
-      // happen when an IVUser outside the loop is not dominated by the latch
-      // block. Adjusting IVIncInsertPos before expansion begins cannot handle
-      // all cases. Consider a phi outside whose operand is replaced during
-      // expansion with the value of the postinc user. Without fundamentally
-      // changing the way postinc users are tracked, the only remedy is
-      // inserting an extra IV increment. StepV might fold into PostLoopOffset,
-      // but hopefully expandCodeFor handles that.
-      bool useSubtract =
-        !ExpandTy->isPointerTy() && Step->isNonConstantNegative();
-      if (useSubtract)
-        Step = SE.getNegativeSCEV(Step);
-      Value *StepV;
-      {
-        // Expand the step somewhere that dominates the loop header.
-        SCEVInsertPointGuard Guard(Builder, this);
-        StepV = expandCodeFor(Step, IntTy, &L->getHeader()->front());
-      }
-      Result = expandIVInc(PN, StepV, L, ExpandTy, IntTy, useSubtract);
-    }
-  }
-
-  // We have decided to reuse an induction variable of a dominating loop. Apply
-  // truncation and/or inversion of the step.
-  if (TruncTy) {
-    Type *ResTy = Result->getType();
-    // Normalize the result type.
-    if (ResTy != SE.getEffectiveSCEVType(ResTy))
-      Result = InsertNoopCastOfTo(Result, SE.getEffectiveSCEVType(ResTy));
-    // Truncate the result.
-    if (TruncTy != Result->getType()) {
-      Result = Builder.CreateTrunc(Result, TruncTy);
-      rememberInstruction(Result);
-    }
-    // Invert the result.
-    if (InvertStep) {
-      Result = Builder.CreateSub(expandCodeFor(Normalized->getStart(), TruncTy),
-                                 Result);
-      rememberInstruction(Result);
-    }
-  }
-
-  // Re-apply any non-loop-dominating scale.
-  if (PostLoopScale) {
-    assert(S->isAffine() && "Can't linearly scale non-affine recurrences.");
-    Result = InsertNoopCastOfTo(Result, IntTy);
-    Result = Builder.CreateMul(Result,
-                               expandCodeFor(PostLoopScale, IntTy));
-    rememberInstruction(Result);
-  }
-
-  // Re-apply any non-loop-dominating offset.
-  if (PostLoopOffset) {
-    if (PointerType *PTy = dyn_cast<PointerType>(ExpandTy)) {
-      if (Result->getType()->isIntegerTy()) {
-        Value *Base = expandCodeFor(PostLoopOffset, ExpandTy);
-        Result = expandAddToGEP(SE.getUnknown(Result), PTy, IntTy, Base);
-      } else {
-        Result = expandAddToGEP(PostLoopOffset, PTy, IntTy, Result);
-      }
-    } else {
-      Result = InsertNoopCastOfTo(Result, IntTy);
-      Result = Builder.CreateAdd(Result,
-                                 expandCodeFor(PostLoopOffset, IntTy));
-      rememberInstruction(Result);
-    }
-  }
-
-  return Result;
-}
-
-Value *SCEVExpander::visitAddRecExpr(const SCEVAddRecExpr *S) {
-  // In canonical mode we compute the addrec as an expression of a canonical IV
-  // using evaluateAtIteration and expand the resulting SCEV expression. This
-  // way we avoid introducing new IVs to carry on the comutation of the addrec
-  // throughout the loop.
-  //
-  // For nested addrecs evaluateAtIteration might need a canonical IV of a
-  // type wider than the addrec itself. Emitting a canonical IV of the
-  // proper type might produce non-legal types, for example expanding an i64
-  // {0,+,2,+,1} addrec would need an i65 canonical IV. To avoid this just fall
-  // back to non-canonical mode for nested addrecs.
-  if (!CanonicalMode || (S->getNumOperands() > 2))
-    return expandAddRecExprLiterally(S);
-
-  Type *Ty = SE.getEffectiveSCEVType(S->getType());
-  const Loop *L = S->getLoop();
-
-  // First check for an existing canonical IV in a suitable type.
-  PHINode *CanonicalIV = nullptr;
-  if (PHINode *PN = L->getCanonicalInductionVariable())
-    if (SE.getTypeSizeInBits(PN->getType()) >= SE.getTypeSizeInBits(Ty))
-      CanonicalIV = PN;
-
-  // Rewrite an AddRec in terms of the canonical induction variable, if
-  // its type is more narrow.
-  if (CanonicalIV &&
-      SE.getTypeSizeInBits(CanonicalIV->getType()) >
-      SE.getTypeSizeInBits(Ty)) {
-    SmallVector<const SCEV *, 4> NewOps(S->getNumOperands());
-    for (unsigned i = 0, e = S->getNumOperands(); i != e; ++i)
-      NewOps[i] = SE.getAnyExtendExpr(S->op_begin()[i], CanonicalIV->getType());
-    Value *V = expand(SE.getAddRecExpr(NewOps, S->getLoop(),
-                                       S->getNoWrapFlags(SCEV::FlagNW)));
-    BasicBlock::iterator NewInsertPt =
-        findInsertPointAfter(cast<Instruction>(V), Builder.GetInsertBlock());
-    V = expandCodeFor(SE.getTruncateExpr(SE.getUnknown(V), Ty), nullptr,
-                      &*NewInsertPt);
-    return V;
-  }
-
-  // {X,+,F} --> X + {0,+,F}
-  if (!S->getStart()->isZero()) {
-    SmallVector<const SCEV *, 4> NewOps(S->op_begin(), S->op_end());
-    NewOps[0] = SE.getConstant(Ty, 0);
-    const SCEV *Rest = SE.getAddRecExpr(NewOps, L,
-                                        S->getNoWrapFlags(SCEV::FlagNW));
-
-    // Turn things like ptrtoint+arithmetic+inttoptr into GEP. See the
-    // comments on expandAddToGEP for details.
-    const SCEV *Base = S->getStart();
-    // Dig into the expression to find the pointer base for a GEP.
-    const SCEV *ExposedRest = Rest;
-    ExposePointerBase(Base, ExposedRest, SE);
-    // If we found a pointer, expand the AddRec with a GEP.
-    if (PointerType *PTy = dyn_cast<PointerType>(Base->getType())) {
-      // Make sure the Base isn't something exotic, such as a multiplied
-      // or divided pointer value. In those cases, the result type isn't
-      // actually a pointer type.
-      if (!isa<SCEVMulExpr>(Base) && !isa<SCEVUDivExpr>(Base)) {
-        Value *StartV = expand(Base);
-        assert(StartV->getType() == PTy && "Pointer type mismatch for GEP!");
-        return expandAddToGEP(ExposedRest, PTy, Ty, StartV);
-      }
-    }
-
-    // Just do a normal add. Pre-expand the operands to suppress folding.
-    //
-    // The LHS and RHS values are factored out of the expand call to make the
-    // output independent of the argument evaluation order.
-    const SCEV *AddExprLHS = SE.getUnknown(expand(S->getStart()));
-    const SCEV *AddExprRHS = SE.getUnknown(expand(Rest));
-    return expand(SE.getAddExpr(AddExprLHS, AddExprRHS));
-  }
-
-  // If we don't yet have a canonical IV, create one.
-  if (!CanonicalIV) {
-    // Create and insert the PHI node for the induction variable in the
-    // specified loop.
-    BasicBlock *Header = L->getHeader();
-    pred_iterator HPB = pred_begin(Header), HPE = pred_end(Header);
-    CanonicalIV = PHINode::Create(Ty, std::distance(HPB, HPE), "indvar",
-                                  &Header->front());
-    rememberInstruction(CanonicalIV);
-
-    SmallSet<BasicBlock *, 4> PredSeen;
-    Constant *One = ConstantInt::get(Ty, 1);
-    for (pred_iterator HPI = HPB; HPI != HPE; ++HPI) {
-      BasicBlock *HP = *HPI;
-      if (!PredSeen.insert(HP).second) {
-        // There must be an incoming value for each predecessor, even the
-        // duplicates!
-        CanonicalIV->addIncoming(CanonicalIV->getIncomingValueForBlock(HP), HP);
-        continue;
-      }
-
-      if (L->contains(HP)) {
-        // Insert a unit add instruction right before the terminator
-        // corresponding to the back-edge.
-        Instruction *Add = BinaryOperator::CreateAdd(CanonicalIV, One,
-                                                     "indvar.next",
-                                                     HP->getTerminator());
-        Add->setDebugLoc(HP->getTerminator()->getDebugLoc());
-        rememberInstruction(Add);
-        CanonicalIV->addIncoming(Add, HP);
-      } else {
-        CanonicalIV->addIncoming(Constant::getNullValue(Ty), HP);
-      }
-    }
-  }
-
-  // {0,+,1} --> Insert a canonical induction variable into the loop!
-  if (S->isAffine() && S->getOperand(1)->isOne()) {
-    assert(Ty == SE.getEffectiveSCEVType(CanonicalIV->getType()) &&
-           "IVs with types different from the canonical IV should "
-           "already have been handled!");
-    return CanonicalIV;
-  }
-
-  // {0,+,F} --> {0,+,1} * F
-
-  // If this is a simple linear addrec, emit it now as a special case.
-  if (S->isAffine())    // {0,+,F} --> i*F
-    return
-      expand(SE.getTruncateOrNoop(
-        SE.getMulExpr(SE.getUnknown(CanonicalIV),
-                      SE.getNoopOrAnyExtend(S->getOperand(1),
-                                            CanonicalIV->getType())),
-        Ty));
-
-  // If this is a chain of recurrences, turn it into a closed form, using the
-  // folders, then expandCodeFor the closed form.  This allows the folders to
-  // simplify the expression without having to build a bunch of special code
-  // into this folder.
-  const SCEV *IH = SE.getUnknown(CanonicalIV);   // Get I as a "symbolic" SCEV.
-
-  // Promote S up to the canonical IV type, if the cast is foldable.
-  const SCEV *NewS = S;
-  const SCEV *Ext = SE.getNoopOrAnyExtend(S, CanonicalIV->getType());
-  if (isa<SCEVAddRecExpr>(Ext))
-    NewS = Ext;
-
-  const SCEV *V = cast<SCEVAddRecExpr>(NewS)->evaluateAtIteration(IH, SE);
-  //cerr << "Evaluated: " << *this << "\n     to: " << *V << "\n";
-
-  // Truncate the result down to the original type, if needed.
-  const SCEV *T = SE.getTruncateOrNoop(V, Ty);
-  return expand(T);
-}
-
-Value *SCEVExpander::visitTruncateExpr(const SCEVTruncateExpr *S) {
-  Type *Ty = SE.getEffectiveSCEVType(S->getType());
-  Value *V = expandCodeFor(S->getOperand(),
-                           SE.getEffectiveSCEVType(S->getOperand()->getType()));
-  Value *I = Builder.CreateTrunc(V, Ty);
-  rememberInstruction(I);
-  return I;
-}
-
-Value *SCEVExpander::visitZeroExtendExpr(const SCEVZeroExtendExpr *S) {
-  Type *Ty = SE.getEffectiveSCEVType(S->getType());
-  Value *V = expandCodeFor(S->getOperand(),
-                           SE.getEffectiveSCEVType(S->getOperand()->getType()));
-  Value *I = Builder.CreateZExt(V, Ty);
-  rememberInstruction(I);
-  return I;
-}
-
-Value *SCEVExpander::visitSignExtendExpr(const SCEVSignExtendExpr *S) {
-  Type *Ty = SE.getEffectiveSCEVType(S->getType());
-  Value *V = expandCodeFor(S->getOperand(),
-                           SE.getEffectiveSCEVType(S->getOperand()->getType()));
-  Value *I = Builder.CreateSExt(V, Ty);
-  rememberInstruction(I);
-  return I;
-}
-
-Value *SCEVExpander::visitSMaxExpr(const SCEVSMaxExpr *S) {
-  Value *LHS = expand(S->getOperand(S->getNumOperands()-1));
-  Type *Ty = LHS->getType();
-  for (int i = S->getNumOperands()-2; i >= 0; --i) {
-    // In the case of mixed integer and pointer types, do the
-    // rest of the comparisons as integer.
-    Type *OpTy = S->getOperand(i)->getType();
-    if (OpTy->isIntegerTy() != Ty->isIntegerTy()) {
-      Ty = SE.getEffectiveSCEVType(Ty);
-      LHS = InsertNoopCastOfTo(LHS, Ty);
-    }
-    Value *RHS = expandCodeFor(S->getOperand(i), Ty);
-    Value *ICmp = Builder.CreateICmpSGT(LHS, RHS);
-    rememberInstruction(ICmp);
-    Value *Sel = Builder.CreateSelect(ICmp, LHS, RHS, "smax");
-    rememberInstruction(Sel);
-    LHS = Sel;
-  }
-  // In the case of mixed integer and pointer types, cast the
-  // final result back to the pointer type.
-  if (LHS->getType() != S->getType())
-    LHS = InsertNoopCastOfTo(LHS, S->getType());
-  return LHS;
-}
-
-Value *SCEVExpander::visitUMaxExpr(const SCEVUMaxExpr *S) {
-  Value *LHS = expand(S->getOperand(S->getNumOperands()-1));
-  Type *Ty = LHS->getType();
-  for (int i = S->getNumOperands()-2; i >= 0; --i) {
-    // In the case of mixed integer and pointer types, do the
-    // rest of the comparisons as integer.
-    Type *OpTy = S->getOperand(i)->getType();
-    if (OpTy->isIntegerTy() != Ty->isIntegerTy()) {
-      Ty = SE.getEffectiveSCEVType(Ty);
-      LHS = InsertNoopCastOfTo(LHS, Ty);
-    }
-    Value *RHS = expandCodeFor(S->getOperand(i), Ty);
-    Value *ICmp = Builder.CreateICmpUGT(LHS, RHS);
-    rememberInstruction(ICmp);
-    Value *Sel = Builder.CreateSelect(ICmp, LHS, RHS, "umax");
-    rememberInstruction(Sel);
-    LHS = Sel;
-  }
-  // In the case of mixed integer and pointer types, cast the
-  // final result back to the pointer type.
-  if (LHS->getType() != S->getType())
-    LHS = InsertNoopCastOfTo(LHS, S->getType());
-  return LHS;
-}
-
-Value *SCEVExpander::visitSMinExpr(const SCEVSMinExpr *S) {
-  Value *LHS = expand(S->getOperand(S->getNumOperands() - 1));
-  Type *Ty = LHS->getType();
-  for (int i = S->getNumOperands() - 2; i >= 0; --i) {
-    // In the case of mixed integer and pointer types, do the
-    // rest of the comparisons as integer.
-    Type *OpTy = S->getOperand(i)->getType();
-    if (OpTy->isIntegerTy() != Ty->isIntegerTy()) {
-      Ty = SE.getEffectiveSCEVType(Ty);
-      LHS = InsertNoopCastOfTo(LHS, Ty);
-    }
-    Value *RHS = expandCodeFor(S->getOperand(i), Ty);
-    Value *ICmp = Builder.CreateICmpSLT(LHS, RHS);
-    rememberInstruction(ICmp);
-    Value *Sel = Builder.CreateSelect(ICmp, LHS, RHS, "smin");
-    rememberInstruction(Sel);
-    LHS = Sel;
-  }
-  // In the case of mixed integer and pointer types, cast the
-  // final result back to the pointer type.
-  if (LHS->getType() != S->getType())
-    LHS = InsertNoopCastOfTo(LHS, S->getType());
-  return LHS;
-}
-
-Value *SCEVExpander::visitUMinExpr(const SCEVUMinExpr *S) {
-  Value *LHS = expand(S->getOperand(S->getNumOperands() - 1));
-  Type *Ty = LHS->getType();
-  for (int i = S->getNumOperands() - 2; i >= 0; --i) {
-    // In the case of mixed integer and pointer types, do the
-    // rest of the comparisons as integer.
-    Type *OpTy = S->getOperand(i)->getType();
-    if (OpTy->isIntegerTy() != Ty->isIntegerTy()) {
-      Ty = SE.getEffectiveSCEVType(Ty);
-      LHS = InsertNoopCastOfTo(LHS, Ty);
-    }
-    Value *RHS = expandCodeFor(S->getOperand(i), Ty);
-    Value *ICmp = Builder.CreateICmpULT(LHS, RHS);
-    rememberInstruction(ICmp);
-    Value *Sel = Builder.CreateSelect(ICmp, LHS, RHS, "umin");
-    rememberInstruction(Sel);
-    LHS = Sel;
-  }
-  // In the case of mixed integer and pointer types, cast the
-  // final result back to the pointer type.
-  if (LHS->getType() != S->getType())
-    LHS = InsertNoopCastOfTo(LHS, S->getType());
-  return LHS;
-}
-
-Value *SCEVExpander::expandCodeFor(const SCEV *SH, Type *Ty,
-                                   Instruction *IP) {
-  setInsertPoint(IP);
-  return expandCodeFor(SH, Ty);
-}
-
-Value *SCEVExpander::expandCodeFor(const SCEV *SH, Type *Ty) {
-  // Expand the code for this SCEV.
-  Value *V = expand(SH);
-  if (Ty) {
-    assert(SE.getTypeSizeInBits(Ty) == SE.getTypeSizeInBits(SH->getType()) &&
-           "non-trivial casts should be done with the SCEVs directly!");
-    V = InsertNoopCastOfTo(V, Ty);
-  }
-  return V;
-}
-
-ScalarEvolution::ValueOffsetPair
-SCEVExpander::FindValueInExprValueMap(const SCEV *S,
-                                      const Instruction *InsertPt) {
-  SetVector<ScalarEvolution::ValueOffsetPair> *Set = SE.getSCEVValues(S);
-  // If the expansion is not in CanonicalMode, and the SCEV contains any
-  // sub scAddRecExpr type SCEV, it is required to expand the SCEV literally.
-  if (CanonicalMode || !SE.containsAddRecurrence(S)) {
-    // If S is scConstant, it may be worse to reuse an existing Value.
-    if (S->getSCEVType() != scConstant && Set) {
-      // Choose a Value from the set which dominates the insertPt.
-      // insertPt should be inside the Value's parent loop so as not to break
-      // the LCSSA form.
-      for (auto const &VOPair : *Set) {
-        Value *V = VOPair.first;
-        ConstantInt *Offset = VOPair.second;
-        Instruction *EntInst = nullptr;
-        if (V && isa<Instruction>(V) && (EntInst = cast<Instruction>(V)) &&
-            S->getType() == V->getType() &&
-            EntInst->getFunction() == InsertPt->getFunction() &&
-            SE.DT.dominates(EntInst, InsertPt) &&
-            (SE.LI.getLoopFor(EntInst->getParent()) == nullptr ||
-             SE.LI.getLoopFor(EntInst->getParent())->contains(InsertPt)))
-          return {V, Offset};
-      }
-    }
-  }
-  return {nullptr, nullptr};
-}
-
-// The expansion of SCEV will either reuse a previous Value in ExprValueMap,
-// or expand the SCEV literally. Specifically, if the expansion is in LSRMode,
-// and the SCEV contains any sub scAddRecExpr type SCEV, it will be expanded
-// literally, to prevent LSR's transformed SCEV from being reverted. Otherwise,
-// the expansion will try to reuse Value from ExprValueMap, and only when it
-// fails, expand the SCEV literally.
-Value *SCEVExpander::expand(const SCEV *S) {
-  // Compute an insertion point for this SCEV object. Hoist the instructions
-  // as far out in the loop nest as possible.
-  Instruction *InsertPt = &*Builder.GetInsertPoint();
-
-  // We can move insertion point only if there is no div or rem operations
-  // otherwise we are risky to move it over the check for zero denominator.
-  auto SafeToHoist = [](const SCEV *S) {
-    return !SCEVExprContains(S, [](const SCEV *S) {
-              if (const auto *D = dyn_cast<SCEVUDivExpr>(S)) {
-                if (const auto *SC = dyn_cast<SCEVConstant>(D->getRHS()))
-                  // Division by non-zero constants can be hoisted.
-                  return SC->getValue()->isZero();
-                // All other divisions should not be moved as they may be
-                // divisions by zero and should be kept within the
-                // conditions of the surrounding loops that guard their
-                // execution (see PR35406).
-                return true;
-              }
-              return false;
-            });
-  };
-  if (SafeToHoist(S)) {
-    for (Loop *L = SE.LI.getLoopFor(Builder.GetInsertBlock());;
-         L = L->getParentLoop()) {
-      if (SE.isLoopInvariant(S, L)) {
-        if (!L) break;
-        if (BasicBlock *Preheader = L->getLoopPreheader())
-          InsertPt = Preheader->getTerminator();
-        else
-          // LSR sets the insertion point for AddRec start/step values to the
-          // block start to simplify value reuse, even though it's an invalid
-          // position. SCEVExpander must correct for this in all cases.
-          InsertPt = &*L->getHeader()->getFirstInsertionPt();
-      } else {
-        // If the SCEV is computable at this level, insert it into the header
-        // after the PHIs (and after any other instructions that we've inserted
-        // there) so that it is guaranteed to dominate any user inside the loop.
-        if (L && SE.hasComputableLoopEvolution(S, L) && !PostIncLoops.count(L))
-          InsertPt = &*L->getHeader()->getFirstInsertionPt();
-        while (InsertPt->getIterator() != Builder.GetInsertPoint() &&
-               (isInsertedInstruction(InsertPt) ||
-                isa<DbgInfoIntrinsic>(InsertPt)))
-          InsertPt = &*std::next(InsertPt->getIterator());
-        break;
-      }
-    }
-  }
-
-  // IndVarSimplify sometimes sets the insertion point at the block start, even
-  // when there are PHIs at that point.  We must correct for this.
-  if (isa<PHINode>(*InsertPt))
-    InsertPt = &*InsertPt->getParent()->getFirstInsertionPt();
-
-  // Check to see if we already expanded this here.
-  auto I = InsertedExpressions.find(std::make_pair(S, InsertPt));
-  if (I != InsertedExpressions.end())
-    return I->second;
-
-  SCEVInsertPointGuard Guard(Builder, this);
-  Builder.SetInsertPoint(InsertPt);
-
-  // Expand the expression into instructions.
-  ScalarEvolution::ValueOffsetPair VO = FindValueInExprValueMap(S, InsertPt);
-  Value *V = VO.first;
-
-  if (!V)
-    V = visit(S);
-  else if (VO.second) {
-    if (PointerType *Vty = dyn_cast<PointerType>(V->getType())) {
-      Type *Ety = Vty->getPointerElementType();
-      int64_t Offset = VO.second->getSExtValue();
-      int64_t ESize = SE.getTypeSizeInBits(Ety);
-      if ((Offset * 8) % ESize == 0) {
-        ConstantInt *Idx =
-            ConstantInt::getSigned(VO.second->getType(), -(Offset * 8) / ESize);
-        V = Builder.CreateGEP(Ety, V, Idx, "scevgep");
-      } else {
-        ConstantInt *Idx =
-            ConstantInt::getSigned(VO.second->getType(), -Offset);
-        unsigned AS = Vty->getAddressSpace();
-        V = Builder.CreateBitCast(V, Type::getInt8PtrTy(SE.getContext(), AS));
-        V = Builder.CreateGEP(Type::getInt8Ty(SE.getContext()), V, Idx,
-                              "uglygep");
-        V = Builder.CreateBitCast(V, Vty);
-      }
-    } else {
-      V = Builder.CreateSub(V, VO.second);
-    }
-  }
-  // Remember the expanded value for this SCEV at this location.
-  //
-  // This is independent of PostIncLoops. The mapped value simply materializes
-  // the expression at this insertion point. If the mapped value happened to be
-  // a postinc expansion, it could be reused by a non-postinc user, but only if
-  // its insertion point was already at the head of the loop.
-  InsertedExpressions[std::make_pair(S, InsertPt)] = V;
-  return V;
-}
-
-void SCEVExpander::rememberInstruction(Value *I) {
-  if (!PostIncLoops.empty())
-    InsertedPostIncValues.insert(I);
-  else
-    InsertedValues.insert(I);
-}
-
-/// getOrInsertCanonicalInductionVariable - This method returns the
-/// canonical induction variable of the specified type for the specified
-/// loop (inserting one if there is none).  A canonical induction variable
-/// starts at zero and steps by one on each iteration.
-PHINode *
-SCEVExpander::getOrInsertCanonicalInductionVariable(const Loop *L,
-                                                    Type *Ty) {
-  assert(Ty->isIntegerTy() && "Can only insert integer induction variables!");
-
-  // Build a SCEV for {0,+,1}<L>.
-  // Conservatively use FlagAnyWrap for now.
-  const SCEV *H = SE.getAddRecExpr(SE.getConstant(Ty, 0),
-                                   SE.getConstant(Ty, 1), L, SCEV::FlagAnyWrap);
-
-  // Emit code for it.
-  SCEVInsertPointGuard Guard(Builder, this);
-  PHINode *V =
-      cast<PHINode>(expandCodeFor(H, nullptr, &L->getHeader()->front()));
-
-  return V;
-}
-
-/// replaceCongruentIVs - Check for congruent phis in this loop header and
-/// replace them with their most canonical representative. Return the number of
-/// phis eliminated.
-///
-/// This does not depend on any SCEVExpander state but should be used in
-/// the same context that SCEVExpander is used.
-unsigned
-SCEVExpander::replaceCongruentIVs(Loop *L, const DominatorTree *DT,
-                                  SmallVectorImpl<WeakTrackingVH> &DeadInsts,
-                                  const TargetTransformInfo *TTI) {
-  // Find integer phis in order of increasing width.
-  SmallVector<PHINode*, 8> Phis;
-  for (PHINode &PN : L->getHeader()->phis())
-    Phis.push_back(&PN);
-
-  if (TTI)
-    llvm::sort(Phis, [](Value *LHS, Value *RHS) {
-      // Put pointers at the back and make sure pointer < pointer = false.
-      if (!LHS->getType()->isIntegerTy() || !RHS->getType()->isIntegerTy())
-        return RHS->getType()->isIntegerTy() && !LHS->getType()->isIntegerTy();
-      return RHS->getType()->getPrimitiveSizeInBits() <
-             LHS->getType()->getPrimitiveSizeInBits();
-    });
-
-  unsigned NumElim = 0;
-  DenseMap<const SCEV *, PHINode *> ExprToIVMap;
-  // Process phis from wide to narrow. Map wide phis to their truncation
-  // so narrow phis can reuse them.
-  for (PHINode *Phi : Phis) {
-    auto SimplifyPHINode = [&](PHINode *PN) -> Value * {
-      if (Value *V = SimplifyInstruction(PN, {DL, &SE.TLI, &SE.DT, &SE.AC}))
-        return V;
-      if (!SE.isSCEVable(PN->getType()))
-        return nullptr;
-      auto *Const = dyn_cast<SCEVConstant>(SE.getSCEV(PN));
-      if (!Const)
-        return nullptr;
-      return Const->getValue();
-    };
-
-    // Fold constant phis. They may be congruent to other constant phis and
-    // would confuse the logic below that expects proper IVs.
-    if (Value *V = SimplifyPHINode(Phi)) {
-      if (V->getType() != Phi->getType())
-        continue;
-      Phi->replaceAllUsesWith(V);
-      DeadInsts.emplace_back(Phi);
-      ++NumElim;
-      DEBUG_WITH_TYPE(DebugType, dbgs()
-                      << "INDVARS: Eliminated constant iv: " << *Phi << '\n');
-      continue;
-    }
-
-    if (!SE.isSCEVable(Phi->getType()))
-      continue;
-
-    PHINode *&OrigPhiRef = ExprToIVMap[SE.getSCEV(Phi)];
-    if (!OrigPhiRef) {
-      OrigPhiRef = Phi;
-      if (Phi->getType()->isIntegerTy() && TTI &&
-          TTI->isTruncateFree(Phi->getType(), Phis.back()->getType())) {
-        // This phi can be freely truncated to the narrowest phi type. Map the
-        // truncated expression to it so it will be reused for narrow types.
-        const SCEV *TruncExpr =
-          SE.getTruncateExpr(SE.getSCEV(Phi), Phis.back()->getType());
-        ExprToIVMap[TruncExpr] = Phi;
-      }
-      continue;
-    }
-
-    // Replacing a pointer phi with an integer phi or vice-versa doesn't make
-    // sense.
-    if (OrigPhiRef->getType()->isPointerTy() != Phi->getType()->isPointerTy())
-      continue;
-
-    if (BasicBlock *LatchBlock = L->getLoopLatch()) {
-      Instruction *OrigInc = dyn_cast<Instruction>(
-          OrigPhiRef->getIncomingValueForBlock(LatchBlock));
-      Instruction *IsomorphicInc =
-          dyn_cast<Instruction>(Phi->getIncomingValueForBlock(LatchBlock));
-
-      if (OrigInc && IsomorphicInc) {
-        // If this phi has the same width but is more canonical, replace the
-        // original with it. As part of the "more canonical" determination,
-        // respect a prior decision to use an IV chain.
-        if (OrigPhiRef->getType() == Phi->getType() &&
-            !(ChainedPhis.count(Phi) ||
-              isExpandedAddRecExprPHI(OrigPhiRef, OrigInc, L)) &&
-            (ChainedPhis.count(Phi) ||
-             isExpandedAddRecExprPHI(Phi, IsomorphicInc, L))) {
-          std::swap(OrigPhiRef, Phi);
-          std::swap(OrigInc, IsomorphicInc);
-        }
-        // Replacing the congruent phi is sufficient because acyclic
-        // redundancy elimination, CSE/GVN, should handle the
-        // rest. However, once SCEV proves that a phi is congruent,
-        // it's often the head of an IV user cycle that is isomorphic
-        // with the original phi. It's worth eagerly cleaning up the
-        // common case of a single IV increment so that DeleteDeadPHIs
-        // can remove cycles that had postinc uses.
-        const SCEV *TruncExpr =
-            SE.getTruncateOrNoop(SE.getSCEV(OrigInc), IsomorphicInc->getType());
-        if (OrigInc != IsomorphicInc &&
-            TruncExpr == SE.getSCEV(IsomorphicInc) &&
-            SE.LI.replacementPreservesLCSSAForm(IsomorphicInc, OrigInc) &&
-            hoistIVInc(OrigInc, IsomorphicInc)) {
-          DEBUG_WITH_TYPE(DebugType,
-                          dbgs() << "INDVARS: Eliminated congruent iv.inc: "
-                                 << *IsomorphicInc << '\n');
-          Value *NewInc = OrigInc;
-          if (OrigInc->getType() != IsomorphicInc->getType()) {
-            Instruction *IP = nullptr;
-            if (PHINode *PN = dyn_cast<PHINode>(OrigInc))
-              IP = &*PN->getParent()->getFirstInsertionPt();
-            else
-              IP = OrigInc->getNextNode();
-
-            IRBuilder<> Builder(IP);
-            Builder.SetCurrentDebugLocation(IsomorphicInc->getDebugLoc());
-            NewInc = Builder.CreateTruncOrBitCast(
-                OrigInc, IsomorphicInc->getType(), IVName);
-          }
-          IsomorphicInc->replaceAllUsesWith(NewInc);
-          DeadInsts.emplace_back(IsomorphicInc);
-        }
-      }
-    }
-    DEBUG_WITH_TYPE(DebugType, dbgs() << "INDVARS: Eliminated congruent iv: "
-                                      << *Phi << '\n');
-    ++NumElim;
-    Value *NewIV = OrigPhiRef;
-    if (OrigPhiRef->getType() != Phi->getType()) {
-      IRBuilder<> Builder(&*L->getHeader()->getFirstInsertionPt());
-      Builder.SetCurrentDebugLocation(Phi->getDebugLoc());
-      NewIV = Builder.CreateTruncOrBitCast(OrigPhiRef, Phi->getType(), IVName);
-    }
-    Phi->replaceAllUsesWith(NewIV);
-    DeadInsts.emplace_back(Phi);
-  }
-  return NumElim;
-}
-
-Value *SCEVExpander::getExactExistingExpansion(const SCEV *S,
-                                               const Instruction *At, Loop *L) {
-  Optional<ScalarEvolution::ValueOffsetPair> VO =
-      getRelatedExistingExpansion(S, At, L);
-  if (VO && VO.getValue().second == nullptr)
-    return VO.getValue().first;
-  return nullptr;
-}
-
-Optional<ScalarEvolution::ValueOffsetPair>
-SCEVExpander::getRelatedExistingExpansion(const SCEV *S, const Instruction *At,
-                                          Loop *L) {
-  using namespace llvm::PatternMatch;
-
-  SmallVector<BasicBlock *, 4> ExitingBlocks;
-  L->getExitingBlocks(ExitingBlocks);
-
-  // Look for suitable value in simple conditions at the loop exits.
-  for (BasicBlock *BB : ExitingBlocks) {
-    ICmpInst::Predicate Pred;
-    Instruction *LHS, *RHS;
-
-    if (!match(BB->getTerminator(),
-               m_Br(m_ICmp(Pred, m_Instruction(LHS), m_Instruction(RHS)),
-                    m_BasicBlock(), m_BasicBlock())))
-      continue;
-
-    if (SE.getSCEV(LHS) == S && SE.DT.dominates(LHS, At))
-      return ScalarEvolution::ValueOffsetPair(LHS, nullptr);
-
-    if (SE.getSCEV(RHS) == S && SE.DT.dominates(RHS, At))
-      return ScalarEvolution::ValueOffsetPair(RHS, nullptr);
-  }
-
-  // Use expand's logic which is used for reusing a previous Value in
-  // ExprValueMap.
-  ScalarEvolution::ValueOffsetPair VO = FindValueInExprValueMap(S, At);
-  if (VO.first)
-    return VO;
-
-  // There is potential to make this significantly smarter, but this simple
-  // heuristic already gets some interesting cases.
-
-  // Can not find suitable value.
-  return None;
-}
-
-bool SCEVExpander::isHighCostExpansionHelper(
-    const SCEV *S, Loop *L, const Instruction *At,
-    SmallPtrSetImpl<const SCEV *> &Processed) {
-
-  // If we can find an existing value for this scev available at the point "At"
-  // then consider the expression cheap.
-  if (At && getRelatedExistingExpansion(S, At, L))
-    return false;
-
-  // Zero/One operand expressions
-  switch (S->getSCEVType()) {
-  case scUnknown:
-  case scConstant:
-    return false;
-  case scTruncate:
-    return isHighCostExpansionHelper(cast<SCEVTruncateExpr>(S)->getOperand(),
-                                     L, At, Processed);
-  case scZeroExtend:
-    return isHighCostExpansionHelper(cast<SCEVZeroExtendExpr>(S)->getOperand(),
-                                     L, At, Processed);
-  case scSignExtend:
-    return isHighCostExpansionHelper(cast<SCEVSignExtendExpr>(S)->getOperand(),
-                                     L, At, Processed);
-  }
-
-  if (!Processed.insert(S).second)
-    return false;
-
-  if (auto *UDivExpr = dyn_cast<SCEVUDivExpr>(S)) {
-    // If the divisor is a power of two and the SCEV type fits in a native
-    // integer (and the LHS not expensive), consider the division cheap
-    // irrespective of whether it occurs in the user code since it can be
-    // lowered into a right shift.
-    if (auto *SC = dyn_cast<SCEVConstant>(UDivExpr->getRHS()))
-      if (SC->getAPInt().isPowerOf2()) {
-        if (isHighCostExpansionHelper(UDivExpr->getLHS(), L, At, Processed))
-          return true;
-        const DataLayout &DL =
-            L->getHeader()->getParent()->getParent()->getDataLayout();
-        unsigned Width = cast<IntegerType>(UDivExpr->getType())->getBitWidth();
-        return DL.isIllegalInteger(Width);
-      }
-
-    // UDivExpr is very likely a UDiv that ScalarEvolution's HowFarToZero or
-    // HowManyLessThans produced to compute a precise expression, rather than a
-    // UDiv from the user's code. If we can't find a UDiv in the code with some
-    // simple searching, assume the former consider UDivExpr expensive to
-    // compute.
-    BasicBlock *ExitingBB = L->getExitingBlock();
-    if (!ExitingBB)
-      return true;
-
-    // At the beginning of this function we already tried to find existing value
-    // for plain 'S'. Now try to lookup 'S + 1' since it is common pattern
-    // involving division. This is just a simple search heuristic.
-    if (!At)
-      At = &ExitingBB->back();
-    if (!getRelatedExistingExpansion(
-            SE.getAddExpr(S, SE.getConstant(S->getType(), 1)), At, L))
-      return true;
-  }
-
-  // HowManyLessThans uses a Max expression whenever the loop is not guarded by
-  // the exit condition.
-  if (isa<SCEVMinMaxExpr>(S))
-    return true;
-
-  // Recurse past nary expressions, which commonly occur in the
-  // BackedgeTakenCount. They may already exist in program code, and if not,
-  // they are not too expensive rematerialize.
-  if (const SCEVNAryExpr *NAry = dyn_cast<SCEVNAryExpr>(S)) {
-    for (auto *Op : NAry->operands())
-      if (isHighCostExpansionHelper(Op, L, At, Processed))
-        return true;
-  }
-
-  // If we haven't recognized an expensive SCEV pattern, assume it's an
-  // expression produced by program code.
-  return false;
-}
-
-Value *SCEVExpander::expandCodeForPredicate(const SCEVPredicate *Pred,
-                                            Instruction *IP) {
-  assert(IP);
-  switch (Pred->getKind()) {
-  case SCEVPredicate::P_Union:
-    return expandUnionPredicate(cast<SCEVUnionPredicate>(Pred), IP);
-  case SCEVPredicate::P_Equal:
-    return expandEqualPredicate(cast<SCEVEqualPredicate>(Pred), IP);
-  case SCEVPredicate::P_Wrap: {
-    auto *AddRecPred = cast<SCEVWrapPredicate>(Pred);
-    return expandWrapPredicate(AddRecPred, IP);
-  }
-  }
-  llvm_unreachable("Unknown SCEV predicate type");
-}
-
-Value *SCEVExpander::expandEqualPredicate(const SCEVEqualPredicate *Pred,
-                                          Instruction *IP) {
-  Value *Expr0 = expandCodeFor(Pred->getLHS(), Pred->getLHS()->getType(), IP);
-  Value *Expr1 = expandCodeFor(Pred->getRHS(), Pred->getRHS()->getType(), IP);
-
-  Builder.SetInsertPoint(IP);
-  auto *I = Builder.CreateICmpNE(Expr0, Expr1, "ident.check");
-  return I;
-}
-
-Value *SCEVExpander::generateOverflowCheck(const SCEVAddRecExpr *AR,
-                                           Instruction *Loc, bool Signed) {
-  assert(AR->isAffine() && "Cannot generate RT check for "
-                           "non-affine expression");
-
-  SCEVUnionPredicate Pred;
-  const SCEV *ExitCount =
-      SE.getPredicatedBackedgeTakenCount(AR->getLoop(), Pred);
-
-  assert(ExitCount != SE.getCouldNotCompute() && "Invalid loop count");
-
-  const SCEV *Step = AR->getStepRecurrence(SE);
-  const SCEV *Start = AR->getStart();
-
-  Type *ARTy = AR->getType();
-  unsigned SrcBits = SE.getTypeSizeInBits(ExitCount->getType());
-  unsigned DstBits = SE.getTypeSizeInBits(ARTy);
-
-  // The expression {Start,+,Step} has nusw/nssw if
-  //   Step < 0, Start - |Step| * Backedge <= Start
-  //   Step >= 0, Start + |Step| * Backedge > Start
-  // and |Step| * Backedge doesn't unsigned overflow.
-
-  IntegerType *CountTy = IntegerType::get(Loc->getContext(), SrcBits);
-  Builder.SetInsertPoint(Loc);
-  Value *TripCountVal = expandCodeFor(ExitCount, CountTy, Loc);
-
-  IntegerType *Ty =
-      IntegerType::get(Loc->getContext(), SE.getTypeSizeInBits(ARTy));
-  Type *ARExpandTy = DL.isNonIntegralPointerType(ARTy) ? ARTy : Ty;
-
-  Value *StepValue = expandCodeFor(Step, Ty, Loc);
-  Value *NegStepValue = expandCodeFor(SE.getNegativeSCEV(Step), Ty, Loc);
-  Value *StartValue = expandCodeFor(Start, ARExpandTy, Loc);
-
-  ConstantInt *Zero =
-      ConstantInt::get(Loc->getContext(), APInt::getNullValue(DstBits));
-
-  Builder.SetInsertPoint(Loc);
-  // Compute |Step|
-  Value *StepCompare = Builder.CreateICmp(ICmpInst::ICMP_SLT, StepValue, Zero);
-  Value *AbsStep = Builder.CreateSelect(StepCompare, NegStepValue, StepValue);
-
-  // Get the backedge taken count and truncate or extended to the AR type.
-  Value *TruncTripCount = Builder.CreateZExtOrTrunc(TripCountVal, Ty);
-  auto *MulF = Intrinsic::getDeclaration(Loc->getModule(),
-                                         Intrinsic::umul_with_overflow, Ty);
-
-  // Compute |Step| * Backedge
-  CallInst *Mul = Builder.CreateCall(MulF, {AbsStep, TruncTripCount}, "mul");
-  Value *MulV = Builder.CreateExtractValue(Mul, 0, "mul.result");
-  Value *OfMul = Builder.CreateExtractValue(Mul, 1, "mul.overflow");
-
-  // Compute:
-  //   Start + |Step| * Backedge < Start
-  //   Start - |Step| * Backedge > Start
-  Value *Add = nullptr, *Sub = nullptr;
-  if (PointerType *ARPtrTy = dyn_cast<PointerType>(ARExpandTy)) {
-    const SCEV *MulS = SE.getSCEV(MulV);
-    const SCEV *NegMulS = SE.getNegativeSCEV(MulS);
-    Add = Builder.CreateBitCast(expandAddToGEP(MulS, ARPtrTy, Ty, StartValue),
-                                ARPtrTy);
-    Sub = Builder.CreateBitCast(
-        expandAddToGEP(NegMulS, ARPtrTy, Ty, StartValue), ARPtrTy);
-  } else {
-    Add = Builder.CreateAdd(StartValue, MulV);
-    Sub = Builder.CreateSub(StartValue, MulV);
-  }
-
-  Value *EndCompareGT = Builder.CreateICmp(
-      Signed ? ICmpInst::ICMP_SGT : ICmpInst::ICMP_UGT, Sub, StartValue);
-
-  Value *EndCompareLT = Builder.CreateICmp(
-      Signed ? ICmpInst::ICMP_SLT : ICmpInst::ICMP_ULT, Add, StartValue);
-
-  // Select the answer based on the sign of Step.
-  Value *EndCheck =
-      Builder.CreateSelect(StepCompare, EndCompareGT, EndCompareLT);
-
-  // If the backedge taken count type is larger than the AR type,
-  // check that we don't drop any bits by truncating it. If we are
-  // dropping bits, then we have overflow (unless the step is zero).
-  if (SE.getTypeSizeInBits(CountTy) > SE.getTypeSizeInBits(Ty)) {
-    auto MaxVal = APInt::getMaxValue(DstBits).zext(SrcBits);
-    auto *BackedgeCheck =
-        Builder.CreateICmp(ICmpInst::ICMP_UGT, TripCountVal,
-                           ConstantInt::get(Loc->getContext(), MaxVal));
-    BackedgeCheck = Builder.CreateAnd(
-        BackedgeCheck, Builder.CreateICmp(ICmpInst::ICMP_NE, StepValue, Zero));
-
-    EndCheck = Builder.CreateOr(EndCheck, BackedgeCheck);
-  }
-
-  EndCheck = Builder.CreateOr(EndCheck, OfMul);
-  return EndCheck;
-}
-
-Value *SCEVExpander::expandWrapPredicate(const SCEVWrapPredicate *Pred,
-                                         Instruction *IP) {
-  const auto *A = cast<SCEVAddRecExpr>(Pred->getExpr());
-  Value *NSSWCheck = nullptr, *NUSWCheck = nullptr;
-
-  // Add a check for NUSW
-  if (Pred->getFlags() & SCEVWrapPredicate::IncrementNUSW)
-    NUSWCheck = generateOverflowCheck(A, IP, false);
-
-  // Add a check for NSSW
-  if (Pred->getFlags() & SCEVWrapPredicate::IncrementNSSW)
-    NSSWCheck = generateOverflowCheck(A, IP, true);
-
-  if (NUSWCheck && NSSWCheck)
-    return Builder.CreateOr(NUSWCheck, NSSWCheck);
-
-  if (NUSWCheck)
-    return NUSWCheck;
-
-  if (NSSWCheck)
-    return NSSWCheck;
-
-  return ConstantInt::getFalse(IP->getContext());
-}
-
-Value *SCEVExpander::expandUnionPredicate(const SCEVUnionPredicate *Union,
-                                          Instruction *IP) {
-  auto *BoolType = IntegerType::get(IP->getContext(), 1);
-  Value *Check = ConstantInt::getNullValue(BoolType);
-
-  // Loop over all checks in this set.
-  for (auto Pred : Union->getPredicates()) {
-    auto *NextCheck = expandCodeForPredicate(Pred, IP);
-    Builder.SetInsertPoint(IP);
-    Check = Builder.CreateOr(Check, NextCheck);
-  }
-
-  return Check;
-}
-
-namespace {
-// Search for a SCEV subexpression that is not safe to expand.  Any expression
-// that may expand to a !isSafeToSpeculativelyExecute value is unsafe, namely
-// UDiv expressions. We don't know if the UDiv is derived from an IR divide
-// instruction, but the important thing is that we prove the denominator is
-// nonzero before expansion.
-//
-// IVUsers already checks that IV-derived expressions are safe. So this check is
-// only needed when the expression includes some subexpression that is not IV
-// derived.
-//
-// Currently, we only allow division by a nonzero constant here. If this is
-// inadequate, we could easily allow division by SCEVUnknown by using
-// ValueTracking to check isKnownNonZero().
-//
-// We cannot generally expand recurrences unless the step dominates the loop
-// header. The expander handles the special case of affine recurrences by
-// scaling the recurrence outside the loop, but this technique isn't generally
-// applicable. Expanding a nested recurrence outside a loop requires computing
-// binomial coefficients. This could be done, but the recurrence has to be in a
-// perfectly reduced form, which can't be guaranteed.
-struct SCEVFindUnsafe {
-  ScalarEvolution &SE;
-  bool IsUnsafe;
-
-  SCEVFindUnsafe(ScalarEvolution &se): SE(se), IsUnsafe(false) {}
-
-  bool follow(const SCEV *S) {
-    if (const SCEVUDivExpr *D = dyn_cast<SCEVUDivExpr>(S)) {
-      const SCEVConstant *SC = dyn_cast<SCEVConstant>(D->getRHS());
-      if (!SC || SC->getValue()->isZero()) {
-        IsUnsafe = true;
-        return false;
-      }
-    }
-    if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S)) {
-      const SCEV *Step = AR->getStepRecurrence(SE);
-      if (!AR->isAffine() && !SE.dominates(Step, AR->getLoop()->getHeader())) {
-        IsUnsafe = true;
-        return false;
-      }
-    }
-    return true;
-  }
-  bool isDone() const { return IsUnsafe; }
-};
-}
-
-namespace llvm {
-bool isSafeToExpand(const SCEV *S, ScalarEvolution &SE) {
-  SCEVFindUnsafe Search(SE);
-  visitAll(S, Search);
-  return !Search.IsUnsafe;
-}
-
-bool isSafeToExpandAt(const SCEV *S, const Instruction *InsertionPoint,
-                      ScalarEvolution &SE) {
-  if (!isSafeToExpand(S, SE))
-    return false;
-  // We have to prove that the expanded site of S dominates InsertionPoint.
-  // This is easy when not in the same block, but hard when S is an instruction
-  // to be expanded somewhere inside the same block as our insertion point.
-  // What we really need here is something analogous to an OrderedBasicBlock,
-  // but for the moment, we paper over the problem by handling two common and
-  // cheap to check cases.
-  if (SE.properlyDominates(S, InsertionPoint->getParent()))
-    return true;
-  if (SE.dominates(S, InsertionPoint->getParent())) {
-    if (InsertionPoint->getParent()->getTerminator() == InsertionPoint)
-      return true;
-    if (const SCEVUnknown *U = dyn_cast<SCEVUnknown>(S))
-      for (const Value *V : InsertionPoint->operand_values())
-        if (V == U->getValue())
-          return true;
-  }
-  return false;
-}
-}
diff --git a/gnu/llvm/llvm/lib/CodeGen/AntiDepBreaker.h b/gnu/llvm/llvm/lib/CodeGen/AntiDepBreaker.h
deleted file mode 100644 (file)
index b111485..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-//===- llvm/CodeGen/AntiDepBreaker.h - Anti-Dependence Breaking -*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This file implements the AntiDepBreaker class, which implements
-// anti-dependence breaking heuristics for post-register-allocation scheduling.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_LIB_CODEGEN_ANTIDEPBREAKER_H
-#define LLVM_LIB_CODEGEN_ANTIDEPBREAKER_H
-
-#include "llvm/ADT/iterator_range.h"
-#include "llvm/CodeGen/MachineBasicBlock.h"
-#include "llvm/CodeGen/MachineInstr.h"
-#include "llvm/CodeGen/MachineOperand.h"
-#include "llvm/CodeGen/ScheduleDAG.h"
-#include "llvm/Support/Compiler.h"
-#include <cassert>
-#include <utility>
-#include <vector>
-
-namespace llvm {
-
-/// This class works in conjunction with the post-RA scheduler to rename
-/// registers to break register anti-dependencies (WAR hazards).
-class LLVM_LIBRARY_VISIBILITY AntiDepBreaker {
-public:
-  using DbgValueVector =
-      std::vector<std::pair<MachineInstr *, MachineInstr *>>;
-
-  virtual ~AntiDepBreaker();
-
-  /// Initialize anti-dep breaking for a new basic block.
-  virtual void StartBlock(MachineBasicBlock *BB) = 0;
-
-  /// Identifiy anti-dependencies within a basic-block region and break them by
-  /// renaming registers. Return the number of anti-dependencies broken.
-  virtual unsigned BreakAntiDependencies(const std::vector<SUnit> &SUnits,
-                                         MachineBasicBlock::iterator Begin,
-                                         MachineBasicBlock::iterator End,
-                                         unsigned InsertPosIndex,
-                                         DbgValueVector &DbgValues) = 0;
-
-  /// Update liveness information to account for the current
-  /// instruction, which will not be scheduled.
-  virtual void Observe(MachineInstr &MI, unsigned Count,
-                       unsigned InsertPosIndex) = 0;
-
-  /// Finish anti-dep breaking for a basic block.
-  virtual void FinishBlock() = 0;
-
-  /// Update DBG_VALUE if dependency breaker is updating
-  /// other machine instruction to use NewReg.
-  void UpdateDbgValue(MachineInstr &MI, unsigned OldReg, unsigned NewReg) {
-    assert(MI.isDebugValue() && "MI is not DBG_VALUE!");
-    if (MI.getOperand(0).isReg() && MI.getOperand(0).getReg() == OldReg)
-      MI.getOperand(0).setReg(NewReg);
-  }
-
-  /// Update all DBG_VALUE instructions that may be affected by the dependency
-  /// breaker's update of ParentMI to use NewReg.
-  void UpdateDbgValues(const DbgValueVector &DbgValues, MachineInstr *ParentMI,
-                       unsigned OldReg, unsigned NewReg) {
-    // The following code is dependent on the order in which the DbgValues are
-    // constructed in ScheduleDAGInstrs::buildSchedGraph.
-    MachineInstr *PrevDbgMI = nullptr;
-    for (const auto &DV : make_range(DbgValues.crbegin(), DbgValues.crend())) {
-      MachineInstr *PrevMI = DV.second;
-      if ((PrevMI == ParentMI) || (PrevMI == PrevDbgMI)) {
-        MachineInstr *DbgMI = DV.first;
-        UpdateDbgValue(*DbgMI, OldReg, NewReg);
-        PrevDbgMI = DbgMI;
-      } else if (PrevDbgMI) {
-        break; // If no match and already found a DBG_VALUE, we're done.
-      }
-    }
-  }
-};
-
-} // end namespace llvm
-
-#endif // LLVM_LIB_CODEGEN_ANTIDEPBREAKER_H
index c7eb025..61a674a 100644 (file)
@@ -687,7 +687,7 @@ void AsmPrinter::emitFunctionHeader() {
 
   emitLinkage(&F, CurrentFnSym);
   if (MAI->hasFunctionAlignment())
-    emitAlignment(MF->getAlignment(), &F);
+    emitTrapAlignment(MF->getAlignment(), &F);
 
   if (MAI->hasDotTypeDotSizeDirective())
     OutStreamer->emitSymbolAttribute(CurrentFnSym, MCSA_ELF_TypeFunction);
@@ -2255,6 +2255,30 @@ void AsmPrinter::emitAlignment(Align Alignment, const GlobalObject *GV) const {
     OutStreamer->emitValueToAlignment(Alignment.value());
 }
 
+//===----------------------------------------------------------------------===//
+/// emitTrapAlignment - Emit an alignment directive to the specified power of
+/// two boundary, but call emitTrapToAlignment to fill with Trap instructions
+/// if the Target implements emitTrapToAlignment.
+void AsmPrinter::emitTrapAlignment(Align Alignment, const GlobalObject *GV) const {
+  if (GV)
+    Alignment = getGVAlignment(GV, GV->getParent()->getDataLayout(), Alignment);
+
+  if (Alignment == Align(1)) return;   // 1-byte aligned: no need to emit alignment.
+
+  emitTrapToAlignment(Alignment);
+}
+
+//===----------------------------------------------------------------------===//
+/// emitTrapToAlignment - Emit an alignment directive to the specified power
+/// of two boundary. This default implementation calls EmitCodeAlignment on
+/// the OutStreamer, but can be overridden by Target implementations.
+void AsmPrinter::emitTrapToAlignment(Align Alignment) const {
+  if (Alignment == Align(1)) return;
+  OutStreamer->emitCodeAlignment(Alignment.value());
+}
+
+
+
 //===----------------------------------------------------------------------===//
 // Constant emission.
 //===----------------------------------------------------------------------===//
@@ -3020,10 +3044,17 @@ void AsmPrinter::emitBasicBlockStart(const MachineBasicBlock &MBB) {
     }
   }
 
+  bool isReachableViaFallthrough =
+    std::find(MBB.pred_begin(), MBB.pred_end(), MBB.getPrevNode()) !=
+      MBB.pred_end();
   // Emit an alignment directive for this block, if needed.
   const Align Alignment = MBB.getAlignment();
-  if (Alignment != Align(1))
-    emitAlignment(Alignment);
+  if (Alignment != Align(1)) {
+    if (isReachableViaFallthrough)
+      emitAlignment(Alignment);
+    else
+      emitTrapAlignment(Alignment);
+  }
 
   // If the block has its address taken, emit any labels that were used to
   // reference the block.  It is possible that there is more than one label
index 1cd605e..db0ff32 100644 (file)
@@ -142,6 +142,8 @@ add_llvm_component_library(LLVMCodeGen
   RegUsageInfoCollector.cpp
   RegUsageInfoPropagate.cpp
   ResetMachineFunctionPass.cpp
+  ReturnProtectorLowering.cpp
+  ReturnProtectorPass.cpp
   SafeStack.cpp
   SafeStackLayout.cpp
   ScalarizeMaskedMemIntrin.cpp
index a489f49..a0b2542 100644 (file)
@@ -217,6 +217,10 @@ bool PEI::runOnMachineFunction(MachineFunction &MF) {
   const Function &F = MF.getFunction();
   const TargetRegisterInfo *TRI = MF.getSubtarget().getRegisterInfo();
   const TargetFrameLowering *TFI = MF.getSubtarget().getFrameLowering();
+  const ReturnProtectorLowering *RPL = TFI->getReturnProtector();
+
+  if (RPL)
+      RPL->setupReturnProtector(MF);
 
   RS = TRI->requiresRegisterScavenging(MF) ? new RegScavenger() : nullptr;
   FrameIndexVirtualScavenging = TRI->requiresFrameIndexScavenging(MF);
@@ -255,6 +259,10 @@ bool PEI::runOnMachineFunction(MachineFunction &MF) {
   if (!F.hasFnAttribute(Attribute::Naked))
     insertPrologEpilogCode(MF);
 
+  // Add Return Protectors if using them
+  if (RPL)
+      RPL->insertReturnProtectors(MF);
+
   // Reinsert stashed debug values at the start of the entry blocks.
   for (auto &I : EntryDbgValues)
     I.first->insert(I.first->begin(), I.second.begin(), I.second.end());
@@ -353,7 +361,9 @@ void PEI::calculateCallFrameInfo(MachineFunction &MF) {
 /// Compute the sets of entry and return blocks for saving and restoring
 /// callee-saved registers, and placing prolog and epilog code.
 void PEI::calculateSaveRestoreBlocks(MachineFunction &MF) {
-  const MachineFrameInfo &MFI = MF.getFrameInfo();
+  MachineFrameInfo &MFI = MF.getFrameInfo();
+  const TargetFrameLowering *TFI = MF.getSubtarget().getFrameLowering();
+  const ReturnProtectorLowering *RPL = TFI->getReturnProtector();
 
   // Even when we do not change any CSR, we still want to insert the
   // prologue and epilogue of the function.
@@ -369,7 +379,18 @@ void PEI::calculateSaveRestoreBlocks(MachineFunction &MF) {
     // epilogue.
     if (!RestoreBlock->succ_empty() || RestoreBlock->isReturnBlock())
       RestoreBlocks.push_back(RestoreBlock);
-    return;
+
+    // If we are adding return protectors ensure we can find a free register
+    if (RPL &&
+       !RPL->determineReturnProtectorRegister(MF, SaveBlocks, RestoreBlocks)) {
+      // Shrinkwrapping will prevent finding a free register
+      SaveBlocks.clear();
+      RestoreBlocks.clear();
+      MFI.setSavePoint(nullptr);
+      MFI.setRestorePoint(nullptr);
+    } else {
+      return;
+    }
   }
 
   // Save refs to entry and return blocks.
@@ -380,6 +401,9 @@ void PEI::calculateSaveRestoreBlocks(MachineFunction &MF) {
     if (MBB.isReturnBlock())
       RestoreBlocks.push_back(&MBB);
   }
+
+  if (RPL)
+    RPL->determineReturnProtectorRegister(MF, SaveBlocks, RestoreBlocks);
 }
 
 static void assignCalleeSavedSpillSlots(MachineFunction &F,
@@ -401,6 +425,10 @@ static void assignCalleeSavedSpillSlots(MachineFunction &F,
 
   const TargetFrameLowering *TFI = F.getSubtarget().getFrameLowering();
   MachineFrameInfo &MFI = F.getFrameInfo();
+
+  if (TFI->getReturnProtector())
+      TFI->getReturnProtector()->saveReturnProtectorRegister(F, CSI);
+
   if (!TFI->assignCalleeSavedSpillSlots(F, RegInfo, CSI)) {
     // If target doesn't implement this, use generic code.
 
diff --git a/gnu/llvm/llvm/lib/CodeGen/SafeStackColoring.cpp b/gnu/llvm/llvm/lib/CodeGen/SafeStackColoring.cpp
deleted file mode 100644 (file)
index 04a5c4b..0000000
+++ /dev/null
@@ -1,310 +0,0 @@
-//===- SafeStackColoring.cpp - SafeStack frame coloring -------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "SafeStackColoring.h"
-#include "llvm/ADT/BitVector.h"
-#include "llvm/ADT/DenseMap.h"
-#include "llvm/ADT/DepthFirstIterator.h"
-#include "llvm/ADT/SmallVector.h"
-#include "llvm/Config/llvm-config.h"
-#include "llvm/IR/BasicBlock.h"
-#include "llvm/IR/CFG.h"
-#include "llvm/IR/Instruction.h"
-#include "llvm/IR/Instructions.h"
-#include "llvm/IR/IntrinsicInst.h"
-#include "llvm/IR/Intrinsics.h"
-#include "llvm/IR/User.h"
-#include "llvm/Support/Casting.h"
-#include "llvm/Support/CommandLine.h"
-#include "llvm/Support/Compiler.h"
-#include "llvm/Support/Debug.h"
-#include "llvm/Support/raw_ostream.h"
-#include <cassert>
-#include <tuple>
-#include <utility>
-
-using namespace llvm;
-using namespace llvm::safestack;
-
-#define DEBUG_TYPE "safestackcoloring"
-
-// Disabled by default due to PR32143.
-static cl::opt<bool> ClColoring("safe-stack-coloring",
-                                cl::desc("enable safe stack coloring"),
-                                cl::Hidden, cl::init(false));
-
-const StackColoring::LiveRange &StackColoring::getLiveRange(AllocaInst *AI) {
-  const auto IT = AllocaNumbering.find(AI);
-  assert(IT != AllocaNumbering.end());
-  return LiveRanges[IT->second];
-}
-
-bool StackColoring::readMarker(Instruction *I, bool *IsStart) {
-  if (!I->isLifetimeStartOrEnd())
-    return false;
-
-  auto *II = cast<IntrinsicInst>(I);
-  *IsStart = II->getIntrinsicID() == Intrinsic::lifetime_start;
-  return true;
-}
-
-void StackColoring::removeAllMarkers() {
-  for (auto *I : Markers) {
-    auto *Op = dyn_cast<Instruction>(I->getOperand(1));
-    I->eraseFromParent();
-    // Remove the operand bitcast, too, if it has no more uses left.
-    if (Op && Op->use_empty())
-      Op->eraseFromParent();
-  }
-}
-
-void StackColoring::collectMarkers() {
-  InterestingAllocas.resize(NumAllocas);
-  DenseMap<BasicBlock *, SmallDenseMap<Instruction *, Marker>> BBMarkerSet;
-
-  // Compute the set of start/end markers per basic block.
-  for (unsigned AllocaNo = 0; AllocaNo < NumAllocas; ++AllocaNo) {
-    AllocaInst *AI = Allocas[AllocaNo];
-    SmallVector<Instruction *, 8> WorkList;
-    WorkList.push_back(AI);
-    while (!WorkList.empty()) {
-      Instruction *I = WorkList.pop_back_val();
-      for (User *U : I->users()) {
-        if (auto *BI = dyn_cast<BitCastInst>(U)) {
-          WorkList.push_back(BI);
-          continue;
-        }
-        auto *UI = dyn_cast<Instruction>(U);
-        if (!UI)
-          continue;
-        bool IsStart;
-        if (!readMarker(UI, &IsStart))
-          continue;
-        if (IsStart)
-          InterestingAllocas.set(AllocaNo);
-        BBMarkerSet[UI->getParent()][UI] = {AllocaNo, IsStart};
-        Markers.push_back(UI);
-      }
-    }
-  }
-
-  // Compute instruction numbering. Only the following instructions are
-  // considered:
-  // * Basic block entries
-  // * Lifetime markers
-  // For each basic block, compute
-  // * the list of markers in the instruction order
-  // * the sets of allocas whose lifetime starts or ends in this BB
-  LLVM_DEBUG(dbgs() << "Instructions:\n");
-  unsigned InstNo = 0;
-  for (BasicBlock *BB : depth_first(&F)) {
-    LLVM_DEBUG(dbgs() << "  " << InstNo << ": BB " << BB->getName() << "\n");
-    unsigned BBStart = InstNo++;
-
-    BlockLifetimeInfo &BlockInfo = BlockLiveness[BB];
-    BlockInfo.Begin.resize(NumAllocas);
-    BlockInfo.End.resize(NumAllocas);
-    BlockInfo.LiveIn.resize(NumAllocas);
-    BlockInfo.LiveOut.resize(NumAllocas);
-
-    auto &BlockMarkerSet = BBMarkerSet[BB];
-    if (BlockMarkerSet.empty()) {
-      unsigned BBEnd = InstNo;
-      BlockInstRange[BB] = std::make_pair(BBStart, BBEnd);
-      continue;
-    }
-
-    auto ProcessMarker = [&](Instruction *I, const Marker &M) {
-      LLVM_DEBUG(dbgs() << "  " << InstNo << ":  "
-                        << (M.IsStart ? "start " : "end   ") << M.AllocaNo
-                        << ", " << *I << "\n");
-
-      BBMarkers[BB].push_back({InstNo, M});
-
-      InstructionNumbering[I] = InstNo++;
-
-      if (M.IsStart) {
-        if (BlockInfo.End.test(M.AllocaNo))
-          BlockInfo.End.reset(M.AllocaNo);
-        BlockInfo.Begin.set(M.AllocaNo);
-      } else {
-        if (BlockInfo.Begin.test(M.AllocaNo))
-          BlockInfo.Begin.reset(M.AllocaNo);
-        BlockInfo.End.set(M.AllocaNo);
-      }
-    };
-
-    if (BlockMarkerSet.size() == 1) {
-      ProcessMarker(BlockMarkerSet.begin()->getFirst(),
-                    BlockMarkerSet.begin()->getSecond());
-    } else {
-      // Scan the BB to determine the marker order.
-      for (Instruction &I : *BB) {
-        auto It = BlockMarkerSet.find(&I);
-        if (It == BlockMarkerSet.end())
-          continue;
-        ProcessMarker(&I, It->getSecond());
-      }
-    }
-
-    unsigned BBEnd = InstNo;
-    BlockInstRange[BB] = std::make_pair(BBStart, BBEnd);
-  }
-  NumInst = InstNo;
-}
-
-void StackColoring::calculateLocalLiveness() {
-  bool changed = true;
-  while (changed) {
-    changed = false;
-
-    for (BasicBlock *BB : depth_first(&F)) {
-      BlockLifetimeInfo &BlockInfo = BlockLiveness[BB];
-
-      // Compute LiveIn by unioning together the LiveOut sets of all preds.
-      BitVector LocalLiveIn;
-      for (auto *PredBB : predecessors(BB)) {
-        LivenessMap::const_iterator I = BlockLiveness.find(PredBB);
-        // If a predecessor is unreachable, ignore it.
-        if (I == BlockLiveness.end())
-          continue;
-        LocalLiveIn |= I->second.LiveOut;
-      }
-
-      // Compute LiveOut by subtracting out lifetimes that end in this
-      // block, then adding in lifetimes that begin in this block.  If
-      // we have both BEGIN and END markers in the same basic block
-      // then we know that the BEGIN marker comes after the END,
-      // because we already handle the case where the BEGIN comes
-      // before the END when collecting the markers (and building the
-      // BEGIN/END vectors).
-      BitVector LocalLiveOut = LocalLiveIn;
-      LocalLiveOut.reset(BlockInfo.End);
-      LocalLiveOut |= BlockInfo.Begin;
-
-      // Update block LiveIn set, noting whether it has changed.
-      if (LocalLiveIn.test(BlockInfo.LiveIn)) {
-        changed = true;
-        BlockInfo.LiveIn |= LocalLiveIn;
-      }
-
-      // Update block LiveOut set, noting whether it has changed.
-      if (LocalLiveOut.test(BlockInfo.LiveOut)) {
-        changed = true;
-        BlockInfo.LiveOut |= LocalLiveOut;
-      }
-    }
-  } // while changed.
-}
-
-void StackColoring::calculateLiveIntervals() {
-  for (auto IT : BlockLiveness) {
-    BasicBlock *BB = IT.getFirst();
-    BlockLifetimeInfo &BlockInfo = IT.getSecond();
-    unsigned BBStart, BBEnd;
-    std::tie(BBStart, BBEnd) = BlockInstRange[BB];
-
-    BitVector Started, Ended;
-    Started.resize(NumAllocas);
-    Ended.resize(NumAllocas);
-    SmallVector<unsigned, 8> Start;
-    Start.resize(NumAllocas);
-
-    // LiveIn ranges start at the first instruction.
-    for (unsigned AllocaNo = 0; AllocaNo < NumAllocas; ++AllocaNo) {
-      if (BlockInfo.LiveIn.test(AllocaNo)) {
-        Started.set(AllocaNo);
-        Start[AllocaNo] = BBStart;
-      }
-    }
-
-    for (auto &It : BBMarkers[BB]) {
-      unsigned InstNo = It.first;
-      bool IsStart = It.second.IsStart;
-      unsigned AllocaNo = It.second.AllocaNo;
-
-      if (IsStart) {
-        assert(!Started.test(AllocaNo) || Start[AllocaNo] == BBStart);
-        if (!Started.test(AllocaNo)) {
-          Started.set(AllocaNo);
-          Ended.reset(AllocaNo);
-          Start[AllocaNo] = InstNo;
-        }
-      } else {
-        assert(!Ended.test(AllocaNo));
-        if (Started.test(AllocaNo)) {
-          LiveRanges[AllocaNo].AddRange(Start[AllocaNo], InstNo);
-          Started.reset(AllocaNo);
-        }
-        Ended.set(AllocaNo);
-      }
-    }
-
-    for (unsigned AllocaNo = 0; AllocaNo < NumAllocas; ++AllocaNo)
-      if (Started.test(AllocaNo))
-        LiveRanges[AllocaNo].AddRange(Start[AllocaNo], BBEnd);
-  }
-}
-
-#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-LLVM_DUMP_METHOD void StackColoring::dumpAllocas() {
-  dbgs() << "Allocas:\n";
-  for (unsigned AllocaNo = 0; AllocaNo < NumAllocas; ++AllocaNo)
-    dbgs() << "  " << AllocaNo << ": " << *Allocas[AllocaNo] << "\n";
-}
-
-LLVM_DUMP_METHOD void StackColoring::dumpBlockLiveness() {
-  dbgs() << "Block liveness:\n";
-  for (auto IT : BlockLiveness) {
-    BasicBlock *BB = IT.getFirst();
-    BlockLifetimeInfo &BlockInfo = BlockLiveness[BB];
-    auto BlockRange = BlockInstRange[BB];
-    dbgs() << "  BB [" << BlockRange.first << ", " << BlockRange.second
-           << "): begin " << BlockInfo.Begin << ", end " << BlockInfo.End
-           << ", livein " << BlockInfo.LiveIn << ", liveout "
-           << BlockInfo.LiveOut << "\n";
-  }
-}
-
-LLVM_DUMP_METHOD void StackColoring::dumpLiveRanges() {
-  dbgs() << "Alloca liveness:\n";
-  for (unsigned AllocaNo = 0; AllocaNo < NumAllocas; ++AllocaNo) {
-    LiveRange &Range = LiveRanges[AllocaNo];
-    dbgs() << "  " << AllocaNo << ": " << Range << "\n";
-  }
-}
-#endif
-
-void StackColoring::run() {
-  LLVM_DEBUG(dumpAllocas());
-
-  for (unsigned I = 0; I < NumAllocas; ++I)
-    AllocaNumbering[Allocas[I]] = I;
-  LiveRanges.resize(NumAllocas);
-
-  collectMarkers();
-
-  if (!ClColoring) {
-    for (auto &R : LiveRanges) {
-      R.SetMaximum(1);
-      R.AddRange(0, 1);
-    }
-    return;
-  }
-
-  for (auto &R : LiveRanges)
-    R.SetMaximum(NumInst);
-  for (unsigned I = 0; I < NumAllocas; ++I)
-    if (!InterestingAllocas.test(I))
-      LiveRanges[I] = getFullLiveRange();
-
-  calculateLocalLiveness();
-  LLVM_DEBUG(dumpBlockLiveness());
-  calculateLiveIntervals();
-  LLVM_DEBUG(dumpLiveRanges());
-}
diff --git a/gnu/llvm/llvm/lib/CodeGen/SafeStackColoring.h b/gnu/llvm/llvm/lib/CodeGen/SafeStackColoring.h
deleted file mode 100644 (file)
index b696b1b..0000000
+++ /dev/null
@@ -1,165 +0,0 @@
-//===- SafeStackColoring.h - SafeStack frame coloring ----------*- C++ -*--===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_LIB_CODEGEN_SAFESTACKCOLORING_H
-#define LLVM_LIB_CODEGEN_SAFESTACKCOLORING_H
-
-#include "llvm/ADT/ArrayRef.h"
-#include "llvm/ADT/BitVector.h"
-#include "llvm/ADT/DenseMap.h"
-#include "llvm/ADT/SmallVector.h"
-#include "llvm/IR/Instructions.h"
-#include "llvm/Support/raw_ostream.h"
-#include <cassert>
-#include <utility>
-
-namespace llvm {
-
-class BasicBlock;
-class Function;
-class Instruction;
-
-namespace safestack {
-
-/// Compute live ranges of allocas.
-/// Live ranges are represented as sets of "interesting" instructions, which are
-/// defined as instructions that may start or end an alloca's lifetime. These
-/// are:
-/// * lifetime.start and lifetime.end intrinsics
-/// * first instruction of any basic block
-/// Interesting instructions are numbered in the depth-first walk of the CFG,
-/// and in the program order inside each basic block.
-class StackColoring {
-  /// A class representing liveness information for a single basic block.
-  /// Each bit in the BitVector represents the liveness property
-  /// for a different stack slot.
-  struct BlockLifetimeInfo {
-    /// Which slots BEGINs in each basic block.
-    BitVector Begin;
-
-    /// Which slots ENDs in each basic block.
-    BitVector End;
-
-    /// Which slots are marked as LIVE_IN, coming into each basic block.
-    BitVector LiveIn;
-
-    /// Which slots are marked as LIVE_OUT, coming out of each basic block.
-    BitVector LiveOut;
-  };
-
-public:
-  /// This class represents a set of interesting instructions where an alloca is
-  /// live.
-  struct LiveRange {
-    BitVector bv;
-
-    void SetMaximum(int size) { bv.resize(size); }
-    void AddRange(unsigned start, unsigned end) { bv.set(start, end); }
-
-    bool Overlaps(const LiveRange &Other) const {
-      return bv.anyCommon(Other.bv);
-    }
-
-    void Join(const LiveRange &Other) { bv |= Other.bv; }
-  };
-
-private:
-  Function &F;
-
-  /// Maps active slots (per bit) for each basic block.
-  using LivenessMap = DenseMap<BasicBlock *, BlockLifetimeInfo>;
-  LivenessMap BlockLiveness;
-
-  /// Number of interesting instructions.
-  int NumInst = -1;
-
-  /// Numeric ids for interesting instructions.
-  DenseMap<Instruction *, unsigned> InstructionNumbering;
-
-  /// A range [Start, End) of instruction ids for each basic block.
-  /// Instructions inside each BB have monotonic and consecutive ids.
-  DenseMap<const BasicBlock *, std::pair<unsigned, unsigned>> BlockInstRange;
-
-  ArrayRef<AllocaInst *> Allocas;
-  unsigned NumAllocas;
-  DenseMap<AllocaInst *, unsigned> AllocaNumbering;
-
-  /// LiveRange for allocas.
-  SmallVector<LiveRange, 8> LiveRanges;
-
-  /// The set of allocas that have at least one lifetime.start. All other
-  /// allocas get LiveRange that corresponds to the entire function.
-  BitVector InterestingAllocas;
-  SmallVector<Instruction *, 8> Markers;
-
-  struct Marker {
-    unsigned AllocaNo;
-    bool IsStart;
-  };
-
-  /// List of {InstNo, {AllocaNo, IsStart}} for each BB, ordered by InstNo.
-  DenseMap<BasicBlock *, SmallVector<std::pair<unsigned, Marker>, 4>> BBMarkers;
-
-  void dumpAllocas();
-  void dumpBlockLiveness();
-  void dumpLiveRanges();
-
-  bool readMarker(Instruction *I, bool *IsStart);
-  void collectMarkers();
-  void calculateLocalLiveness();
-  void calculateLiveIntervals();
-
-public:
-  StackColoring(Function &F, ArrayRef<AllocaInst *> Allocas)
-      : F(F), Allocas(Allocas), NumAllocas(Allocas.size()) {}
-
-  void run();
-  void removeAllMarkers();
-
-  /// Returns a set of "interesting" instructions where the given alloca is
-  /// live. Not all instructions in a function are interesting: we pick a set
-  /// that is large enough for LiveRange::Overlaps to be correct.
-  const LiveRange &getLiveRange(AllocaInst *AI);
-
-  /// Returns a live range that represents an alloca that is live throughout the
-  /// entire function.
-  LiveRange getFullLiveRange() {
-    assert(NumInst >= 0);
-    LiveRange R;
-    R.SetMaximum(NumInst);
-    R.AddRange(0, NumInst);
-    return R;
-  }
-};
-
-static inline raw_ostream &operator<<(raw_ostream &OS, const BitVector &V) {
-  OS << "{";
-  int idx = V.find_first();
-  bool first = true;
-  while (idx >= 0) {
-    if (!first) {
-      OS << ", ";
-    }
-    first = false;
-    OS << idx;
-    idx = V.find_next(idx);
-  }
-  OS << "}";
-  return OS;
-}
-
-static inline raw_ostream &operator<<(raw_ostream &OS,
-                                      const StackColoring::LiveRange &R) {
-  return OS << R.bv;
-}
-
-} // end namespace safestack
-
-} // end namespace llvm
-
-#endif // LLVM_LIB_CODEGEN_SAFESTACKCOLORING_H
index 2476fd2..ec384d2 100644 (file)
@@ -30,6 +30,7 @@
 #include "llvm/ADT/Statistic.h"
 #include "llvm/Analysis/AliasAnalysis.h"
 #include "llvm/Analysis/MemoryLocation.h"
+#include "llvm/Analysis/VectorUtils.h"
 #include "llvm/CodeGen/DAGCombine.h"
 #include "llvm/CodeGen/ISDOpcodes.h"
 #include "llvm/CodeGen/MachineFrameInfo.h"
@@ -124,17 +125,29 @@ static cl::opt<unsigned> StoreMergeDependenceLimit(
     cl::desc("Limit the number of times for the same StoreNode and RootNode "
              "to bail out in store merging dependence check"));
 
+static cl::opt<bool> EnableReduceLoadOpStoreWidth(
+    "combiner-reduce-load-op-store-width", cl::Hidden, cl::init(true),
+    cl::desc("DAG cominber enable reducing the width of load/op/store "
+             "sequence"));
+
+static cl::opt<bool> EnableShrinkLoadReplaceStoreWithStore(
+    "combiner-shrink-load-replace-store-with-store", cl::Hidden, cl::init(true),
+    cl::desc("DAG cominber enable load/<replace bytes>/store with "
+             "a narrower store"));
+
 namespace {
 
   class DAGCombiner {
     SelectionDAG &DAG;
     const TargetLowering &TLI;
+    const SelectionDAGTargetInfo *STI;
     CombineLevel Level;
     CodeGenOpt::Level OptLevel;
     bool LegalDAG = false;
     bool LegalOperations = false;
     bool LegalTypes = false;
     bool ForCodeSize;
+    bool DisableGenericCombines;
 
     /// Worklist of all of the nodes that need to be simplified.
     ///
@@ -222,9 +235,11 @@ namespace {
 
   public:
     DAGCombiner(SelectionDAG &D, AliasAnalysis *AA, CodeGenOpt::Level OL)
-        : DAG(D), TLI(D.getTargetLoweringInfo()), Level(BeforeLegalizeTypes),
-          OptLevel(OL), AA(AA) {
+        : DAG(D), TLI(D.getTargetLoweringInfo()),
+          STI(D.getSubtarget().getSelectionDAGInfo()),
+          Level(BeforeLegalizeTypes), OptLevel(OL), AA(AA) {
       ForCodeSize = DAG.shouldOptForSize();
+      DisableGenericCombines = STI && STI->disableGenericCombines(OptLevel);
 
       MaximumLegalStoreInBits = 0;
       // We use the minimum store size here, since that's all we can guarantee
@@ -307,23 +322,34 @@ namespace {
     }
 
     bool SimplifyDemandedBits(SDValue Op, const APInt &DemandedBits) {
-      EVT VT = Op.getValueType();
-      unsigned NumElts = VT.isVector() ? VT.getVectorNumElements() : 1;
-      APInt DemandedElts = APInt::getAllOnesValue(NumElts);
-      return SimplifyDemandedBits(Op, DemandedBits, DemandedElts);
+      TargetLowering::TargetLoweringOpt TLO(DAG, LegalTypes, LegalOperations);
+      KnownBits Known;
+      if (!TLI.SimplifyDemandedBits(Op, DemandedBits, Known, TLO, 0, false))
+        return false;
+
+      // Revisit the node.
+      AddToWorklist(Op.getNode());
+
+      CommitTargetLoweringOpt(TLO);
+      return true;
     }
 
     /// Check the specified vector node value to see if it can be simplified or
     /// if things it uses can be simplified as it only uses some of the
     /// elements. If so, return true.
     bool SimplifyDemandedVectorElts(SDValue Op) {
+      // TODO: For now just pretend it cannot be simplified.
+      if (Op.getValueType().isScalableVector())
+        return false;
+
       unsigned NumElts = Op.getValueType().getVectorNumElements();
       APInt DemandedElts = APInt::getAllOnesValue(NumElts);
       return SimplifyDemandedVectorElts(Op, DemandedElts);
     }
 
     bool SimplifyDemandedBits(SDValue Op, const APInt &DemandedBits,
-                              const APInt &DemandedElts);
+                              const APInt &DemandedElts,
+                              bool AssumeSingleUse = false);
     bool SimplifyDemandedVectorElts(SDValue Op, const APInt &DemandedElts,
                                     bool AssumeSingleUse = false);
 
@@ -429,11 +455,13 @@ namespace {
     SDValue visitZERO_EXTEND(SDNode *N);
     SDValue visitANY_EXTEND(SDNode *N);
     SDValue visitAssertExt(SDNode *N);
+    SDValue visitAssertAlign(SDNode *N);
     SDValue visitSIGN_EXTEND_INREG(SDNode *N);
     SDValue visitSIGN_EXTEND_VECTOR_INREG(SDNode *N);
     SDValue visitZERO_EXTEND_VECTOR_INREG(SDNode *N);
     SDValue visitTRUNCATE(SDNode *N);
     SDValue visitBITCAST(SDNode *N);
+    SDValue visitFREEZE(SDNode *N);
     SDValue visitBUILD_PAIR(SDNode *N);
     SDValue visitFADD(SDNode *N);
     SDValue visitFSUB(SDNode *N);
@@ -522,9 +550,8 @@ namespace {
     SDValue rebuildSetCC(SDValue N);
 
     bool isSetCCEquivalent(SDValue N, SDValue &LHS, SDValue &RHS,
-                           SDValue &CC) const;
+                           SDValue &CC, bool MatchStrict = false) const;
     bool isOneUseSetCC(SDValue N) const;
-    bool isCheaperToUseNegatedFPOps(SDValue X, SDValue Y);
 
     SDValue SimplifyNodeWithTwoResults(SDNode *N, unsigned LoOp,
                                          unsigned HiOp);
@@ -553,6 +580,10 @@ namespace {
                               SDValue InnerPos, SDValue InnerNeg,
                               unsigned PosOpcode, unsigned NegOpcode,
                               const SDLoc &DL);
+    SDValue MatchFunnelPosNeg(SDValue N0, SDValue N1, SDValue Pos, SDValue Neg,
+                              SDValue InnerPos, SDValue InnerNeg,
+                              unsigned PosOpcode, unsigned NegOpcode,
+                              const SDLoc &DL);
     SDValue MatchRotate(SDValue LHS, SDValue RHS, const SDLoc &DL);
     SDValue MatchLoadCombine(SDNode *N);
     SDValue MatchStoreCombine(StoreSDNode *N);
@@ -562,6 +593,7 @@ namespace {
     SDValue TransformFPLoadStorePair(SDNode *N);
     SDValue convertBuildVecZextToZext(SDNode *N);
     SDValue reduceBuildVecExtToExtBuildVec(SDNode *N);
+    SDValue reduceBuildVecTruncToBitCast(SDNode *N);
     SDValue reduceBuildVecToShuffle(SDNode *N);
     SDValue createBuildVecShuffle(const SDLoc &DL, SDNode *N,
                                   ArrayRef<int> VectorMask, SDValue VecIn1,
@@ -606,6 +638,19 @@ namespace {
           : MemNode(N), OffsetFromBase(Offset) {}
     };
 
+    // Classify the origin of a stored value.
+    enum class StoreSource { Unknown, Constant, Extract, Load };
+    StoreSource getStoreSource(SDValue StoreVal) {
+      if (isa<ConstantSDNode>(StoreVal) || isa<ConstantFPSDNode>(StoreVal))
+        return StoreSource::Constant;
+      if (StoreVal.getOpcode() == ISD::EXTRACT_VECTOR_ELT ||
+          StoreVal.getOpcode() == ISD::EXTRACT_SUBVECTOR)
+        return StoreSource::Extract;
+      if (isa<LoadSDNode>(StoreVal))
+        return StoreSource::Load;
+      return StoreSource::Unknown;
+    }
+
     /// This is a helper function for visitMUL to check the profitability
     /// of folding (mul (add x, c1), c2) -> (add (mul x, c2), c1*c2).
     /// MulNode is the original multiply, AddNode is (add x, c1),
@@ -633,43 +678,66 @@ namespace {
     /// can be combined into narrow loads.
     bool BackwardsPropagateMask(SDNode *N);
 
-    /// Helper function for MergeConsecutiveStores which merges the
-    /// component store chains.
+    /// Helper function for mergeConsecutiveStores which merges the component
+    /// store chains.
     SDValue getMergeStoreChains(SmallVectorImpl<MemOpLink> &StoreNodes,
                                 unsigned NumStores);
 
-    /// This is a helper function for MergeConsecutiveStores. When the
-    /// source elements of the consecutive stores are all constants or
-    /// all extracted vector elements, try to merge them into one
-    /// larger store introducing bitcasts if necessary.  \return True
-    /// if a merged store was created.
-    bool MergeStoresOfConstantsOrVecElts(SmallVectorImpl<MemOpLink> &StoreNodes,
+    /// This is a helper function for mergeConsecutiveStores. When the source
+    /// elements of the consecutive stores are all constants or all extracted
+    /// vector elements, try to merge them into one larger store introducing
+    /// bitcasts if necessary.  \return True if a merged store was created.
+    bool mergeStoresOfConstantsOrVecElts(SmallVectorImpl<MemOpLink> &StoreNodes,
                                          EVT MemVT, unsigned NumStores,
                                          bool IsConstantSrc, bool UseVector,
                                          bool UseTrunc);
 
-    /// This is a helper function for MergeConsecutiveStores. Stores
-    /// that potentially may be merged with St are placed in
-    /// StoreNodes. RootNode is a chain predecessor to all store
-    /// candidates.
+    /// This is a helper function for mergeConsecutiveStores. Stores that
+    /// potentially may be merged with St are placed in StoreNodes. RootNode is
+    /// a chain predecessor to all store candidates.
     void getStoreMergeCandidates(StoreSDNode *St,
                                  SmallVectorImpl<MemOpLink> &StoreNodes,
                                  SDNode *&Root);
 
-    /// Helper function for MergeConsecutiveStores. Checks if
-    /// candidate stores have indirect dependency through their
-    /// operands. RootNode is the predecessor to all stores calculated
-    /// by getStoreMergeCandidates and is used to prune the dependency check.
-    /// \return True if safe to merge.
+    /// Helper function for mergeConsecutiveStores. Checks if candidate stores
+    /// have indirect dependency through their operands. RootNode is the
+    /// predecessor to all stores calculated by getStoreMergeCandidates and is
+    /// used to prune the dependency check. \return True if safe to merge.
     bool checkMergeStoreCandidatesForDependencies(
         SmallVectorImpl<MemOpLink> &StoreNodes, unsigned NumStores,
         SDNode *RootNode);
 
+    /// This is a helper function for mergeConsecutiveStores. Given a list of
+    /// store candidates, find the first N that are consecutive in memory.
+    /// Returns 0 if there are not at least 2 consecutive stores to try merging.
+    unsigned getConsecutiveStores(SmallVectorImpl<MemOpLink> &StoreNodes,
+                                  int64_t ElementSizeBytes) const;
+
+    /// This is a helper function for mergeConsecutiveStores. It is used for
+    /// store chains that are composed entirely of constant values.
+    bool tryStoreMergeOfConstants(SmallVectorImpl<MemOpLink> &StoreNodes,
+                                  unsigned NumConsecutiveStores,
+                                  EVT MemVT, SDNode *Root, bool AllowVectors);
+
+    /// This is a helper function for mergeConsecutiveStores. It is used for
+    /// store chains that are composed entirely of extracted vector elements.
+    /// When extracting multiple vector elements, try to store them in one
+    /// vector store rather than a sequence of scalar stores.
+    bool tryStoreMergeOfExtracts(SmallVectorImpl<MemOpLink> &StoreNodes,
+                                 unsigned NumConsecutiveStores, EVT MemVT,
+                                 SDNode *Root);
+
+    /// This is a helper function for mergeConsecutiveStores. It is used for
+    /// store chains that are composed entirely of loaded values.
+    bool tryStoreMergeOfLoads(SmallVectorImpl<MemOpLink> &StoreNodes,
+                              unsigned NumConsecutiveStores, EVT MemVT,
+                              SDNode *Root, bool AllowVectors,
+                              bool IsNonTemporalStore, bool IsNonTemporalLoad);
+
     /// Merge consecutive store operations into a wide store.
     /// This optimization uses wide integers or vectors when possible.
-    /// \return number of stores that were merged into a merged store (the
-    /// affected nodes are stored as a prefix in \p StoreNodes).
-    bool MergeConsecutiveStores(StoreSDNode *St);
+    /// \return true if stores were merged.
+    bool mergeConsecutiveStores(StoreSDNode *St);
 
     /// Try to transform a truncation where C is a constant:
     ///     (trunc (and X, C)) -> (and (trunc X), (trunc C))
@@ -814,7 +882,7 @@ static void zeroExtendToMatch(APInt &LHS, APInt &RHS, unsigned Offset = 0) {
 // the appropriate nodes based on the type of node we are checking. This
 // simplifies life a bit for the callers.
 bool DAGCombiner::isSetCCEquivalent(SDValue N, SDValue &LHS, SDValue &RHS,
-                                    SDValue &CC) const {
+                                    SDValue &CC, bool MatchStrict) const {
   if (N.getOpcode() == ISD::SETCC) {
     LHS = N.getOperand(0);
     RHS = N.getOperand(1);
@@ -822,6 +890,15 @@ bool DAGCombiner::isSetCCEquivalent(SDValue N, SDValue &LHS, SDValue &RHS,
     return true;
   }
 
+  if (MatchStrict &&
+      (N.getOpcode() == ISD::STRICT_FSETCC ||
+       N.getOpcode() == ISD::STRICT_FSETCCS)) {
+    LHS = N.getOperand(1);
+    RHS = N.getOperand(2);
+    CC  = N.getOperand(3);
+    return true;
+  }
+
   if (N.getOpcode() != ISD::SELECT_CC ||
       !TLI.isConstTrueVal(N.getOperand(2).getNode()) ||
       !TLI.isConstFalseVal(N.getOperand(3).getNode()))
@@ -958,14 +1035,11 @@ SDValue DAGCombiner::reassociateOpsCommutative(unsigned Opc, const SDLoc &DL,
   if (N0.getOpcode() != Opc)
     return SDValue();
 
-  // Don't reassociate reductions.
-  if (N0->getFlags().hasVectorReduction())
-    return SDValue();
-
-  if (SDNode *C1 = DAG.isConstantIntBuildVectorOrConstantInt(N0.getOperand(1))) {
-    if (SDNode *C2 = DAG.isConstantIntBuildVectorOrConstantInt(N1)) {
+  if (DAG.isConstantIntBuildVectorOrConstantInt(N0.getOperand(1))) {
+    if (DAG.isConstantIntBuildVectorOrConstantInt(N1)) {
       // Reassociate: (op (op x, c1), c2) -> (op x, (op c1, c2))
-      if (SDValue OpNode = DAG.FoldConstantArithmetic(Opc, DL, VT, C1, C2))
+      if (SDValue OpNode =
+              DAG.FoldConstantArithmetic(Opc, DL, VT, {N0.getOperand(1), N1}))
         return DAG.getNode(Opc, DL, VT, N0.getOperand(0), OpNode);
       return SDValue();
     }
@@ -985,9 +1059,6 @@ SDValue DAGCombiner::reassociateOpsCommutative(unsigned Opc, const SDLoc &DL,
 SDValue DAGCombiner::reassociateOps(unsigned Opc, const SDLoc &DL, SDValue N0,
                                     SDValue N1, SDNodeFlags Flags) {
   assert(TLI.isCommutativeBinOp(Opc) && "Operation not commutative.");
-  // Don't reassociate reductions.
-  if (Flags.hasVectorReduction())
-    return SDValue();
 
   // Floating-point reassociation is not allowed without loose FP math.
   if (N0.getValueType().isFloatingPoint() ||
@@ -1036,6 +1107,12 @@ SDValue DAGCombiner::CombineTo(SDNode *N, const SDValue *To, unsigned NumTo,
 
 void DAGCombiner::
 CommitTargetLoweringOpt(const TargetLowering::TargetLoweringOpt &TLO) {
+  // Replace the old value with the new one.
+  ++NodesCombined;
+  LLVM_DEBUG(dbgs() << "\nReplacing.2 "; TLO.Old.getNode()->dump(&DAG);
+             dbgs() << "\nWith: "; TLO.New.getNode()->dump(&DAG);
+             dbgs() << '\n');
+
   // Replace all uses.  If any nodes become isomorphic to other nodes and
   // are deleted, make sure to remove them from our worklist.
   WorklistRemover DeadNodes(*this);
@@ -1054,21 +1131,17 @@ CommitTargetLoweringOpt(const TargetLowering::TargetLoweringOpt &TLO) {
 /// Check the specified integer node value to see if it can be simplified or if
 /// things it uses can be simplified by bit propagation. If so, return true.
 bool DAGCombiner::SimplifyDemandedBits(SDValue Op, const APInt &DemandedBits,
-                                       const APInt &DemandedElts) {
+                                       const APInt &DemandedElts,
+                                       bool AssumeSingleUse) {
   TargetLowering::TargetLoweringOpt TLO(DAG, LegalTypes, LegalOperations);
   KnownBits Known;
-  if (!TLI.SimplifyDemandedBits(Op, DemandedBits, DemandedElts, Known, TLO))
+  if (!TLI.SimplifyDemandedBits(Op, DemandedBits, DemandedElts, Known, TLO, 0,
+                                AssumeSingleUse))
     return false;
 
   // Revisit the node.
   AddToWorklist(Op.getNode());
 
-  // Replace the old value with the new one.
-  ++NodesCombined;
-  LLVM_DEBUG(dbgs() << "\nReplacing.2 "; TLO.Old.getNode()->dump(&DAG);
-             dbgs() << "\nWith: "; TLO.New.getNode()->dump(&DAG);
-             dbgs() << '\n');
-
   CommitTargetLoweringOpt(TLO);
   return true;
 }
@@ -1088,12 +1161,6 @@ bool DAGCombiner::SimplifyDemandedVectorElts(SDValue Op,
   // Revisit the node.
   AddToWorklist(Op.getNode());
 
-  // Replace the old value with the new one.
-  ++NodesCombined;
-  LLVM_DEBUG(dbgs() << "\nReplacing.2 "; TLO.Old.getNode()->dump(&DAG);
-             dbgs() << "\nWith: "; TLO.New.getNode()->dump(&DAG);
-             dbgs() << '\n');
-
   CommitTargetLoweringOpt(TLO);
   return true;
 }
@@ -1217,8 +1284,11 @@ SDValue DAGCombiner::PromoteIntBinOp(SDValue Op) {
     SDValue RV =
         DAG.getNode(ISD::TRUNCATE, DL, VT, DAG.getNode(Opc, DL, PVT, NN0, NN1));
 
-    // We are always replacing N0/N1's use in N and only need
-    // additional replacements if there are additional uses.
+    // We are always replacing N0/N1's use in N and only need additional
+    // replacements if there are additional uses.
+    // Note: We are checking uses of the *nodes* (SDNode) rather than values
+    //       (SDValue) here because the node may reference multiple values
+    //       (for example, the chain value of a load node).
     Replace0 &= !N0->hasOneUse();
     Replace1 &= (N0 != N1) && !N1->hasOneUse();
 
@@ -1568,6 +1638,7 @@ SDValue DAGCombiner::visit(SDNode *N) {
   case ISD::ANY_EXTEND:         return visitANY_EXTEND(N);
   case ISD::AssertSext:
   case ISD::AssertZext:         return visitAssertExt(N);
+  case ISD::AssertAlign:        return visitAssertAlign(N);
   case ISD::SIGN_EXTEND_INREG:  return visitSIGN_EXTEND_INREG(N);
   case ISD::SIGN_EXTEND_VECTOR_INREG: return visitSIGN_EXTEND_VECTOR_INREG(N);
   case ISD::ZERO_EXTEND_VECTOR_INREG: return visitZERO_EXTEND_VECTOR_INREG(N);
@@ -1617,6 +1688,7 @@ SDValue DAGCombiner::visit(SDNode *N) {
   case ISD::LIFETIME_END:       return visitLIFETIME_END(N);
   case ISD::FP_TO_FP16:         return visitFP_TO_FP16(N);
   case ISD::FP16_TO_FP:         return visitFP16_TO_FP(N);
+  case ISD::FREEZE:             return visitFREEZE(N);
   case ISD::VECREDUCE_FADD:
   case ISD::VECREDUCE_FMUL:
   case ISD::VECREDUCE_ADD:
@@ -1635,7 +1707,9 @@ SDValue DAGCombiner::visit(SDNode *N) {
 }
 
 SDValue DAGCombiner::combine(SDNode *N) {
-  SDValue RV = visit(N);
+  SDValue RV;
+  if (!DisableGenericCombines)
+    RV = visit(N);
 
   // If nothing happened, try a target-specific DAG combine.
   if (!RV.getNode()) {
@@ -2053,12 +2127,11 @@ static SDValue foldAddSubOfSignBit(SDNode *N, SelectionDAG &DAG) {
 
   // We need a constant operand for the add/sub, and the other operand is a
   // logical shift right: add (srl), C or sub C, (srl).
-  // TODO - support non-uniform vector amounts.
   bool IsAdd = N->getOpcode() == ISD::ADD;
   SDValue ConstantOp = IsAdd ? N->getOperand(1) : N->getOperand(0);
   SDValue ShiftOp = IsAdd ? N->getOperand(0) : N->getOperand(1);
-  ConstantSDNode *C = isConstOrConstSplat(ConstantOp);
-  if (!C || ShiftOp.getOpcode() != ISD::SRL)
+  if (!DAG.isConstantIntBuildVectorOrConstantInt(ConstantOp) ||
+      ShiftOp.getOpcode() != ISD::SRL)
     return SDValue();
 
   // The shift must be of a 'not' value.
@@ -2079,8 +2152,11 @@ static SDValue foldAddSubOfSignBit(SDNode *N, SelectionDAG &DAG) {
   SDLoc DL(N);
   auto ShOpcode = IsAdd ? ISD::SRA : ISD::SRL;
   SDValue NewShift = DAG.getNode(ShOpcode, DL, VT, Not.getOperand(0), ShAmt);
-  APInt NewC = IsAdd ? C->getAPIntValue() + 1 : C->getAPIntValue() - 1;
-  return DAG.getNode(ISD::ADD, DL, VT, NewShift, DAG.getConstant(NewC, DL, VT));
+  if (SDValue NewC =
+          DAG.FoldConstantArithmetic(IsAdd ? ISD::ADD : ISD::SUB, DL, VT,
+                                     {ConstantOp, DAG.getConstant(1, DL, VT)}))
+    return DAG.getNode(ISD::ADD, DL, VT, NewShift, NewC);
+  return SDValue();
 }
 
 /// Try to fold a node that behaves like an ADD (note that N isn't necessarily
@@ -2116,8 +2192,7 @@ SDValue DAGCombiner::visitADDLike(SDNode *N) {
     if (!DAG.isConstantIntBuildVectorOrConstantInt(N1))
       return DAG.getNode(ISD::ADD, DL, VT, N1, N0);
     // fold (add c1, c2) -> c1+c2
-    return DAG.FoldConstantArithmetic(ISD::ADD, DL, VT, N0.getNode(),
-                                      N1.getNode());
+    return DAG.FoldConstantArithmetic(ISD::ADD, DL, VT, {N0, N1});
   }
 
   // fold (add x, 0) -> x
@@ -2128,8 +2203,8 @@ SDValue DAGCombiner::visitADDLike(SDNode *N) {
     // fold ((A-c1)+c2) -> (A+(c2-c1))
     if (N0.getOpcode() == ISD::SUB &&
         isConstantOrConstantVector(N0.getOperand(1), /* NoOpaque */ true)) {
-      SDValue Sub = DAG.FoldConstantArithmetic(ISD::SUB, DL, VT, N1.getNode(),
-                                               N0.getOperand(1).getNode());
+      SDValue Sub =
+          DAG.FoldConstantArithmetic(ISD::SUB, DL, VT, {N1, N0.getOperand(1)});
       assert(Sub && "Constant folding failed");
       return DAG.getNode(ISD::ADD, DL, VT, N0.getOperand(0), Sub);
     }
@@ -2137,8 +2212,8 @@ SDValue DAGCombiner::visitADDLike(SDNode *N) {
     // fold ((c1-A)+c2) -> (c1+c2)-A
     if (N0.getOpcode() == ISD::SUB &&
         isConstantOrConstantVector(N0.getOperand(0), /* NoOpaque */ true)) {
-      SDValue Add = DAG.FoldConstantArithmetic(ISD::ADD, DL, VT, N1.getNode(),
-                                               N0.getOperand(0).getNode());
+      SDValue Add =
+          DAG.FoldConstantArithmetic(ISD::ADD, DL, VT, {N1, N0.getOperand(0)});
       assert(Add && "Constant folding failed");
       return DAG.getNode(ISD::SUB, DL, VT, Add, N0.getOperand(1));
     }
@@ -2159,13 +2234,14 @@ SDValue DAGCombiner::visitADDLike(SDNode *N) {
       }
     }
 
-    // Undo the add -> or combine to merge constant offsets from a frame index.
+    // Fold (add (or x, c0), c1) -> (add x, (c0 + c1)) if (or x, c0) is
+    // equivalent to (add x, c0).
     if (N0.getOpcode() == ISD::OR &&
-        isa<FrameIndexSDNode>(N0.getOperand(0)) &&
-        isa<ConstantSDNode>(N0.getOperand(1)) &&
+        isConstantOrConstantVector(N0.getOperand(1), /* NoOpaque */ true) &&
         DAG.haveNoCommonBitsSet(N0.getOperand(0), N0.getOperand(1))) {
-      SDValue Add0 = DAG.getNode(ISD::ADD, DL, VT, N1, N0.getOperand(1));
-      return DAG.getNode(ISD::ADD, DL, VT, N0.getOperand(0), Add0);
+      if (SDValue Add0 = DAG.FoldConstantArithmetic(ISD::ADD, DL, VT,
+                                                    {N1, N0.getOperand(1)}))
+        return DAG.getNode(ISD::ADD, DL, VT, N0.getOperand(0), Add0);
     }
   }
 
@@ -2324,6 +2400,23 @@ SDValue DAGCombiner::visitADD(SDNode *N) {
       DAG.haveNoCommonBitsSet(N0, N1))
     return DAG.getNode(ISD::OR, DL, VT, N0, N1);
 
+  // Fold (add (vscale * C0), (vscale * C1)) to (vscale * (C0 + C1)).
+  if (N0.getOpcode() == ISD::VSCALE && N1.getOpcode() == ISD::VSCALE) {
+    APInt C0 = N0->getConstantOperandAPInt(0);
+    APInt C1 = N1->getConstantOperandAPInt(0);
+    return DAG.getVScale(DL, VT, C0 + C1);
+  }
+
+  // fold a+vscale(c1)+vscale(c2) -> a+vscale(c1+c2)
+  if ((N0.getOpcode() == ISD::ADD) &&
+      (N0.getOperand(1).getOpcode() == ISD::VSCALE) &&
+      (N1.getOpcode() == ISD::VSCALE)) {
+    auto VS0 = N0.getOperand(1)->getConstantOperandAPInt(0);
+    auto VS1 = N1->getConstantOperandAPInt(0);
+    auto VS = DAG.getVScale(DL, VT, VS0 + VS1);
+    return DAG.getNode(ISD::ADD, DL, VT, N0.getOperand(0), VS);
+  }
+
   return SDValue();
 }
 
@@ -2354,8 +2447,7 @@ SDValue DAGCombiner::visitADDSAT(SDNode *N) {
     if (!DAG.isConstantIntBuildVectorOrConstantInt(N1))
       return DAG.getNode(Opcode, DL, VT, N1, N0);
     // fold (add_sat c1, c2) -> c3
-    return DAG.FoldConstantArithmetic(Opcode, DL, VT, N0.getNode(),
-                                      N1.getNode());
+    return DAG.FoldConstantArithmetic(Opcode, DL, VT, {N0, N1});
   }
 
   // fold (add_sat x, 0) -> x
@@ -2975,12 +3067,10 @@ SDValue DAGCombiner::visitSUB(SDNode *N) {
   // FIXME: Refactor this and xor and other similar operations together.
   if (N0 == N1)
     return tryFoldToZero(DL, TLI, VT, DAG, LegalOperations);
-  if (DAG.isConstantIntBuildVectorOrConstantInt(N0) &&
-      DAG.isConstantIntBuildVectorOrConstantInt(N1)) {
-    // fold (sub c1, c2) -> c1-c2
-    return DAG.FoldConstantArithmetic(ISD::SUB, DL, VT, N0.getNode(),
-                                      N1.getNode());
-  }
+
+  // fold (sub c1, c2) -> c3
+  if (SDValue C = DAG.FoldConstantArithmetic(ISD::SUB, DL, VT, {N0, N1}))
+    return C;
 
   if (SDValue NewSel = foldBinOpIntoSelect(N))
     return NewSel;
@@ -3047,8 +3137,8 @@ SDValue DAGCombiner::visitSUB(SDNode *N) {
   if (N0.getOpcode() == ISD::ADD &&
       isConstantOrConstantVector(N1, /* NoOpaques */ true) &&
       isConstantOrConstantVector(N0.getOperand(1), /* NoOpaques */ true)) {
-    SDValue NewC = DAG.FoldConstantArithmetic(
-        ISD::SUB, DL, VT, N0.getOperand(1).getNode(), N1.getNode());
+    SDValue NewC =
+        DAG.FoldConstantArithmetic(ISD::SUB, DL, VT, {N0.getOperand(1), N1});
     assert(NewC && "Constant folding failed");
     return DAG.getNode(ISD::ADD, DL, VT, N0.getOperand(0), NewC);
   }
@@ -3058,8 +3148,7 @@ SDValue DAGCombiner::visitSUB(SDNode *N) {
     SDValue N11 = N1.getOperand(1);
     if (isConstantOrConstantVector(N0, /* NoOpaques */ true) &&
         isConstantOrConstantVector(N11, /* NoOpaques */ true)) {
-      SDValue NewC = DAG.FoldConstantArithmetic(ISD::SUB, DL, VT, N0.getNode(),
-                                                N11.getNode());
+      SDValue NewC = DAG.FoldConstantArithmetic(ISD::SUB, DL, VT, {N0, N11});
       assert(NewC && "Constant folding failed");
       return DAG.getNode(ISD::SUB, DL, VT, NewC, N1.getOperand(0));
     }
@@ -3069,8 +3158,8 @@ SDValue DAGCombiner::visitSUB(SDNode *N) {
   if (N0.getOpcode() == ISD::SUB &&
       isConstantOrConstantVector(N1, /* NoOpaques */ true) &&
       isConstantOrConstantVector(N0.getOperand(1), /* NoOpaques */ true)) {
-    SDValue NewC = DAG.FoldConstantArithmetic(
-        ISD::ADD, DL, VT, N0.getOperand(1).getNode(), N1.getNode());
+    SDValue NewC =
+        DAG.FoldConstantArithmetic(ISD::ADD, DL, VT, {N0.getOperand(1), N1});
     assert(NewC && "Constant folding failed");
     return DAG.getNode(ISD::SUB, DL, VT, N0.getOperand(0), NewC);
   }
@@ -3079,8 +3168,8 @@ SDValue DAGCombiner::visitSUB(SDNode *N) {
   if (N0.getOpcode() == ISD::SUB &&
       isConstantOrConstantVector(N1, /* NoOpaques */ true) &&
       isConstantOrConstantVector(N0.getOperand(0), /* NoOpaques */ true)) {
-    SDValue NewC = DAG.FoldConstantArithmetic(
-        ISD::SUB, DL, VT, N0.getOperand(0).getNode(), N1.getNode());
+    SDValue NewC =
+        DAG.FoldConstantArithmetic(ISD::SUB, DL, VT, {N0.getOperand(0), N1});
     assert(NewC && "Constant folding failed");
     return DAG.getNode(ISD::SUB, DL, VT, NewC, N0.getOperand(1));
   }
@@ -3251,6 +3340,12 @@ SDValue DAGCombiner::visitSUB(SDNode *N) {
     }
   }
 
+  // canonicalize (sub X, (vscale * C)) to (add X,  (vscale * -C))
+  if (N1.getOpcode() == ISD::VSCALE) {
+    APInt IntVal = N1.getConstantOperandAPInt(0);
+    return DAG.getNode(ISD::ADD, DL, VT, N0, DAG.getVScale(DL, VT, -IntVal));
+  }
+
   // Prefer an add for more folding potential and possibly better codegen:
   // sub N0, (lshr N10, width-1) --> add N0, (ashr N10, width-1)
   if (!LegalOperations && N1.getOpcode() == ISD::SRL && N1.hasOneUse()) {
@@ -3301,12 +3396,9 @@ SDValue DAGCombiner::visitSUBSAT(SDNode *N) {
   if (N0 == N1)
     return DAG.getConstant(0, DL, VT);
 
-  if (DAG.isConstantIntBuildVectorOrConstantInt(N0) &&
-      DAG.isConstantIntBuildVectorOrConstantInt(N1)) {
-    // fold (sub_sat c1, c2) -> c3
-    return DAG.FoldConstantArithmetic(N->getOpcode(), DL, VT, N0.getNode(),
-                                      N1.getNode());
-  }
+  // fold (sub_sat c1, c2) -> c3
+  if (SDValue C = DAG.FoldConstantArithmetic(N->getOpcode(), DL, VT, {N0, N1}))
+    return C;
 
   // fold (sub_sat x, 0) -> x
   if (isNullConstant(N1))
@@ -3442,30 +3534,20 @@ SDValue DAGCombiner::visitMUL(SDNode *N) {
   if (N0.isUndef() || N1.isUndef())
     return DAG.getConstant(0, SDLoc(N), VT);
 
-  bool N0IsConst = false;
   bool N1IsConst = false;
   bool N1IsOpaqueConst = false;
-  bool N0IsOpaqueConst = false;
-  APInt ConstValue0, ConstValue1;
+  APInt ConstValue1;
+
   // fold vector ops
   if (VT.isVector()) {
     if (SDValue FoldedVOp = SimplifyVBinOp(N))
       return FoldedVOp;
 
-    N0IsConst = ISD::isConstantSplatVector(N0.getNode(), ConstValue0);
     N1IsConst = ISD::isConstantSplatVector(N1.getNode(), ConstValue1);
-    assert((!N0IsConst ||
-            ConstValue0.getBitWidth() == VT.getScalarSizeInBits()) &&
-           "Splat APInt should be element width");
     assert((!N1IsConst ||
             ConstValue1.getBitWidth() == VT.getScalarSizeInBits()) &&
            "Splat APInt should be element width");
   } else {
-    N0IsConst = isa<ConstantSDNode>(N0);
-    if (N0IsConst) {
-      ConstValue0 = cast<ConstantSDNode>(N0)->getAPIntValue();
-      N0IsOpaqueConst = cast<ConstantSDNode>(N0)->isOpaque();
-    }
     N1IsConst = isa<ConstantSDNode>(N1);
     if (N1IsConst) {
       ConstValue1 = cast<ConstantSDNode>(N1)->getAPIntValue();
@@ -3474,17 +3556,18 @@ SDValue DAGCombiner::visitMUL(SDNode *N) {
   }
 
   // fold (mul c1, c2) -> c1*c2
-  if (N0IsConst && N1IsConst && !N0IsOpaqueConst && !N1IsOpaqueConst)
-    return DAG.FoldConstantArithmetic(ISD::MUL, SDLoc(N), VT,
-                                      N0.getNode(), N1.getNode());
+  if (SDValue C = DAG.FoldConstantArithmetic(ISD::MUL, SDLoc(N), VT, {N0, N1}))
+    return C;
 
   // canonicalize constant to RHS (vector doesn't have to splat)
   if (DAG.isConstantIntBuildVectorOrConstantInt(N0) &&
      !DAG.isConstantIntBuildVectorOrConstantInt(N1))
     return DAG.getNode(ISD::MUL, SDLoc(N), VT, N1, N0);
+
   // fold (mul x, 0) -> 0
   if (N1IsConst && ConstValue1.isNullValue())
     return N1;
+
   // fold (mul x, 1) -> x
   if (N1IsConst && ConstValue1.isOneValue())
     return N0;
@@ -3498,6 +3581,7 @@ SDValue DAGCombiner::visitMUL(SDNode *N) {
     return DAG.getNode(ISD::SUB, DL, VT,
                        DAG.getConstant(0, DL, VT), N0);
   }
+
   // fold (mul x, (1 << c)) -> x << c
   if (isConstantOrConstantVector(N1, /*NoOpaques*/ true) &&
       DAG.isKnownToBeAPowerOfTwo(N1) &&
@@ -3508,6 +3592,7 @@ SDValue DAGCombiner::visitMUL(SDNode *N) {
     SDValue Trunc = DAG.getZExtOrTrunc(LogBase2, DL, ShiftVT);
     return DAG.getNode(ISD::SHL, DL, VT, N0, Trunc);
   }
+
   // fold (mul x, -(1 << c)) -> -(x << c) or (-x) << c
   if (N1IsConst && !N1IsOpaqueConst && (-ConstValue1).isPowerOf2()) {
     unsigned Log2Val = (-ConstValue1).logBase2();
@@ -3596,6 +3681,14 @@ SDValue DAGCombiner::visitMUL(SDNode *N) {
                          DAG.getNode(ISD::MUL, SDLoc(N1), VT,
                                      N0.getOperand(1), N1));
 
+  // Fold (mul (vscale * C0), C1) to (vscale * (C0 * C1)).
+  if (N0.getOpcode() == ISD::VSCALE)
+    if (ConstantSDNode *NC1 = isConstOrConstSplat(N1)) {
+      APInt C0 = N0.getConstantOperandAPInt(0);
+      APInt C1 = NC1->getAPIntValue();
+      return DAG.getVScale(SDLoc(N), VT, C0 * C1);
+    }
+
   // reassociate mul
   if (SDValue RMUL = reassociateOps(ISD::MUL, SDLoc(N), N0, N1, N->getFlags()))
     return RMUL;
@@ -3753,13 +3846,14 @@ SDValue DAGCombiner::visitSDIV(SDNode *N) {
   SDLoc DL(N);
 
   // fold (sdiv c1, c2) -> c1/c2
-  ConstantSDNode *N0C = isConstOrConstSplat(N0);
   ConstantSDNode *N1C = isConstOrConstSplat(N1);
-  if (N0C && N1C && !N0C->isOpaque() && !N1C->isOpaque())
-    return DAG.FoldConstantArithmetic(ISD::SDIV, DL, VT, N0C, N1C);
+  if (SDValue C = DAG.FoldConstantArithmetic(ISD::SDIV, DL, VT, {N0, N1}))
+    return C;
+
   // fold (sdiv X, -1) -> 0-X
   if (N1C && N1C->isAllOnesValue())
     return DAG.getNode(ISD::SUB, DL, VT, DAG.getConstant(0, DL, VT), N0);
+
   // fold (sdiv X, MIN_SIGNED) -> select(X == MIN_SIGNED, 1, 0)
   if (N1C && N1C->getAPIntValue().isMinSignedValue())
     return DAG.getSelect(DL, VT, DAG.getSetCC(DL, CCVT, N0, N1, ISD::SETEQ),
@@ -3897,12 +3991,10 @@ SDValue DAGCombiner::visitUDIV(SDNode *N) {
   SDLoc DL(N);
 
   // fold (udiv c1, c2) -> c1/c2
-  ConstantSDNode *N0C = isConstOrConstSplat(N0);
   ConstantSDNode *N1C = isConstOrConstSplat(N1);
-  if (N0C && N1C)
-    if (SDValue Folded = DAG.FoldConstantArithmetic(ISD::UDIV, DL, VT,
-                                                    N0C, N1C))
-      return Folded;
+  if (SDValue C = DAG.FoldConstantArithmetic(ISD::UDIV, DL, VT, {N0, N1}))
+    return C;
+
   // fold (udiv X, -1) -> select(X == -1, 1, 0)
   if (N1C && N1C->getAPIntValue().isAllOnesValue())
     return DAG.getSelect(DL, VT, DAG.getSetCC(DL, CCVT, N0, N1, ISD::SETEQ),
@@ -3995,11 +4087,10 @@ SDValue DAGCombiner::visitREM(SDNode *N) {
   SDLoc DL(N);
 
   // fold (rem c1, c2) -> c1%c2
-  ConstantSDNode *N0C = isConstOrConstSplat(N0);
   ConstantSDNode *N1C = isConstOrConstSplat(N1);
-  if (N0C && N1C)
-    if (SDValue Folded = DAG.FoldConstantArithmetic(Opcode, DL, VT, N0C, N1C))
-      return Folded;
+  if (SDValue C = DAG.FoldConstantArithmetic(Opcode, DL, VT, {N0, N1}))
+    return C;
+
   // fold (urem X, -1) -> select(X == -1, 0, x)
   if (!isSigned && N1C && N1C->getAPIntValue().isAllOnesValue())
     return DAG.getSelect(DL, VT, DAG.getSetCC(DL, CCVT, N0, N1, ISD::SETEQ),
@@ -4095,7 +4186,7 @@ SDValue DAGCombiner::visitMULHS(SDNode *N) {
 
   // If the type twice as wide is legal, transform the mulhs to a wider multiply
   // plus a shift.
-  if (VT.isSimple() && !VT.isVector()) {
+  if (!TLI.isMulhCheaperThanMulShift(VT) && VT.isSimple() && !VT.isVector()) {
     MVT Simple = VT.getSimpleVT();
     unsigned SimpleSize = Simple.getSizeInBits();
     EVT NewVT = EVT::getIntegerVT(*DAG.getContext(), SimpleSize*2);
@@ -4151,7 +4242,7 @@ SDValue DAGCombiner::visitMULHU(SDNode *N) {
 
   // If the type twice as wide is legal, transform the mulhu to a wider multiply
   // plus a shift.
-  if (VT.isSimple() && !VT.isVector()) {
+  if (!TLI.isMulhCheaperThanMulShift(VT) && VT.isSimple() && !VT.isVector()) {
     MVT Simple = VT.getSimpleVT();
     unsigned SimpleSize = Simple.getSizeInBits();
     EVT NewVT = EVT::getIntegerVT(*DAG.getContext(), SimpleSize*2);
@@ -4324,6 +4415,7 @@ SDValue DAGCombiner::visitIMINMAX(SDNode *N) {
   SDValue N0 = N->getOperand(0);
   SDValue N1 = N->getOperand(1);
   EVT VT = N0.getValueType();
+  unsigned Opcode = N->getOpcode();
 
   // fold vector ops
   if (VT.isVector())
@@ -4331,19 +4423,16 @@ SDValue DAGCombiner::visitIMINMAX(SDNode *N) {
       return FoldedVOp;
 
   // fold operation with constant operands.
-  ConstantSDNode *N0C = getAsNonOpaqueConstant(N0);
-  ConstantSDNode *N1C = getAsNonOpaqueConstant(N1);
-  if (N0C && N1C)
-    return DAG.FoldConstantArithmetic(N->getOpcode(), SDLoc(N), VT, N0C, N1C);
+  if (SDValue C = DAG.FoldConstantArithmetic(Opcode, SDLoc(N), VT, {N0, N1}))
+    return C;
 
   // canonicalize constant to RHS
   if (DAG.isConstantIntBuildVectorOrConstantInt(N0) &&
-     !DAG.isConstantIntBuildVectorOrConstantInt(N1))
+      !DAG.isConstantIntBuildVectorOrConstantInt(N1))
     return DAG.getNode(N->getOpcode(), SDLoc(N), VT, N1, N0);
 
   // Is sign bits are zero, flip between UMIN/UMAX and SMIN/SMAX.
   // Only do this if the current op isn't legal and the flipped is.
-  unsigned Opcode = N->getOpcode();
   if (!TLI.isOperationLegal(Opcode, VT) &&
       (N0.isUndef() || DAG.SignBitIsZero(N0)) &&
       (N1.isUndef() || DAG.SignBitIsZero(N1))) {
@@ -4832,11 +4921,16 @@ bool DAGCombiner::isLegalNarrowLdSt(LSBaseSDNode *LDST,
     return false;
 
   // Ensure that this isn't going to produce an unsupported memory access.
-  if (ShAmt &&
-      !TLI.allowsMemoryAccess(*DAG.getContext(), DAG.getDataLayout(), MemVT,
-                              LDST->getAddressSpace(), ShAmt / 8,
-                              LDST->getMemOperand()->getFlags()))
-    return false;
+  if (ShAmt) {
+    assert(ShAmt % 8 == 0 && "ShAmt is byte offset");
+    const unsigned ByteShAmt = ShAmt / 8;
+    const Align LDSTAlign = LDST->getAlign();
+    const Align NarrowAlign = commonAlignment(LDSTAlign, ByteShAmt);
+    if (!TLI.allowsMemoryAccess(*DAG.getContext(), DAG.getDataLayout(), MemVT,
+                                LDST->getAddressSpace(), NarrowAlign,
+                                LDST->getMemOperand()->getFlags()))
+      return false;
+  }
 
   // It's not possible to generate a constant of extended or untyped type.
   EVT PtrType = LDST->getBasePtr().getValueType();
@@ -5181,17 +5275,19 @@ SDValue DAGCombiner::visitAND(SDNode *N) {
   }
 
   // fold (and c1, c2) -> c1&c2
-  ConstantSDNode *N0C = getAsNonOpaqueConstant(N0);
   ConstantSDNode *N1C = isConstOrConstSplat(N1);
-  if (N0C && N1C && !N1C->isOpaque())
-    return DAG.FoldConstantArithmetic(ISD::AND, SDLoc(N), VT, N0C, N1C);
+  if (SDValue C = DAG.FoldConstantArithmetic(ISD::AND, SDLoc(N), VT, {N0, N1}))
+    return C;
+
   // canonicalize constant to RHS
   if (DAG.isConstantIntBuildVectorOrConstantInt(N0) &&
       !DAG.isConstantIntBuildVectorOrConstantInt(N1))
     return DAG.getNode(ISD::AND, SDLoc(N), VT, N1, N0);
+
   // fold (and x, -1) -> x
   if (isAllOnesConstant(N1))
     return N0;
+
   // if (and x, c) is known to be zero, return 0
   unsigned BitWidth = VT.getScalarSizeInBits();
   if (N1C && DAG.MaskedValueIsZero(SDValue(N, 0),
@@ -5661,6 +5757,48 @@ static bool isBSwapHWordPair(SDValue N, MutableArrayRef<SDNode *> Parts) {
   return false;
 }
 
+// Match this pattern:
+//   (or (and (shl (A, 8)), 0xff00ff00), (and (srl (A, 8)), 0x00ff00ff))
+// And rewrite this to:
+//   (rotr (bswap A), 16)
+static SDValue matchBSwapHWordOrAndAnd(const TargetLowering &TLI,
+                                       SelectionDAG &DAG, SDNode *N, SDValue N0,
+                                       SDValue N1, EVT VT, EVT ShiftAmountTy) {
+  assert(N->getOpcode() == ISD::OR && VT == MVT::i32 &&
+         "MatchBSwapHWordOrAndAnd: expecting i32");
+  if (!TLI.isOperationLegalOrCustom(ISD::ROTR, VT))
+    return SDValue();
+  if (N0.getOpcode() != ISD::AND || N1.getOpcode() != ISD::AND)
+    return SDValue();
+  // TODO: this is too restrictive; lifting this restriction requires more tests
+  if (!N0->hasOneUse() || !N1->hasOneUse())
+    return SDValue();
+  ConstantSDNode *Mask0 = isConstOrConstSplat(N0.getOperand(1));
+  ConstantSDNode *Mask1 = isConstOrConstSplat(N1.getOperand(1));
+  if (!Mask0 || !Mask1)
+    return SDValue();
+  if (Mask0->getAPIntValue() != 0xff00ff00 ||
+      Mask1->getAPIntValue() != 0x00ff00ff)
+    return SDValue();
+  SDValue Shift0 = N0.getOperand(0);
+  SDValue Shift1 = N1.getOperand(0);
+  if (Shift0.getOpcode() != ISD::SHL || Shift1.getOpcode() != ISD::SRL)
+    return SDValue();
+  ConstantSDNode *ShiftAmt0 = isConstOrConstSplat(Shift0.getOperand(1));
+  ConstantSDNode *ShiftAmt1 = isConstOrConstSplat(Shift1.getOperand(1));
+  if (!ShiftAmt0 || !ShiftAmt1)
+    return SDValue();
+  if (ShiftAmt0->getAPIntValue() != 8 || ShiftAmt1->getAPIntValue() != 8)
+    return SDValue();
+  if (Shift0.getOperand(0) != Shift1.getOperand(0))
+    return SDValue();
+
+  SDLoc DL(N);
+  SDValue BSwap = DAG.getNode(ISD::BSWAP, DL, VT, Shift0.getOperand(0));
+  SDValue ShAmt = DAG.getConstant(16, DL, ShiftAmountTy);
+  return DAG.getNode(ISD::ROTR, DL, VT, BSwap, ShAmt);
+}
+
 /// Match a 32-bit packed halfword bswap. That is
 /// ((x & 0x000000ff) << 8) |
 /// ((x & 0x0000ff00) >> 8) |
@@ -5677,6 +5815,16 @@ SDValue DAGCombiner::MatchBSwapHWord(SDNode *N, SDValue N0, SDValue N1) {
   if (!TLI.isOperationLegalOrCustom(ISD::BSWAP, VT))
     return SDValue();
 
+  if (SDValue BSwap = matchBSwapHWordOrAndAnd(TLI, DAG, N, N0, N1, VT,
+                                              getShiftAmountTy(VT)))
+  return BSwap;
+
+  // Try again with commuted operands.
+  if (SDValue BSwap = matchBSwapHWordOrAndAnd(TLI, DAG, N, N1, N0, VT,
+                                              getShiftAmountTy(VT)))
+  return BSwap;
+
+
   // Look for either
   // (or (bswaphpair), (bswaphpair))
   // (or (or (bswaphpair), (and)), (and))
@@ -5882,17 +6030,19 @@ SDValue DAGCombiner::visitOR(SDNode *N) {
   }
 
   // fold (or c1, c2) -> c1|c2
-  ConstantSDNode *N0C = getAsNonOpaqueConstant(N0);
   ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
-  if (N0C && N1C && !N1C->isOpaque())
-    return DAG.FoldConstantArithmetic(ISD::OR, SDLoc(N), VT, N0C, N1C);
+  if (SDValue C = DAG.FoldConstantArithmetic(ISD::OR, SDLoc(N), VT, {N0, N1}))
+    return C;
+
   // canonicalize constant to RHS
   if (DAG.isConstantIntBuildVectorOrConstantInt(N0) &&
      !DAG.isConstantIntBuildVectorOrConstantInt(N1))
     return DAG.getNode(ISD::OR, SDLoc(N), VT, N1, N0);
+
   // fold (or x, 0) -> x
   if (isNullConstant(N1))
     return N0;
+
   // fold (or x, -1) -> -1
   if (isAllOnesConstant(N1))
     return N1;
@@ -5927,8 +6077,8 @@ SDValue DAGCombiner::visitOR(SDNode *N) {
   };
   if (N0.getOpcode() == ISD::AND && N0.getNode()->hasOneUse() &&
       ISD::matchBinaryPredicate(N0.getOperand(1), N1, MatchIntersect, true)) {
-    if (SDValue COR = DAG.FoldConstantArithmetic(
-            ISD::OR, SDLoc(N1), VT, N1.getNode(), N0.getOperand(1).getNode())) {
+    if (SDValue COR = DAG.FoldConstantArithmetic(ISD::OR, SDLoc(N1), VT,
+                                                 {N1, N0.getOperand(1)})) {
       SDValue IOR = DAG.getNode(ISD::OR, SDLoc(N0), VT, N0.getOperand(0), N1);
       AddToWorklist(IOR.getNode());
       return DAG.getNode(ISD::AND, SDLoc(N), VT, COR, IOR);
@@ -6027,6 +6177,7 @@ static SDValue extractShiftForRotate(SelectionDAG &DAG, SDValue OppShift,
   ConstantSDNode *OppShiftCst = isConstOrConstSplat(OppShift.getOperand(1));
 
   // (add v v) -> (shl v 1)
+  // TODO: Should this be a general DAG canonicalization?
   if (OppShift.getOpcode() == ISD::SRL && OppShiftCst &&
       ExtractFrom.getOpcode() == ISD::ADD &&
       ExtractFrom.getOperand(0) == ExtractFrom.getOperand(1) &&
@@ -6199,8 +6350,12 @@ static bool matchRotateSub(SDValue Pos, SDValue Neg, unsigned EltSize,
   //              EltSize & Mask == NegC & Mask
   //
   // (because "x & Mask" is a truncation and distributes through subtraction).
+  //
+  // We also need to account for a potential truncation of NegOp1 if the amount
+  // has already been legalized to a shift amount type.
   APInt Width;
-  if (Pos == NegOp1)
+  if ((Pos == NegOp1) ||
+      (NegOp1.getOpcode() == ISD::TRUNCATE && Pos == NegOp1.getOperand(0)))
     Width = NegC->getAPIntValue();
 
   // Check for cases where Pos has the form (add NegOp1, PosC) for some PosC.
@@ -6253,19 +6408,91 @@ SDValue DAGCombiner::MatchRotatePosNeg(SDValue Shifted, SDValue Pos,
   return SDValue();
 }
 
+// A subroutine of MatchRotate used once we have found an OR of two opposite
+// shifts of N0 + N1.  If Neg == <operand size> - Pos then the OR reduces
+// to both (PosOpcode N0, N1, Pos) and (NegOpcode N0, N1, Neg), with the
+// former being preferred if supported.  InnerPos and InnerNeg are Pos and
+// Neg with outer conversions stripped away.
+// TODO: Merge with MatchRotatePosNeg.
+SDValue DAGCombiner::MatchFunnelPosNeg(SDValue N0, SDValue N1, SDValue Pos,
+                                       SDValue Neg, SDValue InnerPos,
+                                       SDValue InnerNeg, unsigned PosOpcode,
+                                       unsigned NegOpcode, const SDLoc &DL) {
+  EVT VT = N0.getValueType();
+  unsigned EltBits = VT.getScalarSizeInBits();
+
+  // fold (or (shl x0, (*ext y)),
+  //          (srl x1, (*ext (sub 32, y)))) ->
+  //   (fshl x0, x1, y) or (fshr x0, x1, (sub 32, y))
+  //
+  // fold (or (shl x0, (*ext (sub 32, y))),
+  //          (srl x1, (*ext y))) ->
+  //   (fshr x0, x1, y) or (fshl x0, x1, (sub 32, y))
+  if (matchRotateSub(InnerPos, InnerNeg, EltBits, DAG)) {
+    bool HasPos = TLI.isOperationLegalOrCustom(PosOpcode, VT);
+    return DAG.getNode(HasPos ? PosOpcode : NegOpcode, DL, VT, N0, N1,
+                       HasPos ? Pos : Neg);
+  }
+
+  // Matching the shift+xor cases, we can't easily use the xor'd shift amount
+  // so for now just use the PosOpcode case if its legal.
+  // TODO: When can we use the NegOpcode case?
+  if (PosOpcode == ISD::FSHL && isPowerOf2_32(EltBits)) {
+    auto IsBinOpImm = [](SDValue Op, unsigned BinOpc, unsigned Imm) {
+      if (Op.getOpcode() != BinOpc)
+        return false;
+      ConstantSDNode *Cst = isConstOrConstSplat(Op.getOperand(1));
+      return Cst && (Cst->getAPIntValue() == Imm);
+    };
+
+    // fold (or (shl x0, y), (srl (srl x1, 1), (xor y, 31)))
+    //   -> (fshl x0, x1, y)
+    if (IsBinOpImm(N1, ISD::SRL, 1) &&
+        IsBinOpImm(InnerNeg, ISD::XOR, EltBits - 1) &&
+        InnerPos == InnerNeg.getOperand(0) &&
+        TLI.isOperationLegalOrCustom(ISD::FSHL, VT)) {
+      return DAG.getNode(ISD::FSHL, DL, VT, N0, N1.getOperand(0), Pos);
+    }
+
+    // fold (or (shl (shl x0, 1), (xor y, 31)), (srl x1, y))
+    //   -> (fshr x0, x1, y)
+    if (IsBinOpImm(N0, ISD::SHL, 1) &&
+        IsBinOpImm(InnerPos, ISD::XOR, EltBits - 1) &&
+        InnerNeg == InnerPos.getOperand(0) &&
+        TLI.isOperationLegalOrCustom(ISD::FSHR, VT)) {
+      return DAG.getNode(ISD::FSHR, DL, VT, N0.getOperand(0), N1, Neg);
+    }
+
+    // fold (or (shl (add x0, x0), (xor y, 31)), (srl x1, y))
+    //   -> (fshr x0, x1, y)
+    // TODO: Should add(x,x) -> shl(x,1) be a general DAG canonicalization?
+    if (N0.getOpcode() == ISD::ADD && N0.getOperand(0) == N0.getOperand(1) &&
+        IsBinOpImm(InnerPos, ISD::XOR, EltBits - 1) &&
+        InnerNeg == InnerPos.getOperand(0) &&
+        TLI.isOperationLegalOrCustom(ISD::FSHR, VT)) {
+      return DAG.getNode(ISD::FSHR, DL, VT, N0.getOperand(0), N1, Neg);
+    }
+  }
+
+  return SDValue();
+}
+
 // MatchRotate - Handle an 'or' of two operands.  If this is one of the many
 // idioms for rotate, and if the target supports rotation instructions, generate
-// a rot[lr].
+// a rot[lr]. This also matches funnel shift patterns, similar to rotation but
+// with different shifted sources.
 SDValue DAGCombiner::MatchRotate(SDValue LHS, SDValue RHS, const SDLoc &DL) {
   // Must be a legal type.  Expanded 'n promoted things won't work with rotates.
   EVT VT = LHS.getValueType();
   if (!TLI.isTypeLegal(VT))
     return SDValue();
 
-  // The target must have at least one rotate flavor.
+  // The target must have at least one rotate/funnel flavor.
   bool HasROTL = hasOperation(ISD::ROTL, VT);
   bool HasROTR = hasOperation(ISD::ROTR, VT);
-  if (!HasROTL && !HasROTR)
+  bool HasFSHL = hasOperation(ISD::FSHL, VT);
+  bool HasFSHR = hasOperation(ISD::FSHR, VT);
+  if (!HasROTL && !HasROTR && !HasFSHL && !HasFSHR)
     return SDValue();
 
   // Check for truncated rotate.
@@ -6315,12 +6542,13 @@ SDValue DAGCombiner::MatchRotate(SDValue LHS, SDValue RHS, const SDLoc &DL) {
 
   // At this point we've matched or extracted a shift op on each side.
 
-  if (LHSShift.getOperand(0) != RHSShift.getOperand(0))
-    return SDValue(); // Not shifting the same value.
-
   if (LHSShift.getOpcode() == RHSShift.getOpcode())
     return SDValue(); // Shifts must disagree.
 
+  bool IsRotate = LHSShift.getOperand(0) == RHSShift.getOperand(0);
+  if (!IsRotate && !(HasFSHL || HasFSHR))
+    return SDValue(); // Requires funnel shift support.
+
   // Canonicalize shl to left side in a shl/srl pair.
   if (RHSShift.getOpcode() == ISD::SHL) {
     std::swap(LHS, RHS);
@@ -6336,13 +6564,21 @@ SDValue DAGCombiner::MatchRotate(SDValue LHS, SDValue RHS, const SDLoc &DL) {
 
   // fold (or (shl x, C1), (srl x, C2)) -> (rotl x, C1)
   // fold (or (shl x, C1), (srl x, C2)) -> (rotr x, C2)
+  // fold (or (shl x, C1), (srl y, C2)) -> (fshl x, y, C1)
+  // fold (or (shl x, C1), (srl y, C2)) -> (fshr x, y, C2)
+  // iff C1+C2 == EltSizeInBits
   auto MatchRotateSum = [EltSizeInBits](ConstantSDNode *LHS,
                                         ConstantSDNode *RHS) {
     return (LHS->getAPIntValue() + RHS->getAPIntValue()) == EltSizeInBits;
   };
   if (ISD::matchBinaryPredicate(LHSShiftAmt, RHSShiftAmt, MatchRotateSum)) {
-    SDValue Rot = DAG.getNode(HasROTL ? ISD::ROTL : ISD::ROTR, DL, VT,
-                              LHSShiftArg, HasROTL ? LHSShiftAmt : RHSShiftAmt);
+    SDValue Res;
+    if (IsRotate && (HasROTL || HasROTR))
+      Res = DAG.getNode(HasROTL ? ISD::ROTL : ISD::ROTR, DL, VT, LHSShiftArg,
+                        HasROTL ? LHSShiftAmt : RHSShiftAmt);
+    else
+      Res = DAG.getNode(HasFSHL ? ISD::FSHL : ISD::FSHR, DL, VT, LHSShiftArg,
+                        RHSShiftArg, HasFSHL ? LHSShiftAmt : RHSShiftAmt);
 
     // If there is an AND of either shifted operand, apply it to the result.
     if (LHSMask.getNode() || RHSMask.getNode()) {
@@ -6360,10 +6596,10 @@ SDValue DAGCombiner::MatchRotate(SDValue LHS, SDValue RHS, const SDLoc &DL) {
                            DAG.getNode(ISD::OR, DL, VT, RHSMask, LHSBits));
       }
 
-      Rot = DAG.getNode(ISD::AND, DL, VT, Rot, Mask);
+      Res = DAG.getNode(ISD::AND, DL, VT, Res, Mask);
     }
 
-    return Rot;
+    return Res;
   }
 
   // If there is a mask here, and we have a variable shift, we can't be sure
@@ -6386,13 +6622,29 @@ SDValue DAGCombiner::MatchRotate(SDValue LHS, SDValue RHS, const SDLoc &DL) {
     RExtOp0 = RHSShiftAmt.getOperand(0);
   }
 
-  SDValue TryL = MatchRotatePosNeg(LHSShiftArg, LHSShiftAmt, RHSShiftAmt,
-                                   LExtOp0, RExtOp0, ISD::ROTL, ISD::ROTR, DL);
+  if (IsRotate && (HasROTL || HasROTR)) {
+    SDValue TryL =
+        MatchRotatePosNeg(LHSShiftArg, LHSShiftAmt, RHSShiftAmt, LExtOp0,
+                          RExtOp0, ISD::ROTL, ISD::ROTR, DL);
+    if (TryL)
+      return TryL;
+
+    SDValue TryR =
+        MatchRotatePosNeg(RHSShiftArg, RHSShiftAmt, LHSShiftAmt, RExtOp0,
+                          LExtOp0, ISD::ROTR, ISD::ROTL, DL);
+    if (TryR)
+      return TryR;
+  }
+
+  SDValue TryL =
+      MatchFunnelPosNeg(LHSShiftArg, RHSShiftArg, LHSShiftAmt, RHSShiftAmt,
+                        LExtOp0, RExtOp0, ISD::FSHL, ISD::FSHR, DL);
   if (TryL)
     return TryL;
 
-  SDValue TryR = MatchRotatePosNeg(RHSShiftArg, RHSShiftAmt, LHSShiftAmt,
-                                   RExtOp0, LExtOp0, ISD::ROTR, ISD::ROTL, DL);
+  SDValue TryR =
+      MatchFunnelPosNeg(LHSShiftArg, RHSShiftArg, RHSShiftAmt, LHSShiftAmt,
+                        RExtOp0, LExtOp0, ISD::FSHR, ISD::FSHL, DL);
   if (TryR)
     return TryR;
 
@@ -6617,9 +6869,9 @@ SDValue DAGCombiner::MatchStoreCombine(StoreSDNode *N) {
   if (LegalOperations && !TLI.isOperationLegal(ISD::STORE, VT))
     return SDValue();
 
-  // Check if all the bytes of the combined value we are looking at are stored 
-  // to the same base address. Collect bytes offsets from Base address into 
-  // ByteOffsets. 
+  // Check if all the bytes of the combined value we are looking at are stored
+  // to the same base address. Collect bytes offsets from Base address into
+  // ByteOffsets.
   SDValue CombinedValue;
   SmallVector<int64_t, 8> ByteOffsets(Width, INT64_MAX);
   int64_t FirstOffset = INT64_MAX;
@@ -6637,17 +6889,16 @@ SDValue DAGCombiner::MatchStoreCombine(StoreSDNode *N) {
     SDValue Value = Trunc.getOperand(0);
     if (Value.getOpcode() == ISD::SRL ||
         Value.getOpcode() == ISD::SRA) {
-      ConstantSDNode *ShiftOffset =
-        dyn_cast<ConstantSDNode>(Value.getOperand(1));
-      // Trying to match the following pattern. The shift offset must be 
+      auto *ShiftOffset = dyn_cast<ConstantSDNode>(Value.getOperand(1));
+      // Trying to match the following pattern. The shift offset must be
       // a constant and a multiple of 8. It is the byte offset in "y".
-      // 
+      //
       // x = srl y, offset
-      // i8 z = trunc x 
+      // i8 z = trunc x
       // store z, ...
       if (!ShiftOffset || (ShiftOffset->getSExtValue() % 8))
         return SDValue();
-  
+
      Offset = ShiftOffset->getSExtValue()/8;
      Value = Value.getOperand(0);
     }
@@ -6692,7 +6943,7 @@ SDValue DAGCombiner::MatchStoreCombine(StoreSDNode *N) {
   assert(FirstOffset != INT64_MAX && "First byte offset must be set");
   assert(FirstStore && "First store must be set");
 
-  // Check if the bytes of the combined value we are looking at match with 
+  // Check if the bytes of the combined value we are looking at match with
   // either big or little endian value store.
   Optional<bool> IsBigEndian = isBigEndian(ByteOffsets, FirstOffset);
   if (!IsBigEndian.hasValue())
@@ -7037,20 +7288,22 @@ SDValue DAGCombiner::visitXOR(SDNode *N) {
   SDLoc DL(N);
   if (N0.isUndef() && N1.isUndef())
     return DAG.getConstant(0, DL, VT);
+
   // fold (xor x, undef) -> undef
   if (N0.isUndef())
     return N0;
   if (N1.isUndef())
     return N1;
+
   // fold (xor c1, c2) -> c1^c2
-  ConstantSDNode *N0C = getAsNonOpaqueConstant(N0);
-  ConstantSDNode *N1C = getAsNonOpaqueConstant(N1);
-  if (N0C && N1C)
-    return DAG.FoldConstantArithmetic(ISD::XOR, DL, VT, N0C, N1C);
+  if (SDValue C = DAG.FoldConstantArithmetic(ISD::XOR, DL, VT, {N0, N1}))
+    return C;
+
   // canonicalize constant to RHS
   if (DAG.isConstantIntBuildVectorOrConstantInt(N0) &&
      !DAG.isConstantIntBuildVectorOrConstantInt(N1))
     return DAG.getNode(ISD::XOR, DL, VT, N1, N0);
+
   // fold (xor x, 0) -> x
   if (isNullConstant(N1))
     return N0;
@@ -7065,7 +7318,8 @@ SDValue DAGCombiner::visitXOR(SDNode *N) {
   // fold !(x cc y) -> (x !cc y)
   unsigned N0Opcode = N0.getOpcode();
   SDValue LHS, RHS, CC;
-  if (TLI.isConstTrueVal(N1.getNode()) && isSetCCEquivalent(N0, LHS, RHS, CC)) {
+  if (TLI.isConstTrueVal(N1.getNode()) &&
+      isSetCCEquivalent(N0, LHS, RHS, CC, /*MatchStrict*/true)) {
     ISD::CondCode NotCC = ISD::getSetCCInverse(cast<CondCodeSDNode>(CC)->get(),
                                                LHS.getValueType());
     if (!LegalOperations ||
@@ -7078,6 +7332,21 @@ SDValue DAGCombiner::visitXOR(SDNode *N) {
       case ISD::SELECT_CC:
         return DAG.getSelectCC(SDLoc(N0), LHS, RHS, N0.getOperand(2),
                                N0.getOperand(3), NotCC);
+      case ISD::STRICT_FSETCC:
+      case ISD::STRICT_FSETCCS: {
+        if (N0.hasOneUse()) {
+          // FIXME Can we handle multiple uses? Could we token factor the chain
+          // results from the new/old setcc?
+          SDValue SetCC = DAG.getSetCC(SDLoc(N0), VT, LHS, RHS, NotCC,
+                                       N0.getOperand(0),
+                                       N0Opcode == ISD::STRICT_FSETCCS);
+          CombineTo(N, SetCC);
+          DAG.ReplaceAllUsesOfValueWith(N0.getValue(1), SetCC.getValue(1));
+          recursivelyDeleteUnusedNodes(N0.getNode());
+          return SDValue(N, 0); // Return N so it doesn't get rechecked!
+        }
+        break;
+      }
       }
     }
   }
@@ -7412,15 +7681,29 @@ SDValue DAGCombiner::visitRotate(SDNode *N) {
   }
 
   // fold (rot x, c) -> (rot x, c % BitSize)
-  // TODO - support non-uniform vector amounts.
-  if (ConstantSDNode *Cst = isConstOrConstSplat(N1)) {
-    if (Cst->getAPIntValue().uge(Bitsize)) {
-      uint64_t RotAmt = Cst->getAPIntValue().urem(Bitsize);
-      return DAG.getNode(N->getOpcode(), dl, VT, N0,
-                         DAG.getConstant(RotAmt, dl, N1.getValueType()));
-    }
+  bool OutOfRange = false;
+  auto MatchOutOfRange = [Bitsize, &OutOfRange](ConstantSDNode *C) {
+    OutOfRange |= C->getAPIntValue().uge(Bitsize);
+    return true;
+  };
+  if (ISD::matchUnaryPredicate(N1, MatchOutOfRange) && OutOfRange) {
+    EVT AmtVT = N1.getValueType();
+    SDValue Bits = DAG.getConstant(Bitsize, dl, AmtVT);
+    if (SDValue Amt =
+            DAG.FoldConstantArithmetic(ISD::UREM, dl, AmtVT, {N1, Bits}))
+      return DAG.getNode(N->getOpcode(), dl, VT, N0, Amt);
   }
 
+  // rot i16 X, 8 --> bswap X
+  auto *RotAmtC = isConstOrConstSplat(N1);
+  if (RotAmtC && RotAmtC->getAPIntValue() == 8 &&
+      VT.getScalarSizeInBits() == 16 && hasOperation(ISD::BSWAP, VT))
+    return DAG.getNode(ISD::BSWAP, dl, VT, N0);
+
+  // Simplify the operands using demanded-bits information.
+  if (SimplifyDemandedBits(SDValue(N, 0)))
+    return SDValue(N, 0);
+
   // fold (rot* x, (trunc (and y, c))) -> (rot* x, (and (trunc y), (trunc c))).
   if (N1.getOpcode() == ISD::TRUNCATE &&
       N1.getOperand(0).getOpcode() == ISD::AND) {
@@ -7437,12 +7720,11 @@ SDValue DAGCombiner::visitRotate(SDNode *N) {
       EVT ShiftVT = C1->getValueType(0);
       bool SameSide = (N->getOpcode() == NextOp);
       unsigned CombineOp = SameSide ? ISD::ADD : ISD::SUB;
-      if (SDValue CombinedShift =
-              DAG.FoldConstantArithmetic(CombineOp, dl, ShiftVT, C1, C2)) {
+      if (SDValue CombinedShift = DAG.FoldConstantArithmetic(
+              CombineOp, dl, ShiftVT, {N1, N0.getOperand(1)})) {
         SDValue BitsizeC = DAG.getConstant(Bitsize, dl, ShiftVT);
         SDValue CombinedShiftNorm = DAG.FoldConstantArithmetic(
-            ISD::SREM, dl, ShiftVT, CombinedShift.getNode(),
-            BitsizeC.getNode());
+            ISD::SREM, dl, ShiftVT, {CombinedShift, BitsizeC});
         return DAG.getNode(N->getOpcode(), dl, VT, N0->getOperand(0),
                            CombinedShiftNorm);
       }
@@ -7478,8 +7760,8 @@ SDValue DAGCombiner::visitSHL(SDNode *N) {
         if (N01CV && N01CV->isConstant() && N00.getOpcode() == ISD::SETCC &&
             TLI.getBooleanContents(N00.getOperand(0).getValueType()) ==
                 TargetLowering::ZeroOrNegativeOneBooleanContent) {
-          if (SDValue C = DAG.FoldConstantArithmetic(ISD::SHL, SDLoc(N), VT,
-                                                     N01CV, N1CV))
+          if (SDValue C =
+                  DAG.FoldConstantArithmetic(ISD::SHL, SDLoc(N), VT, {N01, N1}))
             return DAG.getNode(ISD::AND, SDLoc(N), VT, N00, C);
         }
       }
@@ -7489,10 +7771,8 @@ SDValue DAGCombiner::visitSHL(SDNode *N) {
   ConstantSDNode *N1C = isConstOrConstSplat(N1);
 
   // fold (shl c1, c2) -> c1<<c2
-  // TODO - support non-uniform vector shift amounts.
-  ConstantSDNode *N0C = getAsNonOpaqueConstant(N0);
-  if (N0C && N1C && !N1C->isOpaque())
-    return DAG.FoldConstantArithmetic(ISD::SHL, SDLoc(N), VT, N0C, N1C);
+  if (SDValue C = DAG.FoldConstantArithmetic(ISD::SHL, SDLoc(N), VT, {N0, N1}))
+    return C;
 
   if (SDValue NewSel = foldBinOpIntoSelect(N))
     return NewSel;
@@ -7509,8 +7789,7 @@ SDValue DAGCombiner::visitSHL(SDNode *N) {
       return DAG.getNode(ISD::SHL, SDLoc(N), VT, N0, NewOp1);
   }
 
-  // TODO - support non-uniform vector shift amounts.
-  if (N1C && SimplifyDemandedBits(SDValue(N, 0)))
+  if (SimplifyDemandedBits(SDValue(N, 0)))
     return SDValue(N, 0);
 
   // fold (shl (shl x, c1), c2) -> 0 or (shl x, (add c1, c2))
@@ -7698,9 +7977,90 @@ SDValue DAGCombiner::visitSHL(SDNode *N) {
     if (SDValue NewSHL = visitShiftByConstant(N))
       return NewSHL;
 
+  // Fold (shl (vscale * C0), C1) to (vscale * (C0 << C1)).
+  if (N0.getOpcode() == ISD::VSCALE)
+    if (ConstantSDNode *NC1 = isConstOrConstSplat(N->getOperand(1))) {
+      auto DL = SDLoc(N);
+      APInt C0 = N0.getConstantOperandAPInt(0);
+      APInt C1 = NC1->getAPIntValue();
+      return DAG.getVScale(DL, VT, C0 << C1);
+    }
+
   return SDValue();
 }
 
+// Transform a right shift of a multiply into a multiply-high.
+// Examples:
+// (srl (mul (zext i32:$a to i64), (zext i32:$a to i64)), 32) -> (mulhu $a, $b)
+// (sra (mul (sext i32:$a to i64), (sext i32:$a to i64)), 32) -> (mulhs $a, $b)
+static SDValue combineShiftToMULH(SDNode *N, SelectionDAG &DAG,
+                                  const TargetLowering &TLI) {
+  assert((N->getOpcode() == ISD::SRL || N->getOpcode() == ISD::SRA) &&
+         "SRL or SRA node is required here!");
+
+  // Check the shift amount. Proceed with the transformation if the shift
+  // amount is constant.
+  ConstantSDNode *ShiftAmtSrc = isConstOrConstSplat(N->getOperand(1));
+  if (!ShiftAmtSrc)
+    return SDValue();
+
+  SDLoc DL(N);
+
+  // The operation feeding into the shift must be a multiply.
+  SDValue ShiftOperand = N->getOperand(0);
+  if (ShiftOperand.getOpcode() != ISD::MUL)
+    return SDValue();
+
+  // Both operands must be equivalent extend nodes.
+  SDValue LeftOp = ShiftOperand.getOperand(0);
+  SDValue RightOp = ShiftOperand.getOperand(1);
+  bool IsSignExt = LeftOp.getOpcode() == ISD::SIGN_EXTEND;
+  bool IsZeroExt = LeftOp.getOpcode() == ISD::ZERO_EXTEND;
+
+  if ((!(IsSignExt || IsZeroExt)) || LeftOp.getOpcode() != RightOp.getOpcode())
+    return SDValue();
+
+  EVT WideVT1 = LeftOp.getValueType();
+  EVT WideVT2 = RightOp.getValueType();
+  (void)WideVT2;
+  // Proceed with the transformation if the wide types match.
+  assert((WideVT1 == WideVT2) &&
+         "Cannot have a multiply node with two different operand types.");
+
+  EVT NarrowVT = LeftOp.getOperand(0).getValueType();
+  // Check that the two extend nodes are the same type.
+  if (NarrowVT !=  RightOp.getOperand(0).getValueType())
+    return SDValue();
+
+  // Only transform into mulh if mulh for the narrow type is cheaper than
+  // a multiply followed by a shift. This should also check if mulh is
+  // legal for NarrowVT on the target.
+  if (!TLI.isMulhCheaperThanMulShift(NarrowVT))
+      return SDValue();
+
+  // Proceed with the transformation if the wide type is twice as large
+  // as the narrow type.
+  unsigned NarrowVTSize = NarrowVT.getScalarSizeInBits();
+  if (WideVT1.getScalarSizeInBits() != 2 * NarrowVTSize)
+    return SDValue();
+
+  // Check the shift amount with the narrow type size.
+  // Proceed with the transformation if the shift amount is the width
+  // of the narrow type.
+  unsigned ShiftAmt = ShiftAmtSrc->getZExtValue();
+  if (ShiftAmt != NarrowVTSize)
+    return SDValue();
+
+  // If the operation feeding into the MUL is a sign extend (sext),
+  // we use mulhs. Othewise, zero extends (zext) use mulhu.
+  unsigned MulhOpcode = IsSignExt ? ISD::MULHS : ISD::MULHU;
+
+  SDValue Result = DAG.getNode(MulhOpcode, DL, NarrowVT, LeftOp.getOperand(0),
+                               RightOp.getOperand(0));
+  return (N->getOpcode() == ISD::SRA ? DAG.getSExtOrTrunc(Result, DL, WideVT1)
+                                     : DAG.getZExtOrTrunc(Result, DL, WideVT1));
+}
+
 SDValue DAGCombiner::visitSRA(SDNode *N) {
   SDValue N0 = N->getOperand(0);
   SDValue N1 = N->getOperand(1);
@@ -7724,10 +8084,8 @@ SDValue DAGCombiner::visitSRA(SDNode *N) {
   ConstantSDNode *N1C = isConstOrConstSplat(N1);
 
   // fold (sra c1, c2) -> (sra c1, c2)
-  // TODO - support non-uniform vector shift amounts.
-  ConstantSDNode *N0C = getAsNonOpaqueConstant(N0);
-  if (N0C && N1C && !N1C->isOpaque())
-    return DAG.FoldConstantArithmetic(ISD::SRA, SDLoc(N), VT, N0C, N1C);
+  if (SDValue C = DAG.FoldConstantArithmetic(ISD::SRA, SDLoc(N), VT, {N0, N1}))
+    return C;
 
   if (SDValue NewSel = foldBinOpIntoSelect(N))
     return NewSel;
@@ -7818,7 +8176,7 @@ SDValue DAGCombiner::visitSRA(SDNode *N) {
   // We convert trunc/ext to opposing shifts in IR, but casts may be cheaper.
   //   sra (add (shl X, N1C), AddC), N1C -->
   //   sext (add (trunc X to (width - N1C)), AddC')
-  if (!LegalTypes && N0.getOpcode() == ISD::ADD && N0.hasOneUse() && N1C &&
+  if (N0.getOpcode() == ISD::ADD && N0.hasOneUse() && N1C &&
       N0.getOperand(0).getOpcode() == ISD::SHL &&
       N0.getOperand(0).getOperand(1) == N1 && N0.getOperand(0).hasOneUse()) {
     if (ConstantSDNode *AddC = isConstOrConstSplat(N0.getOperand(1))) {
@@ -7835,7 +8193,8 @@ SDValue DAGCombiner::visitSRA(SDNode *N) {
       //       implementation and/or target-specific overrides (because
       //       non-simple types likely require masking when legalized), but that
       //       restriction may conflict with other transforms.
-      if (TruncVT.isSimple() && TLI.isTruncateFree(VT, TruncVT)) {
+      if (TruncVT.isSimple() && isTypeLegal(TruncVT) &&
+          TLI.isTruncateFree(VT, TruncVT)) {
         SDLoc DL(N);
         SDValue Trunc = DAG.getZExtOrTrunc(Shl.getOperand(0), DL, TruncVT);
         SDValue ShiftC = DAG.getConstant(AddC->getAPIntValue().lshr(ShiftAmt).
@@ -7878,8 +8237,7 @@ SDValue DAGCombiner::visitSRA(SDNode *N) {
   }
 
   // Simplify, based on bits shifted out of the LHS.
-  // TODO - support non-uniform vector shift amounts.
-  if (N1C && SimplifyDemandedBits(SDValue(N, 0)))
+  if (SimplifyDemandedBits(SDValue(N, 0)))
     return SDValue(N, 0);
 
   // If the sign bit is known to be zero, switch this to a SRL.
@@ -7890,6 +8248,11 @@ SDValue DAGCombiner::visitSRA(SDNode *N) {
     if (SDValue NewSRA = visitShiftByConstant(N))
       return NewSRA;
 
+  // Try to transform this shift into a multiply-high if
+  // it matches the appropriate pattern detected in combineShiftToMULH.
+  if (SDValue MULH = combineShiftToMULH(N, DAG, TLI))
+    return MULH;
+
   return SDValue();
 }
 
@@ -7910,10 +8273,8 @@ SDValue DAGCombiner::visitSRL(SDNode *N) {
   ConstantSDNode *N1C = isConstOrConstSplat(N1);
 
   // fold (srl c1, c2) -> c1 >>u c2
-  // TODO - support non-uniform vector shift amounts.
-  ConstantSDNode *N0C = getAsNonOpaqueConstant(N0);
-  if (N0C && N1C && !N1C->isOpaque())
-    return DAG.FoldConstantArithmetic(ISD::SRL, SDLoc(N), VT, N0C, N1C);
+  if (SDValue C = DAG.FoldConstantArithmetic(ISD::SRL, SDLoc(N), VT, {N0, N1}))
+    return C;
 
   if (SDValue NewSel = foldBinOpIntoSelect(N))
     return NewSel;
@@ -8077,8 +8438,7 @@ SDValue DAGCombiner::visitSRL(SDNode *N) {
 
   // fold operands of srl based on knowledge that the low bits are not
   // demanded.
-  // TODO - support non-uniform vector shift amounts.
-  if (N1C && SimplifyDemandedBits(SDValue(N, 0)))
+  if (SimplifyDemandedBits(SDValue(N, 0)))
     return SDValue(N, 0);
 
   if (N1C && !N1C->isOpaque())
@@ -8118,6 +8478,11 @@ SDValue DAGCombiner::visitSRL(SDNode *N) {
     }
   }
 
+  // Try to transform this shift into a multiply-high if
+  // it matches the appropriate pattern detected in combineShiftToMULH.
+  if (SDValue MULH = combineShiftToMULH(N, DAG, TLI))
+    return MULH;
+
   return SDValue();
 }
 
@@ -8167,6 +8532,45 @@ SDValue DAGCombiner::visitFunnelShift(SDNode *N) {
       return DAG.getNode(ISD::SHL, SDLoc(N), VT, N0,
                          DAG.getConstant(IsFSHL ? ShAmt : BitWidth - ShAmt,
                                          SDLoc(N), ShAmtTy));
+
+    // fold (fshl ld1, ld0, c) -> (ld0[ofs]) iff ld0 and ld1 are consecutive.
+    // fold (fshr ld1, ld0, c) -> (ld0[ofs]) iff ld0 and ld1 are consecutive.
+    // TODO - bigendian support once we have test coverage.
+    // TODO - can we merge this with CombineConseutiveLoads/MatchLoadCombine?
+    // TODO - permit LHS EXTLOAD if extensions are shifted out.
+    if ((BitWidth % 8) == 0 && (ShAmt % 8) == 0 && !VT.isVector() &&
+        !DAG.getDataLayout().isBigEndian()) {
+      auto *LHS = dyn_cast<LoadSDNode>(N0);
+      auto *RHS = dyn_cast<LoadSDNode>(N1);
+      if (LHS && RHS && LHS->isSimple() && RHS->isSimple() &&
+          LHS->getAddressSpace() == RHS->getAddressSpace() &&
+          (LHS->hasOneUse() || RHS->hasOneUse()) && ISD::isNON_EXTLoad(RHS) &&
+          ISD::isNON_EXTLoad(LHS)) {
+        if (DAG.areNonVolatileConsecutiveLoads(LHS, RHS, BitWidth / 8, 1)) {
+          SDLoc DL(RHS);
+          uint64_t PtrOff =
+              IsFSHL ? (((BitWidth - ShAmt) % BitWidth) / 8) : (ShAmt / 8);
+          Align NewAlign = commonAlignment(RHS->getAlign(), PtrOff);
+          bool Fast = false;
+          if (TLI.allowsMemoryAccess(*DAG.getContext(), DAG.getDataLayout(), VT,
+                                     RHS->getAddressSpace(), NewAlign,
+                                     RHS->getMemOperand()->getFlags(), &Fast) &&
+              Fast) {
+            SDValue NewPtr =
+                DAG.getMemBasePlusOffset(RHS->getBasePtr(), PtrOff, DL);
+            AddToWorklist(NewPtr.getNode());
+            SDValue Load = DAG.getLoad(
+                VT, DL, RHS->getChain(), NewPtr,
+                RHS->getPointerInfo().getWithOffset(PtrOff), NewAlign,
+                RHS->getMemOperand()->getFlags(), RHS->getAAInfo());
+            // Replace the old load's chain with the new load's chain.
+            WorklistRemover DeadNodes(*this);
+            DAG.ReplaceAllUsesOfValueWith(N1.getValue(1), Load.getValue(1));
+            return Load;
+          }
+        }
+      }
+    }
   }
 
   // fold fshr(undef_or_zero, N1, N2) -> lshr(N1, N2)
@@ -8616,7 +9020,7 @@ SDValue DAGCombiner::visitSELECT(SDNode *N) {
         // Create the actual or node if we can generate good code for it.
         if (!normalizeToSequence) {
           SDValue Or = DAG.getNode(ISD::OR, DL, N0.getValueType(), N0, N2_0);
-          return DAG.getNode(ISD::SELECT, DL, N1.getValueType(), Or, N1, 
+          return DAG.getNode(ISD::SELECT, DL, N1.getValueType(), Or, N1,
                              N2_2, Flags);
         }
         // Otherwise see if we can optimize to a better pattern.
@@ -8832,6 +9236,8 @@ SDValue DAGCombiner::foldVSelectOfConstants(SDNode *N) {
     SDValue N2Elt = N2.getOperand(i);
     if (N1Elt.isUndef() || N2Elt.isUndef())
       continue;
+    if (N1Elt.getValueType() != N2Elt.getValueType())
+      continue;
 
     const APInt &C1 = cast<ConstantSDNode>(N1Elt)->getAPIntValue();
     const APInt &C2 = cast<ConstantSDNode>(N2Elt)->getAPIntValue();
@@ -9402,8 +9808,7 @@ SDValue DAGCombiner::CombineZExtLogicopShiftLoad(SDNode *N) {
   SDValue Shift = DAG.getNode(N1.getOpcode(), DL1, VT, ExtLoad,
                               N1.getOperand(1));
 
-  APInt Mask = cast<ConstantSDNode>(N0.getOperand(1))->getAPIntValue();
-  Mask = Mask.zext(VT.getSizeInBits());
+  APInt Mask = N0.getConstantOperandAPInt(1).zext(VT.getSizeInBits());
   SDLoc DL0(N0);
   SDValue And = DAG.getNode(N0.getOpcode(), DL0, VT, Shift,
                             DAG.getConstant(Mask, DL0, VT));
@@ -9709,8 +10114,7 @@ SDValue DAGCombiner::visitSIGN_EXTEND(SDNode *N) {
                                          LN00->getChain(), LN00->getBasePtr(),
                                          LN00->getMemoryVT(),
                                          LN00->getMemOperand());
-        APInt Mask = cast<ConstantSDNode>(N0.getOperand(1))->getAPIntValue();
-        Mask = Mask.sext(VT.getSizeInBits());
+        APInt Mask = N0.getConstantOperandAPInt(1).sext(VT.getSizeInBits());
         SDValue And = DAG.getNode(N0.getOpcode(), DL, VT,
                                   ExtLoad, DAG.getConstant(Mask, DL, VT));
         ExtendSetCCUses(SetCCs, N0.getOperand(0), ExtLoad, ISD::SIGN_EXTEND);
@@ -9948,7 +10352,7 @@ SDValue DAGCombiner::visitZERO_EXTEND(SDNode *N) {
       if (!LegalOperations || (TLI.isOperationLegal(ISD::AND, SrcVT) &&
                                TLI.isOperationLegal(ISD::ZERO_EXTEND, VT))) {
         SDValue Op = N0.getOperand(0);
-        Op = DAG.getZeroExtendInReg(Op, SDLoc(N), MinVT.getScalarType());
+        Op = DAG.getZeroExtendInReg(Op, SDLoc(N), MinVT);
         AddToWorklist(Op.getNode());
         SDValue ZExtOrTrunc = DAG.getZExtOrTrunc(Op, SDLoc(N), VT);
         // Transfer the debug info; the new node is equivalent to N0.
@@ -9960,7 +10364,7 @@ SDValue DAGCombiner::visitZERO_EXTEND(SDNode *N) {
     if (!LegalOperations || TLI.isOperationLegal(ISD::AND, VT)) {
       SDValue Op = DAG.getAnyExtOrTrunc(N0.getOperand(0), SDLoc(N), VT);
       AddToWorklist(Op.getNode());
-      SDValue And = DAG.getZeroExtendInReg(Op, SDLoc(N), MinVT.getScalarType());
+      SDValue And = DAG.getZeroExtendInReg(Op, SDLoc(N), MinVT);
       // We may safely transfer the debug info describing the truncate node over
       // to the equivalent and operation.
       DAG.transferDbgValues(N0, And);
@@ -9978,8 +10382,7 @@ SDValue DAGCombiner::visitZERO_EXTEND(SDNode *N) {
        !TLI.isZExtFree(N0.getValueType(), VT))) {
     SDValue X = N0.getOperand(0).getOperand(0);
     X = DAG.getAnyExtOrTrunc(X, SDLoc(X), VT);
-    APInt Mask = cast<ConstantSDNode>(N0.getOperand(1))->getAPIntValue();
-    Mask = Mask.zext(VT.getSizeInBits());
+    APInt Mask = N0.getConstantOperandAPInt(1).zext(VT.getSizeInBits());
     SDLoc DL(N);
     return DAG.getNode(ISD::AND, DL, VT,
                        X, DAG.getConstant(Mask, DL, VT));
@@ -10033,8 +10436,7 @@ SDValue DAGCombiner::visitZERO_EXTEND(SDNode *N) {
                                          LN00->getChain(), LN00->getBasePtr(),
                                          LN00->getMemoryVT(),
                                          LN00->getMemOperand());
-        APInt Mask = cast<ConstantSDNode>(N0.getOperand(1))->getAPIntValue();
-        Mask = Mask.zext(VT.getSizeInBits());
+        APInt Mask = N0.getConstantOperandAPInt(1).zext(VT.getSizeInBits());
         SDLoc DL(N);
         SDValue And = DAG.getNode(N0.getOpcode(), DL, VT,
                                   ExtLoad, DAG.getConstant(Mask, DL, VT));
@@ -10087,23 +10489,22 @@ SDValue DAGCombiner::visitZERO_EXTEND(SDNode *N) {
       // that the element size of the sext'd result matches the element size of
       // the compare operands.
       SDLoc DL(N);
-      SDValue VecOnes = DAG.getConstant(1, DL, VT);
       if (VT.getSizeInBits() == N00VT.getSizeInBits()) {
-        // zext(setcc) -> (and (vsetcc), (1, 1, ...) for vectors.
+        // zext(setcc) -> zext_in_reg(vsetcc) for vectors.
         SDValue VSetCC = DAG.getNode(ISD::SETCC, DL, VT, N0.getOperand(0),
                                      N0.getOperand(1), N0.getOperand(2));
-        return DAG.getNode(ISD::AND, DL, VT, VSetCC, VecOnes);
+        return DAG.getZeroExtendInReg(VSetCC, DL, N0.getValueType());
       }
 
       // If the desired elements are smaller or larger than the source
       // elements we can use a matching integer vector type and then
-      // truncate/sign extend.
+      // truncate/any extend followed by zext_in_reg.
       EVT MatchingVectorType = N00VT.changeVectorElementTypeToInteger();
       SDValue VsetCC =
           DAG.getNode(ISD::SETCC, DL, MatchingVectorType, N0.getOperand(0),
                       N0.getOperand(1), N0.getOperand(2));
-      return DAG.getNode(ISD::AND, DL, VT, DAG.getSExtOrTrunc(VsetCC, DL, VT),
-                         VecOnes);
+      return DAG.getZeroExtendInReg(DAG.getAnyExtOrTrunc(VsetCC, DL, VT), DL,
+                                    N0.getValueType());
     }
 
     // zext(setcc x,y,cc) -> select_cc x, y, 1, 0, cc
@@ -10134,7 +10535,7 @@ SDValue DAGCombiner::visitZERO_EXTEND(SDNode *N) {
     SDLoc DL(N);
 
     // Ensure that the shift amount is wide enough for the shifted value.
-    if (VT.getSizeInBits() >= 256)
+    if (Log2_32_Ceil(VT.getSizeInBits()) > ShAmt.getValueSizeInBits())
       ShAmt = DAG.getNode(ISD::ZERO_EXTEND, DL, MVT::i32, ShAmt);
 
     return DAG.getNode(N0.getOpcode(), DL, VT,
@@ -10194,8 +10595,7 @@ SDValue DAGCombiner::visitANY_EXTEND(SDNode *N) {
     SDLoc DL(N);
     SDValue X = N0.getOperand(0).getOperand(0);
     X = DAG.getAnyExtOrTrunc(X, DL, VT);
-    APInt Mask = cast<ConstantSDNode>(N0.getOperand(1))->getAPIntValue();
-    Mask = Mask.zext(VT.getSizeInBits());
+    APInt Mask = N0.getConstantOperandAPInt(1).zext(VT.getSizeInBits());
     return DAG.getNode(ISD::AND, DL, VT,
                        X, DAG.getConstant(Mask, DL, VT));
   }
@@ -10355,6 +10755,45 @@ SDValue DAGCombiner::visitAssertExt(SDNode *N) {
   return SDValue();
 }
 
+SDValue DAGCombiner::visitAssertAlign(SDNode *N) {
+  SDLoc DL(N);
+
+  Align AL = cast<AssertAlignSDNode>(N)->getAlign();
+  SDValue N0 = N->getOperand(0);
+
+  // Fold (assertalign (assertalign x, AL0), AL1) ->
+  // (assertalign x, max(AL0, AL1))
+  if (auto *AAN = dyn_cast<AssertAlignSDNode>(N0))
+    return DAG.getAssertAlign(DL, N0.getOperand(0),
+                              std::max(AL, AAN->getAlign()));
+
+  // In rare cases, there are trivial arithmetic ops in source operands. Sink
+  // this assert down to source operands so that those arithmetic ops could be
+  // exposed to the DAG combining.
+  switch (N0.getOpcode()) {
+  default:
+    break;
+  case ISD::ADD:
+  case ISD::SUB: {
+    unsigned AlignShift = Log2(AL);
+    SDValue LHS = N0.getOperand(0);
+    SDValue RHS = N0.getOperand(1);
+    unsigned LHSAlignShift = DAG.computeKnownBits(LHS).countMinTrailingZeros();
+    unsigned RHSAlignShift = DAG.computeKnownBits(RHS).countMinTrailingZeros();
+    if (LHSAlignShift >= AlignShift || RHSAlignShift >= AlignShift) {
+      if (LHSAlignShift < AlignShift)
+        LHS = DAG.getAssertAlign(DL, LHS, AL);
+      if (RHSAlignShift < AlignShift)
+        RHS = DAG.getAssertAlign(DL, RHS, AL);
+      return DAG.getNode(N0.getOpcode(), DL, N0.getValueType(), LHS, RHS);
+    }
+    break;
+  }
+  }
+
+  return SDValue();
+}
+
 /// If the result of a wider load is shifted to right of N  bits and then
 /// truncated to a narrower type and where N is a multiple of number of bits of
 /// the narrower type, transform it to a narrower load from address + N / num of
@@ -10435,9 +10874,8 @@ SDValue DAGCombiner::ReduceLoadWidth(SDNode *N) {
       }
 
       // At this point, we must have a load or else we can't do the transform.
-      if (!isa<LoadSDNode>(N0)) return SDValue();
-
-      auto *LN0 = cast<LoadSDNode>(N0);
+      auto *LN0 = dyn_cast<LoadSDNode>(N0);
+      if (!LN0) return SDValue();
 
       // Because a SRL must be assumed to *need* to zero-extend the high bits
       // (as opposed to anyext the high bits), we can't combine the zextload
@@ -10456,8 +10894,7 @@ SDValue DAGCombiner::ReduceLoadWidth(SDNode *N) {
       SDNode *Mask = *(SRL->use_begin());
       if (Mask->getOpcode() == ISD::AND &&
           isa<ConstantSDNode>(Mask->getOperand(1))) {
-        const APInt &ShiftMask =
-          cast<ConstantSDNode>(Mask->getOperand(1))->getAPIntValue();
+        const APInt& ShiftMask = Mask->getConstantOperandAPInt(1);
         if (ShiftMask.isMask()) {
           EVT MaskedVT = EVT::getIntegerVT(*DAG.getContext(),
                                            ShiftMask.countTrailingOnes());
@@ -10487,7 +10924,7 @@ SDValue DAGCombiner::ReduceLoadWidth(SDNode *N) {
 
   LoadSDNode *LN0 = cast<LoadSDNode>(N0);
   // Reducing the width of a volatile load is illegal.  For atomics, we may be
-  // able to reduce the width provided we never widen again. (see D66309)  
+  // able to reduce the width provided we never widen again. (see D66309)
   if (!LN0->isSimple() ||
       !isLegalNarrowLdSt(LN0, ExtType, ExtVT, ShAmt))
     return SDValue();
@@ -10568,26 +11005,27 @@ SDValue DAGCombiner::visitSIGN_EXTEND_INREG(SDNode *N) {
   SDValue N0 = N->getOperand(0);
   SDValue N1 = N->getOperand(1);
   EVT VT = N->getValueType(0);
-  EVT EVT = cast<VTSDNode>(N1)->getVT();
+  EVT ExtVT = cast<VTSDNode>(N1)->getVT();
   unsigned VTBits = VT.getScalarSizeInBits();
-  unsigned EVTBits = EVT.getScalarSizeInBits();
+  unsigned ExtVTBits = ExtVT.getScalarSizeInBits();
 
+  // sext_vector_inreg(undef) = 0 because the top bit will all be the same.
   if (N0.isUndef())
-    return DAG.getUNDEF(VT);
+    return DAG.getConstant(0, SDLoc(N), VT);
 
   // fold (sext_in_reg c1) -> c1
   if (DAG.isConstantIntBuildVectorOrConstantInt(N0))
     return DAG.getNode(ISD::SIGN_EXTEND_INREG, SDLoc(N), VT, N0, N1);
 
   // If the input is already sign extended, just drop the extension.
-  if (DAG.ComputeNumSignBits(N0) >= VTBits-EVTBits+1)
+  if (DAG.ComputeNumSignBits(N0) >= (VTBits - ExtVTBits + 1))
     return N0;
 
   // fold (sext_in_reg (sext_in_reg x, VT2), VT1) -> (sext_in_reg x, minVT) pt2
   if (N0.getOpcode() == ISD::SIGN_EXTEND_INREG &&
-      EVT.bitsLT(cast<VTSDNode>(N0.getOperand(1))->getVT()))
-    return DAG.getNode(ISD::SIGN_EXTEND_INREG, SDLoc(N), VT,
-                       N0.getOperand(0), N1);
+      ExtVT.bitsLT(cast<VTSDNode>(N0.getOperand(1))->getVT()))
+    return DAG.getNode(ISD::SIGN_EXTEND_INREG, SDLoc(N), VT, N0.getOperand(0),
+                       N1);
 
   // fold (sext_in_reg (sext x)) -> (sext x)
   // fold (sext_in_reg (aext x)) -> (sext x)
@@ -10596,8 +11034,8 @@ SDValue DAGCombiner::visitSIGN_EXTEND_INREG(SDNode *N) {
   if (N0.getOpcode() == ISD::SIGN_EXTEND || N0.getOpcode() == ISD::ANY_EXTEND) {
     SDValue N00 = N0.getOperand(0);
     unsigned N00Bits = N00.getScalarValueSizeInBits();
-    if ((N00Bits <= EVTBits ||
-         (N00Bits - DAG.ComputeNumSignBits(N00)) < EVTBits) &&
+    if ((N00Bits <= ExtVTBits ||
+         (N00Bits - DAG.ComputeNumSignBits(N00)) < ExtVTBits) &&
         (!LegalOperations || TLI.isOperationLegal(ISD::SIGN_EXTEND, VT)))
       return DAG.getNode(ISD::SIGN_EXTEND, SDLoc(N), VT, N00);
   }
@@ -10606,7 +11044,7 @@ SDValue DAGCombiner::visitSIGN_EXTEND_INREG(SDNode *N) {
   if ((N0.getOpcode() == ISD::ANY_EXTEND_VECTOR_INREG ||
        N0.getOpcode() == ISD::SIGN_EXTEND_VECTOR_INREG ||
        N0.getOpcode() == ISD::ZERO_EXTEND_VECTOR_INREG) &&
-      N0.getOperand(0).getScalarValueSizeInBits() == EVTBits) {
+      N0.getOperand(0).getScalarValueSizeInBits() == ExtVTBits) {
     if (!LegalOperations ||
         TLI.isOperationLegal(ISD::SIGN_EXTEND_VECTOR_INREG, VT))
       return DAG.getNode(ISD::SIGN_EXTEND_VECTOR_INREG, SDLoc(N), VT,
@@ -10617,14 +11055,14 @@ SDValue DAGCombiner::visitSIGN_EXTEND_INREG(SDNode *N) {
   // iff we are extending the source sign bit.
   if (N0.getOpcode() == ISD::ZERO_EXTEND) {
     SDValue N00 = N0.getOperand(0);
-    if (N00.getScalarValueSizeInBits() == EVTBits &&
+    if (N00.getScalarValueSizeInBits() == ExtVTBits &&
         (!LegalOperations || TLI.isOperationLegal(ISD::SIGN_EXTEND, VT)))
       return DAG.getNode(ISD::SIGN_EXTEND, SDLoc(N), VT, N00, N1);
   }
 
   // fold (sext_in_reg x) -> (zext_in_reg x) if the sign bit is known zero.
-  if (DAG.MaskedValueIsZero(N0, APInt::getOneBitSet(VTBits, EVTBits - 1)))
-    return DAG.getZeroExtendInReg(N0, SDLoc(N), EVT.getScalarType());
+  if (DAG.MaskedValueIsZero(N0, APInt::getOneBitSet(VTBits, ExtVTBits - 1)))
+    return DAG.getZeroExtendInReg(N0, SDLoc(N), ExtVT);
 
   // fold operands of sext_in_reg based on knowledge that the top bits are not
   // demanded.
@@ -10641,11 +11079,11 @@ SDValue DAGCombiner::visitSIGN_EXTEND_INREG(SDNode *N) {
   // We already fold "(sext_in_reg (srl X, 25), i8) -> srl X, 25" above.
   if (N0.getOpcode() == ISD::SRL) {
     if (auto *ShAmt = dyn_cast<ConstantSDNode>(N0.getOperand(1)))
-      if (ShAmt->getAPIntValue().ule(VTBits - EVTBits)) {
+      if (ShAmt->getAPIntValue().ule(VTBits - ExtVTBits)) {
         // We can turn this into an SRA iff the input to the SRL is already sign
         // extended enough.
         unsigned InSignBits = DAG.ComputeNumSignBits(N0.getOperand(0));
-        if (((VTBits - EVTBits) - ShAmt->getZExtValue()) < InSignBits)
+        if (((VTBits - ExtVTBits) - ShAmt->getZExtValue()) < InSignBits)
           return DAG.getNode(ISD::SRA, SDLoc(N), VT, N0.getOperand(0),
                              N0.getOperand(1));
       }
@@ -10657,14 +11095,14 @@ SDValue DAGCombiner::visitSIGN_EXTEND_INREG(SDNode *N) {
   // extends that the target does support.
   if (ISD::isEXTLoad(N0.getNode()) &&
       ISD::isUNINDEXEDLoad(N0.getNode()) &&
-      EVT == cast<LoadSDNode>(N0)->getMemoryVT() &&
+      ExtVT == cast<LoadSDNode>(N0)->getMemoryVT() &&
       ((!LegalOperations && cast<LoadSDNode>(N0)->isSimple() &&
         N0.hasOneUse()) ||
-       TLI.isLoadExtLegal(ISD::SEXTLOAD, VT, EVT))) {
+       TLI.isLoadExtLegal(ISD::SEXTLOAD, VT, ExtVT))) {
     LoadSDNode *LN0 = cast<LoadSDNode>(N0);
     SDValue ExtLoad = DAG.getExtLoad(ISD::SEXTLOAD, SDLoc(N), VT,
                                      LN0->getChain(),
-                                     LN0->getBasePtr(), EVT,
+                                     LN0->getBasePtr(), ExtVT,
                                      LN0->getMemOperand());
     CombineTo(N, ExtLoad);
     CombineTo(N0.getNode(), ExtLoad, ExtLoad.getValue(1));
@@ -10674,13 +11112,13 @@ SDValue DAGCombiner::visitSIGN_EXTEND_INREG(SDNode *N) {
   // fold (sext_inreg (zextload x)) -> (sextload x) iff load has one use
   if (ISD::isZEXTLoad(N0.getNode()) && ISD::isUNINDEXEDLoad(N0.getNode()) &&
       N0.hasOneUse() &&
-      EVT == cast<LoadSDNode>(N0)->getMemoryVT() &&
+      ExtVT == cast<LoadSDNode>(N0)->getMemoryVT() &&
       ((!LegalOperations && cast<LoadSDNode>(N0)->isSimple()) &&
-       TLI.isLoadExtLegal(ISD::SEXTLOAD, VT, EVT))) {
+       TLI.isLoadExtLegal(ISD::SEXTLOAD, VT, ExtVT))) {
     LoadSDNode *LN0 = cast<LoadSDNode>(N0);
     SDValue ExtLoad = DAG.getExtLoad(ISD::SEXTLOAD, SDLoc(N), VT,
                                      LN0->getChain(),
-                                     LN0->getBasePtr(), EVT,
+                                     LN0->getBasePtr(), ExtVT,
                                      LN0->getMemOperand());
     CombineTo(N, ExtLoad);
     CombineTo(N0.getNode(), ExtLoad, ExtLoad.getValue(1));
@@ -10688,11 +11126,10 @@ SDValue DAGCombiner::visitSIGN_EXTEND_INREG(SDNode *N) {
   }
 
   // Form (sext_inreg (bswap >> 16)) or (sext_inreg (rotl (bswap) 16))
-  if (EVTBits <= 16 && N0.getOpcode() == ISD::OR) {
+  if (ExtVTBits <= 16 && N0.getOpcode() == ISD::OR) {
     if (SDValue BSwap = MatchBSwapHWordLow(N0.getNode(), N0.getOperand(0),
                                            N0.getOperand(1), false))
-      return DAG.getNode(ISD::SIGN_EXTEND_INREG, SDLoc(N), VT,
-                         BSwap, N1);
+      return DAG.getNode(ISD::SIGN_EXTEND_INREG, SDLoc(N), VT, BSwap, N1);
   }
 
   return SDValue();
@@ -10702,8 +11139,9 @@ SDValue DAGCombiner::visitSIGN_EXTEND_VECTOR_INREG(SDNode *N) {
   SDValue N0 = N->getOperand(0);
   EVT VT = N->getValueType(0);
 
+  // sext_vector_inreg(undef) = 0 because the top bit will all be the same.
   if (N0.isUndef())
-    return DAG.getUNDEF(VT);
+    return DAG.getConstant(0, SDLoc(N), VT);
 
   if (SDValue Res = tryToFoldExtendOfConstant(N, TLI, DAG, LegalTypes))
     return Res;
@@ -10718,8 +11156,9 @@ SDValue DAGCombiner::visitZERO_EXTEND_VECTOR_INREG(SDNode *N) {
   SDValue N0 = N->getOperand(0);
   EVT VT = N->getValueType(0);
 
+  // zext_vector_inreg(undef) = 0 because the top bits will be zero.
   if (N0.isUndef())
-    return DAG.getUNDEF(VT);
+    return DAG.getConstant(0, SDLoc(N), VT);
 
   if (SDValue Res = tryToFoldExtendOfConstant(N, TLI, DAG, LegalTypes))
     return Res;
@@ -10795,13 +11234,12 @@ SDValue DAGCombiner::visitTRUNCATE(SDNode *N) {
     SDValue EltNo = N0->getOperand(1);
     if (isa<ConstantSDNode>(EltNo) && isTypeLegal(NVT)) {
       int Elt = cast<ConstantSDNode>(EltNo)->getZExtValue();
-      EVT IndexTy = TLI.getVectorIdxTy(DAG.getDataLayout());
       int Index = isLE ? (Elt*SizeRatio) : (Elt*SizeRatio + (SizeRatio-1));
 
       SDLoc DL(N);
       return DAG.getNode(ISD::EXTRACT_VECTOR_ELT, DL, TrTy,
                          DAG.getBitcast(NVT, N0.getOperand(0)),
-                         DAG.getConstant(Index, DL, IndexTy));
+                         DAG.getVectorIdxConstant(Index, DL));
     }
   }
 
@@ -10839,7 +11277,9 @@ SDValue DAGCombiner::visitTRUNCATE(SDNode *N) {
 
   // Attempt to pre-truncate BUILD_VECTOR sources.
   if (N0.getOpcode() == ISD::BUILD_VECTOR && !LegalOperations &&
-      TLI.isTruncateFree(SrcVT.getScalarType(), VT.getScalarType())) {
+      TLI.isTruncateFree(SrcVT.getScalarType(), VT.getScalarType()) &&
+      // Avoid creating illegal types if running after type legalizer.
+      (!LegalTypes || TLI.isTypeLegal(VT.getScalarType()))) {
     SDLoc DL(N);
     EVT SVT = VT.getScalarType();
     SmallVector<SDValue, 8> TruncOps;
@@ -10932,9 +11372,10 @@ SDValue DAGCombiner::visitTRUNCATE(SDNode *N) {
       // Stop if more than one members are non-undef.
       if (NumDefs > 1)
         break;
+
       VTs.push_back(EVT::getVectorVT(*DAG.getContext(),
                                      VT.getVectorElementType(),
-                                     X.getValueType().getVectorNumElements()));
+                                     X.getValueType().getVectorElementCount()));
     }
 
     if (NumDefs == 0)
@@ -10968,10 +11409,9 @@ SDValue DAGCombiner::visitTRUNCATE(SDNode *N) {
          TLI.isOperationLegal(ISD::EXTRACT_VECTOR_ELT, VecSrcVT))) {
       SDLoc SL(N);
 
-      EVT IdxVT = TLI.getVectorIdxTy(DAG.getDataLayout());
       unsigned Idx = isLE ? 0 : VecSrcVT.getVectorNumElements() - 1;
       return DAG.getNode(ISD::EXTRACT_VECTOR_ELT, SL, VT, VecSrc,
-                         DAG.getConstant(Idx, SL, IdxVT));
+                         DAG.getVectorIdxConstant(Idx, SL));
     }
   }
 
@@ -11071,14 +11511,14 @@ SDValue DAGCombiner::CombineConsecutiveLoads(SDNode *N, EVT VT) {
   unsigned LD1Bytes = LD1VT.getStoreSize();
   if (ISD::isNON_EXTLoad(LD2) && LD2->hasOneUse() &&
       DAG.areNonVolatileConsecutiveLoads(LD2, LD1, LD1Bytes, 1)) {
-    unsigned Align = LD1->getAlignment();
-    unsigned NewAlign = DAG.getDataLayout().getABITypeAlignment(
+    Align Alignment = LD1->getAlign();
+    Align NewAlign = DAG.getDataLayout().getABITypeAlign(
         VT.getTypeForEVT(*DAG.getContext()));
 
-    if (NewAlign <= Align &&
+    if (NewAlign <= Alignment &&
         (!LegalOperations || TLI.isOperationLegal(ISD::LOAD, VT)))
       return DAG.getLoad(VT, SDLoc(N), LD1->getChain(), LD1->getBasePtr(),
-                         LD1->getPointerInfo(), Align);
+                         LD1->getPointerInfo(), Alignment);
   }
 
   return SDValue();
@@ -11396,6 +11836,20 @@ SDValue DAGCombiner::visitBUILD_PAIR(SDNode *N) {
   return CombineConsecutiveLoads(N, VT);
 }
 
+SDValue DAGCombiner::visitFREEZE(SDNode *N) {
+  SDValue N0 = N->getOperand(0);
+
+  // (freeze (freeze x)) -> (freeze x)
+  if (N0.getOpcode() == ISD::FREEZE)
+    return N0;
+
+  // If the input is a constant, return it.
+  if (isa<ConstantSDNode>(N0) || isa<ConstantFPSDNode>(N0))
+    return N0;
+
+  return SDValue();
+}
+
 /// We know that BV is a build_vector node with Constant, ConstantFP or Undef
 /// operands. DstEltVT indicates the destination element value type.
 SDValue DAGCombiner::
@@ -11526,7 +11980,7 @@ SDValue DAGCombiner::visitFADDForFMACombine(SDNode *N) {
   const TargetOptions &Options = DAG.getTarget().Options;
 
   // Floating-point multiply-add with intermediate rounding.
-  bool HasFMAD = (LegalOperations && TLI.isFMADLegalForFAddFSub(DAG, N));
+  bool HasFMAD = (LegalOperations && TLI.isFMADLegal(DAG, N));
 
   // Floating-point multiply-add without intermediate rounding.
   bool HasFMA =
@@ -11539,13 +11993,14 @@ SDValue DAGCombiner::visitFADDForFMACombine(SDNode *N) {
 
   SDNodeFlags Flags = N->getFlags();
   bool CanFuse = Options.UnsafeFPMath || isContractable(N);
+  bool CanReassociate =
+      Options.UnsafeFPMath || N->getFlags().hasAllowReassociation();
   bool AllowFusionGlobally = (Options.AllowFPOpFusion == FPOpFusion::Fast ||
                               CanFuse || HasFMAD);
   // If the addition is not contractable, do not combine.
   if (!AllowFusionGlobally && !isContractable(N))
     return SDValue();
 
-  const SelectionDAGTargetInfo *STI = DAG.getSubtarget().getSelectionDAGInfo();
   if (STI && STI->generateFMAsInMachineCombiner(OptLevel))
     return SDValue();
 
@@ -11580,6 +12035,30 @@ SDValue DAGCombiner::visitFADDForFMACombine(SDNode *N) {
                        N1.getOperand(0), N1.getOperand(1), N0, Flags);
   }
 
+  // fadd (fma A, B, (fmul C, D)), E --> fma A, B, (fma C, D, E)
+  // fadd E, (fma A, B, (fmul C, D)) --> fma A, B, (fma C, D, E)
+  // This requires reassociation because it changes the order of operations.
+  SDValue FMA, E;
+  if (CanReassociate && N0.getOpcode() == PreferredFusedOpcode &&
+      N0.getOperand(2).getOpcode() == ISD::FMUL && N0.hasOneUse() &&
+      N0.getOperand(2).hasOneUse()) {
+    FMA = N0;
+    E = N1;
+  } else if (CanReassociate && N1.getOpcode() == PreferredFusedOpcode &&
+             N1.getOperand(2).getOpcode() == ISD::FMUL && N1.hasOneUse() &&
+             N1.getOperand(2).hasOneUse()) {
+    FMA = N1;
+    E = N0;
+  }
+  if (FMA && E) {
+    SDValue A = FMA.getOperand(0);
+    SDValue B = FMA.getOperand(1);
+    SDValue C = FMA.getOperand(2).getOperand(0);
+    SDValue D = FMA.getOperand(2).getOperand(1);
+    SDValue CDE = DAG.getNode(PreferredFusedOpcode, SL, VT, C, D, E, Flags);
+    return DAG.getNode(PreferredFusedOpcode, SL, VT, A, B, CDE, Flags);
+  }
+
   // Look through FP_EXTEND nodes to do more combining.
 
   // fold (fadd (fpext (fmul x, y)), z) -> (fma (fpext x), (fpext y), z)
@@ -11613,33 +12092,6 @@ SDValue DAGCombiner::visitFADDForFMACombine(SDNode *N) {
 
   // More folding opportunities when target permits.
   if (Aggressive) {
-    // fold (fadd (fma x, y, (fmul u, v)), z) -> (fma x, y (fma u, v, z))
-    if (CanFuse &&
-        N0.getOpcode() == PreferredFusedOpcode &&
-        N0.getOperand(2).getOpcode() == ISD::FMUL &&
-        N0->hasOneUse() && N0.getOperand(2)->hasOneUse()) {
-      return DAG.getNode(PreferredFusedOpcode, SL, VT,
-                         N0.getOperand(0), N0.getOperand(1),
-                         DAG.getNode(PreferredFusedOpcode, SL, VT,
-                                     N0.getOperand(2).getOperand(0),
-                                     N0.getOperand(2).getOperand(1),
-                                     N1, Flags), Flags);
-    }
-
-    // fold (fadd x, (fma y, z, (fmul u, v)) -> (fma y, z (fma u, v, x))
-    if (CanFuse &&
-        N1->getOpcode() == PreferredFusedOpcode &&
-        N1.getOperand(2).getOpcode() == ISD::FMUL &&
-        N1->hasOneUse() && N1.getOperand(2)->hasOneUse()) {
-      return DAG.getNode(PreferredFusedOpcode, SL, VT,
-                         N1.getOperand(0), N1.getOperand(1),
-                         DAG.getNode(PreferredFusedOpcode, SL, VT,
-                                     N1.getOperand(2).getOperand(0),
-                                     N1.getOperand(2).getOperand(1),
-                                     N0, Flags), Flags);
-    }
-
-
     // fold (fadd (fma x, y, (fpext (fmul u, v))), z)
     //   -> (fma x, y, (fma (fpext u), (fpext v), z))
     auto FoldFAddFMAFPExtFMul = [&] (
@@ -11743,7 +12195,7 @@ SDValue DAGCombiner::visitFSUBForFMACombine(SDNode *N) {
 
   const TargetOptions &Options = DAG.getTarget().Options;
   // Floating-point multiply-add with intermediate rounding.
-  bool HasFMAD = (LegalOperations && TLI.isFMADLegalForFAddFSub(DAG, N));
+  bool HasFMAD = (LegalOperations && TLI.isFMADLegal(DAG, N));
 
   // Floating-point multiply-add without intermediate rounding.
   bool HasFMA =
@@ -11763,13 +12215,13 @@ SDValue DAGCombiner::visitFSUBForFMACombine(SDNode *N) {
   if (!AllowFusionGlobally && !isContractable(N))
     return SDValue();
 
-  const SelectionDAGTargetInfo *STI = DAG.getSubtarget().getSelectionDAGInfo();
   if (STI && STI->generateFMAsInMachineCombiner(OptLevel))
     return SDValue();
 
   // Always prefer FMAD to FMA for precision.
   unsigned PreferredFusedOpcode = HasFMAD ? ISD::FMAD : ISD::FMA;
   bool Aggressive = TLI.enableAggressiveFMAFusion(VT);
+  bool NoSignedZero = Options.NoSignedZerosFPMath || Flags.hasNoSignedZeros();
 
   // Is the node an FMUL and contractable either due to global flags or
   // SDNodeFlags.
@@ -11780,19 +12232,43 @@ SDValue DAGCombiner::visitFSUBForFMACombine(SDNode *N) {
   };
 
   // fold (fsub (fmul x, y), z) -> (fma x, y, (fneg z))
-  if (isContractableFMUL(N0) && (Aggressive || N0->hasOneUse())) {
-    return DAG.getNode(PreferredFusedOpcode, SL, VT,
-                       N0.getOperand(0), N0.getOperand(1),
-                       DAG.getNode(ISD::FNEG, SL, VT, N1), Flags);
-  }
+  auto tryToFoldXYSubZ = [&](SDValue XY, SDValue Z) {
+    if (isContractableFMUL(XY) && (Aggressive || XY->hasOneUse())) {
+      return DAG.getNode(PreferredFusedOpcode, SL, VT, XY.getOperand(0),
+                         XY.getOperand(1), DAG.getNode(ISD::FNEG, SL, VT, Z),
+                         Flags);
+    }
+    return SDValue();
+  };
 
   // fold (fsub x, (fmul y, z)) -> (fma (fneg y), z, x)
   // Note: Commutes FSUB operands.
-  if (isContractableFMUL(N1) && (Aggressive || N1->hasOneUse())) {
-    return DAG.getNode(PreferredFusedOpcode, SL, VT,
-                       DAG.getNode(ISD::FNEG, SL, VT,
-                                   N1.getOperand(0)),
-                       N1.getOperand(1), N0, Flags);
+  auto tryToFoldXSubYZ = [&](SDValue X, SDValue YZ) {
+    if (isContractableFMUL(YZ) && (Aggressive || YZ->hasOneUse())) {
+      return DAG.getNode(PreferredFusedOpcode, SL, VT,
+                         DAG.getNode(ISD::FNEG, SL, VT, YZ.getOperand(0)),
+                         YZ.getOperand(1), X, Flags);
+    }
+    return SDValue();
+  };
+
+  // If we have two choices trying to fold (fsub (fmul u, v), (fmul x, y)),
+  // prefer to fold the multiply with fewer uses.
+  if (isContractableFMUL(N0) && isContractableFMUL(N1) &&
+      (N0.getNode()->use_size() > N1.getNode()->use_size())) {
+    // fold (fsub (fmul a, b), (fmul c, d)) -> (fma (fneg c), d, (fmul a, b))
+    if (SDValue V = tryToFoldXSubYZ(N0, N1))
+      return V;
+    // fold (fsub (fmul a, b), (fmul c, d)) -> (fma a, b, (fneg (fmul c, d)))
+    if (SDValue V = tryToFoldXYSubZ(N0, N1))
+      return V;
+  } else {
+    // fold (fsub (fmul x, y), z) -> (fma x, y, (fneg z))
+    if (SDValue V = tryToFoldXYSubZ(N0, N1))
+      return V;
+    // fold (fsub x, (fmul y, z)) -> (fma (fneg y), z, x)
+    if (SDValue V = tryToFoldXSubYZ(N0, N1))
+      return V;
   }
 
   // fold (fsub (fneg (fmul, x, y)), z) -> (fma (fneg x), y, (fneg z))
@@ -11909,7 +12385,7 @@ SDValue DAGCombiner::visitFSUBForFMACombine(SDNode *N) {
     //   -> (fma (fneg y), z, (fma (fneg u), v, x))
     if (CanFuse && N1.getOpcode() == PreferredFusedOpcode &&
         isContractableFMUL(N1.getOperand(2)) &&
-        N1->hasOneUse()) {
+        N1->hasOneUse() && NoSignedZero) {
       SDValue N20 = N1.getOperand(2).getOperand(0);
       SDValue N21 = N1.getOperand(2).getOperand(1);
       return DAG.getNode(PreferredFusedOpcode, SL, VT,
@@ -12062,7 +12538,7 @@ SDValue DAGCombiner::visitFMULForFMADistributiveCombine(SDNode *N) {
   // Floating-point multiply-add with intermediate rounding. This can result
   // in a less precise result due to the changed rounding order.
   bool HasFMAD = Options.UnsafeFPMath &&
-                 (LegalOperations && TLI.isOperationLegal(ISD::FMAD, VT));
+                 (LegalOperations && TLI.isFMADLegal(DAG, N));
 
   // No valid opcode, do not combine.
   if (!HasFMAD && !HasFMA)
@@ -12139,6 +12615,9 @@ SDValue DAGCombiner::visitFADD(SDNode *N) {
   const TargetOptions &Options = DAG.getTarget().Options;
   const SDNodeFlags Flags = N->getFlags();
 
+  if (SDValue R = DAG.simplifyFPBinop(N->getOpcode(), N0, N1, Flags))
+    return R;
+
   // fold vector ops
   if (VT.isVector())
     if (SDValue FoldedVOp = SimplifyVBinOp(N))
@@ -12162,18 +12641,16 @@ SDValue DAGCombiner::visitFADD(SDNode *N) {
     return NewSel;
 
   // fold (fadd A, (fneg B)) -> (fsub A, B)
-  if ((!LegalOperations || TLI.isOperationLegalOrCustom(ISD::FSUB, VT)) &&
-      TLI.isNegatibleForFree(N1, DAG, LegalOperations, ForCodeSize) == 2)
-    return DAG.getNode(
-        ISD::FSUB, DL, VT, N0,
-        TLI.getNegatedExpression(N1, DAG, LegalOperations, ForCodeSize), Flags);
+  if (!LegalOperations || TLI.isOperationLegalOrCustom(ISD::FSUB, VT))
+    if (SDValue NegN1 = TLI.getCheaperNegatedExpression(
+            N1, DAG, LegalOperations, ForCodeSize))
+      return DAG.getNode(ISD::FSUB, DL, VT, N0, NegN1, Flags);
 
   // fold (fadd (fneg A), B) -> (fsub B, A)
-  if ((!LegalOperations || TLI.isOperationLegalOrCustom(ISD::FSUB, VT)) &&
-      TLI.isNegatibleForFree(N0, DAG, LegalOperations, ForCodeSize) == 2)
-    return DAG.getNode(
-        ISD::FSUB, DL, VT, N1,
-        TLI.getNegatedExpression(N0, DAG, LegalOperations, ForCodeSize), Flags);
+  if (!LegalOperations || TLI.isOperationLegalOrCustom(ISD::FSUB, VT))
+    if (SDValue NegN0 = TLI.getCheaperNegatedExpression(
+            N0, DAG, LegalOperations, ForCodeSize))
+      return DAG.getNode(ISD::FSUB, DL, VT, N1, NegN0, Flags);
 
   auto isFMulNegTwo = [](SDValue FMul) {
     if (!FMul.hasOneUse() || FMul.getOpcode() != ISD::FMUL)
@@ -12318,6 +12795,9 @@ SDValue DAGCombiner::visitFSUB(SDNode *N) {
   const TargetOptions &Options = DAG.getTarget().Options;
   const SDNodeFlags Flags = N->getFlags();
 
+  if (SDValue R = DAG.simplifyFPBinop(N->getOpcode(), N0, N1, Flags))
+    return R;
+
   // fold vector ops
   if (VT.isVector())
     if (SDValue FoldedVOp = SimplifyVBinOp(N))
@@ -12352,8 +12832,9 @@ SDValue DAGCombiner::visitFSUB(SDNode *N) {
   if (N0CFP && N0CFP->isZero()) {
     if (N0CFP->isNegative() ||
         (Options.NoSignedZerosFPMath || Flags.hasNoSignedZeros())) {
-      if (TLI.isNegatibleForFree(N1, DAG, LegalOperations, ForCodeSize))
-        return TLI.getNegatedExpression(N1, DAG, LegalOperations, ForCodeSize);
+      if (SDValue NegN1 =
+              TLI.getNegatedExpression(N1, DAG, LegalOperations, ForCodeSize))
+        return NegN1;
       if (!LegalOperations || TLI.isOperationLegal(ISD::FNEG, VT))
         return DAG.getNode(ISD::FNEG, DL, VT, N1, Flags);
     }
@@ -12371,10 +12852,9 @@ SDValue DAGCombiner::visitFSUB(SDNode *N) {
   }
 
   // fold (fsub A, (fneg B)) -> (fadd A, B)
-  if (TLI.isNegatibleForFree(N1, DAG, LegalOperations, ForCodeSize))
-    return DAG.getNode(
-        ISD::FADD, DL, VT, N0,
-        TLI.getNegatedExpression(N1, DAG, LegalOperations, ForCodeSize), Flags);
+  if (SDValue NegN1 =
+          TLI.getNegatedExpression(N1, DAG, LegalOperations, ForCodeSize))
+    return DAG.getNode(ISD::FADD, DL, VT, N0, NegN1, Flags);
 
   // FSUB -> FMA combines:
   if (SDValue Fused = visitFSUBForFMACombine(N)) {
@@ -12385,21 +12865,6 @@ SDValue DAGCombiner::visitFSUB(SDNode *N) {
   return SDValue();
 }
 
-/// Return true if both inputs are at least as cheap in negated form and at
-/// least one input is strictly cheaper in negated form.
-bool DAGCombiner::isCheaperToUseNegatedFPOps(SDValue X, SDValue Y) {
-  if (char LHSNeg =
-          TLI.isNegatibleForFree(X, DAG, LegalOperations, ForCodeSize))
-    if (char RHSNeg =
-            TLI.isNegatibleForFree(Y, DAG, LegalOperations, ForCodeSize))
-      // Both negated operands are at least as cheap as their counterparts.
-      // Check to see if at least one is cheaper negated.
-      if (LHSNeg == 2 || RHSNeg == 2)
-        return true;
-
-  return false;
-}
-
 SDValue DAGCombiner::visitFMUL(SDNode *N) {
   SDValue N0 = N->getOperand(0);
   SDValue N1 = N->getOperand(1);
@@ -12410,6 +12875,9 @@ SDValue DAGCombiner::visitFMUL(SDNode *N) {
   const TargetOptions &Options = DAG.getTarget().Options;
   const SDNodeFlags Flags = N->getFlags();
 
+  if (SDValue R = DAG.simplifyFPBinop(N->getOpcode(), N0, N1, Flags))
+    return R;
+
   // fold vector ops
   if (VT.isVector()) {
     // This just handles C1 * C2 for vectors. Other vector folds are below.
@@ -12471,13 +12939,18 @@ SDValue DAGCombiner::visitFMUL(SDNode *N) {
       return DAG.getNode(ISD::FNEG, DL, VT, N0);
 
   // -N0 * -N1 --> N0 * N1
-  if (isCheaperToUseNegatedFPOps(N0, N1)) {
-    SDValue NegN0 =
-        TLI.getNegatedExpression(N0, DAG, LegalOperations, ForCodeSize);
-    SDValue NegN1 =
-        TLI.getNegatedExpression(N1, DAG, LegalOperations, ForCodeSize);
+  TargetLowering::NegatibleCost CostN0 =
+      TargetLowering::NegatibleCost::Expensive;
+  TargetLowering::NegatibleCost CostN1 =
+      TargetLowering::NegatibleCost::Expensive;
+  SDValue NegN0 =
+      TLI.getNegatedExpression(N0, DAG, LegalOperations, ForCodeSize, CostN0);
+  SDValue NegN1 =
+      TLI.getNegatedExpression(N1, DAG, LegalOperations, ForCodeSize, CostN1);
+  if (NegN0 && NegN1 &&
+      (CostN0 == TargetLowering::NegatibleCost::Cheaper ||
+       CostN1 == TargetLowering::NegatibleCost::Cheaper))
     return DAG.getNode(ISD::FMUL, DL, VT, NegN0, NegN1, Flags);
-  }
 
   // fold (fmul X, (select (fcmp X > 0.0), -1.0, 1.0)) -> (fneg (fabs X))
   // fold (fmul X, (select (fcmp X > 0.0), 1.0, -1.0)) -> (fabs X)
@@ -12556,13 +13029,18 @@ SDValue DAGCombiner::visitFMA(SDNode *N) {
   }
 
   // (-N0 * -N1) + N2 --> (N0 * N1) + N2
-  if (isCheaperToUseNegatedFPOps(N0, N1)) {
-    SDValue NegN0 =
-        TLI.getNegatedExpression(N0, DAG, LegalOperations, ForCodeSize);
-    SDValue NegN1 =
-        TLI.getNegatedExpression(N1, DAG, LegalOperations, ForCodeSize);
+  TargetLowering::NegatibleCost CostN0 =
+      TargetLowering::NegatibleCost::Expensive;
+  TargetLowering::NegatibleCost CostN1 =
+      TargetLowering::NegatibleCost::Expensive;
+  SDValue NegN0 =
+      TLI.getNegatedExpression(N0, DAG, LegalOperations, ForCodeSize, CostN0);
+  SDValue NegN1 =
+      TLI.getNegatedExpression(N1, DAG, LegalOperations, ForCodeSize, CostN1);
+  if (NegN0 && NegN1 &&
+      (CostN0 == TargetLowering::NegatibleCost::Cheaper ||
+       CostN1 == TargetLowering::NegatibleCost::Cheaper))
     return DAG.getNode(ISD::FMA, DL, VT, NegN0, NegN1, N2, Flags);
-  }
 
   if (UnsafeFPMath) {
     if (N0CFP && N0CFP->isZero())
@@ -12648,13 +13126,10 @@ SDValue DAGCombiner::visitFMA(SDNode *N) {
 
   // fold ((fma (fneg X), Y, (fneg Z)) -> fneg (fma X, Y, Z))
   // fold ((fma X, (fneg Y), (fneg Z)) -> fneg (fma X, Y, Z))
-  if (!TLI.isFNegFree(VT) &&
-      TLI.isNegatibleForFree(SDValue(N, 0), DAG, LegalOperations,
-                             ForCodeSize) == 2)
-    return DAG.getNode(ISD::FNEG, DL, VT,
-                       TLI.getNegatedExpression(SDValue(N, 0), DAG,
-                                                LegalOperations, ForCodeSize),
-                       Flags);
+  if (!TLI.isFNegFree(VT))
+    if (SDValue Neg = TLI.getCheaperNegatedExpression(
+            SDValue(N, 0), DAG, LegalOperations, ForCodeSize))
+      return DAG.getNode(ISD::FNEG, DL, VT, Neg, Flags);
   return SDValue();
 }
 
@@ -12671,7 +13146,7 @@ SDValue DAGCombiner::combineRepeatedFPDivisors(SDNode *N) {
   //       that only minsize should restrict this.
   bool UnsafeMath = DAG.getTarget().Options.UnsafeFPMath;
   const SDNodeFlags Flags = N->getFlags();
-  if (!UnsafeMath && !Flags.hasAllowReciprocal())
+  if (LegalDAG || (!UnsafeMath && !Flags.hasAllowReciprocal()))
     return SDValue();
 
   // Skip if current node is a reciprocal/fneg-reciprocal.
@@ -12742,6 +13217,9 @@ SDValue DAGCombiner::visitFDIV(SDNode *N) {
   const TargetOptions &Options = DAG.getTarget().Options;
   SDNodeFlags Flags = N->getFlags();
 
+  if (SDValue R = DAG.simplifyFPBinop(N->getOpcode(), N0, N1, Flags))
+    return R;
+
   // fold vector ops
   if (VT.isVector())
     if (SDValue FoldedVOp = SimplifyVBinOp(N))
@@ -12801,37 +13279,62 @@ SDValue DAGCombiner::visitFDIV(SDNode *N) {
     } else if (N1.getOpcode() == ISD::FMUL) {
       // Look through an FMUL. Even though this won't remove the FDIV directly,
       // it's still worthwhile to get rid of the FSQRT if possible.
-      SDValue SqrtOp;
-      SDValue OtherOp;
+      SDValue Sqrt, Y;
       if (N1.getOperand(0).getOpcode() == ISD::FSQRT) {
-        SqrtOp = N1.getOperand(0);
-        OtherOp = N1.getOperand(1);
+        Sqrt = N1.getOperand(0);
+        Y = N1.getOperand(1);
       } else if (N1.getOperand(1).getOpcode() == ISD::FSQRT) {
-        SqrtOp = N1.getOperand(1);
-        OtherOp = N1.getOperand(0);
+        Sqrt = N1.getOperand(1);
+        Y = N1.getOperand(0);
       }
-      if (SqrtOp.getNode()) {
+      if (Sqrt.getNode()) {
+        // If the other multiply operand is known positive, pull it into the
+        // sqrt. That will eliminate the division if we convert to an estimate:
+        // X / (fabs(A) * sqrt(Z)) --> X / sqrt(A*A*Z) --> X * rsqrt(A*A*Z)
+        // TODO: Also fold the case where A == Z (fabs is missing).
+        if (Flags.hasAllowReassociation() && N1.hasOneUse() &&
+            N1->getFlags().hasAllowReassociation() && Sqrt.hasOneUse() &&
+            Y.getOpcode() == ISD::FABS && Y.hasOneUse()) {
+          SDValue AA = DAG.getNode(ISD::FMUL, DL, VT, Y.getOperand(0),
+                                   Y.getOperand(0), Flags);
+          SDValue AAZ =
+              DAG.getNode(ISD::FMUL, DL, VT, AA, Sqrt.getOperand(0), Flags);
+          if (SDValue Rsqrt = buildRsqrtEstimate(AAZ, Flags))
+            return DAG.getNode(ISD::FMUL, DL, VT, N0, Rsqrt, Flags);
+
+          // Estimate creation failed. Clean up speculatively created nodes.
+          recursivelyDeleteUnusedNodes(AAZ.getNode());
+        }
+
         // We found a FSQRT, so try to make this fold:
-        // x / (y * sqrt(z)) -> x * (rsqrt(z) / y)
-        if (SDValue RV = buildRsqrtEstimate(SqrtOp.getOperand(0), Flags)) {
-          RV = DAG.getNode(ISD::FDIV, SDLoc(N1), VT, RV, OtherOp, Flags);
-          AddToWorklist(RV.getNode());
-          return DAG.getNode(ISD::FMUL, DL, VT, N0, RV, Flags);
+        // X / (Y * sqrt(Z)) -> X * (rsqrt(Z) / Y)
+        if (SDValue Rsqrt = buildRsqrtEstimate(Sqrt.getOperand(0), Flags)) {
+          SDValue Div = DAG.getNode(ISD::FDIV, SDLoc(N1), VT, Rsqrt, Y, Flags);
+          AddToWorklist(Div.getNode());
+          return DAG.getNode(ISD::FMUL, DL, VT, N0, Div, Flags);
         }
       }
     }
 
     // Fold into a reciprocal estimate and multiply instead of a real divide.
-    if (SDValue RV = BuildDivEstimate(N0, N1, Flags))
-      return RV;
+    if (Options.NoInfsFPMath || Flags.hasNoInfs())
+      if (SDValue RV = BuildDivEstimate(N0, N1, Flags))
+        return RV;
   }
 
   // (fdiv (fneg X), (fneg Y)) -> (fdiv X, Y)
-  if (isCheaperToUseNegatedFPOps(N0, N1))
-    return DAG.getNode(
-        ISD::FDIV, SDLoc(N), VT,
-        TLI.getNegatedExpression(N0, DAG, LegalOperations, ForCodeSize),
-        TLI.getNegatedExpression(N1, DAG, LegalOperations, ForCodeSize), Flags);
+  TargetLowering::NegatibleCost CostN0 =
+      TargetLowering::NegatibleCost::Expensive;
+  TargetLowering::NegatibleCost CostN1 =
+      TargetLowering::NegatibleCost::Expensive;
+  SDValue NegN0 =
+      TLI.getNegatedExpression(N0, DAG, LegalOperations, ForCodeSize, CostN0);
+  SDValue NegN1 =
+      TLI.getNegatedExpression(N1, DAG, LegalOperations, ForCodeSize, CostN1);
+  if (NegN0 && NegN1 &&
+      (CostN0 == TargetLowering::NegatibleCost::Cheaper ||
+       CostN1 == TargetLowering::NegatibleCost::Cheaper))
+    return DAG.getNode(ISD::FDIV, SDLoc(N), VT, NegN0, NegN1, Flags);
 
   return SDValue();
 }
@@ -12842,6 +13345,10 @@ SDValue DAGCombiner::visitFREM(SDNode *N) {
   ConstantFPSDNode *N0CFP = dyn_cast<ConstantFPSDNode>(N0);
   ConstantFPSDNode *N1CFP = dyn_cast<ConstantFPSDNode>(N1);
   EVT VT = N->getValueType(0);
+  SDNodeFlags Flags = N->getFlags();
+
+  if (SDValue R = DAG.simplifyFPBinop(N->getOpcode(), N0, N1, Flags))
+    return R;
 
   // fold (frem c1, c2) -> fmod(c1,c2)
   if (N0CFP && N1CFP)
@@ -12855,8 +13362,12 @@ SDValue DAGCombiner::visitFREM(SDNode *N) {
 
 SDValue DAGCombiner::visitFSQRT(SDNode *N) {
   SDNodeFlags Flags = N->getFlags();
-  if (!DAG.getTarget().Options.UnsafeFPMath &&
-      !Flags.hasApproximateFuncs())
+  const TargetOptions &Options = DAG.getTarget().Options;
+
+  // Require 'ninf' flag since sqrt(+Inf) = +Inf, but the estimation goes as:
+  // sqrt(+Inf) == rsqrt(+Inf) * +Inf = 0 * +Inf = NaN
+  if ((!Options.UnsafeFPMath && !Flags.hasApproximateFuncs()) ||
+      (!Options.NoInfsFPMath && !Flags.hasNoInfs()))
     return SDValue();
 
   SDValue N0 = N->getOperand(0);
@@ -13068,33 +13579,24 @@ SDValue DAGCombiner::visitSINT_TO_FP(SDNode *N) {
   }
 
   // The next optimizations are desirable only if SELECT_CC can be lowered.
-  if (TLI.isOperationLegalOrCustom(ISD::SELECT_CC, VT) || !LegalOperations) {
-    // fold (sint_to_fp (setcc x, y, cc)) -> (select_cc x, y, -1.0, 0.0,, cc)
-    if (N0.getOpcode() == ISD::SETCC && N0.getValueType() == MVT::i1 &&
-        !VT.isVector() &&
-        (!LegalOperations ||
-         TLI.isOperationLegalOrCustom(ISD::ConstantFP, VT))) {
-      SDLoc DL(N);
-      SDValue Ops[] =
-        { N0.getOperand(0), N0.getOperand(1),
-          DAG.getConstantFP(-1.0, DL, VT), DAG.getConstantFP(0.0, DL, VT),
-          N0.getOperand(2) };
-      return DAG.getNode(ISD::SELECT_CC, DL, VT, Ops);
-    }
+  // fold (sint_to_fp (setcc x, y, cc)) -> (select (setcc x, y, cc), -1.0, 0.0)
+  if (N0.getOpcode() == ISD::SETCC && N0.getValueType() == MVT::i1 &&
+      !VT.isVector() &&
+      (!LegalOperations || TLI.isOperationLegalOrCustom(ISD::ConstantFP, VT))) {
+    SDLoc DL(N);
+    return DAG.getSelect(DL, VT, N0, DAG.getConstantFP(-1.0, DL, VT),
+                         DAG.getConstantFP(0.0, DL, VT));
+  }
 
-    // fold (sint_to_fp (zext (setcc x, y, cc))) ->
-    //      (select_cc x, y, 1.0, 0.0,, cc)
-    if (N0.getOpcode() == ISD::ZERO_EXTEND &&
-        N0.getOperand(0).getOpcode() == ISD::SETCC &&!VT.isVector() &&
-        (!LegalOperations ||
-         TLI.isOperationLegalOrCustom(ISD::ConstantFP, VT))) {
-      SDLoc DL(N);
-      SDValue Ops[] =
-        { N0.getOperand(0).getOperand(0), N0.getOperand(0).getOperand(1),
-          DAG.getConstantFP(1.0, DL, VT), DAG.getConstantFP(0.0, DL, VT),
-          N0.getOperand(0).getOperand(2) };
-      return DAG.getNode(ISD::SELECT_CC, DL, VT, Ops);
-    }
+  // fold (sint_to_fp (zext (setcc x, y, cc))) ->
+  //      (select (setcc x, y, cc), 1.0, 0.0)
+  if (N0.getOpcode() == ISD::ZERO_EXTEND &&
+      N0.getOperand(0).getOpcode() == ISD::SETCC && !VT.isVector() &&
+      (!LegalOperations || TLI.isOperationLegalOrCustom(ISD::ConstantFP, VT))) {
+    SDLoc DL(N);
+    return DAG.getSelect(DL, VT, N0.getOperand(0),
+                         DAG.getConstantFP(1.0, DL, VT),
+                         DAG.getConstantFP(0.0, DL, VT));
   }
 
   if (SDValue FTrunc = foldFPToIntToFP(N, DAG, TLI))
@@ -13128,19 +13630,12 @@ SDValue DAGCombiner::visitUINT_TO_FP(SDNode *N) {
       return DAG.getNode(ISD::SINT_TO_FP, SDLoc(N), VT, N0);
   }
 
-  // The next optimizations are desirable only if SELECT_CC can be lowered.
-  if (TLI.isOperationLegalOrCustom(ISD::SELECT_CC, VT) || !LegalOperations) {
-    // fold (uint_to_fp (setcc x, y, cc)) -> (select_cc x, y, -1.0, 0.0,, cc)
-    if (N0.getOpcode() == ISD::SETCC && !VT.isVector() &&
-        (!LegalOperations ||
-         TLI.isOperationLegalOrCustom(ISD::ConstantFP, VT))) {
-      SDLoc DL(N);
-      SDValue Ops[] =
-        { N0.getOperand(0), N0.getOperand(1),
-          DAG.getConstantFP(1.0, DL, VT), DAG.getConstantFP(0.0, DL, VT),
-          N0.getOperand(2) };
-      return DAG.getNode(ISD::SELECT_CC, DL, VT, Ops);
-    }
+  // fold (uint_to_fp (setcc x, y, cc)) -> (select (setcc x, y, cc), 1.0, 0.0)
+  if (N0.getOpcode() == ISD::SETCC && !VT.isVector() &&
+      (!LegalOperations || TLI.isOperationLegalOrCustom(ISD::ConstantFP, VT))) {
+    SDLoc DL(N);
+    return DAG.getSelect(DL, VT, N0, DAG.getConstantFP(1.0, DL, VT),
+                         DAG.getConstantFP(0.0, DL, VT));
   }
 
   if (SDValue FTrunc = foldFPToIntToFP(N, DAG, TLI))
@@ -13385,12 +13880,14 @@ SDValue DAGCombiner::visitFNEG(SDNode *N) {
   if (isConstantFPBuildVectorOrConstantFP(N0))
     return DAG.getNode(ISD::FNEG, SDLoc(N), VT, N0);
 
-  if (TLI.isNegatibleForFree(N0, DAG, LegalOperations, ForCodeSize))
-    return TLI.getNegatedExpression(N0, DAG, LegalOperations, ForCodeSize);
+  if (SDValue NegN0 =
+          TLI.getNegatedExpression(N0, DAG, LegalOperations, ForCodeSize))
+    return NegN0;
 
-  // -(X-Y) -> (Y-X) is unsafe because when X==Y, -0.0 != +0.0 FIXME: This is
-  // duplicated in isNegatibleForFree, but isNegatibleForFree doesn't know it
-  // was called from a context with a nsz flag if the input fsub does not.
+  // -(X-Y) -> (Y-X) is unsafe because when X==Y, -0.0 != +0.0
+  // FIXME: This is duplicated in getNegatibleCost, but getNegatibleCost doesn't
+  // know it was called from a context with a nsz flag if the input fsub does
+  // not.
   if (N0.getOpcode() == ISD::FSUB &&
       (DAG.getTarget().Options.NoSignedZerosFPMath ||
        N->getFlags().hasNoSignedZeros()) && N0.hasOneUse()) {
@@ -13546,8 +14043,12 @@ SDValue DAGCombiner::visitBRCOND(SDNode *N) {
   }
 
   if (N1.hasOneUse()) {
+    // rebuildSetCC calls visitXor which may change the Chain when there is a
+    // STRICT_FSETCC/STRICT_FSETCCS involved. Use a handle to track changes.
+    HandleSDNode ChainHandle(Chain);
     if (SDValue NewN1 = rebuildSetCC(N1))
-      return DAG.getNode(ISD::BRCOND, SDLoc(N), MVT::Other, Chain, NewN1, N2);
+      return DAG.getNode(ISD::BRCOND, SDLoc(N), MVT::Other,
+                         ChainHandle.getValue(), NewN1, N2);
   }
 
   return SDValue();
@@ -13599,8 +14100,8 @@ SDValue DAGCombiner::rebuildSetCC(SDValue N) {
     }
   }
 
-  // Transform br(xor(x, y)) -> br(x != y)
-  // Transform br(xor(xor(x,y), 1)) -> br (x == y)
+  // Transform (brcond (xor x, y)) -> (brcond (setcc, x, y, ne))
+  // Transform (brcond (xor (xor x, y), -1)) -> (brcond (setcc, x, y, eq))
   if (N.getOpcode() == ISD::XOR) {
     // Because we may call this on a speculatively constructed
     // SimplifiedSetCC Node, we need to simplify this node first.
@@ -13624,16 +14125,17 @@ SDValue DAGCombiner::rebuildSetCC(SDValue N) {
     if (N.getOpcode() != ISD::XOR)
       return N;
 
-    SDNode *TheXor = N.getNode();
-
-    SDValue Op0 = TheXor->getOperand(0);
-    SDValue Op1 = TheXor->getOperand(1);
+    SDValue Op0 = N->getOperand(0);
+    SDValue Op1 = N->getOperand(1);
 
     if (Op0.getOpcode() != ISD::SETCC && Op1.getOpcode() != ISD::SETCC) {
       bool Equal = false;
-      if (isOneConstant(Op0) && Op0.hasOneUse() &&
-          Op0.getOpcode() == ISD::XOR) {
-        TheXor = Op0.getNode();
+      // (brcond (xor (xor x, y), -1)) -> (brcond (setcc x, y, eq))
+      if (isBitwiseNot(N) && Op0.hasOneUse() && Op0.getOpcode() == ISD::XOR &&
+          Op0.getValueType() == MVT::i1) {
+        N = Op0;
+        Op0 = N->getOperand(0);
+        Op1 = N->getOperand(1);
         Equal = true;
       }
 
@@ -13641,7 +14143,7 @@ SDValue DAGCombiner::rebuildSetCC(SDValue N) {
       if (LegalTypes)
         SetCCVT = getSetCCResultType(SetCCVT);
       // Replace the uses of XOR with SETCC
-      return DAG.getSetCC(SDLoc(TheXor), SetCCVT, Op0, Op1,
+      return DAG.getSetCC(SDLoc(N), SetCCVT, Op0, Op1,
                           Equal ? ISD::SETEQ : ISD::SETNE);
     }
   }
@@ -14001,118 +14503,142 @@ bool DAGCombiner::CombineToPreIndexedLoadStore(SDNode *N) {
   return true;
 }
 
-/// Try to combine a load/store with a add/sub of the base pointer node into a
-/// post-indexed load/store. The transformation folded the add/subtract into the
-/// new indexed load/store effectively and all of its uses are redirected to the
-/// new load/store.
-bool DAGCombiner::CombineToPostIndexedLoadStore(SDNode *N) {
-  if (Level < AfterLegalizeDAG)
+static bool shouldCombineToPostInc(SDNode *N, SDValue Ptr, SDNode *PtrUse,
+                                   SDValue &BasePtr, SDValue &Offset,
+                                   ISD::MemIndexedMode &AM,
+                                   SelectionDAG &DAG,
+                                   const TargetLowering &TLI) {
+  if (PtrUse == N ||
+      (PtrUse->getOpcode() != ISD::ADD && PtrUse->getOpcode() != ISD::SUB))
     return false;
 
-  bool IsLoad = true;
-  bool IsMasked = false;
-  SDValue Ptr;
-  if (!getCombineLoadStoreParts(N, ISD::POST_INC, ISD::POST_DEC, IsLoad, IsMasked,
-                                Ptr, TLI))
+  if (!TLI.getPostIndexedAddressParts(N, PtrUse, BasePtr, Offset, AM, DAG))
+    return false;
+
+  // Don't create a indexed load / store with zero offset.
+  if (isNullConstant(Offset))
     return false;
 
-  if (Ptr.getNode()->hasOneUse())
+  if (isa<FrameIndexSDNode>(BasePtr) || isa<RegisterSDNode>(BasePtr))
     return false;
 
-  for (SDNode *Op : Ptr.getNode()->uses()) {
-    if (Op == N ||
-        (Op->getOpcode() != ISD::ADD && Op->getOpcode() != ISD::SUB))
+  SmallPtrSet<const SDNode *, 32> Visited;
+  for (SDNode *Use : BasePtr.getNode()->uses()) {
+    if (Use == Ptr.getNode())
       continue;
 
-    SDValue BasePtr;
-    SDValue Offset;
-    ISD::MemIndexedMode AM = ISD::UNINDEXED;
-    if (TLI.getPostIndexedAddressParts(N, Op, BasePtr, Offset, AM, DAG)) {
-      // Don't create a indexed load / store with zero offset.
-      if (isNullConstant(Offset))
-        continue;
-
-      // Try turning it into a post-indexed load / store except when
-      // 1) All uses are load / store ops that use it as base ptr (and
-      //    it may be folded as addressing mmode).
-      // 2) Op must be independent of N, i.e. Op is neither a predecessor
-      //    nor a successor of N. Otherwise, if Op is folded that would
-      //    create a cycle.
+    // No if there's a later user which could perform the index instead.
+    if (isa<MemSDNode>(Use)) {
+      bool IsLoad = true;
+      bool IsMasked = false;
+      SDValue OtherPtr;
+      if (getCombineLoadStoreParts(Use, ISD::POST_INC, ISD::POST_DEC, IsLoad,
+                                   IsMasked, OtherPtr, TLI)) {
+        SmallVector<const SDNode *, 2> Worklist;
+        Worklist.push_back(Use);
+        if (SDNode::hasPredecessorHelper(N, Visited, Worklist))
+          return false;
+      }
+    }
 
-      if (isa<FrameIndexSDNode>(BasePtr) || isa<RegisterSDNode>(BasePtr))
-        continue;
+    // If all the uses are load / store addresses, then don't do the
+    // transformation.
+    if (Use->getOpcode() == ISD::ADD || Use->getOpcode() == ISD::SUB) {
+      for (SDNode *UseUse : Use->uses())
+        if (canFoldInAddressingMode(Use, UseUse, DAG, TLI))
+          return false;
+    }
+  }
+  return true;
+}
 
-      // Check for #1.
-      bool TryNext = false;
-      for (SDNode *Use : BasePtr.getNode()->uses()) {
-        if (Use == Ptr.getNode())
-          continue;
+static SDNode *getPostIndexedLoadStoreOp(SDNode *N, bool &IsLoad,
+                                         bool &IsMasked, SDValue &Ptr,
+                                         SDValue &BasePtr, SDValue &Offset,
+                                         ISD::MemIndexedMode &AM,
+                                         SelectionDAG &DAG,
+                                         const TargetLowering &TLI) {
+  if (!getCombineLoadStoreParts(N, ISD::POST_INC, ISD::POST_DEC, IsLoad,
+                                IsMasked, Ptr, TLI) ||
+      Ptr.getNode()->hasOneUse())
+    return nullptr;
+
+  // Try turning it into a post-indexed load / store except when
+  // 1) All uses are load / store ops that use it as base ptr (and
+  //    it may be folded as addressing mmode).
+  // 2) Op must be independent of N, i.e. Op is neither a predecessor
+  //    nor a successor of N. Otherwise, if Op is folded that would
+  //    create a cycle.
+  for (SDNode *Op : Ptr->uses()) {
+    // Check for #1.
+    if (!shouldCombineToPostInc(N, Ptr, Op, BasePtr, Offset, AM, DAG, TLI))
+      continue;
 
-        // If all the uses are load / store addresses, then don't do the
-        // transformation.
-        if (Use->getOpcode() == ISD::ADD || Use->getOpcode() == ISD::SUB) {
-          bool RealUse = false;
-          for (SDNode *UseUse : Use->uses()) {
-            if (!canFoldInAddressingMode(Use, UseUse, DAG, TLI))
-              RealUse = true;
-          }
+    // Check for #2.
+    SmallPtrSet<const SDNode *, 32> Visited;
+    SmallVector<const SDNode *, 8> Worklist;
+    // Ptr is predecessor to both N and Op.
+    Visited.insert(Ptr.getNode());
+    Worklist.push_back(N);
+    Worklist.push_back(Op);
+    if (!SDNode::hasPredecessorHelper(N, Visited, Worklist) &&
+        !SDNode::hasPredecessorHelper(Op, Visited, Worklist))
+      return Op;
+  }
+  return nullptr;
+}
 
-          if (!RealUse) {
-            TryNext = true;
-            break;
-          }
-        }
-      }
+/// Try to combine a load/store with a add/sub of the base pointer node into a
+/// post-indexed load/store. The transformation folded the add/subtract into the
+/// new indexed load/store effectively and all of its uses are redirected to the
+/// new load/store.
+bool DAGCombiner::CombineToPostIndexedLoadStore(SDNode *N) {
+  if (Level < AfterLegalizeDAG)
+    return false;
 
-      if (TryNext)
-        continue;
+  bool IsLoad = true;
+  bool IsMasked = false;
+  SDValue Ptr;
+  SDValue BasePtr;
+  SDValue Offset;
+  ISD::MemIndexedMode AM = ISD::UNINDEXED;
+  SDNode *Op = getPostIndexedLoadStoreOp(N, IsLoad, IsMasked, Ptr, BasePtr,
+                                         Offset, AM, DAG, TLI);
+  if (!Op)
+    return false;
 
-      // Check for #2.
-      SmallPtrSet<const SDNode *, 32> Visited;
-      SmallVector<const SDNode *, 8> Worklist;
-      // Ptr is predecessor to both N and Op.
-      Visited.insert(Ptr.getNode());
-      Worklist.push_back(N);
-      Worklist.push_back(Op);
-      if (!SDNode::hasPredecessorHelper(N, Visited, Worklist) &&
-          !SDNode::hasPredecessorHelper(Op, Visited, Worklist)) {
-        SDValue Result;
-        if (!IsMasked)
-          Result = IsLoad ? DAG.getIndexedLoad(SDValue(N, 0), SDLoc(N), BasePtr,
-                                               Offset, AM)
-                          : DAG.getIndexedStore(SDValue(N, 0), SDLoc(N),
+  SDValue Result;
+  if (!IsMasked)
+    Result = IsLoad ? DAG.getIndexedLoad(SDValue(N, 0), SDLoc(N), BasePtr,
+                                         Offset, AM)
+                    : DAG.getIndexedStore(SDValue(N, 0), SDLoc(N),
+                                          BasePtr, Offset, AM);
+  else
+    Result = IsLoad ? DAG.getIndexedMaskedLoad(SDValue(N, 0), SDLoc(N),
+                                               BasePtr, Offset, AM)
+                    : DAG.getIndexedMaskedStore(SDValue(N, 0), SDLoc(N),
                                                 BasePtr, Offset, AM);
-        else
-          Result = IsLoad ? DAG.getIndexedMaskedLoad(SDValue(N, 0), SDLoc(N),
-                                                     BasePtr, Offset, AM)
-                          : DAG.getIndexedMaskedStore(SDValue(N, 0), SDLoc(N),
-                                                      BasePtr, Offset, AM);
-        ++PostIndexedNodes;
-        ++NodesCombined;
-        LLVM_DEBUG(dbgs() << "\nReplacing.5 "; N->dump(&DAG);
-                   dbgs() << "\nWith: "; Result.getNode()->dump(&DAG);
-                   dbgs() << '\n');
-        WorklistRemover DeadNodes(*this);
-        if (IsLoad) {
-          DAG.ReplaceAllUsesOfValueWith(SDValue(N, 0), Result.getValue(0));
-          DAG.ReplaceAllUsesOfValueWith(SDValue(N, 1), Result.getValue(2));
-        } else {
-          DAG.ReplaceAllUsesOfValueWith(SDValue(N, 0), Result.getValue(1));
-        }
-
-        // Finally, since the node is now dead, remove it from the graph.
-        deleteAndRecombine(N);
-
-        // Replace the uses of Use with uses of the updated base value.
-        DAG.ReplaceAllUsesOfValueWith(SDValue(Op, 0),
-                                      Result.getValue(IsLoad ? 1 : 0));
-        deleteAndRecombine(Op);
-        return true;
-      }
-    }
+  ++PostIndexedNodes;
+  ++NodesCombined;
+  LLVM_DEBUG(dbgs() << "\nReplacing.5 "; N->dump(&DAG);
+             dbgs() << "\nWith: "; Result.getNode()->dump(&DAG);
+             dbgs() << '\n');
+  WorklistRemover DeadNodes(*this);
+  if (IsLoad) {
+    DAG.ReplaceAllUsesOfValueWith(SDValue(N, 0), Result.getValue(0));
+    DAG.ReplaceAllUsesOfValueWith(SDValue(N, 1), Result.getValue(2));
+  } else {
+    DAG.ReplaceAllUsesOfValueWith(SDValue(N, 0), Result.getValue(1));
   }
 
-  return false;
+  // Finally, since the node is now dead, remove it from the graph.
+  deleteAndRecombine(N);
+
+  // Replace the uses of Use with uses of the updated base value.
+  DAG.ReplaceAllUsesOfValueWith(SDValue(Op, 0),
+                                Result.getValue(IsLoad ? 1 : 0));
+  deleteAndRecombine(Op);
+  return true;
 }
 
 /// Return the base-pointer arithmetic from an indexed \p LD.
@@ -14361,11 +14887,12 @@ SDValue DAGCombiner::visitLOAD(SDNode *N) {
 
   // Try to infer better alignment information than the load already has.
   if (OptLevel != CodeGenOpt::None && LD->isUnindexed() && !LD->isAtomic()) {
-    if (unsigned Align = DAG.InferPtrAlignment(Ptr)) {
-      if (Align > LD->getAlignment() && LD->getSrcValueOffset() % Align == 0) {
+    if (MaybeAlign Alignment = DAG.InferPtrAlign(Ptr)) {
+      if (*Alignment > LD->getAlign() &&
+          isAligned(*Alignment, LD->getSrcValueOffset())) {
         SDValue NewLoad = DAG.getExtLoad(
             LD->getExtensionType(), SDLoc(N), LD->getValueType(0), Chain, Ptr,
-            LD->getPointerInfo(), LD->getMemoryVT(), Align,
+            LD->getPointerInfo(), LD->getMemoryVT(), *Alignment,
             LD->getMemOperand()->getFlags(), LD->getAAInfo());
         // NewLoad will always be N as we are only refining the alignment
         assert(NewLoad.getNode() == N);
@@ -14562,11 +15089,11 @@ struct LoadedSlice {
   }
 
   /// Get the alignment of the load used for this slice.
-  unsigned getAlignment() const {
-    unsigned Alignment = Origin->getAlignment();
+  Align getAlign() const {
+    Align Alignment = Origin->getAlign();
     uint64_t Offset = getOffsetFromBase();
     if (Offset != 0)
-      Alignment = MinAlign(Alignment, Alignment + Offset);
+      Alignment = commonAlignment(Alignment, Alignment.value() + Offset);
     return Alignment;
   }
 
@@ -14662,8 +15189,8 @@ struct LoadedSlice {
     // Create the load for the slice.
     SDValue LastInst =
         DAG->getLoad(SliceType, SDLoc(Origin), Origin->getChain(), BaseAddr,
-                     Origin->getPointerInfo().getWithOffset(Offset),
-                     getAlignment(), Origin->getMemOperand()->getFlags());
+                     Origin->getPointerInfo().getWithOffset(Offset), getAlign(),
+                     Origin->getMemOperand()->getFlags());
     // If the final type is not the same as the loaded type, this means that
     // we have to pad with zero. Create a zero extend for that.
     EVT FinalType = Inst->getValueType(0);
@@ -14704,10 +15231,10 @@ struct LoadedSlice {
 
     // Check if it will be merged with the load.
     // 1. Check the alignment constraint.
-    unsigned RequiredAlignment = DAG->getDataLayout().getABITypeAlignment(
+    Align RequiredAlignment = DAG->getDataLayout().getABITypeAlign(
         ResVT.getTypeForEVT(*DAG->getContext()));
 
-    if (RequiredAlignment > getAlignment())
+    if (RequiredAlignment > getAlign())
       return false;
 
     // 2. Check that the load is a legal operation for that type.
@@ -14793,14 +15320,14 @@ static void adjustCostForPairing(SmallVectorImpl<LoadedSlice> &LoadedSlices,
       continue;
 
     // Check if the target supplies paired loads for this type.
-    unsigned RequiredAlignment = 0;
+    Align RequiredAlignment;
     if (!TLI.hasPairedLoad(LoadedType, RequiredAlignment)) {
       // move to the next pair, this type is hopeless.
       Second = nullptr;
       continue;
     }
     // Check if we meet the alignment requirement.
-    if (RequiredAlignment > First->getAlignment())
+    if (First->getAlign() < RequiredAlignment)
       continue;
 
     // Check that both loads are next to each other in memory.
@@ -14873,6 +15400,12 @@ bool DAGCombiner::SliceUpLoad(SDNode *N) {
       !LD->getValueType(0).isInteger())
     return false;
 
+  // The algorithm to split up a load of a scalable vector into individual
+  // elements currently requires knowing the length of the loaded type,
+  // so will need adjusting to work on scalable vectors.
+  if (LD->getValueType(0).isScalableVector())
+    return false;
+
   // Keep track of already used bits to detect overlapping values.
   // In that case, we will just abort the transformation.
   APInt UsedBits(LD->getValueSizeInBits(0), 0);
@@ -15117,7 +15650,7 @@ SDValue DAGCombiner::ReduceLoadOpStoreWidth(SDNode *N) {
   // Y is known to provide just those bytes.  If so, we try to replace the
   // load + replace + store sequence with a single (narrower) store, which makes
   // the load dead.
-  if (Opc == ISD::OR) {
+  if (Opc == ISD::OR && EnableShrinkLoadReplaceStoreWithStore) {
     std::pair<unsigned, unsigned> MaskedLoad;
     MaskedLoad = CheckForMaskedLoad(Value.getOperand(0), Ptr, Chain);
     if (MaskedLoad.first)
@@ -15133,6 +15666,9 @@ SDValue DAGCombiner::ReduceLoadOpStoreWidth(SDNode *N) {
         return NewST;
   }
 
+  if (!EnableReduceLoadOpStoreWidth)
+    return SDValue();
+
   if ((Opc != ISD::OR && Opc != ISD::XOR && Opc != ISD::AND) ||
       Value.getOperand(1).getOpcode() != ISD::Constant)
     return SDValue();
@@ -15186,9 +15722,9 @@ SDValue DAGCombiner::ReduceLoadOpStoreWidth(SDNode *N) {
       if (DAG.getDataLayout().isBigEndian())
         PtrOff = (BitWidth + 7 - NewBW) / 8 - PtrOff;
 
-      unsigned NewAlign = MinAlign(LD->getAlignment(), PtrOff);
+      Align NewAlign = commonAlignment(LD->getAlign(), PtrOff);
       Type *NewVTTy = NewVT.getTypeForEVT(*DAG.getContext());
-      if (NewAlign < DAG.getDataLayout().getABITypeAlignment(NewVTTy))
+      if (NewAlign < DAG.getDataLayout().getABITypeAlign(NewVTTy))
         return SDValue();
 
       SDValue NewPtr = DAG.getMemBasePlusOffset(Ptr, PtrOff, SDLoc(LD));
@@ -15234,17 +15770,24 @@ SDValue DAGCombiner::TransformFPLoadStorePair(SDNode *N) {
         ST->getPointerInfo().getAddrSpace() != 0)
       return SDValue();
 
-    EVT IntVT = EVT::getIntegerVT(*DAG.getContext(), VT.getSizeInBits());
+    TypeSize VTSize = VT.getSizeInBits();
+
+    // We don't know the size of scalable types at compile time so we cannot
+    // create an integer of the equivalent size.
+    if (VTSize.isScalable())
+      return SDValue();
+
+    EVT IntVT = EVT::getIntegerVT(*DAG.getContext(), VTSize.getFixedSize());
     if (!TLI.isOperationLegal(ISD::LOAD, IntVT) ||
         !TLI.isOperationLegal(ISD::STORE, IntVT) ||
         !TLI.isDesirableToTransformToIntegerOp(ISD::LOAD, VT) ||
         !TLI.isDesirableToTransformToIntegerOp(ISD::STORE, VT))
       return SDValue();
 
-    unsigned LDAlign = LD->getAlignment();
-    unsigned STAlign = ST->getAlignment();
+    Align LDAlign = LD->getAlign();
+    Align STAlign = ST->getAlign();
     Type *IntVTTy = IntVT.getTypeForEVT(*DAG.getContext());
-    unsigned ABIAlign = DAG.getDataLayout().getABITypeAlignment(IntVTTy);
+    Align ABIAlign = DAG.getDataLayout().getABITypeAlign(IntVTTy);
     if (LDAlign < ABIAlign || STAlign < ABIAlign)
       return SDValue();
 
@@ -15361,7 +15904,7 @@ SDValue DAGCombiner::getMergeStoreChains(SmallVectorImpl<MemOpLink> &StoreNodes,
   return DAG.getTokenFactor(StoreDL, Chains);
 }
 
-bool DAGCombiner::MergeStoresOfConstantsOrVecElts(
+bool DAGCombiner::mergeStoresOfConstantsOrVecElts(
     SmallVectorImpl<MemOpLink> &StoreNodes, EVT MemVT, unsigned NumStores,
     bool IsConstantSrc, bool UseVector, bool UseTrunc) {
   // Make sure we have something to merge.
@@ -15535,14 +16078,12 @@ void DAGCombiner::getStoreMergeCandidates(
   if (BasePtr.getBase().isUndef())
     return;
 
-  bool IsConstantSrc = isa<ConstantSDNode>(Val) || isa<ConstantFPSDNode>(Val);
-  bool IsExtractVecSrc = (Val.getOpcode() == ISD::EXTRACT_VECTOR_ELT ||
-                          Val.getOpcode() == ISD::EXTRACT_SUBVECTOR);
-  bool IsLoadSrc = isa<LoadSDNode>(Val);
+  StoreSource StoreSrc = getStoreSource(Val);
+  assert(StoreSrc != StoreSource::Unknown && "Expected known source for store");
   BaseIndexOffset LBasePtr;
   // Match on loadbaseptr if relevant.
   EVT LoadVT;
-  if (IsLoadSrc) {
+  if (StoreSrc == StoreSource::Load) {
     auto *Ld = cast<LoadSDNode>(Val);
     LBasePtr = BaseIndexOffset::match(Ld, DAG);
     LoadVT = Ld->getMemoryVT();
@@ -15570,7 +16111,7 @@ void DAGCombiner::getStoreMergeCandidates(
     // Allow merging constants of different types as integers.
     bool NoTypeMatch = (MemVT.isInteger()) ? !MemVT.bitsEq(Other->getMemoryVT())
                                            : Other->getMemoryVT() != MemVT;
-    if (IsLoadSrc) {
+    if (StoreSrc == StoreSource::Load) {
       if (NoTypeMatch)
         return false;
       // The Load's Base Ptr must also match
@@ -15594,13 +16135,13 @@ void DAGCombiner::getStoreMergeCandidates(
       } else
         return false;
     }
-    if (IsConstantSrc) {
+    if (StoreSrc == StoreSource::Constant) {
       if (NoTypeMatch)
         return false;
       if (!(isa<ConstantSDNode>(OtherBC) || isa<ConstantFPSDNode>(OtherBC)))
         return false;
     }
-    if (IsExtractVecSrc) {
+    if (StoreSrc == StoreSource::Extract) {
       // Do not merge truncated stores here.
       if (Other->isTruncatingStore())
         return false;
@@ -15741,77 +16282,22 @@ bool DAGCombiner::checkMergeStoreCandidatesForDependencies(
   return true;
 }
 
-bool DAGCombiner::MergeConsecutiveStores(StoreSDNode *St) {
-  if (OptLevel == CodeGenOpt::None || !EnableStoreMerging)
-    return false;
-
-  EVT MemVT = St->getMemoryVT();
-  int64_t ElementSizeBytes = MemVT.getStoreSize();
-  unsigned NumMemElts = MemVT.isVector() ? MemVT.getVectorNumElements() : 1;
-
-  if (MemVT.getSizeInBits() * 2 > MaximumLegalStoreInBits)
-    return false;
-
-  bool NoVectors = DAG.getMachineFunction().getFunction().hasFnAttribute(
-      Attribute::NoImplicitFloat);
-
-  // This function cannot currently deal with non-byte-sized memory sizes.
-  if (ElementSizeBytes * 8 != (int64_t)MemVT.getSizeInBits())
-    return false;
-
-  if (!MemVT.isSimple())
-    return false;
-
-  // Perform an early exit check. Do not bother looking at stored values that
-  // are not constants, loads, or extracted vector elements.
-  SDValue StoredVal = peekThroughBitcasts(St->getValue());
-  bool IsLoadSrc = isa<LoadSDNode>(StoredVal);
-  bool IsConstantSrc = isa<ConstantSDNode>(StoredVal) ||
-                       isa<ConstantFPSDNode>(StoredVal);
-  bool IsExtractVecSrc = (StoredVal.getOpcode() == ISD::EXTRACT_VECTOR_ELT ||
-                          StoredVal.getOpcode() == ISD::EXTRACT_SUBVECTOR);
-  bool IsNonTemporalStore = St->isNonTemporal();
-  bool IsNonTemporalLoad =
-      IsLoadSrc && cast<LoadSDNode>(StoredVal)->isNonTemporal();
-
-  if (!IsConstantSrc && !IsLoadSrc && !IsExtractVecSrc)
-    return false;
-
-  SmallVector<MemOpLink, 8> StoreNodes;
-  SDNode *RootNode;
-  // Find potential store merge candidates by searching through chain sub-DAG
-  getStoreMergeCandidates(St, StoreNodes, RootNode);
-
-  // Check if there is anything to merge.
-  if (StoreNodes.size() < 2)
-    return false;
-
-  // Sort the memory operands according to their distance from the
-  // base pointer.
-  llvm::sort(StoreNodes, [](MemOpLink LHS, MemOpLink RHS) {
-    return LHS.OffsetFromBase < RHS.OffsetFromBase;
-  });
-
-  // Store Merge attempts to merge the lowest stores. This generally
-  // works out as if successful, as the remaining stores are checked
-  // after the first collection of stores is merged. However, in the
-  // case that a non-mergeable store is found first, e.g., {p[-2],
-  // p[0], p[1], p[2], p[3]}, we would fail and miss the subsequent
-  // mergeable cases. To prevent this, we prune such stores from the
-  // front of StoreNodes here.
-
-  bool RV = false;
-  while (StoreNodes.size() > 1) {
+unsigned
+DAGCombiner::getConsecutiveStores(SmallVectorImpl<MemOpLink> &StoreNodes,
+                                  int64_t ElementSizeBytes) const {
+  while (true) {
+    // Find a store past the width of the first store.
     size_t StartIdx = 0;
     while ((StartIdx + 1 < StoreNodes.size()) &&
            StoreNodes[StartIdx].OffsetFromBase + ElementSizeBytes !=
-               StoreNodes[StartIdx + 1].OffsetFromBase)
+              StoreNodes[StartIdx + 1].OffsetFromBase)
       ++StartIdx;
 
     // Bail if we don't have enough candidates to merge.
     if (StartIdx + 1 >= StoreNodes.size())
-      return RV;
+      return 0;
 
+    // Trim stores that overlapped with the first store.
     if (StartIdx)
       StoreNodes.erase(StoreNodes.begin(), StoreNodes.begin() + StartIdx);
 
@@ -15827,302 +16313,345 @@ bool DAGCombiner::MergeConsecutiveStores(StoreSDNode *St) {
         break;
       NumConsecutiveStores = i + 1;
     }
+    if (NumConsecutiveStores > 1)
+      return NumConsecutiveStores;
 
-    if (NumConsecutiveStores < 2) {
-      StoreNodes.erase(StoreNodes.begin(),
-                       StoreNodes.begin() + NumConsecutiveStores);
-      continue;
-    }
-
-    // The node with the lowest store address.
-    LLVMContext &Context = *DAG.getContext();
-    const DataLayout &DL = DAG.getDataLayout();
-
-    // Store the constants into memory as one consecutive store.
-    if (IsConstantSrc) {
-      while (NumConsecutiveStores >= 2) {
-        LSBaseSDNode *FirstInChain = StoreNodes[0].MemNode;
-        unsigned FirstStoreAS = FirstInChain->getAddressSpace();
-        unsigned FirstStoreAlign = FirstInChain->getAlignment();
-        unsigned LastLegalType = 1;
-        unsigned LastLegalVectorType = 1;
-        bool LastIntegerTrunc = false;
-        bool NonZero = false;
-        unsigned FirstZeroAfterNonZero = NumConsecutiveStores;
-        for (unsigned i = 0; i < NumConsecutiveStores; ++i) {
-          StoreSDNode *ST = cast<StoreSDNode>(StoreNodes[i].MemNode);
-          SDValue StoredVal = ST->getValue();
-          bool IsElementZero = false;
-          if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(StoredVal))
-            IsElementZero = C->isNullValue();
-          else if (ConstantFPSDNode *C = dyn_cast<ConstantFPSDNode>(StoredVal))
-            IsElementZero = C->getConstantFPValue()->isNullValue();
-          if (IsElementZero) {
-            if (NonZero && FirstZeroAfterNonZero == NumConsecutiveStores)
-              FirstZeroAfterNonZero = i;
-          }
-          NonZero |= !IsElementZero;
-
-          // Find a legal type for the constant store.
-          unsigned SizeInBits = (i + 1) * ElementSizeBytes * 8;
-          EVT StoreTy = EVT::getIntegerVT(Context, SizeInBits);
-          bool IsFast = false;
+    // There are no consecutive stores at the start of the list.
+    // Remove the first store and try again.
+    StoreNodes.erase(StoreNodes.begin(), StoreNodes.begin() + 1);
+  }
+}
 
-          // Break early when size is too large to be legal.
-          if (StoreTy.getSizeInBits() > MaximumLegalStoreInBits)
-            break;
+bool DAGCombiner::tryStoreMergeOfConstants(
+    SmallVectorImpl<MemOpLink> &StoreNodes, unsigned NumConsecutiveStores,
+    EVT MemVT, SDNode *RootNode, bool AllowVectors) {
+  LLVMContext &Context = *DAG.getContext();
+  const DataLayout &DL = DAG.getDataLayout();
+  int64_t ElementSizeBytes = MemVT.getStoreSize();
+  unsigned NumMemElts = MemVT.isVector() ? MemVT.getVectorNumElements() : 1;
+  bool MadeChange = false;
+
+  // Store the constants into memory as one consecutive store.
+  while (NumConsecutiveStores >= 2) {
+    LSBaseSDNode *FirstInChain = StoreNodes[0].MemNode;
+    unsigned FirstStoreAS = FirstInChain->getAddressSpace();
+    unsigned FirstStoreAlign = FirstInChain->getAlignment();
+    unsigned LastLegalType = 1;
+    unsigned LastLegalVectorType = 1;
+    bool LastIntegerTrunc = false;
+    bool NonZero = false;
+    unsigned FirstZeroAfterNonZero = NumConsecutiveStores;
+    for (unsigned i = 0; i < NumConsecutiveStores; ++i) {
+      StoreSDNode *ST = cast<StoreSDNode>(StoreNodes[i].MemNode);
+      SDValue StoredVal = ST->getValue();
+      bool IsElementZero = false;
+      if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(StoredVal))
+        IsElementZero = C->isNullValue();
+      else if (ConstantFPSDNode *C = dyn_cast<ConstantFPSDNode>(StoredVal))
+        IsElementZero = C->getConstantFPValue()->isNullValue();
+      if (IsElementZero) {
+        if (NonZero && FirstZeroAfterNonZero == NumConsecutiveStores)
+          FirstZeroAfterNonZero = i;
+      }
+      NonZero |= !IsElementZero;
 
-          if (TLI.isTypeLegal(StoreTy) &&
-              TLI.canMergeStoresTo(FirstStoreAS, StoreTy, DAG) &&
-              TLI.allowsMemoryAccess(Context, DL, StoreTy,
-                                     *FirstInChain->getMemOperand(), &IsFast) &&
-              IsFast) {
-            LastIntegerTrunc = false;
-            LastLegalType = i + 1;
-            // Or check whether a truncstore is legal.
-          } else if (TLI.getTypeAction(Context, StoreTy) ==
-                     TargetLowering::TypePromoteInteger) {
-            EVT LegalizedStoredValTy =
-                TLI.getTypeToTransformTo(Context, StoredVal.getValueType());
-            if (TLI.isTruncStoreLegal(LegalizedStoredValTy, StoreTy) &&
-                TLI.canMergeStoresTo(FirstStoreAS, LegalizedStoredValTy, DAG) &&
-                TLI.allowsMemoryAccess(Context, DL, StoreTy,
-                                       *FirstInChain->getMemOperand(),
-                                       &IsFast) &&
-                IsFast) {
-              LastIntegerTrunc = true;
-              LastLegalType = i + 1;
-            }
-          }
+      // Find a legal type for the constant store.
+      unsigned SizeInBits = (i + 1) * ElementSizeBytes * 8;
+      EVT StoreTy = EVT::getIntegerVT(Context, SizeInBits);
+      bool IsFast = false;
 
-          // We only use vectors if the constant is known to be zero or the
-          // target allows it and the function is not marked with the
-          // noimplicitfloat attribute.
-          if ((!NonZero ||
-               TLI.storeOfVectorConstantIsCheap(MemVT, i + 1, FirstStoreAS)) &&
-              !NoVectors) {
-            // Find a legal type for the vector store.
-            unsigned Elts = (i + 1) * NumMemElts;
-            EVT Ty = EVT::getVectorVT(Context, MemVT.getScalarType(), Elts);
-            if (TLI.isTypeLegal(Ty) && TLI.isTypeLegal(MemVT) &&
-                TLI.canMergeStoresTo(FirstStoreAS, Ty, DAG) &&
-                TLI.allowsMemoryAccess(
-                    Context, DL, Ty, *FirstInChain->getMemOperand(), &IsFast) &&
-                IsFast)
-              LastLegalVectorType = i + 1;
-          }
-        }
+      // Break early when size is too large to be legal.
+      if (StoreTy.getSizeInBits() > MaximumLegalStoreInBits)
+        break;
 
-        bool UseVector = (LastLegalVectorType > LastLegalType) && !NoVectors;
-        unsigned NumElem = (UseVector) ? LastLegalVectorType : LastLegalType;
-
-        // Check if we found a legal integer type that creates a meaningful
-        // merge.
-        if (NumElem < 2) {
-          // We know that candidate stores are in order and of correct
-          // shape. While there is no mergeable sequence from the
-          // beginning one may start later in the sequence. The only
-          // reason a merge of size N could have failed where another of
-          // the same size would not have, is if the alignment has
-          // improved or we've dropped a non-zero value. Drop as many
-          // candidates as we can here.
-          unsigned NumSkip = 1;
-          while (
-              (NumSkip < NumConsecutiveStores) &&
-              (NumSkip < FirstZeroAfterNonZero) &&
-              (StoreNodes[NumSkip].MemNode->getAlignment() <= FirstStoreAlign))
-            NumSkip++;
-
-          StoreNodes.erase(StoreNodes.begin(), StoreNodes.begin() + NumSkip);
-          NumConsecutiveStores -= NumSkip;
-          continue;
+      if (TLI.isTypeLegal(StoreTy) &&
+          TLI.canMergeStoresTo(FirstStoreAS, StoreTy, DAG) &&
+          TLI.allowsMemoryAccess(Context, DL, StoreTy,
+                                 *FirstInChain->getMemOperand(), &IsFast) &&
+          IsFast) {
+        LastIntegerTrunc = false;
+        LastLegalType = i + 1;
+        // Or check whether a truncstore is legal.
+      } else if (TLI.getTypeAction(Context, StoreTy) ==
+                 TargetLowering::TypePromoteInteger) {
+        EVT LegalizedStoredValTy =
+            TLI.getTypeToTransformTo(Context, StoredVal.getValueType());
+        if (TLI.isTruncStoreLegal(LegalizedStoredValTy, StoreTy) &&
+            TLI.canMergeStoresTo(FirstStoreAS, LegalizedStoredValTy, DAG) &&
+            TLI.allowsMemoryAccess(Context, DL, StoreTy,
+                                   *FirstInChain->getMemOperand(), &IsFast) &&
+            IsFast) {
+          LastIntegerTrunc = true;
+          LastLegalType = i + 1;
         }
+      }
 
-        // Check that we can merge these candidates without causing a cycle.
-        if (!checkMergeStoreCandidatesForDependencies(StoreNodes, NumElem,
-                                                      RootNode)) {
-          StoreNodes.erase(StoreNodes.begin(), StoreNodes.begin() + NumElem);
-          NumConsecutiveStores -= NumElem;
-          continue;
-        }
+      // We only use vectors if the constant is known to be zero or the
+      // target allows it and the function is not marked with the
+      // noimplicitfloat attribute.
+      if ((!NonZero ||
+           TLI.storeOfVectorConstantIsCheap(MemVT, i + 1, FirstStoreAS)) &&
+          AllowVectors) {
+        // Find a legal type for the vector store.
+        unsigned Elts = (i + 1) * NumMemElts;
+        EVT Ty = EVT::getVectorVT(Context, MemVT.getScalarType(), Elts);
+        if (TLI.isTypeLegal(Ty) && TLI.isTypeLegal(MemVT) &&
+            TLI.canMergeStoresTo(FirstStoreAS, Ty, DAG) &&
+            TLI.allowsMemoryAccess(Context, DL, Ty,
+                                   *FirstInChain->getMemOperand(), &IsFast) &&
+            IsFast)
+          LastLegalVectorType = i + 1;
+      }
+    }
 
-        RV |= MergeStoresOfConstantsOrVecElts(StoreNodes, MemVT, NumElem, true,
-                                              UseVector, LastIntegerTrunc);
+    bool UseVector = (LastLegalVectorType > LastLegalType) && AllowVectors;
+    unsigned NumElem = (UseVector) ? LastLegalVectorType : LastLegalType;
+
+    // Check if we found a legal integer type that creates a meaningful
+    // merge.
+    if (NumElem < 2) {
+      // We know that candidate stores are in order and of correct
+      // shape. While there is no mergeable sequence from the
+      // beginning one may start later in the sequence. The only
+      // reason a merge of size N could have failed where another of
+      // the same size would not have, is if the alignment has
+      // improved or we've dropped a non-zero value. Drop as many
+      // candidates as we can here.
+      unsigned NumSkip = 1;
+      while ((NumSkip < NumConsecutiveStores) &&
+             (NumSkip < FirstZeroAfterNonZero) &&
+             (StoreNodes[NumSkip].MemNode->getAlignment() <= FirstStoreAlign))
+        NumSkip++;
+
+      StoreNodes.erase(StoreNodes.begin(), StoreNodes.begin() + NumSkip);
+      NumConsecutiveStores -= NumSkip;
+      continue;
+    }
 
-        // Remove merged stores for next iteration.
-        StoreNodes.erase(StoreNodes.begin(), StoreNodes.begin() + NumElem);
-        NumConsecutiveStores -= NumElem;
-      }
+    // Check that we can merge these candidates without causing a cycle.
+    if (!checkMergeStoreCandidatesForDependencies(StoreNodes, NumElem,
+                                                  RootNode)) {
+      StoreNodes.erase(StoreNodes.begin(), StoreNodes.begin() + NumElem);
+      NumConsecutiveStores -= NumElem;
       continue;
     }
 
-    // When extracting multiple vector elements, try to store them
-    // in one vector store rather than a sequence of scalar stores.
-    if (IsExtractVecSrc) {
-      // Loop on Consecutive Stores on success.
-      while (NumConsecutiveStores >= 2) {
-        LSBaseSDNode *FirstInChain = StoreNodes[0].MemNode;
-        unsigned FirstStoreAS = FirstInChain->getAddressSpace();
-        unsigned FirstStoreAlign = FirstInChain->getAlignment();
-        unsigned NumStoresToMerge = 1;
-        for (unsigned i = 0; i < NumConsecutiveStores; ++i) {
-          // Find a legal type for the vector store.
-          unsigned Elts = (i + 1) * NumMemElts;
-          EVT Ty =
-              EVT::getVectorVT(*DAG.getContext(), MemVT.getScalarType(), Elts);
-          bool IsFast;
-
-          // Break early when size is too large to be legal.
-          if (Ty.getSizeInBits() > MaximumLegalStoreInBits)
-            break;
+    MadeChange |= mergeStoresOfConstantsOrVecElts(
+        StoreNodes, MemVT, NumElem, true, UseVector, LastIntegerTrunc);
 
-          if (TLI.isTypeLegal(Ty) &&
-              TLI.canMergeStoresTo(FirstStoreAS, Ty, DAG) &&
-              TLI.allowsMemoryAccess(Context, DL, Ty,
-                                     *FirstInChain->getMemOperand(), &IsFast) &&
-              IsFast)
-            NumStoresToMerge = i + 1;
-        }
+    // Remove merged stores for next iteration.
+    StoreNodes.erase(StoreNodes.begin(), StoreNodes.begin() + NumElem);
+    NumConsecutiveStores -= NumElem;
+  }
+  return MadeChange;
+}
 
-        // Check if we found a legal integer type creating a meaningful
-        // merge.
-        if (NumStoresToMerge < 2) {
-          // We know that candidate stores are in order and of correct
-          // shape. While there is no mergeable sequence from the
-          // beginning one may start later in the sequence. The only
-          // reason a merge of size N could have failed where another of
-          // the same size would not have, is if the alignment has
-          // improved. Drop as many candidates as we can here.
-          unsigned NumSkip = 1;
-          while (
-              (NumSkip < NumConsecutiveStores) &&
-              (StoreNodes[NumSkip].MemNode->getAlignment() <= FirstStoreAlign))
-            NumSkip++;
-
-          StoreNodes.erase(StoreNodes.begin(), StoreNodes.begin() + NumSkip);
-          NumConsecutiveStores -= NumSkip;
-          continue;
-        }
+bool DAGCombiner::tryStoreMergeOfExtracts(
+    SmallVectorImpl<MemOpLink> &StoreNodes, unsigned NumConsecutiveStores,
+    EVT MemVT, SDNode *RootNode) {
+  LLVMContext &Context = *DAG.getContext();
+  const DataLayout &DL = DAG.getDataLayout();
+  unsigned NumMemElts = MemVT.isVector() ? MemVT.getVectorNumElements() : 1;
+  bool MadeChange = false;
+
+  // Loop on Consecutive Stores on success.
+  while (NumConsecutiveStores >= 2) {
+    LSBaseSDNode *FirstInChain = StoreNodes[0].MemNode;
+    unsigned FirstStoreAS = FirstInChain->getAddressSpace();
+    unsigned FirstStoreAlign = FirstInChain->getAlignment();
+    unsigned NumStoresToMerge = 1;
+    for (unsigned i = 0; i < NumConsecutiveStores; ++i) {
+      // Find a legal type for the vector store.
+      unsigned Elts = (i + 1) * NumMemElts;
+      EVT Ty = EVT::getVectorVT(*DAG.getContext(), MemVT.getScalarType(), Elts);
+      bool IsFast = false;
 
-        // Check that we can merge these candidates without causing a cycle.
-        if (!checkMergeStoreCandidatesForDependencies(
-                StoreNodes, NumStoresToMerge, RootNode)) {
-          StoreNodes.erase(StoreNodes.begin(),
-                           StoreNodes.begin() + NumStoresToMerge);
-          NumConsecutiveStores -= NumStoresToMerge;
-          continue;
-        }
+      // Break early when size is too large to be legal.
+      if (Ty.getSizeInBits() > MaximumLegalStoreInBits)
+        break;
 
-        RV |= MergeStoresOfConstantsOrVecElts(
-            StoreNodes, MemVT, NumStoresToMerge, false, true, false);
+      if (TLI.isTypeLegal(Ty) && TLI.canMergeStoresTo(FirstStoreAS, Ty, DAG) &&
+          TLI.allowsMemoryAccess(Context, DL, Ty,
+                                 *FirstInChain->getMemOperand(), &IsFast) &&
+          IsFast)
+        NumStoresToMerge = i + 1;
+    }
+
+    // Check if we found a legal integer type creating a meaningful
+    // merge.
+    if (NumStoresToMerge < 2) {
+      // We know that candidate stores are in order and of correct
+      // shape. While there is no mergeable sequence from the
+      // beginning one may start later in the sequence. The only
+      // reason a merge of size N could have failed where another of
+      // the same size would not have, is if the alignment has
+      // improved. Drop as many candidates as we can here.
+      unsigned NumSkip = 1;
+      while ((NumSkip < NumConsecutiveStores) &&
+             (StoreNodes[NumSkip].MemNode->getAlignment() <= FirstStoreAlign))
+        NumSkip++;
+
+      StoreNodes.erase(StoreNodes.begin(), StoreNodes.begin() + NumSkip);
+      NumConsecutiveStores -= NumSkip;
+      continue;
+    }
 
-        StoreNodes.erase(StoreNodes.begin(),
-                         StoreNodes.begin() + NumStoresToMerge);
-        NumConsecutiveStores -= NumStoresToMerge;
-      }
+    // Check that we can merge these candidates without causing a cycle.
+    if (!checkMergeStoreCandidatesForDependencies(StoreNodes, NumStoresToMerge,
+                                                  RootNode)) {
+      StoreNodes.erase(StoreNodes.begin(),
+                       StoreNodes.begin() + NumStoresToMerge);
+      NumConsecutiveStores -= NumStoresToMerge;
       continue;
     }
 
-    // Below we handle the case of multiple consecutive stores that
-    // come from multiple consecutive loads. We merge them into a single
-    // wide load and a single wide store.
+    MadeChange |= mergeStoresOfConstantsOrVecElts(
+        StoreNodes, MemVT, NumStoresToMerge, false, true, false);
 
-    // Look for load nodes which are used by the stored values.
-    SmallVector<MemOpLink, 8> LoadNodes;
+    StoreNodes.erase(StoreNodes.begin(), StoreNodes.begin() + NumStoresToMerge);
+    NumConsecutiveStores -= NumStoresToMerge;
+  }
+  return MadeChange;
+}
 
-    // Find acceptable loads. Loads need to have the same chain (token factor),
-    // must not be zext, volatile, indexed, and they must be consecutive.
-    BaseIndexOffset LdBasePtr;
+bool DAGCombiner::tryStoreMergeOfLoads(SmallVectorImpl<MemOpLink> &StoreNodes,
+                                       unsigned NumConsecutiveStores, EVT MemVT,
+                                       SDNode *RootNode, bool AllowVectors,
+                                       bool IsNonTemporalStore,
+                                       bool IsNonTemporalLoad) {
+  LLVMContext &Context = *DAG.getContext();
+  const DataLayout &DL = DAG.getDataLayout();
+  int64_t ElementSizeBytes = MemVT.getStoreSize();
+  unsigned NumMemElts = MemVT.isVector() ? MemVT.getVectorNumElements() : 1;
+  bool MadeChange = false;
 
-    for (unsigned i = 0; i < NumConsecutiveStores; ++i) {
-      StoreSDNode *St = cast<StoreSDNode>(StoreNodes[i].MemNode);
-      SDValue Val = peekThroughBitcasts(St->getValue());
-      LoadSDNode *Ld = cast<LoadSDNode>(Val);
-
-      BaseIndexOffset LdPtr = BaseIndexOffset::match(Ld, DAG);
-      // If this is not the first ptr that we check.
-      int64_t LdOffset = 0;
-      if (LdBasePtr.getBase().getNode()) {
-        // The base ptr must be the same.
-        if (!LdBasePtr.equalBaseIndex(LdPtr, DAG, LdOffset))
-          break;
-      } else {
-        // Check that all other base pointers are the same as this one.
-        LdBasePtr = LdPtr;
-      }
+  int64_t StartAddress = StoreNodes[0].OffsetFromBase;
+
+  // Look for load nodes which are used by the stored values.
+  SmallVector<MemOpLink, 8> LoadNodes;
 
-      // We found a potential memory operand to merge.
-      LoadNodes.push_back(MemOpLink(Ld, LdOffset));
+  // Find acceptable loads. Loads need to have the same chain (token factor),
+  // must not be zext, volatile, indexed, and they must be consecutive.
+  BaseIndexOffset LdBasePtr;
+
+  for (unsigned i = 0; i < NumConsecutiveStores; ++i) {
+    StoreSDNode *St = cast<StoreSDNode>(StoreNodes[i].MemNode);
+    SDValue Val = peekThroughBitcasts(St->getValue());
+    LoadSDNode *Ld = cast<LoadSDNode>(Val);
+
+    BaseIndexOffset LdPtr = BaseIndexOffset::match(Ld, DAG);
+    // If this is not the first ptr that we check.
+    int64_t LdOffset = 0;
+    if (LdBasePtr.getBase().getNode()) {
+      // The base ptr must be the same.
+      if (!LdBasePtr.equalBaseIndex(LdPtr, DAG, LdOffset))
+        break;
+    } else {
+      // Check that all other base pointers are the same as this one.
+      LdBasePtr = LdPtr;
     }
 
-    while (NumConsecutiveStores >= 2 && LoadNodes.size() >= 2) {
+    // We found a potential memory operand to merge.
+    LoadNodes.push_back(MemOpLink(Ld, LdOffset));
+  }
+
+  while (NumConsecutiveStores >= 2 && LoadNodes.size() >= 2) {
+    Align RequiredAlignment;
+    bool NeedRotate = false;
+    if (LoadNodes.size() == 2) {
       // If we have load/store pair instructions and we only have two values,
       // don't bother merging.
-      unsigned RequiredAlignment;
-      if (LoadNodes.size() == 2 &&
-          TLI.hasPairedLoad(MemVT, RequiredAlignment) &&
-          StoreNodes[0].MemNode->getAlignment() >= RequiredAlignment) {
+      if (TLI.hasPairedLoad(MemVT, RequiredAlignment) &&
+          StoreNodes[0].MemNode->getAlign() >= RequiredAlignment) {
         StoreNodes.erase(StoreNodes.begin(), StoreNodes.begin() + 2);
         LoadNodes.erase(LoadNodes.begin(), LoadNodes.begin() + 2);
         break;
       }
-      LSBaseSDNode *FirstInChain = StoreNodes[0].MemNode;
-      unsigned FirstStoreAS = FirstInChain->getAddressSpace();
-      unsigned FirstStoreAlign = FirstInChain->getAlignment();
-      LoadSDNode *FirstLoad = cast<LoadSDNode>(LoadNodes[0].MemNode);
-      unsigned FirstLoadAlign = FirstLoad->getAlignment();
-
-      // Scan the memory operations on the chain and find the first
-      // non-consecutive load memory address. These variables hold the index in
-      // the store node array.
-
-      unsigned LastConsecutiveLoad = 1;
-
-      // This variable refers to the size and not index in the array.
-      unsigned LastLegalVectorType = 1;
-      unsigned LastLegalIntegerType = 1;
-      bool isDereferenceable = true;
-      bool DoIntegerTruncate = false;
-      StartAddress = LoadNodes[0].OffsetFromBase;
-      SDValue FirstChain = FirstLoad->getChain();
-      for (unsigned i = 1; i < LoadNodes.size(); ++i) {
-        // All loads must share the same chain.
-        if (LoadNodes[i].MemNode->getChain() != FirstChain)
-          break;
+      // If the loads are reversed, see if we can rotate the halves into place.
+      int64_t Offset0 = LoadNodes[0].OffsetFromBase;
+      int64_t Offset1 = LoadNodes[1].OffsetFromBase;
+      EVT PairVT = EVT::getIntegerVT(Context, ElementSizeBytes * 8 * 2);
+      if (Offset0 - Offset1 == ElementSizeBytes &&
+          (hasOperation(ISD::ROTL, PairVT) ||
+           hasOperation(ISD::ROTR, PairVT))) {
+        std::swap(LoadNodes[0], LoadNodes[1]);
+        NeedRotate = true;
+      }
+    }
+    LSBaseSDNode *FirstInChain = StoreNodes[0].MemNode;
+    unsigned FirstStoreAS = FirstInChain->getAddressSpace();
+    unsigned FirstStoreAlign = FirstInChain->getAlignment();
+    LoadSDNode *FirstLoad = cast<LoadSDNode>(LoadNodes[0].MemNode);
 
-        int64_t CurrAddress = LoadNodes[i].OffsetFromBase;
-        if (CurrAddress - StartAddress != (ElementSizeBytes * i))
-          break;
-        LastConsecutiveLoad = i;
+    // Scan the memory operations on the chain and find the first
+    // non-consecutive load memory address. These variables hold the index in
+    // the store node array.
+
+    unsigned LastConsecutiveLoad = 1;
+
+    // This variable refers to the size and not index in the array.
+    unsigned LastLegalVectorType = 1;
+    unsigned LastLegalIntegerType = 1;
+    bool isDereferenceable = true;
+    bool DoIntegerTruncate = false;
+    StartAddress = LoadNodes[0].OffsetFromBase;
+    SDValue LoadChain = FirstLoad->getChain();
+    for (unsigned i = 1; i < LoadNodes.size(); ++i) {
+      // All loads must share the same chain.
+      if (LoadNodes[i].MemNode->getChain() != LoadChain)
+        break;
 
-        if (isDereferenceable && !LoadNodes[i].MemNode->isDereferenceable())
-          isDereferenceable = false;
+      int64_t CurrAddress = LoadNodes[i].OffsetFromBase;
+      if (CurrAddress - StartAddress != (ElementSizeBytes * i))
+        break;
+      LastConsecutiveLoad = i;
 
-        // Find a legal type for the vector store.
-        unsigned Elts = (i + 1) * NumMemElts;
-        EVT StoreTy = EVT::getVectorVT(Context, MemVT.getScalarType(), Elts);
+      if (isDereferenceable && !LoadNodes[i].MemNode->isDereferenceable())
+        isDereferenceable = false;
 
-        // Break early when size is too large to be legal.
-        if (StoreTy.getSizeInBits() > MaximumLegalStoreInBits)
-          break;
+      // Find a legal type for the vector store.
+      unsigned Elts = (i + 1) * NumMemElts;
+      EVT StoreTy = EVT::getVectorVT(Context, MemVT.getScalarType(), Elts);
 
-        bool IsFastSt, IsFastLd;
-        if (TLI.isTypeLegal(StoreTy) &&
-            TLI.canMergeStoresTo(FirstStoreAS, StoreTy, DAG) &&
-            TLI.allowsMemoryAccess(Context, DL, StoreTy,
-                                   *FirstInChain->getMemOperand(), &IsFastSt) &&
-            IsFastSt &&
-            TLI.allowsMemoryAccess(Context, DL, StoreTy,
-                                   *FirstLoad->getMemOperand(), &IsFastLd) &&
-            IsFastLd) {
-          LastLegalVectorType = i + 1;
-        }
+      // Break early when size is too large to be legal.
+      if (StoreTy.getSizeInBits() > MaximumLegalStoreInBits)
+        break;
+
+      bool IsFastSt = false;
+      bool IsFastLd = false;
+      if (TLI.isTypeLegal(StoreTy) &&
+          TLI.canMergeStoresTo(FirstStoreAS, StoreTy, DAG) &&
+          TLI.allowsMemoryAccess(Context, DL, StoreTy,
+                                 *FirstInChain->getMemOperand(), &IsFastSt) &&
+          IsFastSt &&
+          TLI.allowsMemoryAccess(Context, DL, StoreTy,
+                                 *FirstLoad->getMemOperand(), &IsFastLd) &&
+          IsFastLd) {
+        LastLegalVectorType = i + 1;
+      }
 
-        // Find a legal type for the integer store.
-        unsigned SizeInBits = (i + 1) * ElementSizeBytes * 8;
-        StoreTy = EVT::getIntegerVT(Context, SizeInBits);
-        if (TLI.isTypeLegal(StoreTy) &&
-            TLI.canMergeStoresTo(FirstStoreAS, StoreTy, DAG) &&
+      // Find a legal type for the integer store.
+      unsigned SizeInBits = (i + 1) * ElementSizeBytes * 8;
+      StoreTy = EVT::getIntegerVT(Context, SizeInBits);
+      if (TLI.isTypeLegal(StoreTy) &&
+          TLI.canMergeStoresTo(FirstStoreAS, StoreTy, DAG) &&
+          TLI.allowsMemoryAccess(Context, DL, StoreTy,
+                                 *FirstInChain->getMemOperand(), &IsFastSt) &&
+          IsFastSt &&
+          TLI.allowsMemoryAccess(Context, DL, StoreTy,
+                                 *FirstLoad->getMemOperand(), &IsFastLd) &&
+          IsFastLd) {
+        LastLegalIntegerType = i + 1;
+        DoIntegerTruncate = false;
+        // Or check whether a truncstore and extload is legal.
+      } else if (TLI.getTypeAction(Context, StoreTy) ==
+                 TargetLowering::TypePromoteInteger) {
+        EVT LegalizedStoredValTy = TLI.getTypeToTransformTo(Context, StoreTy);
+        if (TLI.isTruncStoreLegal(LegalizedStoredValTy, StoreTy) &&
+            TLI.canMergeStoresTo(FirstStoreAS, LegalizedStoredValTy, DAG) &&
+            TLI.isLoadExtLegal(ISD::ZEXTLOAD, LegalizedStoredValTy, StoreTy) &&
+            TLI.isLoadExtLegal(ISD::SEXTLOAD, LegalizedStoredValTy, StoreTy) &&
+            TLI.isLoadExtLegal(ISD::EXTLOAD, LegalizedStoredValTy, StoreTy) &&
             TLI.allowsMemoryAccess(Context, DL, StoreTy,
                                    *FirstInChain->getMemOperand(), &IsFastSt) &&
             IsFastSt &&
@@ -16130,149 +16659,225 @@ bool DAGCombiner::MergeConsecutiveStores(StoreSDNode *St) {
                                    *FirstLoad->getMemOperand(), &IsFastLd) &&
             IsFastLd) {
           LastLegalIntegerType = i + 1;
-          DoIntegerTruncate = false;
-          // Or check whether a truncstore and extload is legal.
-        } else if (TLI.getTypeAction(Context, StoreTy) ==
-                   TargetLowering::TypePromoteInteger) {
-          EVT LegalizedStoredValTy = TLI.getTypeToTransformTo(Context, StoreTy);
-          if (TLI.isTruncStoreLegal(LegalizedStoredValTy, StoreTy) &&
-              TLI.canMergeStoresTo(FirstStoreAS, LegalizedStoredValTy, DAG) &&
-              TLI.isLoadExtLegal(ISD::ZEXTLOAD, LegalizedStoredValTy,
-                                 StoreTy) &&
-              TLI.isLoadExtLegal(ISD::SEXTLOAD, LegalizedStoredValTy,
-                                 StoreTy) &&
-              TLI.isLoadExtLegal(ISD::EXTLOAD, LegalizedStoredValTy, StoreTy) &&
-              TLI.allowsMemoryAccess(Context, DL, StoreTy,
-                                     *FirstInChain->getMemOperand(),
-                                     &IsFastSt) &&
-              IsFastSt &&
-              TLI.allowsMemoryAccess(Context, DL, StoreTy,
-                                     *FirstLoad->getMemOperand(), &IsFastLd) &&
-              IsFastLd) {
-            LastLegalIntegerType = i + 1;
-            DoIntegerTruncate = true;
-          }
+          DoIntegerTruncate = true;
         }
       }
+    }
 
-      // Only use vector types if the vector type is larger than the integer
-      // type. If they are the same, use integers.
-      bool UseVectorTy =
-          LastLegalVectorType > LastLegalIntegerType && !NoVectors;
-      unsigned LastLegalType =
-          std::max(LastLegalVectorType, LastLegalIntegerType);
-
-      // We add +1 here because the LastXXX variables refer to location while
-      // the NumElem refers to array/index size.
-      unsigned NumElem =
-          std::min(NumConsecutiveStores, LastConsecutiveLoad + 1);
-      NumElem = std::min(LastLegalType, NumElem);
-
-      if (NumElem < 2) {
-        // We know that candidate stores are in order and of correct
-        // shape. While there is no mergeable sequence from the
-        // beginning one may start later in the sequence. The only
-        // reason a merge of size N could have failed where another of
-        // the same size would not have is if the alignment or either
-        // the load or store has improved. Drop as many candidates as we
-        // can here.
-        unsigned NumSkip = 1;
-        while ((NumSkip < LoadNodes.size()) &&
-               (LoadNodes[NumSkip].MemNode->getAlignment() <= FirstLoadAlign) &&
-               (StoreNodes[NumSkip].MemNode->getAlignment() <= FirstStoreAlign))
-          NumSkip++;
-        StoreNodes.erase(StoreNodes.begin(), StoreNodes.begin() + NumSkip);
-        LoadNodes.erase(LoadNodes.begin(), LoadNodes.begin() + NumSkip);
-        NumConsecutiveStores -= NumSkip;
-        continue;
-      }
+    // Only use vector types if the vector type is larger than the integer
+    // type. If they are the same, use integers.
+    bool UseVectorTy =
+        LastLegalVectorType > LastLegalIntegerType && AllowVectors;
+    unsigned LastLegalType =
+        std::max(LastLegalVectorType, LastLegalIntegerType);
+
+    // We add +1 here because the LastXXX variables refer to location while
+    // the NumElem refers to array/index size.
+    unsigned NumElem = std::min(NumConsecutiveStores, LastConsecutiveLoad + 1);
+    NumElem = std::min(LastLegalType, NumElem);
+    unsigned FirstLoadAlign = FirstLoad->getAlignment();
+
+    if (NumElem < 2) {
+      // We know that candidate stores are in order and of correct
+      // shape. While there is no mergeable sequence from the
+      // beginning one may start later in the sequence. The only
+      // reason a merge of size N could have failed where another of
+      // the same size would not have is if the alignment or either
+      // the load or store has improved. Drop as many candidates as we
+      // can here.
+      unsigned NumSkip = 1;
+      while ((NumSkip < LoadNodes.size()) &&
+             (LoadNodes[NumSkip].MemNode->getAlignment() <= FirstLoadAlign) &&
+             (StoreNodes[NumSkip].MemNode->getAlignment() <= FirstStoreAlign))
+        NumSkip++;
+      StoreNodes.erase(StoreNodes.begin(), StoreNodes.begin() + NumSkip);
+      LoadNodes.erase(LoadNodes.begin(), LoadNodes.begin() + NumSkip);
+      NumConsecutiveStores -= NumSkip;
+      continue;
+    }
 
-      // Check that we can merge these candidates without causing a cycle.
-      if (!checkMergeStoreCandidatesForDependencies(StoreNodes, NumElem,
-                                                    RootNode)) {
-        StoreNodes.erase(StoreNodes.begin(), StoreNodes.begin() + NumElem);
-        LoadNodes.erase(LoadNodes.begin(), LoadNodes.begin() + NumElem);
-        NumConsecutiveStores -= NumElem;
-        continue;
-      }
+    // Check that we can merge these candidates without causing a cycle.
+    if (!checkMergeStoreCandidatesForDependencies(StoreNodes, NumElem,
+                                                  RootNode)) {
+      StoreNodes.erase(StoreNodes.begin(), StoreNodes.begin() + NumElem);
+      LoadNodes.erase(LoadNodes.begin(), LoadNodes.begin() + NumElem);
+      NumConsecutiveStores -= NumElem;
+      continue;
+    }
 
-      // Find if it is better to use vectors or integers to load and store
-      // to memory.
-      EVT JointMemOpVT;
-      if (UseVectorTy) {
-        // Find a legal type for the vector store.
-        unsigned Elts = NumElem * NumMemElts;
-        JointMemOpVT = EVT::getVectorVT(Context, MemVT.getScalarType(), Elts);
-      } else {
-        unsigned SizeInBits = NumElem * ElementSizeBytes * 8;
-        JointMemOpVT = EVT::getIntegerVT(Context, SizeInBits);
+    // Find if it is better to use vectors or integers to load and store
+    // to memory.
+    EVT JointMemOpVT;
+    if (UseVectorTy) {
+      // Find a legal type for the vector store.
+      unsigned Elts = NumElem * NumMemElts;
+      JointMemOpVT = EVT::getVectorVT(Context, MemVT.getScalarType(), Elts);
+    } else {
+      unsigned SizeInBits = NumElem * ElementSizeBytes * 8;
+      JointMemOpVT = EVT::getIntegerVT(Context, SizeInBits);
+    }
+
+    SDLoc LoadDL(LoadNodes[0].MemNode);
+    SDLoc StoreDL(StoreNodes[0].MemNode);
+
+    // The merged loads are required to have the same incoming chain, so
+    // using the first's chain is acceptable.
+
+    SDValue NewStoreChain = getMergeStoreChains(StoreNodes, NumElem);
+    AddToWorklist(NewStoreChain.getNode());
+
+    MachineMemOperand::Flags LdMMOFlags =
+        isDereferenceable ? MachineMemOperand::MODereferenceable
+                          : MachineMemOperand::MONone;
+    if (IsNonTemporalLoad)
+      LdMMOFlags |= MachineMemOperand::MONonTemporal;
+
+    MachineMemOperand::Flags StMMOFlags = IsNonTemporalStore
+                                              ? MachineMemOperand::MONonTemporal
+                                              : MachineMemOperand::MONone;
+
+    SDValue NewLoad, NewStore;
+    if (UseVectorTy || !DoIntegerTruncate) {
+      NewLoad = DAG.getLoad(
+          JointMemOpVT, LoadDL, FirstLoad->getChain(), FirstLoad->getBasePtr(),
+          FirstLoad->getPointerInfo(), FirstLoadAlign, LdMMOFlags);
+      SDValue StoreOp = NewLoad;
+      if (NeedRotate) {
+        unsigned LoadWidth = ElementSizeBytes * 8 * 2;
+        assert(JointMemOpVT == EVT::getIntegerVT(Context, LoadWidth) &&
+               "Unexpected type for rotate-able load pair");
+        SDValue RotAmt =
+            DAG.getShiftAmountConstant(LoadWidth / 2, JointMemOpVT, LoadDL);
+        // Target can convert to the identical ROTR if it does not have ROTL.
+        StoreOp = DAG.getNode(ISD::ROTL, LoadDL, JointMemOpVT, NewLoad, RotAmt);
       }
+      NewStore = DAG.getStore(
+          NewStoreChain, StoreDL, StoreOp, FirstInChain->getBasePtr(),
+          FirstInChain->getPointerInfo(), FirstStoreAlign, StMMOFlags);
+    } else { // This must be the truncstore/extload case
+      EVT ExtendedTy =
+          TLI.getTypeToTransformTo(*DAG.getContext(), JointMemOpVT);
+      NewLoad = DAG.getExtLoad(ISD::EXTLOAD, LoadDL, ExtendedTy,
+                               FirstLoad->getChain(), FirstLoad->getBasePtr(),
+                               FirstLoad->getPointerInfo(), JointMemOpVT,
+                               FirstLoadAlign, LdMMOFlags);
+      NewStore = DAG.getTruncStore(NewStoreChain, StoreDL, NewLoad,
+                                   FirstInChain->getBasePtr(),
+                                   FirstInChain->getPointerInfo(), JointMemOpVT,
+                                   FirstInChain->getAlignment(),
+                                   FirstInChain->getMemOperand()->getFlags());
+    }
+
+    // Transfer chain users from old loads to the new load.
+    for (unsigned i = 0; i < NumElem; ++i) {
+      LoadSDNode *Ld = cast<LoadSDNode>(LoadNodes[i].MemNode);
+      DAG.ReplaceAllUsesOfValueWith(SDValue(Ld, 1),
+                                    SDValue(NewLoad.getNode(), 1));
+    }
+
+    // Replace all stores with the new store. Recursively remove corresponding
+    // values if they are no longer used.
+    for (unsigned i = 0; i < NumElem; ++i) {
+      SDValue Val = StoreNodes[i].MemNode->getOperand(1);
+      CombineTo(StoreNodes[i].MemNode, NewStore);
+      if (Val.getNode()->use_empty())
+        recursivelyDeleteUnusedNodes(Val.getNode());
+    }
+
+    MadeChange = true;
+    StoreNodes.erase(StoreNodes.begin(), StoreNodes.begin() + NumElem);
+    LoadNodes.erase(LoadNodes.begin(), LoadNodes.begin() + NumElem);
+    NumConsecutiveStores -= NumElem;
+  }
+  return MadeChange;
+}
+
+bool DAGCombiner::mergeConsecutiveStores(StoreSDNode *St) {
+  if (OptLevel == CodeGenOpt::None || !EnableStoreMerging)
+    return false;
 
-      SDLoc LoadDL(LoadNodes[0].MemNode);
-      SDLoc StoreDL(StoreNodes[0].MemNode);
-
-      // The merged loads are required to have the same incoming chain, so
-      // using the first's chain is acceptable.
-
-      SDValue NewStoreChain = getMergeStoreChains(StoreNodes, NumElem);
-      AddToWorklist(NewStoreChain.getNode());
-
-      MachineMemOperand::Flags LdMMOFlags =
-          isDereferenceable ? MachineMemOperand::MODereferenceable
-                            : MachineMemOperand::MONone;
-      if (IsNonTemporalLoad)
-        LdMMOFlags |= MachineMemOperand::MONonTemporal;
-
-      MachineMemOperand::Flags StMMOFlags =
-          IsNonTemporalStore ? MachineMemOperand::MONonTemporal
-                             : MachineMemOperand::MONone;
-
-      SDValue NewLoad, NewStore;
-      if (UseVectorTy || !DoIntegerTruncate) {
-        NewLoad =
-            DAG.getLoad(JointMemOpVT, LoadDL, FirstLoad->getChain(),
-                        FirstLoad->getBasePtr(), FirstLoad->getPointerInfo(),
-                        FirstLoadAlign, LdMMOFlags);
-        NewStore = DAG.getStore(
-            NewStoreChain, StoreDL, NewLoad, FirstInChain->getBasePtr(),
-            FirstInChain->getPointerInfo(), FirstStoreAlign, StMMOFlags);
-      } else { // This must be the truncstore/extload case
-        EVT ExtendedTy =
-            TLI.getTypeToTransformTo(*DAG.getContext(), JointMemOpVT);
-        NewLoad = DAG.getExtLoad(ISD::EXTLOAD, LoadDL, ExtendedTy,
-                                 FirstLoad->getChain(), FirstLoad->getBasePtr(),
-                                 FirstLoad->getPointerInfo(), JointMemOpVT,
-                                 FirstLoadAlign, LdMMOFlags);
-        NewStore = DAG.getTruncStore(NewStoreChain, StoreDL, NewLoad,
-                                     FirstInChain->getBasePtr(),
-                                     FirstInChain->getPointerInfo(),
-                                     JointMemOpVT, FirstInChain->getAlignment(),
-                                     FirstInChain->getMemOperand()->getFlags());
-      }
+  // TODO: Extend this function to merge stores of scalable vectors.
+  // (i.e. two <vscale x 8 x i8> stores can be merged to one <vscale x 16 x i8>
+  // store since we know <vscale x 16 x i8> is exactly twice as large as
+  // <vscale x 8 x i8>). Until then, bail out for scalable vectors.
+  EVT MemVT = St->getMemoryVT();
+  if (MemVT.isScalableVector())
+    return false;
+  if (!MemVT.isSimple() || MemVT.getSizeInBits() * 2 > MaximumLegalStoreInBits)
+    return false;
 
-      // Transfer chain users from old loads to the new load.
-      for (unsigned i = 0; i < NumElem; ++i) {
-        LoadSDNode *Ld = cast<LoadSDNode>(LoadNodes[i].MemNode);
-        DAG.ReplaceAllUsesOfValueWith(SDValue(Ld, 1),
-                                      SDValue(NewLoad.getNode(), 1));
-      }
+  // This function cannot currently deal with non-byte-sized memory sizes.
+  int64_t ElementSizeBytes = MemVT.getStoreSize();
+  if (ElementSizeBytes * 8 != (int64_t)MemVT.getSizeInBits())
+    return false;
 
-      // Replace the all stores with the new store. Recursively remove
-      // corresponding value if its no longer used.
-      for (unsigned i = 0; i < NumElem; ++i) {
-        SDValue Val = StoreNodes[i].MemNode->getOperand(1);
-        CombineTo(StoreNodes[i].MemNode, NewStore);
-        if (Val.getNode()->use_empty())
-          recursivelyDeleteUnusedNodes(Val.getNode());
-      }
+  // Do not bother looking at stored values that are not constants, loads, or
+  // extracted vector elements.
+  SDValue StoredVal = peekThroughBitcasts(St->getValue());
+  const StoreSource StoreSrc = getStoreSource(StoredVal);
+  if (StoreSrc == StoreSource::Unknown)
+    return false;
 
-      RV = true;
-      StoreNodes.erase(StoreNodes.begin(), StoreNodes.begin() + NumElem);
-      LoadNodes.erase(LoadNodes.begin(), LoadNodes.begin() + NumElem);
-      NumConsecutiveStores -= NumElem;
+  SmallVector<MemOpLink, 8> StoreNodes;
+  SDNode *RootNode;
+  // Find potential store merge candidates by searching through chain sub-DAG
+  getStoreMergeCandidates(St, StoreNodes, RootNode);
+
+  // Check if there is anything to merge.
+  if (StoreNodes.size() < 2)
+    return false;
+
+  // Sort the memory operands according to their distance from the
+  // base pointer.
+  llvm::sort(StoreNodes, [](MemOpLink LHS, MemOpLink RHS) {
+    return LHS.OffsetFromBase < RHS.OffsetFromBase;
+  });
+
+  bool AllowVectors = !DAG.getMachineFunction().getFunction().hasFnAttribute(
+      Attribute::NoImplicitFloat);
+  bool IsNonTemporalStore = St->isNonTemporal();
+  bool IsNonTemporalLoad = StoreSrc == StoreSource::Load &&
+                           cast<LoadSDNode>(StoredVal)->isNonTemporal();
+
+  // Store Merge attempts to merge the lowest stores. This generally
+  // works out as if successful, as the remaining stores are checked
+  // after the first collection of stores is merged. However, in the
+  // case that a non-mergeable store is found first, e.g., {p[-2],
+  // p[0], p[1], p[2], p[3]}, we would fail and miss the subsequent
+  // mergeable cases. To prevent this, we prune such stores from the
+  // front of StoreNodes here.
+  bool MadeChange = false;
+  while (StoreNodes.size() > 1) {
+    unsigned NumConsecutiveStores =
+        getConsecutiveStores(StoreNodes, ElementSizeBytes);
+    // There are no more stores in the list to examine.
+    if (NumConsecutiveStores == 0)
+      return MadeChange;
+
+    // We have at least 2 consecutive stores. Try to merge them.
+    assert(NumConsecutiveStores >= 2 && "Expected at least 2 stores");
+    switch (StoreSrc) {
+    case StoreSource::Constant:
+      MadeChange |= tryStoreMergeOfConstants(StoreNodes, NumConsecutiveStores,
+                                             MemVT, RootNode, AllowVectors);
+      break;
+
+    case StoreSource::Extract:
+      MadeChange |= tryStoreMergeOfExtracts(StoreNodes, NumConsecutiveStores,
+                                            MemVT, RootNode);
+      break;
+
+    case StoreSource::Load:
+      MadeChange |= tryStoreMergeOfLoads(StoreNodes, NumConsecutiveStores,
+                                         MemVT, RootNode, AllowVectors,
+                                         IsNonTemporalStore, IsNonTemporalLoad);
+      break;
+
+    default:
+      llvm_unreachable("Unhandled store source type");
     }
   }
-  return RV;
+  return MadeChange;
 }
 
 SDValue DAGCombiner::replaceStoreChain(StoreSDNode *ST, SDValue BetterChain) {
@@ -16413,11 +17018,12 @@ SDValue DAGCombiner::visitSTORE(SDNode *N) {
 
   // Try to infer better alignment information than the store already has.
   if (OptLevel != CodeGenOpt::None && ST->isUnindexed() && !ST->isAtomic()) {
-    if (unsigned Align = DAG.InferPtrAlignment(Ptr)) {
-      if (Align > ST->getAlignment() && ST->getSrcValueOffset() % Align == 0) {
+    if (MaybeAlign Alignment = DAG.InferPtrAlign(Ptr)) {
+      if (*Alignment > ST->getAlign() &&
+          isAligned(*Alignment, ST->getSrcValueOffset())) {
         SDValue NewStore =
             DAG.getTruncStore(Chain, SDLoc(N), Value, Ptr, ST->getPointerInfo(),
-                              ST->getMemoryVT(), Align,
+                              ST->getMemoryVT(), *Alignment,
                               ST->getMemOperand()->getFlags(), ST->getAAInfo());
         // NewStore will always be N as we are only refining the alignment
         assert(NewStore.getNode() == N);
@@ -16502,7 +17108,10 @@ SDValue DAGCombiner::visitSTORE(SDNode *N) {
       }
 
       if (OptLevel != CodeGenOpt::None && ST1->hasOneUse() &&
-          !ST1->getBasePtr().isUndef()) {
+          !ST1->getBasePtr().isUndef() &&
+          // BaseIndexOffset and the code below requires knowing the size
+          // of a vector, so bail out if MemoryVT is scalable.
+          !ST1->getMemoryVT().isScalableVector()) {
         const BaseIndexOffset STBase = BaseIndexOffset::match(ST, DAG);
         const BaseIndexOffset ChainBase = BaseIndexOffset::match(ST1, DAG);
         unsigned STBitSize = ST->getMemoryVT().getSizeInBits();
@@ -16537,7 +17146,7 @@ SDValue DAGCombiner::visitSTORE(SDNode *N) {
       // There can be multiple store sequences on the same chain.
       // Keep trying to merge store sequences until we are unable to do so
       // or until we merge the last store on the chain.
-      bool Changed = MergeConsecutiveStores(ST);
+      bool Changed = mergeConsecutiveStores(ST);
       if (!Changed) break;
       // Return N as merge only uses CombineTo and no worklist clean
       // up is necessary.
@@ -16813,6 +17422,10 @@ SDValue DAGCombiner::combineInsertEltToShuffle(SDNode *N, unsigned InsIndex) {
   EVT SubVecVT = SubVec.getValueType();
   EVT VT = DestVec.getValueType();
   unsigned NumSrcElts = SubVecVT.getVectorNumElements();
+  // If the source only has a single vector element, the cost of creating adding
+  // it to a vector is likely to exceed the cost of a insert_vector_elt.
+  if (NumSrcElts == 1)
+    return SDValue();
   unsigned ExtendRatio = VT.getSizeInBits() / SubVecVT.getSizeInBits();
   unsigned NumMaskVals = ExtendRatio * NumSrcElts;
 
@@ -16858,12 +17471,12 @@ SDValue DAGCombiner::visitINSERT_VECTOR_ELT(SDNode *N) {
   SDLoc DL(N);
 
   EVT VT = InVec.getValueType();
-  unsigned NumElts = VT.getVectorNumElements();
+  auto *IndexC = dyn_cast<ConstantSDNode>(EltNo);
 
   // Insert into out-of-bounds element is undefined.
-  if (auto *IndexC = dyn_cast<ConstantSDNode>(EltNo))
-    if (IndexC->getZExtValue() >= VT.getVectorNumElements())
-      return DAG.getUNDEF(VT);
+  if (IndexC && VT.isFixedLengthVector() &&
+      IndexC->getZExtValue() >= VT.getVectorNumElements())
+    return DAG.getUNDEF(VT);
 
   // Remove redundant insertions:
   // (insert_vector_elt x (extract_vector_elt x idx) idx) -> x
@@ -16871,17 +17484,25 @@ SDValue DAGCombiner::visitINSERT_VECTOR_ELT(SDNode *N) {
       InVec == InVal.getOperand(0) && EltNo == InVal.getOperand(1))
     return InVec;
 
-  auto *IndexC = dyn_cast<ConstantSDNode>(EltNo);
   if (!IndexC) {
     // If this is variable insert to undef vector, it might be better to splat:
     // inselt undef, InVal, EltNo --> build_vector < InVal, InVal, ... >
     if (InVec.isUndef() && TLI.shouldSplatInsEltVarIndex(VT)) {
-      SmallVector<SDValue, 8> Ops(NumElts, InVal);
-      return DAG.getBuildVector(VT, DL, Ops);
+      if (VT.isScalableVector())
+        return DAG.getSplatVector(VT, DL, InVal);
+      else {
+        SmallVector<SDValue, 8> Ops(VT.getVectorNumElements(), InVal);
+        return DAG.getBuildVector(VT, DL, Ops);
+      }
     }
     return SDValue();
   }
 
+  if (VT.isScalableVector())
+    return SDValue();
+
+  unsigned NumElts = VT.getVectorNumElements();
+
   // We must know which element is being inserted for folds below here.
   unsigned Elt = IndexC->getZExtValue();
   if (SDValue Shuf = combineInsertEltToShuffle(N, Elt))
@@ -16946,11 +17567,12 @@ SDValue DAGCombiner::scalarizeExtractedVectorLoad(SDNode *EVE, EVT InVecVT,
 
   EVT ResultVT = EVE->getValueType(0);
   EVT VecEltVT = InVecVT.getVectorElementType();
-  unsigned Align = OriginalLoad->getAlignment();
-  unsigned NewAlign = DAG.getDataLayout().getABITypeAlignment(
+  Align Alignment = OriginalLoad->getAlign();
+  Align NewAlign = DAG.getDataLayout().getABITypeAlign(
       VecEltVT.getTypeForEVT(*DAG.getContext()));
 
-  if (NewAlign > Align || !TLI.isOperationLegalOrCustom(ISD::LOAD, VecEltVT))
+  if (NewAlign > Alignment ||
+      !TLI.isOperationLegalOrCustom(ISD::LOAD, VecEltVT))
     return SDValue();
 
   ISD::LoadExtType ExtTy = ResultVT.bitsGT(VecEltVT) ?
@@ -16958,7 +17580,7 @@ SDValue DAGCombiner::scalarizeExtractedVectorLoad(SDNode *EVE, EVT InVecVT,
   if (!TLI.shouldReduceLoadWidth(OriginalLoad, ExtTy, VecEltVT))
     return SDValue();
 
-  Align = NewAlign;
+  Alignment = NewAlign;
 
   SDValue NewPtr = OriginalLoad->getBasePtr();
   SDValue Offset;
@@ -16998,13 +17620,13 @@ SDValue DAGCombiner::scalarizeExtractedVectorLoad(SDNode *EVE, EVT InVecVT,
                                    : ISD::EXTLOAD;
     Load = DAG.getExtLoad(ExtType, SDLoc(EVE), ResultVT,
                           OriginalLoad->getChain(), NewPtr, MPI, VecEltVT,
-                          Align, OriginalLoad->getMemOperand()->getFlags(),
+                          Alignment, OriginalLoad->getMemOperand()->getFlags(),
                           OriginalLoad->getAAInfo());
     Chain = Load.getValue(1);
   } else {
-    Load = DAG.getLoad(VecEltVT, SDLoc(EVE), OriginalLoad->getChain(), NewPtr,
-                       MPI, Align, OriginalLoad->getMemOperand()->getFlags(),
-                       OriginalLoad->getAAInfo());
+    Load = DAG.getLoad(
+        VecEltVT, SDLoc(EVE), OriginalLoad->getChain(), NewPtr, MPI, Alignment,
+        OriginalLoad->getMemOperand()->getFlags(), OriginalLoad->getAAInfo());
     Chain = Load.getValue(1);
     if (ResultVT.bitsLT(VecEltVT))
       Load = DAG.getNode(ISD::TRUNCATE, SDLoc(EVE), ResultVT, Load);
@@ -17080,6 +17702,10 @@ SDValue DAGCombiner::visitEXTRACT_VECTOR_ELT(SDNode *N) {
 
   // (vextract (scalar_to_vector val, 0) -> val
   if (VecOp.getOpcode() == ISD::SCALAR_TO_VECTOR) {
+    // Only 0'th element of SCALAR_TO_VECTOR is defined.
+    if (DAG.isKnownNeverZero(Index))
+      return DAG.getUNDEF(ScalarVT);
+
     // Check if the result type doesn't match the inserted element type. A
     // SCALAR_TO_VECTOR may truncate the inserted element and the
     // EXTRACT_VECTOR_ELT may widen the extracted vector.
@@ -17093,15 +17719,21 @@ SDValue DAGCombiner::visitEXTRACT_VECTOR_ELT(SDNode *N) {
 
   // extract_vector_elt of out-of-bounds element -> UNDEF
   auto *IndexC = dyn_cast<ConstantSDNode>(Index);
-  unsigned NumElts = VecVT.getVectorNumElements();
-  if (IndexC && IndexC->getAPIntValue().uge(NumElts))
+  if (IndexC && VecVT.isFixedLengthVector() &&
+      IndexC->getAPIntValue().uge(VecVT.getVectorNumElements()))
     return DAG.getUNDEF(ScalarVT);
 
   // extract_vector_elt (build_vector x, y), 1 -> y
-  if (IndexC && VecOp.getOpcode() == ISD::BUILD_VECTOR &&
+  if (((IndexC && VecOp.getOpcode() == ISD::BUILD_VECTOR) ||
+       VecOp.getOpcode() == ISD::SPLAT_VECTOR) &&
       TLI.isTypeLegal(VecVT) &&
       (VecOp.hasOneUse() || TLI.aggressivelyPreferBuildVectorSources(VecVT))) {
-    SDValue Elt = VecOp.getOperand(IndexC->getZExtValue());
+    assert((VecOp.getOpcode() != ISD::BUILD_VECTOR ||
+            VecVT.isFixedLengthVector()) &&
+           "BUILD_VECTOR used for scalable vectors");
+    unsigned IndexVal =
+        VecOp.getOpcode() == ISD::BUILD_VECTOR ? IndexC->getZExtValue() : 0;
+    SDValue Elt = VecOp.getOperand(IndexVal);
     EVT InEltVT = Elt.getValueType();
 
     // Sometimes build_vector's scalar input types do not match result type.
@@ -17112,6 +17744,15 @@ SDValue DAGCombiner::visitEXTRACT_VECTOR_ELT(SDNode *N) {
     // converts.
   }
 
+  if (VecVT.isScalableVector())
+    return SDValue();
+
+  // All the code from this point onwards assumes fixed width vectors, but it's
+  // possible that some of the combinations could be made to work for scalable
+  // vectors too.
+  unsigned NumElts = VecVT.getVectorNumElements();
+  unsigned VecEltBitWidth = VecVT.getScalarSizeInBits();
+
   // TODO: These transforms should not require the 'hasOneUse' restriction, but
   // there are regressions on multiple targets without it. We can end up with a
   // mess of scalar and vector code if we reduce only part of the DAG to scalar.
@@ -17135,7 +17776,6 @@ SDValue DAGCombiner::visitEXTRACT_VECTOR_ELT(SDNode *N) {
              "Extract element and scalar to vector can't change element type "
              "from FP to integer.");
       unsigned XBitWidth = X.getValueSizeInBits();
-      unsigned VecEltBitWidth = VecVT.getScalarSizeInBits();
       BCTruncElt = IsLE ? 0 : XBitWidth / VecEltBitWidth - 1;
 
       // An extract element return value type can be wider than its vector
@@ -17193,9 +17833,8 @@ SDValue DAGCombiner::visitEXTRACT_VECTOR_ELT(SDNode *N) {
         // FIXME: Should really be just isOperationLegalOrCustom.
         TLI.isOperationLegal(ISD::EXTRACT_VECTOR_ELT, VecVT) ||
         TLI.isOperationExpand(ISD::VECTOR_SHUFFLE, VecVT)) {
-      EVT IndexTy = TLI.getVectorIdxTy(DAG.getDataLayout());
       return DAG.getNode(ISD::EXTRACT_VECTOR_ELT, DL, ScalarVT, SVInVec,
-                         DAG.getConstant(OrigElt, DL, IndexTy));
+                         DAG.getVectorIdxConstant(OrigElt, DL));
     }
   }
 
@@ -17219,6 +17858,14 @@ SDValue DAGCombiner::visitEXTRACT_VECTOR_ELT(SDNode *N) {
         AddToWorklist(N);
       return SDValue(N, 0);
     }
+    APInt DemandedBits = APInt::getAllOnesValue(VecEltBitWidth);
+    if (SimplifyDemandedBits(VecOp, DemandedBits, DemandedElts, true)) {
+      // We simplified the vector operand of this extract element. If this
+      // extract is not dead, visit it again so it is folded properly.
+      if (N->getOpcode() != ISD::DELETED_NODE)
+        AddToWorklist(N);
+      return SDValue(N, 0);
+    }
   }
 
   // Everything under here is trying to match an extract of a loaded value.
@@ -17304,6 +17951,30 @@ SDValue DAGCombiner::visitEXTRACT_VECTOR_ELT(SDNode *N) {
       Elt = (Idx < (int)NumElts) ? Idx : Idx - (int)NumElts;
       Index = DAG.getConstant(Elt, DL, Index.getValueType());
     }
+  } else if (VecOp.getOpcode() == ISD::CONCAT_VECTORS && !BCNumEltsChanged &&
+             VecVT.getVectorElementType() == ScalarVT &&
+             (!LegalTypes ||
+              TLI.isTypeLegal(
+                  VecOp.getOperand(0).getValueType().getVectorElementType()))) {
+    // extract_vector_elt (concat_vectors v2i16:a, v2i16:b), 0
+    //      -> extract_vector_elt a, 0
+    // extract_vector_elt (concat_vectors v2i16:a, v2i16:b), 1
+    //      -> extract_vector_elt a, 1
+    // extract_vector_elt (concat_vectors v2i16:a, v2i16:b), 2
+    //      -> extract_vector_elt b, 0
+    // extract_vector_elt (concat_vectors v2i16:a, v2i16:b), 3
+    //      -> extract_vector_elt b, 1
+    SDLoc SL(N);
+    EVT ConcatVT = VecOp.getOperand(0).getValueType();
+    unsigned ConcatNumElts = ConcatVT.getVectorNumElements();
+    SDValue NewIdx = DAG.getConstant(Elt % ConcatNumElts, SL,
+                                     Index.getValueType());
+
+    SDValue ConcatOp = VecOp.getOperand(Elt / ConcatNumElts);
+    SDValue Elt = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, SL,
+                              ConcatVT.getVectorElementType(),
+                              ConcatOp, NewIdx);
+    return DAG.getNode(ISD::BITCAST, SL, ScalarVT, Elt);
   }
 
   // Make sure we found a non-volatile load and the extractelement is
@@ -17385,6 +18056,11 @@ SDValue DAGCombiner::reduceBuildVecExtToExtBuildVec(SDNode *N) {
   if (!ValidTypes)
     return SDValue();
 
+  // If we already have a splat buildvector, then don't fold it if it means
+  // introducing zeros.
+  if (!AllAnyExt && DAG.isSplatValue(SDValue(N, 0), /*AllowUndefs*/ true))
+    return SDValue();
+
   bool isLE = DAG.getDataLayout().isLittleEndian();
   unsigned ElemRatio = OutScalarTy.getSizeInBits()/SourceType.getSizeInBits();
   assert(ElemRatio > 1 && "Invalid element size ratio");
@@ -17431,12 +18107,89 @@ SDValue DAGCombiner::reduceBuildVecExtToExtBuildVec(SDNode *N) {
   return DAG.getBitcast(VT, BV);
 }
 
+// Simplify (build_vec (trunc $1)
+//                     (trunc (srl $1 half-width))
+//                     (trunc (srl $1 (2 * half-width))) …)
+// to (bitcast $1)
+SDValue DAGCombiner::reduceBuildVecTruncToBitCast(SDNode *N) {
+  assert(N->getOpcode() == ISD::BUILD_VECTOR && "Expected build vector");
+
+  // Only for little endian
+  if (!DAG.getDataLayout().isLittleEndian())
+    return SDValue();
+
+  SDLoc DL(N);
+  EVT VT = N->getValueType(0);
+  EVT OutScalarTy = VT.getScalarType();
+  uint64_t ScalarTypeBitsize = OutScalarTy.getSizeInBits();
+
+  // Only for power of two types to be sure that bitcast works well
+  if (!isPowerOf2_64(ScalarTypeBitsize))
+    return SDValue();
+
+  unsigned NumInScalars = N->getNumOperands();
+
+  // Look through bitcasts
+  auto PeekThroughBitcast = [](SDValue Op) {
+    if (Op.getOpcode() == ISD::BITCAST)
+      return Op.getOperand(0);
+    return Op;
+  };
+
+  // The source value where all the parts are extracted.
+  SDValue Src;
+  for (unsigned i = 0; i != NumInScalars; ++i) {
+    SDValue In = PeekThroughBitcast(N->getOperand(i));
+    // Ignore undef inputs.
+    if (In.isUndef()) continue;
+
+    if (In.getOpcode() != ISD::TRUNCATE)
+      return SDValue();
+
+    In = PeekThroughBitcast(In.getOperand(0));
+
+    if (In.getOpcode() != ISD::SRL) {
+      // For now only build_vec without shuffling, handle shifts here in the
+      // future.
+      if (i != 0)
+        return SDValue();
+
+      Src = In;
+    } else {
+      // In is SRL
+      SDValue part = PeekThroughBitcast(In.getOperand(0));
+
+      if (!Src) {
+        Src = part;
+      } else if (Src != part) {
+        // Vector parts do not stem from the same variable
+        return SDValue();
+      }
+
+      SDValue ShiftAmtVal = In.getOperand(1);
+      if (!isa<ConstantSDNode>(ShiftAmtVal))
+        return SDValue();
+
+      uint64_t ShiftAmt = In.getNode()->getConstantOperandVal(1);
+
+      // The extracted value is not extracted at the right position
+      if (ShiftAmt != i * ScalarTypeBitsize)
+        return SDValue();
+    }
+  }
+
+  // Only cast if the size is the same
+  if (Src.getValueType().getSizeInBits() != VT.getSizeInBits())
+    return SDValue();
+
+  return DAG.getBitcast(VT, Src);
+}
+
 SDValue DAGCombiner::createBuildVecShuffle(const SDLoc &DL, SDNode *N,
                                            ArrayRef<int> VectorMask,
                                            SDValue VecIn1, SDValue VecIn2,
                                            unsigned LeftIdx, bool DidSplitVec) {
-  MVT IdxTy = TLI.getVectorIdxTy(DAG.getDataLayout());
-  SDValue ZeroIdx = DAG.getConstant(0, DL, IdxTy);
+  SDValue ZeroIdx = DAG.getVectorIdxConstant(0, DL);
 
   EVT VT = N->getValueType(0);
   EVT InVT1 = VecIn1.getValueType();
@@ -17470,7 +18223,7 @@ SDValue DAGCombiner::createBuildVecShuffle(const SDLoc &DL, SDNode *N,
         // If we only have one input vector, and it's twice the size of the
         // output, split it in two.
         VecIn2 = DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL, VT, VecIn1,
-                             DAG.getConstant(NumElems, DL, IdxTy));
+                             DAG.getVectorIdxConstant(NumElems, DL));
         VecIn1 = DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL, VT, VecIn1, ZeroIdx);
         // Since we now have shorter input vectors, adjust the offset of the
         // second vector's start.
@@ -17677,6 +18430,9 @@ SDValue DAGCombiner::reduceBuildVecToShuffle(SDNode *N) {
       return SDValue();
     SDValue ExtractedFromVec = Op.getOperand(0);
 
+    if (ExtractedFromVec.getValueType().isScalableVector())
+      return SDValue();
+
     const APInt &ExtractIdx = Op.getConstantOperandAPInt(1);
     if (ExtractIdx.uge(ExtractedFromVec.getValueType().getVectorNumElements()))
       return SDValue();
@@ -17711,7 +18467,6 @@ SDValue DAGCombiner::reduceBuildVecToShuffle(SDNode *N) {
     unsigned NearestPow2 = 0;
     SDValue Vec = VecIn.back();
     EVT InVT = Vec.getValueType();
-    MVT IdxTy = TLI.getVectorIdxTy(DAG.getDataLayout());
     SmallVector<unsigned, 8> IndexVec(NumElems, 0);
 
     for (unsigned i = 0; i < NumElems; i++) {
@@ -17730,9 +18485,9 @@ SDValue DAGCombiner::reduceBuildVecToShuffle(SDNode *N) {
                                      InVT.getVectorElementType(), SplitSize);
       if (TLI.isTypeLegal(SplitVT)) {
         SDValue VecIn2 = DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL, SplitVT, Vec,
-                                     DAG.getConstant(SplitSize, DL, IdxTy));
+                                     DAG.getVectorIdxConstant(SplitSize, DL));
         SDValue VecIn1 = DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL, SplitVT, Vec,
-                                     DAG.getConstant(0, DL, IdxTy));
+                                     DAG.getVectorIdxConstant(0, DL));
         VecIn.pop_back();
         VecIn.push_back(VecIn1);
         VecIn.push_back(VecIn2);
@@ -17964,6 +18719,9 @@ SDValue DAGCombiner::visitBUILD_VECTOR(SDNode *N) {
   if (SDValue V = reduceBuildVecExtToExtBuildVec(N))
     return V;
 
+  if (SDValue V = reduceBuildVecTruncToBitCast(N))
+    return V;
+
   if (SDValue V = reduceBuildVecToShuffle(N))
     return V;
 
@@ -18038,6 +18796,11 @@ static SDValue combineConcatVectorOfScalars(SDNode *N, SelectionDAG &DAG) {
 static SDValue combineConcatVectorOfExtracts(SDNode *N, SelectionDAG &DAG) {
   EVT VT = N->getValueType(0);
   EVT OpVT = N->getOperand(0).getValueType();
+
+  // We currently can't generate an appropriate shuffle for a scalable vector.
+  if (VT.isScalableVector())
+    return SDValue();
+
   int NumElts = VT.getVectorNumElements();
   int NumOpElts = OpVT.getVectorNumElements();
 
@@ -18058,6 +18821,7 @@ static SDValue combineConcatVectorOfExtracts(SDNode *N, SelectionDAG &DAG) {
 
     // What vector are we extracting the subvector from and at what index?
     SDValue ExtVec = Op.getOperand(0);
+    int ExtIdx = Op.getConstantOperandVal(1);
 
     // We want the EVT of the original extraction to correctly scale the
     // extraction index.
@@ -18070,10 +18834,6 @@ static SDValue combineConcatVectorOfExtracts(SDNode *N, SelectionDAG &DAG) {
       continue;
     }
 
-    if (!isa<ConstantSDNode>(Op.getOperand(1)))
-      return SDValue();
-    int ExtIdx = Op.getConstantOperandVal(1);
-
     // Ensure that we are extracting a subvector from a vector the same
     // size as the result.
     if (ExtVT.getSizeInBits() != VT.getSizeInBits())
@@ -18107,6 +18867,69 @@ static SDValue combineConcatVectorOfExtracts(SDNode *N, SelectionDAG &DAG) {
                                      DAG.getBitcast(VT, SV1), Mask, DAG);
 }
 
+static SDValue combineConcatVectorOfCasts(SDNode *N, SelectionDAG &DAG) {
+  unsigned CastOpcode = N->getOperand(0).getOpcode();
+  switch (CastOpcode) {
+  case ISD::SINT_TO_FP:
+  case ISD::UINT_TO_FP:
+  case ISD::FP_TO_SINT:
+  case ISD::FP_TO_UINT:
+    // TODO: Allow more opcodes?
+    //  case ISD::BITCAST:
+    //  case ISD::TRUNCATE:
+    //  case ISD::ZERO_EXTEND:
+    //  case ISD::SIGN_EXTEND:
+    //  case ISD::FP_EXTEND:
+    break;
+  default:
+    return SDValue();
+  }
+
+  EVT SrcVT = N->getOperand(0).getOperand(0).getValueType();
+  if (!SrcVT.isVector())
+    return SDValue();
+
+  // All operands of the concat must be the same kind of cast from the same
+  // source type.
+  SmallVector<SDValue, 4> SrcOps;
+  for (SDValue Op : N->ops()) {
+    if (Op.getOpcode() != CastOpcode || !Op.hasOneUse() ||
+        Op.getOperand(0).getValueType() != SrcVT)
+      return SDValue();
+    SrcOps.push_back(Op.getOperand(0));
+  }
+
+  // The wider cast must be supported by the target. This is unusual because
+  // the operation support type parameter depends on the opcode. In addition,
+  // check the other type in the cast to make sure this is really legal.
+  EVT VT = N->getValueType(0);
+  EVT SrcEltVT = SrcVT.getVectorElementType();
+  unsigned NumElts = SrcVT.getVectorElementCount().Min * N->getNumOperands();
+  EVT ConcatSrcVT = EVT::getVectorVT(*DAG.getContext(), SrcEltVT, NumElts);
+  const TargetLowering &TLI = DAG.getTargetLoweringInfo();
+  switch (CastOpcode) {
+  case ISD::SINT_TO_FP:
+  case ISD::UINT_TO_FP:
+    if (!TLI.isOperationLegalOrCustom(CastOpcode, ConcatSrcVT) ||
+        !TLI.isTypeLegal(VT))
+      return SDValue();
+    break;
+  case ISD::FP_TO_SINT:
+  case ISD::FP_TO_UINT:
+    if (!TLI.isOperationLegalOrCustom(CastOpcode, VT) ||
+        !TLI.isTypeLegal(ConcatSrcVT))
+      return SDValue();
+    break;
+  default:
+    llvm_unreachable("Unexpected cast opcode");
+  }
+
+  // concat (cast X), (cast Y)... -> cast (concat X, Y...)
+  SDLoc DL(N);
+  SDValue NewConcat = DAG.getNode(ISD::CONCAT_VECTORS, DL, ConcatSrcVT, SrcOps);
+  return DAG.getNode(CastOpcode, DL, VT, NewConcat);
+}
+
 SDValue DAGCombiner::visitCONCAT_VECTORS(SDNode *N) {
   // If we only have one input vector, we don't need to do any concatenation.
   if (N->getNumOperands() == 1)
@@ -18234,12 +19057,18 @@ SDValue DAGCombiner::visitCONCAT_VECTORS(SDNode *N) {
     if (SDValue V = combineConcatVectorOfExtracts(N, DAG))
       return V;
 
+  if (SDValue V = combineConcatVectorOfCasts(N, DAG))
+    return V;
+
   // Type legalization of vectors and DAG canonicalization of SHUFFLE_VECTOR
-  // nodes often generate nop CONCAT_VECTOR nodes.
-  // Scan the CONCAT_VECTOR operands and look for a CONCAT operations that
-  // place the incoming vectors at the exact same location.
+  // nodes often generate nop CONCAT_VECTOR nodes. Scan the CONCAT_VECTOR
+  // operands and look for a CONCAT operations that place the incoming vectors
+  // at the exact same location.
+  //
+  // For scalable vectors, EXTRACT_SUBVECTOR indexes are implicitly scaled.
   SDValue SingleSource = SDValue();
-  unsigned PartNumElem = N->getOperand(0).getValueType().getVectorNumElements();
+  unsigned PartNumElem =
+      N->getOperand(0).getValueType().getVectorMinNumElements();
 
   for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) {
     SDValue Op = N->getOperand(i);
@@ -18265,14 +19094,9 @@ SDValue DAGCombiner::visitCONCAT_VECTORS(SDNode *N) {
         return SDValue();
     }
 
-    auto *CS = dyn_cast<ConstantSDNode>(Op.getOperand(1));
-    // The extract index must be constant.
-    if (!CS)
-      return SDValue();
-
     // Check that we are reading from the identity index.
     unsigned IdentityIndex = i * PartNumElem;
-    if (CS->getAPIntValue() != IdentityIndex)
+    if (Op.getConstantOperandAPInt(1) != IdentityIndex)
       return SDValue();
   }
 
@@ -18355,9 +19179,21 @@ static SDValue narrowExtractedVectorBinOp(SDNode *Extract, SelectionDAG &DAG) {
   if (!TLI.isBinOp(BOpcode) || BinOp.getNode()->getNumValues() != 1)
     return SDValue();
 
+  // Exclude the fake form of fneg (fsub -0.0, x) because that is likely to be
+  // reduced to the unary fneg when it is visited, and we probably want to deal
+  // with fneg in a target-specific way.
+  if (BOpcode == ISD::FSUB) {
+    auto *C = isConstOrConstSplatFP(BinOp.getOperand(0), /*AllowUndefs*/ true);
+    if (C && C->getValueAPF().isNegZero())
+      return SDValue();
+  }
+
   // The binop must be a vector type, so we can extract some fraction of it.
   EVT WideBVT = BinOp.getValueType();
-  if (!WideBVT.isVector())
+  // The optimisations below currently assume we are dealing with fixed length
+  // vectors. It is possible to add support for scalable vectors, but at the
+  // moment we've done no analysis to prove whether they are profitable or not.
+  if (!WideBVT.isFixedLengthVector())
     return SDValue();
 
   EVT VT = Extract->getValueType(0);
@@ -18390,12 +19226,11 @@ static SDValue narrowExtractedVectorBinOp(SDNode *Extract, SelectionDAG &DAG) {
   // bitcasted.
   unsigned ConcatOpNum = ExtractIndex / VT.getVectorNumElements();
   unsigned ExtBOIdx = ConcatOpNum * NarrowBVT.getVectorNumElements();
-  EVT ExtBOIdxVT = Extract->getOperand(1).getValueType();
   if (TLI.isExtractSubvectorCheap(NarrowBVT, WideBVT, ExtBOIdx) &&
       BinOp.hasOneUse() && Extract->getOperand(0)->hasOneUse()) {
     // extract (binop B0, B1), N --> binop (extract B0, N), (extract B1, N)
     SDLoc DL(Extract);
-    SDValue NewExtIndex = DAG.getConstant(ExtBOIdx, DL, ExtBOIdxVT);
+    SDValue NewExtIndex = DAG.getVectorIdxConstant(ExtBOIdx, DL);
     SDValue X = DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL, NarrowBVT,
                             BinOp.getOperand(0), NewExtIndex);
     SDValue Y = DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL, NarrowBVT,
@@ -18435,7 +19270,7 @@ static SDValue narrowExtractedVectorBinOp(SDNode *Extract, SelectionDAG &DAG) {
     // extract (binop (concat X1, X2), Y), N --> binop XN, (extract Y, IndexC)
     // extract (binop X, (concat Y1, Y2)), N --> binop (extract X, IndexC), YN
     SDLoc DL(Extract);
-    SDValue IndexC = DAG.getConstant(ExtBOIdx, DL, ExtBOIdxVT);
+    SDValue IndexC = DAG.getVectorIdxConstant(ExtBOIdx, DL);
     SDValue X = SubVecL ? DAG.getBitcast(NarrowBVT, SubVecL)
                         : DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL, NarrowBVT,
                                       BinOp.getOperand(0), IndexC);
@@ -18467,6 +19302,26 @@ static SDValue narrowExtractedVectorLoad(SDNode *Extract, SelectionDAG &DAG) {
 
   // Allow targets to opt-out.
   EVT VT = Extract->getValueType(0);
+
+  // We can only create byte sized loads.
+  if (!VT.isByteSized())
+    return SDValue();
+
+  unsigned Index = ExtIdx->getZExtValue();
+  unsigned NumElts = VT.getVectorNumElements();
+
+  // If the index is a multiple of the extract element count, we can offset the
+  // address by the store size multiplied by the subvector index. Otherwise if
+  // the scalar type is byte sized, we can just use the index multiplied by
+  // the element size in bytes as the offset.
+  unsigned Offset;
+  if (Index % NumElts == 0)
+    Offset = (Index / NumElts) * VT.getStoreSize();
+  else if (VT.getScalarType().isByteSized())
+    Offset = Index * VT.getScalarType().getStoreSize();
+  else
+    return SDValue();
+
   const TargetLowering &TLI = DAG.getTargetLoweringInfo();
   if (!TLI.shouldReduceLoadWidth(Ld, Ld->getExtensionType(), VT))
     return SDValue();
@@ -18474,8 +19329,7 @@ static SDValue narrowExtractedVectorLoad(SDNode *Extract, SelectionDAG &DAG) {
   // The narrow load will be offset from the base address of the old load if
   // we are extracting from something besides index 0 (little-endian).
   SDLoc DL(Extract);
-  SDValue BaseAddr = Ld->getOperand(1);
-  unsigned Offset = ExtIdx->getZExtValue() * VT.getScalarType().getStoreSize();
+  SDValue BaseAddr = Ld->getBasePtr();
 
   // TODO: Use "BaseIndexOffset" to make this more effective.
   SDValue NewAddr = DAG.getMemBasePlusOffset(BaseAddr, Offset, DL);
@@ -18490,6 +19344,7 @@ static SDValue narrowExtractedVectorLoad(SDNode *Extract, SelectionDAG &DAG) {
 SDValue DAGCombiner::visitEXTRACT_SUBVECTOR(SDNode *N) {
   EVT NVT = N->getValueType(0);
   SDValue V = N->getOperand(0);
+  uint64_t ExtIdx = N->getConstantOperandVal(1);
 
   // Extract from UNDEF is UNDEF.
   if (V.isUndef())
@@ -18501,9 +19356,7 @@ SDValue DAGCombiner::visitEXTRACT_SUBVECTOR(SDNode *N) {
 
   // Combine an extract of an extract into a single extract_subvector.
   // ext (ext X, C), 0 --> ext X, C
-  SDValue Index = N->getOperand(1);
-  if (isNullConstant(Index) && V.getOpcode() == ISD::EXTRACT_SUBVECTOR &&
-      V.hasOneUse() && isa<ConstantSDNode>(V.getOperand(1))) {
+  if (ExtIdx == 0 && V.getOpcode() == ISD::EXTRACT_SUBVECTOR && V.hasOneUse()) {
     if (TLI.isExtractSubvectorCheap(NVT, V.getOperand(0).getValueType(),
                                     V.getConstantOperandVal(1)) &&
         TLI.isOperationLegalOrCustom(ISD::EXTRACT_SUBVECTOR, NVT)) {
@@ -18514,21 +19367,20 @@ SDValue DAGCombiner::visitEXTRACT_SUBVECTOR(SDNode *N) {
 
   // Try to move vector bitcast after extract_subv by scaling extraction index:
   // extract_subv (bitcast X), Index --> bitcast (extract_subv X, Index')
-  if (isa<ConstantSDNode>(Index) && V.getOpcode() == ISD::BITCAST &&
+  if (V.getOpcode() == ISD::BITCAST &&
       V.getOperand(0).getValueType().isVector()) {
     SDValue SrcOp = V.getOperand(0);
     EVT SrcVT = SrcOp.getValueType();
-    unsigned SrcNumElts = SrcVT.getVectorNumElements();
-    unsigned DestNumElts = V.getValueType().getVectorNumElements();
+    unsigned SrcNumElts = SrcVT.getVectorMinNumElements();
+    unsigned DestNumElts = V.getValueType().getVectorMinNumElements();
     if ((SrcNumElts % DestNumElts) == 0) {
       unsigned SrcDestRatio = SrcNumElts / DestNumElts;
-      unsigned NewExtNumElts = NVT.getVectorNumElements() * SrcDestRatio;
+      ElementCount NewExtEC = NVT.getVectorElementCount() * SrcDestRatio;
       EVT NewExtVT = EVT::getVectorVT(*DAG.getContext(), SrcVT.getScalarType(),
-                                      NewExtNumElts);
+                                      NewExtEC);
       if (TLI.isOperationLegalOrCustom(ISD::EXTRACT_SUBVECTOR, NewExtVT)) {
-        unsigned IndexValScaled = N->getConstantOperandVal(1) * SrcDestRatio;
         SDLoc DL(N);
-        SDValue NewIndex = DAG.getIntPtrConstant(IndexValScaled, DL);
+        SDValue NewIndex = DAG.getVectorIdxConstant(ExtIdx * SrcDestRatio, DL);
         SDValue NewExtract = DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL, NewExtVT,
                                          V.getOperand(0), NewIndex);
         return DAG.getBitcast(NVT, NewExtract);
@@ -18536,34 +19388,43 @@ SDValue DAGCombiner::visitEXTRACT_SUBVECTOR(SDNode *N) {
     }
     if ((DestNumElts % SrcNumElts) == 0) {
       unsigned DestSrcRatio = DestNumElts / SrcNumElts;
-      if ((NVT.getVectorNumElements() % DestSrcRatio) == 0) {
-        unsigned NewExtNumElts = NVT.getVectorNumElements() / DestSrcRatio;
-        EVT NewExtVT = EVT::getVectorVT(*DAG.getContext(),
-                                        SrcVT.getScalarType(), NewExtNumElts);
-        if ((N->getConstantOperandVal(1) % DestSrcRatio) == 0 &&
-            TLI.isOperationLegalOrCustom(ISD::EXTRACT_SUBVECTOR, NewExtVT)) {
-          unsigned IndexValScaled = N->getConstantOperandVal(1) / DestSrcRatio;
+      if ((NVT.getVectorMinNumElements() % DestSrcRatio) == 0) {
+        ElementCount NewExtEC = NVT.getVectorElementCount() / DestSrcRatio;
+        EVT ScalarVT = SrcVT.getScalarType();
+        if ((ExtIdx % DestSrcRatio) == 0) {
           SDLoc DL(N);
-          SDValue NewIndex = DAG.getIntPtrConstant(IndexValScaled, DL);
-          SDValue NewExtract = DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL, NewExtVT,
-                                           V.getOperand(0), NewIndex);
-          return DAG.getBitcast(NVT, NewExtract);
+          unsigned IndexValScaled = ExtIdx / DestSrcRatio;
+          EVT NewExtVT =
+              EVT::getVectorVT(*DAG.getContext(), ScalarVT, NewExtEC);
+          if (TLI.isOperationLegalOrCustom(ISD::EXTRACT_SUBVECTOR, NewExtVT)) {
+            SDValue NewIndex = DAG.getVectorIdxConstant(IndexValScaled, DL);
+            SDValue NewExtract =
+                DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL, NewExtVT,
+                            V.getOperand(0), NewIndex);
+            return DAG.getBitcast(NVT, NewExtract);
+          }
+          if (NewExtEC == 1 &&
+              TLI.isOperationLegalOrCustom(ISD::EXTRACT_VECTOR_ELT, ScalarVT)) {
+            SDValue NewIndex = DAG.getVectorIdxConstant(IndexValScaled, DL);
+            SDValue NewExtract =
+                DAG.getNode(ISD::EXTRACT_VECTOR_ELT, DL, ScalarVT,
+                            V.getOperand(0), NewIndex);
+            return DAG.getBitcast(NVT, NewExtract);
+          }
         }
       }
     }
   }
 
-  if (V.getOpcode() == ISD::CONCAT_VECTORS && isa<ConstantSDNode>(Index)) {
+  if (V.getOpcode() == ISD::CONCAT_VECTORS) {
+    unsigned ExtNumElts = NVT.getVectorMinNumElements();
     EVT ConcatSrcVT = V.getOperand(0).getValueType();
     assert(ConcatSrcVT.getVectorElementType() == NVT.getVectorElementType() &&
            "Concat and extract subvector do not change element type");
-
-    unsigned ExtIdx = N->getConstantOperandVal(1);
-    unsigned ExtNumElts = NVT.getVectorNumElements();
-    assert(ExtIdx % ExtNumElts == 0 &&
+    assert((ExtIdx % ExtNumElts) == 0 &&
            "Extract index is not a multiple of the input vector length.");
 
-    unsigned ConcatSrcNumElts = ConcatSrcVT.getVectorNumElements();
+    unsigned ConcatSrcNumElts = ConcatSrcVT.getVectorMinNumElements();
     unsigned ConcatOpIdx = ExtIdx / ConcatSrcNumElts;
 
     // If the concatenated source types match this extract, it's a direct
@@ -18577,15 +19438,14 @@ SDValue DAGCombiner::visitEXTRACT_SUBVECTOR(SDNode *N) {
     // concat operand. Example:
     //   v2i8 extract_subvec (v16i8 concat (v8i8 X), (v8i8 Y), 14 -->
     //   v2i8 extract_subvec v8i8 Y, 6
-    if (ConcatSrcNumElts % ExtNumElts == 0) {
+    if (NVT.isFixedLengthVector() && ConcatSrcNumElts % ExtNumElts == 0) {
       SDLoc DL(N);
       unsigned NewExtIdx = ExtIdx - ConcatOpIdx * ConcatSrcNumElts;
       assert(NewExtIdx + ExtNumElts <= ConcatSrcNumElts &&
              "Trying to extract from >1 concat operand?");
       assert(NewExtIdx % ExtNumElts == 0 &&
              "Extract index is not a multiple of the input vector length.");
-      MVT IdxTy = TLI.getVectorIdxTy(DAG.getDataLayout());
-      SDValue NewIndexC = DAG.getConstant(NewExtIdx, DL, IdxTy);
+      SDValue NewIndexC = DAG.getVectorIdxConstant(NewExtIdx, DL);
       return DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL, NVT,
                          V.getOperand(ConcatOpIdx), NewIndexC);
     }
@@ -18595,37 +19455,33 @@ SDValue DAGCombiner::visitEXTRACT_SUBVECTOR(SDNode *N) {
 
   // If the input is a build vector. Try to make a smaller build vector.
   if (V.getOpcode() == ISD::BUILD_VECTOR) {
-    if (auto *IdxC = dyn_cast<ConstantSDNode>(Index)) {
-      EVT InVT = V.getValueType();
-      unsigned ExtractSize = NVT.getSizeInBits();
-      unsigned EltSize = InVT.getScalarSizeInBits();
-      // Only do this if we won't split any elements.
-      if (ExtractSize % EltSize == 0) {
-        unsigned NumElems = ExtractSize / EltSize;
-        EVT EltVT = InVT.getVectorElementType();
-        EVT ExtractVT = NumElems == 1 ? EltVT
-                                      : EVT::getVectorVT(*DAG.getContext(),
-                                                         EltVT, NumElems);
-        if ((Level < AfterLegalizeDAG ||
-             (NumElems == 1 ||
-              TLI.isOperationLegal(ISD::BUILD_VECTOR, ExtractVT))) &&
-            (!LegalTypes || TLI.isTypeLegal(ExtractVT))) {
-          unsigned IdxVal = IdxC->getZExtValue();
-          IdxVal *= NVT.getScalarSizeInBits();
-          IdxVal /= EltSize;
-
-          if (NumElems == 1) {
-            SDValue Src = V->getOperand(IdxVal);
-            if (EltVT != Src.getValueType())
-              Src = DAG.getNode(ISD::TRUNCATE, SDLoc(N), InVT, Src);
-            return DAG.getBitcast(NVT, Src);
-          }
-
-          // Extract the pieces from the original build_vector.
-          SDValue BuildVec = DAG.getBuildVector(
-              ExtractVT, SDLoc(N), V->ops().slice(IdxVal, NumElems));
-          return DAG.getBitcast(NVT, BuildVec);
+    EVT InVT = V.getValueType();
+    unsigned ExtractSize = NVT.getSizeInBits();
+    unsigned EltSize = InVT.getScalarSizeInBits();
+    // Only do this if we won't split any elements.
+    if (ExtractSize % EltSize == 0) {
+      unsigned NumElems = ExtractSize / EltSize;
+      EVT EltVT = InVT.getVectorElementType();
+      EVT ExtractVT =
+          NumElems == 1 ? EltVT
+                        : EVT::getVectorVT(*DAG.getContext(), EltVT, NumElems);
+      if ((Level < AfterLegalizeDAG ||
+           (NumElems == 1 ||
+            TLI.isOperationLegal(ISD::BUILD_VECTOR, ExtractVT))) &&
+          (!LegalTypes || TLI.isTypeLegal(ExtractVT))) {
+        unsigned IdxVal = (ExtIdx * NVT.getScalarSizeInBits()) / EltSize;
+
+        if (NumElems == 1) {
+          SDValue Src = V->getOperand(IdxVal);
+          if (EltVT != Src.getValueType())
+            Src = DAG.getNode(ISD::TRUNCATE, SDLoc(N), InVT, Src);
+          return DAG.getBitcast(NVT, Src);
         }
+
+        // Extract the pieces from the original build_vector.
+        SDValue BuildVec = DAG.getBuildVector(ExtractVT, SDLoc(N),
+                                              V->ops().slice(IdxVal, NumElems));
+        return DAG.getBitcast(NVT, BuildVec);
       }
     }
   }
@@ -18637,23 +19493,19 @@ SDValue DAGCombiner::visitEXTRACT_SUBVECTOR(SDNode *N) {
     if (!NVT.bitsEq(SmallVT))
       return SDValue();
 
-    // Only handle cases where both indexes are constants.
-    auto *ExtIdx = dyn_cast<ConstantSDNode>(Index);
-    auto *InsIdx = dyn_cast<ConstantSDNode>(V.getOperand(2));
-    if (InsIdx && ExtIdx) {
-      // Combine:
-      //    (extract_subvec (insert_subvec V1, V2, InsIdx), ExtIdx)
-      // Into:
-      //    indices are equal or bit offsets are equal => V1
-      //    otherwise => (extract_subvec V1, ExtIdx)
-      if (InsIdx->getZExtValue() * SmallVT.getScalarSizeInBits() ==
-          ExtIdx->getZExtValue() * NVT.getScalarSizeInBits())
-        return DAG.getBitcast(NVT, V.getOperand(1));
-      return DAG.getNode(
-          ISD::EXTRACT_SUBVECTOR, SDLoc(N), NVT,
-          DAG.getBitcast(N->getOperand(0).getValueType(), V.getOperand(0)),
-          Index);
-    }
+    // Combine:
+    //    (extract_subvec (insert_subvec V1, V2, InsIdx), ExtIdx)
+    // Into:
+    //    indices are equal or bit offsets are equal => V1
+    //    otherwise => (extract_subvec V1, ExtIdx)
+    uint64_t InsIdx = V.getConstantOperandVal(2);
+    if (InsIdx * SmallVT.getScalarSizeInBits() ==
+        ExtIdx * NVT.getScalarSizeInBits())
+      return DAG.getBitcast(NVT, V.getOperand(1));
+    return DAG.getNode(
+        ISD::EXTRACT_SUBVECTOR, SDLoc(N), NVT,
+        DAG.getBitcast(N->getOperand(0).getValueType(), V.getOperand(0)),
+        N->getOperand(1));
   }
 
   if (SDValue NarrowBOp = narrowExtractedVectorBinOp(N, DAG))
@@ -19042,6 +19894,57 @@ static SDValue combineShuffleOfSplatVal(ShuffleVectorSDNode *Shuf,
                               NewMask);
 }
 
+/// Combine shuffle of shuffle of the form:
+/// shuf (shuf X, undef, InnerMask), undef, OuterMask --> splat X
+static SDValue formSplatFromShuffles(ShuffleVectorSDNode *OuterShuf,
+                                     SelectionDAG &DAG) {
+  if (!OuterShuf->getOperand(1).isUndef())
+    return SDValue();
+  auto *InnerShuf = dyn_cast<ShuffleVectorSDNode>(OuterShuf->getOperand(0));
+  if (!InnerShuf || !InnerShuf->getOperand(1).isUndef())
+    return SDValue();
+
+  ArrayRef<int> OuterMask = OuterShuf->getMask();
+  ArrayRef<int> InnerMask = InnerShuf->getMask();
+  unsigned NumElts = OuterMask.size();
+  assert(NumElts == InnerMask.size() && "Mask length mismatch");
+  SmallVector<int, 32> CombinedMask(NumElts, -1);
+  int SplatIndex = -1;
+  for (unsigned i = 0; i != NumElts; ++i) {
+    // Undef lanes remain undef.
+    int OuterMaskElt = OuterMask[i];
+    if (OuterMaskElt == -1)
+      continue;
+
+    // Peek through the shuffle masks to get the underlying source element.
+    int InnerMaskElt = InnerMask[OuterMaskElt];
+    if (InnerMaskElt == -1)
+      continue;
+
+    // Initialize the splatted element.
+    if (SplatIndex == -1)
+      SplatIndex = InnerMaskElt;
+
+    // Non-matching index - this is not a splat.
+    if (SplatIndex != InnerMaskElt)
+      return SDValue();
+
+    CombinedMask[i] = InnerMaskElt;
+  }
+  assert((all_of(CombinedMask, [](int M) { return M == -1; }) ||
+          getSplatIndex(CombinedMask) != -1) &&
+         "Expected a splat mask");
+
+  // TODO: The transform may be a win even if the mask is not legal.
+  EVT VT = OuterShuf->getValueType(0);
+  assert(VT == InnerShuf->getValueType(0) && "Expected matching shuffle types");
+  if (!DAG.getTargetLoweringInfo().isShuffleMaskLegal(CombinedMask, VT))
+    return SDValue();
+
+  return DAG.getVectorShuffle(VT, SDLoc(OuterShuf), InnerShuf->getOperand(0),
+                              InnerShuf->getOperand(1), CombinedMask);
+}
+
 /// If the shuffle mask is taking exactly one element from the first vector
 /// operand and passing through all other elements from the second vector
 /// operand, return the index of the mask element that is choosing an element
@@ -19114,8 +20017,7 @@ static SDValue replaceShuffleOfInsert(ShuffleVectorSDNode *Shuf,
   // element used. Therefore, our new insert element occurs at the shuffle's
   // mask index value, not the insert's index value.
   // shuffle (insertelt v1, x, C), v2, mask --> insertelt v2, x, C'
-  SDValue NewInsIndex = DAG.getConstant(ShufOp0Index, SDLoc(Shuf),
-                                        Op0.getOperand(2).getValueType());
+  SDValue NewInsIndex = DAG.getVectorIdxConstant(ShufOp0Index, SDLoc(Shuf));
   return DAG.getNode(ISD::INSERT_VECTOR_ELT, SDLoc(Shuf), Op0.getValueType(),
                      Op1, Op0.getOperand(1), NewInsIndex);
 }
@@ -19201,6 +20103,9 @@ SDValue DAGCombiner::visitVECTOR_SHUFFLE(SDNode *N) {
   if (SDValue V = combineShuffleOfSplatVal(SVN, DAG))
     return V;
 
+  if (SDValue V = formSplatFromShuffles(SVN, DAG))
+    return V;
+
   // If it is a splat, check if the argument vector is another splat or a
   // build_vector.
   if (SVN->isSplat() && SVN->getSplatIndex() < (int)NumElts) {
@@ -19212,7 +20117,7 @@ SDValue DAGCombiner::visitVECTOR_SHUFFLE(SDNode *N) {
       SDValue L = N0.getOperand(0), R = N0.getOperand(1);
       SDLoc DL(N);
       EVT EltVT = VT.getScalarType();
-      SDValue Index = DAG.getIntPtrConstant(SplatIndex, DL);
+      SDValue Index = DAG.getVectorIdxConstant(SplatIndex, DL);
       SDValue ExtL = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, DL, EltVT, L, Index);
       SDValue ExtR = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, DL, EltVT, R, Index);
       SDValue NewBO = DAG.getNode(N0.getOpcode(), DL, EltVT, ExtL, ExtR,
@@ -19332,16 +20237,6 @@ SDValue DAGCombiner::visitVECTOR_SHUFFLE(SDNode *N) {
   if (N0.getOpcode() == ISD::BITCAST && N0.hasOneUse() &&
       N1.isUndef() && Level < AfterLegalizeVectorOps &&
       TLI.isTypeLegal(VT)) {
-    auto ScaleShuffleMask = [](ArrayRef<int> Mask, int Scale) {
-      if (Scale == 1)
-        return SmallVector<int, 8>(Mask.begin(), Mask.end());
-
-      SmallVector<int, 8> NewMask;
-      for (int M : Mask)
-        for (int s = 0; s != Scale; ++s)
-          NewMask.push_back(M < 0 ? -1 : Scale * M + s);
-      return NewMask;
-    };
 
     SDValue BC0 = peekThroughOneUseBitcasts(N0);
     if (BC0.getOpcode() == ISD::VECTOR_SHUFFLE && BC0.hasOneUse()) {
@@ -19361,10 +20256,10 @@ SDValue DAGCombiner::visitVECTOR_SHUFFLE(SDNode *N) {
 
         // Scale the shuffle masks to the smaller scalar type.
         ShuffleVectorSDNode *InnerSVN = cast<ShuffleVectorSDNode>(BC0);
-        SmallVector<int, 8> InnerMask =
-            ScaleShuffleMask(InnerSVN->getMask(), InnerScale);
-        SmallVector<int, 8> OuterMask =
-            ScaleShuffleMask(SVN->getMask(), OuterScale);
+        SmallVector<int, 8> InnerMask;
+        SmallVector<int, 8> OuterMask;
+        narrowShuffleMaskElts(InnerScale, InnerSVN->getMask(), InnerMask);
+        narrowShuffleMaskElts(OuterScale, SVN->getMask(), OuterMask);
 
         // Merge the shuffle masks.
         SmallVector<int, 8> NewMask;
@@ -19525,7 +20420,9 @@ SDValue DAGCombiner::visitSCALAR_TO_VECTOR(SDNode *N) {
 
   // Replace a SCALAR_TO_VECTOR(EXTRACT_VECTOR_ELT(V,C0)) pattern
   // with a VECTOR_SHUFFLE and possible truncate.
-  if (InVal.getOpcode() == ISD::EXTRACT_VECTOR_ELT) {
+  if (InVal.getOpcode() == ISD::EXTRACT_VECTOR_ELT &&
+      VT.isFixedLengthVector() &&
+      InVal->getOperand(0).getValueType().isFixedLengthVector()) {
     SDValue InVec = InVal->getOperand(0);
     SDValue EltNo = InVal->getOperand(1);
     auto InVecT = InVec.getValueType();
@@ -19554,11 +20451,10 @@ SDValue DAGCombiner::visitSCALAR_TO_VECTOR(SDNode *N) {
             return LegalShuffle;
           // If not we must truncate the vector.
           if (VT.getVectorNumElements() != InVecT.getVectorNumElements()) {
-            MVT IdxTy = TLI.getVectorIdxTy(DAG.getDataLayout());
-            SDValue ZeroIdx = DAG.getConstant(0, SDLoc(N), IdxTy);
-            EVT SubVT =
-                EVT::getVectorVT(*DAG.getContext(), InVecT.getVectorElementType(),
-                                 VT.getVectorNumElements());
+            SDValue ZeroIdx = DAG.getVectorIdxConstant(0, SDLoc(N));
+            EVT SubVT = EVT::getVectorVT(*DAG.getContext(),
+                                         InVecT.getVectorElementType(),
+                                         VT.getVectorNumElements());
             return DAG.getNode(ISD::EXTRACT_SUBVECTOR, SDLoc(N), SubVT,
                                LegalShuffle, ZeroIdx);
           }
@@ -19575,6 +20471,7 @@ SDValue DAGCombiner::visitINSERT_SUBVECTOR(SDNode *N) {
   SDValue N0 = N->getOperand(0);
   SDValue N1 = N->getOperand(1);
   SDValue N2 = N->getOperand(2);
+  uint64_t InsIdx = N->getConstantOperandVal(2);
 
   // If inserting an UNDEF, just return the original vector.
   if (N1.isUndef())
@@ -19635,11 +20532,6 @@ SDValue DAGCombiner::visitINSERT_SUBVECTOR(SDNode *N) {
     return DAG.getNode(ISD::INSERT_SUBVECTOR, SDLoc(N), VT, N0,
                        N1.getOperand(1), N2);
 
-  if (!isa<ConstantSDNode>(N2))
-    return SDValue();
-
-  uint64_t InsIdx = cast<ConstantSDNode>(N2)->getZExtValue();
-
   // Push subvector bitcasts to the output, adjusting the index as we go.
   // insert_subvector(bitcast(v), bitcast(s), c1)
   // -> bitcast(insert_subvector(v, s, c2))
@@ -19654,19 +20546,18 @@ SDValue DAGCombiner::visitINSERT_SUBVECTOR(SDNode *N) {
       EVT NewVT;
       SDLoc DL(N);
       SDValue NewIdx;
-      MVT IdxVT = TLI.getVectorIdxTy(DAG.getDataLayout());
       LLVMContext &Ctx = *DAG.getContext();
       unsigned NumElts = VT.getVectorNumElements();
       unsigned EltSizeInBits = VT.getScalarSizeInBits();
       if ((EltSizeInBits % N1SrcSVT.getSizeInBits()) == 0) {
         unsigned Scale = EltSizeInBits / N1SrcSVT.getSizeInBits();
         NewVT = EVT::getVectorVT(Ctx, N1SrcSVT, NumElts * Scale);
-        NewIdx = DAG.getConstant(InsIdx * Scale, DL, IdxVT);
+        NewIdx = DAG.getVectorIdxConstant(InsIdx * Scale, DL);
       } else if ((N1SrcSVT.getSizeInBits() % EltSizeInBits) == 0) {
         unsigned Scale = N1SrcSVT.getSizeInBits() / EltSizeInBits;
         if ((NumElts % Scale) == 0 && (InsIdx % Scale) == 0) {
           NewVT = EVT::getVectorVT(Ctx, N1SrcSVT, NumElts / Scale);
-          NewIdx = DAG.getConstant(InsIdx / Scale, DL, IdxVT);
+          NewIdx = DAG.getVectorIdxConstant(InsIdx / Scale, DL);
         }
       }
       if (NewIdx && hasOperation(ISD::INSERT_SUBVECTOR, NewVT)) {
@@ -19682,8 +20573,7 @@ SDValue DAGCombiner::visitINSERT_SUBVECTOR(SDNode *N) {
   // (insert_subvector (insert_subvector A, Idx0), Idx1)
   // -> (insert_subvector (insert_subvector A, Idx1), Idx0)
   if (N0.getOpcode() == ISD::INSERT_SUBVECTOR && N0.hasOneUse() &&
-      N1.getValueType() == N0.getOperand(1).getValueType() &&
-      isa<ConstantSDNode>(N0.getOperand(2))) {
+      N1.getValueType() == N0.getOperand(1).getValueType()) {
     unsigned OtherIdx = N0.getConstantOperandVal(2);
     if (InsIdx < OtherIdx) {
       // Swap nodes.
@@ -19700,10 +20590,8 @@ SDValue DAGCombiner::visitINSERT_SUBVECTOR(SDNode *N) {
   if (N0.getOpcode() == ISD::CONCAT_VECTORS && N0.hasOneUse() &&
       N0.getOperand(0).getValueType() == N1.getValueType()) {
     unsigned Factor = N1.getValueType().getVectorNumElements();
-
     SmallVector<SDValue, 8> Ops(N0->op_begin(), N0->op_end());
-    Ops[cast<ConstantSDNode>(N2)->getZExtValue() / Factor] = N1;
-
+    Ops[InsIdx / Factor] = N1;
     return DAG.getNode(ISD::CONCAT_VECTORS, SDLoc(N), VT, Ops);
   }
 
@@ -19747,9 +20635,9 @@ SDValue DAGCombiner::visitVECREDUCE(SDNode *N) {
   // VECREDUCE over 1-element vector is just an extract.
   if (VT.getVectorNumElements() == 1) {
     SDLoc dl(N);
-    SDValue Res = DAG.getNode(
-        ISD::EXTRACT_VECTOR_ELT, dl, VT.getVectorElementType(), N0,
-        DAG.getConstant(0, dl, TLI.getVectorIdxTy(DAG.getDataLayout())));
+    SDValue Res =
+        DAG.getNode(ISD::EXTRACT_VECTOR_ELT, dl, VT.getVectorElementType(), N0,
+                    DAG.getVectorIdxConstant(0, dl));
     if (Res.getValueType() != N->getValueType(0))
       Res = DAG.getNode(ISD::ANY_EXTEND, dl, N->getValueType(0), Res);
     return Res;
@@ -19882,10 +20770,9 @@ static SDValue scalarizeBinOpOfSplats(SDNode *N, SelectionDAG &DAG) {
     return SDValue();
 
   SDLoc DL(N);
-  SDValue IndexC =
-      DAG.getConstant(Index0, DL, TLI.getVectorIdxTy(DAG.getDataLayout()));
-  SDValue X = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, DL, EltVT, N0, IndexC);
-  SDValue Y = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, DL, EltVT, N1, IndexC);
+  SDValue IndexC = DAG.getVectorIdxConstant(Index0, DL);
+  SDValue X = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, DL, EltVT, Src0, IndexC);
+  SDValue Y = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, DL, EltVT, Src1, IndexC);
   SDValue ScalarBO = DAG.getNode(Opcode, DL, EltVT, X, Y, N->getFlags());
 
   // If all lanes but 1 are undefined, no need to splat the scalar result.
@@ -19915,6 +20802,7 @@ SDValue DAGCombiner::SimplifyVBinOp(SDNode *N) {
   SDValue Ops[] = {LHS, RHS};
   EVT VT = N->getValueType(0);
   unsigned Opcode = N->getOpcode();
+  SDNodeFlags Flags = N->getFlags();
 
   // See if we can constant fold the vector operation.
   if (SDValue Fold = DAG.FoldConstantVectorArithmetic(
@@ -19938,10 +20826,37 @@ SDValue DAGCombiner::SimplifyVBinOp(SDNode *N) {
         (LHS.hasOneUse() || RHS.hasOneUse() || LHS == RHS)) {
       SDLoc DL(N);
       SDValue NewBinOp = DAG.getNode(Opcode, DL, VT, LHS.getOperand(0),
-                                     RHS.getOperand(0), N->getFlags());
+                                     RHS.getOperand(0), Flags);
       SDValue UndefV = LHS.getOperand(1);
       return DAG.getVectorShuffle(VT, DL, NewBinOp, UndefV, Shuf0->getMask());
     }
+
+    // Try to sink a splat shuffle after a binop with a uniform constant.
+    // This is limited to cases where neither the shuffle nor the constant have
+    // undefined elements because that could be poison-unsafe or inhibit
+    // demanded elements analysis. It is further limited to not change a splat
+    // of an inserted scalar because that may be optimized better by
+    // load-folding or other target-specific behaviors.
+    if (isConstOrConstSplat(RHS) && Shuf0 && is_splat(Shuf0->getMask()) &&
+        Shuf0->hasOneUse() && Shuf0->getOperand(1).isUndef() &&
+        Shuf0->getOperand(0).getOpcode() != ISD::INSERT_VECTOR_ELT) {
+      // binop (splat X), (splat C) --> splat (binop X, C)
+      SDLoc DL(N);
+      SDValue X = Shuf0->getOperand(0);
+      SDValue NewBinOp = DAG.getNode(Opcode, DL, VT, X, RHS, Flags);
+      return DAG.getVectorShuffle(VT, DL, NewBinOp, DAG.getUNDEF(VT),
+                                  Shuf0->getMask());
+    }
+    if (isConstOrConstSplat(LHS) && Shuf1 && is_splat(Shuf1->getMask()) &&
+        Shuf1->hasOneUse() && Shuf1->getOperand(1).isUndef() &&
+        Shuf1->getOperand(0).getOpcode() != ISD::INSERT_VECTOR_ELT) {
+      // binop (splat C), (splat X) --> splat (binop C, X)
+      SDLoc DL(N);
+      SDValue X = Shuf1->getOperand(0);
+      SDValue NewBinOp = DAG.getNode(Opcode, DL, VT, LHS, X, Flags);
+      return DAG.getVectorShuffle(VT, DL, NewBinOp, DAG.getUNDEF(VT),
+                                  Shuf1->getMask());
+    }
   }
 
   // The following pattern is likely to emerge with vector reduction ops. Moving
@@ -20339,8 +21254,8 @@ SDValue DAGCombiner::convertSelectOfFPConstantsToLoadOffset(
   // Create a ConstantArray of the two constants.
   Constant *CA = ConstantArray::get(ArrayType::get(FPTy, 2), Elts);
   SDValue CPIdx = DAG.getConstantPool(CA, TLI.getPointerTy(DAG.getDataLayout()),
-                                      TD.getPrefTypeAlignment(FPTy));
-  unsigned Alignment = cast<ConstantPoolSDNode>(CPIdx)->getAlignment();
+                                      TD.getPrefTypeAlign(FPTy));
+  Align Alignment = cast<ConstantPoolSDNode>(CPIdx)->getAlign();
 
   // Get offsets to the 0 and 1 elements of the array, so we can select between
   // them.
@@ -20775,7 +21690,10 @@ SDValue DAGCombiner::buildSqrtEstimateImpl(SDValue Op, SDNodeFlags Flags,
         EVT CCVT = getSetCCResultType(VT);
         ISD::NodeType SelOpcode = VT.isVector() ? ISD::VSELECT : ISD::SELECT;
         DenormalMode DenormMode = DAG.getDenormalMode(VT);
-        if (DenormMode == DenormalMode::IEEE) {
+        if (DenormMode.Input == DenormalMode::IEEE) {
+          // This is specifically a check for the handling of denormal inputs,
+          // not the result.
+
           // fabs(X) < SmallestNormal ? 0.0 : Est
           const fltSemantics &FltSem = DAG.EVTToAPFloatSemantics(VT);
           APFloat SmallestNorm = APFloat::getSmallestNormalized(FltSem);
@@ -20827,9 +21745,11 @@ bool DAGCombiner::isAlias(SDNode *Op0, SDNode *Op1) const {
                      : (LSN->getAddressingMode() == ISD::PRE_DEC)
                            ? -1 * C->getSExtValue()
                            : 0;
+      uint64_t Size =
+          MemoryLocation::getSizeOrUnknown(LSN->getMemoryVT().getStoreSize());
       return {LSN->isVolatile(), LSN->isAtomic(), LSN->getBasePtr(),
               Offset /*base offset*/,
-              Optional<int64_t>(LSN->getMemoryVT().getStoreSize()),
+              Optional<int64_t>(Size),
               LSN->getMemOperand()};
     }
     if (const auto *LN = cast<LifetimeSDNode>(N))
@@ -20889,21 +21809,24 @@ bool DAGCombiner::isAlias(SDNode *Op0, SDNode *Op1) const {
   // If we know required SrcValue1 and SrcValue2 have relatively large
   // alignment compared to the size and offset of the access, we may be able
   // to prove they do not alias. This check is conservative for now to catch
-  // cases created by splitting vector types.
+  // cases created by splitting vector types, it only works when the offsets are
+  // multiples of the size of the data.
   int64_t SrcValOffset0 = MUC0.MMO->getOffset();
   int64_t SrcValOffset1 = MUC1.MMO->getOffset();
-  unsigned OrigAlignment0 = MUC0.MMO->getBaseAlignment();
-  unsigned OrigAlignment1 = MUC1.MMO->getBaseAlignment();
+  Align OrigAlignment0 = MUC0.MMO->getBaseAlign();
+  Align OrigAlignment1 = MUC1.MMO->getBaseAlign();
+  auto &Size0 = MUC0.NumBytes;
+  auto &Size1 = MUC1.NumBytes;
   if (OrigAlignment0 == OrigAlignment1 && SrcValOffset0 != SrcValOffset1 &&
-      MUC0.NumBytes.hasValue() && MUC1.NumBytes.hasValue() &&
-      *MUC0.NumBytes == *MUC1.NumBytes && OrigAlignment0 > *MUC0.NumBytes) {
-    int64_t OffAlign0 = SrcValOffset0 % OrigAlignment0;
-    int64_t OffAlign1 = SrcValOffset1 % OrigAlignment1;
+      Size0.hasValue() && Size1.hasValue() && *Size0 == *Size1 &&
+      OrigAlignment0 > *Size0 && SrcValOffset0 % *Size0 == 0 &&
+      SrcValOffset1 % *Size1 == 0) {
+    int64_t OffAlign0 = SrcValOffset0 % OrigAlignment0.value();
+    int64_t OffAlign1 = SrcValOffset1 % OrigAlignment1.value();
 
     // There is no overlap between these relatively aligned accesses of
     // similar size. Return no alias.
-    if ((OffAlign0 + *MUC0.NumBytes) <= OffAlign1 ||
-        (OffAlign1 + *MUC1.NumBytes) <= OffAlign0)
+    if ((OffAlign0 + *Size0) <= OffAlign1 || (OffAlign1 + *Size1) <= OffAlign0)
       return false;
   }
 
@@ -20916,11 +21839,12 @@ bool DAGCombiner::isAlias(SDNode *Op0, SDNode *Op1) const {
     UseAA = false;
 #endif
 
-  if (UseAA && AA && MUC0.MMO->getValue() && MUC1.MMO->getValue()) {
+  if (UseAA && AA && MUC0.MMO->getValue() && MUC1.MMO->getValue() &&
+      Size0.hasValue() && Size1.hasValue()) {
     // Use alias analysis information.
     int64_t MinOffset = std::min(SrcValOffset0, SrcValOffset1);
-    int64_t Overlap0 = *MUC0.NumBytes + SrcValOffset0 - MinOffset;
-    int64_t Overlap1 = *MUC1.NumBytes + SrcValOffset1 - MinOffset;
+    int64_t Overlap0 = *Size0 + SrcValOffset0 - MinOffset;
+    int64_t Overlap1 = *Size1 + SrcValOffset1 - MinOffset;
     AliasResult AAResult = AA->alias(
         MemoryLocation(MUC0.MMO->getValue(), Overlap0,
                        UseTBAA ? MUC0.MMO->getAAInfo() : AAMDNodes()),
@@ -21077,10 +22001,10 @@ bool operator!=(const UnitT &, const UnitT &) { return false; }
 // redundant, as this function gets called when visiting every store
 // node, so why not let the work be done on each store as it's visited?
 //
-// I believe this is mainly important because MergeConsecutiveStores
+// I believe this is mainly important because mergeConsecutiveStores
 // is unable to deal with merging stores of different sizes, so unless
 // we improve the chains of all the potential candidates up-front
-// before running MergeConsecutiveStores, it might only see some of
+// before running mergeConsecutiveStores, it might only see some of
 // the nodes that will eventually be candidates, and then not be able
 // to go from a partially-merged state to the desired final
 // fully-merged state.
@@ -21109,6 +22033,12 @@ bool DAGCombiner::parallelizeChainedStores(StoreSDNode *St) {
   if (BasePtr.getBase().isUndef())
     return false;
 
+  // BaseIndexOffset assumes that offsets are fixed-size, which
+  // is not valid for scalable vectors where the offsets are
+  // scaled by `vscale`, so bail out early.
+  if (St->getMemoryVT().isScalableVector())
+    return false;
+
   // Add ST's interval.
   Intervals.insert(0, (St->getMemoryVT().getSizeInBits() + 7) / 8, Unit);
 
diff --git a/gnu/llvm/llvm/lib/CodeGen/Spiller.h b/gnu/llvm/llvm/lib/CodeGen/Spiller.h
deleted file mode 100644 (file)
index 66dabf7..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-//===- llvm/CodeGen/Spiller.h - Spiller -------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_LIB_CODEGEN_SPILLER_H
-#define LLVM_LIB_CODEGEN_SPILLER_H
-
-namespace llvm {
-
-class LiveRangeEdit;
-class MachineFunction;
-class MachineFunctionPass;
-class VirtRegMap;
-
-  /// Spiller interface.
-  ///
-  /// Implementations are utility classes which insert spill or remat code on
-  /// demand.
-  class Spiller {
-    virtual void anchor();
-
-  public:
-    virtual ~Spiller() = 0;
-
-    /// spill - Spill the LRE.getParent() live interval.
-    virtual void spill(LiveRangeEdit &LRE) = 0;
-
-    virtual void postOptimization() {}
-  };
-
-  /// Create and return a spiller that will insert spill code directly instead
-  /// of deferring though VirtRegMap.
-  Spiller *createInlineSpiller(MachineFunctionPass &pass,
-                               MachineFunction &mf,
-                               VirtRegMap &vrm);
-
-} // end namespace llvm
-
-#endif // LLVM_LIB_CODEGEN_SPILLER_H
index e0fdb0c..1acc8bd 100644 (file)
@@ -773,6 +773,8 @@ void TargetPassConfig::addISelPrepare() {
   if (requiresCodeGenSCCOrder())
     addPass(new DummyCGSCCPass);
 
+  addPass(createReturnProtectorPass());
+
   // Add both the safe stack and the stack protection passes: each of them will
   // only protect functions that have corresponding attributes.
   addPass(createSafeStackPass());
diff --git a/gnu/llvm/llvm/lib/Frontend/OpenMP/OMPConstants.cpp b/gnu/llvm/llvm/lib/Frontend/OpenMP/OMPConstants.cpp
deleted file mode 100644 (file)
index ec07339..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-//===- OMPConstants.cpp - Helpers related to OpenMP code generation ---===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/Frontend/OpenMP/OMPConstants.h"
-
-#include "llvm/ADT/StringRef.h"
-#include "llvm/ADT/StringSwitch.h"
-#include "llvm/IR/Module.h"
-#include "llvm/IR/Type.h"
-
-using namespace llvm;
-using namespace omp;
-using namespace types;
-
-Directive llvm::omp::getOpenMPDirectiveKind(StringRef Str) {
-  return llvm::StringSwitch<Directive>(Str)
-#define OMP_DIRECTIVE(Enum, Str) .Case(Str, Enum)
-#include "llvm/Frontend/OpenMP/OMPKinds.def"
-      .Default(OMPD_unknown);
-}
-
-StringRef llvm::omp::getOpenMPDirectiveName(Directive Kind) {
-  switch (Kind) {
-#define OMP_DIRECTIVE(Enum, Str)                                               \
-  case Enum:                                                                   \
-    return Str;
-#include "llvm/Frontend/OpenMP/OMPKinds.def"
-  }
-  llvm_unreachable("Invalid OpenMP directive kind");
-}
-
-/// Declarations for LLVM-IR types (simple, function and structure) are
-/// generated below. Their names are defined and used in OpenMPKinds.def. Here
-/// we provide the declarations, the initializeTypes function will provide the
-/// values.
-///
-///{
-
-#define OMP_TYPE(VarName, InitValue) Type *llvm::omp::types::VarName = nullptr;
-#define OMP_FUNCTION_TYPE(VarName, IsVarArg, ReturnType, ...)                  \
-  FunctionType *llvm::omp::types::VarName = nullptr;                           \
-  PointerType *llvm::omp::types::VarName##Ptr = nullptr;
-#define OMP_STRUCT_TYPE(VarName, StrName, ...)                                 \
-  StructType *llvm::omp::types::VarName = nullptr;                             \
-  PointerType *llvm::omp::types::VarName##Ptr = nullptr;
-#include "llvm/Frontend/OpenMP/OMPKinds.def"
-
-///}
-
-void llvm::omp::types::initializeTypes(Module &M) {
-  if (Void)
-    return;
-
-  LLVMContext &Ctx = M.getContext();
-  // Create all simple and struct types exposed by the runtime and remember
-  // the llvm::PointerTypes of them for easy access later.
-  StructType *T;
-#define OMP_TYPE(VarName, InitValue) VarName = InitValue;
-#define OMP_FUNCTION_TYPE(VarName, IsVarArg, ReturnType, ...)                  \
-  VarName = FunctionType::get(ReturnType, {__VA_ARGS__}, IsVarArg);            \
-  VarName##Ptr = PointerType::getUnqual(VarName);
-#define OMP_STRUCT_TYPE(VarName, StructName, ...)                              \
-  T = M.getTypeByName(StructName);                                             \
-  if (!T)                                                                      \
-    T = StructType::create(Ctx, {__VA_ARGS__}, StructName);                    \
-  VarName = T;                                                                 \
-  VarName##Ptr = PointerType::getUnqual(T);
-#include "llvm/Frontend/OpenMP/OMPKinds.def"
-}
-
-void llvm::omp::types::uninitializeTypes() {
-#define OMP_TYPE(VarName, InitValue) VarName = nullptr;
-#define OMP_FUNCTION_TYPE(VarName, IsVarArg, ReturnType, ...)                  \
-  VarName = nullptr;                                                           \
-  VarName##Ptr = nullptr;
-#define OMP_STRUCT_TYPE(VarName, StrName, ...)                                 \
-  VarName = nullptr;                                                           \
-  VarName##Ptr = nullptr;
-#include "llvm/Frontend/OpenMP/OMPKinds.def"
-}
diff --git a/gnu/llvm/llvm/lib/IR/AttributesCompatFunc.td b/gnu/llvm/llvm/lib/IR/AttributesCompatFunc.td
deleted file mode 100644 (file)
index 7c85b3d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-include "llvm/IR/Attributes.td"
diff --git a/gnu/llvm/llvm/lib/IR/RemarkStreamer.cpp b/gnu/llvm/llvm/lib/IR/RemarkStreamer.cpp
deleted file mode 100644 (file)
index cdbcc4f..0000000
+++ /dev/null
@@ -1,217 +0,0 @@
-//===- llvm/IR/RemarkStreamer.cpp - Remark Streamer -*- C++ -------------*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This file contains the implementation of the remark outputting as part of
-// LLVMContext.
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/IR/RemarkStreamer.h"
-#include "llvm/IR/DiagnosticInfo.h"
-#include "llvm/IR/Function.h"
-#include "llvm/IR/GlobalValue.h"
-#include "llvm/Remarks/BitstreamRemarkSerializer.h"
-#include "llvm/Remarks/RemarkFormat.h"
-#include "llvm/Remarks/RemarkSerializer.h"
-#include "llvm/Support/CommandLine.h"
-
-using namespace llvm;
-
-static cl::opt<cl::boolOrDefault> EnableRemarksSection(
-    "remarks-section",
-    cl::desc(
-        "Emit a section containing remark diagnostics metadata. By default, "
-        "this is enabled for the following formats: yaml-strtab, bitstream."),
-    cl::init(cl::BOU_UNSET), cl::Hidden);
-
-RemarkStreamer::RemarkStreamer(
-    std::unique_ptr<remarks::RemarkSerializer> RemarkSerializer,
-    Optional<StringRef> FilenameIn)
-    : PassFilter(), RemarkSerializer(std::move(RemarkSerializer)),
-      Filename(FilenameIn ? Optional<std::string>(FilenameIn->str()) : None) {}
-
-Error RemarkStreamer::setFilter(StringRef Filter) {
-  Regex R = Regex(Filter);
-  std::string RegexError;
-  if (!R.isValid(RegexError))
-    return createStringError(std::make_error_code(std::errc::invalid_argument),
-                             RegexError.data());
-  PassFilter = std::move(R);
-  return Error::success();
-}
-
-/// DiagnosticKind -> remarks::Type
-static remarks::Type toRemarkType(enum DiagnosticKind Kind) {
-  switch (Kind) {
-  default:
-    return remarks::Type::Unknown;
-  case DK_OptimizationRemark:
-  case DK_MachineOptimizationRemark:
-    return remarks::Type::Passed;
-  case DK_OptimizationRemarkMissed:
-  case DK_MachineOptimizationRemarkMissed:
-    return remarks::Type::Missed;
-  case DK_OptimizationRemarkAnalysis:
-  case DK_MachineOptimizationRemarkAnalysis:
-    return remarks::Type::Analysis;
-  case DK_OptimizationRemarkAnalysisFPCommute:
-    return remarks::Type::AnalysisFPCommute;
-  case DK_OptimizationRemarkAnalysisAliasing:
-    return remarks::Type::AnalysisAliasing;
-  case DK_OptimizationFailure:
-    return remarks::Type::Failure;
-  }
-}
-
-/// DiagnosticLocation -> remarks::RemarkLocation.
-static Optional<remarks::RemarkLocation>
-toRemarkLocation(const DiagnosticLocation &DL) {
-  if (!DL.isValid())
-    return None;
-  StringRef File = DL.getRelativePath();
-  unsigned Line = DL.getLine();
-  unsigned Col = DL.getColumn();
-  return remarks::RemarkLocation{File, Line, Col};
-}
-
-/// LLVM Diagnostic -> Remark
-remarks::Remark
-RemarkStreamer::toRemark(const DiagnosticInfoOptimizationBase &Diag) {
-  remarks::Remark R; // The result.
-  R.RemarkType = toRemarkType(static_cast<DiagnosticKind>(Diag.getKind()));
-  R.PassName = Diag.getPassName();
-  R.RemarkName = Diag.getRemarkName();
-  R.FunctionName =
-      GlobalValue::dropLLVMManglingEscape(Diag.getFunction().getName());
-  R.Loc = toRemarkLocation(Diag.getLocation());
-  R.Hotness = Diag.getHotness();
-
-  for (const DiagnosticInfoOptimizationBase::Argument &Arg : Diag.getArgs()) {
-    R.Args.emplace_back();
-    R.Args.back().Key = Arg.Key;
-    R.Args.back().Val = Arg.Val;
-    R.Args.back().Loc = toRemarkLocation(Arg.Loc);
-  }
-
-  return R;
-}
-
-void RemarkStreamer::emit(const DiagnosticInfoOptimizationBase &Diag) {
-  if (Optional<Regex> &Filter = PassFilter)
-    if (!Filter->match(Diag.getPassName()))
-      return;
-
-  // First, convert the diagnostic to a remark.
-  remarks::Remark R = toRemark(Diag);
-  // Then, emit the remark through the serializer.
-  RemarkSerializer->emit(R);
-}
-
-bool RemarkStreamer::needsSection() const {
-  if (EnableRemarksSection == cl::BOU_TRUE)
-    return true;
-
-  if (EnableRemarksSection == cl::BOU_FALSE)
-    return false;
-
-  assert(EnableRemarksSection == cl::BOU_UNSET);
-
-  // We only need a section if we're in separate mode.
-  if (RemarkSerializer->Mode != remarks::SerializerMode::Separate)
-    return false;
-
-  // Only some formats need a section:
-  // * bitstream
-  // * yaml-strtab
-  switch (RemarkSerializer->SerializerFormat) {
-  case remarks::Format::YAMLStrTab:
-  case remarks::Format::Bitstream:
-    return true;
-  default:
-    return false;
-  }
-}
-
-char RemarkSetupFileError::ID = 0;
-char RemarkSetupPatternError::ID = 0;
-char RemarkSetupFormatError::ID = 0;
-
-Expected<std::unique_ptr<ToolOutputFile>>
-llvm::setupOptimizationRemarks(LLVMContext &Context, StringRef RemarksFilename,
-                               StringRef RemarksPasses, StringRef RemarksFormat,
-                               bool RemarksWithHotness,
-                               unsigned RemarksHotnessThreshold) {
-  if (RemarksWithHotness)
-    Context.setDiagnosticsHotnessRequested(true);
-
-  if (RemarksHotnessThreshold)
-    Context.setDiagnosticsHotnessThreshold(RemarksHotnessThreshold);
-
-  if (RemarksFilename.empty())
-    return nullptr;
-
-  Expected<remarks::Format> Format = remarks::parseFormat(RemarksFormat);
-  if (Error E = Format.takeError())
-    return make_error<RemarkSetupFormatError>(std::move(E));
-
-  std::error_code EC;
-  auto Flags = *Format == remarks::Format::YAML ? sys::fs::OF_Text
-                                                : sys::fs::OF_None;
-  auto RemarksFile =
-      std::make_unique<ToolOutputFile>(RemarksFilename, EC, Flags);
-  // We don't use llvm::FileError here because some diagnostics want the file
-  // name separately.
-  if (EC)
-    return make_error<RemarkSetupFileError>(errorCodeToError(EC));
-
-  Expected<std::unique_ptr<remarks::RemarkSerializer>> RemarkSerializer =
-      remarks::createRemarkSerializer(
-          *Format, remarks::SerializerMode::Separate, RemarksFile->os());
-  if (Error E = RemarkSerializer.takeError())
-    return make_error<RemarkSetupFormatError>(std::move(E));
-
-  Context.setRemarkStreamer(std::make_unique<RemarkStreamer>(
-      std::move(*RemarkSerializer), RemarksFilename));
-
-  if (!RemarksPasses.empty())
-    if (Error E = Context.getRemarkStreamer()->setFilter(RemarksPasses))
-      return make_error<RemarkSetupPatternError>(std::move(E));
-
-  return std::move(RemarksFile);
-}
-
-Error llvm::setupOptimizationRemarks(LLVMContext &Context, raw_ostream &OS,
-                                     StringRef RemarksPasses,
-                                     StringRef RemarksFormat,
-                                     bool RemarksWithHotness,
-                                     unsigned RemarksHotnessThreshold) {
-  if (RemarksWithHotness)
-    Context.setDiagnosticsHotnessRequested(true);
-
-  if (RemarksHotnessThreshold)
-    Context.setDiagnosticsHotnessThreshold(RemarksHotnessThreshold);
-
-  Expected<remarks::Format> Format = remarks::parseFormat(RemarksFormat);
-  if (Error E = Format.takeError())
-    return make_error<RemarkSetupFormatError>(std::move(E));
-
-  Expected<std::unique_ptr<remarks::RemarkSerializer>> RemarkSerializer =
-      remarks::createRemarkSerializer(*Format,
-                                      remarks::SerializerMode::Separate, OS);
-  if (Error E = RemarkSerializer.takeError())
-    return make_error<RemarkSetupFormatError>(std::move(E));
-
-  Context.setRemarkStreamer(
-      std::make_unique<RemarkStreamer>(std::move(*RemarkSerializer)));
-
-  if (!RemarksPasses.empty())
-    if (Error E = Context.getRemarkStreamer()->setFilter(RemarksPasses))
-      return make_error<RemarkSetupPatternError>(std::move(E));
-
-  return Error::success();
-}
index 9b8b8db..cc8b006 100644 (file)
@@ -25,7 +25,7 @@ MCSection *MCAsmInfoELF::getNonexecutableStackSection(MCContext &Ctx) const {
 }
 
 MCAsmInfoELF::MCAsmInfoELF() {
-  HasIdentDirective = true;
+  HasIdentDirective = false;
   WeakRefDirective = "\t.weak\t";
   PrivateGlobalPrefix = ".L";
   PrivateLabelPrefix = ".L";
index 49d863f..a97dfdb 100644 (file)
@@ -92,8 +92,11 @@ void MCELFStreamer::InitSections(bool NoExecStack) {
   SwitchSection(Ctx.getObjectFileInfo()->getTextSection());
   emitCodeAlignment(4);
 
-  if (NoExecStack)
-    SwitchSection(Ctx.getAsmInfo()->getNonexecutableStackSection(Ctx));
+  if (NoExecStack) {
+    MCSection *s = Ctx.getAsmInfo()->getNonexecutableStackSection(Ctx);
+    if (s)
+       SwitchSection(s);
+  }
 }
 
 void MCELFStreamer::emitLabel(MCSymbol *S, SMLoc Loc) {
index c05f26c..f5885cb 100644 (file)
@@ -909,6 +909,10 @@ bool AsmParser::Run(bool NoInitialTextSection, bool NoFinalize) {
     (void)InsertResult;
   }
 
+  StringRef Filename = getContext().getMainFileName();
+  if (!Filename.empty() && (Filename.compare(StringRef("-")) != 0))
+    Out.emitFileDirective(Filename);
+
   // While we have input, parse each statement.
   while (Lexer.isNot(AsmToken::Eof)) {
     ParseStatementInfo Info(&AsmStrRewrites);
diff --git a/gnu/llvm/llvm/lib/Support/StringPool.cpp b/gnu/llvm/llvm/lib/Support/StringPool.cpp
deleted file mode 100644 (file)
index 8235101..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-//===-- StringPool.cpp - Interned string pool -----------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This file implements the StringPool class.
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/Support/StringPool.h"
-#include "llvm/ADT/StringRef.h"
-
-using namespace llvm;
-
-StringPool::StringPool() {}
-
-StringPool::~StringPool() {
-  assert(InternTable.empty() && "PooledStringPtr leaked!");
-}
-
-PooledStringPtr StringPool::intern(StringRef Key) {
-  table_t::iterator I = InternTable.find(Key);
-  if (I != InternTable.end())
-    return PooledStringPtr(&*I);
-
-  entry_t *S = entry_t::Create(Key);
-  S->getValue().Pool = this;
-  InternTable.insert(S);
-
-  return PooledStringPtr(S);
-}
index 24f16b5..c3b8af7 100644 (file)
@@ -328,6 +328,10 @@ static ManagedStatic<std::mutex> TermColorMutex;
 #endif
 
 static bool terminalHasColors(int fd) {
+#if defined(__OpenBSD__)
+  return false;
+#endif
+
 #ifdef HAVE_TERMINFO
   // First, acquire a global lock because these C routines are thread hostile.
   std::lock_guard<std::mutex> G(*TermColorMutex);
index 7ec7ffe..f5f1d1d 100644 (file)
@@ -1350,6 +1350,19 @@ void AArch64AsmPrinter::emitInstruction(const MachineInstr *MI) {
   case AArch64::SEH_EpilogEnd:
     TS->EmitARM64WinCFIEpilogEnd();
     return;
+
+  case AArch64::RETGUARD_JMP_TRAP:
+    {
+    MCSymbol *RGSuccSym = OutContext.createTempSymbol();
+    /* Compare and branch */
+    EmitToStreamer(*OutStreamer, MCInstBuilder(AArch64::CBZX)
+        .addReg(MI->getOperand(0).getReg())
+        .addExpr(MCSymbolRefExpr::create(RGSuccSym, OutContext)));
+    EmitToStreamer(*OutStreamer, MCInstBuilder(AArch64::BRK).addImm(1));
+    OutStreamer->emitLabel(RGSuccSym);
+    return;
+    }
+
   }
 
   // Finally, do the automated lowerings for everything else.
diff --git a/gnu/llvm/llvm/lib/Target/AArch64/AArch64CallLowering.cpp b/gnu/llvm/llvm/lib/Target/AArch64/AArch64CallLowering.cpp
deleted file mode 100644 (file)
index 76ff238..0000000
+++ /dev/null
@@ -1,1029 +0,0 @@
-//===--- AArch64CallLowering.cpp - Call lowering --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-///
-/// \file
-/// This file implements the lowering of LLVM calls to machine code calls for
-/// GlobalISel.
-///
-//===----------------------------------------------------------------------===//
-
-#include "AArch64CallLowering.h"
-#include "AArch64ISelLowering.h"
-#include "AArch64MachineFunctionInfo.h"
-#include "AArch64Subtarget.h"
-#include "llvm/ADT/ArrayRef.h"
-#include "llvm/ADT/SmallVector.h"
-#include "llvm/CodeGen/Analysis.h"
-#include "llvm/CodeGen/CallingConvLower.h"
-#include "llvm/CodeGen/GlobalISel/MachineIRBuilder.h"
-#include "llvm/CodeGen/GlobalISel/Utils.h"
-#include "llvm/CodeGen/LowLevelType.h"
-#include "llvm/CodeGen/MachineBasicBlock.h"
-#include "llvm/CodeGen/MachineFrameInfo.h"
-#include "llvm/CodeGen/MachineFunction.h"
-#include "llvm/CodeGen/MachineInstrBuilder.h"
-#include "llvm/CodeGen/MachineMemOperand.h"
-#include "llvm/CodeGen/MachineOperand.h"
-#include "llvm/CodeGen/MachineRegisterInfo.h"
-#include "llvm/CodeGen/TargetRegisterInfo.h"
-#include "llvm/CodeGen/TargetSubtargetInfo.h"
-#include "llvm/CodeGen/ValueTypes.h"
-#include "llvm/IR/Argument.h"
-#include "llvm/IR/Attributes.h"
-#include "llvm/IR/Function.h"
-#include "llvm/IR/Type.h"
-#include "llvm/IR/Value.h"
-#include "llvm/Support/MachineValueType.h"
-#include <algorithm>
-#include <cassert>
-#include <cstdint>
-#include <iterator>
-
-#define DEBUG_TYPE "aarch64-call-lowering"
-
-using namespace llvm;
-
-AArch64CallLowering::AArch64CallLowering(const AArch64TargetLowering &TLI)
-  : CallLowering(&TLI) {}
-
-namespace {
-struct IncomingArgHandler : public CallLowering::ValueHandler {
-  IncomingArgHandler(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI,
-                     CCAssignFn *AssignFn)
-      : ValueHandler(MIRBuilder, MRI, AssignFn), StackUsed(0) {}
-
-  Register getStackAddress(uint64_t Size, int64_t Offset,
-                           MachinePointerInfo &MPO) override {
-    auto &MFI = MIRBuilder.getMF().getFrameInfo();
-    int FI = MFI.CreateFixedObject(Size, Offset, true);
-    MPO = MachinePointerInfo::getFixedStack(MIRBuilder.getMF(), FI);
-    Register AddrReg = MRI.createGenericVirtualRegister(LLT::pointer(0, 64));
-    MIRBuilder.buildFrameIndex(AddrReg, FI);
-    StackUsed = std::max(StackUsed, Size + Offset);
-    return AddrReg;
-  }
-
-  void assignValueToReg(Register ValVReg, Register PhysReg,
-                        CCValAssign &VA) override {
-    markPhysRegUsed(PhysReg);
-    switch (VA.getLocInfo()) {
-    default:
-      MIRBuilder.buildCopy(ValVReg, PhysReg);
-      break;
-    case CCValAssign::LocInfo::SExt:
-    case CCValAssign::LocInfo::ZExt:
-    case CCValAssign::LocInfo::AExt: {
-      auto Copy = MIRBuilder.buildCopy(LLT{VA.getLocVT()}, PhysReg);
-      MIRBuilder.buildTrunc(ValVReg, Copy);
-      break;
-    }
-    }
-  }
-
-  void assignValueToAddress(Register ValVReg, Register Addr, uint64_t Size,
-                            MachinePointerInfo &MPO, CCValAssign &VA) override {
-    // FIXME: Get alignment
-    auto MMO = MIRBuilder.getMF().getMachineMemOperand(
-        MPO, MachineMemOperand::MOLoad | MachineMemOperand::MOInvariant, Size,
-        1);
-    MIRBuilder.buildLoad(ValVReg, Addr, *MMO);
-  }
-
-  /// How the physical register gets marked varies between formal
-  /// parameters (it's a basic-block live-in), and a call instruction
-  /// (it's an implicit-def of the BL).
-  virtual void markPhysRegUsed(unsigned PhysReg) = 0;
-
-  bool isIncomingArgumentHandler() const override { return true; }
-
-  uint64_t StackUsed;
-};
-
-struct FormalArgHandler : public IncomingArgHandler {
-  FormalArgHandler(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI,
-                   CCAssignFn *AssignFn)
-    : IncomingArgHandler(MIRBuilder, MRI, AssignFn) {}
-
-  void markPhysRegUsed(unsigned PhysReg) override {
-    MIRBuilder.getMRI()->addLiveIn(PhysReg);
-    MIRBuilder.getMBB().addLiveIn(PhysReg);
-  }
-};
-
-struct CallReturnHandler : public IncomingArgHandler {
-  CallReturnHandler(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI,
-                    MachineInstrBuilder MIB, CCAssignFn *AssignFn)
-    : IncomingArgHandler(MIRBuilder, MRI, AssignFn), MIB(MIB) {}
-
-  void markPhysRegUsed(unsigned PhysReg) override {
-    MIB.addDef(PhysReg, RegState::Implicit);
-  }
-
-  MachineInstrBuilder MIB;
-};
-
-struct OutgoingArgHandler : public CallLowering::ValueHandler {
-  OutgoingArgHandler(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI,
-                     MachineInstrBuilder MIB, CCAssignFn *AssignFn,
-                     CCAssignFn *AssignFnVarArg, bool IsTailCall = false,
-                     int FPDiff = 0)
-      : ValueHandler(MIRBuilder, MRI, AssignFn), MIB(MIB),
-        AssignFnVarArg(AssignFnVarArg), IsTailCall(IsTailCall), FPDiff(FPDiff),
-        StackSize(0) {}
-
-  bool isIncomingArgumentHandler() const override { return false; }
-
-  Register getStackAddress(uint64_t Size, int64_t Offset,
-                           MachinePointerInfo &MPO) override {
-    MachineFunction &MF = MIRBuilder.getMF();
-    LLT p0 = LLT::pointer(0, 64);
-    LLT s64 = LLT::scalar(64);
-
-    if (IsTailCall) {
-      Offset += FPDiff;
-      int FI = MF.getFrameInfo().CreateFixedObject(Size, Offset, true);
-      Register FIReg = MRI.createGenericVirtualRegister(p0);
-      MIRBuilder.buildFrameIndex(FIReg, FI);
-      MPO = MachinePointerInfo::getFixedStack(MF, FI);
-      return FIReg;
-    }
-
-    Register SPReg = MRI.createGenericVirtualRegister(p0);
-    MIRBuilder.buildCopy(SPReg, Register(AArch64::SP));
-
-    Register OffsetReg = MRI.createGenericVirtualRegister(s64);
-    MIRBuilder.buildConstant(OffsetReg, Offset);
-
-    Register AddrReg = MRI.createGenericVirtualRegister(p0);
-    MIRBuilder.buildPtrAdd(AddrReg, SPReg, OffsetReg);
-
-    MPO = MachinePointerInfo::getStack(MF, Offset);
-    return AddrReg;
-  }
-
-  void assignValueToReg(Register ValVReg, Register PhysReg,
-                        CCValAssign &VA) override {
-    MIB.addUse(PhysReg, RegState::Implicit);
-    Register ExtReg = extendRegister(ValVReg, VA);
-    MIRBuilder.buildCopy(PhysReg, ExtReg);
-  }
-
-  void assignValueToAddress(Register ValVReg, Register Addr, uint64_t Size,
-                            MachinePointerInfo &MPO, CCValAssign &VA) override {
-    if (VA.getLocInfo() == CCValAssign::LocInfo::AExt) {
-      Size = VA.getLocVT().getSizeInBits() / 8;
-      ValVReg = MIRBuilder.buildAnyExt(LLT::scalar(Size * 8), ValVReg)
-                    ->getOperand(0)
-                    .getReg();
-    }
-    auto MMO = MIRBuilder.getMF().getMachineMemOperand(
-        MPO, MachineMemOperand::MOStore, Size, 1);
-    MIRBuilder.buildStore(ValVReg, Addr, *MMO);
-  }
-
-  bool assignArg(unsigned ValNo, MVT ValVT, MVT LocVT,
-                 CCValAssign::LocInfo LocInfo,
-                 const CallLowering::ArgInfo &Info,
-                 ISD::ArgFlagsTy Flags,
-                 CCState &State) override {
-    bool Res;
-    if (Info.IsFixed)
-      Res = AssignFn(ValNo, ValVT, LocVT, LocInfo, Flags, State);
-    else
-      Res = AssignFnVarArg(ValNo, ValVT, LocVT, LocInfo, Flags, State);
-
-    StackSize = State.getNextStackOffset();
-    return Res;
-  }
-
-  MachineInstrBuilder MIB;
-  CCAssignFn *AssignFnVarArg;
-  bool IsTailCall;
-
-  /// For tail calls, the byte offset of the call's argument area from the
-  /// callee's. Unused elsewhere.
-  int FPDiff;
-  uint64_t StackSize;
-};
-} // namespace
-
-static bool doesCalleeRestoreStack(CallingConv::ID CallConv, bool TailCallOpt) {
-  return CallConv == CallingConv::Fast && TailCallOpt;
-}
-
-void AArch64CallLowering::splitToValueTypes(
-    const ArgInfo &OrigArg, SmallVectorImpl<ArgInfo> &SplitArgs,
-    const DataLayout &DL, MachineRegisterInfo &MRI, CallingConv::ID CallConv) const {
-  const AArch64TargetLowering &TLI = *getTLI<AArch64TargetLowering>();
-  LLVMContext &Ctx = OrigArg.Ty->getContext();
-
-  if (OrigArg.Ty->isVoidTy())
-    return;
-
-  SmallVector<EVT, 4> SplitVTs;
-  SmallVector<uint64_t, 4> Offsets;
-  ComputeValueVTs(TLI, DL, OrigArg.Ty, SplitVTs, &Offsets, 0);
-
-  if (SplitVTs.size() == 1) {
-    // No splitting to do, but we want to replace the original type (e.g. [1 x
-    // double] -> double).
-    SplitArgs.emplace_back(OrigArg.Regs[0], SplitVTs[0].getTypeForEVT(Ctx),
-                           OrigArg.Flags[0], OrigArg.IsFixed);
-    return;
-  }
-
-  // Create one ArgInfo for each virtual register in the original ArgInfo.
-  assert(OrigArg.Regs.size() == SplitVTs.size() && "Regs / types mismatch");
-
-  bool NeedsRegBlock = TLI.functionArgumentNeedsConsecutiveRegisters(
-      OrigArg.Ty, CallConv, false);
-  for (unsigned i = 0, e = SplitVTs.size(); i < e; ++i) {
-    Type *SplitTy = SplitVTs[i].getTypeForEVT(Ctx);
-    SplitArgs.emplace_back(OrigArg.Regs[i], SplitTy, OrigArg.Flags[0],
-                           OrigArg.IsFixed);
-    if (NeedsRegBlock)
-      SplitArgs.back().Flags[0].setInConsecutiveRegs();
-  }
-
-  SplitArgs.back().Flags[0].setInConsecutiveRegsLast();
-}
-
-bool AArch64CallLowering::lowerReturn(MachineIRBuilder &MIRBuilder,
-                                      const Value *Val,
-                                      ArrayRef<Register> VRegs,
-                                      Register SwiftErrorVReg) const {
-  auto MIB = MIRBuilder.buildInstrNoInsert(AArch64::RET_ReallyLR);
-  assert(((Val && !VRegs.empty()) || (!Val && VRegs.empty())) &&
-         "Return value without a vreg");
-
-  bool Success = true;
-  if (!VRegs.empty()) {
-    MachineFunction &MF = MIRBuilder.getMF();
-    const Function &F = MF.getFunction();
-
-    MachineRegisterInfo &MRI = MF.getRegInfo();
-    const AArch64TargetLowering &TLI = *getTLI<AArch64TargetLowering>();
-    CCAssignFn *AssignFn = TLI.CCAssignFnForReturn(F.getCallingConv());
-    auto &DL = F.getParent()->getDataLayout();
-    LLVMContext &Ctx = Val->getType()->getContext();
-
-    SmallVector<EVT, 4> SplitEVTs;
-    ComputeValueVTs(TLI, DL, Val->getType(), SplitEVTs);
-    assert(VRegs.size() == SplitEVTs.size() &&
-           "For each split Type there should be exactly one VReg.");
-
-    SmallVector<ArgInfo, 8> SplitArgs;
-    CallingConv::ID CC = F.getCallingConv();
-
-    for (unsigned i = 0; i < SplitEVTs.size(); ++i) {
-      if (TLI.getNumRegistersForCallingConv(Ctx, CC, SplitEVTs[i]) > 1) {
-        LLVM_DEBUG(dbgs() << "Can't handle extended arg types which need split");
-        return false;
-      }
-
-      Register CurVReg = VRegs[i];
-      ArgInfo CurArgInfo = ArgInfo{CurVReg, SplitEVTs[i].getTypeForEVT(Ctx)};
-      setArgFlags(CurArgInfo, AttributeList::ReturnIndex, DL, F);
-
-      // i1 is a special case because SDAG i1 true is naturally zero extended
-      // when widened using ANYEXT. We need to do it explicitly here.
-      if (MRI.getType(CurVReg).getSizeInBits() == 1) {
-        CurVReg = MIRBuilder.buildZExt(LLT::scalar(8), CurVReg).getReg(0);
-      } else {
-        // Some types will need extending as specified by the CC.
-        MVT NewVT = TLI.getRegisterTypeForCallingConv(Ctx, CC, SplitEVTs[i]);
-        if (EVT(NewVT) != SplitEVTs[i]) {
-          unsigned ExtendOp = TargetOpcode::G_ANYEXT;
-          if (F.getAttributes().hasAttribute(AttributeList::ReturnIndex,
-                                             Attribute::SExt))
-            ExtendOp = TargetOpcode::G_SEXT;
-          else if (F.getAttributes().hasAttribute(AttributeList::ReturnIndex,
-                                                  Attribute::ZExt))
-            ExtendOp = TargetOpcode::G_ZEXT;
-
-          LLT NewLLT(NewVT);
-          LLT OldLLT(MVT::getVT(CurArgInfo.Ty));
-          CurArgInfo.Ty = EVT(NewVT).getTypeForEVT(Ctx);
-          // Instead of an extend, we might have a vector type which needs
-          // padding with more elements, e.g. <2 x half> -> <4 x half>.
-          if (NewVT.isVector()) {
-            if (OldLLT.isVector()) {
-              if (NewLLT.getNumElements() > OldLLT.getNumElements()) {
-                // We don't handle VA types which are not exactly twice the
-                // size, but can easily be done in future.
-                if (NewLLT.getNumElements() != OldLLT.getNumElements() * 2) {
-                  LLVM_DEBUG(dbgs() << "Outgoing vector ret has too many elts");
-                  return false;
-                }
-                auto Undef = MIRBuilder.buildUndef({OldLLT});
-                CurVReg =
-                    MIRBuilder.buildMerge({NewLLT}, {CurVReg, Undef.getReg(0)})
-                        .getReg(0);
-              } else {
-                // Just do a vector extend.
-                CurVReg = MIRBuilder.buildInstr(ExtendOp, {NewLLT}, {CurVReg})
-                              .getReg(0);
-              }
-            } else if (NewLLT.getNumElements() == 2) {
-              // We need to pad a <1 x S> type to <2 x S>. Since we don't have
-              // <1 x S> vector types in GISel we use a build_vector instead
-              // of a vector merge/concat.
-              auto Undef = MIRBuilder.buildUndef({OldLLT});
-              CurVReg =
-                  MIRBuilder
-                      .buildBuildVector({NewLLT}, {CurVReg, Undef.getReg(0)})
-                      .getReg(0);
-            } else {
-              LLVM_DEBUG(dbgs() << "Could not handle ret ty");
-              return false;
-            }
-          } else {
-            // A scalar extend.
-            CurVReg =
-                MIRBuilder.buildInstr(ExtendOp, {NewLLT}, {CurVReg}).getReg(0);
-          }
-        }
-      }
-      if (CurVReg != CurArgInfo.Regs[0]) {
-        CurArgInfo.Regs[0] = CurVReg;
-        // Reset the arg flags after modifying CurVReg.
-        setArgFlags(CurArgInfo, AttributeList::ReturnIndex, DL, F);
-      }
-     splitToValueTypes(CurArgInfo, SplitArgs, DL, MRI, CC);
-    }
-
-    OutgoingArgHandler Handler(MIRBuilder, MRI, MIB, AssignFn, AssignFn);
-    Success = handleAssignments(MIRBuilder, SplitArgs, Handler);
-  }
-
-  if (SwiftErrorVReg) {
-    MIB.addUse(AArch64::X21, RegState::Implicit);
-    MIRBuilder.buildCopy(AArch64::X21, SwiftErrorVReg);
-  }
-
-  MIRBuilder.insertInstr(MIB);
-  return Success;
-}
-
-/// Helper function to compute forwarded registers for musttail calls. Computes
-/// the forwarded registers, sets MBB liveness, and emits COPY instructions that
-/// can be used to save + restore registers later.
-static void handleMustTailForwardedRegisters(MachineIRBuilder &MIRBuilder,
-                                             CCAssignFn *AssignFn) {
-  MachineBasicBlock &MBB = MIRBuilder.getMBB();
-  MachineFunction &MF = MIRBuilder.getMF();
-  MachineFrameInfo &MFI = MF.getFrameInfo();
-
-  if (!MFI.hasMustTailInVarArgFunc())
-    return;
-
-  AArch64FunctionInfo *FuncInfo = MF.getInfo<AArch64FunctionInfo>();
-  const Function &F = MF.getFunction();
-  assert(F.isVarArg() && "Expected F to be vararg?");
-
-  // Compute the set of forwarded registers. The rest are scratch.
-  SmallVector<CCValAssign, 16> ArgLocs;
-  CCState CCInfo(F.getCallingConv(), /*IsVarArg=*/true, MF, ArgLocs,
-                 F.getContext());
-  SmallVector<MVT, 2> RegParmTypes;
-  RegParmTypes.push_back(MVT::i64);
-  RegParmTypes.push_back(MVT::f128);
-
-  // Later on, we can use this vector to restore the registers if necessary.
-  SmallVectorImpl<ForwardedRegister> &Forwards =
-      FuncInfo->getForwardedMustTailRegParms();
-  CCInfo.analyzeMustTailForwardedRegisters(Forwards, RegParmTypes, AssignFn);
-
-  // Conservatively forward X8, since it might be used for an aggregate
-  // return.
-  if (!CCInfo.isAllocated(AArch64::X8)) {
-    unsigned X8VReg = MF.addLiveIn(AArch64::X8, &AArch64::GPR64RegClass);
-    Forwards.push_back(ForwardedRegister(X8VReg, AArch64::X8, MVT::i64));
-  }
-
-  // Add the forwards to the MachineBasicBlock and MachineFunction.
-  for (const auto &F : Forwards) {
-    MBB.addLiveIn(F.PReg);
-    MIRBuilder.buildCopy(Register(F.VReg), Register(F.PReg));
-  }
-}
-
-bool AArch64CallLowering::lowerFormalArguments(
-    MachineIRBuilder &MIRBuilder, const Function &F,
-    ArrayRef<ArrayRef<Register>> VRegs) const {
-  MachineFunction &MF = MIRBuilder.getMF();
-  MachineBasicBlock &MBB = MIRBuilder.getMBB();
-  MachineRegisterInfo &MRI = MF.getRegInfo();
-  auto &DL = F.getParent()->getDataLayout();
-
-  SmallVector<ArgInfo, 8> SplitArgs;
-  unsigned i = 0;
-  for (auto &Arg : F.args()) {
-    if (DL.getTypeStoreSize(Arg.getType()) == 0)
-      continue;
-
-    ArgInfo OrigArg{VRegs[i], Arg.getType()};
-    setArgFlags(OrigArg, i + AttributeList::FirstArgIndex, DL, F);
-
-    splitToValueTypes(OrigArg, SplitArgs, DL, MRI, F.getCallingConv());
-    ++i;
-  }
-
-  if (!MBB.empty())
-    MIRBuilder.setInstr(*MBB.begin());
-
-  const AArch64TargetLowering &TLI = *getTLI<AArch64TargetLowering>();
-  CCAssignFn *AssignFn =
-      TLI.CCAssignFnForCall(F.getCallingConv(), /*IsVarArg=*/false);
-
-  FormalArgHandler Handler(MIRBuilder, MRI, AssignFn);
-  if (!handleAssignments(MIRBuilder, SplitArgs, Handler))
-    return false;
-
-  AArch64FunctionInfo *FuncInfo = MF.getInfo<AArch64FunctionInfo>();
-  uint64_t StackOffset = Handler.StackUsed;
-  if (F.isVarArg()) {
-    auto &Subtarget = MF.getSubtarget<AArch64Subtarget>();
-    if (!Subtarget.isTargetDarwin()) {
-        // FIXME: we need to reimplement saveVarArgsRegisters from
-      // AArch64ISelLowering.
-      return false;
-    }
-
-    // We currently pass all varargs at 8-byte alignment, or 4 in ILP32.
-    StackOffset = alignTo(Handler.StackUsed, Subtarget.isTargetILP32() ? 4 : 8);
-
-    auto &MFI = MIRBuilder.getMF().getFrameInfo();
-    FuncInfo->setVarArgsStackIndex(MFI.CreateFixedObject(4, StackOffset, true));
-  }
-
-  if (doesCalleeRestoreStack(F.getCallingConv(),
-                             MF.getTarget().Options.GuaranteedTailCallOpt)) {
-    // We have a non-standard ABI, so why not make full use of the stack that
-    // we're going to pop? It must be aligned to 16 B in any case.
-    StackOffset = alignTo(StackOffset, 16);
-
-    // If we're expected to restore the stack (e.g. fastcc), then we'll be
-    // adding a multiple of 16.
-    FuncInfo->setArgumentStackToRestore(StackOffset);
-
-    // Our own callers will guarantee that the space is free by giving an
-    // aligned value to CALLSEQ_START.
-  }
-
-  // When we tail call, we need to check if the callee's arguments
-  // will fit on the caller's stack. So, whenever we lower formal arguments,
-  // we should keep track of this information, since we might lower a tail call
-  // in this function later.
-  FuncInfo->setBytesInStackArgArea(StackOffset);
-
-  auto &Subtarget = MF.getSubtarget<AArch64Subtarget>();
-  if (Subtarget.hasCustomCallingConv())
-    Subtarget.getRegisterInfo()->UpdateCustomCalleeSavedRegs(MF);
-
-  handleMustTailForwardedRegisters(MIRBuilder, AssignFn);
-
-  // Move back to the end of the basic block.
-  MIRBuilder.setMBB(MBB);
-
-  return true;
-}
-
-/// Return true if the calling convention is one that we can guarantee TCO for.
-static bool canGuaranteeTCO(CallingConv::ID CC) {
-  return CC == CallingConv::Fast;
-}
-
-/// Return true if we might ever do TCO for calls with this calling convention.
-static bool mayTailCallThisCC(CallingConv::ID CC) {
-  switch (CC) {
-  case CallingConv::C:
-  case CallingConv::PreserveMost:
-  case CallingConv::Swift:
-    return true;
-  default:
-    return canGuaranteeTCO(CC);
-  }
-}
-
-/// Returns a pair containing the fixed CCAssignFn and the vararg CCAssignFn for
-/// CC.
-static std::pair<CCAssignFn *, CCAssignFn *>
-getAssignFnsForCC(CallingConv::ID CC, const AArch64TargetLowering &TLI) {
-  return {TLI.CCAssignFnForCall(CC, false), TLI.CCAssignFnForCall(CC, true)};
-}
-
-bool AArch64CallLowering::doCallerAndCalleePassArgsTheSameWay(
-    CallLoweringInfo &Info, MachineFunction &MF,
-    SmallVectorImpl<ArgInfo> &InArgs) const {
-  const Function &CallerF = MF.getFunction();
-  CallingConv::ID CalleeCC = Info.CallConv;
-  CallingConv::ID CallerCC = CallerF.getCallingConv();
-
-  // If the calling conventions match, then everything must be the same.
-  if (CalleeCC == CallerCC)
-    return true;
-
-  // Check if the caller and callee will handle arguments in the same way.
-  const AArch64TargetLowering &TLI = *getTLI<AArch64TargetLowering>();
-  CCAssignFn *CalleeAssignFnFixed;
-  CCAssignFn *CalleeAssignFnVarArg;
-  std::tie(CalleeAssignFnFixed, CalleeAssignFnVarArg) =
-      getAssignFnsForCC(CalleeCC, TLI);
-
-  CCAssignFn *CallerAssignFnFixed;
-  CCAssignFn *CallerAssignFnVarArg;
-  std::tie(CallerAssignFnFixed, CallerAssignFnVarArg) =
-      getAssignFnsForCC(CallerCC, TLI);
-
-  if (!resultsCompatible(Info, MF, InArgs, *CalleeAssignFnFixed,
-                         *CalleeAssignFnVarArg, *CallerAssignFnFixed,
-                         *CallerAssignFnVarArg))
-    return false;
-
-  // Make sure that the caller and callee preserve all of the same registers.
-  auto TRI = MF.getSubtarget<AArch64Subtarget>().getRegisterInfo();
-  const uint32_t *CallerPreserved = TRI->getCallPreservedMask(MF, CallerCC);
-  const uint32_t *CalleePreserved = TRI->getCallPreservedMask(MF, CalleeCC);
-  if (MF.getSubtarget<AArch64Subtarget>().hasCustomCallingConv()) {
-    TRI->UpdateCustomCallPreservedMask(MF, &CallerPreserved);
-    TRI->UpdateCustomCallPreservedMask(MF, &CalleePreserved);
-  }
-
-  return TRI->regmaskSubsetEqual(CallerPreserved, CalleePreserved);
-}
-
-bool AArch64CallLowering::areCalleeOutgoingArgsTailCallable(
-    CallLoweringInfo &Info, MachineFunction &MF,
-    SmallVectorImpl<ArgInfo> &OutArgs) const {
-  // If there are no outgoing arguments, then we are done.
-  if (OutArgs.empty())
-    return true;
-
-  const Function &CallerF = MF.getFunction();
-  CallingConv::ID CalleeCC = Info.CallConv;
-  CallingConv::ID CallerCC = CallerF.getCallingConv();
-  const AArch64TargetLowering &TLI = *getTLI<AArch64TargetLowering>();
-
-  CCAssignFn *AssignFnFixed;
-  CCAssignFn *AssignFnVarArg;
-  std::tie(AssignFnFixed, AssignFnVarArg) = getAssignFnsForCC(CalleeCC, TLI);
-
-  // We have outgoing arguments. Make sure that we can tail call with them.
-  SmallVector<CCValAssign, 16> OutLocs;
-  CCState OutInfo(CalleeCC, false, MF, OutLocs, CallerF.getContext());
-
-  if (!analyzeArgInfo(OutInfo, OutArgs, *AssignFnFixed, *AssignFnVarArg)) {
-    LLVM_DEBUG(dbgs() << "... Could not analyze call operands.\n");
-    return false;
-  }
-
-  // Make sure that they can fit on the caller's stack.
-  const AArch64FunctionInfo *FuncInfo = MF.getInfo<AArch64FunctionInfo>();
-  if (OutInfo.getNextStackOffset() > FuncInfo->getBytesInStackArgArea()) {
-    LLVM_DEBUG(dbgs() << "... Cannot fit call operands on caller's stack.\n");
-    return false;
-  }
-
-  // Verify that the parameters in callee-saved registers match.
-  // TODO: Port this over to CallLowering as general code once swiftself is
-  // supported.
-  auto TRI = MF.getSubtarget<AArch64Subtarget>().getRegisterInfo();
-  const uint32_t *CallerPreservedMask = TRI->getCallPreservedMask(MF, CallerCC);
-  MachineRegisterInfo &MRI = MF.getRegInfo();
-
-  for (unsigned i = 0; i < OutLocs.size(); ++i) {
-    auto &ArgLoc = OutLocs[i];
-    // If it's not a register, it's fine.
-    if (!ArgLoc.isRegLoc()) {
-      if (Info.IsVarArg) {
-        // Be conservative and disallow variadic memory operands to match SDAG's
-        // behaviour.
-        // FIXME: If the caller's calling convention is C, then we can
-        // potentially use its argument area. However, for cases like fastcc,
-        // we can't do anything.
-        LLVM_DEBUG(
-            dbgs()
-            << "... Cannot tail call vararg function with stack arguments\n");
-        return false;
-      }
-      continue;
-    }
-
-    Register Reg = ArgLoc.getLocReg();
-
-    // Only look at callee-saved registers.
-    if (MachineOperand::clobbersPhysReg(CallerPreservedMask, Reg))
-      continue;
-
-    LLVM_DEBUG(
-        dbgs()
-        << "... Call has an argument passed in a callee-saved register.\n");
-
-    // Check if it was copied from.
-    ArgInfo &OutInfo = OutArgs[i];
-
-    if (OutInfo.Regs.size() > 1) {
-      LLVM_DEBUG(
-          dbgs() << "... Cannot handle arguments in multiple registers.\n");
-      return false;
-    }
-
-    // Check if we copy the register, walking through copies from virtual
-    // registers. Note that getDefIgnoringCopies does not ignore copies from
-    // physical registers.
-    MachineInstr *RegDef = getDefIgnoringCopies(OutInfo.Regs[0], MRI);
-    if (!RegDef || RegDef->getOpcode() != TargetOpcode::COPY) {
-      LLVM_DEBUG(
-          dbgs()
-          << "... Parameter was not copied into a VReg, cannot tail call.\n");
-      return false;
-    }
-
-    // Got a copy. Verify that it's the same as the register we want.
-    Register CopyRHS = RegDef->getOperand(1).getReg();
-    if (CopyRHS != Reg) {
-      LLVM_DEBUG(dbgs() << "... Callee-saved register was not copied into "
-                           "VReg, cannot tail call.\n");
-      return false;
-    }
-  }
-
-  return true;
-}
-
-bool AArch64CallLowering::isEligibleForTailCallOptimization(
-    MachineIRBuilder &MIRBuilder, CallLoweringInfo &Info,
-    SmallVectorImpl<ArgInfo> &InArgs,
-    SmallVectorImpl<ArgInfo> &OutArgs) const {
-
-  // Must pass all target-independent checks in order to tail call optimize.
-  if (!Info.IsTailCall)
-    return false;
-
-  CallingConv::ID CalleeCC = Info.CallConv;
-  MachineFunction &MF = MIRBuilder.getMF();
-  const Function &CallerF = MF.getFunction();
-
-  LLVM_DEBUG(dbgs() << "Attempting to lower call as tail call\n");
-
-  if (Info.SwiftErrorVReg) {
-    // TODO: We should handle this.
-    // Note that this is also handled by the check for no outgoing arguments.
-    // Proactively disabling this though, because the swifterror handling in
-    // lowerCall inserts a COPY *after* the location of the call.
-    LLVM_DEBUG(dbgs() << "... Cannot handle tail calls with swifterror yet.\n");
-    return false;
-  }
-
-  if (!mayTailCallThisCC(CalleeCC)) {
-    LLVM_DEBUG(dbgs() << "... Calling convention cannot be tail called.\n");
-    return false;
-  }
-
-  // Byval parameters hand the function a pointer directly into the stack area
-  // we want to reuse during a tail call. Working around this *is* possible (see
-  // X86).
-  //
-  // FIXME: In AArch64ISelLowering, this isn't worked around. Can/should we try
-  // it?
-  //
-  // On Windows, "inreg" attributes signify non-aggregate indirect returns.
-  // In this case, it is necessary to save/restore X0 in the callee. Tail
-  // call opt interferes with this. So we disable tail call opt when the
-  // caller has an argument with "inreg" attribute.
-  //
-  // FIXME: Check whether the callee also has an "inreg" argument.
-  //
-  // When the caller has a swifterror argument, we don't want to tail call
-  // because would have to move into the swifterror register before the
-  // tail call.
-  if (any_of(CallerF.args(), [](const Argument &A) {
-        return A.hasByValAttr() || A.hasInRegAttr() || A.hasSwiftErrorAttr();
-      })) {
-    LLVM_DEBUG(dbgs() << "... Cannot tail call from callers with byval, "
-                         "inreg, or swifterror arguments\n");
-    return false;
-  }
-
-  // Externally-defined functions with weak linkage should not be
-  // tail-called on AArch64 when the OS does not support dynamic
-  // pre-emption of symbols, as the AAELF spec requires normal calls
-  // to undefined weak functions to be replaced with a NOP or jump to the
-  // next instruction. The behaviour of branch instructions in this
-  // situation (as used for tail calls) is implementation-defined, so we
-  // cannot rely on the linker replacing the tail call with a return.
-  if (Info.Callee.isGlobal()) {
-    const GlobalValue *GV = Info.Callee.getGlobal();
-    const Triple &TT = MF.getTarget().getTargetTriple();
-    if (GV->hasExternalWeakLinkage() &&
-        (!TT.isOSWindows() || TT.isOSBinFormatELF() ||
-         TT.isOSBinFormatMachO())) {
-      LLVM_DEBUG(dbgs() << "... Cannot tail call externally-defined function "
-                           "with weak linkage for this OS.\n");
-      return false;
-    }
-  }
-
-  // If we have -tailcallopt, then we're done.
-  if (MF.getTarget().Options.GuaranteedTailCallOpt)
-    return canGuaranteeTCO(CalleeCC) && CalleeCC == CallerF.getCallingConv();
-
-  // We don't have -tailcallopt, so we're allowed to change the ABI (sibcall).
-  // Try to find cases where we can do that.
-
-  // I want anyone implementing a new calling convention to think long and hard
-  // about this assert.
-  assert((!Info.IsVarArg || CalleeCC == CallingConv::C) &&
-         "Unexpected variadic calling convention");
-
-  // Verify that the incoming and outgoing arguments from the callee are
-  // safe to tail call.
-  if (!doCallerAndCalleePassArgsTheSameWay(Info, MF, InArgs)) {
-    LLVM_DEBUG(
-        dbgs()
-        << "... Caller and callee have incompatible calling conventions.\n");
-    return false;
-  }
-
-  if (!areCalleeOutgoingArgsTailCallable(Info, MF, OutArgs))
-    return false;
-
-  LLVM_DEBUG(
-      dbgs() << "... Call is eligible for tail call optimization.\n");
-  return true;
-}
-
-static unsigned getCallOpcode(const Function &CallerF, bool IsIndirect,
-                              bool IsTailCall) {
-  if (!IsTailCall)
-    return IsIndirect ? AArch64::BLR : AArch64::BL;
-
-  if (!IsIndirect)
-    return AArch64::TCRETURNdi;
-
-  // When BTI is enabled, we need to use TCRETURNriBTI to make sure that we use
-  // x16 or x17.
-  if (CallerF.hasFnAttribute("branch-target-enforcement"))
-    return AArch64::TCRETURNriBTI;
-
-  return AArch64::TCRETURNri;
-}
-
-bool AArch64CallLowering::lowerTailCall(
-    MachineIRBuilder &MIRBuilder, CallLoweringInfo &Info,
-    SmallVectorImpl<ArgInfo> &OutArgs) const {
-  MachineFunction &MF = MIRBuilder.getMF();
-  const Function &F = MF.getFunction();
-  MachineRegisterInfo &MRI = MF.getRegInfo();
-  const AArch64TargetLowering &TLI = *getTLI<AArch64TargetLowering>();
-  AArch64FunctionInfo *FuncInfo = MF.getInfo<AArch64FunctionInfo>();
-
-  // True when we're tail calling, but without -tailcallopt.
-  bool IsSibCall = !MF.getTarget().Options.GuaranteedTailCallOpt;
-
-  // TODO: Right now, regbankselect doesn't know how to handle the rtcGPR64
-  // register class. Until we can do that, we should fall back here.
-  if (F.hasFnAttribute("branch-target-enforcement")) {
-    LLVM_DEBUG(
-        dbgs() << "Cannot lower indirect tail calls with BTI enabled yet.\n");
-    return false;
-  }
-
-  // Find out which ABI gets to decide where things go.
-  CallingConv::ID CalleeCC = Info.CallConv;
-  CCAssignFn *AssignFnFixed;
-  CCAssignFn *AssignFnVarArg;
-  std::tie(AssignFnFixed, AssignFnVarArg) = getAssignFnsForCC(CalleeCC, TLI);
-
-  MachineInstrBuilder CallSeqStart;
-  if (!IsSibCall)
-    CallSeqStart = MIRBuilder.buildInstr(AArch64::ADJCALLSTACKDOWN);
-
-  unsigned Opc = getCallOpcode(F, Info.Callee.isReg(), true);
-  auto MIB = MIRBuilder.buildInstrNoInsert(Opc);
-  MIB.add(Info.Callee);
-
-  // Byte offset for the tail call. When we are sibcalling, this will always
-  // be 0.
-  MIB.addImm(0);
-
-  // Tell the call which registers are clobbered.
-  auto TRI = MF.getSubtarget<AArch64Subtarget>().getRegisterInfo();
-  const uint32_t *Mask = TRI->getCallPreservedMask(MF, CalleeCC);
-  if (MF.getSubtarget<AArch64Subtarget>().hasCustomCallingConv())
-    TRI->UpdateCustomCallPreservedMask(MF, &Mask);
-  MIB.addRegMask(Mask);
-
-  if (TRI->isAnyArgRegReserved(MF))
-    TRI->emitReservedArgRegCallError(MF);
-
-  // FPDiff is the byte offset of the call's argument area from the callee's.
-  // Stores to callee stack arguments will be placed in FixedStackSlots offset
-  // by this amount for a tail call. In a sibling call it must be 0 because the
-  // caller will deallocate the entire stack and the callee still expects its
-  // arguments to begin at SP+0.
-  int FPDiff = 0;
-
-  // This will be 0 for sibcalls, potentially nonzero for tail calls produced
-  // by -tailcallopt. For sibcalls, the memory operands for the call are
-  // already available in the caller's incoming argument space.
-  unsigned NumBytes = 0;
-  if (!IsSibCall) {
-    // We aren't sibcalling, so we need to compute FPDiff. We need to do this
-    // before handling assignments, because FPDiff must be known for memory
-    // arguments.
-    unsigned NumReusableBytes = FuncInfo->getBytesInStackArgArea();
-    SmallVector<CCValAssign, 16> OutLocs;
-    CCState OutInfo(CalleeCC, false, MF, OutLocs, F.getContext());
-    analyzeArgInfo(OutInfo, OutArgs, *AssignFnFixed, *AssignFnVarArg);
-
-    // The callee will pop the argument stack as a tail call. Thus, we must
-    // keep it 16-byte aligned.
-    NumBytes = alignTo(OutInfo.getNextStackOffset(), 16);
-
-    // FPDiff will be negative if this tail call requires more space than we
-    // would automatically have in our incoming argument space. Positive if we
-    // actually shrink the stack.
-    FPDiff = NumReusableBytes - NumBytes;
-
-    // The stack pointer must be 16-byte aligned at all times it's used for a
-    // memory operation, which in practice means at *all* times and in
-    // particular across call boundaries. Therefore our own arguments started at
-    // a 16-byte aligned SP and the delta applied for the tail call should
-    // satisfy the same constraint.
-    assert(FPDiff % 16 == 0 && "unaligned stack on tail call");
-  }
-
-  const auto &Forwards = FuncInfo->getForwardedMustTailRegParms();
-
-  // Do the actual argument marshalling.
-  SmallVector<unsigned, 8> PhysRegs;
-  OutgoingArgHandler Handler(MIRBuilder, MRI, MIB, AssignFnFixed,
-                             AssignFnVarArg, true, FPDiff);
-  if (!handleAssignments(MIRBuilder, OutArgs, Handler))
-    return false;
-
-  if (Info.IsVarArg && Info.IsMustTailCall) {
-    // Now we know what's being passed to the function. Add uses to the call for
-    // the forwarded registers that we *aren't* passing as parameters. This will
-    // preserve the copies we build earlier.
-    for (const auto &F : Forwards) {
-      Register ForwardedReg = F.PReg;
-      // If the register is already passed, or aliases a register which is
-      // already being passed, then skip it.
-      if (any_of(MIB->uses(), [&ForwardedReg, &TRI](const MachineOperand &Use) {
-            if (!Use.isReg())
-              return false;
-            return TRI->regsOverlap(Use.getReg(), ForwardedReg);
-          }))
-        continue;
-
-      // We aren't passing it already, so we should add it to the call.
-      MIRBuilder.buildCopy(ForwardedReg, Register(F.VReg));
-      MIB.addReg(ForwardedReg, RegState::Implicit);
-    }
-  }
-
-  // If we have -tailcallopt, we need to adjust the stack. We'll do the call
-  // sequence start and end here.
-  if (!IsSibCall) {
-    MIB->getOperand(1).setImm(FPDiff);
-    CallSeqStart.addImm(NumBytes).addImm(0);
-    // End the call sequence *before* emitting the call. Normally, we would
-    // tidy the frame up after the call. However, here, we've laid out the
-    // parameters so that when SP is reset, they will be in the correct
-    // location.
-    MIRBuilder.buildInstr(AArch64::ADJCALLSTACKUP).addImm(NumBytes).addImm(0);
-  }
-
-  // Now we can add the actual call instruction to the correct basic block.
-  MIRBuilder.insertInstr(MIB);
-
-  // If Callee is a reg, since it is used by a target specific instruction,
-  // it must have a register class matching the constraint of that instruction.
-  if (Info.Callee.isReg())
-    MIB->getOperand(0).setReg(constrainOperandRegClass(
-        MF, *TRI, MRI, *MF.getSubtarget().getInstrInfo(),
-        *MF.getSubtarget().getRegBankInfo(), *MIB, MIB->getDesc(), Info.Callee,
-        0));
-
-  MF.getFrameInfo().setHasTailCall();
-  Info.LoweredTailCall = true;
-  return true;
-}
-
-bool AArch64CallLowering::lowerCall(MachineIRBuilder &MIRBuilder,
-                                    CallLoweringInfo &Info) const {
-  MachineFunction &MF = MIRBuilder.getMF();
-  const Function &F = MF.getFunction();
-  MachineRegisterInfo &MRI = MF.getRegInfo();
-  auto &DL = F.getParent()->getDataLayout();
-  const AArch64TargetLowering &TLI = *getTLI<AArch64TargetLowering>();
-
-  SmallVector<ArgInfo, 8> OutArgs;
-  for (auto &OrigArg : Info.OrigArgs) {
-    splitToValueTypes(OrigArg, OutArgs, DL, MRI, Info.CallConv);
-    // AAPCS requires that we zero-extend i1 to 8 bits by the caller.
-    if (OrigArg.Ty->isIntegerTy(1))
-      OutArgs.back().Flags[0].setZExt();
-  }
-
-  SmallVector<ArgInfo, 8> InArgs;
-  if (!Info.OrigRet.Ty->isVoidTy())
-    splitToValueTypes(Info.OrigRet, InArgs, DL, MRI, F.getCallingConv());
-
-  // If we can lower as a tail call, do that instead.
-  bool CanTailCallOpt =
-      isEligibleForTailCallOptimization(MIRBuilder, Info, InArgs, OutArgs);
-
-  // We must emit a tail call if we have musttail.
-  if (Info.IsMustTailCall && !CanTailCallOpt) {
-    // There are types of incoming/outgoing arguments we can't handle yet, so
-    // it doesn't make sense to actually die here like in ISelLowering. Instead,
-    // fall back to SelectionDAG and let it try to handle this.
-    LLVM_DEBUG(dbgs() << "Failed to lower musttail call as tail call\n");
-    return false;
-  }
-
-  if (CanTailCallOpt)
-    return lowerTailCall(MIRBuilder, Info, OutArgs);
-
-  // Find out which ABI gets to decide where things go.
-  CCAssignFn *AssignFnFixed;
-  CCAssignFn *AssignFnVarArg;
-  std::tie(AssignFnFixed, AssignFnVarArg) =
-      getAssignFnsForCC(Info.CallConv, TLI);
-
-  MachineInstrBuilder CallSeqStart;
-  CallSeqStart = MIRBuilder.buildInstr(AArch64::ADJCALLSTACKDOWN);
-
-  // Create a temporarily-floating call instruction so we can add the implicit
-  // uses of arg registers.
-  unsigned Opc = getCallOpcode(F, Info.Callee.isReg(), false);
-
-  auto MIB = MIRBuilder.buildInstrNoInsert(Opc);
-  MIB.add(Info.Callee);
-
-  // Tell the call which registers are clobbered.
-  auto TRI = MF.getSubtarget<AArch64Subtarget>().getRegisterInfo();
-  const uint32_t *Mask = TRI->getCallPreservedMask(MF, Info.CallConv);
-  if (MF.getSubtarget<AArch64Subtarget>().hasCustomCallingConv())
-    TRI->UpdateCustomCallPreservedMask(MF, &Mask);
-  MIB.addRegMask(Mask);
-
-  if (TRI->isAnyArgRegReserved(MF))
-    TRI->emitReservedArgRegCallError(MF);
-
-  // Do the actual argument marshalling.
-  SmallVector<unsigned, 8> PhysRegs;
-  OutgoingArgHandler Handler(MIRBuilder, MRI, MIB, AssignFnFixed,
-                             AssignFnVarArg, false);
-  if (!handleAssignments(MIRBuilder, OutArgs, Handler))
-    return false;
-
-  // Now we can add the actual call instruction to the correct basic block.
-  MIRBuilder.insertInstr(MIB);
-
-  // If Callee is a reg, since it is used by a target specific
-  // instruction, it must have a register class matching the
-  // constraint of that instruction.
-  if (Info.Callee.isReg())
-    MIB->getOperand(0).setReg(constrainOperandRegClass(
-        MF, *TRI, MRI, *MF.getSubtarget().getInstrInfo(),
-        *MF.getSubtarget().getRegBankInfo(), *MIB, MIB->getDesc(), Info.Callee,
-        0));
-
-  // Finally we can copy the returned value back into its virtual-register. In
-  // symmetry with the arguments, the physical register must be an
-  // implicit-define of the call instruction.
-  if (!Info.OrigRet.Ty->isVoidTy()) {
-    CCAssignFn *RetAssignFn = TLI.CCAssignFnForReturn(Info.CallConv);
-    CallReturnHandler Handler(MIRBuilder, MRI, MIB, RetAssignFn);
-    if (!handleAssignments(MIRBuilder, InArgs, Handler))
-      return false;
-  }
-
-  if (Info.SwiftErrorVReg) {
-    MIB.addDef(AArch64::X21, RegState::Implicit);
-    MIRBuilder.buildCopy(Info.SwiftErrorVReg, Register(AArch64::X21));
-  }
-
-  uint64_t CalleePopBytes =
-      doesCalleeRestoreStack(Info.CallConv,
-                             MF.getTarget().Options.GuaranteedTailCallOpt)
-          ? alignTo(Handler.StackSize, 16)
-          : 0;
-
-  CallSeqStart.addImm(Handler.StackSize).addImm(0);
-  MIRBuilder.buildInstr(AArch64::ADJCALLSTACKUP)
-      .addImm(Handler.StackSize)
-      .addImm(CalleePopBytes);
-
-  return true;
-}
diff --git a/gnu/llvm/llvm/lib/Target/AArch64/AArch64CallLowering.h b/gnu/llvm/llvm/lib/Target/AArch64/AArch64CallLowering.h
deleted file mode 100644 (file)
index b0c601c..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-//===- AArch64CallLowering.h - Call lowering --------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-///
-/// \file
-/// This file describes how to lower LLVM calls to machine code calls.
-///
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_LIB_TARGET_AARCH64_AARCH64CALLLOWERING_H
-#define LLVM_LIB_TARGET_AARCH64_AARCH64CALLLOWERING_H
-
-#include "llvm/ADT/ArrayRef.h"
-#include "llvm/CodeGen/GlobalISel/CallLowering.h"
-#include "llvm/IR/CallingConv.h"
-#include <cstdint>
-#include <functional>
-
-namespace llvm {
-
-class AArch64TargetLowering;
-class CCValAssign;
-class DataLayout;
-class MachineIRBuilder;
-class MachineRegisterInfo;
-class Type;
-
-class AArch64CallLowering: public CallLowering {
-public:
-  AArch64CallLowering(const AArch64TargetLowering &TLI);
-
-  bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val,
-                   ArrayRef<Register> VRegs,
-                   Register SwiftErrorVReg) const override;
-
-  bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F,
-                            ArrayRef<ArrayRef<Register>> VRegs) const override;
-
-  bool lowerCall(MachineIRBuilder &MIRBuilder,
-                 CallLoweringInfo &Info) const override;
-
-  /// Returns true if the call can be lowered as a tail call.
-  bool
-  isEligibleForTailCallOptimization(MachineIRBuilder &MIRBuilder,
-                                    CallLoweringInfo &Info,
-                                    SmallVectorImpl<ArgInfo> &InArgs,
-                                    SmallVectorImpl<ArgInfo> &OutArgs) const;
-
-  bool supportSwiftError() const override { return true; }
-
-private:
-  using RegHandler = std::function<void(MachineIRBuilder &, Type *, unsigned,
-                                        CCValAssign &)>;
-
-  using MemHandler =
-      std::function<void(MachineIRBuilder &, int, CCValAssign &)>;
-
-  void splitToValueTypes(const ArgInfo &OrigArgInfo,
-                         SmallVectorImpl<ArgInfo> &SplitArgs,
-                         const DataLayout &DL, MachineRegisterInfo &MRI,
-                         CallingConv::ID CallConv) const;
-
-  bool lowerTailCall(MachineIRBuilder &MIRBuilder, CallLoweringInfo &Info,
-                     SmallVectorImpl<ArgInfo> &OutArgs) const;
-
-  bool
-  doCallerAndCalleePassArgsTheSameWay(CallLoweringInfo &Info,
-                                      MachineFunction &MF,
-                                      SmallVectorImpl<ArgInfo> &InArgs) const;
-
-  bool
-  areCalleeOutgoingArgsTailCallable(CallLoweringInfo &Info, MachineFunction &MF,
-                                    SmallVectorImpl<ArgInfo> &OutArgs) const;
-};
-
-} // end namespace llvm
-
-#endif // LLVM_LIB_TARGET_AARCH64_AARCH64CALLLOWERING_H
index c6cc6e9..fd6af1f 100644 (file)
 #include "AArch64InstrInfo.h"
 #include "AArch64MachineFunctionInfo.h"
 #include "AArch64RegisterInfo.h"
+#include "AArch64ReturnProtectorLowering.h"
 #include "AArch64StackOffset.h"
 #include "AArch64Subtarget.h"
 #include "AArch64TargetMachine.h"
@@ -2521,6 +2522,10 @@ void AArch64FrameLowering::determineCalleeSaves(MachineFunction &MF,
                                 ? RegInfo->getBaseRegister()
                                 : (unsigned)AArch64::NoRegister;
 
+  if (MFI.hasReturnProtectorRegister() && MFI.getReturnProtectorNeedsStore()) {
+    SavedRegs.set(MFI.getReturnProtectorRegister());
+  }
+
   unsigned ExtraCSSpill = 0;
   // Figure out which callee-saved registers to save/restore.
   for (unsigned i = 0; CSRegs[i]; ++i) {
@@ -3252,3 +3257,7 @@ unsigned AArch64FrameLowering::getWinEHFuncletFrameSize(
   return alignTo(CSSize + MF.getFrameInfo().getMaxCallFrameSize(),
                  getStackAlign());
 }
+
+const ReturnProtectorLowering *AArch64FrameLowering::getReturnProtector() const {
+  return &RPL;
+}
index 1ca8c3e..ede4261 100644 (file)
@@ -13,6 +13,7 @@
 #ifndef LLVM_LIB_TARGET_AARCH64_AARCH64FRAMELOWERING_H
 #define LLVM_LIB_TARGET_AARCH64_AARCH64FRAMELOWERING_H
 
+#include "AArch64ReturnProtectorLowering.h"
 #include "AArch64StackOffset.h"
 #include "llvm/CodeGen/TargetFrameLowering.h"
 
@@ -22,9 +23,12 @@ class MCCFIInstruction;
 
 class AArch64FrameLowering : public TargetFrameLowering {
 public:
+
+  const AArch64ReturnProtectorLowering RPL;
+
   explicit AArch64FrameLowering()
       : TargetFrameLowering(StackGrowsDown, Align(16), 0, Align(16),
-                            true /*StackRealignable*/) {}
+                            true /*StackRealignable*/), RPL() {}
 
   void
   emitCalleeSavedFrameMoves(MachineBasicBlock &MBB,
@@ -39,6 +43,8 @@ public:
   void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
   void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
 
+  const ReturnProtectorLowering *getReturnProtector() const override;
+
   bool canUseAsPrologue(const MachineBasicBlock &MBB) const override;
 
   int getFrameIndexReference(const MachineFunction &MF, int FI,
index 48ca903..f011b1b 100644 (file)
@@ -14558,7 +14558,8 @@ void AArch64TargetLowering::ReplaceNodeResults(
 }
 
 bool AArch64TargetLowering::useLoadStackGuardNode() const {
-  if (Subtarget->isTargetAndroid() || Subtarget->isTargetFuchsia())
+  if (Subtarget->isTargetAndroid() || Subtarget->isTargetFuchsia() ||
+      Subtarget->isTargetOpenBSD())
     return TargetLowering::useLoadStackGuardNode();
   return true;
 }
index 08f80c9..2878d58 100644 (file)
@@ -96,6 +96,9 @@ unsigned AArch64InstrInfo::getInstSizeInBytes(const MachineInstr &MI) const {
   default:
     // Anything not explicitly designated otherwise is a normal 4-byte insn.
     NumBytes = 4;
+
+    if (Desc.getSize() > 0)
+      NumBytes = Desc.getSize();
     break;
   case TargetOpcode::STACKMAP:
     // The upper bound for a stackmap intrinsic is the full length of its shadow
index f4a5f63..33ef66c 100644 (file)
@@ -678,6 +678,14 @@ def ADDlowTLS
 
 } // isReMaterializable, isCodeGenOnly
 
+//===----------------------------------------------------------------------===//
+// Pseudo instruction used by retguard
+let isCodeGenOnly = 1, hasNoSchedulingInfo = 1 in {
+    let Size = 8 in {
+    def RETGUARD_JMP_TRAP: Pseudo<(outs), (ins GPR64:$reg), []>;
+    }
+}
+
 def : Pat<(AArch64LOADgot tglobaltlsaddr:$addr),
           (LOADgot tglobaltlsaddr:$addr)>;
 
diff --git a/gnu/llvm/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp b/gnu/llvm/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp
deleted file mode 100644 (file)
index b9ac265..0000000
+++ /dev/null
@@ -1,4918 +0,0 @@
-//===- AArch64InstructionSelector.cpp ----------------------------*- C++ -*-==//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-/// \file
-/// This file implements the targeting of the InstructionSelector class for
-/// AArch64.
-/// \todo This should be generated by TableGen.
-//===----------------------------------------------------------------------===//
-
-#include "AArch64InstrInfo.h"
-#include "AArch64MachineFunctionInfo.h"
-#include "AArch64RegisterBankInfo.h"
-#include "AArch64RegisterInfo.h"
-#include "AArch64Subtarget.h"
-#include "AArch64TargetMachine.h"
-#include "MCTargetDesc/AArch64AddressingModes.h"
-#include "llvm/ADT/Optional.h"
-#include "llvm/CodeGen/GlobalISel/InstructionSelector.h"
-#include "llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h"
-#include "llvm/CodeGen/GlobalISel/MachineIRBuilder.h"
-#include "llvm/CodeGen/GlobalISel/MIPatternMatch.h"
-#include "llvm/CodeGen/GlobalISel/Utils.h"
-#include "llvm/CodeGen/MachineBasicBlock.h"
-#include "llvm/CodeGen/MachineConstantPool.h"
-#include "llvm/CodeGen/MachineFunction.h"
-#include "llvm/CodeGen/MachineInstr.h"
-#include "llvm/CodeGen/MachineInstrBuilder.h"
-#include "llvm/CodeGen/MachineOperand.h"
-#include "llvm/CodeGen/MachineRegisterInfo.h"
-#include "llvm/IR/Type.h"
-#include "llvm/IR/IntrinsicsAArch64.h"
-#include "llvm/Support/Debug.h"
-#include "llvm/Support/raw_ostream.h"
-
-#define DEBUG_TYPE "aarch64-isel"
-
-using namespace llvm;
-
-namespace {
-
-#define GET_GLOBALISEL_PREDICATE_BITSET
-#include "AArch64GenGlobalISel.inc"
-#undef GET_GLOBALISEL_PREDICATE_BITSET
-
-class AArch64InstructionSelector : public InstructionSelector {
-public:
-  AArch64InstructionSelector(const AArch64TargetMachine &TM,
-                             const AArch64Subtarget &STI,
-                             const AArch64RegisterBankInfo &RBI);
-
-  bool select(MachineInstr &I) override;
-  static const char *getName() { return DEBUG_TYPE; }
-
-  void setupMF(MachineFunction &MF, GISelKnownBits &KB,
-               CodeGenCoverage &CoverageInfo) override {
-    InstructionSelector::setupMF(MF, KB, CoverageInfo);
-
-    // hasFnAttribute() is expensive to call on every BRCOND selection, so
-    // cache it here for each run of the selector.
-    ProduceNonFlagSettingCondBr =
-        !MF.getFunction().hasFnAttribute(Attribute::SpeculativeLoadHardening);
-  }
-
-private:
-  /// tblgen-erated 'select' implementation, used as the initial selector for
-  /// the patterns that don't require complex C++.
-  bool selectImpl(MachineInstr &I, CodeGenCoverage &CoverageInfo) const;
-
-  // A lowering phase that runs before any selection attempts.
-
-  void preISelLower(MachineInstr &I) const;
-
-  // An early selection function that runs before the selectImpl() call.
-  bool earlySelect(MachineInstr &I) const;
-
-  bool earlySelectSHL(MachineInstr &I, MachineRegisterInfo &MRI) const;
-
-  /// Eliminate same-sized cross-bank copies into stores before selectImpl().
-  void contractCrossBankCopyIntoStore(MachineInstr &I,
-                                      MachineRegisterInfo &MRI) const;
-
-  bool selectVaStartAAPCS(MachineInstr &I, MachineFunction &MF,
-                          MachineRegisterInfo &MRI) const;
-  bool selectVaStartDarwin(MachineInstr &I, MachineFunction &MF,
-                           MachineRegisterInfo &MRI) const;
-
-  bool selectCompareBranch(MachineInstr &I, MachineFunction &MF,
-                           MachineRegisterInfo &MRI) const;
-
-  bool selectVectorASHR(MachineInstr &I, MachineRegisterInfo &MRI) const;
-  bool selectVectorSHL(MachineInstr &I, MachineRegisterInfo &MRI) const;
-
-  // Helper to generate an equivalent of scalar_to_vector into a new register,
-  // returned via 'Dst'.
-  MachineInstr *emitScalarToVector(unsigned EltSize,
-                                   const TargetRegisterClass *DstRC,
-                                   Register Scalar,
-                                   MachineIRBuilder &MIRBuilder) const;
-
-  /// Emit a lane insert into \p DstReg, or a new vector register if None is
-  /// provided.
-  ///
-  /// The lane inserted into is defined by \p LaneIdx. The vector source
-  /// register is given by \p SrcReg. The register containing the element is
-  /// given by \p EltReg.
-  MachineInstr *emitLaneInsert(Optional<Register> DstReg, Register SrcReg,
-                               Register EltReg, unsigned LaneIdx,
-                               const RegisterBank &RB,
-                               MachineIRBuilder &MIRBuilder) const;
-  bool selectInsertElt(MachineInstr &I, MachineRegisterInfo &MRI) const;
-  bool selectBuildVector(MachineInstr &I, MachineRegisterInfo &MRI) const;
-  bool selectMergeValues(MachineInstr &I, MachineRegisterInfo &MRI) const;
-  bool selectUnmergeValues(MachineInstr &I, MachineRegisterInfo &MRI) const;
-
-  bool selectShuffleVector(MachineInstr &I, MachineRegisterInfo &MRI) const;
-  bool selectExtractElt(MachineInstr &I, MachineRegisterInfo &MRI) const;
-  bool selectConcatVectors(MachineInstr &I, MachineRegisterInfo &MRI) const;
-  bool selectSplitVectorUnmerge(MachineInstr &I,
-                                MachineRegisterInfo &MRI) const;
-  bool selectIntrinsicWithSideEffects(MachineInstr &I,
-                                      MachineRegisterInfo &MRI) const;
-  bool selectIntrinsic(MachineInstr &I, MachineRegisterInfo &MRI) const;
-  bool selectVectorICmp(MachineInstr &I, MachineRegisterInfo &MRI) const;
-  bool selectIntrinsicTrunc(MachineInstr &I, MachineRegisterInfo &MRI) const;
-  bool selectIntrinsicRound(MachineInstr &I, MachineRegisterInfo &MRI) const;
-  bool selectJumpTable(MachineInstr &I, MachineRegisterInfo &MRI) const;
-  bool selectBrJT(MachineInstr &I, MachineRegisterInfo &MRI) const;
-  bool selectTLSGlobalValue(MachineInstr &I, MachineRegisterInfo &MRI) const;
-
-  unsigned emitConstantPoolEntry(Constant *CPVal, MachineFunction &MF) const;
-  MachineInstr *emitLoadFromConstantPool(Constant *CPVal,
-                                         MachineIRBuilder &MIRBuilder) const;
-
-  // Emit a vector concat operation.
-  MachineInstr *emitVectorConcat(Optional<Register> Dst, Register Op1,
-                                 Register Op2,
-                                 MachineIRBuilder &MIRBuilder) const;
-  MachineInstr *emitIntegerCompare(MachineOperand &LHS, MachineOperand &RHS,
-                                   MachineOperand &Predicate,
-                                   MachineIRBuilder &MIRBuilder) const;
-  MachineInstr *emitADD(Register DefReg, MachineOperand &LHS, MachineOperand &RHS,
-                        MachineIRBuilder &MIRBuilder) const;
-  MachineInstr *emitCMN(MachineOperand &LHS, MachineOperand &RHS,
-                        MachineIRBuilder &MIRBuilder) const;
-  MachineInstr *emitTST(const Register &LHS, const Register &RHS,
-                        MachineIRBuilder &MIRBuilder) const;
-  MachineInstr *emitExtractVectorElt(Optional<Register> DstReg,
-                                     const RegisterBank &DstRB, LLT ScalarTy,
-                                     Register VecReg, unsigned LaneIdx,
-                                     MachineIRBuilder &MIRBuilder) const;
-
-  /// Helper function for selecting G_FCONSTANT. If the G_FCONSTANT can be
-  /// materialized using a FMOV instruction, then update MI and return it.
-  /// Otherwise, do nothing and return a nullptr.
-  MachineInstr *emitFMovForFConstant(MachineInstr &MI,
-                                     MachineRegisterInfo &MRI) const;
-
-  /// Emit a CSet for a compare.
-  MachineInstr *emitCSetForICMP(Register DefReg, unsigned Pred,
-                                MachineIRBuilder &MIRBuilder) const;
-
-  // Equivalent to the i32shift_a and friends from AArch64InstrInfo.td.
-  // We use these manually instead of using the importer since it doesn't
-  // support SDNodeXForm.
-  ComplexRendererFns selectShiftA_32(const MachineOperand &Root) const;
-  ComplexRendererFns selectShiftB_32(const MachineOperand &Root) const;
-  ComplexRendererFns selectShiftA_64(const MachineOperand &Root) const;
-  ComplexRendererFns selectShiftB_64(const MachineOperand &Root) const;
-
-  ComplexRendererFns select12BitValueWithLeftShift(uint64_t Immed) const;
-  ComplexRendererFns selectArithImmed(MachineOperand &Root) const;
-  ComplexRendererFns selectNegArithImmed(MachineOperand &Root) const;
-
-  ComplexRendererFns selectAddrModeUnscaled(MachineOperand &Root,
-                                            unsigned Size) const;
-
-  ComplexRendererFns selectAddrModeUnscaled8(MachineOperand &Root) const {
-    return selectAddrModeUnscaled(Root, 1);
-  }
-  ComplexRendererFns selectAddrModeUnscaled16(MachineOperand &Root) const {
-    return selectAddrModeUnscaled(Root, 2);
-  }
-  ComplexRendererFns selectAddrModeUnscaled32(MachineOperand &Root) const {
-    return selectAddrModeUnscaled(Root, 4);
-  }
-  ComplexRendererFns selectAddrModeUnscaled64(MachineOperand &Root) const {
-    return selectAddrModeUnscaled(Root, 8);
-  }
-  ComplexRendererFns selectAddrModeUnscaled128(MachineOperand &Root) const {
-    return selectAddrModeUnscaled(Root, 16);
-  }
-
-  ComplexRendererFns selectAddrModeIndexed(MachineOperand &Root,
-                                           unsigned Size) const;
-  template <int Width>
-  ComplexRendererFns selectAddrModeIndexed(MachineOperand &Root) const {
-    return selectAddrModeIndexed(Root, Width / 8);
-  }
-
-  bool isWorthFoldingIntoExtendedReg(MachineInstr &MI,
-                                     const MachineRegisterInfo &MRI) const;
-  ComplexRendererFns
-  selectAddrModeShiftedExtendXReg(MachineOperand &Root,
-                                  unsigned SizeInBytes) const;
-
-  /// Returns a \p ComplexRendererFns which contains a base, offset, and whether
-  /// or not a shift + extend should be folded into an addressing mode. Returns
-  /// None when this is not profitable or possible.
-  ComplexRendererFns
-  selectExtendedSHL(MachineOperand &Root, MachineOperand &Base,
-                    MachineOperand &Offset, unsigned SizeInBytes,
-                    bool WantsExt) const;
-  ComplexRendererFns selectAddrModeRegisterOffset(MachineOperand &Root) const;
-  ComplexRendererFns selectAddrModeXRO(MachineOperand &Root,
-                                       unsigned SizeInBytes) const;
-  template <int Width>
-  ComplexRendererFns selectAddrModeXRO(MachineOperand &Root) const {
-    return selectAddrModeXRO(Root, Width / 8);
-  }
-
-  ComplexRendererFns selectAddrModeWRO(MachineOperand &Root,
-                                       unsigned SizeInBytes) const;
-  template <int Width>
-  ComplexRendererFns selectAddrModeWRO(MachineOperand &Root) const {
-    return selectAddrModeWRO(Root, Width / 8);
-  }
-
-  ComplexRendererFns selectShiftedRegister(MachineOperand &Root) const;
-
-  ComplexRendererFns selectArithShiftedRegister(MachineOperand &Root) const {
-    return selectShiftedRegister(Root);
-  }
-
-  ComplexRendererFns selectLogicalShiftedRegister(MachineOperand &Root) const {
-    // TODO: selectShiftedRegister should allow for rotates on logical shifts.
-    // For now, make them the same. The only difference between the two is that
-    // logical shifts are allowed to fold in rotates. Otherwise, these are
-    // functionally the same.
-    return selectShiftedRegister(Root);
-  }
-
-  /// Given an extend instruction, determine the correct shift-extend type for
-  /// that instruction.
-  ///
-  /// If the instruction is going to be used in a load or store, pass
-  /// \p IsLoadStore = true.
-  AArch64_AM::ShiftExtendType
-  getExtendTypeForInst(MachineInstr &MI, MachineRegisterInfo &MRI,
-                       bool IsLoadStore = false) const;
-
-  /// Instructions that accept extend modifiers like UXTW expect the register
-  /// being extended to be a GPR32. Narrow ExtReg to a 32-bit register using a
-  /// subregister copy if necessary. Return either ExtReg, or the result of the
-  /// new copy.
-  Register narrowExtendRegIfNeeded(Register ExtReg,
-                                             MachineIRBuilder &MIB) const;
-  ComplexRendererFns selectArithExtendedRegister(MachineOperand &Root) const;
-
-  void renderTruncImm(MachineInstrBuilder &MIB, const MachineInstr &MI,
-                      int OpIdx = -1) const;
-  void renderLogicalImm32(MachineInstrBuilder &MIB, const MachineInstr &I,
-                          int OpIdx = -1) const;
-  void renderLogicalImm64(MachineInstrBuilder &MIB, const MachineInstr &I,
-                          int OpIdx = -1) const;
-
-  // Materialize a GlobalValue or BlockAddress using a movz+movk sequence.
-  void materializeLargeCMVal(MachineInstr &I, const Value *V,
-                             unsigned OpFlags) const;
-
-  // Optimization methods.
-  bool tryOptVectorShuffle(MachineInstr &I) const;
-  bool tryOptVectorDup(MachineInstr &MI) const;
-  bool tryOptSelect(MachineInstr &MI) const;
-  MachineInstr *tryFoldIntegerCompare(MachineOperand &LHS, MachineOperand &RHS,
-                                      MachineOperand &Predicate,
-                                      MachineIRBuilder &MIRBuilder) const;
-
-  /// Return true if \p MI is a load or store of \p NumBytes bytes.
-  bool isLoadStoreOfNumBytes(const MachineInstr &MI, unsigned NumBytes) const;
-
-  /// Returns true if \p MI is guaranteed to have the high-half of a 64-bit
-  /// register zeroed out. In other words, the result of MI has been explicitly
-  /// zero extended.
-  bool isDef32(const MachineInstr &MI) const;
-
-  const AArch64TargetMachine &TM;
-  const AArch64Subtarget &STI;
-  const AArch64InstrInfo &TII;
-  const AArch64RegisterInfo &TRI;
-  const AArch64RegisterBankInfo &RBI;
-
-  bool ProduceNonFlagSettingCondBr = false;
-
-#define GET_GLOBALISEL_PREDICATES_DECL
-#include "AArch64GenGlobalISel.inc"
-#undef GET_GLOBALISEL_PREDICATES_DECL
-
-// We declare the temporaries used by selectImpl() in the class to minimize the
-// cost of constructing placeholder values.
-#define GET_GLOBALISEL_TEMPORARIES_DECL
-#include "AArch64GenGlobalISel.inc"
-#undef GET_GLOBALISEL_TEMPORARIES_DECL
-};
-
-} // end anonymous namespace
-
-#define GET_GLOBALISEL_IMPL
-#include "AArch64GenGlobalISel.inc"
-#undef GET_GLOBALISEL_IMPL
-
-AArch64InstructionSelector::AArch64InstructionSelector(
-    const AArch64TargetMachine &TM, const AArch64Subtarget &STI,
-    const AArch64RegisterBankInfo &RBI)
-    : InstructionSelector(), TM(TM), STI(STI), TII(*STI.getInstrInfo()),
-      TRI(*STI.getRegisterInfo()), RBI(RBI),
-#define GET_GLOBALISEL_PREDICATES_INIT
-#include "AArch64GenGlobalISel.inc"
-#undef GET_GLOBALISEL_PREDICATES_INIT
-#define GET_GLOBALISEL_TEMPORARIES_INIT
-#include "AArch64GenGlobalISel.inc"
-#undef GET_GLOBALISEL_TEMPORARIES_INIT
-{
-}
-
-// FIXME: This should be target-independent, inferred from the types declared
-// for each class in the bank.
-static const TargetRegisterClass *
-getRegClassForTypeOnBank(LLT Ty, const RegisterBank &RB,
-                         const RegisterBankInfo &RBI,
-                         bool GetAllRegSet = false) {
-  if (RB.getID() == AArch64::GPRRegBankID) {
-    if (Ty.getSizeInBits() <= 32)
-      return GetAllRegSet ? &AArch64::GPR32allRegClass
-                          : &AArch64::GPR32RegClass;
-    if (Ty.getSizeInBits() == 64)
-      return GetAllRegSet ? &AArch64::GPR64allRegClass
-                          : &AArch64::GPR64RegClass;
-    return nullptr;
-  }
-
-  if (RB.getID() == AArch64::FPRRegBankID) {
-    if (Ty.getSizeInBits() <= 16)
-      return &AArch64::FPR16RegClass;
-    if (Ty.getSizeInBits() == 32)
-      return &AArch64::FPR32RegClass;
-    if (Ty.getSizeInBits() == 64)
-      return &AArch64::FPR64RegClass;
-    if (Ty.getSizeInBits() == 128)
-      return &AArch64::FPR128RegClass;
-    return nullptr;
-  }
-
-  return nullptr;
-}
-
-/// Given a register bank, and size in bits, return the smallest register class
-/// that can represent that combination.
-static const TargetRegisterClass *
-getMinClassForRegBank(const RegisterBank &RB, unsigned SizeInBits,
-                      bool GetAllRegSet = false) {
-  unsigned RegBankID = RB.getID();
-
-  if (RegBankID == AArch64::GPRRegBankID) {
-    if (SizeInBits <= 32)
-      return GetAllRegSet ? &AArch64::GPR32allRegClass
-                          : &AArch64::GPR32RegClass;
-    if (SizeInBits == 64)
-      return GetAllRegSet ? &AArch64::GPR64allRegClass
-                          : &AArch64::GPR64RegClass;
-  }
-
-  if (RegBankID == AArch64::FPRRegBankID) {
-    switch (SizeInBits) {
-    default:
-      return nullptr;
-    case 8:
-      return &AArch64::FPR8RegClass;
-    case 16:
-      return &AArch64::FPR16RegClass;
-    case 32:
-      return &AArch64::FPR32RegClass;
-    case 64:
-      return &AArch64::FPR64RegClass;
-    case 128:
-      return &AArch64::FPR128RegClass;
-    }
-  }
-
-  return nullptr;
-}
-
-/// Returns the correct subregister to use for a given register class.
-static bool getSubRegForClass(const TargetRegisterClass *RC,
-                              const TargetRegisterInfo &TRI, unsigned &SubReg) {
-  switch (TRI.getRegSizeInBits(*RC)) {
-  case 8:
-    SubReg = AArch64::bsub;
-    break;
-  case 16:
-    SubReg = AArch64::hsub;
-    break;
-  case 32:
-    if (RC != &AArch64::FPR32RegClass)
-      SubReg = AArch64::sub_32;
-    else
-      SubReg = AArch64::ssub;
-    break;
-  case 64:
-    SubReg = AArch64::dsub;
-    break;
-  default:
-    LLVM_DEBUG(
-        dbgs() << "Couldn't find appropriate subregister for register class.");
-    return false;
-  }
-
-  return true;
-}
-
-/// Check whether \p I is a currently unsupported binary operation:
-/// - it has an unsized type
-/// - an operand is not a vreg
-/// - all operands are not in the same bank
-/// These are checks that should someday live in the verifier, but right now,
-/// these are mostly limitations of the aarch64 selector.
-static bool unsupportedBinOp(const MachineInstr &I,
-                             const AArch64RegisterBankInfo &RBI,
-                             const MachineRegisterInfo &MRI,
-                             const AArch64RegisterInfo &TRI) {
-  LLT Ty = MRI.getType(I.getOperand(0).getReg());
-  if (!Ty.isValid()) {
-    LLVM_DEBUG(dbgs() << "Generic binop register should be typed\n");
-    return true;
-  }
-
-  const RegisterBank *PrevOpBank = nullptr;
-  for (auto &MO : I.operands()) {
-    // FIXME: Support non-register operands.
-    if (!MO.isReg()) {
-      LLVM_DEBUG(dbgs() << "Generic inst non-reg operands are unsupported\n");
-      return true;
-    }
-
-    // FIXME: Can generic operations have physical registers operands? If
-    // so, this will need to be taught about that, and we'll need to get the
-    // bank out of the minimal class for the register.
-    // Either way, this needs to be documented (and possibly verified).
-    if (!Register::isVirtualRegister(MO.getReg())) {
-      LLVM_DEBUG(dbgs() << "Generic inst has physical register operand\n");
-      return true;
-    }
-
-    const RegisterBank *OpBank = RBI.getRegBank(MO.getReg(), MRI, TRI);
-    if (!OpBank) {
-      LLVM_DEBUG(dbgs() << "Generic register has no bank or class\n");
-      return true;
-    }
-
-    if (PrevOpBank && OpBank != PrevOpBank) {
-      LLVM_DEBUG(dbgs() << "Generic inst operands have different banks\n");
-      return true;
-    }
-    PrevOpBank = OpBank;
-  }
-  return false;
-}
-
-/// Select the AArch64 opcode for the basic binary operation \p GenericOpc
-/// (such as G_OR or G_SDIV), appropriate for the register bank \p RegBankID
-/// and of size \p OpSize.
-/// \returns \p GenericOpc if the combination is unsupported.
-static unsigned selectBinaryOp(unsigned GenericOpc, unsigned RegBankID,
-                               unsigned OpSize) {
-  switch (RegBankID) {
-  case AArch64::GPRRegBankID:
-    if (OpSize == 32) {
-      switch (GenericOpc) {
-      case TargetOpcode::G_SHL:
-        return AArch64::LSLVWr;
-      case TargetOpcode::G_LSHR:
-        return AArch64::LSRVWr;
-      case TargetOpcode::G_ASHR:
-        return AArch64::ASRVWr;
-      default:
-        return GenericOpc;
-      }
-    } else if (OpSize == 64) {
-      switch (GenericOpc) {
-      case TargetOpcode::G_PTR_ADD:
-        return AArch64::ADDXrr;
-      case TargetOpcode::G_SHL:
-        return AArch64::LSLVXr;
-      case TargetOpcode::G_LSHR:
-        return AArch64::LSRVXr;
-      case TargetOpcode::G_ASHR:
-        return AArch64::ASRVXr;
-      default:
-        return GenericOpc;
-      }
-    }
-    break;
-  case AArch64::FPRRegBankID:
-    switch (OpSize) {
-    case 32:
-      switch (GenericOpc) {
-      case TargetOpcode::G_FADD:
-        return AArch64::FADDSrr;
-      case TargetOpcode::G_FSUB:
-        return AArch64::FSUBSrr;
-      case TargetOpcode::G_FMUL:
-        return AArch64::FMULSrr;
-      case TargetOpcode::G_FDIV:
-        return AArch64::FDIVSrr;
-      default:
-        return GenericOpc;
-      }
-    case 64:
-      switch (GenericOpc) {
-      case TargetOpcode::G_FADD:
-        return AArch64::FADDDrr;
-      case TargetOpcode::G_FSUB:
-        return AArch64::FSUBDrr;
-      case TargetOpcode::G_FMUL:
-        return AArch64::FMULDrr;
-      case TargetOpcode::G_FDIV:
-        return AArch64::FDIVDrr;
-      case TargetOpcode::G_OR:
-        return AArch64::ORRv8i8;
-      default:
-        return GenericOpc;
-      }
-    }
-    break;
-  }
-  return GenericOpc;
-}
-
-/// Select the AArch64 opcode for the G_LOAD or G_STORE operation \p GenericOpc,
-/// appropriate for the (value) register bank \p RegBankID and of memory access
-/// size \p OpSize.  This returns the variant with the base+unsigned-immediate
-/// addressing mode (e.g., LDRXui).
-/// \returns \p GenericOpc if the combination is unsupported.
-static unsigned selectLoadStoreUIOp(unsigned GenericOpc, unsigned RegBankID,
-                                    unsigned OpSize) {
-  const bool isStore = GenericOpc == TargetOpcode::G_STORE;
-  switch (RegBankID) {
-  case AArch64::GPRRegBankID:
-    switch (OpSize) {
-    case 8:
-      return isStore ? AArch64::STRBBui : AArch64::LDRBBui;
-    case 16:
-      return isStore ? AArch64::STRHHui : AArch64::LDRHHui;
-    case 32:
-      return isStore ? AArch64::STRWui : AArch64::LDRWui;
-    case 64:
-      return isStore ? AArch64::STRXui : AArch64::LDRXui;
-    }
-    break;
-  case AArch64::FPRRegBankID:
-    switch (OpSize) {
-    case 8:
-      return isStore ? AArch64::STRBui : AArch64::LDRBui;
-    case 16:
-      return isStore ? AArch64::STRHui : AArch64::LDRHui;
-    case 32:
-      return isStore ? AArch64::STRSui : AArch64::LDRSui;
-    case 64:
-      return isStore ? AArch64::STRDui : AArch64::LDRDui;
-    }
-    break;
-  }
-  return GenericOpc;
-}
-
-#ifndef NDEBUG
-/// Helper function that verifies that we have a valid copy at the end of
-/// selectCopy. Verifies that the source and dest have the expected sizes and
-/// then returns true.
-static bool isValidCopy(const MachineInstr &I, const RegisterBank &DstBank,
-                        const MachineRegisterInfo &MRI,
-                        const TargetRegisterInfo &TRI,
-                        const RegisterBankInfo &RBI) {
-  const Register DstReg = I.getOperand(0).getReg();
-  const Register SrcReg = I.getOperand(1).getReg();
-  const unsigned DstSize = RBI.getSizeInBits(DstReg, MRI, TRI);
-  const unsigned SrcSize = RBI.getSizeInBits(SrcReg, MRI, TRI);
-
-  // Make sure the size of the source and dest line up.
-  assert(
-      (DstSize == SrcSize ||
-       // Copies are a mean to setup initial types, the number of
-       // bits may not exactly match.
-       (Register::isPhysicalRegister(SrcReg) && DstSize <= SrcSize) ||
-       // Copies are a mean to copy bits around, as long as we are
-       // on the same register class, that's fine. Otherwise, that
-       // means we need some SUBREG_TO_REG or AND & co.
-       (((DstSize + 31) / 32 == (SrcSize + 31) / 32) && DstSize > SrcSize)) &&
-      "Copy with different width?!");
-
-  // Check the size of the destination.
-  assert((DstSize <= 64 || DstBank.getID() == AArch64::FPRRegBankID) &&
-         "GPRs cannot get more than 64-bit width values");
-
-  return true;
-}
-#endif
-
-/// Helper function for selectCopy. Inserts a subregister copy from
-/// \p *From to \p *To, linking it up to \p I.
-///
-/// e.g, given I = "Dst = COPY SrcReg", we'll transform that into
-///
-/// CopyReg (From class) = COPY SrcReg
-/// SubRegCopy (To class) = COPY CopyReg:SubReg
-/// Dst = COPY SubRegCopy
-static bool selectSubregisterCopy(MachineInstr &I, MachineRegisterInfo &MRI,
-                                  const RegisterBankInfo &RBI, Register SrcReg,
-                                  const TargetRegisterClass *From,
-                                  const TargetRegisterClass *To,
-                                  unsigned SubReg) {
-  MachineIRBuilder MIB(I);
-  auto Copy = MIB.buildCopy({From}, {SrcReg});
-  auto SubRegCopy = MIB.buildInstr(TargetOpcode::COPY, {To}, {})
-                        .addReg(Copy.getReg(0), 0, SubReg);
-  MachineOperand &RegOp = I.getOperand(1);
-  RegOp.setReg(SubRegCopy.getReg(0));
-
-  // It's possible that the destination register won't be constrained. Make
-  // sure that happens.
-  if (!Register::isPhysicalRegister(I.getOperand(0).getReg()))
-    RBI.constrainGenericRegister(I.getOperand(0).getReg(), *To, MRI);
-
-  return true;
-}
-
-/// Helper function to get the source and destination register classes for a
-/// copy. Returns a std::pair containing the source register class for the
-/// copy, and the destination register class for the copy. If a register class
-/// cannot be determined, then it will be nullptr.
-static std::pair<const TargetRegisterClass *, const TargetRegisterClass *>
-getRegClassesForCopy(MachineInstr &I, const TargetInstrInfo &TII,
-                     MachineRegisterInfo &MRI, const TargetRegisterInfo &TRI,
-                     const RegisterBankInfo &RBI) {
-  Register DstReg = I.getOperand(0).getReg();
-  Register SrcReg = I.getOperand(1).getReg();
-  const RegisterBank &DstRegBank = *RBI.getRegBank(DstReg, MRI, TRI);
-  const RegisterBank &SrcRegBank = *RBI.getRegBank(SrcReg, MRI, TRI);
-  unsigned DstSize = RBI.getSizeInBits(DstReg, MRI, TRI);
-  unsigned SrcSize = RBI.getSizeInBits(SrcReg, MRI, TRI);
-
-  // Special casing for cross-bank copies of s1s. We can technically represent
-  // a 1-bit value with any size of register. The minimum size for a GPR is 32
-  // bits. So, we need to put the FPR on 32 bits as well.
-  //
-  // FIXME: I'm not sure if this case holds true outside of copies. If it does,
-  // then we can pull it into the helpers that get the appropriate class for a
-  // register bank. Or make a new helper that carries along some constraint
-  // information.
-  if (SrcRegBank != DstRegBank && (DstSize == 1 && SrcSize == 1))
-    SrcSize = DstSize = 32;
-
-  return {getMinClassForRegBank(SrcRegBank, SrcSize, true),
-          getMinClassForRegBank(DstRegBank, DstSize, true)};
-}
-
-static bool selectCopy(MachineInstr &I, const TargetInstrInfo &TII,
-                       MachineRegisterInfo &MRI, const TargetRegisterInfo &TRI,
-                       const RegisterBankInfo &RBI) {
-
-  Register DstReg = I.getOperand(0).getReg();
-  Register SrcReg = I.getOperand(1).getReg();
-  const RegisterBank &DstRegBank = *RBI.getRegBank(DstReg, MRI, TRI);
-  const RegisterBank &SrcRegBank = *RBI.getRegBank(SrcReg, MRI, TRI);
-
-  // Find the correct register classes for the source and destination registers.
-  const TargetRegisterClass *SrcRC;
-  const TargetRegisterClass *DstRC;
-  std::tie(SrcRC, DstRC) = getRegClassesForCopy(I, TII, MRI, TRI, RBI);
-
-  if (!DstRC) {
-    LLVM_DEBUG(dbgs() << "Unexpected dest size "
-                      << RBI.getSizeInBits(DstReg, MRI, TRI) << '\n');
-    return false;
-  }
-
-  // A couple helpers below, for making sure that the copy we produce is valid.
-
-  // Set to true if we insert a SUBREG_TO_REG. If we do this, then we don't want
-  // to verify that the src and dst are the same size, since that's handled by
-  // the SUBREG_TO_REG.
-  bool KnownValid = false;
-
-  // Returns true, or asserts if something we don't expect happens. Instead of
-  // returning true, we return isValidCopy() to ensure that we verify the
-  // result.
-  auto CheckCopy = [&]() {
-    // If we have a bitcast or something, we can't have physical registers.
-    assert((I.isCopy() ||
-            (!Register::isPhysicalRegister(I.getOperand(0).getReg()) &&
-             !Register::isPhysicalRegister(I.getOperand(1).getReg()))) &&
-           "No phys reg on generic operator!");
-    assert(KnownValid || isValidCopy(I, DstRegBank, MRI, TRI, RBI));
-    (void)KnownValid;
-    return true;
-  };
-
-  // Is this a copy? If so, then we may need to insert a subregister copy, or
-  // a SUBREG_TO_REG.
-  if (I.isCopy()) {
-    // Yes. Check if there's anything to fix up.
-    if (!SrcRC) {
-      LLVM_DEBUG(dbgs() << "Couldn't determine source register class\n");
-      return false;
-    }
-
-    unsigned SrcSize = TRI.getRegSizeInBits(*SrcRC);
-    unsigned DstSize = TRI.getRegSizeInBits(*DstRC);
-
-    // If we're doing a cross-bank copy on different-sized registers, we need
-    // to do a bit more work.
-    if (SrcSize > DstSize) {
-      // We're doing a cross-bank copy into a smaller register. We need a
-      // subregister copy. First, get a register class that's on the same bank
-      // as the destination, but the same size as the source.
-      const TargetRegisterClass *SubregRC =
-          getMinClassForRegBank(DstRegBank, SrcSize, true);
-      assert(SubregRC && "Didn't get a register class for subreg?");
-
-      // Get the appropriate subregister for the destination.
-      unsigned SubReg = 0;
-      if (!getSubRegForClass(DstRC, TRI, SubReg)) {
-        LLVM_DEBUG(dbgs() << "Couldn't determine subregister for copy.\n");
-        return false;
-      }
-
-      // Now, insert a subregister copy using the new register class.
-      selectSubregisterCopy(I, MRI, RBI, SrcReg, SubregRC, DstRC, SubReg);
-      return CheckCopy();
-    }
-
-    // Is this a cross-bank copy?
-    if (DstRegBank.getID() != SrcRegBank.getID()) {
-      if (DstRegBank.getID() == AArch64::GPRRegBankID && DstSize == 32 &&
-          SrcSize == 16) {
-        // Special case for FPR16 to GPR32.
-        // FIXME: This can probably be generalized like the above case.
-        Register PromoteReg =
-            MRI.createVirtualRegister(&AArch64::FPR32RegClass);
-        BuildMI(*I.getParent(), I, I.getDebugLoc(),
-                TII.get(AArch64::SUBREG_TO_REG), PromoteReg)
-            .addImm(0)
-            .addUse(SrcReg)
-            .addImm(AArch64::hsub);
-        MachineOperand &RegOp = I.getOperand(1);
-        RegOp.setReg(PromoteReg);
-
-        // Promise that the copy is implicitly validated by the SUBREG_TO_REG.
-        KnownValid = true;
-      }
-    }
-
-    // If the destination is a physical register, then there's nothing to
-    // change, so we're done.
-    if (Register::isPhysicalRegister(DstReg))
-      return CheckCopy();
-  }
-
-  // No need to constrain SrcReg. It will get constrained when we hit another
-  // of its use or its defs. Copies do not have constraints.
-  if (!RBI.constrainGenericRegister(DstReg, *DstRC, MRI)) {
-    LLVM_DEBUG(dbgs() << "Failed to constrain " << TII.getName(I.getOpcode())
-                      << " operand\n");
-    return false;
-  }
-  I.setDesc(TII.get(AArch64::COPY));
-  return CheckCopy();
-}
-
-static unsigned selectFPConvOpc(unsigned GenericOpc, LLT DstTy, LLT SrcTy) {
-  if (!DstTy.isScalar() || !SrcTy.isScalar())
-    return GenericOpc;
-
-  const unsigned DstSize = DstTy.getSizeInBits();
-  const unsigned SrcSize = SrcTy.getSizeInBits();
-
-  switch (DstSize) {
-  case 32:
-    switch (SrcSize) {
-    case 32:
-      switch (GenericOpc) {
-      case TargetOpcode::G_SITOFP:
-        return AArch64::SCVTFUWSri;
-      case TargetOpcode::G_UITOFP:
-        return AArch64::UCVTFUWSri;
-      case TargetOpcode::G_FPTOSI:
-        return AArch64::FCVTZSUWSr;
-      case TargetOpcode::G_FPTOUI:
-        return AArch64::FCVTZUUWSr;
-      default:
-        return GenericOpc;
-      }
-    case 64:
-      switch (GenericOpc) {
-      case TargetOpcode::G_SITOFP:
-        return AArch64::SCVTFUXSri;
-      case TargetOpcode::G_UITOFP:
-        return AArch64::UCVTFUXSri;
-      case TargetOpcode::G_FPTOSI:
-        return AArch64::FCVTZSUWDr;
-      case TargetOpcode::G_FPTOUI:
-        return AArch64::FCVTZUUWDr;
-      default:
-        return GenericOpc;
-      }
-    default:
-      return GenericOpc;
-    }
-  case 64:
-    switch (SrcSize) {
-    case 32:
-      switch (GenericOpc) {
-      case TargetOpcode::G_SITOFP:
-        return AArch64::SCVTFUWDri;
-      case TargetOpcode::G_UITOFP:
-        return AArch64::UCVTFUWDri;
-      case TargetOpcode::G_FPTOSI:
-        return AArch64::FCVTZSUXSr;
-      case TargetOpcode::G_FPTOUI:
-        return AArch64::FCVTZUUXSr;
-      default:
-        return GenericOpc;
-      }
-    case 64:
-      switch (GenericOpc) {
-      case TargetOpcode::G_SITOFP:
-        return AArch64::SCVTFUXDri;
-      case TargetOpcode::G_UITOFP:
-        return AArch64::UCVTFUXDri;
-      case TargetOpcode::G_FPTOSI:
-        return AArch64::FCVTZSUXDr;
-      case TargetOpcode::G_FPTOUI:
-        return AArch64::FCVTZUUXDr;
-      default:
-        return GenericOpc;
-      }
-    default:
-      return GenericOpc;
-    }
-  default:
-    return GenericOpc;
-  };
-  return GenericOpc;
-}
-
-static unsigned selectSelectOpc(MachineInstr &I, MachineRegisterInfo &MRI,
-                                const RegisterBankInfo &RBI) {
-  const TargetRegisterInfo &TRI = *MRI.getTargetRegisterInfo();
-  bool IsFP = (RBI.getRegBank(I.getOperand(0).getReg(), MRI, TRI)->getID() !=
-               AArch64::GPRRegBankID);
-  LLT Ty = MRI.getType(I.getOperand(0).getReg());
-  if (Ty == LLT::scalar(32))
-    return IsFP ? AArch64::FCSELSrrr : AArch64::CSELWr;
-  else if (Ty == LLT::scalar(64) || Ty == LLT::pointer(0, 64))
-    return IsFP ? AArch64::FCSELDrrr : AArch64::CSELXr;
-  return 0;
-}
-
-/// Helper function to select the opcode for a G_FCMP.
-static unsigned selectFCMPOpc(MachineInstr &I, MachineRegisterInfo &MRI) {
-  // If this is a compare against +0.0, then we don't have to explicitly
-  // materialize a constant.
-  const ConstantFP *FPImm = getConstantFPVRegVal(I.getOperand(3).getReg(), MRI);
-  bool ShouldUseImm = FPImm && (FPImm->isZero() && !FPImm->isNegative());
-  unsigned OpSize = MRI.getType(I.getOperand(2).getReg()).getSizeInBits();
-  if (OpSize != 32 && OpSize != 64)
-    return 0;
-  unsigned CmpOpcTbl[2][2] = {{AArch64::FCMPSrr, AArch64::FCMPDrr},
-                              {AArch64::FCMPSri, AArch64::FCMPDri}};
-  return CmpOpcTbl[ShouldUseImm][OpSize == 64];
-}
-
-/// Returns true if \p P is an unsigned integer comparison predicate.
-static bool isUnsignedICMPPred(const CmpInst::Predicate P) {
-  switch (P) {
-  default:
-    return false;
-  case CmpInst::ICMP_UGT:
-  case CmpInst::ICMP_UGE:
-  case CmpInst::ICMP_ULT:
-  case CmpInst::ICMP_ULE:
-    return true;
-  }
-}
-
-static AArch64CC::CondCode changeICMPPredToAArch64CC(CmpInst::Predicate P) {
-  switch (P) {
-  default:
-    llvm_unreachable("Unknown condition code!");
-  case CmpInst::ICMP_NE:
-    return AArch64CC::NE;
-  case CmpInst::ICMP_EQ:
-    return AArch64CC::EQ;
-  case CmpInst::ICMP_SGT:
-    return AArch64CC::GT;
-  case CmpInst::ICMP_SGE:
-    return AArch64CC::GE;
-  case CmpInst::ICMP_SLT:
-    return AArch64CC::LT;
-  case CmpInst::ICMP_SLE:
-    return AArch64CC::LE;
-  case CmpInst::ICMP_UGT:
-    return AArch64CC::HI;
-  case CmpInst::ICMP_UGE:
-    return AArch64CC::HS;
-  case CmpInst::ICMP_ULT:
-    return AArch64CC::LO;
-  case CmpInst::ICMP_ULE:
-    return AArch64CC::LS;
-  }
-}
-
-static void changeFCMPPredToAArch64CC(CmpInst::Predicate P,
-                                      AArch64CC::CondCode &CondCode,
-                                      AArch64CC::CondCode &CondCode2) {
-  CondCode2 = AArch64CC::AL;
-  switch (P) {
-  default:
-    llvm_unreachable("Unknown FP condition!");
-  case CmpInst::FCMP_OEQ:
-    CondCode = AArch64CC::EQ;
-    break;
-  case CmpInst::FCMP_OGT:
-    CondCode = AArch64CC::GT;
-    break;
-  case CmpInst::FCMP_OGE:
-    CondCode = AArch64CC::GE;
-    break;
-  case CmpInst::FCMP_OLT:
-    CondCode = AArch64CC::MI;
-    break;
-  case CmpInst::FCMP_OLE:
-    CondCode = AArch64CC::LS;
-    break;
-  case CmpInst::FCMP_ONE:
-    CondCode = AArch64CC::MI;
-    CondCode2 = AArch64CC::GT;
-    break;
-  case CmpInst::FCMP_ORD:
-    CondCode = AArch64CC::VC;
-    break;
-  case CmpInst::FCMP_UNO:
-    CondCode = AArch64CC::VS;
-    break;
-  case CmpInst::FCMP_UEQ:
-    CondCode = AArch64CC::EQ;
-    CondCode2 = AArch64CC::VS;
-    break;
-  case CmpInst::FCMP_UGT:
-    CondCode = AArch64CC::HI;
-    break;
-  case CmpInst::FCMP_UGE:
-    CondCode = AArch64CC::PL;
-    break;
-  case CmpInst::FCMP_ULT:
-    CondCode = AArch64CC::LT;
-    break;
-  case CmpInst::FCMP_ULE:
-    CondCode = AArch64CC::LE;
-    break;
-  case CmpInst::FCMP_UNE:
-    CondCode = AArch64CC::NE;
-    break;
-  }
-}
-
-bool AArch64InstructionSelector::selectCompareBranch(
-    MachineInstr &I, MachineFunction &MF, MachineRegisterInfo &MRI) const {
-
-  const Register CondReg = I.getOperand(0).getReg();
-  MachineBasicBlock *DestMBB = I.getOperand(1).getMBB();
-  MachineInstr *CCMI = MRI.getVRegDef(CondReg);
-  if (CCMI->getOpcode() == TargetOpcode::G_TRUNC)
-    CCMI = MRI.getVRegDef(CCMI->getOperand(1).getReg());
-  if (CCMI->getOpcode() != TargetOpcode::G_ICMP)
-    return false;
-
-  Register LHS = CCMI->getOperand(2).getReg();
-  Register RHS = CCMI->getOperand(3).getReg();
-  auto VRegAndVal = getConstantVRegValWithLookThrough(RHS, MRI);
-  if (!VRegAndVal)
-    std::swap(RHS, LHS);
-
-  VRegAndVal = getConstantVRegValWithLookThrough(RHS, MRI);
-  if (!VRegAndVal || VRegAndVal->Value != 0) {
-    MachineIRBuilder MIB(I);
-    // If we can't select a CBZ then emit a cmp + Bcc.
-    if (!emitIntegerCompare(CCMI->getOperand(2), CCMI->getOperand(3),
-                            CCMI->getOperand(1), MIB))
-      return false;
-    const AArch64CC::CondCode CC = changeICMPPredToAArch64CC(
-        (CmpInst::Predicate)CCMI->getOperand(1).getPredicate());
-    MIB.buildInstr(AArch64::Bcc, {}, {}).addImm(CC).addMBB(DestMBB);
-    I.eraseFromParent();
-    return true;
-  }
-
-  const RegisterBank &RB = *RBI.getRegBank(LHS, MRI, TRI);
-  if (RB.getID() != AArch64::GPRRegBankID)
-    return false;
-
-  const auto Pred = (CmpInst::Predicate)CCMI->getOperand(1).getPredicate();
-  if (Pred != CmpInst::ICMP_NE && Pred != CmpInst::ICMP_EQ)
-    return false;
-
-  const unsigned CmpWidth = MRI.getType(LHS).getSizeInBits();
-  unsigned CBOpc = 0;
-  if (CmpWidth <= 32)
-    CBOpc = (Pred == CmpInst::ICMP_EQ ? AArch64::CBZW : AArch64::CBNZW);
-  else if (CmpWidth == 64)
-    CBOpc = (Pred == CmpInst::ICMP_EQ ? AArch64::CBZX : AArch64::CBNZX);
-  else
-    return false;
-
-  BuildMI(*I.getParent(), I, I.getDebugLoc(), TII.get(CBOpc))
-      .addUse(LHS)
-      .addMBB(DestMBB)
-      .constrainAllUses(TII, TRI, RBI);
-
-  I.eraseFromParent();
-  return true;
-}
-
-/// Returns the element immediate value of a vector shift operand if found.
-/// This needs to detect a splat-like operation, e.g. a G_BUILD_VECTOR.
-static Optional<int64_t> getVectorShiftImm(Register Reg,
-                                           MachineRegisterInfo &MRI) {
-  assert(MRI.getType(Reg).isVector() && "Expected a *vector* shift operand");
-  MachineInstr *OpMI = MRI.getVRegDef(Reg);
-  assert(OpMI && "Expected to find a vreg def for vector shift operand");
-  if (OpMI->getOpcode() != TargetOpcode::G_BUILD_VECTOR)
-    return None;
-
-  // Check all operands are identical immediates.
-  int64_t ImmVal = 0;
-  for (unsigned Idx = 1; Idx < OpMI->getNumOperands(); ++Idx) {
-    auto VRegAndVal = getConstantVRegValWithLookThrough(OpMI->getOperand(Idx).getReg(), MRI);
-    if (!VRegAndVal)
-      return None;
-
-    if (Idx == 1)
-      ImmVal = VRegAndVal->Value;
-    if (ImmVal != VRegAndVal->Value)
-      return None;
-  }
-
-  return ImmVal;
-}
-
-/// Matches and returns the shift immediate value for a SHL instruction given
-/// a shift operand.
-static Optional<int64_t> getVectorSHLImm(LLT SrcTy, Register Reg, MachineRegisterInfo &MRI) {
-  Optional<int64_t> ShiftImm = getVectorShiftImm(Reg, MRI);
-  if (!ShiftImm)
-    return None;
-  // Check the immediate is in range for a SHL.
-  int64_t Imm = *ShiftImm;
-  if (Imm < 0)
-    return None;
-  switch (SrcTy.getElementType().getSizeInBits()) {
-  default:
-    LLVM_DEBUG(dbgs() << "Unhandled element type for vector shift");
-    return None;
-  case 8:
-    if (Imm > 7)
-      return None;
-    break;
-  case 16:
-    if (Imm > 15)
-      return None;
-    break;
-  case 32:
-    if (Imm > 31)
-      return None;
-    break;
-  case 64:
-    if (Imm > 63)
-      return None;
-    break;
-  }
-  return Imm;
-}
-
-bool AArch64InstructionSelector::selectVectorSHL(
-    MachineInstr &I, MachineRegisterInfo &MRI) const {
-  assert(I.getOpcode() == TargetOpcode::G_SHL);
-  Register DstReg = I.getOperand(0).getReg();
-  const LLT Ty = MRI.getType(DstReg);
-  Register Src1Reg = I.getOperand(1).getReg();
-  Register Src2Reg = I.getOperand(2).getReg();
-
-  if (!Ty.isVector())
-    return false;
-
-  // Check if we have a vector of constants on RHS that we can select as the
-  // immediate form.
-  Optional<int64_t> ImmVal = getVectorSHLImm(Ty, Src2Reg, MRI);
-
-  unsigned Opc = 0;
-  if (Ty == LLT::vector(2, 64)) {
-    Opc = ImmVal ? AArch64::SHLv2i64_shift : AArch64::USHLv2i64;
-  } else if (Ty == LLT::vector(4, 32)) {
-    Opc = ImmVal ? AArch64::SHLv4i32_shift : AArch64::USHLv4i32;
-  } else if (Ty == LLT::vector(2, 32)) {
-    Opc = ImmVal ? AArch64::SHLv2i32_shift : AArch64::USHLv2i32;
-  } else {
-    LLVM_DEBUG(dbgs() << "Unhandled G_SHL type");
-    return false;
-  }
-
-  MachineIRBuilder MIB(I);
-  auto Shl = MIB.buildInstr(Opc, {DstReg}, {Src1Reg});
-  if (ImmVal)
-    Shl.addImm(*ImmVal);
-  else
-    Shl.addUse(Src2Reg);
-  constrainSelectedInstRegOperands(*Shl, TII, TRI, RBI);
-  I.eraseFromParent();
-  return true;
-}
-
-bool AArch64InstructionSelector::selectVectorASHR(
-    MachineInstr &I, MachineRegisterInfo &MRI) const {
-  assert(I.getOpcode() == TargetOpcode::G_ASHR);
-  Register DstReg = I.getOperand(0).getReg();
-  const LLT Ty = MRI.getType(DstReg);
-  Register Src1Reg = I.getOperand(1).getReg();
-  Register Src2Reg = I.getOperand(2).getReg();
-
-  if (!Ty.isVector())
-    return false;
-
-  // There is not a shift right register instruction, but the shift left
-  // register instruction takes a signed value, where negative numbers specify a
-  // right shift.
-
-  unsigned Opc = 0;
-  unsigned NegOpc = 0;
-  const TargetRegisterClass *RC = nullptr;
-  if (Ty == LLT::vector(2, 64)) {
-    Opc = AArch64::SSHLv2i64;
-    NegOpc = AArch64::NEGv2i64;
-    RC = &AArch64::FPR128RegClass;
-  } else if (Ty == LLT::vector(4, 32)) {
-    Opc = AArch64::SSHLv4i32;
-    NegOpc = AArch64::NEGv4i32;
-    RC = &AArch64::FPR128RegClass;
-  } else if (Ty == LLT::vector(2, 32)) {
-    Opc = AArch64::SSHLv2i32;
-    NegOpc = AArch64::NEGv2i32;
-    RC = &AArch64::FPR64RegClass;
-  } else {
-    LLVM_DEBUG(dbgs() << "Unhandled G_ASHR type");
-    return false;
-  }
-
-  MachineIRBuilder MIB(I);
-  auto Neg = MIB.buildInstr(NegOpc, {RC}, {Src2Reg});
-  constrainSelectedInstRegOperands(*Neg, TII, TRI, RBI);
-  auto SShl = MIB.buildInstr(Opc, {DstReg}, {Src1Reg, Neg});
-  constrainSelectedInstRegOperands(*SShl, TII, TRI, RBI);
-  I.eraseFromParent();
-  return true;
-}
-
-bool AArch64InstructionSelector::selectVaStartAAPCS(
-    MachineInstr &I, MachineFunction &MF, MachineRegisterInfo &MRI) const {
-  return false;
-}
-
-bool AArch64InstructionSelector::selectVaStartDarwin(
-    MachineInstr &I, MachineFunction &MF, MachineRegisterInfo &MRI) const {
-  AArch64FunctionInfo *FuncInfo = MF.getInfo<AArch64FunctionInfo>();
-  Register ListReg = I.getOperand(0).getReg();
-
-  Register ArgsAddrReg = MRI.createVirtualRegister(&AArch64::GPR64RegClass);
-
-  auto MIB =
-      BuildMI(*I.getParent(), I, I.getDebugLoc(), TII.get(AArch64::ADDXri))
-          .addDef(ArgsAddrReg)
-          .addFrameIndex(FuncInfo->getVarArgsStackIndex())
-          .addImm(0)
-          .addImm(0);
-
-  constrainSelectedInstRegOperands(*MIB, TII, TRI, RBI);
-
-  MIB = BuildMI(*I.getParent(), I, I.getDebugLoc(), TII.get(AArch64::STRXui))
-            .addUse(ArgsAddrReg)
-            .addUse(ListReg)
-            .addImm(0)
-            .addMemOperand(*I.memoperands_begin());
-
-  constrainSelectedInstRegOperands(*MIB, TII, TRI, RBI);
-  I.eraseFromParent();
-  return true;
-}
-
-void AArch64InstructionSelector::materializeLargeCMVal(
-    MachineInstr &I, const Value *V, unsigned OpFlags) const {
-  MachineBasicBlock &MBB = *I.getParent();
-  MachineFunction &MF = *MBB.getParent();
-  MachineRegisterInfo &MRI = MF.getRegInfo();
-  MachineIRBuilder MIB(I);
-
-  auto MovZ = MIB.buildInstr(AArch64::MOVZXi, {&AArch64::GPR64RegClass}, {});
-  MovZ->addOperand(MF, I.getOperand(1));
-  MovZ->getOperand(1).setTargetFlags(OpFlags | AArch64II::MO_G0 |
-                                     AArch64II::MO_NC);
-  MovZ->addOperand(MF, MachineOperand::CreateImm(0));
-  constrainSelectedInstRegOperands(*MovZ, TII, TRI, RBI);
-
-  auto BuildMovK = [&](Register SrcReg, unsigned char Flags, unsigned Offset,
-                       Register ForceDstReg) {
-    Register DstReg = ForceDstReg
-                          ? ForceDstReg
-                          : MRI.createVirtualRegister(&AArch64::GPR64RegClass);
-    auto MovI = MIB.buildInstr(AArch64::MOVKXi).addDef(DstReg).addUse(SrcReg);
-    if (auto *GV = dyn_cast<GlobalValue>(V)) {
-      MovI->addOperand(MF, MachineOperand::CreateGA(
-                               GV, MovZ->getOperand(1).getOffset(), Flags));
-    } else {
-      MovI->addOperand(
-          MF, MachineOperand::CreateBA(cast<BlockAddress>(V),
-                                       MovZ->getOperand(1).getOffset(), Flags));
-    }
-    MovI->addOperand(MF, MachineOperand::CreateImm(Offset));
-    constrainSelectedInstRegOperands(*MovI, TII, TRI, RBI);
-    return DstReg;
-  };
-  Register DstReg = BuildMovK(MovZ.getReg(0),
-                              AArch64II::MO_G1 | AArch64II::MO_NC, 16, 0);
-  DstReg = BuildMovK(DstReg, AArch64II::MO_G2 | AArch64II::MO_NC, 32, 0);
-  BuildMovK(DstReg, AArch64II::MO_G3, 48, I.getOperand(0).getReg());
-  return;
-}
-
-void AArch64InstructionSelector::preISelLower(MachineInstr &I) const {
-  MachineBasicBlock &MBB = *I.getParent();
-  MachineFunction &MF = *MBB.getParent();
-  MachineRegisterInfo &MRI = MF.getRegInfo();
-
-  switch (I.getOpcode()) {
-  case TargetOpcode::G_SHL:
-  case TargetOpcode::G_ASHR:
-  case TargetOpcode::G_LSHR: {
-    // These shifts are legalized to have 64 bit shift amounts because we want
-    // to take advantage of the existing imported selection patterns that assume
-    // the immediates are s64s. However, if the shifted type is 32 bits and for
-    // some reason we receive input GMIR that has an s64 shift amount that's not
-    // a G_CONSTANT, insert a truncate so that we can still select the s32
-    // register-register variant.
-    Register SrcReg = I.getOperand(1).getReg();
-    Register ShiftReg = I.getOperand(2).getReg();
-    const LLT ShiftTy = MRI.getType(ShiftReg);
-    const LLT SrcTy = MRI.getType(SrcReg);
-    if (SrcTy.isVector())
-      return;
-    assert(!ShiftTy.isVector() && "unexpected vector shift ty");
-    if (SrcTy.getSizeInBits() != 32 || ShiftTy.getSizeInBits() != 64)
-      return;
-    auto *AmtMI = MRI.getVRegDef(ShiftReg);
-    assert(AmtMI && "could not find a vreg definition for shift amount");
-    if (AmtMI->getOpcode() != TargetOpcode::G_CONSTANT) {
-      // Insert a subregister copy to implement a 64->32 trunc
-      MachineIRBuilder MIB(I);
-      auto Trunc = MIB.buildInstr(TargetOpcode::COPY, {SrcTy}, {})
-                       .addReg(ShiftReg, 0, AArch64::sub_32);
-      MRI.setRegBank(Trunc.getReg(0), RBI.getRegBank(AArch64::GPRRegBankID));
-      I.getOperand(2).setReg(Trunc.getReg(0));
-    }
-    return;
-  }
-  case TargetOpcode::G_STORE:
-    contractCrossBankCopyIntoStore(I, MRI);
-    return;
-  default:
-    return;
-  }
-}
-
-bool AArch64InstructionSelector::earlySelectSHL(
-    MachineInstr &I, MachineRegisterInfo &MRI) const {
-  // We try to match the immediate variant of LSL, which is actually an alias
-  // for a special case of UBFM. Otherwise, we fall back to the imported
-  // selector which will match the register variant.
-  assert(I.getOpcode() == TargetOpcode::G_SHL && "unexpected op");
-  const auto &MO = I.getOperand(2);
-  auto VRegAndVal = getConstantVRegVal(MO.getReg(), MRI);
-  if (!VRegAndVal)
-    return false;
-
-  const LLT DstTy = MRI.getType(I.getOperand(0).getReg());
-  if (DstTy.isVector())
-    return false;
-  bool Is64Bit = DstTy.getSizeInBits() == 64;
-  auto Imm1Fn = Is64Bit ? selectShiftA_64(MO) : selectShiftA_32(MO);
-  auto Imm2Fn = Is64Bit ? selectShiftB_64(MO) : selectShiftB_32(MO);
-  MachineIRBuilder MIB(I);
-
-  if (!Imm1Fn || !Imm2Fn)
-    return false;
-
-  auto NewI =
-      MIB.buildInstr(Is64Bit ? AArch64::UBFMXri : AArch64::UBFMWri,
-                     {I.getOperand(0).getReg()}, {I.getOperand(1).getReg()});
-
-  for (auto &RenderFn : *Imm1Fn)
-    RenderFn(NewI);
-  for (auto &RenderFn : *Imm2Fn)
-    RenderFn(NewI);
-
-  I.eraseFromParent();
-  return constrainSelectedInstRegOperands(*NewI, TII, TRI, RBI);
-}
-
-void AArch64InstructionSelector::contractCrossBankCopyIntoStore(
-    MachineInstr &I, MachineRegisterInfo &MRI) const {
-  assert(I.getOpcode() == TargetOpcode::G_STORE && "Expected G_STORE");
-  // If we're storing a scalar, it doesn't matter what register bank that
-  // scalar is on. All that matters is the size.
-  //
-  // So, if we see something like this (with a 32-bit scalar as an example):
-  //
-  // %x:gpr(s32) = ... something ...
-  // %y:fpr(s32) = COPY %x:gpr(s32)
-  // G_STORE %y:fpr(s32)
-  //
-  // We can fix this up into something like this:
-  //
-  // G_STORE %x:gpr(s32)
-  //
-  // And then continue the selection process normally.
-  MachineInstr *Def = getDefIgnoringCopies(I.getOperand(0).getReg(), MRI);
-  if (!Def)
-    return;
-  Register DefDstReg = Def->getOperand(0).getReg();
-  LLT DefDstTy = MRI.getType(DefDstReg);
-  Register StoreSrcReg = I.getOperand(0).getReg();
-  LLT StoreSrcTy = MRI.getType(StoreSrcReg);
-
-  // If we get something strange like a physical register, then we shouldn't
-  // go any further.
-  if (!DefDstTy.isValid())
-    return;
-
-  // Are the source and dst types the same size?
-  if (DefDstTy.getSizeInBits() != StoreSrcTy.getSizeInBits())
-    return;
-
-  if (RBI.getRegBank(StoreSrcReg, MRI, TRI) ==
-      RBI.getRegBank(DefDstReg, MRI, TRI))
-    return;
-
-  // We have a cross-bank copy, which is entering a store. Let's fold it.
-  I.getOperand(0).setReg(DefDstReg);
-}
-
-bool AArch64InstructionSelector::earlySelect(MachineInstr &I) const {
-  assert(I.getParent() && "Instruction should be in a basic block!");
-  assert(I.getParent()->getParent() && "Instruction should be in a function!");
-
-  MachineBasicBlock &MBB = *I.getParent();
-  MachineFunction &MF = *MBB.getParent();
-  MachineRegisterInfo &MRI = MF.getRegInfo();
-
-  switch (I.getOpcode()) {
-  case TargetOpcode::G_SHL:
-    return earlySelectSHL(I, MRI);
-  case TargetOpcode::G_CONSTANT: {
-    bool IsZero = false;
-    if (I.getOperand(1).isCImm())
-      IsZero = I.getOperand(1).getCImm()->getZExtValue() == 0;
-    else if (I.getOperand(1).isImm())
-      IsZero = I.getOperand(1).getImm() == 0;
-
-    if (!IsZero)
-      return false;
-
-    Register DefReg = I.getOperand(0).getReg();
-    LLT Ty = MRI.getType(DefReg);
-    if (Ty != LLT::scalar(64) && Ty != LLT::scalar(32))
-      return false;
-
-    if (Ty == LLT::scalar(64)) {
-      I.getOperand(1).ChangeToRegister(AArch64::XZR, false);
-      RBI.constrainGenericRegister(DefReg, AArch64::GPR64RegClass, MRI);
-    } else {
-      I.getOperand(1).ChangeToRegister(AArch64::WZR, false);
-      RBI.constrainGenericRegister(DefReg, AArch64::GPR32RegClass, MRI);
-    }
-    I.setDesc(TII.get(TargetOpcode::COPY));
-    return true;
-  }
-  default:
-    return false;
-  }
-}
-
-bool AArch64InstructionSelector::select(MachineInstr &I) {
-  assert(I.getParent() && "Instruction should be in a basic block!");
-  assert(I.getParent()->getParent() && "Instruction should be in a function!");
-
-  MachineBasicBlock &MBB = *I.getParent();
-  MachineFunction &MF = *MBB.getParent();
-  MachineRegisterInfo &MRI = MF.getRegInfo();
-
-  unsigned Opcode = I.getOpcode();
-  // G_PHI requires same handling as PHI
-  if (!isPreISelGenericOpcode(Opcode) || Opcode == TargetOpcode::G_PHI) {
-    // Certain non-generic instructions also need some special handling.
-
-    if (Opcode ==  TargetOpcode::LOAD_STACK_GUARD)
-      return constrainSelectedInstRegOperands(I, TII, TRI, RBI);
-
-    if (Opcode == TargetOpcode::PHI || Opcode == TargetOpcode::G_PHI) {
-      const Register DefReg = I.getOperand(0).getReg();
-      const LLT DefTy = MRI.getType(DefReg);
-
-      const RegClassOrRegBank &RegClassOrBank =
-        MRI.getRegClassOrRegBank(DefReg);
-
-      const TargetRegisterClass *DefRC
-        = RegClassOrBank.dyn_cast<const TargetRegisterClass *>();
-      if (!DefRC) {
-        if (!DefTy.isValid()) {
-          LLVM_DEBUG(dbgs() << "PHI operand has no type, not a gvreg?\n");
-          return false;
-        }
-        const RegisterBank &RB = *RegClassOrBank.get<const RegisterBank *>();
-        DefRC = getRegClassForTypeOnBank(DefTy, RB, RBI);
-        if (!DefRC) {
-          LLVM_DEBUG(dbgs() << "PHI operand has unexpected size/bank\n");
-          return false;
-        }
-      }
-
-      I.setDesc(TII.get(TargetOpcode::PHI));
-
-      return RBI.constrainGenericRegister(DefReg, *DefRC, MRI);
-    }
-
-    if (I.isCopy())
-      return selectCopy(I, TII, MRI, TRI, RBI);
-
-    return true;
-  }
-
-
-  if (I.getNumOperands() != I.getNumExplicitOperands()) {
-    LLVM_DEBUG(
-        dbgs() << "Generic instruction has unexpected implicit operands\n");
-    return false;
-  }
-
-  // Try to do some lowering before we start instruction selecting. These
-  // lowerings are purely transformations on the input G_MIR and so selection
-  // must continue after any modification of the instruction.
-  preISelLower(I);
-
-  // There may be patterns where the importer can't deal with them optimally,
-  // but does select it to a suboptimal sequence so our custom C++ selection
-  // code later never has a chance to work on it. Therefore, we have an early
-  // selection attempt here to give priority to certain selection routines
-  // over the imported ones.
-  if (earlySelect(I))
-    return true;
-
-  if (selectImpl(I, *CoverageInfo))
-    return true;
-
-  LLT Ty =
-      I.getOperand(0).isReg() ? MRI.getType(I.getOperand(0).getReg()) : LLT{};
-
-  MachineIRBuilder MIB(I);
-
-  switch (Opcode) {
-  case TargetOpcode::G_BRCOND: {
-    if (Ty.getSizeInBits() > 32) {
-      // We shouldn't need this on AArch64, but it would be implemented as an
-      // EXTRACT_SUBREG followed by a TBNZW because TBNZX has no encoding if the
-      // bit being tested is < 32.
-      LLVM_DEBUG(dbgs() << "G_BRCOND has type: " << Ty
-                        << ", expected at most 32-bits");
-      return false;
-    }
-
-    const Register CondReg = I.getOperand(0).getReg();
-    MachineBasicBlock *DestMBB = I.getOperand(1).getMBB();
-
-    // Speculation tracking/SLH assumes that optimized TB(N)Z/CB(N)Z
-    // instructions will not be produced, as they are conditional branch
-    // instructions that do not set flags.
-    bool ProduceNonFlagSettingCondBr =
-        !MF.getFunction().hasFnAttribute(Attribute::SpeculativeLoadHardening);
-    if (ProduceNonFlagSettingCondBr && selectCompareBranch(I, MF, MRI))
-      return true;
-
-    if (ProduceNonFlagSettingCondBr) {
-      auto MIB = BuildMI(MBB, I, I.getDebugLoc(), TII.get(AArch64::TBNZW))
-                     .addUse(CondReg)
-                     .addImm(/*bit offset=*/0)
-                     .addMBB(DestMBB);
-
-      I.eraseFromParent();
-      return constrainSelectedInstRegOperands(*MIB.getInstr(), TII, TRI, RBI);
-    } else {
-      auto CMP = BuildMI(MBB, I, I.getDebugLoc(), TII.get(AArch64::ANDSWri))
-                     .addDef(AArch64::WZR)
-                     .addUse(CondReg)
-                     .addImm(1);
-      constrainSelectedInstRegOperands(*CMP.getInstr(), TII, TRI, RBI);
-      auto Bcc =
-          BuildMI(MBB, I, I.getDebugLoc(), TII.get(AArch64::Bcc))
-              .addImm(AArch64CC::EQ)
-              .addMBB(DestMBB);
-
-      I.eraseFromParent();
-      return constrainSelectedInstRegOperands(*Bcc.getInstr(), TII, TRI, RBI);
-    }
-  }
-
-  case TargetOpcode::G_BRINDIRECT: {
-    I.setDesc(TII.get(AArch64::BR));
-    return constrainSelectedInstRegOperands(I, TII, TRI, RBI);
-  }
-
-  case TargetOpcode::G_BRJT:
-    return selectBrJT(I, MRI);
-
-  case TargetOpcode::G_BSWAP: {
-    // Handle vector types for G_BSWAP directly.
-    Register DstReg = I.getOperand(0).getReg();
-    LLT DstTy = MRI.getType(DstReg);
-
-    // We should only get vector types here; everything else is handled by the
-    // importer right now.
-    if (!DstTy.isVector() || DstTy.getSizeInBits() > 128) {
-      LLVM_DEBUG(dbgs() << "Dst type for G_BSWAP currently unsupported.\n");
-      return false;
-    }
-
-    // Only handle 4 and 2 element vectors for now.
-    // TODO: 16-bit elements.
-    unsigned NumElts = DstTy.getNumElements();
-    if (NumElts != 4 && NumElts != 2) {
-      LLVM_DEBUG(dbgs() << "Unsupported number of elements for G_BSWAP.\n");
-      return false;
-    }
-
-    // Choose the correct opcode for the supported types. Right now, that's
-    // v2s32, v4s32, and v2s64.
-    unsigned Opc = 0;
-    unsigned EltSize = DstTy.getElementType().getSizeInBits();
-    if (EltSize == 32)
-      Opc = (DstTy.getNumElements() == 2) ? AArch64::REV32v8i8
-                                          : AArch64::REV32v16i8;
-    else if (EltSize == 64)
-      Opc = AArch64::REV64v16i8;
-
-    // We should always get something by the time we get here...
-    assert(Opc != 0 && "Didn't get an opcode for G_BSWAP?");
-
-    I.setDesc(TII.get(Opc));
-    return constrainSelectedInstRegOperands(I, TII, TRI, RBI);
-  }
-
-  case TargetOpcode::G_FCONSTANT:
-  case TargetOpcode::G_CONSTANT: {
-    const bool isFP = Opcode == TargetOpcode::G_FCONSTANT;
-
-    const LLT s8 = LLT::scalar(8);
-    const LLT s16 = LLT::scalar(16);
-    const LLT s32 = LLT::scalar(32);
-    const LLT s64 = LLT::scalar(64);
-    const LLT p0 = LLT::pointer(0, 64);
-
-    const Register DefReg = I.getOperand(0).getReg();
-    const LLT DefTy = MRI.getType(DefReg);
-    const unsigned DefSize = DefTy.getSizeInBits();
-    const RegisterBank &RB = *RBI.getRegBank(DefReg, MRI, TRI);
-
-    // FIXME: Redundant check, but even less readable when factored out.
-    if (isFP) {
-      if (Ty != s32 && Ty != s64) {
-        LLVM_DEBUG(dbgs() << "Unable to materialize FP " << Ty
-                          << " constant, expected: " << s32 << " or " << s64
-                          << '\n');
-        return false;
-      }
-
-      if (RB.getID() != AArch64::FPRRegBankID) {
-        LLVM_DEBUG(dbgs() << "Unable to materialize FP " << Ty
-                          << " constant on bank: " << RB
-                          << ", expected: FPR\n");
-        return false;
-      }
-
-      // The case when we have 0.0 is covered by tablegen. Reject it here so we
-      // can be sure tablegen works correctly and isn't rescued by this code.
-      if (I.getOperand(1).getFPImm()->getValueAPF().isExactlyValue(0.0))
-        return false;
-    } else {
-      // s32 and s64 are covered by tablegen.
-      if (Ty != p0 && Ty != s8 && Ty != s16) {
-        LLVM_DEBUG(dbgs() << "Unable to materialize integer " << Ty
-                          << " constant, expected: " << s32 << ", " << s64
-                          << ", or " << p0 << '\n');
-        return false;
-      }
-
-      if (RB.getID() != AArch64::GPRRegBankID) {
-        LLVM_DEBUG(dbgs() << "Unable to materialize integer " << Ty
-                          << " constant on bank: " << RB
-                          << ", expected: GPR\n");
-        return false;
-      }
-    }
-
-    // We allow G_CONSTANT of types < 32b.
-    const unsigned MovOpc =
-        DefSize == 64 ? AArch64::MOVi64imm : AArch64::MOVi32imm;
-
-    if (isFP) {
-      // Either emit a FMOV, or emit a copy to emit a normal mov.
-      const TargetRegisterClass &GPRRC =
-          DefSize == 32 ? AArch64::GPR32RegClass : AArch64::GPR64RegClass;
-      const TargetRegisterClass &FPRRC =
-          DefSize == 32 ? AArch64::FPR32RegClass : AArch64::FPR64RegClass;
-
-      // Can we use a FMOV instruction to represent the immediate?
-      if (emitFMovForFConstant(I, MRI))
-        return true;
-
-      // Nope. Emit a copy and use a normal mov instead.
-      const Register DefGPRReg = MRI.createVirtualRegister(&GPRRC);
-      MachineOperand &RegOp = I.getOperand(0);
-      RegOp.setReg(DefGPRReg);
-      MIB.setInsertPt(MIB.getMBB(), std::next(I.getIterator()));
-      MIB.buildCopy({DefReg}, {DefGPRReg});
-
-      if (!RBI.constrainGenericRegister(DefReg, FPRRC, MRI)) {
-        LLVM_DEBUG(dbgs() << "Failed to constrain G_FCONSTANT def operand\n");
-        return false;
-      }
-
-      MachineOperand &ImmOp = I.getOperand(1);
-      // FIXME: Is going through int64_t always correct?
-      ImmOp.ChangeToImmediate(
-          ImmOp.getFPImm()->getValueAPF().bitcastToAPInt().getZExtValue());
-    } else if (I.getOperand(1).isCImm()) {
-      uint64_t Val = I.getOperand(1).getCImm()->getZExtValue();
-      I.getOperand(1).ChangeToImmediate(Val);
-    } else if (I.getOperand(1).isImm()) {
-      uint64_t Val = I.getOperand(1).getImm();
-      I.getOperand(1).ChangeToImmediate(Val);
-    }
-
-    I.setDesc(TII.get(MovOpc));
-    constrainSelectedInstRegOperands(I, TII, TRI, RBI);
-    return true;
-  }
-  case TargetOpcode::G_EXTRACT: {
-    Register DstReg = I.getOperand(0).getReg();
-    Register SrcReg = I.getOperand(1).getReg();
-    LLT SrcTy = MRI.getType(SrcReg);
-    LLT DstTy = MRI.getType(DstReg);
-    (void)DstTy;
-    unsigned SrcSize = SrcTy.getSizeInBits();
-
-    if (SrcTy.getSizeInBits() > 64) {
-      // This should be an extract of an s128, which is like a vector extract.
-      if (SrcTy.getSizeInBits() != 128)
-        return false;
-      // Only support extracting 64 bits from an s128 at the moment.
-      if (DstTy.getSizeInBits() != 64)
-        return false;
-
-      const RegisterBank &SrcRB = *RBI.getRegBank(SrcReg, MRI, TRI);
-      const RegisterBank &DstRB = *RBI.getRegBank(DstReg, MRI, TRI);
-      // Check we have the right regbank always.
-      assert(SrcRB.getID() == AArch64::FPRRegBankID &&
-             DstRB.getID() == AArch64::FPRRegBankID &&
-             "Wrong extract regbank!");
-      (void)SrcRB;
-
-      // Emit the same code as a vector extract.
-      // Offset must be a multiple of 64.
-      unsigned Offset = I.getOperand(2).getImm();
-      if (Offset % 64 != 0)
-        return false;
-      unsigned LaneIdx = Offset / 64;
-      MachineIRBuilder MIB(I);
-      MachineInstr *Extract = emitExtractVectorElt(
-          DstReg, DstRB, LLT::scalar(64), SrcReg, LaneIdx, MIB);
-      if (!Extract)
-        return false;
-      I.eraseFromParent();
-      return true;
-    }
-
-    I.setDesc(TII.get(SrcSize == 64 ? AArch64::UBFMXri : AArch64::UBFMWri));
-    MachineInstrBuilder(MF, I).addImm(I.getOperand(2).getImm() +
-                                      Ty.getSizeInBits() - 1);
-
-    if (SrcSize < 64) {
-      assert(SrcSize == 32 && DstTy.getSizeInBits() == 16 &&
-             "unexpected G_EXTRACT types");
-      return constrainSelectedInstRegOperands(I, TII, TRI, RBI);
-    }
-
-    DstReg = MRI.createGenericVirtualRegister(LLT::scalar(64));
-    MIB.setInsertPt(MIB.getMBB(), std::next(I.getIterator()));
-    MIB.buildInstr(TargetOpcode::COPY, {I.getOperand(0).getReg()}, {})
-        .addReg(DstReg, 0, AArch64::sub_32);
-    RBI.constrainGenericRegister(I.getOperand(0).getReg(),
-                                 AArch64::GPR32RegClass, MRI);
-    I.getOperand(0).setReg(DstReg);
-
-    return constrainSelectedInstRegOperands(I, TII, TRI, RBI);
-  }
-
-  case TargetOpcode::G_INSERT: {
-    LLT SrcTy = MRI.getType(I.getOperand(2).getReg());
-    LLT DstTy = MRI.getType(I.getOperand(0).getReg());
-    unsigned DstSize = DstTy.getSizeInBits();
-    // Larger inserts are vectors, same-size ones should be something else by
-    // now (split up or turned into COPYs).
-    if (Ty.getSizeInBits() > 64 || SrcTy.getSizeInBits() > 32)
-      return false;
-
-    I.setDesc(TII.get(DstSize == 64 ? AArch64::BFMXri : AArch64::BFMWri));
-    unsigned LSB = I.getOperand(3).getImm();
-    unsigned Width = MRI.getType(I.getOperand(2).getReg()).getSizeInBits();
-    I.getOperand(3).setImm((DstSize - LSB) % DstSize);
-    MachineInstrBuilder(MF, I).addImm(Width - 1);
-
-    if (DstSize < 64) {
-      assert(DstSize == 32 && SrcTy.getSizeInBits() == 16 &&
-             "unexpected G_INSERT types");
-      return constrainSelectedInstRegOperands(I, TII, TRI, RBI);
-    }
-
-    Register SrcReg = MRI.createGenericVirtualRegister(LLT::scalar(64));
-    BuildMI(MBB, I.getIterator(), I.getDebugLoc(),
-            TII.get(AArch64::SUBREG_TO_REG))
-        .addDef(SrcReg)
-        .addImm(0)
-        .addUse(I.getOperand(2).getReg())
-        .addImm(AArch64::sub_32);
-    RBI.constrainGenericRegister(I.getOperand(2).getReg(),
-                                 AArch64::GPR32RegClass, MRI);
-    I.getOperand(2).setReg(SrcReg);
-
-    return constrainSelectedInstRegOperands(I, TII, TRI, RBI);
-  }
-  case TargetOpcode::G_FRAME_INDEX: {
-    // allocas and G_FRAME_INDEX are only supported in addrspace(0).
-    if (Ty != LLT::pointer(0, 64)) {
-      LLVM_DEBUG(dbgs() << "G_FRAME_INDEX pointer has type: " << Ty
-                        << ", expected: " << LLT::pointer(0, 64) << '\n');
-      return false;
-    }
-    I.setDesc(TII.get(AArch64::ADDXri));
-
-    // MOs for a #0 shifted immediate.
-    I.addOperand(MachineOperand::CreateImm(0));
-    I.addOperand(MachineOperand::CreateImm(0));
-
-    return constrainSelectedInstRegOperands(I, TII, TRI, RBI);
-  }
-
-  case TargetOpcode::G_GLOBAL_VALUE: {
-    auto GV = I.getOperand(1).getGlobal();
-    if (GV->isThreadLocal())
-      return selectTLSGlobalValue(I, MRI);
-
-    unsigned OpFlags = STI.ClassifyGlobalReference(GV, TM);
-    if (OpFlags & AArch64II::MO_GOT) {
-      I.setDesc(TII.get(AArch64::LOADgot));
-      I.getOperand(1).setTargetFlags(OpFlags);
-    } else if (TM.getCodeModel() == CodeModel::Large) {
-      // Materialize the global using movz/movk instructions.
-      materializeLargeCMVal(I, GV, OpFlags);
-      I.eraseFromParent();
-      return true;
-    } else if (TM.getCodeModel() == CodeModel::Tiny) {
-      I.setDesc(TII.get(AArch64::ADR));
-      I.getOperand(1).setTargetFlags(OpFlags);
-    } else {
-      I.setDesc(TII.get(AArch64::MOVaddr));
-      I.getOperand(1).setTargetFlags(OpFlags | AArch64II::MO_PAGE);
-      MachineInstrBuilder MIB(MF, I);
-      MIB.addGlobalAddress(GV, I.getOperand(1).getOffset(),
-                           OpFlags | AArch64II::MO_PAGEOFF | AArch64II::MO_NC);
-    }
-    return constrainSelectedInstRegOperands(I, TII, TRI, RBI);
-  }
-
-  case TargetOpcode::G_ZEXTLOAD:
-  case TargetOpcode::G_LOAD:
-  case TargetOpcode::G_STORE: {
-    bool IsZExtLoad = I.getOpcode() == TargetOpcode::G_ZEXTLOAD;
-    MachineIRBuilder MIB(I);
-
-    LLT PtrTy = MRI.getType(I.getOperand(1).getReg());
-
-    if (PtrTy != LLT::pointer(0, 64)) {
-      LLVM_DEBUG(dbgs() << "Load/Store pointer has type: " << PtrTy
-                        << ", expected: " << LLT::pointer(0, 64) << '\n');
-      return false;
-    }
-
-    auto &MemOp = **I.memoperands_begin();
-    if (MemOp.isAtomic()) {
-      // For now we just support s8 acquire loads to be able to compile stack
-      // protector code.
-      if (MemOp.getOrdering() == AtomicOrdering::Acquire &&
-          MemOp.getSize() == 1) {
-        I.setDesc(TII.get(AArch64::LDARB));
-        return constrainSelectedInstRegOperands(I, TII, TRI, RBI);
-      }
-      LLVM_DEBUG(dbgs() << "Atomic load/store not fully supported yet\n");
-      return false;
-    }
-    unsigned MemSizeInBits = MemOp.getSize() * 8;
-
-    const Register PtrReg = I.getOperand(1).getReg();
-#ifndef NDEBUG
-    const RegisterBank &PtrRB = *RBI.getRegBank(PtrReg, MRI, TRI);
-    // Sanity-check the pointer register.
-    assert(PtrRB.getID() == AArch64::GPRRegBankID &&
-           "Load/Store pointer operand isn't a GPR");
-    assert(MRI.getType(PtrReg).isPointer() &&
-           "Load/Store pointer operand isn't a pointer");
-#endif
-
-    const Register ValReg = I.getOperand(0).getReg();
-    const RegisterBank &RB = *RBI.getRegBank(ValReg, MRI, TRI);
-
-    const unsigned NewOpc =
-        selectLoadStoreUIOp(I.getOpcode(), RB.getID(), MemSizeInBits);
-    if (NewOpc == I.getOpcode())
-      return false;
-
-    I.setDesc(TII.get(NewOpc));
-
-    uint64_t Offset = 0;
-    auto *PtrMI = MRI.getVRegDef(PtrReg);
-
-    // Try to fold a GEP into our unsigned immediate addressing mode.
-    if (PtrMI->getOpcode() == TargetOpcode::G_PTR_ADD) {
-      if (auto COff = getConstantVRegVal(PtrMI->getOperand(2).getReg(), MRI)) {
-        int64_t Imm = *COff;
-        const unsigned Size = MemSizeInBits / 8;
-        const unsigned Scale = Log2_32(Size);
-        if ((Imm & (Size - 1)) == 0 && Imm >= 0 && Imm < (0x1000 << Scale)) {
-          Register Ptr2Reg = PtrMI->getOperand(1).getReg();
-          I.getOperand(1).setReg(Ptr2Reg);
-          PtrMI = MRI.getVRegDef(Ptr2Reg);
-          Offset = Imm / Size;
-        }
-      }
-    }
-
-    // If we haven't folded anything into our addressing mode yet, try to fold
-    // a frame index into the base+offset.
-    if (!Offset && PtrMI->getOpcode() == TargetOpcode::G_FRAME_INDEX)
-      I.getOperand(1).ChangeToFrameIndex(PtrMI->getOperand(1).getIndex());
-
-    I.addOperand(MachineOperand::CreateImm(Offset));
-
-    // If we're storing a 0, use WZR/XZR.
-    if (auto CVal = getConstantVRegVal(ValReg, MRI)) {
-      if (*CVal == 0 && Opcode == TargetOpcode::G_STORE) {
-        if (I.getOpcode() == AArch64::STRWui)
-          I.getOperand(0).setReg(AArch64::WZR);
-        else if (I.getOpcode() == AArch64::STRXui)
-          I.getOperand(0).setReg(AArch64::XZR);
-      }
-    }
-
-    if (IsZExtLoad) {
-      // The zextload from a smaller type to i32 should be handled by the importer.
-      if (MRI.getType(ValReg).getSizeInBits() != 64)
-        return false;
-      // If we have a ZEXTLOAD then change the load's type to be a narrower reg
-      //and zero_extend with SUBREG_TO_REG.
-      Register LdReg = MRI.createVirtualRegister(&AArch64::GPR32RegClass);
-      Register DstReg = I.getOperand(0).getReg();
-      I.getOperand(0).setReg(LdReg);
-
-      MIB.setInsertPt(MIB.getMBB(), std::next(I.getIterator()));
-      MIB.buildInstr(AArch64::SUBREG_TO_REG, {DstReg}, {})
-          .addImm(0)
-          .addUse(LdReg)
-          .addImm(AArch64::sub_32);
-      constrainSelectedInstRegOperands(I, TII, TRI, RBI);
-      return RBI.constrainGenericRegister(DstReg, AArch64::GPR64allRegClass,
-                                          MRI);
-    }
-    return constrainSelectedInstRegOperands(I, TII, TRI, RBI);
-  }
-
-  case TargetOpcode::G_SMULH:
-  case TargetOpcode::G_UMULH: {
-    // Reject the various things we don't support yet.
-    if (unsupportedBinOp(I, RBI, MRI, TRI))
-      return false;
-
-    const Register DefReg = I.getOperand(0).getReg();
-    const RegisterBank &RB = *RBI.getRegBank(DefReg, MRI, TRI);
-
-    if (RB.getID() != AArch64::GPRRegBankID) {
-      LLVM_DEBUG(dbgs() << "G_[SU]MULH on bank: " << RB << ", expected: GPR\n");
-      return false;
-    }
-
-    if (Ty != LLT::scalar(64)) {
-      LLVM_DEBUG(dbgs() << "G_[SU]MULH has type: " << Ty
-                        << ", expected: " << LLT::scalar(64) << '\n');
-      return false;
-    }
-
-    unsigned NewOpc = I.getOpcode() == TargetOpcode::G_SMULH ? AArch64::SMULHrr
-                                                             : AArch64::UMULHrr;
-    I.setDesc(TII.get(NewOpc));
-
-    // Now that we selected an opcode, we need to constrain the register
-    // operands to use appropriate classes.
-    return constrainSelectedInstRegOperands(I, TII, TRI, RBI);
-  }
-  case TargetOpcode::G_FADD:
-  case TargetOpcode::G_FSUB:
-  case TargetOpcode::G_FMUL:
-  case TargetOpcode::G_FDIV:
-
-  case TargetOpcode::G_ASHR:
-    if (MRI.getType(I.getOperand(0).getReg()).isVector())
-      return selectVectorASHR(I, MRI);
-    LLVM_FALLTHROUGH;
-  case TargetOpcode::G_SHL:
-    if (Opcode == TargetOpcode::G_SHL &&
-        MRI.getType(I.getOperand(0).getReg()).isVector())
-      return selectVectorSHL(I, MRI);
-    LLVM_FALLTHROUGH;
-  case TargetOpcode::G_OR:
-  case TargetOpcode::G_LSHR: {
-    // Reject the various things we don't support yet.
-    if (unsupportedBinOp(I, RBI, MRI, TRI))
-      return false;
-
-    const unsigned OpSize = Ty.getSizeInBits();
-
-    const Register DefReg = I.getOperand(0).getReg();
-    const RegisterBank &RB = *RBI.getRegBank(DefReg, MRI, TRI);
-
-    const unsigned NewOpc = selectBinaryOp(I.getOpcode(), RB.getID(), OpSize);
-    if (NewOpc == I.getOpcode())
-      return false;
-
-    I.setDesc(TII.get(NewOpc));
-    // FIXME: Should the type be always reset in setDesc?
-
-    // Now that we selected an opcode, we need to constrain the register
-    // operands to use appropriate classes.
-    return constrainSelectedInstRegOperands(I, TII, TRI, RBI);
-  }
-
-  case TargetOpcode::G_PTR_ADD: {
-    MachineIRBuilder MIRBuilder(I);
-    emitADD(I.getOperand(0).getReg(), I.getOperand(1), I.getOperand(2),
-            MIRBuilder);
-    I.eraseFromParent();
-    return true;
-  }
-  case TargetOpcode::G_UADDO: {
-    // TODO: Support other types.
-    unsigned OpSize = Ty.getSizeInBits();
-    if (OpSize != 32 && OpSize != 64) {
-      LLVM_DEBUG(
-          dbgs()
-          << "G_UADDO currently only supported for 32 and 64 b types.\n");
-      return false;
-    }
-
-    // TODO: Support vectors.
-    if (Ty.isVector()) {
-      LLVM_DEBUG(dbgs() << "G_UADDO currently only supported for scalars.\n");
-      return false;
-    }
-
-    // Add and set the set condition flag.
-    unsigned AddsOpc = OpSize == 32 ? AArch64::ADDSWrr : AArch64::ADDSXrr;
-    MachineIRBuilder MIRBuilder(I);
-    auto AddsMI = MIRBuilder.buildInstr(
-        AddsOpc, {I.getOperand(0).getReg()},
-        {I.getOperand(2).getReg(), I.getOperand(3).getReg()});
-    constrainSelectedInstRegOperands(*AddsMI, TII, TRI, RBI);
-
-    // Now, put the overflow result in the register given by the first operand
-    // to the G_UADDO. CSINC increments the result when the predicate is false,
-    // so to get the increment when it's true, we need to use the inverse. In
-    // this case, we want to increment when carry is set.
-    auto CsetMI = MIRBuilder
-                      .buildInstr(AArch64::CSINCWr, {I.getOperand(1).getReg()},
-                                  {Register(AArch64::WZR), Register(AArch64::WZR)})
-                      .addImm(getInvertedCondCode(AArch64CC::HS));
-    constrainSelectedInstRegOperands(*CsetMI, TII, TRI, RBI);
-    I.eraseFromParent();
-    return true;
-  }
-
-  case TargetOpcode::G_PTR_MASK: {
-    uint64_t Align = I.getOperand(2).getImm();
-    if (Align >= 64 || Align == 0)
-      return false;
-
-    uint64_t Mask = ~((1ULL << Align) - 1);
-    I.setDesc(TII.get(AArch64::ANDXri));
-    I.getOperand(2).setImm(AArch64_AM::encodeLogicalImmediate(Mask, 64));
-
-    return constrainSelectedInstRegOperands(I, TII, TRI, RBI);
-  }
-  case TargetOpcode::G_PTRTOINT:
-  case TargetOpcode::G_TRUNC: {
-    const LLT DstTy = MRI.getType(I.getOperand(0).getReg());
-    const LLT SrcTy = MRI.getType(I.getOperand(1).getReg());
-
-    const Register DstReg = I.getOperand(0).getReg();
-    const Register SrcReg = I.getOperand(1).getReg();
-
-    const RegisterBank &DstRB = *RBI.getRegBank(DstReg, MRI, TRI);
-    const RegisterBank &SrcRB = *RBI.getRegBank(SrcReg, MRI, TRI);
-
-    if (DstRB.getID() != SrcRB.getID()) {
-      LLVM_DEBUG(
-          dbgs() << "G_TRUNC/G_PTRTOINT input/output on different banks\n");
-      return false;
-    }
-
-    if (DstRB.getID() == AArch64::GPRRegBankID) {
-      const TargetRegisterClass *DstRC =
-          getRegClassForTypeOnBank(DstTy, DstRB, RBI);
-      if (!DstRC)
-        return false;
-
-      const TargetRegisterClass *SrcRC =
-          getRegClassForTypeOnBank(SrcTy, SrcRB, RBI);
-      if (!SrcRC)
-        return false;
-
-      if (!RBI.constrainGenericRegister(SrcReg, *SrcRC, MRI) ||
-          !RBI.constrainGenericRegister(DstReg, *DstRC, MRI)) {
-        LLVM_DEBUG(dbgs() << "Failed to constrain G_TRUNC/G_PTRTOINT\n");
-        return false;
-      }
-
-      if (DstRC == SrcRC) {
-        // Nothing to be done
-      } else if (Opcode == TargetOpcode::G_TRUNC && DstTy == LLT::scalar(32) &&
-                 SrcTy == LLT::scalar(64)) {
-        llvm_unreachable("TableGen can import this case");
-        return false;
-      } else if (DstRC == &AArch64::GPR32RegClass &&
-                 SrcRC == &AArch64::GPR64RegClass) {
-        I.getOperand(1).setSubReg(AArch64::sub_32);
-      } else {
-        LLVM_DEBUG(
-            dbgs() << "Unhandled mismatched classes in G_TRUNC/G_PTRTOINT\n");
-        return false;
-      }
-
-      I.setDesc(TII.get(TargetOpcode::COPY));
-      return true;
-    } else if (DstRB.getID() == AArch64::FPRRegBankID) {
-      if (DstTy == LLT::vector(4, 16) && SrcTy == LLT::vector(4, 32)) {
-        I.setDesc(TII.get(AArch64::XTNv4i16));
-        constrainSelectedInstRegOperands(I, TII, TRI, RBI);
-        return true;
-      }
-
-      if (!SrcTy.isVector() && SrcTy.getSizeInBits() == 128) {
-        MachineIRBuilder MIB(I);
-        MachineInstr *Extract = emitExtractVectorElt(
-            DstReg, DstRB, LLT::scalar(DstTy.getSizeInBits()), SrcReg, 0, MIB);
-        if (!Extract)
-          return false;
-        I.eraseFromParent();
-        return true;
-      }
-    }
-
-    return false;
-  }
-
-  case TargetOpcode::G_ANYEXT: {
-    const Register DstReg = I.getOperand(0).getReg();
-    const Register SrcReg = I.getOperand(1).getReg();
-
-    const RegisterBank &RBDst = *RBI.getRegBank(DstReg, MRI, TRI);
-    if (RBDst.getID() != AArch64::GPRRegBankID) {
-      LLVM_DEBUG(dbgs() << "G_ANYEXT on bank: " << RBDst
-                        << ", expected: GPR\n");
-      return false;
-    }
-
-    const RegisterBank &RBSrc = *RBI.getRegBank(SrcReg, MRI, TRI);
-    if (RBSrc.getID() != AArch64::GPRRegBankID) {
-      LLVM_DEBUG(dbgs() << "G_ANYEXT on bank: " << RBSrc
-                        << ", expected: GPR\n");
-      return false;
-    }
-
-    const unsigned DstSize = MRI.getType(DstReg).getSizeInBits();
-
-    if (DstSize == 0) {
-      LLVM_DEBUG(dbgs() << "G_ANYEXT operand has no size, not a gvreg?\n");
-      return false;
-    }
-
-    if (DstSize != 64 && DstSize > 32) {
-      LLVM_DEBUG(dbgs() << "G_ANYEXT to size: " << DstSize
-                        << ", expected: 32 or 64\n");
-      return false;
-    }
-    // At this point G_ANYEXT is just like a plain COPY, but we need
-    // to explicitly form the 64-bit value if any.
-    if (DstSize > 32) {
-      Register ExtSrc = MRI.createVirtualRegister(&AArch64::GPR64allRegClass);
-      BuildMI(MBB, I, I.getDebugLoc(), TII.get(AArch64::SUBREG_TO_REG))
-          .addDef(ExtSrc)
-          .addImm(0)
-          .addUse(SrcReg)
-          .addImm(AArch64::sub_32);
-      I.getOperand(1).setReg(ExtSrc);
-    }
-    return selectCopy(I, TII, MRI, TRI, RBI);
-  }
-
-  case TargetOpcode::G_ZEXT:
-  case TargetOpcode::G_SEXT: {
-    unsigned Opcode = I.getOpcode();
-    const bool IsSigned = Opcode == TargetOpcode::G_SEXT;
-    const Register DefReg = I.getOperand(0).getReg();
-    const Register SrcReg = I.getOperand(1).getReg();
-    const LLT DstTy = MRI.getType(DefReg);
-    const LLT SrcTy = MRI.getType(SrcReg);
-    unsigned DstSize = DstTy.getSizeInBits();
-    unsigned SrcSize = SrcTy.getSizeInBits();
-
-    if (DstTy.isVector())
-      return false; // Should be handled by imported patterns.
-
-    assert((*RBI.getRegBank(DefReg, MRI, TRI)).getID() ==
-               AArch64::GPRRegBankID &&
-           "Unexpected ext regbank");
-
-    MachineIRBuilder MIB(I);
-    MachineInstr *ExtI;
-
-    // First check if we're extending the result of a load which has a dest type
-    // smaller than 32 bits, then this zext is redundant. GPR32 is the smallest
-    // GPR register on AArch64 and all loads which are smaller automatically
-    // zero-extend the upper bits. E.g.
-    // %v(s8) = G_LOAD %p, :: (load 1)
-    // %v2(s32) = G_ZEXT %v(s8)
-    if (!IsSigned) {
-      auto *LoadMI = getOpcodeDef(TargetOpcode::G_LOAD, SrcReg, MRI);
-      if (LoadMI &&
-          RBI.getRegBank(SrcReg, MRI, TRI)->getID() == AArch64::GPRRegBankID) {
-        const MachineMemOperand *MemOp = *LoadMI->memoperands_begin();
-        unsigned BytesLoaded = MemOp->getSize();
-        if (BytesLoaded < 4 && SrcTy.getSizeInBytes() == BytesLoaded)
-          return selectCopy(I, TII, MRI, TRI, RBI);
-      }
-    }
-
-    if (DstSize == 64) {
-      // FIXME: Can we avoid manually doing this?
-      if (!RBI.constrainGenericRegister(SrcReg, AArch64::GPR32RegClass, MRI)) {
-        LLVM_DEBUG(dbgs() << "Failed to constrain " << TII.getName(Opcode)
-                          << " operand\n");
-        return false;
-      }
-
-      auto SubregToReg =
-          MIB.buildInstr(AArch64::SUBREG_TO_REG, {&AArch64::GPR64RegClass}, {})
-              .addImm(0)
-              .addUse(SrcReg)
-              .addImm(AArch64::sub_32);
-
-      ExtI = MIB.buildInstr(IsSigned ? AArch64::SBFMXri : AArch64::UBFMXri,
-                             {DefReg}, {SubregToReg})
-                  .addImm(0)
-                  .addImm(SrcSize - 1);
-    } else if (DstSize <= 32) {
-      ExtI = MIB.buildInstr(IsSigned ? AArch64::SBFMWri : AArch64::UBFMWri,
-                             {DefReg}, {SrcReg})
-                  .addImm(0)
-                  .addImm(SrcSize - 1);
-    } else {
-      return false;
-    }
-
-    constrainSelectedInstRegOperands(*ExtI, TII, TRI, RBI);
-    I.eraseFromParent();
-    return true;
-  }
-
-  case TargetOpcode::G_SITOFP:
-  case TargetOpcode::G_UITOFP:
-  case TargetOpcode::G_FPTOSI:
-  case TargetOpcode::G_FPTOUI: {
-    const LLT DstTy = MRI.getType(I.getOperand(0).getReg()),
-              SrcTy = MRI.getType(I.getOperand(1).getReg());
-    const unsigned NewOpc = selectFPConvOpc(Opcode, DstTy, SrcTy);
-    if (NewOpc == Opcode)
-      return false;
-
-    I.setDesc(TII.get(NewOpc));
-    constrainSelectedInstRegOperands(I, TII, TRI, RBI);
-
-    return true;
-  }
-
-
-  case TargetOpcode::G_INTTOPTR:
-    // The importer is currently unable to import pointer types since they
-    // didn't exist in SelectionDAG.
-    return selectCopy(I, TII, MRI, TRI, RBI);
-
-  case TargetOpcode::G_BITCAST:
-    // Imported SelectionDAG rules can handle every bitcast except those that
-    // bitcast from a type to the same type. Ideally, these shouldn't occur
-    // but we might not run an optimizer that deletes them. The other exception
-    // is bitcasts involving pointer types, as SelectionDAG has no knowledge
-    // of them.
-    return selectCopy(I, TII, MRI, TRI, RBI);
-
-  case TargetOpcode::G_SELECT: {
-    if (MRI.getType(I.getOperand(1).getReg()) != LLT::scalar(1)) {
-      LLVM_DEBUG(dbgs() << "G_SELECT cond has type: " << Ty
-                        << ", expected: " << LLT::scalar(1) << '\n');
-      return false;
-    }
-
-    const Register CondReg = I.getOperand(1).getReg();
-    const Register TReg = I.getOperand(2).getReg();
-    const Register FReg = I.getOperand(3).getReg();
-
-    if (tryOptSelect(I))
-      return true;
-
-    Register CSelOpc = selectSelectOpc(I, MRI, RBI);
-    MachineInstr &TstMI =
-        *BuildMI(MBB, I, I.getDebugLoc(), TII.get(AArch64::ANDSWri))
-             .addDef(AArch64::WZR)
-             .addUse(CondReg)
-             .addImm(AArch64_AM::encodeLogicalImmediate(1, 32));
-
-    MachineInstr &CSelMI = *BuildMI(MBB, I, I.getDebugLoc(), TII.get(CSelOpc))
-                                .addDef(I.getOperand(0).getReg())
-                                .addUse(TReg)
-                                .addUse(FReg)
-                                .addImm(AArch64CC::NE);
-
-    constrainSelectedInstRegOperands(TstMI, TII, TRI, RBI);
-    constrainSelectedInstRegOperands(CSelMI, TII, TRI, RBI);
-
-    I.eraseFromParent();
-    return true;
-  }
-  case TargetOpcode::G_ICMP: {
-    if (Ty.isVector())
-      return selectVectorICmp(I, MRI);
-
-    if (Ty != LLT::scalar(32)) {
-      LLVM_DEBUG(dbgs() << "G_ICMP result has type: " << Ty
-                        << ", expected: " << LLT::scalar(32) << '\n');
-      return false;
-    }
-
-    MachineIRBuilder MIRBuilder(I);
-    if (!emitIntegerCompare(I.getOperand(2), I.getOperand(3), I.getOperand(1),
-                            MIRBuilder))
-      return false;
-    emitCSetForICMP(I.getOperand(0).getReg(), I.getOperand(1).getPredicate(),
-                    MIRBuilder);
-    I.eraseFromParent();
-    return true;
-  }
-
-  case TargetOpcode::G_FCMP: {
-    if (Ty != LLT::scalar(32)) {
-      LLVM_DEBUG(dbgs() << "G_FCMP result has type: " << Ty
-                        << ", expected: " << LLT::scalar(32) << '\n');
-      return false;
-    }
-
-    unsigned CmpOpc = selectFCMPOpc(I, MRI);
-    if (!CmpOpc)
-      return false;
-
-    // FIXME: regbank
-
-    AArch64CC::CondCode CC1, CC2;
-    changeFCMPPredToAArch64CC(
-        (CmpInst::Predicate)I.getOperand(1).getPredicate(), CC1, CC2);
-
-    // Partially build the compare. Decide if we need to add a use for the
-    // third operand based off whether or not we're comparing against 0.0.
-    auto CmpMI = BuildMI(MBB, I, I.getDebugLoc(), TII.get(CmpOpc))
-                     .addUse(I.getOperand(2).getReg());
-
-    // If we don't have an immediate compare, then we need to add a use of the
-    // register which wasn't used for the immediate.
-    // Note that the immediate will always be the last operand.
-    if (CmpOpc != AArch64::FCMPSri && CmpOpc != AArch64::FCMPDri)
-      CmpMI = CmpMI.addUse(I.getOperand(3).getReg());
-
-    const Register DefReg = I.getOperand(0).getReg();
-    Register Def1Reg = DefReg;
-    if (CC2 != AArch64CC::AL)
-      Def1Reg = MRI.createVirtualRegister(&AArch64::GPR32RegClass);
-
-    MachineInstr &CSetMI =
-        *BuildMI(MBB, I, I.getDebugLoc(), TII.get(AArch64::CSINCWr))
-             .addDef(Def1Reg)
-             .addUse(AArch64::WZR)
-             .addUse(AArch64::WZR)
-             .addImm(getInvertedCondCode(CC1));
-
-    if (CC2 != AArch64CC::AL) {
-      Register Def2Reg = MRI.createVirtualRegister(&AArch64::GPR32RegClass);
-      MachineInstr &CSet2MI =
-          *BuildMI(MBB, I, I.getDebugLoc(), TII.get(AArch64::CSINCWr))
-               .addDef(Def2Reg)
-               .addUse(AArch64::WZR)
-               .addUse(AArch64::WZR)
-               .addImm(getInvertedCondCode(CC2));
-      MachineInstr &OrMI =
-          *BuildMI(MBB, I, I.getDebugLoc(), TII.get(AArch64::ORRWrr))
-               .addDef(DefReg)
-               .addUse(Def1Reg)
-               .addUse(Def2Reg);
-      constrainSelectedInstRegOperands(OrMI, TII, TRI, RBI);
-      constrainSelectedInstRegOperands(CSet2MI, TII, TRI, RBI);
-    }
-    constrainSelectedInstRegOperands(*CmpMI, TII, TRI, RBI);
-    constrainSelectedInstRegOperands(CSetMI, TII, TRI, RBI);
-
-    I.eraseFromParent();
-    return true;
-  }
-  case TargetOpcode::G_VASTART:
-    return STI.isTargetDarwin() ? selectVaStartDarwin(I, MF, MRI)
-                                : selectVaStartAAPCS(I, MF, MRI);
-  case TargetOpcode::G_INTRINSIC:
-    return selectIntrinsic(I, MRI);
-  case TargetOpcode::G_INTRINSIC_W_SIDE_EFFECTS:
-    return selectIntrinsicWithSideEffects(I, MRI);
-  case TargetOpcode::G_IMPLICIT_DEF: {
-    I.setDesc(TII.get(TargetOpcode::IMPLICIT_DEF));
-    const LLT DstTy = MRI.getType(I.getOperand(0).getReg());
-    const Register DstReg = I.getOperand(0).getReg();
-    const RegisterBank &DstRB = *RBI.getRegBank(DstReg, MRI, TRI);
-    const TargetRegisterClass *DstRC =
-        getRegClassForTypeOnBank(DstTy, DstRB, RBI);
-    RBI.constrainGenericRegister(DstReg, *DstRC, MRI);
-    return true;
-  }
-  case TargetOpcode::G_BLOCK_ADDR: {
-    if (TM.getCodeModel() == CodeModel::Large) {
-      materializeLargeCMVal(I, I.getOperand(1).getBlockAddress(), 0);
-      I.eraseFromParent();
-      return true;
-    } else {
-      I.setDesc(TII.get(AArch64::MOVaddrBA));
-      auto MovMI = BuildMI(MBB, I, I.getDebugLoc(), TII.get(AArch64::MOVaddrBA),
-                           I.getOperand(0).getReg())
-                       .addBlockAddress(I.getOperand(1).getBlockAddress(),
-                                        /* Offset */ 0, AArch64II::MO_PAGE)
-                       .addBlockAddress(
-                           I.getOperand(1).getBlockAddress(), /* Offset */ 0,
-                           AArch64II::MO_NC | AArch64II::MO_PAGEOFF);
-      I.eraseFromParent();
-      return constrainSelectedInstRegOperands(*MovMI, TII, TRI, RBI);
-    }
-  }
-  case TargetOpcode::G_INTRINSIC_TRUNC:
-    return selectIntrinsicTrunc(I, MRI);
-  case TargetOpcode::G_INTRINSIC_ROUND:
-    return selectIntrinsicRound(I, MRI);
-  case TargetOpcode::G_BUILD_VECTOR:
-    return selectBuildVector(I, MRI);
-  case TargetOpcode::G_MERGE_VALUES:
-    return selectMergeValues(I, MRI);
-  case TargetOpcode::G_UNMERGE_VALUES:
-    return selectUnmergeValues(I, MRI);
-  case TargetOpcode::G_SHUFFLE_VECTOR:
-    return selectShuffleVector(I, MRI);
-  case TargetOpcode::G_EXTRACT_VECTOR_ELT:
-    return selectExtractElt(I, MRI);
-  case TargetOpcode::G_INSERT_VECTOR_ELT:
-    return selectInsertElt(I, MRI);
-  case TargetOpcode::G_CONCAT_VECTORS:
-    return selectConcatVectors(I, MRI);
-  case TargetOpcode::G_JUMP_TABLE:
-    return selectJumpTable(I, MRI);
-  }
-
-  return false;
-}
-
-bool AArch64InstructionSelector::selectBrJT(MachineInstr &I,
-                                            MachineRegisterInfo &MRI) const {
-  assert(I.getOpcode() == TargetOpcode::G_BRJT && "Expected G_BRJT");
-  Register JTAddr = I.getOperand(0).getReg();
-  unsigned JTI = I.getOperand(1).getIndex();
-  Register Index = I.getOperand(2).getReg();
-  MachineIRBuilder MIB(I);
-
-  Register TargetReg = MRI.createVirtualRegister(&AArch64::GPR64RegClass);
-  Register ScratchReg = MRI.createVirtualRegister(&AArch64::GPR64spRegClass);
-  MIB.buildInstr(AArch64::JumpTableDest32, {TargetReg, ScratchReg},
-                 {JTAddr, Index})
-      .addJumpTableIndex(JTI);
-
-  // Build the indirect branch.
-  MIB.buildInstr(AArch64::BR, {}, {TargetReg});
-  I.eraseFromParent();
-  return true;
-}
-
-bool AArch64InstructionSelector::selectJumpTable(
-    MachineInstr &I, MachineRegisterInfo &MRI) const {
-  assert(I.getOpcode() == TargetOpcode::G_JUMP_TABLE && "Expected jump table");
-  assert(I.getOperand(1).isJTI() && "Jump table op should have a JTI!");
-
-  Register DstReg = I.getOperand(0).getReg();
-  unsigned JTI = I.getOperand(1).getIndex();
-  // We generate a MOVaddrJT which will get expanded to an ADRP + ADD later.
-  MachineIRBuilder MIB(I);
-  auto MovMI =
-    MIB.buildInstr(AArch64::MOVaddrJT, {DstReg}, {})
-          .addJumpTableIndex(JTI, AArch64II::MO_PAGE)
-          .addJumpTableIndex(JTI, AArch64II::MO_NC | AArch64II::MO_PAGEOFF);
-  I.eraseFromParent();
-  return constrainSelectedInstRegOperands(*MovMI, TII, TRI, RBI);
-}
-
-bool AArch64InstructionSelector::selectTLSGlobalValue(
-    MachineInstr &I, MachineRegisterInfo &MRI) const {
-  if (!STI.isTargetMachO())
-    return false;
-  MachineFunction &MF = *I.getParent()->getParent();
-  MF.getFrameInfo().setAdjustsStack(true);
-
-  const GlobalValue &GV = *I.getOperand(1).getGlobal();
-  MachineIRBuilder MIB(I);
-
-  MIB.buildInstr(AArch64::LOADgot, {AArch64::X0}, {})
-      .addGlobalAddress(&GV, 0, AArch64II::MO_TLS);
-
-  auto Load = MIB.buildInstr(AArch64::LDRXui, {&AArch64::GPR64commonRegClass},
-                             {Register(AArch64::X0)})
-                  .addImm(0);
-
-  // TLS calls preserve all registers except those that absolutely must be
-  // trashed: X0 (it takes an argument), LR (it's a call) and NZCV (let's not be
-  // silly).
-  MIB.buildInstr(AArch64::BLR, {}, {Load})
-      .addDef(AArch64::X0, RegState::Implicit)
-      .addRegMask(TRI.getTLSCallPreservedMask());
-
-  MIB.buildCopy(I.getOperand(0).getReg(), Register(AArch64::X0));
-  RBI.constrainGenericRegister(I.getOperand(0).getReg(), AArch64::GPR64RegClass,
-                               MRI);
-  I.eraseFromParent();
-  return true;
-}
-
-bool AArch64InstructionSelector::selectIntrinsicTrunc(
-    MachineInstr &I, MachineRegisterInfo &MRI) const {
-  const LLT SrcTy = MRI.getType(I.getOperand(0).getReg());
-
-  // Select the correct opcode.
-  unsigned Opc = 0;
-  if (!SrcTy.isVector()) {
-    switch (SrcTy.getSizeInBits()) {
-    default:
-    case 16:
-      Opc = AArch64::FRINTZHr;
-      break;
-    case 32:
-      Opc = AArch64::FRINTZSr;
-      break;
-    case 64:
-      Opc = AArch64::FRINTZDr;
-      break;
-    }
-  } else {
-    unsigned NumElts = SrcTy.getNumElements();
-    switch (SrcTy.getElementType().getSizeInBits()) {
-    default:
-      break;
-    case 16:
-      if (NumElts == 4)
-        Opc = AArch64::FRINTZv4f16;
-      else if (NumElts == 8)
-        Opc = AArch64::FRINTZv8f16;
-      break;
-    case 32:
-      if (NumElts == 2)
-        Opc = AArch64::FRINTZv2f32;
-      else if (NumElts == 4)
-        Opc = AArch64::FRINTZv4f32;
-      break;
-    case 64:
-      if (NumElts == 2)
-        Opc = AArch64::FRINTZv2f64;
-      break;
-    }
-  }
-
-  if (!Opc) {
-    // Didn't get an opcode above, bail.
-    LLVM_DEBUG(dbgs() << "Unsupported type for G_INTRINSIC_TRUNC!\n");
-    return false;
-  }
-
-  // Legalization would have set us up perfectly for this; we just need to
-  // set the opcode and move on.
-  I.setDesc(TII.get(Opc));
-  return constrainSelectedInstRegOperands(I, TII, TRI, RBI);
-}
-
-bool AArch64InstructionSelector::selectIntrinsicRound(
-    MachineInstr &I, MachineRegisterInfo &MRI) const {
-  const LLT SrcTy = MRI.getType(I.getOperand(0).getReg());
-
-  // Select the correct opcode.
-  unsigned Opc = 0;
-  if (!SrcTy.isVector()) {
-    switch (SrcTy.getSizeInBits()) {
-    default:
-    case 16:
-      Opc = AArch64::FRINTAHr;
-      break;
-    case 32:
-      Opc = AArch64::FRINTASr;
-      break;
-    case 64:
-      Opc = AArch64::FRINTADr;
-      break;
-    }
-  } else {
-    unsigned NumElts = SrcTy.getNumElements();
-    switch (SrcTy.getElementType().getSizeInBits()) {
-    default:
-      break;
-    case 16:
-      if (NumElts == 4)
-        Opc = AArch64::FRINTAv4f16;
-      else if (NumElts == 8)
-        Opc = AArch64::FRINTAv8f16;
-      break;
-    case 32:
-      if (NumElts == 2)
-        Opc = AArch64::FRINTAv2f32;
-      else if (NumElts == 4)
-        Opc = AArch64::FRINTAv4f32;
-      break;
-    case 64:
-      if (NumElts == 2)
-        Opc = AArch64::FRINTAv2f64;
-      break;
-    }
-  }
-
-  if (!Opc) {
-    // Didn't get an opcode above, bail.
-    LLVM_DEBUG(dbgs() << "Unsupported type for G_INTRINSIC_ROUND!\n");
-    return false;
-  }
-
-  // Legalization would have set us up perfectly for this; we just need to
-  // set the opcode and move on.
-  I.setDesc(TII.get(Opc));
-  return constrainSelectedInstRegOperands(I, TII, TRI, RBI);
-}
-
-bool AArch64InstructionSelector::selectVectorICmp(
-    MachineInstr &I, MachineRegisterInfo &MRI) const {
-  Register DstReg = I.getOperand(0).getReg();
-  LLT DstTy = MRI.getType(DstReg);
-  Register SrcReg = I.getOperand(2).getReg();
-  Register Src2Reg = I.getOperand(3).getReg();
-  LLT SrcTy = MRI.getType(SrcReg);
-
-  unsigned SrcEltSize = SrcTy.getElementType().getSizeInBits();
-  unsigned NumElts = DstTy.getNumElements();
-
-  // First index is element size, 0 == 8b, 1 == 16b, 2 == 32b, 3 == 64b
-  // Second index is num elts, 0 == v2, 1 == v4, 2 == v8, 3 == v16
-  // Third index is cc opcode:
-  // 0 == eq
-  // 1 == ugt
-  // 2 == uge
-  // 3 == ult
-  // 4 == ule
-  // 5 == sgt
-  // 6 == sge
-  // 7 == slt
-  // 8 == sle
-  // ne is done by negating 'eq' result.
-
-  // This table below assumes that for some comparisons the operands will be
-  // commuted.
-  // ult op == commute + ugt op
-  // ule op == commute + uge op
-  // slt op == commute + sgt op
-  // sle op == commute + sge op
-  unsigned PredIdx = 0;
-  bool SwapOperands = false;
-  CmpInst::Predicate Pred = (CmpInst::Predicate)I.getOperand(1).getPredicate();
-  switch (Pred) {
-  case CmpInst::ICMP_NE:
-  case CmpInst::ICMP_EQ:
-    PredIdx = 0;
-    break;
-  case CmpInst::ICMP_UGT:
-    PredIdx = 1;
-    break;
-  case CmpInst::ICMP_UGE:
-    PredIdx = 2;
-    break;
-  case CmpInst::ICMP_ULT:
-    PredIdx = 3;
-    SwapOperands = true;
-    break;
-  case CmpInst::ICMP_ULE:
-    PredIdx = 4;
-    SwapOperands = true;
-    break;
-  case CmpInst::ICMP_SGT:
-    PredIdx = 5;
-    break;
-  case CmpInst::ICMP_SGE:
-    PredIdx = 6;
-    break;
-  case CmpInst::ICMP_SLT:
-    PredIdx = 7;
-    SwapOperands = true;
-    break;
-  case CmpInst::ICMP_SLE:
-    PredIdx = 8;
-    SwapOperands = true;
-    break;
-  default:
-    llvm_unreachable("Unhandled icmp predicate");
-    return false;
-  }
-
-  // This table obviously should be tablegen'd when we have our GISel native
-  // tablegen selector.
-
-  static const unsigned OpcTable[4][4][9] = {
-      {
-          {0 /* invalid */, 0 /* invalid */, 0 /* invalid */, 0 /* invalid */,
-           0 /* invalid */, 0 /* invalid */, 0 /* invalid */, 0 /* invalid */,
-           0 /* invalid */},
-          {0 /* invalid */, 0 /* invalid */, 0 /* invalid */, 0 /* invalid */,
-           0 /* invalid */, 0 /* invalid */, 0 /* invalid */, 0 /* invalid */,
-           0 /* invalid */},
-          {AArch64::CMEQv8i8, AArch64::CMHIv8i8, AArch64::CMHSv8i8,
-           AArch64::CMHIv8i8, AArch64::CMHSv8i8, AArch64::CMGTv8i8,
-           AArch64::CMGEv8i8, AArch64::CMGTv8i8, AArch64::CMGEv8i8},
-          {AArch64::CMEQv16i8, AArch64::CMHIv16i8, AArch64::CMHSv16i8,
-           AArch64::CMHIv16i8, AArch64::CMHSv16i8, AArch64::CMGTv16i8,
-           AArch64::CMGEv16i8, AArch64::CMGTv16i8, AArch64::CMGEv16i8}
-      },
-      {
-          {0 /* invalid */, 0 /* invalid */, 0 /* invalid */, 0 /* invalid */,
-           0 /* invalid */, 0 /* invalid */, 0 /* invalid */, 0 /* invalid */,
-           0 /* invalid */},
-          {AArch64::CMEQv4i16, AArch64::CMHIv4i16, AArch64::CMHSv4i16,
-           AArch64::CMHIv4i16, AArch64::CMHSv4i16, AArch64::CMGTv4i16,
-           AArch64::CMGEv4i16, AArch64::CMGTv4i16, AArch64::CMGEv4i16},
-          {AArch64::CMEQv8i16, AArch64::CMHIv8i16, AArch64::CMHSv8i16,
-           AArch64::CMHIv8i16, AArch64::CMHSv8i16, AArch64::CMGTv8i16,
-           AArch64::CMGEv8i16, AArch64::CMGTv8i16, AArch64::CMGEv8i16},
-          {0 /* invalid */, 0 /* invalid */, 0 /* invalid */, 0 /* invalid */,
-           0 /* invalid */, 0 /* invalid */, 0 /* invalid */, 0 /* invalid */,
-           0 /* invalid */}
-      },
-      {
-          {AArch64::CMEQv2i32, AArch64::CMHIv2i32, AArch64::CMHSv2i32,
-           AArch64::CMHIv2i32, AArch64::CMHSv2i32, AArch64::CMGTv2i32,
-           AArch64::CMGEv2i32, AArch64::CMGTv2i32, AArch64::CMGEv2i32},
-          {AArch64::CMEQv4i32, AArch64::CMHIv4i32, AArch64::CMHSv4i32,
-           AArch64::CMHIv4i32, AArch64::CMHSv4i32, AArch64::CMGTv4i32,
-           AArch64::CMGEv4i32, AArch64::CMGTv4i32, AArch64::CMGEv4i32},
-          {0 /* invalid */, 0 /* invalid */, 0 /* invalid */, 0 /* invalid */,
-           0 /* invalid */, 0 /* invalid */, 0 /* invalid */, 0 /* invalid */,
-           0 /* invalid */},
-          {0 /* invalid */, 0 /* invalid */, 0 /* invalid */, 0 /* invalid */,
-           0 /* invalid */, 0 /* invalid */, 0 /* invalid */, 0 /* invalid */,
-           0 /* invalid */}
-      },
-      {
-          {AArch64::CMEQv2i64, AArch64::CMHIv2i64, AArch64::CMHSv2i64,
-           AArch64::CMHIv2i64, AArch64::CMHSv2i64, AArch64::CMGTv2i64,
-           AArch64::CMGEv2i64, AArch64::CMGTv2i64, AArch64::CMGEv2i64},
-          {0 /* invalid */, 0 /* invalid */, 0 /* invalid */, 0 /* invalid */,
-           0 /* invalid */, 0 /* invalid */, 0 /* invalid */, 0 /* invalid */,
-           0 /* invalid */},
-          {0 /* invalid */, 0 /* invalid */, 0 /* invalid */, 0 /* invalid */,
-           0 /* invalid */, 0 /* invalid */, 0 /* invalid */, 0 /* invalid */,
-           0 /* invalid */},
-          {0 /* invalid */, 0 /* invalid */, 0 /* invalid */, 0 /* invalid */,
-           0 /* invalid */, 0 /* invalid */, 0 /* invalid */, 0 /* invalid */,
-           0 /* invalid */}
-      },
-  };
-  unsigned EltIdx = Log2_32(SrcEltSize / 8);
-  unsigned NumEltsIdx = Log2_32(NumElts / 2);
-  unsigned Opc = OpcTable[EltIdx][NumEltsIdx][PredIdx];
-  if (!Opc) {
-    LLVM_DEBUG(dbgs() << "Could not map G_ICMP to cmp opcode");
-    return false;
-  }
-
-  const RegisterBank &VecRB = *RBI.getRegBank(SrcReg, MRI, TRI);
-  const TargetRegisterClass *SrcRC =
-      getRegClassForTypeOnBank(SrcTy, VecRB, RBI, true);
-  if (!SrcRC) {
-    LLVM_DEBUG(dbgs() << "Could not determine source register class.\n");
-    return false;
-  }
-
-  unsigned NotOpc = Pred == ICmpInst::ICMP_NE ? AArch64::NOTv8i8 : 0;
-  if (SrcTy.getSizeInBits() == 128)
-    NotOpc = NotOpc ? AArch64::NOTv16i8 : 0;
-
-  if (SwapOperands)
-    std::swap(SrcReg, Src2Reg);
-
-  MachineIRBuilder MIB(I);
-  auto Cmp = MIB.buildInstr(Opc, {SrcRC}, {SrcReg, Src2Reg});
-  constrainSelectedInstRegOperands(*Cmp, TII, TRI, RBI);
-
-  // Invert if we had a 'ne' cc.
-  if (NotOpc) {
-    Cmp = MIB.buildInstr(NotOpc, {DstReg}, {Cmp});
-    constrainSelectedInstRegOperands(*Cmp, TII, TRI, RBI);
-  } else {
-    MIB.buildCopy(DstReg, Cmp.getReg(0));
-  }
-  RBI.constrainGenericRegister(DstReg, *SrcRC, MRI);
-  I.eraseFromParent();
-  return true;
-}
-
-MachineInstr *AArch64InstructionSelector::emitScalarToVector(
-    unsigned EltSize, const TargetRegisterClass *DstRC, Register Scalar,
-    MachineIRBuilder &MIRBuilder) const {
-  auto Undef = MIRBuilder.buildInstr(TargetOpcode::IMPLICIT_DEF, {DstRC}, {});
-
-  auto BuildFn = [&](unsigned SubregIndex) {
-    auto Ins =
-        MIRBuilder
-            .buildInstr(TargetOpcode::INSERT_SUBREG, {DstRC}, {Undef, Scalar})
-            .addImm(SubregIndex);
-    constrainSelectedInstRegOperands(*Undef, TII, TRI, RBI);
-    constrainSelectedInstRegOperands(*Ins, TII, TRI, RBI);
-    return &*Ins;
-  };
-
-  switch (EltSize) {
-  case 16:
-    return BuildFn(AArch64::hsub);
-  case 32:
-    return BuildFn(AArch64::ssub);
-  case 64:
-    return BuildFn(AArch64::dsub);
-  default:
-    return nullptr;
-  }
-}
-
-bool AArch64InstructionSelector::selectMergeValues(
-    MachineInstr &I, MachineRegisterInfo &MRI) const {
-  assert(I.getOpcode() == TargetOpcode::G_MERGE_VALUES && "unexpected opcode");
-  const LLT DstTy = MRI.getType(I.getOperand(0).getReg());
-  const LLT SrcTy = MRI.getType(I.getOperand(1).getReg());
-  assert(!DstTy.isVector() && !SrcTy.isVector() && "invalid merge operation");
-  const RegisterBank &RB = *RBI.getRegBank(I.getOperand(1).getReg(), MRI, TRI);
-
-  if (I.getNumOperands() != 3)
-    return false;
-
-  // Merging 2 s64s into an s128.
-  if (DstTy == LLT::scalar(128)) {
-    if (SrcTy.getSizeInBits() != 64)
-      return false;
-    MachineIRBuilder MIB(I);
-    Register DstReg = I.getOperand(0).getReg();
-    Register Src1Reg = I.getOperand(1).getReg();
-    Register Src2Reg = I.getOperand(2).getReg();
-    auto Tmp = MIB.buildInstr(TargetOpcode::IMPLICIT_DEF, {DstTy}, {});
-    MachineInstr *InsMI =
-        emitLaneInsert(None, Tmp.getReg(0), Src1Reg, /* LaneIdx */ 0, RB, MIB);
-    if (!InsMI)
-      return false;
-    MachineInstr *Ins2MI = emitLaneInsert(DstReg, InsMI->getOperand(0).getReg(),
-                                          Src2Reg, /* LaneIdx */ 1, RB, MIB);
-    if (!Ins2MI)
-      return false;
-    constrainSelectedInstRegOperands(*InsMI, TII, TRI, RBI);
-    constrainSelectedInstRegOperands(*Ins2MI, TII, TRI, RBI);
-    I.eraseFromParent();
-    return true;
-  }
-
-  if (RB.getID() != AArch64::GPRRegBankID)
-    return false;
-
-  if (DstTy.getSizeInBits() != 64 || SrcTy.getSizeInBits() != 32)
-    return false;
-
-  auto *DstRC = &AArch64::GPR64RegClass;
-  Register SubToRegDef = MRI.createVirtualRegister(DstRC);
-  MachineInstr &SubRegMI = *BuildMI(*I.getParent(), I, I.getDebugLoc(),
-                                    TII.get(TargetOpcode::SUBREG_TO_REG))
-                                .addDef(SubToRegDef)
-                                .addImm(0)
-                                .addUse(I.getOperand(1).getReg())
-                                .addImm(AArch64::sub_32);
-  Register SubToRegDef2 = MRI.createVirtualRegister(DstRC);
-  // Need to anyext the second scalar before we can use bfm
-  MachineInstr &SubRegMI2 = *BuildMI(*I.getParent(), I, I.getDebugLoc(),
-                                    TII.get(TargetOpcode::SUBREG_TO_REG))
-                                .addDef(SubToRegDef2)
-                                .addImm(0)
-                                .addUse(I.getOperand(2).getReg())
-                                .addImm(AArch64::sub_32);
-  MachineInstr &BFM =
-      *BuildMI(*I.getParent(), I, I.getDebugLoc(), TII.get(AArch64::BFMXri))
-           .addDef(I.getOperand(0).getReg())
-           .addUse(SubToRegDef)
-           .addUse(SubToRegDef2)
-           .addImm(32)
-           .addImm(31);
-  constrainSelectedInstRegOperands(SubRegMI, TII, TRI, RBI);
-  constrainSelectedInstRegOperands(SubRegMI2, TII, TRI, RBI);
-  constrainSelectedInstRegOperands(BFM, TII, TRI, RBI);
-  I.eraseFromParent();
-  return true;
-}
-
-static bool getLaneCopyOpcode(unsigned &CopyOpc, unsigned &ExtractSubReg,
-                              const unsigned EltSize) {
-  // Choose a lane copy opcode and subregister based off of the size of the
-  // vector's elements.
-  switch (EltSize) {
-  case 16:
-    CopyOpc = AArch64::CPYi16;
-    ExtractSubReg = AArch64::hsub;
-    break;
-  case 32:
-    CopyOpc = AArch64::CPYi32;
-    ExtractSubReg = AArch64::ssub;
-    break;
-  case 64:
-    CopyOpc = AArch64::CPYi64;
-    ExtractSubReg = AArch64::dsub;
-    break;
-  default:
-    // Unknown size, bail out.
-    LLVM_DEBUG(dbgs() << "Elt size '" << EltSize << "' unsupported.\n");
-    return false;
-  }
-  return true;
-}
-
-MachineInstr *AArch64InstructionSelector::emitExtractVectorElt(
-    Optional<Register> DstReg, const RegisterBank &DstRB, LLT ScalarTy,
-    Register VecReg, unsigned LaneIdx, MachineIRBuilder &MIRBuilder) const {
-  MachineRegisterInfo &MRI = *MIRBuilder.getMRI();
-  unsigned CopyOpc = 0;
-  unsigned ExtractSubReg = 0;
-  if (!getLaneCopyOpcode(CopyOpc, ExtractSubReg, ScalarTy.getSizeInBits())) {
-    LLVM_DEBUG(
-        dbgs() << "Couldn't determine lane copy opcode for instruction.\n");
-    return nullptr;
-  }
-
-  const TargetRegisterClass *DstRC =
-      getRegClassForTypeOnBank(ScalarTy, DstRB, RBI, true);
-  if (!DstRC) {
-    LLVM_DEBUG(dbgs() << "Could not determine destination register class.\n");
-    return nullptr;
-  }
-
-  const RegisterBank &VecRB = *RBI.getRegBank(VecReg, MRI, TRI);
-  const LLT &VecTy = MRI.getType(VecReg);
-  const TargetRegisterClass *VecRC =
-      getRegClassForTypeOnBank(VecTy, VecRB, RBI, true);
-  if (!VecRC) {
-    LLVM_DEBUG(dbgs() << "Could not determine source register class.\n");
-    return nullptr;
-  }
-
-  // The register that we're going to copy into.
-  Register InsertReg = VecReg;
-  if (!DstReg)
-    DstReg = MRI.createVirtualRegister(DstRC);
-  // If the lane index is 0, we just use a subregister COPY.
-  if (LaneIdx == 0) {
-    auto Copy = MIRBuilder.buildInstr(TargetOpcode::COPY, {*DstReg}, {})
-                    .addReg(VecReg, 0, ExtractSubReg);
-    RBI.constrainGenericRegister(*DstReg, *DstRC, MRI);
-    return &*Copy;
-  }
-
-  // Lane copies require 128-bit wide registers. If we're dealing with an
-  // unpacked vector, then we need to move up to that width. Insert an implicit
-  // def and a subregister insert to get us there.
-  if (VecTy.getSizeInBits() != 128) {
-    MachineInstr *ScalarToVector = emitScalarToVector(
-        VecTy.getSizeInBits(), &AArch64::FPR128RegClass, VecReg, MIRBuilder);
-    if (!ScalarToVector)
-      return nullptr;
-    InsertReg = ScalarToVector->getOperand(0).getReg();
-  }
-
-  MachineInstr *LaneCopyMI =
-      MIRBuilder.buildInstr(CopyOpc, {*DstReg}, {InsertReg}).addImm(LaneIdx);
-  constrainSelectedInstRegOperands(*LaneCopyMI, TII, TRI, RBI);
-
-  // Make sure that we actually constrain the initial copy.
-  RBI.constrainGenericRegister(*DstReg, *DstRC, MRI);
-  return LaneCopyMI;
-}
-
-bool AArch64InstructionSelector::selectExtractElt(
-    MachineInstr &I, MachineRegisterInfo &MRI) const {
-  assert(I.getOpcode() == TargetOpcode::G_EXTRACT_VECTOR_ELT &&
-         "unexpected opcode!");
-  Register DstReg = I.getOperand(0).getReg();
-  const LLT NarrowTy = MRI.getType(DstReg);
-  const Register SrcReg = I.getOperand(1).getReg();
-  const LLT WideTy = MRI.getType(SrcReg);
-  (void)WideTy;
-  assert(WideTy.getSizeInBits() >= NarrowTy.getSizeInBits() &&
-         "source register size too small!");
-  assert(NarrowTy.isScalar() && "cannot extract vector into vector!");
-
-  // Need the lane index to determine the correct copy opcode.
-  MachineOperand &LaneIdxOp = I.getOperand(2);
-  assert(LaneIdxOp.isReg() && "Lane index operand was not a register?");
-
-  if (RBI.getRegBank(DstReg, MRI, TRI)->getID() != AArch64::FPRRegBankID) {
-    LLVM_DEBUG(dbgs() << "Cannot extract into GPR.\n");
-    return false;
-  }
-
-  // Find the index to extract from.
-  auto VRegAndVal = getConstantVRegValWithLookThrough(LaneIdxOp.getReg(), MRI);
-  if (!VRegAndVal)
-    return false;
-  unsigned LaneIdx = VRegAndVal->Value;
-
-  MachineIRBuilder MIRBuilder(I);
-
-  const RegisterBank &DstRB = *RBI.getRegBank(DstReg, MRI, TRI);
-  MachineInstr *Extract = emitExtractVectorElt(DstReg, DstRB, NarrowTy, SrcReg,
-                                               LaneIdx, MIRBuilder);
-  if (!Extract)
-    return false;
-
-  I.eraseFromParent();
-  return true;
-}
-
-bool AArch64InstructionSelector::selectSplitVectorUnmerge(
-    MachineInstr &I, MachineRegisterInfo &MRI) const {
-  unsigned NumElts = I.getNumOperands() - 1;
-  Register SrcReg = I.getOperand(NumElts).getReg();
-  const LLT NarrowTy = MRI.getType(I.getOperand(0).getReg());
-  const LLT SrcTy = MRI.getType(SrcReg);
-
-  assert(NarrowTy.isVector() && "Expected an unmerge into vectors");
-  if (SrcTy.getSizeInBits() > 128) {
-    LLVM_DEBUG(dbgs() << "Unexpected vector type for vec split unmerge");
-    return false;
-  }
-
-  MachineIRBuilder MIB(I);
-
-  // We implement a split vector operation by treating the sub-vectors as
-  // scalars and extracting them.
-  const RegisterBank &DstRB =
-      *RBI.getRegBank(I.getOperand(0).getReg(), MRI, TRI);
-  for (unsigned OpIdx = 0; OpIdx < NumElts; ++OpIdx) {
-    Register Dst = I.getOperand(OpIdx).getReg();
-    MachineInstr *Extract =
-        emitExtractVectorElt(Dst, DstRB, NarrowTy, SrcReg, OpIdx, MIB);
-    if (!Extract)
-      return false;
-  }
-  I.eraseFromParent();
-  return true;
-}
-
-bool AArch64InstructionSelector::selectUnmergeValues(
-    MachineInstr &I, MachineRegisterInfo &MRI) const {
-  assert(I.getOpcode() == TargetOpcode::G_UNMERGE_VALUES &&
-         "unexpected opcode");
-
-  // TODO: Handle unmerging into GPRs and from scalars to scalars.
-  if (RBI.getRegBank(I.getOperand(0).getReg(), MRI, TRI)->getID() !=
-          AArch64::FPRRegBankID ||
-      RBI.getRegBank(I.getOperand(1).getReg(), MRI, TRI)->getID() !=
-          AArch64::FPRRegBankID) {
-    LLVM_DEBUG(dbgs() << "Unmerging vector-to-gpr and scalar-to-scalar "
-                         "currently unsupported.\n");
-    return false;
-  }
-
-  // The last operand is the vector source register, and every other operand is
-  // a register to unpack into.
-  unsigned NumElts = I.getNumOperands() - 1;
-  Register SrcReg = I.getOperand(NumElts).getReg();
-  const LLT NarrowTy = MRI.getType(I.getOperand(0).getReg());
-  const LLT WideTy = MRI.getType(SrcReg);
-  (void)WideTy;
-  assert((WideTy.isVector() || WideTy.getSizeInBits() == 128) &&
-         "can only unmerge from vector or s128 types!");
-  assert(WideTy.getSizeInBits() > NarrowTy.getSizeInBits() &&
-         "source register size too small!");
-
-  if (!NarrowTy.isScalar())
-    return selectSplitVectorUnmerge(I, MRI);
-
-  MachineIRBuilder MIB(I);
-
-  // Choose a lane copy opcode and subregister based off of the size of the
-  // vector's elements.
-  unsigned CopyOpc = 0;
-  unsigned ExtractSubReg = 0;
-  if (!getLaneCopyOpcode(CopyOpc, ExtractSubReg, NarrowTy.getSizeInBits()))
-    return false;
-
-  // Set up for the lane copies.
-  MachineBasicBlock &MBB = *I.getParent();
-
-  // Stores the registers we'll be copying from.
-  SmallVector<Register, 4> InsertRegs;
-
-  // We'll use the first register twice, so we only need NumElts-1 registers.
-  unsigned NumInsertRegs = NumElts - 1;
-
-  // If our elements fit into exactly 128 bits, then we can copy from the source
-  // directly. Otherwise, we need to do a bit of setup with some subregister
-  // inserts.
-  if (NarrowTy.getSizeInBits() * NumElts == 128) {
-    InsertRegs = SmallVector<Register, 4>(NumInsertRegs, SrcReg);
-  } else {
-    // No. We have to perform subregister inserts. For each insert, create an
-    // implicit def and a subregister insert, and save the register we create.
-    for (unsigned Idx = 0; Idx < NumInsertRegs; ++Idx) {
-      Register ImpDefReg = MRI.createVirtualRegister(&AArch64::FPR128RegClass);
-      MachineInstr &ImpDefMI =
-          *BuildMI(MBB, I, I.getDebugLoc(), TII.get(TargetOpcode::IMPLICIT_DEF),
-                   ImpDefReg);
-
-      // Now, create the subregister insert from SrcReg.
-      Register InsertReg = MRI.createVirtualRegister(&AArch64::FPR128RegClass);
-      MachineInstr &InsMI =
-          *BuildMI(MBB, I, I.getDebugLoc(),
-                   TII.get(TargetOpcode::INSERT_SUBREG), InsertReg)
-               .addUse(ImpDefReg)
-               .addUse(SrcReg)
-               .addImm(AArch64::dsub);
-
-      constrainSelectedInstRegOperands(ImpDefMI, TII, TRI, RBI);
-      constrainSelectedInstRegOperands(InsMI, TII, TRI, RBI);
-
-      // Save the register so that we can copy from it after.
-      InsertRegs.push_back(InsertReg);
-    }
-  }
-
-  // Now that we've created any necessary subregister inserts, we can
-  // create the copies.
-  //
-  // Perform the first copy separately as a subregister copy.
-  Register CopyTo = I.getOperand(0).getReg();
-  auto FirstCopy = MIB.buildInstr(TargetOpcode::COPY, {CopyTo}, {})
-                       .addReg(InsertRegs[0], 0, ExtractSubReg);
-  constrainSelectedInstRegOperands(*FirstCopy, TII, TRI, RBI);
-
-  // Now, perform the remaining copies as vector lane copies.
-  unsigned LaneIdx = 1;
-  for (Register InsReg : InsertRegs) {
-    Register CopyTo = I.getOperand(LaneIdx).getReg();
-    MachineInstr &CopyInst =
-        *BuildMI(MBB, I, I.getDebugLoc(), TII.get(CopyOpc), CopyTo)
-             .addUse(InsReg)
-             .addImm(LaneIdx);
-    constrainSelectedInstRegOperands(CopyInst, TII, TRI, RBI);
-    ++LaneIdx;
-  }
-
-  // Separately constrain the first copy's destination. Because of the
-  // limitation in constrainOperandRegClass, we can't guarantee that this will
-  // actually be constrained. So, do it ourselves using the second operand.
-  const TargetRegisterClass *RC =
-      MRI.getRegClassOrNull(I.getOperand(1).getReg());
-  if (!RC) {
-    LLVM_DEBUG(dbgs() << "Couldn't constrain copy destination.\n");
-    return false;
-  }
-
-  RBI.constrainGenericRegister(CopyTo, *RC, MRI);
-  I.eraseFromParent();
-  return true;
-}
-
-bool AArch64InstructionSelector::selectConcatVectors(
-    MachineInstr &I, MachineRegisterInfo &MRI) const {
-  assert(I.getOpcode() == TargetOpcode::G_CONCAT_VECTORS &&
-         "Unexpected opcode");
-  Register Dst = I.getOperand(0).getReg();
-  Register Op1 = I.getOperand(1).getReg();
-  Register Op2 = I.getOperand(2).getReg();
-  MachineIRBuilder MIRBuilder(I);
-  MachineInstr *ConcatMI = emitVectorConcat(Dst, Op1, Op2, MIRBuilder);
-  if (!ConcatMI)
-    return false;
-  I.eraseFromParent();
-  return true;
-}
-
-unsigned
-AArch64InstructionSelector::emitConstantPoolEntry(Constant *CPVal,
-                                                  MachineFunction &MF) const {
-  Type *CPTy = CPVal->getType();
-  unsigned Align = MF.getDataLayout().getPrefTypeAlignment(CPTy);
-  if (Align == 0)
-    Align = MF.getDataLayout().getTypeAllocSize(CPTy);
-
-  MachineConstantPool *MCP = MF.getConstantPool();
-  return MCP->getConstantPoolIndex(CPVal, Align);
-}
-
-MachineInstr *AArch64InstructionSelector::emitLoadFromConstantPool(
-    Constant *CPVal, MachineIRBuilder &MIRBuilder) const {
-  unsigned CPIdx = emitConstantPoolEntry(CPVal, MIRBuilder.getMF());
-
-  auto Adrp =
-      MIRBuilder.buildInstr(AArch64::ADRP, {&AArch64::GPR64RegClass}, {})
-          .addConstantPoolIndex(CPIdx, 0, AArch64II::MO_PAGE);
-
-  MachineInstr *LoadMI = nullptr;
-  switch (MIRBuilder.getDataLayout().getTypeStoreSize(CPVal->getType())) {
-  case 16:
-    LoadMI =
-        &*MIRBuilder
-              .buildInstr(AArch64::LDRQui, {&AArch64::FPR128RegClass}, {Adrp})
-              .addConstantPoolIndex(CPIdx, 0,
-                                    AArch64II::MO_PAGEOFF | AArch64II::MO_NC);
-    break;
-  case 8:
-    LoadMI = &*MIRBuilder
-                 .buildInstr(AArch64::LDRDui, {&AArch64::FPR64RegClass}, {Adrp})
-                 .addConstantPoolIndex(
-                     CPIdx, 0, AArch64II::MO_PAGEOFF | AArch64II::MO_NC);
-    break;
-  default:
-    LLVM_DEBUG(dbgs() << "Could not load from constant pool of type "
-                      << *CPVal->getType());
-    return nullptr;
-  }
-  constrainSelectedInstRegOperands(*Adrp, TII, TRI, RBI);
-  constrainSelectedInstRegOperands(*LoadMI, TII, TRI, RBI);
-  return LoadMI;
-}
-
-/// Return an <Opcode, SubregIndex> pair to do an vector elt insert of a given
-/// size and RB.
-static std::pair<unsigned, unsigned>
-getInsertVecEltOpInfo(const RegisterBank &RB, unsigned EltSize) {
-  unsigned Opc, SubregIdx;
-  if (RB.getID() == AArch64::GPRRegBankID) {
-    if (EltSize == 32) {
-      Opc = AArch64::INSvi32gpr;
-      SubregIdx = AArch64::ssub;
-    } else if (EltSize == 64) {
-      Opc = AArch64::INSvi64gpr;
-      SubregIdx = AArch64::dsub;
-    } else {
-      llvm_unreachable("invalid elt size!");
-    }
-  } else {
-    if (EltSize == 8) {
-      Opc = AArch64::INSvi8lane;
-      SubregIdx = AArch64::bsub;
-    } else if (EltSize == 16) {
-      Opc = AArch64::INSvi16lane;
-      SubregIdx = AArch64::hsub;
-    } else if (EltSize == 32) {
-      Opc = AArch64::INSvi32lane;
-      SubregIdx = AArch64::ssub;
-    } else if (EltSize == 64) {
-      Opc = AArch64::INSvi64lane;
-      SubregIdx = AArch64::dsub;
-    } else {
-      llvm_unreachable("invalid elt size!");
-    }
-  }
-  return std::make_pair(Opc, SubregIdx);
-}
-
-MachineInstr *
-AArch64InstructionSelector::emitADD(Register DefReg, MachineOperand &LHS,
-                                    MachineOperand &RHS,
-                                    MachineIRBuilder &MIRBuilder) const {
-  assert(LHS.isReg() && RHS.isReg() && "Expected LHS and RHS to be registers!");
-  MachineRegisterInfo &MRI = MIRBuilder.getMF().getRegInfo();
-  static const unsigned OpcTable[2][2]{{AArch64::ADDXrr, AArch64::ADDXri},
-                                       {AArch64::ADDWrr, AArch64::ADDWri}};
-  bool Is32Bit = MRI.getType(LHS.getReg()).getSizeInBits() == 32;
-  auto ImmFns = selectArithImmed(RHS);
-  unsigned Opc = OpcTable[Is32Bit][ImmFns.hasValue()];
-  auto AddMI = MIRBuilder.buildInstr(Opc, {DefReg}, {LHS.getReg()});
-
-  // If we matched a valid constant immediate, add those operands.
-  if (ImmFns) {
-    for (auto &RenderFn : *ImmFns)
-      RenderFn(AddMI);
-  } else {
-    AddMI.addUse(RHS.getReg());
-  }
-
-  constrainSelectedInstRegOperands(*AddMI, TII, TRI, RBI);
-  return &*AddMI;
-}
-
-MachineInstr *
-AArch64InstructionSelector::emitCMN(MachineOperand &LHS, MachineOperand &RHS,
-                                    MachineIRBuilder &MIRBuilder) const {
-  assert(LHS.isReg() && RHS.isReg() && "Expected LHS and RHS to be registers!");
-  MachineRegisterInfo &MRI = MIRBuilder.getMF().getRegInfo();
-  static const unsigned OpcTable[2][2]{{AArch64::ADDSXrr, AArch64::ADDSXri},
-                                       {AArch64::ADDSWrr, AArch64::ADDSWri}};
-  bool Is32Bit = (MRI.getType(LHS.getReg()).getSizeInBits() == 32);
-  auto ImmFns = selectArithImmed(RHS);
-  unsigned Opc = OpcTable[Is32Bit][ImmFns.hasValue()];
-  Register ZReg = Is32Bit ? AArch64::WZR : AArch64::XZR;
-
-  auto CmpMI = MIRBuilder.buildInstr(Opc, {ZReg}, {LHS.getReg()});
-
-  // If we matched a valid constant immediate, add those operands.
-  if (ImmFns) {
-    for (auto &RenderFn : *ImmFns)
-      RenderFn(CmpMI);
-  } else {
-    CmpMI.addUse(RHS.getReg());
-  }
-
-  constrainSelectedInstRegOperands(*CmpMI, TII, TRI, RBI);
-  return &*CmpMI;
-}
-
-MachineInstr *
-AArch64InstructionSelector::emitTST(const Register &LHS, const Register &RHS,
-                                    MachineIRBuilder &MIRBuilder) const {
-  MachineRegisterInfo &MRI = MIRBuilder.getMF().getRegInfo();
-  unsigned RegSize = MRI.getType(LHS).getSizeInBits();
-  bool Is32Bit = (RegSize == 32);
-  static const unsigned OpcTable[2][2]{{AArch64::ANDSXrr, AArch64::ANDSXri},
-                                       {AArch64::ANDSWrr, AArch64::ANDSWri}};
-  Register ZReg = Is32Bit ? AArch64::WZR : AArch64::XZR;
-
-  // We might be able to fold in an immediate into the TST. We need to make sure
-  // it's a logical immediate though, since ANDS requires that.
-  auto ValAndVReg = getConstantVRegValWithLookThrough(RHS, MRI);
-  bool IsImmForm = ValAndVReg.hasValue() &&
-                   AArch64_AM::isLogicalImmediate(ValAndVReg->Value, RegSize);
-  unsigned Opc = OpcTable[Is32Bit][IsImmForm];
-  auto TstMI = MIRBuilder.buildInstr(Opc, {ZReg}, {LHS});
-
-  if (IsImmForm)
-    TstMI.addImm(
-        AArch64_AM::encodeLogicalImmediate(ValAndVReg->Value, RegSize));
-  else
-    TstMI.addUse(RHS);
-
-  constrainSelectedInstRegOperands(*TstMI, TII, TRI, RBI);
-  return &*TstMI;
-}
-
-MachineInstr *AArch64InstructionSelector::emitIntegerCompare(
-    MachineOperand &LHS, MachineOperand &RHS, MachineOperand &Predicate,
-    MachineIRBuilder &MIRBuilder) const {
-  assert(LHS.isReg() && RHS.isReg() && "Expected LHS and RHS to be registers!");
-  MachineRegisterInfo &MRI = MIRBuilder.getMF().getRegInfo();
-
-  // Fold the compare if possible.
-  MachineInstr *FoldCmp =
-      tryFoldIntegerCompare(LHS, RHS, Predicate, MIRBuilder);
-  if (FoldCmp)
-    return FoldCmp;
-
-  // Can't fold into a CMN. Just emit a normal compare.
-  unsigned CmpOpc = 0;
-  Register ZReg;
-
-  LLT CmpTy = MRI.getType(LHS.getReg());
-  assert((CmpTy.isScalar() || CmpTy.isPointer()) &&
-         "Expected scalar or pointer");
-  if (CmpTy == LLT::scalar(32)) {
-    CmpOpc = AArch64::SUBSWrr;
-    ZReg = AArch64::WZR;
-  } else if (CmpTy == LLT::scalar(64) || CmpTy.isPointer()) {
-    CmpOpc = AArch64::SUBSXrr;
-    ZReg = AArch64::XZR;
-  } else {
-    return nullptr;
-  }
-
-  // Try to match immediate forms.
-  auto ImmFns = selectArithImmed(RHS);
-  if (ImmFns)
-    CmpOpc = CmpOpc == AArch64::SUBSWrr ? AArch64::SUBSWri : AArch64::SUBSXri;
-
-  auto CmpMI = MIRBuilder.buildInstr(CmpOpc).addDef(ZReg).addUse(LHS.getReg());
-  // If we matched a valid constant immediate, add those operands.
-  if (ImmFns) {
-    for (auto &RenderFn : *ImmFns)
-      RenderFn(CmpMI);
-  } else {
-    CmpMI.addUse(RHS.getReg());
-  }
-
-  // Make sure that we can constrain the compare that we emitted.
-  constrainSelectedInstRegOperands(*CmpMI, TII, TRI, RBI);
-  return &*CmpMI;
-}
-
-MachineInstr *AArch64InstructionSelector::emitVectorConcat(
-    Optional<Register> Dst, Register Op1, Register Op2,
-    MachineIRBuilder &MIRBuilder) const {
-  // We implement a vector concat by:
-  // 1. Use scalar_to_vector to insert the lower vector into the larger dest
-  // 2. Insert the upper vector into the destination's upper element
-  // TODO: some of this code is common with G_BUILD_VECTOR handling.
-  MachineRegisterInfo &MRI = MIRBuilder.getMF().getRegInfo();
-
-  const LLT Op1Ty = MRI.getType(Op1);
-  const LLT Op2Ty = MRI.getType(Op2);
-
-  if (Op1Ty != Op2Ty) {
-    LLVM_DEBUG(dbgs() << "Could not do vector concat of differing vector tys");
-    return nullptr;
-  }
-  assert(Op1Ty.isVector() && "Expected a vector for vector concat");
-
-  if (Op1Ty.getSizeInBits() >= 128) {
-    LLVM_DEBUG(dbgs() << "Vector concat not supported for full size vectors");
-    return nullptr;
-  }
-
-  // At the moment we just support 64 bit vector concats.
-  if (Op1Ty.getSizeInBits() != 64) {
-    LLVM_DEBUG(dbgs() << "Vector concat supported for 64b vectors");
-    return nullptr;
-  }
-
-  const LLT ScalarTy = LLT::scalar(Op1Ty.getSizeInBits());
-  const RegisterBank &FPRBank = *RBI.getRegBank(Op1, MRI, TRI);
-  const TargetRegisterClass *DstRC =
-      getMinClassForRegBank(FPRBank, Op1Ty.getSizeInBits() * 2);
-
-  MachineInstr *WidenedOp1 =
-      emitScalarToVector(ScalarTy.getSizeInBits(), DstRC, Op1, MIRBuilder);
-  MachineInstr *WidenedOp2 =
-      emitScalarToVector(ScalarTy.getSizeInBits(), DstRC, Op2, MIRBuilder);
-  if (!WidenedOp1 || !WidenedOp2) {
-    LLVM_DEBUG(dbgs() << "Could not emit a vector from scalar value");
-    return nullptr;
-  }
-
-  // Now do the insert of the upper element.
-  unsigned InsertOpc, InsSubRegIdx;
-  std::tie(InsertOpc, InsSubRegIdx) =
-      getInsertVecEltOpInfo(FPRBank, ScalarTy.getSizeInBits());
-
-  if (!Dst)
-    Dst = MRI.createVirtualRegister(DstRC);
-  auto InsElt =
-      MIRBuilder
-          .buildInstr(InsertOpc, {*Dst}, {WidenedOp1->getOperand(0).getReg()})
-          .addImm(1) /* Lane index */
-          .addUse(WidenedOp2->getOperand(0).getReg())
-          .addImm(0);
-  constrainSelectedInstRegOperands(*InsElt, TII, TRI, RBI);
-  return &*InsElt;
-}
-
-MachineInstr *AArch64InstructionSelector::emitFMovForFConstant(
-    MachineInstr &I, MachineRegisterInfo &MRI) const {
-  assert(I.getOpcode() == TargetOpcode::G_FCONSTANT &&
-         "Expected a G_FCONSTANT!");
-  MachineOperand &ImmOp = I.getOperand(1);
-  unsigned DefSize = MRI.getType(I.getOperand(0).getReg()).getSizeInBits();
-
-  // Only handle 32 and 64 bit defs for now.
-  if (DefSize != 32 && DefSize != 64)
-    return nullptr;
-
-  // Don't handle null values using FMOV.
-  if (ImmOp.getFPImm()->isNullValue())
-    return nullptr;
-
-  // Get the immediate representation for the FMOV.
-  const APFloat &ImmValAPF = ImmOp.getFPImm()->getValueAPF();
-  int Imm = DefSize == 32 ? AArch64_AM::getFP32Imm(ImmValAPF)
-                          : AArch64_AM::getFP64Imm(ImmValAPF);
-
-  // If this is -1, it means the immediate can't be represented as the requested
-  // floating point value. Bail.
-  if (Imm == -1)
-    return nullptr;
-
-  // Update MI to represent the new FMOV instruction, constrain it, and return.
-  ImmOp.ChangeToImmediate(Imm);
-  unsigned MovOpc = DefSize == 32 ? AArch64::FMOVSi : AArch64::FMOVDi;
-  I.setDesc(TII.get(MovOpc));
-  constrainSelectedInstRegOperands(I, TII, TRI, RBI);
-  return &I;
-}
-
-MachineInstr *
-AArch64InstructionSelector::emitCSetForICMP(Register DefReg, unsigned Pred,
-                                     MachineIRBuilder &MIRBuilder) const {
-  // CSINC increments the result when the predicate is false. Invert it.
-  const AArch64CC::CondCode InvCC = changeICMPPredToAArch64CC(
-      CmpInst::getInversePredicate((CmpInst::Predicate)Pred));
-  auto I =
-      MIRBuilder
-    .buildInstr(AArch64::CSINCWr, {DefReg}, {Register(AArch64::WZR), Register(AArch64::WZR)})
-          .addImm(InvCC);
-  constrainSelectedInstRegOperands(*I, TII, TRI, RBI);
-  return &*I;
-}
-
-bool AArch64InstructionSelector::tryOptSelect(MachineInstr &I) const {
-  MachineIRBuilder MIB(I);
-  MachineRegisterInfo &MRI = *MIB.getMRI();
-  const TargetRegisterInfo &TRI = *MRI.getTargetRegisterInfo();
-
-  // We want to recognize this pattern:
-  //
-  // $z = G_FCMP pred, $x, $y
-  // ...
-  // $w = G_SELECT $z, $a, $b
-  //
-  // Where the value of $z is *only* ever used by the G_SELECT (possibly with
-  // some copies/truncs in between.)
-  //
-  // If we see this, then we can emit something like this:
-  //
-  // fcmp $x, $y
-  // fcsel $w, $a, $b, pred
-  //
-  // Rather than emitting both of the rather long sequences in the standard
-  // G_FCMP/G_SELECT select methods.
-
-  // First, check if the condition is defined by a compare.
-  MachineInstr *CondDef = MRI.getVRegDef(I.getOperand(1).getReg());
-  while (CondDef) {
-    // We can only fold if all of the defs have one use.
-    if (!MRI.hasOneUse(CondDef->getOperand(0).getReg()))
-      return false;
-
-    // We can skip over G_TRUNC since the condition is 1-bit.
-    // Truncating/extending can have no impact on the value.
-    unsigned Opc = CondDef->getOpcode();
-    if (Opc != TargetOpcode::COPY && Opc != TargetOpcode::G_TRUNC)
-      break;
-
-    // Can't see past copies from physregs.
-    if (Opc == TargetOpcode::COPY &&
-        Register::isPhysicalRegister(CondDef->getOperand(1).getReg()))
-      return false;
-
-    CondDef = MRI.getVRegDef(CondDef->getOperand(1).getReg());
-  }
-
-  // Is the condition defined by a compare?
-  if (!CondDef)
-    return false;
-
-  unsigned CondOpc = CondDef->getOpcode();
-  if (CondOpc != TargetOpcode::G_ICMP && CondOpc != TargetOpcode::G_FCMP)
-    return false;
-
-  AArch64CC::CondCode CondCode;
-  if (CondOpc == TargetOpcode::G_ICMP) {
-    CondCode = changeICMPPredToAArch64CC(
-        (CmpInst::Predicate)CondDef->getOperand(1).getPredicate());
-    if (!emitIntegerCompare(CondDef->getOperand(2), CondDef->getOperand(3),
-                            CondDef->getOperand(1), MIB)) {
-      LLVM_DEBUG(dbgs() << "Couldn't emit compare for select!\n");
-      return false;
-    }
-  } else {
-    // Get the condition code for the select.
-    AArch64CC::CondCode CondCode2;
-    changeFCMPPredToAArch64CC(
-        (CmpInst::Predicate)CondDef->getOperand(1).getPredicate(), CondCode,
-        CondCode2);
-
-    // changeFCMPPredToAArch64CC sets CondCode2 to AL when we require two
-    // instructions to emit the comparison.
-    // TODO: Handle FCMP_UEQ and FCMP_ONE. After that, this check will be
-    // unnecessary.
-    if (CondCode2 != AArch64CC::AL)
-      return false;
-
-    // Make sure we'll be able to select the compare.
-    unsigned CmpOpc = selectFCMPOpc(*CondDef, MRI);
-    if (!CmpOpc)
-      return false;
-
-    // Emit a new compare.
-    auto Cmp = MIB.buildInstr(CmpOpc, {}, {CondDef->getOperand(2).getReg()});
-    if (CmpOpc != AArch64::FCMPSri && CmpOpc != AArch64::FCMPDri)
-      Cmp.addUse(CondDef->getOperand(3).getReg());
-    constrainSelectedInstRegOperands(*Cmp, TII, TRI, RBI);
-  }
-
-  // Emit the select.
-  unsigned CSelOpc = selectSelectOpc(I, MRI, RBI);
-  auto CSel =
-      MIB.buildInstr(CSelOpc, {I.getOperand(0).getReg()},
-                     {I.getOperand(2).getReg(), I.getOperand(3).getReg()})
-          .addImm(CondCode);
-  constrainSelectedInstRegOperands(*CSel, TII, TRI, RBI);
-  I.eraseFromParent();
-  return true;
-}
-
-MachineInstr *AArch64InstructionSelector::tryFoldIntegerCompare(
-    MachineOperand &LHS, MachineOperand &RHS, MachineOperand &Predicate,
-    MachineIRBuilder &MIRBuilder) const {
-  assert(LHS.isReg() && RHS.isReg() && Predicate.isPredicate() &&
-         "Unexpected MachineOperand");
-  MachineRegisterInfo &MRI = *MIRBuilder.getMRI();
-  // We want to find this sort of thing:
-  // x = G_SUB 0, y
-  // G_ICMP z, x
-  //
-  // In this case, we can fold the G_SUB into the G_ICMP using a CMN instead.
-  // e.g:
-  //
-  // cmn z, y
-
-  // Helper lambda to detect the subtract followed by the compare.
-  // Takes in the def of the LHS or RHS, and checks if it's a subtract from 0.
-  auto IsCMN = [&](MachineInstr *DefMI, const AArch64CC::CondCode &CC) {
-    if (!DefMI || DefMI->getOpcode() != TargetOpcode::G_SUB)
-      return false;
-
-    // Need to make sure NZCV is the same at the end of the transformation.
-    if (CC != AArch64CC::EQ && CC != AArch64CC::NE)
-      return false;
-
-    // We want to match against SUBs.
-    if (DefMI->getOpcode() != TargetOpcode::G_SUB)
-      return false;
-
-    // Make sure that we're getting
-    // x = G_SUB 0, y
-    auto ValAndVReg =
-        getConstantVRegValWithLookThrough(DefMI->getOperand(1).getReg(), MRI);
-    if (!ValAndVReg || ValAndVReg->Value != 0)
-      return false;
-
-    // This can safely be represented as a CMN.
-    return true;
-  };
-
-  // Check if the RHS or LHS of the G_ICMP is defined by a SUB
-  MachineInstr *LHSDef = getDefIgnoringCopies(LHS.getReg(), MRI);
-  MachineInstr *RHSDef = getDefIgnoringCopies(RHS.getReg(), MRI);
-  CmpInst::Predicate P = (CmpInst::Predicate)Predicate.getPredicate();
-  const AArch64CC::CondCode CC = changeICMPPredToAArch64CC(P);
-
-  // Given this:
-  //
-  // x = G_SUB 0, y
-  // G_ICMP x, z
-  //
-  // Produce this:
-  //
-  // cmn y, z
-  if (IsCMN(LHSDef, CC))
-    return emitCMN(LHSDef->getOperand(2), RHS, MIRBuilder);
-
-  // Same idea here, but with the RHS of the compare instead:
-  //
-  // Given this:
-  //
-  // x = G_SUB 0, y
-  // G_ICMP z, x
-  //
-  // Produce this:
-  //
-  // cmn z, y
-  if (IsCMN(RHSDef, CC))
-    return emitCMN(LHS, RHSDef->getOperand(2), MIRBuilder);
-
-  // Given this:
-  //
-  // z = G_AND x, y
-  // G_ICMP z, 0
-  //
-  // Produce this if the compare is signed:
-  //
-  // tst x, y
-  if (!isUnsignedICMPPred(P) && LHSDef &&
-      LHSDef->getOpcode() == TargetOpcode::G_AND) {
-    // Make sure that the RHS is 0.
-    auto ValAndVReg = getConstantVRegValWithLookThrough(RHS.getReg(), MRI);
-    if (!ValAndVReg || ValAndVReg->Value != 0)
-      return nullptr;
-
-    return emitTST(LHSDef->getOperand(1).getReg(),
-                   LHSDef->getOperand(2).getReg(), MIRBuilder);
-  }
-
-  return nullptr;
-}
-
-bool AArch64InstructionSelector::tryOptVectorDup(MachineInstr &I) const {
-  // Try to match a vector splat operation into a dup instruction.
-  // We're looking for this pattern:
-  //    %scalar:gpr(s64) = COPY $x0
-  //    %undef:fpr(<2 x s64>) = G_IMPLICIT_DEF
-  //    %cst0:gpr(s32) = G_CONSTANT i32 0
-  //    %zerovec:fpr(<2 x s32>) = G_BUILD_VECTOR %cst0(s32), %cst0(s32)
-  //    %ins:fpr(<2 x s64>) = G_INSERT_VECTOR_ELT %undef, %scalar(s64), %cst0(s32)
-  //    %splat:fpr(<2 x s64>) = G_SHUFFLE_VECTOR %ins(<2 x s64>), %undef,
-  //                                             %zerovec(<2 x s32>)
-  //
-  // ...into:
-  // %splat = DUP %scalar
-  // We use the regbank of the scalar to determine which kind of dup to use.
-  MachineIRBuilder MIB(I);
-  MachineRegisterInfo &MRI = *MIB.getMRI();
-  const TargetRegisterInfo &TRI = *MRI.getTargetRegisterInfo();
-  using namespace TargetOpcode;
-  using namespace MIPatternMatch;
-
-  // Begin matching the insert.
-  auto *InsMI =
-      getOpcodeDef(G_INSERT_VECTOR_ELT, I.getOperand(1).getReg(), MRI);
-  if (!InsMI)
-    return false;
-  // Match the undef vector operand.
-  auto *UndefMI =
-      getOpcodeDef(G_IMPLICIT_DEF, InsMI->getOperand(1).getReg(), MRI);
-  if (!UndefMI)
-    return false;
-  // Match the scalar being splatted.
-  Register ScalarReg = InsMI->getOperand(2).getReg();
-  const RegisterBank *ScalarRB = RBI.getRegBank(ScalarReg, MRI, TRI);
-  // Match the index constant 0.
-  int64_t Index = 0;
-  if (!mi_match(InsMI->getOperand(3).getReg(), MRI, m_ICst(Index)) || Index)
-    return false;
-
-  // The shuffle's second operand doesn't matter if the mask is all zero.
-  ArrayRef<int> Mask = I.getOperand(3).getShuffleMask();
-  if (!all_of(Mask, [](int Elem) { return Elem == 0; }))
-    return false;
-
-  // We're done, now find out what kind of splat we need.
-  LLT VecTy = MRI.getType(I.getOperand(0).getReg());
-  LLT EltTy = VecTy.getElementType();
-  if (EltTy.getSizeInBits() < 32) {
-    LLVM_DEBUG(dbgs() << "Could not optimize splat pattern < 32b elts yet");
-    return false;
-  }
-  bool IsFP = ScalarRB->getID() == AArch64::FPRRegBankID;
-  unsigned Opc = 0;
-  if (IsFP) {
-    switch (EltTy.getSizeInBits()) {
-    case 32:
-      if (VecTy.getNumElements() == 2) {
-        Opc = AArch64::DUPv2i32lane;
-      } else {
-        Opc = AArch64::DUPv4i32lane;
-        assert(VecTy.getNumElements() == 4);
-      }
-      break;
-    case 64:
-      assert(VecTy.getNumElements() == 2 && "Unexpected num elts");
-      Opc = AArch64::DUPv2i64lane;
-      break;
-    }
-  } else {
-    switch (EltTy.getSizeInBits()) {
-    case 32:
-      if (VecTy.getNumElements() == 2) {
-        Opc = AArch64::DUPv2i32gpr;
-      } else {
-        Opc = AArch64::DUPv4i32gpr;
-        assert(VecTy.getNumElements() == 4);
-      }
-      break;
-    case 64:
-      assert(VecTy.getNumElements() == 2 && "Unexpected num elts");
-      Opc = AArch64::DUPv2i64gpr;
-      break;
-    }
-  }
-  assert(Opc && "Did not compute an opcode for a dup");
-
-  // For FP splats, we need to widen the scalar reg via undef too.
-  if (IsFP) {
-    MachineInstr *Widen = emitScalarToVector(
-        EltTy.getSizeInBits(), &AArch64::FPR128RegClass, ScalarReg, MIB);
-    if (!Widen)
-      return false;
-    ScalarReg = Widen->getOperand(0).getReg();
-  }
-  auto Dup = MIB.buildInstr(Opc, {I.getOperand(0).getReg()}, {ScalarReg});
-  if (IsFP)
-    Dup.addImm(0);
-  constrainSelectedInstRegOperands(*Dup, TII, TRI, RBI);
-  I.eraseFromParent();
-  return true;
-}
-
-bool AArch64InstructionSelector::tryOptVectorShuffle(MachineInstr &I) const {
-  if (TM.getOptLevel() == CodeGenOpt::None)
-    return false;
-  if (tryOptVectorDup(I))
-    return true;
-  return false;
-}
-
-bool AArch64InstructionSelector::selectShuffleVector(
-    MachineInstr &I, MachineRegisterInfo &MRI) const {
-  if (tryOptVectorShuffle(I))
-    return true;
-  const LLT DstTy = MRI.getType(I.getOperand(0).getReg());
-  Register Src1Reg = I.getOperand(1).getReg();
-  const LLT Src1Ty = MRI.getType(Src1Reg);
-  Register Src2Reg = I.getOperand(2).getReg();
-  const LLT Src2Ty = MRI.getType(Src2Reg);
-  ArrayRef<int> Mask = I.getOperand(3).getShuffleMask();
-
-  MachineBasicBlock &MBB = *I.getParent();
-  MachineFunction &MF = *MBB.getParent();
-  LLVMContext &Ctx = MF.getFunction().getContext();
-
-  // G_SHUFFLE_VECTOR is weird in that the source operands can be scalars, if
-  // it's originated from a <1 x T> type. Those should have been lowered into
-  // G_BUILD_VECTOR earlier.
-  if (!Src1Ty.isVector() || !Src2Ty.isVector()) {
-    LLVM_DEBUG(dbgs() << "Could not select a \"scalar\" G_SHUFFLE_VECTOR\n");
-    return false;
-  }
-
-  unsigned BytesPerElt = DstTy.getElementType().getSizeInBits() / 8;
-
-  SmallVector<Constant *, 64> CstIdxs;
-  for (int Val : Mask) {
-    // For now, any undef indexes we'll just assume to be 0. This should be
-    // optimized in future, e.g. to select DUP etc.
-    Val = Val < 0 ? 0 : Val;
-    for (unsigned Byte = 0; Byte < BytesPerElt; ++Byte) {
-      unsigned Offset = Byte + Val * BytesPerElt;
-      CstIdxs.emplace_back(ConstantInt::get(Type::getInt8Ty(Ctx), Offset));
-    }
-  }
-
-  MachineIRBuilder MIRBuilder(I);
-
-  // Use a constant pool to load the index vector for TBL.
-  Constant *CPVal = ConstantVector::get(CstIdxs);
-  MachineInstr *IndexLoad = emitLoadFromConstantPool(CPVal, MIRBuilder);
-  if (!IndexLoad) {
-    LLVM_DEBUG(dbgs() << "Could not load from a constant pool");
-    return false;
-  }
-
-  if (DstTy.getSizeInBits() != 128) {
-    assert(DstTy.getSizeInBits() == 64 && "Unexpected shuffle result ty");
-    // This case can be done with TBL1.
-    MachineInstr *Concat = emitVectorConcat(None, Src1Reg, Src2Reg, MIRBuilder);
-    if (!Concat) {
-      LLVM_DEBUG(dbgs() << "Could not do vector concat for tbl1");
-      return false;
-    }
-
-    // The constant pool load will be 64 bits, so need to convert to FPR128 reg.
-    IndexLoad =
-        emitScalarToVector(64, &AArch64::FPR128RegClass,
-                           IndexLoad->getOperand(0).getReg(), MIRBuilder);
-
-    auto TBL1 = MIRBuilder.buildInstr(
-        AArch64::TBLv16i8One, {&AArch64::FPR128RegClass},
-        {Concat->getOperand(0).getReg(), IndexLoad->getOperand(0).getReg()});
-    constrainSelectedInstRegOperands(*TBL1, TII, TRI, RBI);
-
-    auto Copy =
-        MIRBuilder
-            .buildInstr(TargetOpcode::COPY, {I.getOperand(0).getReg()}, {})
-            .addReg(TBL1.getReg(0), 0, AArch64::dsub);
-    RBI.constrainGenericRegister(Copy.getReg(0), AArch64::FPR64RegClass, MRI);
-    I.eraseFromParent();
-    return true;
-  }
-
-  // For TBL2 we need to emit a REG_SEQUENCE to tie together two consecutive
-  // Q registers for regalloc.
-  auto RegSeq = MIRBuilder
-                    .buildInstr(TargetOpcode::REG_SEQUENCE,
-                                {&AArch64::QQRegClass}, {Src1Reg})
-                    .addImm(AArch64::qsub0)
-                    .addUse(Src2Reg)
-                    .addImm(AArch64::qsub1);
-
-  auto TBL2 =
-      MIRBuilder.buildInstr(AArch64::TBLv16i8Two, {I.getOperand(0).getReg()},
-                            {RegSeq, IndexLoad->getOperand(0).getReg()});
-  constrainSelectedInstRegOperands(*RegSeq, TII, TRI, RBI);
-  constrainSelectedInstRegOperands(*TBL2, TII, TRI, RBI);
-  I.eraseFromParent();
-  return true;
-}
-
-MachineInstr *AArch64InstructionSelector::emitLaneInsert(
-    Optional<Register> DstReg, Register SrcReg, Register EltReg,
-    unsigned LaneIdx, const RegisterBank &RB,
-    MachineIRBuilder &MIRBuilder) const {
-  MachineInstr *InsElt = nullptr;
-  const TargetRegisterClass *DstRC = &AArch64::FPR128RegClass;
-  MachineRegisterInfo &MRI = *MIRBuilder.getMRI();
-
-  // Create a register to define with the insert if one wasn't passed in.
-  if (!DstReg)
-    DstReg = MRI.createVirtualRegister(DstRC);
-
-  unsigned EltSize = MRI.getType(EltReg).getSizeInBits();
-  unsigned Opc = getInsertVecEltOpInfo(RB, EltSize).first;
-
-  if (RB.getID() == AArch64::FPRRegBankID) {
-    auto InsSub = emitScalarToVector(EltSize, DstRC, EltReg, MIRBuilder);
-    InsElt = MIRBuilder.buildInstr(Opc, {*DstReg}, {SrcReg})
-                 .addImm(LaneIdx)
-                 .addUse(InsSub->getOperand(0).getReg())
-                 .addImm(0);
-  } else {
-    InsElt = MIRBuilder.buildInstr(Opc, {*DstReg}, {SrcReg})
-                 .addImm(LaneIdx)
-                 .addUse(EltReg);
-  }
-
-  constrainSelectedInstRegOperands(*InsElt, TII, TRI, RBI);
-  return InsElt;
-}
-
-bool AArch64InstructionSelector::selectInsertElt(
-    MachineInstr &I, MachineRegisterInfo &MRI) const {
-  assert(I.getOpcode() == TargetOpcode::G_INSERT_VECTOR_ELT);
-
-  // Get information on the destination.
-  Register DstReg = I.getOperand(0).getReg();
-  const LLT DstTy = MRI.getType(DstReg);
-  unsigned VecSize = DstTy.getSizeInBits();
-
-  // Get information on the element we want to insert into the destination.
-  Register EltReg = I.getOperand(2).getReg();
-  const LLT EltTy = MRI.getType(EltReg);
-  unsigned EltSize = EltTy.getSizeInBits();
-  if (EltSize < 16 || EltSize > 64)
-    return false; // Don't support all element types yet.
-
-  // Find the definition of the index. Bail out if it's not defined by a
-  // G_CONSTANT.
-  Register IdxReg = I.getOperand(3).getReg();
-  auto VRegAndVal = getConstantVRegValWithLookThrough(IdxReg, MRI);
-  if (!VRegAndVal)
-    return false;
-  unsigned LaneIdx = VRegAndVal->Value;
-
-  // Perform the lane insert.
-  Register SrcReg = I.getOperand(1).getReg();
-  const RegisterBank &EltRB = *RBI.getRegBank(EltReg, MRI, TRI);
-  MachineIRBuilder MIRBuilder(I);
-
-  if (VecSize < 128) {
-    // If the vector we're inserting into is smaller than 128 bits, widen it
-    // to 128 to do the insert.
-    MachineInstr *ScalarToVec = emitScalarToVector(
-        VecSize, &AArch64::FPR128RegClass, SrcReg, MIRBuilder);
-    if (!ScalarToVec)
-      return false;
-    SrcReg = ScalarToVec->getOperand(0).getReg();
-  }
-
-  // Create an insert into a new FPR128 register.
-  // Note that if our vector is already 128 bits, we end up emitting an extra
-  // register.
-  MachineInstr *InsMI =
-      emitLaneInsert(None, SrcReg, EltReg, LaneIdx, EltRB, MIRBuilder);
-
-  if (VecSize < 128) {
-    // If we had to widen to perform the insert, then we have to demote back to
-    // the original size to get the result we want.
-    Register DemoteVec = InsMI->getOperand(0).getReg();
-    const TargetRegisterClass *RC =
-        getMinClassForRegBank(*RBI.getRegBank(DemoteVec, MRI, TRI), VecSize);
-    if (RC != &AArch64::FPR32RegClass && RC != &AArch64::FPR64RegClass) {
-      LLVM_DEBUG(dbgs() << "Unsupported register class!\n");
-      return false;
-    }
-    unsigned SubReg = 0;
-    if (!getSubRegForClass(RC, TRI, SubReg))
-      return false;
-    if (SubReg != AArch64::ssub && SubReg != AArch64::dsub) {
-      LLVM_DEBUG(dbgs() << "Unsupported destination size! (" << VecSize
-                        << "\n");
-      return false;
-    }
-    MIRBuilder.buildInstr(TargetOpcode::COPY, {DstReg}, {})
-        .addReg(DemoteVec, 0, SubReg);
-    RBI.constrainGenericRegister(DstReg, *RC, MRI);
-  } else {
-    // No widening needed.
-    InsMI->getOperand(0).setReg(DstReg);
-    constrainSelectedInstRegOperands(*InsMI, TII, TRI, RBI);
-  }
-
-  I.eraseFromParent();
-  return true;
-}
-
-bool AArch64InstructionSelector::selectBuildVector(
-    MachineInstr &I, MachineRegisterInfo &MRI) const {
-  assert(I.getOpcode() == TargetOpcode::G_BUILD_VECTOR);
-  // Until we port more of the optimized selections, for now just use a vector
-  // insert sequence.
-  const LLT DstTy = MRI.getType(I.getOperand(0).getReg());
-  const LLT EltTy = MRI.getType(I.getOperand(1).getReg());
-  unsigned EltSize = EltTy.getSizeInBits();
-  if (EltSize < 16 || EltSize > 64)
-    return false; // Don't support all element types yet.
-  const RegisterBank &RB = *RBI.getRegBank(I.getOperand(1).getReg(), MRI, TRI);
-  MachineIRBuilder MIRBuilder(I);
-
-  const TargetRegisterClass *DstRC = &AArch64::FPR128RegClass;
-  MachineInstr *ScalarToVec =
-      emitScalarToVector(DstTy.getElementType().getSizeInBits(), DstRC,
-                         I.getOperand(1).getReg(), MIRBuilder);
-  if (!ScalarToVec)
-    return false;
-
-  Register DstVec = ScalarToVec->getOperand(0).getReg();
-  unsigned DstSize = DstTy.getSizeInBits();
-
-  // Keep track of the last MI we inserted. Later on, we might be able to save
-  // a copy using it.
-  MachineInstr *PrevMI = nullptr;
-  for (unsigned i = 2, e = DstSize / EltSize + 1; i < e; ++i) {
-    // Note that if we don't do a subregister copy, we can end up making an
-    // extra register.
-    PrevMI = &*emitLaneInsert(None, DstVec, I.getOperand(i).getReg(), i - 1, RB,
-                              MIRBuilder);
-    DstVec = PrevMI->getOperand(0).getReg();
-  }
-
-  // If DstTy's size in bits is less than 128, then emit a subregister copy
-  // from DstVec to the last register we've defined.
-  if (DstSize < 128) {
-    // Force this to be FPR using the destination vector.
-    const TargetRegisterClass *RC =
-        getMinClassForRegBank(*RBI.getRegBank(DstVec, MRI, TRI), DstSize);
-    if (!RC)
-      return false;
-    if (RC != &AArch64::FPR32RegClass && RC != &AArch64::FPR64RegClass) {
-      LLVM_DEBUG(dbgs() << "Unsupported register class!\n");
-      return false;
-    }
-
-    unsigned SubReg = 0;
-    if (!getSubRegForClass(RC, TRI, SubReg))
-      return false;
-    if (SubReg != AArch64::ssub && SubReg != AArch64::dsub) {
-      LLVM_DEBUG(dbgs() << "Unsupported destination size! (" << DstSize
-                        << "\n");
-      return false;
-    }
-
-    Register Reg = MRI.createVirtualRegister(RC);
-    Register DstReg = I.getOperand(0).getReg();
-
-    MIRBuilder.buildInstr(TargetOpcode::COPY, {DstReg}, {})
-        .addReg(DstVec, 0, SubReg);
-    MachineOperand &RegOp = I.getOperand(1);
-    RegOp.setReg(Reg);
-    RBI.constrainGenericRegister(DstReg, *RC, MRI);
-  } else {
-    // We don't need a subregister copy. Save a copy by re-using the
-    // destination register on the final insert.
-    assert(PrevMI && "PrevMI was null?");
-    PrevMI->getOperand(0).setReg(I.getOperand(0).getReg());
-    constrainSelectedInstRegOperands(*PrevMI, TII, TRI, RBI);
-  }
-
-  I.eraseFromParent();
-  return true;
-}
-
-/// Helper function to find an intrinsic ID on an a MachineInstr. Returns the
-/// ID if it exists, and 0 otherwise.
-static unsigned findIntrinsicID(MachineInstr &I) {
-  auto IntrinOp = find_if(I.operands(), [&](const MachineOperand &Op) {
-    return Op.isIntrinsicID();
-  });
-  if (IntrinOp == I.operands_end())
-    return 0;
-  return IntrinOp->getIntrinsicID();
-}
-
-bool AArch64InstructionSelector::selectIntrinsicWithSideEffects(
-    MachineInstr &I, MachineRegisterInfo &MRI) const {
-  // Find the intrinsic ID.
-  unsigned IntrinID = findIntrinsicID(I);
-  if (!IntrinID)
-    return false;
-  MachineIRBuilder MIRBuilder(I);
-
-  // Select the instruction.
-  switch (IntrinID) {
-  default:
-    return false;
-  case Intrinsic::trap:
-    MIRBuilder.buildInstr(AArch64::BRK, {}, {}).addImm(1);
-    break;
-  case Intrinsic::debugtrap:
-    if (!STI.isTargetWindows())
-      return false;
-    MIRBuilder.buildInstr(AArch64::BRK, {}, {}).addImm(0xF000);
-    break;
-  }
-
-  I.eraseFromParent();
-  return true;
-}
-
-bool AArch64InstructionSelector::selectIntrinsic(
-    MachineInstr &I, MachineRegisterInfo &MRI) const {
-  unsigned IntrinID = findIntrinsicID(I);
-  if (!IntrinID)
-    return false;
-  MachineIRBuilder MIRBuilder(I);
-
-  switch (IntrinID) {
-  default:
-    break;
-  case Intrinsic::aarch64_crypto_sha1h:
-    Register DstReg = I.getOperand(0).getReg();
-    Register SrcReg = I.getOperand(2).getReg();
-
-    // FIXME: Should this be an assert?
-    if (MRI.getType(DstReg).getSizeInBits() != 32 ||
-        MRI.getType(SrcReg).getSizeInBits() != 32)
-      return false;
-
-    // The operation has to happen on FPRs. Set up some new FPR registers for
-    // the source and destination if they are on GPRs.
-    if (RBI.getRegBank(SrcReg, MRI, TRI)->getID() != AArch64::FPRRegBankID) {
-      SrcReg = MRI.createVirtualRegister(&AArch64::FPR32RegClass);
-      MIRBuilder.buildCopy({SrcReg}, {I.getOperand(2)});
-
-      // Make sure the copy ends up getting constrained properly.
-      RBI.constrainGenericRegister(I.getOperand(2).getReg(),
-                                   AArch64::GPR32RegClass, MRI);
-    }
-
-    if (RBI.getRegBank(DstReg, MRI, TRI)->getID() != AArch64::FPRRegBankID)
-      DstReg = MRI.createVirtualRegister(&AArch64::FPR32RegClass);
-
-    // Actually insert the instruction.
-    auto SHA1Inst = MIRBuilder.buildInstr(AArch64::SHA1Hrr, {DstReg}, {SrcReg});
-    constrainSelectedInstRegOperands(*SHA1Inst, TII, TRI, RBI);
-
-    // Did we create a new register for the destination?
-    if (DstReg != I.getOperand(0).getReg()) {
-      // Yep. Copy the result of the instruction back into the original
-      // destination.
-      MIRBuilder.buildCopy({I.getOperand(0)}, {DstReg});
-      RBI.constrainGenericRegister(I.getOperand(0).getReg(),
-                                   AArch64::GPR32RegClass, MRI);
-    }
-
-    I.eraseFromParent();
-    return true;
-  }
-  return false;
-}
-
-static Optional<uint64_t> getImmedFromMO(const MachineOperand &Root) {
-  auto &MI = *Root.getParent();
-  auto &MBB = *MI.getParent();
-  auto &MF = *MBB.getParent();
-  auto &MRI = MF.getRegInfo();
-  uint64_t Immed;
-  if (Root.isImm())
-    Immed = Root.getImm();
-  else if (Root.isCImm())
-    Immed = Root.getCImm()->getZExtValue();
-  else if (Root.isReg()) {
-    auto ValAndVReg =
-        getConstantVRegValWithLookThrough(Root.getReg(), MRI, true);
-    if (!ValAndVReg)
-      return None;
-    Immed = ValAndVReg->Value;
-  } else
-    return None;
-  return Immed;
-}
-
-InstructionSelector::ComplexRendererFns
-AArch64InstructionSelector::selectShiftA_32(const MachineOperand &Root) const {
-  auto MaybeImmed = getImmedFromMO(Root);
-  if (MaybeImmed == None || *MaybeImmed > 31)
-    return None;
-  uint64_t Enc = (32 - *MaybeImmed) & 0x1f;
-  return {{[=](MachineInstrBuilder &MIB) { MIB.addImm(Enc); }}};
-}
-
-InstructionSelector::ComplexRendererFns
-AArch64InstructionSelector::selectShiftB_32(const MachineOperand &Root) const {
-  auto MaybeImmed = getImmedFromMO(Root);
-  if (MaybeImmed == None || *MaybeImmed > 31)
-    return None;
-  uint64_t Enc = 31 - *MaybeImmed;
-  return {{[=](MachineInstrBuilder &MIB) { MIB.addImm(Enc); }}};
-}
-
-InstructionSelector::ComplexRendererFns
-AArch64InstructionSelector::selectShiftA_64(const MachineOperand &Root) const {
-  auto MaybeImmed = getImmedFromMO(Root);
-  if (MaybeImmed == None || *MaybeImmed > 63)
-    return None;
-  uint64_t Enc = (64 - *MaybeImmed) & 0x3f;
-  return {{[=](MachineInstrBuilder &MIB) { MIB.addImm(Enc); }}};
-}
-
-InstructionSelector::ComplexRendererFns
-AArch64InstructionSelector::selectShiftB_64(const MachineOperand &Root) const {
-  auto MaybeImmed = getImmedFromMO(Root);
-  if (MaybeImmed == None || *MaybeImmed > 63)
-    return None;
-  uint64_t Enc = 63 - *MaybeImmed;
-  return {{[=](MachineInstrBuilder &MIB) { MIB.addImm(Enc); }}};
-}
-
-/// Helper to select an immediate value that can be represented as a 12-bit
-/// value shifted left by either 0 or 12. If it is possible to do so, return
-/// the immediate and shift value. If not, return None.
-///
-/// Used by selectArithImmed and selectNegArithImmed.
-InstructionSelector::ComplexRendererFns
-AArch64InstructionSelector::select12BitValueWithLeftShift(
-    uint64_t Immed) const {
-  unsigned ShiftAmt;
-  if (Immed >> 12 == 0) {
-    ShiftAmt = 0;
-  } else if ((Immed & 0xfff) == 0 && Immed >> 24 == 0) {
-    ShiftAmt = 12;
-    Immed = Immed >> 12;
-  } else
-    return None;
-
-  unsigned ShVal = AArch64_AM::getShifterImm(AArch64_AM::LSL, ShiftAmt);
-  return {{
-      [=](MachineInstrBuilder &MIB) { MIB.addImm(Immed); },
-      [=](MachineInstrBuilder &MIB) { MIB.addImm(ShVal); },
-  }};
-}
-
-/// SelectArithImmed - Select an immediate value that can be represented as
-/// a 12-bit value shifted left by either 0 or 12.  If so, return true with
-/// Val set to the 12-bit value and Shift set to the shifter operand.
-InstructionSelector::ComplexRendererFns
-AArch64InstructionSelector::selectArithImmed(MachineOperand &Root) const {
-  // This function is called from the addsub_shifted_imm ComplexPattern,
-  // which lists [imm] as the list of opcode it's interested in, however
-  // we still need to check whether the operand is actually an immediate
-  // here because the ComplexPattern opcode list is only used in
-  // root-level opcode matching.
-  auto MaybeImmed = getImmedFromMO(Root);
-  if (MaybeImmed == None)
-    return None;
-  return select12BitValueWithLeftShift(*MaybeImmed);
-}
-
-/// SelectNegArithImmed - As above, but negates the value before trying to
-/// select it.
-InstructionSelector::ComplexRendererFns
-AArch64InstructionSelector::selectNegArithImmed(MachineOperand &Root) const {
-  // We need a register here, because we need to know if we have a 64 or 32
-  // bit immediate.
-  if (!Root.isReg())
-    return None;
-  auto MaybeImmed = getImmedFromMO(Root);
-  if (MaybeImmed == None)
-    return None;
-  uint64_t Immed = *MaybeImmed;
-
-  // This negation is almost always valid, but "cmp wN, #0" and "cmn wN, #0"
-  // have the opposite effect on the C flag, so this pattern mustn't match under
-  // those circumstances.
-  if (Immed == 0)
-    return None;
-
-  // Check if we're dealing with a 32-bit type on the root or a 64-bit type on
-  // the root.
-  MachineRegisterInfo &MRI = Root.getParent()->getMF()->getRegInfo();
-  if (MRI.getType(Root.getReg()).getSizeInBits() == 32)
-    Immed = ~((uint32_t)Immed) + 1;
-  else
-    Immed = ~Immed + 1ULL;
-
-  if (Immed & 0xFFFFFFFFFF000000ULL)
-    return None;
-
-  Immed &= 0xFFFFFFULL;
-  return select12BitValueWithLeftShift(Immed);
-}
-
-/// Return true if it is worth folding MI into an extended register. That is,
-/// if it's safe to pull it into the addressing mode of a load or store as a
-/// shift.
-bool AArch64InstructionSelector::isWorthFoldingIntoExtendedReg(
-    MachineInstr &MI, const MachineRegisterInfo &MRI) const {
-  // Always fold if there is one use, or if we're optimizing for size.
-  Register DefReg = MI.getOperand(0).getReg();
-  if (MRI.hasOneUse(DefReg) ||
-      MI.getParent()->getParent()->getFunction().hasMinSize())
-    return true;
-
-  // It's better to avoid folding and recomputing shifts when we don't have a
-  // fastpath.
-  if (!STI.hasLSLFast())
-    return false;
-
-  // We have a fastpath, so folding a shift in and potentially computing it
-  // many times may be beneficial. Check if this is only used in memory ops.
-  // If it is, then we should fold.
-  return all_of(MRI.use_instructions(DefReg),
-                [](MachineInstr &Use) { return Use.mayLoadOrStore(); });
-}
-
-InstructionSelector::ComplexRendererFns
-AArch64InstructionSelector::selectExtendedSHL(
-    MachineOperand &Root, MachineOperand &Base, MachineOperand &Offset,
-    unsigned SizeInBytes, bool WantsExt) const {
-  assert(Base.isReg() && "Expected base to be a register operand");
-  assert(Offset.isReg() && "Expected offset to be a register operand");
-
-  MachineRegisterInfo &MRI = Root.getParent()->getMF()->getRegInfo();
-  MachineInstr *OffsetInst = MRI.getVRegDef(Offset.getReg());
-  if (!OffsetInst)
-    return None;
-
-  unsigned OffsetOpc = OffsetInst->getOpcode();
-  if (OffsetOpc != TargetOpcode::G_SHL && OffsetOpc != TargetOpcode::G_MUL)
-    return None;
-
-  // Make sure that the memory op is a valid size.
-  int64_t LegalShiftVal = Log2_32(SizeInBytes);
-  if (LegalShiftVal == 0)
-    return None;
-  if (!isWorthFoldingIntoExtendedReg(*OffsetInst, MRI))
-    return None;
-
-  // Now, try to find the specific G_CONSTANT. Start by assuming that the
-  // register we will offset is the LHS, and the register containing the
-  // constant is the RHS.
-  Register OffsetReg = OffsetInst->getOperand(1).getReg();
-  Register ConstantReg = OffsetInst->getOperand(2).getReg();
-  auto ValAndVReg = getConstantVRegValWithLookThrough(ConstantReg, MRI);
-  if (!ValAndVReg) {
-    // We didn't get a constant on the RHS. If the opcode is a shift, then
-    // we're done.
-    if (OffsetOpc == TargetOpcode::G_SHL)
-      return None;
-
-    // If we have a G_MUL, we can use either register. Try looking at the RHS.
-    std::swap(OffsetReg, ConstantReg);
-    ValAndVReg = getConstantVRegValWithLookThrough(ConstantReg, MRI);
-    if (!ValAndVReg)
-      return None;
-  }
-
-  // The value must fit into 3 bits, and must be positive. Make sure that is
-  // true.
-  int64_t ImmVal = ValAndVReg->Value;
-
-  // Since we're going to pull this into a shift, the constant value must be
-  // a power of 2. If we got a multiply, then we need to check this.
-  if (OffsetOpc == TargetOpcode::G_MUL) {
-    if (!isPowerOf2_32(ImmVal))
-      return None;
-
-    // Got a power of 2. So, the amount we'll shift is the log base-2 of that.
-    ImmVal = Log2_32(ImmVal);
-  }
-
-  if ((ImmVal & 0x7) != ImmVal)
-    return None;
-
-  // We are only allowed to shift by LegalShiftVal. This shift value is built
-  // into the instruction, so we can't just use whatever we want.
-  if (ImmVal != LegalShiftVal)
-    return None;
-
-  unsigned SignExtend = 0;
-  if (WantsExt) {
-    // Check if the offset is defined by an extend.
-    MachineInstr *ExtInst = getDefIgnoringCopies(OffsetReg, MRI);
-    auto Ext = getExtendTypeForInst(*ExtInst, MRI, true);
-    if (Ext == AArch64_AM::InvalidShiftExtend)
-      return None;
-
-    SignExtend = Ext == AArch64_AM::SXTW;
-
-    // Need a 32-bit wide register here.
-    MachineIRBuilder MIB(*MRI.getVRegDef(Root.getReg()));
-    OffsetReg = ExtInst->getOperand(1).getReg();
-    OffsetReg = narrowExtendRegIfNeeded(OffsetReg, MIB);
-  }
-
-  // We can use the LHS of the GEP as the base, and the LHS of the shift as an
-  // offset. Signify that we are shifting by setting the shift flag to 1.
-  return {{[=](MachineInstrBuilder &MIB) { MIB.addUse(Base.getReg()); },
-           [=](MachineInstrBuilder &MIB) { MIB.addUse(OffsetReg); },
-           [=](MachineInstrBuilder &MIB) {
-             // Need to add both immediates here to make sure that they are both
-             // added to the instruction.
-             MIB.addImm(SignExtend);
-             MIB.addImm(1);
-           }}};
-}
-
-/// This is used for computing addresses like this:
-///
-/// ldr x1, [x2, x3, lsl #3]
-///
-/// Where x2 is the base register, and x3 is an offset register. The shift-left
-/// is a constant value specific to this load instruction. That is, we'll never
-/// see anything other than a 3 here (which corresponds to the size of the
-/// element being loaded.)
-InstructionSelector::ComplexRendererFns
-AArch64InstructionSelector::selectAddrModeShiftedExtendXReg(
-    MachineOperand &Root, unsigned SizeInBytes) const {
-  if (!Root.isReg())
-    return None;
-  MachineRegisterInfo &MRI = Root.getParent()->getMF()->getRegInfo();
-
-  // We want to find something like this:
-  //
-  // val = G_CONSTANT LegalShiftVal
-  // shift = G_SHL off_reg val
-  // ptr = G_PTR_ADD base_reg shift
-  // x = G_LOAD ptr
-  //
-  // And fold it into this addressing mode:
-  //
-  // ldr x, [base_reg, off_reg, lsl #LegalShiftVal]
-
-  // Check if we can find the G_PTR_ADD.
-  MachineInstr *PtrAdd =
-      getOpcodeDef(TargetOpcode::G_PTR_ADD, Root.getReg(), MRI);
-  if (!PtrAdd || !isWorthFoldingIntoExtendedReg(*PtrAdd, MRI))
-    return None;
-
-  // Now, try to match an opcode which will match our specific offset.
-  // We want a G_SHL or a G_MUL.
-  MachineInstr *OffsetInst =
-      getDefIgnoringCopies(PtrAdd->getOperand(2).getReg(), MRI);
-  return selectExtendedSHL(Root, PtrAdd->getOperand(1),
-                           OffsetInst->getOperand(0), SizeInBytes,
-                           /*WantsExt=*/false);
-}
-
-/// This is used for computing addresses like this:
-///
-/// ldr x1, [x2, x3]
-///
-/// Where x2 is the base register, and x3 is an offset register.
-///
-/// When possible (or profitable) to fold a G_PTR_ADD into the address calculation,
-/// this will do so. Otherwise, it will return None.
-InstructionSelector::ComplexRendererFns
-AArch64InstructionSelector::selectAddrModeRegisterOffset(
-    MachineOperand &Root) const {
-  MachineRegisterInfo &MRI = Root.getParent()->getMF()->getRegInfo();
-
-  // We need a GEP.
-  MachineInstr *Gep = MRI.getVRegDef(Root.getReg());
-  if (!Gep || Gep->getOpcode() != TargetOpcode::G_PTR_ADD)
-    return None;
-
-  // If this is used more than once, let's not bother folding.
-  // TODO: Check if they are memory ops. If they are, then we can still fold
-  // without having to recompute anything.
-  if (!MRI.hasOneUse(Gep->getOperand(0).getReg()))
-    return None;
-
-  // Base is the GEP's LHS, offset is its RHS.
-  return {{[=](MachineInstrBuilder &MIB) {
-             MIB.addUse(Gep->getOperand(1).getReg());
-           },
-           [=](MachineInstrBuilder &MIB) {
-             MIB.addUse(Gep->getOperand(2).getReg());
-           },
-           [=](MachineInstrBuilder &MIB) {
-             // Need to add both immediates here to make sure that they are both
-             // added to the instruction.
-             MIB.addImm(0);
-             MIB.addImm(0);
-           }}};
-}
-
-/// This is intended to be equivalent to selectAddrModeXRO in
-/// AArch64ISelDAGtoDAG. It's used for selecting X register offset loads.
-InstructionSelector::ComplexRendererFns
-AArch64InstructionSelector::selectAddrModeXRO(MachineOperand &Root,
-                                              unsigned SizeInBytes) const {
-  MachineRegisterInfo &MRI = Root.getParent()->getMF()->getRegInfo();
-
-  // If we have a constant offset, then we probably don't want to match a
-  // register offset.
-  if (isBaseWithConstantOffset(Root, MRI))
-    return None;
-
-  // Try to fold shifts into the addressing mode.
-  auto AddrModeFns = selectAddrModeShiftedExtendXReg(Root, SizeInBytes);
-  if (AddrModeFns)
-    return AddrModeFns;
-
-  // If that doesn't work, see if it's possible to fold in registers from
-  // a GEP.
-  return selectAddrModeRegisterOffset(Root);
-}
-
-/// This is used for computing addresses like this:
-///
-/// ldr x0, [xBase, wOffset, sxtw #LegalShiftVal]
-///
-/// Where we have a 64-bit base register, a 32-bit offset register, and an
-/// extend (which may or may not be signed).
-InstructionSelector::ComplexRendererFns
-AArch64InstructionSelector::selectAddrModeWRO(MachineOperand &Root,
-                                              unsigned SizeInBytes) const {
-  MachineRegisterInfo &MRI = Root.getParent()->getMF()->getRegInfo();
-
-  MachineInstr *PtrAdd =
-      getOpcodeDef(TargetOpcode::G_PTR_ADD, Root.getReg(), MRI);
-  if (!PtrAdd || !isWorthFoldingIntoExtendedReg(*PtrAdd, MRI))
-    return None;
-
-  MachineOperand &LHS = PtrAdd->getOperand(1);
-  MachineOperand &RHS = PtrAdd->getOperand(2);
-  MachineInstr *OffsetInst = getDefIgnoringCopies(RHS.getReg(), MRI);
-
-  // The first case is the same as selectAddrModeXRO, except we need an extend.
-  // In this case, we try to find a shift and extend, and fold them into the
-  // addressing mode.
-  //
-  // E.g.
-  //
-  // off_reg = G_Z/S/ANYEXT ext_reg
-  // val = G_CONSTANT LegalShiftVal
-  // shift = G_SHL off_reg val
-  // ptr = G_PTR_ADD base_reg shift
-  // x = G_LOAD ptr
-  //
-  // In this case we can get a load like this:
-  //
-  // ldr x0, [base_reg, ext_reg, sxtw #LegalShiftVal]
-  auto ExtendedShl = selectExtendedSHL(Root, LHS, OffsetInst->getOperand(0),
-                                       SizeInBytes, /*WantsExt=*/true);
-  if (ExtendedShl)
-    return ExtendedShl;
-
-  // There was no shift. We can try and fold a G_Z/S/ANYEXT in alone though.
-  //
-  // e.g.
-  // ldr something, [base_reg, ext_reg, sxtw]
-  if (!isWorthFoldingIntoExtendedReg(*OffsetInst, MRI))
-    return None;
-
-  // Check if this is an extend. We'll get an extend type if it is.
-  AArch64_AM::ShiftExtendType Ext =
-      getExtendTypeForInst(*OffsetInst, MRI, /*IsLoadStore=*/true);
-  if (Ext == AArch64_AM::InvalidShiftExtend)
-    return None;
-
-  // Need a 32-bit wide register.
-  MachineIRBuilder MIB(*PtrAdd);
-  Register ExtReg =
-      narrowExtendRegIfNeeded(OffsetInst->getOperand(1).getReg(), MIB);
-  unsigned SignExtend = Ext == AArch64_AM::SXTW;
-
-  // Base is LHS, offset is ExtReg.
-  return {{[=](MachineInstrBuilder &MIB) { MIB.addUse(LHS.getReg()); },
-           [=](MachineInstrBuilder &MIB) { MIB.addUse(ExtReg); },
-           [=](MachineInstrBuilder &MIB) {
-             MIB.addImm(SignExtend);
-             MIB.addImm(0);
-           }}};
-}
-
-/// Select a "register plus unscaled signed 9-bit immediate" address.  This
-/// should only match when there is an offset that is not valid for a scaled
-/// immediate addressing mode.  The "Size" argument is the size in bytes of the
-/// memory reference, which is needed here to know what is valid for a scaled
-/// immediate.
-InstructionSelector::ComplexRendererFns
-AArch64InstructionSelector::selectAddrModeUnscaled(MachineOperand &Root,
-                                                   unsigned Size) const {
-  MachineRegisterInfo &MRI =
-      Root.getParent()->getParent()->getParent()->getRegInfo();
-
-  if (!Root.isReg())
-    return None;
-
-  if (!isBaseWithConstantOffset(Root, MRI))
-    return None;
-
-  MachineInstr *RootDef = MRI.getVRegDef(Root.getReg());
-  if (!RootDef)
-    return None;
-
-  MachineOperand &OffImm = RootDef->getOperand(2);
-  if (!OffImm.isReg())
-    return None;
-  MachineInstr *RHS = MRI.getVRegDef(OffImm.getReg());
-  if (!RHS || RHS->getOpcode() != TargetOpcode::G_CONSTANT)
-    return None;
-  int64_t RHSC;
-  MachineOperand &RHSOp1 = RHS->getOperand(1);
-  if (!RHSOp1.isCImm() || RHSOp1.getCImm()->getBitWidth() > 64)
-    return None;
-  RHSC = RHSOp1.getCImm()->getSExtValue();
-
-  // If the offset is valid as a scaled immediate, don't match here.
-  if ((RHSC & (Size - 1)) == 0 && RHSC >= 0 && RHSC < (0x1000 << Log2_32(Size)))
-    return None;
-  if (RHSC >= -256 && RHSC < 256) {
-    MachineOperand &Base = RootDef->getOperand(1);
-    return {{
-        [=](MachineInstrBuilder &MIB) { MIB.add(Base); },
-        [=](MachineInstrBuilder &MIB) { MIB.addImm(RHSC); },
-    }};
-  }
-  return None;
-}
-
-/// Select a "register plus scaled unsigned 12-bit immediate" address.  The
-/// "Size" argument is the size in bytes of the memory reference, which
-/// determines the scale.
-InstructionSelector::ComplexRendererFns
-AArch64InstructionSelector::selectAddrModeIndexed(MachineOperand &Root,
-                                                  unsigned Size) const {
-  MachineRegisterInfo &MRI =
-      Root.getParent()->getParent()->getParent()->getRegInfo();
-
-  if (!Root.isReg())
-    return None;
-
-  MachineInstr *RootDef = MRI.getVRegDef(Root.getReg());
-  if (!RootDef)
-    return None;
-
-  if (RootDef->getOpcode() == TargetOpcode::G_FRAME_INDEX) {
-    return {{
-        [=](MachineInstrBuilder &MIB) { MIB.add(RootDef->getOperand(1)); },
-        [=](MachineInstrBuilder &MIB) { MIB.addImm(0); },
-    }};
-  }
-
-  if (isBaseWithConstantOffset(Root, MRI)) {
-    MachineOperand &LHS = RootDef->getOperand(1);
-    MachineOperand &RHS = RootDef->getOperand(2);
-    MachineInstr *LHSDef = MRI.getVRegDef(LHS.getReg());
-    MachineInstr *RHSDef = MRI.getVRegDef(RHS.getReg());
-    if (LHSDef && RHSDef) {
-      int64_t RHSC = (int64_t)RHSDef->getOperand(1).getCImm()->getZExtValue();
-      unsigned Scale = Log2_32(Size);
-      if ((RHSC & (Size - 1)) == 0 && RHSC >= 0 && RHSC < (0x1000 << Scale)) {
-        if (LHSDef->getOpcode() == TargetOpcode::G_FRAME_INDEX)
-          return {{
-              [=](MachineInstrBuilder &MIB) { MIB.add(LHSDef->getOperand(1)); },
-              [=](MachineInstrBuilder &MIB) { MIB.addImm(RHSC >> Scale); },
-          }};
-
-        return {{
-            [=](MachineInstrBuilder &MIB) { MIB.add(LHS); },
-            [=](MachineInstrBuilder &MIB) { MIB.addImm(RHSC >> Scale); },
-        }};
-      }
-    }
-  }
-
-  // Before falling back to our general case, check if the unscaled
-  // instructions can handle this. If so, that's preferable.
-  if (selectAddrModeUnscaled(Root, Size).hasValue())
-    return None;
-
-  return {{
-      [=](MachineInstrBuilder &MIB) { MIB.add(Root); },
-      [=](MachineInstrBuilder &MIB) { MIB.addImm(0); },
-  }};
-}
-
-/// Given a shift instruction, return the correct shift type for that
-/// instruction.
-static AArch64_AM::ShiftExtendType getShiftTypeForInst(MachineInstr &MI) {
-  // TODO: Handle AArch64_AM::ROR
-  switch (MI.getOpcode()) {
-  default:
-    return AArch64_AM::InvalidShiftExtend;
-  case TargetOpcode::G_SHL:
-    return AArch64_AM::LSL;
-  case TargetOpcode::G_LSHR:
-    return AArch64_AM::LSR;
-  case TargetOpcode::G_ASHR:
-    return AArch64_AM::ASR;
-  }
-}
-
-/// Select a "shifted register" operand. If the value is not shifted, set the
-/// shift operand to a default value of "lsl 0".
-///
-/// TODO: Allow shifted register to be rotated in logical instructions.
-InstructionSelector::ComplexRendererFns
-AArch64InstructionSelector::selectShiftedRegister(MachineOperand &Root) const {
-  if (!Root.isReg())
-    return None;
-  MachineRegisterInfo &MRI =
-      Root.getParent()->getParent()->getParent()->getRegInfo();
-
-  // Check if the operand is defined by an instruction which corresponds to
-  // a ShiftExtendType. E.g. a G_SHL, G_LSHR, etc.
-  //
-  // TODO: Handle AArch64_AM::ROR for logical instructions.
-  MachineInstr *ShiftInst = MRI.getVRegDef(Root.getReg());
-  if (!ShiftInst)
-    return None;
-  AArch64_AM::ShiftExtendType ShType = getShiftTypeForInst(*ShiftInst);
-  if (ShType == AArch64_AM::InvalidShiftExtend)
-    return None;
-  if (!isWorthFoldingIntoExtendedReg(*ShiftInst, MRI))
-    return None;
-
-  // Need an immediate on the RHS.
-  MachineOperand &ShiftRHS = ShiftInst->getOperand(2);
-  auto Immed = getImmedFromMO(ShiftRHS);
-  if (!Immed)
-    return None;
-
-  // We have something that we can fold. Fold in the shift's LHS and RHS into
-  // the instruction.
-  MachineOperand &ShiftLHS = ShiftInst->getOperand(1);
-  Register ShiftReg = ShiftLHS.getReg();
-
-  unsigned NumBits = MRI.getType(ShiftReg).getSizeInBits();
-  unsigned Val = *Immed & (NumBits - 1);
-  unsigned ShiftVal = AArch64_AM::getShifterImm(ShType, Val);
-
-  return {{[=](MachineInstrBuilder &MIB) { MIB.addUse(ShiftReg); },
-           [=](MachineInstrBuilder &MIB) { MIB.addImm(ShiftVal); }}};
-}
-
-AArch64_AM::ShiftExtendType AArch64InstructionSelector::getExtendTypeForInst(
-    MachineInstr &MI, MachineRegisterInfo &MRI, bool IsLoadStore) const {
-  unsigned Opc = MI.getOpcode();
-
-  // Handle explicit extend instructions first.
-  if (Opc == TargetOpcode::G_SEXT || Opc == TargetOpcode::G_SEXT_INREG) {
-    unsigned Size = MRI.getType(MI.getOperand(1).getReg()).getSizeInBits();
-    assert(Size != 64 && "Extend from 64 bits?");
-    switch (Size) {
-    case 8:
-      return AArch64_AM::SXTB;
-    case 16:
-      return AArch64_AM::SXTH;
-    case 32:
-      return AArch64_AM::SXTW;
-    default:
-      return AArch64_AM::InvalidShiftExtend;
-    }
-  }
-
-  if (Opc == TargetOpcode::G_ZEXT || Opc == TargetOpcode::G_ANYEXT) {
-    unsigned Size = MRI.getType(MI.getOperand(1).getReg()).getSizeInBits();
-    assert(Size != 64 && "Extend from 64 bits?");
-    switch (Size) {
-    case 8:
-      return AArch64_AM::UXTB;
-    case 16:
-      return AArch64_AM::UXTH;
-    case 32:
-      return AArch64_AM::UXTW;
-    default:
-      return AArch64_AM::InvalidShiftExtend;
-    }
-  }
-
-  // Don't have an explicit extend. Try to handle a G_AND with a constant mask
-  // on the RHS.
-  if (Opc != TargetOpcode::G_AND)
-    return AArch64_AM::InvalidShiftExtend;
-
-  Optional<uint64_t> MaybeAndMask = getImmedFromMO(MI.getOperand(2));
-  if (!MaybeAndMask)
-    return AArch64_AM::InvalidShiftExtend;
-  uint64_t AndMask = *MaybeAndMask;
-  switch (AndMask) {
-  default:
-    return AArch64_AM::InvalidShiftExtend;
-  case 0xFF:
-    return !IsLoadStore ? AArch64_AM::UXTB : AArch64_AM::InvalidShiftExtend;
-  case 0xFFFF:
-    return !IsLoadStore ? AArch64_AM::UXTH : AArch64_AM::InvalidShiftExtend;
-  case 0xFFFFFFFF:
-    return AArch64_AM::UXTW;
-  }
-}
-
-Register AArch64InstructionSelector::narrowExtendRegIfNeeded(
-    Register ExtReg, MachineIRBuilder &MIB) const {
-  MachineRegisterInfo &MRI = *MIB.getMRI();
-  if (MRI.getType(ExtReg).getSizeInBits() == 32)
-    return ExtReg;
-
-  // Insert a copy to move ExtReg to GPR32.
-  Register NarrowReg = MRI.createVirtualRegister(&AArch64::GPR32RegClass);
-  auto Copy = MIB.buildCopy({NarrowReg}, {ExtReg});
-
-  // Select the copy into a subregister copy.
-  selectCopy(*Copy, TII, MRI, TRI, RBI);
-  return Copy.getReg(0);
-}
-
-/// Select an "extended register" operand. This operand folds in an extend
-/// followed by an optional left shift.
-InstructionSelector::ComplexRendererFns
-AArch64InstructionSelector::selectArithExtendedRegister(
-    MachineOperand &Root) const {
-  if (!Root.isReg())
-    return None;
-  MachineRegisterInfo &MRI =
-      Root.getParent()->getParent()->getParent()->getRegInfo();
-
-  uint64_t ShiftVal = 0;
-  Register ExtReg;
-  AArch64_AM::ShiftExtendType Ext;
-  MachineInstr *RootDef = getDefIgnoringCopies(Root.getReg(), MRI);
-  if (!RootDef)
-    return None;
-
-  if (!isWorthFoldingIntoExtendedReg(*RootDef, MRI))
-    return None;
-
-  // Check if we can fold a shift and an extend.
-  if (RootDef->getOpcode() == TargetOpcode::G_SHL) {
-    // Look for a constant on the RHS of the shift.
-    MachineOperand &RHS = RootDef->getOperand(2);
-    Optional<uint64_t> MaybeShiftVal = getImmedFromMO(RHS);
-    if (!MaybeShiftVal)
-      return None;
-    ShiftVal = *MaybeShiftVal;
-    if (ShiftVal > 4)
-      return None;
-    // Look for a valid extend instruction on the LHS of the shift.
-    MachineOperand &LHS = RootDef->getOperand(1);
-    MachineInstr *ExtDef = getDefIgnoringCopies(LHS.getReg(), MRI);
-    if (!ExtDef)
-      return None;
-    Ext = getExtendTypeForInst(*ExtDef, MRI);
-    if (Ext == AArch64_AM::InvalidShiftExtend)
-      return None;
-    ExtReg = ExtDef->getOperand(1).getReg();
-  } else {
-    // Didn't get a shift. Try just folding an extend.
-    Ext = getExtendTypeForInst(*RootDef, MRI);
-    if (Ext == AArch64_AM::InvalidShiftExtend)
-      return None;
-    ExtReg = RootDef->getOperand(1).getReg();
-
-    // If we have a 32 bit instruction which zeroes out the high half of a
-    // register, we get an implicit zero extend for free. Check if we have one.
-    // FIXME: We actually emit the extend right now even though we don't have
-    // to.
-    if (Ext == AArch64_AM::UXTW && MRI.getType(ExtReg).getSizeInBits() == 32) {
-      MachineInstr *ExtInst = MRI.getVRegDef(ExtReg);
-      if (ExtInst && isDef32(*ExtInst))
-        return None;
-    }
-  }
-
-  // We require a GPR32 here. Narrow the ExtReg if needed using a subregister
-  // copy.
-  MachineIRBuilder MIB(*RootDef);
-  ExtReg = narrowExtendRegIfNeeded(ExtReg, MIB);
-
-  return {{[=](MachineInstrBuilder &MIB) { MIB.addUse(ExtReg); },
-           [=](MachineInstrBuilder &MIB) {
-             MIB.addImm(getArithExtendImm(Ext, ShiftVal));
-           }}};
-}
-
-void AArch64InstructionSelector::renderTruncImm(MachineInstrBuilder &MIB,
-                                                const MachineInstr &MI,
-                                                int OpIdx) const {
-  const MachineRegisterInfo &MRI = MI.getParent()->getParent()->getRegInfo();
-  assert(MI.getOpcode() == TargetOpcode::G_CONSTANT && OpIdx == -1 &&
-         "Expected G_CONSTANT");
-  Optional<int64_t> CstVal = getConstantVRegVal(MI.getOperand(0).getReg(), MRI);
-  assert(CstVal && "Expected constant value");
-  MIB.addImm(CstVal.getValue());
-}
-
-void AArch64InstructionSelector::renderLogicalImm32(
-  MachineInstrBuilder &MIB, const MachineInstr &I, int OpIdx) const {
-  assert(I.getOpcode() == TargetOpcode::G_CONSTANT && OpIdx == -1 &&
-         "Expected G_CONSTANT");
-  uint64_t CstVal = I.getOperand(1).getCImm()->getZExtValue();
-  uint64_t Enc = AArch64_AM::encodeLogicalImmediate(CstVal, 32);
-  MIB.addImm(Enc);
-}
-
-void AArch64InstructionSelector::renderLogicalImm64(
-  MachineInstrBuilder &MIB, const MachineInstr &I, int OpIdx) const {
-  assert(I.getOpcode() == TargetOpcode::G_CONSTANT && OpIdx == -1 &&
-         "Expected G_CONSTANT");
-  uint64_t CstVal = I.getOperand(1).getCImm()->getZExtValue();
-  uint64_t Enc = AArch64_AM::encodeLogicalImmediate(CstVal, 64);
-  MIB.addImm(Enc);
-}
-
-bool AArch64InstructionSelector::isLoadStoreOfNumBytes(
-    const MachineInstr &MI, unsigned NumBytes) const {
-  if (!MI.mayLoadOrStore())
-    return false;
-  assert(MI.hasOneMemOperand() &&
-         "Expected load/store to have only one mem op!");
-  return (*MI.memoperands_begin())->getSize() == NumBytes;
-}
-
-bool AArch64InstructionSelector::isDef32(const MachineInstr &MI) const {
-  const MachineRegisterInfo &MRI = MI.getParent()->getParent()->getRegInfo();
-  if (MRI.getType(MI.getOperand(0).getReg()).getSizeInBits() != 32)
-    return false;
-
-  // Only return true if we know the operation will zero-out the high half of
-  // the 64-bit register. Truncates can be subregister copies, which don't
-  // zero out the high bits. Copies and other copy-like instructions can be
-  // fed by truncates, or could be lowered as subregister copies.
-  switch (MI.getOpcode()) {
-  default:
-    return true;
-  case TargetOpcode::COPY:
-  case TargetOpcode::G_BITCAST:
-  case TargetOpcode::G_TRUNC:
-  case TargetOpcode::G_PHI:
-    return false;
-  }
-}
-
-namespace llvm {
-InstructionSelector *
-createAArch64InstructionSelector(const AArch64TargetMachine &TM,
-                                 AArch64Subtarget &Subtarget,
-                                 AArch64RegisterBankInfo &RBI) {
-  return new AArch64InstructionSelector(TM, Subtarget, RBI);
-}
-}
diff --git a/gnu/llvm/llvm/lib/Target/AArch64/AArch64LegalizerInfo.cpp b/gnu/llvm/llvm/lib/Target/AArch64/AArch64LegalizerInfo.cpp
deleted file mode 100644 (file)
index 95719a3..0000000
+++ /dev/null
@@ -1,771 +0,0 @@
-//===- AArch64LegalizerInfo.cpp ----------------------------------*- C++ -*-==//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-/// \file
-/// This file implements the targeting of the Machinelegalizer class for
-/// AArch64.
-/// \todo This should be generated by TableGen.
-//===----------------------------------------------------------------------===//
-
-#include "AArch64LegalizerInfo.h"
-#include "AArch64Subtarget.h"
-#include "llvm/CodeGen/GlobalISel/LegalizerHelper.h"
-#include "llvm/CodeGen/GlobalISel/MachineIRBuilder.h"
-#include "llvm/CodeGen/GlobalISel/Utils.h"
-#include "llvm/CodeGen/MachineInstr.h"
-#include "llvm/CodeGen/MachineRegisterInfo.h"
-#include "llvm/CodeGen/TargetOpcodes.h"
-#include "llvm/CodeGen/ValueTypes.h"
-#include "llvm/IR/DerivedTypes.h"
-#include "llvm/IR/Type.h"
-
-#define DEBUG_TYPE "aarch64-legalinfo"
-
-using namespace llvm;
-using namespace LegalizeActions;
-using namespace LegalizeMutations;
-using namespace LegalityPredicates;
-
-AArch64LegalizerInfo::AArch64LegalizerInfo(const AArch64Subtarget &ST) {
-  using namespace TargetOpcode;
-  const LLT p0 = LLT::pointer(0, 64);
-  const LLT s1 = LLT::scalar(1);
-  const LLT s8 = LLT::scalar(8);
-  const LLT s16 = LLT::scalar(16);
-  const LLT s32 = LLT::scalar(32);
-  const LLT s64 = LLT::scalar(64);
-  const LLT s128 = LLT::scalar(128);
-  const LLT s256 = LLT::scalar(256);
-  const LLT s512 = LLT::scalar(512);
-  const LLT v16s8 = LLT::vector(16, 8);
-  const LLT v8s8 = LLT::vector(8, 8);
-  const LLT v4s8 = LLT::vector(4, 8);
-  const LLT v8s16 = LLT::vector(8, 16);
-  const LLT v4s16 = LLT::vector(4, 16);
-  const LLT v2s16 = LLT::vector(2, 16);
-  const LLT v2s32 = LLT::vector(2, 32);
-  const LLT v4s32 = LLT::vector(4, 32);
-  const LLT v2s64 = LLT::vector(2, 64);
-  const LLT v2p0 = LLT::vector(2, p0);
-
-  // FIXME: support subtargets which have neon/fp-armv8 disabled.
-  if (!ST.hasNEON() || !ST.hasFPARMv8()) {
-    computeTables();
-    return;
-  }
-
-  getActionDefinitionsBuilder(G_IMPLICIT_DEF)
-    .legalFor({p0, s1, s8, s16, s32, s64, v2s32, v4s32, v2s64})
-    .clampScalar(0, s1, s64)
-    .widenScalarToNextPow2(0, 8)
-    .fewerElementsIf(
-      [=](const LegalityQuery &Query) {
-        return Query.Types[0].isVector() &&
-          (Query.Types[0].getElementType() != s64 ||
-           Query.Types[0].getNumElements() != 2);
-      },
-      [=](const LegalityQuery &Query) {
-        LLT EltTy = Query.Types[0].getElementType();
-        if (EltTy == s64)
-          return std::make_pair(0, LLT::vector(2, 64));
-        return std::make_pair(0, EltTy);
-      });
-
-  getActionDefinitionsBuilder(G_PHI)
-      .legalFor({p0, s16, s32, s64, v2s32, v4s32, v2s64})
-      .clampScalar(0, s16, s64)
-      .widenScalarToNextPow2(0);
-
-  getActionDefinitionsBuilder(G_BSWAP)
-      .legalFor({s32, s64, v4s32, v2s32, v2s64})
-      .clampScalar(0, s32, s64)
-      .widenScalarToNextPow2(0);
-
-  getActionDefinitionsBuilder({G_ADD, G_SUB, G_MUL, G_AND, G_OR, G_XOR})
-      .legalFor({s32, s64, v2s32, v4s32, v2s64, v8s16, v16s8})
-      .clampScalar(0, s32, s64)
-      .widenScalarToNextPow2(0)
-      .clampNumElements(0, v2s32, v4s32)
-      .clampNumElements(0, v2s64, v2s64)
-      .moreElementsToNextPow2(0);
-
-  getActionDefinitionsBuilder(G_SHL)
-    .legalFor({{s32, s32}, {s64, s64},
-               {v2s32, v2s32}, {v4s32, v4s32}, {v2s64, v2s64}})
-    .clampScalar(1, s32, s64)
-    .clampScalar(0, s32, s64)
-    .widenScalarToNextPow2(0)
-    .clampNumElements(0, v2s32, v4s32)
-    .clampNumElements(0, v2s64, v2s64)
-    .moreElementsToNextPow2(0)
-    .minScalarSameAs(1, 0);
-
-  getActionDefinitionsBuilder(G_PTR_ADD)
-      .legalFor({{p0, s64}})
-      .clampScalar(1, s64, s64);
-
-  getActionDefinitionsBuilder(G_PTR_MASK).legalFor({p0});
-
-  getActionDefinitionsBuilder({G_SDIV, G_UDIV})
-      .legalFor({s32, s64})
-      .libcallFor({s128})
-      .clampScalar(0, s32, s64)
-      .widenScalarToNextPow2(0)
-      .scalarize(0);
-
-  getActionDefinitionsBuilder({G_LSHR, G_ASHR})
-      .customIf([=](const LegalityQuery &Query) {
-        const auto &SrcTy = Query.Types[0];
-        const auto &AmtTy = Query.Types[1];
-        return !SrcTy.isVector() && SrcTy.getSizeInBits() == 32 &&
-               AmtTy.getSizeInBits() == 32;
-      })
-      .legalFor({{s32, s32},
-                 {s32, s64},
-                 {s64, s64},
-                 {v2s32, v2s32},
-                 {v4s32, v4s32},
-                 {v2s64, v2s64}})
-      .clampScalar(1, s32, s64)
-      .clampScalar(0, s32, s64)
-      .minScalarSameAs(1, 0);
-
-  getActionDefinitionsBuilder({G_SREM, G_UREM})
-      .lowerFor({s1, s8, s16, s32, s64});
-
-  getActionDefinitionsBuilder({G_SMULO, G_UMULO})
-      .lowerFor({{s64, s1}});
-
-  getActionDefinitionsBuilder({G_SMULH, G_UMULH}).legalFor({s32, s64});
-
-  getActionDefinitionsBuilder({G_UADDE, G_USUBE, G_SADDO, G_SSUBO, G_UADDO})
-      .legalFor({{s32, s1}, {s64, s1}})
-      .minScalar(0, s32);
-
-  getActionDefinitionsBuilder({G_FADD, G_FSUB, G_FMUL, G_FDIV, G_FNEG})
-    .legalFor({s32, s64, v2s64, v4s32, v2s32});
-
-  getActionDefinitionsBuilder(G_FREM).libcallFor({s32, s64});
-
-  getActionDefinitionsBuilder({G_FCEIL, G_FABS, G_FSQRT, G_FFLOOR, G_FRINT,
-                               G_FMA, G_INTRINSIC_TRUNC, G_INTRINSIC_ROUND,
-                               G_FNEARBYINT})
-      // If we don't have full FP16 support, then scalarize the elements of
-      // vectors containing fp16 types.
-      .fewerElementsIf(
-          [=, &ST](const LegalityQuery &Query) {
-            const auto &Ty = Query.Types[0];
-            return Ty.isVector() && Ty.getElementType() == s16 &&
-                   !ST.hasFullFP16();
-          },
-          [=](const LegalityQuery &Query) { return std::make_pair(0, s16); })
-      // If we don't have full FP16 support, then widen s16 to s32 if we
-      // encounter it.
-      .widenScalarIf(
-          [=, &ST](const LegalityQuery &Query) {
-            return Query.Types[0] == s16 && !ST.hasFullFP16();
-          },
-          [=](const LegalityQuery &Query) { return std::make_pair(0, s32); })
-      .legalFor({s16, s32, s64, v2s32, v4s32, v2s64, v2s16, v4s16, v8s16});
-
-  getActionDefinitionsBuilder(
-      {G_FCOS, G_FSIN, G_FLOG10, G_FLOG, G_FLOG2, G_FEXP, G_FEXP2, G_FPOW})
-      // We need a call for these, so we always need to scalarize.
-      .scalarize(0)
-      // Regardless of FP16 support, widen 16-bit elements to 32-bits.
-      .minScalar(0, s32)
-      .libcallFor({s32, s64, v2s32, v4s32, v2s64});
-
-  getActionDefinitionsBuilder(G_INSERT)
-      .unsupportedIf([=](const LegalityQuery &Query) {
-        return Query.Types[0].getSizeInBits() <= Query.Types[1].getSizeInBits();
-      })
-      .legalIf([=](const LegalityQuery &Query) {
-        const LLT &Ty0 = Query.Types[0];
-        const LLT &Ty1 = Query.Types[1];
-        if (Ty0 != s32 && Ty0 != s64 && Ty0 != p0)
-          return false;
-        return isPowerOf2_32(Ty1.getSizeInBits()) &&
-               (Ty1.getSizeInBits() == 1 || Ty1.getSizeInBits() >= 8);
-      })
-      .clampScalar(0, s32, s64)
-      .widenScalarToNextPow2(0)
-      .maxScalarIf(typeInSet(0, {s32}), 1, s16)
-      .maxScalarIf(typeInSet(0, {s64}), 1, s32)
-      .widenScalarToNextPow2(1);
-
-  getActionDefinitionsBuilder(G_EXTRACT)
-      .unsupportedIf([=](const LegalityQuery &Query) {
-        return Query.Types[0].getSizeInBits() >= Query.Types[1].getSizeInBits();
-      })
-      .legalIf([=](const LegalityQuery &Query) {
-        const LLT &Ty0 = Query.Types[0];
-        const LLT &Ty1 = Query.Types[1];
-        if (Ty1 != s32 && Ty1 != s64 && Ty1 != s128)
-          return false;
-        if (Ty1 == p0)
-          return true;
-        return isPowerOf2_32(Ty0.getSizeInBits()) &&
-               (Ty0.getSizeInBits() == 1 || Ty0.getSizeInBits() >= 8);
-      })
-      .clampScalar(1, s32, s128)
-      .widenScalarToNextPow2(1)
-      .maxScalarIf(typeInSet(1, {s32}), 0, s16)
-      .maxScalarIf(typeInSet(1, {s64}), 0, s32)
-      .widenScalarToNextPow2(0);
-
-  getActionDefinitionsBuilder({G_SEXTLOAD, G_ZEXTLOAD})
-      .legalForTypesWithMemDesc({{s32, p0, 8, 8},
-                                 {s32, p0, 16, 8},
-                                 {s32, p0, 32, 8},
-                                 {s64, p0, 8, 2},
-                                 {s64, p0, 16, 2},
-                                 {s64, p0, 32, 4},
-                                 {s64, p0, 64, 8},
-                                 {p0, p0, 64, 8},
-                                 {v2s32, p0, 64, 8}})
-      .clampScalar(0, s32, s64)
-      .widenScalarToNextPow2(0)
-      // TODO: We could support sum-of-pow2's but the lowering code doesn't know
-      //       how to do that yet.
-      .unsupportedIfMemSizeNotPow2()
-      // Lower anything left over into G_*EXT and G_LOAD
-      .lower();
-
-  auto IsPtrVecPred = [=](const LegalityQuery &Query) {
-    const LLT &ValTy = Query.Types[0];
-    if (!ValTy.isVector())
-      return false;
-    const LLT EltTy = ValTy.getElementType();
-    return EltTy.isPointer() && EltTy.getAddressSpace() == 0;
-  };
-
-  getActionDefinitionsBuilder(G_LOAD)
-      .legalForTypesWithMemDesc({{s8, p0, 8, 8},
-                                 {s16, p0, 16, 8},
-                                 {s32, p0, 32, 8},
-                                 {s64, p0, 64, 8},
-                                 {p0, p0, 64, 8},
-                                 {s128, p0, 128, 8},
-                                 {v8s8, p0, 64, 8},
-                                 {v16s8, p0, 128, 8},
-                                 {v4s16, p0, 64, 8},
-                                 {v8s16, p0, 128, 8},
-                                 {v2s32, p0, 64, 8},
-                                 {v4s32, p0, 128, 8},
-                                 {v2s64, p0, 128, 8}})
-      // These extends are also legal
-      .legalForTypesWithMemDesc({{s32, p0, 8, 8},
-                                 {s32, p0, 16, 8}})
-      .clampScalar(0, s8, s64)
-      .lowerIfMemSizeNotPow2()
-      // Lower any any-extending loads left into G_ANYEXT and G_LOAD
-      .lowerIf([=](const LegalityQuery &Query) {
-        return Query.Types[0].getSizeInBits() != Query.MMODescrs[0].SizeInBits;
-      })
-      .widenScalarToNextPow2(0)
-      .clampMaxNumElements(0, s32, 2)
-      .clampMaxNumElements(0, s64, 1)
-      .customIf(IsPtrVecPred);
-
-  getActionDefinitionsBuilder(G_STORE)
-      .legalForTypesWithMemDesc({{s8, p0, 8, 8},
-                                 {s16, p0, 16, 8},
-                                 {s32, p0, 8, 8},
-                                 {s32, p0, 16, 8},
-                                 {s32, p0, 32, 8},
-                                 {s64, p0, 64, 8},
-                                 {p0, p0, 64, 8},
-                                 {s128, p0, 128, 8},
-                                 {v16s8, p0, 128, 8},
-                                 {v4s16, p0, 64, 8},
-                                 {v8s16, p0, 128, 8},
-                                 {v2s32, p0, 64, 8},
-                                 {v4s32, p0, 128, 8},
-                                 {v2s64, p0, 128, 8}})
-      .clampScalar(0, s8, s64)
-      .lowerIfMemSizeNotPow2()
-      .lowerIf([=](const LegalityQuery &Query) {
-        return Query.Types[0].isScalar() &&
-               Query.Types[0].getSizeInBits() != Query.MMODescrs[0].SizeInBits;
-      })
-      .clampMaxNumElements(0, s32, 2)
-      .clampMaxNumElements(0, s64, 1)
-      .customIf(IsPtrVecPred);
-
-  // Constants
-  getActionDefinitionsBuilder(G_CONSTANT)
-    .legalFor({p0, s8, s16, s32, s64})
-      .clampScalar(0, s8, s64)
-      .widenScalarToNextPow2(0);
-  getActionDefinitionsBuilder(G_FCONSTANT)
-      .legalFor({s32, s64})
-      .clampScalar(0, s32, s64);
-
-  getActionDefinitionsBuilder(G_ICMP)
-      .legalFor({{s32, s32},
-                 {s32, s64},
-                 {s32, p0},
-                 {v4s32, v4s32},
-                 {v2s32, v2s32},
-                 {v2s64, v2s64},
-                 {v2s64, v2p0},
-                 {v4s16, v4s16},
-                 {v8s16, v8s16},
-                 {v8s8, v8s8},
-                 {v16s8, v16s8}})
-      .clampScalar(1, s32, s64)
-      .clampScalar(0, s32, s32)
-      .minScalarEltSameAsIf(
-          [=](const LegalityQuery &Query) {
-            const LLT &Ty = Query.Types[0];
-            const LLT &SrcTy = Query.Types[1];
-            return Ty.isVector() && !SrcTy.getElementType().isPointer() &&
-                   Ty.getElementType() != SrcTy.getElementType();
-          },
-          0, 1)
-      .minScalarOrEltIf(
-          [=](const LegalityQuery &Query) { return Query.Types[1] == v2s16; },
-          1, s32)
-      .minScalarOrEltIf(
-          [=](const LegalityQuery &Query) { return Query.Types[1] == v2p0; }, 0,
-          s64)
-      .widenScalarOrEltToNextPow2(1);
-
-  getActionDefinitionsBuilder(G_FCMP)
-      .legalFor({{s32, s32}, {s32, s64}})
-      .clampScalar(0, s32, s32)
-      .clampScalar(1, s32, s64)
-      .widenScalarToNextPow2(1);
-
-  // Extensions
-  auto ExtLegalFunc = [=](const LegalityQuery &Query) {
-    unsigned DstSize = Query.Types[0].getSizeInBits();
-
-    if (DstSize == 128 && !Query.Types[0].isVector())
-      return false; // Extending to a scalar s128 needs narrowing.
-    
-    // Make sure that we have something that will fit in a register, and
-    // make sure it's a power of 2.
-    if (DstSize < 8 || DstSize > 128 || !isPowerOf2_32(DstSize))
-      return false;
-
-    const LLT &SrcTy = Query.Types[1];
-
-    // Special case for s1.
-    if (SrcTy == s1)
-      return true;
-
-    // Make sure we fit in a register otherwise. Don't bother checking that
-    // the source type is below 128 bits. We shouldn't be allowing anything
-    // through which is wider than the destination in the first place.
-    unsigned SrcSize = SrcTy.getSizeInBits();
-    if (SrcSize < 8 || !isPowerOf2_32(SrcSize))
-      return false;
-
-    return true;
-  };
-  getActionDefinitionsBuilder({G_ZEXT, G_SEXT, G_ANYEXT})
-      .legalIf(ExtLegalFunc)
-      .clampScalar(0, s64, s64); // Just for s128, others are handled above.
-
-  getActionDefinitionsBuilder(G_TRUNC).alwaysLegal();
-
-  getActionDefinitionsBuilder(G_SEXT_INREG).lower();
-
-  // FP conversions
-  getActionDefinitionsBuilder(G_FPTRUNC).legalFor(
-      {{s16, s32}, {s16, s64}, {s32, s64}, {v4s16, v4s32}, {v2s32, v2s64}});
-  getActionDefinitionsBuilder(G_FPEXT).legalFor(
-      {{s32, s16}, {s64, s16}, {s64, s32}, {v4s32, v4s16}, {v2s64, v2s32}});
-
-  // Conversions
-  getActionDefinitionsBuilder({G_FPTOSI, G_FPTOUI})
-      .legalForCartesianProduct({s32, s64, v2s64, v4s32, v2s32})
-      .clampScalar(0, s32, s64)
-      .widenScalarToNextPow2(0)
-      .clampScalar(1, s32, s64)
-      .widenScalarToNextPow2(1);
-
-  getActionDefinitionsBuilder({G_SITOFP, G_UITOFP})
-      .legalForCartesianProduct({s32, s64, v2s64, v4s32, v2s32})
-      .clampScalar(1, s32, s64)
-      .widenScalarToNextPow2(1)
-      .clampScalar(0, s32, s64)
-      .widenScalarToNextPow2(0);
-
-  // Control-flow
-  getActionDefinitionsBuilder(G_BRCOND).legalFor({s1, s8, s16, s32});
-  getActionDefinitionsBuilder(G_BRINDIRECT).legalFor({p0});
-
-  // Select
-  // FIXME: We can probably do a bit better than just scalarizing vector
-  // selects.
-  getActionDefinitionsBuilder(G_SELECT)
-      .legalFor({{s32, s1}, {s64, s1}, {p0, s1}})
-      .clampScalar(0, s32, s64)
-      .widenScalarToNextPow2(0)
-      .scalarize(0);
-
-  // Pointer-handling
-  getActionDefinitionsBuilder(G_FRAME_INDEX).legalFor({p0});
-  getActionDefinitionsBuilder(G_GLOBAL_VALUE).legalFor({p0});
-
-  getActionDefinitionsBuilder(G_PTRTOINT)
-      .legalForCartesianProduct({s1, s8, s16, s32, s64}, {p0})
-      .maxScalar(0, s64)
-      .widenScalarToNextPow2(0, /*Min*/ 8);
-
-  getActionDefinitionsBuilder(G_INTTOPTR)
-      .unsupportedIf([&](const LegalityQuery &Query) {
-        return Query.Types[0].getSizeInBits() != Query.Types[1].getSizeInBits();
-      })
-      .legalFor({{p0, s64}});
-
-  // Casts for 32 and 64-bit width type are just copies.
-  // Same for 128-bit width type, except they are on the FPR bank.
-  getActionDefinitionsBuilder(G_BITCAST)
-      // FIXME: This is wrong since G_BITCAST is not allowed to change the
-      // number of bits but it's what the previous code described and fixing
-      // it breaks tests.
-      .legalForCartesianProduct({s1, s8, s16, s32, s64, s128, v16s8, v8s8, v4s8,
-                                 v8s16, v4s16, v2s16, v4s32, v2s32, v2s64,
-                                 v2p0});
-
-  getActionDefinitionsBuilder(G_VASTART).legalFor({p0});
-
-  // va_list must be a pointer, but most sized types are pretty easy to handle
-  // as the destination.
-  getActionDefinitionsBuilder(G_VAARG)
-      .customForCartesianProduct({s8, s16, s32, s64, p0}, {p0})
-      .clampScalar(0, s8, s64)
-      .widenScalarToNextPow2(0, /*Min*/ 8);
-
-  if (ST.hasLSE()) {
-    getActionDefinitionsBuilder(G_ATOMIC_CMPXCHG_WITH_SUCCESS)
-        .lowerIf(all(
-            typeInSet(0, {s8, s16, s32, s64}), typeIs(1, s1), typeIs(2, p0),
-            atomicOrderingAtLeastOrStrongerThan(0, AtomicOrdering::Monotonic)));
-
-    getActionDefinitionsBuilder(
-        {G_ATOMICRMW_XCHG, G_ATOMICRMW_ADD, G_ATOMICRMW_SUB, G_ATOMICRMW_AND,
-         G_ATOMICRMW_OR, G_ATOMICRMW_XOR, G_ATOMICRMW_MIN, G_ATOMICRMW_MAX,
-         G_ATOMICRMW_UMIN, G_ATOMICRMW_UMAX, G_ATOMIC_CMPXCHG})
-        .legalIf(all(
-            typeInSet(0, {s8, s16, s32, s64}), typeIs(1, p0),
-            atomicOrderingAtLeastOrStrongerThan(0, AtomicOrdering::Monotonic)));
-  }
-
-  getActionDefinitionsBuilder(G_BLOCK_ADDR).legalFor({p0});
-
-  // Merge/Unmerge
-  for (unsigned Op : {G_MERGE_VALUES, G_UNMERGE_VALUES}) {
-    unsigned BigTyIdx = Op == G_MERGE_VALUES ? 0 : 1;
-    unsigned LitTyIdx = Op == G_MERGE_VALUES ? 1 : 0;
-
-    auto notValidElt = [](const LegalityQuery &Query, unsigned TypeIdx) {
-      const LLT &Ty = Query.Types[TypeIdx];
-      if (Ty.isVector()) {
-        const LLT &EltTy = Ty.getElementType();
-        if (EltTy.getSizeInBits() < 8 || EltTy.getSizeInBits() > 64)
-          return true;
-        if (!isPowerOf2_32(EltTy.getSizeInBits()))
-          return true;
-      }
-      return false;
-    };
-
-    // FIXME: This rule is horrible, but specifies the same as what we had
-    // before with the particularly strange definitions removed (e.g.
-    // s8 = G_MERGE_VALUES s32, s32).
-    // Part of the complexity comes from these ops being extremely flexible. For
-    // example, you can build/decompose vectors with it, concatenate vectors,
-    // etc. and in addition to this you can also bitcast with it at the same
-    // time. We've been considering breaking it up into multiple ops to make it
-    // more manageable throughout the backend.
-    getActionDefinitionsBuilder(Op)
-        // Break up vectors with weird elements into scalars
-        .fewerElementsIf(
-            [=](const LegalityQuery &Query) { return notValidElt(Query, 0); },
-            scalarize(0))
-        .fewerElementsIf(
-            [=](const LegalityQuery &Query) { return notValidElt(Query, 1); },
-            scalarize(1))
-        // Clamp the big scalar to s8-s512 and make it either a power of 2, 192,
-        // or 384.
-        .clampScalar(BigTyIdx, s8, s512)
-        .widenScalarIf(
-            [=](const LegalityQuery &Query) {
-              const LLT &Ty = Query.Types[BigTyIdx];
-              return !isPowerOf2_32(Ty.getSizeInBits()) &&
-                     Ty.getSizeInBits() % 64 != 0;
-            },
-            [=](const LegalityQuery &Query) {
-              // Pick the next power of 2, or a multiple of 64 over 128.
-              // Whichever is smaller.
-              const LLT &Ty = Query.Types[BigTyIdx];
-              unsigned NewSizeInBits = 1
-                                       << Log2_32_Ceil(Ty.getSizeInBits() + 1);
-              if (NewSizeInBits >= 256) {
-                unsigned RoundedTo = alignTo<64>(Ty.getSizeInBits() + 1);
-                if (RoundedTo < NewSizeInBits)
-                  NewSizeInBits = RoundedTo;
-              }
-              return std::make_pair(BigTyIdx, LLT::scalar(NewSizeInBits));
-            })
-        // Clamp the little scalar to s8-s256 and make it a power of 2. It's not
-        // worth considering the multiples of 64 since 2*192 and 2*384 are not
-        // valid.
-        .clampScalar(LitTyIdx, s8, s256)
-        .widenScalarToNextPow2(LitTyIdx, /*Min*/ 8)
-        // So at this point, we have s8, s16, s32, s64, s128, s192, s256, s384,
-        // s512, <X x s8>, <X x s16>, <X x s32>, or <X x s64>.
-        // At this point it's simple enough to accept the legal types.
-        .legalIf([=](const LegalityQuery &Query) {
-          const LLT &BigTy = Query.Types[BigTyIdx];
-          const LLT &LitTy = Query.Types[LitTyIdx];
-          if (BigTy.isVector() && BigTy.getSizeInBits() < 32)
-            return false;
-          if (LitTy.isVector() && LitTy.getSizeInBits() < 32)
-            return false;
-          return BigTy.getSizeInBits() % LitTy.getSizeInBits() == 0;
-        })
-        // Any vectors left are the wrong size. Scalarize them.
-      .scalarize(0)
-      .scalarize(1);
-  }
-
-  getActionDefinitionsBuilder(G_EXTRACT_VECTOR_ELT)
-      .unsupportedIf([=](const LegalityQuery &Query) {
-        const LLT &EltTy = Query.Types[1].getElementType();
-        return Query.Types[0] != EltTy;
-      })
-      .minScalar(2, s64)
-      .legalIf([=](const LegalityQuery &Query) {
-        const LLT &VecTy = Query.Types[1];
-        return VecTy == v2s16 || VecTy == v4s16 || VecTy == v8s16 ||
-               VecTy == v4s32 || VecTy == v2s64 || VecTy == v2s32;
-      });
-
-  getActionDefinitionsBuilder(G_INSERT_VECTOR_ELT)
-      .legalIf([=](const LegalityQuery &Query) {
-        const LLT &VecTy = Query.Types[0];
-        // TODO: Support s8 and s16
-        return VecTy == v2s32 || VecTy == v4s32 || VecTy == v2s64;
-      });
-
-  getActionDefinitionsBuilder(G_BUILD_VECTOR)
-      .legalFor({{v4s16, s16},
-                 {v8s16, s16},
-                 {v2s32, s32},
-                 {v4s32, s32},
-                 {v2p0, p0},
-                 {v2s64, s64}})
-      .clampNumElements(0, v4s32, v4s32)
-      .clampNumElements(0, v2s64, v2s64)
-
-      // Deal with larger scalar types, which will be implicitly truncated.
-      .legalIf([=](const LegalityQuery &Query) {
-        return Query.Types[0].getScalarSizeInBits() <
-               Query.Types[1].getSizeInBits();
-      })
-      .minScalarSameAs(1, 0);
-
-  getActionDefinitionsBuilder(G_CTLZ).legalForCartesianProduct(
-      {s32, s64, v8s8, v16s8, v4s16, v8s16, v2s32, v4s32})
-      .scalarize(1);
-
-  getActionDefinitionsBuilder(G_SHUFFLE_VECTOR)
-      .legalIf([=](const LegalityQuery &Query) {
-        const LLT &DstTy = Query.Types[0];
-        const LLT &SrcTy = Query.Types[1];
-        // For now just support the TBL2 variant which needs the source vectors
-        // to be the same size as the dest.
-        if (DstTy != SrcTy)
-          return false;
-        for (auto &Ty : {v2s32, v4s32, v2s64}) {
-          if (DstTy == Ty)
-            return true;
-        }
-        return false;
-      })
-      // G_SHUFFLE_VECTOR can have scalar sources (from 1 x s vectors), we
-      // just want those lowered into G_BUILD_VECTOR
-      .lowerIf([=](const LegalityQuery &Query) {
-        return !Query.Types[1].isVector();
-      })
-      .clampNumElements(0, v4s32, v4s32)
-      .clampNumElements(0, v2s64, v2s64);
-
-  getActionDefinitionsBuilder(G_CONCAT_VECTORS)
-      .legalFor({{v4s32, v2s32}, {v8s16, v4s16}});
-
-  getActionDefinitionsBuilder(G_JUMP_TABLE)
-    .legalFor({{p0}, {s64}});
-
-  getActionDefinitionsBuilder(G_BRJT).legalIf([=](const LegalityQuery &Query) {
-    return Query.Types[0] == p0 && Query.Types[1] == s64;
-  });
-
-  getActionDefinitionsBuilder(G_DYN_STACKALLOC).lower();
-
-  computeTables();
-  verify(*ST.getInstrInfo());
-}
-
-bool AArch64LegalizerInfo::legalizeCustom(MachineInstr &MI,
-                                          MachineRegisterInfo &MRI,
-                                          MachineIRBuilder &MIRBuilder,
-                                          GISelChangeObserver &Observer) const {
-  switch (MI.getOpcode()) {
-  default:
-    // No idea what to do.
-    return false;
-  case TargetOpcode::G_VAARG:
-    return legalizeVaArg(MI, MRI, MIRBuilder);
-  case TargetOpcode::G_LOAD:
-  case TargetOpcode::G_STORE:
-    return legalizeLoadStore(MI, MRI, MIRBuilder, Observer);
-  case TargetOpcode::G_SHL:
-  case TargetOpcode::G_ASHR:
-  case TargetOpcode::G_LSHR:
-    return legalizeShlAshrLshr(MI, MRI, MIRBuilder, Observer);
-  }
-
-  llvm_unreachable("expected switch to return");
-}
-
-bool AArch64LegalizerInfo::legalizeIntrinsic(
-    MachineInstr &MI, MachineRegisterInfo &MRI,
-    MachineIRBuilder &MIRBuilder) const {
-  switch (MI.getIntrinsicID()) {
-  case Intrinsic::memcpy:
-  case Intrinsic::memset:
-  case Intrinsic::memmove:
-    if (createMemLibcall(MIRBuilder, MRI, MI) ==
-        LegalizerHelper::UnableToLegalize)
-      return false;
-    MI.eraseFromParent();
-    return true;
-  default:
-    break;
-  }
-  return true;
-}
-
-bool AArch64LegalizerInfo::legalizeShlAshrLshr(
-    MachineInstr &MI, MachineRegisterInfo &MRI, MachineIRBuilder &MIRBuilder,
-    GISelChangeObserver &Observer) const {
-  assert(MI.getOpcode() == TargetOpcode::G_ASHR ||
-         MI.getOpcode() == TargetOpcode::G_LSHR ||
-         MI.getOpcode() == TargetOpcode::G_SHL);
-  // If the shift amount is a G_CONSTANT, promote it to a 64 bit type so the
-  // imported patterns can select it later. Either way, it will be legal.
-  Register AmtReg = MI.getOperand(2).getReg();
-  auto *CstMI = MRI.getVRegDef(AmtReg);
-  assert(CstMI && "expected to find a vreg def");
-  if (CstMI->getOpcode() != TargetOpcode::G_CONSTANT)
-    return true;
-  // Check the shift amount is in range for an immediate form.
-  unsigned Amount = CstMI->getOperand(1).getCImm()->getZExtValue();
-  if (Amount > 31)
-    return true; // This will have to remain a register variant.
-  assert(MRI.getType(AmtReg).getSizeInBits() == 32);
-  MIRBuilder.setInstr(MI);
-  auto ExtCst = MIRBuilder.buildZExt(LLT::scalar(64), AmtReg);
-  MI.getOperand(2).setReg(ExtCst.getReg(0));
-  return true;
-}
-
-bool AArch64LegalizerInfo::legalizeLoadStore(
-    MachineInstr &MI, MachineRegisterInfo &MRI, MachineIRBuilder &MIRBuilder,
-    GISelChangeObserver &Observer) const {
-  assert(MI.getOpcode() == TargetOpcode::G_STORE ||
-         MI.getOpcode() == TargetOpcode::G_LOAD);
-  // Here we just try to handle vector loads/stores where our value type might
-  // have pointer elements, which the SelectionDAG importer can't handle. To
-  // allow the existing patterns for s64 to fire for p0, we just try to bitcast
-  // the value to use s64 types.
-
-  // Custom legalization requires the instruction, if not deleted, must be fully
-  // legalized. In order to allow further legalization of the inst, we create
-  // a new instruction and erase the existing one.
-
-  Register ValReg = MI.getOperand(0).getReg();
-  const LLT ValTy = MRI.getType(ValReg);
-
-  if (!ValTy.isVector() || !ValTy.getElementType().isPointer() ||
-      ValTy.getElementType().getAddressSpace() != 0) {
-    LLVM_DEBUG(dbgs() << "Tried to do custom legalization on wrong load/store");
-    return false;
-  }
-
-  MIRBuilder.setInstr(MI);
-  unsigned PtrSize = ValTy.getElementType().getSizeInBits();
-  const LLT NewTy = LLT::vector(ValTy.getNumElements(), PtrSize);
-  auto &MMO = **MI.memoperands_begin();
-  if (MI.getOpcode() == TargetOpcode::G_STORE) {
-    auto Bitcast = MIRBuilder.buildBitcast({NewTy}, {ValReg});
-    MIRBuilder.buildStore(Bitcast.getReg(0), MI.getOperand(1).getReg(), MMO);
-  } else {
-    Register NewReg = MRI.createGenericVirtualRegister(NewTy);
-    auto NewLoad = MIRBuilder.buildLoad(NewReg, MI.getOperand(1).getReg(), MMO);
-    MIRBuilder.buildBitcast({ValReg}, {NewLoad});
-  }
-  MI.eraseFromParent();
-  return true;
-}
-
-bool AArch64LegalizerInfo::legalizeVaArg(MachineInstr &MI,
-                                         MachineRegisterInfo &MRI,
-                                         MachineIRBuilder &MIRBuilder) const {
-  MIRBuilder.setInstr(MI);
-  MachineFunction &MF = MIRBuilder.getMF();
-  unsigned Align = MI.getOperand(2).getImm();
-  Register Dst = MI.getOperand(0).getReg();
-  Register ListPtr = MI.getOperand(1).getReg();
-
-  LLT PtrTy = MRI.getType(ListPtr);
-  LLT IntPtrTy = LLT::scalar(PtrTy.getSizeInBits());
-
-  const unsigned PtrSize = PtrTy.getSizeInBits() / 8;
-  Register List = MRI.createGenericVirtualRegister(PtrTy);
-  MIRBuilder.buildLoad(
-      List, ListPtr,
-      *MF.getMachineMemOperand(MachinePointerInfo(), MachineMemOperand::MOLoad,
-                               PtrSize, /* Align = */ PtrSize));
-
-  Register DstPtr;
-  if (Align > PtrSize) {
-    // Realign the list to the actual required alignment.
-    auto AlignMinus1 = MIRBuilder.buildConstant(IntPtrTy, Align - 1);
-
-    auto ListTmp = MIRBuilder.buildPtrAdd(PtrTy, List, AlignMinus1.getReg(0));
-
-    DstPtr = MRI.createGenericVirtualRegister(PtrTy);
-    MIRBuilder.buildPtrMask(DstPtr, ListTmp, Log2_64(Align));
-  } else
-    DstPtr = List;
-
-  uint64_t ValSize = MRI.getType(Dst).getSizeInBits() / 8;
-  MIRBuilder.buildLoad(
-      Dst, DstPtr,
-      *MF.getMachineMemOperand(MachinePointerInfo(), MachineMemOperand::MOLoad,
-                               ValSize, std::max(Align, PtrSize)));
-
-  auto Size = MIRBuilder.buildConstant(IntPtrTy, alignTo(ValSize, PtrSize));
-
-  auto NewList = MIRBuilder.buildPtrAdd(PtrTy, DstPtr, Size.getReg(0));
-
-  MIRBuilder.buildStore(
-      NewList, ListPtr,
-      *MF.getMachineMemOperand(MachinePointerInfo(), MachineMemOperand::MOStore,
-                               PtrSize, /* Align = */ PtrSize));
-
-  MI.eraseFromParent();
-  return true;
-}
diff --git a/gnu/llvm/llvm/lib/Target/AArch64/AArch64LegalizerInfo.h b/gnu/llvm/llvm/lib/Target/AArch64/AArch64LegalizerInfo.h
deleted file mode 100644 (file)
index 15161ba..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-//===- AArch64LegalizerInfo --------------------------------------*- C++ -*-==//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-/// \file
-/// This file declares the targeting of the Machinelegalizer class for
-/// AArch64.
-/// \todo This should be generated by TableGen.
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_LIB_TARGET_AARCH64_AARCH64MACHINELEGALIZER_H
-#define LLVM_LIB_TARGET_AARCH64_AARCH64MACHINELEGALIZER_H
-
-#include "llvm/CodeGen/GlobalISel/GISelChangeObserver.h"
-#include "llvm/CodeGen/GlobalISel/LegalizerInfo.h"
-
-namespace llvm {
-
-class LLVMContext;
-class AArch64Subtarget;
-
-/// This class provides the information for the target register banks.
-class AArch64LegalizerInfo : public LegalizerInfo {
-public:
-  AArch64LegalizerInfo(const AArch64Subtarget &ST);
-
-  bool legalizeCustom(MachineInstr &MI, MachineRegisterInfo &MRI,
-                      MachineIRBuilder &MIRBuilder,
-                      GISelChangeObserver &Observer) const override;
-
-  bool legalizeIntrinsic(MachineInstr &MI, MachineRegisterInfo &MRI,
-                         MachineIRBuilder &MIRBuilder) const override;
-
-private:
-  bool legalizeVaArg(MachineInstr &MI, MachineRegisterInfo &MRI,
-                     MachineIRBuilder &MIRBuilder) const;
-  bool legalizeLoadStore(MachineInstr &MI, MachineRegisterInfo &MRI,
-                         MachineIRBuilder &MIRBuilder,
-                         GISelChangeObserver &Observer) const;
-  bool legalizeShlAshrLshr(MachineInstr &MI, MachineRegisterInfo &MRI,
-                           MachineIRBuilder &MIRBuilder,
-                           GISelChangeObserver &Observer) const;
-};
-} // End llvm namespace.
-#endif
diff --git a/gnu/llvm/llvm/lib/Target/AArch64/AArch64PreLegalizerCombiner.cpp b/gnu/llvm/llvm/lib/Target/AArch64/AArch64PreLegalizerCombiner.cpp
deleted file mode 100644 (file)
index 230fd51..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-//=== lib/CodeGen/GlobalISel/AArch64PreLegalizerCombiner.cpp --------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This pass does combining of machine instructions at the generic MI level,
-// before the legalizer.
-//
-//===----------------------------------------------------------------------===//
-
-#include "AArch64TargetMachine.h"
-#include "llvm/CodeGen/GlobalISel/Combiner.h"
-#include "llvm/CodeGen/GlobalISel/CombinerHelper.h"
-#include "llvm/CodeGen/GlobalISel/CombinerInfo.h"
-#include "llvm/CodeGen/GlobalISel/GISelKnownBits.h"
-#include "llvm/CodeGen/GlobalISel/MIPatternMatch.h"
-#include "llvm/CodeGen/MachineDominators.h"
-#include "llvm/CodeGen/MachineFunctionPass.h"
-#include "llvm/CodeGen/TargetPassConfig.h"
-#include "llvm/Support/Debug.h"
-
-#define DEBUG_TYPE "aarch64-prelegalizer-combiner"
-
-using namespace llvm;
-using namespace MIPatternMatch;
-
-#define AARCH64PRELEGALIZERCOMBINERHELPER_GENCOMBINERHELPER_DEPS
-#include "AArch64GenGICombiner.inc"
-#undef AARCH64PRELEGALIZERCOMBINERHELPER_GENCOMBINERHELPER_DEPS
-
-namespace {
-#define AARCH64PRELEGALIZERCOMBINERHELPER_GENCOMBINERHELPER_H
-#include "AArch64GenGICombiner.inc"
-#undef AARCH64PRELEGALIZERCOMBINERHELPER_GENCOMBINERHELPER_H
-
-class AArch64PreLegalizerCombinerInfo : public CombinerInfo {
-  GISelKnownBits *KB;
-  MachineDominatorTree *MDT;
-
-public:
-  AArch64GenPreLegalizerCombinerHelper Generated;
-
-  AArch64PreLegalizerCombinerInfo(bool EnableOpt, bool OptSize, bool MinSize,
-                                  GISelKnownBits *KB, MachineDominatorTree *MDT)
-      : CombinerInfo(/*AllowIllegalOps*/ true, /*ShouldLegalizeIllegal*/ false,
-                     /*LegalizerInfo*/ nullptr, EnableOpt, OptSize, MinSize),
-        KB(KB), MDT(MDT) {
-    if (!Generated.parseCommandLineOption())
-      report_fatal_error("Invalid rule identifier");
-  }
-
-  virtual bool combine(GISelChangeObserver &Observer, MachineInstr &MI,
-                       MachineIRBuilder &B) const override;
-};
-
-bool AArch64PreLegalizerCombinerInfo::combine(GISelChangeObserver &Observer,
-                                              MachineInstr &MI,
-                                              MachineIRBuilder &B) const {
-  CombinerHelper Helper(Observer, B, KB, MDT);
-
-  switch (MI.getOpcode()) {
-  case TargetOpcode::G_INTRINSIC_W_SIDE_EFFECTS:
-    switch (MI.getIntrinsicID()) {
-    case Intrinsic::memcpy:
-    case Intrinsic::memmove:
-    case Intrinsic::memset: {
-      // If we're at -O0 set a maxlen of 32 to inline, otherwise let the other
-      // heuristics decide.
-      unsigned MaxLen = EnableOpt ? 0 : 32;
-      // Try to inline memcpy type calls if optimizations are enabled.
-      return (!EnableMinSize) ? Helper.tryCombineMemCpyFamily(MI, MaxLen)
-                              : false;
-    }
-    default:
-      break;
-    }
-  }
-
-  if (Generated.tryCombineAll(Observer, MI, B, Helper))
-    return true;
-
-  switch (MI.getOpcode()) {
-  case TargetOpcode::G_CONCAT_VECTORS:
-    return Helper.tryCombineConcatVectors(MI);
-  case TargetOpcode::G_SHUFFLE_VECTOR:
-    return Helper.tryCombineShuffleVector(MI);
-  }
-
-  return false;
-}
-
-#define AARCH64PRELEGALIZERCOMBINERHELPER_GENCOMBINERHELPER_CPP
-#include "AArch64GenGICombiner.inc"
-#undef AARCH64PRELEGALIZERCOMBINERHELPER_GENCOMBINERHELPER_CPP
-
-// Pass boilerplate
-// ================
-
-class AArch64PreLegalizerCombiner : public MachineFunctionPass {
-public:
-  static char ID;
-
-  AArch64PreLegalizerCombiner(bool IsOptNone = false);
-
-  StringRef getPassName() const override { return "AArch64PreLegalizerCombiner"; }
-
-  bool runOnMachineFunction(MachineFunction &MF) override;
-
-  void getAnalysisUsage(AnalysisUsage &AU) const override;
-private:
-  bool IsOptNone;
-};
-} // end anonymous namespace
-
-void AArch64PreLegalizerCombiner::getAnalysisUsage(AnalysisUsage &AU) const {
-  AU.addRequired<TargetPassConfig>();
-  AU.setPreservesCFG();
-  getSelectionDAGFallbackAnalysisUsage(AU);
-  AU.addRequired<GISelKnownBitsAnalysis>();
-  AU.addPreserved<GISelKnownBitsAnalysis>();
-  if (!IsOptNone) {
-    AU.addRequired<MachineDominatorTree>();
-    AU.addPreserved<MachineDominatorTree>();
-  }
-  MachineFunctionPass::getAnalysisUsage(AU);
-}
-
-AArch64PreLegalizerCombiner::AArch64PreLegalizerCombiner(bool IsOptNone)
-    : MachineFunctionPass(ID), IsOptNone(IsOptNone) {
-  initializeAArch64PreLegalizerCombinerPass(*PassRegistry::getPassRegistry());
-}
-
-bool AArch64PreLegalizerCombiner::runOnMachineFunction(MachineFunction &MF) {
-  if (MF.getProperties().hasProperty(
-          MachineFunctionProperties::Property::FailedISel))
-    return false;
-  auto *TPC = &getAnalysis<TargetPassConfig>();
-  const Function &F = MF.getFunction();
-  bool EnableOpt =
-      MF.getTarget().getOptLevel() != CodeGenOpt::None && !skipFunction(F);
-  GISelKnownBits *KB = &getAnalysis<GISelKnownBitsAnalysis>().get(MF);
-  MachineDominatorTree *MDT =
-      IsOptNone ? nullptr : &getAnalysis<MachineDominatorTree>();
-  AArch64PreLegalizerCombinerInfo PCInfo(EnableOpt, F.hasOptSize(),
-                                         F.hasMinSize(), KB, MDT);
-  Combiner C(PCInfo, TPC);
-  return C.combineMachineInstrs(MF, /*CSEInfo*/ nullptr);
-}
-
-char AArch64PreLegalizerCombiner::ID = 0;
-INITIALIZE_PASS_BEGIN(AArch64PreLegalizerCombiner, DEBUG_TYPE,
-                      "Combine AArch64 machine instrs before legalization",
-                      false, false)
-INITIALIZE_PASS_DEPENDENCY(TargetPassConfig)
-INITIALIZE_PASS_DEPENDENCY(GISelKnownBitsAnalysis)
-INITIALIZE_PASS_END(AArch64PreLegalizerCombiner, DEBUG_TYPE,
-                    "Combine AArch64 machine instrs before legalization", false,
-                    false)
-
-
-namespace llvm {
-FunctionPass *createAArch64PreLegalizeCombiner(bool IsOptNone) {
-  return new AArch64PreLegalizerCombiner(IsOptNone);
-}
-} // end namespace llvm
diff --git a/gnu/llvm/llvm/lib/Target/AArch64/AArch64RegisterBankInfo.cpp b/gnu/llvm/llvm/lib/Target/AArch64/AArch64RegisterBankInfo.cpp
deleted file mode 100644 (file)
index 40efac2..0000000
+++ /dev/null
@@ -1,852 +0,0 @@
-//===- AArch64RegisterBankInfo.cpp ----------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-/// \file
-/// This file implements the targeting of the RegisterBankInfo class for
-/// AArch64.
-/// \todo This should be generated by TableGen.
-//===----------------------------------------------------------------------===//
-
-#include "AArch64RegisterBankInfo.h"
-#include "AArch64InstrInfo.h"
-#include "llvm/ADT/SmallVector.h"
-#include "llvm/CodeGen/GlobalISel/RegisterBank.h"
-#include "llvm/CodeGen/GlobalISel/RegisterBankInfo.h"
-#include "llvm/CodeGen/LowLevelType.h"
-#include "llvm/CodeGen/MachineFunction.h"
-#include "llvm/CodeGen/MachineInstr.h"
-#include "llvm/CodeGen/MachineOperand.h"
-#include "llvm/CodeGen/MachineRegisterInfo.h"
-#include "llvm/CodeGen/TargetOpcodes.h"
-#include "llvm/CodeGen/TargetRegisterInfo.h"
-#include "llvm/CodeGen/TargetSubtargetInfo.h"
-#include "llvm/Support/ErrorHandling.h"
-#include <algorithm>
-#include <cassert>
-
-#define GET_TARGET_REGBANK_IMPL
-#include "AArch64GenRegisterBank.inc"
-
-// This file will be TableGen'ed at some point.
-#include "AArch64GenRegisterBankInfo.def"
-
-using namespace llvm;
-
-AArch64RegisterBankInfo::AArch64RegisterBankInfo(const TargetRegisterInfo &TRI)
-    : AArch64GenRegisterBankInfo() {
-  static bool AlreadyInit = false;
-  // We have only one set of register banks, whatever the subtarget
-  // is. Therefore, the initialization of the RegBanks table should be
-  // done only once. Indeed the table of all register banks
-  // (AArch64::RegBanks) is unique in the compiler. At some point, it
-  // will get tablegen'ed and the whole constructor becomes empty.
-  if (AlreadyInit)
-    return;
-  AlreadyInit = true;
-
-  const RegisterBank &RBGPR = getRegBank(AArch64::GPRRegBankID);
-  (void)RBGPR;
-  assert(&AArch64::GPRRegBank == &RBGPR &&
-         "The order in RegBanks is messed up");
-
-  const RegisterBank &RBFPR = getRegBank(AArch64::FPRRegBankID);
-  (void)RBFPR;
-  assert(&AArch64::FPRRegBank == &RBFPR &&
-         "The order in RegBanks is messed up");
-
-  const RegisterBank &RBCCR = getRegBank(AArch64::CCRegBankID);
-  (void)RBCCR;
-  assert(&AArch64::CCRegBank == &RBCCR && "The order in RegBanks is messed up");
-
-  // The GPR register bank is fully defined by all the registers in
-  // GR64all + its subclasses.
-  assert(RBGPR.covers(*TRI.getRegClass(AArch64::GPR32RegClassID)) &&
-         "Subclass not added?");
-  assert(RBGPR.getSize() == 64 && "GPRs should hold up to 64-bit");
-
-  // The FPR register bank is fully defined by all the registers in
-  // GR64all + its subclasses.
-  assert(RBFPR.covers(*TRI.getRegClass(AArch64::QQRegClassID)) &&
-         "Subclass not added?");
-  assert(RBFPR.covers(*TRI.getRegClass(AArch64::FPR64RegClassID)) &&
-         "Subclass not added?");
-  assert(RBFPR.getSize() == 512 &&
-         "FPRs should hold up to 512-bit via QQQQ sequence");
-
-  assert(RBCCR.covers(*TRI.getRegClass(AArch64::CCRRegClassID)) &&
-         "Class not added?");
-  assert(RBCCR.getSize() == 32 && "CCR should hold up to 32-bit");
-
-  // Check that the TableGen'ed like file is in sync we our expectations.
-  // First, the Idx.
-  assert(checkPartialMappingIdx(PMI_FirstGPR, PMI_LastGPR,
-                                {PMI_GPR32, PMI_GPR64}) &&
-         "PartialMappingIdx's are incorrectly ordered");
-  assert(checkPartialMappingIdx(PMI_FirstFPR, PMI_LastFPR,
-                                {PMI_FPR16, PMI_FPR32, PMI_FPR64, PMI_FPR128,
-                                 PMI_FPR256, PMI_FPR512}) &&
-         "PartialMappingIdx's are incorrectly ordered");
-// Now, the content.
-// Check partial mapping.
-#define CHECK_PARTIALMAP(Idx, ValStartIdx, ValLength, RB)                      \
-  do {                                                                         \
-    assert(                                                                    \
-        checkPartialMap(PartialMappingIdx::Idx, ValStartIdx, ValLength, RB) && \
-        #Idx " is incorrectly initialized");                                   \
-  } while (false)
-
-  CHECK_PARTIALMAP(PMI_GPR32, 0, 32, RBGPR);
-  CHECK_PARTIALMAP(PMI_GPR64, 0, 64, RBGPR);
-  CHECK_PARTIALMAP(PMI_FPR16, 0, 16, RBFPR);
-  CHECK_PARTIALMAP(PMI_FPR32, 0, 32, RBFPR);
-  CHECK_PARTIALMAP(PMI_FPR64, 0, 64, RBFPR);
-  CHECK_PARTIALMAP(PMI_FPR128, 0, 128, RBFPR);
-  CHECK_PARTIALMAP(PMI_FPR256, 0, 256, RBFPR);
-  CHECK_PARTIALMAP(PMI_FPR512, 0, 512, RBFPR);
-
-// Check value mapping.
-#define CHECK_VALUEMAP_IMPL(RBName, Size, Offset)                              \
-  do {                                                                         \
-    assert(checkValueMapImpl(PartialMappingIdx::PMI_##RBName##Size,            \
-                             PartialMappingIdx::PMI_First##RBName, Size,       \
-                             Offset) &&                                        \
-           #RBName #Size " " #Offset " is incorrectly initialized");           \
-  } while (false)
-
-#define CHECK_VALUEMAP(RBName, Size) CHECK_VALUEMAP_IMPL(RBName, Size, 0)
-
-  CHECK_VALUEMAP(GPR, 32);
-  CHECK_VALUEMAP(GPR, 64);
-  CHECK_VALUEMAP(FPR, 16);
-  CHECK_VALUEMAP(FPR, 32);
-  CHECK_VALUEMAP(FPR, 64);
-  CHECK_VALUEMAP(FPR, 128);
-  CHECK_VALUEMAP(FPR, 256);
-  CHECK_VALUEMAP(FPR, 512);
-
-// Check the value mapping for 3-operands instructions where all the operands
-// map to the same value mapping.
-#define CHECK_VALUEMAP_3OPS(RBName, Size)                                      \
-  do {                                                                         \
-    CHECK_VALUEMAP_IMPL(RBName, Size, 0);                                      \
-    CHECK_VALUEMAP_IMPL(RBName, Size, 1);                                      \
-    CHECK_VALUEMAP_IMPL(RBName, Size, 2);                                      \
-  } while (false)
-
-  CHECK_VALUEMAP_3OPS(GPR, 32);
-  CHECK_VALUEMAP_3OPS(GPR, 64);
-  CHECK_VALUEMAP_3OPS(FPR, 32);
-  CHECK_VALUEMAP_3OPS(FPR, 64);
-  CHECK_VALUEMAP_3OPS(FPR, 128);
-  CHECK_VALUEMAP_3OPS(FPR, 256);
-  CHECK_VALUEMAP_3OPS(FPR, 512);
-
-#define CHECK_VALUEMAP_CROSSREGCPY(RBNameDst, RBNameSrc, Size)                 \
-  do {                                                                         \
-    unsigned PartialMapDstIdx = PMI_##RBNameDst##Size - PMI_Min;               \
-    unsigned PartialMapSrcIdx = PMI_##RBNameSrc##Size - PMI_Min;               \
-    (void)PartialMapDstIdx;                                                    \
-    (void)PartialMapSrcIdx;                                                    \
-    const ValueMapping *Map = getCopyMapping(                                  \
-        AArch64::RBNameDst##RegBankID, AArch64::RBNameSrc##RegBankID, Size);  \
-    (void)Map;                                                                 \
-    assert(Map[0].BreakDown ==                                                 \
-               &AArch64GenRegisterBankInfo::PartMappings[PartialMapDstIdx] &&  \
-           Map[0].NumBreakDowns == 1 && #RBNameDst #Size                       \
-           " Dst is incorrectly initialized");                                 \
-    assert(Map[1].BreakDown ==                                                 \
-               &AArch64GenRegisterBankInfo::PartMappings[PartialMapSrcIdx] &&  \
-           Map[1].NumBreakDowns == 1 && #RBNameSrc #Size                       \
-           " Src is incorrectly initialized");                                 \
-                                                                               \
-  } while (false)
-
-  CHECK_VALUEMAP_CROSSREGCPY(GPR, GPR, 32);
-  CHECK_VALUEMAP_CROSSREGCPY(GPR, FPR, 32);
-  CHECK_VALUEMAP_CROSSREGCPY(GPR, GPR, 64);
-  CHECK_VALUEMAP_CROSSREGCPY(GPR, FPR, 64);
-  CHECK_VALUEMAP_CROSSREGCPY(FPR, FPR, 32);
-  CHECK_VALUEMAP_CROSSREGCPY(FPR, GPR, 32);
-  CHECK_VALUEMAP_CROSSREGCPY(FPR, FPR, 64);
-  CHECK_VALUEMAP_CROSSREGCPY(FPR, GPR, 64);
-
-#define CHECK_VALUEMAP_FPEXT(DstSize, SrcSize)                                 \
-  do {                                                                         \
-    unsigned PartialMapDstIdx = PMI_FPR##DstSize - PMI_Min;                    \
-    unsigned PartialMapSrcIdx = PMI_FPR##SrcSize - PMI_Min;                    \
-    (void)PartialMapDstIdx;                                                    \
-    (void)PartialMapSrcIdx;                                                    \
-    const ValueMapping *Map = getFPExtMapping(DstSize, SrcSize);               \
-    (void)Map;                                                                 \
-    assert(Map[0].BreakDown ==                                                 \
-               &AArch64GenRegisterBankInfo::PartMappings[PartialMapDstIdx] &&  \
-           Map[0].NumBreakDowns == 1 && "FPR" #DstSize                         \
-                                        " Dst is incorrectly initialized");    \
-    assert(Map[1].BreakDown ==                                                 \
-               &AArch64GenRegisterBankInfo::PartMappings[PartialMapSrcIdx] &&  \
-           Map[1].NumBreakDowns == 1 && "FPR" #SrcSize                         \
-                                        " Src is incorrectly initialized");    \
-                                                                               \
-  } while (false)
-
-  CHECK_VALUEMAP_FPEXT(32, 16);
-  CHECK_VALUEMAP_FPEXT(64, 16);
-  CHECK_VALUEMAP_FPEXT(64, 32);
-  CHECK_VALUEMAP_FPEXT(128, 64);
-
-  assert(verify(TRI) && "Invalid register bank information");
-}
-
-unsigned AArch64RegisterBankInfo::copyCost(const RegisterBank &A,
-                                           const RegisterBank &B,
-                                           unsigned Size) const {
-  // What do we do with different size?
-  // copy are same size.
-  // Will introduce other hooks for different size:
-  // * extract cost.
-  // * build_sequence cost.
-
-  // Copy from (resp. to) GPR to (resp. from) FPR involves FMOV.
-  // FIXME: This should be deduced from the scheduling model.
-  if (&A == &AArch64::GPRRegBank && &B == &AArch64::FPRRegBank)
-    // FMOVXDr or FMOVWSr.
-    return 5;
-  if (&A == &AArch64::FPRRegBank && &B == &AArch64::GPRRegBank)
-    // FMOVDXr or FMOVSWr.
-    return 4;
-
-  return RegisterBankInfo::copyCost(A, B, Size);
-}
-
-const RegisterBank &
-AArch64RegisterBankInfo::getRegBankFromRegClass(const TargetRegisterClass &RC,
-                                                LLT) const {
-  switch (RC.getID()) {
-  case AArch64::FPR8RegClassID:
-  case AArch64::FPR16RegClassID:
-  case AArch64::FPR32RegClassID:
-  case AArch64::FPR64RegClassID:
-  case AArch64::FPR128RegClassID:
-  case AArch64::FPR128_loRegClassID:
-  case AArch64::DDRegClassID:
-  case AArch64::DDDRegClassID:
-  case AArch64::DDDDRegClassID:
-  case AArch64::QQRegClassID:
-  case AArch64::QQQRegClassID:
-  case AArch64::QQQQRegClassID:
-    return getRegBank(AArch64::FPRRegBankID);
-  case AArch64::GPR32commonRegClassID:
-  case AArch64::GPR32RegClassID:
-  case AArch64::GPR32spRegClassID:
-  case AArch64::GPR32sponlyRegClassID:
-  case AArch64::GPR32argRegClassID:
-  case AArch64::GPR32allRegClassID:
-  case AArch64::GPR64commonRegClassID:
-  case AArch64::GPR64RegClassID:
-  case AArch64::GPR64spRegClassID:
-  case AArch64::GPR64sponlyRegClassID:
-  case AArch64::GPR64argRegClassID:
-  case AArch64::GPR64allRegClassID:
-  case AArch64::GPR64noipRegClassID:
-  case AArch64::GPR64common_and_GPR64noipRegClassID:
-  case AArch64::GPR64noip_and_tcGPR64RegClassID:
-  case AArch64::tcGPR64RegClassID:
-  case AArch64::WSeqPairsClassRegClassID:
-  case AArch64::XSeqPairsClassRegClassID:
-    return getRegBank(AArch64::GPRRegBankID);
-  case AArch64::CCRRegClassID:
-    return getRegBank(AArch64::CCRegBankID);
-  default:
-    llvm_unreachable("Register class not supported");
-  }
-}
-
-RegisterBankInfo::InstructionMappings
-AArch64RegisterBankInfo::getInstrAlternativeMappings(
-    const MachineInstr &MI) const {
-  const MachineFunction &MF = *MI.getParent()->getParent();
-  const TargetSubtargetInfo &STI = MF.getSubtarget();
-  const TargetRegisterInfo &TRI = *STI.getRegisterInfo();
-  const MachineRegisterInfo &MRI = MF.getRegInfo();
-
-  switch (MI.getOpcode()) {
-  case TargetOpcode::G_OR: {
-    // 32 and 64-bit or can be mapped on either FPR or
-    // GPR for the same cost.
-    unsigned Size = getSizeInBits(MI.getOperand(0).getReg(), MRI, TRI);
-    if (Size != 32 && Size != 64)
-      break;
-
-    // If the instruction has any implicit-defs or uses,
-    // do not mess with it.
-    if (MI.getNumOperands() != 3)
-      break;
-    InstructionMappings AltMappings;
-    const InstructionMapping &GPRMapping = getInstructionMapping(
-        /*ID*/ 1, /*Cost*/ 1, getValueMapping(PMI_FirstGPR, Size),
-        /*NumOperands*/ 3);
-    const InstructionMapping &FPRMapping = getInstructionMapping(
-        /*ID*/ 2, /*Cost*/ 1, getValueMapping(PMI_FirstFPR, Size),
-        /*NumOperands*/ 3);
-
-    AltMappings.push_back(&GPRMapping);
-    AltMappings.push_back(&FPRMapping);
-    return AltMappings;
-  }
-  case TargetOpcode::G_BITCAST: {
-    unsigned Size = getSizeInBits(MI.getOperand(0).getReg(), MRI, TRI);
-    if (Size != 32 && Size != 64)
-      break;
-
-    // If the instruction has any implicit-defs or uses,
-    // do not mess with it.
-    if (MI.getNumOperands() != 2)
-      break;
-
-    InstructionMappings AltMappings;
-    const InstructionMapping &GPRMapping = getInstructionMapping(
-        /*ID*/ 1, /*Cost*/ 1,
-        getCopyMapping(AArch64::GPRRegBankID, AArch64::GPRRegBankID, Size),
-        /*NumOperands*/ 2);
-    const InstructionMapping &FPRMapping = getInstructionMapping(
-        /*ID*/ 2, /*Cost*/ 1,
-        getCopyMapping(AArch64::FPRRegBankID, AArch64::FPRRegBankID, Size),
-        /*NumOperands*/ 2);
-    const InstructionMapping &GPRToFPRMapping = getInstructionMapping(
-        /*ID*/ 3,
-        /*Cost*/ copyCost(AArch64::GPRRegBank, AArch64::FPRRegBank, Size),
-        getCopyMapping(AArch64::FPRRegBankID, AArch64::GPRRegBankID, Size),
-        /*NumOperands*/ 2);
-    const InstructionMapping &FPRToGPRMapping = getInstructionMapping(
-        /*ID*/ 3,
-        /*Cost*/ copyCost(AArch64::GPRRegBank, AArch64::FPRRegBank, Size),
-        getCopyMapping(AArch64::GPRRegBankID, AArch64::FPRRegBankID, Size),
-        /*NumOperands*/ 2);
-
-    AltMappings.push_back(&GPRMapping);
-    AltMappings.push_back(&FPRMapping);
-    AltMappings.push_back(&GPRToFPRMapping);
-    AltMappings.push_back(&FPRToGPRMapping);
-    return AltMappings;
-  }
-  case TargetOpcode::G_LOAD: {
-    unsigned Size = getSizeInBits(MI.getOperand(0).getReg(), MRI, TRI);
-    if (Size != 64)
-      break;
-
-    // If the instruction has any implicit-defs or uses,
-    // do not mess with it.
-    if (MI.getNumOperands() != 2)
-      break;
-
-    InstructionMappings AltMappings;
-    const InstructionMapping &GPRMapping = getInstructionMapping(
-        /*ID*/ 1, /*Cost*/ 1,
-        getOperandsMapping({getValueMapping(PMI_FirstGPR, Size),
-                            // Addresses are GPR 64-bit.
-                            getValueMapping(PMI_FirstGPR, 64)}),
-        /*NumOperands*/ 2);
-    const InstructionMapping &FPRMapping = getInstructionMapping(
-        /*ID*/ 2, /*Cost*/ 1,
-        getOperandsMapping({getValueMapping(PMI_FirstFPR, Size),
-                            // Addresses are GPR 64-bit.
-                            getValueMapping(PMI_FirstGPR, 64)}),
-        /*NumOperands*/ 2);
-
-    AltMappings.push_back(&GPRMapping);
-    AltMappings.push_back(&FPRMapping);
-    return AltMappings;
-  }
-  default:
-    break;
-  }
-  return RegisterBankInfo::getInstrAlternativeMappings(MI);
-}
-
-void AArch64RegisterBankInfo::applyMappingImpl(
-    const OperandsMapper &OpdMapper) const {
-  switch (OpdMapper.getMI().getOpcode()) {
-  case TargetOpcode::G_OR:
-  case TargetOpcode::G_BITCAST:
-  case TargetOpcode::G_LOAD:
-    // Those ID must match getInstrAlternativeMappings.
-    assert((OpdMapper.getInstrMapping().getID() >= 1 &&
-            OpdMapper.getInstrMapping().getID() <= 4) &&
-           "Don't know how to handle that ID");
-    return applyDefaultMapping(OpdMapper);
-  default:
-    llvm_unreachable("Don't know how to handle that operation");
-  }
-}
-
-/// Returns whether opcode \p Opc is a pre-isel generic floating-point opcode,
-/// having only floating-point operands.
-static bool isPreISelGenericFloatingPointOpcode(unsigned Opc) {
-  switch (Opc) {
-  case TargetOpcode::G_FADD:
-  case TargetOpcode::G_FSUB:
-  case TargetOpcode::G_FMUL:
-  case TargetOpcode::G_FMA:
-  case TargetOpcode::G_FDIV:
-  case TargetOpcode::G_FCONSTANT:
-  case TargetOpcode::G_FPEXT:
-  case TargetOpcode::G_FPTRUNC:
-  case TargetOpcode::G_FCEIL:
-  case TargetOpcode::G_FFLOOR:
-  case TargetOpcode::G_FNEARBYINT:
-  case TargetOpcode::G_FNEG:
-  case TargetOpcode::G_FCOS:
-  case TargetOpcode::G_FSIN:
-  case TargetOpcode::G_FLOG10:
-  case TargetOpcode::G_FLOG:
-  case TargetOpcode::G_FLOG2:
-  case TargetOpcode::G_FSQRT:
-  case TargetOpcode::G_FABS:
-  case TargetOpcode::G_FEXP:
-  case TargetOpcode::G_FRINT:
-  case TargetOpcode::G_INTRINSIC_TRUNC:
-  case TargetOpcode::G_INTRINSIC_ROUND:
-    return true;
-  }
-  return false;
-}
-
-const RegisterBankInfo::InstructionMapping &
-AArch64RegisterBankInfo::getSameKindOfOperandsMapping(
-    const MachineInstr &MI) const {
-  const unsigned Opc = MI.getOpcode();
-  const MachineFunction &MF = *MI.getParent()->getParent();
-  const MachineRegisterInfo &MRI = MF.getRegInfo();
-
-  unsigned NumOperands = MI.getNumOperands();
-  assert(NumOperands <= 3 &&
-         "This code is for instructions with 3 or less operands");
-
-  LLT Ty = MRI.getType(MI.getOperand(0).getReg());
-  unsigned Size = Ty.getSizeInBits();
-  bool IsFPR = Ty.isVector() || isPreISelGenericFloatingPointOpcode(Opc);
-
-  PartialMappingIdx RBIdx = IsFPR ? PMI_FirstFPR : PMI_FirstGPR;
-
-#ifndef NDEBUG
-  // Make sure all the operands are using similar size and type.
-  // Should probably be checked by the machine verifier.
-  // This code won't catch cases where the number of lanes is
-  // different between the operands.
-  // If we want to go to that level of details, it is probably
-  // best to check that the types are the same, period.
-  // Currently, we just check that the register banks are the same
-  // for each types.
-  for (unsigned Idx = 1; Idx != NumOperands; ++Idx) {
-    LLT OpTy = MRI.getType(MI.getOperand(Idx).getReg());
-    assert(
-        AArch64GenRegisterBankInfo::getRegBankBaseIdxOffset(
-            RBIdx, OpTy.getSizeInBits()) ==
-            AArch64GenRegisterBankInfo::getRegBankBaseIdxOffset(RBIdx, Size) &&
-        "Operand has incompatible size");
-    bool OpIsFPR = OpTy.isVector() || isPreISelGenericFloatingPointOpcode(Opc);
-    (void)OpIsFPR;
-    assert(IsFPR == OpIsFPR && "Operand has incompatible type");
-  }
-#endif // End NDEBUG.
-
-  return getInstructionMapping(DefaultMappingID, 1,
-                               getValueMapping(RBIdx, Size), NumOperands);
-}
-
-bool AArch64RegisterBankInfo::hasFPConstraints(
-    const MachineInstr &MI, const MachineRegisterInfo &MRI,
-    const TargetRegisterInfo &TRI) const {
-  unsigned Op = MI.getOpcode();
-
-  // Do we have an explicit floating point instruction?
-  if (isPreISelGenericFloatingPointOpcode(Op))
-    return true;
-
-  // No. Check if we have a copy-like instruction. If we do, then we could
-  // still be fed by floating point instructions.
-  if (Op != TargetOpcode::COPY && !MI.isPHI())
-    return false;
-
-  // MI is copy-like. Return true if it outputs an FPR.
-  return getRegBank(MI.getOperand(0).getReg(), MRI, TRI) ==
-         &AArch64::FPRRegBank;
-}
-
-bool AArch64RegisterBankInfo::onlyUsesFP(const MachineInstr &MI,
-                                         const MachineRegisterInfo &MRI,
-                                         const TargetRegisterInfo &TRI) const {
-  switch (MI.getOpcode()) {
-  case TargetOpcode::G_FPTOSI:
-  case TargetOpcode::G_FPTOUI:
-  case TargetOpcode::G_FCMP:
-    return true;
-  default:
-    break;
-  }
-  return hasFPConstraints(MI, MRI, TRI);
-}
-
-bool AArch64RegisterBankInfo::onlyDefinesFP(
-    const MachineInstr &MI, const MachineRegisterInfo &MRI,
-    const TargetRegisterInfo &TRI) const {
-  switch (MI.getOpcode()) {
-  case TargetOpcode::G_SITOFP:
-  case TargetOpcode::G_UITOFP:
-  case TargetOpcode::G_EXTRACT_VECTOR_ELT:
-  case TargetOpcode::G_INSERT_VECTOR_ELT:
-    return true;
-  default:
-    break;
-  }
-  return hasFPConstraints(MI, MRI, TRI);
-}
-
-const RegisterBankInfo::InstructionMapping &
-AArch64RegisterBankInfo::getInstrMapping(const MachineInstr &MI) const {
-  const unsigned Opc = MI.getOpcode();
-
-  // Try the default logic for non-generic instructions that are either copies
-  // or already have some operands assigned to banks.
-  if ((Opc != TargetOpcode::COPY && !isPreISelGenericOpcode(Opc)) ||
-      Opc == TargetOpcode::G_PHI) {
-    const RegisterBankInfo::InstructionMapping &Mapping =
-        getInstrMappingImpl(MI);
-    if (Mapping.isValid())
-      return Mapping;
-  }
-
-  const MachineFunction &MF = *MI.getParent()->getParent();
-  const MachineRegisterInfo &MRI = MF.getRegInfo();
-  const TargetSubtargetInfo &STI = MF.getSubtarget();
-  const TargetRegisterInfo &TRI = *STI.getRegisterInfo();
-
-  switch (Opc) {
-    // G_{F|S|U}REM are not listed because they are not legal.
-    // Arithmetic ops.
-  case TargetOpcode::G_ADD:
-  case TargetOpcode::G_SUB:
-  case TargetOpcode::G_PTR_ADD:
-  case TargetOpcode::G_MUL:
-  case TargetOpcode::G_SDIV:
-  case TargetOpcode::G_UDIV:
-    // Bitwise ops.
-  case TargetOpcode::G_AND:
-  case TargetOpcode::G_OR:
-  case TargetOpcode::G_XOR:
-    // Floating point ops.
-  case TargetOpcode::G_FADD:
-  case TargetOpcode::G_FSUB:
-  case TargetOpcode::G_FMUL:
-  case TargetOpcode::G_FDIV:
-    return getSameKindOfOperandsMapping(MI);
-  case TargetOpcode::G_FPEXT: {
-    LLT DstTy = MRI.getType(MI.getOperand(0).getReg());
-    LLT SrcTy = MRI.getType(MI.getOperand(1).getReg());
-    return getInstructionMapping(
-        DefaultMappingID, /*Cost*/ 1,
-        getFPExtMapping(DstTy.getSizeInBits(), SrcTy.getSizeInBits()),
-        /*NumOperands*/ 2);
-  }
-    // Shifts.
-  case TargetOpcode::G_SHL:
-  case TargetOpcode::G_LSHR:
-  case TargetOpcode::G_ASHR: {
-    LLT ShiftAmtTy = MRI.getType(MI.getOperand(2).getReg());
-    LLT SrcTy = MRI.getType(MI.getOperand(1).getReg());
-    if (ShiftAmtTy.getSizeInBits() == 64 && SrcTy.getSizeInBits() == 32)
-      return getInstructionMapping(DefaultMappingID, 1,
-                                   &ValMappings[Shift64Imm], 3);
-    return getSameKindOfOperandsMapping(MI);
-  }
-  case TargetOpcode::COPY: {
-    Register DstReg = MI.getOperand(0).getReg();
-    Register SrcReg = MI.getOperand(1).getReg();
-    // Check if one of the register is not a generic register.
-    if ((Register::isPhysicalRegister(DstReg) ||
-         !MRI.getType(DstReg).isValid()) ||
-        (Register::isPhysicalRegister(SrcReg) ||
-         !MRI.getType(SrcReg).isValid())) {
-      const RegisterBank *DstRB = getRegBank(DstReg, MRI, TRI);
-      const RegisterBank *SrcRB = getRegBank(SrcReg, MRI, TRI);
-      if (!DstRB)
-        DstRB = SrcRB;
-      else if (!SrcRB)
-        SrcRB = DstRB;
-      // If both RB are null that means both registers are generic.
-      // We shouldn't be here.
-      assert(DstRB && SrcRB && "Both RegBank were nullptr");
-      unsigned Size = getSizeInBits(DstReg, MRI, TRI);
-      return getInstructionMapping(
-          DefaultMappingID, copyCost(*DstRB, *SrcRB, Size),
-          getCopyMapping(DstRB->getID(), SrcRB->getID(), Size),
-          // We only care about the mapping of the destination.
-          /*NumOperands*/ 1);
-    }
-    // Both registers are generic, use G_BITCAST.
-    LLVM_FALLTHROUGH;
-  }
-  case TargetOpcode::G_BITCAST: {
-    LLT DstTy = MRI.getType(MI.getOperand(0).getReg());
-    LLT SrcTy = MRI.getType(MI.getOperand(1).getReg());
-    unsigned Size = DstTy.getSizeInBits();
-    bool DstIsGPR = !DstTy.isVector() && DstTy.getSizeInBits() <= 64;
-    bool SrcIsGPR = !SrcTy.isVector() && SrcTy.getSizeInBits() <= 64;
-    const RegisterBank &DstRB =
-        DstIsGPR ? AArch64::GPRRegBank : AArch64::FPRRegBank;
-    const RegisterBank &SrcRB =
-        SrcIsGPR ? AArch64::GPRRegBank : AArch64::FPRRegBank;
-    return getInstructionMapping(
-        DefaultMappingID, copyCost(DstRB, SrcRB, Size),
-        getCopyMapping(DstRB.getID(), SrcRB.getID(), Size),
-        // We only care about the mapping of the destination for COPY.
-        /*NumOperands*/ Opc == TargetOpcode::G_BITCAST ? 2 : 1);
-  }
-  default:
-    break;
-  }
-
-  unsigned NumOperands = MI.getNumOperands();
-
-  // Track the size and bank of each register.  We don't do partial mappings.
-  SmallVector<unsigned, 4> OpSize(NumOperands);
-  SmallVector<PartialMappingIdx, 4> OpRegBankIdx(NumOperands);
-  for (unsigned Idx = 0; Idx < NumOperands; ++Idx) {
-    auto &MO = MI.getOperand(Idx);
-    if (!MO.isReg() || !MO.getReg())
-      continue;
-
-    LLT Ty = MRI.getType(MO.getReg());
-    OpSize[Idx] = Ty.getSizeInBits();
-
-    // As a top-level guess, vectors go in FPRs, scalars and pointers in GPRs.
-    // For floating-point instructions, scalars go in FPRs.
-    if (Ty.isVector() || isPreISelGenericFloatingPointOpcode(Opc) ||
-        Ty.getSizeInBits() > 64)
-      OpRegBankIdx[Idx] = PMI_FirstFPR;
-    else
-      OpRegBankIdx[Idx] = PMI_FirstGPR;
-  }
-
-  unsigned Cost = 1;
-  // Some of the floating-point instructions have mixed GPR and FPR operands:
-  // fine-tune the computed mapping.
-  switch (Opc) {
-  case TargetOpcode::G_TRUNC: {
-    LLT SrcTy = MRI.getType(MI.getOperand(1).getReg());
-    if (!SrcTy.isVector() && SrcTy.getSizeInBits() == 128)
-      OpRegBankIdx = {PMI_FirstFPR, PMI_FirstFPR};
-    break;
-  }
-  case TargetOpcode::G_SITOFP:
-  case TargetOpcode::G_UITOFP:
-    if (MRI.getType(MI.getOperand(0).getReg()).isVector())
-      break;
-    OpRegBankIdx = {PMI_FirstFPR, PMI_FirstGPR};
-    break;
-  case TargetOpcode::G_FPTOSI:
-  case TargetOpcode::G_FPTOUI:
-    if (MRI.getType(MI.getOperand(0).getReg()).isVector())
-      break;
-    OpRegBankIdx = {PMI_FirstGPR, PMI_FirstFPR};
-    break;
-  case TargetOpcode::G_FCMP:
-    OpRegBankIdx = {PMI_FirstGPR,
-                    /* Predicate */ PMI_None, PMI_FirstFPR, PMI_FirstFPR};
-    break;
-  case TargetOpcode::G_BITCAST:
-    // This is going to be a cross register bank copy and this is expensive.
-    if (OpRegBankIdx[0] != OpRegBankIdx[1])
-      Cost = copyCost(
-          *AArch64GenRegisterBankInfo::PartMappings[OpRegBankIdx[0]].RegBank,
-          *AArch64GenRegisterBankInfo::PartMappings[OpRegBankIdx[1]].RegBank,
-          OpSize[0]);
-    break;
-  case TargetOpcode::G_LOAD:
-    // Loading in vector unit is slightly more expensive.
-    // This is actually only true for the LD1R and co instructions,
-    // but anyway for the fast mode this number does not matter and
-    // for the greedy mode the cost of the cross bank copy will
-    // offset this number.
-    // FIXME: Should be derived from the scheduling model.
-    if (OpRegBankIdx[0] != PMI_FirstGPR)
-      Cost = 2;
-    else
-      // Check if that load feeds fp instructions.
-      // In that case, we want the default mapping to be on FPR
-      // instead of blind map every scalar to GPR.
-      for (const MachineInstr &UseMI :
-           MRI.use_instructions(MI.getOperand(0).getReg())) {
-        // If we have at least one direct use in a FP instruction,
-        // assume this was a floating point load in the IR.
-        // If it was not, we would have had a bitcast before
-        // reaching that instruction.
-        if (onlyUsesFP(UseMI, MRI, TRI)) {
-          OpRegBankIdx[0] = PMI_FirstFPR;
-          break;
-        }
-      }
-    break;
-  case TargetOpcode::G_STORE:
-    // Check if that store is fed by fp instructions.
-    if (OpRegBankIdx[0] == PMI_FirstGPR) {
-      Register VReg = MI.getOperand(0).getReg();
-      if (!VReg)
-        break;
-      MachineInstr *DefMI = MRI.getVRegDef(VReg);
-      if (onlyDefinesFP(*DefMI, MRI, TRI))
-        OpRegBankIdx[0] = PMI_FirstFPR;
-      break;
-    }
-    break;
-  case TargetOpcode::G_SELECT: {
-    // If the destination is FPR, preserve that.
-    if (OpRegBankIdx[0] != PMI_FirstGPR)
-      break;
-
-    // If we're taking in vectors, we have no choice but to put everything on
-    // FPRs, except for the condition. The condition must always be on a GPR.
-    LLT SrcTy = MRI.getType(MI.getOperand(2).getReg());
-    if (SrcTy.isVector()) {
-      OpRegBankIdx = {PMI_FirstFPR, PMI_FirstGPR, PMI_FirstFPR, PMI_FirstFPR};
-      break;
-    }
-
-    // Try to minimize the number of copies. If we have more floating point
-    // constrained values than not, then we'll put everything on FPR. Otherwise,
-    // everything has to be on GPR.
-    unsigned NumFP = 0;
-
-    // Check if the uses of the result always produce floating point values.
-    //
-    // For example:
-    //
-    // %z = G_SELECT %cond %x %y
-    // fpr = G_FOO %z ...
-    if (any_of(
-            MRI.use_instructions(MI.getOperand(0).getReg()),
-            [&](MachineInstr &MI) { return onlyUsesFP(MI, MRI, TRI); }))
-      ++NumFP;
-
-    // Check if the defs of the source values always produce floating point
-    // values.
-    //
-    // For example:
-    //
-    // %x = G_SOMETHING_ALWAYS_FLOAT %a ...
-    // %z = G_SELECT %cond %x %y
-    //
-    // Also check whether or not the sources have already been decided to be
-    // FPR. Keep track of this.
-    //
-    // This doesn't check the condition, since it's just whatever is in NZCV.
-    // This isn't passed explicitly in a register to fcsel/csel.
-    for (unsigned Idx = 2; Idx < 4; ++Idx) {
-      Register VReg = MI.getOperand(Idx).getReg();
-      MachineInstr *DefMI = MRI.getVRegDef(VReg);
-      if (getRegBank(VReg, MRI, TRI) == &AArch64::FPRRegBank ||
-          onlyDefinesFP(*DefMI, MRI, TRI))
-        ++NumFP;
-    }
-
-    // If we have more FP constraints than not, then move everything over to
-    // FPR.
-    if (NumFP >= 2)
-      OpRegBankIdx = {PMI_FirstFPR, PMI_FirstGPR, PMI_FirstFPR, PMI_FirstFPR};
-
-    break;
-  }
-  case TargetOpcode::G_UNMERGE_VALUES: {
-    // If the first operand belongs to a FPR register bank, then make sure that
-    // we preserve that.
-    if (OpRegBankIdx[0] != PMI_FirstGPR)
-      break;
-
-    LLT SrcTy = MRI.getType(MI.getOperand(MI.getNumOperands()-1).getReg());
-    // UNMERGE into scalars from a vector should always use FPR.
-    // Likewise if any of the uses are FP instructions.
-    if (SrcTy.isVector() || SrcTy == LLT::scalar(128) ||
-        any_of(MRI.use_instructions(MI.getOperand(0).getReg()),
-               [&](MachineInstr &MI) { return onlyUsesFP(MI, MRI, TRI); })) {
-      // Set the register bank of every operand to FPR.
-      for (unsigned Idx = 0, NumOperands = MI.getNumOperands();
-           Idx < NumOperands; ++Idx)
-        OpRegBankIdx[Idx] = PMI_FirstFPR;
-    }
-    break;
-  }
-  case TargetOpcode::G_EXTRACT_VECTOR_ELT:
-    // Destination and source need to be FPRs.
-    OpRegBankIdx[0] = PMI_FirstFPR;
-    OpRegBankIdx[1] = PMI_FirstFPR;
-
-    // Index needs to be a GPR.
-    OpRegBankIdx[2] = PMI_FirstGPR;
-    break;
-  case TargetOpcode::G_INSERT_VECTOR_ELT:
-    OpRegBankIdx[0] = PMI_FirstFPR;
-    OpRegBankIdx[1] = PMI_FirstFPR;
-
-    // The element may be either a GPR or FPR. Preserve that behaviour.
-    if (getRegBank(MI.getOperand(2).getReg(), MRI, TRI) == &AArch64::FPRRegBank)
-      OpRegBankIdx[2] = PMI_FirstFPR;
-    else
-      OpRegBankIdx[2] = PMI_FirstGPR;
-
-    // Index needs to be a GPR.
-    OpRegBankIdx[3] = PMI_FirstGPR;
-    break;
-  case TargetOpcode::G_EXTRACT: {
-    // For s128 sources we have to use fpr.
-    LLT SrcTy = MRI.getType(MI.getOperand(1).getReg());
-    if (SrcTy.getSizeInBits() == 128) {
-      OpRegBankIdx[0] = PMI_FirstFPR;
-      OpRegBankIdx[1] = PMI_FirstFPR;
-    }
-    break;
-  }
-  case TargetOpcode::G_BUILD_VECTOR:
-    // If the first source operand belongs to a FPR register bank, then make
-    // sure that we preserve that.
-    if (OpRegBankIdx[1] != PMI_FirstGPR)
-      break;
-    Register VReg = MI.getOperand(1).getReg();
-    if (!VReg)
-      break;
-
-    // Get the instruction that defined the source operand reg, and check if
-    // it's a floating point operation. Or, if it's a type like s16 which
-    // doesn't have a exact size gpr register class.
-    MachineInstr *DefMI = MRI.getVRegDef(VReg);
-    unsigned DefOpc = DefMI->getOpcode();
-    const LLT SrcTy = MRI.getType(VReg);
-    if (isPreISelGenericFloatingPointOpcode(DefOpc) ||
-        SrcTy.getSizeInBits() < 32) {
-      // Have a floating point op.
-      // Make sure every operand gets mapped to a FPR register class.
-      unsigned NumOperands = MI.getNumOperands();
-      for (unsigned Idx = 0; Idx < NumOperands; ++Idx)
-        OpRegBankIdx[Idx] = PMI_FirstFPR;
-    }
-    break;
-  }
-
-  // Finally construct the computed mapping.
-  SmallVector<const ValueMapping *, 8> OpdsMapping(NumOperands);
-  for (unsigned Idx = 0; Idx < NumOperands; ++Idx) {
-    if (MI.getOperand(Idx).isReg() && MI.getOperand(Idx).getReg()) {
-      auto Mapping = getValueMapping(OpRegBankIdx[Idx], OpSize[Idx]);
-      if (!Mapping->isValid())
-        return getInvalidInstructionMapping();
-
-      OpdsMapping[Idx] = Mapping;
-    }
-  }
-
-  return getInstructionMapping(DefaultMappingID, Cost,
-                               getOperandsMapping(OpdsMapping), NumOperands);
-}
diff --git a/gnu/llvm/llvm/lib/Target/AArch64/AArch64RegisterBankInfo.h b/gnu/llvm/llvm/lib/Target/AArch64/AArch64RegisterBankInfo.h
deleted file mode 100644 (file)
index e956fca..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-//===- AArch64RegisterBankInfo -----------------------------------*- C++ -*-==//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-/// \file
-/// This file declares the targeting of the RegisterBankInfo class for AArch64.
-/// \todo This should be generated by TableGen.
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_LIB_TARGET_AARCH64_AARCH64REGISTERBANKINFO_H
-#define LLVM_LIB_TARGET_AARCH64_AARCH64REGISTERBANKINFO_H
-
-#include "llvm/CodeGen/GlobalISel/RegisterBankInfo.h"
-
-#define GET_REGBANK_DECLARATIONS
-#include "AArch64GenRegisterBank.inc"
-
-namespace llvm {
-
-class TargetRegisterInfo;
-
-class AArch64GenRegisterBankInfo : public RegisterBankInfo {
-protected:
-  enum PartialMappingIdx {
-    PMI_None = -1,
-    PMI_FPR16 = 1,
-    PMI_FPR32,
-    PMI_FPR64,
-    PMI_FPR128,
-    PMI_FPR256,
-    PMI_FPR512,
-    PMI_GPR32,
-    PMI_GPR64,
-    PMI_FirstGPR = PMI_GPR32,
-    PMI_LastGPR = PMI_GPR64,
-    PMI_FirstFPR = PMI_FPR16,
-    PMI_LastFPR = PMI_FPR512,
-    PMI_Min = PMI_FirstFPR,
-  };
-
-  static RegisterBankInfo::PartialMapping PartMappings[];
-  static RegisterBankInfo::ValueMapping ValMappings[];
-  static PartialMappingIdx BankIDToCopyMapIdx[];
-
-  enum ValueMappingIdx {
-    InvalidIdx = 0,
-    First3OpsIdx = 1,
-    Last3OpsIdx = 22,
-    DistanceBetweenRegBanks = 3,
-    FirstCrossRegCpyIdx = 25,
-    LastCrossRegCpyIdx = 39,
-    DistanceBetweenCrossRegCpy = 2,
-    FPExt16To32Idx = 41,
-    FPExt16To64Idx = 43,
-    FPExt32To64Idx = 45,
-    FPExt64To128Idx = 47,
-    Shift64Imm = 49
-  };
-
-  static bool checkPartialMap(unsigned Idx, unsigned ValStartIdx,
-                              unsigned ValLength, const RegisterBank &RB);
-  static bool checkValueMapImpl(unsigned Idx, unsigned FirstInBank,
-                                unsigned Size, unsigned Offset);
-  static bool checkPartialMappingIdx(PartialMappingIdx FirstAlias,
-                                     PartialMappingIdx LastAlias,
-                                     ArrayRef<PartialMappingIdx> Order);
-
-  static unsigned getRegBankBaseIdxOffset(unsigned RBIdx, unsigned Size);
-
-  /// Get the pointer to the ValueMapping representing the RegisterBank
-  /// at \p RBIdx with a size of \p Size.
-  ///
-  /// The returned mapping works for instructions with the same kind of
-  /// operands for up to 3 operands.
-  ///
-  /// \pre \p RBIdx != PartialMappingIdx::None
-  static const RegisterBankInfo::ValueMapping *
-  getValueMapping(PartialMappingIdx RBIdx, unsigned Size);
-
-  /// Get the pointer to the ValueMapping of the operands of a copy
-  /// instruction from the \p SrcBankID register bank to the \p DstBankID
-  /// register bank with a size of \p Size.
-  static const RegisterBankInfo::ValueMapping *
-  getCopyMapping(unsigned DstBankID, unsigned SrcBankID, unsigned Size);
-
-  /// Get the instruction mapping for G_FPEXT.
-  ///
-  /// \pre (DstSize, SrcSize) pair is one of the following:
-  ///      (32, 16), (64, 16), (64, 32), (128, 64)
-  ///
-  /// \return An InstructionMapping with statically allocated OperandsMapping.
-  static const RegisterBankInfo::ValueMapping *
-  getFPExtMapping(unsigned DstSize, unsigned SrcSize);
-
-#define GET_TARGET_REGBANK_CLASS
-#include "AArch64GenRegisterBank.inc"
-};
-
-/// This class provides the information for the target register banks.
-class AArch64RegisterBankInfo final : public AArch64GenRegisterBankInfo {
-  /// See RegisterBankInfo::applyMapping.
-  void applyMappingImpl(const OperandsMapper &OpdMapper) const override;
-
-  /// Get an instruction mapping where all the operands map to
-  /// the same register bank and have similar size.
-  ///
-  /// \pre MI.getNumOperands() <= 3
-  ///
-  /// \return An InstructionMappings with a statically allocated
-  /// OperandsMapping.
-  const InstructionMapping &
-  getSameKindOfOperandsMapping(const MachineInstr &MI) const;
-
-  /// Returns true if the output of \p MI must be stored on a FPR register.
-  bool hasFPConstraints(const MachineInstr &MI, const MachineRegisterInfo &MRI,
-                     const TargetRegisterInfo &TRI) const;
-
-  /// Returns true if the source registers of \p MI must all be FPRs.
-  bool onlyUsesFP(const MachineInstr &MI, const MachineRegisterInfo &MRI,
-                  const TargetRegisterInfo &TRI) const;
-
-  /// Returns true if the destination register of \p MI must be a FPR.
-  bool onlyDefinesFP(const MachineInstr &MI, const MachineRegisterInfo &MRI,
-                     const TargetRegisterInfo &TRI) const;
-
-public:
-  AArch64RegisterBankInfo(const TargetRegisterInfo &TRI);
-
-  unsigned copyCost(const RegisterBank &A, const RegisterBank &B,
-                    unsigned Size) const override;
-
-  const RegisterBank &getRegBankFromRegClass(const TargetRegisterClass &RC,
-                                             LLT) const override;
-
-  InstructionMappings
-  getInstrAlternativeMappings(const MachineInstr &MI) const override;
-
-  const InstructionMapping &
-  getInstrMapping(const MachineInstr &MI) const override;
-};
-} // End llvm namespace.
-#endif
index b111f00..5ca9f36 100644 (file)
@@ -453,6 +453,7 @@ public:
   bool isTargetDarwin() const { return TargetTriple.isOSDarwin(); }
   bool isTargetIOS() const { return TargetTriple.isiOS(); }
   bool isTargetLinux() const { return TargetTriple.isOSLinux(); }
+  bool isTargetOpenBSD() const { return TargetTriple.isOSOpenBSD(); }
   bool isTargetWindows() const { return TargetTriple.isOSWindows(); }
   bool isTargetAndroid() const { return TargetTriple.isAndroid(); }
   bool isTargetFuchsia() const { return TargetTriple.isOSFuchsia(); }
index a63b9a9..1fcbe7c 100644 (file)
@@ -308,6 +308,7 @@ AArch64TargetMachine::AArch64TargetMachine(const Target &T, const Triple &TT,
   // Enable GlobalISel at or below EnableGlobalISelAt0, unless this is
   // MachO/CodeModel::Large, which GlobalISel does not support.
   if (getOptLevel() <= EnableGlobalISelAtO &&
+      !getTargetTriple().isOSOpenBSD() &&
       TT.getArch() != Triple::aarch64_32 &&
       !(getCodeModel() == CodeModel::Large && TT.isOSBinFormatMachO())) {
     setGlobalISel(true);
index 5dda8ef..cd31bfb 100644 (file)
@@ -59,6 +59,7 @@ add_llvm_target(AArch64CodeGen
   AArch64PromoteConstant.cpp
   AArch64PBQPRegAlloc.cpp
   AArch64RegisterInfo.cpp
+  AArch64ReturnProtectorLowering.cpp
   AArch64SLSHardening.cpp
   AArch64SelectionDAGInfo.cpp
   AArch64SpeculationHardening.cpp
diff --git a/gnu/llvm/llvm/lib/Target/AMDGPU/AMDGPURegisterInfo.cpp b/gnu/llvm/llvm/lib/Target/AMDGPU/AMDGPURegisterInfo.cpp
deleted file mode 100644 (file)
index 9806e6b..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-//===-- AMDGPURegisterInfo.cpp - AMDGPU Register Information -------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-/// \file
-/// Parent TargetRegisterInfo class common to all hw codegen targets.
-//
-//===----------------------------------------------------------------------===//
-
-#include "AMDGPURegisterInfo.h"
-#include "AMDGPUTargetMachine.h"
-#include "SIMachineFunctionInfo.h"
-#include "SIRegisterInfo.h"
-#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
-
-using namespace llvm;
-
-AMDGPURegisterInfo::AMDGPURegisterInfo() : AMDGPUGenRegisterInfo(0) {}
-
-//===----------------------------------------------------------------------===//
-// Function handling callbacks - Functions are a seldom used feature of GPUS, so
-// they are not supported at this time.
-//===----------------------------------------------------------------------===//
-
-// Table of NumRegs sized pieces at every 32-bit offset.
-static const uint16_t SubRegFromChannelTable[][32] = {
-  { AMDGPU::sub0, AMDGPU::sub1, AMDGPU::sub2, AMDGPU::sub3,
-    AMDGPU::sub4, AMDGPU::sub5, AMDGPU::sub6, AMDGPU::sub7,
-    AMDGPU::sub8, AMDGPU::sub9, AMDGPU::sub10, AMDGPU::sub11,
-    AMDGPU::sub12, AMDGPU::sub13, AMDGPU::sub14, AMDGPU::sub15,
-    AMDGPU::sub16, AMDGPU::sub17, AMDGPU::sub18, AMDGPU::sub19,
-    AMDGPU::sub20, AMDGPU::sub21, AMDGPU::sub22, AMDGPU::sub23,
-    AMDGPU::sub24, AMDGPU::sub25, AMDGPU::sub26, AMDGPU::sub27,
-    AMDGPU::sub28, AMDGPU::sub29, AMDGPU::sub30, AMDGPU::sub31
-  },
-  {
-    AMDGPU::sub0_sub1, AMDGPU::sub1_sub2, AMDGPU::sub2_sub3, AMDGPU::sub3_sub4,
-    AMDGPU::sub4_sub5, AMDGPU::sub5_sub6, AMDGPU::sub6_sub7, AMDGPU::sub7_sub8,
-    AMDGPU::sub8_sub9, AMDGPU::sub9_sub10, AMDGPU::sub10_sub11, AMDGPU::sub11_sub12,
-    AMDGPU::sub12_sub13, AMDGPU::sub13_sub14, AMDGPU::sub14_sub15, AMDGPU::sub15_sub16,
-    AMDGPU::sub16_sub17, AMDGPU::sub17_sub18, AMDGPU::sub18_sub19, AMDGPU::sub19_sub20,
-    AMDGPU::sub20_sub21, AMDGPU::sub21_sub22, AMDGPU::sub22_sub23, AMDGPU::sub23_sub24,
-    AMDGPU::sub24_sub25, AMDGPU::sub25_sub26, AMDGPU::sub26_sub27, AMDGPU::sub27_sub28,
-    AMDGPU::sub28_sub29, AMDGPU::sub29_sub30, AMDGPU::sub30_sub31, AMDGPU::NoSubRegister
-  },
-  {
-    AMDGPU::sub0_sub1_sub2, AMDGPU::sub1_sub2_sub3, AMDGPU::sub2_sub3_sub4, AMDGPU::sub3_sub4_sub5,
-    AMDGPU::sub4_sub5_sub6, AMDGPU::sub5_sub6_sub7, AMDGPU::sub6_sub7_sub8, AMDGPU::sub7_sub8_sub9,
-    AMDGPU::sub8_sub9_sub10, AMDGPU::sub9_sub10_sub11, AMDGPU::sub10_sub11_sub12, AMDGPU::sub11_sub12_sub13,
-    AMDGPU::sub12_sub13_sub14, AMDGPU::sub13_sub14_sub15, AMDGPU::sub14_sub15_sub16, AMDGPU::sub15_sub16_sub17,
-    AMDGPU::sub16_sub17_sub18, AMDGPU::sub17_sub18_sub19, AMDGPU::sub18_sub19_sub20, AMDGPU::sub19_sub20_sub21,
-    AMDGPU::sub20_sub21_sub22, AMDGPU::sub21_sub22_sub23, AMDGPU::sub22_sub23_sub24, AMDGPU::sub23_sub24_sub25,
-    AMDGPU::sub24_sub25_sub26, AMDGPU::sub25_sub26_sub27, AMDGPU::sub26_sub27_sub28, AMDGPU::sub27_sub28_sub29,
-    AMDGPU::sub28_sub29_sub30, AMDGPU::sub29_sub30_sub31, AMDGPU::NoSubRegister, AMDGPU::NoSubRegister
-  },
-  {
-    AMDGPU::sub0_sub1_sub2_sub3, AMDGPU::sub1_sub2_sub3_sub4, AMDGPU::sub2_sub3_sub4_sub5, AMDGPU::sub3_sub4_sub5_sub6,
-    AMDGPU::sub4_sub5_sub6_sub7, AMDGPU::sub5_sub6_sub7_sub8, AMDGPU::sub6_sub7_sub8_sub9, AMDGPU::sub7_sub8_sub9_sub10,
-    AMDGPU::sub8_sub9_sub10_sub11, AMDGPU::sub9_sub10_sub11_sub12, AMDGPU::sub10_sub11_sub12_sub13, AMDGPU::sub11_sub12_sub13_sub14,
-    AMDGPU::sub12_sub13_sub14_sub15, AMDGPU::sub13_sub14_sub15_sub16, AMDGPU::sub14_sub15_sub16_sub17, AMDGPU::sub15_sub16_sub17_sub18,
-    AMDGPU::sub16_sub17_sub18_sub19, AMDGPU::sub17_sub18_sub19_sub20, AMDGPU::sub18_sub19_sub20_sub21, AMDGPU::sub19_sub20_sub21_sub22,
-    AMDGPU::sub20_sub21_sub22_sub23, AMDGPU::sub21_sub22_sub23_sub24, AMDGPU::sub22_sub23_sub24_sub25, AMDGPU::sub23_sub24_sub25_sub26,
-    AMDGPU::sub24_sub25_sub26_sub27, AMDGPU::sub25_sub26_sub27_sub28, AMDGPU::sub26_sub27_sub28_sub29, AMDGPU::sub27_sub28_sub29_sub30,
-    AMDGPU::sub28_sub29_sub30_sub31, AMDGPU::NoSubRegister, AMDGPU::NoSubRegister, AMDGPU::NoSubRegister
-  }
-};
-
-// FIXME: TableGen should generate something to make this manageable for all
-// register classes. At a minimum we could use the opposite of
-// composeSubRegIndices and go up from the base 32-bit subreg.
-unsigned AMDGPURegisterInfo::getSubRegFromChannel(unsigned Channel, unsigned NumRegs) {
-  const unsigned NumRegIndex = NumRegs - 1;
-
-  assert(NumRegIndex < array_lengthof(SubRegFromChannelTable) &&
-         "Not implemented");
-  assert(Channel < array_lengthof(SubRegFromChannelTable[0]));
-  return SubRegFromChannelTable[NumRegIndex][Channel];
-}
-
-void AMDGPURegisterInfo::reserveRegisterTuples(BitVector &Reserved, unsigned Reg) const {
-  MCRegAliasIterator R(Reg, this, true);
-
-  for (; R.isValid(); ++R)
-    Reserved.set(*R);
-}
-
-#define GET_REGINFO_TARGET_DESC
-#include "AMDGPUGenRegisterInfo.inc"
-
-// Forced to be here by one .inc
-const MCPhysReg *SIRegisterInfo::getCalleeSavedRegs(
-  const MachineFunction *MF) const {
-  CallingConv::ID CC = MF->getFunction().getCallingConv();
-  switch (CC) {
-  case CallingConv::C:
-  case CallingConv::Fast:
-  case CallingConv::Cold:
-    return CSR_AMDGPU_HighRegs_SaveList;
-  default: {
-    // Dummy to not crash RegisterClassInfo.
-    static const MCPhysReg NoCalleeSavedReg = AMDGPU::NoRegister;
-    return &NoCalleeSavedReg;
-  }
-  }
-}
-
-const MCPhysReg *
-SIRegisterInfo::getCalleeSavedRegsViaCopy(const MachineFunction *MF) const {
-  return nullptr;
-}
-
-const uint32_t *SIRegisterInfo::getCallPreservedMask(const MachineFunction &MF,
-                                                     CallingConv::ID CC) const {
-  switch (CC) {
-  case CallingConv::C:
-  case CallingConv::Fast:
-  case CallingConv::Cold:
-    return CSR_AMDGPU_HighRegs_RegMask;
-  default:
-    return nullptr;
-  }
-}
-
-Register SIRegisterInfo::getFrameRegister(const MachineFunction &MF) const {
-  const SIFrameLowering *TFI =
-      MF.getSubtarget<GCNSubtarget>().getFrameLowering();
-  const SIMachineFunctionInfo *FuncInfo = MF.getInfo<SIMachineFunctionInfo>();
-  return TFI->hasFP(MF) ? FuncInfo->getFrameOffsetReg()
-                        : FuncInfo->getStackPtrOffsetReg();
-}
-
-const uint32_t *SIRegisterInfo::getAllVGPRRegMask() const {
-  return CSR_AMDGPU_AllVGPRs_RegMask;
-}
-
-const uint32_t *SIRegisterInfo::getAllAllocatableSRegMask() const {
-  return CSR_AMDGPU_AllAllocatableSRegs_RegMask;
-}
diff --git a/gnu/llvm/llvm/lib/Target/AMDGPU/AMDGPURegisterInfo.h b/gnu/llvm/llvm/lib/Target/AMDGPU/AMDGPURegisterInfo.h
deleted file mode 100644 (file)
index 9e713ca..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-//===-- AMDGPURegisterInfo.h - AMDGPURegisterInfo Interface -*- C++ -*-----===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-/// \file
-/// TargetRegisterInfo interface that is implemented by all hw codegen
-/// targets.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUREGISTERINFO_H
-#define LLVM_LIB_TARGET_AMDGPU_AMDGPUREGISTERINFO_H
-
-#define GET_REGINFO_HEADER
-#include "AMDGPUGenRegisterInfo.inc"
-
-namespace llvm {
-
-class GCNSubtarget;
-class TargetInstrInfo;
-
-struct AMDGPURegisterInfo : public AMDGPUGenRegisterInfo {
-  AMDGPURegisterInfo();
-
-  /// \returns the sub reg enum value for the given \p Channel
-  /// (e.g. getSubRegFromChannel(0) -> AMDGPU::sub0)
-  static unsigned getSubRegFromChannel(unsigned Channel, unsigned NumRegs = 1);
-
-  void reserveRegisterTuples(BitVector &, unsigned Reg) const;
-};
-
-} // End namespace llvm
-
-#endif
diff --git a/gnu/llvm/llvm/lib/Target/AMDGPU/AMDGPURegisterInfo.td b/gnu/llvm/llvm/lib/Target/AMDGPU/AMDGPURegisterInfo.td
deleted file mode 100644 (file)
index ab71b7a..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-//===-- AMDGPURegisterInfo.td - AMDGPU register info -------*- tablegen -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// Tablegen register definitions common to all hw codegen targets.
-//
-//===----------------------------------------------------------------------===//
-
-let Namespace = "AMDGPU" in {
-
-foreach Index = 0-31 in {
-  def sub#Index : SubRegIndex<32, !shl(Index, 5)>;
-}
-
-}
-
-include "SIRegisterInfo.td"
diff --git a/gnu/llvm/llvm/lib/Target/AMDGPU/VIInstructions.td b/gnu/llvm/llvm/lib/Target/AMDGPU/VIInstructions.td
deleted file mode 100644 (file)
index ec7d887..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-//===-- VIInstructions.td - VI Instruction Defintions ---------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-// Instruction definitions for VI and newer.
-//===----------------------------------------------------------------------===//
-
-FIXME: Deleting this file broke buildbots that don't do full rebuilds.  This
-file is no longer used by the backend, so it can be deleted once all
-the buildbots update there dependencies.
diff --git a/gnu/llvm/llvm/lib/Target/Hexagon/HexagonInstrFormatsV5.td b/gnu/llvm/llvm/lib/Target/Hexagon/HexagonInstrFormatsV5.td
deleted file mode 100644 (file)
index 68ef2d2..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-//==- HexagonInstrFormatsV5.td - Hexagon Instruction Formats --*- tablegen -==//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This file describes the Hexagon V5 instruction classes in TableGen format.
-//
-//===----------------------------------------------------------------------===//
-
-//                      Duplex Instruction Class Declaration
-//===----------------------------------------------------------------------===//
-
-class OpcodeDuplex {
-  field bits<32> Inst = ?; // Default to an invalid insn.
-  bits<4> IClass = 0; // ICLASS
-  bits<13> ISubHi = 0; // Low sub-insn
-  bits<13> ISubLo = 0; // High sub-insn
-
-  let Inst{31-29} = IClass{3-1};
-  let Inst{13}    = IClass{0};
-  let Inst{15-14} = 0;
-  let Inst{28-16} = ISubHi;
-  let Inst{12-0}  = ISubLo;
-}
-
-class InstDuplex<bits<4> iClass, list<dag> pattern = [],
-                 string cstr = "">
-  : Instruction, OpcodeDuplex {
-  let Namespace = "Hexagon";
-  IType Type = TypeDUPLEX;  // uses slot 0,1
-  let isCodeGenOnly = 1;
-  let hasSideEffects = 0;
-  dag OutOperandList = (outs);
-  dag InOperandList = (ins);
-  let IClass = iClass;
-  let Constraints = cstr;
-  let Itinerary = DUPLEX;
-  let Size = 4;
-
-  // SoftFail is a field the disassembler can use to provide a way for
-  // instructions to not match without killing the whole decode process. It is
-  // mainly used for ARM, but Tablegen expects this field to exist or it fails
-  // to build the decode table.
-  field bits<32> SoftFail = 0;
-
-  // *** Must match MCTargetDesc/HexagonBaseInfo.h ***
-
-  let TSFlags{6-0} = Type.Value;
-
-  // Predicated instructions.
-  bits<1> isPredicated = 0;
-  let TSFlags{7} = isPredicated;
-  bits<1> isPredicatedFalse = 0;
-  let TSFlags{8} = isPredicatedFalse;
-  bits<1> isPredicatedNew = 0;
-  let TSFlags{9} = isPredicatedNew;
-
-  // New-value insn helper fields.
-  bits<1> isNewValue = 0;
-  let TSFlags{10} = isNewValue; // New-value consumer insn.
-  bits<1> hasNewValue = 0;
-  let TSFlags{11} = hasNewValue; // New-value producer insn.
-  bits<3> opNewValue = 0;
-  let TSFlags{14-12} = opNewValue; // New-value produced operand.
-  bits<1> isNVStorable = 0;
-  let TSFlags{15} = isNVStorable; // Store that can become new-value store.
-  bits<1> isNVStore = 0;
-  let TSFlags{16} = isNVStore; // New-value store insn.
-
-  // Immediate extender helper fields.
-  bits<1> isExtendable = 0;
-  let TSFlags{17} = isExtendable; // Insn may be extended.
-  bits<1> isExtended = 0;
-  let TSFlags{18} = isExtended; // Insn must be extended.
-  bits<3> opExtendable = 0;
-  let TSFlags{21-19} = opExtendable; // Which operand may be extended.
-  bits<1> isExtentSigned = 0;
-  let TSFlags{22} = isExtentSigned; // Signed or unsigned range.
-  bits<5> opExtentBits = 0;
-  let TSFlags{27-23} = opExtentBits; //Number of bits of range before extending.
-  bits<2> opExtentAlign = 0;
-  let TSFlags{29-28} = opExtentAlign; // Alignment exponent before extending.
-}
index 05bc5b2..3868bdb 100644 (file)
@@ -180,6 +180,8 @@ class MipsAsmParser : public MCTargetAsmParser {
 
   /// Parse a register as used in CFI directives
   bool ParseRegister(unsigned &RegNo, SMLoc &StartLoc, SMLoc &EndLoc) override;
+  OperandMatchResultTy tryParseRegister(unsigned &RegNo, SMLoc &StartLoc,
+                                        SMLoc &EndLoc) override;
 
   bool parseParenSuffix(StringRef Name, OperandVector &Operands);
 
@@ -300,6 +302,12 @@ class MipsAsmParser : public MCTargetAsmParser {
   bool expandSgtImm(MCInst &Inst, SMLoc IDLoc, MCStreamer &Out,
                     const MCSubtargetInfo *STI);
 
+  bool expandSle(MCInst &Inst, SMLoc IDLoc, MCStreamer &Out,
+                 const MCSubtargetInfo *STI);
+
+  bool expandSleImm(MCInst &Inst, SMLoc IDLoc, MCStreamer &Out,
+                    const MCSubtargetInfo *STI);
+
   bool expandRotation(MCInst &Inst, SMLoc IDLoc,
                       MCStreamer &Out, const MCSubtargetInfo *STI);
   bool expandRotationImm(MCInst &Inst, SMLoc IDLoc, MCStreamer &Out,
@@ -336,6 +344,12 @@ class MipsAsmParser : public MCTargetAsmParser {
   bool expandSeqI(MCInst &Inst, SMLoc IDLoc, MCStreamer &Out,
                   const MCSubtargetInfo *STI);
 
+  bool expandSne(MCInst &Inst, SMLoc IDLoc, MCStreamer &Out,
+                 const MCSubtargetInfo *STI);
+
+  bool expandSneI(MCInst &Inst, SMLoc IDLoc, MCStreamer &Out,
+                  const MCSubtargetInfo *STI);
+
   bool expandMXTRAlias(MCInst &Inst, SMLoc IDLoc, MCStreamer &Out,
                        const MCSubtargetInfo *STI);
 
@@ -351,6 +365,7 @@ class MipsAsmParser : public MCTargetAsmParser {
   bool parseSetArchDirective();
   bool parseSetFeature(uint64_t Feature);
   bool isPicAndNotNxxAbi(); // Used by .cpload, .cprestore, and .cpsetup.
+  bool parseDirectiveCpAdd(SMLoc Loc);
   bool parseDirectiveCpLoad(SMLoc Loc);
   bool parseDirectiveCpLocal(SMLoc Loc);
   bool parseDirectiveCpRestore(SMLoc Loc);
@@ -370,6 +385,7 @@ class MipsAsmParser : public MCTargetAsmParser {
   bool parseSetMsaDirective();
   bool parseSetNoMsaDirective();
   bool parseSetNoDspDirective();
+  bool parseSetNoMips3DDirective();
   bool parseSetReorderDirective();
   bool parseSetNoReorderDirective();
   bool parseSetMips16Directive();
@@ -2143,10 +2159,10 @@ bool MipsAsmParser::processInstruction(MCInst &Inst, SMLoc IDLoc,
           MCSymbolRefExpr::create(JalSym, MCSymbolRefExpr::VK_None,
                                   getContext(), IDLoc);
 
-      TOut.getStreamer().EmitRelocDirective(*TmpExpr,
-          inMicroMipsMode() ? "R_MICROMIPS_JALR" : "R_MIPS_JALR",
+      TOut.getStreamer().emitRelocDirective(
+          *TmpExpr, inMicroMipsMode() ? "R_MICROMIPS_JALR" : "R_MIPS_JALR",
           RelocJalrExpr, IDLoc, *STI);
-      TOut.getStreamer().EmitLabel(TmpLabel);
+      TOut.getStreamer().emitLabel(TmpLabel);
     }
 
     Inst = JalrInst;
@@ -2328,7 +2344,7 @@ bool MipsAsmParser::processInstruction(MCInst &Inst, SMLoc IDLoc,
       tryExpandInstruction(Inst, IDLoc, Out, STI);
   switch (ExpandResult) {
   case MER_NotAMacro:
-    Out.EmitInstruction(Inst, *STI);
+    Out.emitInstruction(Inst, *STI);
     break;
   case MER_Success:
     break;
@@ -2529,6 +2545,14 @@ MipsAsmParser::tryExpandInstruction(MCInst &Inst, SMLoc IDLoc, MCStreamer &Out,
   case Mips::SGTImm64:
   case Mips::SGTUImm64:
     return expandSgtImm(Inst, IDLoc, Out, STI) ? MER_Fail : MER_Success;
+  case Mips::SLE:
+  case Mips::SLEU:
+    return expandSle(Inst, IDLoc, Out, STI) ? MER_Fail : MER_Success;
+  case Mips::SLEImm:
+  case Mips::SLEUImm:
+  case Mips::SLEImm64:
+  case Mips::SLEUImm64:
+    return expandSleImm(Inst, IDLoc, Out, STI) ? MER_Fail : MER_Success;
   case Mips::SLTImm64:
     if (isInt<16>(Inst.getOperand(2).getImm())) {
       Inst.setOpcode(Mips::SLTi64);
@@ -2605,6 +2629,10 @@ MipsAsmParser::tryExpandInstruction(MCInst &Inst, SMLoc IDLoc, MCStreamer &Out,
     return expandSeq(Inst, IDLoc, Out, STI) ? MER_Fail : MER_Success;
   case Mips::SEQIMacro:
     return expandSeqI(Inst, IDLoc, Out, STI) ? MER_Fail : MER_Success;
+  case Mips::SNEMacro:
+    return expandSne(Inst, IDLoc, Out, STI) ? MER_Fail : MER_Success;
+  case Mips::SNEIMacro:
+    return expandSneI(Inst, IDLoc, Out, STI) ? MER_Fail : MER_Success;
   case Mips::MFTC0:   case Mips::MTTC0:
   case Mips::MFTGPR:  case Mips::MTTGPR:
   case Mips::MFTLO:   case Mips::MTTLO:
@@ -2655,7 +2683,7 @@ bool MipsAsmParser::expandJalWithRegs(MCInst &Inst, SMLoc IDLoc,
     const MCOperand SecondRegOp = Inst.getOperand(1);
     JalrInst.addOperand(SecondRegOp);
   }
-  Out.EmitInstruction(JalrInst, *STI);
+  Out.emitInstruction(JalrInst, *STI);
 
   // If .set reorder is active and branch instruction has a delay slot,
   // emit a NOP after it.
@@ -3436,8 +3464,8 @@ bool MipsAsmParser::expandLoadSingleImmToFPR(MCInst &Inst, SMLoc IDLoc,
       MipsMCExpr::create(MipsMCExpr::MEK_LO, LoSym, getContext());
 
   getStreamer().SwitchSection(ReadOnlySection);
-  getStreamer().EmitLabel(Sym, IDLoc);
-  getStreamer().EmitIntValue(ImmOp32, 4);
+  getStreamer().emitLabel(Sym, IDLoc);
+  getStreamer().emitInt32(ImmOp32);
   getStreamer().SwitchSection(CS);
 
   if (emitPartialAddress(TOut, IDLoc, Sym))
@@ -3488,9 +3516,9 @@ bool MipsAsmParser::expandLoadDoubleImmToGPR(MCInst &Inst, SMLoc IDLoc,
       MipsMCExpr::create(MipsMCExpr::MEK_LO, LoSym, getContext());
 
   getStreamer().SwitchSection(ReadOnlySection);
-  getStreamer().EmitLabel(Sym, IDLoc);
-  getStreamer().EmitValueToAlignment(8);
-  getStreamer().EmitIntValue(ImmOp64, 8);
+  getStreamer().emitLabel(Sym, IDLoc);
+  getStreamer().emitValueToAlignment(8);
+  getStreamer().emitIntValue(ImmOp64, 8);
   getStreamer().SwitchSection(CS);
 
   unsigned TmpReg = getATReg(IDLoc);
@@ -3571,9 +3599,9 @@ bool MipsAsmParser::expandLoadDoubleImmToFPR(MCInst &Inst, bool Is64FPU,
       MipsMCExpr::create(MipsMCExpr::MEK_LO, LoSym, getContext());
 
   getStreamer().SwitchSection(ReadOnlySection);
-  getStreamer().EmitLabel(Sym, IDLoc);
-  getStreamer().EmitValueToAlignment(8);
-  getStreamer().EmitIntValue(ImmOp64, 8);
+  getStreamer().emitLabel(Sym, IDLoc);
+  getStreamer().emitValueToAlignment(8);
+  getStreamer().emitIntValue(ImmOp64, 8);
   getStreamer().SwitchSection(CS);
 
   if (emitPartialAddress(TOut, IDLoc, Sym))
@@ -3619,7 +3647,7 @@ bool MipsAsmParser::expandUncondBranchMMPseudo(MCInst &Inst, SMLoc IDLoc,
       Inst.addOperand(MCOperand::createImm(Offset.getImm()));
     }
   }
-  Out.EmitInstruction(Inst, *STI);
+  Out.emitInstruction(Inst, *STI);
 
   // If .set reorder is active and branch instruction has a delay slot,
   // emit a NOP after it.
@@ -3906,7 +3934,7 @@ bool MipsAsmParser::expandLoadStoreMultiple(MCInst &Inst, SMLoc IDLoc,
   }
 
   Inst.setOpcode(NewOpcode);
-  Out.EmitInstruction(Inst, *STI);
+  Out.emitInstruction(Inst, *STI);
   return false;
 }
 
@@ -4308,7 +4336,7 @@ bool MipsAsmParser::expandDivRem(MCInst &Inst, SMLoc IDLoc, MCStreamer &Out,
 
   if (!Signed) {
     if (!UseTraps)
-      TOut.getStreamer().EmitLabel(BrTarget);
+      TOut.getStreamer().emitLabel(BrTarget);
 
     TOut.emitR(isDiv ? Mips::MFLO : Mips::MFHI, RdReg, IDLoc, STI);
     return false;
@@ -4319,7 +4347,7 @@ bool MipsAsmParser::expandDivRem(MCInst &Inst, SMLoc IDLoc, MCStreamer &Out,
     return true;
 
   if (!UseTraps)
-    TOut.getStreamer().EmitLabel(BrTarget);
+    TOut.getStreamer().emitLabel(BrTarget);
 
   TOut.emitRRI(Mips::ADDiu, ATReg, ZeroReg, -1, IDLoc, STI);
 
@@ -4347,7 +4375,7 @@ bool MipsAsmParser::expandDivRem(MCInst &Inst, SMLoc IDLoc, MCStreamer &Out,
     TOut.emitII(Mips::BREAK, 0x6, 0, IDLoc, STI);
   }
 
-  TOut.getStreamer().EmitLabel(BrTargetEnd);
+  TOut.getStreamer().emitLabel(BrTargetEnd);
   TOut.emitR(isDiv ? Mips::MFLO : Mips::MFHI, RdReg, IDLoc, STI);
   return false;
 }
@@ -4686,6 +4714,88 @@ bool MipsAsmParser::expandSgtImm(MCInst &Inst, SMLoc IDLoc, MCStreamer &Out,
   return false;
 }
 
+bool MipsAsmParser::expandSle(MCInst &Inst, SMLoc IDLoc, MCStreamer &Out,
+                              const MCSubtargetInfo *STI) {
+  MipsTargetStreamer &TOut = getTargetStreamer();
+
+  assert(Inst.getNumOperands() == 3 && "Invalid operand count");
+  assert(Inst.getOperand(0).isReg() &&
+         Inst.getOperand(1).isReg() &&
+         Inst.getOperand(2).isReg() && "Invalid instruction operand.");
+
+  unsigned DstReg = Inst.getOperand(0).getReg();
+  unsigned SrcReg = Inst.getOperand(1).getReg();
+  unsigned OpReg = Inst.getOperand(2).getReg();
+  unsigned OpCode;
+
+  warnIfNoMacro(IDLoc);
+
+  switch (Inst.getOpcode()) {
+  case Mips::SLE:
+    OpCode = Mips::SLT;
+    break;
+  case Mips::SLEU:
+    OpCode = Mips::SLTu;
+    break;
+  default:
+    llvm_unreachable("unexpected 'sge' opcode");
+  }
+
+  // $SrcReg <= $OpReg is equal to (not ($OpReg < $SrcReg))
+  TOut.emitRRR(OpCode, DstReg, OpReg, SrcReg, IDLoc, STI);
+  TOut.emitRRI(Mips::XORi, DstReg, DstReg, 1, IDLoc, STI);
+
+  return false;
+}
+
+bool MipsAsmParser::expandSleImm(MCInst &Inst, SMLoc IDLoc, MCStreamer &Out,
+                                 const MCSubtargetInfo *STI) {
+  MipsTargetStreamer &TOut = getTargetStreamer();
+
+  assert(Inst.getNumOperands() == 3 && "Invalid operand count");
+  assert(Inst.getOperand(0).isReg() &&
+         Inst.getOperand(1).isReg() &&
+         Inst.getOperand(2).isImm() && "Invalid instruction operand.");
+
+  unsigned DstReg = Inst.getOperand(0).getReg();
+  unsigned SrcReg = Inst.getOperand(1).getReg();
+  int64_t ImmValue = Inst.getOperand(2).getImm();
+  unsigned OpRegCode;
+
+  warnIfNoMacro(IDLoc);
+
+  switch (Inst.getOpcode()) {
+  case Mips::SLEImm:
+  case Mips::SLEImm64:
+    OpRegCode = Mips::SLT;
+    break;
+  case Mips::SLEUImm:
+  case Mips::SLEUImm64:
+    OpRegCode = Mips::SLTu;
+    break;
+  default:
+    llvm_unreachable("unexpected 'sge' opcode with immediate");
+  }
+
+  // $SrcReg <= Imm is equal to (not (Imm < $SrcReg))
+  unsigned ImmReg = DstReg;
+  if (DstReg == SrcReg) {
+    unsigned ATReg = getATReg(Inst.getLoc());
+    if (!ATReg)
+      return true;
+    ImmReg = ATReg;
+  }
+
+  if (loadImmediate(ImmValue, ImmReg, Mips::NoRegister, isInt<32>(ImmValue),
+                    false, IDLoc, Out, STI))
+    return true;
+
+  TOut.emitRRR(OpRegCode, DstReg, ImmReg, SrcReg, IDLoc, STI);
+  TOut.emitRRI(Mips::XORi, DstReg, DstReg, 1, IDLoc, STI);
+
+  return false;
+}
+
 bool MipsAsmParser::expandAliasImmediate(MCInst &Inst, SMLoc IDLoc,
                                          MCStreamer &Out,
                                          const MCSubtargetInfo *STI) {
@@ -5149,7 +5259,7 @@ bool MipsAsmParser::expandMulO(MCInst &Inst, SMLoc IDLoc, MCStreamer &Out,
       TOut.emitNop(IDLoc, STI);
     TOut.emitII(Mips::BREAK, 6, 0, IDLoc, STI);
 
-    TOut.getStreamer().EmitLabel(BrTarget);
+    TOut.getStreamer().emitLabel(BrTarget);
   }
   TOut.emitR(Mips::MFLO, DstReg, IDLoc, STI);
 
@@ -5186,7 +5296,7 @@ bool MipsAsmParser::expandMulOU(MCInst &Inst, SMLoc IDLoc, MCStreamer &Out,
       TOut.emitNop(IDLoc, STI);
     TOut.emitII(Mips::BREAK, 6, 0, IDLoc, STI);
 
-    TOut.getStreamer().EmitLabel(BrTarget);
+    TOut.getStreamer().emitLabel(BrTarget);
   }
 
   return false;
@@ -5375,6 +5485,88 @@ bool MipsAsmParser::expandSeqI(MCInst &Inst, SMLoc IDLoc, MCStreamer &Out,
   return false;
 }
 
+bool MipsAsmParser::expandSne(MCInst &Inst, SMLoc IDLoc, MCStreamer &Out,
+                              const MCSubtargetInfo *STI) {
+
+  MipsTargetStreamer &TOut = getTargetStreamer();
+
+  assert(Inst.getNumOperands() == 3 && "Invalid operand count");
+  assert(Inst.getOperand(0).isReg() &&
+         Inst.getOperand(1).isReg() &&
+         Inst.getOperand(2).isReg() && "Invalid instruction operand.");
+
+  unsigned DstReg = Inst.getOperand(0).getReg();
+  unsigned SrcReg = Inst.getOperand(1).getReg();
+  unsigned OpReg = Inst.getOperand(2).getReg();
+
+  warnIfNoMacro(IDLoc);
+
+  if (SrcReg != Mips::ZERO && OpReg != Mips::ZERO) {
+    TOut.emitRRR(Mips::XOR, DstReg, SrcReg, OpReg, IDLoc, STI);
+    TOut.emitRRR(Mips::SLTu, DstReg, Mips::ZERO, DstReg, IDLoc, STI);
+    return false;
+  }
+
+  unsigned Reg = SrcReg == Mips::ZERO ? OpReg : SrcReg;
+  TOut.emitRRR(Mips::SLTu, DstReg, Mips::ZERO, Reg, IDLoc, STI);
+  return false;
+}
+
+bool MipsAsmParser::expandSneI(MCInst &Inst, SMLoc IDLoc, MCStreamer &Out,
+                               const MCSubtargetInfo *STI) {
+  MipsTargetStreamer &TOut = getTargetStreamer();
+
+  assert(Inst.getNumOperands() == 3 && "Invalid operand count");
+  assert(Inst.getOperand(0).isReg() &&
+         Inst.getOperand(1).isReg() &&
+         Inst.getOperand(2).isImm() && "Invalid instruction operand.");
+
+  unsigned DstReg = Inst.getOperand(0).getReg();
+  unsigned SrcReg = Inst.getOperand(1).getReg();
+  int64_t ImmValue = Inst.getOperand(2).getImm();
+
+  warnIfNoMacro(IDLoc);
+
+  if (ImmValue == 0) {
+    TOut.emitRRR(Mips::SLTu, DstReg, Mips::ZERO, SrcReg, IDLoc, STI);
+    return false;
+  }
+
+  if (SrcReg == Mips::ZERO) {
+    Warning(IDLoc, "comparison is always true");
+    if (loadImmediate(1, DstReg, Mips::NoRegister, true, false, IDLoc, Out,
+                      STI))
+      return true;
+    return false;
+  }
+
+  unsigned Opc;
+  if (ImmValue > -0x8000 && ImmValue < 0) {
+    ImmValue = -ImmValue;
+    Opc = isGP64bit() ? Mips::DADDiu : Mips::ADDiu;
+  } else {
+    Opc = Mips::XORi;
+  }
+
+  if (isUInt<16>(ImmValue)) {
+    TOut.emitRRI(Opc, DstReg, SrcReg, ImmValue, IDLoc, STI);
+    TOut.emitRRR(Mips::SLTu, DstReg, Mips::ZERO, DstReg, IDLoc, STI);
+    return false;
+  }
+
+  unsigned ATReg = getATReg(IDLoc);
+  if (!ATReg)
+    return true;
+
+  if (loadImmediate(ImmValue, ATReg, Mips::NoRegister, isInt<32>(ImmValue),
+                    false, IDLoc, Out, STI))
+    return true;
+
+  TOut.emitRRR(Mips::XOR, DstReg, SrcReg, ATReg, IDLoc, STI);
+  TOut.emitRRR(Mips::SLTu, DstReg, Mips::ZERO, DstReg, IDLoc, STI);
+  return false;
+}
+
 // Map the DSP accumulator and control register to the corresponding gpr
 // operand. Unlike the other alias, the m(f|t)t(lo|hi|acx) instructions
 // do not map the DSP registers contigously to gpr registers.
@@ -6252,6 +6444,12 @@ bool MipsAsmParser::parseOperand(OperandVector &Operands, StringRef Mnemonic) {
 
 bool MipsAsmParser::ParseRegister(unsigned &RegNo, SMLoc &StartLoc,
                                   SMLoc &EndLoc) {
+  return tryParseRegister(RegNo, StartLoc, EndLoc) != MatchOperand_Success;
+}
+
+OperandMatchResultTy MipsAsmParser::tryParseRegister(unsigned &RegNo,
+                                                     SMLoc &StartLoc,
+                                                     SMLoc &EndLoc) {
   SmallVector<std::unique_ptr<MCParsedAsmOperand>, 1> Operands;
   OperandMatchResultTy ResTy = parseAnyRegister(Operands);
   if (ResTy == MatchOperand_Success) {
@@ -6269,11 +6467,12 @@ bool MipsAsmParser::ParseRegister(unsigned &RegNo, SMLoc &StartLoc,
       RegNo = isGP64bit() ? Operand.getGPR64Reg() : Operand.getGPR32Reg();
     }
 
-    return (RegNo == (unsigned)-1);
+    return (RegNo == (unsigned)-1) ? MatchOperand_NoMatch
+                                   : MatchOperand_Success;
   }
 
   assert(Operands.size() == 0);
-  return (RegNo == (unsigned)-1);
+  return (RegNo == (unsigned)-1) ? MatchOperand_NoMatch : MatchOperand_Success;
 }
 
 bool MipsAsmParser::parseMemOffset(const MCExpr *&Res, bool isParenExpr) {
@@ -7026,6 +7225,21 @@ bool MipsAsmParser::parseSetNoDspDirective() {
   return false;
 }
 
+bool MipsAsmParser::parseSetNoMips3DDirective() {
+  MCAsmParser &Parser = getParser();
+  Parser.Lex(); // Eat "nomips3d".
+
+  // If this is not the end of the statement, report an error.
+  if (getLexer().isNot(AsmToken::EndOfStatement)) {
+    reportParseError("unexpected token, expected end of statement");
+    return false;
+  }
+
+  clearFeatureBits(Mips::FeatureMips3D, "mips3d");
+  getTargetStreamer().emitDirectiveSetNoMips3D();
+  return false;
+}
+
 bool MipsAsmParser::parseSetMips16Directive() {
   MCAsmParser &Parser = getParser();
   Parser.Lex(); // Eat "mips16".
@@ -7358,6 +7572,10 @@ bool MipsAsmParser::parseSetFeature(uint64_t Feature) {
   switch (Feature) {
   default:
     llvm_unreachable("Unimplemented feature");
+  case Mips::FeatureMips3D:
+    setFeatureBits(Mips::FeatureMips3D, "mips3d");
+    getTargetStreamer().emitDirectiveSetMips3D();
+    break;
   case Mips::FeatureDSP:
     setFeatureBits(Mips::FeatureDSP, "dsp");
     getTargetStreamer().emitDirectiveSetDsp();
@@ -7465,6 +7683,31 @@ bool MipsAsmParser::isPicAndNotNxxAbi() {
   return inPicMode() && !(isABI_N32() || isABI_N64());
 }
 
+bool MipsAsmParser::parseDirectiveCpAdd(SMLoc Loc) {
+  SmallVector<std::unique_ptr<MCParsedAsmOperand>, 1> Reg;
+  OperandMatchResultTy ResTy = parseAnyRegister(Reg);
+  if (ResTy == MatchOperand_NoMatch || ResTy == MatchOperand_ParseFail) {
+    reportParseError("expected register");
+    return false;
+  }
+
+  MipsOperand &RegOpnd = static_cast<MipsOperand &>(*Reg[0]);
+  if (!RegOpnd.isGPRAsmReg()) {
+    reportParseError(RegOpnd.getStartLoc(), "invalid register");
+    return false;
+  }
+
+  // If this is not the end of the statement, report an error.
+  if (getLexer().isNot(AsmToken::EndOfStatement)) {
+    reportParseError("unexpected token, expected end of statement");
+    return false;
+  }
+  getParser().Lex(); // Consume the EndOfStatement.
+
+  getTargetStreamer().emitDirectiveCpAdd(RegOpnd.getGPR32Reg());
+  return false;
+}
+
 bool MipsAsmParser::parseDirectiveCpLoad(SMLoc Loc) {
   if (AssemblerOptions.back()->isReorder())
     Warning(Loc, ".cpload should be inside a noreorder section");
@@ -7773,6 +8016,10 @@ bool MipsAsmParser::parseDirectiveSet() {
     return parseSetFeature(Mips::FeatureDSPR2);
   if (IdVal == "nodsp")
     return parseSetNoDspDirective();
+  if (IdVal == "mips3d")
+    return parseSetFeature(Mips::FeatureMips3D);
+  if (IdVal == "nomips3d")
+    return parseSetNoMips3DDirective();
   if (IdVal == "msa")
     return parseSetMsaDirective();
   if (IdVal == "nomsa")
@@ -7811,7 +8058,7 @@ bool MipsAsmParser::parseDirectiveGpWord() {
   // method to evaluate the expression.
   if (getParser().parseExpression(Value))
     return true;
-  getParser().getStreamer().EmitGPRel32Value(Value);
+  getParser().getStreamer().emitGPRel32Value(Value);
 
   if (getLexer().isNot(AsmToken::EndOfStatement))
     return Error(getLexer().getLoc(),
@@ -7829,7 +8076,7 @@ bool MipsAsmParser::parseDirectiveGpDWord() {
   // method to evaluate the expression.
   if (getParser().parseExpression(Value))
     return true;
-  getParser().getStreamer().EmitGPRel64Value(Value);
+  getParser().getStreamer().emitGPRel64Value(Value);
 
   if (getLexer().isNot(AsmToken::EndOfStatement))
     return Error(getLexer().getLoc(),
@@ -7847,7 +8094,7 @@ bool MipsAsmParser::parseDirectiveDtpRelWord() {
   // method to evaluate the expression.
   if (getParser().parseExpression(Value))
     return true;
-  getParser().getStreamer().EmitDTPRel32Value(Value);
+  getParser().getStreamer().emitDTPRel32Value(Value);
 
   if (getLexer().isNot(AsmToken::EndOfStatement))
     return Error(getLexer().getLoc(),
@@ -7865,7 +8112,7 @@ bool MipsAsmParser::parseDirectiveDtpRelDWord() {
   // method to evaluate the expression.
   if (getParser().parseExpression(Value))
     return true;
-  getParser().getStreamer().EmitDTPRel64Value(Value);
+  getParser().getStreamer().emitDTPRel64Value(Value);
 
   if (getLexer().isNot(AsmToken::EndOfStatement))
     return Error(getLexer().getLoc(),
@@ -7883,7 +8130,7 @@ bool MipsAsmParser::parseDirectiveTpRelWord() {
   // method to evaluate the expression.
   if (getParser().parseExpression(Value))
     return true;
-  getParser().getStreamer().EmitTPRel32Value(Value);
+  getParser().getStreamer().emitTPRel32Value(Value);
 
   if (getLexer().isNot(AsmToken::EndOfStatement))
     return Error(getLexer().getLoc(),
@@ -7901,7 +8148,7 @@ bool MipsAsmParser::parseDirectiveTpRelDWord() {
   // method to evaluate the expression.
   if (getParser().parseExpression(Value))
     return true;
-  getParser().getStreamer().EmitTPRel64Value(Value);
+  getParser().getStreamer().emitTPRel64Value(Value);
 
   if (getLexer().isNot(AsmToken::EndOfStatement))
     return Error(getLexer().getLoc(),
@@ -8373,6 +8620,10 @@ bool MipsAsmParser::ParseDirective(AsmToken DirectiveID) {
   MCAsmParser &Parser = getParser();
   StringRef IDVal = DirectiveID.getString();
 
+  if (IDVal == ".cpadd") {
+    parseDirectiveCpAdd(DirectiveID.getLoc());
+    return false;
+  }
   if (IDVal == ".cpload") {
     parseDirectiveCpLoad(DirectiveID.getLoc());
     return false;
index 0ac2d8a..4a996b6 100644 (file)
@@ -39,6 +39,7 @@ add_llvm_target(MipsCodeGen
   MipsISelLowering.cpp
   MipsFrameLowering.cpp
   MipsLegalizerInfo.cpp
+  MipsLoongson2FBTBFix.cpp
   MipsBranchExpansion.cpp
   MipsMCInstLower.cpp
   MipsMachineFunction.cpp
@@ -48,6 +49,7 @@ add_llvm_target(MipsCodeGen
   MipsPreLegalizerCombiner.cpp
   MipsRegisterBankInfo.cpp
   MipsRegisterInfo.cpp
+  MipsReturnProtectorLowering.cpp
   MipsSEFrameLowering.cpp
   MipsSEInstrInfo.cpp
   MipsSEISelDAGToDAG.cpp
index cc073fb..068cf09 100644 (file)
@@ -242,6 +242,83 @@ void MipsAsmPrinter::emitInstruction(const MachineInstr *MI) {
   case Mips::PATCHABLE_TAIL_CALL:
     LowerPATCHABLE_TAIL_CALL(*MI);
     return;
+  case Mips::RETGUARD_GET_FUNCTION_ADDR:
+    {
+      MCSymbol *PCSym = OutContext.createTempSymbol();
+      MCSymbol *FuncSym = OutContext.lookupSymbol(MI->getMF()->getName());
+      if (FuncSym == nullptr)
+        llvm_unreachable("Function name has no symbol");
+
+      // Branch and link forward, calculate the distance
+      // from here to the start of the function, and fill the
+      // address in the given dest register
+      unsigned OUT = MI->getOperand(0).getReg();
+      unsigned IN1 = MI->getOperand(1).getReg();
+      unsigned IN2 = MI->getOperand(2).getReg();
+      MCSymbol *ReturnSym = MI->getOperand(3).getMCSymbol();
+
+      // Save the value of RA in IN1
+      EmitToStreamer(*OutStreamer, MCInstBuilder(Mips::OR64)
+          .addReg(IN1)
+          .addReg(Mips::RA_64)
+          .addReg(Mips::ZERO_64));
+      // BAL to get the PC into RA
+      EmitToStreamer(*OutStreamer, MCInstBuilder(Mips::BAL)
+          .addExpr(MCSymbolRefExpr::create(ReturnSym, OutContext)));
+      // NOP
+      EmitToStreamer(*OutStreamer, MCInstBuilder(Mips::SLL)
+          .addReg(Mips::ZERO_64)
+          .addReg(Mips::ZERO_64)
+          .addImm(0));
+
+      // Emit a symbol for "here/PC" because BAL will put
+      // the address of the instruction following the NOP into RA
+      // and we need this symbol to do the math
+      OutStreamer->emitLabel(PCSym);
+
+      // Store PC in IN2
+      EmitToStreamer(*OutStreamer, MCInstBuilder(Mips::OR64)
+          .addReg(IN2)
+          .addReg(Mips::RA_64)
+          .addReg(Mips::ZERO_64));
+      // Restore original RA
+      EmitToStreamer(*OutStreamer, MCInstBuilder(Mips::OR64)
+          .addReg(Mips::RA_64)
+          .addReg(IN1)
+          .addReg(Mips::ZERO_64));
+      // Load the offset from PCSym to the start of the function
+      EmitToStreamer(*OutStreamer, MCInstBuilder(Mips::LUi64)
+          .addReg(IN1)
+          .addExpr(MipsMCExpr::create(MipsMCExpr::MipsExprKind::MEK_HI,
+              MCBinaryExpr::createSub(
+                MCSymbolRefExpr::create(PCSym, OutContext),
+                MCSymbolRefExpr::create(FuncSym, OutContext),
+                OutContext),
+              OutContext)));
+      EmitToStreamer(*OutStreamer, MCInstBuilder(Mips::DADDiu)
+          .addReg(IN1)
+          .addReg(IN1)
+          .addExpr(MipsMCExpr::create(MipsMCExpr::MipsExprKind::MEK_LO,
+              MCBinaryExpr::createSub(
+                MCSymbolRefExpr::create(PCSym, OutContext),
+                MCSymbolRefExpr::create(FuncSym, OutContext),
+                OutContext),
+              OutContext)));
+
+      // Sub distance from here to start of function
+      // to get address of the start of function
+      EmitToStreamer(*OutStreamer, MCInstBuilder(Mips::DSUBu)
+          .addReg(OUT)
+          .addReg(IN2)
+          .addReg(IN1));
+      return;
+    }
+  case Mips::RETGUARD_EMIT_SYMBOL:
+    {
+      MCSymbol *ReturnSym = MI->getOperand(0).getMCSymbol();
+      OutStreamer->emitLabel(ReturnSym);
+      return;
+    }
   }
 
   if (EmitJalrReloc &&
index 8d5eabf..9a1af4a 100644 (file)
@@ -14,6 +14,7 @@
 #include "MCTargetDesc/MipsBaseInfo.h"
 #include "MipsInstrInfo.h"
 #include "MipsMachineFunction.h"
+#include "MipsReturnProtectorLowering.h"
 #include "MipsTargetMachine.h"
 #include "llvm/CodeGen/MachineFrameInfo.h"
 #include "llvm/CodeGen/MachineFunction.h"
@@ -122,6 +123,10 @@ uint64_t MipsFrameLowering::estimateStackSize(const MachineFunction &MF) const {
     if (MFI.getObjectOffset(I) > 0)
       Size += MFI.getObjectSize(I);
 
+  // Account for saving return protector register
+  if (MFI.getReturnProtectorNeeded())
+    Size += TRI.getSpillSize(*TRI.getMinimalPhysRegClass(Mips::T9_64));
+
   // Conservatively assume all callee-saved registers will be saved.
   for (const MCPhysReg *R = TRI.getCalleeSavedRegs(&MF); *R; ++R) {
     unsigned RegSize = TRI.getSpillSize(*TRI.getMinimalPhysRegClass(*R));
@@ -149,3 +154,7 @@ eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB,
 
   return MBB.erase(I);
 }
+
+const ReturnProtectorLowering *MipsFrameLowering::getReturnProtector() const {
+  return &RPL;
+}
index 612b2b7..3c2aff0 100644 (file)
@@ -14,6 +14,7 @@
 #define LLVM_LIB_TARGET_MIPS_MIPSFRAMELOWERING_H
 
 #include "Mips.h"
+#include "MipsReturnProtectorLowering.h"
 #include "llvm/CodeGen/TargetFrameLowering.h"
 
 namespace llvm {
@@ -24,8 +25,11 @@ protected:
   const MipsSubtarget &STI;
 
 public:
+
+  const MipsReturnProtectorLowering RPL;
+
   explicit MipsFrameLowering(const MipsSubtarget &sti, Align Alignment)
-      : TargetFrameLowering(StackGrowsDown, Alignment, 0, Alignment), STI(sti) {
+      : TargetFrameLowering(StackGrowsDown, Alignment, 0, Alignment), STI(sti), RPL() {
   }
 
   static const MipsFrameLowering *create(const MipsSubtarget &ST);
@@ -40,6 +44,8 @@ public:
     return true;
   }
 
+  const ReturnProtectorLowering *getReturnProtector() const override;
+
   MachineBasicBlock::iterator
   eliminateCallFramePseudoInstr(MachineFunction &MF,
                                 MachineBasicBlock &MBB,
index 2da3502..121d1d9 100644 (file)
@@ -3919,6 +3919,7 @@ MipsTargetLowering::getConstraintType(StringRef Constraint) const {
   //       backwards compatibility.
   // 'c' : A register suitable for use in an indirect
   //       jump. This will always be $25 for -mabicalls.
+  // 'h' : The hi register. 1 word storage.
   // 'l' : The lo register. 1 word storage.
   // 'x' : The hilo register pair. Double word storage.
   if (Constraint.size() == 1) {
@@ -3928,6 +3929,7 @@ MipsTargetLowering::getConstraintType(StringRef Constraint) const {
       case 'y':
       case 'f':
       case 'c':
+      case 'h':
       case 'l':
       case 'x':
         return C_RegisterClass;
@@ -3973,6 +3975,7 @@ MipsTargetLowering::getSingleConstraintMatchWeight(
       weight = CW_Register;
     break;
   case 'c': // $25 for indirect jumps
+  case 'h': // hi register
   case 'l': // lo register
   case 'x': // hilo register pair
     if (type->isIntegerTy())
@@ -4147,6 +4150,11 @@ MipsTargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI,
         return std::make_pair((unsigned)Mips::T9_64, &Mips::GPR64RegClass);
       // This will generate an error message
       return std::make_pair(0U, nullptr);
+    case 'h': // use the `hi` register to store values
+              // that are no bigger than a word
+      if (VT == MVT::i32 || VT == MVT::i16 || VT == MVT::i8)
+        return std::make_pair((unsigned)Mips::HI0, &Mips::HI32RegClass);
+      return std::make_pair((unsigned)Mips::HI0_64, &Mips::HI64RegClass);
     case 'l': // use the `lo` register to store values
               // that are no bigger than a word
       if (VT == MVT::i32 || VT == MVT::i16 || VT == MVT::i8)
index a3b9288..99e8794 100644 (file)
@@ -2012,6 +2012,31 @@ def LONG_BRANCH_ADDiu2Op : PseudoSE<(outs GPR32Opnd:$dst),
   bit hasNoSchedulingInfo = 1;
 }
 
+// Pseudo instructions used by retguard. In order to calculste the PC
+// for PIC code, we use a pair of pseudos to get the function address
+// into T9, which is normally used to hold this value but is trashed
+// by function epilogue.
+let isCodeGenOnly = 1, hasNoSchedulingInfo = 1 in {
+
+  // Use BAL to get the PC into RA, then calculate the address of the
+  // current function and save this value in $rd. $rs and $rt are used
+  // as scratch registers and are trashed by this pseudo. $tgt is the
+  // symbol to branch to when calling BAL.
+  let Size = 32 in {
+  def RETGUARD_GET_FUNCTION_ADDR: PseudoSE<(outs GPR64:$rd),
+    (ins GPR64:$rs, GPR64:$rt, brtarget:$tgt), []>;
+  }
+
+  // Emit the symbol used for $tgt in RETGUARD_GET_FUNCTION_ADDR. We
+  // emit this symbol immediately before the usual function return, with
+  // the effect that the BAL branches to an immediate return and resumes
+  // execution through the rest of the RETGUARD epilogue. We pair BAL
+  // with RET to satisfy return branch predictors.
+  let Size = 0 in {
+  def RETGUARD_EMIT_SYMBOL: PseudoSE<(outs), (ins brtarget:$tgt), []>;
+  }
+}
+
 //===----------------------------------------------------------------------===//
 // Instruction definition
 //===----------------------------------------------------------------------===//
index 607b830..9a5d5cf 100644 (file)
@@ -133,6 +133,9 @@ MipsTargetMachine::MipsTargetMachine(const Target &T, const Triple &TT,
                       MaybeAlign(Options.StackAlignmentOverride)) {
   Subtarget = &DefaultSubtarget;
   initAsmInfo();
+
+  // Mips supports the debug entry values.
+  setSupportsDebugEntryValues(true);
 }
 
 MipsTargetMachine::~MipsTargetMachine() = default;
index 24d709e..52904da 100644 (file)
@@ -33,6 +33,7 @@ add_llvm_target(PowerPCCodeGen
   PPCMCInstLower.cpp
   PPCMachineFunctionInfo.cpp
   PPCMachineScheduler.cpp
+  PPCMacroFusion.cpp
   PPCMIPeephole.cpp
   PPCRegisterInfo.cpp
   PPCReturnProtectorLowering.cpp
diff --git a/gnu/llvm/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp b/gnu/llvm/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp
deleted file mode 100644 (file)
index 672f910..0000000
+++ /dev/null
@@ -1,380 +0,0 @@
-//===-- PPCMachObjectWriter.cpp - PPC Mach-O Writer -----------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "MCTargetDesc/PPCFixupKinds.h"
-#include "MCTargetDesc/PPCMCTargetDesc.h"
-#include "llvm/ADT/Twine.h"
-#include "llvm/BinaryFormat/MachO.h"
-#include "llvm/MC/MCAsmLayout.h"
-#include "llvm/MC/MCAssembler.h"
-#include "llvm/MC/MCContext.h"
-#include "llvm/MC/MCMachObjectWriter.h"
-#include "llvm/MC/MCSectionMachO.h"
-#include "llvm/MC/MCValue.h"
-#include "llvm/Support/ErrorHandling.h"
-#include "llvm/Support/Format.h"
-
-using namespace llvm;
-
-namespace {
-class PPCMachObjectWriter : public MCMachObjectTargetWriter {
-  bool recordScatteredRelocation(MachObjectWriter *Writer,
-                                 const MCAssembler &Asm,
-                                 const MCAsmLayout &Layout,
-                                 const MCFragment *Fragment,
-                                 const MCFixup &Fixup, MCValue Target,
-                                 unsigned Log2Size, uint64_t &FixedValue);
-
-  void RecordPPCRelocation(MachObjectWriter *Writer, const MCAssembler &Asm,
-                           const MCAsmLayout &Layout,
-                           const MCFragment *Fragment, const MCFixup &Fixup,
-                           MCValue Target, uint64_t &FixedValue);
-
-public:
-  PPCMachObjectWriter(bool Is64Bit, uint32_t CPUType, uint32_t CPUSubtype)
-      : MCMachObjectTargetWriter(Is64Bit, CPUType, CPUSubtype) {}
-
-  void recordRelocation(MachObjectWriter *Writer, MCAssembler &Asm,
-                        const MCAsmLayout &Layout, const MCFragment *Fragment,
-                        const MCFixup &Fixup, MCValue Target,
-                        uint64_t &FixedValue) override {
-    if (Writer->is64Bit()) {
-      report_fatal_error("Relocation emission for MachO/PPC64 unimplemented.");
-    } else
-      RecordPPCRelocation(Writer, Asm, Layout, Fragment, Fixup, Target,
-                          FixedValue);
-  }
-};
-}
-
-/// computes the log2 of the size of the relocation,
-/// used for relocation_info::r_length.
-static unsigned getFixupKindLog2Size(unsigned Kind) {
-  switch (Kind) {
-  default:
-    report_fatal_error("log2size(FixupKind): Unhandled fixup kind!");
-  case FK_PCRel_1:
-  case FK_Data_1:
-    return 0;
-  case FK_PCRel_2:
-  case FK_Data_2:
-    return 1;
-  case FK_PCRel_4:
-  case PPC::fixup_ppc_brcond14:
-  case PPC::fixup_ppc_half16:
-  case PPC::fixup_ppc_br24:
-  case FK_Data_4:
-    return 2;
-  case FK_PCRel_8:
-  case FK_Data_8:
-    return 3;
-  }
-  return 0;
-}
-
-/// Translates generic PPC fixup kind to Mach-O/PPC relocation type enum.
-/// Outline based on PPCELFObjectWriter::getRelocType().
-static unsigned getRelocType(const MCValue &Target,
-                             const MCFixupKind FixupKind, // from
-                                                          // Fixup.getKind()
-                             const bool IsPCRel) {
-  const MCSymbolRefExpr::VariantKind Modifier =
-      Target.isAbsolute() ? MCSymbolRefExpr::VK_None
-                          : Target.getSymA()->getKind();
-  // determine the type of the relocation
-  unsigned Type = MachO::GENERIC_RELOC_VANILLA;
-  if (IsPCRel) { // relative to PC
-    switch ((unsigned)FixupKind) {
-    default:
-      report_fatal_error("Unimplemented fixup kind (relative)");
-    case PPC::fixup_ppc_br24:
-      Type = MachO::PPC_RELOC_BR24; // R_PPC_REL24
-      break;
-    case PPC::fixup_ppc_brcond14:
-      Type = MachO::PPC_RELOC_BR14;
-      break;
-    case PPC::fixup_ppc_half16:
-      switch (Modifier) {
-      default:
-        llvm_unreachable("Unsupported modifier for half16 fixup");
-      case MCSymbolRefExpr::VK_PPC_HA:
-        Type = MachO::PPC_RELOC_HA16;
-        break;
-      case MCSymbolRefExpr::VK_PPC_LO:
-        Type = MachO::PPC_RELOC_LO16;
-        break;
-      case MCSymbolRefExpr::VK_PPC_HI:
-        Type = MachO::PPC_RELOC_HI16;
-        break;
-      }
-      break;
-    }
-  } else {
-    switch ((unsigned)FixupKind) {
-    default:
-      report_fatal_error("Unimplemented fixup kind (absolute)!");
-    case PPC::fixup_ppc_half16:
-      switch (Modifier) {
-      default:
-        llvm_unreachable("Unsupported modifier for half16 fixup");
-      case MCSymbolRefExpr::VK_PPC_HA:
-        Type = MachO::PPC_RELOC_HA16_SECTDIFF;
-        break;
-      case MCSymbolRefExpr::VK_PPC_LO:
-        Type = MachO::PPC_RELOC_LO16_SECTDIFF;
-        break;
-      case MCSymbolRefExpr::VK_PPC_HI:
-        Type = MachO::PPC_RELOC_HI16_SECTDIFF;
-        break;
-      }
-      break;
-    case FK_Data_4:
-      break;
-    case FK_Data_2:
-      break;
-    }
-  }
-  return Type;
-}
-
-static void makeRelocationInfo(MachO::any_relocation_info &MRE,
-                               const uint32_t FixupOffset, const uint32_t Index,
-                               const unsigned IsPCRel, const unsigned Log2Size,
-                               const unsigned IsExtern, const unsigned Type) {
-  MRE.r_word0 = FixupOffset;
-  // The bitfield offsets that work (as determined by trial-and-error)
-  // are different than what is documented in the mach-o manuals.
-  // This appears to be an endianness issue; reversing the order of the
-  // documented bitfields in <llvm/BinaryFormat/MachO.h> fixes this (but
-  // breaks x86/ARM assembly).
-  MRE.r_word1 = ((Index << 8) |    // was << 0
-                 (IsPCRel << 7) |  // was << 24
-                 (Log2Size << 5) | // was << 25
-                 (IsExtern << 4) | // was << 27
-                 (Type << 0));     // was << 28
-}
-
-static void
-makeScatteredRelocationInfo(MachO::any_relocation_info &MRE,
-                            const uint32_t Addr, const unsigned Type,
-                            const unsigned Log2Size, const unsigned IsPCRel,
-                            const uint32_t Value2) {
-  // For notes on bitfield positions and endianness, see:
-  // https://developer.apple.com/library/mac/documentation/developertools/conceptual/MachORuntime/Reference/reference.html#//apple_ref/doc/uid/20001298-scattered_relocation_entry
-  MRE.r_word0 = ((Addr << 0) | (Type << 24) | (Log2Size << 28) |
-                 (IsPCRel << 30) | MachO::R_SCATTERED);
-  MRE.r_word1 = Value2;
-}
-
-/// Compute fixup offset (address).
-static uint32_t getFixupOffset(const MCAsmLayout &Layout,
-                               const MCFragment *Fragment,
-                               const MCFixup &Fixup) {
-  uint32_t FixupOffset = Layout.getFragmentOffset(Fragment) + Fixup.getOffset();
-  // On Mach-O, ppc_fixup_half16 relocations must refer to the
-  // start of the instruction, not the second halfword, as ELF does
-  if (Fixup.getTargetKind() == PPC::fixup_ppc_half16)
-    FixupOffset &= ~uint32_t(3);
-  return FixupOffset;
-}
-
-/// \return false if falling back to using non-scattered relocation,
-/// otherwise true for normal scattered relocation.
-/// based on X86MachObjectWriter::recordScatteredRelocation
-/// and ARMMachObjectWriter::recordScatteredRelocation
-bool PPCMachObjectWriter::recordScatteredRelocation(
-    MachObjectWriter *Writer, const MCAssembler &Asm, const MCAsmLayout &Layout,
-    const MCFragment *Fragment, const MCFixup &Fixup, MCValue Target,
-    unsigned Log2Size, uint64_t &FixedValue) {
-  // caller already computes these, can we just pass and reuse?
-  const uint32_t FixupOffset = getFixupOffset(Layout, Fragment, Fixup);
-  const MCFixupKind FK = Fixup.getKind();
-  const unsigned IsPCRel = Writer->isFixupKindPCRel(Asm, FK);
-  const unsigned Type = getRelocType(Target, FK, IsPCRel);
-
-  // Is this a local or SECTDIFF relocation entry?
-  // SECTDIFF relocation entries have symbol subtractions,
-  // and require two entries, the first for the add-symbol value,
-  // the second for the subtract-symbol value.
-
-  // See <reloc.h>.
-  const MCSymbol *A = &Target.getSymA()->getSymbol();
-
-  if (!A->getFragment())
-    report_fatal_error("symbol '" + A->getName() +
-                       "' can not be undefined in a subtraction expression");
-
-  uint32_t Value = Writer->getSymbolAddress(*A, Layout);
-  uint64_t SecAddr = Writer->getSectionAddress(A->getFragment()->getParent());
-  FixedValue += SecAddr;
-  uint32_t Value2 = 0;
-
-  if (const MCSymbolRefExpr *B = Target.getSymB()) {
-    const MCSymbol *SB = &B->getSymbol();
-
-    if (!SB->getFragment())
-      report_fatal_error("symbol '" + SB->getName() +
-                         "' can not be undefined in a subtraction expression");
-
-    // FIXME: is Type correct? see include/llvm/BinaryFormat/MachO.h
-    Value2 = Writer->getSymbolAddress(*SB, Layout);
-    FixedValue -= Writer->getSectionAddress(SB->getFragment()->getParent());
-  }
-  // FIXME: does FixedValue get used??
-
-  // Relocations are written out in reverse order, so the PAIR comes first.
-  if (Type == MachO::PPC_RELOC_SECTDIFF ||
-      Type == MachO::PPC_RELOC_HI16_SECTDIFF ||
-      Type == MachO::PPC_RELOC_LO16_SECTDIFF ||
-      Type == MachO::PPC_RELOC_HA16_SECTDIFF ||
-      Type == MachO::PPC_RELOC_LO14_SECTDIFF ||
-      Type == MachO::PPC_RELOC_LOCAL_SECTDIFF) {
-    // X86 had this piece, but ARM does not
-    // If the offset is too large to fit in a scattered relocation,
-    // we're hosed. It's an unfortunate limitation of the MachO format.
-    if (FixupOffset > 0xffffff) {
-      char Buffer[32];
-      format("0x%x", FixupOffset).print(Buffer, sizeof(Buffer));
-      Asm.getContext().reportError(Fixup.getLoc(),
-                                  Twine("Section too large, can't encode "
-                                        "r_address (") +
-                                      Buffer + ") into 24 bits of scattered "
-                                               "relocation entry.");
-      return false;
-    }
-
-    // Is this supposed to follow MCTarget/PPCAsmBackend.cpp:adjustFixupValue()?
-    // see PPCMCExpr::evaluateAsRelocatableImpl()
-    uint32_t other_half = 0;
-    switch (Type) {
-    case MachO::PPC_RELOC_LO16_SECTDIFF:
-      other_half = (FixedValue >> 16) & 0xffff;
-      // applyFixupOffset longer extracts the high part because it now assumes
-      // this was already done.
-      // It looks like this is not true for the FixedValue needed with Mach-O
-      // relocs.
-      // So we need to adjust FixedValue again here.
-      FixedValue &= 0xffff;
-      break;
-    case MachO::PPC_RELOC_HA16_SECTDIFF:
-      other_half = FixedValue & 0xffff;
-      FixedValue =
-          ((FixedValue >> 16) + ((FixedValue & 0x8000) ? 1 : 0)) & 0xffff;
-      break;
-    case MachO::PPC_RELOC_HI16_SECTDIFF:
-      other_half = FixedValue & 0xffff;
-      FixedValue = (FixedValue >> 16) & 0xffff;
-      break;
-    default:
-      llvm_unreachable("Invalid PPC scattered relocation type.");
-      break;
-    }
-
-    MachO::any_relocation_info MRE;
-    makeScatteredRelocationInfo(MRE, other_half, MachO::GENERIC_RELOC_PAIR,
-                                Log2Size, IsPCRel, Value2);
-    Writer->addRelocation(nullptr, Fragment->getParent(), MRE);
-  } else {
-    // If the offset is more than 24-bits, it won't fit in a scattered
-    // relocation offset field, so we fall back to using a non-scattered
-    // relocation. This is a bit risky, as if the offset reaches out of
-    // the block and the linker is doing scattered loading on this
-    // symbol, things can go badly.
-    //
-    // Required for 'as' compatibility.
-    if (FixupOffset > 0xffffff)
-      return false;
-  }
-  MachO::any_relocation_info MRE;
-  makeScatteredRelocationInfo(MRE, FixupOffset, Type, Log2Size, IsPCRel, Value);
-  Writer->addRelocation(nullptr, Fragment->getParent(), MRE);
-  return true;
-}
-
-// see PPCELFObjectWriter for a general outline of cases
-void PPCMachObjectWriter::RecordPPCRelocation(
-    MachObjectWriter *Writer, const MCAssembler &Asm, const MCAsmLayout &Layout,
-    const MCFragment *Fragment, const MCFixup &Fixup, MCValue Target,
-    uint64_t &FixedValue) {
-  const MCFixupKind FK = Fixup.getKind(); // unsigned
-  const unsigned Log2Size = getFixupKindLog2Size(FK);
-  const bool IsPCRel = Writer->isFixupKindPCRel(Asm, FK);
-  const unsigned RelocType = getRelocType(Target, FK, IsPCRel);
-
-  // If this is a difference or a defined symbol plus an offset, then we need a
-  // scattered relocation entry. Differences always require scattered
-  // relocations.
-  if (Target.getSymB() &&
-      // Q: are branch targets ever scattered?
-      RelocType != MachO::PPC_RELOC_BR24 &&
-      RelocType != MachO::PPC_RELOC_BR14) {
-    recordScatteredRelocation(Writer, Asm, Layout, Fragment, Fixup, Target,
-                              Log2Size, FixedValue);
-    return;
-  }
-
-  // this doesn't seem right for RIT_PPC_BR24
-  // Get the symbol data, if any.
-  const MCSymbol *A = nullptr;
-  if (Target.getSymA())
-    A = &Target.getSymA()->getSymbol();
-
-  // See <reloc.h>.
-  const uint32_t FixupOffset = getFixupOffset(Layout, Fragment, Fixup);
-  unsigned Index = 0;
-  unsigned Type = RelocType;
-
-  const MCSymbol *RelSymbol = nullptr;
-  if (Target.isAbsolute()) { // constant
-                             // SymbolNum of 0 indicates the absolute section.
-                             //
-    // FIXME: Currently, these are never generated (see code below). I cannot
-    // find a case where they are actually emitted.
-    report_fatal_error("FIXME: relocations to absolute targets "
-                       "not yet implemented");
-    // the above line stolen from ARM, not sure
-  } else {
-    // Resolve constant variables.
-    if (A->isVariable()) {
-      int64_t Res;
-      if (A->getVariableValue()->evaluateAsAbsolute(
-              Res, Layout, Writer->getSectionAddressMap())) {
-        FixedValue = Res;
-        return;
-      }
-    }
-
-    // Check whether we need an external or internal relocation.
-    if (Writer->doesSymbolRequireExternRelocation(*A)) {
-      RelSymbol = A;
-      // For external relocations, make sure to offset the fixup value to
-      // compensate for the addend of the symbol address, if it was
-      // undefined. This occurs with weak definitions, for example.
-      if (!A->isUndefined())
-        FixedValue -= Layout.getSymbolOffset(*A);
-    } else {
-      // The index is the section ordinal (1-based).
-      const MCSection &Sec = A->getSection();
-      Index = Sec.getOrdinal() + 1;
-      FixedValue += Writer->getSectionAddress(&Sec);
-    }
-    if (IsPCRel)
-      FixedValue -= Writer->getSectionAddress(Fragment->getParent());
-  }
-
-  // struct relocation_info (8 bytes)
-  MachO::any_relocation_info MRE;
-  makeRelocationInfo(MRE, FixupOffset, Index, IsPCRel, Log2Size, false, Type);
-  Writer->addRelocation(RelSymbol, Fragment->getParent(), MRE);
-}
-
-std::unique_ptr<MCObjectTargetWriter>
-llvm::createPPCMachObjectWriter(bool Is64Bit, uint32_t CPUType,
-                                uint32_t CPUSubtype) {
-  return std::make_unique<PPCMachObjectWriter>(Is64Bit, CPUType, CPUSubtype);
-}
index db5cddd..b8073f1 100644 (file)
@@ -83,8 +83,6 @@ protected:
   const PPCSubtarget *Subtarget = nullptr;
   StackMaps SM;
 
-  virtual MCSymbol *getMCSymbolForTOCPseudoMO(const MachineOperand &MO);
-
 public:
   explicit PPCAsmPrinter(TargetMachine &TM,
                          std::unique_ptr<MCStreamer> Streamer)
@@ -100,7 +98,7 @@ public:
     return AsmPrinter::doInitialization(M);
   }
 
-  void EmitInstruction(const MachineInstr *MI) override;
+  void emitInstruction(const MachineInstr *MI) override;
 
   /// This function is for PrintAsmOperand and PrintAsmMemoryOperand,
   /// invoked by EmitMSInlineAsmStr and EmitGCCInlineAsmStr only.
@@ -113,7 +111,7 @@ public:
   bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
                              const char *ExtraCode, raw_ostream &O) override;
 
-  void EmitEndOfAsmFile(Module &M) override;
+  void emitEndOfAsmFile(Module &M) override;
 
   void LowerSTACKMAP(StackMaps &SM, const MachineInstr &MI);
   void LowerPATCHPOINT(StackMaps &SM, const MachineInstr &MI);
@@ -137,37 +135,41 @@ public:
     return "Linux PPC Assembly Printer";
   }
 
-  bool doFinalization(Module &M) override;
-  void EmitStartOfAsmFile(Module &M) override;
+  void emitStartOfAsmFile(Module &M) override;
+  void emitEndOfAsmFile(Module &) override;
 
-  void EmitFunctionEntryLabel() override;
+  void emitFunctionEntryLabel() override;
 
-  void EmitFunctionBodyStart() override;
-  void EmitFunctionBodyEnd() override;
-  void EmitInstruction(const MachineInstr *MI) override;
+  void emitFunctionBodyStart() override;
+  void emitFunctionBodyEnd() override;
+  void emitInstruction(const MachineInstr *MI) override;
 };
 
 class PPCAIXAsmPrinter : public PPCAsmPrinter {
 private:
   static void ValidateGV(const GlobalVariable *GV);
-protected:
-  MCSymbol *getMCSymbolForTOCPseudoMO(const MachineOperand &MO) override;
 
 public:
   PPCAIXAsmPrinter(TargetMachine &TM, std::unique_ptr<MCStreamer> Streamer)
-      : PPCAsmPrinter(TM, std::move(Streamer)) {}
+      : PPCAsmPrinter(TM, std::move(Streamer)) {
+    if (MAI->isLittleEndian())
+      report_fatal_error(
+          "cannot create AIX PPC Assembly Printer for a little-endian target");
+  }
 
   StringRef getPassName() const override { return "AIX PPC Assembly Printer"; }
 
+  bool doInitialization(Module &M) override;
+
   void SetupMachineFunction(MachineFunction &MF) override;
 
-  const MCExpr *lowerConstant(const Constant *CV) override;
+  void emitGlobalVariable(const GlobalVariable *GV) override;
 
-  void EmitGlobalVariable(const GlobalVariable *GV) override;
+  void emitFunctionDescriptor() override;
 
-  void EmitFunctionDescriptor() override;
+  void emitEndOfAsmFile(Module &) override;
 
-  void EmitEndOfAsmFile(Module &) override;
+  void emitLinkage(const GlobalValue *GV, MCSymbol *GVSym) const override;
 };
 
 } // end anonymous namespace
@@ -176,23 +178,7 @@ void PPCAsmPrinter::PrintSymbolOperand(const MachineOperand &MO,
                                        raw_ostream &O) {
   // Computing the address of a global symbol, not calling it.
   const GlobalValue *GV = MO.getGlobal();
-  MCSymbol *SymToPrint;
-
-  // External or weakly linked global variables need non-lazily-resolved stubs
-  if (Subtarget->hasLazyResolverStub(GV)) {
-    SymToPrint = getSymbolWithGlobalValueBase(GV, "$non_lazy_ptr");
-    MachineModuleInfoImpl::StubValueTy &StubSym =
-        MMI->getObjFileInfo<MachineModuleInfoMachO>().getGVStubEntry(
-            SymToPrint);
-    if (!StubSym.getPointer())
-      StubSym = MachineModuleInfoImpl::StubValueTy(getSymbol(GV),
-                                                   !GV->hasInternalLinkage());
-  } else {
-    SymToPrint = getSymbol(GV);
-  }
-
-  SymToPrint->print(O, MAI);
-
+  getSymbol(GV)->print(O, MAI);
   printOffset(MO.getOffset(), O);
 }
 
@@ -208,9 +194,7 @@ void PPCAsmPrinter::printOperand(const MachineInstr *MI, unsigned OpNo,
 
     // Linux assembler (Others?) does not take register mnemonics.
     // FIXME - What about special registers used in mfspr/mtspr?
-    if (!Subtarget->isDarwin())
-      RegName = PPCRegisterInfo::stripRegisterPrefix(RegName);
-    O << RegName;
+    O << PPCRegisterInfo::stripRegisterPrefix(RegName);
     return;
   }
   case MachineOperand::MO_Immediate:
@@ -304,14 +288,9 @@ bool PPCAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
       O << ")";
       return false;
     case 'y': // A memory reference for an X-form instruction
-      {
-        const char *RegName = "r0";
-        if (!Subtarget->isDarwin())
-          RegName = PPCRegisterInfo::stripRegisterPrefix(RegName);
-        O << RegName << ", ";
-        printOperand(MI, OpNo, O);
-        return false;
-      }
+      O << "0, ";
+      printOperand(MI, OpNo, O);
+      return false;
     case 'U': // Print 'u' for update form.
     case 'X': // Print 'x' for indexed form.
       // FIXME: Currently for PowerPC memory operands are always loaded
@@ -342,7 +321,7 @@ MCSymbol *PPCAsmPrinter::lookUpOrCreateTOCEntry(const MCSymbol *Sym) {
   return TOCEntry;
 }
 
-void PPCAsmPrinter::EmitEndOfAsmFile(Module &M) {
+void PPCAsmPrinter::emitEndOfAsmFile(Module &M) {
   emitStackMaps(SM);
 }
 
@@ -351,7 +330,7 @@ void PPCAsmPrinter::LowerSTACKMAP(StackMaps &SM, const MachineInstr &MI) {
   
   auto &Ctx = OutStreamer->getContext();
   MCSymbol *MILabel = Ctx.createTempSymbol();
-  OutStreamer->EmitLabel(MILabel);
+  OutStreamer->emitLabel(MILabel);
 
   SM.recordStackMap(*MILabel, MI);
   assert(NumNOPBytes % 4 == 0 && "Invalid number of NOP bytes requested!");
@@ -380,7 +359,7 @@ void PPCAsmPrinter::LowerSTACKMAP(StackMaps &SM, const MachineInstr &MI) {
 void PPCAsmPrinter::LowerPATCHPOINT(StackMaps &SM, const MachineInstr &MI) {
   auto &Ctx = OutStreamer->getContext();
   MCSymbol *MILabel = Ctx.createTempSymbol();
-  OutStreamer->EmitLabel(MILabel);
+  OutStreamer->emitLabel(MILabel);
 
   SM.recordPatchPoint(*MILabel, MI);
   PatchPointOpers Opers(&MI);
@@ -519,16 +498,17 @@ void PPCAsmPrinter::EmitTlsCall(const MachineInstr *MI,
 
 /// Map a machine operand for a TOC pseudo-machine instruction to its
 /// corresponding MCSymbol.
-MCSymbol *PPCAsmPrinter::getMCSymbolForTOCPseudoMO(const MachineOperand &MO) {
+static MCSymbol *getMCSymbolForTOCPseudoMO(const MachineOperand &MO,
+                                           AsmPrinter &AP) {
   switch (MO.getType()) {
   case MachineOperand::MO_GlobalAddress:
-    return getSymbol(MO.getGlobal());
+    return AP.getSymbol(MO.getGlobal());
   case MachineOperand::MO_ConstantPoolIndex:
-    return GetCPISymbol(MO.getIndex());
+    return AP.GetCPISymbol(MO.getIndex());
   case MachineOperand::MO_JumpTableIndex:
-    return GetJTISymbol(MO.getIndex());
+    return AP.GetJTISymbol(MO.getIndex());
   case MachineOperand::MO_BlockAddress:
-    return GetBlockAddressSymbol(MO.getBlockAddress());
+    return AP.GetBlockAddressSymbol(MO.getBlockAddress());
   default:
     llvm_unreachable("Unexpected operand type to get symbol.");
   }
@@ -537,9 +517,8 @@ MCSymbol *PPCAsmPrinter::getMCSymbolForTOCPseudoMO(const MachineOperand &MO) {
 /// EmitInstruction -- Print out a single PowerPC MI in Darwin syntax to
 /// the current output stream.
 ///
-void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
+void PPCAsmPrinter::emitInstruction(const MachineInstr *MI) {
   MCInst TmpInst;
-  const bool IsDarwin = TM.getTargetTriple().isOSDarwin();
   const bool IsPPC64 = Subtarget->isPPC64();
   const bool IsAIX = Subtarget->isAIXABI();
   const Module *M = MF->getFunction().getParent();
@@ -617,7 +596,7 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
                        .addExpr(MCSymbolRefExpr::create(PICBase, OutContext)));
 
     // Emit the label.
-    OutStreamer->EmitLabel(PICBase);
+    OutStreamer->emitLabel(PICBase);
     return;
   }
   case PPC::UpdateGBR: {
@@ -628,7 +607,7 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
     //       addis r30, r30, {.LTOC,_GLOBAL_OFFSET_TABLE} - .L0$pb@ha
     //       addi r30, r30, {.LTOC,_GLOBAL_OFFSET_TABLE} - .L0$pb@l
     // Get the offset from the GOT Base Register to the GOT
-    LowerPPCMachineInstrToMCInst(MI, TmpInst, *this, IsDarwin);
+    LowerPPCMachineInstrToMCInst(MI, TmpInst, *this);
     if (Subtarget->isSecurePlt() && isPositionIndependent() ) {
       unsigned PICR = TmpInst.getOperand(0).getReg();
       MCSymbol *BaseSymbol = OutContext.getOrCreateSymbol(
@@ -640,19 +619,19 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
       const MCExpr *DeltaExpr = MCBinaryExpr::createSub(
           MCSymbolRefExpr::create(BaseSymbol, OutContext), PB, OutContext);
 
-      const MCExpr *DeltaHi = PPCMCExpr::createHa(DeltaExpr, false, OutContext);
+      const MCExpr *DeltaHi = PPCMCExpr::createHa(DeltaExpr, OutContext);
       EmitToStreamer(
           *OutStreamer,
           MCInstBuilder(PPC::ADDIS).addReg(PICR).addReg(PICR).addExpr(DeltaHi));
 
-      const MCExpr *DeltaLo = PPCMCExpr::createLo(DeltaExpr, false, OutContext);
+      const MCExpr *DeltaLo = PPCMCExpr::createLo(DeltaExpr, OutContext);
       EmitToStreamer(
           *OutStreamer,
           MCInstBuilder(PPC::ADDI).addReg(PICR).addReg(PICR).addExpr(DeltaLo));
       return;
     } else {
       MCSymbol *PICOffset =
-        MF->getInfo<PPCFunctionInfo>()->getPICOffsetSymbol();
+        MF->getInfo<PPCFunctionInfo>()->getPICOffsetSymbol(*MF);
       TmpInst.setOpcode(PPC::LWZ);
       const MCExpr *Exp =
         MCSymbolRefExpr::create(PICOffset, MCSymbolRefExpr::VK_None, OutContext);
@@ -700,7 +679,7 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
     const MCExpr *HereExpr = MCSymbolRefExpr::create(HereSym, OutContext);
     EmitToStreamer(*OutStreamer, MCInstBuilder(BL)
                                  .addExpr(HereExpr));
-    OutStreamer->EmitLabel(HereSym);
+    OutStreamer->emitLabel(HereSym);
 
     // Grab the result
     EmitToStreamer(*OutStreamer, MCInstBuilder(MFLR)
@@ -725,9 +704,9 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
       const MCExpr *GOTDeltaExpr =
         MCBinaryExpr::createSub(GOTExpr, HereExpr, OutContext);
       const MCExpr *GOTDeltaHi =
-        PPCMCExpr::createHa(GOTDeltaExpr, false, OutContext);
+        PPCMCExpr::createHa(GOTDeltaExpr, OutContext);
       const MCExpr *GOTDeltaLo =
-        PPCMCExpr::createLo(GOTDeltaExpr, false, OutContext);
+        PPCMCExpr::createLo(GOTDeltaExpr, OutContext);
 
       EmitToStreamer(*OutStreamer, MCInstBuilder(PPC::ADDIS)
                                    .addReg(DEST)
@@ -758,10 +737,8 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
     return;
   }
   case PPC::LWZtoc: {
-    assert(!IsDarwin && "TOC is an ELF/XCOFF construct.");
-
     // Transform %rN = LWZtoc @op1, %r2
-    LowerPPCMachineInstrToMCInst(MI, TmpInst, *this, IsDarwin);
+    LowerPPCMachineInstrToMCInst(MI, TmpInst, *this);
 
     // Change the opcode to LWZ.
     TmpInst.setOpcode(PPC::LWZ);
@@ -771,7 +748,7 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
            "Invalid operand for LWZtoc.");
 
     // Map the operand to its corresponding MCSymbol.
-    const MCSymbol *const MOSymbol = getMCSymbolForTOCPseudoMO(MO);
+    const MCSymbol *const MOSymbol = getMCSymbolForTOCPseudoMO(MO, *this);
 
     // Create a reference to the GOT entry for the symbol. The GOT entry will be
     // synthesized later.
@@ -816,10 +793,8 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
   case PPC::LDtocCPT:
   case PPC::LDtocBA:
   case PPC::LDtoc: {
-    assert(!IsDarwin && "TOC is an ELF/XCOFF construct");
-
     // Transform %x3 = LDtoc @min1, %x2
-    LowerPPCMachineInstrToMCInst(MI, TmpInst, *this, IsDarwin);
+    LowerPPCMachineInstrToMCInst(MI, TmpInst, *this);
 
     // Change the opcode to LD.
     TmpInst.setOpcode(PPC::LD);
@@ -832,7 +807,7 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
     // global address operand to be a reference to the TOC entry we will
     // synthesize later.
     MCSymbol *TOCEntry =
-        lookUpOrCreateTOCEntry(getMCSymbolForTOCPseudoMO(MO));
+        lookUpOrCreateTOCEntry(getMCSymbolForTOCPseudoMO(MO, *this));
 
     const MCSymbolRefExpr::VariantKind VK =
         IsAIX ? MCSymbolRefExpr::VK_None : MCSymbolRefExpr::VK_PPC_TOC;
@@ -848,7 +823,7 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
            " AIX.");
 
     // Transform %rd = ADDIStocHA %rA, @sym(%r2)
-    LowerPPCMachineInstrToMCInst(MI, TmpInst, *this, IsDarwin);
+    LowerPPCMachineInstrToMCInst(MI, TmpInst, *this);
 
     // Change the opcode to ADDIS.
     TmpInst.setOpcode(PPC::ADDIS);
@@ -858,7 +833,7 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
            "Invalid operand for ADDIStocHA.");
 
     // Map the machine operand to its corresponding MCSymbol.
-    MCSymbol *MOSymbol = getMCSymbolForTOCPseudoMO(MO);
+    MCSymbol *MOSymbol = getMCSymbolForTOCPseudoMO(MO, *this);
 
     // Always use TOC on AIX. Map the global address operand to be a reference
     // to the TOC entry we will synthesize later. 'TOCEntry' is a label used to
@@ -878,7 +853,7 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
            " AIX.");
 
     // Transform %rd = LWZtocL @sym, %rs.
-    LowerPPCMachineInstrToMCInst(MI, TmpInst, *this, IsDarwin);
+    LowerPPCMachineInstrToMCInst(MI, TmpInst, *this);
 
     // Change the opcode to lwz.
     TmpInst.setOpcode(PPC::LWZ);
@@ -888,7 +863,7 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
            "Invalid operand for LWZtocL.");
 
     // Map the machine operand to its corresponding MCSymbol.
-    MCSymbol *MOSymbol = getMCSymbolForTOCPseudoMO(MO);
+    MCSymbol *MOSymbol = getMCSymbolForTOCPseudoMO(MO, *this);
 
     // Always use TOC on AIX. Map the global address operand to be a reference
     // to the TOC entry we will synthesize later. 'TOCEntry' is a label used to
@@ -903,10 +878,8 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
     return;
   }
   case PPC::ADDIStocHA8: {
-    assert(!IsDarwin && "TOC is an ELF/XCOFF construct");
-
     // Transform %xd = ADDIStocHA8 %x2, @sym
-    LowerPPCMachineInstrToMCInst(MI, TmpInst, *this, IsDarwin);
+    LowerPPCMachineInstrToMCInst(MI, TmpInst, *this);
 
     // Change the opcode to ADDIS8. If the global address is the address of
     // an external symbol, is a jump table address, is a block address, or is a
@@ -918,7 +891,7 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
     assert((MO.isGlobal() || MO.isCPI() || MO.isJTI() || MO.isBlockAddress()) &&
            "Invalid operand for ADDIStocHA8!");
 
-    const MCSymbol *MOSymbol = getMCSymbolForTOCPseudoMO(MO);
+    const MCSymbol *MOSymbol = getMCSymbolForTOCPseudoMO(MO, *this);
 
     const bool GlobalToc =
         MO.isGlobal() && Subtarget->isGVIndirectSymbol(MO.getGlobal());
@@ -943,10 +916,8 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
     return;
   }
   case PPC::LDtocL: {
-    assert(!IsDarwin && "TOC is an ELF/XCOFF construct");
-
     // Transform %xd = LDtocL @sym, %xs
-    LowerPPCMachineInstrToMCInst(MI, TmpInst, *this, IsDarwin);
+    LowerPPCMachineInstrToMCInst(MI, TmpInst, *this);
 
     // Change the opcode to LD. If the global address is the address of
     // an external symbol, is a jump table address, is a block address, or is
@@ -964,7 +935,7 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
         "LDtocL used on symbol that could be accessed directly is "
         "invalid. Must match ADDIStocHA8."));
 
-    const MCSymbol *MOSymbol = getMCSymbolForTOCPseudoMO(MO);
+    const MCSymbol *MOSymbol = getMCSymbolForTOCPseudoMO(MO, *this);
 
     if (!MO.isCPI() || TM.getCodeModel() == CodeModel::Large)
       MOSymbol = lookUpOrCreateTOCEntry(MOSymbol);
@@ -979,7 +950,7 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
   }
   case PPC::ADDItocL: {
     // Transform %xd = ADDItocL %xs, @sym
-    LowerPPCMachineInstrToMCInst(MI, TmpInst, *this, IsDarwin);
+    LowerPPCMachineInstrToMCInst(MI, TmpInst, *this);
 
     // Change the opcode to ADDI8. If the global address is external, then
     // generate a TOC entry and reference that. Otherwise, reference the
@@ -994,7 +965,7 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
         "Interposable definitions must use indirect access."));
 
     const MCExpr *Exp =
-        MCSymbolRefExpr::create(getMCSymbolForTOCPseudoMO(MO),
+        MCSymbolRefExpr::create(getMCSymbolForTOCPseudoMO(MO, *this),
                                 MCSymbolRefExpr::VK_PPC_TOC_LO, OutContext);
     TmpInst.getOperand(2) = MCOperand::createExpr(Exp);
     EmitToStreamer(*OutStreamer, TmpInst);
@@ -1019,7 +990,7 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
   case PPC::LDgotTprelL:
   case PPC::LDgotTprelL32: {
     // Transform %xd = LDgotTprelL @sym, %xs
-    LowerPPCMachineInstrToMCInst(MI, TmpInst, *this, IsDarwin);
+    LowerPPCMachineInstrToMCInst(MI, TmpInst, *this);
 
     // Change the opcode to LD.
     TmpInst.setOpcode(IsPPC64 ? PPC::LD : PPC::LWZ);
@@ -1048,9 +1019,9 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
       MCBinaryExpr::createSub(MCSymbolRefExpr::create(GOTSymbol, OutContext),
                                 MCSymbolRefExpr::create(GOTRef, OutContext),
         OutContext);
-    OutStreamer->EmitLabel(GOTRef);
-    OutStreamer->EmitValue(OffsExpr, 4);
-    OutStreamer->EmitLabel(NextInstr);
+    OutStreamer->emitLabel(GOTRef);
+    OutStreamer->emitValue(OffsExpr, 4);
+    OutStreamer->emitLabel(NextInstr);
     EmitToStreamer(*OutStreamer, MCInstBuilder(PPC::MFLR)
                                  .addReg(MI->getOperand(0).getReg()));
     EmitToStreamer(*OutStreamer, MCInstBuilder(PPC::LWZ)
@@ -1249,10 +1220,11 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
     // suite shows a handful of test cases that fail this check for
     // Darwin.  Those need to be investigated before this sanity test
     // can be enabled for those subtargets.
-    if (!IsDarwin) {
-      unsigned OpNum = (MI->getOpcode() == PPC::STD) ? 2 : 1;
-      const MachineOperand &MO = MI->getOperand(OpNum);
-      if (MO.isGlobal() && MO.getGlobal()->getAlignment() < 4)
+    unsigned OpNum = (MI->getOpcode() == PPC::STD) ? 2 : 1;
+    const MachineOperand &MO = MI->getOperand(OpNum);
+    if (MO.isGlobal()) {
+      const DataLayout &DL = MO.getGlobal()->getParent()->getDataLayout();
+      if (MO.getGlobal()->getPointerAlignment(DL) < 4)
         llvm_unreachable("Global must be word-aligned for LD, STD, LWA!");
     }
     // Now process the instruction normally.
@@ -1260,17 +1232,17 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
   }
   }
 
-  LowerPPCMachineInstrToMCInst(MI, TmpInst, *this, IsDarwin);
+  LowerPPCMachineInstrToMCInst(MI, TmpInst, *this);
   EmitToStreamer(*OutStreamer, TmpInst);
 }
 
-void PPCLinuxAsmPrinter::EmitInstruction(const MachineInstr *MI) {
+void PPCLinuxAsmPrinter::emitInstruction(const MachineInstr *MI) {
   if (!Subtarget->isPPC64())
-    return PPCAsmPrinter::EmitInstruction(MI);
+    return PPCAsmPrinter::emitInstruction(MI);
 
   switch (MI->getOpcode()) {
   default:
-    return PPCAsmPrinter::EmitInstruction(MI);
+    return PPCAsmPrinter::emitInstruction(MI);
   case TargetOpcode::PATCHABLE_FUNCTION_ENTER: {
     // .begin:
     //   b .end # lis 0, FuncId[16..32]
@@ -1285,7 +1257,7 @@ void PPCLinuxAsmPrinter::EmitInstruction(const MachineInstr *MI) {
     // of instructions change.
     MCSymbol *BeginOfSled = OutContext.createTempSymbol();
     MCSymbol *EndOfSled = OutContext.createTempSymbol();
-    OutStreamer->EmitLabel(BeginOfSled);
+    OutStreamer->emitLabel(BeginOfSled);
     EmitToStreamer(*OutStreamer,
                    MCInstBuilder(PPC::B).addExpr(
                        MCSymbolRefExpr::create(EndOfSled, OutContext)));
@@ -1300,8 +1272,8 @@ void PPCLinuxAsmPrinter::EmitInstruction(const MachineInstr *MI) {
                            OutContext.getOrCreateSymbol("__xray_FunctionEntry"),
                            OutContext)));
     EmitToStreamer(*OutStreamer, MCInstBuilder(PPC::MTLR8).addReg(PPC::X0));
-    OutStreamer->EmitLabel(EndOfSled);
-    recordSled(BeginOfSled, *MI, SledKind::FUNCTION_ENTER);
+    OutStreamer->emitLabel(EndOfSled);
+    recordSled(BeginOfSled, *MI, SledKind::FUNCTION_ENTER, 2);
     break;
   }
   case TargetOpcode::PATCHABLE_RET: {
@@ -1311,7 +1283,7 @@ void PPCLinuxAsmPrinter::EmitInstruction(const MachineInstr *MI) {
     for (const auto &MO :
          make_range(std::next(MI->operands_begin()), MI->operands_end())) {
       MCOperand MCOp;
-      if (LowerPPCMachineOperandToMCOperand(MO, MCOp, *this, false))
+      if (LowerPPCMachineOperandToMCOperand(MO, MCOp, *this))
         RetInst.addOperand(MCOp);
     }
 
@@ -1371,9 +1343,9 @@ void PPCLinuxAsmPrinter::EmitInstruction(const MachineInstr *MI) {
     //
     // Update compiler-rt/lib/xray/xray_powerpc64.cc accordingly when number
     // of instructions change.
-    OutStreamer->EmitCodeAlignment(8);
+    OutStreamer->emitCodeAlignment(8);
     MCSymbol *BeginOfSled = OutContext.createTempSymbol();
-    OutStreamer->EmitLabel(BeginOfSled);
+    OutStreamer->emitLabel(BeginOfSled);
     EmitToStreamer(*OutStreamer, RetInst);
     EmitToStreamer(*OutStreamer, MCInstBuilder(PPC::NOP));
     EmitToStreamer(
@@ -1388,8 +1360,8 @@ void PPCLinuxAsmPrinter::EmitInstruction(const MachineInstr *MI) {
     EmitToStreamer(*OutStreamer, MCInstBuilder(PPC::MTLR8).addReg(PPC::X0));
     EmitToStreamer(*OutStreamer, RetInst);
     if (IsConditional)
-      OutStreamer->EmitLabel(FallthroughLabel);
-    recordSled(BeginOfSled, *MI, SledKind::FUNCTION_EXIT);
+      OutStreamer->emitLabel(FallthroughLabel);
+    recordSled(BeginOfSled, *MI, SledKind::FUNCTION_EXIT, 2);
     break;
   }
   case TargetOpcode::PATCHABLE_FUNCTION_EXIT:
@@ -1402,7 +1374,7 @@ void PPCLinuxAsmPrinter::EmitInstruction(const MachineInstr *MI) {
   }
 }
 
-void PPCLinuxAsmPrinter::EmitStartOfAsmFile(Module &M) {
+void PPCLinuxAsmPrinter::emitStartOfAsmFile(Module &M) {
   if (static_cast<const PPCTargetMachine &>(TM).isELFv2ABI()) {
     PPCTargetStreamer *TS =
       static_cast<PPCTargetStreamer *>(OutStreamer->getTargetStreamer());
@@ -1413,10 +1385,10 @@ void PPCLinuxAsmPrinter::EmitStartOfAsmFile(Module &M) {
 
   if (static_cast<const PPCTargetMachine &>(TM).isPPC64() ||
       !isPositionIndependent())
-    return AsmPrinter::EmitStartOfAsmFile(M);
+    return AsmPrinter::emitStartOfAsmFile(M);
 
   if (M.getPICLevel() == PICLevel::SmallPIC)
-    return AsmPrinter::EmitStartOfAsmFile(M);
+    return AsmPrinter::emitStartOfAsmFile(M);
 
   OutStreamer->SwitchSection(OutContext.getELFSection(
       ".got2", ELF::SHT_PROGBITS, ELF::SHF_WRITE | ELF::SHF_ALLOC));
@@ -1424,7 +1396,7 @@ void PPCLinuxAsmPrinter::EmitStartOfAsmFile(Module &M) {
   MCSymbol *TOCSym = OutContext.getOrCreateSymbol(Twine(".LTOC"));
   MCSymbol *CurrentPos = OutContext.createTempSymbol();
 
-  OutStreamer->EmitLabel(CurrentPos);
+  OutStreamer->emitLabel(CurrentPos);
 
   // The GOT pointer points to the middle of the GOT, in order to reference the
   // entire 64kB range.  0x8000 is the midpoint.
@@ -1433,24 +1405,24 @@ void PPCLinuxAsmPrinter::EmitStartOfAsmFile(Module &M) {
                             MCConstantExpr::create(0x8000, OutContext),
                             OutContext);
 
-  OutStreamer->EmitAssignment(TOCSym, tocExpr);
+  OutStreamer->emitAssignment(TOCSym, tocExpr);
 
   OutStreamer->SwitchSection(getObjFileLowering().getTextSection());
 }
 
-void PPCLinuxAsmPrinter::EmitFunctionEntryLabel() {
+void PPCLinuxAsmPrinter::emitFunctionEntryLabel() {
   // linux/ppc32 - Normal entry label.
   if (!Subtarget->isPPC64() &&
       (!isPositionIndependent() ||
        MF->getFunction().getParent()->getPICLevel() == PICLevel::SmallPIC))
-    return AsmPrinter::EmitFunctionEntryLabel();
+    return AsmPrinter::emitFunctionEntryLabel();
 
   if (!Subtarget->isPPC64()) {
     const PPCFunctionInfo *PPCFI = MF->getInfo<PPCFunctionInfo>();
     if (PPCFI->usesPICBase() && !Subtarget->isSecurePlt()) {
-      MCSymbol *RelocSymbol = PPCFI->getPICOffsetSymbol();
+      MCSymbol *RelocSymbol = PPCFI->getPICOffsetSymbol(*MF);
       MCSymbol *PICBase = MF->getPICBaseSymbol();
-      OutStreamer->EmitLabel(RelocSymbol);
+      OutStreamer->emitLabel(RelocSymbol);
 
       const MCExpr *OffsExpr =
         MCBinaryExpr::createSub(
@@ -1458,11 +1430,11 @@ void PPCLinuxAsmPrinter::EmitFunctionEntryLabel() {
                                                                OutContext),
                                   MCSymbolRefExpr::create(PICBase, OutContext),
           OutContext);
-      OutStreamer->EmitValue(OffsExpr, 4);
-      OutStreamer->EmitLabel(CurrentFnSym);
+      OutStreamer->emitValue(OffsExpr, 4);
+      OutStreamer->emitLabel(CurrentFnSym);
       return;
     } else
-      return AsmPrinter::EmitFunctionEntryLabel();
+      return AsmPrinter::emitFunctionEntryLabel();
   }
 
   // ELFv2 ABI - Normal entry label.
@@ -1476,17 +1448,17 @@ void PPCLinuxAsmPrinter::EmitFunctionEntryLabel() {
       const PPCFunctionInfo *PPCFI = MF->getInfo<PPCFunctionInfo>();
 
       MCSymbol *TOCSymbol = OutContext.getOrCreateSymbol(StringRef(".TOC."));
-      MCSymbol *GlobalEPSymbol = PPCFI->getGlobalEPSymbol();
+      MCSymbol *GlobalEPSymbol = PPCFI->getGlobalEPSymbol(*MF);
       const MCExpr *TOCDeltaExpr =
         MCBinaryExpr::createSub(MCSymbolRefExpr::create(TOCSymbol, OutContext),
                                 MCSymbolRefExpr::create(GlobalEPSymbol,
                                                         OutContext),
                                 OutContext);
 
-      OutStreamer->EmitLabel(PPCFI->getTOCOffsetSymbol());
-      OutStreamer->EmitValue(TOCDeltaExpr, 8);
+      OutStreamer->emitLabel(PPCFI->getTOCOffsetSymbol(*MF));
+      OutStreamer->emitValue(TOCDeltaExpr, 8);
     }
-    return AsmPrinter::EmitFunctionEntryLabel();
+    return AsmPrinter::emitFunctionEntryLabel();
   }
 
   // Emit an official procedure descriptor.
@@ -1494,61 +1466,56 @@ void PPCLinuxAsmPrinter::EmitFunctionEntryLabel() {
   MCSectionELF *Section = OutStreamer->getContext().getELFSection(
       ".opd", ELF::SHT_PROGBITS, ELF::SHF_WRITE | ELF::SHF_ALLOC);
   OutStreamer->SwitchSection(Section);
-  OutStreamer->EmitLabel(CurrentFnSym);
-  OutStreamer->EmitValueToAlignment(8);
+  OutStreamer->emitLabel(CurrentFnSym);
+  OutStreamer->emitValueToAlignment(8);
   MCSymbol *Symbol1 = CurrentFnSymForSize;
   // Generates a R_PPC64_ADDR64 (from FK_DATA_8) relocation for the function
   // entry point.
-  OutStreamer->EmitValue(MCSymbolRefExpr::create(Symbol1, OutContext),
+  OutStreamer->emitValue(MCSymbolRefExpr::create(Symbol1, OutContext),
                          8 /*size*/);
   MCSymbol *Symbol2 = OutContext.getOrCreateSymbol(StringRef(".TOC."));
   // Generates a R_PPC64_TOC relocation for TOC base insertion.
-  OutStreamer->EmitValue(
+  OutStreamer->emitValue(
     MCSymbolRefExpr::create(Symbol2, MCSymbolRefExpr::VK_PPC_TOCBASE, OutContext),
     8/*size*/);
   // Emit a null environment pointer.
-  OutStreamer->EmitIntValue(0, 8 /* size */);
+  OutStreamer->emitIntValue(0, 8 /* size */);
   OutStreamer->SwitchSection(Current.first, Current.second);
 }
 
-bool PPCLinuxAsmPrinter::doFinalization(Module &M) {
+void PPCLinuxAsmPrinter::emitEndOfAsmFile(Module &M) {
   const DataLayout &DL = getDataLayout();
 
   bool isPPC64 = DL.getPointerSizeInBits() == 64;
 
-  PPCTargetStreamer &TS =
-      static_cast<PPCTargetStreamer &>(*OutStreamer->getTargetStreamer());
+  PPCTargetStreamer *TS =
+      static_cast<PPCTargetStreamer *>(OutStreamer->getTargetStreamer());
 
   if (!TOC.empty()) {
-    MCSectionELF *Section;
-
-    if (isPPC64)
-      Section = OutStreamer->getContext().getELFSection(
-          ".toc", ELF::SHT_PROGBITS, ELF::SHF_WRITE | ELF::SHF_ALLOC);
-        else
-          Section = OutStreamer->getContext().getELFSection(
-              ".got2", ELF::SHT_PROGBITS, ELF::SHF_WRITE | ELF::SHF_ALLOC);
+    const char *Name = isPPC64 ? ".toc" : ".got2";
+    MCSectionELF *Section = OutContext.getELFSection(
+        Name, ELF::SHT_PROGBITS, ELF::SHF_WRITE | ELF::SHF_ALLOC);
     OutStreamer->SwitchSection(Section);
+    if (!isPPC64)
+      OutStreamer->emitValueToAlignment(4);
 
     for (const auto &TOCMapPair : TOC) {
       const MCSymbol *const TOCEntryTarget = TOCMapPair.first;
       MCSymbol *const TOCEntryLabel = TOCMapPair.second;
 
-      OutStreamer->EmitLabel(TOCEntryLabel);
-      if (isPPC64) {
-        TS.emitTCEntry(*TOCEntryTarget);
-      } else {
-        OutStreamer->EmitValueToAlignment(4);
-        OutStreamer->EmitSymbolValue(TOCEntryTarget, 4);
-      }
+      OutStreamer->emitLabel(TOCEntryLabel);
+      if (isPPC64 && TS != nullptr)
+        TS->emitTCEntry(*TOCEntryTarget);
+      else
+        OutStreamer->emitSymbolValue(TOCEntryTarget, 4);
     }
   }
 
-  return AsmPrinter::doFinalization(M);
+  PPCAsmPrinter::emitEndOfAsmFile(M);
 }
 
 /// EmitFunctionBodyStart - Emit a global entry point prefix for ELFv2.
-void PPCLinuxAsmPrinter::EmitFunctionBodyStart() {
+void PPCLinuxAsmPrinter::emitFunctionBodyStart() {
   // In the ELFv2 ABI, in functions that use the TOC register, we need to
   // provide two entry points.  The ABI guarantees that when calling the
   // local entry point, r2 is set up by the caller to contain the TOC base
@@ -1580,16 +1547,23 @@ void PPCLinuxAsmPrinter::EmitFunctionBodyStart() {
   //
   // This ensures we have r2 set up correctly while executing the function
   // body, no matter which entry point is called.
-  if (Subtarget->isELFv2ABI()
-      // Only do all that if the function uses r2 in the first place.
-      && !MF->getRegInfo().use_empty(PPC::X2)) {
+  const PPCFunctionInfo *PPCFI = MF->getInfo<PPCFunctionInfo>();
+  const bool UsesX2OrR2 = !MF->getRegInfo().use_empty(PPC::X2) ||
+                          !MF->getRegInfo().use_empty(PPC::R2);
+  const bool PCrelGEPRequired = Subtarget->isUsingPCRelativeCalls() &&
+                                UsesX2OrR2 && PPCFI->usesTOCBasePtr();
+  const bool NonPCrelGEPRequired = !Subtarget->isUsingPCRelativeCalls() &&
+                                   Subtarget->isELFv2ABI() && UsesX2OrR2;
+
+  // Only do all that if the function uses R2 as the TOC pointer
+  // in the first place. We don't need the global entry point if the
+  // function uses R2 as an allocatable register.
+  if (NonPCrelGEPRequired || PCrelGEPRequired) {
     // Note: The logic here must be synchronized with the code in the
     // branch-selection pass which sets the offset of the first block in the
     // function. This matters because it affects the alignment.
-    const PPCFunctionInfo *PPCFI = MF->getInfo<PPCFunctionInfo>();
-
-    MCSymbol *GlobalEntryLabel = PPCFI->getGlobalEPSymbol();
-    OutStreamer->EmitLabel(GlobalEntryLabel);
+    MCSymbol *GlobalEntryLabel = PPCFI->getGlobalEPSymbol(*MF);
+    OutStreamer->emitLabel(GlobalEntryLabel);
     const MCSymbolRefExpr *GlobalEntryLabelExp =
       MCSymbolRefExpr::create(GlobalEntryLabel, OutContext);
 
@@ -1599,21 +1573,19 @@ void PPCLinuxAsmPrinter::EmitFunctionBodyStart() {
         MCBinaryExpr::createSub(MCSymbolRefExpr::create(TOCSymbol, OutContext),
                                 GlobalEntryLabelExp, OutContext);
 
-      const MCExpr *TOCDeltaHi =
-        PPCMCExpr::createHa(TOCDeltaExpr, false, OutContext);
+      const MCExpr *TOCDeltaHi = PPCMCExpr::createHa(TOCDeltaExpr, OutContext);
       EmitToStreamer(*OutStreamer, MCInstBuilder(PPC::ADDIS)
                                    .addReg(PPC::X2)
                                    .addReg(PPC::X12)
                                    .addExpr(TOCDeltaHi));
 
-      const MCExpr *TOCDeltaLo =
-        PPCMCExpr::createLo(TOCDeltaExpr, false, OutContext);
+      const MCExpr *TOCDeltaLo = PPCMCExpr::createLo(TOCDeltaExpr, OutContext);
       EmitToStreamer(*OutStreamer, MCInstBuilder(PPC::ADDI)
                                    .addReg(PPC::X2)
                                    .addReg(PPC::X2)
                                    .addExpr(TOCDeltaLo));
     } else {
-      MCSymbol *TOCOffset = PPCFI->getTOCOffsetSymbol();
+      MCSymbol *TOCOffset = PPCFI->getTOCOffsetSymbol(*MF);
       const MCExpr *TOCOffsetDeltaExpr =
         MCBinaryExpr::createSub(MCSymbolRefExpr::create(TOCOffset, OutContext),
                                 GlobalEntryLabelExp, OutContext);
@@ -1628,8 +1600,8 @@ void PPCLinuxAsmPrinter::EmitFunctionBodyStart() {
                                    .addReg(PPC::X12));
     }
 
-    MCSymbol *LocalEntryLabel = PPCFI->getLocalEPSymbol();
-    OutStreamer->EmitLabel(LocalEntryLabel);
+    MCSymbol *LocalEntryLabel = PPCFI->getLocalEPSymbol(*MF);
+    OutStreamer->emitLabel(LocalEntryLabel);
     const MCSymbolRefExpr *LocalEntryLabelExp =
        MCSymbolRefExpr::create(LocalEntryLabel, OutContext);
     const MCExpr *LocalOffsetExp =
@@ -1641,13 +1613,43 @@ void PPCLinuxAsmPrinter::EmitFunctionBodyStart() {
 
     if (TS)
       TS->emitLocalEntry(cast<MCSymbolELF>(CurrentFnSym), LocalOffsetExp);
+  } else if (Subtarget->isUsingPCRelativeCalls()) {
+    // When generating the entry point for a function we have a few scenarios
+    // based on whether or not that function uses R2 and whether or not that
+    // function makes calls (or is a leaf function).
+    // 1) A leaf function that does not use R2 (or treats it as callee-saved
+    //    and preserves it). In this case st_other=0 and both
+    //    the local and global entry points for the function are the same.
+    //    No special entry point code is required.
+    // 2) A function uses the TOC pointer R2. This function may or may not have
+    //    calls. In this case st_other=[2,6] and the global and local entry
+    //    points are different. Code to correctly setup the TOC pointer in R2
+    //    is put between the global and local entry points. This case is
+    //    covered by the if statatement above.
+    // 3) A function does not use the TOC pointer R2 but does have calls.
+    //    In this case st_other=1 since we do not know whether or not any
+    //    of the callees clobber R2. This case is dealt with in this else if
+    //    block. Tail calls are considered calls and the st_other should also
+    //    be set to 1 in that case as well.
+    // 4) The function does not use the TOC pointer but R2 is used inside
+    //    the function. In this case st_other=1 once again.
+    // 5) This function uses inline asm. We mark R2 as reserved if the function
+    //    has inline asm as we have to assume that it may be used.
+    if (MF->getFrameInfo().hasCalls() || MF->getFrameInfo().hasTailCall() ||
+        MF->hasInlineAsm() || (!PPCFI->usesTOCBasePtr() && UsesX2OrR2)) {
+      PPCTargetStreamer *TS =
+          static_cast<PPCTargetStreamer *>(OutStreamer->getTargetStreamer());
+      if (TS)
+        TS->emitLocalEntry(cast<MCSymbolELF>(CurrentFnSym),
+                           MCConstantExpr::create(1, OutContext));
+    }
   }
 }
 
 /// EmitFunctionBodyEnd - Print the traceback table before the .size
 /// directive.
 ///
-void PPCLinuxAsmPrinter::EmitFunctionBodyEnd() {
+void PPCLinuxAsmPrinter::emitFunctionBodyEnd() {
   // Only the 64-bit target requires a traceback table.  For now,
   // we only emit the word of zeroes that GDB requires to find
   // the end of the function, and zeroes for the eight-byte
@@ -1656,19 +1658,73 @@ void PPCLinuxAsmPrinter::EmitFunctionBodyEnd() {
   // the PPC64 ELF ABI (this is a low-priority item because GDB does not
   // currently make use of these fields).
   if (Subtarget->isPPC64()) {
-    OutStreamer->EmitIntValue(0, 4/*size*/);
-    OutStreamer->EmitIntValue(0, 8/*size*/);
+    OutStreamer->emitIntValue(0, 4/*size*/);
+    OutStreamer->emitIntValue(0, 8/*size*/);
   }
 }
 
+void PPCAIXAsmPrinter::emitLinkage(const GlobalValue *GV,
+                                   MCSymbol *GVSym) const {
+
+  assert(MAI->hasVisibilityOnlyWithLinkage() &&
+         "AIX's linkage directives take a visibility setting.");
+
+  MCSymbolAttr LinkageAttr = MCSA_Invalid;
+  switch (GV->getLinkage()) {
+  case GlobalValue::ExternalLinkage:
+    LinkageAttr = GV->isDeclaration() ? MCSA_Extern : MCSA_Global;
+    break;
+  case GlobalValue::LinkOnceAnyLinkage:
+  case GlobalValue::LinkOnceODRLinkage:
+  case GlobalValue::WeakAnyLinkage:
+  case GlobalValue::WeakODRLinkage:
+  case GlobalValue::ExternalWeakLinkage:
+    LinkageAttr = MCSA_Weak;
+    break;
+  case GlobalValue::AvailableExternallyLinkage:
+    LinkageAttr = MCSA_Extern;
+    break;
+  case GlobalValue::PrivateLinkage:
+    return;
+  case GlobalValue::InternalLinkage:
+    assert(GV->getVisibility() == GlobalValue::DefaultVisibility &&
+           "InternalLinkage should not have other visibility setting.");
+    LinkageAttr = MCSA_LGlobal;
+    break;
+  case GlobalValue::AppendingLinkage:
+    llvm_unreachable("Should never emit this");
+  case GlobalValue::CommonLinkage:
+    llvm_unreachable("CommonLinkage of XCOFF should not come to this path");
+  }
+
+  assert(LinkageAttr != MCSA_Invalid && "LinkageAttr should not MCSA_Invalid.");
+
+  MCSymbolAttr VisibilityAttr = MCSA_Invalid;
+  switch (GV->getVisibility()) {
+
+  // TODO: "exported" and "internal" Visibility needs to go here.
+  case GlobalValue::DefaultVisibility:
+    break;
+  case GlobalValue::HiddenVisibility:
+    VisibilityAttr = MAI->getHiddenVisibilityAttr();
+    break;
+  case GlobalValue::ProtectedVisibility:
+    VisibilityAttr = MAI->getProtectedVisibilityAttr();
+    break;
+  }
+
+  OutStreamer->emitXCOFFSymbolLinkageWithVisibility(GVSym, LinkageAttr,
+                                                    VisibilityAttr);
+}
+
 void PPCAIXAsmPrinter::SetupMachineFunction(MachineFunction &MF) {
-  // Get the function descriptor symbol.
-  CurrentFnDescSym = getSymbol(&MF.getFunction());
-  // Set the containing csect.
-  MCSectionXCOFF *FnDescSec = OutStreamer->getContext().getXCOFFSection(
-      CurrentFnDescSym->getName(), XCOFF::XMC_DS, XCOFF::XTY_SD,
-      XCOFF::C_HIDEXT, SectionKind::getData());
-  cast<MCSymbolXCOFF>(CurrentFnDescSym)->setContainingCsect(FnDescSec);
+  // Setup CurrentFnDescSym and its containing csect.
+  MCSectionXCOFF *FnDescSec =
+      cast<MCSectionXCOFF>(getObjFileLowering().getSectionForFunctionDescriptor(
+          &MF.getFunction(), TM));
+  FnDescSec->setAlignment(Align(Subtarget->isPPC64() ? 8 : 4));
+
+  CurrentFnDescSym = FnDescSec->getQualNameSymbol();
 
   return AsmPrinter::SetupMachineFunction(MF);
 }
@@ -1685,31 +1741,20 @@ void PPCAIXAsmPrinter::ValidateGV(const GlobalVariable *GV) {
     report_fatal_error("COMDAT not yet supported by AIX.");
 }
 
-const MCExpr *PPCAIXAsmPrinter::lowerConstant(const Constant *CV) {
-  if (const Function *F = dyn_cast<Function>(CV)) {
-    MCSymbolXCOFF *FSym = cast<MCSymbolXCOFF>(getSymbol(F));
-    if (!FSym->hasContainingCsect()) {
-      const XCOFF::StorageClass SC =
-          F->isDeclaration()
-              ? TargetLoweringObjectFileXCOFF::getStorageClassForGlobal(F)
-              : XCOFF::C_HIDEXT;
-      MCSectionXCOFF *Csect = OutStreamer->getContext().getXCOFFSection(
-          FSym->getName(), XCOFF::XMC_DS,
-          F->isDeclaration() ? XCOFF::XTY_ER : XCOFF::XTY_SD, SC,
-          SectionKind::getData());
-      FSym->setContainingCsect(Csect);
-    }
-    return MCSymbolRefExpr::create(
-        FSym->getContainingCsect()->getQualNameSymbol(), OutContext);
-  }
-  return PPCAsmPrinter::lowerConstant(CV);
+static bool isSpecialLLVMGlobalArrayForStaticInit(const GlobalVariable *GV) {
+  return StringSwitch<bool>(GV->getName())
+      .Cases("llvm.global_ctors", "llvm.global_dtors", true)
+      .Default(false);
 }
 
-void PPCAIXAsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) {
+void PPCAIXAsmPrinter::emitGlobalVariable(const GlobalVariable *GV) {
   ValidateGV(GV);
 
-  // External global variables are already handled.
-  if (!GV->hasInitializer())
+  // TODO: Update the handling of global arrays for static init when we support
+  // the ".ref" directive.
+  // Otherwise, we can skip these arrays, because the AIX linker collects
+  // static init functions simply based on their name.
+  if (isSpecialLLVMGlobalArrayForStaticInit(GV))
     return;
 
   // Create the symbol, set its storage class.
@@ -1717,156 +1762,133 @@ void PPCAIXAsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) {
   GVSym->setStorageClass(
       TargetLoweringObjectFileXCOFF::getStorageClassForGlobal(GV));
 
+  if (GV->isDeclarationForLinker()) {
+    emitLinkage(GV, GVSym);
+    return;
+  }
+
   SectionKind GVKind = getObjFileLowering().getKindForGlobal(GV, TM);
-  if ((!GVKind.isGlobalWriteableData() && !GVKind.isReadOnly()) ||
-      GVKind.isMergeable2ByteCString() || GVKind.isMergeable4ByteCString())
+  if (!GVKind.isGlobalWriteableData() && !GVKind.isReadOnly())
     report_fatal_error("Encountered a global variable kind that is "
                        "not supported yet.");
 
-  // Create the containing csect and switch to it.
   MCSectionXCOFF *Csect = cast<MCSectionXCOFF>(
       getObjFileLowering().SectionForGlobal(GV, GVKind, TM));
+
+  // Switch to the containing csect.
   OutStreamer->SwitchSection(Csect);
-  GVSym->setContainingCsect(Csect);
 
   const DataLayout &DL = GV->getParent()->getDataLayout();
 
   // Handle common symbols.
   if (GVKind.isCommon() || GVKind.isBSSLocal()) {
-    unsigned Align =
-      GV->getAlignment() ? GV->getAlignment() : DL.getPreferredAlignment(GV);
+    Align Alignment = GV->getAlign().getValueOr(DL.getPreferredAlign(GV));
     uint64_t Size = DL.getTypeAllocSize(GV->getType()->getElementType());
 
     if (GVKind.isBSSLocal())
-      OutStreamer->EmitXCOFFLocalCommonSymbol(
-          GVSym, Size, Csect->getQualNameSymbol(), Align);
+      OutStreamer->emitXCOFFLocalCommonSymbol(
+          OutContext.getOrCreateSymbol(GVSym->getUnqualifiedName()), Size,
+          GVSym, Alignment.value());
     else
-      OutStreamer->EmitCommonSymbol(Csect->getQualNameSymbol(), Size, Align);
+      OutStreamer->emitCommonSymbol(GVSym, Size, Alignment.value());
     return;
   }
 
   MCSymbol *EmittedInitSym = GVSym;
-  EmitLinkage(GV, EmittedInitSym);
-  EmitAlignment(getGVAlignment(GV, DL), GV);
-  OutStreamer->EmitLabel(EmittedInitSym);
-  EmitGlobalConstant(GV->getParent()->getDataLayout(), GV->getInitializer());
+  emitLinkage(GV, EmittedInitSym);
+  emitAlignment(getGVAlignment(GV, DL), GV);
+  OutStreamer->emitLabel(EmittedInitSym);
+  emitGlobalConstant(GV->getParent()->getDataLayout(), GV->getInitializer());
 }
 
-void PPCAIXAsmPrinter::EmitFunctionDescriptor() {
+void PPCAIXAsmPrinter::emitFunctionDescriptor() {
   const DataLayout &DL = getDataLayout();
   const unsigned PointerSize = DL.getPointerSizeInBits() == 64 ? 8 : 4;
 
   MCSectionSubPair Current = OutStreamer->getCurrentSection();
   // Emit function descriptor.
   OutStreamer->SwitchSection(
-      cast<MCSymbolXCOFF>(CurrentFnDescSym)->getContainingCsect());
-  OutStreamer->EmitLabel(CurrentFnDescSym);
+      cast<MCSymbolXCOFF>(CurrentFnDescSym)->getRepresentedCsect());
   // Emit function entry point address.
-  OutStreamer->EmitValue(MCSymbolRefExpr::create(CurrentFnSym, OutContext),
+  OutStreamer->emitValue(MCSymbolRefExpr::create(CurrentFnSym, OutContext),
                          PointerSize);
   // Emit TOC base address.
-  const MCSectionXCOFF *TOCBaseSec = OutStreamer->getContext().getXCOFFSection(
-      StringRef("TOC"), XCOFF::XMC_TC0, XCOFF::XTY_SD, XCOFF::C_HIDEXT,
-      SectionKind::getData());
-  const MCSymbol *TOCBaseSym = TOCBaseSec->getQualNameSymbol();
-  OutStreamer->EmitValue(MCSymbolRefExpr::create(TOCBaseSym, OutContext),
+  const MCSymbol *TOCBaseSym =
+      cast<MCSectionXCOFF>(getObjFileLowering().getTOCBaseSection())
+          ->getQualNameSymbol();
+  OutStreamer->emitValue(MCSymbolRefExpr::create(TOCBaseSym, OutContext),
                          PointerSize);
   // Emit a null environment pointer.
-  OutStreamer->EmitIntValue(0, PointerSize);
+  OutStreamer->emitIntValue(0, PointerSize);
 
   OutStreamer->SwitchSection(Current.first, Current.second);
 }
 
-void PPCAIXAsmPrinter::EmitEndOfAsmFile(Module &M) {
+void PPCAIXAsmPrinter::emitEndOfAsmFile(Module &M) {
   // If there are no functions in this module, we will never need to reference
   // the TOC base.
   if (M.empty())
     return;
 
-  // Emit TOC base.
-  MCSectionXCOFF *TOCBaseSection = OutStreamer->getContext().getXCOFFSection(
-      StringRef("TOC"), XCOFF::XMC_TC0, XCOFF::XTY_SD, XCOFF::C_HIDEXT,
-      SectionKind::getData());
-  // The TOC-base always has 0 size, but 4 byte alignment.
-  TOCBaseSection->setAlignment(Align(4));
   // Switch to section to emit TOC base.
-  OutStreamer->SwitchSection(TOCBaseSection);
+  OutStreamer->SwitchSection(getObjFileLowering().getTOCBaseSection());
 
-  PPCTargetStreamer &TS =
-      static_cast<PPCTargetStreamer &>(*OutStreamer->getTargetStreamer());
+  PPCTargetStreamer *TS =
+      static_cast<PPCTargetStreamer *>(OutStreamer->getTargetStreamer());
+
+  const unsigned EntryByteSize = Subtarget->isPPC64() ? 8 : 4;
+  const unsigned TOCEntriesByteSize = TOC.size() * EntryByteSize;
+  // TODO: If TOC entries' size is larger than 32768, then we run out of
+  // positive displacement to reach the TOC entry. We need to decide how to
+  // handle entries' size larger than that later.
+  if (TOCEntriesByteSize > 32767) {
+    report_fatal_error("Handling of TOC entry displacement larger than 32767 "
+                       "is not yet implemented.");
+  }
 
   for (auto &I : TOC) {
     // Setup the csect for the current TC entry.
-    MCSectionXCOFF *TCEntry = OutStreamer->getContext().getXCOFFSection(
-        cast<MCSymbolXCOFF>(I.first)->getUnqualifiedName(), XCOFF::XMC_TC,
-        XCOFF::XTY_SD, XCOFF::C_HIDEXT, SectionKind::getData());
-    cast<MCSymbolXCOFF>(I.second)->setContainingCsect(TCEntry);
+    MCSectionXCOFF *TCEntry = cast<MCSectionXCOFF>(
+        getObjFileLowering().getSectionForTOCEntry(I.first));
     OutStreamer->SwitchSection(TCEntry);
 
-    OutStreamer->EmitLabel(I.second);
-    TS.emitTCEntry(*I.first);
+    OutStreamer->emitLabel(I.second);
+    if (TS != nullptr)
+      TS->emitTCEntry(*I.first);
   }
 }
 
-MCSymbol *
-PPCAIXAsmPrinter::getMCSymbolForTOCPseudoMO(const MachineOperand &MO) {
-  const GlobalObject *GO = nullptr;
-
-  // If the MO is a function or certain kind of globals, we want to make sure to
-  // refer to the csect symbol, otherwise we can just do the default handling.
-  if (MO.getType() != MachineOperand::MO_GlobalAddress ||
-      !(GO = dyn_cast<const GlobalObject>(MO.getGlobal())))
-    return PPCAsmPrinter::getMCSymbolForTOCPseudoMO(MO);
-
-  // Do an early error check for globals we don't support. This will go away
-  // eventually.
-  const auto *GV = dyn_cast<const GlobalVariable>(GO);
-  if (GV) {
-    ValidateGV(GV);
-  }
+bool PPCAIXAsmPrinter::doInitialization(Module &M) {
+  if (M.alias_size() > 0u)
+    report_fatal_error(
+        "module has aliases, which LLVM does not yet support for AIX");
 
-  MCSymbolXCOFF *XSym = cast<MCSymbolXCOFF>(getSymbol(GO));
-
-  // If the global object is a global variable without initializer or is a
-  // declaration of a function, then XSym is an external referenced symbol.
-  // Hence we may need to explictly create a MCSectionXCOFF for it so that we
-  // can return its symbol later.
-  if (GO->isDeclaration()) {
-    if (!XSym->hasContainingCsect()) {
-      // Make sure the storage class is set.
-      const XCOFF::StorageClass SC =
-          TargetLoweringObjectFileXCOFF::getStorageClassForGlobal(GO);
-      XSym->setStorageClass(SC);
-
-      MCSectionXCOFF *Csect = OutStreamer->getContext().getXCOFFSection(
-          XSym->getName(), isa<Function>(GO) ? XCOFF::XMC_DS : XCOFF::XMC_UA,
-          XCOFF::XTY_ER, SC, SectionKind::getMetadata());
-      XSym->setContainingCsect(Csect);
-    }
+  const bool Result = PPCAsmPrinter::doInitialization(M);
 
-    return XSym->getContainingCsect()->getQualNameSymbol();
-  }
+  auto setCsectAlignment = [this](const GlobalObject *GO) {
+    // Declarations have 0 alignment which is set by default.
+    if (GO->isDeclarationForLinker())
+      return;
 
-  // Handle initialized global variables and defined functions.
-  SectionKind GOKind = getObjFileLowering().getKindForGlobal(GO, TM);
-
-  if (GOKind.isText()) {
-    // If the MO is a function, we want to make sure to refer to the function
-    // descriptor csect.
-    return OutStreamer->getContext()
-        .getXCOFFSection(XSym->getName(), XCOFF::XMC_DS, XCOFF::XTY_SD,
-                         XCOFF::C_HIDEXT, SectionKind::getData())
-        ->getQualNameSymbol();
-  } else if (GOKind.isCommon() || GOKind.isBSSLocal()) {
-    // If the operand is a common then we should refer to the csect symbol.
-    return cast<MCSectionXCOFF>(
-               getObjFileLowering().SectionForGlobal(GO, GOKind, TM))
-        ->getQualNameSymbol();
-  }
+    SectionKind GOKind = getObjFileLowering().getKindForGlobal(GO, TM);
+    MCSectionXCOFF *Csect = cast<MCSectionXCOFF>(
+        getObjFileLowering().SectionForGlobal(GO, GOKind, TM));
+
+    Align GOAlign = getGVAlignment(GO, GO->getParent()->getDataLayout());
+    if (GOAlign > Csect->getAlignment())
+      Csect->setAlignment(GOAlign);
+  };
+
+  // We need to know, up front, the alignment of csects for the assembly path,
+  // because once a .csect directive gets emitted, we could not change the
+  // alignment value on it.
+  for (const auto &G : M.globals())
+    setCsectAlignment(&G);
+
+  for (const auto &F : M)
+    setCsectAlignment(&F);
 
-  // Other global variables are refered to by labels inside of a single csect,
-  // so refer to the label directly.
-  return getSymbol(GV);
+  return Result;
 }
 
 /// createPPCAsmPrinterPass - Returns a pass that prints the PPC assembly code
index 5f4fdbc..d35f3b6 100644 (file)
@@ -10,6 +10,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "MCTargetDesc/PPCPredicates.h"
 #include "PPCFrameLowering.h"
 #include "PPCInstrBuilder.h"
 #include "PPCInstrInfo.h"
@@ -32,6 +33,7 @@ using namespace llvm;
 #define DEBUG_TYPE "framelowering"
 STATISTIC(NumPESpillVSR, "Number of spills to vector in prologue");
 STATISTIC(NumPEReloadVSR, "Number of reloads from vector in epilogue");
+STATISTIC(NumPrologProbed, "Number of prologues probed");
 
 static cl::opt<bool>
 EnablePEVectorSpills("ppc-enable-pe-vector-spills",
@@ -48,7 +50,7 @@ static const MCPhysReg VRRegNo[] = {
 };
 
 static unsigned computeReturnSaveOffset(const PPCSubtarget &STI) {
-  if (STI.isDarwinABI() || STI.isAIXABI())
+  if (STI.isAIXABI())
     return STI.isPPC64() ? 16 : 8;
   // SVR4 ABI:
   return STI.isPPC64() ? 16 : 4;
@@ -61,20 +63,12 @@ static unsigned computeTOCSaveOffset(const PPCSubtarget &STI) {
 }
 
 static unsigned computeFramePointerSaveOffset(const PPCSubtarget &STI) {
-  // For the Darwin ABI:
-  // We cannot use the TOC save slot (offset +20) in the PowerPC linkage area
-  // for saving the frame pointer (if needed.)  While the published ABI has
-  // not used this slot since at least MacOSX 10.2, there is older code
-  // around that does use it, and that needs to continue to work.
-  if (STI.isDarwinABI())
-    return STI.isPPC64() ? -8U : -4U;
-
-  // SVR4 ABI: First slot in the general register save area.
+  // First slot in the general register save area.
   return STI.isPPC64() ? -8U : -4U;
 }
 
 static unsigned computeLinkageSize(const PPCSubtarget &STI) {
-  if ((STI.isDarwinABI() || STI.isAIXABI()) || STI.isPPC64())
+  if (STI.isAIXABI() || STI.isPPC64())
     return (STI.isELFv2ABI() ? 4 : 6) * (STI.isPPC64() ? 8 : 4);
 
   // 32-bit SVR4 ABI:
@@ -82,18 +76,16 @@ static unsigned computeLinkageSize(const PPCSubtarget &STI) {
 }
 
 static unsigned computeBasePointerSaveOffset(const PPCSubtarget &STI) {
-  if (STI.isDarwinABI())
-    return STI.isPPC64() ? -16U : -8U;
+  // Third slot in the general purpose register save area.
+  if (STI.is32BitELFABI() && STI.getTargetMachine().isPositionIndependent())
+    return -12U;
 
-  // SVR4 ABI: First slot in the general register save area.
-  return STI.isPPC64()
-             ? -16U
-             : STI.getTargetMachine().isPositionIndependent() ? -12U : -8U;
+  // Second slot in the general purpose register save area.
+  return STI.isPPC64() ? -16U : -8U;
 }
 
-static unsigned computeCRSaveOffset() {
-  // The condition register save offset needs to be updated for AIX PPC32.
-  return 8;
+static unsigned computeCRSaveOffset(const PPCSubtarget &STI) {
+  return (STI.isAIXABI() && !STI.isPPC64()) ? 4 : 8;
 }
 
 PPCFrameLowering::PPCFrameLowering(const PPCSubtarget &STI)
@@ -104,71 +96,97 @@ PPCFrameLowering::PPCFrameLowering(const PPCSubtarget &STI)
       FramePointerSaveOffset(computeFramePointerSaveOffset(Subtarget)),
       LinkageSize(computeLinkageSize(Subtarget)),
       BasePointerSaveOffset(computeBasePointerSaveOffset(Subtarget)),
-      CRSaveOffset(computeCRSaveOffset()) {}
+      CRSaveOffset(computeCRSaveOffset(Subtarget)) {}
 
 // With the SVR4 ABI, callee-saved registers have fixed offsets on the stack.
 const PPCFrameLowering::SpillSlot *PPCFrameLowering::getCalleeSavedSpillSlots(
     unsigned &NumEntries) const {
-  if (Subtarget.isDarwinABI()) {
-    NumEntries = 1;
-    if (Subtarget.isPPC64()) {
-      static const SpillSlot darwin64Offsets = {PPC::X31, -8};
-      return &darwin64Offsets;
-    } else {
-      static const SpillSlot darwinOffsets = {PPC::R31, -4};
-      return &darwinOffsets;
-    }
-  }
 
-  // Early exit if not using the SVR4 ABI.
-  if (!Subtarget.isSVR4ABI()) {
-    NumEntries = 0;
-    return nullptr;
-  }
+// Floating-point register save area offsets.
+#define CALLEE_SAVED_FPRS \
+      {PPC::F31, -8},     \
+      {PPC::F30, -16},    \
+      {PPC::F29, -24},    \
+      {PPC::F28, -32},    \
+      {PPC::F27, -40},    \
+      {PPC::F26, -48},    \
+      {PPC::F25, -56},    \
+      {PPC::F24, -64},    \
+      {PPC::F23, -72},    \
+      {PPC::F22, -80},    \
+      {PPC::F21, -88},    \
+      {PPC::F20, -96},    \
+      {PPC::F19, -104},   \
+      {PPC::F18, -112},   \
+      {PPC::F17, -120},   \
+      {PPC::F16, -128},   \
+      {PPC::F15, -136},   \
+      {PPC::F14, -144}
+
+// 32-bit general purpose register save area offsets shared by ELF and
+// AIX. AIX has an extra CSR with r13.
+#define CALLEE_SAVED_GPRS32 \
+      {PPC::R31, -4},       \
+      {PPC::R30, -8},       \
+      {PPC::R29, -12},      \
+      {PPC::R28, -16},      \
+      {PPC::R27, -20},      \
+      {PPC::R26, -24},      \
+      {PPC::R25, -28},      \
+      {PPC::R24, -32},      \
+      {PPC::R23, -36},      \
+      {PPC::R22, -40},      \
+      {PPC::R21, -44},      \
+      {PPC::R20, -48},      \
+      {PPC::R19, -52},      \
+      {PPC::R18, -56},      \
+      {PPC::R17, -60},      \
+      {PPC::R16, -64},      \
+      {PPC::R15, -68},      \
+      {PPC::R14, -72}
+
+// 64-bit general purpose register save area offsets.
+#define CALLEE_SAVED_GPRS64 \
+      {PPC::X31, -8},       \
+      {PPC::X30, -16},      \
+      {PPC::X29, -24},      \
+      {PPC::X28, -32},      \
+      {PPC::X27, -40},      \
+      {PPC::X26, -48},      \
+      {PPC::X25, -56},      \
+      {PPC::X24, -64},      \
+      {PPC::X23, -72},      \
+      {PPC::X22, -80},      \
+      {PPC::X21, -88},      \
+      {PPC::X20, -96},      \
+      {PPC::X19, -104},     \
+      {PPC::X18, -112},     \
+      {PPC::X17, -120},     \
+      {PPC::X16, -128},     \
+      {PPC::X15, -136},     \
+      {PPC::X14, -144}
+
+// Vector register save area offsets.
+#define CALLEE_SAVED_VRS \
+      {PPC::V31, -16},   \
+      {PPC::V30, -32},   \
+      {PPC::V29, -48},   \
+      {PPC::V28, -64},   \
+      {PPC::V27, -80},   \
+      {PPC::V26, -96},   \
+      {PPC::V25, -112},  \
+      {PPC::V24, -128},  \
+      {PPC::V23, -144},  \
+      {PPC::V22, -160},  \
+      {PPC::V21, -176},  \
+      {PPC::V20, -192}
 
   // Note that the offsets here overlap, but this is fixed up in
   // processFunctionBeforeFrameFinalized.
 
-  static const SpillSlot Offsets[] = {
-      // Floating-point register save area offsets.
-      {PPC::F31, -8},
-      {PPC::F30, -16},
-      {PPC::F29, -24},
-      {PPC::F28, -32},
-      {PPC::F27, -40},
-      {PPC::F26, -48},
-      {PPC::F25, -56},
-      {PPC::F24, -64},
-      {PPC::F23, -72},
-      {PPC::F22, -80},
-      {PPC::F21, -88},
-      {PPC::F20, -96},
-      {PPC::F19, -104},
-      {PPC::F18, -112},
-      {PPC::F17, -120},
-      {PPC::F16, -128},
-      {PPC::F15, -136},
-      {PPC::F14, -144},
-
-      // General register save area offsets.
-      {PPC::R31, -4},
-      {PPC::R30, -8},
-      {PPC::R29, -12},
-      {PPC::R28, -16},
-      {PPC::R27, -20},
-      {PPC::R26, -24},
-      {PPC::R25, -28},
-      {PPC::R24, -32},
-      {PPC::R23, -36},
-      {PPC::R22, -40},
-      {PPC::R21, -44},
-      {PPC::R20, -48},
-      {PPC::R19, -52},
-      {PPC::R18, -56},
-      {PPC::R17, -60},
-      {PPC::R16, -64},
-      {PPC::R15, -68},
-      {PPC::R14, -72},
+  static const SpillSlot ELFOffsets32[] = {
+      CALLEE_SAVED_FPRS,
+      CALLEE_SAVED_GPRS32,
 
       // CR save area offset.  We map each of the nonvolatile CR fields
       // to the slot for CR2, which is the first of the nonvolatile CR
@@ -179,19 +197,7 @@ const PPCFrameLowering::SpillSlot *PPCFrameLowering::getCalleeSavedSpillSlots(
       // VRSAVE save area offset.
       {PPC::VRSAVE, -4},
 
-      // Vector register save area
-      {PPC::V31, -16},
-      {PPC::V30, -32},
-      {PPC::V29, -48},
-      {PPC::V28, -64},
-      {PPC::V27, -80},
-      {PPC::V26, -96},
-      {PPC::V25, -112},
-      {PPC::V24, -128},
-      {PPC::V23, -144},
-      {PPC::V22, -160},
-      {PPC::V21, -176},
-      {PPC::V20, -192},
+      CALLEE_SAVED_VRS,
 
       // SPE register save area (overlaps Vector save area).
       {PPC::S31, -8},
@@ -213,73 +219,48 @@ const PPCFrameLowering::SpillSlot *PPCFrameLowering::getCalleeSavedSpillSlots(
       {PPC::S15, -136},
       {PPC::S14, -144}};
 
-  static const SpillSlot Offsets64[] = {
-      // Floating-point register save area offsets.
-      {PPC::F31, -8},
-      {PPC::F30, -16},
-      {PPC::F29, -24},
-      {PPC::F28, -32},
-      {PPC::F27, -40},
-      {PPC::F26, -48},
-      {PPC::F25, -56},
-      {PPC::F24, -64},
-      {PPC::F23, -72},
-      {PPC::F22, -80},
-      {PPC::F21, -88},
-      {PPC::F20, -96},
-      {PPC::F19, -104},
-      {PPC::F18, -112},
-      {PPC::F17, -120},
-      {PPC::F16, -128},
-      {PPC::F15, -136},
-      {PPC::F14, -144},
-
-      // General register save area offsets.
-      {PPC::X31, -8},
-      {PPC::X30, -16},
-      {PPC::X29, -24},
-      {PPC::X28, -32},
-      {PPC::X27, -40},
-      {PPC::X26, -48},
-      {PPC::X25, -56},
-      {PPC::X24, -64},
-      {PPC::X23, -72},
-      {PPC::X22, -80},
-      {PPC::X21, -88},
-      {PPC::X20, -96},
-      {PPC::X19, -104},
-      {PPC::X18, -112},
-      {PPC::X17, -120},
-      {PPC::X16, -128},
-      {PPC::X15, -136},
-      {PPC::X14, -144},
+  static const SpillSlot ELFOffsets64[] = {
+      CALLEE_SAVED_FPRS,
+      CALLEE_SAVED_GPRS64,
 
       // VRSAVE save area offset.
       {PPC::VRSAVE, -4},
+      CALLEE_SAVED_VRS
+  };
 
-      // Vector register save area
-      {PPC::V31, -16},
-      {PPC::V30, -32},
-      {PPC::V29, -48},
-      {PPC::V28, -64},
-      {PPC::V27, -80},
-      {PPC::V26, -96},
-      {PPC::V25, -112},
-      {PPC::V24, -128},
-      {PPC::V23, -144},
-      {PPC::V22, -160},
-      {PPC::V21, -176},
-      {PPC::V20, -192}};
+  static const SpillSlot AIXOffsets32[] = {
+      CALLEE_SAVED_FPRS,
+      CALLEE_SAVED_GPRS32,
+      // Add AIX's extra CSR.
+      {PPC::R13, -76},
+      // TODO: Update when we add vector support for AIX.
+  };
 
-  if (Subtarget.isPPC64()) {
-    NumEntries = array_lengthof(Offsets64);
+  static const SpillSlot AIXOffsets64[] = {
+      CALLEE_SAVED_FPRS,
+      CALLEE_SAVED_GPRS64,
+      // TODO: Update when we add vector support for AIX.
+  };
 
-    return Offsets64;
-  } else {
-    NumEntries = array_lengthof(Offsets);
+  if (Subtarget.is64BitELFABI()) {
+    NumEntries = array_lengthof(ELFOffsets64);
+    return ELFOffsets64;
+  }
+
+  if (Subtarget.is32BitELFABI()) {
+    NumEntries = array_lengthof(ELFOffsets32);
+    return ELFOffsets32;
+  }
+
+  assert(Subtarget.isAIXABI() && "Unexpected ABI.");
 
-    return Offsets;
+  if (Subtarget.isPPC64()) {
+    NumEntries = array_lengthof(AIXOffsets64);
+    return AIXOffsets64;
   }
+
+  NumEntries = array_lengthof(AIXOffsets32);
+  return AIXOffsets32;
 }
 
 /// RemoveVRSaveCode - We have found that this function does not need any code
@@ -480,9 +461,9 @@ PPCFrameLowering::determineFrameLayout(const MachineFunction &MF,
     UseEstimate ? MFI.estimateStackSize(MF) : MFI.getStackSize();
 
   // Get stack alignments. The frame must be aligned to the greatest of these:
-  unsigned TargetAlign = getStackAlignment(); // alignment required per the ABI
-  unsigned MaxAlign = MFI.getMaxAlignment(); // algmt required by data in frame
-  unsigned AlignMask = std::max(MaxAlign, TargetAlign) - 1;
+  Align TargetAlign = getStackAlign(); // alignment required per the ABI
+  Align MaxAlign = MFI.getMaxAlign();  // algmt required by data in frame
+  Align Alignment = std::max(TargetAlign, MaxAlign);
 
   const PPCRegisterInfo *RegInfo = Subtarget.getRegisterInfo();
 
@@ -514,7 +495,7 @@ PPCFrameLowering::determineFrameLayout(const MachineFunction &MF,
   // If we have dynamic alloca then maxCallFrameSize needs to be aligned so
   // that allocations will be aligned.
   if (MFI.hasVarSizedObjects())
-    maxCallFrameSize = (maxCallFrameSize + AlignMask) & ~AlignMask;
+    maxCallFrameSize = alignTo(maxCallFrameSize, Alignment);
 
   // Update the new max call frame size if the caller passes in a valid pointer.
   if (NewMaxCallFrameSize)
@@ -524,7 +505,7 @@ PPCFrameLowering::determineFrameLayout(const MachineFunction &MF,
   FrameSize += maxCallFrameSize;
 
   // Make sure the frame is aligned.
-  FrameSize = (FrameSize + AlignMask) & ~AlignMask;
+  FrameSize = alignTo(FrameSize, Alignment);
 
   return FrameSize;
 }
@@ -614,11 +595,11 @@ bool
 PPCFrameLowering::findScratchRegister(MachineBasicBlock *MBB,
                                       bool UseAtEnd,
                                       bool TwoUniqueRegsRequired,
-                                      unsigned *SR1,
-                                      unsigned *SR2) const {
+                                      Register *SR1,
+                                      Register *SR2) const {
   RegScavenger RS;
-  unsigned R0 =  Subtarget.isPPC64() ? PPC::X0 : PPC::R0;
-  unsigned R12 = Subtarget.isPPC64() ? PPC::X12 : PPC::R12;
+  Register R0 =  Subtarget.isPPC64() ? PPC::X0 : PPC::R0;
+  Register R12 = Subtarget.isPPC64() ? PPC::X12 : PPC::R12;
 
   // Set the defaults for the two scratch registers.
   if (SR1)
@@ -685,7 +666,7 @@ PPCFrameLowering::findScratchRegister(MachineBasicBlock *MBB,
     if (SecondScratchReg != -1)
       *SR2 = SecondScratchReg;
     else
-      *SR2 = TwoUniqueRegsRequired ? (unsigned)PPC::NoRegister : *SR1;
+      *SR2 = TwoUniqueRegsRequired ? Register() : *SR1;
   }
 
   // Now that we've done our best to provide both registers, double check
@@ -710,7 +691,7 @@ PPCFrameLowering::twoUniqueScratchRegsRequired(MachineBasicBlock *MBB) const {
   int NegFrameSize = -FrameSize;
   bool IsLargeFrame = !isInt<16>(NegFrameSize);
   MachineFrameInfo &MFI = MF.getFrameInfo();
-  unsigned MaxAlign = MFI.getMaxAlignment();
+  Align MaxAlign = MFI.getMaxAlign();
   bool HasRedZone = Subtarget.isPPC64() || !Subtarget.isSVR4ABI();
 
   return (IsLargeFrame || !HasRedZone) && HasBP && MaxAlign > 1;
@@ -779,11 +760,13 @@ void PPCFrameLowering::emitPrologue(MachineFunction &MF,
   MachineFrameInfo &MFI = MF.getFrameInfo();
   const PPCInstrInfo &TII = *Subtarget.getInstrInfo();
   const PPCRegisterInfo *RegInfo = Subtarget.getRegisterInfo();
+  const PPCTargetLowering &TLI = *Subtarget.getTargetLowering();
 
   MachineModuleInfo &MMI = MF.getMMI();
   const MCRegisterInfo *MRI = MMI.getContext().getRegisterInfo();
   DebugLoc dl;
-  bool needsCFI = MF.needsFrameMoves();
+  // AIX assembler does not support cfi directives.
+  const bool needsCFI = MF.needsFrameMoves() && !Subtarget.isAIXABI();
 
   // Get processor type.
   bool isPPC64 = Subtarget.isPPC64();
@@ -791,8 +774,7 @@ void PPCFrameLowering::emitPrologue(MachineFunction &MF,
   bool isSVR4ABI = Subtarget.isSVR4ABI();
   bool isAIXABI = Subtarget.isAIXABI();
   bool isELFv2ABI = Subtarget.isELFv2ABI();
-  assert((Subtarget.isDarwinABI() || isSVR4ABI || isAIXABI) &&
-         "Unsupported PPC ABI.");
+  assert((isSVR4ABI || isAIXABI) && "Unsupported PPC ABI.");
 
   // Scan the prolog, looking for an UPDATE_VRSAVE instruction.  If we find it,
   // process it.
@@ -822,20 +804,20 @@ void PPCFrameLowering::emitPrologue(MachineFunction &MF,
   PPCFunctionInfo *FI = MF.getInfo<PPCFunctionInfo>();
   bool MustSaveLR = FI->mustSaveLR();
   bool MustSaveTOC = FI->mustSaveTOC();
-  const SmallVectorImpl<unsigned> &MustSaveCRs = FI->getMustSaveCRs();
+  const SmallVectorImpl<Register> &MustSaveCRs = FI->getMustSaveCRs();
   bool MustSaveCR = !MustSaveCRs.empty();
   // Do we have a frame pointer and/or base pointer for this function?
   bool HasFP = hasFP(MF);
   bool HasBP = RegInfo->hasBasePointer(MF);
   bool HasRedZone = isPPC64 || !isSVR4ABI;
 
-  unsigned SPReg       = isPPC64 ? PPC::X1  : PPC::R1;
+  Register SPReg       = isPPC64 ? PPC::X1  : PPC::R1;
   Register BPReg = RegInfo->getBaseRegister(MF);
-  unsigned FPReg       = isPPC64 ? PPC::X31 : PPC::R31;
-  unsigned LRReg       = isPPC64 ? PPC::LR8 : PPC::LR;
-  unsigned TOCReg      = isPPC64 ? PPC::X2 :  PPC::R2;
-  unsigned ScratchReg  = 0;
-  unsigned TempReg     = isPPC64 ? PPC::X12 : PPC::R12; // another scratch reg
+  Register FPReg       = isPPC64 ? PPC::X31 : PPC::R31;
+  Register LRReg       = isPPC64 ? PPC::LR8 : PPC::LR;
+  Register TOCReg      = isPPC64 ? PPC::X2 :  PPC::R2;
+  Register ScratchReg;
+  Register TempReg     = isPPC64 ? PPC::X12 : PPC::R12; // another scratch reg
   //  ...(R12/X12 is volatile in both Darwin & SVR4, & can't be a function arg.)
   const MCInstrDesc& MFLRInst = TII.get(isPPC64 ? PPC::MFLR8
                                                 : PPC::MFLR );
@@ -855,6 +837,9 @@ void PPCFrameLowering::emitPrologue(MachineFunction &MF,
                                                             : PPC::SUBFC);
   const MCInstrDesc& SubtractImmCarryingInst = TII.get(isPPC64 ? PPC::SUBFIC8
                                                                : PPC::SUBFIC);
+  const MCInstrDesc &MoveFromCondRegInst = TII.get(isPPC64 ? PPC::MFCR8
+                                                           : PPC::MFCR);
+  const MCInstrDesc &StoreWordInst = TII.get(isPPC64 ? PPC::STW8 : PPC::STW);
 
   // Regarding this assert: Even though LR is saved in the caller's frame (i.e.,
   // LROffset is positive), that slot is callee-owned. Because PPC32 SVR4 has no
@@ -864,9 +849,12 @@ void PPCFrameLowering::emitPrologue(MachineFunction &MF,
          "FrameSize must be >0 to save/restore the FP or LR for 32-bit SVR4.");
 
   // Using the same bool variable as below to suppress compiler warnings.
-  bool SingleScratchReg =
-    findScratchRegister(&MBB, false, twoUniqueScratchRegsRequired(&MBB),
-                        &ScratchReg, &TempReg);
+  // Stack probe requires two scratch registers, one for old sp, one for large
+  // frame and large probe size.
+  bool SingleScratchReg = findScratchRegister(
+      &MBB, false,
+      twoUniqueScratchRegsRequired(&MBB) || TLI.hasInlineStackProbe(MF),
+      &ScratchReg, &TempReg);
   assert(SingleScratchReg &&
          "Required number of registers not available in this block");
 
@@ -907,21 +895,14 @@ void PPCFrameLowering::emitPrologue(MachineFunction &MF,
   }
 
   // Get stack alignments.
-  unsigned MaxAlign = MFI.getMaxAlignment();
+  Align MaxAlign = MFI.getMaxAlign();
   if (HasBP && MaxAlign > 1)
-    assert(isPowerOf2_32(MaxAlign) && isInt<16>(MaxAlign) &&
-           "Invalid alignment!");
+    assert(Log2(MaxAlign) < 16 && "Invalid alignment!");
 
   // Frames of 32KB & larger require special handling because they cannot be
   // indexed into with a simple STDU/STWU/STD/STW immediate offset operand.
   bool isLargeFrame = !isInt<16>(NegFrameSize);
 
-  assert((isPPC64 || !MustSaveCR) &&
-         "Prologue CR saving supported only in 64-bit mode");
-
-  if (MustSaveCR && isAIXABI)
-    report_fatal_error("Prologue CR saving is unimplemented on AIX.");
-
   // Check if we can move the stack update instruction (stdu) down the prologue
   // past the callee saves. Hopefully this will avoid the situation where the
   // saves are waiting for the update on the store with update to complete.
@@ -961,49 +942,42 @@ void PPCFrameLowering::emitPrologue(MachineFunction &MF,
     }
   }
 
-  // If we need to spill the CR and the LR but we don't have two separate
-  // registers available, we must spill them one at a time
-  if (MustSaveCR && SingleScratchReg && MustSaveLR) {
+  // Where in the prologue we move the CR fields depends on how many scratch
+  // registers we have, and if we need to save the link register or not. This
+  // lambda is to avoid duplicating the logic in 2 places.
+  auto BuildMoveFromCR = [&]() {
+    if (isELFv2ABI && MustSaveCRs.size() == 1) {
     // In the ELFv2 ABI, we are not required to save all CR fields.
-    // If only one or two CR fields are clobbered, it is more efficient to use
-    // mfocrf to selectively save just those fields, because mfocrf has short
+    // If only one CR field is clobbered, it is more efficient to use
+    // mfocrf to selectively save just that field, because mfocrf has short
     // latency compares to mfcr.
-    unsigned MfcrOpcode = PPC::MFCR8;
-    unsigned CrState = RegState::ImplicitKill;
-    if (isELFv2ABI && MustSaveCRs.size() == 1) {
-      MfcrOpcode = PPC::MFOCRF8;
-      CrState = RegState::Kill;
+      assert(isPPC64 && "V2 ABI is 64-bit only.");
+      MachineInstrBuilder MIB =
+          BuildMI(MBB, MBBI, dl, TII.get(PPC::MFOCRF8), TempReg);
+      MIB.addReg(MustSaveCRs[0], RegState::Kill);
+    } else {
+      MachineInstrBuilder MIB =
+          BuildMI(MBB, MBBI, dl, MoveFromCondRegInst, TempReg);
+      for (unsigned CRfield : MustSaveCRs)
+        MIB.addReg(CRfield, RegState::ImplicitKill);
     }
-    MachineInstrBuilder MIB =
-      BuildMI(MBB, MBBI, dl, TII.get(MfcrOpcode), TempReg);
-    for (unsigned i = 0, e = MustSaveCRs.size(); i != e; ++i)
-      MIB.addReg(MustSaveCRs[i], CrState);
-    BuildMI(MBB, MBBI, dl, TII.get(PPC::STW8))
-      .addReg(TempReg, getKillRegState(true))
-      .addImm(getCRSaveOffset())
-      .addReg(SPReg);
+  };
+
+  // If we need to spill the CR and the LR but we don't have two separate
+  // registers available, we must spill them one at a time
+  if (MustSaveCR && SingleScratchReg && MustSaveLR) {
+    BuildMoveFromCR();
+    BuildMI(MBB, MBBI, dl, StoreWordInst)
+        .addReg(TempReg, getKillRegState(true))
+        .addImm(CRSaveOffset)
+        .addReg(SPReg);
   }
 
   if (MustSaveLR)
     BuildMI(MBB, MBBI, dl, MFLRInst, ScratchReg);
 
-  if (MustSaveCR &&
-      !(SingleScratchReg && MustSaveLR)) { // will only occur for PPC64
-    // In the ELFv2 ABI, we are not required to save all CR fields.
-    // If only one or two CR fields are clobbered, it is more efficient to use
-    // mfocrf to selectively save just those fields, because mfocrf has short
-    // latency compares to mfcr.
-    unsigned MfcrOpcode = PPC::MFCR8;
-    unsigned CrState = RegState::ImplicitKill;
-    if (isELFv2ABI && MustSaveCRs.size() == 1) {
-      MfcrOpcode = PPC::MFOCRF8;
-      CrState = RegState::Kill;
-    }
-    MachineInstrBuilder MIB =
-      BuildMI(MBB, MBBI, dl, TII.get(MfcrOpcode), TempReg);
-    for (unsigned i = 0, e = MustSaveCRs.size(); i != e; ++i)
-      MIB.addReg(MustSaveCRs[i], CrState);
-  }
+  if (MustSaveCR && !(SingleScratchReg && MustSaveLR))
+    BuildMoveFromCR();
 
   if (HasRedZone) {
     if (HasFP)
@@ -1030,11 +1004,11 @@ void PPCFrameLowering::emitPrologue(MachineFunction &MF,
       .addReg(SPReg);
 
   if (MustSaveCR &&
-      !(SingleScratchReg && MustSaveLR)) { // will only occur for PPC64
+      !(SingleScratchReg && MustSaveLR)) {
     assert(HasRedZone && "A red zone is always available on PPC64");
-    BuildMI(MBB, MBBI, dl, TII.get(PPC::STW8))
+    BuildMI(MBB, MBBI, dl, StoreWordInst)
       .addReg(TempReg, getKillRegState(true))
-      .addImm(getCRSaveOffset())
+      .addImm(CRSaveOffset)
       .addReg(SPReg);
   }
 
@@ -1056,58 +1030,81 @@ void PPCFrameLowering::emitPrologue(MachineFunction &MF,
   // the negated frame size will be placed in ScratchReg.
   bool HasSTUX = false;
 
-  // This condition must be kept in sync with canUseAsPrologue.
-  if (HasBP && MaxAlign > 1) {
-    if (isPPC64)
-      BuildMI(MBB, MBBI, dl, TII.get(PPC::RLDICL), ScratchReg)
-        .addReg(SPReg)
-        .addImm(0)
-        .addImm(64 - Log2_32(MaxAlign));
-    else // PPC32...
-      BuildMI(MBB, MBBI, dl, TII.get(PPC::RLWINM), ScratchReg)
-        .addReg(SPReg)
-        .addImm(0)
-        .addImm(32 - Log2_32(MaxAlign))
-        .addImm(31);
-    if (!isLargeFrame) {
-      BuildMI(MBB, MBBI, dl, SubtractImmCarryingInst, ScratchReg)
-        .addReg(ScratchReg, RegState::Kill)
+  // If FrameSize <= TLI.getStackProbeSize(MF), as POWER ABI requires backchain
+  // pointer is always stored at SP, we will get a free probe due to an essential
+  // STU(X) instruction.
+  if (TLI.hasInlineStackProbe(MF) && FrameSize > TLI.getStackProbeSize(MF)) {
+    // To be consistent with other targets, a pseudo instruction is emitted and
+    // will be later expanded in `inlineStackProbe`.
+    BuildMI(MBB, MBBI, dl,
+            TII.get(isPPC64 ? PPC::PROBED_STACKALLOC_64
+                            : PPC::PROBED_STACKALLOC_32))
+        .addDef(ScratchReg)
+        .addDef(TempReg) // TempReg stores the old sp.
         .addImm(NegFrameSize);
-    } else {
-      assert(!SingleScratchReg && "Only a single scratch reg available");
-      BuildMI(MBB, MBBI, dl, LoadImmShiftedInst, TempReg)
-        .addImm(NegFrameSize >> 16);
-      BuildMI(MBB, MBBI, dl, OrImmInst, TempReg)
-        .addReg(TempReg, RegState::Kill)
-        .addImm(NegFrameSize & 0xFFFF);
-      BuildMI(MBB, MBBI, dl, SubtractCarryingInst, ScratchReg)
-        .addReg(ScratchReg, RegState::Kill)
-        .addReg(TempReg, RegState::Kill);
+    // FIXME: HasSTUX is only read if HasRedZone is not set, in such case, we
+    // update the ScratchReg to meet the assumption that ScratchReg contains
+    // the NegFrameSize. This solution is rather tricky.
+    if (!HasRedZone) {
+      BuildMI(MBB, MBBI, dl, TII.get(PPC::SUBF), ScratchReg)
+          .addReg(TempReg)
+          .addReg(SPReg);
+      HasSTUX = true;
     }
+  } else {
+    // This condition must be kept in sync with canUseAsPrologue.
+    if (HasBP && MaxAlign > 1) {
+      if (isPPC64)
+        BuildMI(MBB, MBBI, dl, TII.get(PPC::RLDICL), ScratchReg)
+            .addReg(SPReg)
+            .addImm(0)
+            .addImm(64 - Log2(MaxAlign));
+      else // PPC32...
+        BuildMI(MBB, MBBI, dl, TII.get(PPC::RLWINM), ScratchReg)
+            .addReg(SPReg)
+            .addImm(0)
+            .addImm(32 - Log2(MaxAlign))
+            .addImm(31);
+      if (!isLargeFrame) {
+        BuildMI(MBB, MBBI, dl, SubtractImmCarryingInst, ScratchReg)
+            .addReg(ScratchReg, RegState::Kill)
+            .addImm(NegFrameSize);
+      } else {
+        assert(!SingleScratchReg && "Only a single scratch reg available");
+        BuildMI(MBB, MBBI, dl, LoadImmShiftedInst, TempReg)
+            .addImm(NegFrameSize >> 16);
+        BuildMI(MBB, MBBI, dl, OrImmInst, TempReg)
+            .addReg(TempReg, RegState::Kill)
+            .addImm(NegFrameSize & 0xFFFF);
+        BuildMI(MBB, MBBI, dl, SubtractCarryingInst, ScratchReg)
+            .addReg(ScratchReg, RegState::Kill)
+            .addReg(TempReg, RegState::Kill);
+      }
 
-    BuildMI(MBB, MBBI, dl, StoreUpdtIdxInst, SPReg)
-      .addReg(SPReg, RegState::Kill)
-      .addReg(SPReg)
-      .addReg(ScratchReg);
-    HasSTUX = true;
+      BuildMI(MBB, MBBI, dl, StoreUpdtIdxInst, SPReg)
+          .addReg(SPReg, RegState::Kill)
+          .addReg(SPReg)
+          .addReg(ScratchReg);
+      HasSTUX = true;
 
-  } else if (!isLargeFrame) {
-    BuildMI(MBB, StackUpdateLoc, dl, StoreUpdtInst, SPReg)
-      .addReg(SPReg)
-      .addImm(NegFrameSize)
-      .addReg(SPReg);
+    } else if (!isLargeFrame) {
+      BuildMI(MBB, StackUpdateLoc, dl, StoreUpdtInst, SPReg)
+          .addReg(SPReg)
+          .addImm(NegFrameSize)
+          .addReg(SPReg);
 
-  } else {
-    BuildMI(MBB, MBBI, dl, LoadImmShiftedInst, ScratchReg)
-      .addImm(NegFrameSize >> 16);
-    BuildMI(MBB, MBBI, dl, OrImmInst, ScratchReg)
-      .addReg(ScratchReg, RegState::Kill)
-      .addImm(NegFrameSize & 0xFFFF);
-    BuildMI(MBB, MBBI, dl, StoreUpdtIdxInst, SPReg)
-      .addReg(SPReg, RegState::Kill)
-      .addReg(SPReg)
-      .addReg(ScratchReg);
-    HasSTUX = true;
+    } else {
+      BuildMI(MBB, MBBI, dl, LoadImmShiftedInst, ScratchReg)
+          .addImm(NegFrameSize >> 16);
+      BuildMI(MBB, MBBI, dl, OrImmInst, ScratchReg)
+          .addReg(ScratchReg, RegState::Kill)
+          .addImm(NegFrameSize & 0xFFFF);
+      BuildMI(MBB, MBBI, dl, StoreUpdtIdxInst, SPReg)
+          .addReg(SPReg, RegState::Kill)
+          .addReg(SPReg)
+          .addReg(ScratchReg);
+      HasSTUX = true;
+    }
   }
 
   // Save the TOC register after the stack pointer update if a prologue TOC
@@ -1248,7 +1245,7 @@ void PPCFrameLowering::emitPrologue(MachineFunction &MF,
       // Adjust the definition of CFA to account for the change in SP.
       assert(NegFrameSize);
       CFIIndex = MF.addFrameInst(
-          MCCFIInstruction::createDefCfaOffset(nullptr, NegFrameSize));
+          MCCFIInstruction::cfiDefCfaOffset(nullptr, -NegFrameSize));
     }
     BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION))
         .addCFIIndex(CFIIndex);
@@ -1338,7 +1335,7 @@ void PPCFrameLowering::emitPrologue(MachineFunction &MF,
         // actually saved gets its own CFI record.
         unsigned CRReg = isELFv2ABI? Reg : (unsigned) PPC::CR2;
         unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::createOffset(
-            nullptr, MRI->getDwarfRegNum(CRReg, true), getCRSaveOffset()));
+            nullptr, MRI->getDwarfRegNum(CRReg, true), CRSaveOffset));
         BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION))
             .addCFIIndex(CFIIndex);
         continue;
@@ -1368,6 +1365,174 @@ void PPCFrameLowering::emitPrologue(MachineFunction &MF,
   }
 }
 
+void PPCFrameLowering::inlineStackProbe(MachineFunction &MF,
+                                        MachineBasicBlock &PrologMBB) const {
+  // TODO: Generate CFI instructions.
+  bool isPPC64 = Subtarget.isPPC64();
+  const PPCTargetLowering &TLI = *Subtarget.getTargetLowering();
+  const PPCInstrInfo &TII = *Subtarget.getInstrInfo();
+  MachineFrameInfo &MFI = MF.getFrameInfo();
+  MachineModuleInfo &MMI = MF.getMMI();
+  const MCRegisterInfo *MRI = MMI.getContext().getRegisterInfo();
+  // AIX assembler does not support cfi directives.
+  const bool needsCFI = MF.needsFrameMoves() && !Subtarget.isAIXABI();
+  auto StackAllocMIPos = llvm::find_if(PrologMBB, [](MachineInstr &MI) {
+    int Opc = MI.getOpcode();
+    return Opc == PPC::PROBED_STACKALLOC_64 || Opc == PPC::PROBED_STACKALLOC_32;
+  });
+  if (StackAllocMIPos == PrologMBB.end())
+    return;
+  const BasicBlock *ProbedBB = PrologMBB.getBasicBlock();
+  DebugLoc DL = PrologMBB.findDebugLoc(StackAllocMIPos);
+  MachineInstr &MI = *StackAllocMIPos;
+  int64_t NegFrameSize = MI.getOperand(2).getImm();
+  int64_t NegProbeSize = -(int64_t)TLI.getStackProbeSize(MF);
+  assert(isInt<32>(NegProbeSize) && "Unhandled probe size");
+  int64_t NumBlocks = NegFrameSize / NegProbeSize;
+  int64_t NegResidualSize = NegFrameSize % NegProbeSize;
+  Register SPReg = isPPC64 ? PPC::X1 : PPC::R1;
+  Register ScratchReg = MI.getOperand(0).getReg();
+  Register FPReg = MI.getOperand(1).getReg();
+  const PPCRegisterInfo *RegInfo = Subtarget.getRegisterInfo();
+  bool HasBP = RegInfo->hasBasePointer(MF);
+  Align MaxAlign = MFI.getMaxAlign();
+  // Initialize current frame pointer.
+  const MCInstrDesc &CopyInst = TII.get(isPPC64 ? PPC::OR8 : PPC::OR);
+  BuildMI(PrologMBB, {MI}, DL, CopyInst, FPReg).addReg(SPReg).addReg(SPReg);
+  // Subroutines to generate .cfi_* directives.
+  auto buildDefCFAReg = [&](MachineBasicBlock &MBB,
+                            MachineBasicBlock::iterator MBBI, Register Reg) {
+    unsigned RegNum = MRI->getDwarfRegNum(Reg, true);
+    unsigned CFIIndex = MF.addFrameInst(
+        MCCFIInstruction::createDefCfaRegister(nullptr, RegNum));
+    BuildMI(MBB, MBBI, DL, TII.get(TargetOpcode::CFI_INSTRUCTION))
+        .addCFIIndex(CFIIndex);
+  };
+  auto buildDefCFA = [&](MachineBasicBlock &MBB,
+                         MachineBasicBlock::iterator MBBI, Register Reg,
+                         int Offset) {
+    unsigned RegNum = MRI->getDwarfRegNum(Reg, true);
+    unsigned CFIIndex = MBB.getParent()->addFrameInst(
+        MCCFIInstruction::cfiDefCfa(nullptr, RegNum, Offset));
+    BuildMI(MBB, MBBI, DL, TII.get(TargetOpcode::CFI_INSTRUCTION))
+        .addCFIIndex(CFIIndex);
+  };
+  // Subroutine to determine if we can use the Imm as part of d-form.
+  auto CanUseDForm = [](int64_t Imm) { return isInt<16>(Imm) && Imm % 4 == 0; };
+  // Subroutine to materialize the Imm into TempReg.
+  auto MaterializeImm = [&](MachineBasicBlock &MBB,
+                            MachineBasicBlock::iterator MBBI, int64_t Imm,
+                            Register &TempReg) {
+    assert(isInt<32>(Imm) && "Unhandled imm");
+    if (isInt<16>(Imm))
+      BuildMI(MBB, MBBI, DL, TII.get(isPPC64 ? PPC::LI8 : PPC::LI), TempReg)
+          .addImm(Imm);
+    else {
+      BuildMI(MBB, MBBI, DL, TII.get(isPPC64 ? PPC::LIS8 : PPC::LIS), TempReg)
+          .addImm(Imm >> 16);
+      BuildMI(MBB, MBBI, DL, TII.get(isPPC64 ? PPC::ORI8 : PPC::ORI), TempReg)
+          .addReg(TempReg)
+          .addImm(Imm & 0xFFFF);
+    }
+  };
+  // Subroutine to store frame pointer and decrease stack pointer by probe size.
+  auto allocateAndProbe = [&](MachineBasicBlock &MBB,
+                              MachineBasicBlock::iterator MBBI, int64_t NegSize,
+                              Register NegSizeReg, bool UseDForm) {
+    if (UseDForm)
+      BuildMI(MBB, MBBI, DL, TII.get(isPPC64 ? PPC::STDU : PPC::STWU), SPReg)
+          .addReg(FPReg)
+          .addImm(NegSize)
+          .addReg(SPReg);
+    else
+      BuildMI(MBB, MBBI, DL, TII.get(isPPC64 ? PPC::STDUX : PPC::STWUX), SPReg)
+          .addReg(FPReg)
+          .addReg(SPReg)
+          .addReg(NegSizeReg);
+  };
+  // Use FPReg to calculate CFA.
+  if (needsCFI)
+    buildDefCFA(PrologMBB, {MI}, FPReg, 0);
+  // For case HasBP && MaxAlign > 1, we have to align the SP by performing
+  // SP = SP - SP % MaxAlign.
+  if (HasBP && MaxAlign > 1) {
+    if (isPPC64)
+      BuildMI(PrologMBB, {MI}, DL, TII.get(PPC::RLDICL), ScratchReg)
+          .addReg(FPReg)
+          .addImm(0)
+          .addImm(64 - Log2(MaxAlign));
+    else
+      BuildMI(PrologMBB, {MI}, DL, TII.get(PPC::RLWINM), ScratchReg)
+          .addReg(FPReg)
+          .addImm(0)
+          .addImm(32 - Log2(MaxAlign))
+          .addImm(31);
+    BuildMI(PrologMBB, {MI}, DL, TII.get(isPPC64 ? PPC::SUBFC8 : PPC::SUBFC),
+            SPReg)
+        .addReg(ScratchReg)
+        .addReg(SPReg);
+  }
+  // Probe residual part.
+  if (NegResidualSize) {
+    bool ResidualUseDForm = CanUseDForm(NegResidualSize);
+    if (!ResidualUseDForm)
+      MaterializeImm(PrologMBB, {MI}, NegResidualSize, ScratchReg);
+    allocateAndProbe(PrologMBB, {MI}, NegResidualSize, ScratchReg,
+                     ResidualUseDForm);
+  }
+  bool UseDForm = CanUseDForm(NegProbeSize);
+  // If number of blocks is small, just probe them directly.
+  if (NumBlocks < 3) {
+    if (!UseDForm)
+      MaterializeImm(PrologMBB, {MI}, NegProbeSize, ScratchReg);
+    for (int i = 0; i < NumBlocks; ++i)
+      allocateAndProbe(PrologMBB, {MI}, NegProbeSize, ScratchReg, UseDForm);
+    if (needsCFI) {
+      // Restore using SPReg to calculate CFA.
+      buildDefCFAReg(PrologMBB, {MI}, SPReg);
+    }
+  } else {
+    // Since CTR is a volatile register and current shrinkwrap implementation
+    // won't choose an MBB in a loop as the PrologMBB, it's safe to synthesize a
+    // CTR loop to probe.
+    // Calculate trip count and stores it in CTRReg.
+    MaterializeImm(PrologMBB, {MI}, NumBlocks, ScratchReg);
+    BuildMI(PrologMBB, {MI}, DL, TII.get(isPPC64 ? PPC::MTCTR8 : PPC::MTCTR))
+        .addReg(ScratchReg, RegState::Kill);
+    if (!UseDForm)
+      MaterializeImm(PrologMBB, {MI}, NegProbeSize, ScratchReg);
+    // Create MBBs of the loop.
+    MachineFunction::iterator MBBInsertPoint =
+        std::next(PrologMBB.getIterator());
+    MachineBasicBlock *LoopMBB = MF.CreateMachineBasicBlock(ProbedBB);
+    MF.insert(MBBInsertPoint, LoopMBB);
+    MachineBasicBlock *ExitMBB = MF.CreateMachineBasicBlock(ProbedBB);
+    MF.insert(MBBInsertPoint, ExitMBB);
+    // Synthesize the loop body.
+    allocateAndProbe(*LoopMBB, LoopMBB->end(), NegProbeSize, ScratchReg,
+                     UseDForm);
+    BuildMI(LoopMBB, DL, TII.get(isPPC64 ? PPC::BDNZ8 : PPC::BDNZ))
+        .addMBB(LoopMBB);
+    LoopMBB->addSuccessor(ExitMBB);
+    LoopMBB->addSuccessor(LoopMBB);
+    // Synthesize the exit MBB.
+    ExitMBB->splice(ExitMBB->end(), &PrologMBB,
+                    std::next(MachineBasicBlock::iterator(MI)),
+                    PrologMBB.end());
+    ExitMBB->transferSuccessorsAndUpdatePHIs(&PrologMBB);
+    PrologMBB.addSuccessor(LoopMBB);
+    if (needsCFI) {
+      // Restore using SPReg to calculate CFA.
+      buildDefCFAReg(*ExitMBB, ExitMBB->begin(), SPReg);
+    }
+    // Update liveins.
+    recomputeLiveIns(*LoopMBB);
+    recomputeLiveIns(*ExitMBB);
+  }
+  ++NumPrologProbed;
+  MI.eraseFromParent();
+}
+
 void PPCFrameLowering::emitEpilogue(MachineFunction &MF,
                                     MachineBasicBlock &MBB) const {
   MachineBasicBlock::iterator MBBI = MBB.getFirstTerminator();
@@ -1393,18 +1558,18 @@ void PPCFrameLowering::emitEpilogue(MachineFunction &MF,
   // Check if the link register (LR) has been saved.
   PPCFunctionInfo *FI = MF.getInfo<PPCFunctionInfo>();
   bool MustSaveLR = FI->mustSaveLR();
-  const SmallVectorImpl<unsigned> &MustSaveCRs = FI->getMustSaveCRs();
+  const SmallVectorImpl<Register> &MustSaveCRs = FI->getMustSaveCRs();
   bool MustSaveCR = !MustSaveCRs.empty();
   // Do we have a frame pointer and/or base pointer for this function?
   bool HasFP = hasFP(MF);
   bool HasBP = RegInfo->hasBasePointer(MF);
   bool HasRedZone = Subtarget.isPPC64() || !Subtarget.isSVR4ABI();
 
-  unsigned SPReg      = isPPC64 ? PPC::X1  : PPC::R1;
+  Register SPReg      = isPPC64 ? PPC::X1  : PPC::R1;
   Register BPReg = RegInfo->getBaseRegister(MF);
-  unsigned FPReg      = isPPC64 ? PPC::X31 : PPC::R31;
-  unsigned ScratchReg = 0;
-  unsigned TempReg     = isPPC64 ? PPC::X12 : PPC::R12; // another scratch reg
+  Register FPReg      = isPPC64 ? PPC::X31 : PPC::R31;
+  Register ScratchReg;
+  Register TempReg     = isPPC64 ? PPC::X12 : PPC::R12; // another scratch reg
   const MCInstrDesc& MTLRInst = TII.get( isPPC64 ? PPC::MTLR8
                                                  : PPC::MTLR );
   const MCInstrDesc& LoadInst = TII.get( isPPC64 ? PPC::LD
@@ -1419,7 +1584,10 @@ void PPCFrameLowering::emitEpilogue(MachineFunction &MF,
                                                    : PPC::ADDI );
   const MCInstrDesc& AddInst = TII.get( isPPC64 ? PPC::ADD8
                                                 : PPC::ADD4 );
-
+  const MCInstrDesc& LoadWordInst = TII.get( isPPC64 ? PPC::LWZ8
+                                                     : PPC::LWZ);
+  const MCInstrDesc& MoveToCRInst = TII.get( isPPC64 ? PPC::MTOCRF8
+                                                     : PPC::MTOCRF);
   int LROffset = getReturnSaveOffset();
 
   int FPOffset = 0;
@@ -1594,20 +1762,17 @@ void PPCFrameLowering::emitEpilogue(MachineFunction &MF,
   // value (although not the base register). Make sure it is not overwritten
   // too early.
 
-  assert((isPPC64 || !MustSaveCR) &&
-         "Epilogue CR restoring supported only in 64-bit mode");
-
   // If we need to restore both the LR and the CR and we only have one
   // available scratch register, we must do them one at a time.
   if (MustSaveCR && SingleScratchReg && MustSaveLR) {
     // Here TempReg == ScratchReg, and in the absence of red zone ScratchReg
     // is live here.
     assert(HasRedZone && "Expecting red zone");
-    BuildMI(MBB, MBBI, dl, TII.get(PPC::LWZ8), TempReg)
-      .addImm(getCRSaveOffset())
+    BuildMI(MBB, MBBI, dl, LoadWordInst, TempReg)
+      .addImm(CRSaveOffset)
       .addReg(SPReg);
     for (unsigned i = 0, e = MustSaveCRs.size(); i != e; ++i)
-      BuildMI(MBB, MBBI, dl, TII.get(PPC::MTOCRF8), MustSaveCRs[i])
+      BuildMI(MBB, MBBI, dl, MoveToCRInst, MustSaveCRs[i])
         .addReg(TempReg, getKillRegState(i == e-1));
   }
 
@@ -1624,11 +1789,9 @@ void PPCFrameLowering::emitEpilogue(MachineFunction &MF,
   }
 
   if (MustSaveCR && !(SingleScratchReg && MustSaveLR)) {
-    // This will only occur for PPC64.
-    assert(isPPC64 && "Expecting 64-bit mode");
     assert(RBReg == SPReg && "Should be using SP as a base register");
-    BuildMI(MBB, MBBI, dl, TII.get(PPC::LWZ8), TempReg)
-      .addImm(getCRSaveOffset())
+    BuildMI(MBB, MBBI, dl, LoadWordInst, TempReg)
+      .addImm(CRSaveOffset)
       .addReg(RBReg);
   }
 
@@ -1683,9 +1846,9 @@ void PPCFrameLowering::emitEpilogue(MachineFunction &MF,
   }
 
   if (MustSaveCR &&
-      !(SingleScratchReg && MustSaveLR)) // will only occur for PPC64
+      !(SingleScratchReg && MustSaveLR))
     for (unsigned i = 0, e = MustSaveCRs.size(); i != e; ++i)
-      BuildMI(MBB, MBBI, dl, TII.get(PPC::MTOCRF8), MustSaveCRs[i])
+      BuildMI(MBB, MBBI, dl, MoveToCRInst, MustSaveCRs[i])
         .addReg(TempReg, getKillRegState(i == e-1));
 
   if (MustSaveLR)
@@ -1730,13 +1893,25 @@ void PPCFrameLowering::createTailCallBranchInstr(MachineBasicBlock &MBB) const {
   DebugLoc dl = MBBI->getDebugLoc();
   const PPCInstrInfo &TII = *Subtarget.getInstrInfo();
 
-  // Create branch instruction for pseudo tail call return instruction
+  // Create branch instruction for pseudo tail call return instruction.
+  // The TCRETURNdi variants are direct calls. Valid targets for those are
+  // MO_GlobalAddress operands as well as MO_ExternalSymbol with PC-Rel
+  // since we can tail call external functions with PC-Rel (i.e. we don't need
+  // to worry about different TOC pointers). Some of the external functions will
+  // be MO_GlobalAddress while others like memcpy for example, are going to
+  // be MO_ExternalSymbol.
   unsigned RetOpcode = MBBI->getOpcode();
   if (RetOpcode == PPC::TCRETURNdi) {
     MBBI = MBB.getLastNonDebugInstr();
     MachineOperand &JumpTarget = MBBI->getOperand(0);
-    BuildMI(MBB, MBBI, dl, TII.get(PPC::TAILB)).
-      addGlobalAddress(JumpTarget.getGlobal(), JumpTarget.getOffset());
+    if (JumpTarget.isGlobal())
+      BuildMI(MBB, MBBI, dl, TII.get(PPC::TAILB)).
+        addGlobalAddress(JumpTarget.getGlobal(), JumpTarget.getOffset());
+    else if (JumpTarget.isSymbol())
+      BuildMI(MBB, MBBI, dl, TII.get(PPC::TAILB)).
+        addExternalSymbol(JumpTarget.getSymbolName());
+    else
+      llvm_unreachable("Expecting Global or External Symbol");
   } else if (RetOpcode == PPC::TCRETURNri) {
     MBBI = MBB.getLastNonDebugInstr();
     assert(MBBI->getOperand(0).isReg() && "Expecting register operand.");
@@ -1748,8 +1923,14 @@ void PPCFrameLowering::createTailCallBranchInstr(MachineBasicBlock &MBB) const {
   } else if (RetOpcode == PPC::TCRETURNdi8) {
     MBBI = MBB.getLastNonDebugInstr();
     MachineOperand &JumpTarget = MBBI->getOperand(0);
-    BuildMI(MBB, MBBI, dl, TII.get(PPC::TAILB8)).
-      addGlobalAddress(JumpTarget.getGlobal(), JumpTarget.getOffset());
+    if (JumpTarget.isGlobal())
+      BuildMI(MBB, MBBI, dl, TII.get(PPC::TAILB8)).
+        addGlobalAddress(JumpTarget.getGlobal(), JumpTarget.getOffset());
+    else if (JumpTarget.isSymbol())
+      BuildMI(MBB, MBBI, dl, TII.get(PPC::TAILB8)).
+        addExternalSymbol(JumpTarget.getSymbolName());
+    else
+      llvm_unreachable("Expecting Global or External Symbol");
   } else if (RetOpcode == PPC::TCRETURNri8) {
     MBBI = MBB.getLastNonDebugInstr();
     assert(MBBI->getOperand(0).isReg() && "Expecting register operand.");
@@ -1777,7 +1958,6 @@ void PPCFrameLowering::determineCalleeSaves(MachineFunction &MF,
   //  Save R31 if necessary
   int FPSI = FI->getFramePointerSaveIndex();
   const bool isPPC64 = Subtarget.isPPC64();
-  const bool IsDarwinABI  = Subtarget.isDarwinABI();
   MachineFrameInfo &MFI = MF.getFrameInfo();
 
   // If the frame pointer save index hasn't been defined yet.
@@ -1824,25 +2004,26 @@ void PPCFrameLowering::determineCalleeSaves(MachineFunction &MF,
     MFI.CreateFixedObject(-1 * TCSPDelta, TCSPDelta, true);
   }
 
-  // For 32-bit SVR4, allocate the nonvolatile CR spill slot iff the
-  // function uses CR 2, 3, or 4.
-  if (!isPPC64 && !IsDarwinABI &&
-      (SavedRegs.test(PPC::CR2) ||
-       SavedRegs.test(PPC::CR3) ||
+  // Allocate the nonvolatile CR spill slot iff the function uses CR 2, 3, or 4.
+  // For 64-bit SVR4, and all flavors of AIX we create a FixedStack
+  // object at the offset of the CR-save slot in the linkage area. The actual
+  // save and restore of the condition register will be created as part of the
+  // prologue and epilogue insertion, but the FixedStack object is needed to
+  // keep the CalleSavedInfo valid.
+  if ((SavedRegs.test(PPC::CR2) || SavedRegs.test(PPC::CR3) ||
        SavedRegs.test(PPC::CR4))) {
-    int FrameIdx = MFI.CreateFixedObject((uint64_t)4, (int64_t)-4, true);
+    const uint64_t SpillSize = 4; // Condition register is always 4 bytes.
+    const int64_t SpillOffset =
+        Subtarget.isPPC64() ? 8 : Subtarget.isAIXABI() ? 4 : -4;
+    int FrameIdx =
+        MFI.CreateFixedObject(SpillSize, SpillOffset,
+                              /* IsImmutable */ true, /* IsAliased */ false);
     FI->setCRSpillFrameIndex(FrameIdx);
   }
 }
 
 void PPCFrameLowering::processFunctionBeforeFrameFinalized(MachineFunction &MF,
                                                        RegScavenger *RS) const {
-  // Early exit if not using the SVR4 ABI.
-  if (!Subtarget.isSVR4ABI()) {
-    addScavengingSpillSlot(MF, RS);
-    return;
-  }
-
   // Get callee saved register information.
   MachineFrameInfo &MFI = MF.getFrameInfo();
   const std::vector<CalleeSavedInfo> &CSI = MFI.getCalleeSavedInfo();
@@ -2015,11 +2196,8 @@ void PPCFrameLowering::processFunctionBeforeFrameFinalized(MachineFunction &MF,
       std::min<unsigned>(TRI->getEncodingValue(MinGPR),
                          TRI->getEncodingValue(MinG8R));
 
-    if (Subtarget.isPPC64()) {
-      LowerBound -= (31 - MinReg + 1) * 8;
-    } else {
-      LowerBound -= (31 - MinReg + 1) * 4;
-    }
+    const unsigned GPRegSize = Subtarget.isPPC64() ? 8 : 4;
+    LowerBound -= (31 - MinReg + 1) * GPRegSize;
   }
 
   // For 32-bit only, the CR save area is below the general register
@@ -2027,19 +2205,13 @@ void PPCFrameLowering::processFunctionBeforeFrameFinalized(MachineFunction &MF,
   // to the stack pointer and hence does not need an adjustment here.
   // Only CR2 (the first nonvolatile spilled) has an associated frame
   // index so that we have a single uniform save area.
-  if (spillsCR(MF) && !(Subtarget.isPPC64() && Subtarget.isSVR4ABI())) {
+  if (spillsCR(MF) && Subtarget.is32BitELFABI()) {
     // Adjust the frame index of the CR spill slot.
-    for (unsigned i = 0, e = CSI.size(); i != e; ++i) {
-      unsigned Reg = CSI[i].getReg();
-
-      if ((Subtarget.isSVR4ABI() && Reg == PPC::CR2)
-          // Leave Darwin logic as-is.
-          || (!Subtarget.isSVR4ABI() &&
-              (PPC::CRBITRCRegClass.contains(Reg) ||
-               PPC::CRRCRegClass.contains(Reg)))) {
-        int FI = CSI[i].getFrameIdx();
-
+    for (const auto &CSInfo : CSI) {
+      if (CSInfo.getReg() == PPC::CR2) {
+        int FI = CSInfo.getFrameIdx();
         MFI.setObjectOffset(FI, LowerBound + MFI.getObjectOffset(FI));
+        break;
       }
     }
 
@@ -2109,17 +2281,17 @@ PPCFrameLowering::addScavengingSpillSlot(MachineFunction &MF,
     const TargetRegisterClass &RC = Subtarget.isPPC64() ? G8RC : GPRC;
     const TargetRegisterInfo &TRI = *Subtarget.getRegisterInfo();
     unsigned Size = TRI.getSpillSize(RC);
-    unsigned Align = TRI.getSpillAlignment(RC);
-    RS->addScavengingFrameIndex(MFI.CreateStackObject(Size, Align, false));
+    Align Alignment = TRI.getSpillAlign(RC);
+    RS->addScavengingFrameIndex(MFI.CreateStackObject(Size, Alignment, false));
 
     // Might we have over-aligned allocas?
-    bool HasAlVars = MFI.hasVarSizedObjects() &&
-                     MFI.getMaxAlignment() > getStackAlignment();
+    bool HasAlVars =
+        MFI.hasVarSizedObjects() && MFI.getMaxAlign() > getStackAlign();
 
     // These kinds of spills might need two registers.
     if (spillsCR(MF) || spillsVRSAVE(MF) || HasAlVars)
-      RS->addScavengingFrameIndex(MFI.CreateStackObject(Size, Align, false));
-
+      RS->addScavengingFrameIndex(
+          MFI.CreateStackObject(Size, Alignment, false));
   }
 }
 
@@ -2180,17 +2352,9 @@ bool PPCFrameLowering::assignCalleeSavedSpillSlots(
   return AllSpilledToReg;
 }
 
-
-bool
-PPCFrameLowering::spillCalleeSavedRegisters(MachineBasicBlock &MBB,
-                                     MachineBasicBlock::iterator MI,
-                                     const std::vector<CalleeSavedInfo> &CSI,
-                                     const TargetRegisterInfo *TRI) const {
-
-  // Currently, this function only handles SVR4 32- and 64-bit ABIs.
-  // Return false otherwise to maintain pre-existing behavior.
-  if (!Subtarget.isSVR4ABI())
-    return false;
+bool PPCFrameLowering::spillCalleeSavedRegisters(
+    MachineBasicBlock &MBB, MachineBasicBlock::iterator MI,
+    ArrayRef<CalleeSavedInfo> CSI, const TargetRegisterInfo *TRI) const {
 
   MachineFunction *MF = MBB.getParent();
   const PPCInstrInfo &TII = *Subtarget.getInstrInfo();
@@ -2202,10 +2366,8 @@ PPCFrameLowering::spillCalleeSavedRegisters(MachineBasicBlock &MBB,
 
   for (unsigned i = 0, e = CSI.size(); i != e; ++i) {
     unsigned Reg = CSI[i].getReg();
-    // Only Darwin actually uses the VRSAVE register, but it can still appear
-    // here if, for example, @llvm.eh.unwind.init() is used.  If we're not on
-    // Darwin, ignore it.
-    if (Reg == PPC::VRSAVE && !Subtarget.isDarwinABI())
+    // VRSAVE can appear here if, for example, @llvm.eh.unwind.init() is used.
+    if (Reg == PPC::VRSAVE)
       continue;
 
     // CR2 through CR4 are the nonvolatile CR fields.
@@ -2233,7 +2395,7 @@ PPCFrameLowering::spillCalleeSavedRegisters(MachineBasicBlock &MBB,
     // Insert the spill to the stack frame.
     if (IsCRField) {
       PPCFunctionInfo *FuncInfo = MF->getInfo<PPCFunctionInfo>();
-      if (Subtarget.isPPC64()) {
+      if (!Subtarget.is32BitELFABI()) {
         // The actual spill will happen at the start of the prologue.
         FuncInfo->addMustSaveCR(Reg);
       } else {
@@ -2261,37 +2423,37 @@ PPCFrameLowering::spillCalleeSavedRegisters(MachineBasicBlock &MBB,
         // Use !IsLiveIn for the kill flag.
         // We do not want to kill registers that are live in this function
         // before their use because they will become undefined registers.
-        TII.storeRegToStackSlot(MBB, MI, Reg, !IsLiveIn,
-                                CSI[i].getFrameIdx(), RC, TRI);
+        // Functions without NoUnwind need to preserve the order of elements in
+        // saved vector registers.
+        if (Subtarget.needsSwapsForVSXMemOps() &&
+            !MF->getFunction().hasFnAttribute(Attribute::NoUnwind))
+          TII.storeRegToStackSlotNoUpd(MBB, MI, Reg, !IsLiveIn,
+                                       CSI[i].getFrameIdx(), RC, TRI);
+        else
+          TII.storeRegToStackSlot(MBB, MI, Reg, !IsLiveIn, CSI[i].getFrameIdx(),
+                                  RC, TRI);
       }
     }
   }
   return true;
 }
 
-static void
-restoreCRs(bool isPPC64, bool is31,
-           bool CR2Spilled, bool CR3Spilled, bool CR4Spilled,
-           MachineBasicBlock &MBB, MachineBasicBlock::iterator MI,
-           const std::vector<CalleeSavedInfo> &CSI, unsigned CSIIndex) {
+static void restoreCRs(bool is31, bool CR2Spilled, bool CR3Spilled,
+                       bool CR4Spilled, MachineBasicBlock &MBB,
+                       MachineBasicBlock::iterator MI,
+                       ArrayRef<CalleeSavedInfo> CSI, unsigned CSIIndex) {
 
   MachineFunction *MF = MBB.getParent();
   const PPCInstrInfo &TII = *MF->getSubtarget<PPCSubtarget>().getInstrInfo();
   DebugLoc DL;
-  unsigned RestoreOp, MoveReg;
+  unsigned MoveReg = PPC::R12;
 
-  if (isPPC64)
-    // This is handled during epilogue generation.
-    return;
-  else {
-    // 32-bit:  FP-relative
-    MBB.insert(MI, addFrameReference(BuildMI(*MF, DL, TII.get(PPC::LWZ),
-                                             PPC::R12),
-                                     CSI[CSIIndex].getFrameIdx()));
-    RestoreOp = PPC::MTOCRF;
-    MoveReg = PPC::R12;
-  }
+  // 32-bit:  FP-relative
+  MBB.insert(MI,
+             addFrameReference(BuildMI(*MF, DL, TII.get(PPC::LWZ), MoveReg),
+                               CSI[CSIIndex].getFrameIdx()));
 
+  unsigned RestoreOp = PPC::MTOCRF;
   if (CR2Spilled)
     MBB.insert(MI, BuildMI(*MF, DL, TII.get(RestoreOp), PPC::CR2)
                .addReg(MoveReg, getKillRegState(!CR3Spilled && !CR4Spilled)));
@@ -2344,17 +2506,13 @@ eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB,
   return MBB.erase(I);
 }
 
-bool
-PPCFrameLowering::restoreCalleeSavedRegisters(MachineBasicBlock &MBB,
-                                        MachineBasicBlock::iterator MI,
-                                        std::vector<CalleeSavedInfo> &CSI,
-                                        const TargetRegisterInfo *TRI) const {
-
-  // Currently, this function only handles SVR4 32- and 64-bit ABIs.
-  // Return false otherwise to maintain pre-existing behavior.
-  if (!Subtarget.isSVR4ABI())
-    return false;
+static bool isCalleeSavedCR(unsigned Reg) {
+  return PPC::CR2 == Reg || Reg == PPC::CR3 || Reg == PPC::CR4;
+}
 
+bool PPCFrameLowering::restoreCalleeSavedRegisters(
+    MachineBasicBlock &MBB, MachineBasicBlock::iterator MI,
+    MutableArrayRef<CalleeSavedInfo> CSI, const TargetRegisterInfo *TRI) const {
   MachineFunction *MF = MBB.getParent();
   const PPCInstrInfo &TII = *Subtarget.getInstrInfo();
   PPCFunctionInfo *FI = MF->getInfo<PPCFunctionInfo>();
@@ -2375,15 +2533,18 @@ PPCFrameLowering::restoreCalleeSavedRegisters(MachineBasicBlock &MBB,
   for (unsigned i = 0, e = CSI.size(); i != e; ++i) {
     unsigned Reg = CSI[i].getReg();
 
-    // Only Darwin actually uses the VRSAVE register, but it can still appear
-    // here if, for example, @llvm.eh.unwind.init() is used.  If we're not on
-    // Darwin, ignore it.
-    if (Reg == PPC::VRSAVE && !Subtarget.isDarwinABI())
+    // VRSAVE can appear here if, for example, @llvm.eh.unwind.init() is used.
+    if (Reg == PPC::VRSAVE)
       continue;
 
     if ((Reg == PPC::X2 || Reg == PPC::R2) && MustSaveTOC)
       continue;
 
+    // Restore of callee saved condition register field is handled during
+    // epilogue insertion.
+    if (isCalleeSavedCR(Reg) && !Subtarget.is32BitELFABI())
+      continue;
+
     if (Reg == PPC::CR2) {
       CR2Spilled = true;
       // The spill slot is associated only with CR2, which is the
@@ -2397,14 +2558,12 @@ PPCFrameLowering::restoreCalleeSavedRegisters(MachineBasicBlock &MBB,
       CR4Spilled = true;
       continue;
     } else {
-      // When we first encounter a non-CR register after seeing at
+      // On 32-bit ELF when we first encounter a non-CR register after seeing at
       // least one CR register, restore all spilled CRs together.
-      if ((CR2Spilled || CR3Spilled || CR4Spilled)
-          && !(PPC::CR2 <= Reg && Reg <= PPC::CR4)) {
+      if (CR2Spilled || CR3Spilled || CR4Spilled) {
         bool is31 = needsFP(*MF);
-        restoreCRs(Subtarget.isPPC64(), is31,
-                   CR2Spilled, CR3Spilled, CR4Spilled,
-                   MBB, I, CSI, CSIIndex);
+        restoreCRs(is31, CR2Spilled, CR3Spilled, CR4Spilled, MBB, I, CSI,
+                   CSIIndex);
         CR2Spilled = CR3Spilled = CR4Spilled = false;
       }
 
@@ -2416,7 +2575,16 @@ PPCFrameLowering::restoreCalleeSavedRegisters(MachineBasicBlock &MBB,
       } else {
        // Default behavior for non-CR saves.
         const TargetRegisterClass *RC = TRI->getMinimalPhysRegClass(Reg);
-        TII.loadRegFromStackSlot(MBB, I, Reg, CSI[i].getFrameIdx(), RC, TRI);
+
+        // Functions without NoUnwind need to preserve the order of elements in
+        // saved vector registers.
+        if (Subtarget.needsSwapsForVSXMemOps() &&
+            !MF->getFunction().hasFnAttribute(Attribute::NoUnwind))
+          TII.loadRegFromStackSlotNoUpd(MBB, I, Reg, CSI[i].getFrameIdx(), RC,
+                                        TRI);
+        else
+          TII.loadRegFromStackSlot(MBB, I, Reg, CSI[i].getFrameIdx(), RC, TRI);
+
         assert(I != MBB.begin() &&
                "loadRegFromStackSlot didn't insert any code!");
       }
@@ -2433,9 +2601,10 @@ PPCFrameLowering::restoreCalleeSavedRegisters(MachineBasicBlock &MBB,
 
   // If we haven't yet spilled the CRs, do so now.
   if (CR2Spilled || CR3Spilled || CR4Spilled) {
+    assert(Subtarget.is32BitELFABI() &&
+           "Only set CR[2|3|4]Spilled on 32-bit SVR4.");
     bool is31 = needsFP(*MF);
-    restoreCRs(Subtarget.isPPC64(), is31, CR2Spilled, CR3Spilled, CR4Spilled,
-               MBB, I, CSI, CSIIndex);
+    restoreCRs(is31, CR2Spilled, CR3Spilled, CR4Spilled, MBB, I, CSI, CSIIndex);
   }
 
   return true;
@@ -2446,14 +2615,10 @@ unsigned PPCFrameLowering::getTOCSaveOffset() const {
 }
 
 unsigned PPCFrameLowering::getFramePointerSaveOffset() const {
-  if (Subtarget.isAIXABI())
-    report_fatal_error("FramePointer is not implemented on AIX yet.");
   return FramePointerSaveOffset;
 }
 
 unsigned PPCFrameLowering::getBasePointerSaveOffset() const {
-  if (Subtarget.isAIXABI())
-    report_fatal_error("BasePointer is not implemented on AIX yet.");
   return BasePointerSaveOffset;
 }
 
index ae039ee..385d84a 100644 (file)
@@ -62,8 +62,8 @@ class PPCFrameLowering: public TargetFrameLowering {
   bool findScratchRegister(MachineBasicBlock *MBB,
                            bool UseAtEnd,
                            bool TwoUniqueRegsRequired = false,
-                           unsigned *SR1 = nullptr,
-                           unsigned *SR2 = nullptr) const;
+                           Register *SR1 = nullptr,
+                           Register *SR2 = nullptr) const;
   bool twoUniqueScratchRegsRequired(MachineBasicBlock *MBB) const;
 
   /**
@@ -101,6 +101,8 @@ public:
   /// the function.
   void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
   void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
+  void inlineStackProbe(MachineFunction &MF,
+                        MachineBasicBlock &PrologMBB) const override;
 
   bool hasFP(const MachineFunction &MF) const override;
   bool needsFP(const MachineFunction &MF) const;
@@ -114,7 +116,7 @@ public:
 
   bool spillCalleeSavedRegisters(MachineBasicBlock &MBB,
                                  MachineBasicBlock::iterator MI,
-                                 const std::vector<CalleeSavedInfo> &CSI,
+                                 ArrayRef<CalleeSavedInfo> CSI,
                                  const TargetRegisterInfo *TRI) const override;
   /// This function will assign callee saved gprs to volatile vector registers
   /// for prologue spills when applicable. It returns false if there are any
@@ -128,10 +130,11 @@ public:
   eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB,
                                 MachineBasicBlock::iterator I) const override;
 
-  bool restoreCalleeSavedRegisters(MachineBasicBlock &MBB,
-                                  MachineBasicBlock::iterator MI,
-                                  std::vector<CalleeSavedInfo> &CSI,
-                                  const TargetRegisterInfo *TRI) const override;
+  bool
+  restoreCalleeSavedRegisters(MachineBasicBlock &MBB,
+                              MachineBasicBlock::iterator MI,
+                              MutableArrayRef<CalleeSavedInfo> CSI,
+                              const TargetRegisterInfo *TRI) const override;
 
   /// targetHandlesStackFrameRounding - Returns true if the target is
   /// responsible for rounding up the stack frame (probably at emitPrologue
@@ -154,10 +157,6 @@ public:
   /// base pointer.
   unsigned getBasePointerSaveOffset() const;
 
-  /// getCRSaveOffset - Return the previous frame offset to save the
-  /// CR register.
-  unsigned getCRSaveOffset() const { return CRSaveOffset; }
-
   /// getLinkageSize - Return the size of the PowerPC ABI linkage area.
   ///
   unsigned getLinkageSize() const { return LinkageSize; }
index b10490e..f54f167 100644 (file)
@@ -55,7 +55,6 @@
 #include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
 #include "llvm/CodeGen/TargetRegisterInfo.h"
 #include "llvm/CodeGen/ValueTypes.h"
-#include "llvm/IR/CallSite.h"
 #include "llvm/IR/CallingConv.h"
 #include "llvm/IR/Constant.h"
 #include "llvm/IR/Constants.h"
@@ -118,14 +117,13 @@ cl::desc("disable sibling call optimization on ppc"), cl::Hidden);
 static cl::opt<bool> DisableInnermostLoopAlign32("disable-ppc-innermost-loop-align32",
 cl::desc("don't always align innermost loop to 32 bytes on ppc"), cl::Hidden);
 
-static cl::opt<bool> EnableQuadPrecision("enable-ppc-quad-precision",
-cl::desc("enable quad precision float support on ppc"), cl::Hidden);
-
 static cl::opt<bool> UseAbsoluteJumpTables("ppc-use-absolute-jumptables",
 cl::desc("use absolute jump tables on ppc"), cl::Hidden);
 
 STATISTIC(NumTailCalls, "Number of tail calls");
 STATISTIC(NumSiblingCalls, "Number of sibling calls");
+STATISTIC(ShufflesHandledWithVPERM, "Number of shuffles lowered to a VPERM");
+STATISTIC(NumDynamicAllocaProbed, "Number of dynamic stack allocation probed");
 
 static bool isNByteElemShuffleMask(ShuffleVectorSDNode *, unsigned, int);
 
@@ -260,15 +258,16 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
 
   // PowerPC has no SREM/UREM instructions unless we are on P9
   // On P9 we may use a hardware instruction to compute the remainder.
-  // The instructions are not legalized directly because in the cases where the
-  // result of both the remainder and the division is required it is more
-  // efficient to compute the remainder from the result of the division rather
-  // than use the remainder instruction.
+  // When the result of both the remainder and the division is required it is
+  // more efficient to compute the remainder from the result of the division
+  // rather than use the remainder instruction. The instructions are legalized
+  // directly because the DivRemPairsPass performs the transformation at the IR
+  // level.
   if (Subtarget.isISA3_0()) {
-    setOperationAction(ISD::SREM, MVT::i32, Custom);
-    setOperationAction(ISD::UREM, MVT::i32, Custom);
-    setOperationAction(ISD::SREM, MVT::i64, Custom);
-    setOperationAction(ISD::UREM, MVT::i64, Custom);
+    setOperationAction(ISD::SREM, MVT::i32, Legal);
+    setOperationAction(ISD::UREM, MVT::i32, Legal);
+    setOperationAction(ISD::SREM, MVT::i64, Legal);
+    setOperationAction(ISD::UREM, MVT::i64, Legal);
   } else {
     setOperationAction(ISD::SREM, MVT::i32, Expand);
     setOperationAction(ISD::UREM, MVT::i32, Expand);
@@ -286,6 +285,40 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
   setOperationAction(ISD::UDIVREM, MVT::i64, Expand);
   setOperationAction(ISD::SDIVREM, MVT::i64, Expand);
 
+  // Handle constrained floating-point operations of scalar.
+  // TODO: Handle SPE specific operation.
+  setOperationAction(ISD::STRICT_FADD, MVT::f32, Legal);
+  setOperationAction(ISD::STRICT_FSUB, MVT::f32, Legal);
+  setOperationAction(ISD::STRICT_FMUL, MVT::f32, Legal);
+  setOperationAction(ISD::STRICT_FDIV, MVT::f32, Legal);
+  setOperationAction(ISD::STRICT_FMA, MVT::f32, Legal);
+  setOperationAction(ISD::STRICT_FP_ROUND, MVT::f32, Legal);
+
+  setOperationAction(ISD::STRICT_FADD, MVT::f64, Legal);
+  setOperationAction(ISD::STRICT_FSUB, MVT::f64, Legal);
+  setOperationAction(ISD::STRICT_FMUL, MVT::f64, Legal);
+  setOperationAction(ISD::STRICT_FDIV, MVT::f64, Legal);
+  setOperationAction(ISD::STRICT_FMA, MVT::f64, Legal);
+  if (Subtarget.hasVSX())
+    setOperationAction(ISD::STRICT_FNEARBYINT, MVT::f64, Legal);
+
+  if (Subtarget.hasFSQRT()) {
+    setOperationAction(ISD::STRICT_FSQRT, MVT::f32, Legal);
+    setOperationAction(ISD::STRICT_FSQRT, MVT::f64, Legal);
+  }
+
+  if (Subtarget.hasFPRND()) {
+    setOperationAction(ISD::STRICT_FFLOOR, MVT::f32, Legal);
+    setOperationAction(ISD::STRICT_FCEIL,  MVT::f32, Legal);
+    setOperationAction(ISD::STRICT_FTRUNC, MVT::f32, Legal);
+    setOperationAction(ISD::STRICT_FROUND, MVT::f32, Legal);
+
+    setOperationAction(ISD::STRICT_FFLOOR, MVT::f64, Legal);
+    setOperationAction(ISD::STRICT_FCEIL,  MVT::f64, Legal);
+    setOperationAction(ISD::STRICT_FTRUNC, MVT::f64, Legal);
+    setOperationAction(ISD::STRICT_FROUND, MVT::f64, Legal);
+  }
+
   // We don't support sin/cos/sqrt/fmod/pow
   setOperationAction(ISD::FSIN , MVT::f64, Expand);
   setOperationAction(ISD::FCOS , MVT::f64, Expand);
@@ -390,6 +423,9 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
 
   if (Subtarget.hasSPE()) {
     // SPE has built-in conversions
+    setOperationAction(ISD::STRICT_FP_TO_SINT, MVT::i32, Legal);
+    setOperationAction(ISD::STRICT_SINT_TO_FP, MVT::i32, Legal);
+    setOperationAction(ISD::STRICT_UINT_TO_FP, MVT::i32, Legal);
     setOperationAction(ISD::FP_TO_SINT, MVT::i32, Legal);
     setOperationAction(ISD::SINT_TO_FP, MVT::i32, Legal);
     setOperationAction(ISD::UINT_TO_FP, MVT::i32, Legal);
@@ -539,9 +575,10 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
       setOperationAction(ISD::SINT_TO_FP, MVT::i32, Custom);
   } else {
     // PowerPC does not have FP_TO_UINT on 32-bit implementations.
-    if (Subtarget.hasSPE())
+    if (Subtarget.hasSPE()) {
+      setOperationAction(ISD::STRICT_FP_TO_UINT, MVT::i32, Legal);
       setOperationAction(ISD::FP_TO_UINT, MVT::i32, Legal);
-    else
+    else
       setOperationAction(ISD::FP_TO_UINT, MVT::i32, Expand);
   }
 
@@ -584,6 +621,12 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
   }
 
   if (Subtarget.hasAltivec()) {
+    for (MVT VT : { MVT::v16i8, MVT::v8i16, MVT::v4i32 }) {
+      setOperationAction(ISD::SADDSAT, VT, Legal);
+      setOperationAction(ISD::SSUBSAT, VT, Legal);
+      setOperationAction(ISD::UADDSAT, VT, Legal);
+      setOperationAction(ISD::USUBSAT, VT, Legal);
+    }
     // First set operation action for all vector types to expand. Then we
     // will selectively turn on ones that can be effectively codegen'd.
     for (MVT VT : MVT::fixedlen_vector_valuetypes()) {
@@ -738,6 +781,8 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
     if (!Subtarget.hasP8Altivec())
       setOperationAction(ISD::ABS, MVT::v2i64, Expand);
 
+    // Custom lowering ROTL v1i128 to VECTOR_SHUFFLE v16i8.
+    setOperationAction(ISD::ROTL, MVT::v1i128, Custom);
     // With hasAltivec set, we can lower ISD::ROTL to vrl(b|h|w).
     if (Subtarget.hasAltivec())
       for (auto VT : {MVT::v4i32, MVT::v8i16, MVT::v16i8})
@@ -754,7 +799,7 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
     setOperationAction(ISD::MUL, MVT::v4f32, Legal);
     setOperationAction(ISD::FMA, MVT::v4f32, Legal);
 
-    if (TM.Options.UnsafeFPMath || Subtarget.hasVSX()) {
+    if (Subtarget.hasVSX()) {
       setOperationAction(ISD::FDIV, MVT::v4f32, Legal);
       setOperationAction(ISD::FSQRT, MVT::v4f32, Legal);
     }
@@ -764,7 +809,7 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
     else
       setOperationAction(ISD::MUL, MVT::v4i32, Custom);
 
-    setOperationAction(ISD::MUL, MVT::v8i16, Custom);
+    setOperationAction(ISD::MUL, MVT::v8i16, Legal);
     setOperationAction(ISD::MUL, MVT::v16i8, Custom);
 
     setOperationAction(ISD::SCALAR_TO_VECTOR, MVT::v4f32, Custom);
@@ -811,12 +856,16 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
       setOperationAction(ISD::FCEIL, MVT::v2f64, Legal);
       setOperationAction(ISD::FTRUNC, MVT::v2f64, Legal);
       setOperationAction(ISD::FNEARBYINT, MVT::v2f64, Legal);
+      setOperationAction(ISD::FRINT, MVT::v2f64, Legal);
       setOperationAction(ISD::FROUND, MVT::v2f64, Legal);
       setOperationAction(ISD::FROUND, MVT::f64, Legal);
+      setOperationAction(ISD::FRINT, MVT::f64, Legal);
 
       setOperationAction(ISD::FNEARBYINT, MVT::v4f32, Legal);
+      setOperationAction(ISD::FRINT, MVT::v4f32, Legal);
       setOperationAction(ISD::FROUND, MVT::v4f32, Legal);
       setOperationAction(ISD::FROUND, MVT::f32, Legal);
+      setOperationAction(ISD::FRINT, MVT::f32, Legal);
 
       setOperationAction(ISD::MUL, MVT::v2f64, Legal);
       setOperationAction(ISD::FMA, MVT::v2f64, Legal);
@@ -871,6 +920,8 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
         setOperationAction(ISD::SUB, MVT::v2i64, Expand);
       }
 
+      setOperationAction(ISD::SETCC, MVT::v1i128, Expand);
+
       setOperationAction(ISD::LOAD, MVT::v2i64, Promote);
       AddPromotedToType (ISD::LOAD, MVT::v2i64, MVT::v2f64);
       setOperationAction(ISD::STORE, MVT::v2i64, Promote);
@@ -906,6 +957,37 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
         setOperationAction(ISD::BUILD_VECTOR, MVT::v2i64, Custom);
       setOperationAction(ISD::BUILD_VECTOR, MVT::v2f64, Custom);
 
+      // Handle constrained floating-point operations of vector.
+      // The predictor is `hasVSX` because altivec instruction has
+      // no exception but VSX vector instruction has.
+      setOperationAction(ISD::STRICT_FADD, MVT::v4f32, Legal);
+      setOperationAction(ISD::STRICT_FSUB, MVT::v4f32, Legal);
+      setOperationAction(ISD::STRICT_FMUL, MVT::v4f32, Legal);
+      setOperationAction(ISD::STRICT_FDIV, MVT::v4f32, Legal);
+      setOperationAction(ISD::STRICT_FMA, MVT::v4f32, Legal);
+      setOperationAction(ISD::STRICT_FSQRT, MVT::v4f32, Legal);
+      setOperationAction(ISD::STRICT_FMAXNUM, MVT::v4f32, Legal);
+      setOperationAction(ISD::STRICT_FMINNUM, MVT::v4f32, Legal);
+      setOperationAction(ISD::STRICT_FNEARBYINT, MVT::v4f32, Legal);
+      setOperationAction(ISD::STRICT_FFLOOR, MVT::v4f32, Legal);
+      setOperationAction(ISD::STRICT_FCEIL,  MVT::v4f32, Legal);
+      setOperationAction(ISD::STRICT_FTRUNC, MVT::v4f32, Legal);
+      setOperationAction(ISD::STRICT_FROUND, MVT::v4f32, Legal);
+
+      setOperationAction(ISD::STRICT_FADD, MVT::v2f64, Legal);
+      setOperationAction(ISD::STRICT_FSUB, MVT::v2f64, Legal);
+      setOperationAction(ISD::STRICT_FMUL, MVT::v2f64, Legal);
+      setOperationAction(ISD::STRICT_FDIV, MVT::v2f64, Legal);
+      setOperationAction(ISD::STRICT_FMA, MVT::v2f64, Legal);
+      setOperationAction(ISD::STRICT_FSQRT, MVT::v2f64, Legal);
+      setOperationAction(ISD::STRICT_FMAXNUM, MVT::v2f64, Legal);
+      setOperationAction(ISD::STRICT_FMINNUM, MVT::v2f64, Legal);
+      setOperationAction(ISD::STRICT_FNEARBYINT, MVT::v2f64, Legal);
+      setOperationAction(ISD::STRICT_FFLOOR, MVT::v2f64, Legal);
+      setOperationAction(ISD::STRICT_FCEIL,  MVT::v2f64, Legal);
+      setOperationAction(ISD::STRICT_FTRUNC, MVT::v2f64, Legal);
+      setOperationAction(ISD::STRICT_FROUND, MVT::v2f64, Legal);
+
       addRegisterClass(MVT::v2i64, &PPC::VSRCRegClass);
     }
 
@@ -925,44 +1007,59 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
       setOperationAction(ISD::SRL, MVT::v1i128, Legal);
       setOperationAction(ISD::SRA, MVT::v1i128, Expand);
 
-      if (EnableQuadPrecision) {
-        addRegisterClass(MVT::f128, &PPC::VRRCRegClass);
-        setOperationAction(ISD::FADD, MVT::f128, Legal);
-        setOperationAction(ISD::FSUB, MVT::f128, Legal);
-        setOperationAction(ISD::FDIV, MVT::f128, Legal);
-        setOperationAction(ISD::FMUL, MVT::f128, Legal);
-        setOperationAction(ISD::FP_EXTEND, MVT::f128, Legal);
-        // No extending loads to f128 on PPC.
-        for (MVT FPT : MVT::fp_valuetypes())
-          setLoadExtAction(ISD::EXTLOAD, MVT::f128, FPT, Expand);
-        setOperationAction(ISD::FMA, MVT::f128, Legal);
-        setCondCodeAction(ISD::SETULT, MVT::f128, Expand);
-        setCondCodeAction(ISD::SETUGT, MVT::f128, Expand);
-        setCondCodeAction(ISD::SETUEQ, MVT::f128, Expand);
-        setCondCodeAction(ISD::SETOGE, MVT::f128, Expand);
-        setCondCodeAction(ISD::SETOLE, MVT::f128, Expand);
-        setCondCodeAction(ISD::SETONE, MVT::f128, Expand);
-
-        setOperationAction(ISD::FTRUNC, MVT::f128, Legal);
-        setOperationAction(ISD::FRINT, MVT::f128, Legal);
-        setOperationAction(ISD::FFLOOR, MVT::f128, Legal);
-        setOperationAction(ISD::FCEIL, MVT::f128, Legal);
-        setOperationAction(ISD::FNEARBYINT, MVT::f128, Legal);
-        setOperationAction(ISD::FROUND, MVT::f128, Legal);
-
-        setOperationAction(ISD::SELECT, MVT::f128, Expand);
-        setOperationAction(ISD::FP_ROUND, MVT::f64, Legal);
-        setOperationAction(ISD::FP_ROUND, MVT::f32, Legal);
-        setTruncStoreAction(MVT::f128, MVT::f64, Expand);
-        setTruncStoreAction(MVT::f128, MVT::f32, Expand);
-        setOperationAction(ISD::BITCAST, MVT::i128, Custom);
-        // No implementation for these ops for PowerPC.
-        setOperationAction(ISD::FSIN , MVT::f128, Expand);
-        setOperationAction(ISD::FCOS , MVT::f128, Expand);
-        setOperationAction(ISD::FPOW, MVT::f128, Expand);
-        setOperationAction(ISD::FPOWI, MVT::f128, Expand);
-        setOperationAction(ISD::FREM, MVT::f128, Expand);
-      }
+      addRegisterClass(MVT::f128, &PPC::VRRCRegClass);
+      setOperationAction(ISD::FADD, MVT::f128, Legal);
+      setOperationAction(ISD::FSUB, MVT::f128, Legal);
+      setOperationAction(ISD::FDIV, MVT::f128, Legal);
+      setOperationAction(ISD::FMUL, MVT::f128, Legal);
+      setOperationAction(ISD::FP_EXTEND, MVT::f128, Legal);
+      // No extending loads to f128 on PPC.
+      for (MVT FPT : MVT::fp_valuetypes())
+        setLoadExtAction(ISD::EXTLOAD, MVT::f128, FPT, Expand);
+      setOperationAction(ISD::FMA, MVT::f128, Legal);
+      setCondCodeAction(ISD::SETULT, MVT::f128, Expand);
+      setCondCodeAction(ISD::SETUGT, MVT::f128, Expand);
+      setCondCodeAction(ISD::SETUEQ, MVT::f128, Expand);
+      setCondCodeAction(ISD::SETOGE, MVT::f128, Expand);
+      setCondCodeAction(ISD::SETOLE, MVT::f128, Expand);
+      setCondCodeAction(ISD::SETONE, MVT::f128, Expand);
+
+      setOperationAction(ISD::FTRUNC, MVT::f128, Legal);
+      setOperationAction(ISD::FRINT, MVT::f128, Legal);
+      setOperationAction(ISD::FFLOOR, MVT::f128, Legal);
+      setOperationAction(ISD::FCEIL, MVT::f128, Legal);
+      setOperationAction(ISD::FNEARBYINT, MVT::f128, Legal);
+      setOperationAction(ISD::FROUND, MVT::f128, Legal);
+
+      setOperationAction(ISD::SELECT, MVT::f128, Expand);
+      setOperationAction(ISD::FP_ROUND, MVT::f64, Legal);
+      setOperationAction(ISD::FP_ROUND, MVT::f32, Legal);
+      setTruncStoreAction(MVT::f128, MVT::f64, Expand);
+      setTruncStoreAction(MVT::f128, MVT::f32, Expand);
+      setOperationAction(ISD::BITCAST, MVT::i128, Custom);
+      // No implementation for these ops for PowerPC.
+      setOperationAction(ISD::FSIN, MVT::f128, Expand);
+      setOperationAction(ISD::FCOS, MVT::f128, Expand);
+      setOperationAction(ISD::FPOW, MVT::f128, Expand);
+      setOperationAction(ISD::FPOWI, MVT::f128, Expand);
+      setOperationAction(ISD::FREM, MVT::f128, Expand);
+
+      // Handle constrained floating-point operations of fp128
+      setOperationAction(ISD::STRICT_FADD, MVT::f128, Legal);
+      setOperationAction(ISD::STRICT_FSUB, MVT::f128, Legal);
+      setOperationAction(ISD::STRICT_FMUL, MVT::f128, Legal);
+      setOperationAction(ISD::STRICT_FDIV, MVT::f128, Legal);
+      setOperationAction(ISD::STRICT_FMA, MVT::f128, Legal);
+      setOperationAction(ISD::STRICT_FSQRT, MVT::f128, Legal);
+      setOperationAction(ISD::STRICT_FP_EXTEND, MVT::f128, Legal);
+      setOperationAction(ISD::STRICT_FP_ROUND, MVT::f64, Legal);
+      setOperationAction(ISD::STRICT_FP_ROUND, MVT::f32, Legal);
+      setOperationAction(ISD::STRICT_FRINT, MVT::f128, Legal);
+      setOperationAction(ISD::STRICT_FNEARBYINT, MVT::f128, Legal);
+      setOperationAction(ISD::STRICT_FFLOOR, MVT::f128, Legal);
+      setOperationAction(ISD::STRICT_FCEIL, MVT::f128, Legal);
+      setOperationAction(ISD::STRICT_FTRUNC, MVT::f128, Legal);
+      setOperationAction(ISD::STRICT_FROUND, MVT::f128, Legal);
       setOperationAction(ISD::FP_EXTEND, MVT::v2f32, Custom);
       setOperationAction(ISD::BSWAP, MVT::v8i16, Legal);
       setOperationAction(ISD::BSWAP, MVT::v4i32, Legal);
@@ -1135,6 +1232,8 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
       setOperationAction(ISD::FDIV, MVT::v4f32, Expand);
       setOperationAction(ISD::FSQRT, MVT::v4f32, Expand);
     }
+
+    // TODO: Handle constrained floating-point operations of v4f64
   }
 
   if (Subtarget.has64BitSupport())
@@ -1142,10 +1241,7 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
 
   setOperationAction(ISD::READCYCLECOUNTER, MVT::i64, isPPC64 ? Legal : Custom);
 
-  if (isPPC64)
-    setMaxAtomicSizeInBitsSupported(64);
-  else {
-    setMaxAtomicSizeInBitsSupported(32);
+  if (!isPPC64) {
     setOperationAction(ISD::ATOMIC_LOAD,  MVT::i64, Expand);
     setOperationAction(ISD::ATOMIC_STORE, MVT::i64, Expand);
   }
@@ -1164,6 +1260,9 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
     setLibcallName(RTLIB::SRA_I128, nullptr);
   }
 
+  if (!isPPC64)
+    setMaxAtomicSizeInBitsSupported(32);
+
   setStackPointerRegisterToSaveRestore(isPPC64 ? PPC::X1 : PPC::R1);
 
   // We have target-specific dag combine patterns for the following nodes:
@@ -1172,6 +1271,7 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
   setTargetDAGCombine(ISD::SRA);
   setTargetDAGCombine(ISD::SRL);
   setTargetDAGCombine(ISD::MUL);
+  setTargetDAGCombine(ISD::FMA);
   setTargetDAGCombine(ISD::SINT_TO_FP);
   setTargetDAGCombine(ISD::BUILD_VECTOR);
   if (Subtarget.hasFPCVT())
@@ -1200,45 +1300,23 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
     setTargetDAGCombine(ISD::SELECT_CC);
   }
 
-  // Use reciprocal estimates.
-  if (TM.Options.UnsafeFPMath) {
-    setTargetDAGCombine(ISD::FDIV);
-    setTargetDAGCombine(ISD::FSQRT);
-  }
-
   if (Subtarget.hasP9Altivec()) {
     setTargetDAGCombine(ISD::ABS);
     setTargetDAGCombine(ISD::VSELECT);
   }
 
-  // Darwin long double math library functions have $LDBL128 appended.
-  if (Subtarget.isDarwin()) {
-    setLibcallName(RTLIB::COS_PPCF128, "cosl$LDBL128");
-    setLibcallName(RTLIB::POW_PPCF128, "powl$LDBL128");
-    setLibcallName(RTLIB::REM_PPCF128, "fmodl$LDBL128");
-    setLibcallName(RTLIB::SIN_PPCF128, "sinl$LDBL128");
-    setLibcallName(RTLIB::SQRT_PPCF128, "sqrtl$LDBL128");
-    setLibcallName(RTLIB::LOG_PPCF128, "logl$LDBL128");
-    setLibcallName(RTLIB::LOG2_PPCF128, "log2l$LDBL128");
-    setLibcallName(RTLIB::LOG10_PPCF128, "log10l$LDBL128");
-    setLibcallName(RTLIB::EXP_PPCF128, "expl$LDBL128");
-    setLibcallName(RTLIB::EXP2_PPCF128, "exp2l$LDBL128");
-  }
-
-  if (EnableQuadPrecision) {
-    setLibcallName(RTLIB::LOG_F128, "logf128");
-    setLibcallName(RTLIB::LOG2_F128, "log2f128");
-    setLibcallName(RTLIB::LOG10_F128, "log10f128");
-    setLibcallName(RTLIB::EXP_F128, "expf128");
-    setLibcallName(RTLIB::EXP2_F128, "exp2f128");
-    setLibcallName(RTLIB::SIN_F128, "sinf128");
-    setLibcallName(RTLIB::COS_F128, "cosf128");
-    setLibcallName(RTLIB::POW_F128, "powf128");
-    setLibcallName(RTLIB::FMIN_F128, "fminf128");
-    setLibcallName(RTLIB::FMAX_F128, "fmaxf128");
-    setLibcallName(RTLIB::POWI_F128, "__powikf2");
-    setLibcallName(RTLIB::REM_F128, "fmodf128");
-  }
+  setLibcallName(RTLIB::LOG_F128, "logf128");
+  setLibcallName(RTLIB::LOG2_F128, "log2f128");
+  setLibcallName(RTLIB::LOG10_F128, "log10f128");
+  setLibcallName(RTLIB::EXP_F128, "expf128");
+  setLibcallName(RTLIB::EXP2_F128, "exp2f128");
+  setLibcallName(RTLIB::SIN_F128, "sinf128");
+  setLibcallName(RTLIB::COS_F128, "cosf128");
+  setLibcallName(RTLIB::POW_F128, "powf128");
+  setLibcallName(RTLIB::FMIN_F128, "fminf128");
+  setLibcallName(RTLIB::FMAX_F128, "fmaxf128");
+  setLibcallName(RTLIB::POWI_F128, "__powikf2");
+  setLibcallName(RTLIB::REM_F128, "fmodf128");
 
   // With 32 condition bits, we don't need to sink (and duplicate) compares
   // aggressively in CodeGenPrep.
@@ -1248,8 +1326,6 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
   }
 
   setMinFunctionAlignment(Align(4));
-  if (Subtarget.isDarwin())
-    setPrefFunctionAlignment(Align(16));
 
   switch (Subtarget.getCPUDirective()) {
   default: break;
@@ -1266,6 +1342,7 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
   case PPC::DIR_PWR7:
   case PPC::DIR_PWR8:
   case PPC::DIR_PWR9:
+  case PPC::DIR_PWR10:
   case PPC::DIR_PWR_FUTURE:
     setPrefLoopAlignment(Align(16));
     setPrefFunctionAlignment(Align(16));
@@ -1301,27 +1378,33 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
     MaxLoadsPerMemcmp = 8;
     MaxLoadsPerMemcmpOptSize = 4;
   }
+
+  // Let the subtarget (CPU) decide if a predictable select is more expensive
+  // than the corresponding branch. This information is used in CGP to decide
+  // when to convert selects into branches.
+  PredictableSelectIsExpensive = Subtarget.isPredictableSelectIsExpensive();
 }
 
 /// getMaxByValAlign - Helper for getByValTypeAlignment to determine
 /// the desired ByVal argument alignment.
-static void getMaxByValAlign(Type *Ty, unsigned &MaxAlign,
-                             unsigned MaxMaxAlign) {
+static void getMaxByValAlign(Type *Ty, Align &MaxAlign, Align MaxMaxAlign) {
   if (MaxAlign == MaxMaxAlign)
     return;
   if (VectorType *VTy = dyn_cast<VectorType>(Ty)) {
-    if (MaxMaxAlign >= 32 && VTy->getBitWidth() >= 256)
-      MaxAlign = 32;
-    else if (VTy->getBitWidth() >= 128 && MaxAlign < 16)
-      MaxAlign = 16;
+    if (MaxMaxAlign >= 32 &&
+        VTy->getPrimitiveSizeInBits().getFixedSize() >= 256)
+      MaxAlign = Align(32);
+    else if (VTy->getPrimitiveSizeInBits().getFixedSize() >= 128 &&
+             MaxAlign < 16)
+      MaxAlign = Align(16);
   } else if (ArrayType *ATy = dyn_cast<ArrayType>(Ty)) {
-    unsigned EltAlign = 0;
+    Align EltAlign;
     getMaxByValAlign(ATy->getElementType(), EltAlign, MaxMaxAlign);
     if (EltAlign > MaxAlign)
       MaxAlign = EltAlign;
   } else if (StructType *STy = dyn_cast<StructType>(Ty)) {
     for (auto *EltTy : STy->elements()) {
-      unsigned EltAlign = 0;
+      Align EltAlign;
       getMaxByValAlign(EltTy, EltAlign, MaxMaxAlign);
       if (EltAlign > MaxAlign)
         MaxAlign = EltAlign;
@@ -1335,16 +1418,12 @@ static void getMaxByValAlign(Type *Ty, unsigned &MaxAlign,
 /// function arguments in the caller parameter area.
 unsigned PPCTargetLowering::getByValTypeAlignment(Type *Ty,
                                                   const DataLayout &DL) const {
-  // Darwin passes everything on 4 byte boundary.
-  if (Subtarget.isDarwin())
-    return 4;
-
   // 16byte and wider vectors are passed on 16byte boundary.
   // The rest is 8 on PPC64 and 4 on PPC32 boundary.
-  unsigned Align = Subtarget.isPPC64() ? 8 : 4;
+  Align Alignment = Subtarget.isPPC64() ? Align(8) : Align(4);
   if (Subtarget.hasAltivec() || Subtarget.hasQPX())
-    getMaxByValAlign(Ty, Align, Subtarget.hasQPX() ? 32 : 16);
-  return Align;
+    getMaxByValAlign(Ty, Alignment, Subtarget.hasQPX() ? Align(32) : Align(16));
+  return Alignment.value();
 }
 
 bool PPCTargetLowering::useSoftFloat() const {
@@ -1359,6 +1438,16 @@ bool PPCTargetLowering::preferIncOfAddToSubOfNot(EVT VT) const {
   return VT.isScalarInteger();
 }
 
+/// isMulhCheaperThanMulShift - Return true if a mulh[s|u] node for a specific
+/// type is cheaper than a multiply followed by a shift.
+/// This is true for words and doublewords on 64-bit PowerPC.
+bool PPCTargetLowering::isMulhCheaperThanMulShift(EVT Type) const {
+  if (Subtarget.isPPC64() && (isOperationLegal(ISD::MULHS, Type) ||
+                              isOperationLegal(ISD::MULHU, Type)))
+    return true;
+  return TargetLowering::isMulhCheaperThanMulShift(Type);
+}
+
 const char *PPCTargetLowering::getTargetNodeName(unsigned Opcode) const {
   switch ((PPCISD::NodeType)Opcode) {
   case PPCISD::FIRST_NUMBER:    break;
@@ -1380,10 +1469,12 @@ const char *PPCTargetLowering::getTargetNodeName(unsigned Opcode) const {
   case PPCISD::FRE:             return "PPCISD::FRE";
   case PPCISD::FRSQRTE:         return "PPCISD::FRSQRTE";
   case PPCISD::STFIWX:          return "PPCISD::STFIWX";
-  case PPCISD::VMADDFP:         return "PPCISD::VMADDFP";
-  case PPCISD::VNMSUBFP:        return "PPCISD::VNMSUBFP";
   case PPCISD::VPERM:           return "PPCISD::VPERM";
   case PPCISD::XXSPLT:          return "PPCISD::XXSPLT";
+  case PPCISD::XXSPLTI_SP_TO_DP:
+    return "PPCISD::XXSPLTI_SP_TO_DP";
+  case PPCISD::XXSPLTI32DX:
+    return "PPCISD::XXSPLTI32DX";
   case PPCISD::VECINSERT:       return "PPCISD::VECINSERT";
   case PPCISD::XXPERMDI:        return "PPCISD::XXPERMDI";
   case PPCISD::VECSHL:          return "PPCISD::VECSHL";
@@ -1395,6 +1486,7 @@ const char *PPCTargetLowering::getTargetNodeName(unsigned Opcode) const {
   case PPCISD::ATOMIC_CMP_SWAP_16: return "PPCISD::ATOMIC_CMP_SWAP_16";
   case PPCISD::DYNALLOC:        return "PPCISD::DYNALLOC";
   case PPCISD::DYNAREAOFFSET:   return "PPCISD::DYNAREAOFFSET";
+  case PPCISD::PROBED_ALLOCA:   return "PPCISD::PROBED_ALLOCA";
   case PPCISD::GlobalBaseReg:   return "PPCISD::GlobalBaseReg";
   case PPCISD::SRL:             return "PPCISD::SRL";
   case PPCISD::SRA:             return "PPCISD::SRA";
@@ -1402,6 +1494,7 @@ const char *PPCTargetLowering::getTargetNodeName(unsigned Opcode) const {
   case PPCISD::SRA_ADDZE:       return "PPCISD::SRA_ADDZE";
   case PPCISD::CALL:            return "PPCISD::CALL";
   case PPCISD::CALL_NOP:        return "PPCISD::CALL_NOP";
+  case PPCISD::CALL_NOTOC:      return "PPCISD::CALL_NOTOC";
   case PPCISD::MTCTR:           return "PPCISD::MTCTR";
   case PPCISD::BCTRL:           return "PPCISD::BCTRL";
   case PPCISD::BCTRL_LOAD_TOC:  return "PPCISD::BCTRL_LOAD_TOC";
@@ -1415,6 +1508,8 @@ const char *PPCTargetLowering::getTargetNodeName(unsigned Opcode) const {
   case PPCISD::MTVSRZ:          return "PPCISD::MTVSRZ";
   case PPCISD::SINT_VEC_TO_FP:  return "PPCISD::SINT_VEC_TO_FP";
   case PPCISD::UINT_VEC_TO_FP:  return "PPCISD::UINT_VEC_TO_FP";
+  case PPCISD::SCALAR_TO_VECTOR_PERMUTED:
+    return "PPCISD::SCALAR_TO_VECTOR_PERMUTED";
   case PPCISD::ANDI_rec_1_EQ_BIT:
     return "PPCISD::ANDI_rec_1_EQ_BIT";
   case PPCISD::ANDI_rec_1_GT_BIT:
@@ -1428,7 +1523,6 @@ const char *PPCTargetLowering::getTargetNodeName(unsigned Opcode) const {
   case PPCISD::LXSIZX:          return "PPCISD::LXSIZX";
   case PPCISD::STXSIX:          return "PPCISD::STXSIX";
   case PPCISD::VEXTS:           return "PPCISD::VEXTS";
-  case PPCISD::SExtVElems:      return "PPCISD::SExtVElems";
   case PPCISD::LXVD2X:          return "PPCISD::LXVD2X";
   case PPCISD::STXVD2X:         return "PPCISD::STXVD2X";
   case PPCISD::LOAD_VEC_BE:     return "PPCISD::LOAD_VEC_BE";
@@ -1478,7 +1572,9 @@ const char *PPCTargetLowering::getTargetNodeName(unsigned Opcode) const {
   case PPCISD::EXTSWSLI:        return "PPCISD::EXTSWSLI";
   case PPCISD::LD_VSX_LH:       return "PPCISD::LD_VSX_LH";
   case PPCISD::FP_EXTEND_HALF:  return "PPCISD::FP_EXTEND_HALF";
+  case PPCISD::MAT_PCREL_ADDR:  return "PPCISD::MAT_PCREL_ADDR";
   case PPCISD::LD_SPLAT:        return "PPCISD::LD_SPLAT";
+  case PPCISD::FNMSUB:          return "PPCISD::FNMSUB";
   }
   return nullptr;
 }
@@ -2341,17 +2437,22 @@ bool PPCTargetLowering::SelectAddressEVXRegReg(SDValue N, SDValue &Base,
 /// non-zero and N can be represented by a base register plus a signed 16-bit
 /// displacement, make a more precise judgement by checking (displacement % \p
 /// EncodingAlignment).
-bool PPCTargetLowering::SelectAddressRegReg(SDValue N, SDValue &Base,
-                                            SDValue &Index, SelectionDAG &DAG,
-                                            unsigned EncodingAlignment) const {
-  int16_t imm = 0;
+bool PPCTargetLowering::SelectAddressRegReg(
+    SDValue N, SDValue &Base, SDValue &Index, SelectionDAG &DAG,
+    MaybeAlign EncodingAlignment) const {
+  // If we have a PC Relative target flag don't select as [reg+reg]. It will be
+  // a [pc+imm].
+  if (SelectAddressPCRel(N, Base))
+    return false;
+
+  int16_t Imm = 0;
   if (N.getOpcode() == ISD::ADD) {
     // Is there any SPE load/store (f64), which can't handle 16bit offset?
     // SPE load/store can only handle 8-bit offsets.
     if (hasSPE() && SelectAddressEVXRegReg(N, Base, Index, DAG))
         return true;
-    if (isIntS16Immediate(N.getOperand(1), imm) &&
-        (!EncodingAlignment || !(imm % EncodingAlignment)))
+    if (isIntS16Immediate(N.getOperand(1), Imm) &&
+        (!EncodingAlignment || isAligned(*EncodingAlignment, Imm)))
       return false; // r+i
     if (N.getOperand(1).getOpcode() == PPCISD::Lo)
       return false;    // r+i
@@ -2360,8 +2461,8 @@ bool PPCTargetLowering::SelectAddressRegReg(SDValue N, SDValue &Base,
     Index = N.getOperand(1);
     return true;
   } else if (N.getOpcode() == ISD::OR) {
-    if (isIntS16Immediate(N.getOperand(1), imm) &&
-        (!EncodingAlignment || !(imm % EncodingAlignment)))
+    if (isIntS16Immediate(N.getOperand(1), Imm) &&
+        (!EncodingAlignment || isAligned(*EncodingAlignment, Imm)))
       return false; // r+i can fold it if we can.
 
     // If this is an or of disjoint bitfields, we can codegen this as an add
@@ -2416,8 +2517,7 @@ static void fixupFuncForFI(SelectionDAG &DAG, int FrameIdx, EVT VT) {
   MachineFunction &MF = DAG.getMachineFunction();
   MachineFrameInfo &MFI = MF.getFrameInfo();
 
-  unsigned Align = MFI.getObjectAlignment(FrameIdx);
-  if (Align >= 4)
+  if (MFI.getObjectAlign(FrameIdx) >= Align(4))
     return;
 
   PPCFunctionInfo *FuncInfo = MF.getInfo<PPCFunctionInfo>();
@@ -2428,12 +2528,17 @@ static void fixupFuncForFI(SelectionDAG &DAG, int FrameIdx, EVT VT) {
 /// a signed 16-bit displacement [r+imm], and if it is not better
 /// represented as reg+reg.  If \p EncodingAlignment is non-zero, only accept
 /// displacements that are multiples of that value.
-bool PPCTargetLowering::SelectAddressRegImm(SDValue N, SDValue &Disp,
-                                            SDValue &Base,
-                                            SelectionDAG &DAG,
-                                            unsigned EncodingAlignment) const {
+bool PPCTargetLowering::SelectAddressRegImm(
+    SDValue N, SDValue &Disp, SDValue &Base, SelectionDAG &DAG,
+    MaybeAlign EncodingAlignment) const {
   // FIXME dl should come from parent load or store, not from address
   SDLoc dl(N);
+
+  // If we have a PC Relative target flag don't select as [reg+imm]. It will be
+  // a [pc+imm].
+  if (SelectAddressPCRel(N, Base))
+    return false;
+
   // If this can be more profitably realized as r+r, fail.
   if (SelectAddressRegReg(N, Disp, Base, DAG, EncodingAlignment))
     return false;
@@ -2441,7 +2546,7 @@ bool PPCTargetLowering::SelectAddressRegImm(SDValue N, SDValue &Disp,
   if (N.getOpcode() == ISD::ADD) {
     int16_t imm = 0;
     if (isIntS16Immediate(N.getOperand(1), imm) &&
-        (!EncodingAlignment || (imm % EncodingAlignment) == 0)) {
+        (!EncodingAlignment || isAligned(*EncodingAlignment, imm))) {
       Disp = DAG.getTargetConstant(imm, dl, N.getValueType());
       if (FrameIndexSDNode *FI = dyn_cast<FrameIndexSDNode>(N.getOperand(0))) {
         Base = DAG.getTargetFrameIndex(FI->getIndex(), N.getValueType());
@@ -2465,7 +2570,7 @@ bool PPCTargetLowering::SelectAddressRegImm(SDValue N, SDValue &Disp,
   } else if (N.getOpcode() == ISD::OR) {
     int16_t imm = 0;
     if (isIntS16Immediate(N.getOperand(1), imm) &&
-        (!EncodingAlignment || (imm % EncodingAlignment) == 0)) {
+        (!EncodingAlignment || isAligned(*EncodingAlignment, imm))) {
       // If this is an or of disjoint bitfields, we can codegen this as an add
       // (for better address arithmetic) if the LHS and RHS of the OR are
       // provably disjoint.
@@ -2492,7 +2597,7 @@ bool PPCTargetLowering::SelectAddressRegImm(SDValue N, SDValue &Disp,
     // this as "d, 0"
     int16_t Imm;
     if (isIntS16Immediate(CN, Imm) &&
-        (!EncodingAlignment || (Imm % EncodingAlignment) == 0)) {
+        (!EncodingAlignment || isAligned(*EncodingAlignment, Imm))) {
       Disp = DAG.getTargetConstant(Imm, dl, CN->getValueType(0));
       Base = DAG.getRegister(Subtarget.isPPC64() ? PPC::ZERO8 : PPC::ZERO,
                              CN->getValueType(0));
@@ -2502,7 +2607,8 @@ bool PPCTargetLowering::SelectAddressRegImm(SDValue N, SDValue &Disp,
     // Handle 32-bit sext immediates with LIS + addr mode.
     if ((CN->getValueType(0) == MVT::i32 ||
          (int64_t)CN->getZExtValue() == (int)CN->getZExtValue()) &&
-        (!EncodingAlignment || (CN->getZExtValue() % EncodingAlignment) == 0)) {
+        (!EncodingAlignment ||
+         isAligned(*EncodingAlignment, CN->getZExtValue()))) {
       int Addr = (int)CN->getZExtValue();
 
       // Otherwise, break this down into an LIS + disp.
@@ -2557,6 +2663,27 @@ bool PPCTargetLowering::SelectAddressRegRegOnly(SDValue N, SDValue &Base,
   return true;
 }
 
+template <typename Ty> static bool isValidPCRelNode(SDValue N) {
+  Ty *PCRelCand = dyn_cast<Ty>(N);
+  return PCRelCand && (PCRelCand->getTargetFlags() & PPCII::MO_PCREL_FLAG);
+}
+
+/// Returns true if this address is a PC Relative address.
+/// PC Relative addresses are marked with the flag PPCII::MO_PCREL_FLAG
+/// or if the node opcode is PPCISD::MAT_PCREL_ADDR.
+bool PPCTargetLowering::SelectAddressPCRel(SDValue N, SDValue &Base) const {
+  // This is a materialize PC Relative node. Always select this as PC Relative.
+  Base = N;
+  if (N.getOpcode() == PPCISD::MAT_PCREL_ADDR)
+    return true;
+  if (isValidPCRelNode<ConstantPoolSDNode>(N) ||
+      isValidPCRelNode<GlobalAddressSDNode>(N) ||
+      isValidPCRelNode<JumpTableSDNode>(N) ||
+      isValidPCRelNode<BlockAddressSDNode>(N))
+    return true;
+  return false;
+}
+
 /// Returns true if we should use a direct load into vector instruction
 /// (such as lxsd or lfd), instead of a load into gpr + direct move sequence.
 static bool usePartialVectorLoads(SDNode *N, const PPCSubtarget& ST) {
@@ -2594,7 +2721,8 @@ static bool usePartialVectorLoads(SDNode *N, const PPCSubtarget& ST) {
   for (SDNode::use_iterator UI = LD->use_begin(), UE = LD->use_end();
        UI != UE; ++UI)
     if (UI.getUse().get().getResNo() == 0 &&
-        UI->getOpcode() != ISD::SCALAR_TO_VECTOR)
+        UI->getOpcode() != ISD::SCALAR_TO_VECTOR &&
+        UI->getOpcode() != PPCISD::SCALAR_TO_VECTOR_PERMUTED)
       return false;
 
   return true;
@@ -2667,14 +2795,14 @@ bool PPCTargetLowering::getPreIndexedAddressParts(SDNode *N, SDValue &Base,
 
   // LDU/STU can only handle immediates that are a multiple of 4.
   if (VT != MVT::i64) {
-    if (!SelectAddressRegImm(Ptr, Offset, Base, DAG, 0))
+    if (!SelectAddressRegImm(Ptr, Offset, Base, DAG, None))
       return false;
   } else {
     // LDU/STU need an address with at least 4-byte alignment.
     if (Alignment < 4)
       return false;
 
-    if (!SelectAddressRegImm(Ptr, Offset, Base, DAG, 4))
+    if (!SelectAddressRegImm(Ptr, Offset, Base, DAG, Align(4)))
       return false;
   }
 
@@ -2708,18 +2836,6 @@ static void getLabelAccessInfo(bool IsPIC, const PPCSubtarget &Subtarget,
     HiOpFlags |= PPCII::MO_PIC_FLAG;
     LoOpFlags |= PPCII::MO_PIC_FLAG;
   }
-
-  // If this is a reference to a global value that requires a non-lazy-ptr, make
-  // sure that instruction lowering adds it.
-  if (GV && Subtarget.hasLazyResolverStub(GV)) {
-    HiOpFlags |= PPCII::MO_NLP_FLAG;
-    LoOpFlags |= PPCII::MO_NLP_FLAG;
-
-    if (GV->hasHiddenVisibility()) {
-      HiOpFlags |= PPCII::MO_NLP_HIDDEN_FLAG;
-      LoOpFlags |= PPCII::MO_NLP_HIDDEN_FLAG;
-    }
-  }
 }
 
 static SDValue LowerLabelRef(SDValue HiPart, SDValue LoPart, bool isPIC,
@@ -2761,7 +2877,7 @@ SDValue PPCTargetLowering::getTOCEntry(SelectionDAG &DAG, const SDLoc &dl,
   SDValue Ops[] = { GA, Reg };
   return DAG.getMemIntrinsicNode(
       PPCISD::TOC_ENTRY, dl, DAG.getVTList(VT, MVT::Other), Ops, VT,
-      MachinePointerInfo::getGOT(DAG.getMachineFunction()), 0,
+      MachinePointerInfo::getGOT(DAG.getMachineFunction()), None,
       MachineMemOperand::MOLoad);
 }
 
@@ -2774,8 +2890,15 @@ SDValue PPCTargetLowering::LowerConstantPool(SDValue Op,
   // 64-bit SVR4 ABI and AIX ABI code are always position-independent.
   // The actual address of the GlobalValue is stored in the TOC.
   if (Subtarget.is64BitELFABI() || Subtarget.isAIXABI()) {
+    if (Subtarget.isUsingPCRelativeCalls()) {
+      SDLoc DL(CP);
+      EVT Ty = getPointerTy(DAG.getDataLayout());
+      SDValue ConstPool = DAG.getTargetConstantPool(
+          C, Ty, CP->getAlign(), CP->getOffset(), PPCII::MO_PCREL_FLAG);
+      return DAG.getNode(PPCISD::MAT_PCREL_ADDR, DL, Ty, ConstPool);
+    }
     setUsesTOCBasePtr(DAG);
-    SDValue GA = DAG.getTargetConstantPool(C, PtrVT, CP->getAlignment(), 0);
+    SDValue GA = DAG.getTargetConstantPool(C, PtrVT, CP->getAlign(), 0);
     return getTOCEntry(DAG, SDLoc(CP), GA);
   }
 
@@ -2784,15 +2907,15 @@ SDValue PPCTargetLowering::LowerConstantPool(SDValue Op,
   getLabelAccessInfo(IsPIC, Subtarget, MOHiFlag, MOLoFlag);
 
   if (IsPIC && Subtarget.isSVR4ABI()) {
-    SDValue GA = DAG.getTargetConstantPool(C, PtrVT, CP->getAlignment(),
-                                           PPCII::MO_PIC_FLAG);
+    SDValue GA =
+        DAG.getTargetConstantPool(C, PtrVT, CP->getAlign(), PPCII::MO_PIC_FLAG);
     return getTOCEntry(DAG, SDLoc(CP), GA);
   }
 
   SDValue CPIHi =
-    DAG.getTargetConstantPool(C, PtrVT, CP->getAlignment(), 0, MOHiFlag);
+      DAG.getTargetConstantPool(C, PtrVT, CP->getAlign(), 0, MOHiFlag);
   SDValue CPILo =
-    DAG.getTargetConstantPool(C, PtrVT, CP->getAlignment(), 0, MOLoFlag);
+      DAG.getTargetConstantPool(C, PtrVT, CP->getAlign(), 0, MOLoFlag);
   return LowerLabelRef(CPIHi, CPILo, IsPIC, DAG);
 }
 
@@ -2849,6 +2972,16 @@ SDValue PPCTargetLowering::LowerJumpTable(SDValue Op, SelectionDAG &DAG) const {
   EVT PtrVT = Op.getValueType();
   JumpTableSDNode *JT = cast<JumpTableSDNode>(Op);
 
+  // isUsingPCRelativeCalls() returns true when PCRelative is enabled
+  if (Subtarget.isUsingPCRelativeCalls()) {
+    SDLoc DL(JT);
+    EVT Ty = getPointerTy(DAG.getDataLayout());
+    SDValue GA =
+        DAG.getTargetJumpTable(JT->getIndex(), Ty, PPCII::MO_PCREL_FLAG);
+    SDValue MatAddr = DAG.getNode(PPCISD::MAT_PCREL_ADDR, DL, Ty, GA);
+    return MatAddr;
+  }
+
   // 64-bit SVR4 ABI and AIX ABI code are always position-independent.
   // The actual address of the GlobalValue is stored in the TOC.
   if (Subtarget.is64BitELFABI() || Subtarget.isAIXABI()) {
@@ -2878,6 +3011,16 @@ SDValue PPCTargetLowering::LowerBlockAddress(SDValue Op,
   BlockAddressSDNode *BASDN = cast<BlockAddressSDNode>(Op);
   const BlockAddress *BA = BASDN->getBlockAddress();
 
+  // isUsingPCRelativeCalls() returns true when PCRelative is enabled
+  if (Subtarget.isUsingPCRelativeCalls()) {
+    SDLoc DL(BASDN);
+    EVT Ty = getPointerTy(DAG.getDataLayout());
+    SDValue GA = DAG.getTargetBlockAddress(BA, Ty, BASDN->getOffset(),
+                                           PPCII::MO_PCREL_FLAG);
+    SDValue MatAddr = DAG.getNode(PPCISD::MAT_PCREL_ADDR, DL, Ty, GA);
+    return MatAddr;
+  }
+
   // 64-bit SVR4 ABI and AIX ABI code are always position-independent.
   // The actual BlockAddress is stored in the TOC.
   if (Subtarget.is64BitELFABI() || Subtarget.isAIXABI()) {
@@ -3007,6 +3150,22 @@ SDValue PPCTargetLowering::LowerGlobalAddress(SDValue Op,
   // 64-bit SVR4 ABI & AIX ABI code is always position-independent.
   // The actual address of the GlobalValue is stored in the TOC.
   if (Subtarget.is64BitELFABI() || Subtarget.isAIXABI()) {
+    if (Subtarget.isUsingPCRelativeCalls()) {
+      EVT Ty = getPointerTy(DAG.getDataLayout());
+      if (isAccessedAsGotIndirect(Op)) {
+        SDValue GA = DAG.getTargetGlobalAddress(GV, DL, Ty, GSDN->getOffset(),
+                                                PPCII::MO_PCREL_FLAG |
+                                                    PPCII::MO_GOT_FLAG);
+        SDValue MatPCRel = DAG.getNode(PPCISD::MAT_PCREL_ADDR, DL, Ty, GA);
+        SDValue Load = DAG.getLoad(MVT::i64, DL, DAG.getEntryNode(), MatPCRel,
+                                   MachinePointerInfo());
+        return Load;
+      } else {
+        SDValue GA = DAG.getTargetGlobalAddress(GV, DL, Ty, GSDN->getOffset(),
+                                                PPCII::MO_PCREL_FLAG);
+        return DAG.getNode(PPCISD::MAT_PCREL_ADDR, DL, Ty, GA);
+      }
+    }
     setUsesTOCBasePtr(DAG);
     SDValue GA = DAG.getTargetGlobalAddress(GV, DL, PtrVT, GSDN->getOffset());
     return getTOCEntry(DAG, DL, GA);
@@ -3028,13 +3187,7 @@ SDValue PPCTargetLowering::LowerGlobalAddress(SDValue Op,
   SDValue GALo =
     DAG.getTargetGlobalAddress(GV, DL, PtrVT, GSDN->getOffset(), MOLoFlag);
 
-  SDValue Ptr = LowerLabelRef(GAHi, GALo, IsPIC, DAG);
-
-  // If the global reference is actually to a non-lazy-pointer, we have to do an
-  // extra load to get the address of the global.
-  if (MOHiFlag & PPCII::MO_NLP_FLAG)
-    Ptr = DAG.getLoad(PtrVT, DL, DAG.getEntryNode(), Ptr, MachinePointerInfo());
-  return Ptr;
+  return LowerLabelRef(GAHi, GALo, IsPIC, DAG);
 }
 
 SDValue PPCTargetLowering::LowerSETCC(SDValue Op, SelectionDAG &DAG) const {
@@ -3195,10 +3348,10 @@ SDValue PPCTargetLowering::LowerVACOPY(SDValue Op, SelectionDAG &DAG) const {
 
   // We have to copy the entire va_list struct:
   // 2*sizeof(char) + 2 Byte alignment + 2*sizeof(char*) = 12 Byte
-  return DAG.getMemcpy(Op.getOperand(0), Op,
-                       Op.getOperand(1), Op.getOperand(2),
-                       DAG.getConstant(12, SDLoc(Op), MVT::i32), 8, false, true,
-                       false, MachinePointerInfo(), MachinePointerInfo());
+  return DAG.getMemcpy(Op.getOperand(0), Op, Op.getOperand(1), Op.getOperand(2),
+                       DAG.getConstant(12, SDLoc(Op), MVT::i32), Align(8),
+                       false, true, false, MachinePointerInfo(),
+                       MachinePointerInfo());
 }
 
 SDValue PPCTargetLowering::LowerADJUST_TRAMPOLINE(SDValue Op,
@@ -3255,7 +3408,7 @@ SDValue PPCTargetLowering::LowerVASTART(SDValue Op, SelectionDAG &DAG) const {
 
   SDLoc dl(Op);
 
-  if (Subtarget.isDarwinABI() || Subtarget.isPPC64()) {
+  if (Subtarget.isPPC64() || Subtarget.isAIXABI()) {
     // vastart just stores the address of the VarArgsFrameIndex slot into the
     // memory location argument.
     SDValue FR = DAG.getFrameIndex(FuncInfo->getVarArgsFrameIndex(), PtrVT);
@@ -3361,31 +3514,31 @@ static unsigned CalculateStackSlotSize(EVT ArgVT, ISD::ArgFlagsTy Flags,
 
 /// CalculateStackSlotAlignment - Calculates the alignment of this argument
 /// on the stack.
-static unsigned CalculateStackSlotAlignment(EVT ArgVT, EVT OrigVT,
-                                            ISD::ArgFlagsTy Flags,
-                                            unsigned PtrByteSize) {
-  unsigned Align = PtrByteSize;
+static Align CalculateStackSlotAlignment(EVT ArgVT, EVT OrigVT,
+                                         ISD::ArgFlagsTy Flags,
+                                         unsigned PtrByteSize) {
+  Align Alignment(PtrByteSize);
 
   // Altivec parameters are padded to a 16 byte boundary.
   if (ArgVT == MVT::v4f32 || ArgVT == MVT::v4i32 ||
       ArgVT == MVT::v8i16 || ArgVT == MVT::v16i8 ||
       ArgVT == MVT::v2f64 || ArgVT == MVT::v2i64 ||
       ArgVT == MVT::v1i128 || ArgVT == MVT::f128)
-    Align = 16;
+    Alignment = Align(16);
   // QPX vector types stored in double-precision are padded to a 32 byte
   // boundary.
   else if (ArgVT == MVT::v4f64 || ArgVT == MVT::v4i1)
-    Align = 32;
+    Alignment = Align(32);
 
   // ByVal parameters are aligned as requested.
   if (Flags.isByVal()) {
-    unsigned BVAlign = Flags.getByValAlign();
+    auto BVAlign = Flags.getNonZeroByValAlign();
     if (BVAlign > PtrByteSize) {
-      if (BVAlign % PtrByteSize != 0)
-          llvm_unreachable(
+      if (BVAlign.value() % PtrByteSize != 0)
+        llvm_unreachable(
             "ByVal alignment is not a multiple of the pointer size");
 
-      Align = BVAlign;
+      Alignment = BVAlign;
     }
   }
 
@@ -3395,12 +3548,12 @@ static unsigned CalculateStackSlotAlignment(EVT ArgVT, EVT OrigVT,
     // needs to be aligned to the size of the full type.  (Except for
     // ppcf128, which is only aligned as its f64 components.)
     if (Flags.isSplit() && OrigVT != MVT::ppcf128)
-      Align = OrigVT.getStoreSize();
+      Alignment = Align(OrigVT.getStoreSize());
     else
-      Align = ArgVT.getStoreSize();
+      Alignment = Align(ArgVT.getStoreSize());
   }
 
-  return Align;
+  return Alignment;
 }
 
 /// CalculateStackSlotUsed - Return whether this argument will use its
@@ -3418,9 +3571,9 @@ static bool CalculateStackSlotUsed(EVT ArgVT, EVT OrigVT,
   bool UseMemory = false;
 
   // Respect alignment of argument on the stack.
-  unsigned Align =
-    CalculateStackSlotAlignment(ArgVT, OrigVT, Flags, PtrByteSize);
-  ArgOffset = ((ArgOffset + Align - 1) / Align) * Align;
+  Align Alignment =
+      CalculateStackSlotAlignment(ArgVT, OrigVT, Flags, PtrByteSize);
+  ArgOffset = alignTo(ArgOffset, Alignment);
   // If there's no space left in the argument save area, we must
   // use memory (this check also catches zero-sized arguments).
   if (ArgOffset >= LinkageSize + ParamAreaSize)
@@ -3464,10 +3617,7 @@ static bool CalculateStackSlotUsed(EVT ArgVT, EVT OrigVT,
 /// ensure minimum alignment required for target.
 static unsigned EnsureStackAlignment(const PPCFrameLowering *Lowering,
                                      unsigned NumBytes) {
-  unsigned TargetAlign = Lowering->getStackAlignment();
-  unsigned AlignMask = TargetAlign - 1;
-  NumBytes = (NumBytes + AlignMask) & ~AlignMask;
-  return NumBytes;
+  return alignTo(NumBytes, Lowering->getStackAlign());
 }
 
 SDValue PPCTargetLowering::LowerFormalArguments(
@@ -3530,7 +3680,7 @@ SDValue PPCTargetLowering::LowerFormalArguments_32SVR4(
   // Potential tail calls could cause overwriting of argument stack slots.
   bool isImmutable = !(getTargetMachine().Options.GuaranteedTailCallOpt &&
                        (CallConv == CallingConv::Fast));
-  unsigned PtrByteSize = 4;
+  const Align PtrAlign(4);
 
   // Assign locations to all of the incoming arguments.
   SmallVector<CCValAssign, 16> ArgLocs;
@@ -3539,7 +3689,7 @@ SDValue PPCTargetLowering::LowerFormalArguments_32SVR4(
 
   // Reserve space for the linkage area on the stack.
   unsigned LinkageSize = Subtarget.getFrameLowering()->getLinkageSize();
-  CCInfo.AllocateStack(LinkageSize, PtrByteSize);
+  CCInfo.AllocateStack(LinkageSize, PtrAlign);
   if (useSoftFloat())
     CCInfo.PreAnalyzeFormalArguments(Ins);
 
@@ -3648,7 +3798,7 @@ SDValue PPCTargetLowering::LowerFormalArguments_32SVR4(
                       ByValArgLocs, *DAG.getContext());
 
   // Reserve stack space for the allocations in CCInfo.
-  CCByValInfo.AllocateStack(CCInfo.getNextStackOffset(), PtrByteSize);
+  CCByValInfo.AllocateStack(CCInfo.getNextStackOffset(), PtrAlign);
 
   CCByValInfo.AnalyzeFormalArguments(Ins, CC_PPC32_SVR4_ByVal);
 
@@ -3695,7 +3845,8 @@ SDValue PPCTargetLowering::LowerFormalArguments_32SVR4(
       MFI.CreateFixedObject(PtrVT.getSizeInBits()/8,
                             CCInfo.getNextStackOffset(), true));
 
-    FuncInfo->setVarArgsFrameIndex(MFI.CreateStackObject(Depth, 8, false));
+    FuncInfo->setVarArgsFrameIndex(
+        MFI.CreateStackObject(Depth, Align(8), false));
     SDValue FIN = DAG.getFrameIndex(FuncInfo->getVarArgsFrameIndex(), PtrVT);
 
     // The fixed integer arguments of a variadic function are stored to the
@@ -3842,11 +3993,13 @@ SDValue PPCTargetLowering::LowerFormalArguments_64SVR4(
     // We re-align the argument offset for each argument, except when using the
     // fast calling convention, when we need to make sure we do that only when
     // we'll actually use a stack slot.
-    unsigned CurArgOffset, Align;
+    unsigned CurArgOffset;
+    Align Alignment;
     auto ComputeArgOffset = [&]() {
       /* Respect alignment of argument on the stack.  */
-      Align = CalculateStackSlotAlignment(ObjectVT, OrigVT, Flags, PtrByteSize);
-      ArgOffset = ((ArgOffset + Align - 1) / Align) * Align;
+      Alignment =
+          CalculateStackSlotAlignment(ObjectVT, OrigVT, Flags, PtrByteSize);
+      ArgOffset = alignTo(ArgOffset, Alignment);
       CurArgOffset = ArgOffset;
     };
 
@@ -3894,7 +4047,7 @@ SDValue PPCTargetLowering::LowerFormalArguments_64SVR4(
           ArgSize + ArgOffset > LinkageSize + Num_GPR_Regs * PtrByteSize)
         FI = MFI.CreateFixedObject(ArgSize, ArgOffset, false, true);
       else
-        FI = MFI.CreateStackObject(ArgSize, Align, false);
+        FI = MFI.CreateStackObject(ArgSize, Alignment, false);
       SDValue FIN = DAG.getFrameIndex(FI, PtrVT);
 
       // Handle aggregates smaller than 8 bytes.
@@ -4142,7 +4295,11 @@ SDValue PPCTargetLowering::LowerFormalArguments_64SVR4(
 
   // If the function takes variable number of arguments, make a frame index for
   // the start of the first vararg value... for expansion of llvm.va_start.
-  if (isVarArg) {
+  // On ELFv2ABI spec, it writes:
+  // C programs that are intended to be *portable* across different compilers
+  // and architectures must use the header file <stdarg.h> to deal with variable
+  // argument lists.
+  if (isVarArg && MFI.hasVAStart()) {
     int Depth = ArgOffset;
 
     FuncInfo->setVarArgsFrameIndex(
@@ -4550,30 +4707,67 @@ static int CalculateTailCallSPDiff(SelectionDAG& DAG, bool isTailCall,
 
 static bool isFunctionGlobalAddress(SDValue Callee);
 
-static bool
-callsShareTOCBase(const Function *Caller, SDValue Callee,
-                    const TargetMachine &TM) {
-   // Callee is either a GlobalAddress or an ExternalSymbol. ExternalSymbols
-   // don't have enough information to determine if the caller and calle share
-   // the same  TOC base, so we have to pessimistically assume they don't for
-   // correctness.
-   GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Callee);
-   if (!G)
-     return false;
-
-   const GlobalValue *GV = G->getGlobal();
+static bool callsShareTOCBase(const Function *Caller, SDValue Callee,
+                              const TargetMachine &TM) {
+  // It does not make sense to call callsShareTOCBase() with a caller that
+  // is PC Relative since PC Relative callers do not have a TOC.
+#ifndef NDEBUG
+  const PPCSubtarget *STICaller = &TM.getSubtarget<PPCSubtarget>(*Caller);
+  assert(!STICaller->isUsingPCRelativeCalls() &&
+         "PC Relative callers do not have a TOC and cannot share a TOC Base");
+#endif
+
+  // Callee is either a GlobalAddress or an ExternalSymbol. ExternalSymbols
+  // don't have enough information to determine if the caller and callee share
+  // the same  TOC base, so we have to pessimistically assume they don't for
+  // correctness.
+  GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Callee);
+  if (!G)
+    return false;
+
+  const GlobalValue *GV = G->getGlobal();
+
+  // If the callee is preemptable, then the static linker will use a plt-stub
+  // which saves the toc to the stack, and needs a nop after the call
+  // instruction to convert to a toc-restore.
+  if (!TM.shouldAssumeDSOLocal(*Caller->getParent(), GV))
+    return false;
+
+  // Functions with PC Relative enabled may clobber the TOC in the same DSO.
+  // We may need a TOC restore in the situation where the caller requires a
+  // valid TOC but the callee is PC Relative and does not.
+  const Function *F = dyn_cast<Function>(GV);
+  const GlobalAlias *Alias = dyn_cast<GlobalAlias>(GV);
+
+  // If we have an Alias we can try to get the function from there.
+  if (Alias) {
+    const GlobalObject *GlobalObj = Alias->getBaseObject();
+    F = dyn_cast<Function>(GlobalObj);
+  }
+
+  // If we still have no valid function pointer we do not have enough
+  // information to determine if the callee uses PC Relative calls so we must
+  // assume that it does.
+  if (!F)
+    return false;
+
+  // If the callee uses PC Relative we cannot guarantee that the callee won't
+  // clobber the TOC of the caller and so we must assume that the two
+  // functions do not share a TOC base.
+  const PPCSubtarget *STICallee = &TM.getSubtarget<PPCSubtarget>(*F);
+  if (STICallee->isUsingPCRelativeCalls())
+    return false;
+
   // The medium and large code models are expected to provide a sufficiently
   // large TOC to provide all data addressing needs of a module with a
-  // single TOC. Since each module will be addressed with a single TOC then we
-  // only need to check that caller and callee don't cross dso boundaries.
+  // single TOC.
   if (CodeModel::Medium == TM.getCodeModel() ||
       CodeModel::Large == TM.getCodeModel())
-    return TM.shouldAssumeDSOLocal(*Caller->getParent(), GV);
+    return true;
 
   // Otherwise we need to ensure callee and caller are in the same section,
   // since the linker may allocate multiple TOCs, and we don't know which
   // sections will belong to the same TOC base.
-
   if (!GV->isStrongDefinitionForLinker())
     return false;
 
@@ -4588,26 +4782,6 @@ callsShareTOCBase(const Function *Caller, SDValue Callee,
       return false;
   }
 
-  // If the callee might be interposed, then we can't assume the ultimate call
-  // target will be in the same section. Even in cases where we can assume that
-  // interposition won't happen, in any case where the linker might insert a
-  // stub to allow for interposition, we must generate code as though
-  // interposition might occur. To understand why this matters, consider a
-  // situation where: a -> b -> c where the arrows indicate calls. b and c are
-  // in the same section, but a is in a different module (i.e. has a different
-  // TOC base pointer). If the linker allows for interposition between b and c,
-  // then it will generate a stub for the call edge between b and c which will
-  // save the TOC pointer into the designated stack slot allocated by b. If we
-  // return true here, and therefore allow a tail call between b and c, that
-  // stack slot won't exist and the b -> c stub will end up saving b'c TOC base
-  // pointer into the stack slot allocated by a (where the a -> b stub saved
-  // a's TOC base pointer). If we're not considering a tail call, but rather,
-  // whether a nop is needed after the call instruction in b, because the linker
-  // will insert a stub, it might complain about a missing nop if we omit it
-  // (although many don't complain in this case).
-  if (!TM.shouldAssumeDSOLocal(*Caller->getParent(), GV))
-    return false;
-
   return true;
 }
 
@@ -4649,13 +4823,12 @@ needStackSlotPassParameters(const PPCSubtarget &Subtarget,
   return false;
 }
 
-static bool
-hasSameArgumentList(const Function *CallerFn, ImmutableCallSite CS) {
-  if (CS.arg_size() != CallerFn->arg_size())
+static bool hasSameArgumentList(const Function *CallerFn, const CallBase &CB) {
+  if (CB.arg_size() != CallerFn->arg_size())
     return false;
 
-  ImmutableCallSite::arg_iterator CalleeArgIter = CS.arg_begin();
-  ImmutableCallSite::arg_iterator CalleeArgEnd = CS.arg_end();
+  auto CalleeArgIter = CB.arg_begin();
+  auto CalleeArgEnd = CB.arg_end();
   Function::const_arg_iterator CallerArgIter = CallerFn->arg_begin();
 
   for (; CalleeArgIter != CalleeArgEnd; ++CalleeArgIter, ++CallerArgIter) {
@@ -4697,15 +4870,10 @@ areCallingConvEligibleForTCO_64SVR4(CallingConv::ID CallerCC,
   return CallerCC == CallingConv::C || CallerCC == CalleeCC;
 }
 
-bool
-PPCTargetLowering::IsEligibleForTailCallOptimization_64SVR4(
-                                    SDValue Callee,
-                                    CallingConv::ID CalleeCC,
-                                    ImmutableCallSite CS,
-                                    bool isVarArg,
-                                    const SmallVectorImpl<ISD::OutputArg> &Outs,
-                                    const SmallVectorImpl<ISD::InputArg> &Ins,
-                                    SelectionDAG& DAG) const {
+bool PPCTargetLowering::IsEligibleForTailCallOptimization_64SVR4(
+    SDValue Callee, CallingConv::ID CalleeCC, const CallBase *CB, bool isVarArg,
+    const SmallVectorImpl<ISD::OutputArg> &Outs,
+    const SmallVectorImpl<ISD::InputArg> &Ins, SelectionDAG &DAG) const {
   bool TailCallOpt = getTargetMachine().Options.GuaranteedTailCallOpt;
 
   if (DisableSCO && !TailCallOpt) return false;
@@ -4747,15 +4915,22 @@ PPCTargetLowering::IsEligibleForTailCallOptimization_64SVR4(
       needStackSlotPassParameters(Subtarget, Outs))
     return false;
 
-  // No TCO/SCO on indirect call because Caller have to restore its TOC
-  if (!isFunctionGlobalAddress(Callee) &&
-      !isa<ExternalSymbolSDNode>(Callee))
+  // All variants of 64-bit ELF ABIs without PC-Relative addressing require that
+  // the caller and callee share the same TOC for TCO/SCO. If the caller and
+  // callee potentially have different TOC bases then we cannot tail call since
+  // we need to restore the TOC pointer after the call.
+  // ref: https://bugzilla.mozilla.org/show_bug.cgi?id=973977
+  // We cannot guarantee this for indirect calls or calls to external functions.
+  // When PC-Relative addressing is used, the concept of the TOC is no longer
+  // applicable so this check is not required.
+  // Check first for indirect calls.
+  if (!Subtarget.isUsingPCRelativeCalls() &&
+      !isFunctionGlobalAddress(Callee) && !isa<ExternalSymbolSDNode>(Callee))
     return false;
 
-  // If the caller and callee potentially have different TOC bases then we
-  // cannot tail call since we need to restore the TOC pointer after the call.
-  // ref: https://bugzilla.mozilla.org/show_bug.cgi?id=973977
-  if (!callsShareTOCBase(&Caller, Callee, getTargetMachine()))
+  // Check if we share the TOC base.
+  if (!Subtarget.isUsingPCRelativeCalls() &&
+      !callsShareTOCBase(&Caller, Callee, getTargetMachine()))
     return false;
 
   // TCO allows altering callee ABI, so we don't have to check further.
@@ -4767,10 +4942,14 @@ PPCTargetLowering::IsEligibleForTailCallOptimization_64SVR4(
   // If callee use the same argument list that caller is using, then we can
   // apply SCO on this case. If it is not, then we need to check if callee needs
   // stack for passing arguments.
-  if (!hasSameArgumentList(&Caller, CS) &&
-      needStackSlotPassParameters(Subtarget, Outs)) {
+  // PC Relative tail calls may not have a CallBase.
+  // If there is no CallBase we cannot verify if we have the same argument
+  // list so assume that we don't have the same argument list.
+  if (CB && !hasSameArgumentList(&Caller, *CB) &&
+      needStackSlotPassParameters(Subtarget, Outs))
+    return false;
+  else if (!CB && needStackSlotPassParameters(Subtarget, Outs))
     return false;
-  }
 
   return true;
 }
@@ -4879,18 +5058,6 @@ static SDValue EmitTailCallStoreFPAndRetAddr(SelectionDAG &DAG, SDValue Chain,
     SDValue NewRetAddrFrIdx = DAG.getFrameIndex(NewRetAddr, VT);
     Chain = DAG.getStore(Chain, dl, OldRetAddr, NewRetAddrFrIdx,
                          MachinePointerInfo::getFixedStack(MF, NewRetAddr));
-
-    // When using the 32/64-bit SVR4 ABI there is no need to move the FP stack
-    // slot as the FP is never overwritten.
-    if (Subtarget.isDarwinABI()) {
-      int NewFPLoc = SPDiff + FL->getFramePointerSaveOffset();
-      int NewFPIdx = MF.getFrameInfo().CreateFixedObject(SlotSize, NewFPLoc,
-                                                         true);
-      SDValue NewFramePtrIdx = DAG.getFrameIndex(NewFPIdx, VT);
-      Chain = DAG.getStore(Chain, dl, OldFP, NewFramePtrIdx,
-                           MachinePointerInfo::getFixedStack(
-                               DAG.getMachineFunction(), NewFPIdx));
-    }
   }
   return Chain;
 }
@@ -4925,14 +5092,6 @@ SDValue PPCTargetLowering::EmitTailCallLoadFPAndRetAddr(
     LROpOut = getReturnAddrFrameIndex(DAG);
     LROpOut = DAG.getLoad(VT, dl, Chain, LROpOut, MachinePointerInfo());
     Chain = SDValue(LROpOut.getNode(), 1);
-
-    // When using the 32/64-bit SVR4 ABI there is no need to load the FP stack
-    // slot as the FP is never overwritten.
-    if (Subtarget.isDarwinABI()) {
-      FPOpOut = getFramePointerFrameIndex(DAG);
-      FPOpOut = DAG.getLoad(VT, dl, Chain, FPOpOut, MachinePointerInfo());
-      Chain = SDValue(FPOpOut.getNode(), 1);
-    }
   }
   return Chain;
 }
@@ -4947,9 +5106,9 @@ static SDValue CreateCopyOfByValArgument(SDValue Src, SDValue Dst,
                                          SDValue Chain, ISD::ArgFlagsTy Flags,
                                          SelectionDAG &DAG, const SDLoc &dl) {
   SDValue SizeNode = DAG.getConstant(Flags.getByValSize(), dl, MVT::i32);
-  return DAG.getMemcpy(Chain, dl, Dst, Src, SizeNode, Flags.getByValAlign(),
-                       false, false, false, MachinePointerInfo(),
-                       MachinePointerInfo());
+  return DAG.getMemcpy(Chain, dl, Dst, Src, SizeNode,
+                       Flags.getNonZeroByValAlign(), false, false, false,
+                       MachinePointerInfo(), MachinePointerInfo());
 }
 
 /// LowerMemOpCallTo - Store the argument to the stack or remember it in case of
@@ -5100,28 +5259,37 @@ static bool isIndirectCall(const SDValue &Callee, SelectionDAG &DAG,
   return true;
 }
 
-static unsigned getCallOpcode(bool isIndirectCall, bool isPatchPoint,
-                              bool isTailCall, const Function &Caller,
+// AIX and 64-bit ELF ABIs w/o PCRel require a TOC save/restore around calls.
+static inline bool isTOCSaveRestoreRequired(const PPCSubtarget &Subtarget) {
+  return Subtarget.isAIXABI() ||
+         (Subtarget.is64BitELFABI() && !Subtarget.isUsingPCRelativeCalls());
+}
+
+static unsigned getCallOpcode(PPCTargetLowering::CallFlags CFlags,
+                              const Function &Caller,
                               const SDValue &Callee,
                               const PPCSubtarget &Subtarget,
                               const TargetMachine &TM) {
-  if (isTailCall)
+  if (CFlags.IsTailCall)
     return PPCISD::TC_RETURN;
 
   // This is a call through a function pointer.
-  if (isIndirectCall) {
+  if (CFlags.IsIndirect) {
     // AIX and the 64-bit ELF ABIs need to maintain the TOC pointer accross
     // indirect calls. The save of the caller's TOC pointer to the stack will be
     // inserted into the DAG as part of call lowering. The restore of the TOC
     // pointer is modeled by using a pseudo instruction for the call opcode that
     // represents the 2 instruction sequence of an indirect branch and link,
     // immediately followed by a load of the TOC pointer from the the stack save
-    // slot into gpr2.
-    if (Subtarget.isAIXABI() || Subtarget.is64BitELFABI())
-      return PPCISD::BCTRL_LOAD_TOC;
+    // slot into gpr2. For 64-bit ELFv2 ABI with PCRel, do not restore the TOC
+    // as it is not saved or used.
+    return isTOCSaveRestoreRequired(Subtarget) ? PPCISD::BCTRL_LOAD_TOC
+                                               : PPCISD::BCTRL;
+  }
 
-    // An indirect call that does not need a TOC restore.
-    return PPCISD::BCTRL;
+  if (Subtarget.isUsingPCRelativeCalls()) {
+    assert(Subtarget.is64BitELFABI() && "PC Relative is only on ELF ABI.");
+    return PPCISD::CALL_NOTOC;
   }
 
   // The ABIs that maintain a TOC pointer accross calls need to have a nop
@@ -5139,14 +5307,6 @@ static unsigned getCallOpcode(bool isIndirectCall, bool isPatchPoint,
   return PPCISD::CALL;
 }
 
-static bool isValidAIXExternalSymSDNode(StringRef SymName) {
-  return StringSwitch<bool>(SymName)
-      .Cases("__divdi3", "__fixunsdfdi", "__floatundidf", "__floatundisf",
-             "__moddi3", "__udivdi3", "__umoddi3", true)
-      .Cases("ceil", "floor", "memcpy", "memmove", "memset", "round", true)
-      .Default(false);
-}
-
 static SDValue transformCallee(const SDValue &Callee, SelectionDAG &DAG,
                                const SDLoc &dl, const PPCSubtarget &Subtarget) {
   if (!Subtarget.usesFunctionDescriptors() && !Subtarget.isELFv2ABI())
@@ -5182,14 +5342,14 @@ static SDValue transformCallee(const SDValue &Callee, SelectionDAG &DAG,
         MCSymbolXCOFF *S = cast<MCSymbolXCOFF>(
             Context.getOrCreateSymbol(Twine(".") + Twine(FuncName)));
 
-        if (IsDeclaration && !S->hasContainingCsect()) {
+        if (IsDeclaration && !S->hasRepresentedCsectSet()) {
           // On AIX, an undefined symbol needs to be associated with a
           // MCSectionXCOFF to get the correct storage mapping class.
           // In this case, XCOFF::XMC_PR.
           MCSectionXCOFF *Sec = Context.getXCOFFSection(
-              S->getName(), XCOFF::XMC_PR, XCOFF::XTY_ER, SC,
+              S->getSymbolTableName(), XCOFF::XMC_PR, XCOFF::XTY_ER, SC,
               SectionKind::getMetadata());
-          S->setContainingCsect(Sec);
+          S->setRepresentedCsect(Sec);
         }
 
         MVT PtrVT =
@@ -5230,12 +5390,7 @@ static SDValue transformCallee(const SDValue &Callee, SelectionDAG &DAG,
                                               SC);
     }
 
-    // TODO: Remove this when the support for ExternalSymbolSDNode is complete.
-    if (isValidAIXExternalSymSDNode(SymName)) {
-      return getAIXFuncEntryPointSymbolSDNode(SymName, true, XCOFF::C_EXT);
-    }
-
-    report_fatal_error("Unexpected ExternalSymbolSDNode: " + Twine(SymName));
+    return getAIXFuncEntryPointSymbolSDNode(SymName, true, XCOFF::C_EXT);
   }
 
   // No transformation needed.
@@ -5273,7 +5428,7 @@ static void prepareIndirectCall(SelectionDAG &DAG, SDValue &Callee,
 static void prepareDescriptorIndirectCall(SelectionDAG &DAG, SDValue &Callee,
                                           SDValue &Glue, SDValue &Chain,
                                           SDValue CallSeqStart,
-                                          ImmutableCallSite CS, const SDLoc &dl,
+                                          const CallBase *CB, const SDLoc &dl,
                                           bool hasNest,
                                           const PPCSubtarget &Subtarget) {
   // Function pointers in the 64-bit SVR4 ABI do not point to the function
@@ -5309,7 +5464,7 @@ static void prepareDescriptorIndirectCall(SelectionDAG &DAG, SDValue &Callee,
                          MachineMemOperand::MOInvariant)
                       : MachineMemOperand::MONone;
 
-  MachinePointerInfo MPI(CS ? CS.getCalledValue() : nullptr);
+  MachinePointerInfo MPI(CB ? CB->getCalledOperand() : nullptr);
 
   // Registers used in building the DAG.
   const MCRegister EnvPtrReg = Subtarget.getEnvironmentPointerRegister();
@@ -5363,12 +5518,12 @@ static void prepareDescriptorIndirectCall(SelectionDAG &DAG, SDValue &Callee,
 }
 
 static void
-buildCallOperands(SmallVectorImpl<SDValue> &Ops, CallingConv::ID CallConv,
-                  const SDLoc &dl, bool isTailCall, bool isVarArg,
-                  bool isPatchPoint, bool hasNest, SelectionDAG &DAG,
+buildCallOperands(SmallVectorImpl<SDValue> &Ops,
+                  PPCTargetLowering::CallFlags CFlags, const SDLoc &dl,
+                  SelectionDAG &DAG,
                   SmallVector<std::pair<unsigned, SDValue>, 8> &RegsToPass,
                   SDValue Glue, SDValue Chain, SDValue &Callee, int SPDiff,
-                  const PPCSubtarget &Subtarget, bool isIndirect) {
+                  const PPCSubtarget &Subtarget) {
   const bool IsPPC64 = Subtarget.isPPC64();
   // MVT for a general purpose register.
   const MVT RegVT = IsPPC64 ? MVT::i64 : MVT::i32;
@@ -5377,10 +5532,10 @@ buildCallOperands(SmallVectorImpl<SDValue> &Ops, CallingConv::ID CallConv,
   Ops.push_back(Chain);
 
   // If it's a direct call pass the callee as the second operand.
-  if (!isIndirect)
+  if (!CFlags.IsIndirect)
     Ops.push_back(Callee);
   else {
-    assert(!isPatchPoint && "Patch point call are not indirect.");
+    assert(!CFlags.IsPatchPoint && "Patch point calls are not indirect.");
 
     // For the TOC based ABIs, we have saved the TOC pointer to the linkage area
     // on the stack (this would have been done in `LowerCall_64SVR4` or
@@ -5389,7 +5544,9 @@ buildCallOperands(SmallVectorImpl<SDValue> &Ops, CallingConv::ID CallConv,
     // pointer from the linkage area. The operand for the TOC restore is an add
     // of the TOC save offset to the stack pointer. This must be the second
     // operand: after the chain input but before any other variadic arguments.
-    if (Subtarget.is64BitELFABI() || Subtarget.isAIXABI()) {
+    // For 64-bit ELFv2 ABI with PCRel, do not restore the TOC as it is not
+    // saved or used.
+    if (isTOCSaveRestoreRequired(Subtarget)) {
       const MCRegister StackPtrReg = Subtarget.getStackPointerRegister();
 
       SDValue StackPtr = DAG.getRegister(StackPtrReg, RegVT);
@@ -5400,18 +5557,18 @@ buildCallOperands(SmallVectorImpl<SDValue> &Ops, CallingConv::ID CallConv,
     }
 
     // Add the register used for the environment pointer.
-    if (Subtarget.usesFunctionDescriptors() && !hasNest)
+    if (Subtarget.usesFunctionDescriptors() && !CFlags.HasNest)
       Ops.push_back(DAG.getRegister(Subtarget.getEnvironmentPointerRegister(),
                                     RegVT));
 
 
     // Add CTR register as callee so a bctr can be emitted later.
-    if (isTailCall)
+    if (CFlags.IsTailCall)
       Ops.push_back(DAG.getRegister(IsPPC64 ? PPC::CTR8 : PPC::CTR, RegVT));
   }
 
   // If this is a tail call add stack pointer delta.
-  if (isTailCall)
+  if (CFlags.IsTailCall)
     Ops.push_back(DAG.getConstant(SPDiff, dl, MVT::i32));
 
   // Add argument registers to the end of the list so that they are known live
@@ -5423,17 +5580,18 @@ buildCallOperands(SmallVectorImpl<SDValue> &Ops, CallingConv::ID CallConv,
   // We cannot add R2/X2 as an operand here for PATCHPOINT, because there is
   // no way to mark dependencies as implicit here.
   // We will add the R2/X2 dependency in EmitInstrWithCustomInserter.
-  if ((Subtarget.is64BitELFABI() || Subtarget.isAIXABI()) && !isPatchPoint)
+  if ((Subtarget.is64BitELFABI() || Subtarget.isAIXABI()) &&
+       !CFlags.IsPatchPoint && !Subtarget.isUsingPCRelativeCalls())
     Ops.push_back(DAG.getRegister(Subtarget.getTOCPointerRegister(), RegVT));
 
   // Add implicit use of CR bit 6 for 32-bit SVR4 vararg calls
-  if (isVarArg && Subtarget.is32BitELFABI())
+  if (CFlags.IsVarArg && Subtarget.is32BitELFABI())
     Ops.push_back(DAG.getRegister(PPC::CR1EQ, MVT::i32));
 
   // Add a register mask operand representing the call-preserved registers.
   const TargetRegisterInfo *TRI = Subtarget.getRegisterInfo();
   const uint32_t *Mask =
-      TRI->getCallPreservedMask(DAG.getMachineFunction(), CallConv);
+      TRI->getCallPreservedMask(DAG.getMachineFunction(), CFlags.CallConv);
   assert(Mask && "Missing call preserved mask for calling convention");
   Ops.push_back(DAG.getRegisterMask(Mask));
 
@@ -5443,44 +5601,47 @@ buildCallOperands(SmallVectorImpl<SDValue> &Ops, CallingConv::ID CallConv,
 }
 
 SDValue PPCTargetLowering::FinishCall(
-    CallingConv::ID CallConv, const SDLoc &dl, bool isTailCall, bool isVarArg,
-    bool isPatchPoint, bool hasNest, SelectionDAG &DAG,
+    CallFlags CFlags, const SDLoc &dl, SelectionDAG &DAG,
     SmallVector<std::pair<unsigned, SDValue>, 8> &RegsToPass, SDValue Glue,
     SDValue Chain, SDValue CallSeqStart, SDValue &Callee, int SPDiff,
     unsigned NumBytes, const SmallVectorImpl<ISD::InputArg> &Ins,
-    SmallVectorImpl<SDValue> &InVals, ImmutableCallSite CS) const {
+    SmallVectorImpl<SDValue> &InVals, const CallBase *CB) const {
 
-  if (Subtarget.is64BitELFABI() || Subtarget.isAIXABI())
+  if ((Subtarget.is64BitELFABI() && !Subtarget.isUsingPCRelativeCalls()) ||
+      Subtarget.isAIXABI())
     setUsesTOCBasePtr(DAG);
 
-  const bool isIndirect = isIndirectCall(Callee, DAG, Subtarget, isPatchPoint);
-  unsigned CallOpc = getCallOpcode(isIndirect, isPatchPoint, isTailCall,
-                                   DAG.getMachineFunction().getFunction(),
-                                   Callee, Subtarget, DAG.getTarget());
+  unsigned CallOpc =
+      getCallOpcode(CFlags, DAG.getMachineFunction().getFunction(), Callee,
+                    Subtarget, DAG.getTarget());
 
-  if (!isIndirect)
+  if (!CFlags.IsIndirect)
     Callee = transformCallee(Callee, DAG, dl, Subtarget);
   else if (Subtarget.usesFunctionDescriptors())
-    prepareDescriptorIndirectCall(DAG, Callee, Glue, Chain, CallSeqStart, CS,
-                                  dl, hasNest, Subtarget);
+    prepareDescriptorIndirectCall(DAG, Callee, Glue, Chain, CallSeqStart, CB,
+                                  dl, CFlags.HasNest, Subtarget);
   else
     prepareIndirectCall(DAG, Callee, Glue, Chain, dl);
 
   // Build the operand list for the call instruction.
   SmallVector<SDValue, 8> Ops;
-  buildCallOperands(Ops, CallConv, dl, isTailCall, isVarArg, isPatchPoint,
-                    hasNest, DAG, RegsToPass, Glue, Chain, Callee, SPDiff,
-                    Subtarget, isIndirect);
+  buildCallOperands(Ops, CFlags, dl, DAG, RegsToPass, Glue, Chain, Callee,
+                    SPDiff, Subtarget);
 
   // Emit tail call.
-  if (isTailCall) {
+  if (CFlags.IsTailCall) {
+    // Indirect tail call when using PC Relative calls do not have the same
+    // constraints.
     assert(((Callee.getOpcode() == ISD::Register &&
              cast<RegisterSDNode>(Callee)->getReg() == PPC::CTR) ||
             Callee.getOpcode() == ISD::TargetExternalSymbol ||
             Callee.getOpcode() == ISD::TargetGlobalAddress ||
-            isa<ConstantSDNode>(Callee)) &&
-           "Expecting a global address, external symbol, absolute value or "
-           "register");
+            isa<ConstantSDNode>(Callee) ||
+            (CFlags.IsIndirect && Subtarget.isUsingPCRelativeCalls())) &&
+           "Expecting a global address, external symbol, absolute value, "
+           "register or an indirect tail call when PC Relative calls are "
+           "used.");
+    // PC Relative calls also use TC_RETURN as the way to mark tail calls.
     assert(CallOpc == PPCISD::TC_RETURN &&
            "Unexpected call opcode for a tail call.");
     DAG.getMachineFunction().getFrameInfo().setHasTailCall();
@@ -5489,12 +5650,13 @@ SDValue PPCTargetLowering::FinishCall(
 
   std::array<EVT, 2> ReturnTypes = {{MVT::Other, MVT::Glue}};
   Chain = DAG.getNode(CallOpc, dl, ReturnTypes, Ops);
+  DAG.addNoMergeSiteInfo(Chain.getNode(), CFlags.NoMerge);
   Glue = Chain.getValue(1);
 
   // When performing tail call optimization the callee pops its arguments off
   // the stack. Account for this here so these bytes can be pushed back on in
   // PPCFrameLowering::eliminateCallFramePseudoInstr.
-  int BytesCalleePops = (CallConv == CallingConv::Fast &&
+  int BytesCalleePops = (CFlags.CallConv == CallingConv::Fast &&
                          getTargetMachine().Options.GuaranteedTailCallOpt)
                             ? NumBytes
                             : 0;
@@ -5504,7 +5666,8 @@ SDValue PPCTargetLowering::FinishCall(
                              Glue, dl);
   Glue = Chain.getValue(1);
 
-  return LowerCallResult(Chain, Glue, CallConv, isVarArg, Ins, dl, DAG, InVals);
+  return LowerCallResult(Chain, Glue, CFlags.CallConv, CFlags.IsVarArg, Ins, dl,
+                         DAG, InVals);
 }
 
 SDValue
@@ -5521,15 +5684,14 @@ PPCTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
   CallingConv::ID CallConv              = CLI.CallConv;
   bool isVarArg                         = CLI.IsVarArg;
   bool isPatchPoint                     = CLI.IsPatchPoint;
-  ImmutableCallSite CS                  = CLI.CS;
+  const CallBase *CB                    = CLI.CB;
 
   if (isTailCall) {
-    if (Subtarget.useLongCalls() && !(CS && CS.isMustTailCall()))
+    if (Subtarget.useLongCalls() && !(CB && CB->isMustTailCall()))
       isTailCall = false;
     else if (Subtarget.isSVR4ABI() && Subtarget.isPPC64())
-      isTailCall =
-        IsEligibleForTailCallOptimization_64SVR4(Callee, CallConv, CS,
-                                                 isVarArg, Outs, Ins, DAG);
+      isTailCall = IsEligibleForTailCallOptimization_64SVR4(
+          Callee, CallConv, CB, isVarArg, Outs, Ins, DAG);
     else
       isTailCall = IsEligibleForTailCallOptimization(Callee, CallConv, isVarArg,
                                                      Ins, DAG);
@@ -5538,21 +5700,23 @@ PPCTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
       if (!getTargetMachine().Options.GuaranteedTailCallOpt)
         ++NumSiblingCalls;
 
-      assert(isa<GlobalAddressSDNode>(Callee) &&
+      // PC Relative calls no longer guarantee that the callee is a Global
+      // Address Node. The callee could be an indirect tail call in which
+      // case the SDValue for the callee could be a load (to load the address
+      // of a function pointer) or it may be a register copy (to move the
+      // address of the callee from a function parameter into a virtual
+      // register). It may also be an ExternalSymbolSDNode (ex memcopy).
+      assert((Subtarget.isUsingPCRelativeCalls() ||
+              isa<GlobalAddressSDNode>(Callee)) &&
              "Callee should be an llvm::Function object.");
-      LLVM_DEBUG(
-          const GlobalValue *GV =
-              cast<GlobalAddressSDNode>(Callee)->getGlobal();
-          const unsigned Width =
-              80 - strlen("TCO caller: ") - strlen(", callee linkage: 0, 0");
-          dbgs() << "TCO caller: "
-                 << left_justify(DAG.getMachineFunction().getName(), Width)
-                 << ", callee linkage: " << GV->getVisibility() << ", "
-                 << GV->getLinkage() << "\n");
+
+      LLVM_DEBUG(dbgs() << "TCO caller: " << DAG.getMachineFunction().getName()
+                        << "\nTCO callee: ");
+      LLVM_DEBUG(Callee.dump());
     }
   }
 
-  if (!isTailCall && CS && CS.isMustTailCall())
+  if (!isTailCall && CB && CB->isMustTailCall())
     report_fatal_error("failed to perform tail call elimination on a call "
                        "site marked musttail");
 
@@ -5563,42 +5727,49 @@ PPCTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
       !isTailCall)
     Callee = LowerGlobalAddress(Callee, DAG);
 
+  CallFlags CFlags(
+      CallConv, isTailCall, isVarArg, isPatchPoint,
+      isIndirectCall(Callee, DAG, Subtarget, isPatchPoint),
+      // hasNest
+      Subtarget.is64BitELFABI() &&
+          any_of(Outs, [](ISD::OutputArg Arg) { return Arg.Flags.isNest(); }),
+      CLI.NoMerge);
+
   if (Subtarget.isSVR4ABI() && Subtarget.isPPC64())
-    return LowerCall_64SVR4(Chain, Callee, CallConv, isVarArg,
-                            isTailCall, isPatchPoint, Outs, OutVals, Ins,
-                            dl, DAG, InVals, CS);
+    return LowerCall_64SVR4(Chain, Callee, CFlags, Outs, OutVals, Ins, dl, DAG,
+                            InVals, CB);
 
   if (Subtarget.isSVR4ABI())
-    return LowerCall_32SVR4(Chain, Callee, CallConv, isVarArg,
-                            isTailCall, isPatchPoint, Outs, OutVals, Ins,
-                            dl, DAG, InVals, CS);
+    return LowerCall_32SVR4(Chain, Callee, CFlags, Outs, OutVals, Ins, dl, DAG,
+                            InVals, CB);
 
   if (Subtarget.isAIXABI())
-    return LowerCall_AIX(Chain, Callee, CallConv, isVarArg,
-                         isTailCall, isPatchPoint, Outs, OutVals, Ins,
-                         dl, DAG, InVals, CS);
+    return LowerCall_AIX(Chain, Callee, CFlags, Outs, OutVals, Ins, dl, DAG,
+                         InVals, CB);
 
-  return LowerCall_Darwin(Chain, Callee, CallConv, isVarArg,
-                          isTailCall, isPatchPoint, Outs, OutVals, Ins,
-                          dl, DAG, InVals, CS);
+  return LowerCall_Darwin(Chain, Callee, CFlags, Outs, OutVals, Ins, dl, DAG,
+                          InVals, CB);
 }
 
 SDValue PPCTargetLowering::LowerCall_32SVR4(
-    SDValue Chain, SDValue Callee, CallingConv::ID CallConv, bool isVarArg,
-    bool isTailCall, bool isPatchPoint,
+    SDValue Chain, SDValue Callee, CallFlags CFlags,
     const SmallVectorImpl<ISD::OutputArg> &Outs,
     const SmallVectorImpl<SDValue> &OutVals,
     const SmallVectorImpl<ISD::InputArg> &Ins, const SDLoc &dl,
     SelectionDAG &DAG, SmallVectorImpl<SDValue> &InVals,
-    ImmutableCallSite CS) const {
+    const CallBase *CB) const {
   // See PPCTargetLowering::LowerFormalArguments_32SVR4() for a description
   // of the 32-bit SVR4 ABI stack frame layout.
 
+  const CallingConv::ID CallConv = CFlags.CallConv;
+  const bool IsVarArg = CFlags.IsVarArg;
+  const bool IsTailCall = CFlags.IsTailCall;
+
   assert((CallConv == CallingConv::C ||
           CallConv == CallingConv::Cold ||
           CallConv == CallingConv::Fast) && "Unknown calling convention!");
 
-  unsigned PtrByteSize = 4;
+  const Align PtrAlign(4);
 
   MachineFunction &MF = DAG.getMachineFunction();
 
@@ -5617,15 +5788,15 @@ SDValue PPCTargetLowering::LowerCall_32SVR4(
 
   // Assign locations to all of the outgoing arguments.
   SmallVector<CCValAssign, 16> ArgLocs;
-  PPCCCState CCInfo(CallConv, isVarArg, MF, ArgLocs, *DAG.getContext());
+  PPCCCState CCInfo(CallConv, IsVarArg, MF, ArgLocs, *DAG.getContext());
 
   // Reserve space for the linkage area on the stack.
   CCInfo.AllocateStack(Subtarget.getFrameLowering()->getLinkageSize(),
-                       PtrByteSize);
+                       PtrAlign);
   if (useSoftFloat())
     CCInfo.PreAnalyzeCallOperands(Outs);
 
-  if (isVarArg) {
+  if (IsVarArg) {
     // Handle fixed and variable vector arguments differently.
     // Fixed vector arguments go into registers as long as registers are
     // available. Variable vector arguments always go into memory.
@@ -5660,10 +5831,10 @@ SDValue PPCTargetLowering::LowerCall_32SVR4(
 
   // Assign locations to all of the outgoing aggregate by value arguments.
   SmallVector<CCValAssign, 16> ByValArgLocs;
-  CCState CCByValInfo(CallConv, isVarArg, MF, ByValArgLocs, *DAG.getContext());
+  CCState CCByValInfo(CallConv, IsVarArg, MF, ByValArgLocs, *DAG.getContext());
 
   // Reserve stack space for the allocations in CCInfo.
-  CCByValInfo.AllocateStack(CCInfo.getNextStackOffset(), PtrByteSize);
+  CCByValInfo.AllocateStack(CCInfo.getNextStackOffset(), PtrAlign);
 
   CCByValInfo.AnalyzeCallOperands(Outs, CC_PPC32_SVR4_ByVal);
 
@@ -5674,7 +5845,7 @@ SDValue PPCTargetLowering::LowerCall_32SVR4(
 
   // Calculate by how many bytes the stack has to be adjusted in case of tail
   // call optimization.
-  int SPDiff = CalculateTailCallSPDiff(DAG, isTailCall, NumBytes);
+  int SPDiff = CalculateTailCallSPDiff(DAG, IsTailCall, NumBytes);
 
   // Adjust the stack pointer for the new arguments...
   // These operations are automatically eliminated by the prolog/epilog pass
@@ -5770,7 +5941,7 @@ SDValue PPCTargetLowering::LowerCall_32SVR4(
       assert(VA.isMemLoc());
       unsigned LocMemOffset = VA.getLocMemOffset();
 
-      if (!isTailCall) {
+      if (!IsTailCall) {
         SDValue PtrOff = DAG.getIntPtrConstant(LocMemOffset, dl);
         PtrOff = DAG.getNode(ISD::ADD, dl, getPointerTy(MF.getDataLayout()),
                              StackPtr, PtrOff);
@@ -5799,7 +5970,7 @@ SDValue PPCTargetLowering::LowerCall_32SVR4(
 
   // Set CR bit 6 to true if this is a vararg call with floating args passed in
   // registers.
-  if (isVarArg) {
+  if (IsVarArg) {
     SDVTList VTs = DAG.getVTList(MVT::Other, MVT::Glue);
     SDValue Ops[] = { Chain, InFlag };
 
@@ -5809,14 +5980,12 @@ SDValue PPCTargetLowering::LowerCall_32SVR4(
     InFlag = Chain.getValue(1);
   }
 
-  if (isTailCall)
+  if (IsTailCall)
     PrepareTailCall(DAG, InFlag, Chain, dl, SPDiff, NumBytes, LROp, FPOp,
                     TailCallArguments);
 
-  return FinishCall(CallConv, dl, isTailCall, isVarArg, isPatchPoint,
-                    /* unused except on PPC64 ELFv1 */ false, DAG,
-                    RegsToPass, InFlag, Chain, CallSeqStart, Callee, SPDiff,
-                    NumBytes, Ins, InVals, CS);
+  return FinishCall(CFlags, dl, DAG, RegsToPass, InFlag, Chain, CallSeqStart,
+                    Callee, SPDiff, NumBytes, Ins, InVals, CB);
 }
 
 // Copy an argument into memory, being careful to do this outside the
@@ -5837,25 +6006,24 @@ SDValue PPCTargetLowering::createMemcpyOutsideCallSeq(
 }
 
 SDValue PPCTargetLowering::LowerCall_64SVR4(
-    SDValue Chain, SDValue Callee, CallingConv::ID CallConv, bool isVarArg,
-    bool isTailCall, bool isPatchPoint,
+    SDValue Chain, SDValue Callee, CallFlags CFlags,
     const SmallVectorImpl<ISD::OutputArg> &Outs,
     const SmallVectorImpl<SDValue> &OutVals,
     const SmallVectorImpl<ISD::InputArg> &Ins, const SDLoc &dl,
     SelectionDAG &DAG, SmallVectorImpl<SDValue> &InVals,
-    ImmutableCallSite CS) const {
+    const CallBase *CB) const {
   bool isELFv2ABI = Subtarget.isELFv2ABI();
   bool isLittleEndian = Subtarget.isLittleEndian();
   unsigned NumOps = Outs.size();
-  bool hasNest = false;
   bool IsSibCall = false;
+  bool IsFastCall = CFlags.CallConv == CallingConv::Fast;
 
   EVT PtrVT = getPointerTy(DAG.getDataLayout());
   unsigned PtrByteSize = 8;
 
   MachineFunction &MF = DAG.getMachineFunction();
 
-  if (isTailCall && !getTargetMachine().Options.GuaranteedTailCallOpt)
+  if (CFlags.IsTailCall && !getTargetMachine().Options.GuaranteedTailCallOpt)
     IsSibCall = true;
 
   // Mark this function as potentially containing a function that contains a
@@ -5863,11 +6031,10 @@ SDValue PPCTargetLowering::LowerCall_64SVR4(
   // and restoring the callers stack pointer in this functions epilog. This is
   // done because by tail calling the called function might overwrite the value
   // in this function's (MF) stack pointer stack slot 0(SP).
-  if (getTargetMachine().Options.GuaranteedTailCallOpt &&
-      CallConv == CallingConv::Fast)
+  if (getTargetMachine().Options.GuaranteedTailCallOpt && IsFastCall)
     MF.getInfo<PPCFunctionInfo>()->setHasFastCall();
 
-  assert(!(CallConv == CallingConv::Fast && isVarArg) &&
+  assert(!(IsFastCall && CFlags.IsVarArg) &&
          "fastcc not supported on varargs functions");
 
   // Count how many bytes are to be pushed on the stack, including the linkage
@@ -5897,7 +6064,7 @@ SDValue PPCTargetLowering::LowerCall_64SVR4(
   // can be passed to the callee in registers.
   // For the fast calling convention, there is another check below.
   // Note: We should keep consistent with LowerFormalArguments_64SVR4()
-  bool HasParameterArea = !isELFv2ABI || isVarArg || CallConv == CallingConv::Fast;
+  bool HasParameterArea = !isELFv2ABI || CFlags.IsVarArg || IsFastCall;
   if (!HasParameterArea) {
     unsigned ParamAreaSize = NumGPRs * PtrByteSize;
     unsigned AvailableFPRs = NumFPRs;
@@ -5919,7 +6086,7 @@ SDValue PPCTargetLowering::LowerCall_64SVR4(
 
   // Avoid allocating parameter area for fastcc functions if all the arguments
   // can be passed in the registers.
-  if (CallConv == CallingConv::Fast)
+  if (IsFastCall)
     HasParameterArea = false;
 
   // Add up all the space actually used.
@@ -5931,7 +6098,7 @@ SDValue PPCTargetLowering::LowerCall_64SVR4(
     if (Flags.isNest())
       continue;
 
-    if (CallConv == CallingConv::Fast) {
+    if (IsFastCall) {
       if (Flags.isByVal()) {
         NumGPRsUsed += (Flags.getByValSize()+7)/8;
         if (NumGPRsUsed > NumGPRs)
@@ -5979,9 +6146,9 @@ SDValue PPCTargetLowering::LowerCall_64SVR4(
     }
 
     /* Respect alignment of argument on the stack.  */
-    unsigned Align =
-      CalculateStackSlotAlignment(ArgVT, OrigVT, Flags, PtrByteSize);
-    NumBytes = ((NumBytes + Align - 1) / Align) * Align;
+    auto Alignement =
+        CalculateStackSlotAlignment(ArgVT, OrigVT, Flags, PtrByteSize);
+    NumBytes = alignTo(NumBytes, Alignement);
 
     NumBytes += CalculateStackSlotSize(ArgVT, Flags, PtrByteSize);
     if (Flags.isInConsecutiveRegsLast())
@@ -6004,8 +6171,7 @@ SDValue PPCTargetLowering::LowerCall_64SVR4(
     NumBytes = LinkageSize;
 
   // Tail call needs the stack to be aligned.
-  if (getTargetMachine().Options.GuaranteedTailCallOpt &&
-      CallConv == CallingConv::Fast)
+  if (getTargetMachine().Options.GuaranteedTailCallOpt && IsFastCall)
     NumBytes = EnsureStackAlignment(Subtarget.getFrameLowering(), NumBytes);
 
   int SPDiff = 0;
@@ -6013,11 +6179,11 @@ SDValue PPCTargetLowering::LowerCall_64SVR4(
   // Calculate by how many bytes the stack has to be adjusted in case of tail
   // call optimization.
   if (!IsSibCall)
-    SPDiff = CalculateTailCallSPDiff(DAG, isTailCall, NumBytes);
+    SPDiff = CalculateTailCallSPDiff(DAG, CFlags.IsTailCall, NumBytes);
 
   // To protect arguments on the stack from being clobbered in a tail call,
   // force all the loads to happen before doing any other lowering.
-  if (isTailCall)
+  if (CFlags.IsTailCall)
     Chain = DAG.getStackArgumentTokenFactor(Chain);
 
   // Adjust the stack pointer for the new arguments...
@@ -6061,16 +6227,16 @@ SDValue PPCTargetLowering::LowerCall_64SVR4(
     // we'll actually use a stack slot.
     auto ComputePtrOff = [&]() {
       /* Respect alignment of argument on the stack.  */
-      unsigned Align =
-        CalculateStackSlotAlignment(ArgVT, OrigVT, Flags, PtrByteSize);
-      ArgOffset = ((ArgOffset + Align - 1) / Align) * Align;
+      auto Alignment =
+          CalculateStackSlotAlignment(ArgVT, OrigVT, Flags, PtrByteSize);
+      ArgOffset = alignTo(ArgOffset, Alignment);
 
       PtrOff = DAG.getConstant(ArgOffset, dl, StackPtr.getValueType());
 
       PtrOff = DAG.getNode(ISD::ADD, dl, PtrVT, StackPtr, PtrOff);
     };
 
-    if (CallConv != CallingConv::Fast) {
+    if (!IsFastCall) {
       ComputePtrOff();
 
       /* Compute GPR index associated with argument offset.  */
@@ -6101,7 +6267,7 @@ SDValue PPCTargetLowering::LowerCall_64SVR4(
       if (Size == 0)
         continue;
 
-      if (CallConv == CallingConv::Fast)
+      if (IsFastCall)
         ComputePtrOff();
 
       // All aggregates smaller than 8 bytes must be passed right-justified.
@@ -6206,7 +6372,6 @@ SDValue PPCTargetLowering::LowerCall_64SVR4(
       if (Flags.isNest()) {
         // The 'nest' parameter, if any, is passed in R11.
         RegsToPass.push_back(std::make_pair(PPC::X11, Arg));
-        hasNest = true;
         break;
       }
 
@@ -6216,18 +6381,18 @@ SDValue PPCTargetLowering::LowerCall_64SVR4(
       if (GPR_idx != NumGPRs) {
         RegsToPass.push_back(std::make_pair(GPR[GPR_idx++], Arg));
       } else {
-        if (CallConv == CallingConv::Fast)
+        if (IsFastCall)
           ComputePtrOff();
 
         assert(HasParameterArea &&
                "Parameter area must exist to pass an argument in memory.");
         LowerMemOpCallTo(DAG, MF, Chain, Arg, PtrOff, SPDiff, ArgOffset,
-                         true, isTailCall, false, MemOpChains,
+                         true, CFlags.IsTailCall, false, MemOpChains,
                          TailCallArguments, dl);
-        if (CallConv == CallingConv::Fast)
+        if (IsFastCall)
           ArgOffset += PtrByteSize;
       }
-      if (CallConv != CallingConv::Fast)
+      if (!IsFastCall)
         ArgOffset += PtrByteSize;
       break;
     case MVT::f32:
@@ -6241,7 +6406,7 @@ SDValue PPCTargetLowering::LowerCall_64SVR4(
       // Unnamed arguments for vararg functions always go to GPRs and
       // then the parameter save area.  For now, put all arguments to vararg
       // routines always in both locations (FPR *and* GPR or stack slot).
-      bool NeedGPROrStack = isVarArg || FPR_idx == NumFPRs;
+      bool NeedGPROrStack = CFlags.IsVarArg || FPR_idx == NumFPRs;
       bool NeededLoad = false;
 
       // First load the argument into the next available FPR.
@@ -6251,7 +6416,7 @@ SDValue PPCTargetLowering::LowerCall_64SVR4(
       // Next, load the argument into GPR or stack slot if needed.
       if (!NeedGPROrStack)
         ;
-      else if (GPR_idx != NumGPRs && CallConv != CallingConv::Fast) {
+      else if (GPR_idx != NumGPRs && !IsFastCall) {
         // FIXME: We may want to re-enable this for CallingConv::Fast on the P8
         // once we support fp <-> gpr moves.
 
@@ -6295,7 +6460,7 @@ SDValue PPCTargetLowering::LowerCall_64SVR4(
         if (ArgVal.getNode())
           RegsToPass.push_back(std::make_pair(GPR[GPR_idx++], ArgVal));
       } else {
-        if (CallConv == CallingConv::Fast)
+        if (IsFastCall)
           ComputePtrOff();
 
         // Single-precision floating-point values are mapped to the
@@ -6309,7 +6474,7 @@ SDValue PPCTargetLowering::LowerCall_64SVR4(
         assert(HasParameterArea &&
                "Parameter area must exist to pass an argument in memory.");
         LowerMemOpCallTo(DAG, MF, Chain, Arg, PtrOff, SPDiff, ArgOffset,
-                         true, isTailCall, false, MemOpChains,
+                         true, CFlags.IsTailCall, false, MemOpChains,
                          TailCallArguments, dl);
 
         NeededLoad = true;
@@ -6317,7 +6482,7 @@ SDValue PPCTargetLowering::LowerCall_64SVR4(
       // When passing an array of floats, the array occupies consecutive
       // space in the argument area; only round up to the next doubleword
       // at the end of the array.  Otherwise, each float takes 8 bytes.
-      if (CallConv != CallingConv::Fast || NeededLoad) {
+      if (!IsFastCall || NeededLoad) {
         ArgOffset += (Arg.getValueType() == MVT::f32 &&
                       Flags.isInConsecutiveRegs()) ? 4 : 8;
         if (Flags.isInConsecutiveRegsLast())
@@ -6342,7 +6507,7 @@ SDValue PPCTargetLowering::LowerCall_64SVR4(
       // usual; unnamed arguments always go to the stack or the corresponding
       // GPRs when within range.  For now, we always put the value in both
       // locations (or even all three).
-      if (isVarArg) {
+      if (CFlags.IsVarArg) {
         assert(HasParameterArea &&
                "Parameter area must exist if we have a varargs call.");
         // We could elide this store in the case where the object fits
@@ -6374,19 +6539,19 @@ SDValue PPCTargetLowering::LowerCall_64SVR4(
       if (VR_idx != NumVRs) {
         RegsToPass.push_back(std::make_pair(VR[VR_idx++], Arg));
       } else {
-        if (CallConv == CallingConv::Fast)
+        if (IsFastCall)
           ComputePtrOff();
 
         assert(HasParameterArea &&
                "Parameter area must exist to pass an argument in memory.");
         LowerMemOpCallTo(DAG, MF, Chain, Arg, PtrOff, SPDiff, ArgOffset,
-                         true, isTailCall, true, MemOpChains,
+                         true, CFlags.IsTailCall, true, MemOpChains,
                          TailCallArguments, dl);
-        if (CallConv == CallingConv::Fast)
+        if (IsFastCall)
           ArgOffset += 16;
       }
 
-      if (CallConv != CallingConv::Fast)
+      if (!IsFastCall)
         ArgOffset += 16;
       break;
       } // not QPX
@@ -6398,7 +6563,7 @@ SDValue PPCTargetLowering::LowerCall_64SVR4(
     case MVT::v4f64:
     case MVT::v4i1: {
       bool IsF32 = Arg.getValueType().getSimpleVT().SimpleTy == MVT::v4f32;
-      if (isVarArg) {
+      if (CFlags.IsVarArg) {
         assert(HasParameterArea &&
                "Parameter area must exist if we have a varargs call.");
         // We could elide this store in the case where the object fits
@@ -6430,19 +6595,19 @@ SDValue PPCTargetLowering::LowerCall_64SVR4(
       if (QFPR_idx != NumQFPRs) {
         RegsToPass.push_back(std::make_pair(QFPR[QFPR_idx++], Arg));
       } else {
-        if (CallConv == CallingConv::Fast)
+        if (IsFastCall)
           ComputePtrOff();
 
         assert(HasParameterArea &&
                "Parameter area must exist to pass an argument in memory.");
         LowerMemOpCallTo(DAG, MF, Chain, Arg, PtrOff, SPDiff, ArgOffset,
-                         true, isTailCall, true, MemOpChains,
+                         true, CFlags.IsTailCall, true, MemOpChains,
                          TailCallArguments, dl);
-        if (CallConv == CallingConv::Fast)
+        if (IsFastCall)
           ArgOffset += (IsF32 ? 16 : 32);
       }
 
-      if (CallConv != CallingConv::Fast)
+      if (!IsFastCall)
         ArgOffset += (IsF32 ? 16 : 32);
       break;
       }
@@ -6459,23 +6624,26 @@ SDValue PPCTargetLowering::LowerCall_64SVR4(
   // Check if this is an indirect call (MTCTR/BCTRL).
   // See prepareDescriptorIndirectCall and buildCallOperands for more
   // information about calls through function pointers in the 64-bit SVR4 ABI.
-  if (!isTailCall && !isPatchPoint &&
-      !isFunctionGlobalAddress(Callee) &&
-      !isa<ExternalSymbolSDNode>(Callee)) {
-    // Load r2 into a virtual register and store it to the TOC save area.
-    setUsesTOCBasePtr(DAG);
-    SDValue Val = DAG.getCopyFromReg(Chain, dl, PPC::X2, MVT::i64);
-    // TOC save area offset.
-    unsigned TOCSaveOffset = Subtarget.getFrameLowering()->getTOCSaveOffset();
-    SDValue PtrOff = DAG.getIntPtrConstant(TOCSaveOffset, dl);
-    SDValue AddPtr = DAG.getNode(ISD::ADD, dl, PtrVT, StackPtr, PtrOff);
-    Chain = DAG.getStore(
-        Val.getValue(1), dl, Val, AddPtr,
-        MachinePointerInfo::getStack(DAG.getMachineFunction(), TOCSaveOffset));
+  if (CFlags.IsIndirect) {
+    // For 64-bit ELFv2 ABI with PCRel, do not save the TOC of the
+    // caller in the TOC save area.
+    if (isTOCSaveRestoreRequired(Subtarget)) {
+      assert(!CFlags.IsTailCall && "Indirect tails calls not supported");
+      // Load r2 into a virtual register and store it to the TOC save area.
+      setUsesTOCBasePtr(DAG);
+      SDValue Val = DAG.getCopyFromReg(Chain, dl, PPC::X2, MVT::i64);
+      // TOC save area offset.
+      unsigned TOCSaveOffset = Subtarget.getFrameLowering()->getTOCSaveOffset();
+      SDValue PtrOff = DAG.getIntPtrConstant(TOCSaveOffset, dl);
+      SDValue AddPtr = DAG.getNode(ISD::ADD, dl, PtrVT, StackPtr, PtrOff);
+      Chain = DAG.getStore(Val.getValue(1), dl, Val, AddPtr,
+                           MachinePointerInfo::getStack(
+                               DAG.getMachineFunction(), TOCSaveOffset));
+    }
     // In the ELFv2 ABI, R12 must contain the address of an indirect callee.
     // This does not mean the MTCTR instruction must use R12; it's easier
     // to model this as an extra parameter, so do that.
-    if (isELFv2ABI && !isPatchPoint)
+    if (isELFv2ABI && !CFlags.IsPatchPoint)
       RegsToPass.push_back(std::make_pair((unsigned)PPC::X12, Callee));
   }
 
@@ -6488,23 +6656,21 @@ SDValue PPCTargetLowering::LowerCall_64SVR4(
     InFlag = Chain.getValue(1);
   }
 
-  if (isTailCall && !IsSibCall)
+  if (CFlags.IsTailCall && !IsSibCall)
     PrepareTailCall(DAG, InFlag, Chain, dl, SPDiff, NumBytes, LROp, FPOp,
                     TailCallArguments);
 
-  return FinishCall(CallConv, dl, isTailCall, isVarArg, isPatchPoint, hasNest,
-                    DAG, RegsToPass, InFlag, Chain, CallSeqStart, Callee,
-                    SPDiff, NumBytes, Ins, InVals, CS);
+  return FinishCall(CFlags, dl, DAG, RegsToPass, InFlag, Chain, CallSeqStart,
+                    Callee, SPDiff, NumBytes, Ins, InVals, CB);
 }
 
 SDValue PPCTargetLowering::LowerCall_Darwin(
-    SDValue Chain, SDValue Callee, CallingConv::ID CallConv, bool isVarArg,
-    bool isTailCall, bool isPatchPoint,
+    SDValue Chain, SDValue Callee, CallFlags CFlags,
     const SmallVectorImpl<ISD::OutputArg> &Outs,
     const SmallVectorImpl<SDValue> &OutVals,
     const SmallVectorImpl<ISD::InputArg> &Ins, const SDLoc &dl,
     SelectionDAG &DAG, SmallVectorImpl<SDValue> &InVals,
-    ImmutableCallSite CS) const {
+    const CallBase *CB) const {
   unsigned NumOps = Outs.size();
 
   EVT PtrVT = getPointerTy(DAG.getDataLayout());
@@ -6519,7 +6685,7 @@ SDValue PPCTargetLowering::LowerCall_Darwin(
   // done because by tail calling the called function might overwrite the value
   // in this function's (MF) stack pointer stack slot 0(SP).
   if (getTargetMachine().Options.GuaranteedTailCallOpt &&
-      CallConv == CallingConv::Fast)
+      CFlags.CallConv == CallingConv::Fast)
     MF.getInfo<PPCFunctionInfo>()->setHasFastCall();
 
   // Count how many bytes are to be pushed on the stack, including the linkage
@@ -6542,7 +6708,7 @@ SDValue PPCTargetLowering::LowerCall_Darwin(
     if (ArgVT == MVT::v4f32 || ArgVT == MVT::v4i32 ||
         ArgVT == MVT::v8i16 || ArgVT == MVT::v16i8 ||
         ArgVT == MVT::v2f64 || ArgVT == MVT::v2i64) {
-      if (!isVarArg && !isPPC64) {
+      if (!CFlags.IsVarArg && !isPPC64) {
         // Non-varargs Altivec parameters go after all the non-Altivec
         // parameters; handle those later so we know how much padding we need.
         nAltivecParamsAtEnd++;
@@ -6569,16 +6735,16 @@ SDValue PPCTargetLowering::LowerCall_Darwin(
 
   // Tail call needs the stack to be aligned.
   if (getTargetMachine().Options.GuaranteedTailCallOpt &&
-      CallConv == CallingConv::Fast)
+      CFlags.CallConv == CallingConv::Fast)
     NumBytes = EnsureStackAlignment(Subtarget.getFrameLowering(), NumBytes);
 
   // Calculate by how many bytes the stack has to be adjusted in case of tail
   // call optimization.
-  int SPDiff = CalculateTailCallSPDiff(DAG, isTailCall, NumBytes);
+  int SPDiff = CalculateTailCallSPDiff(DAG, CFlags.IsTailCall, NumBytes);
 
   // To protect arguments on the stack from being clobbered in a tail call,
   // force all the loads to happen before doing any other lowering.
-  if (isTailCall)
+  if (CFlags.IsTailCall)
     Chain = DAG.getStackArgumentTokenFactor(Chain);
 
   // Adjust the stack pointer for the new arguments...
@@ -6714,7 +6880,7 @@ SDValue PPCTargetLowering::LowerCall_Darwin(
         RegsToPass.push_back(std::make_pair(GPR[GPR_idx++], Arg));
       } else {
         LowerMemOpCallTo(DAG, MF, Chain, Arg, PtrOff, SPDiff, ArgOffset,
-                         isPPC64, isTailCall, false, MemOpChains,
+                         isPPC64, CFlags.IsTailCall, false, MemOpChains,
                          TailCallArguments, dl);
       }
       ArgOffset += PtrByteSize;
@@ -6724,7 +6890,7 @@ SDValue PPCTargetLowering::LowerCall_Darwin(
       if (FPR_idx != NumFPRs) {
         RegsToPass.push_back(std::make_pair(FPR[FPR_idx++], Arg));
 
-        if (isVarArg) {
+        if (CFlags.IsVarArg) {
           SDValue Store =
               DAG.getStore(Chain, dl, Arg, PtrOff, MachinePointerInfo());
           MemOpChains.push_back(Store);
@@ -6756,7 +6922,7 @@ SDValue PPCTargetLowering::LowerCall_Darwin(
         }
       } else
         LowerMemOpCallTo(DAG, MF, Chain, Arg, PtrOff, SPDiff, ArgOffset,
-                         isPPC64, isTailCall, false, MemOpChains,
+                         isPPC64, CFlags.IsTailCall, false, MemOpChains,
                          TailCallArguments, dl);
       if (isPPC64)
         ArgOffset += 8;
@@ -6767,7 +6933,7 @@ SDValue PPCTargetLowering::LowerCall_Darwin(
     case MVT::v4i32:
     case MVT::v8i16:
     case MVT::v16i8:
-      if (isVarArg) {
+      if (CFlags.IsVarArg) {
         // These go aligned on the stack, or in the corresponding R registers
         // when within range.  The Darwin PPC ABI doc claims they also go in
         // V registers; in fact gcc does this only for arguments that are
@@ -6813,7 +6979,7 @@ SDValue PPCTargetLowering::LowerCall_Darwin(
       } else if (nAltivecParamsAtEnd==0) {
         // We are emitting Altivec params in order.
         LowerMemOpCallTo(DAG, MF, Chain, Arg, PtrOff, SPDiff, ArgOffset,
-                         isPPC64, isTailCall, true, MemOpChains,
+                         isPPC64, CFlags.IsTailCall, true, MemOpChains,
                          TailCallArguments, dl);
         ArgOffset += 16;
       }
@@ -6825,7 +6991,7 @@ SDValue PPCTargetLowering::LowerCall_Darwin(
   // don't track this here because nobody below needs it.
   // If there are more Altivec parameters than fit in registers emit
   // the stores here.
-  if (!isVarArg && nAltivecParamsAtEnd > NumVRs) {
+  if (!CFlags.IsVarArg && nAltivecParamsAtEnd > NumVRs) {
     unsigned j = 0;
     // Offset is aligned; skip 1st 12 params which go in V registers.
     ArgOffset = ((ArgOffset+15)/16)*16;
@@ -6839,7 +7005,7 @@ SDValue PPCTargetLowering::LowerCall_Darwin(
           SDValue PtrOff;
           // We are emitting Altivec params in order.
           LowerMemOpCallTo(DAG, MF, Chain, Arg, PtrOff, SPDiff, ArgOffset,
-                           isPPC64, isTailCall, true, MemOpChains,
+                           isPPC64, CFlags.IsTailCall, true, MemOpChains,
                            TailCallArguments, dl);
           ArgOffset += 16;
         }
@@ -6853,12 +7019,11 @@ SDValue PPCTargetLowering::LowerCall_Darwin(
   // On Darwin, R12 must contain the address of an indirect callee.  This does
   // not mean the MTCTR instruction must use R12; it's easier to model this as
   // an extra parameter, so do that.
-  if (!isTailCall &&
-      !isFunctionGlobalAddress(Callee) &&
-      !isa<ExternalSymbolSDNode>(Callee) &&
-      !isBLACompatibleAddress(Callee, DAG))
+  if (CFlags.IsIndirect) {
+    assert(!CFlags.IsTailCall && "Indirect tail-calls not supported.");
     RegsToPass.push_back(std::make_pair((unsigned)(isPPC64 ? PPC::X12 :
                                                    PPC::R12), Callee));
+  }
 
   // Build a sequence of copy-to-reg nodes chained together with token chain
   // and flag operands which copy the outgoing args into the appropriate regs.
@@ -6869,37 +7034,37 @@ SDValue PPCTargetLowering::LowerCall_Darwin(
     InFlag = Chain.getValue(1);
   }
 
-  if (isTailCall)
+  if (CFlags.IsTailCall)
     PrepareTailCall(DAG, InFlag, Chain, dl, SPDiff, NumBytes, LROp, FPOp,
                     TailCallArguments);
 
-  return FinishCall(CallConv, dl, isTailCall, isVarArg, isPatchPoint,
-                    /* unused except on PPC64 ELFv1 */ false, DAG,
-                    RegsToPass, InFlag, Chain, CallSeqStart, Callee, SPDiff,
-                    NumBytes, Ins, InVals, CS);
+  return FinishCall(CFlags, dl, DAG, RegsToPass, InFlag, Chain, CallSeqStart,
+                    Callee, SPDiff, NumBytes, Ins, InVals, CB);
 }
 
 static bool CC_AIX(unsigned ValNo, MVT ValVT, MVT LocVT,
                    CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags,
                    CCState &State) {
 
+  const PPCSubtarget &Subtarget = static_cast<const PPCSubtarget &>(
+      State.getMachineFunction().getSubtarget());
+  const bool IsPPC64 = Subtarget.isPPC64();
+  const Align PtrAlign = IsPPC64 ? Align(8) : Align(4);
+  const MVT RegVT = IsPPC64 ? MVT::i64 : MVT::i32;
+
+  assert((!ValVT.isInteger() ||
+          (ValVT.getSizeInBits() <= RegVT.getSizeInBits())) &&
+         "Integer argument exceeds register size: should have been legalized");
+
   if (ValVT == MVT::f128)
     report_fatal_error("f128 is unimplemented on AIX.");
 
-  if (ArgFlags.isByVal())
-    report_fatal_error("Passing structure by value is unimplemented.");
-
   if (ArgFlags.isNest())
     report_fatal_error("Nest arguments are unimplemented.");
 
   if (ValVT.isVector() || LocVT.isVector())
     report_fatal_error("Vector arguments are unimplemented on AIX.");
 
-  const PPCSubtarget &Subtarget = static_cast<const PPCSubtarget &>(
-      State.getMachineFunction().getSubtarget());
-  const bool IsPPC64 = Subtarget.isPPC64();
-  const unsigned PtrByteSize = IsPPC64 ? 8 : 4;
-
   static const MCPhysReg GPR_32[] = {// 32-bit registers.
                                      PPC::R3, PPC::R4, PPC::R5, PPC::R6,
                                      PPC::R7, PPC::R8, PPC::R9, PPC::R10};
@@ -6907,6 +7072,38 @@ static bool CC_AIX(unsigned ValNo, MVT ValVT, MVT LocVT,
                                      PPC::X3, PPC::X4, PPC::X5, PPC::X6,
                                      PPC::X7, PPC::X8, PPC::X9, PPC::X10};
 
+  if (ArgFlags.isByVal()) {
+    if (ArgFlags.getNonZeroByValAlign() > PtrAlign)
+      report_fatal_error("Pass-by-value arguments with alignment greater than "
+                         "register width are not supported.");
+
+    const unsigned ByValSize = ArgFlags.getByValSize();
+
+    // An empty aggregate parameter takes up no storage and no registers,
+    // but needs a MemLoc for a stack slot for the formal arguments side.
+    if (ByValSize == 0) {
+      State.addLoc(CCValAssign::getMem(ValNo, MVT::INVALID_SIMPLE_VALUE_TYPE,
+                                       State.getNextStackOffset(), RegVT,
+                                       LocInfo));
+      return false;
+    }
+
+    const unsigned StackSize = alignTo(ByValSize, PtrAlign);
+    unsigned Offset = State.AllocateStack(StackSize, PtrAlign);
+    for (const unsigned E = Offset + StackSize; Offset < E;
+         Offset += PtrAlign.value()) {
+      if (unsigned Reg = State.AllocateReg(IsPPC64 ? GPR_64 : GPR_32))
+        State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, RegVT, LocInfo));
+      else {
+        State.addLoc(CCValAssign::getMem(ValNo, MVT::INVALID_SIMPLE_VALUE_TYPE,
+                                         Offset, MVT::INVALID_SIMPLE_VALUE_TYPE,
+                                         LocInfo));
+        break;
+      }
+    }
+    return false;
+  }
+
   // Arguments always reserve parameter save area.
   switch (ValVT.SimpleTy) {
   default:
@@ -6916,49 +7113,55 @@ static bool CC_AIX(unsigned ValNo, MVT ValVT, MVT LocVT,
     assert(IsPPC64 && "PPC32 should have split i64 values.");
     LLVM_FALLTHROUGH;
   case MVT::i1:
-  case MVT::i32:
-    State.AllocateStack(PtrByteSize, PtrByteSize);
-    if (unsigned Reg = State.AllocateReg(IsPPC64 ? GPR_64 : GPR_32)) {
-      MVT RegVT = IsPPC64 ? MVT::i64 : MVT::i32;
-      // Promote integers if needed.
-      if (ValVT.getSizeInBits() < RegVT.getSizeInBits())
-        LocInfo = ArgFlags.isSExt() ? CCValAssign::LocInfo::SExt
-                                    : CCValAssign::LocInfo::ZExt;
+  case MVT::i32: {
+    const unsigned Offset = State.AllocateStack(PtrAlign.value(), PtrAlign);
+    // AIX integer arguments are always passed in register width.
+    if (ValVT.getSizeInBits() < RegVT.getSizeInBits())
+      LocInfo = ArgFlags.isSExt() ? CCValAssign::LocInfo::SExt
+                                  : CCValAssign::LocInfo::ZExt;
+    if (unsigned Reg = State.AllocateReg(IsPPC64 ? GPR_64 : GPR_32))
       State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, RegVT, LocInfo));
-    }
     else
-      report_fatal_error("Handling of placing parameters on the stack is "
-                         "unimplemented!");
-    return false;
+      State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset, RegVT, LocInfo));
 
+    return false;
+  }
   case MVT::f32:
   case MVT::f64: {
     // Parameter save area (PSA) is reserved even if the float passes in fpr.
     const unsigned StoreSize = LocVT.getStoreSize();
     // Floats are always 4-byte aligned in the PSA on AIX.
     // This includes f64 in 64-bit mode for ABI compatibility.
-    State.AllocateStack(IsPPC64 ? 8 : StoreSize, 4);
-    if (unsigned Reg = State.AllocateReg(FPR))
-      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
-    else
-      report_fatal_error("Handling of placing parameters on the stack is "
-                         "unimplemented!");
-
-    // AIX requires that GPRs are reserved for float arguments.
-    // Successfully reserved GPRs are only initialized for vararg calls.
-    MVT RegVT = IsPPC64 ? MVT::i64 : MVT::i32;
-    for (unsigned I = 0; I < StoreSize; I += PtrByteSize) {
+    const unsigned Offset =
+        State.AllocateStack(IsPPC64 ? 8 : StoreSize, Align(4));
+    unsigned FReg = State.AllocateReg(FPR);
+    if (FReg)
+      State.addLoc(CCValAssign::getReg(ValNo, ValVT, FReg, LocVT, LocInfo));
+
+    // Reserve and initialize GPRs or initialize the PSA as required.
+    for (unsigned I = 0; I < StoreSize; I += PtrAlign.value()) {
       if (unsigned Reg = State.AllocateReg(IsPPC64 ? GPR_64 : GPR_32)) {
+        assert(FReg && "An FPR should be available when a GPR is reserved.");
         if (State.isVarArg()) {
+          // Successfully reserved GPRs are only initialized for vararg calls.
           // Custom handling is required for:
           //   f64 in PPC32 needs to be split into 2 GPRs.
           //   f32 in PPC64 needs to occupy only lower 32 bits of 64-bit GPR.
           State.addLoc(
               CCValAssign::getCustomReg(ValNo, ValVT, Reg, RegVT, LocInfo));
         }
-      } else if (State.isVarArg()) {
-        report_fatal_error("Handling of placing parameters on the stack is "
-                           "unimplemented!");
+      } else {
+        // If there are insufficient GPRs, the PSA needs to be initialized.
+        // Initialization occurs even if an FPR was initialized for
+        // compatibility with the AIX XL compiler. The full memory for the
+        // argument will be initialized even if a prior word is saved in GPR.
+        // A custom memLoc is used when the argument also passes in FPR so
+        // that the callee handling can skip over it easily.
+        State.addLoc(
+            FReg ? CCValAssign::getCustomMem(ValNo, ValVT, Offset, LocVT,
+                                             LocInfo)
+                 : CCValAssign::getMem(ValNo, ValVT, Offset, LocVT, LocInfo));
+        break;
       }
     }
 
@@ -7003,6 +7206,64 @@ static SDValue truncateScalarIntegerArg(ISD::ArgFlagsTy Flags, EVT ValVT,
   return DAG.getNode(ISD::TRUNCATE, dl, ValVT, ArgValue);
 }
 
+static unsigned mapArgRegToOffsetAIX(unsigned Reg, const PPCFrameLowering *FL) {
+  const unsigned LASize = FL->getLinkageSize();
+
+  if (PPC::GPRCRegClass.contains(Reg)) {
+    assert(Reg >= PPC::R3 && Reg <= PPC::R10 &&
+           "Reg must be a valid argument register!");
+    return LASize + 4 * (Reg - PPC::R3);
+  }
+
+  if (PPC::G8RCRegClass.contains(Reg)) {
+    assert(Reg >= PPC::X3 && Reg <= PPC::X10 &&
+           "Reg must be a valid argument register!");
+    return LASize + 8 * (Reg - PPC::X3);
+  }
+
+  llvm_unreachable("Only general purpose registers expected.");
+}
+
+//   AIX ABI Stack Frame Layout:
+//
+//   Low Memory +--------------------------------------------+
+//   SP   +---> | Back chain                                 | ---+
+//        |     +--------------------------------------------+    |   
+//        |     | Saved Condition Register                   |    |
+//        |     +--------------------------------------------+    |
+//        |     | Saved Linkage Register                     |    |
+//        |     +--------------------------------------------+    | Linkage Area
+//        |     | Reserved for compilers                     |    |
+//        |     +--------------------------------------------+    |
+//        |     | Reserved for binders                       |    |
+//        |     +--------------------------------------------+    |
+//        |     | Saved TOC pointer                          | ---+
+//        |     +--------------------------------------------+
+//        |     | Parameter save area                        |
+//        |     +--------------------------------------------+
+//        |     | Alloca space                               |
+//        |     +--------------------------------------------+
+//        |     | Local variable space                       |
+//        |     +--------------------------------------------+
+//        |     | Float/int conversion temporary             |
+//        |     +--------------------------------------------+
+//        |     | Save area for AltiVec registers            |
+//        |     +--------------------------------------------+
+//        |     | AltiVec alignment padding                  |
+//        |     +--------------------------------------------+
+//        |     | Save area for VRSAVE register              |
+//        |     +--------------------------------------------+
+//        |     | Save area for General Purpose registers    |
+//        |     +--------------------------------------------+
+//        |     | Save area for Floating Point registers     |
+//        |     +--------------------------------------------+
+//        +---- | Back chain                                 |
+// High Memory  +--------------------------------------------+
+//
+//  Specifications:
+//  AIX 7.2 Assembler Language Reference
+//  Subroutine linkage convention
+
 SDValue PPCTargetLowering::LowerFormalArguments_AIX(
     SDValue Chain, CallingConv::ID CallConv, bool isVarArg,
     const SmallVectorImpl<ISD::InputArg> &Ins, const SDLoc &dl,
@@ -7012,9 +7273,6 @@ SDValue PPCTargetLowering::LowerFormalArguments_AIX(
           CallConv == CallingConv::Fast) &&
          "Unexpected calling convention!");
 
-  if (isVarArg)
-    report_fatal_error("This call type is unimplemented on AIX.");
-
   if (getTargetMachine().Options.GuaranteedTailCallOpt)
     report_fatal_error("Tail call support is unimplemented on AIX.");
 
@@ -7032,67 +7290,214 @@ SDValue PPCTargetLowering::LowerFormalArguments_AIX(
   // Assign locations to all of the incoming arguments.
   SmallVector<CCValAssign, 16> ArgLocs;
   MachineFunction &MF = DAG.getMachineFunction();
+  MachineFrameInfo &MFI = MF.getFrameInfo();
   CCState CCInfo(CallConv, isVarArg, MF, ArgLocs, *DAG.getContext());
 
+  const EVT PtrVT = getPointerTy(MF.getDataLayout());
   // Reserve space for the linkage area on the stack.
   const unsigned LinkageSize = Subtarget.getFrameLowering()->getLinkageSize();
-  // On AIX a minimum of 8 words is saved to the parameter save area.
-  const unsigned MinParameterSaveArea = 8 * PtrByteSize;
-  CCInfo.AllocateStack(LinkageSize + MinParameterSaveArea, PtrByteSize);
+  CCInfo.AllocateStack(LinkageSize, Align(PtrByteSize));
   CCInfo.AnalyzeFormalArguments(Ins, CC_AIX);
 
-  for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) {
-    CCValAssign &VA = ArgLocs[i];
-    SDValue ArgValue;
-    ISD::ArgFlagsTy Flags = Ins[i].Flags;
-    if (VA.isRegLoc()) {
-      EVT ValVT = VA.getValVT();
-      MVT LocVT = VA.getLocVT();
+  SmallVector<SDValue, 8> MemOps;
+
+  for (size_t I = 0, End = ArgLocs.size(); I != End; /* No increment here */) {
+    CCValAssign &VA = ArgLocs[I++];
+    MVT LocVT = VA.getLocVT();
+    ISD::ArgFlagsTy Flags = Ins[VA.getValNo()].Flags;
+
+    // For compatibility with the AIX XL compiler, the float args in the
+    // parameter save area are initialized even if the argument is available
+    // in register.  The caller is required to initialize both the register
+    // and memory, however, the callee can choose to expect it in either.
+    // The memloc is dismissed here because the argument is retrieved from
+    // the register.
+    if (VA.isMemLoc() && VA.needsCustom())
+      continue;
+
+    if (Flags.isByVal() && VA.isMemLoc()) {
+      const unsigned Size =
+          alignTo(Flags.getByValSize() ? Flags.getByValSize() : PtrByteSize,
+                  PtrByteSize);
+      const int FI = MF.getFrameInfo().CreateFixedObject(
+          Size, VA.getLocMemOffset(), /* IsImmutable */ false,
+          /* IsAliased */ true);
+      SDValue FIN = DAG.getFrameIndex(FI, PtrVT);
+      InVals.push_back(FIN);
+
+      continue;
+    }
+
+    if (Flags.isByVal()) {
+      assert(VA.isRegLoc() && "MemLocs should already be handled.");
+
+      const MCPhysReg ArgReg = VA.getLocReg();
+      const PPCFrameLowering *FL = Subtarget.getFrameLowering();
+
+      if (Flags.getNonZeroByValAlign() > PtrByteSize)
+        report_fatal_error("Over aligned byvals not supported yet.");
+
+      const unsigned StackSize = alignTo(Flags.getByValSize(), PtrByteSize);
+      const int FI = MF.getFrameInfo().CreateFixedObject(
+          StackSize, mapArgRegToOffsetAIX(ArgReg, FL), /* IsImmutable */ false,
+          /* IsAliased */ true);
+      SDValue FIN = DAG.getFrameIndex(FI, PtrVT);
+      InVals.push_back(FIN);
+
+      // Add live ins for all the RegLocs for the same ByVal.
+      const TargetRegisterClass *RegClass =
+          IsPPC64 ? &PPC::G8RCRegClass : &PPC::GPRCRegClass;
+
+      auto HandleRegLoc = [&, RegClass, LocVT](const MCPhysReg PhysReg,
+                                               unsigned Offset) {
+        const unsigned VReg = MF.addLiveIn(PhysReg, RegClass);
+        // Since the callers side has left justified the aggregate in the
+        // register, we can simply store the entire register into the stack
+        // slot.
+        SDValue CopyFrom = DAG.getCopyFromReg(Chain, dl, VReg, LocVT);
+        // The store to the fixedstack object is needed becuase accessing a
+        // field of the ByVal will use a gep and load. Ideally we will optimize
+        // to extracting the value from the register directly, and elide the
+        // stores when the arguments address is not taken, but that will need to
+        // be future work.
+        SDValue Store =
+            DAG.getStore(CopyFrom.getValue(1), dl, CopyFrom,
+                         DAG.getObjectPtrOffset(dl, FIN, Offset),
+                         MachinePointerInfo::getFixedStack(MF, FI, Offset));
+
+        MemOps.push_back(Store);
+      };
+
+      unsigned Offset = 0;
+      HandleRegLoc(VA.getLocReg(), Offset);
+      Offset += PtrByteSize;
+      for (; Offset != StackSize && ArgLocs[I].isRegLoc();
+           Offset += PtrByteSize) {
+        assert(ArgLocs[I].getValNo() == VA.getValNo() &&
+               "RegLocs should be for ByVal argument.");
+
+        const CCValAssign RL = ArgLocs[I++];
+        HandleRegLoc(RL.getLocReg(), Offset);
+      }
+
+      if (Offset != StackSize) {
+        assert(ArgLocs[I].getValNo() == VA.getValNo() &&
+               "Expected MemLoc for remaining bytes.");
+        assert(ArgLocs[I].isMemLoc() && "Expected MemLoc for remaining bytes.");
+        // Consume the MemLoc.The InVal has already been emitted, so nothing
+        // more needs to be done.
+        ++I;
+      }
+
+      continue;
+    }
+
+    EVT ValVT = VA.getValVT();
+    if (VA.isRegLoc() && !VA.needsCustom()) {
       MVT::SimpleValueType SVT = ValVT.getSimpleVT().SimpleTy;
       unsigned VReg =
           MF.addLiveIn(VA.getLocReg(), getRegClassForSVT(SVT, IsPPC64));
-      ArgValue = DAG.getCopyFromReg(Chain, dl, VReg, LocVT);
+      SDValue ArgValue = DAG.getCopyFromReg(Chain, dl, VReg, LocVT);
       if (ValVT.isScalarInteger() &&
           (ValVT.getSizeInBits() < LocVT.getSizeInBits())) {
         ArgValue =
             truncateScalarIntegerArg(Flags, ValVT, DAG, ArgValue, LocVT, dl);
       }
       InVals.push_back(ArgValue);
-    } else {
-      report_fatal_error("Handling of formal arguments on the stack is "
-                         "unimplemented!");
+      continue;
+    }
+    if (VA.isMemLoc()) {
+      const unsigned LocSize = LocVT.getStoreSize();
+      const unsigned ValSize = ValVT.getStoreSize();
+      assert((ValSize <= LocSize) &&
+             "Object size is larger than size of MemLoc");
+      int CurArgOffset = VA.getLocMemOffset();
+      // Objects are right-justified because AIX is big-endian.
+      if (LocSize > ValSize)
+        CurArgOffset += LocSize - ValSize;
+      // Potential tail calls could cause overwriting of argument stack slots.
+      const bool IsImmutable =
+          !(getTargetMachine().Options.GuaranteedTailCallOpt &&
+            (CallConv == CallingConv::Fast));
+      int FI = MFI.CreateFixedObject(ValSize, CurArgOffset, IsImmutable);
+      SDValue FIN = DAG.getFrameIndex(FI, PtrVT);
+      SDValue ArgValue =
+          DAG.getLoad(ValVT, dl, Chain, FIN, MachinePointerInfo());
+      InVals.push_back(ArgValue);
+      continue;
     }
   }
 
+  // On AIX a minimum of 8 words is saved to the parameter save area.
+  const unsigned MinParameterSaveArea = 8 * PtrByteSize;
   // Area that is at least reserved in the caller of this function.
-  unsigned MinReservedArea = CCInfo.getNextStackOffset();
+  unsigned CallerReservedArea =
+      std::max(CCInfo.getNextStackOffset(), LinkageSize + MinParameterSaveArea);
 
   // Set the size that is at least reserved in caller of this function. Tail
   // call optimized function's reserved stack space needs to be aligned so
   // that taking the difference between two stack areas will result in an
   // aligned stack.
-  MinReservedArea =
-      EnsureStackAlignment(Subtarget.getFrameLowering(), MinReservedArea);
+  CallerReservedArea =
+      EnsureStackAlignment(Subtarget.getFrameLowering(), CallerReservedArea);
   PPCFunctionInfo *FuncInfo = MF.getInfo<PPCFunctionInfo>();
-  FuncInfo->setMinReservedArea(MinReservedArea);
+  FuncInfo->setMinReservedArea(CallerReservedArea);
+
+  if (isVarArg) {
+    FuncInfo->setVarArgsFrameIndex(
+        MFI.CreateFixedObject(PtrByteSize, CCInfo.getNextStackOffset(), true));
+    SDValue FIN = DAG.getFrameIndex(FuncInfo->getVarArgsFrameIndex(), PtrVT);
+
+    static const MCPhysReg GPR_32[] = {PPC::R3, PPC::R4, PPC::R5, PPC::R6,
+                                       PPC::R7, PPC::R8, PPC::R9, PPC::R10};
+
+    static const MCPhysReg GPR_64[] = {PPC::X3, PPC::X4, PPC::X5, PPC::X6,
+                                       PPC::X7, PPC::X8, PPC::X9, PPC::X10};
+    const unsigned NumGPArgRegs = array_lengthof(IsPPC64 ? GPR_64 : GPR_32);
+
+    // The fixed integer arguments of a variadic function are stored to the
+    // VarArgsFrameIndex on the stack so that they may be loaded by
+    // dereferencing the result of va_next.
+    for (unsigned GPRIndex =
+             (CCInfo.getNextStackOffset() - LinkageSize) / PtrByteSize;
+         GPRIndex < NumGPArgRegs; ++GPRIndex) {
+
+      const unsigned VReg =
+          IsPPC64 ? MF.addLiveIn(GPR_64[GPRIndex], &PPC::G8RCRegClass)
+                  : MF.addLiveIn(GPR_32[GPRIndex], &PPC::GPRCRegClass);
+
+      SDValue Val = DAG.getCopyFromReg(Chain, dl, VReg, PtrVT);
+      SDValue Store =
+          DAG.getStore(Val.getValue(1), dl, Val, FIN, MachinePointerInfo());
+      MemOps.push_back(Store);
+      // Increment the address for the next argument to store.
+      SDValue PtrOff = DAG.getConstant(PtrByteSize, dl, PtrVT);
+      FIN = DAG.getNode(ISD::ADD, dl, PtrOff.getValueType(), FIN, PtrOff);
+    }
+  }
+
+  if (!MemOps.empty())
+    Chain = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, MemOps);
 
   return Chain;
 }
 
 SDValue PPCTargetLowering::LowerCall_AIX(
-    SDValue Chain, SDValue Callee, CallingConv::ID CallConv, bool isVarArg,
-    bool isTailCall, bool isPatchPoint,
+    SDValue Chain, SDValue Callee, CallFlags CFlags,
     const SmallVectorImpl<ISD::OutputArg> &Outs,
     const SmallVectorImpl<SDValue> &OutVals,
     const SmallVectorImpl<ISD::InputArg> &Ins, const SDLoc &dl,
     SelectionDAG &DAG, SmallVectorImpl<SDValue> &InVals,
-    ImmutableCallSite CS) const {
+    const CallBase *CB) const {
+  // See PPCTargetLowering::LowerFormalArguments_AIX() for a description of the
+  // AIX ABI stack frame layout.
 
-  assert((CallConv == CallingConv::C ||
-          CallConv == CallingConv::Cold ||
-          CallConv == CallingConv::Fast) && "Unexpected calling convention!");
+  assert((CFlags.CallConv == CallingConv::C ||
+          CFlags.CallConv == CallingConv::Cold ||
+          CFlags.CallConv == CallingConv::Fast) &&
+         "Unexpected calling convention!");
 
-  if (isPatchPoint)
+  if (CFlags.IsPatchPoint)
     report_fatal_error("This call type is unimplemented on AIX.");
 
   const PPCSubtarget& Subtarget =
@@ -7104,7 +7509,8 @@ SDValue PPCTargetLowering::LowerCall_AIX(
 
   MachineFunction &MF = DAG.getMachineFunction();
   SmallVector<CCValAssign, 16> ArgLocs;
-  CCState CCInfo(CallConv, isVarArg, MF, ArgLocs, *DAG.getContext());
+  CCState CCInfo(CFlags.CallConv, CFlags.IsVarArg, MF, ArgLocs,
+                 *DAG.getContext());
 
   // Reserve space for the linkage save area (LSA) on the stack.
   // In both PPC32 and PPC64 there are 6 reserved slots in the LSA:
@@ -7112,8 +7518,9 @@ SDValue PPCTargetLowering::LowerCall_AIX(
   // The LSA is 24 bytes (6x4) in PPC32 and 48 bytes (6x8) in PPC64.
   const unsigned LinkageSize = Subtarget.getFrameLowering()->getLinkageSize();
   const bool IsPPC64 = Subtarget.isPPC64();
+  const EVT PtrVT = getPointerTy(DAG.getDataLayout());
   const unsigned PtrByteSize = IsPPC64 ? 8 : 4;
-  CCInfo.AllocateStack(LinkageSize, PtrByteSize);
+  CCInfo.AllocateStack(LinkageSize, Align(PtrByteSize));
   CCInfo.AnalyzeCallOperands(Outs, CC_AIX);
 
   // The prolog code of the callee may store up to 8 GPR argument registers to
@@ -7123,85 +7530,201 @@ SDValue PPCTargetLowering::LowerCall_AIX(
   // conservatively assume that it is needed.  As such, make sure we have at
   // least enough stack space for the caller to store the 8 GPRs.
   const unsigned MinParameterSaveAreaSize = 8 * PtrByteSize;
-  const unsigned NumBytes = LinkageSize + MinParameterSaveAreaSize;
+  const unsigned NumBytes = std::max(LinkageSize + MinParameterSaveAreaSize,
+                                     CCInfo.getNextStackOffset());
 
   // Adjust the stack pointer for the new arguments...
   // These operations are automatically eliminated by the prolog/epilog pass.
   Chain = DAG.getCALLSEQ_START(Chain, NumBytes, 0, dl);
   SDValue CallSeqStart = Chain;
 
-  SmallVector<std::pair<unsigned, SDValue>, 8> RegsToPass;
+  SmallVector<std::pair<unsigned, SDValue>, 8> RegsToPass;
+  SmallVector<SDValue, 8> MemOpChains;
+
+  // Set up a copy of the stack pointer for loading and storing any
+  // arguments that may not fit in the registers available for argument
+  // passing.
+  const SDValue StackPtr = IsPPC64 ? DAG.getRegister(PPC::X1, MVT::i64)
+                                   : DAG.getRegister(PPC::R1, MVT::i32);
+
+  for (unsigned I = 0, E = ArgLocs.size(); I != E;) {
+    const unsigned ValNo = ArgLocs[I].getValNo();
+    SDValue Arg = OutVals[ValNo];
+    ISD::ArgFlagsTy Flags = Outs[ValNo].Flags;
+
+    if (Flags.isByVal()) {
+      const unsigned ByValSize = Flags.getByValSize();
+
+      // Nothing to do for zero-sized ByVals on the caller side.
+      if (!ByValSize) {
+        ++I;
+        continue;
+      }
+
+      auto GetLoad = [&](EVT VT, unsigned LoadOffset) {
+        return DAG.getExtLoad(ISD::ZEXTLOAD, dl, PtrVT, Chain,
+                              (LoadOffset != 0)
+                                  ? DAG.getObjectPtrOffset(dl, Arg, LoadOffset)
+                                  : Arg,
+                              MachinePointerInfo(), VT);
+      };
+
+      unsigned LoadOffset = 0;
+
+      // Initialize registers, which are fully occupied by the by-val argument.
+      while (LoadOffset + PtrByteSize <= ByValSize && ArgLocs[I].isRegLoc()) {
+        SDValue Load = GetLoad(PtrVT, LoadOffset);
+        MemOpChains.push_back(Load.getValue(1));
+        LoadOffset += PtrByteSize;
+        const CCValAssign &ByValVA = ArgLocs[I++];
+        assert(ByValVA.getValNo() == ValNo &&
+               "Unexpected location for pass-by-value argument.");
+        RegsToPass.push_back(std::make_pair(ByValVA.getLocReg(), Load));
+      }
+
+      if (LoadOffset == ByValSize)
+        continue;
+
+      // There must be one more loc to handle the remainder.
+      assert(ArgLocs[I].getValNo() == ValNo &&
+             "Expected additional location for by-value argument.");
+
+      if (ArgLocs[I].isMemLoc()) {
+        assert(LoadOffset < ByValSize && "Unexpected memloc for by-val arg.");
+        const CCValAssign &ByValVA = ArgLocs[I++];
+        ISD::ArgFlagsTy MemcpyFlags = Flags;
+        // Only memcpy the bytes that don't pass in register.
+        MemcpyFlags.setByValSize(ByValSize - LoadOffset);
+        Chain = CallSeqStart = createMemcpyOutsideCallSeq(
+            (LoadOffset != 0) ? DAG.getObjectPtrOffset(dl, Arg, LoadOffset)
+                              : Arg,
+            DAG.getObjectPtrOffset(dl, StackPtr, ByValVA.getLocMemOffset()),
+            CallSeqStart, MemcpyFlags, DAG, dl);
+        continue;
+      }
+
+      // Initialize the final register residue.
+      // Any residue that occupies the final by-val arg register must be
+      // left-justified on AIX. Loads must be a power-of-2 size and cannot be
+      // larger than the ByValSize. For example: a 7 byte by-val arg requires 4,
+      // 2 and 1 byte loads.
+      const unsigned ResidueBytes = ByValSize % PtrByteSize;
+      assert(ResidueBytes != 0 && LoadOffset + PtrByteSize > ByValSize &&
+             "Unexpected register residue for by-value argument.");
+      SDValue ResidueVal;
+      for (unsigned Bytes = 0; Bytes != ResidueBytes;) {
+        const unsigned N = PowerOf2Floor(ResidueBytes - Bytes);
+        const MVT VT =
+            N == 1 ? MVT::i8
+                   : ((N == 2) ? MVT::i16 : (N == 4 ? MVT::i32 : MVT::i64));
+        SDValue Load = GetLoad(VT, LoadOffset);
+        MemOpChains.push_back(Load.getValue(1));
+        LoadOffset += N;
+        Bytes += N;
+
+        // By-val arguments are passed left-justfied in register.
+        // Every load here needs to be shifted, otherwise a full register load
+        // should have been used.
+        assert(PtrVT.getSimpleVT().getSizeInBits() > (Bytes * 8) &&
+               "Unexpected load emitted during handling of pass-by-value "
+               "argument.");
+        unsigned NumSHLBits = PtrVT.getSimpleVT().getSizeInBits() - (Bytes * 8);
+        EVT ShiftAmountTy =
+            getShiftAmountTy(Load->getValueType(0), DAG.getDataLayout());
+        SDValue SHLAmt = DAG.getConstant(NumSHLBits, dl, ShiftAmountTy);
+        SDValue ShiftedLoad =
+            DAG.getNode(ISD::SHL, dl, Load.getValueType(), Load, SHLAmt);
+        ResidueVal = ResidueVal ? DAG.getNode(ISD::OR, dl, PtrVT, ResidueVal,
+                                              ShiftedLoad)
+                                : ShiftedLoad;
+      }
+
+      const CCValAssign &ByValVA = ArgLocs[I++];
+      RegsToPass.push_back(std::make_pair(ByValVA.getLocReg(), ResidueVal));
+      continue;
+    }
 
-  for (unsigned I = 0, E = ArgLocs.size(); I != E;) {
     CCValAssign &VA = ArgLocs[I++];
+    const MVT LocVT = VA.getLocVT();
+    const MVT ValVT = VA.getValVT();
 
-    if (VA.isMemLoc())
-      report_fatal_error("Handling of placing parameters on the stack is "
-                         "unimplemented!");
-    if (!VA.isRegLoc())
-      report_fatal_error(
-          "Unexpected non-register location for function call argument.");
-
-    SDValue Arg = OutVals[VA.getValNo()];
+    switch (VA.getLocInfo()) {
+    default:
+      report_fatal_error("Unexpected argument extension type.");
+    case CCValAssign::Full:
+      break;
+    case CCValAssign::ZExt:
+      Arg = DAG.getNode(ISD::ZERO_EXTEND, dl, VA.getLocVT(), Arg);
+      break;
+    case CCValAssign::SExt:
+      Arg = DAG.getNode(ISD::SIGN_EXTEND, dl, VA.getLocVT(), Arg);
+      break;
+    }
 
-    if (!VA.needsCustom()) {
-      switch (VA.getLocInfo()) {
-      default:
-        report_fatal_error("Unexpected argument extension type.");
-      case CCValAssign::Full:
-        break;
-      case CCValAssign::ZExt:
-        Arg = DAG.getNode(ISD::ZERO_EXTEND, dl, VA.getLocVT(), Arg);
-        break;
-      case CCValAssign::SExt:
-        Arg = DAG.getNode(ISD::SIGN_EXTEND, dl, VA.getLocVT(), Arg);
-        break;
-      }
+    if (VA.isRegLoc() && !VA.needsCustom()) {
       RegsToPass.push_back(std::make_pair(VA.getLocReg(), Arg));
+      continue;
+    }
+
+    if (VA.isMemLoc()) {
+      SDValue PtrOff =
+          DAG.getConstant(VA.getLocMemOffset(), dl, StackPtr.getValueType());
+      PtrOff = DAG.getNode(ISD::ADD, dl, PtrVT, StackPtr, PtrOff);
+      MemOpChains.push_back(
+          DAG.getStore(Chain, dl, Arg, PtrOff, MachinePointerInfo()));
 
       continue;
     }
 
     // Custom handling is used for GPR initializations for vararg float
     // arguments.
-    assert(isVarArg && VA.getValVT().isFloatingPoint() &&
-           VA.getLocVT().isInteger() &&
-           "Unexpected custom register handling for calling convention.");
+    assert(VA.isRegLoc() && VA.needsCustom() && CFlags.IsVarArg &&
+           ValVT.isFloatingPoint() && LocVT.isInteger() &&
+           "Unexpected register handling for calling convention.");
 
     SDValue ArgAsInt =
-        DAG.getBitcast(MVT::getIntegerVT(VA.getValVT().getSizeInBits()), Arg);
+        DAG.getBitcast(MVT::getIntegerVT(ValVT.getSizeInBits()), Arg);
 
-    if (Arg.getValueType().getStoreSize() == VA.getLocVT().getStoreSize())
+    if (Arg.getValueType().getStoreSize() == LocVT.getStoreSize())
       // f32 in 32-bit GPR
       // f64 in 64-bit GPR
       RegsToPass.push_back(std::make_pair(VA.getLocReg(), ArgAsInt));
-    else if (Arg.getValueType().getSizeInBits() < VA.getLocVT().getSizeInBits())
+    else if (Arg.getValueType().getSizeInBits() < LocVT.getSizeInBits())
       // f32 in 64-bit GPR.
       RegsToPass.push_back(std::make_pair(
-          VA.getLocReg(), DAG.getZExtOrTrunc(ArgAsInt, dl, VA.getLocVT())));
+          VA.getLocReg(), DAG.getZExtOrTrunc(ArgAsInt, dl, LocVT)));
     else {
       // f64 in two 32-bit GPRs
       // The 2 GPRs are marked custom and expected to be adjacent in ArgLocs.
-      assert(Arg.getValueType() == MVT::f64 && isVarArg && !IsPPC64 &&
+      assert(Arg.getValueType() == MVT::f64 && CFlags.IsVarArg && !IsPPC64 &&
              "Unexpected custom register for argument!");
       CCValAssign &GPR1 = VA;
       SDValue MSWAsI64 = DAG.getNode(ISD::SRL, dl, MVT::i64, ArgAsInt,
                                      DAG.getConstant(32, dl, MVT::i8));
       RegsToPass.push_back(std::make_pair(
           GPR1.getLocReg(), DAG.getZExtOrTrunc(MSWAsI64, dl, MVT::i32)));
-      assert(I != E && "A second custom GPR is expected!");
-      CCValAssign &GPR2 = ArgLocs[I++];
-      assert(GPR2.isRegLoc() && GPR2.getValNo() == GPR1.getValNo() &&
-             GPR2.needsCustom() && "A second custom GPR is expected!");
-      RegsToPass.push_back(std::make_pair(
-          GPR2.getLocReg(), DAG.getZExtOrTrunc(ArgAsInt, dl, MVT::i32)));
+
+      if (I != E) {
+        // If only 1 GPR was available, there will only be one custom GPR and
+        // the argument will also pass in memory.
+        CCValAssign &PeekArg = ArgLocs[I];
+        if (PeekArg.isRegLoc() && PeekArg.getValNo() == PeekArg.getValNo()) {
+          assert(PeekArg.needsCustom() && "A second custom GPR is expected.");
+          CCValAssign &GPR2 = ArgLocs[I++];
+          RegsToPass.push_back(std::make_pair(
+              GPR2.getLocReg(), DAG.getZExtOrTrunc(ArgAsInt, dl, MVT::i32)));
+        }
+      }
     }
   }
 
+  if (!MemOpChains.empty())
+    Chain = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, MemOpChains);
+
   // For indirect calls, we need to save the TOC base to the stack for
   // restoration after the call.
-  if (!isTailCall && !isPatchPoint &&
-      !isFunctionGlobalAddress(Callee) && !isa<ExternalSymbolSDNode>(Callee)) {
+  if (CFlags.IsIndirect) {
+    assert(!CFlags.IsTailCall && "Indirect tail-calls not supported.");
     const MCRegister TOCBaseReg = Subtarget.getTOCPointerRegister();
     const MCRegister StackPtrReg = Subtarget.getStackPointerRegister();
     const MVT PtrVT = Subtarget.isPPC64() ? MVT::i64 : MVT::i32;
@@ -7227,10 +7750,8 @@ SDValue PPCTargetLowering::LowerCall_AIX(
   }
 
   const int SPDiff = 0;
-  return FinishCall(CallConv, dl, isTailCall, isVarArg, isPatchPoint,
-                    /* unused except on PPC64 ELFv1 */ false, DAG, RegsToPass,
-                    InFlag, Chain, CallSeqStart, Callee, SPDiff, NumBytes, Ins,
-                    InVals, CS);
+  return FinishCall(CFlags, dl, DAG, RegsToPass, InFlag, Chain, CallSeqStart,
+                    Callee, SPDiff, NumBytes, Ins, InVals, CB);
 }
 
 bool
@@ -7302,25 +7823,6 @@ PPCTargetLowering::LowerReturn(SDValue Chain, CallingConv::ID CallConv,
     RetOps.push_back(DAG.getRegister(VA.getLocReg(), VA.getLocVT()));
   }
 
-  const PPCRegisterInfo *TRI = Subtarget.getRegisterInfo();
-  const MCPhysReg *I =
-    TRI->getCalleeSavedRegsViaCopy(&DAG.getMachineFunction());
-  if (I) {
-    for (; *I; ++I) {
-
-      if (PPC::G8RCRegClass.contains(*I))
-        RetOps.push_back(DAG.getRegister(*I, MVT::i64));
-      else if (PPC::F8RCRegClass.contains(*I))
-        RetOps.push_back(DAG.getRegister(*I, MVT::getFloatingPointVT(64)));
-      else if (PPC::CRRCRegClass.contains(*I))
-        RetOps.push_back(DAG.getRegister(*I, MVT::i1));
-      else if (PPC::VRRCRegClass.contains(*I))
-        RetOps.push_back(DAG.getRegister(*I, MVT::Other));
-      else
-        llvm_unreachable("Unexpected register class in CSRsViaCopy!");
-    }
-  }
-
   RetOps[0] = Chain;  // Update chain.
 
   // Add the flag if we have it.
@@ -7422,6 +7924,7 @@ PPCTargetLowering::getFramePointerFrameIndex(SelectionDAG & DAG) const {
 
 SDValue PPCTargetLowering::LowerDYNAMIC_STACKALLOC(SDValue Op,
                                                    SelectionDAG &DAG) const {
+  MachineFunction &MF = DAG.getMachineFunction();
   // Get the inputs.
   SDValue Chain = Op.getOperand(0);
   SDValue Size  = Op.getOperand(1);
@@ -7434,9 +7937,10 @@ SDValue PPCTargetLowering::LowerDYNAMIC_STACKALLOC(SDValue Op,
                                 DAG.getConstant(0, dl, PtrVT), Size);
   // Construct a node for the frame pointer save index.
   SDValue FPSIdx = getFramePointerFrameIndex(DAG);
-  // Build a DYNALLOC node.
   SDValue Ops[3] = { Chain, NegSize, FPSIdx };
   SDVTList VTs = DAG.getVTList(PtrVT, MVT::Other);
+  if (hasInlineStackProbe(MF))
+    return DAG.getNode(PPCISD::PROBED_ALLOCA, dl, VTs, Ops);
   return DAG.getNode(PPCISD::DYNALLOC, dl, VTs, Ops);
 }
 
@@ -7585,15 +8089,6 @@ SDValue PPCTargetLowering::LowerSELECT_CC(SDValue Op, SelectionDAG &DAG) const {
       !Op.getOperand(2).getValueType().isFloatingPoint())
     return Op;
 
-  bool HasNoInfs = DAG.getTarget().Options.NoInfsFPMath;
-  bool HasNoNaNs = DAG.getTarget().Options.NoNaNsFPMath;
-  // We might be able to do better than this under some circumstances, but in
-  // general, fsel-based lowering of select is a finite-math-only optimization.
-  // For more information, see section F.3 of the 2.06 ISA specification.
-  // With ISA 3.0, we have xsmaxcdp/xsmincdp which are OK to emit even in the
-  // presence of infinities.
-  if (!Subtarget.hasP9Vector() && (!HasNoInfs || !HasNoNaNs))
-    return Op;
   ISD::CondCode CC = cast<CondCodeSDNode>(Op.getOperand(4))->get();
 
   EVT ResVT = Op.getValueType();
@@ -7601,14 +8096,14 @@ SDValue PPCTargetLowering::LowerSELECT_CC(SDValue Op, SelectionDAG &DAG) const {
   SDValue LHS = Op.getOperand(0), RHS = Op.getOperand(1);
   SDValue TV  = Op.getOperand(2), FV  = Op.getOperand(3);
   SDLoc dl(Op);
+  SDNodeFlags Flags = Op.getNode()->getFlags();
 
+  // We have xsmaxcdp/xsmincdp which are OK to emit even in the
+  // presence of infinities.
   if (Subtarget.hasP9Vector() && LHS == TV && RHS == FV) {
     switch (CC) {
     default:
-      // Not a min/max but with finite math, we may still be able to use fsel.
-      if (HasNoInfs && HasNoNaNs)
-        break;
-      return Op;
+      break;
     case ISD::SETOGT:
     case ISD::SETGT:
       return DAG.getNode(PPCISD::XSMAXCDP, dl, Op.getValueType(), LHS, RHS);
@@ -7618,10 +8113,13 @@ SDValue PPCTargetLowering::LowerSELECT_CC(SDValue Op, SelectionDAG &DAG) const {
     }
   }
 
-  // TODO: Propagate flags from the select rather than global settings.
-  SDNodeFlags Flags;
-  Flags.setNoInfs(true);
-  Flags.setNoNaNs(true);
+  // We might be able to do better than this under some circumstances, but in
+  // general, fsel-based lowering of select is a finite-math-only optimization.
+  // For more information, see section F.3 of the 2.06 ISA specification.
+  // With ISA 3.0
+  if ((!DAG.getTarget().Options.NoInfsFPMath && !Flags.hasNoInfs()) ||
+      (!DAG.getTarget().Options.NoNaNsFPMath && !Flags.hasNoNaNs()))
+    return Op;
 
   // If the RHS of the comparison is a 0.0, we don't need to do the
   // subtraction at all.
@@ -7741,12 +8239,12 @@ void PPCTargetLowering::LowerFP_TO_INTForReuse(SDValue Op, ReuseLoadInfo &RLI,
 
   // Emit a store to the stack slot.
   SDValue Chain;
-  unsigned Alignment = DAG.getEVTAlignment(Tmp.getValueType());
+  Align Alignment(DAG.getEVTAlign(Tmp.getValueType()));
   if (i32Stack) {
     MachineFunction &MF = DAG.getMachineFunction();
-    Alignment = 4;
+    Alignment = Align(4);
     MachineMemOperand *MMO =
-      MF.getMachineMemOperand(MPI, MachineMemOperand::MOStore, 4, Alignment);
+        MF.getMachineMemOperand(MPI, MachineMemOperand::MOStore, 4, Alignment);
     SDValue Ops[] = { DAG.getEntryNode(), Tmp, FIPtr };
     Chain = DAG.getMemIntrinsicNode(PPCISD::STFIWX, dl,
               DAG.getVTList(MVT::Other), Ops, MVT::i32, MMO);
@@ -7806,7 +8304,7 @@ SDValue PPCTargetLowering::LowerFP_TO_INT(SDValue Op, SelectionDAG &DAG,
                                           const SDLoc &dl) const {
 
   // FP to INT conversions are legal for f128.
-  if (EnableQuadPrecision && (Op->getOperand(0).getValueType() == MVT::f128))
+  if (Op->getOperand(0).getValueType() == MVT::f128)
     return Op;
 
   // Expand ppcf128 to i32 by hand for the benefit of llvm-gcc bootstrap on
@@ -7902,7 +8400,7 @@ bool PPCTargetLowering::canReuseLoadAddress(SDValue Op, EVT MemVT,
   RLI.MPI = LD->getPointerInfo();
   RLI.IsDereferenceable = LD->isDereferenceable();
   RLI.IsInvariant = LD->isInvariant();
-  RLI.Alignment = LD->getAlignment();
+  RLI.Alignment = LD->getAlign();
   RLI.AAInfo = LD->getAAInfo();
   RLI.Ranges = LD->getRanges();
 
@@ -8046,16 +8544,19 @@ SDValue PPCTargetLowering::LowerINT_TO_FPVector(SDValue Op, SelectionDAG &DAG,
   SDValue ShuffleSrc2 =
       SignedConv ? DAG.getUNDEF(WideVT) : DAG.getConstant(0, dl, WideVT);
   SDValue Arrange = DAG.getVectorShuffle(WideVT, dl, Wide, ShuffleSrc2, ShuffV);
-  unsigned ExtendOp =
-      SignedConv ? (unsigned)PPCISD::SExtVElems : (unsigned)ISD::BITCAST;
 
   SDValue Extend;
-  if (!Subtarget.hasP9Altivec() && SignedConv) {
+  if (SignedConv) {
     Arrange = DAG.getBitcast(IntermediateVT, Arrange);
+    EVT ExtVT = Op.getOperand(0).getValueType();
+    if (Subtarget.hasP9Altivec())
+      ExtVT = EVT::getVectorVT(*DAG.getContext(), WideVT.getVectorElementType(),
+                               IntermediateVT.getVectorNumElements());
+
     Extend = DAG.getNode(ISD::SIGN_EXTEND_INREG, dl, IntermediateVT, Arrange,
-                         DAG.getValueType(Op.getOperand(0).getValueType()));
+                         DAG.getValueType(ExtVT));
   } else
-    Extend = DAG.getNode(ExtendOp, dl, IntermediateVT, Arrange);
+    Extend = DAG.getNode(ISD::BITCAST, dl, IntermediateVT, Arrange);
 
   return DAG.getNode(Opc, dl, Op.getValueType(), Extend);
 }
@@ -8071,7 +8572,7 @@ SDValue PPCTargetLowering::LowerINT_TO_FP(SDValue Op,
     return LowerINT_TO_FPVector(Op, DAG, dl);
 
   // Conversions to f128 are legal.
-  if (EnableQuadPrecision && (Op.getValueType() == MVT::f128))
+  if (Op.getValueType() == MVT::f128)
     return Op;
 
   if (Subtarget.hasQPX() && Op.getOperand(0).getValueType() == MVT::v4i1) {
@@ -8166,8 +8667,10 @@ SDValue PPCTargetLowering::LowerINT_TO_FP(SDValue Op,
                                  SINT, DAG.getConstant(53, dl, MVT::i32));
       Cond = DAG.getNode(ISD::ADD, dl, MVT::i64,
                          Cond, DAG.getConstant(1, dl, MVT::i64));
-      Cond = DAG.getSetCC(dl, MVT::i32,
-                          Cond, DAG.getConstant(1, dl, MVT::i64), ISD::SETUGT);
+      Cond = DAG.getSetCC(
+          dl,
+          getSetCCResultType(DAG.getDataLayout(), *DAG.getContext(), MVT::i64),
+          Cond, DAG.getConstant(1, dl, MVT::i64), ISD::SETUGT);
 
       SINT = DAG.getNode(ISD::SELECT, dl, MVT::i64, Cond, Round, SINT);
     }
@@ -8208,7 +8711,7 @@ SDValue PPCTargetLowering::LowerINT_TO_FP(SDValue Op,
       MachineFrameInfo &MFI = MF.getFrameInfo();
       EVT PtrVT = getPointerTy(DAG.getDataLayout());
 
-      int FrameIdx = MFI.CreateStackObject(4, 4, false);
+      int FrameIdx = MFI.CreateStackObject(4, Align(4), false);
       SDValue FIdx = DAG.getFrameIndex(FrameIdx, PtrVT);
 
       SDValue Store =
@@ -8223,7 +8726,7 @@ SDValue PPCTargetLowering::LowerINT_TO_FP(SDValue Op,
       RLI.Chain = Store;
       RLI.MPI =
           MachinePointerInfo::getFixedStack(DAG.getMachineFunction(), FrameIdx);
-      RLI.Alignment = 4;
+      RLI.Alignment = Align(4);
 
       MachineMemOperand *MMO =
         MF.getMachineMemOperand(RLI.MPI, MachineMemOperand::MOLoad, 4,
@@ -8260,7 +8763,7 @@ SDValue PPCTargetLowering::LowerINT_TO_FP(SDValue Op,
     bool ReusingLoad;
     if (!(ReusingLoad = canReuseLoadAddress(Op.getOperand(0), MVT::i32, RLI,
                                             DAG))) {
-      int FrameIdx = MFI.CreateStackObject(4, 4, false);
+      int FrameIdx = MFI.CreateStackObject(4, Align(4), false);
       SDValue FIdx = DAG.getFrameIndex(FrameIdx, PtrVT);
 
       SDValue Store =
@@ -8275,7 +8778,7 @@ SDValue PPCTargetLowering::LowerINT_TO_FP(SDValue Op,
       RLI.Chain = Store;
       RLI.MPI =
           MachinePointerInfo::getFixedStack(DAG.getMachineFunction(), FrameIdx);
-      RLI.Alignment = 4;
+      RLI.Alignment = Align(4);
     }
 
     MachineMemOperand *MMO =
@@ -8292,7 +8795,7 @@ SDValue PPCTargetLowering::LowerINT_TO_FP(SDValue Op,
     assert(Subtarget.isPPC64() &&
            "i32->FP without LFIWAX supported only on PPC64");
 
-    int FrameIdx = MFI.CreateStackObject(8, 8, false);
+    int FrameIdx = MFI.CreateStackObject(8, Align(8), false);
     SDValue FIdx = DAG.getFrameIndex(FrameIdx, PtrVT);
 
     SDValue Ext64 = DAG.getNode(ISD::SIGN_EXTEND, dl, MVT::i64,
@@ -8344,22 +8847,20 @@ SDValue PPCTargetLowering::LowerFLT_ROUNDS_(SDValue Op,
   EVT PtrVT = getPointerTy(MF.getDataLayout());
 
   // Save FP Control Word to register
-  EVT NodeTys[] = {
-    MVT::f64,    // return register
-    MVT::Glue    // unused in this context
-  };
-  SDValue Chain = DAG.getNode(PPCISD::MFFS, dl, NodeTys, None);
+  SDValue Chain = Op.getOperand(0);
+  SDValue MFFS = DAG.getNode(PPCISD::MFFS, dl, {MVT::f64, MVT::Other}, Chain);
+  Chain = MFFS.getValue(1);
 
   // Save FP register to stack slot
-  int SSFI = MF.getFrameInfo().CreateStackObject(8, 8, false);
+  int SSFI = MF.getFrameInfo().CreateStackObject(8, Align(8), false);
   SDValue StackSlot = DAG.getFrameIndex(SSFI, PtrVT);
-  SDValue Store = DAG.getStore(DAG.getEntryNode(), dl, Chain, StackSlot,
-                               MachinePointerInfo());
+  Chain = DAG.getStore(Chain, dl, MFFS, StackSlot, MachinePointerInfo());
 
   // Load FP Control Word from low 32 bits of stack slot.
   SDValue Four = DAG.getConstant(4, dl, PtrVT);
   SDValue Addr = DAG.getNode(ISD::ADD, dl, PtrVT, StackSlot, Four);
-  SDValue CWD = DAG.getLoad(MVT::i32, dl, Store, Addr, MachinePointerInfo());
+  SDValue CWD = DAG.getLoad(MVT::i32, dl, Chain, Addr, MachinePointerInfo());
+  Chain = CWD.getValue(1);
 
   // Transform as necessary
   SDValue CWD1 =
@@ -8376,8 +8877,11 @@ SDValue PPCTargetLowering::LowerFLT_ROUNDS_(SDValue Op,
   SDValue RetVal =
     DAG.getNode(ISD::XOR, dl, MVT::i32, CWD1, CWD2);
 
-  return DAG.getNode((VT.getSizeInBits() < 16 ?
-                      ISD::TRUNCATE : ISD::ZERO_EXTEND), dl, VT, RetVal);
+  RetVal =
+      DAG.getNode((VT.getSizeInBits() < 16 ? ISD::TRUNCATE : ISD::ZERO_EXTEND),
+                  dl, VT, RetVal);
+
+  return DAG.getMergeValues({RetVal, Chain}, dl);
 }
 
 SDValue PPCTargetLowering::LowerSHL_PARTS(SDValue Op, SelectionDAG &DAG) const {
@@ -8471,19 +8975,21 @@ SDValue PPCTargetLowering::LowerSRA_PARTS(SDValue Op, SelectionDAG &DAG) const {
 // Vector related lowering.
 //
 
-/// BuildSplatI - Build a canonical splati of Val with an element size of
-/// SplatSize.  Cast the result to VT.
-static SDValue BuildSplatI(int Val, unsigned SplatSize, EVT VT,
-                           SelectionDAG &DAG, const SDLoc &dl) {
+/// getCanonicalConstSplat - Build a canonical splat immediate of Val with an
+/// element size of SplatSize. Cast the result to VT.
+static SDValue getCanonicalConstSplat(uint64_t Val, unsigned SplatSize, EVT VT,
+                                      SelectionDAG &DAG, const SDLoc &dl) {
   static const MVT VTys[] = { // canonical VT to use for each size.
     MVT::v16i8, MVT::v8i16, MVT::Other, MVT::v4i32
   };
 
   EVT ReqVT = VT != MVT::Other ? VT : VTys[SplatSize-1];
 
-  // Force vspltis[hw] -1 to vspltisb -1 to canonicalize.
-  if (Val == -1)
+  // For a splat with all ones, turn it to vspltisb 0xFF to canonicalize.
+  if (Val == ((1LU << (SplatSize * 8)) - 1)) {
     SplatSize = 1;
+    Val = 0xFF;
+  }
 
   EVT CanonicalVT = VTys[SplatSize-1];
 
@@ -8594,10 +9100,9 @@ SDValue PPCTargetLowering::LowerBITCAST(SDValue Op, SelectionDAG &DAG) const {
   SDLoc dl(Op);
   SDValue Op0 = Op->getOperand(0);
 
-  if (!EnableQuadPrecision ||
-      (Op.getValueType() != MVT::f128 ) ||
+  if ((Op.getValueType() != MVT::f128) ||
       (Op0.getOpcode() != ISD::BUILD_PAIR) ||
-      (Op0.getOperand(0).getValueType() !=  MVT::i64) ||
+      (Op0.getOperand(0).getValueType() != MVT::i64) ||
       (Op0.getOperand(1).getValueType() != MVT::i64))
     return SDValue();
 
@@ -8605,18 +9110,49 @@ SDValue PPCTargetLowering::LowerBITCAST(SDValue Op, SelectionDAG &DAG) const {
                      Op0.getOperand(1));
 }
 
-static const SDValue *getNormalLoadInput(const SDValue &Op) {
+static const SDValue *getNormalLoadInput(const SDValue &Op, bool &IsPermuted) {
   const SDValue *InputLoad = &Op;
   if (InputLoad->getOpcode() == ISD::BITCAST)
     InputLoad = &InputLoad->getOperand(0);
-  if (InputLoad->getOpcode() == ISD::SCALAR_TO_VECTOR)
+  if (InputLoad->getOpcode() == ISD::SCALAR_TO_VECTOR ||
+      InputLoad->getOpcode() == PPCISD::SCALAR_TO_VECTOR_PERMUTED) {
+    IsPermuted = InputLoad->getOpcode() == PPCISD::SCALAR_TO_VECTOR_PERMUTED;
     InputLoad = &InputLoad->getOperand(0);
+  }
   if (InputLoad->getOpcode() != ISD::LOAD)
     return nullptr;
   LoadSDNode *LD = cast<LoadSDNode>(*InputLoad);
   return ISD::isNormalLoad(LD) ? InputLoad : nullptr;
 }
 
+// Convert the argument APFloat to a single precision APFloat if there is no
+// loss in information during the conversion to single precision APFloat and the
+// resulting number is not a denormal number. Return true if successful.
+bool llvm::convertToNonDenormSingle(APFloat &ArgAPFloat) {
+  APFloat APFloatToConvert = ArgAPFloat;
+  bool LosesInfo = true;
+  APFloatToConvert.convert(APFloat::IEEEsingle(), APFloat::rmNearestTiesToEven,
+                           &LosesInfo);
+  bool Success = (!LosesInfo && !APFloatToConvert.isDenormal());
+  if (Success)
+    ArgAPFloat = APFloatToConvert;
+  return Success;
+}
+
+// Bitcast the argument APInt to a double and convert it to a single precision
+// APFloat, bitcast the APFloat to an APInt and assign it to the original
+// argument if there is no loss in information during the conversion from
+// double to single precision APFloat and the resulting number is not a denormal
+// number. Return true if successful.
+bool llvm::convertToNonDenormSingle(APInt &ArgAPInt) {
+  double DpValue = ArgAPInt.bitsToDouble();
+  APFloat APFloatDp(DpValue);
+  bool Success = convertToNonDenormSingle(APFloatDp);
+  if (Success)
+    ArgAPInt = APFloatDp.bitcastToAPInt();
+  return Success;
+}
+
 // If this is a case we can't handle, return null and let the default
 // expansion code take care of it.  If we CAN select this case, and if it
 // selects to a single instruction, return Op.  Otherwise, if we can codegen
@@ -8633,7 +9169,7 @@ SDValue PPCTargetLowering::LowerBUILD_VECTOR(SDValue Op,
     // then convert it to a floating-point vector and compare it
     // to a zero vector to get the boolean result.
     MachineFrameInfo &MFI = DAG.getMachineFunction().getFrameInfo();
-    int FrameIdx = MFI.CreateStackObject(16, 16, false);
+    int FrameIdx = MFI.CreateStackObject(16, Align(16), false);
     MachinePointerInfo PtrInfo =
         MachinePointerInfo::getFixedStack(DAG.getMachineFunction(), FrameIdx);
     EVT PtrVT = getPointerTy(DAG.getDataLayout());
@@ -8668,8 +9204,8 @@ SDValue PPCTargetLowering::LowerBUILD_VECTOR(SDValue Op,
       }
 
       Constant *CP = ConstantVector::get(CV);
-      SDValue CPIdx = DAG.getConstantPool(CP, getPointerTy(DAG.getDataLayout()),
-                                          16 /* alignment */);
+      SDValue CPIdx =
+          DAG.getConstantPool(CP, getPointerTy(DAG.getDataLayout()), Align(16));
 
       SDValue Ops[] = {DAG.getEntryNode(), CPIdx};
       SDVTList VTs = DAG.getVTList({MVT::v4i1, /*chain*/ MVT::Other});
@@ -8736,11 +9272,27 @@ SDValue PPCTargetLowering::LowerBUILD_VECTOR(SDValue Op,
   APInt APSplatBits, APSplatUndef;
   unsigned SplatBitSize;
   bool HasAnyUndefs;
-  if (! BVN->isConstantSplat(APSplatBits, APSplatUndef, SplatBitSize,
-                             HasAnyUndefs, 0, !Subtarget.isLittleEndian()) ||
-      SplatBitSize > 32) {
-
-    const SDValue *InputLoad = getNormalLoadInput(Op.getOperand(0));
+  bool BVNIsConstantSplat =
+      BVN->isConstantSplat(APSplatBits, APSplatUndef, SplatBitSize,
+                           HasAnyUndefs, 0, !Subtarget.isLittleEndian());
+
+  // If it is a splat of a double, check if we can shrink it to a 32 bit
+  // non-denormal float which when converted back to double gives us the same
+  // double. This is to exploit the XXSPLTIDP instruction.
+  if (BVNIsConstantSplat && Subtarget.hasPrefixInstrs() &&
+      (SplatBitSize == 64) && (Op->getValueType(0) == MVT::v2f64) &&
+      convertToNonDenormSingle(APSplatBits)) {
+    SDValue SplatNode = DAG.getNode(
+        PPCISD::XXSPLTI_SP_TO_DP, dl, MVT::v2f64,
+        DAG.getTargetConstant(APSplatBits.getZExtValue(), dl, MVT::i32));
+    return DAG.getBitcast(Op.getValueType(), SplatNode);
+  }
+
+  if (!BVNIsConstantSplat || SplatBitSize > 32) {
+
+    bool IsPermutedLoad = false;
+    const SDValue *InputLoad =
+        getNormalLoadInput(Op.getOperand(0), IsPermutedLoad);
     // Handle load-and-splat patterns as we have instructions that will do this
     // in one go.
     if (InputLoad && DAG.isSplatValue(Op, true)) {
@@ -8777,8 +9329,8 @@ SDValue PPCTargetLowering::LowerBUILD_VECTOR(SDValue Op,
     return SDValue();
   }
 
-  unsigned SplatBits = APSplatBits.getZExtValue();
-  unsigned SplatUndef = APSplatUndef.getZExtValue();
+  uint64_t SplatBits = APSplatBits.getZExtValue();
+  uint64_t SplatUndef = APSplatUndef.getZExtValue();
   unsigned SplatSize = SplatBitSize / 8;
 
   // First, handle single instruction cases.
@@ -8793,17 +9345,30 @@ SDValue PPCTargetLowering::LowerBUILD_VECTOR(SDValue Op,
     return Op;
   }
 
-  // We have XXSPLTIB for constant splats one byte wide
-  // FIXME: SplatBits is an unsigned int being cast to an int while passing it
-  // as an argument to BuildSplatiI. Given SplatSize == 1 it is okay here.
+  // We have XXSPLTIW for constant splats four bytes wide.
+  // Given vector length is a multiple of 4, 2-byte splats can be replaced
+  // with 4-byte splats. We replicate the SplatBits in case of 2-byte splat to
+  // make a 4-byte splat element. For example: 2-byte splat of 0xABAB can be
+  // turned into a 4-byte splat of 0xABABABAB.
+  if (Subtarget.hasPrefixInstrs() && SplatSize == 2)
+    return getCanonicalConstSplat((SplatBits |= SplatBits << 16), SplatSize * 2,
+                                  Op.getValueType(), DAG, dl);
+
+  if (Subtarget.hasPrefixInstrs() && SplatSize == 4)
+    return getCanonicalConstSplat(SplatBits, SplatSize, Op.getValueType(), DAG,
+                                  dl);
+
+  // We have XXSPLTIB for constant splats one byte wide.
   if (Subtarget.hasP9Vector() && SplatSize == 1)
-    return BuildSplatI(SplatBits, SplatSize, Op.getValueType(), DAG, dl);
+    return getCanonicalConstSplat(SplatBits, SplatSize, Op.getValueType(), DAG,
+                                  dl);
 
   // If the sign extended value is in the range [-16,15], use VSPLTI[bhw].
   int32_t SextVal= (int32_t(SplatBits << (32-SplatBitSize)) >>
                     (32-SplatBitSize));
   if (SextVal >= -16 && SextVal <= 15)
-    return BuildSplatI(SextVal, SplatSize, Op.getValueType(), DAG, dl);
+    return getCanonicalConstSplat(SextVal, SplatSize, Op.getValueType(), DAG,
+                                  dl);
 
   // Two instruction sequences.
 
@@ -8834,7 +9399,7 @@ SDValue PPCTargetLowering::LowerBUILD_VECTOR(SDValue Op,
   // for fneg/fabs.
   if (SplatSize == 4 && SplatBits == (0x7FFFFFFF&~SplatUndef)) {
     // Make -1 and vspltisw -1:
-    SDValue OnesV = BuildSplatI(-1, 4, MVT::v4i32, DAG, dl);
+    SDValue OnesV = getCanonicalConstSplat(-1, 4, MVT::v4i32, DAG, dl);
 
     // Make the VSLW intrinsic, computing 0x8000_0000.
     SDValue Res = BuildIntrinsicOp(Intrinsic::ppc_altivec_vslw, OnesV,
@@ -8862,7 +9427,7 @@ SDValue PPCTargetLowering::LowerBUILD_VECTOR(SDValue Op,
 
     // vsplti + shl self.
     if (SextVal == (int)((unsigned)i << TypeShiftAmt)) {
-      SDValue Res = BuildSplatI(i, SplatSize, MVT::Other, DAG, dl);
+      SDValue Res = getCanonicalConstSplat(i, SplatSize, MVT::Other, DAG, dl);
       static const unsigned IIDs[] = { // Intrinsic to use for each size.
         Intrinsic::ppc_altivec_vslb, Intrinsic::ppc_altivec_vslh, 0,
         Intrinsic::ppc_altivec_vslw
@@ -8873,7 +9438,7 @@ SDValue PPCTargetLowering::LowerBUILD_VECTOR(SDValue Op,
 
     // vsplti + srl self.
     if (SextVal == (int)((unsigned)i >> TypeShiftAmt)) {
-      SDValue Res = BuildSplatI(i, SplatSize, MVT::Other, DAG, dl);
+      SDValue Res = getCanonicalConstSplat(i, SplatSize, MVT::Other, DAG, dl);
       static const unsigned IIDs[] = { // Intrinsic to use for each size.
         Intrinsic::ppc_altivec_vsrb, Intrinsic::ppc_altivec_vsrh, 0,
         Intrinsic::ppc_altivec_vsrw
@@ -8884,7 +9449,7 @@ SDValue PPCTargetLowering::LowerBUILD_VECTOR(SDValue Op,
 
     // vsplti + sra self.
     if (SextVal == (int)((unsigned)i >> TypeShiftAmt)) {
-      SDValue Res = BuildSplatI(i, SplatSize, MVT::Other, DAG, dl);
+      SDValue Res = getCanonicalConstSplat(i, SplatSize, MVT::Other, DAG, dl);
       static const unsigned IIDs[] = { // Intrinsic to use for each size.
         Intrinsic::ppc_altivec_vsrab, Intrinsic::ppc_altivec_vsrah, 0,
         Intrinsic::ppc_altivec_vsraw
@@ -8896,7 +9461,7 @@ SDValue PPCTargetLowering::LowerBUILD_VECTOR(SDValue Op,
     // vsplti + rol self.
     if (SextVal == (int)(((unsigned)i << TypeShiftAmt) |
                          ((unsigned)i >> (SplatBitSize-TypeShiftAmt)))) {
-      SDValue Res = BuildSplatI(i, SplatSize, MVT::Other, DAG, dl);
+      SDValue Res = getCanonicalConstSplat(i, SplatSize, MVT::Other, DAG, dl);
       static const unsigned IIDs[] = { // Intrinsic to use for each size.
         Intrinsic::ppc_altivec_vrlb, Intrinsic::ppc_altivec_vrlh, 0,
         Intrinsic::ppc_altivec_vrlw
@@ -8907,19 +9472,19 @@ SDValue PPCTargetLowering::LowerBUILD_VECTOR(SDValue Op,
 
     // t = vsplti c, result = vsldoi t, t, 1
     if (SextVal == (int)(((unsigned)i << 8) | (i < 0 ? 0xFF : 0))) {
-      SDValue T = BuildSplatI(i, SplatSize, MVT::v16i8, DAG, dl);
+      SDValue T = getCanonicalConstSplat(i, SplatSize, MVT::v16i8, DAG, dl);
       unsigned Amt = Subtarget.isLittleEndian() ? 15 : 1;
       return BuildVSLDOI(T, T, Amt, Op.getValueType(), DAG, dl);
     }
     // t = vsplti c, result = vsldoi t, t, 2
     if (SextVal == (int)(((unsigned)i << 16) | (i < 0 ? 0xFFFF : 0))) {
-      SDValue T = BuildSplatI(i, SplatSize, MVT::v16i8, DAG, dl);
+      SDValue T = getCanonicalConstSplat(i, SplatSize, MVT::v16i8, DAG, dl);
       unsigned Amt = Subtarget.isLittleEndian() ? 14 : 2;
       return BuildVSLDOI(T, T, Amt, Op.getValueType(), DAG, dl);
     }
     // t = vsplti c, result = vsldoi t, t, 3
     if (SextVal == (int)(((unsigned)i << 24) | (i < 0 ? 0xFFFFFF : 0))) {
-      SDValue T = BuildSplatI(i, SplatSize, MVT::v16i8, DAG, dl);
+      SDValue T = getCanonicalConstSplat(i, SplatSize, MVT::v16i8, DAG, dl);
       unsigned Amt = Subtarget.isLittleEndian() ? 13 : 3;
       return BuildVSLDOI(T, T, Amt, Op.getValueType(), DAG, dl);
     }
@@ -9218,6 +9783,107 @@ SDValue PPCTargetLowering::lowerToVINSERTH(ShuffleVectorSDNode *N,
   return DAG.getNode(ISD::BITCAST, dl, MVT::v16i8, Ins);
 }
 
+/// lowerToXXSPLTI32DX - Return the SDValue if this VECTOR_SHUFFLE can be
+/// handled by the XXSPLTI32DX instruction introduced in ISA 3.1, otherwise
+/// return the default SDValue.
+SDValue PPCTargetLowering::lowerToXXSPLTI32DX(ShuffleVectorSDNode *SVN,
+                                              SelectionDAG &DAG) const {
+  // The LHS and RHS may be bitcasts to v16i8 as we canonicalize shuffles
+  // to v16i8. Peek through the bitcasts to get the actual operands.
+  SDValue LHS = peekThroughBitcasts(SVN->getOperand(0));
+  SDValue RHS = peekThroughBitcasts(SVN->getOperand(1));
+
+  auto ShuffleMask = SVN->getMask();
+  SDValue VecShuffle(SVN, 0);
+  SDLoc DL(SVN);
+
+  // Check that we have a four byte shuffle.
+  if (!isNByteElemShuffleMask(SVN, 4, 1))
+    return SDValue();
+
+  // Canonicalize the RHS being a BUILD_VECTOR when lowering to xxsplti32dx.
+  if (RHS->getOpcode() != ISD::BUILD_VECTOR) {
+    std::swap(LHS, RHS);
+    VecShuffle = DAG.getCommutedVectorShuffle(*SVN);
+    ShuffleMask = cast<ShuffleVectorSDNode>(VecShuffle)->getMask();
+  }
+
+  // Ensure that the RHS is a vector of constants.
+  BuildVectorSDNode *BVN = dyn_cast<BuildVectorSDNode>(RHS.getNode());
+  if (!BVN)
+    return SDValue();
+
+  // Check if RHS is a splat of 4-bytes (or smaller).
+  APInt APSplatValue, APSplatUndef;
+  unsigned SplatBitSize;
+  bool HasAnyUndefs;
+  if (!BVN->isConstantSplat(APSplatValue, APSplatUndef, SplatBitSize,
+                            HasAnyUndefs, 0, !Subtarget.isLittleEndian()) ||
+      SplatBitSize > 32)
+    return SDValue();
+
+  // Check that the shuffle mask matches the semantics of XXSPLTI32DX.
+  // The instruction splats a constant C into two words of the source vector
+  // producing { C, Unchanged, C, Unchanged } or { Unchanged, C, Unchanged, C }.
+  // Thus we check that the shuffle mask is the equivalent  of
+  // <0, [4-7], 2, [4-7]> or <[4-7], 1, [4-7], 3> respectively.
+  // Note: the check above of isNByteElemShuffleMask() ensures that the bytes
+  // within each word are consecutive, so we only need to check the first byte.
+  SDValue Index;
+  bool IsLE = Subtarget.isLittleEndian();
+  if ((ShuffleMask[0] == 0 && ShuffleMask[8] == 8) &&
+      (ShuffleMask[4] % 4 == 0 && ShuffleMask[12] % 4 == 0 &&
+       ShuffleMask[4] > 15 && ShuffleMask[12] > 15))
+    Index = DAG.getTargetConstant(IsLE ? 0 : 1, DL, MVT::i32);
+  else if ((ShuffleMask[4] == 4 && ShuffleMask[12] == 12) &&
+           (ShuffleMask[0] % 4 == 0 && ShuffleMask[8] % 4 == 0 &&
+            ShuffleMask[0] > 15 && ShuffleMask[8] > 15))
+    Index = DAG.getTargetConstant(IsLE ? 1 : 0, DL, MVT::i32);
+  else
+    return SDValue();
+
+  // If the splat is narrower than 32-bits, we need to get the 32-bit value
+  // for XXSPLTI32DX.
+  unsigned SplatVal = APSplatValue.getZExtValue();
+  for (; SplatBitSize < 32; SplatBitSize <<= 1)
+    SplatVal |= (SplatVal << SplatBitSize);
+
+  SDValue SplatNode = DAG.getNode(
+      PPCISD::XXSPLTI32DX, DL, MVT::v2i64, DAG.getBitcast(MVT::v2i64, LHS),
+      Index, DAG.getTargetConstant(SplatVal, DL, MVT::i32));
+  return DAG.getNode(ISD::BITCAST, DL, MVT::v16i8, SplatNode);
+}
+
+/// LowerROTL - Custom lowering for ROTL(v1i128) to vector_shuffle(v16i8).
+/// We lower ROTL(v1i128) to vector_shuffle(v16i8) only if shift amount is
+/// a multiple of 8. Otherwise convert it to a scalar rotation(i128)
+/// i.e (or (shl x, C1), (srl x, 128-C1)).
+SDValue PPCTargetLowering::LowerROTL(SDValue Op, SelectionDAG &DAG) const {
+  assert(Op.getOpcode() == ISD::ROTL && "Should only be called for ISD::ROTL");
+  assert(Op.getValueType() == MVT::v1i128 &&
+         "Only set v1i128 as custom, other type shouldn't reach here!");
+  SDLoc dl(Op);
+  SDValue N0 = peekThroughBitcasts(Op.getOperand(0));
+  SDValue N1 = peekThroughBitcasts(Op.getOperand(1));
+  unsigned SHLAmt = N1.getConstantOperandVal(0);
+  if (SHLAmt % 8 == 0) {
+    SmallVector<int, 16> Mask(16, 0);
+    std::iota(Mask.begin(), Mask.end(), 0);
+    std::rotate(Mask.begin(), Mask.begin() + SHLAmt / 8, Mask.end());
+    if (SDValue Shuffle =
+            DAG.getVectorShuffle(MVT::v16i8, dl, DAG.getBitcast(MVT::v16i8, N0),
+                                 DAG.getUNDEF(MVT::v16i8), Mask))
+      return DAG.getNode(ISD::BITCAST, dl, MVT::v1i128, Shuffle);
+  }
+  SDValue ArgVal = DAG.getBitcast(MVT::i128, N0);
+  SDValue SHLOp = DAG.getNode(ISD::SHL, dl, MVT::i128, ArgVal,
+                              DAG.getConstant(SHLAmt, dl, MVT::i32));
+  SDValue SRLOp = DAG.getNode(ISD::SRL, dl, MVT::i128, ArgVal,
+                              DAG.getConstant(128 - SHLAmt, dl, MVT::i32));
+  SDValue OROp = DAG.getNode(ISD::OR, dl, MVT::i128, SHLOp, SRLOp);
+  return DAG.getNode(ISD::BITCAST, dl, MVT::v1i128, OROp);
+}
+
 /// LowerVECTOR_SHUFFLE - Return the code we lower for VECTOR_SHUFFLE.  If this
 /// is a shuffle we can handle in a single instruction, return it.  Otherwise,
 /// return the code it can be lowered into.  Worst case, it can always be
@@ -9228,6 +9894,18 @@ SDValue PPCTargetLowering::LowerVECTOR_SHUFFLE(SDValue Op,
   SDValue V1 = Op.getOperand(0);
   SDValue V2 = Op.getOperand(1);
   ShuffleVectorSDNode *SVOp = cast<ShuffleVectorSDNode>(Op);
+
+  // Any nodes that were combined in the target-independent combiner prior
+  // to vector legalization will not be sent to the target combine. Try to
+  // combine it here.
+  if (SDValue NewShuffle = combineVectorShuffle(SVOp, DAG)) {
+    if (!isa<ShuffleVectorSDNode>(NewShuffle))
+      return NewShuffle;
+    Op = NewShuffle;
+    SVOp = cast<ShuffleVectorSDNode>(Op);
+    V1 = Op.getOperand(0);
+    V2 = Op.getOperand(1);
+  }
   EVT VT = Op.getValueType();
   bool isLittleEndian = Subtarget.isLittleEndian();
 
@@ -9237,7 +9915,8 @@ SDValue PPCTargetLowering::LowerVECTOR_SHUFFLE(SDValue Op,
   // If this is a load-and-splat, we can do that with a single instruction
   // in some cases. However if the load has multiple uses, we don't want to
   // combine it because that will just produce multiple loads.
-  const SDValue *InputLoad = getNormalLoadInput(V1);
+  bool IsPermutedLoad = false;
+  const SDValue *InputLoad = getNormalLoadInput(V1, IsPermutedLoad);
   if (InputLoad && Subtarget.hasVSX() && V2.isUndef() &&
       (PPC::isSplatShuffleMask(SVOp, 4) || PPC::isSplatShuffleMask(SVOp, 8)) &&
       InputLoad->hasOneUse()) {
@@ -9245,6 +9924,16 @@ SDValue PPCTargetLowering::LowerVECTOR_SHUFFLE(SDValue Op,
     int SplatIdx =
       PPC::getSplatIdxForPPCMnemonics(SVOp, IsFourByte ? 4 : 8, DAG);
 
+    // The splat index for permuted loads will be in the left half of the vector
+    // which is strictly wider than the loaded value by 8 bytes. So we need to
+    // adjust the splat index to point to the correct address in memory.
+    if (IsPermutedLoad) {
+      assert(isLittleEndian && "Unexpected permuted load on big endian target");
+      SplatIdx += IsFourByte ? 2 : 1;
+      assert((SplatIdx < (IsFourByte ? 4 : 2)) &&
+             "Splat of a value outside of the loaded memory");
+    }
+
     LoadSDNode *LD = cast<LoadSDNode>(*InputLoad);
     // For 4-byte load-and-splat, we need Power9.
     if ((IsFourByte && Subtarget.hasP9Vector()) || !IsFourByte) {
@@ -9253,6 +9942,7 @@ SDValue PPCTargetLowering::LowerVECTOR_SHUFFLE(SDValue Op,
         Offset = isLittleEndian ? (3 - SplatIdx) * 4 : SplatIdx * 4;
       else
         Offset = isLittleEndian ? (1 - SplatIdx) * 8 : SplatIdx * 8;
+
       SDValue BasePtr = LD->getBasePtr();
       if (Offset != 0)
         BasePtr = DAG.getNode(ISD::ADD, dl, getPointerTy(DAG.getDataLayout()),
@@ -9291,6 +9981,12 @@ SDValue PPCTargetLowering::LowerVECTOR_SHUFFLE(SDValue Op,
     return DAG.getNode(ISD::BITCAST, dl, MVT::v16i8, Ins);
   }
 
+  if (Subtarget.hasPrefixInstrs()) {
+    SDValue SplatInsertNode;
+    if ((SplatInsertNode = lowerToXXSPLTI32DX(SVOp, DAG)))
+      return SplatInsertNode;
+  }
+
   if (Subtarget.hasP9Altivec()) {
     SDValue NewISDNode;
     if ((NewISDNode = lowerToVINSERTH(SVOp, DAG)))
@@ -9526,7 +10222,13 @@ SDValue PPCTargetLowering::LowerVECTOR_SHUFFLE(SDValue Op,
                                              MVT::i32));
   }
 
+  ShufflesHandledWithVPERM++;
   SDValue VPermMask = DAG.getBuildVector(MVT::v16i8, dl, ResultMask);
+  LLVM_DEBUG(dbgs() << "Emitting a VPERM for the following shuffle:\n");
+  LLVM_DEBUG(SVOp->dump());
+  LLVM_DEBUG(dbgs() << "With the following permute control vector:\n");
+  LLVM_DEBUG(VPermMask.dump());
+
   if (isLittleEndian)
     return DAG.getNode(PPCISD::VPERM, dl, V1.getValueType(),
                        V2, V1, VPermMask);
@@ -9883,18 +10585,6 @@ SDValue PPCTargetLowering::LowerINTRINSIC_VOID(SDValue Op,
   return SDValue();
 }
 
-SDValue PPCTargetLowering::LowerREM(SDValue Op, SelectionDAG &DAG) const {
-  // Check for a DIV with the same operands as this REM.
-  for (auto UI : Op.getOperand(1)->uses()) {
-    if ((Op.getOpcode() == ISD::SREM && UI->getOpcode() == ISD::SDIV) ||
-        (Op.getOpcode() == ISD::UREM && UI->getOpcode() == ISD::UDIV))
-      if (UI->getOperand(0) == Op.getOperand(0) &&
-          UI->getOperand(1) == Op.getOperand(1))
-        return SDValue();
-  }
-  return Op;
-}
-
 // Lower scalar BSWAP64 to xxbrd.
 SDValue PPCTargetLowering::LowerBSWAP(SDValue Op, SelectionDAG &DAG) const {
   SDLoc dl(Op);
@@ -9953,7 +10643,7 @@ SDValue PPCTargetLowering::LowerSCALAR_TO_VECTOR(SDValue Op,
   SDLoc dl(Op);
   // Create a stack slot that is 16-byte aligned.
   MachineFrameInfo &MFI = DAG.getMachineFunction().getFrameInfo();
-  int FrameIdx = MFI.CreateStackObject(16, 16, false);
+  int FrameIdx = MFI.CreateStackObject(16, Align(16), false);
   EVT PtrVT = getPointerTy(DAG.getDataLayout());
   SDValue FIdx = DAG.getFrameIndex(FrameIdx, PtrVT);
 
@@ -10023,7 +10713,7 @@ SDValue PPCTargetLowering::LowerEXTRACT_VECTOR_ELT(SDValue Op,
     Value);
 
   MachineFrameInfo &MFI = DAG.getMachineFunction().getFrameInfo();
-  int FrameIdx = MFI.CreateStackObject(16, 16, false);
+  int FrameIdx = MFI.CreateStackObject(16, Align(16), false);
   MachinePointerInfo PtrInfo =
       MachinePointerInfo::getFixedStack(DAG.getMachineFunction(), FrameIdx);
   EVT PtrVT = getPointerTy(DAG.getDataLayout());
@@ -10164,9 +10854,8 @@ SDValue PPCTargetLowering::LowerVectorStore(SDValue Op,
 
     SDValue Stores[4];
     for (unsigned Idx = 0; Idx < 4; ++Idx) {
-      SDValue Ex = DAG.getNode(
-          ISD::EXTRACT_VECTOR_ELT, dl, ScalarVT, Value,
-          DAG.getConstant(Idx, dl, getVectorIdxTy(DAG.getDataLayout())));
+      SDValue Ex = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, dl, ScalarVT, Value,
+                               DAG.getVectorIdxConstant(Idx, dl));
       SDValue Store;
       if (ScalarVT != ScalarMemVT)
         Store =
@@ -10223,7 +10912,7 @@ SDValue PPCTargetLowering::LowerVectorStore(SDValue Op,
     Value);
 
   MachineFrameInfo &MFI = DAG.getMachineFunction().getFrameInfo();
-  int FrameIdx = MFI.CreateStackObject(16, 16, false);
+  int FrameIdx = MFI.CreateStackObject(16, Align(16), false);
   MachinePointerInfo PtrInfo =
       MachinePointerInfo::getFixedStack(DAG.getMachineFunction(), FrameIdx);
   EVT PtrVT = getPointerTy(DAG.getDataLayout());
@@ -10272,9 +10961,9 @@ SDValue PPCTargetLowering::LowerMUL(SDValue Op, SelectionDAG &DAG) const {
   if (Op.getValueType() == MVT::v4i32) {
     SDValue LHS = Op.getOperand(0), RHS = Op.getOperand(1);
 
-    SDValue Zero  = BuildSplatI(  0, 1, MVT::v4i32, DAG, dl);
-    SDValue Neg16 = BuildSplatI(-16, 4, MVT::v4i32, DAG, dl);//+16 as shift amt.
-
+    SDValue Zero = getCanonicalConstSplat(0, 1, MVT::v4i32, DAG, dl);
+    // +16 as shift amt.
+    SDValue Neg16 = getCanonicalConstSplat(-16, 4, MVT::v4i32, DAG, dl);
     SDValue RHSSwap =   // = vrlw RHS, 16
       BuildIntrinsicOp(Intrinsic::ppc_altivec_vrlw, RHS, Neg16, DAG, dl);
 
@@ -10294,13 +10983,6 @@ SDValue PPCTargetLowering::LowerMUL(SDValue Op, SelectionDAG &DAG) const {
     HiProd = BuildIntrinsicOp(Intrinsic::ppc_altivec_vslw, HiProd,
                               Neg16, DAG, dl);
     return DAG.getNode(ISD::ADD, dl, MVT::v4i32, LoProd, HiProd);
-  } else if (Op.getValueType() == MVT::v8i16) {
-    SDValue LHS = Op.getOperand(0), RHS = Op.getOperand(1);
-
-    SDValue Zero = BuildSplatI(0, 1, MVT::v8i16, DAG, dl);
-
-    return BuildIntrinsicOp(Intrinsic::ppc_altivec_vmladduhm,
-                            LHS, RHS, Zero, DAG, dl);
   } else if (Op.getValueType() == MVT::v16i8) {
     SDValue LHS = Op.getOperand(0), RHS = Op.getOperand(1);
     bool isLittleEndian = Subtarget.isLittleEndian();
@@ -10507,6 +11189,7 @@ SDValue PPCTargetLowering::LowerOperation(SDValue Op, SelectionDAG &DAG) const {
   case ISD::MUL:                return LowerMUL(Op, DAG);
   case ISD::ABS:                return LowerABS(Op, DAG);
   case ISD::FP_EXTEND:          return LowerFP_EXTEND(Op, DAG);
+  case ISD::ROTL:               return LowerROTL(Op, DAG);
 
   // For counter-based loop handling.
   case ISD::INTRINSIC_W_CHAIN:  return SDValue();
@@ -10519,9 +11202,6 @@ SDValue PPCTargetLowering::LowerOperation(SDValue Op, SelectionDAG &DAG) const {
 
   case ISD::INTRINSIC_VOID:
     return LowerINTRINSIC_VOID(Op, DAG);
-  case ISD::SREM:
-  case ISD::UREM:
-    return LowerREM(Op, DAG);
   case ISD::BSWAP:
     return LowerBSWAP(Op, DAG);
   case ISD::ATOMIC_CMP_SWAP:
@@ -10540,8 +11220,8 @@ void PPCTargetLowering::ReplaceNodeResults(SDNode *N,
     SDVTList VTs = DAG.getVTList(MVT::i32, MVT::i32, MVT::Other);
     SDValue RTB = DAG.getNode(PPCISD::READ_TIME_BASE, dl, VTs, N->getOperand(0));
 
-    Results.push_back(RTB);
-    Results.push_back(RTB.getValue(1));
+    Results.push_back(
+        DAG.getNode(ISD::BUILD_PAIR, dl, MVT::i64, RTB, RTB.getValue(1)));
     Results.push_back(RTB.getValue(2));
     break;
   }
@@ -11201,13 +11881,208 @@ PPCTargetLowering::emitEHSjLjLongJmp(MachineInstr &MI,
   return MBB;
 }
 
+bool PPCTargetLowering::hasInlineStackProbe(MachineFunction &MF) const {
+  // If the function specifically requests inline stack probes, emit them.
+  if (MF.getFunction().hasFnAttribute("probe-stack"))
+    return MF.getFunction().getFnAttribute("probe-stack").getValueAsString() ==
+           "inline-asm";
+  return false;
+}
+
+unsigned PPCTargetLowering::getStackProbeSize(MachineFunction &MF) const {
+  const TargetFrameLowering *TFI = Subtarget.getFrameLowering();
+  unsigned StackAlign = TFI->getStackAlignment();
+  assert(StackAlign >= 1 && isPowerOf2_32(StackAlign) &&
+         "Unexpected stack alignment");
+  // The default stack probe size is 4096 if the function has no
+  // stack-probe-size attribute.
+  unsigned StackProbeSize = 4096;
+  const Function &Fn = MF.getFunction();
+  if (Fn.hasFnAttribute("stack-probe-size"))
+    Fn.getFnAttribute("stack-probe-size")
+        .getValueAsString()
+        .getAsInteger(0, StackProbeSize);
+  // Round down to the stack alignment.
+  StackProbeSize &= ~(StackAlign - 1);
+  return StackProbeSize ? StackProbeSize : StackAlign;
+}
+
+// Lower dynamic stack allocation with probing. `emitProbedAlloca` is splitted
+// into three phases. In the first phase, it uses pseudo instruction
+// PREPARE_PROBED_ALLOCA to get the future result of actual FramePointer and
+// FinalStackPtr. In the second phase, it generates a loop for probing blocks.
+// At last, it uses pseudo instruction DYNAREAOFFSET to get the future result of
+// MaxCallFrameSize so that it can calculate correct data area pointer.
+MachineBasicBlock *
+PPCTargetLowering::emitProbedAlloca(MachineInstr &MI,
+                                    MachineBasicBlock *MBB) const {
+  const bool isPPC64 = Subtarget.isPPC64();
+  MachineFunction *MF = MBB->getParent();
+  const TargetInstrInfo *TII = Subtarget.getInstrInfo();
+  DebugLoc DL = MI.getDebugLoc();
+  const unsigned ProbeSize = getStackProbeSize(*MF);
+  const BasicBlock *ProbedBB = MBB->getBasicBlock();
+  MachineRegisterInfo &MRI = MF->getRegInfo();
+  // The CFG of probing stack looks as
+  //         +-----+
+  //         | MBB |
+  //         +--+--+
+  //            |
+  //       +----v----+
+  //  +--->+ TestMBB +---+
+  //  |    +----+----+   |
+  //  |         |        |
+  //  |   +-----v----+   |
+  //  +---+ BlockMBB |   |
+  //      +----------+   |
+  //                     |
+  //       +---------+   |
+  //       | TailMBB +<--+
+  //       +---------+
+  // In MBB, calculate previous frame pointer and final stack pointer.
+  // In TestMBB, test if sp is equal to final stack pointer, if so, jump to
+  // TailMBB. In BlockMBB, update the sp atomically and jump back to TestMBB.
+  // TailMBB is spliced via \p MI.
+  MachineBasicBlock *TestMBB = MF->CreateMachineBasicBlock(ProbedBB);
+  MachineBasicBlock *TailMBB = MF->CreateMachineBasicBlock(ProbedBB);
+  MachineBasicBlock *BlockMBB = MF->CreateMachineBasicBlock(ProbedBB);
+
+  MachineFunction::iterator MBBIter = ++MBB->getIterator();
+  MF->insert(MBBIter, TestMBB);
+  MF->insert(MBBIter, BlockMBB);
+  MF->insert(MBBIter, TailMBB);
+
+  const TargetRegisterClass *G8RC = &PPC::G8RCRegClass;
+  const TargetRegisterClass *GPRC = &PPC::GPRCRegClass;
+
+  Register DstReg = MI.getOperand(0).getReg();
+  Register NegSizeReg = MI.getOperand(1).getReg();
+  Register SPReg = isPPC64 ? PPC::X1 : PPC::R1;
+  Register FinalStackPtr = MRI.createVirtualRegister(isPPC64 ? G8RC : GPRC);
+  Register FramePointer = MRI.createVirtualRegister(isPPC64 ? G8RC : GPRC);
+  Register ActualNegSizeReg = MRI.createVirtualRegister(isPPC64 ? G8RC : GPRC);
+
+  // Since value of NegSizeReg might be realigned in prologepilog, insert a
+  // PREPARE_PROBED_ALLOCA pseudo instruction to get actual FramePointer and
+  // NegSize.
+  unsigned ProbeOpc;
+  if (!MRI.hasOneNonDBGUse(NegSizeReg))
+    ProbeOpc =
+        isPPC64 ? PPC::PREPARE_PROBED_ALLOCA_64 : PPC::PREPARE_PROBED_ALLOCA_32;
+  else
+    // By introducing PREPARE_PROBED_ALLOCA_NEGSIZE_OPT, ActualNegSizeReg
+    // and NegSizeReg will be allocated in the same phyreg to avoid
+    // redundant copy when NegSizeReg has only one use which is current MI and
+    // will be replaced by PREPARE_PROBED_ALLOCA then.
+    ProbeOpc = isPPC64 ? PPC::PREPARE_PROBED_ALLOCA_NEGSIZE_SAME_REG_64
+                       : PPC::PREPARE_PROBED_ALLOCA_NEGSIZE_SAME_REG_32;
+  BuildMI(*MBB, {MI}, DL, TII->get(ProbeOpc), FramePointer)
+      .addDef(ActualNegSizeReg)
+      .addReg(NegSizeReg)
+      .add(MI.getOperand(2))
+      .add(MI.getOperand(3));
+
+  // Calculate final stack pointer, which equals to SP + ActualNegSize.
+  BuildMI(*MBB, {MI}, DL, TII->get(isPPC64 ? PPC::ADD8 : PPC::ADD4),
+          FinalStackPtr)
+      .addReg(SPReg)
+      .addReg(ActualNegSizeReg);
+
+  // Materialize a scratch register for update.
+  int64_t NegProbeSize = -(int64_t)ProbeSize;
+  assert(isInt<32>(NegProbeSize) && "Unhandled probe size!");
+  Register ScratchReg = MRI.createVirtualRegister(isPPC64 ? G8RC : GPRC);
+  if (!isInt<16>(NegProbeSize)) {
+    Register TempReg = MRI.createVirtualRegister(isPPC64 ? G8RC : GPRC);
+    BuildMI(*MBB, {MI}, DL, TII->get(isPPC64 ? PPC::LIS8 : PPC::LIS), TempReg)
+        .addImm(NegProbeSize >> 16);
+    BuildMI(*MBB, {MI}, DL, TII->get(isPPC64 ? PPC::ORI8 : PPC::ORI),
+            ScratchReg)
+        .addReg(TempReg)
+        .addImm(NegProbeSize & 0xFFFF);
+  } else
+    BuildMI(*MBB, {MI}, DL, TII->get(isPPC64 ? PPC::LI8 : PPC::LI), ScratchReg)
+        .addImm(NegProbeSize);
+
+  {
+    // Probing leading residual part.
+    Register Div = MRI.createVirtualRegister(isPPC64 ? G8RC : GPRC);
+    BuildMI(*MBB, {MI}, DL, TII->get(isPPC64 ? PPC::DIVD : PPC::DIVW), Div)
+        .addReg(ActualNegSizeReg)
+        .addReg(ScratchReg);
+    Register Mul = MRI.createVirtualRegister(isPPC64 ? G8RC : GPRC);
+    BuildMI(*MBB, {MI}, DL, TII->get(isPPC64 ? PPC::MULLD : PPC::MULLW), Mul)
+        .addReg(Div)
+        .addReg(ScratchReg);
+    Register NegMod = MRI.createVirtualRegister(isPPC64 ? G8RC : GPRC);
+    BuildMI(*MBB, {MI}, DL, TII->get(isPPC64 ? PPC::SUBF8 : PPC::SUBF), NegMod)
+        .addReg(Mul)
+        .addReg(ActualNegSizeReg);
+    BuildMI(*MBB, {MI}, DL, TII->get(isPPC64 ? PPC::STDUX : PPC::STWUX), SPReg)
+        .addReg(FramePointer)
+        .addReg(SPReg)
+        .addReg(NegMod);
+  }
+
+  {
+    // Remaining part should be multiple of ProbeSize.
+    Register CmpResult = MRI.createVirtualRegister(&PPC::CRRCRegClass);
+    BuildMI(TestMBB, DL, TII->get(isPPC64 ? PPC::CMPD : PPC::CMPW), CmpResult)
+        .addReg(SPReg)
+        .addReg(FinalStackPtr);
+    BuildMI(TestMBB, DL, TII->get(PPC::BCC))
+        .addImm(PPC::PRED_EQ)
+        .addReg(CmpResult)
+        .addMBB(TailMBB);
+    TestMBB->addSuccessor(BlockMBB);
+    TestMBB->addSuccessor(TailMBB);
+  }
+
+  {
+    // Touch the block.
+    // |P...|P...|P...
+    BuildMI(BlockMBB, DL, TII->get(isPPC64 ? PPC::STDUX : PPC::STWUX), SPReg)
+        .addReg(FramePointer)
+        .addReg(SPReg)
+        .addReg(ScratchReg);
+    BuildMI(BlockMBB, DL, TII->get(PPC::B)).addMBB(TestMBB);
+    BlockMBB->addSuccessor(TestMBB);
+  }
+
+  // Calculation of MaxCallFrameSize is deferred to prologepilog, use
+  // DYNAREAOFFSET pseudo instruction to get the future result.
+  Register MaxCallFrameSizeReg =
+      MRI.createVirtualRegister(isPPC64 ? G8RC : GPRC);
+  BuildMI(TailMBB, DL,
+          TII->get(isPPC64 ? PPC::DYNAREAOFFSET8 : PPC::DYNAREAOFFSET),
+          MaxCallFrameSizeReg)
+      .add(MI.getOperand(2))
+      .add(MI.getOperand(3));
+  BuildMI(TailMBB, DL, TII->get(isPPC64 ? PPC::ADD8 : PPC::ADD4), DstReg)
+      .addReg(SPReg)
+      .addReg(MaxCallFrameSizeReg);
+
+  // Splice instructions after MI to TailMBB.
+  TailMBB->splice(TailMBB->end(), MBB,
+                  std::next(MachineBasicBlock::iterator(MI)), MBB->end());
+  TailMBB->transferSuccessorsAndUpdatePHIs(MBB);
+  MBB->addSuccessor(TestMBB);
+
+  // Delete the pseudo instruction.
+  MI.eraseFromParent();
+
+  ++NumDynamicAllocaProbed;
+  return TailMBB;
+}
+
 MachineBasicBlock *
 PPCTargetLowering::EmitInstrWithCustomInserter(MachineInstr &MI,
                                                MachineBasicBlock *BB) const {
   if (MI.getOpcode() == TargetOpcode::STACKMAP ||
       MI.getOpcode() == TargetOpcode::PATCHPOINT) {
     if (Subtarget.is64BitELFABI() &&
-        MI.getOpcode() == TargetOpcode::PATCHPOINT) {
+        MI.getOpcode() == TargetOpcode::PATCHPOINT &&
+        !Subtarget.isUsingPCRelativeCalls()) {
       // Call lowering should have added an r2 operand to indicate a dependence
       // on the TOC base pointer value. It can't however, because there is no
       // way to mark the dependence as implicit there, and so the stackmap code
@@ -11889,12 +12764,12 @@ PPCTargetLowering::EmitInstrWithCustomInserter(MachineInstr &MI,
         }
 
         MachineFrameInfo &MFI = F->getFrameInfo();
-        int FrameIdx = MFI.CreateStackObject(8, 8, false);
+        int FrameIdx = MFI.CreateStackObject(8, Align(8), false);
 
         MachineMemOperand *MMOStore = F->getMachineMemOperand(
-          MachinePointerInfo::getFixedStack(*F, FrameIdx, 0),
-          MachineMemOperand::MOStore, MFI.getObjectSize(FrameIdx),
-          MFI.getObjectAlignment(FrameIdx));
+            MachinePointerInfo::getFixedStack(*F, FrameIdx, 0),
+            MachineMemOperand::MOStore, MFI.getObjectSize(FrameIdx),
+            MFI.getObjectAlign(FrameIdx));
 
         // Store the SrcReg into the stack.
         BuildMI(*BB, MI, dl, TII->get(StoreOp))
@@ -11904,9 +12779,9 @@ PPCTargetLowering::EmitInstrWithCustomInserter(MachineInstr &MI,
           .addMemOperand(MMOStore);
 
         MachineMemOperand *MMOLoad = F->getMachineMemOperand(
-          MachinePointerInfo::getFixedStack(*F, FrameIdx, 0),
-          MachineMemOperand::MOLoad, MFI.getObjectSize(FrameIdx),
-          MFI.getObjectAlignment(FrameIdx));
+            MachinePointerInfo::getFixedStack(*F, FrameIdx, 0),
+            MachineMemOperand::MOLoad, MFI.getObjectSize(FrameIdx),
+            MFI.getObjectAlign(FrameIdx));
 
         // Load from the stack where SrcReg is stored, and save to DestReg,
         // so we have done the RegClass conversion from RegClass::SrcReg to
@@ -11966,6 +12841,9 @@ PPCTargetLowering::EmitInstrWithCustomInserter(MachineInstr &MI,
       .addReg(NewFPSCRReg)
       .addImm(0)
       .addImm(0);
+  } else if (MI.getOpcode() == PPC::PROBED_ALLOCA_32 ||
+             MI.getOpcode() == PPC::PROBED_ALLOCA_64) {
+    return emitProbedAlloca(MI, BB);
   } else {
     llvm_unreachable("Unexpected instr type to insert");
   }
@@ -13170,15 +14048,20 @@ static SDValue addShuffleForVecExtend(SDNode *N, SelectionDAG &DAG,
       DAG.getVectorShuffle(Input.getValueType(), dl, Input,
                            DAG.getUNDEF(Input.getValueType()), ShuffleMask);
 
-  EVT Ty = N->getValueType(0);
-  SDValue BV = DAG.getNode(PPCISD::SExtVElems, dl, Ty, Shuffle);
-  return BV;
+  EVT VT = N->getValueType(0);
+  SDValue Conv = DAG.getBitcast(VT, Shuffle);
+
+  EVT ExtVT = EVT::getVectorVT(*DAG.getContext(),
+                               Input.getValueType().getVectorElementType(),
+                               VT.getVectorNumElements());
+  return DAG.getNode(ISD::SIGN_EXTEND_INREG, dl, VT, Conv,
+                     DAG.getValueType(ExtVT));
 }
 
 // Look for build vector patterns where input operands come from sign
 // extended vector_extract elements of specific indices. If the correct indices
-// aren't used, add a vector shuffle to fix up the indices and create a new
-// PPCISD:SExtVElems node which selects the vector sign extend instructions
+// aren't used, add a vector shuffle to fix up the indices and create
+// SIGN_EXTEND_INREG node which selects the vector sign extend instructions
 // during instruction selection.
 static SDValue combineBVOfVecSExt(SDNode *N, SelectionDAG &DAG) {
   // This array encodes the indices that the vector sign extend instructions
@@ -13501,8 +14384,8 @@ SDValue PPCTargetLowering::expandVSXLoadForLE(SDNode *N,
 
   // Do not expand to PPCISD::LXVD2X + PPCISD::XXSWAPD when the load is
   // aligned and the type is a vector with elements up to 4 bytes
-  if (Subtarget.needsSwapsForVSXMemOps() && !(MMO->getAlignment()%16)
-      && VecTy.getScalarSizeInBits() <= 32 ) {
+  if (Subtarget.needsSwapsForVSXMemOps() && MMO->getAlign() >= Align(16) &&
+      VecTy.getScalarSizeInBits() <= 32) {
     return SDValue();
   }
 
@@ -13572,8 +14455,8 @@ SDValue PPCTargetLowering::expandVSXStoreForLE(SDNode *N,
 
   // Do not expand to PPCISD::XXSWAPD and PPCISD::STXVD2X when the load is
   // aligned and the type is a vector with elements up to 4 bytes
-  if (Subtarget.needsSwapsForVSXMemOps() && !(MMO->getAlignment()%16)
-      && VecTy.getScalarSizeInBits() <= 32 ) {
+  if (Subtarget.needsSwapsForVSXMemOps() && MMO->getAlign() >= Align(16) &&
+      VecTy.getScalarSizeInBits() <= 32) {
     return SDValue();
   }
 
@@ -13653,6 +14536,210 @@ SDValue PPCTargetLowering::combineStoreFPToInt(SDNode *N,
   return Val;
 }
 
+static bool isAlternatingShuffMask(const ArrayRef<int> &Mask, int NumElts) {
+  // Check that the source of the element keeps flipping
+  // (i.e. Mask[i] < NumElts -> Mask[i+i] >= NumElts).
+  bool PrevElemFromFirstVec = Mask[0] < NumElts;
+  for (int i = 1, e = Mask.size(); i < e; i++) {
+    if (PrevElemFromFirstVec && Mask[i] < NumElts)
+      return false;
+    if (!PrevElemFromFirstVec && Mask[i] >= NumElts)
+      return false;
+    PrevElemFromFirstVec = !PrevElemFromFirstVec;
+  }
+  return true;
+}
+
+static bool isSplatBV(SDValue Op) {
+  if (Op.getOpcode() != ISD::BUILD_VECTOR)
+    return false;
+  SDValue FirstOp;
+
+  // Find first non-undef input.
+  for (int i = 0, e = Op.getNumOperands(); i < e; i++) {
+    FirstOp = Op.getOperand(i);
+    if (!FirstOp.isUndef())
+      break;
+  }
+
+  // All inputs are undef or the same as the first non-undef input.
+  for (int i = 1, e = Op.getNumOperands(); i < e; i++)
+    if (Op.getOperand(i) != FirstOp && !Op.getOperand(i).isUndef())
+      return false;
+  return true;
+}
+
+static SDValue isScalarToVec(SDValue Op) {
+  if (Op.getOpcode() == ISD::SCALAR_TO_VECTOR)
+    return Op;
+  if (Op.getOpcode() != ISD::BITCAST)
+    return SDValue();
+  Op = Op.getOperand(0);
+  if (Op.getOpcode() == ISD::SCALAR_TO_VECTOR)
+    return Op;
+  return SDValue();
+}
+
+static void fixupShuffleMaskForPermutedSToV(SmallVectorImpl<int> &ShuffV,
+                                            int LHSMaxIdx, int RHSMinIdx,
+                                            int RHSMaxIdx, int HalfVec) {
+  for (int i = 0, e = ShuffV.size(); i < e; i++) {
+    int Idx = ShuffV[i];
+    if ((Idx >= 0 && Idx < LHSMaxIdx) || (Idx >= RHSMinIdx && Idx < RHSMaxIdx))
+      ShuffV[i] += HalfVec;
+  }
+  return;
+}
+
+// Replace a SCALAR_TO_VECTOR with a SCALAR_TO_VECTOR_PERMUTED except if
+// the original is:
+// (<n x Ty> (scalar_to_vector (Ty (extract_elt <n x Ty> %a, C))))
+// In such a case, just change the shuffle mask to extract the element
+// from the permuted index.
+static SDValue getSToVPermuted(SDValue OrigSToV, SelectionDAG &DAG) {
+  SDLoc dl(OrigSToV);
+  EVT VT = OrigSToV.getValueType();
+  assert(OrigSToV.getOpcode() == ISD::SCALAR_TO_VECTOR &&
+         "Expecting a SCALAR_TO_VECTOR here");
+  SDValue Input = OrigSToV.getOperand(0);
+
+  if (Input.getOpcode() == ISD::EXTRACT_VECTOR_ELT) {
+    ConstantSDNode *Idx = dyn_cast<ConstantSDNode>(Input.getOperand(1));
+    SDValue OrigVector = Input.getOperand(0);
+
+    // Can't handle non-const element indices or different vector types
+    // for the input to the extract and the output of the scalar_to_vector.
+    if (Idx && VT == OrigVector.getValueType()) {
+      SmallVector<int, 16> NewMask(VT.getVectorNumElements(), -1);
+      NewMask[VT.getVectorNumElements() / 2] = Idx->getZExtValue();
+      return DAG.getVectorShuffle(VT, dl, OrigVector, OrigVector, NewMask);
+    }
+  }
+  return DAG.getNode(PPCISD::SCALAR_TO_VECTOR_PERMUTED, dl, VT,
+                     OrigSToV.getOperand(0));
+}
+
+// On little endian subtargets, combine shuffles such as:
+// vector_shuffle<16,1,17,3,18,5,19,7,20,9,21,11,22,13,23,15>, <zero>, %b
+// into:
+// vector_shuffle<16,0,17,1,18,2,19,3,20,4,21,5,22,6,23,7>, <zero>, %b
+// because the latter can be matched to a single instruction merge.
+// Furthermore, SCALAR_TO_VECTOR on little endian always involves a permute
+// to put the value into element zero. Adjust the shuffle mask so that the
+// vector can remain in permuted form (to prevent a swap prior to a shuffle).
+SDValue PPCTargetLowering::combineVectorShuffle(ShuffleVectorSDNode *SVN,
+                                                SelectionDAG &DAG) const {
+  SDValue LHS = SVN->getOperand(0);
+  SDValue RHS = SVN->getOperand(1);
+  auto Mask = SVN->getMask();
+  int NumElts = LHS.getValueType().getVectorNumElements();
+  SDValue Res(SVN, 0);
+  SDLoc dl(SVN);
+
+  // None of these combines are useful on big endian systems since the ISA
+  // already has a big endian bias.
+  if (!Subtarget.isLittleEndian() || !Subtarget.hasVSX())
+    return Res;
+
+  // If this is not a shuffle of a shuffle and the first element comes from
+  // the second vector, canonicalize to the commuted form. This will make it
+  // more likely to match one of the single instruction patterns.
+  if (Mask[0] >= NumElts && LHS.getOpcode() != ISD::VECTOR_SHUFFLE &&
+      RHS.getOpcode() != ISD::VECTOR_SHUFFLE) {
+    std::swap(LHS, RHS);
+    Res = DAG.getCommutedVectorShuffle(*SVN);
+    Mask = cast<ShuffleVectorSDNode>(Res)->getMask();
+  }
+
+  // Adjust the shuffle mask if either input vector comes from a
+  // SCALAR_TO_VECTOR and keep the respective input vector in permuted
+  // form (to prevent the need for a swap).
+  SmallVector<int, 16> ShuffV(Mask.begin(), Mask.end());
+  SDValue SToVLHS = isScalarToVec(LHS);
+  SDValue SToVRHS = isScalarToVec(RHS);
+  if (SToVLHS || SToVRHS) {
+    int NumEltsIn = SToVLHS ? SToVLHS.getValueType().getVectorNumElements()
+                            : SToVRHS.getValueType().getVectorNumElements();
+    int NumEltsOut = ShuffV.size();
+
+    // Initially assume that neither input is permuted. These will be adjusted
+    // accordingly if either input is.
+    int LHSMaxIdx = -1;
+    int RHSMinIdx = -1;
+    int RHSMaxIdx = -1;
+    int HalfVec = LHS.getValueType().getVectorNumElements() / 2;
+
+    // Get the permuted scalar to vector nodes for the source(s) that come from
+    // ISD::SCALAR_TO_VECTOR.
+    if (SToVLHS) {
+      // Set up the values for the shuffle vector fixup.
+      LHSMaxIdx = NumEltsOut / NumEltsIn;
+      SToVLHS = getSToVPermuted(SToVLHS, DAG);
+      if (SToVLHS.getValueType() != LHS.getValueType())
+        SToVLHS = DAG.getBitcast(LHS.getValueType(), SToVLHS);
+      LHS = SToVLHS;
+    }
+    if (SToVRHS) {
+      RHSMinIdx = NumEltsOut;
+      RHSMaxIdx = NumEltsOut / NumEltsIn + RHSMinIdx;
+      SToVRHS = getSToVPermuted(SToVRHS, DAG);
+      if (SToVRHS.getValueType() != RHS.getValueType())
+        SToVRHS = DAG.getBitcast(RHS.getValueType(), SToVRHS);
+      RHS = SToVRHS;
+    }
+
+    // Fix up the shuffle mask to reflect where the desired element actually is.
+    // The minimum and maximum indices that correspond to element zero for both
+    // the LHS and RHS are computed and will control which shuffle mask entries
+    // are to be changed. For example, if the RHS is permuted, any shuffle mask
+    // entries in the range [RHSMinIdx,RHSMaxIdx) will be incremented by
+    // HalfVec to refer to the corresponding element in the permuted vector.
+    fixupShuffleMaskForPermutedSToV(ShuffV, LHSMaxIdx, RHSMinIdx, RHSMaxIdx,
+                                    HalfVec);
+    Res = DAG.getVectorShuffle(SVN->getValueType(0), dl, LHS, RHS, ShuffV);
+
+    // We may have simplified away the shuffle. We won't be able to do anything
+    // further with it here.
+    if (!isa<ShuffleVectorSDNode>(Res))
+      return Res;
+    Mask = cast<ShuffleVectorSDNode>(Res)->getMask();
+  }
+
+  // The common case after we commuted the shuffle is that the RHS is a splat
+  // and we have elements coming in from the splat at indices that are not
+  // conducive to using a merge.
+  // Example:
+  // vector_shuffle<0,17,1,19,2,21,3,23,4,25,5,27,6,29,7,31> t1, <zero>
+  if (!isSplatBV(RHS))
+    return Res;
+
+  // We are looking for a mask such that all even elements are from
+  // one vector and all odd elements from the other.
+  if (!isAlternatingShuffMask(Mask, NumElts))
+    return Res;
+
+  // Adjust the mask so we are pulling in the same index from the splat
+  // as the index from the interesting vector in consecutive elements.
+  // Example (even elements from first vector):
+  // vector_shuffle<0,16,1,17,2,18,3,19,4,20,5,21,6,22,7,23> t1, <zero>
+  if (Mask[0] < NumElts)
+    for (int i = 1, e = Mask.size(); i < e; i += 2)
+      ShuffV[i] = (ShuffV[i - 1] + NumElts);
+  // Example (odd elements from first vector):
+  // vector_shuffle<16,0,17,1,18,2,19,3,20,4,21,5,22,6,23,7> t1, <zero>
+  else
+    for (int i = 0, e = Mask.size(); i < e; i += 2)
+      ShuffV[i] = (ShuffV[i + 1] + NumElts);
+
+  // If the RHS has undefs, we need to remove them since we may have created
+  // a shuffle that adds those instead of the splat value.
+  SDValue SplatVal = cast<BuildVectorSDNode>(RHS.getNode())->getSplatValue();
+  RHS = DAG.getSplatBuildVector(RHS.getValueType(), dl, SplatVal);
+
+  Res = DAG.getVectorShuffle(SVN->getValueType(0), dl, LHS, RHS, ShuffV);
+  return Res;
+}
+
 SDValue PPCTargetLowering::combineVReverseMemOP(ShuffleVectorSDNode *SVN,
                                                 LSBaseSDNode *LSBase,
                                                 DAGCombinerInfo &DCI) const {
@@ -13724,6 +14811,9 @@ SDValue PPCTargetLowering::PerformDAGCombine(SDNode *N,
     return combineSRL(N, DCI);
   case ISD::MUL:
     return combineMUL(N, DCI);
+  case ISD::FMA:
+  case PPCISD::FNMSUB:
+    return combineFMALike(N, DCI);
   case PPCISD::SHL:
     if (isNullConstant(N->getOperand(0))) // 0 << V -> 0.
         return N->getOperand(0);
@@ -13759,7 +14849,7 @@ SDValue PPCTargetLowering::PerformDAGCombine(SDNode *N,
       LSBaseSDNode* LSBase = cast<LSBaseSDNode>(N->getOperand(0));
       return combineVReverseMemOP(cast<ShuffleVectorSDNode>(N), LSBase, DCI);
     }
-    break;
+    return combineVectorShuffle(cast<ShuffleVectorSDNode>(N), DCI.DAG);
   case ISD::STORE: {
 
     EVT Op1VT = N->getOperand(1).getValueType();
@@ -13966,17 +15056,18 @@ SDValue PPCTargetLowering::PerformDAGCombine(SDNode *N,
 
     EVT MemVT = LD->getMemoryVT();
     Type *Ty = MemVT.getTypeForEVT(*DAG.getContext());
-    unsigned ABIAlignment = DAG.getDataLayout().getABITypeAlignment(Ty);
+    Align ABIAlignment = DAG.getDataLayout().getABITypeAlign(Ty);
     Type *STy = MemVT.getScalarType().getTypeForEVT(*DAG.getContext());
-    unsigned ScalarABIAlignment = DAG.getDataLayout().getABITypeAlignment(STy);
+    Align ScalarABIAlignment = DAG.getDataLayout().getABITypeAlign(STy);
     if (LD->isUnindexed() && VT.isVector() &&
         ((Subtarget.hasAltivec() && ISD::isNON_EXTLoad(N) &&
           // P8 and later hardware should just use LOAD.
-          !Subtarget.hasP8Vector() && (VT == MVT::v16i8 || VT == MVT::v8i16 ||
-                                       VT == MVT::v4i32 || VT == MVT::v4f32)) ||
+          !Subtarget.hasP8Vector() &&
+          (VT == MVT::v16i8 || VT == MVT::v8i16 || VT == MVT::v4i32 ||
+           VT == MVT::v4f32)) ||
          (Subtarget.hasQPX() && (VT == MVT::v4f64 || VT == MVT::v4f32) &&
-          LD->getAlignment() >= ScalarABIAlignment)) &&
-        LD->getAlignment() < ABIAlignment) {
+          LD->getAlign() >= ScalarABIAlignment)) &&
+        LD->getAlign() < ABIAlignment) {
       // This is a type-legal unaligned Altivec or QPX load.
       SDValue Chain = LD->getChain();
       SDValue Ptr = LD->getBasePtr();
@@ -14523,6 +15614,7 @@ Align PPCTargetLowering::getPrefLoopAlignment(MachineLoop *ML) const {
   case PPC::DIR_PWR7:
   case PPC::DIR_PWR8:
   case PPC::DIR_PWR9:
+  case PPC::DIR_PWR10:
   case PPC::DIR_PWR_FUTURE: {
     if (!ML)
       break;
@@ -14929,18 +16021,16 @@ SDValue PPCTargetLowering::LowerFRAMEADDR(SDValue Op,
 Register PPCTargetLowering::getRegisterByName(const char* RegName, LLT VT,
                                               const MachineFunction &MF) const {
   bool isPPC64 = Subtarget.isPPC64();
-  bool IsDarwinABI = Subtarget.isDarwinABI();
 
   bool is64Bit = isPPC64 && VT == LLT::scalar(64);
   if (!is64Bit && VT != LLT::scalar(32))
     report_fatal_error("Invalid register global variable type");
 
   Register Reg = StringSwitch<Register>(RegName)
-                   .Case("r1", is64Bit ? PPC::X1 : PPC::R1)
-                   .Case("r2", (IsDarwinABI || isPPC64) ? Register() : PPC::R2)
-                   .Case("r13", (!isPPC64 && IsDarwinABI) ? Register() :
-                                  (is64Bit ? PPC::X13 : PPC::R13))
-                   .Default(Register());
+                     .Case("r1", is64Bit ? PPC::X1 : PPC::R1)
+                     .Case("r2", isPPC64 ? Register() : PPC::R2)
+                     .Case("r13", (is64Bit ? PPC::X13 : PPC::R13))
+                     .Default(Register());
 
   if (Reg)
     return Reg;
@@ -15033,7 +16123,7 @@ bool PPCTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
     Info.ptrVal = I.getArgOperand(0);
     Info.offset = -VT.getStoreSize()+1;
     Info.size = 2*VT.getStoreSize()-1;
-    Info.align = Align::None();
+    Info.align = Align(1);
     Info.flags = MachineMemOperand::MOLoad;
     return true;
   }
@@ -15067,7 +16157,7 @@ bool PPCTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
     Info.ptrVal = I.getArgOperand(0);
     Info.offset = 0;
     Info.size = VT.getStoreSize();
-    Info.align = Align::None();
+    Info.align = Align(1);
     Info.flags = MachineMemOperand::MOLoad;
     return true;
   }
@@ -15119,7 +16209,7 @@ bool PPCTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
     Info.ptrVal = I.getArgOperand(1);
     Info.offset = -VT.getStoreSize()+1;
     Info.size = 2*VT.getStoreSize()-1;
-    Info.align = Align::None();
+    Info.align = Align(1);
     Info.flags = MachineMemOperand::MOStore;
     return true;
   }
@@ -15152,7 +16242,7 @@ bool PPCTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
     Info.ptrVal = I.getArgOperand(1);
     Info.offset = 0;
     Info.size = VT.getStoreSize();
-    Info.align = Align::None();
+    Info.align = Align(1);
     Info.flags = MachineMemOperand::MOStore;
     return true;
   }
@@ -15163,35 +16253,24 @@ bool PPCTargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info,
   return false;
 }
 
-/// getOptimalMemOpType - Returns the target specific optimal type for load
-/// and store operations as a result of memset, memcpy, and memmove
-/// lowering. If DstAlign is zero that means it's safe to destination
-/// alignment can satisfy any constraint. Similarly if SrcAlign is zero it
-/// means there isn't a need to check it against alignment requirement,
-/// probably because the source does not need to be loaded. If 'IsMemset' is
-/// true, that means it's expanding a memset. If 'ZeroMemset' is true, that
-/// means it's a memset of zero. 'MemcpyStrSrc' indicates whether the memcpy
-/// source is constant so it does not need to be loaded.
 /// It returns EVT::Other if the type should be determined using generic
 /// target-independent logic.
 EVT PPCTargetLowering::getOptimalMemOpType(
-    uint64_t Size, unsigned DstAlign, unsigned SrcAlign, bool IsMemset,
-    bool ZeroMemset, bool MemcpyStrSrc,
-    const AttributeList &FuncAttributes) const {
+    const MemOp &Op, const AttributeList &FuncAttributes) const {
   if (getTargetMachine().getOptLevel() != CodeGenOpt::None) {
     // When expanding a memset, require at least two QPX instructions to cover
     // the cost of loading the value to be stored from the constant pool.
-    if (Subtarget.hasQPX() && Size >= 32 && (!IsMemset || Size >= 64) &&
-       (!SrcAlign || SrcAlign >= 32) && (!DstAlign || DstAlign >= 32) &&
+    if (Subtarget.hasQPX() && Op.size() >= 32 &&
+        (Op.isMemcpy() || Op.size() >= 64) && Op.isAligned(Align(32)) &&
         !FuncAttributes.hasFnAttribute(Attribute::NoImplicitFloat)) {
       return MVT::v4f64;
     }
 
     // We should use Altivec/VSX loads and stores when available. For unaligned
     // addresses, unaligned VSX loads are only fast starting with the P8.
-    if (Subtarget.hasAltivec() && Size >= 16 &&
-        (((!SrcAlign || SrcAlign >= 16) && (!DstAlign || DstAlign >= 16)) ||
-         ((IsMemset && Subtarget.hasVSX()) || Subtarget.hasP8Vector())))
+    if (Subtarget.hasAltivec() && Op.size() >= 16 &&
+        (Op.isAligned(Align(16)) ||
+         ((Op.isMemset() && Subtarget.hasVSX()) || Subtarget.hasP8Vector())))
       return MVT::v4i32;
   }
 
@@ -15307,22 +16386,48 @@ bool PPCTargetLowering::allowsMisalignedMemoryAccesses(EVT VT,
 
 bool PPCTargetLowering::isFMAFasterThanFMulAndFAdd(const MachineFunction &MF,
                                                    EVT VT) const {
-  VT = VT.getScalarType();
-
-  if (!VT.isSimple())
-    return false;
+  return isFMAFasterThanFMulAndFAdd(
+      MF.getFunction(), VT.getTypeForEVT(MF.getFunction().getContext()));
+}
 
-  switch (VT.getSimpleVT().SimpleTy) {
-  case MVT::f32:
-  case MVT::f64:
+bool PPCTargetLowering::isFMAFasterThanFMulAndFAdd(const Function &F,
+                                                   Type *Ty) const {
+  switch (Ty->getScalarType()->getTypeID()) {
+  case Type::FloatTyID:
+  case Type::DoubleTyID:
     return true;
-  case MVT::f128:
-    return (EnableQuadPrecision && Subtarget.hasP9Vector());
+  case Type::FP128TyID:
+    return Subtarget.hasP9Vector();
   default:
-    break;
+    return false;
   }
+}
 
-  return false;
+// Currently this is a copy from AArch64TargetLowering::isProfitableToHoist.
+// FIXME: add more patterns which are profitable to hoist.
+bool PPCTargetLowering::isProfitableToHoist(Instruction *I) const {
+  if (I->getOpcode() != Instruction::FMul)
+    return true;
+
+  if (!I->hasOneUse())
+    return true;
+
+  Instruction *User = I->user_back();
+  assert(User && "A single use instruction with no uses.");
+
+  if (User->getOpcode() != Instruction::FSub &&
+      User->getOpcode() != Instruction::FAdd)
+    return true;
+
+  const TargetOptions &Options = getTargetMachine().Options;
+  const Function *F = I->getFunction();
+  const DataLayout &DL = F->getParent()->getDataLayout();
+  Type *Ty = User->getOperand(0)->getType();
+
+  return !(
+      isFMAFasterThanFMulAndFAdd(*F, Ty) &&
+      isOperationLegalOrCustom(ISD::FMA, getValueType(DL, Ty)) &&
+      (Options.AllowFPOpFusion == FPOpFusion::Fast || Options.UnsafeFPMath));
 }
 
 const MCPhysReg *
@@ -15338,12 +16443,12 @@ PPCTargetLowering::getScratchRegisters(CallingConv::ID) const {
   return ScratchRegs;
 }
 
-unsigned PPCTargetLowering::getExceptionPointerRegister(
+Register PPCTargetLowering::getExceptionPointerRegister(
     const Constant *PersonalityFn) const {
   return Subtarget.isPPC64() ? PPC::X3 : PPC::R3;
 }
 
-unsigned PPCTargetLowering::getExceptionSelectorRegister(
+Register PPCTargetLowering::getExceptionSelectorRegister(
     const Constant *PersonalityFn) const {
   return Subtarget.isPPC64() ? PPC::X4 : PPC::R4;
 }
@@ -15374,58 +16479,83 @@ PPCTargetLowering::createFastISel(FunctionLoweringInfo &FuncInfo,
   return PPC::createFastISel(FuncInfo, LibInfo);
 }
 
-void PPCTargetLowering::initializeSplitCSR(MachineBasicBlock *Entry) const {
-  if (Subtarget.isDarwinABI()) return;
-  if (!Subtarget.isPPC64()) return;
-
-  // Update IsSplitCSR in PPCFunctionInfo
-  PPCFunctionInfo *PFI = Entry->getParent()->getInfo<PPCFunctionInfo>();
-  PFI->setIsSplitCSR(true);
+// 'Inverted' means the FMA opcode after negating one multiplicand.
+// For example, (fma -a b c) = (fnmsub a b c)
+static unsigned invertFMAOpcode(unsigned Opc) {
+  switch (Opc) {
+  default:
+    llvm_unreachable("Invalid FMA opcode for PowerPC!");
+  case ISD::FMA:
+    return PPCISD::FNMSUB;
+  case PPCISD::FNMSUB:
+    return ISD::FMA;
+  }
 }
 
-void PPCTargetLowering::insertCopiesSplitCSR(
-  MachineBasicBlock *Entry,
-  const SmallVectorImpl<MachineBasicBlock *> &Exits) const {
-  const PPCRegisterInfo *TRI = Subtarget.getRegisterInfo();
-  const MCPhysReg *IStart = TRI->getCalleeSavedRegsViaCopy(Entry->getParent());
-  if (!IStart)
-    return;
+SDValue PPCTargetLowering::getNegatedExpression(SDValue Op, SelectionDAG &DAG,
+                                                bool LegalOps, bool OptForSize,
+                                                NegatibleCost &Cost,
+                                                unsigned Depth) const {
+  if (Depth > SelectionDAG::MaxRecursionDepth)
+    return SDValue();
 
-  const TargetInstrInfo *TII = Subtarget.getInstrInfo();
-  MachineRegisterInfo *MRI = &Entry->getParent()->getRegInfo();
-  MachineBasicBlock::iterator MBBI = Entry->begin();
-  for (const MCPhysReg *I = IStart; *I; ++I) {
-    const TargetRegisterClass *RC = nullptr;
-    if (PPC::G8RCRegClass.contains(*I))
-      RC = &PPC::G8RCRegClass;
-    else if (PPC::F8RCRegClass.contains(*I))
-      RC = &PPC::F8RCRegClass;
-    else if (PPC::CRRCRegClass.contains(*I))
-      RC = &PPC::CRRCRegClass;
-    else if (PPC::VRRCRegClass.contains(*I))
-      RC = &PPC::VRRCRegClass;
-    else
-      llvm_unreachable("Unexpected register class in CSRsViaCopy!");
+  unsigned Opc = Op.getOpcode();
+  EVT VT = Op.getValueType();
+  SDNodeFlags Flags = Op.getNode()->getFlags();
+
+  switch (Opc) {
+  case PPCISD::FNMSUB:
+    // TODO: QPX subtarget is deprecated. No transformation here.
+    if (!Op.hasOneUse() || !isTypeLegal(VT) || Subtarget.hasQPX())
+      break;
+
+    const TargetOptions &Options = getTargetMachine().Options;
+    SDValue N0 = Op.getOperand(0);
+    SDValue N1 = Op.getOperand(1);
+    SDValue N2 = Op.getOperand(2);
+    SDLoc Loc(Op);
+
+    NegatibleCost N2Cost = NegatibleCost::Expensive;
+    SDValue NegN2 =
+        getNegatedExpression(N2, DAG, LegalOps, OptForSize, N2Cost, Depth + 1);
+
+    if (!NegN2)
+      return SDValue();
+
+    // (fneg (fnmsub a b c)) => (fnmsub (fneg a) b (fneg c))
+    // (fneg (fnmsub a b c)) => (fnmsub a (fneg b) (fneg c))
+    // These transformations may change sign of zeroes. For example,
+    // -(-ab-(-c))=-0 while -(-(ab-c))=+0 when a=b=c=1.
+    if (Flags.hasNoSignedZeros() || Options.NoSignedZerosFPMath) {
+      // Try and choose the cheaper one to negate.
+      NegatibleCost N0Cost = NegatibleCost::Expensive;
+      SDValue NegN0 = getNegatedExpression(N0, DAG, LegalOps, OptForSize,
+                                           N0Cost, Depth + 1);
+
+      NegatibleCost N1Cost = NegatibleCost::Expensive;
+      SDValue NegN1 = getNegatedExpression(N1, DAG, LegalOps, OptForSize,
+                                           N1Cost, Depth + 1);
+
+      if (NegN0 && N0Cost <= N1Cost) {
+        Cost = std::min(N0Cost, N2Cost);
+        return DAG.getNode(Opc, Loc, VT, NegN0, N1, NegN2, Flags);
+      } else if (NegN1) {
+        Cost = std::min(N1Cost, N2Cost);
+        return DAG.getNode(Opc, Loc, VT, N0, NegN1, NegN2, Flags);
+      }
+    }
 
-    Register NewVR = MRI->createVirtualRegister(RC);
-    // Create copy from CSR to a virtual register.
-    // FIXME: this currently does not emit CFI pseudo-instructions, it works
-    // fine for CXX_FAST_TLS since the C++-style TLS access functions should be
-    // nounwind. If we want to generalize this later, we may need to emit
-    // CFI pseudo-instructions.
-    assert(Entry->getParent()->getFunction().hasFnAttribute(
-             Attribute::NoUnwind) &&
-           "Function should be nounwind in insertCopiesSplitCSR!");
-    Entry->addLiveIn(*I);
-    BuildMI(*Entry, MBBI, DebugLoc(), TII->get(TargetOpcode::COPY), NewVR)
-      .addReg(*I);
+    // (fneg (fnmsub a b c)) => (fma a b (fneg c))
+    if (isOperationLegal(ISD::FMA, VT)) {
+      Cost = N2Cost;
+      return DAG.getNode(ISD::FMA, Loc, VT, N0, N1, NegN2, Flags);
+    }
 
-    // Insert the copy-back instructions right before the terminator.
-    for (auto *Exit : Exits)
-      BuildMI(*Exit, Exit->getFirstTerminator(), DebugLoc(),
-              TII->get(TargetOpcode::COPY), *I)
-        .addReg(NewVR);
+    break;
   }
+
+  return TargetLowering::getNegatedExpression(Op, DAG, LegalOps, OptForSize,
+                                              Cost, Depth);
 }
 
 // Override to enable LOAD_STACK_GUARD lowering on Linux.
@@ -15453,6 +16583,13 @@ bool PPCTargetLowering::isFPImmLegal(const APFloat &Imm, EVT VT,
     return false;
   case MVT::f32:
   case MVT::f64:
+    if (Subtarget.hasPrefixInstrs()) {
+      // With prefixed instructions, we can materialize anything that can be
+      // represented with a 32-bit immediate, not just positive zero.
+      APFloat APFloatOfImm = Imm;
+      return convertToNonDenormSingle(APFloatOfImm);
+    }
+    LLVM_FALLTHROUGH;
   case MVT::ppcf128:
     return Imm.isPosZero();
   }
@@ -15623,10 +16760,59 @@ static SDValue combineADDToADDZE(SDNode *N, SelectionDAG &DAG,
   return SDValue();
 }
 
+// Transform
+// (add C1, (MAT_PCREL_ADDR GlobalAddr+C2)) to
+// (MAT_PCREL_ADDR GlobalAddr+(C1+C2))
+// In this case both C1 and C2 must be known constants.
+// C1+C2 must fit into a 34 bit signed integer.
+static SDValue combineADDToMAT_PCREL_ADDR(SDNode *N, SelectionDAG &DAG,
+                                          const PPCSubtarget &Subtarget) {
+  if (!Subtarget.isUsingPCRelativeCalls())
+    return SDValue();
+
+  // Check both Operand 0 and Operand 1 of the ADD node for the PCRel node.
+  // If we find that node try to cast the Global Address and the Constant.
+  SDValue LHS = N->getOperand(0);
+  SDValue RHS = N->getOperand(1);
+
+  if (LHS.getOpcode() != PPCISD::MAT_PCREL_ADDR)
+    std::swap(LHS, RHS);
+
+  if (LHS.getOpcode() != PPCISD::MAT_PCREL_ADDR)
+    return SDValue();
+
+  // Operand zero of PPCISD::MAT_PCREL_ADDR is the GA node.
+  GlobalAddressSDNode *GSDN = dyn_cast<GlobalAddressSDNode>(LHS.getOperand(0));
+  ConstantSDNode* ConstNode = dyn_cast<ConstantSDNode>(RHS);
+
+  // Check that both casts succeeded.
+  if (!GSDN || !ConstNode)
+    return SDValue();
+
+  int64_t NewOffset = GSDN->getOffset() + ConstNode->getSExtValue();
+  SDLoc DL(GSDN);
+
+  // The signed int offset needs to fit in 34 bits.
+  if (!isInt<34>(NewOffset))
+    return SDValue();
+
+  // The new global address is a copy of the old global address except
+  // that it has the updated Offset.
+  SDValue GA =
+      DAG.getTargetGlobalAddress(GSDN->getGlobal(), DL, GSDN->getValueType(0),
+                                 NewOffset, GSDN->getTargetFlags());
+  SDValue MatPCRel =
+      DAG.getNode(PPCISD::MAT_PCREL_ADDR, DL, GSDN->getValueType(0), GA);
+  return MatPCRel;
+}
+
 SDValue PPCTargetLowering::combineADD(SDNode *N, DAGCombinerInfo &DCI) const {
   if (auto Value = combineADDToADDZE(N, DCI.DAG, Subtarget))
     return Value;
 
+  if (auto Value = combineADDToMAT_PCREL_ADDR(N, DCI.DAG, Subtarget))
+    return Value;
+
   return SDValue();
 }
 
@@ -15651,6 +16837,24 @@ SDValue PPCTargetLowering::combineTRUNCATE(SDNode *N,
   SDLoc dl(N);
   SDValue Op0 = N->getOperand(0);
 
+  // fold (truncate (abs (sub (zext a), (zext b)))) -> (vabsd a, b)
+  if (Subtarget.hasP9Altivec() && Op0.getOpcode() == ISD::ABS) {
+    EVT VT = N->getValueType(0);
+    if (VT != MVT::v4i32 && VT != MVT::v8i16 && VT != MVT::v16i8)
+      return SDValue();
+    SDValue Sub = Op0.getOperand(0);
+    if (Sub.getOpcode() == ISD::SUB) {
+      SDValue SubOp0 = Sub.getOperand(0);
+      SDValue SubOp1 = Sub.getOperand(1);
+      if ((SubOp0.getOpcode() == ISD::ZERO_EXTEND) &&
+          (SubOp1.getOpcode() == ISD::ZERO_EXTEND)) {
+        return DCI.DAG.getNode(PPCISD::VABSD, dl, VT, SubOp0.getOperand(0),
+                               SubOp1.getOperand(0),
+                               DCI.DAG.getTargetConstant(0, dl, MVT::i32));
+      }
+    }
+  }
+
   // Looking for a truncate of i128 to i64.
   if (Op0.getValueType() != MVT::i128 || N->getValueType(0) != MVT::i64)
     return SDValue();
@@ -15705,6 +16909,7 @@ SDValue PPCTargetLowering::combineMUL(SDNode *N, DAGCombinerInfo &DCI) const {
       // vector        7       2      2
       return true;
     case PPC::DIR_PWR9:
+    case PPC::DIR_PWR10:
     case PPC::DIR_PWR_FUTURE:
       //  type        mul     add    shl
       // scalar        5       2      2
@@ -15766,6 +16971,44 @@ SDValue PPCTargetLowering::combineMUL(SDNode *N, DAGCombinerInfo &DCI) const {
   }
 }
 
+// Combine fma-like op (like fnmsub) with fnegs to appropriate op. Do this
+// in combiner since we need to check SD flags and other subtarget features.
+SDValue PPCTargetLowering::combineFMALike(SDNode *N,
+                                          DAGCombinerInfo &DCI) const {
+  SDValue N0 = N->getOperand(0);
+  SDValue N1 = N->getOperand(1);
+  SDValue N2 = N->getOperand(2);
+  SDNodeFlags Flags = N->getFlags();
+  EVT VT = N->getValueType(0);
+  SelectionDAG &DAG = DCI.DAG;
+  const TargetOptions &Options = getTargetMachine().Options;
+  unsigned Opc = N->getOpcode();
+  bool CodeSize = DAG.getMachineFunction().getFunction().hasOptSize();
+  bool LegalOps = !DCI.isBeforeLegalizeOps();
+  SDLoc Loc(N);
+
+  // TODO: QPX subtarget is deprecated. No transformation here.
+  if (Subtarget.hasQPX() || !isOperationLegal(ISD::FMA, VT))
+    return SDValue();
+
+  // Allowing transformation to FNMSUB may change sign of zeroes when ab-c=0
+  // since (fnmsub a b c)=-0 while c-ab=+0.
+  if (!Flags.hasNoSignedZeros() && !Options.NoSignedZerosFPMath)
+    return SDValue();
+
+  // (fma (fneg a) b c) => (fnmsub a b c)
+  // (fnmsub (fneg a) b c) => (fma a b c)
+  if (SDValue NegN0 = getCheaperNegatedExpression(N0, DAG, LegalOps, CodeSize))
+    return DAG.getNode(invertFMAOpcode(Opc), Loc, VT, NegN0, N1, N2, Flags);
+
+  // (fma a (fneg b) c) => (fnmsub a b c)
+  // (fnmsub a (fneg b) c) => (fma a b c)
+  if (SDValue NegN1 = getCheaperNegatedExpression(N1, DAG, LegalOps, CodeSize))
+    return DAG.getNode(invertFMAOpcode(Opc), Loc, VT, N0, NegN1, N2, Flags);
+
+  return SDValue();
+}
+
 bool PPCTargetLowering::mayBeEmittedAsTailCall(const CallInst *CI) const {
   // Only duplicate to increase tail-calls for the 64bit SysV ABIs.
   if (!Subtarget.is64BitELFABI())
index ff3a6de..81ca525 100644 (file)
@@ -37,9 +37,6 @@ def SDT_PPCstore_scal_int_from_vsr : SDTypeProfile<0, 3, [
 def SDT_PPCVexts  : SDTypeProfile<1, 2, [
   SDTCisVT<0, f64>, SDTCisVT<1, f64>, SDTCisPtrTy<2>
 ]>;
-def SDT_PPCSExtVElems  : SDTypeProfile<1, 1, [
-  SDTCisVec<0>, SDTCisVec<1>
-]>;
 
 def SDT_PPCCallSeqStart : SDCallSeqStart<[ SDTCisVT<0, i32>,
                                            SDTCisVT<1, i32> ]>;
@@ -53,6 +50,10 @@ def SDT_PPCVecSplat : SDTypeProfile<1, 2, [ SDTCisVec<0>,
   SDTCisVec<1>, SDTCisInt<2>
 ]>;
 
+def SDT_PPCSpToDp : SDTypeProfile<1, 1, [ SDTCisVT<0, v2f64>,
+  SDTCisInt<1>
+]>;
+
 def SDT_PPCVecShift : SDTypeProfile<1, 3, [ SDTCisVec<0>,
   SDTCisVec<1>, SDTCisVec<2>, SDTCisPtrTy<3>
 ]>;
@@ -151,19 +152,19 @@ def PPClxsizx : SDNode<"PPCISD::LXSIZX", SDT_PPCLxsizx,
 def PPCstxsix : SDNode<"PPCISD::STXSIX", SDT_PPCstxsix,
                        [SDNPHasChain, SDNPMayStore]>;
 def PPCVexts  : SDNode<"PPCISD::VEXTS", SDT_PPCVexts, []>;
-def PPCSExtVElems  : SDNode<"PPCISD::SExtVElems", SDT_PPCSExtVElems, []>;
 
 // Extract FPSCR (not modeled at the DAG level).
 def PPCmffs   : SDNode<"PPCISD::MFFS",
-                       SDTypeProfile<1, 0, [SDTCisVT<0, f64>]>, []>;
+                       SDTypeProfile<1, 0, [SDTCisVT<0, f64>]>,
+                       [SDNPHasChain]>;
 
 // Perform FADD in round-to-zero mode.
 def PPCfaddrtz: SDNode<"PPCISD::FADDRTZ", SDTFPBinOp, []>;
 
 
-def PPCfsel   : SDNode<"PPCISD::FSEL",  
+def PPCfsel   : SDNode<"PPCISD::FSEL",
    // Type constraint for fsel.
-   SDTypeProfile<1, 3, [SDTCisSameAs<0, 2>, SDTCisSameAs<0, 3>, 
+   SDTypeProfile<1, 3, [SDTCisSameAs<0, 2>, SDTCisSameAs<0, 3>,
                         SDTCisFP<0>, SDTCisVT<1, f64>]>, []>;
 def PPCxsmaxc : SDNode<"PPCISD::XSMAXCDP", SDT_PPCFPMinMax, []>;
 def PPCxsminc : SDNode<"PPCISD::XSMINCDP", SDT_PPCFPMinMax, []>;
@@ -171,8 +172,6 @@ def PPChi       : SDNode<"PPCISD::Hi", SDTIntBinOp, []>;
 def PPClo       : SDNode<"PPCISD::Lo", SDTIntBinOp, []>;
 def PPCtoc_entry: SDNode<"PPCISD::TOC_ENTRY", SDTIntBinOp,
                          [SDNPMayLoad, SDNPMemOperand]>;
-def PPCvmaddfp  : SDNode<"PPCISD::VMADDFP", SDTFPTernaryOp, []>;
-def PPCvnmsubfp : SDNode<"PPCISD::VNMSUBFP", SDTFPTernaryOp, []>;
 
 def PPCppc32GOT : SDNode<"PPCISD::PPC32_GOT", SDTIntLeaf, []>;
 
@@ -199,6 +198,7 @@ def PPCaddiDtprelL   : SDNode<"PPCISD::ADDI_DTPREL_L", SDTIntBinOp>;
 
 def PPCvperm     : SDNode<"PPCISD::VPERM", SDT_PPCvperm, []>;
 def PPCxxsplt    : SDNode<"PPCISD::XXSPLT", SDT_PPCVecSplat, []>;
+def PPCxxspltidp : SDNode<"PPCISD::XXSPLTI_SP_TO_DP", SDT_PPCSpToDp, []>;
 def PPCvecinsert : SDNode<"PPCISD::VECINSERT", SDT_PPCVecInsert, []>;
 def PPCxxpermdi  : SDNode<"PPCISD::XXPERMDI", SDT_PPCxxpermdi, []>;
 def PPCvecshl    : SDNode<"PPCISD::VECSHL", SDT_PPCVecShift, []>;
@@ -221,6 +221,8 @@ def PPCsrl        : SDNode<"PPCISD::SRL"       , SDTIntShiftOp>;
 def PPCsra        : SDNode<"PPCISD::SRA"       , SDTIntShiftOp>;
 def PPCshl        : SDNode<"PPCISD::SHL"       , SDTIntShiftOp>;
 
+def PPCfnmsub     : SDNode<"PPCISD::FNMSUB"    , SDTFPTernaryOp>;
+
 def PPCextswsli : SDNode<"PPCISD::EXTSWSLI" , SDT_PPCextswsli>;
 
 // Move 2 i64 values into a VSX register
@@ -255,6 +257,9 @@ def PPCcall  : SDNode<"PPCISD::CALL", SDT_PPCCall,
 def PPCcall_nop  : SDNode<"PPCISD::CALL_NOP", SDT_PPCCall,
                           [SDNPHasChain, SDNPOptInGlue, SDNPOutGlue,
                            SDNPVariadic]>;
+def PPCcall_notoc : SDNode<"PPCISD::CALL_NOTOC", SDT_PPCCall,
+                           [SDNPHasChain, SDNPOptInGlue, SDNPOutGlue,
+                            SDNPVariadic]>;
 def PPCmtctr      : SDNode<"PPCISD::MTCTR", SDT_PPCCall,
                            [SDNPHasChain, SDNPOptInGlue, SDNPOutGlue]>;
 def PPCbctrl : SDNode<"PPCISD::BCTRL", SDTNone,
@@ -318,11 +323,32 @@ def SDTDynOp  : SDTypeProfile<1, 2, []>;
 def SDTDynAreaOp  : SDTypeProfile<1, 1, []>;
 def PPCdynalloc   : SDNode<"PPCISD::DYNALLOC", SDTDynOp, [SDNPHasChain]>;
 def PPCdynareaoffset   : SDNode<"PPCISD::DYNAREAOFFSET", SDTDynAreaOp, [SDNPHasChain]>;
+def PPCprobedalloca : SDNode<"PPCISD::PROBED_ALLOCA", SDTDynOp, [SDNPHasChain]>;
+
+// PC Relative Specific Nodes
+def PPCmatpcreladdr : SDNode<"PPCISD::MAT_PCREL_ADDR", SDTIntUnaryOp, []>;
 
 //===----------------------------------------------------------------------===//
 // PowerPC specific transformation functions and pattern fragments.
 //
 
+// A floating point immediate that is not a positive zero and can be converted
+// to a single precision floating point non-denormal immediate without loss of
+// information.
+def nzFPImmAsi32 : PatLeaf<(fpimm), [{
+  APFloat APFloatOfN = N->getValueAPF();
+  return convertToNonDenormSingle(APFloatOfN) && !N->isExactlyValue(+0.0);
+}]>;
+
+// Convert the floating point immediate into a 32 bit floating point immediate
+// and get a i32 with the resulting bits.
+def getFPAs32BitInt : SDNodeXForm<fpimm, [{
+  APFloat APFloatOfN = N->getValueAPF();
+  convertToNonDenormSingle(APFloatOfN);
+  return CurDAG->getTargetConstant(APFloatOfN.bitcastToAPInt().getZExtValue(),
+                                   SDLoc(N), MVT::i32);
+}]>;
+
 def SHL32 : SDNodeXForm<imm, [{
   // Transformation function: 31 - imm
   return getI32Imm(31 - N->getZExtValue(), SDLoc(N));
@@ -386,9 +412,10 @@ def immZExt16  : PatLeaf<(imm), [{
   // field.  Used by instructions like 'ori'.
   return (uint64_t)N->getZExtValue() == (unsigned short)N->getZExtValue();
 }], LO16>;
-def immNonAllOneAnyExt8 : ImmLeaf<i32, [{ 
+def immNonAllOneAnyExt8 : ImmLeaf<i32, [{
   return (isInt<8>(Imm) && (Imm != -1)) || (isUInt<8>(Imm) && (Imm != 0xFF));
 }]>;
+def i32immNonAllOneNonZero : ImmLeaf<i32, [{ return Imm && (Imm != -1); }]>;
 def immSExt5NonZero : ImmLeaf<i32, [{ return Imm && isInt<5>(Imm); }]>;
 
 // imm16Shifted* - These match immediates where the low 16-bits are zero.  There
@@ -404,7 +431,7 @@ def imm16ShiftedZExt : PatLeaf<(imm), [{
 
 def imm16ShiftedSExt : PatLeaf<(imm), [{
   // imm16ShiftedSExt predicate - True if only bits in the top 16-bits of the
-  // immediate are set.  Used by instructions like 'addis'.  Identical to 
+  // immediate are set.  Used by instructions like 'addis'.  Identical to
   // imm16ShiftedZExt in 32-bit mode.
   if (N->getZExtValue() & 0xFFFF) return false;
   if (N->getValueType(0) == MVT::i32)
@@ -723,6 +750,27 @@ def s17imm  : Operand<i32> {
   let ParserMatchClass = PPCS17ImmAsmOperand;
   let DecoderMethod = "decodeSImmOperand<16>";
 }
+def PPCS34ImmAsmOperand : AsmOperandClass {
+  let Name = "S34Imm";
+  let PredicateMethod = "isS34Imm";
+  let RenderMethod = "addImmOperands";
+}
+def s34imm : Operand<i64> {
+  let PrintMethod = "printS34ImmOperand";
+  let EncoderMethod = "getImm34Encoding";
+  let ParserMatchClass = PPCS34ImmAsmOperand;
+  let DecoderMethod = "decodeSImmOperand<34>";
+}
+def PPCImmZeroAsmOperand : AsmOperandClass {
+  let Name = "ImmZero";
+  let PredicateMethod = "isImmZero";
+  let RenderMethod = "addImmOperands";
+}
+def immZero : Operand<i32> {
+  let PrintMethod = "printImmZeroOperand";
+  let ParserMatchClass = PPCImmZeroAsmOperand;
+  let DecoderMethod = "decodeImmZeroOperand";
+}
 
 def fpimm0 : PatLeaf<(fpimm), [{ return N->isExactlyValue(+0.0); }]>;
 
@@ -733,7 +781,9 @@ def PPCDirectBrAsmOperand : AsmOperandClass {
 def directbrtarget : Operand<OtherVT> {
   let PrintMethod = "printBranchOperand";
   let EncoderMethod = "getDirectBrEncoding";
+  let DecoderMethod = "decodeDirectBrTarget";
   let ParserMatchClass = PPCDirectBrAsmOperand;
+  let OperandType = "OPERAND_PCREL";
 }
 def absdirectbrtarget : Operand<OtherVT> {
   let PrintMethod = "printAbsBranchOperand";
@@ -747,7 +797,9 @@ def PPCCondBrAsmOperand : AsmOperandClass {
 def condbrtarget : Operand<OtherVT> {
   let PrintMethod = "printBranchOperand";
   let EncoderMethod = "getCondBrEncoding";
+  let DecoderMethod = "decodeCondBrTarget";
   let ParserMatchClass = PPCCondBrAsmOperand;
+  let OperandType = "OPERAND_PCREL";
 }
 def abscondbrtarget : Operand<OtherVT> {
   let PrintMethod = "printAbsBranchOperand";
@@ -757,7 +809,7 @@ def abscondbrtarget : Operand<OtherVT> {
 def calltarget : Operand<iPTR> {
   let PrintMethod = "printBranchOperand";
   let EncoderMethod = "getDirectBrEncoding";
-  let DecoderMethod = "DecodePCRel24BranchTarget";
+  let DecoderMethod = "decodeDirectBrTarget";
   let ParserMatchClass = PPCDirectBrAsmOperand;
   let OperandType = "OPERAND_PCREL";
 }
@@ -783,6 +835,30 @@ def PPCRegGxRCNoR0Operand : AsmOperandClass {
 def ptr_rc_nor0 : Operand<iPTR>, PointerLikeRegClass<1> {
   let ParserMatchClass = PPCRegGxRCNoR0Operand;
 }
+
+// New addressing modes with 34 bit immediates.
+def PPCDispRI34Operand : AsmOperandClass {
+  let Name = "DispRI34"; let PredicateMethod = "isS34Imm";
+  let RenderMethod = "addImmOperands";
+}
+def dispRI34 : Operand<iPTR> {
+  let ParserMatchClass = PPCDispRI34Operand;
+}
+def memri34 : Operand<iPTR> { // memri, imm is a 34-bit value.
+  let PrintMethod = "printMemRegImm34";
+  let MIOperandInfo = (ops dispRI34:$imm, ptr_rc_nor0:$reg);
+  let EncoderMethod = "getMemRI34Encoding";
+  let DecoderMethod = "decodeMemRI34Operands";
+}
+// memri, imm is a 34-bit value for pc-relative instructions where
+// base register is set to zero.
+def memri34_pcrel : Operand<iPTR> { // memri, imm is a 34-bit value.
+  let PrintMethod = "printMemRegImm34PCRel";
+  let MIOperandInfo = (ops dispRI34:$imm, immZero:$reg);
+  let EncoderMethod = "getMemRI34PCRelEncoding";
+  let DecoderMethod = "decodeMemRI34PCRelOperands";
+}
+
 // A version of ptr_rc usable with the asm parser.
 def PPCRegGxRCOperand : AsmOperandClass {
   let Name = "RegGxRC"; let PredicateMethod = "isRegNumber";
@@ -876,7 +952,7 @@ def spe2dis : Operand<iPTR> {   // SPE displacement where the imm is 2-aligned.
 }
 
 // A single-register address. This is used with the SjLj
-// pseudo-instructions which tranlates to LD/LWZ.  These instructions requires
+// pseudo-instructions which translates to LD/LWZ.  These instructions requires
 // G8RC_NOX0 registers.
 def memr : Operand<iPTR> {
   let MIOperandInfo = (ops ptr_rc_nor0:$ptrreg);
@@ -913,11 +989,11 @@ def iaddrX16 : ComplexPattern<iPTR, 2, "SelectAddrImmX16",  [], []>;  // "stxv"
 
 // Below forms are all x-form addressing mode, use three different ones so we
 // can make a accurate check for x-form instructions in ISEL.
-// x-form addressing mode whose associated diplacement form is D.
+// x-form addressing mode whose associated displacement form is D.
 def xaddr  : ComplexPattern<iPTR, 2, "SelectAddrIdx",     [], []>;    // "stbx"
-// x-form addressing mode whose associated diplacement form is DS.
+// x-form addressing mode whose associated displacement form is DS.
 def xaddrX4 : ComplexPattern<iPTR, 2, "SelectAddrIdxX4",    [], []>;  // "stdx"
-// x-form addressing mode whose associated diplacement form is DQ.
+// x-form addressing mode whose associated displacement form is DQ.
 def xaddrX16 : ComplexPattern<iPTR, 2, "SelectAddrIdxX16",   [], []>; // "stxvx"
 
 def xoaddr : ComplexPattern<iPTR, 2, "SelectAddrIdxOnly",[], []>;
@@ -929,26 +1005,32 @@ def addr   : ComplexPattern<iPTR, 1, "SelectAddr",[], []>;
 /// This is just the offset part of iaddr, used for preinc.
 def iaddroff : ComplexPattern<iPTR, 1, "SelectAddrImmOffs", [], []>;
 
+// PC Relative Address
+def pcreladdr : ComplexPattern<iPTR, 1, "SelectAddrPCRel", [], []>;
+
 //===----------------------------------------------------------------------===//
 // PowerPC Instruction Predicate Definitions.
-def In32BitMode  : Predicate<"!PPCSubTarget->isPPC64()">;
-def In64BitMode  : Predicate<"PPCSubTarget->isPPC64()">;
-def IsBookE  : Predicate<"PPCSubTarget->isBookE()">;
-def IsNotBookE  : Predicate<"!PPCSubTarget->isBookE()">;
-def HasOnlyMSYNC : Predicate<"PPCSubTarget->hasOnlyMSYNC()">;
-def HasSYNC   : Predicate<"!PPCSubTarget->hasOnlyMSYNC()">;
-def IsPPC4xx  : Predicate<"PPCSubTarget->isPPC4xx()">;
-def IsPPC6xx  : Predicate<"PPCSubTarget->isPPC6xx()">;
-def IsE500  : Predicate<"PPCSubTarget->isE500()">;
-def HasSPE  : Predicate<"PPCSubTarget->hasSPE()">;
-def HasICBT : Predicate<"PPCSubTarget->hasICBT()">;
-def HasPartwordAtomics : Predicate<"PPCSubTarget->hasPartwordAtomics()">;
-def NoNaNsFPMath : Predicate<"TM.Options.NoNaNsFPMath">;
-def NaNsFPMath   : Predicate<"!TM.Options.NoNaNsFPMath">;
-def HasBPERMD : Predicate<"PPCSubTarget->hasBPERMD()">;
-def HasExtDiv : Predicate<"PPCSubTarget->hasExtDiv()">;
-def IsISA3_0 : Predicate<"PPCSubTarget->isISA3_0()">;
-def HasFPU : Predicate<"PPCSubTarget->hasFPU()">;
+def In32BitMode  : Predicate<"!Subtarget->isPPC64()">;
+def In64BitMode  : Predicate<"Subtarget->isPPC64()">;
+def IsBookE  : Predicate<"Subtarget->isBookE()">;
+def IsNotBookE  : Predicate<"!Subtarget->isBookE()">;
+def HasOnlyMSYNC : Predicate<"Subtarget->hasOnlyMSYNC()">;
+def HasSYNC   : Predicate<"!Subtarget->hasOnlyMSYNC()">;
+def IsPPC4xx  : Predicate<"Subtarget->isPPC4xx()">;
+def IsPPC6xx  : Predicate<"Subtarget->isPPC6xx()">;
+def IsE500  : Predicate<"Subtarget->isE500()">;
+def HasSPE  : Predicate<"Subtarget->hasSPE()">;
+def HasICBT : Predicate<"Subtarget->hasICBT()">;
+def HasPartwordAtomics : Predicate<"Subtarget->hasPartwordAtomics()">;
+def NoNaNsFPMath
+    : Predicate<"Subtarget->getTargetMachine().Options.NoNaNsFPMath">;
+def NaNsFPMath
+    : Predicate<"!Subtarget->getTargetMachine().Options.NoNaNsFPMath">;
+def HasBPERMD : Predicate<"Subtarget->hasBPERMD()">;
+def HasExtDiv : Predicate<"Subtarget->hasExtDiv()">;
+def IsISA3_0 : Predicate<"Subtarget->isISA3_0()">;
+def HasFPU : Predicate<"Subtarget->hasFPU()">;
+def PCRelativeMemops : Predicate<"Subtarget->hasPCRelativeMemops()">;
 
 //===----------------------------------------------------------------------===//
 // PowerPC Multiclass Definitions.
@@ -1318,7 +1400,25 @@ def DYNALLOC : PPCEmitTimePseudo<(outs gprc:$result), (ins gprc:$negsize, memri:
                              (PPCdynalloc i32:$negsize, iaddr:$fpsi))]>;
 def DYNAREAOFFSET : PPCEmitTimePseudo<(outs i32imm:$result), (ins memri:$fpsi), "#DYNAREAOFFSET",
                        [(set i32:$result, (PPCdynareaoffset iaddr:$fpsi))]>;
-                         
+// Probed alloca to support stack clash protection.
+let Defs = [R1], Uses = [R1], hasNoSchedulingInfo = 1 in {
+def PROBED_ALLOCA_32 : PPCCustomInserterPseudo<(outs gprc:$result),
+                         (ins gprc:$negsize, memri:$fpsi), "#PROBED_ALLOCA_32",
+                           [(set i32:$result,
+                             (PPCprobedalloca i32:$negsize, iaddr:$fpsi))]>;
+def PREPARE_PROBED_ALLOCA_32 : PPCEmitTimePseudo<(outs
+    gprc:$fp, gprc:$actual_negsize),
+    (ins gprc:$negsize, memri:$fpsi), "#PREPARE_PROBED_ALLOCA_32", []>;
+def PREPARE_PROBED_ALLOCA_NEGSIZE_SAME_REG_32 : PPCEmitTimePseudo<(outs
+    gprc:$fp, gprc:$actual_negsize),
+    (ins gprc:$negsize, memri:$fpsi),
+    "#PREPARE_PROBED_ALLOCA_NEGSIZE_SAME_REG_32", []>,
+    RegConstraint<"$actual_negsize = $negsize">;
+def PROBED_STACKALLOC_32 : PPCEmitTimePseudo<(outs gprc:$scratch, gprc:$temp),
+    (ins i64imm:$stacksize),
+    "#PROBED_STACKALLOC_32", []>;
+}
+
 // SELECT_CC_* - Used to implement the SELECT_CC DAG operation.  Expanded after
 // instruction selection into a branch sequence.
 let PPC970_Single = 1 in {
@@ -1412,7 +1512,7 @@ let isTerminator = 1, isBarrier = 1, PPC970_Unit = 7 in {
 }
 
 // Set the float rounding mode.
-let Uses = [RM], Defs = [RM] in { 
+let Uses = [RM], Defs = [RM] in {
 def SETRNDi : PPCCustomInserterPseudo<(outs f8rc:$FRT), (ins u2imm:$RND),
                     "#SETRNDi", [(set f64:$FRT, (int_ppc_setrnd (i32 imm:$RND)))]>;
 
@@ -1749,6 +1849,8 @@ def RFEBB : XLForm_S<19, 146, (outs), (ins u1imm:$imm), "rfebb $imm",
                      IIC_BrB, [(PPCrfebb (i32 imm:$imm))]>,
                      PPC970_DGroup_Single;
 
+def : InstAlias<"rfebb", (RFEBB 1)>;
+
 // DCB* instructions.
 def DCBA   : DCB_Form<758, 0, (outs), (ins memrr:$dst), "dcba $dst",
                       IIC_LdStDCBF, [(int_ppc_dcba xoaddr:$dst)]>,
@@ -1802,6 +1904,11 @@ def : Pat<(prefetch xoaddr:$dst, (i32 1), imm, (i32 1)),
 def : Pat<(prefetch xoaddr:$dst, (i32 0), imm, (i32 0)),
           (ICBT 0, xoaddr:$dst)>, Requires<[HasICBT]>; // inst prefetch (for read)
 
+def : Pat<(int_ppc_dcbt_with_hint xoaddr:$dst, i32:$TH),
+          (DCBT i32:$TH, xoaddr:$dst)>;
+def : Pat<(int_ppc_dcbtst_with_hint xoaddr:$dst, i32:$TH),
+          (DCBTST i32:$TH, xoaddr:$dst)>;
+
 // Atomic operations
 // FIXME: some of these might be used with constant operands. This will result
 // in constant materialization instructions that may be redundant. We currently
@@ -1994,7 +2101,7 @@ def TD : XForm_1<31, 68, (outs), (ins u5imm:$to, g8rc:$rA, g8rc:$rB),
 // PPC32 Load Instructions.
 //
 
-// Unindexed (r+i) Loads. 
+// Unindexed (r+i) Loads.
 let PPC970_Unit = 2 in {
 def LBZ : DForm_1<34, (outs gprc:$rD), (ins memri:$src),
                   "lbz $rD, $src", IIC_LdStLoad,
@@ -2137,7 +2244,7 @@ def LFIWZX : XForm_25_memOp<31, 887, (outs f8rc:$frD), (ins memrr:$src),
 }
 
 // Load Multiple
-let mayLoad = 1, mayStore = 0, hasSideEffects = 0 in 
+let mayLoad = 1, mayStore = 0, hasSideEffects = 0 in
 def LMW : DForm_1<46, (outs gprc:$rD), (ins memri:$src),
                   "lmw $rD, $src", IIC_LdStLMW, []>;
 
@@ -2306,10 +2413,15 @@ let isCodeGenOnly = 1 in {
   }
 }
 
+// We used to have EIEIO as value but E[0-9A-Z] is a reserved name
+def EnforceIEIO : XForm_24_eieio<31, 854, (outs), (ins),
+                                 "eieio", IIC_LdStLoad, []>;
+
 def : Pat<(int_ppc_sync),   (SYNC 0)>, Requires<[HasSYNC]>;
 def : Pat<(int_ppc_lwsync), (SYNC 1)>, Requires<[HasSYNC]>;
 def : Pat<(int_ppc_sync),   (MSYNC)>, Requires<[HasOnlyMSYNC]>;
 def : Pat<(int_ppc_lwsync), (MSYNC)>, Requires<[HasOnlyMSYNC]>;
+def : Pat<(int_ppc_eieio),  (EnforceIEIO)>;
 
 //===----------------------------------------------------------------------===//
 // PPC32 Arithmetic Instructions.
@@ -2356,6 +2468,9 @@ let isReMaterializable = 1, isAsCheapAsAMove = 1, isMoveImm = 1 in {
 }
 }
 
+def : InstAlias<"li $rD, $imm", (ADDI gprc:$rD, ZERO, s16imm:$imm)>;
+def : InstAlias<"lis $rD, $imm", (ADDIS gprc:$rD, ZERO, s17imm:$imm)>;
+
 let PPC970_Unit = 1 in {  // FXU Operations.
 let Defs = [CR0] in {
 def ANDI_rec : DForm_4<28, (outs gprc:$dst), (ins gprc:$src1, u16imm:$src2),
@@ -2444,6 +2559,14 @@ defm SRAW : XForm_6rc<31, 792, (outs gprc:$rA), (ins gprc:$rS, gprc:$rB),
                       [(set i32:$rA, (PPCsra i32:$rS, i32:$rB))]>;
 }
 
+def : InstAlias<"mr $rA, $rB", (OR gprc:$rA, gprc:$rB, gprc:$rB)>;
+def : InstAlias<"mr. $rA, $rB", (OR_rec gprc:$rA, gprc:$rB, gprc:$rB)>;
+
+def : InstAlias<"not $rA, $rS", (NOR gprc:$rA, gprc:$rS, gprc:$rS)>;
+def : InstAlias<"not. $rA, $rS", (NOR_rec gprc:$rA, gprc:$rS, gprc:$rS)>;
+
+def : InstAlias<"nop", (ORI R0, R0, 0)>;
+
 let PPC970_Unit = 1 in {  // FXU Operations.
 let hasSideEffects = 0 in {
 defm SRAWI : XForm_10rc<31, 824, (outs gprc:$rA), (ins gprc:$rS, u5imm:$SH),
@@ -2490,7 +2613,7 @@ def FTDIV: XForm_17<63, 128, (outs crrc:$crD), (ins f8rc:$fA, f8rc:$fB),
 def FTSQRT: XForm_17a<63, 160, (outs crrc:$crD), (ins f8rc:$fB),
                       "ftsqrt $crD, $fB", IIC_FPCompare>;
 
-let Uses = [RM] in {
+let Uses = [RM], mayRaiseFPException = 1 in {
   let hasSideEffects = 0 in {
   defm FCTIW  : XForm_26r<63, 14, (outs f8rc:$frD), (ins f8rc:$frB),
                           "fctiw", "$frD, $frB", IIC_FPGeneral,
@@ -2504,46 +2627,46 @@ let Uses = [RM] in {
 
   defm FRSP   : XForm_26r<63, 12, (outs f4rc:$frD), (ins f8rc:$frB),
                           "frsp", "$frD, $frB", IIC_FPGeneral,
-                          [(set f32:$frD, (fpround f64:$frB))]>;
+                          [(set f32:$frD, (any_fpround f64:$frB))]>;
 
   let Interpretation64Bit = 1, isCodeGenOnly = 1 in
   defm FRIND  : XForm_26r<63, 392, (outs f8rc:$frD), (ins f8rc:$frB),
                           "frin", "$frD, $frB", IIC_FPGeneral,
-                          [(set f64:$frD, (fround f64:$frB))]>;
+                          [(set f64:$frD, (any_fround f64:$frB))]>;
   defm FRINS  : XForm_26r<63, 392, (outs f4rc:$frD), (ins f4rc:$frB),
                           "frin", "$frD, $frB", IIC_FPGeneral,
-                          [(set f32:$frD, (fround f32:$frB))]>;
+                          [(set f32:$frD, (any_fround f32:$frB))]>;
   }
 
   let hasSideEffects = 0 in {
   let Interpretation64Bit = 1, isCodeGenOnly = 1 in
   defm FRIPD  : XForm_26r<63, 456, (outs f8rc:$frD), (ins f8rc:$frB),
                           "frip", "$frD, $frB", IIC_FPGeneral,
-                          [(set f64:$frD, (fceil f64:$frB))]>;
+                          [(set f64:$frD, (any_fceil f64:$frB))]>;
   defm FRIPS  : XForm_26r<63, 456, (outs f4rc:$frD), (ins f4rc:$frB),
                           "frip", "$frD, $frB", IIC_FPGeneral,
-                          [(set f32:$frD, (fceil f32:$frB))]>;
+                          [(set f32:$frD, (any_fceil f32:$frB))]>;
   let Interpretation64Bit = 1, isCodeGenOnly = 1 in
   defm FRIZD  : XForm_26r<63, 424, (outs f8rc:$frD), (ins f8rc:$frB),
                           "friz", "$frD, $frB", IIC_FPGeneral,
-                          [(set f64:$frD, (ftrunc f64:$frB))]>;
+                          [(set f64:$frD, (any_ftrunc f64:$frB))]>;
   defm FRIZS  : XForm_26r<63, 424, (outs f4rc:$frD), (ins f4rc:$frB),
                           "friz", "$frD, $frB", IIC_FPGeneral,
-                          [(set f32:$frD, (ftrunc f32:$frB))]>;
+                          [(set f32:$frD, (any_ftrunc f32:$frB))]>;
   let Interpretation64Bit = 1, isCodeGenOnly = 1 in
   defm FRIMD  : XForm_26r<63, 488, (outs f8rc:$frD), (ins f8rc:$frB),
                           "frim", "$frD, $frB", IIC_FPGeneral,
-                          [(set f64:$frD, (ffloor f64:$frB))]>;
+                          [(set f64:$frD, (any_ffloor f64:$frB))]>;
   defm FRIMS  : XForm_26r<63, 488, (outs f4rc:$frD), (ins f4rc:$frB),
                           "frim", "$frD, $frB", IIC_FPGeneral,
-                          [(set f32:$frD, (ffloor f32:$frB))]>;
+                          [(set f32:$frD, (any_ffloor f32:$frB))]>;
 
   defm FSQRT  : XForm_26r<63, 22, (outs f8rc:$frD), (ins f8rc:$frB),
                           "fsqrt", "$frD, $frB", IIC_FPSqrtD,
-                          [(set f64:$frD, (fsqrt f64:$frB))]>;
+                          [(set f64:$frD, (any_fsqrt f64:$frB))]>;
   defm FSQRTS : XForm_26r<59, 22, (outs f4rc:$frD), (ins f4rc:$frB),
                           "fsqrts", "$frD, $frB", IIC_FPSqrtS,
-                          [(set f32:$frD, (fsqrt f32:$frB))]>;
+                          [(set f32:$frD, (any_fsqrt f32:$frB))]>;
   }
   }
 }
@@ -2811,6 +2934,8 @@ def MCRXRX : X_BF3<31, 576, (outs crrc:$BF), (ins),
                    "mcrxrx $BF", IIC_BrMCRX>, Requires<[IsISA3_0]>;
 } // hasSideEffects = 0
 
+def : InstAlias<"mtcr $rA", (MTCRF 255, gprc:$rA)>;
+
 let Predicates = [HasFPU] in {
 // Custom inserter instruction to perform FADD in round-to-zero mode.
 let Uses = [RM] in {
@@ -2820,7 +2945,7 @@ let Uses = [RM] in {
 
 // The above pseudo gets expanded to make use of the following instructions
 // to manipulate FPSCR.  Note that FPSCR is not modeled at the DAG level.
-let Uses = [RM], Defs = [RM] in { 
+let Uses = [RM], Defs = [RM] in {
   def MTFSB0 : XForm_43<63, 70, (outs), (ins u5imm:$FM),
                         "mtfsb0 $FM", IIC_IntMTFSB0, []>,
                PPC970_DGroup_Single, PPC970_Unit_FPU;
@@ -2956,49 +3081,54 @@ defm SUBFZE : XOForm_3rc<31, 200, 0, (outs gprc:$rT), (ins gprc:$rA),
 }
 }
 
+def : InstAlias<"sub $rA, $rB, $rC", (SUBF gprc:$rA, gprc:$rC, gprc:$rB)>;
+def : InstAlias<"sub. $rA, $rB, $rC", (SUBF_rec gprc:$rA, gprc:$rC, gprc:$rB)>;
+def : InstAlias<"subc $rA, $rB, $rC", (SUBFC gprc:$rA, gprc:$rC, gprc:$rB)>;
+def : InstAlias<"subc. $rA, $rB, $rC", (SUBFC_rec gprc:$rA, gprc:$rC, gprc:$rB)>;
+
 // A-Form instructions.  Most of the instructions executed in the FPU are of
 // this type.
 //
 let PPC970_Unit = 3, hasSideEffects = 0, Predicates = [HasFPU] in {  // FPU Operations.
 let Uses = [RM] in {
 let isCommutable = 1 in {
-  defm FMADD : AForm_1r<63, 29, 
+  defm FMADD : AForm_1r<63, 29,
                       (outs f8rc:$FRT), (ins f8rc:$FRA, f8rc:$FRC, f8rc:$FRB),
                       "fmadd", "$FRT, $FRA, $FRC, $FRB", IIC_FPFused,
-                      [(set f64:$FRT, (fma f64:$FRA, f64:$FRC, f64:$FRB))]>;
+                      [(set f64:$FRT, (any_fma f64:$FRA, f64:$FRC, f64:$FRB))]>;
   defm FMADDS : AForm_1r<59, 29,
                       (outs f4rc:$FRT), (ins f4rc:$FRA, f4rc:$FRC, f4rc:$FRB),
                       "fmadds", "$FRT, $FRA, $FRC, $FRB", IIC_FPGeneral,
-                      [(set f32:$FRT, (fma f32:$FRA, f32:$FRC, f32:$FRB))]>;
+                      [(set f32:$FRT, (any_fma f32:$FRA, f32:$FRC, f32:$FRB))]>;
   defm FMSUB : AForm_1r<63, 28,
                       (outs f8rc:$FRT), (ins f8rc:$FRA, f8rc:$FRC, f8rc:$FRB),
                       "fmsub", "$FRT, $FRA, $FRC, $FRB", IIC_FPFused,
                       [(set f64:$FRT,
-                            (fma f64:$FRA, f64:$FRC, (fneg f64:$FRB)))]>;
+                            (any_fma f64:$FRA, f64:$FRC, (fneg f64:$FRB)))]>;
   defm FMSUBS : AForm_1r<59, 28,
                       (outs f4rc:$FRT), (ins f4rc:$FRA, f4rc:$FRC, f4rc:$FRB),
                       "fmsubs", "$FRT, $FRA, $FRC, $FRB", IIC_FPGeneral,
                       [(set f32:$FRT,
-                            (fma f32:$FRA, f32:$FRC, (fneg f32:$FRB)))]>;
+                            (any_fma f32:$FRA, f32:$FRC, (fneg f32:$FRB)))]>;
   defm FNMADD : AForm_1r<63, 31,
                       (outs f8rc:$FRT), (ins f8rc:$FRA, f8rc:$FRC, f8rc:$FRB),
                       "fnmadd", "$FRT, $FRA, $FRC, $FRB", IIC_FPFused,
                       [(set f64:$FRT,
-                            (fneg (fma f64:$FRA, f64:$FRC, f64:$FRB)))]>;
+                            (fneg (any_fma f64:$FRA, f64:$FRC, f64:$FRB)))]>;
   defm FNMADDS : AForm_1r<59, 31,
                       (outs f4rc:$FRT), (ins f4rc:$FRA, f4rc:$FRC, f4rc:$FRB),
                       "fnmadds", "$FRT, $FRA, $FRC, $FRB", IIC_FPGeneral,
                       [(set f32:$FRT,
-                            (fneg (fma f32:$FRA, f32:$FRC, f32:$FRB)))]>;
+                            (fneg (any_fma f32:$FRA, f32:$FRC, f32:$FRB)))]>;
   defm FNMSUB : AForm_1r<63, 30,
                       (outs f8rc:$FRT), (ins f8rc:$FRA, f8rc:$FRC, f8rc:$FRB),
                       "fnmsub", "$FRT, $FRA, $FRC, $FRB", IIC_FPFused,
-                      [(set f64:$FRT, (fneg (fma f64:$FRA, f64:$FRC,
+                      [(set f64:$FRT, (fneg (any_fma f64:$FRA, f64:$FRC,
                                                  (fneg f64:$FRB))))]>;
   defm FNMSUBS : AForm_1r<59, 30,
                       (outs f4rc:$FRT), (ins f4rc:$FRA, f4rc:$FRC, f4rc:$FRB),
                       "fnmsubs", "$FRT, $FRA, $FRC, $FRB", IIC_FPGeneral,
-                      [(set f32:$FRT, (fneg (fma f32:$FRA, f32:$FRC,
+                      [(set f32:$FRT, (fneg (any_fma f32:$FRA, f32:$FRC,
                                                  (fneg f32:$FRB))))]>;
 } // isCommutable
 }
@@ -3015,43 +3145,43 @@ defm FSELS : AForm_1r<63, 23,
                       (outs f4rc:$FRT), (ins f8rc:$FRA, f4rc:$FRC, f4rc:$FRB),
                       "fsel", "$FRT, $FRA, $FRC, $FRB", IIC_FPGeneral,
                       [(set f32:$FRT, (PPCfsel f64:$FRA, f32:$FRC, f32:$FRB))]>;
-let Uses = [RM] in {
+let Uses = [RM], mayRaiseFPException = 1 in {
   let isCommutable = 1 in {
   defm FADD  : AForm_2r<63, 21,
                         (outs f8rc:$FRT), (ins f8rc:$FRA, f8rc:$FRB),
                         "fadd", "$FRT, $FRA, $FRB", IIC_FPAddSub,
-                        [(set f64:$FRT, (fadd f64:$FRA, f64:$FRB))]>;
+                        [(set f64:$FRT, (any_fadd f64:$FRA, f64:$FRB))]>;
   defm FADDS : AForm_2r<59, 21,
                         (outs f4rc:$FRT), (ins f4rc:$FRA, f4rc:$FRB),
                         "fadds", "$FRT, $FRA, $FRB", IIC_FPGeneral,
-                        [(set f32:$FRT, (fadd f32:$FRA, f32:$FRB))]>;
+                        [(set f32:$FRT, (any_fadd f32:$FRA, f32:$FRB))]>;
   } // isCommutable
   defm FDIV  : AForm_2r<63, 18,
                         (outs f8rc:$FRT), (ins f8rc:$FRA, f8rc:$FRB),
                         "fdiv", "$FRT, $FRA, $FRB", IIC_FPDivD,
-                        [(set f64:$FRT, (fdiv f64:$FRA, f64:$FRB))]>;
+                        [(set f64:$FRT, (any_fdiv f64:$FRA, f64:$FRB))]>;
   defm FDIVS : AForm_2r<59, 18,
                         (outs f4rc:$FRT), (ins f4rc:$FRA, f4rc:$FRB),
                         "fdivs", "$FRT, $FRA, $FRB", IIC_FPDivS,
-                        [(set f32:$FRT, (fdiv f32:$FRA, f32:$FRB))]>;
+                        [(set f32:$FRT, (any_fdiv f32:$FRA, f32:$FRB))]>;
   let isCommutable = 1 in {
   defm FMUL  : AForm_3r<63, 25,
                         (outs f8rc:$FRT), (ins f8rc:$FRA, f8rc:$FRC),
                         "fmul", "$FRT, $FRA, $FRC", IIC_FPFused,
-                        [(set f64:$FRT, (fmul f64:$FRA, f64:$FRC))]>;
+                        [(set f64:$FRT, (any_fmul f64:$FRA, f64:$FRC))]>;
   defm FMULS : AForm_3r<59, 25,
                         (outs f4rc:$FRT), (ins f4rc:$FRA, f4rc:$FRC),
                         "fmuls", "$FRT, $FRA, $FRC", IIC_FPGeneral,
-                        [(set f32:$FRT, (fmul f32:$FRA, f32:$FRC))]>;
+                        [(set f32:$FRT, (any_fmul f32:$FRA, f32:$FRC))]>;
   } // isCommutable
   defm FSUB  : AForm_2r<63, 20,
                         (outs f8rc:$FRT), (ins f8rc:$FRA, f8rc:$FRB),
                         "fsub", "$FRT, $FRA, $FRB", IIC_FPAddSub,
-                        [(set f64:$FRT, (fsub f64:$FRA, f64:$FRB))]>;
+                        [(set f64:$FRT, (any_fsub f64:$FRA, f64:$FRB))]>;
   defm FSUBS : AForm_2r<59, 20,
                         (outs f4rc:$FRT), (ins f4rc:$FRA, f4rc:$FRB),
                         "fsubs", "$FRT, $FRA, $FRB", IIC_FPGeneral,
-                        [(set f32:$FRT, (fsub f32:$FRA, f32:$FRB))]>;
+                        [(set f32:$FRT, (any_fsub f32:$FRA, f32:$FRB))]>;
   }
 }
 
@@ -3183,16 +3313,16 @@ def : Pat<(add i32:$in, (PPChi tblockaddress:$g, 0)),
           (ADDIS $in, tblockaddress:$g)>;
 
 // Support for thread-local storage.
-def PPC32GOT: PPCEmitTimePseudo<(outs gprc:$rD), (ins), "#PPC32GOT", 
+def PPC32GOT: PPCEmitTimePseudo<(outs gprc:$rD), (ins), "#PPC32GOT",
                 [(set i32:$rD, (PPCppc32GOT))]>;
 
 // Get the _GLOBAL_OFFSET_TABLE_ in PIC mode.
 // This uses two output registers, the first as the real output, the second as a
 // temporary register, used internally in code generation.
-def PPC32PICGOT: PPCEmitTimePseudo<(outs gprc:$rD, gprc:$rT), (ins), "#PPC32PICGOT", 
+def PPC32PICGOT: PPCEmitTimePseudo<(outs gprc:$rD, gprc:$rT), (ins), "#PPC32PICGOT",
                 []>, NoEncode<"$rT">;
 
-def LDgotTprelL32: PPCEmitTimePseudo<(outs gprc:$rD), (ins s16imm:$disp, gprc_nor0:$reg),
+def LDgotTprelL32: PPCEmitTimePseudo<(outs gprc_nor0:$rD), (ins s16imm:$disp, gprc_nor0:$reg),
                            "#LDgotTprelL32",
                            [(set i32:$rD,
                              (PPCldGotTprelL tglobaltlsaddr:$disp, i32:$reg))]>;
@@ -3327,15 +3457,19 @@ def : Pat<(atomic_fence (timm), (timm)), (SYNC 1)>, Requires<[HasSYNC]>;
 def : Pat<(atomic_fence (timm), (timm)), (MSYNC)>, Requires<[HasOnlyMSYNC]>;
 
 let Predicates = [HasFPU] in {
-// Additional FNMSUB patterns: -a*c + b == -(a*c - b)
-def : Pat<(fma (fneg f64:$A), f64:$C, f64:$B),
-          (FNMSUB $A, $C, $B)>;
-def : Pat<(fma f64:$A, (fneg f64:$C), f64:$B),
-          (FNMSUB $A, $C, $B)>;
-def : Pat<(fma (fneg f32:$A), f32:$C, f32:$B),
-          (FNMSUBS $A, $C, $B)>;
-def : Pat<(fma f32:$A, (fneg f32:$C), f32:$B),
-          (FNMSUBS $A, $C, $B)>;
+// Additional fnmsub patterns for custom node
+def : Pat<(PPCfnmsub f64:$A, f64:$B, f64:$C),
+          (FNMSUB $A, $B, $C)>;
+def : Pat<(PPCfnmsub f32:$A, f32:$B, f32:$C),
+          (FNMSUBS $A, $B, $C)>;
+def : Pat<(fneg (PPCfnmsub f64:$A, f64:$B, f64:$C)),
+          (FMSUB $A, $B, $C)>;
+def : Pat<(fneg (PPCfnmsub f32:$A, f32:$B, f32:$C)),
+          (FMSUBS $A, $B, $C)>;
+def : Pat<(PPCfnmsub f64:$A, f64:$B, (fneg f64:$C)),
+          (FNMADD $A, $B, $C)>;
+def : Pat<(PPCfnmsub f32:$A, f32:$B, (fneg f32:$C)),
+          (FNMADDS $A, $B, $C)>;
 
 // FCOPYSIGN's operand types need not agree.
 def : Pat<(fcopysign f64:$frB, f32:$frA),
@@ -3356,6 +3490,10 @@ def crnot : OutPatFrag<(ops node:$in),
 def       : Pat<(not i1:$in),
                 (crnot $in)>;
 
+// Prefixed instructions may require access to the above defs at a later
+// time so we include this after the def.
+include "PPCInstrPrefix.td"
+
 // Patterns for arithmetic i1 operations.
 def : Pat<(add i1:$a, i1:$b),
           (CRXOR $a, $b)>;
@@ -3535,7 +3673,7 @@ defm : ExtSetCCPat<SETEQ,
                               (RLWINM (CNTLZW $in), 27, 31, 31)>,
                    OutPatFrag<(ops node:$in),
                               (RLDICL (CNTLZD $in), 58, 63)> >;
+
 defm : ExtSetCCPat<SETNE,
                    PatFrag<(ops node:$in, node:$cc),
                            (setcc $in, 0, $cc)>,
@@ -3543,7 +3681,7 @@ defm : ExtSetCCPat<SETNE,
                               (RLWINM (i32not (CNTLZW $in)), 27, 31, 31)>,
                    OutPatFrag<(ops node:$in),
                               (RLDICL (i64not (CNTLZD $in)), 58, 63)> >;
-                 
+
 defm : ExtSetCCPat<SETLT,
                    PatFrag<(ops node:$in, node:$cc),
                            (setcc $in, 0, $cc)>,
@@ -4153,10 +4291,6 @@ def ISYNC : XLForm_2_ext<19, 150, 0, 0, 0, (outs), (ins),
 def ICBI : XForm_1a<31, 982, (outs), (ins memrr:$src),
                     "icbi $src", IIC_LdStICBI, []>;
 
-// We used to have EIEIO as value but E[0-9A-Z] is a reserved name
-def EnforceIEIO : XForm_24_eieio<31, 854, (outs), (ins),
-                           "eieio", IIC_LdStLoad, []>;
-
 def WAIT : XForm_24_sync<31, 30, (outs), (ins i32imm:$L),
                          "wait $L", IIC_LdStLoad, []>;
 
@@ -4446,17 +4580,53 @@ def DCBFx  : PPCAsmPseudo<"dcbf $dst", (ins memrr:$dst)>;
 def DCBFL  : PPCAsmPseudo<"dcbfl $dst", (ins memrr:$dst)>;
 def DCBFLP : PPCAsmPseudo<"dcbflp $dst", (ins memrr:$dst)>;
 
+def : Pat<(int_ppc_isync),  (ISYNC)>;
+def : Pat<(int_ppc_dcbfl xoaddr:$dst),
+          (DCBF 1, xoaddr:$dst)>;
+def : Pat<(int_ppc_dcbflp xoaddr:$dst),
+          (DCBF 3, xoaddr:$dst)>;
+
 def : InstAlias<"crset $bx", (CREQV crbitrc:$bx, crbitrc:$bx, crbitrc:$bx)>;
 def : InstAlias<"crclr $bx", (CRXOR crbitrc:$bx, crbitrc:$bx, crbitrc:$bx)>;
 def : InstAlias<"crmove $bx, $by", (CROR crbitrc:$bx, crbitrc:$by, crbitrc:$by)>;
 def : InstAlias<"crnot $bx, $by", (CRNOR crbitrc:$bx, crbitrc:$by, crbitrc:$by)>;
 
+def : InstAlias<"mftb $Rx", (MFTB gprc:$Rx, 268)>;
+def : InstAlias<"mftbl $Rx", (MFTB gprc:$Rx, 268)>;
+def : InstAlias<"mftbu $Rx", (MFTB gprc:$Rx, 269)>;
+
+def : InstAlias<"xnop", (XORI R0, R0, 0)>;
+
+foreach BR = 0-7 in {
+    def : InstAlias<"mfbr"#BR#" $Rx",
+                    (MFDCR gprc:$Rx, !add(BR, 0x80))>,
+                    Requires<[IsPPC4xx]>;
+    def : InstAlias<"mtbr"#BR#" $Rx",
+                    (MTDCR gprc:$Rx, !add(BR, 0x80))>,
+                    Requires<[IsPPC4xx]>;
+}
+
+def : InstAlias<"mtmsrd $RS", (MTMSRD gprc:$RS, 0)>;
+def : InstAlias<"mtmsr $RS", (MTMSR gprc:$RS, 0)>;
+
 def : InstAlias<"mtxer $Rx", (MTSPR 1, gprc:$Rx)>;
 def : InstAlias<"mfxer $Rx", (MFSPR gprc:$Rx, 1)>;
 
+def : InstAlias<"mtudscr $Rx", (MTSPR 3, gprc:$Rx)>;
+def : InstAlias<"mfudscr $Rx", (MFSPR gprc:$Rx, 3)>;
+
 def : InstAlias<"mfrtcu $Rx", (MFSPR gprc:$Rx, 4)>;
 def : InstAlias<"mfrtcl $Rx", (MFSPR gprc:$Rx, 5)>;
 
+def : InstAlias<"mtlr $Rx", (MTSPR 8, gprc:$Rx)>;
+def : InstAlias<"mflr $Rx", (MFSPR gprc:$Rx, 8)>;
+
+def : InstAlias<"mtctr $Rx", (MTSPR 9, gprc:$Rx)>;
+def : InstAlias<"mfctr $Rx", (MFSPR gprc:$Rx, 9)>;
+
+def : InstAlias<"mtuamr $Rx", (MTSPR 13, gprc:$Rx)>;
+def : InstAlias<"mfuamr $Rx", (MFSPR gprc:$Rx, 13)>;
+
 def : InstAlias<"mtdscr $Rx", (MTSPR 17, gprc:$Rx)>;
 def : InstAlias<"mfdscr $Rx", (MFSPR gprc:$Rx, 17)>;
 
@@ -4478,12 +4648,6 @@ def : InstAlias<"mfsrr0 $Rx", (MFSPR gprc:$Rx, 26)>;
 def : InstAlias<"mtsrr1 $Rx", (MTSPR 27, gprc:$Rx)>;
 def : InstAlias<"mfsrr1 $Rx", (MFSPR gprc:$Rx, 27)>;
 
-def : InstAlias<"mtsrr2 $Rx", (MTSPR 990, gprc:$Rx)>, Requires<[IsPPC4xx]>;
-def : InstAlias<"mfsrr2 $Rx", (MFSPR gprc:$Rx, 990)>, Requires<[IsPPC4xx]>;
-
-def : InstAlias<"mtsrr3 $Rx", (MTSPR 991, gprc:$Rx)>, Requires<[IsPPC4xx]>;
-def : InstAlias<"mfsrr3 $Rx", (MFSPR gprc:$Rx, 991)>, Requires<[IsPPC4xx]>;
-
 def : InstAlias<"mtcfar $Rx", (MTSPR 28, gprc:$Rx)>;
 def : InstAlias<"mfcfar $Rx", (MFSPR gprc:$Rx, 28)>;
 
@@ -4493,27 +4657,34 @@ def : InstAlias<"mfamr $Rx", (MFSPR gprc:$Rx, 29)>;
 def : InstAlias<"mtpid $Rx", (MTSPR 48, gprc:$Rx)>, Requires<[IsBookE]>;
 def : InstAlias<"mfpid $Rx", (MFSPR gprc:$Rx, 48)>, Requires<[IsBookE]>;
 
-def : InstAlias<"mftb $Rx", (MFTB gprc:$Rx, 268)>;
-def : InstAlias<"mftbl $Rx", (MFTB gprc:$Rx, 268)>;
-def : InstAlias<"mftbu $Rx", (MFTB gprc:$Rx, 269)>;
-
-def : InstAlias<"mttbl $Rx", (MTSPR 284, gprc:$Rx)>;
-def : InstAlias<"mttbu $Rx", (MTSPR 285, gprc:$Rx)>;
+foreach SPRG = 4-7 in {
+  def : InstAlias<"mfsprg $RT, "#SPRG, (MFSPR gprc:$RT, !add(SPRG, 256))>,
+                  Requires<[IsBookE]>;
+  def : InstAlias<"mfsprg"#SPRG#" $RT", (MFSPR gprc:$RT, !add(SPRG, 256))>,
+                  Requires<[IsBookE]>;
+  def : InstAlias<"mtsprg "#SPRG#", $RT", (MTSPR !add(SPRG, 256), gprc:$RT)>,
+                  Requires<[IsBookE]>;
+  def : InstAlias<"mtsprg"#SPRG#" $RT", (MTSPR !add(SPRG, 256), gprc:$RT)>,
+                  Requires<[IsBookE]>;
+}
 
-def : InstAlias<"mftblo $Rx", (MFSPR gprc:$Rx, 989)>, Requires<[IsPPC4xx]>;
-def : InstAlias<"mttblo $Rx", (MTSPR 989, gprc:$Rx)>, Requires<[IsPPC4xx]>;
-def : InstAlias<"mftbhi $Rx", (MFSPR gprc:$Rx, 988)>, Requires<[IsPPC4xx]>;
-def : InstAlias<"mttbhi $Rx", (MTSPR 988, gprc:$Rx)>, Requires<[IsPPC4xx]>;
+foreach SPRG = 0-3 in {
+  def : InstAlias<"mfsprg $RT, "#SPRG, (MFSPR gprc:$RT, !add(SPRG, 272))>;
+  def : InstAlias<"mfsprg"#SPRG#" $RT", (MFSPR gprc:$RT, !add(SPRG, 272))>;
+  def : InstAlias<"mtsprg "#SPRG#", $RT", (MTSPR !add(SPRG, 272), gprc:$RT)>;
+  def : InstAlias<"mtsprg"#SPRG#" $RT", (MTSPR !add(SPRG, 272), gprc:$RT)>;
+}
 
-def : InstAlias<"xnop", (XORI R0, R0, 0)>;
+def : InstAlias<"mfasr $RT", (MFSPR gprc:$RT, 280)>;
+def : InstAlias<"mtasr $RT", (MTSPR 280, gprc:$RT)>;
 
-def : InstAlias<"mr $rA, $rB", (OR8 g8rc:$rA, g8rc:$rB, g8rc:$rB)>;
-def : InstAlias<"mr. $rA, $rB", (OR8_rec g8rc:$rA, g8rc:$rB, g8rc:$rB)>;
+def : InstAlias<"mttbl $Rx", (MTSPR 284, gprc:$Rx)>;
+def : InstAlias<"mttbu $Rx", (MTSPR 285, gprc:$Rx)>;
 
-def : InstAlias<"not $rA, $rB", (NOR8 g8rc:$rA, g8rc:$rB, g8rc:$rB)>;
-def : InstAlias<"not. $rA, $rB", (NOR8_rec g8rc:$rA, g8rc:$rB, g8rc:$rB)>;
+def : InstAlias<"mfpvr $RT", (MFSPR gprc:$RT, 287)>;
 
-def : InstAlias<"mtcr $rA", (MTCRF8 255, g8rc:$rA)>;
+def : InstAlias<"mfspefscr $Rx", (MFSPR gprc:$Rx, 512)>;
+def : InstAlias<"mtspefscr $Rx", (MTSPR 512, gprc:$Rx)>;
 
 foreach BATR = 0-3 in {
     def : InstAlias<"mtdbatu "#BATR#", $Rx",
@@ -4542,86 +4713,36 @@ foreach BATR = 0-3 in {
                     Requires<[IsPPC6xx]>;
 }
 
-foreach BR = 0-7 in {
-    def : InstAlias<"mfbr"#BR#" $Rx",
-                    (MFDCR gprc:$Rx, !add(BR, 0x80))>,
-                    Requires<[IsPPC4xx]>;
-    def : InstAlias<"mtbr"#BR#" $Rx",
-                    (MTDCR gprc:$Rx, !add(BR, 0x80))>,
-                    Requires<[IsPPC4xx]>;
-}
-
-def : InstAlias<"mtdccr $Rx", (MTSPR 1018, gprc:$Rx)>, Requires<[IsPPC4xx]>;
-def : InstAlias<"mfdccr $Rx", (MFSPR gprc:$Rx, 1018)>, Requires<[IsPPC4xx]>;
-
-def : InstAlias<"mticcr $Rx", (MTSPR 1019, gprc:$Rx)>, Requires<[IsPPC4xx]>;
-def : InstAlias<"mficcr $Rx", (MFSPR gprc:$Rx, 1019)>, Requires<[IsPPC4xx]>;
-
-def : InstAlias<"mtdear $Rx", (MTSPR 981, gprc:$Rx)>, Requires<[IsPPC4xx]>;
-def : InstAlias<"mfdear $Rx", (MFSPR gprc:$Rx, 981)>, Requires<[IsPPC4xx]>;
+def : InstAlias<"mtppr $RT", (MTSPR 896, gprc:$RT)>;
+def : InstAlias<"mfppr $RT", (MFSPR gprc:$RT, 896)>;
 
 def : InstAlias<"mtesr $Rx", (MTSPR 980, gprc:$Rx)>, Requires<[IsPPC4xx]>;
 def : InstAlias<"mfesr $Rx", (MFSPR gprc:$Rx, 980)>, Requires<[IsPPC4xx]>;
 
-def : InstAlias<"mfspefscr $Rx", (MFSPR gprc:$Rx, 512)>;
-def : InstAlias<"mtspefscr $Rx", (MTSPR 512, gprc:$Rx)>;
+def : InstAlias<"mtdear $Rx", (MTSPR 981, gprc:$Rx)>, Requires<[IsPPC4xx]>;
+def : InstAlias<"mfdear $Rx", (MFSPR gprc:$Rx, 981)>, Requires<[IsPPC4xx]>;
 
 def : InstAlias<"mttcr $Rx", (MTSPR 986, gprc:$Rx)>, Requires<[IsPPC4xx]>;
 def : InstAlias<"mftcr $Rx", (MFSPR gprc:$Rx, 986)>, Requires<[IsPPC4xx]>;
 
-def LAx : PPCAsmPseudo<"la $rA, $addr", (ins gprc:$rA, memri:$addr)>;
-
-def SUBI : PPCAsmPseudo<"subi $rA, $rB, $imm",
-                        (ins gprc:$rA, gprc:$rB, s16imm:$imm)>;
-def SUBIS : PPCAsmPseudo<"subis $rA, $rB, $imm",
-                         (ins gprc:$rA, gprc:$rB, s16imm:$imm)>;
-def SUBIC : PPCAsmPseudo<"subic $rA, $rB, $imm",
-                         (ins gprc:$rA, gprc:$rB, s16imm:$imm)>;
-def SUBIC_rec : PPCAsmPseudo<"subic. $rA, $rB, $imm",
-                          (ins gprc:$rA, gprc:$rB, s16imm:$imm)>;
-
-def : InstAlias<"sub $rA, $rB, $rC", (SUBF8 g8rc:$rA, g8rc:$rC, g8rc:$rB)>;
-def : InstAlias<"sub. $rA, $rB, $rC", (SUBF8_rec g8rc:$rA, g8rc:$rC, g8rc:$rB)>;
-def : InstAlias<"subc $rA, $rB, $rC", (SUBFC8 g8rc:$rA, g8rc:$rC, g8rc:$rB)>;
-def : InstAlias<"subc. $rA, $rB, $rC", (SUBFC8_rec g8rc:$rA, g8rc:$rC, g8rc:$rB)>;
-
-def : InstAlias<"mtmsrd $RS", (MTMSRD gprc:$RS, 0)>;
-def : InstAlias<"mtmsr $RS", (MTMSR gprc:$RS, 0)>;
-
-def : InstAlias<"mfasr $RT", (MFSPR gprc:$RT, 280)>;
-def : InstAlias<"mtasr $RT", (MTSPR 280, gprc:$RT)>;
+def : InstAlias<"mftbhi $Rx", (MFSPR gprc:$Rx, 988)>, Requires<[IsPPC4xx]>;
+def : InstAlias<"mttbhi $Rx", (MTSPR 988, gprc:$Rx)>, Requires<[IsPPC4xx]>;
 
-foreach SPRG = 0-3 in {
-  def : InstAlias<"mfsprg $RT, "#SPRG, (MFSPR gprc:$RT, !add(SPRG, 272))>;
-  def : InstAlias<"mfsprg"#SPRG#" $RT", (MFSPR gprc:$RT, !add(SPRG, 272))>;
-  def : InstAlias<"mtsprg "#SPRG#", $RT", (MTSPR !add(SPRG, 272), gprc:$RT)>;
-  def : InstAlias<"mtsprg"#SPRG#" $RT", (MTSPR !add(SPRG, 272), gprc:$RT)>;
-}
-foreach SPRG = 4-7 in {
-  def : InstAlias<"mfsprg $RT, "#SPRG, (MFSPR gprc:$RT, !add(SPRG, 256))>,
-                  Requires<[IsBookE]>;
-  def : InstAlias<"mfsprg"#SPRG#" $RT", (MFSPR gprc:$RT, !add(SPRG, 256))>,
-                  Requires<[IsBookE]>;
-  def : InstAlias<"mtsprg "#SPRG#", $RT", (MTSPR !add(SPRG, 256), gprc:$RT)>,
-                  Requires<[IsBookE]>;
-  def : InstAlias<"mtsprg"#SPRG#" $RT", (MTSPR !add(SPRG, 256), gprc:$RT)>,
-                  Requires<[IsBookE]>;
-}
+def : InstAlias<"mftblo $Rx", (MFSPR gprc:$Rx, 989)>, Requires<[IsPPC4xx]>;
+def : InstAlias<"mttblo $Rx", (MTSPR 989, gprc:$Rx)>, Requires<[IsPPC4xx]>;
 
-def : InstAlias<"mtasr $RS", (MTSPR 280, gprc:$RS)>;
+def : InstAlias<"mtsrr2 $Rx", (MTSPR 990, gprc:$Rx)>, Requires<[IsPPC4xx]>;
+def : InstAlias<"mfsrr2 $Rx", (MFSPR gprc:$Rx, 990)>, Requires<[IsPPC4xx]>;
 
-def : InstAlias<"mfdec $RT", (MFSPR gprc:$RT, 22)>;
-def : InstAlias<"mtdec $RT", (MTSPR 22, gprc:$RT)>;
+def : InstAlias<"mtsrr3 $Rx", (MTSPR 991, gprc:$Rx)>, Requires<[IsPPC4xx]>;
+def : InstAlias<"mfsrr3 $Rx", (MFSPR gprc:$Rx, 991)>, Requires<[IsPPC4xx]>;
 
-def : InstAlias<"mfpvr $RT", (MFSPR gprc:$RT, 287)>;
+def : InstAlias<"mtdccr $Rx", (MTSPR 1018, gprc:$Rx)>, Requires<[IsPPC4xx]>;
+def : InstAlias<"mfdccr $Rx", (MFSPR gprc:$Rx, 1018)>, Requires<[IsPPC4xx]>;
 
-def : InstAlias<"mfsdr1 $RT", (MFSPR gprc:$RT, 25)>;
-def : InstAlias<"mtsdr1 $RT", (MTSPR 25, gprc:$RT)>;
+def : InstAlias<"mticcr $Rx", (MTSPR 1019, gprc:$Rx)>, Requires<[IsPPC4xx]>;
+def : InstAlias<"mficcr $Rx", (MFSPR gprc:$Rx, 1019)>, Requires<[IsPPC4xx]>;
 
-def : InstAlias<"mfsrr0 $RT", (MFSPR gprc:$RT, 26)>;
-def : InstAlias<"mfsrr1 $RT", (MFSPR gprc:$RT, 27)>;
-def : InstAlias<"mtsrr0 $RT", (MTSPR 26, gprc:$RT)>;
-def : InstAlias<"mtsrr1 $RT", (MTSPR 27, gprc:$RT)>;
 
 def : InstAlias<"tlbie $RB", (TLBIE R0, gprc:$RB)>;
 
@@ -4634,6 +4755,17 @@ def : InstAlias<"tlbwehi $RS, $A", (TLBWE2 gprc:$RS, gprc:$A, 0)>,
 def : InstAlias<"tlbwelo $RS, $A", (TLBWE2 gprc:$RS, gprc:$A, 1)>,
                 Requires<[IsPPC4xx]>;
 
+def LAx : PPCAsmPseudo<"la $rA, $addr", (ins gprc:$rA, memri:$addr)>;
+
+def SUBI : PPCAsmPseudo<"subi $rA, $rB, $imm",
+                        (ins gprc:$rA, gprc:$rB, s16imm:$imm)>;
+def SUBIS : PPCAsmPseudo<"subis $rA, $rB, $imm",
+                         (ins gprc:$rA, gprc:$rB, s16imm:$imm)>;
+def SUBIC : PPCAsmPseudo<"subic $rA, $rB, $imm",
+                         (ins gprc:$rA, gprc:$rB, s16imm:$imm)>;
+def SUBIC_rec : PPCAsmPseudo<"subic. $rA, $rB, $imm",
+                          (ins gprc:$rA, gprc:$rB, s16imm:$imm)>;
+
 def EXTLWI : PPCAsmPseudo<"extlwi $rA, $rS, $n, $b",
                           (ins gprc:$rA, gprc:$rS, u5imm:$n, u5imm:$b)>;
 def EXTLWI_rec : PPCAsmPseudo<"extlwi. $rA, $rS, $n, $b",
@@ -4671,6 +4803,13 @@ def CLRLSLWI : PPCAsmPseudo<"clrlslwi $rA, $rS, $b, $n",
 def CLRLSLWI_rec : PPCAsmPseudo<"clrlslwi. $rA, $rS, $b, $n",
                              (ins gprc:$rA, gprc:$rS, u5imm:$b, u5imm:$n)>;
 
+def : InstAlias<"isellt $rT, $rA, $rB",
+                (ISEL gprc:$rT, gprc_nor0:$rA, gprc:$rB, CR0LT)>;
+def : InstAlias<"iselgt $rT, $rA, $rB",
+                (ISEL gprc:$rT, gprc_nor0:$rA, gprc:$rB, CR0GT)>;
+def : InstAlias<"iseleq $rT, $rA, $rB",
+                (ISEL gprc:$rT, gprc_nor0:$rA, gprc:$rB, CR0EQ)>;
+
 def : InstAlias<"rotlwi $rA, $rS, $n", (RLWINM gprc:$rA, gprc:$rS, u5imm:$n, 0, 31)>;
 def : InstAlias<"rotlwi. $rA, $rS, $n", (RLWINM_rec gprc:$rA, gprc:$rS, u5imm:$n, 0, 31)>;
 def : InstAlias<"rotlw $rA, $rS, $rB", (RLWNM gprc:$rA, gprc:$rS, gprc:$rB, 0, 31)>;
@@ -4719,6 +4858,8 @@ def CLRLSLDI_rec : PPCAsmPseudo<"clrlsldi. $rA, $rS, $b, $n",
 def SUBPCIS : PPCAsmPseudo<"subpcis $RT, $D", (ins g8rc:$RT, s16imm:$D)>;
 
 def : InstAlias<"rotldi $rA, $rS, $n", (RLDICL g8rc:$rA, g8rc:$rS, u6imm:$n, 0)>;
+def : InstAlias<"rotldi $rA, $rS, $n",
+                (RLDICL_32_64 g8rc:$rA, gprc:$rS, u6imm:$n, 0)>;
 def : InstAlias<"rotldi. $rA, $rS, $n", (RLDICL_rec g8rc:$rA, g8rc:$rS, u6imm:$n, 0)>;
 def : InstAlias<"rotld $rA, $rS, $rB", (RLDCL g8rc:$rA, g8rc:$rS, gprc:$rB, 0)>;
 def : InstAlias<"rotld. $rA, $rS, $rB", (RLDCL_rec g8rc:$rA, g8rc:$rS, gprc:$rB, 0)>;
@@ -4917,6 +5058,8 @@ def : InstAlias<"cmp $bf, 1, $rA, $rB", (CMPD crrc:$bf, g8rc:$rA, g8rc:$rB)>;
 def : InstAlias<"cmpli $bf, 1, $rA, $imm", (CMPLDI crrc:$bf, g8rc:$rA, u16imm64:$imm)>;
 def : InstAlias<"cmpl $bf, 1, $rA, $rB", (CMPLD crrc:$bf, g8rc:$rA, g8rc:$rB)>;
 
+def : InstAlias<"trap", (TW 31, R0, R0)>;
+
 multiclass TrapExtendedMnemonic<string name, int to> {
   def : InstAlias<"td"#name#"i $rA, $imm", (TDI to, g8rc:$rA, s16imm:$imm)>;
   def : InstAlias<"td"#name#" $rA, $rB", (TD to, g8rc:$rA, g8rc:$rB)>;
index 044e982..ec32902 100644 (file)
@@ -34,36 +34,36 @@ class StringRef;
 
 namespace PPC {
   // -m directive values.
-  enum {
-    DIR_NONE,
-    DIR_32,
-    DIR_440,
-    DIR_601,
-    DIR_602,
-    DIR_603,
-    DIR_7400,
-    DIR_750,
-    DIR_970,
-    DIR_A2,
-    DIR_E500,
-    DIR_E500mc,
-    DIR_E5500,
-    DIR_PWR3,
-    DIR_PWR4,
-    DIR_PWR5,
-    DIR_PWR5X,
-    DIR_PWR6,
-    DIR_PWR6X,
-    DIR_PWR7,
-    DIR_PWR8,
-    DIR_PWR9,
-    DIR_PWR_FUTURE,
-    DIR_64
-  };
+enum {
+  DIR_NONE,
+  DIR_32,
+  DIR_440,
+  DIR_601,
+  DIR_602,
+  DIR_603,
+  DIR_7400,
+  DIR_750,
+  DIR_970,
+  DIR_A2,
+  DIR_E500,
+  DIR_E500mc,
+  DIR_E5500,
+  DIR_PWR3,
+  DIR_PWR4,
+  DIR_PWR5,
+  DIR_PWR5X,
+  DIR_PWR6,
+  DIR_PWR6X,
+  DIR_PWR7,
+  DIR_PWR8,
+  DIR_PWR9,
+  DIR_PWR10,
+  DIR_PWR_FUTURE,
+  DIR_64
+};
 }
 
 class GlobalValue;
-class TargetMachine;
 
 class PPCSubtarget : public PPCGenSubtargetInfo {
 public:
@@ -105,6 +105,9 @@ protected:
   bool HasP8Crypto;
   bool HasP9Vector;
   bool HasP9Altivec;
+  bool HasP10Vector;
+  bool HasPrefixInstrs;
+  bool HasPCRelativeMemops;
   bool HasFCPSGN;
   bool HasFSQRT;
   bool HasFRE, HasFRES, HasFRSQRTE, HasFRSQRTES;
@@ -126,7 +129,6 @@ protected:
   bool FeatureMFTB;
   bool AllowsUnalignedFPAccess;
   bool DeprecatedDST;
-  bool HasLazyResolverStubs;
   bool IsLittleEndian;
   bool HasICBT;
   bool HasInvariantFunctionDescriptors;
@@ -134,12 +136,17 @@ protected:
   bool HasDirectMove;
   bool HasHTM;
   bool HasFloat128;
+  bool HasFusion;
+  bool HasAddiLoadFusion;
+  bool HasAddisLoadFusion;
   bool IsISA3_0;
+  bool IsISA3_1;
   bool UseLongCalls;
   bool SecurePlt;
   bool VectorsUseTwoUnits;
   bool UsePPCPreRASchedStrategy;
   bool UsePPCPostRASchedStrategy;
+  bool PredictableSelectIsExpensive;
 
   POPCNTDKind HasPOPCNTD;
 
@@ -230,11 +237,6 @@ public:
   /// the individual condition register bits.
   bool useCRBits() const { return UseCRBits; }
 
-  /// hasLazyResolverStub - Return true if accesses to the specified global have
-  /// to go through a dyld lazy resolution stub.  This means that an extra load
-  /// is required to get the address of the global.
-  bool hasLazyResolverStub(const GlobalValue *GV) const;
-
   // isLittleEndian - True if generating little-endian code
   bool isLittleEndian() const { return IsLittleEndian; }
 
@@ -261,6 +263,9 @@ public:
   bool hasP8Crypto() const { return HasP8Crypto; }
   bool hasP9Vector() const { return HasP9Vector; }
   bool hasP9Altivec() const { return HasP9Altivec; }
+  bool hasP10Vector() const { return HasP10Vector; }
+  bool hasPrefixInstrs() const { return HasPrefixInstrs; }
+  bool hasPCRelativeMemops() const { return HasPCRelativeMemops; }
   bool hasMFOCRF() const { return HasMFOCRF; }
   bool hasISEL() const { return HasISEL; }
   bool hasBPERMD() const { return HasBPERMD; }
@@ -294,16 +299,24 @@ public:
     return Align(16);
   }
 
-  // DarwinABI has a 224-byte red zone. PPC32 SVR4ABI(Non-DarwinABI) has no
-  // red zone and PPC64 SVR4ABI has a 288-byte red zone.
   unsigned  getRedZoneSize() const {
-    return isDarwinABI() ? 224 : (isPPC64() ? 288 : 0);
+    if (isPPC64())
+      // 288 bytes = 18*8 (FPRs) + 18*8 (GPRs, GPR13 reserved)
+      return 288;
+
+    // AIX PPC32: 220 bytes = 18*8 (FPRs) + 19*4 (GPRs);
+    // PPC32 SVR4ABI has no redzone.
+    return isAIXABI() ? 220 : 0;
   }
 
   bool hasHTM() const { return HasHTM; }
   bool hasFloat128() const { return HasFloat128; }
   bool isISA3_0() const { return IsISA3_0; }
+  bool isISA3_1() const { return IsISA3_1; }
   bool useLongCalls() const { return UseLongCalls; }
+  bool hasFusion() const { return HasFusion; }
+  bool hasAddiLoadFusion() const { return HasAddiLoadFusion; }
+  bool hasAddisLoadFusion() const { return HasAddisLoadFusion; }
   bool needsSwapsForVSXMemOps() const {
     return hasVSX() && isLittleEndian() && !hasP9Vector();
   }
@@ -312,8 +325,6 @@ public:
 
   const Triple &getTargetTriple() const { return TargetTriple; }
 
-  /// isDarwin - True if this is any darwin platform.
-  bool isDarwin() const { return TargetTriple.isMacOSX(); }
   /// isBGQ - True if this is a BG/Q platform.
   bool isBGQ() const { return TargetTriple.getVendor() == Triple::BGQ; }
 
@@ -321,13 +332,13 @@ public:
   bool isTargetMachO() const { return TargetTriple.isOSBinFormatMachO(); }
   bool isTargetLinux() const { return TargetTriple.isOSLinux(); }
 
-  bool isDarwinABI() const { return isTargetMachO() || isDarwin(); }
   bool isAIXABI() const { return TargetTriple.isOSAIX(); }
-  bool isSVR4ABI() const { return !isDarwinABI() && !isAIXABI(); }
+  bool isSVR4ABI() const { return !isAIXABI(); }
   bool isELFv2ABI() const;
 
   bool is64BitELFABI() const { return  isSVR4ABI() && isPPC64(); }
   bool is32BitELFABI() const { return  isSVR4ABI() && !isPPC64(); }
+  bool isUsingPCRelativeCalls() const;
 
   /// Originally, this function return hasISEL(). Now we always enable it,
   /// but may expand the ISEL instruction later.
@@ -389,6 +400,10 @@ public:
   }
 
   bool isXRaySupported() const override { return IsPPC64 && IsLittleEndian; }
+
+  bool isPredictableSelectIsExpensive() const {
+    return PredictableSelectIsExpensive;
+  }
 };
 } // End llvm namespace
 
index f15f9c7..faaa189 100644 (file)
@@ -216,6 +216,8 @@ static PPCTargetMachine::PPCABI computeTargetABI(const Triple &TT,
   case Triple::ppc64le:
     return PPCTargetMachine::PPC_ABI_ELFv2;
   case Triple::ppc64:
+    if (TT.isOSOpenBSD())
+      return PPCTargetMachine::PPC_ABI_ELFv2;
     return PPCTargetMachine::PPC_ABI_ELFv1;
   default:
     return PPCTargetMachine::PPC_ABI_UNKNOWN;
index 116352e..249b742 100644 (file)
@@ -3111,6 +3111,11 @@ SparcTargetLowering::EmitInstrWithCustomInserter(MachineInstr &MI,
   case SP::SELECT_CC_DFP_ICC:
   case SP::SELECT_CC_QFP_ICC:
     return expandSelectCC(MI, BB, SP::BCOND);
+  case SP::SELECT_CC_Int_XCC:
+  case SP::SELECT_CC_FP_XCC:
+  case SP::SELECT_CC_DFP_XCC:
+  case SP::SELECT_CC_QFP_XCC:
+    return expandSelectCC(MI, BB, SP::BPXCC);
   case SP::SELECT_CC_Int_FCC:
   case SP::SELECT_CC_FP_FCC:
   case SP::SELECT_CC_DFP_FCC:
index 9a200a3..59c1a95 100644 (file)
@@ -336,6 +336,7 @@ def FMOVD_XCC : F4_3<0b110101, 0b000010, (outs DFPRegs:$rd),
                       "fmovd$cond %xcc, $rs2, $rd",
                       [(set f64:$rd,
                        (SPselectxcc f64:$rs2, f64:$f, imm:$cond))]>;
+let Predicates = [Is64Bit, HasHardQuad] in
 def FMOVQ_XCC : F4_3<0b110101, 0b000011, (outs QFPRegs:$rd),
                       (ins QFPRegs:$rs2, QFPRegs:$f, CCOp:$cond),
                       "fmovq$cond %xcc, $rs2, $rd",
@@ -436,11 +437,11 @@ def FXTOD : F3_3u<2, 0b110100, 0b010001000,
                  (outs DFPRegs:$rd), (ins DFPRegs:$rs2),
                  "fxtod $rs2, $rd",
                  [(set DFPRegs:$rd, (SPxtof DFPRegs:$rs2))]>;
+let Predicates = [Is64Bit, HasHardQuad] in
 def FXTOQ : F3_3u<2, 0b110100, 0b010001100,
                  (outs QFPRegs:$rd), (ins DFPRegs:$rs2),
                  "fxtoq $rs2, $rd",
-                 [(set QFPRegs:$rd, (SPxtof DFPRegs:$rs2))]>,
-                 Requires<[HasHardQuad]>;
+                 [(set QFPRegs:$rd, (SPxtof DFPRegs:$rs2))]>;
 
 def FSTOX : F3_3u<2, 0b110100, 0b010000001,
                  (outs DFPRegs:$rd), (ins FPRegs:$rs2),
@@ -450,11 +451,11 @@ def FDTOX : F3_3u<2, 0b110100, 0b010000010,
                  (outs DFPRegs:$rd), (ins DFPRegs:$rs2),
                  "fdtox $rs2, $rd",
                  [(set DFPRegs:$rd, (SPftox DFPRegs:$rs2))]>;
+let Predicates = [Is64Bit, HasHardQuad] in
 def FQTOX : F3_3u<2, 0b110100, 0b010000011,
                  (outs DFPRegs:$rd), (ins QFPRegs:$rs2),
                  "fqtox $rs2, $rd",
-                 [(set DFPRegs:$rd, (SPftox QFPRegs:$rs2))]>,
-                 Requires<[HasHardQuad]>;
+                 [(set DFPRegs:$rd, (SPftox QFPRegs:$rs2))]>;
 
 } // Predicates = [Is64Bit]
 
index 8b01313..999325a 100644 (file)
@@ -468,6 +468,27 @@ let Uses = [ICC], usesCustomInserter = 1 in {
             [(set f128:$dst, (SPselecticc f128:$T, f128:$F, imm:$Cond))]>;
 }
 
+let Uses = [ICC], usesCustomInserter = 1 in {
+  def SELECT_CC_Int_XCC
+   : Pseudo<(outs IntRegs:$dst), (ins IntRegs:$T, IntRegs:$F, i32imm:$Cond),
+            "; SELECT_CC_Int_XCC PSEUDO!",
+            [(set i32:$dst, (SPselectxcc i32:$T, i32:$F, imm:$Cond))]>;
+  def SELECT_CC_FP_XCC
+   : Pseudo<(outs FPRegs:$dst), (ins FPRegs:$T, FPRegs:$F, i32imm:$Cond),
+            "; SELECT_CC_FP_XCC PSEUDO!",
+            [(set f32:$dst, (SPselectxcc f32:$T, f32:$F, imm:$Cond))]>;
+
+  def SELECT_CC_DFP_XCC
+   : Pseudo<(outs DFPRegs:$dst), (ins DFPRegs:$T, DFPRegs:$F, i32imm:$Cond),
+            "; SELECT_CC_DFP_XCC PSEUDO!",
+            [(set f64:$dst, (SPselectxcc f64:$T, f64:$F, imm:$Cond))]>;
+
+  def SELECT_CC_QFP_XCC
+   : Pseudo<(outs QFPRegs:$dst), (ins QFPRegs:$T, QFPRegs:$F, i32imm:$Cond),
+            "; SELECT_CC_QFP_XCC PSEUDO!",
+            [(set f128:$dst, (SPselectxcc f128:$T, f128:$F, imm:$Cond))]>;
+}
+
 let usesCustomInserter = 1, Uses = [FCC0] in {
 
   def SELECT_CC_Int_FCC
@@ -1391,12 +1412,12 @@ let Predicates = [HasV9], Constraints = "$f = $rd" in {
                (ins DFPRegs:$rs2, DFPRegs:$f, CCOp:$cond),
                "fmovd$cond %icc, $rs2, $rd",
                [(set f64:$rd, (SPselecticc f64:$rs2, f64:$f, imm:$cond))]>;
+    let Predicates = [HasV9, HasHardQuad] in
     def FMOVQ_ICC
       : F4_3<0b110101, 0b000011, (outs QFPRegs:$rd),
                (ins QFPRegs:$rs2, QFPRegs:$f, CCOp:$cond),
                "fmovq$cond %icc, $rs2, $rd",
-               [(set f128:$rd, (SPselecticc f128:$rs2, f128:$f, imm:$cond))]>,
-               Requires<[HasHardQuad]>;
+               [(set f128:$rd, (SPselecticc f128:$rs2, f128:$f, imm:$cond))]>;
   }
 
   let Uses = [FCC0], intcc = 0, opf_cc = 0b00 in {
@@ -1410,12 +1431,12 @@ let Predicates = [HasV9], Constraints = "$f = $rd" in {
              (ins DFPRegs:$rs2, DFPRegs:$f, CCOp:$cond),
              "fmovd$cond %fcc0, $rs2, $rd",
              [(set f64:$rd, (SPselectfcc f64:$rs2, f64:$f, imm:$cond))]>;
+    let Predicates = [HasV9, HasHardQuad] in
     def FMOVQ_FCC
       : F4_3<0b110101, 0b000011, (outs QFPRegs:$rd),
              (ins QFPRegs:$rs2, QFPRegs:$f, CCOp:$cond),
              "fmovq$cond %fcc0, $rs2, $rd",
-             [(set f128:$rd, (SPselectfcc f128:$rs2, f128:$f, imm:$cond))]>,
-             Requires<[HasHardQuad]>;
+             [(set f128:$rd, (SPselectfcc f128:$rs2, f128:$f, imm:$cond))]>;
   }
 
 }
@@ -1425,28 +1446,28 @@ let Predicates = [HasV9] in {
   def FMOVD : F3_3u<2, 0b110100, 0b000000010,
                    (outs DFPRegs:$rd), (ins DFPRegs:$rs2),
                    "fmovd $rs2, $rd", []>;
+  let Predicates = [HasV9, HasHardQuad] in
   def FMOVQ : F3_3u<2, 0b110100, 0b000000011,
                    (outs QFPRegs:$rd), (ins QFPRegs:$rs2),
-                   "fmovq $rs2, $rd", []>,
-                   Requires<[HasHardQuad]>;
+                   "fmovq $rs2, $rd", []>;
   def FNEGD : F3_3u<2, 0b110100, 0b000000110,
                    (outs DFPRegs:$rd), (ins DFPRegs:$rs2),
                    "fnegd $rs2, $rd",
                    [(set f64:$rd, (fneg f64:$rs2))]>;
+  let Predicates = [HasV9, HasHardQuad] in
   def FNEGQ : F3_3u<2, 0b110100, 0b000000111,
                    (outs QFPRegs:$rd), (ins QFPRegs:$rs2),
                    "fnegq $rs2, $rd",
-                   [(set f128:$rd, (fneg f128:$rs2))]>,
-                   Requires<[HasHardQuad]>;
+                   [(set f128:$rd, (fneg f128:$rs2))]>;
   def FABSD : F3_3u<2, 0b110100, 0b000001010,
                    (outs DFPRegs:$rd), (ins DFPRegs:$rs2),
                    "fabsd $rs2, $rd",
                    [(set f64:$rd, (fabs f64:$rs2))]>;
+  let Predicates = [HasV9, HasHardQuad] in
   def FABSQ : F3_3u<2, 0b110100, 0b000001011,
                    (outs QFPRegs:$rd), (ins QFPRegs:$rs2),
                    "fabsq $rs2, $rd",
-                   [(set f128:$rd, (fabs f128:$rs2))]>,
-                   Requires<[HasHardQuad]>;
+                   [(set f128:$rd, (fabs f128:$rs2))]>;
 }
 
 // Floating-point compare instruction with %fcc0-%fcc3.
@@ -1493,11 +1514,11 @@ let Predicates = [HasV9] in {
       : F4_3<0b110101, 0b000010, (outs DFPRegs:$rd),
              (ins FCCRegs:$opf_cc, DFPRegs:$rs2, DFPRegs:$f, CCOp:$cond),
              "fmovd$cond $opf_cc, $rs2, $rd", []>;
+    let Predicates = [HasV9, HasHardQuad] in
     def V9FMOVQ_FCC
       : F4_3<0b110101, 0b000011, (outs QFPRegs:$rd),
              (ins FCCRegs:$opf_cc, QFPRegs:$rs2, QFPRegs:$f, CCOp:$cond),
-             "fmovq$cond $opf_cc, $rs2, $rd", []>,
-             Requires<[HasHardQuad]>;
+             "fmovq$cond $opf_cc, $rs2, $rd", []>;
   } // Constraints = "$f = $rd", ...
 } // let Predicates = [hasV9]
 
diff --git a/gnu/llvm/llvm/lib/Target/VE/InstPrinter/CMakeLists.txt b/gnu/llvm/llvm/lib/Target/VE/InstPrinter/CMakeLists.txt
deleted file mode 100644 (file)
index 7ddeebb..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-add_llvm_component_library(LLVMVEAsmPrinter
-  VEInstPrinter.cpp
-  )
diff --git a/gnu/llvm/llvm/lib/Target/VE/InstPrinter/LLVMBuild.txt b/gnu/llvm/llvm/lib/Target/VE/InstPrinter/LLVMBuild.txt
deleted file mode 100644 (file)
index 8cfaea7..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-;===- ./lib/Target/VE/InstPrinter/LLVMBuild.txt ----------------*- Conf -*--===;
-;
-; Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-; See https://llvm.org/LICENSE.txt for license information.
-; SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-;
-;===------------------------------------------------------------------------===;
-;
-; This is an LLVMBuild description file for the components in this subdirectory.
-;
-; For more information on the LLVMBuild system, please see:
-;
-;   http://llvm.org/docs/LLVMBuild.html
-;
-;===------------------------------------------------------------------------===;
-
-[component_0]
-type = Library
-name = VEAsmPrinter
-parent = VE
-required_libraries = MC Support
-add_to_library_groups = VE
diff --git a/gnu/llvm/llvm/lib/Target/VE/InstPrinter/VEInstPrinter.cpp b/gnu/llvm/llvm/lib/Target/VE/InstPrinter/VEInstPrinter.cpp
deleted file mode 100644 (file)
index 4e7bcd3..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-//===-- VEInstPrinter.cpp - Convert VE MCInst to assembly syntax -----------==//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This class prints an VE MCInst to a .s file.
-//
-//===----------------------------------------------------------------------===//
-
-#include "VEInstPrinter.h"
-#include "VE.h"
-#include "llvm/MC/MCExpr.h"
-#include "llvm/MC/MCInst.h"
-#include "llvm/MC/MCRegisterInfo.h"
-#include "llvm/MC/MCSubtargetInfo.h"
-#include "llvm/MC/MCSymbol.h"
-#include "llvm/Support/raw_ostream.h"
-
-using namespace llvm;
-
-#define DEBUG_TYPE "ve-asmprinter"
-
-// The generated AsmMatcher VEGenAsmWriter uses "VE" as the target
-// namespace.
-namespace llvm {
-namespace VE {
-using namespace VE;
-}
-} // namespace llvm
-
-#define GET_INSTRUCTION_NAME
-#define PRINT_ALIAS_INSTR
-#include "VEGenAsmWriter.inc"
-
-void VEInstPrinter::printRegName(raw_ostream &OS, unsigned RegNo) const {
-  OS << '%' << StringRef(getRegisterName(RegNo)).lower();
-}
-
-void VEInstPrinter::printInst(const MCInst *MI, uint64_t Address,
-                              StringRef Annot, const MCSubtargetInfo &STI,
-                              raw_ostream &OS) {
-  if (!printAliasInstr(MI, STI, OS))
-    printInstruction(MI, Address, STI, OS);
-  printAnnotation(OS, Annot);
-}
-
-void VEInstPrinter::printOperand(const MCInst *MI, int opNum,
-                                 const MCSubtargetInfo &STI, raw_ostream &O) {
-  const MCOperand &MO = MI->getOperand(opNum);
-
-  if (MO.isReg()) {
-    printRegName(O, MO.getReg());
-    return;
-  }
-
-  if (MO.isImm()) {
-    switch (MI->getOpcode()) {
-    default:
-      // Expects signed 32bit literals
-      assert(isInt<32>(MO.getImm()) && "Immediate too large");
-      int32_t TruncatedImm = static_cast<int32_t>(MO.getImm());
-      O << TruncatedImm;
-      return;
-    }
-  }
-
-  assert(MO.isExpr() && "Unknown operand kind in printOperand");
-  MO.getExpr()->print(O, &MAI);
-}
-
-void VEInstPrinter::printMemASXOperand(const MCInst *MI, int opNum,
-                                       const MCSubtargetInfo &STI,
-                                       raw_ostream &O, const char *Modifier) {
-  // If this is an ADD operand, emit it like normal operands.
-  if (Modifier && !strcmp(Modifier, "arith")) {
-    printOperand(MI, opNum, STI, O);
-    O << ", ";
-    printOperand(MI, opNum + 1, STI, O);
-    return;
-  }
-
-  const MCOperand &MO = MI->getOperand(opNum + 1);
-  if (!MO.isImm() || MO.getImm() != 0) {
-    printOperand(MI, opNum + 1, STI, O);
-  }
-  O << "(,";
-  printOperand(MI, opNum, STI, O);
-  O << ")";
-}
-
-void VEInstPrinter::printMemASOperand(const MCInst *MI, int opNum,
-                                      const MCSubtargetInfo &STI,
-                                      raw_ostream &O, const char *Modifier) {
-  // If this is an ADD operand, emit it like normal operands.
-  if (Modifier && !strcmp(Modifier, "arith")) {
-    printOperand(MI, opNum, STI, O);
-    O << ", ";
-    printOperand(MI, opNum + 1, STI, O);
-    return;
-  }
-
-  const MCOperand &MO = MI->getOperand(opNum + 1);
-  if (!MO.isImm() || MO.getImm() != 0) {
-    printOperand(MI, opNum + 1, STI, O);
-  }
-  O << "(";
-  printOperand(MI, opNum, STI, O);
-  O << ")";
-}
-
-void VEInstPrinter::printCCOperand(const MCInst *MI, int opNum,
-                                   const MCSubtargetInfo &STI, raw_ostream &O) {
-  int CC = (int)MI->getOperand(opNum).getImm();
-  O << VECondCodeToString((VECC::CondCodes)CC);
-}
diff --git a/gnu/llvm/llvm/lib/Target/VE/InstPrinter/VEInstPrinter.h b/gnu/llvm/llvm/lib/Target/VE/InstPrinter/VEInstPrinter.h
deleted file mode 100644 (file)
index 05a53d5..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-//===-- VEInstPrinter.h - Convert VE MCInst to assembly syntax ------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This class prints an VE MCInst to a .s file.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_LIB_TARGET_VE_INSTPRINTER_VEINSTPRINTER_H
-#define LLVM_LIB_TARGET_VE_INSTPRINTER_VEINSTPRINTER_H
-
-#include "llvm/MC/MCInstPrinter.h"
-
-namespace llvm {
-
-class VEInstPrinter : public MCInstPrinter {
-public:
-  VEInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII,
-                const MCRegisterInfo &MRI)
-      : MCInstPrinter(MAI, MII, MRI) {}
-
-  void printRegName(raw_ostream &OS, unsigned RegNo) const override;
-  void printInst(const MCInst *MI, uint64_t Address, StringRef Annot,
-                 const MCSubtargetInfo &STI, raw_ostream &OS) override;
-
-  // Autogenerated by tblgen.
-  bool printAliasInstr(const MCInst *, const MCSubtargetInfo &, raw_ostream &);
-  void printInstruction(const MCInst *, uint64_t, const MCSubtargetInfo &,
-                        raw_ostream &);
-  static const char *getRegisterName(unsigned RegNo);
-
-  void printOperand(const MCInst *MI, int opNum, const MCSubtargetInfo &STI,
-                    raw_ostream &OS);
-  void printMemASXOperand(const MCInst *MI, int opNum,
-                          const MCSubtargetInfo &STI, raw_ostream &OS,
-                          const char *Modifier = nullptr);
-  void printMemASOperand(const MCInst *MI, int opNum,
-                         const MCSubtargetInfo &STI, raw_ostream &OS,
-                         const char *Modifier = nullptr);
-  void printCCOperand(const MCInst *MI, int opNum, const MCSubtargetInfo &STI,
-                      raw_ostream &OS);
-};
-} // namespace llvm
-
-#endif
diff --git a/gnu/llvm/llvm/lib/Target/WebAssembly/WebAssemblyCallIndirectFixup.cpp b/gnu/llvm/llvm/lib/Target/WebAssembly/WebAssemblyCallIndirectFixup.cpp
deleted file mode 100644 (file)
index 2537e60..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-//===-- WebAssemblyCallIndirectFixup.cpp - Fix call_indirects -------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-///
-/// \file
-/// This file converts pseudo call_indirect instructions into real
-/// call_indirects.
-///
-/// The order of arguments for a call_indirect is the arguments to the function
-/// call, followed by the function pointer. There's no natural way to express
-/// a machineinstr with varargs followed by one more arg, so we express it as
-/// the function pointer followed by varargs, then rewrite it here.
-///
-/// We need to rewrite the order of the arguments on the machineinstrs
-/// themselves so that register stackification knows the order they'll be
-/// executed in.
-///
-//===----------------------------------------------------------------------===//
-
-#include "MCTargetDesc/WebAssemblyMCTargetDesc.h" // for WebAssembly::ARGUMENT_*
-#include "WebAssembly.h"
-#include "WebAssemblyMachineFunctionInfo.h"
-#include "WebAssemblySubtarget.h"
-#include "llvm/Analysis/AliasAnalysis.h"
-#include "llvm/CodeGen/LiveIntervals.h"
-#include "llvm/CodeGen/MachineBlockFrequencyInfo.h"
-#include "llvm/CodeGen/MachineDominators.h"
-#include "llvm/CodeGen/MachineInstrBuilder.h"
-#include "llvm/CodeGen/MachineRegisterInfo.h"
-#include "llvm/CodeGen/Passes.h"
-#include "llvm/Support/Debug.h"
-#include "llvm/Support/raw_ostream.h"
-using namespace llvm;
-
-#define DEBUG_TYPE "wasm-call-indirect-fixup"
-
-namespace {
-class WebAssemblyCallIndirectFixup final : public MachineFunctionPass {
-  StringRef getPassName() const override {
-    return "WebAssembly CallIndirect Fixup";
-  }
-
-  bool runOnMachineFunction(MachineFunction &MF) override;
-
-public:
-  static char ID; // Pass identification, replacement for typeid
-  WebAssemblyCallIndirectFixup() : MachineFunctionPass(ID) {}
-};
-} // end anonymous namespace
-
-char WebAssemblyCallIndirectFixup::ID = 0;
-INITIALIZE_PASS(WebAssemblyCallIndirectFixup, DEBUG_TYPE,
-                "Rewrite call_indirect argument orderings", false, false)
-
-FunctionPass *llvm::createWebAssemblyCallIndirectFixup() {
-  return new WebAssemblyCallIndirectFixup();
-}
-
-static unsigned getNonPseudoCallIndirectOpcode(const MachineInstr &MI) {
-  switch (MI.getOpcode()) {
-    using namespace WebAssembly;
-  case PCALL_INDIRECT_VOID:
-    return CALL_INDIRECT_VOID;
-  case PCALL_INDIRECT_i32:
-    return CALL_INDIRECT_i32;
-  case PCALL_INDIRECT_i64:
-    return CALL_INDIRECT_i64;
-  case PCALL_INDIRECT_f32:
-    return CALL_INDIRECT_f32;
-  case PCALL_INDIRECT_f64:
-    return CALL_INDIRECT_f64;
-  case PCALL_INDIRECT_v16i8:
-    return CALL_INDIRECT_v16i8;
-  case PCALL_INDIRECT_v8i16:
-    return CALL_INDIRECT_v8i16;
-  case PCALL_INDIRECT_v4i32:
-    return CALL_INDIRECT_v4i32;
-  case PCALL_INDIRECT_v2i64:
-    return CALL_INDIRECT_v2i64;
-  case PCALL_INDIRECT_v4f32:
-    return CALL_INDIRECT_v4f32;
-  case PCALL_INDIRECT_v2f64:
-    return CALL_INDIRECT_v2f64;
-  case PCALL_INDIRECT_exnref:
-    return CALL_INDIRECT_exnref;
-  case PRET_CALL_INDIRECT:
-    return RET_CALL_INDIRECT;
-  default:
-    return INSTRUCTION_LIST_END;
-  }
-}
-
-static bool isPseudoCallIndirect(const MachineInstr &MI) {
-  return getNonPseudoCallIndirectOpcode(MI) !=
-         WebAssembly::INSTRUCTION_LIST_END;
-}
-
-bool WebAssemblyCallIndirectFixup::runOnMachineFunction(MachineFunction &MF) {
-  LLVM_DEBUG(dbgs() << "********** Fixing up CALL_INDIRECTs **********\n"
-                    << "********** Function: " << MF.getName() << '\n');
-
-  bool Changed = false;
-  const WebAssemblyInstrInfo *TII =
-      MF.getSubtarget<WebAssemblySubtarget>().getInstrInfo();
-
-  for (MachineBasicBlock &MBB : MF) {
-    for (MachineInstr &MI : MBB) {
-      if (isPseudoCallIndirect(MI)) {
-        LLVM_DEBUG(dbgs() << "Found call_indirect: " << MI << '\n');
-
-        // Rewrite pseudo to non-pseudo
-        const MCInstrDesc &Desc = TII->get(getNonPseudoCallIndirectOpcode(MI));
-        MI.setDesc(Desc);
-
-        // Rewrite argument order
-        SmallVector<MachineOperand, 8> Ops;
-
-        // Set up a placeholder for the type signature immediate.
-        Ops.push_back(MachineOperand::CreateImm(0));
-
-        // Set up the flags immediate, which currently has no defined flags
-        // so it's always zero.
-        Ops.push_back(MachineOperand::CreateImm(0));
-
-        for (const MachineOperand &MO :
-             make_range(MI.operands_begin() + MI.getDesc().getNumDefs() + 1,
-                        MI.operands_begin() + MI.getNumExplicitOperands()))
-          Ops.push_back(MO);
-        Ops.push_back(MI.getOperand(MI.getDesc().getNumDefs()));
-
-        // Replace the instructions operands.
-        while (MI.getNumOperands() > MI.getDesc().getNumDefs())
-          MI.RemoveOperand(MI.getNumOperands() - 1);
-        for (const MachineOperand &MO : Ops)
-          MI.addOperand(MO);
-
-        LLVM_DEBUG(dbgs() << "  After transform: " << MI);
-        Changed = true;
-      }
-    }
-  }
-
-  LLVM_DEBUG(dbgs() << "\nDone fixing up CALL_INDIRECTs\n\n");
-
-  return Changed;
-}
index 729934b..d09328d 100644 (file)
@@ -34,6 +34,7 @@ set(sources
   X86ExpandPseudo.cpp
   X86FastISel.cpp
   X86FixupBWInsts.cpp
+  X86FixupGadgets.cpp
   X86FixupLEAs.cpp
   X86AvoidStoreForwardingBlocks.cpp
   X86FixupSetCC.cpp
@@ -62,6 +63,7 @@ set(sources
   X86PartialReduction.cpp
   X86RegisterBankInfo.cpp
   X86RegisterInfo.cpp
+  X86ReturnProtectorLowering.cpp
   X86SelectionDAGInfo.cpp
   X86ShuffleDecodeConstantPool.cpp
   X86SpeculativeLoadHardening.cpp
index bf3b6bc..52757fd 100644 (file)
@@ -1071,57 +1071,23 @@ void X86AsmBackend::finishLayout(MCAssembler const &Asm,
 /// bytes.
 /// \return - true on success, false on failure
 bool X86AsmBackend::writeNopData(raw_ostream &OS, uint64_t Count) const {
-  static const char Nops[10][11] = {
-    // nop
-    "\x90",
-    // xchg %ax,%ax
-    "\x66\x90",
-    // nopl (%[re]ax)
-    "\x0f\x1f\x00",
-    // nopl 0(%[re]ax)
-    "\x0f\x1f\x40\x00",
-    // nopl 0(%[re]ax,%[re]ax,1)
-    "\x0f\x1f\x44\x00\x00",
-    // nopw 0(%[re]ax,%[re]ax,1)
-    "\x66\x0f\x1f\x44\x00\x00",
-    // nopl 0L(%[re]ax)
-    "\x0f\x1f\x80\x00\x00\x00\x00",
-    // nopl 0L(%[re]ax,%[re]ax,1)
-    "\x0f\x1f\x84\x00\x00\x00\x00\x00",
-    // nopw 0L(%[re]ax,%[re]ax,1)
-    "\x66\x0f\x1f\x84\x00\x00\x00\x00\x00",
-    // nopw %cs:0L(%[re]ax,%[re]ax,1)
-    "\x66\x2e\x0f\x1f\x84\x00\x00\x00\x00\x00",
-  };
 
-  // This CPU doesn't support long nops. If needed add more.
-  // FIXME: We could generated something better than plain 0x90.
-  if (!STI.hasFeature(X86::FeatureNOPL) && !STI.hasFeature(X86::Mode64Bit)) {
-    for (uint64_t i = 0; i < Count; ++i)
-      OS << '\x90';
-    return true;
-  }
-
-  // 15-bytes is the longest single NOP instruction, but 10-bytes is
-  // commonly the longest that can be efficiently decoded.
-  uint64_t MaxNopLength = 10;
-  if (STI.getFeatureBits()[X86::FeatureFast7ByteNOP])
-    MaxNopLength = 7;
-  else if (STI.getFeatureBits()[X86::FeatureFast15ByteNOP])
-    MaxNopLength = 15;
-  else if (STI.getFeatureBits()[X86::FeatureFast11ByteNOP])
-    MaxNopLength = 11;
-
-  // Emit as many MaxNopLength NOPs as needed, then emit a NOP of the remaining
-  // length.
+  // Write 1 or 2 byte NOP sequences, or a longer trapsled, until
+  // we have written Count bytes
   do {
-    const uint8_t ThisNopLength = (uint8_t) std::min(Count, MaxNopLength);
-    const uint8_t Prefixes = ThisNopLength <= 10 ? 0 : ThisNopLength - 10;
-    for (uint8_t i = 0; i < Prefixes; i++)
-      OS << '\x66';
-    const uint8_t Rest = ThisNopLength - Prefixes;
-    if (Rest != 0)
-      OS.write(Nops[Rest - 1], Rest);
+    const uint8_t ThisNopLength = (uint8_t) std::min(Count, (uint64_t)127);
+    switch (ThisNopLength) {
+      case 0: break;
+      case 1: OS << '\x90';
+              break;
+      case 2: OS << '\x66';
+              OS << '\x90';
+              break;
+      default: OS << '\xEB';
+               OS << (uint8_t)(ThisNopLength - 2);
+               for(uint8_t i = 2; i < ThisNopLength; ++i)
+                 OS << '\xCC';
+    }
     Count -= ThisNopLength;
   } while (Count != 0);
 
diff --git a/gnu/llvm/llvm/lib/Target/X86/Utils/CMakeLists.txt b/gnu/llvm/llvm/lib/Target/X86/Utils/CMakeLists.txt
deleted file mode 100644 (file)
index f32ead3..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-add_llvm_component_library(LLVMX86Utils
-  X86ShuffleDecode.cpp
-  )
diff --git a/gnu/llvm/llvm/lib/Target/X86/Utils/LLVMBuild.txt b/gnu/llvm/llvm/lib/Target/X86/Utils/LLVMBuild.txt
deleted file mode 100644 (file)
index 6460c48..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-;===- ./lib/Target/X86/Utils/LLVMBuild.txt ---------------------*- Conf -*--===;
-;
-; Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-; See https://llvm.org/LICENSE.txt for license information.
-; SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-;
-;===------------------------------------------------------------------------===;
-;
-; This is an LLVMBuild description file for the components in this subdirectory.
-;
-; For more information on the LLVMBuild system, please see:
-;
-;   http://llvm.org/docs/LLVMBuild.html
-;
-;===------------------------------------------------------------------------===;
-
-[component_0]
-type = Library
-name = X86Utils
-parent = X86
-required_libraries = Support
-add_to_library_groups = X86
diff --git a/gnu/llvm/llvm/lib/Target/X86/Utils/X86ShuffleDecode.cpp b/gnu/llvm/llvm/lib/Target/X86/Utils/X86ShuffleDecode.cpp
deleted file mode 100644 (file)
index 48fd3e0..0000000
+++ /dev/null
@@ -1,588 +0,0 @@
-//===-- X86ShuffleDecode.cpp - X86 shuffle decode logic -------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// Define several functions to decode x86 specific shuffle semantics into a
-// generic vector mask.
-//
-//===----------------------------------------------------------------------===//
-
-#include "X86ShuffleDecode.h"
-#include "llvm/ADT/ArrayRef.h"
-
-//===----------------------------------------------------------------------===//
-//  Vector Mask Decoding
-//===----------------------------------------------------------------------===//
-
-namespace llvm {
-
-void DecodeINSERTPSMask(unsigned Imm, SmallVectorImpl<int> &ShuffleMask) {
-  // Defaults the copying the dest value.
-  ShuffleMask.push_back(0);
-  ShuffleMask.push_back(1);
-  ShuffleMask.push_back(2);
-  ShuffleMask.push_back(3);
-
-  // Decode the immediate.
-  unsigned ZMask = Imm & 15;
-  unsigned CountD = (Imm >> 4) & 3;
-  unsigned CountS = (Imm >> 6) & 3;
-
-  // CountS selects which input element to use.
-  unsigned InVal = 4 + CountS;
-  // CountD specifies which element of destination to update.
-  ShuffleMask[CountD] = InVal;
-  // ZMask zaps values, potentially overriding the CountD elt.
-  if (ZMask & 1) ShuffleMask[0] = SM_SentinelZero;
-  if (ZMask & 2) ShuffleMask[1] = SM_SentinelZero;
-  if (ZMask & 4) ShuffleMask[2] = SM_SentinelZero;
-  if (ZMask & 8) ShuffleMask[3] = SM_SentinelZero;
-}
-
-void DecodeInsertElementMask(unsigned NumElts, unsigned Idx, unsigned Len,
-                             SmallVectorImpl<int> &ShuffleMask) {
-  assert((Idx + Len) <= NumElts && "Insertion out of range");
-
-  for (unsigned i = 0; i != NumElts; ++i)
-    ShuffleMask.push_back(i);
-  for (unsigned i = 0; i != Len; ++i)
-    ShuffleMask[Idx + i] = NumElts + i;
-}
-
-// <3,1> or <6,7,2,3>
-void DecodeMOVHLPSMask(unsigned NElts, SmallVectorImpl<int> &ShuffleMask) {
-  for (unsigned i = NElts / 2; i != NElts; ++i)
-    ShuffleMask.push_back(NElts + i);
-
-  for (unsigned i = NElts / 2; i != NElts; ++i)
-    ShuffleMask.push_back(i);
-}
-
-// <0,2> or <0,1,4,5>
-void DecodeMOVLHPSMask(unsigned NElts, SmallVectorImpl<int> &ShuffleMask) {
-  for (unsigned i = 0; i != NElts / 2; ++i)
-    ShuffleMask.push_back(i);
-
-  for (unsigned i = 0; i != NElts / 2; ++i)
-    ShuffleMask.push_back(NElts + i);
-}
-
-void DecodeMOVSLDUPMask(unsigned NumElts, SmallVectorImpl<int> &ShuffleMask) {
-  for (int i = 0, e = NumElts / 2; i < e; ++i) {
-    ShuffleMask.push_back(2 * i);
-    ShuffleMask.push_back(2 * i);
-  }
-}
-
-void DecodeMOVSHDUPMask(unsigned NumElts, SmallVectorImpl<int> &ShuffleMask) {
-  for (int i = 0, e = NumElts / 2; i < e; ++i) {
-    ShuffleMask.push_back(2 * i + 1);
-    ShuffleMask.push_back(2 * i + 1);
-  }
-}
-
-void DecodeMOVDDUPMask(unsigned NumElts, SmallVectorImpl<int> &ShuffleMask) {
-  const unsigned NumLaneElts = 2;
-
-  for (unsigned l = 0; l < NumElts; l += NumLaneElts)
-    for (unsigned i = 0; i < NumLaneElts; ++i)
-      ShuffleMask.push_back(l);
-}
-
-void DecodePSLLDQMask(unsigned NumElts, unsigned Imm,
-                      SmallVectorImpl<int> &ShuffleMask) {
-  const unsigned NumLaneElts = 16;
-
-  for (unsigned l = 0; l < NumElts; l += NumLaneElts)
-    for (unsigned i = 0; i < NumLaneElts; ++i) {
-      int M = SM_SentinelZero;
-      if (i >= Imm) M = i - Imm + l;
-      ShuffleMask.push_back(M);
-    }
-}
-
-void DecodePSRLDQMask(unsigned NumElts, unsigned Imm,
-                      SmallVectorImpl<int> &ShuffleMask) {
-  const unsigned NumLaneElts = 16;
-
-  for (unsigned l = 0; l < NumElts; l += NumLaneElts)
-    for (unsigned i = 0; i < NumLaneElts; ++i) {
-      unsigned Base = i + Imm;
-      int M = Base + l;
-      if (Base >= NumLaneElts) M = SM_SentinelZero;
-      ShuffleMask.push_back(M);
-    }
-}
-
-void DecodePALIGNRMask(unsigned NumElts, unsigned Imm,
-                       SmallVectorImpl<int> &ShuffleMask) {
-  const unsigned NumLaneElts = 16;
-
-  for (unsigned l = 0; l != NumElts; l += NumLaneElts) {
-    for (unsigned i = 0; i != NumLaneElts; ++i) {
-      unsigned Base = i + Imm;
-      // if i+imm is out of this lane then we actually need the other source
-      if (Base >= NumLaneElts) Base += NumElts - NumLaneElts;
-      ShuffleMask.push_back(Base + l);
-    }
-  }
-}
-
-void DecodeVALIGNMask(unsigned NumElts, unsigned Imm,
-                      SmallVectorImpl<int> &ShuffleMask) {
-  // Not all bits of the immediate are used so mask it.
-  assert(isPowerOf2_32(NumElts) && "NumElts should be power of 2");
-  Imm = Imm & (NumElts - 1);
-  for (unsigned i = 0; i != NumElts; ++i)
-    ShuffleMask.push_back(i + Imm);
-}
-
-/// DecodePSHUFMask - This decodes the shuffle masks for pshufw, pshufd, and vpermilp*.
-/// VT indicates the type of the vector allowing it to handle different
-/// datatypes and vector widths.
-void DecodePSHUFMask(unsigned NumElts, unsigned ScalarBits, unsigned Imm,
-                     SmallVectorImpl<int> &ShuffleMask) {
-  unsigned Size = NumElts * ScalarBits;
-  unsigned NumLanes = Size / 128;
-  if (NumLanes == 0) NumLanes = 1;  // Handle MMX
-  unsigned NumLaneElts = NumElts / NumLanes;
-
-  uint32_t SplatImm = (Imm & 0xff) * 0x01010101;
-  for (unsigned l = 0; l != NumElts; l += NumLaneElts) {
-    for (unsigned i = 0; i != NumLaneElts; ++i) {
-      ShuffleMask.push_back(SplatImm % NumLaneElts + l);
-      SplatImm /= NumLaneElts;
-    }
-  }
-}
-
-void DecodePSHUFHWMask(unsigned NumElts, unsigned Imm,
-                       SmallVectorImpl<int> &ShuffleMask) {
-  for (unsigned l = 0; l != NumElts; l += 8) {
-    unsigned NewImm = Imm;
-    for (unsigned i = 0, e = 4; i != e; ++i) {
-      ShuffleMask.push_back(l + i);
-    }
-    for (unsigned i = 4, e = 8; i != e; ++i) {
-      ShuffleMask.push_back(l + 4 + (NewImm & 3));
-      NewImm >>= 2;
-    }
-  }
-}
-
-void DecodePSHUFLWMask(unsigned NumElts, unsigned Imm,
-                       SmallVectorImpl<int> &ShuffleMask) {
-  for (unsigned l = 0; l != NumElts; l += 8) {
-    unsigned NewImm = Imm;
-    for (unsigned i = 0, e = 4; i != e; ++i) {
-      ShuffleMask.push_back(l + (NewImm & 3));
-      NewImm >>= 2;
-    }
-    for (unsigned i = 4, e = 8; i != e; ++i) {
-      ShuffleMask.push_back(l + i);
-    }
-  }
-}
-
-void DecodePSWAPMask(unsigned NumElts, SmallVectorImpl<int> &ShuffleMask) {
-  unsigned NumHalfElts = NumElts / 2;
-
-  for (unsigned l = 0; l != NumHalfElts; ++l)
-    ShuffleMask.push_back(l + NumHalfElts);
-  for (unsigned h = 0; h != NumHalfElts; ++h)
-    ShuffleMask.push_back(h);
-}
-
-/// DecodeSHUFPMask - This decodes the shuffle masks for shufp*. VT indicates
-/// the type of the vector allowing it to handle different datatypes and vector
-/// widths.
-void DecodeSHUFPMask(unsigned NumElts, unsigned ScalarBits,
-                     unsigned Imm, SmallVectorImpl<int> &ShuffleMask) {
-  unsigned NumLaneElts = 128 / ScalarBits;
-
-  unsigned NewImm = Imm;
-  for (unsigned l = 0; l != NumElts; l += NumLaneElts) {
-    // each half of a lane comes from different source
-    for (unsigned s = 0; s != NumElts * 2; s += NumElts) {
-      for (unsigned i = 0; i != NumLaneElts / 2; ++i) {
-        ShuffleMask.push_back(NewImm % NumLaneElts + s + l);
-        NewImm /= NumLaneElts;
-      }
-    }
-    if (NumLaneElts == 4) NewImm = Imm; // reload imm
-  }
-}
-
-/// DecodeUNPCKHMask - This decodes the shuffle masks for unpckhps/unpckhpd
-/// and punpckh*. VT indicates the type of the vector allowing it to handle
-/// different datatypes and vector widths.
-void DecodeUNPCKHMask(unsigned NumElts, unsigned ScalarBits,
-                      SmallVectorImpl<int> &ShuffleMask) {
-  // Handle 128 and 256-bit vector lengths. AVX defines UNPCK* to operate
-  // independently on 128-bit lanes.
-  unsigned NumLanes = (NumElts * ScalarBits) / 128;
-  if (NumLanes == 0) NumLanes = 1;  // Handle MMX
-  unsigned NumLaneElts = NumElts / NumLanes;
-
-  for (unsigned l = 0; l != NumElts; l += NumLaneElts) {
-    for (unsigned i = l + NumLaneElts / 2, e = l + NumLaneElts; i != e; ++i) {
-      ShuffleMask.push_back(i);           // Reads from dest/src1
-      ShuffleMask.push_back(i + NumElts); // Reads from src/src2
-    }
-  }
-}
-
-/// DecodeUNPCKLMask - This decodes the shuffle masks for unpcklps/unpcklpd
-/// and punpckl*. VT indicates the type of the vector allowing it to handle
-/// different datatypes and vector widths.
-void DecodeUNPCKLMask(unsigned NumElts, unsigned ScalarBits,
-                      SmallVectorImpl<int> &ShuffleMask) {
-  // Handle 128 and 256-bit vector lengths. AVX defines UNPCK* to operate
-  // independently on 128-bit lanes.
-  unsigned NumLanes = (NumElts * ScalarBits) / 128;
-  if (NumLanes == 0 ) NumLanes = 1;  // Handle MMX
-  unsigned NumLaneElts = NumElts / NumLanes;
-
-  for (unsigned l = 0; l != NumElts; l += NumLaneElts) {
-    for (unsigned i = l, e = l + NumLaneElts / 2; i != e; ++i) {
-      ShuffleMask.push_back(i);           // Reads from dest/src1
-      ShuffleMask.push_back(i + NumElts); // Reads from src/src2
-    }
-  }
-}
-
-/// Decodes a broadcast of the first element of a vector.
-void DecodeVectorBroadcast(unsigned NumElts,
-                           SmallVectorImpl<int> &ShuffleMask) {
-  ShuffleMask.append(NumElts, 0);
-}
-
-/// Decodes a broadcast of a subvector to a larger vector type.
-void DecodeSubVectorBroadcast(unsigned DstNumElts, unsigned SrcNumElts,
-                              SmallVectorImpl<int> &ShuffleMask) {
-  unsigned Scale = DstNumElts / SrcNumElts;
-
-  for (unsigned i = 0; i != Scale; ++i)
-    for (unsigned j = 0; j != SrcNumElts; ++j)
-      ShuffleMask.push_back(j);
-}
-
-/// Decode a shuffle packed values at 128-bit granularity
-/// (SHUFF32x4/SHUFF64x2/SHUFI32x4/SHUFI64x2)
-/// immediate mask into a shuffle mask.
-void decodeVSHUF64x2FamilyMask(unsigned NumElts, unsigned ScalarSize,
-                               unsigned Imm,
-                               SmallVectorImpl<int> &ShuffleMask) {
-  unsigned NumElementsInLane = 128 / ScalarSize;
-  unsigned NumLanes = NumElts / NumElementsInLane;
-
-  for (unsigned l = 0; l != NumElts; l += NumElementsInLane) {
-    unsigned Index = (Imm % NumLanes) * NumElementsInLane;
-    Imm /= NumLanes; // Discard the bits we just used.
-    // We actually need the other source.
-    if (l >= (NumElts / 2))
-      Index += NumElts;
-    for (unsigned i = 0; i != NumElementsInLane; ++i)
-      ShuffleMask.push_back(Index + i);
-  }
-}
-
-void DecodeVPERM2X128Mask(unsigned NumElts, unsigned Imm,
-                          SmallVectorImpl<int> &ShuffleMask) {
-  unsigned HalfSize = NumElts / 2;
-
-  for (unsigned l = 0; l != 2; ++l) {
-    unsigned HalfMask = Imm >> (l * 4);
-    unsigned HalfBegin = (HalfMask & 0x3) * HalfSize;
-    for (unsigned i = HalfBegin, e = HalfBegin + HalfSize; i != e; ++i)
-      ShuffleMask.push_back((HalfMask & 8) ? SM_SentinelZero : (int)i);
-  }
-}
-
-void DecodePSHUFBMask(ArrayRef<uint64_t> RawMask, const APInt &UndefElts,
-                      SmallVectorImpl<int> &ShuffleMask) {
-  for (int i = 0, e = RawMask.size(); i < e; ++i) {
-    uint64_t M = RawMask[i];
-    if (UndefElts[i]) {
-      ShuffleMask.push_back(SM_SentinelUndef);
-      continue;
-    }
-    // For 256/512-bit vectors the base of the shuffle is the 128-bit
-    // subvector we're inside.
-    int Base = (i / 16) * 16;
-    // If the high bit (7) of the byte is set, the element is zeroed.
-    if (M & (1 << 7))
-      ShuffleMask.push_back(SM_SentinelZero);
-    else {
-      // Only the least significant 4 bits of the byte are used.
-      int Index = Base + (M & 0xf);
-      ShuffleMask.push_back(Index);
-    }
-  }
-}
-
-void DecodeBLENDMask(unsigned NumElts, unsigned Imm,
-                     SmallVectorImpl<int> &ShuffleMask) {
-  for (unsigned i = 0; i < NumElts; ++i) {
-    // If there are more than 8 elements in the vector, then any immediate blend
-    // mask wraps around.
-    unsigned Bit = i % 8;
-    ShuffleMask.push_back(((Imm >> Bit) & 1) ? NumElts + i : i);
-  }
-}
-
-void DecodeVPPERMMask(ArrayRef<uint64_t> RawMask, const APInt &UndefElts,
-                      SmallVectorImpl<int> &ShuffleMask) {
-  assert(RawMask.size() == 16 && "Illegal VPPERM shuffle mask size");
-
-  // VPPERM Operation
-  // Bits[4:0] - Byte Index (0 - 31)
-  // Bits[7:5] - Permute Operation
-  //
-  // Permute Operation:
-  // 0 - Source byte (no logical operation).
-  // 1 - Invert source byte.
-  // 2 - Bit reverse of source byte.
-  // 3 - Bit reverse of inverted source byte.
-  // 4 - 00h (zero - fill).
-  // 5 - FFh (ones - fill).
-  // 6 - Most significant bit of source byte replicated in all bit positions.
-  // 7 - Invert most significant bit of source byte and replicate in all bit positions.
-  for (int i = 0, e = RawMask.size(); i < e; ++i) {
-    if (UndefElts[i]) {
-      ShuffleMask.push_back(SM_SentinelUndef);
-      continue;
-    }
-
-    uint64_t M = RawMask[i];
-    uint64_t PermuteOp = (M >> 5) & 0x7;
-    if (PermuteOp == 4) {
-      ShuffleMask.push_back(SM_SentinelZero);
-      continue;
-    }
-    if (PermuteOp != 0) {
-      ShuffleMask.clear();
-      return;
-    }
-
-    uint64_t Index = M & 0x1F;
-    ShuffleMask.push_back((int)Index);
-  }
-}
-
-/// DecodeVPERMMask - this decodes the shuffle masks for VPERMQ/VPERMPD.
-void DecodeVPERMMask(unsigned NumElts, unsigned Imm,
-                     SmallVectorImpl<int> &ShuffleMask) {
-  for (unsigned l = 0; l != NumElts; l += 4)
-    for (unsigned i = 0; i != 4; ++i)
-      ShuffleMask.push_back(l + ((Imm >> (2 * i)) & 3));
-}
-
-void DecodeZeroExtendMask(unsigned SrcScalarBits, unsigned DstScalarBits,
-                          unsigned NumDstElts, bool IsAnyExtend,
-                          SmallVectorImpl<int> &Mask) {
-  unsigned Scale = DstScalarBits / SrcScalarBits;
-  assert(SrcScalarBits < DstScalarBits &&
-         "Expected zero extension mask to increase scalar size");
-
-  for (unsigned i = 0; i != NumDstElts; i++) {
-    Mask.push_back(i);
-    for (unsigned j = 1; j != Scale; j++)
-      Mask.push_back(IsAnyExtend ? SM_SentinelUndef : SM_SentinelZero);
-  }
-}
-
-void DecodeZeroMoveLowMask(unsigned NumElts,
-                           SmallVectorImpl<int> &ShuffleMask) {
-  ShuffleMask.push_back(0);
-  for (unsigned i = 1; i < NumElts; i++)
-    ShuffleMask.push_back(SM_SentinelZero);
-}
-
-void DecodeScalarMoveMask(unsigned NumElts, bool IsLoad,
-                          SmallVectorImpl<int> &Mask) {
-  // First element comes from the first element of second source.
-  // Remaining elements: Load zero extends / Move copies from first source.
-  Mask.push_back(NumElts);
-  for (unsigned i = 1; i < NumElts; i++)
-    Mask.push_back(IsLoad ? static_cast<int>(SM_SentinelZero) : i);
-}
-
-void DecodeEXTRQIMask(unsigned NumElts, unsigned EltSize, int Len, int Idx,
-                      SmallVectorImpl<int> &ShuffleMask) {
-  unsigned HalfElts = NumElts / 2;
-
-  // Only the bottom 6 bits are valid for each immediate.
-  Len &= 0x3F;
-  Idx &= 0x3F;
-
-  // We can only decode this bit extraction instruction as a shuffle if both the
-  // length and index work with whole elements.
-  if (0 != (Len % EltSize) || 0 != (Idx % EltSize))
-    return;
-
-  // A length of zero is equivalent to a bit length of 64.
-  if (Len == 0)
-    Len = 64;
-
-  // If the length + index exceeds the bottom 64 bits the result is undefined.
-  if ((Len + Idx) > 64) {
-    ShuffleMask.append(NumElts, SM_SentinelUndef);
-    return;
-  }
-
-  // Convert index and index to work with elements.
-  Len /= EltSize;
-  Idx /= EltSize;
-
-  // EXTRQ: Extract Len elements starting from Idx. Zero pad the remaining
-  // elements of the lower 64-bits. The upper 64-bits are undefined.
-  for (int i = 0; i != Len; ++i)
-    ShuffleMask.push_back(i + Idx);
-  for (int i = Len; i != (int)HalfElts; ++i)
-    ShuffleMask.push_back(SM_SentinelZero);
-  for (int i = HalfElts; i != (int)NumElts; ++i)
-    ShuffleMask.push_back(SM_SentinelUndef);
-}
-
-void DecodeINSERTQIMask(unsigned NumElts, unsigned EltSize, int Len, int Idx,
-                        SmallVectorImpl<int> &ShuffleMask) {
-  unsigned HalfElts = NumElts / 2;
-
-  // Only the bottom 6 bits are valid for each immediate.
-  Len &= 0x3F;
-  Idx &= 0x3F;
-
-  // We can only decode this bit insertion instruction as a shuffle if both the
-  // length and index work with whole elements.
-  if (0 != (Len % EltSize) || 0 != (Idx % EltSize))
-    return;
-
-  // A length of zero is equivalent to a bit length of 64.
-  if (Len == 0)
-    Len = 64;
-
-  // If the length + index exceeds the bottom 64 bits the result is undefined.
-  if ((Len + Idx) > 64) {
-    ShuffleMask.append(NumElts, SM_SentinelUndef);
-    return;
-  }
-
-  // Convert index and index to work with elements.
-  Len /= EltSize;
-  Idx /= EltSize;
-
-  // INSERTQ: Extract lowest Len elements from lower half of second source and
-  // insert over first source starting at Idx element. The upper 64-bits are
-  // undefined.
-  for (int i = 0; i != Idx; ++i)
-    ShuffleMask.push_back(i);
-  for (int i = 0; i != Len; ++i)
-    ShuffleMask.push_back(i + NumElts);
-  for (int i = Idx + Len; i != (int)HalfElts; ++i)
-    ShuffleMask.push_back(i);
-  for (int i = HalfElts; i != (int)NumElts; ++i)
-    ShuffleMask.push_back(SM_SentinelUndef);
-}
-
-void DecodeVPERMILPMask(unsigned NumElts, unsigned ScalarBits,
-                        ArrayRef<uint64_t> RawMask, const APInt &UndefElts,
-                        SmallVectorImpl<int> &ShuffleMask) {
-  unsigned VecSize = NumElts * ScalarBits;
-  unsigned NumLanes = VecSize / 128;
-  unsigned NumEltsPerLane = NumElts / NumLanes;
-  assert((VecSize == 128 || VecSize == 256 || VecSize == 512) &&
-         "Unexpected vector size");
-  assert((ScalarBits == 32 || ScalarBits == 64) && "Unexpected element size");
-
-  for (unsigned i = 0, e = RawMask.size(); i < e; ++i) {
-    if (UndefElts[i]) {
-      ShuffleMask.push_back(SM_SentinelUndef);
-      continue;
-    }
-    uint64_t M = RawMask[i];
-    M = (ScalarBits == 64 ? ((M >> 1) & 0x1) : (M & 0x3));
-    unsigned LaneOffset = i & ~(NumEltsPerLane - 1);
-    ShuffleMask.push_back((int)(LaneOffset + M));
-  }
-}
-
-void DecodeVPERMIL2PMask(unsigned NumElts, unsigned ScalarBits, unsigned M2Z,
-                         ArrayRef<uint64_t> RawMask, const APInt &UndefElts,
-                         SmallVectorImpl<int> &ShuffleMask) {
-  unsigned VecSize = NumElts * ScalarBits;
-  unsigned NumLanes = VecSize / 128;
-  unsigned NumEltsPerLane = NumElts / NumLanes;
-  assert((VecSize == 128 || VecSize == 256) && "Unexpected vector size");
-  assert((ScalarBits == 32 || ScalarBits == 64) && "Unexpected element size");
-  assert((NumElts == RawMask.size()) && "Unexpected mask size");
-
-  for (unsigned i = 0, e = RawMask.size(); i < e; ++i) {
-    if (UndefElts[i]) {
-      ShuffleMask.push_back(SM_SentinelUndef);
-      continue;
-    }
-
-    // VPERMIL2 Operation.
-    // Bits[3] - Match Bit.
-    // Bits[2:1] - (Per Lane) PD Shuffle Mask.
-    // Bits[2:0] - (Per Lane) PS Shuffle Mask.
-    uint64_t Selector = RawMask[i];
-    unsigned MatchBit = (Selector >> 3) & 0x1;
-
-    // M2Z[0:1]     MatchBit
-    //   0Xb           X        Source selected by Selector index.
-    //   10b           0        Source selected by Selector index.
-    //   10b           1        Zero.
-    //   11b           0        Zero.
-    //   11b           1        Source selected by Selector index.
-    if ((M2Z & 0x2) != 0 && MatchBit != (M2Z & 0x1)) {
-      ShuffleMask.push_back(SM_SentinelZero);
-      continue;
-    }
-
-    int Index = i & ~(NumEltsPerLane - 1);
-    if (ScalarBits == 64)
-      Index += (Selector >> 1) & 0x1;
-    else
-      Index += Selector & 0x3;
-
-    int Src = (Selector >> 2) & 0x1;
-    Index += Src * NumElts;
-    ShuffleMask.push_back(Index);
-  }
-}
-
-void DecodeVPERMVMask(ArrayRef<uint64_t> RawMask, const APInt &UndefElts,
-                      SmallVectorImpl<int> &ShuffleMask) {
-  uint64_t EltMaskSize = RawMask.size() - 1;
-  for (int i = 0, e = RawMask.size(); i != e; ++i) {
-    if (UndefElts[i]) {
-      ShuffleMask.push_back(SM_SentinelUndef);
-      continue;
-    }
-    uint64_t M = RawMask[i];
-    M &= EltMaskSize;
-    ShuffleMask.push_back((int)M);
-  }
-}
-
-void DecodeVPERMV3Mask(ArrayRef<uint64_t> RawMask, const APInt &UndefElts,
-                      SmallVectorImpl<int> &ShuffleMask) {
-  uint64_t EltMaskSize = (RawMask.size() * 2) - 1;
-  for (int i = 0, e = RawMask.size(); i != e; ++i) {
-    if (UndefElts[i]) {
-      ShuffleMask.push_back(SM_SentinelUndef);
-      continue;
-    }
-    uint64_t M = RawMask[i];
-    M &= EltMaskSize;
-    ShuffleMask.push_back((int)M);
-  }
-}
-
-} // llvm namespace
diff --git a/gnu/llvm/llvm/lib/Target/X86/Utils/X86ShuffleDecode.h b/gnu/llvm/llvm/lib/Target/X86/Utils/X86ShuffleDecode.h
deleted file mode 100644 (file)
index f527850..0000000
+++ /dev/null
@@ -1,176 +0,0 @@
-//===-- X86ShuffleDecode.h - X86 shuffle decode logic -----------*-C++-*---===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// Define several functions to decode x86 specific shuffle semantics into a
-// generic vector mask.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_LIB_TARGET_X86_UTILS_X86SHUFFLEDECODE_H
-#define LLVM_LIB_TARGET_X86_UTILS_X86SHUFFLEDECODE_H
-
-#include "llvm/ADT/APInt.h"
-#include "llvm/ADT/SmallVector.h"
-
-//===----------------------------------------------------------------------===//
-//  Vector Mask Decoding
-//===----------------------------------------------------------------------===//
-
-namespace llvm {
-template <typename T> class ArrayRef;
-
-enum { SM_SentinelUndef = -1, SM_SentinelZero = -2 };
-
-/// Decode a 128-bit INSERTPS instruction as a v4f32 shuffle mask.
-void DecodeINSERTPSMask(unsigned Imm, SmallVectorImpl<int> &ShuffleMask);
-
-// Insert the bottom Len elements from a second source into a vector starting at
-// element Idx.
-void DecodeInsertElementMask(unsigned NumElts, unsigned Idx, unsigned Len,
-                             SmallVectorImpl<int> &ShuffleMask);
-
-/// Decode a MOVHLPS instruction as a v2f64/v4f32 shuffle mask.
-/// i.e. <3,1> or <6,7,2,3>
-void DecodeMOVHLPSMask(unsigned NElts, SmallVectorImpl<int> &ShuffleMask);
-
-/// Decode a MOVLHPS instruction as a v2f64/v4f32 shuffle mask.
-/// i.e. <0,2> or <0,1,4,5>
-void DecodeMOVLHPSMask(unsigned NElts, SmallVectorImpl<int> &ShuffleMask);
-
-void DecodeMOVSLDUPMask(unsigned NumElts, SmallVectorImpl<int> &ShuffleMask);
-
-void DecodeMOVSHDUPMask(unsigned NumElts, SmallVectorImpl<int> &ShuffleMask);
-
-void DecodeMOVDDUPMask(unsigned NumElts, SmallVectorImpl<int> &ShuffleMask);
-
-void DecodePSLLDQMask(unsigned NumElts, unsigned Imm,
-                      SmallVectorImpl<int> &ShuffleMask);
-
-void DecodePSRLDQMask(unsigned NumElts, unsigned Imm,
-                      SmallVectorImpl<int> &ShuffleMask);
-
-void DecodePALIGNRMask(unsigned NumElts, unsigned Imm,
-                       SmallVectorImpl<int> &ShuffleMask);
-
-void DecodeVALIGNMask(unsigned NumElts, unsigned Imm,
-                      SmallVectorImpl<int> &ShuffleMask);
-
-/// Decodes the shuffle masks for pshufd/pshufw/vpermilpd/vpermilps.
-/// VT indicates the type of the vector allowing it to handle different
-/// datatypes and vector widths.
-void DecodePSHUFMask(unsigned NumElts, unsigned ScalarBits, unsigned Imm,
-                     SmallVectorImpl<int> &ShuffleMask);
-
-/// Decodes the shuffle masks for pshufhw.
-/// VT indicates the type of the vector allowing it to handle different
-/// datatypes and vector widths.
-void DecodePSHUFHWMask(unsigned NumElts, unsigned Imm,
-                       SmallVectorImpl<int> &ShuffleMask);
-
-/// Decodes the shuffle masks for pshuflw.
-/// VT indicates the type of the vector allowing it to handle different
-/// datatypes and vector widths.
-void DecodePSHUFLWMask(unsigned NumElts, unsigned Imm,
-                       SmallVectorImpl<int> &ShuffleMask);
-
-/// Decodes a PSWAPD 3DNow! instruction.
-void DecodePSWAPMask(unsigned NumElts, SmallVectorImpl<int> &ShuffleMask);
-
-/// Decodes the shuffle masks for shufp*.
-/// VT indicates the type of the vector allowing it to handle different
-/// datatypes and vector widths.
-void DecodeSHUFPMask(unsigned NumElts, unsigned ScalarBits, unsigned Imm,
-                     SmallVectorImpl<int> &ShuffleMask);
-
-/// Decodes the shuffle masks for unpckhps/unpckhpd and punpckh*.
-/// VT indicates the type of the vector allowing it to handle different
-/// datatypes and vector widths.
-void DecodeUNPCKHMask(unsigned NumElts, unsigned ScalarBits,
-                      SmallVectorImpl<int> &ShuffleMask);
-
-/// Decodes the shuffle masks for unpcklps/unpcklpd and punpckl*.
-/// VT indicates the type of the vector allowing it to handle different
-/// datatypes and vector widths.
-void DecodeUNPCKLMask(unsigned NumElts, unsigned ScalarBits,
-                      SmallVectorImpl<int> &ShuffleMask);
-
-/// Decodes a broadcast of the first element of a vector.
-void DecodeVectorBroadcast(unsigned NumElts, SmallVectorImpl<int> &ShuffleMask);
-
-/// Decodes a broadcast of a subvector to a larger vector type.
-void DecodeSubVectorBroadcast(unsigned DstNumElts, unsigned SrcNumElts,
-                              SmallVectorImpl<int> &ShuffleMask);
-
-/// Decode a PSHUFB mask from a raw array of constants such as from
-/// BUILD_VECTOR.
-void DecodePSHUFBMask(ArrayRef<uint64_t> RawMask, const APInt &UndefElts,
-                      SmallVectorImpl<int> &ShuffleMask);
-
-/// Decode a BLEND immediate mask into a shuffle mask.
-void DecodeBLENDMask(unsigned NumElts, unsigned Imm,
-                     SmallVectorImpl<int> &ShuffleMask);
-
-void DecodeVPERM2X128Mask(unsigned NumElts, unsigned Imm,
-                          SmallVectorImpl<int> &ShuffleMask);
-
-/// Decode a shuffle packed values at 128-bit granularity
-/// immediate mask into a shuffle mask.
-void decodeVSHUF64x2FamilyMask(unsigned NumElts, unsigned ScalarSize,
-                               unsigned Imm, SmallVectorImpl<int> &ShuffleMask);
-
-/// Decodes the shuffle masks for VPERMQ/VPERMPD.
-void DecodeVPERMMask(unsigned NumElts, unsigned Imm,
-                     SmallVectorImpl<int> &ShuffleMask);
-
-/// Decode a VPPERM mask from a raw array of constants such as from
-/// BUILD_VECTOR.
-/// This can only basic masks (permutes + zeros), not any of the other
-/// operations that VPPERM can perform.
-void DecodeVPPERMMask(ArrayRef<uint64_t> RawMask, const APInt &UndefElts,
-                      SmallVectorImpl<int> &ShuffleMask);
-
-/// Decode a zero extension instruction as a shuffle mask.
-void DecodeZeroExtendMask(unsigned SrcScalarBits, unsigned DstScalarBits,
-                          unsigned NumDstElts, bool IsAnyExtend,
-                          SmallVectorImpl<int> &ShuffleMask);
-
-/// Decode a move lower and zero upper instruction as a shuffle mask.
-void DecodeZeroMoveLowMask(unsigned NumElts, SmallVectorImpl<int> &ShuffleMask);
-
-/// Decode a scalar float move instruction as a shuffle mask.
-void DecodeScalarMoveMask(unsigned NumElts, bool IsLoad,
-                          SmallVectorImpl<int> &ShuffleMask);
-
-/// Decode a SSE4A EXTRQ instruction as a shuffle mask.
-void DecodeEXTRQIMask(unsigned NumElts, unsigned EltSize, int Len, int Idx,
-                      SmallVectorImpl<int> &ShuffleMask);
-
-/// Decode a SSE4A INSERTQ instruction as a shuffle mask.
-void DecodeINSERTQIMask(unsigned NumElts, unsigned EltSize, int Len, int Idx,
-                        SmallVectorImpl<int> &ShuffleMask);
-
-/// Decode a VPERMILPD/VPERMILPS variable mask from a raw array of constants.
-void DecodeVPERMILPMask(unsigned NumElts, unsigned ScalarBits,
-                        ArrayRef<uint64_t> RawMask, const APInt &UndefElts,
-                        SmallVectorImpl<int> &ShuffleMask);
-
-/// Decode a VPERMIL2PD/VPERMIL2PS variable mask from a raw array of constants.
-void DecodeVPERMIL2PMask(unsigned NumElts, unsigned ScalarBits, unsigned M2Z,
-                         ArrayRef<uint64_t> RawMask, const APInt &UndefElts,
-                         SmallVectorImpl<int> &ShuffleMask);
-
-/// Decode a VPERM W/D/Q/PS/PD mask from a raw array of constants.
-void DecodeVPERMVMask(ArrayRef<uint64_t> RawMask, const APInt &UndefElts,
-                      SmallVectorImpl<int> &ShuffleMask);
-
-/// Decode a VPERMT2 W/D/Q/PS/PD mask from a raw array of constants.
-void DecodeVPERMV3Mask(ArrayRef<uint64_t> RawMask, const APInt &UndefElts,
-                      SmallVectorImpl<int> &ShuffleMask);
-} // llvm namespace
-
-#endif
index 91ba4e3..9fa21ee 100644 (file)
@@ -113,6 +113,10 @@ FunctionPass *createX86FixupBWInsts();
 /// to another, when profitable.
 FunctionPass *createX86DomainReassignmentPass();
 
+/// Return a Machine Function pass that attempts to replace
+/// ROP friendly instructions with alternatives.
+FunctionPass *createX86FixupGadgetsPass();
+
 /// This pass replaces EVEX encoded of AVX-512 instructiosn by VEX
 /// encoding when possible in order to reduce code size.
 FunctionPass *createX86EvexToVexInsts();
index dc1ff72..ee6e8ad 100644 (file)
@@ -313,6 +313,9 @@ def FeatureLZCNTFalseDeps : SubtargetFeature<"false-deps-lzcnt-tzcnt",
                                      "LZCNT/TZCNT have a false dependency on dest register">;
 def FeaturePCONFIG : SubtargetFeature<"pconfig", "HasPCONFIG", "true",
                                       "platform configuration instruction">;
+def FeatureSaveArgs
+    : SubtargetFeature<"save-args", "SaveArgs", "true",
+                       "Save register arguments on the stack.">;
 // On recent X86 (port bound) processors, its preferable to combine to a single shuffle
 // using a variable mask over multiple fixed shuffles.
 def FeatureFastVariableShuffle
index eb485fa..7b8edb4 100644 (file)
@@ -128,6 +128,8 @@ public:
 
   void emitInstruction(const MachineInstr *MI) override;
 
+  void emitTrapToAlignment(Align Alignment) const override;
+
   void emitBasicBlockEnd(const MachineBasicBlock &MBB) override {
     AsmPrinter::emitBasicBlockEnd(MBB);
     SMShadowTracker.emitShadowPadding(*OutStreamer, getSubtargetInfo());
index db6b686..1cbad6b 100644 (file)
@@ -14,6 +14,7 @@
 #include "X86InstrBuilder.h"
 #include "X86InstrInfo.h"
 #include "X86MachineFunctionInfo.h"
+#include "X86ReturnProtectorLowering.h"
 #include "X86Subtarget.h"
 #include "X86TargetMachine.h"
 #include "llvm/ADT/SmallSet.h"
@@ -45,7 +46,7 @@ X86FrameLowering::X86FrameLowering(const X86Subtarget &STI,
                                    MaybeAlign StackAlignOverride)
     : TargetFrameLowering(StackGrowsDown, StackAlignOverride.valueOrOne(),
                           STI.is64Bit() ? -8 : -4),
-      STI(STI), TII(*STI.getInstrInfo()), TRI(STI.getRegisterInfo()) {
+      STI(STI), TII(*STI.getInstrInfo()), TRI(STI.getRegisterInfo()), RPL() {
   // Cache a bunch of frame-related predicates for this subtarget.
   SlotSize = TRI->getSlotSize();
   Is64Bit = STI.is64Bit();
@@ -53,6 +54,7 @@ X86FrameLowering::X86FrameLowering(const X86Subtarget &STI,
   // standard x86_64 and NaCl use 64-bit frame/stack pointers, x32 - 32-bit.
   Uses64BitFramePtr = STI.isTarget64BitLP64() || STI.isTargetNaCl64();
   StackPtr = TRI->getStackRegister();
+  SaveArgs = Is64Bit ? STI.getSaveArgs() : 0;
 }
 
 bool X86FrameLowering::hasReservedCallFrame(const MachineFunction &MF) const {
@@ -98,7 +100,8 @@ bool X86FrameLowering::hasFP(const MachineFunction &MF) const {
           MF.getInfo<X86MachineFunctionInfo>()->hasPreallocatedCall() ||
           MF.callsUnwindInit() || MF.hasEHFunclets() || MF.callsEHReturn() ||
           MFI.hasStackMap() || MFI.hasPatchPoint() ||
-          MFI.hasCopyImplyingStackAdjustment());
+          MFI.hasCopyImplyingStackAdjustment() ||
+          SaveArgs);
 }
 
 static unsigned getSUBriOpcode(bool IsLP64, int64_t Imm) {
@@ -1243,6 +1246,24 @@ void X86FrameLowering::BuildStackAlignAND(MachineBasicBlock &MBB,
   }
 }
 
+// FIXME: Get this from tablegen.
+static ArrayRef<MCPhysReg> get64BitArgumentGPRs(CallingConv::ID CallConv,
+                                                const X86Subtarget &Subtarget) {
+  assert(Subtarget.is64Bit());
+
+  if (Subtarget.isCallingConvWin64(CallConv)) {
+    static const MCPhysReg GPR64ArgRegsWin64[] = {
+      X86::RCX, X86::RDX, X86::R8,  X86::R9
+    };
+    return makeArrayRef(std::begin(GPR64ArgRegsWin64), std::end(GPR64ArgRegsWin64));
+  }
+
+  static const MCPhysReg GPR64ArgRegs64Bit[] = {
+    X86::RDI, X86::RSI, X86::RDX, X86::RCX, X86::R8, X86::R9
+  };
+  return makeArrayRef(std::begin(GPR64ArgRegs64Bit), std::end(GPR64ArgRegs64Bit));
+}
+
 bool X86FrameLowering::has128ByteRedZone(const MachineFunction& MF) const {
   // x86-64 (non Win64) has a 128 byte red zone which is guaranteed not to be
   // clobbered by any interrupt handler.
@@ -1517,6 +1538,43 @@ void X86FrameLowering::emitPrologue(MachineFunction &MF,
                                     nullptr, DwarfFramePtr));
       }
 
+      if (SaveArgs && !Fn.arg_empty()) {
+        ArrayRef<MCPhysReg> GPRs =
+          get64BitArgumentGPRs(Fn.getCallingConv(), STI);
+        unsigned arg_size = Fn.arg_size();
+        unsigned RI = 0;
+        int64_t SaveSize = 0;
+
+        if (Fn.hasStructRetAttr()) {
+          GPRs = GPRs.drop_front(1);
+          arg_size--;
+        }
+
+        for (MCPhysReg Reg : GPRs) {
+          if (++RI > arg_size)
+            break;
+
+          SaveSize += SlotSize;
+
+          BuildMI(MBB, MBBI, DL, TII.get(X86::PUSH64r))
+            .addReg(Reg)
+            .setMIFlag(MachineInstr::FrameSetup);
+        }
+
+        // Realign the stack. PUSHes are the most space efficient.
+        while (SaveSize % getStackAlignment()) {
+          BuildMI(MBB, MBBI, DL, TII.get(X86::PUSH64r))
+            .addReg(GPRs.front())
+            .setMIFlag(MachineInstr::FrameSetup);
+
+          SaveSize += SlotSize;
+        }
+
+       //dlg StackSize -= SaveSize;
+        //dlg MFI.setStackSize(StackSize);
+        X86FI->setSaveArgSize(SaveSize);
+      }
+
       if (NeedsWinFPO) {
         // .cv_fpo_setframe $FramePtr
         HasWinCFI = true;
@@ -2009,10 +2067,16 @@ void X86FrameLowering::emitEpilogue(MachineFunction &MF,
   // AfterPop is the position to insert .cfi_restore.
   MachineBasicBlock::iterator AfterPop = MBBI;
   if (HasFP) {
-    // Pop EBP.
-    BuildMI(MBB, MBBI, DL, TII.get(Is64Bit ? X86::POP64r : X86::POP32r),
+    if (X86FI->getSaveArgSize()) {
+      // LEAVE is effectively mov rbp,rsp; pop rbp
+      BuildMI(MBB, MBBI, DL, TII.get(X86::LEAVE64))
+        .setMIFlag(MachineInstr::FrameDestroy);
+    } else {
+      // Pop EBP.
+      BuildMI(MBB, MBBI, DL, TII.get(Is64Bit ? X86::POP64r : X86::POP32r),
             MachineFramePtr)
         .setMIFlag(MachineInstr::FrameDestroy);
+    }
     if (NeedsDwarfCFI) {
       unsigned DwarfStackPtr =
           TRI->getDwarfRegNum(Is64Bit ? X86::RSP : X86::ESP, true);
@@ -2037,7 +2101,8 @@ void X86FrameLowering::emitEpilogue(MachineFunction &MF,
 
     if (Opc != X86::DBG_VALUE && !PI->isTerminator()) {
       if ((Opc != X86::POP32r || !PI->getFlag(MachineInstr::FrameDestroy)) &&
-          (Opc != X86::POP64r || !PI->getFlag(MachineInstr::FrameDestroy)))
+          (Opc != X86::POP64r || !PI->getFlag(MachineInstr::FrameDestroy)) &&
+          (Opc != X86::LEAVE64 || !PI->getFlag(MachineInstr::FrameDestroy)))
         break;
       FirstCSPop = PI;
     }
@@ -2202,6 +2267,8 @@ int X86FrameLowering::getFrameIndexReference(const MachineFunction &MF, int FI,
            "FPDelta isn't aligned per the Win64 ABI!");
   }
 
+  if (FI >= 0)
+    Offset -= X86FI->getSaveArgSize();
 
   if (TRI->hasBasePointer(MF)) {
     assert(HasFP && "VLAs and dynamic stack realign, but no FP?!");
@@ -3605,6 +3672,10 @@ void X86FrameLowering::processFunctionBeforeFrameFinalized(
       .addImm(-2);
 }
 
+const ReturnProtectorLowering *X86FrameLowering::getReturnProtector() const {
+  return &RPL;
+}
+
 void X86FrameLowering::processFunctionBeforeFrameIndicesReplaced(
     MachineFunction &MF, RegScavenger *RS) const {
   if (STI.is32Bit() && MF.hasEHFunclets())
index bb2e832..64f3ade 100644 (file)
@@ -13,6 +13,7 @@
 #ifndef LLVM_LIB_TARGET_X86_X86FRAMELOWERING_H
 #define LLVM_LIB_TARGET_X86_X86FRAMELOWERING_H
 
+#include "X86ReturnProtectorLowering.h"
 #include "llvm/CodeGen/TargetFrameLowering.h"
 
 namespace llvm {
@@ -22,6 +23,7 @@ class MCCFIInstruction;
 class X86InstrInfo;
 class X86Subtarget;
 class X86RegisterInfo;
+class X86ReturnProtectorLowering;
 
 class X86FrameLowering : public TargetFrameLowering {
 public:
@@ -32,6 +34,9 @@ public:
   const X86Subtarget &STI;
   const X86InstrInfo &TII;
   const X86RegisterInfo *TRI;
+  const X86ReturnProtectorLowering RPL;
+
+  bool SaveArgs;
 
   unsigned SlotSize;
 
@@ -72,6 +77,8 @@ public:
   void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
   void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
 
+  const ReturnProtectorLowering *getReturnProtector() const override;
+
   void adjustForSegmentedStacks(MachineFunction &MF,
                                 MachineBasicBlock &PrologueMBB) const override;
 
index 4df93fb..850608e 100644 (file)
@@ -267,6 +267,25 @@ def MORESTACK_RET: I<0, Pseudo, (outs), (ins), "", []>;
 def MORESTACK_RET_RESTORE_R10 : I<0, Pseudo, (outs), (ins), "", []>;
 }
 
+//===----------------------------------------------------------------------===//
+// Pseudo instruction used by retguard
+
+// This is lowered to a JE 2; INT3; INT3. Prior to this pseudo should be a
+// compare instruction to ensure the retguard cookie is correct.
+// We use a pseudo here in order to avoid splitting the BB just before the return.
+// Splitting the BB and inserting a JE_1 over a new INT3 BB occasionally
+// resulted in incorrect code when a value from a byte register (CL) was
+// used as a return value. When emitted as a split BB, the single byte
+// register would sometimes be widened to 4 bytes, which would corrupt
+// the return value (ie mov %ecx, %eax instead of mov %cl, %al).
+let isCodeGenOnly = 1, Uses = [EFLAGS] in {
+def RETGUARD_JMP_TRAP: I<0, Pseudo, (outs), (ins), "", []>;
+}
+
+let isCodeGenOnly = 1 in {
+def JMP_TRAP: I<0, Pseudo, (outs), (ins), "", []>;
+}
+
 //===----------------------------------------------------------------------===//
 // Alias Instructions
 //===----------------------------------------------------------------------===//
index 9ce2a46..f2761f9 100644 (file)
@@ -2566,6 +2566,50 @@ void X86AsmPrinter::emitInstruction(const MachineInstr *MI) {
         MCInstBuilder(X86::MOV64rr).addReg(X86::R10).addReg(X86::RAX));
     return;
 
+  case X86::RETGUARD_JMP_TRAP: {
+    // Make a symbol for the end of the trapsled and emit a jump to it
+    MCSymbol *RGSuccSym = OutContext.createTempSymbol();
+    const MCExpr *RGSuccExpr = MCSymbolRefExpr::create(RGSuccSym, OutContext);
+    EmitAndCountInstruction(MCInstBuilder(X86::JCC_1)
+                              .addExpr(RGSuccExpr)
+                              .addImm(X86::COND_E));
+
+    // Emit at least two trap instructions
+    EmitAndCountInstruction(MCInstBuilder(X86::INT3));
+    EmitAndCountInstruction(MCInstBuilder(X86::INT3));
+
+    // Now .fill up to 0xe byte, so the ret happens on 0xf
+    MCSymbol *Dot = OutContext.createTempSymbol();
+    OutStreamer->emitLabel(Dot);
+    const MCExpr *DotE = MCSymbolRefExpr::create(Dot, OutContext);
+    const MCExpr *BaseE = MCSymbolRefExpr::create(
+        TM.getSymbol(&MF->getFunction()), OutContext);
+    // .fill (0xf - ((DotE - BaseE) & 0xf)), 1, 0xcc
+    const MCExpr *FillE = MCBinaryExpr::createSub(
+        MCConstantExpr::create(0xf, OutContext),
+        MCBinaryExpr::createAnd(
+          MCBinaryExpr::createSub(DotE, BaseE, OutContext),
+          MCConstantExpr::create(0xf, OutContext),
+          OutContext),
+        OutContext);
+    OutStreamer->emitFill(*FillE, 0xCC);
+
+    // And finally emit the jump target symbol
+    OutStreamer->emitLabel(RGSuccSym);
+    return;
+  }
+
+  case X86::JMP_TRAP: {
+    MCSymbol *RGSuccSym = OutContext.createTempSymbol();
+    const MCExpr *RGSuccExpr = MCSymbolRefExpr::create(RGSuccSym, OutContext);
+    EmitAndCountInstruction(MCInstBuilder(X86::JMP_1).addExpr(RGSuccExpr));
+    EmitAndCountInstruction(MCInstBuilder(X86::INT3));
+    EmitAndCountInstruction(MCInstBuilder(X86::INT3));
+    OutStreamer->emitValueToAlignment(8, 0xCC, 1);
+    OutStreamer->emitLabel(RGSuccSym);
+    return;
+  }
+
   case X86::SEH_PushReg:
   case X86::SEH_SaveReg:
   case X86::SEH_SaveXMM:
@@ -2616,3 +2660,9 @@ void X86AsmPrinter::emitInstruction(const MachineInstr *MI) {
 
   EmitAndCountInstruction(TmpInst);
 }
+
+/// Emit Trap bytes to the specified power of two alignment
+void X86AsmPrinter::emitTrapToAlignment(Align Alignment) const {
+  if (Alignment == Align(1)) return;
+  OutStreamer->emitValueToAlignment(Alignment.value(), 0xCC, 1);
+}
index eedad95..21a4e54 100644 (file)
@@ -45,6 +45,9 @@ class X86MachineFunctionInfo : public MachineFunctionInfo {
   /// stack frame in bytes.
   unsigned CalleeSavedFrameSize = 0;
 
+  // SaveArgSize - Number of register arguments saved on the stack
+  unsigned SaveArgSize = 0;
+
   /// BytesToPopOnReturn - Number of bytes function pops on return (in addition
   /// to the space used by the return address).
   /// Used on windows platform for stdcall & fastcall name decoration
@@ -139,6 +142,9 @@ public:
   unsigned getCalleeSavedFrameSize() const { return CalleeSavedFrameSize; }
   void setCalleeSavedFrameSize(unsigned bytes) { CalleeSavedFrameSize = bytes; }
 
+  unsigned getSaveArgSize() const { return SaveArgSize; }
+  void setSaveArgSize(unsigned bytes) { SaveArgSize = bytes; }
+
   unsigned getBytesToPopOnReturn() const { return BytesToPopOnReturn; }
   void setBytesToPopOnReturn (unsigned bytes) { BytesToPopOnReturn = bytes;}
 
index 8de5b94..183d133 100644 (file)
@@ -421,8 +421,8 @@ def GRH16 : RegisterClass<"X86", [i16], 16,
                                R15WH)>;
 
 def GR32 : RegisterClass<"X86", [i32], 32,
-                         (add EAX, ECX, EDX, ESI, EDI, EBX, EBP, ESP,
-                              R8D, R9D, R10D, R11D, R14D, R15D, R12D, R13D)>;
+                         (add EAX, ECX, EDX, ESI, EDI,
+                              R8D, R9D, R10D, R11D, R14D, R15D, R12D, R13D, EBX, EBP, ESP)>;
 
 // GR64 - 64-bit GPRs. This oddly includes RIP, which isn't accurate, since
 // RIP isn't really a register and it can't be used anywhere except in an
@@ -431,7 +431,7 @@ def GR32 : RegisterClass<"X86", [i32], 32,
 // tests because of the inclusion of RIP in this register class.
 def GR64 : RegisterClass<"X86", [i64], 64,
                          (add RAX, RCX, RDX, RSI, RDI, R8, R9, R10, R11,
-                              RBX, R14, R15, R12, R13, RBP, RSP, RIP)>;
+                              R14, R15, R12, R13, RBX, RBP, RSP, RIP)>;
 
 // Segment registers for use by MOV instructions (and others) that have a
 //   segment register as one operand.  Always contain a 16-bit segment
index de45d35..0a0c27c 100644 (file)
@@ -459,6 +459,9 @@ protected:
   /// entry to the function and which must be maintained by every function.
   Align stackAlignment = Align(4);
 
+  /// Whether function prologues should save register arguments on the stack.
+  bool SaveArgs = false;
+
   /// Max. memset / memcpy size that is turned into rep/movs, rep/stos ops.
   ///
   // FIXME: this is a known good value for Yonah. How about others?
@@ -549,6 +552,8 @@ public:
     return &getInstrInfo()->getRegisterInfo();
   }
 
+  bool getSaveArgs() const { return SaveArgs; }
+
   /// Returns the minimum alignment known to hold of the
   /// stack frame on entry to the function and which must be maintained by every
   /// function for this subtarget.
@@ -809,6 +814,7 @@ public:
 
   bool isTargetDarwin() const { return TargetTriple.isOSDarwin(); }
   bool isTargetFreeBSD() const { return TargetTriple.isOSFreeBSD(); }
+  bool isTargetOpenBSD() const { return TargetTriple.isOSOpenBSD(); }
   bool isTargetDragonFly() const { return TargetTriple.isOSDragonFly(); }
   bool isTargetSolaris() const { return TargetTriple.isOSSolaris(); }
   bool isTargetPS4() const { return TargetTriple.isPS4CPU(); }
index 7344116..5278d59 100644 (file)
@@ -517,6 +517,7 @@ void X86PassConfig::addPreEmitPass() {
   addPass(createX86EvexToVexInsts());
   addPass(createX86DiscriminateMemOpsPass());
   addPass(createX86InsertPrefetchPass());
+  addPass(createX86FixupGadgetsPass());
   addPass(createX86InsertX87waitPass());
 }
 
index 3cb4df1..800a34b 100644 (file)
@@ -312,6 +312,8 @@ bool LoopIdiomRecognize::runOnLoop(Loop *L) {
   StringRef Name = L->getHeader()->getParent()->getName();
   if (Name == "memset" || Name == "memcpy")
     return false;
+  if (Name == "_libc_memset" || Name == "_libc_memcpy")
+    return false;
 
   // Determine if code size heuristics need to be applied.
   ApplyCodeSizeHeuristics =
index 5ebd3b7..f76e0a1 100644 (file)
@@ -541,9 +541,14 @@ private:
 
     auto Iter = AdditionalUsers.find(I);
     if (Iter != AdditionalUsers.end()) {
+      // Copy additional users before notifying them of changes, because new
+      // users may be added, potentially invalidating the iterator.
+      SmallVector<Instruction *, 2> ToNotify;
       for (User *U : Iter->second)
         if (auto *UI = dyn_cast<Instruction>(U))
-          OperandChangedState(UI);
+          ToNotify.push_back(UI);
+      for (Instruction *UI : ToNotify)
+        OperandChangedState(UI);
     }
   }
   void handleCallOverdefined(CallBase &CB);
diff --git a/gnu/llvm/llvm/tools/dsymutil/DwarfStreamer.cpp b/gnu/llvm/llvm/tools/dsymutil/DwarfStreamer.cpp
deleted file mode 100644 (file)
index 3e132c2..0000000
+++ /dev/null
@@ -1,820 +0,0 @@
-//===- tools/dsymutil/DwarfStreamer.cpp - Dwarf Streamer ------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "DwarfStreamer.h"
-#include "LinkUtils.h"
-#include "MachOUtils.h"
-#include "llvm/ADT/Triple.h"
-#include "llvm/DWARFLinker/DWARFLinkerCompileUnit.h"
-#include "llvm/DebugInfo/DWARF/DWARFContext.h"
-#include "llvm/MC/MCTargetOptions.h"
-#include "llvm/MC/MCTargetOptionsCommandFlags.inc"
-#include "llvm/Support/LEB128.h"
-#include "llvm/Support/TargetRegistry.h"
-#include "llvm/Target/TargetMachine.h"
-#include "llvm/Target/TargetOptions.h"
-
-namespace llvm {
-namespace dsymutil {
-
-/// Retrieve the section named \a SecName in \a Obj.
-///
-/// To accommodate for platform discrepancies, the name passed should be
-/// (for example) 'debug_info' to match either '__debug_info' or '.debug_info'.
-/// This function will strip the initial platform-specific characters.
-static Optional<object::SectionRef>
-getSectionByName(const object::ObjectFile &Obj, StringRef SecName) {
-  for (const object::SectionRef &Section : Obj.sections()) {
-    StringRef SectionName;
-    if (Expected<StringRef> NameOrErr = Section.getName())
-      SectionName = *NameOrErr;
-    else
-      consumeError(NameOrErr.takeError());
-
-    SectionName = SectionName.substr(SectionName.find_first_not_of("._"));
-    if (SectionName != SecName)
-      continue;
-    return Section;
-  }
-  return None;
-}
-
-bool DwarfStreamer::init(Triple TheTriple) {
-  std::string ErrorStr;
-  std::string TripleName;
-  StringRef Context = "dwarf streamer init";
-
-  // Get the target.
-  const Target *TheTarget =
-      TargetRegistry::lookupTarget(TripleName, TheTriple, ErrorStr);
-  if (!TheTarget)
-    return error(ErrorStr, Context);
-  TripleName = TheTriple.getTriple();
-
-  // Create all the MC Objects.
-  MRI.reset(TheTarget->createMCRegInfo(TripleName));
-  if (!MRI)
-    return error(Twine("no register info for target ") + TripleName, Context);
-
-  MCTargetOptions MCOptions = InitMCTargetOptionsFromFlags();
-  MAI.reset(TheTarget->createMCAsmInfo(*MRI, TripleName, MCOptions));
-  if (!MAI)
-    return error("no asm info for target " + TripleName, Context);
-
-  MOFI.reset(new MCObjectFileInfo);
-  MC.reset(new MCContext(MAI.get(), MRI.get(), MOFI.get()));
-  MOFI->InitMCObjectFileInfo(TheTriple, /*PIC*/ false, *MC);
-
-  MSTI.reset(TheTarget->createMCSubtargetInfo(TripleName, "", ""));
-  if (!MSTI)
-    return error("no subtarget info for target " + TripleName, Context);
-
-  MAB = TheTarget->createMCAsmBackend(*MSTI, *MRI, MCOptions);
-  if (!MAB)
-    return error("no asm backend for target " + TripleName, Context);
-
-  MII.reset(TheTarget->createMCInstrInfo());
-  if (!MII)
-    return error("no instr info info for target " + TripleName, Context);
-
-  MCE = TheTarget->createMCCodeEmitter(*MII, *MRI, *MC);
-  if (!MCE)
-    return error("no code emitter for target " + TripleName, Context);
-
-  switch (Options.FileType) {
-  case OutputFileType::Assembly: {
-    MIP = TheTarget->createMCInstPrinter(TheTriple, MAI->getAssemblerDialect(),
-                                         *MAI, *MII, *MRI);
-    MS = TheTarget->createAsmStreamer(
-        *MC, std::make_unique<formatted_raw_ostream>(OutFile), true, true, MIP,
-        std::unique_ptr<MCCodeEmitter>(MCE), std::unique_ptr<MCAsmBackend>(MAB),
-        true);
-    break;
-  }
-  case OutputFileType::Object: {
-    MS = TheTarget->createMCObjectStreamer(
-        TheTriple, *MC, std::unique_ptr<MCAsmBackend>(MAB),
-        MAB->createObjectWriter(OutFile), std::unique_ptr<MCCodeEmitter>(MCE),
-        *MSTI, MCOptions.MCRelaxAll, MCOptions.MCIncrementalLinkerCompatible,
-        /*DWARFMustBeAtTheEnd*/ false);
-    break;
-  }
-  }
-
-  if (!MS)
-    return error("no object streamer for target " + TripleName, Context);
-
-  // Finally create the AsmPrinter we'll use to emit the DIEs.
-  TM.reset(TheTarget->createTargetMachine(TripleName, "", "", TargetOptions(),
-                                          None));
-  if (!TM)
-    return error("no target machine for target " + TripleName, Context);
-
-  Asm.reset(TheTarget->createAsmPrinter(*TM, std::unique_ptr<MCStreamer>(MS)));
-  if (!Asm)
-    return error("no asm printer for target " + TripleName, Context);
-
-  RangesSectionSize = 0;
-  LocSectionSize = 0;
-  LineSectionSize = 0;
-  FrameSectionSize = 0;
-  DebugInfoSectionSize = 0;
-
-  return true;
-}
-
-bool DwarfStreamer::finish(const DebugMap &DM, SymbolMapTranslator &T) {
-  bool Result = true;
-  if (DM.getTriple().isOSDarwin() && !DM.getBinaryPath().empty() &&
-      Options.FileType == OutputFileType::Object)
-    Result = MachOUtils::generateDsymCompanion(DM, T, *MS, OutFile);
-  else
-    MS->Finish();
-  return Result;
-}
-
-void DwarfStreamer::switchToDebugInfoSection(unsigned DwarfVersion) {
-  MS->SwitchSection(MOFI->getDwarfInfoSection());
-  MC->setDwarfVersion(DwarfVersion);
-}
-
-/// Emit the compilation unit header for \p Unit in the debug_info section.
-///
-/// A Dwarf section header is encoded as:
-///  uint32_t   Unit length (omitting this field)
-///  uint16_t   Version
-///  uint32_t   Abbreviation table offset
-///  uint8_t    Address size
-///
-/// Leading to a total of 11 bytes.
-void DwarfStreamer::emitCompileUnitHeader(CompileUnit &Unit) {
-  unsigned Version = Unit.getOrigUnit().getVersion();
-  switchToDebugInfoSection(Version);
-
-  /// The start of the unit within its section.
-  Unit.setLabelBegin(Asm->createTempSymbol("cu_begin"));
-  Asm->OutStreamer->EmitLabel(Unit.getLabelBegin());
-
-  // Emit size of content not including length itself. The size has already
-  // been computed in CompileUnit::computeOffsets(). Subtract 4 to that size to
-  // account for the length field.
-  Asm->emitInt32(Unit.getNextUnitOffset() - Unit.getStartOffset() - 4);
-  Asm->emitInt16(Version);
-
-  // We share one abbreviations table across all units so it's always at the
-  // start of the section.
-  Asm->emitInt32(0);
-  Asm->emitInt8(Unit.getOrigUnit().getAddressByteSize());
-  DebugInfoSectionSize += 11;
-
-  // Remember this CU.
-  EmittedUnits.push_back({Unit.getUniqueID(), Unit.getLabelBegin()});
-}
-
-/// Emit the \p Abbrevs array as the shared abbreviation table
-/// for the linked Dwarf file.
-void DwarfStreamer::emitAbbrevs(
-    const std::vector<std::unique_ptr<DIEAbbrev>> &Abbrevs,
-    unsigned DwarfVersion) {
-  MS->SwitchSection(MOFI->getDwarfAbbrevSection());
-  MC->setDwarfVersion(DwarfVersion);
-  Asm->emitDwarfAbbrevs(Abbrevs);
-}
-
-/// Recursively emit the DIE tree rooted at \p Die.
-void DwarfStreamer::emitDIE(DIE &Die) {
-  MS->SwitchSection(MOFI->getDwarfInfoSection());
-  Asm->emitDwarfDIE(Die);
-  DebugInfoSectionSize += Die.getSize();
-}
-
-/// Emit contents of section SecName From Obj.
-void DwarfStreamer::emitSectionContents(const object::ObjectFile &Obj,
-                                        StringRef SecName) {
-  MCSection *Section =
-      StringSwitch<MCSection *>(SecName)
-          .Case("debug_line", MC->getObjectFileInfo()->getDwarfLineSection())
-          .Case("debug_loc", MC->getObjectFileInfo()->getDwarfLocSection())
-          .Case("debug_ranges",
-                MC->getObjectFileInfo()->getDwarfRangesSection())
-          .Case("debug_frame", MC->getObjectFileInfo()->getDwarfFrameSection())
-          .Case("debug_aranges",
-                MC->getObjectFileInfo()->getDwarfARangesSection())
-          .Default(nullptr);
-
-  if (Section) {
-    MS->SwitchSection(Section);
-
-    if (auto Sec = getSectionByName(Obj, SecName)) {
-      if (Expected<StringRef> E = Sec->getContents())
-        MS->EmitBytes(*E);
-      else
-        consumeError(E.takeError());
-    }
-  }
-}
-
-/// Emit DIE containing warnings.
-void DwarfStreamer::emitPaperTrailWarningsDie(const Triple &Triple, DIE &Die) {
-  switchToDebugInfoSection(/* Version */ 2);
-  auto &Asm = getAsmPrinter();
-  Asm.emitInt32(11 + Die.getSize() - 4);
-  Asm.emitInt16(2);
-  Asm.emitInt32(0);
-  Asm.emitInt8(Triple.isArch64Bit() ? 8 : 4);
-  DebugInfoSectionSize += 11;
-  emitDIE(Die);
-}
-
-/// Emit the debug_str section stored in \p Pool.
-void DwarfStreamer::emitStrings(const NonRelocatableStringpool &Pool) {
-  Asm->OutStreamer->SwitchSection(MOFI->getDwarfStrSection());
-  std::vector<DwarfStringPoolEntryRef> Entries = Pool.getEntriesForEmission();
-  for (auto Entry : Entries) {
-    // Emit the string itself.
-    Asm->OutStreamer->EmitBytes(Entry.getString());
-    // Emit a null terminator.
-    Asm->emitInt8(0);
-  }
-}
-
-void DwarfStreamer::emitDebugNames(
-    AccelTable<DWARF5AccelTableStaticData> &Table) {
-  if (EmittedUnits.empty())
-    return;
-
-  // Build up data structures needed to emit this section.
-  std::vector<MCSymbol *> CompUnits;
-  DenseMap<unsigned, size_t> UniqueIdToCuMap;
-  unsigned Id = 0;
-  for (auto &CU : EmittedUnits) {
-    CompUnits.push_back(CU.LabelBegin);
-    // We might be omitting CUs, so we need to remap them.
-    UniqueIdToCuMap[CU.ID] = Id++;
-  }
-
-  Asm->OutStreamer->SwitchSection(MOFI->getDwarfDebugNamesSection());
-  emitDWARF5AccelTable(
-      Asm.get(), Table, CompUnits,
-      [&UniqueIdToCuMap](const DWARF5AccelTableStaticData &Entry) {
-        return UniqueIdToCuMap[Entry.getCUIndex()];
-      });
-}
-
-void DwarfStreamer::emitAppleNamespaces(
-    AccelTable<AppleAccelTableStaticOffsetData> &Table) {
-  Asm->OutStreamer->SwitchSection(MOFI->getDwarfAccelNamespaceSection());
-  auto *SectionBegin = Asm->createTempSymbol("namespac_begin");
-  Asm->OutStreamer->EmitLabel(SectionBegin);
-  emitAppleAccelTable(Asm.get(), Table, "namespac", SectionBegin);
-}
-
-void DwarfStreamer::emitAppleNames(
-    AccelTable<AppleAccelTableStaticOffsetData> &Table) {
-  Asm->OutStreamer->SwitchSection(MOFI->getDwarfAccelNamesSection());
-  auto *SectionBegin = Asm->createTempSymbol("names_begin");
-  Asm->OutStreamer->EmitLabel(SectionBegin);
-  emitAppleAccelTable(Asm.get(), Table, "names", SectionBegin);
-}
-
-void DwarfStreamer::emitAppleObjc(
-    AccelTable<AppleAccelTableStaticOffsetData> &Table) {
-  Asm->OutStreamer->SwitchSection(MOFI->getDwarfAccelObjCSection());
-  auto *SectionBegin = Asm->createTempSymbol("objc_begin");
-  Asm->OutStreamer->EmitLabel(SectionBegin);
-  emitAppleAccelTable(Asm.get(), Table, "objc", SectionBegin);
-}
-
-void DwarfStreamer::emitAppleTypes(
-    AccelTable<AppleAccelTableStaticTypeData> &Table) {
-  Asm->OutStreamer->SwitchSection(MOFI->getDwarfAccelTypesSection());
-  auto *SectionBegin = Asm->createTempSymbol("types_begin");
-  Asm->OutStreamer->EmitLabel(SectionBegin);
-  emitAppleAccelTable(Asm.get(), Table, "types", SectionBegin);
-}
-
-/// Emit the swift_ast section stored in \p Buffers.
-void DwarfStreamer::emitSwiftAST(StringRef Buffer) {
-  MCSection *SwiftASTSection = MOFI->getDwarfSwiftASTSection();
-  SwiftASTSection->setAlignment(Align(32));
-  MS->SwitchSection(SwiftASTSection);
-  MS->EmitBytes(Buffer);
-}
-
-/// Emit the debug_range section contents for \p FuncRange by
-/// translating the original \p Entries. The debug_range section
-/// format is totally trivial, consisting just of pairs of address
-/// sized addresses describing the ranges.
-void DwarfStreamer::emitRangesEntries(
-    int64_t UnitPcOffset, uint64_t OrigLowPc,
-    const FunctionIntervals::const_iterator &FuncRange,
-    const std::vector<DWARFDebugRangeList::RangeListEntry> &Entries,
-    unsigned AddressSize) {
-  MS->SwitchSection(MC->getObjectFileInfo()->getDwarfRangesSection());
-
-  // Offset each range by the right amount.
-  int64_t PcOffset = Entries.empty() ? 0 : FuncRange.value() + UnitPcOffset;
-  for (const auto &Range : Entries) {
-    if (Range.isBaseAddressSelectionEntry(AddressSize)) {
-      warn("unsupported base address selection operation",
-           "emitting debug_ranges");
-      break;
-    }
-    // Do not emit empty ranges.
-    if (Range.StartAddress == Range.EndAddress)
-      continue;
-
-    // All range entries should lie in the function range.
-    if (!(Range.StartAddress + OrigLowPc >= FuncRange.start() &&
-          Range.EndAddress + OrigLowPc <= FuncRange.stop()))
-      warn("inconsistent range data.", "emitting debug_ranges");
-    MS->EmitIntValue(Range.StartAddress + PcOffset, AddressSize);
-    MS->EmitIntValue(Range.EndAddress + PcOffset, AddressSize);
-    RangesSectionSize += 2 * AddressSize;
-  }
-
-  // Add the terminator entry.
-  MS->EmitIntValue(0, AddressSize);
-  MS->EmitIntValue(0, AddressSize);
-  RangesSectionSize += 2 * AddressSize;
-}
-
-/// Emit the debug_aranges contribution of a unit and
-/// if \p DoDebugRanges is true the debug_range contents for a
-/// compile_unit level DW_AT_ranges attribute (Which are basically the
-/// same thing with a different base address).
-/// Just aggregate all the ranges gathered inside that unit.
-void DwarfStreamer::emitUnitRangesEntries(CompileUnit &Unit,
-                                          bool DoDebugRanges) {
-  unsigned AddressSize = Unit.getOrigUnit().getAddressByteSize();
-  // Gather the ranges in a vector, so that we can simplify them. The
-  // IntervalMap will have coalesced the non-linked ranges, but here
-  // we want to coalesce the linked addresses.
-  std::vector<std::pair<uint64_t, uint64_t>> Ranges;
-  const auto &FunctionRanges = Unit.getFunctionRanges();
-  for (auto Range = FunctionRanges.begin(), End = FunctionRanges.end();
-       Range != End; ++Range)
-    Ranges.push_back(std::make_pair(Range.start() + Range.value(),
-                                    Range.stop() + Range.value()));
-
-  // The object addresses where sorted, but again, the linked
-  // addresses might end up in a different order.
-  llvm::sort(Ranges);
-
-  if (!Ranges.empty()) {
-    MS->SwitchSection(MC->getObjectFileInfo()->getDwarfARangesSection());
-
-    MCSymbol *BeginLabel = Asm->createTempSymbol("Barange");
-    MCSymbol *EndLabel = Asm->createTempSymbol("Earange");
-
-    unsigned HeaderSize =
-        sizeof(int32_t) + // Size of contents (w/o this field
-        sizeof(int16_t) + // DWARF ARange version number
-        sizeof(int32_t) + // Offset of CU in the .debug_info section
-        sizeof(int8_t) +  // Pointer Size (in bytes)
-        sizeof(int8_t);   // Segment Size (in bytes)
-
-    unsigned TupleSize = AddressSize * 2;
-    unsigned Padding = offsetToAlignment(HeaderSize, Align(TupleSize));
-
-    Asm->EmitLabelDifference(EndLabel, BeginLabel, 4); // Arange length
-    Asm->OutStreamer->EmitLabel(BeginLabel);
-    Asm->emitInt16(dwarf::DW_ARANGES_VERSION); // Version number
-    Asm->emitInt32(Unit.getStartOffset());     // Corresponding unit's offset
-    Asm->emitInt8(AddressSize);                // Address size
-    Asm->emitInt8(0);                          // Segment size
-
-    Asm->OutStreamer->emitFill(Padding, 0x0);
-
-    for (auto Range = Ranges.begin(), End = Ranges.end(); Range != End;
-         ++Range) {
-      uint64_t RangeStart = Range->first;
-      MS->EmitIntValue(RangeStart, AddressSize);
-      while ((Range + 1) != End && Range->second == (Range + 1)->first)
-        ++Range;
-      MS->EmitIntValue(Range->second - RangeStart, AddressSize);
-    }
-
-    // Emit terminator
-    Asm->OutStreamer->EmitIntValue(0, AddressSize);
-    Asm->OutStreamer->EmitIntValue(0, AddressSize);
-    Asm->OutStreamer->EmitLabel(EndLabel);
-  }
-
-  if (!DoDebugRanges)
-    return;
-
-  MS->SwitchSection(MC->getObjectFileInfo()->getDwarfRangesSection());
-  // Offset each range by the right amount.
-  int64_t PcOffset = -Unit.getLowPc();
-  // Emit coalesced ranges.
-  for (auto Range = Ranges.begin(), End = Ranges.end(); Range != End; ++Range) {
-    MS->EmitIntValue(Range->first + PcOffset, AddressSize);
-    while (Range + 1 != End && Range->second == (Range + 1)->first)
-      ++Range;
-    MS->EmitIntValue(Range->second + PcOffset, AddressSize);
-    RangesSectionSize += 2 * AddressSize;
-  }
-
-  // Add the terminator entry.
-  MS->EmitIntValue(0, AddressSize);
-  MS->EmitIntValue(0, AddressSize);
-  RangesSectionSize += 2 * AddressSize;
-}
-
-/// Emit location lists for \p Unit and update attributes to point to the new
-/// entries.
-void DwarfStreamer::emitLocationsForUnit(
-    const CompileUnit &Unit, DWARFContext &Dwarf,
-    std::function<void(StringRef, SmallVectorImpl<uint8_t> &)> ProcessExpr) {
-  const auto &Attributes = Unit.getLocationAttributes();
-
-  if (Attributes.empty())
-    return;
-
-  MS->SwitchSection(MC->getObjectFileInfo()->getDwarfLocSection());
-
-  unsigned AddressSize = Unit.getOrigUnit().getAddressByteSize();
-  uint64_t BaseAddressMarker = (AddressSize == 8)
-                                   ? std::numeric_limits<uint64_t>::max()
-                                   : std::numeric_limits<uint32_t>::max();
-  const DWARFSection &InputSec = Dwarf.getDWARFObj().getLocSection();
-  DataExtractor Data(InputSec.Data, Dwarf.isLittleEndian(), AddressSize);
-  DWARFUnit &OrigUnit = Unit.getOrigUnit();
-  auto OrigUnitDie = OrigUnit.getUnitDIE(false);
-  int64_t UnitPcOffset = 0;
-  if (auto OrigLowPc = dwarf::toAddress(OrigUnitDie.find(dwarf::DW_AT_low_pc)))
-    UnitPcOffset = int64_t(*OrigLowPc) - Unit.getLowPc();
-
-  SmallVector<uint8_t, 32> Buffer;
-  for (const auto &Attr : Attributes) {
-    uint64_t Offset = Attr.first.get();
-    Attr.first.set(LocSectionSize);
-    // This is the quantity to add to the old location address to get
-    // the correct address for the new one.
-    int64_t LocPcOffset = Attr.second + UnitPcOffset;
-    while (Data.isValidOffset(Offset)) {
-      uint64_t Low = Data.getUnsigned(&Offset, AddressSize);
-      uint64_t High = Data.getUnsigned(&Offset, AddressSize);
-      LocSectionSize += 2 * AddressSize;
-      // End of list entry.
-      if (Low == 0 && High == 0) {
-        Asm->OutStreamer->EmitIntValue(0, AddressSize);
-        Asm->OutStreamer->EmitIntValue(0, AddressSize);
-        break;
-      }
-      // Base address selection entry.
-      if (Low == BaseAddressMarker) {
-        Asm->OutStreamer->EmitIntValue(BaseAddressMarker, AddressSize);
-        Asm->OutStreamer->EmitIntValue(High + Attr.second, AddressSize);
-        LocPcOffset = 0;
-        continue;
-      }
-      // Location list entry.
-      Asm->OutStreamer->EmitIntValue(Low + LocPcOffset, AddressSize);
-      Asm->OutStreamer->EmitIntValue(High + LocPcOffset, AddressSize);
-      uint64_t Length = Data.getU16(&Offset);
-      Asm->OutStreamer->EmitIntValue(Length, 2);
-      // Copy the bytes into to the buffer, process them, emit them.
-      Buffer.reserve(Length);
-      Buffer.resize(0);
-      StringRef Input = InputSec.Data.substr(Offset, Length);
-      ProcessExpr(Input, Buffer);
-      Asm->OutStreamer->EmitBytes(
-          StringRef((const char *)Buffer.data(), Length));
-      Offset += Length;
-      LocSectionSize += Length + 2;
-    }
-  }
-}
-
-void DwarfStreamer::emitLineTableForUnit(MCDwarfLineTableParams Params,
-                                         StringRef PrologueBytes,
-                                         unsigned MinInstLength,
-                                         std::vector<DWARFDebugLine::Row> &Rows,
-                                         unsigned PointerSize) {
-  // Switch to the section where the table will be emitted into.
-  MS->SwitchSection(MC->getObjectFileInfo()->getDwarfLineSection());
-  MCSymbol *LineStartSym = MC->createTempSymbol();
-  MCSymbol *LineEndSym = MC->createTempSymbol();
-
-  // The first 4 bytes is the total length of the information for this
-  // compilation unit (not including these 4 bytes for the length).
-  Asm->EmitLabelDifference(LineEndSym, LineStartSym, 4);
-  Asm->OutStreamer->EmitLabel(LineStartSym);
-  // Copy Prologue.
-  MS->EmitBytes(PrologueBytes);
-  LineSectionSize += PrologueBytes.size() + 4;
-
-  SmallString<128> EncodingBuffer;
-  raw_svector_ostream EncodingOS(EncodingBuffer);
-
-  if (Rows.empty()) {
-    // We only have the dummy entry, dsymutil emits an entry with a 0
-    // address in that case.
-    MCDwarfLineAddr::Encode(*MC, Params, std::numeric_limits<int64_t>::max(), 0,
-                            EncodingOS);
-    MS->EmitBytes(EncodingOS.str());
-    LineSectionSize += EncodingBuffer.size();
-    MS->EmitLabel(LineEndSym);
-    return;
-  }
-
-  // Line table state machine fields
-  unsigned FileNum = 1;
-  unsigned LastLine = 1;
-  unsigned Column = 0;
-  unsigned IsStatement = 1;
-  unsigned Isa = 0;
-  uint64_t Address = -1ULL;
-
-  unsigned RowsSinceLastSequence = 0;
-
-  for (unsigned Idx = 0; Idx < Rows.size(); ++Idx) {
-    auto &Row = Rows[Idx];
-
-    int64_t AddressDelta;
-    if (Address == -1ULL) {
-      MS->EmitIntValue(dwarf::DW_LNS_extended_op, 1);
-      MS->EmitULEB128IntValue(PointerSize + 1);
-      MS->EmitIntValue(dwarf::DW_LNE_set_address, 1);
-      MS->EmitIntValue(Row.Address.Address, PointerSize);
-      LineSectionSize += 2 + PointerSize + getULEB128Size(PointerSize + 1);
-      AddressDelta = 0;
-    } else {
-      AddressDelta = (Row.Address.Address - Address) / MinInstLength;
-    }
-
-    // FIXME: code copied and transformed from MCDwarf.cpp::EmitDwarfLineTable.
-    // We should find a way to share this code, but the current compatibility
-    // requirement with classic dsymutil makes it hard. Revisit that once this
-    // requirement is dropped.
-
-    if (FileNum != Row.File) {
-      FileNum = Row.File;
-      MS->EmitIntValue(dwarf::DW_LNS_set_file, 1);
-      MS->EmitULEB128IntValue(FileNum);
-      LineSectionSize += 1 + getULEB128Size(FileNum);
-    }
-    if (Column != Row.Column) {
-      Column = Row.Column;
-      MS->EmitIntValue(dwarf::DW_LNS_set_column, 1);
-      MS->EmitULEB128IntValue(Column);
-      LineSectionSize += 1 + getULEB128Size(Column);
-    }
-
-    // FIXME: We should handle the discriminator here, but dsymutil doesn't
-    // consider it, thus ignore it for now.
-
-    if (Isa != Row.Isa) {
-      Isa = Row.Isa;
-      MS->EmitIntValue(dwarf::DW_LNS_set_isa, 1);
-      MS->EmitULEB128IntValue(Isa);
-      LineSectionSize += 1 + getULEB128Size(Isa);
-    }
-    if (IsStatement != Row.IsStmt) {
-      IsStatement = Row.IsStmt;
-      MS->EmitIntValue(dwarf::DW_LNS_negate_stmt, 1);
-      LineSectionSize += 1;
-    }
-    if (Row.BasicBlock) {
-      MS->EmitIntValue(dwarf::DW_LNS_set_basic_block, 1);
-      LineSectionSize += 1;
-    }
-
-    if (Row.PrologueEnd) {
-      MS->EmitIntValue(dwarf::DW_LNS_set_prologue_end, 1);
-      LineSectionSize += 1;
-    }
-
-    if (Row.EpilogueBegin) {
-      MS->EmitIntValue(dwarf::DW_LNS_set_epilogue_begin, 1);
-      LineSectionSize += 1;
-    }
-
-    int64_t LineDelta = int64_t(Row.Line) - LastLine;
-    if (!Row.EndSequence) {
-      MCDwarfLineAddr::Encode(*MC, Params, LineDelta, AddressDelta, EncodingOS);
-      MS->EmitBytes(EncodingOS.str());
-      LineSectionSize += EncodingBuffer.size();
-      EncodingBuffer.resize(0);
-      Address = Row.Address.Address;
-      LastLine = Row.Line;
-      RowsSinceLastSequence++;
-    } else {
-      if (LineDelta) {
-        MS->EmitIntValue(dwarf::DW_LNS_advance_line, 1);
-        MS->EmitSLEB128IntValue(LineDelta);
-        LineSectionSize += 1 + getSLEB128Size(LineDelta);
-      }
-      if (AddressDelta) {
-        MS->EmitIntValue(dwarf::DW_LNS_advance_pc, 1);
-        MS->EmitULEB128IntValue(AddressDelta);
-        LineSectionSize += 1 + getULEB128Size(AddressDelta);
-      }
-      MCDwarfLineAddr::Encode(*MC, Params, std::numeric_limits<int64_t>::max(),
-                              0, EncodingOS);
-      MS->EmitBytes(EncodingOS.str());
-      LineSectionSize += EncodingBuffer.size();
-      EncodingBuffer.resize(0);
-      Address = -1ULL;
-      LastLine = FileNum = IsStatement = 1;
-      RowsSinceLastSequence = Column = Isa = 0;
-    }
-  }
-
-  if (RowsSinceLastSequence) {
-    MCDwarfLineAddr::Encode(*MC, Params, std::numeric_limits<int64_t>::max(), 0,
-                            EncodingOS);
-    MS->EmitBytes(EncodingOS.str());
-    LineSectionSize += EncodingBuffer.size();
-    EncodingBuffer.resize(0);
-  }
-
-  MS->EmitLabel(LineEndSym);
-}
-
-/// Copy the debug_line over to the updated binary while unobfuscating the file
-/// names and directories.
-void DwarfStreamer::translateLineTable(DataExtractor Data, uint64_t Offset) {
-  MS->SwitchSection(MC->getObjectFileInfo()->getDwarfLineSection());
-  StringRef Contents = Data.getData();
-
-  // We have to deconstruct the line table header, because it contains to
-  // length fields that will need to be updated when we change the length of
-  // the files and directories in there.
-  unsigned UnitLength = Data.getU32(&Offset);
-  uint64_t UnitEnd = Offset + UnitLength;
-  MCSymbol *BeginLabel = MC->createTempSymbol();
-  MCSymbol *EndLabel = MC->createTempSymbol();
-  unsigned Version = Data.getU16(&Offset);
-
-  if (Version > 5) {
-    warn("Unsupported line table version: dropping contents and not "
-         "unobfsucating line table.");
-    return;
-  }
-
-  Asm->EmitLabelDifference(EndLabel, BeginLabel, 4);
-  Asm->OutStreamer->EmitLabel(BeginLabel);
-  Asm->emitInt16(Version);
-  LineSectionSize += 6;
-
-  MCSymbol *HeaderBeginLabel = MC->createTempSymbol();
-  MCSymbol *HeaderEndLabel = MC->createTempSymbol();
-  Asm->EmitLabelDifference(HeaderEndLabel, HeaderBeginLabel, 4);
-  Asm->OutStreamer->EmitLabel(HeaderBeginLabel);
-  Offset += 4;
-  LineSectionSize += 4;
-
-  uint64_t AfterHeaderLengthOffset = Offset;
-  // Skip to the directories.
-  Offset += (Version >= 4) ? 5 : 4;
-  unsigned OpcodeBase = Data.getU8(&Offset);
-  Offset += OpcodeBase - 1;
-  Asm->OutStreamer->EmitBytes(Contents.slice(AfterHeaderLengthOffset, Offset));
-  LineSectionSize += Offset - AfterHeaderLengthOffset;
-
-  // Offset points to the first directory.
-  while (const char *Dir = Data.getCStr(&Offset)) {
-    if (Dir[0] == 0)
-      break;
-
-    StringRef Translated = Options.Translator(Dir);
-    Asm->OutStreamer->EmitBytes(Translated);
-    Asm->emitInt8(0);
-    LineSectionSize += Translated.size() + 1;
-  }
-  Asm->emitInt8(0);
-  LineSectionSize += 1;
-
-  while (const char *File = Data.getCStr(&Offset)) {
-    if (File[0] == 0)
-      break;
-
-    StringRef Translated = Options.Translator(File);
-    Asm->OutStreamer->EmitBytes(Translated);
-    Asm->emitInt8(0);
-    LineSectionSize += Translated.size() + 1;
-
-    uint64_t OffsetBeforeLEBs = Offset;
-    Asm->EmitULEB128(Data.getULEB128(&Offset));
-    Asm->EmitULEB128(Data.getULEB128(&Offset));
-    Asm->EmitULEB128(Data.getULEB128(&Offset));
-    LineSectionSize += Offset - OffsetBeforeLEBs;
-  }
-  Asm->emitInt8(0);
-  LineSectionSize += 1;
-
-  Asm->OutStreamer->EmitLabel(HeaderEndLabel);
-
-  // Copy the actual line table program over.
-  Asm->OutStreamer->EmitBytes(Contents.slice(Offset, UnitEnd));
-  LineSectionSize += UnitEnd - Offset;
-
-  Asm->OutStreamer->EmitLabel(EndLabel);
-  Offset = UnitEnd;
-}
-
-void DwarfStreamer::copyInvariantDebugSection(const object::ObjectFile &Obj) {
-  if (!Options.Translator) {
-    MS->SwitchSection(MC->getObjectFileInfo()->getDwarfLineSection());
-    emitSectionContents(Obj, "debug_line");
-  }
-
-  MS->SwitchSection(MC->getObjectFileInfo()->getDwarfLocSection());
-  emitSectionContents(Obj, "debug_loc");
-
-  MS->SwitchSection(MC->getObjectFileInfo()->getDwarfRangesSection());
-  emitSectionContents(Obj, "debug_ranges");
-
-  MS->SwitchSection(MC->getObjectFileInfo()->getDwarfFrameSection());
-  emitSectionContents(Obj, "debug_frame");
-
-  MS->SwitchSection(MC->getObjectFileInfo()->getDwarfARangesSection());
-  emitSectionContents(Obj, "debug_aranges");
-}
-
-/// Emit the pubnames or pubtypes section contribution for \p
-/// Unit into \p Sec. The data is provided in \p Names.
-void DwarfStreamer::emitPubSectionForUnit(
-    MCSection *Sec, StringRef SecName, const CompileUnit &Unit,
-    const std::vector<CompileUnit::AccelInfo> &Names) {
-  if (Names.empty())
-    return;
-
-  // Start the dwarf pubnames section.
-  Asm->OutStreamer->SwitchSection(Sec);
-  MCSymbol *BeginLabel = Asm->createTempSymbol("pub" + SecName + "_begin");
-  MCSymbol *EndLabel = Asm->createTempSymbol("pub" + SecName + "_end");
-
-  bool HeaderEmitted = false;
-  // Emit the pubnames for this compilation unit.
-  for (const auto &Name : Names) {
-    if (Name.SkipPubSection)
-      continue;
-
-    if (!HeaderEmitted) {
-      // Emit the header.
-      Asm->EmitLabelDifference(EndLabel, BeginLabel, 4); // Length
-      Asm->OutStreamer->EmitLabel(BeginLabel);
-      Asm->emitInt16(dwarf::DW_PUBNAMES_VERSION); // Version
-      Asm->emitInt32(Unit.getStartOffset());      // Unit offset
-      Asm->emitInt32(Unit.getNextUnitOffset() - Unit.getStartOffset()); // Size
-      HeaderEmitted = true;
-    }
-    Asm->emitInt32(Name.Die->getOffset());
-
-    // Emit the string itself.
-    Asm->OutStreamer->EmitBytes(Name.Name.getString());
-    // Emit a null terminator.
-    Asm->emitInt8(0);
-  }
-
-  if (!HeaderEmitted)
-    return;
-  Asm->emitInt32(0); // End marker.
-  Asm->OutStreamer->EmitLabel(EndLabel);
-}
-
-/// Emit .debug_pubnames for \p Unit.
-void DwarfStreamer::emitPubNamesForUnit(const CompileUnit &Unit) {
-  emitPubSectionForUnit(MC->getObjectFileInfo()->getDwarfPubNamesSection(),
-                        "names", Unit, Unit.getPubnames());
-}
-
-/// Emit .debug_pubtypes for \p Unit.
-void DwarfStreamer::emitPubTypesForUnit(const CompileUnit &Unit) {
-  emitPubSectionForUnit(MC->getObjectFileInfo()->getDwarfPubTypesSection(),
-                        "types", Unit, Unit.getPubtypes());
-}
-
-/// Emit a CIE into the debug_frame section.
-void DwarfStreamer::emitCIE(StringRef CIEBytes) {
-  MS->SwitchSection(MC->getObjectFileInfo()->getDwarfFrameSection());
-
-  MS->EmitBytes(CIEBytes);
-  FrameSectionSize += CIEBytes.size();
-}
-
-/// Emit a FDE into the debug_frame section. \p FDEBytes
-/// contains the FDE data without the length, CIE offset and address
-/// which will be replaced with the parameter values.
-void DwarfStreamer::emitFDE(uint32_t CIEOffset, uint32_t AddrSize,
-                            uint32_t Address, StringRef FDEBytes) {
-  MS->SwitchSection(MC->getObjectFileInfo()->getDwarfFrameSection());
-
-  MS->EmitIntValue(FDEBytes.size() + 4 + AddrSize, 4);
-  MS->EmitIntValue(CIEOffset, 4);
-  MS->EmitIntValue(Address, AddrSize);
-  MS->EmitBytes(FDEBytes);
-  FrameSectionSize += FDEBytes.size() + 8 + AddrSize;
-}
-
-} // namespace dsymutil
-} // namespace llvm
diff --git a/gnu/llvm/llvm/tools/dsymutil/DwarfStreamer.h b/gnu/llvm/llvm/tools/dsymutil/DwarfStreamer.h
deleted file mode 100644 (file)
index de59998..0000000
+++ /dev/null
@@ -1,209 +0,0 @@
-//===- tools/dsymutil/DwarfStreamer.h - Dwarf Streamer ----------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_TOOLS_DSYMUTIL_DWARFSTREAMER_H
-#define LLVM_TOOLS_DSYMUTIL_DWARFSTREAMER_H
-
-#include "DebugMap.h"
-#include "LinkUtils.h"
-#include "llvm/CodeGen/AccelTable.h"
-#include "llvm/CodeGen/AsmPrinter.h"
-#include "llvm/CodeGen/NonRelocatableStringpool.h"
-#include "llvm/DWARFLinker/DWARFLinker.h"
-#include "llvm/DWARFLinker/DWARFLinkerCompileUnit.h"
-#include "llvm/DebugInfo/DWARF/DWARFDebugLine.h"
-#include "llvm/DebugInfo/DWARF/DWARFDebugRangeList.h"
-#include "llvm/MC/MCAsmBackend.h"
-#include "llvm/MC/MCAsmInfo.h"
-#include "llvm/MC/MCCodeEmitter.h"
-#include "llvm/MC/MCContext.h"
-#include "llvm/MC/MCDwarf.h"
-#include "llvm/MC/MCInstrInfo.h"
-#include "llvm/MC/MCObjectFileInfo.h"
-#include "llvm/MC/MCObjectWriter.h"
-#include "llvm/MC/MCRegisterInfo.h"
-#include "llvm/MC/MCSection.h"
-#include "llvm/MC/MCStreamer.h"
-#include "llvm/MC/MCSubtargetInfo.h"
-#include "llvm/MC/MCSymbol.h"
-#include "llvm/MC/MCTargetOptions.h"
-#include "llvm/Target/TargetMachine.h"
-#include "llvm/Target/TargetOptions.h"
-
-namespace llvm {
-namespace dsymutil {
-
-/// The Dwarf streaming logic.
-///
-/// All interactions with the MC layer that is used to build the debug
-/// information binary representation are handled in this class.
-class DwarfStreamer : public DwarfEmitter {
-public:
-  DwarfStreamer(raw_fd_ostream &OutFile, LinkOptions Options)
-      : OutFile(OutFile), Options(std::move(Options)) {}
-
-  bool init(Triple TheTriple);
-
-  /// Dump the file to the disk.
-  bool finish(const DebugMap &, SymbolMapTranslator &T);
-
-  AsmPrinter &getAsmPrinter() const { return *Asm; }
-
-  /// Set the current output section to debug_info and change
-  /// the MC Dwarf version to \p DwarfVersion.
-  void switchToDebugInfoSection(unsigned DwarfVersion);
-
-  /// Emit the compilation unit header for \p Unit in the
-  /// debug_info section.
-  ///
-  /// As a side effect, this also switches the current Dwarf version
-  /// of the MC layer to the one of U.getOrigUnit().
-  void emitCompileUnitHeader(CompileUnit &Unit) override;
-
-  /// Recursively emit the DIE tree rooted at \p Die.
-  void emitDIE(DIE &Die) override;
-
-  /// Emit the abbreviation table \p Abbrevs to the debug_abbrev section.
-  void emitAbbrevs(const std::vector<std::unique_ptr<DIEAbbrev>> &Abbrevs,
-                   unsigned DwarfVersion) override;
-
-  /// Emit DIE containing warnings.
-  void emitPaperTrailWarningsDie(const Triple &Triple, DIE &Die) override;
-
-  /// Emit contents of section SecName From Obj.
-  void emitSectionContents(const object::ObjectFile &Obj,
-                           StringRef SecName) override;
-
-  /// Emit the string table described by \p Pool.
-  void emitStrings(const NonRelocatableStringpool &Pool) override;
-
-  /// Emit the swift_ast section stored in \p Buffer.
-  void emitSwiftAST(StringRef Buffer);
-
-  /// Emit debug_ranges for \p FuncRange by translating the
-  /// original \p Entries.
-  void emitRangesEntries(
-      int64_t UnitPcOffset, uint64_t OrigLowPc,
-      const FunctionIntervals::const_iterator &FuncRange,
-      const std::vector<DWARFDebugRangeList::RangeListEntry> &Entries,
-      unsigned AddressSize) override;
-
-  /// Emit debug_aranges entries for \p Unit and if \p DoRangesSection is true,
-  /// also emit the debug_ranges entries for the DW_TAG_compile_unit's
-  /// DW_AT_ranges attribute.
-  void emitUnitRangesEntries(CompileUnit &Unit, bool DoRangesSection) override;
-
-  uint64_t getRangesSectionSize() const override { return RangesSectionSize; }
-
-  /// Emit the debug_loc contribution for \p Unit by copying the entries from
-  /// \p Dwarf and offsetting them. Update the location attributes to point to
-  /// the new entries.
-  void emitLocationsForUnit(
-      const CompileUnit &Unit, DWARFContext &Dwarf,
-      std::function<void(StringRef, SmallVectorImpl<uint8_t> &)> ProcessExpr)
-      override;
-
-  /// Emit the line table described in \p Rows into the debug_line section.
-  void emitLineTableForUnit(MCDwarfLineTableParams Params,
-                            StringRef PrologueBytes, unsigned MinInstLength,
-                            std::vector<DWARFDebugLine::Row> &Rows,
-                            unsigned AdddressSize) override;
-
-  /// Copy the debug_line over to the updated binary while unobfuscating the
-  /// file names and directories.
-  void translateLineTable(DataExtractor LineData, uint64_t Offset) override;
-
-  /// Copy over the debug sections that are not modified when updating.
-  void copyInvariantDebugSection(const object::ObjectFile &Obj);
-
-  uint64_t getLineSectionSize() const override { return LineSectionSize; }
-
-  /// Emit the .debug_pubnames contribution for \p Unit.
-  void emitPubNamesForUnit(const CompileUnit &Unit) override;
-
-  /// Emit the .debug_pubtypes contribution for \p Unit.
-  void emitPubTypesForUnit(const CompileUnit &Unit) override;
-
-  /// Emit a CIE.
-  void emitCIE(StringRef CIEBytes) override;
-
-  /// Emit an FDE with data \p Bytes.
-  void emitFDE(uint32_t CIEOffset, uint32_t AddreSize, uint32_t Address,
-               StringRef Bytes) override;
-
-  /// Emit DWARF debug names.
-  void emitDebugNames(AccelTable<DWARF5AccelTableStaticData> &Table) override;
-
-  /// Emit Apple namespaces accelerator table.
-  void emitAppleNamespaces(
-      AccelTable<AppleAccelTableStaticOffsetData> &Table) override;
-
-  /// Emit Apple names accelerator table.
-  void
-  emitAppleNames(AccelTable<AppleAccelTableStaticOffsetData> &Table) override;
-
-  /// Emit Apple Objective-C accelerator table.
-  void
-  emitAppleObjc(AccelTable<AppleAccelTableStaticOffsetData> &Table) override;
-
-  /// Emit Apple type accelerator table.
-  void
-  emitAppleTypes(AccelTable<AppleAccelTableStaticTypeData> &Table) override;
-
-  uint64_t getFrameSectionSize() const override { return FrameSectionSize; }
-
-  uint64_t getDebugInfoSectionSize() const override {
-    return DebugInfoSectionSize;
-  }
-
-private:
-  /// \defgroup MCObjects MC layer objects constructed by the streamer
-  /// @{
-  std::unique_ptr<MCRegisterInfo> MRI;
-  std::unique_ptr<MCAsmInfo> MAI;
-  std::unique_ptr<MCObjectFileInfo> MOFI;
-  std::unique_ptr<MCContext> MC;
-  MCAsmBackend *MAB; // Owned by MCStreamer
-  std::unique_ptr<MCInstrInfo> MII;
-  std::unique_ptr<MCSubtargetInfo> MSTI;
-  MCInstPrinter *MIP; // Owned by AsmPrinter
-  MCCodeEmitter *MCE; // Owned by MCStreamer
-  MCStreamer *MS;     // Owned by AsmPrinter
-  std::unique_ptr<TargetMachine> TM;
-  std::unique_ptr<AsmPrinter> Asm;
-  /// @}
-
-  /// The file we stream the linked Dwarf to.
-  raw_fd_ostream &OutFile;
-
-  LinkOptions Options;
-
-  uint64_t RangesSectionSize = 0;
-  uint64_t LocSectionSize = 0;
-  uint64_t LineSectionSize = 0;
-  uint64_t FrameSectionSize = 0;
-  uint64_t DebugInfoSectionSize = 0;
-
-  /// Keep track of emitted CUs and their Unique ID.
-  struct EmittedUnit {
-    unsigned ID;
-    MCSymbol *LabelBegin;
-  };
-  std::vector<EmittedUnit> EmittedUnits;
-
-  /// Emit the pubnames or pubtypes section contribution for \p
-  /// Unit into \p Sec. The data is provided in \p Names.
-  void emitPubSectionForUnit(MCSection *Sec, StringRef Name,
-                             const CompileUnit &Unit,
-                             const std::vector<CompileUnit::AccelInfo> &Names);
-};
-
-} // end namespace dsymutil
-} // end namespace llvm
-
-#endif // LLVM_TOOLS_DSYMUTIL_DWARFSTREAMER_H
index 7e74b7c..3502ca6 100644 (file)
@@ -403,6 +403,12 @@ int main(int argc, char **argv) {
     StaticExt = "a";
     StaticDir = SharedDir = ActiveLibDir;
     StaticPrefix = SharedPrefix = "lib";
+  } else if (HostTriple.isOSOpenBSD()) {
+    SharedExt = "so";
+    SharedVersionedExt = ".so" ;
+    StaticExt = "a";
+    StaticDir = SharedDir = ActiveLibDir;
+    StaticPrefix = SharedPrefix = "lib";
   } else {
     // default to the unix values:
     SharedExt = "so";
@@ -419,7 +425,7 @@ int main(int argc, char **argv) {
 
   bool DyLibExists = false;
   const std::string DyLibName =
-      (SharedPrefix + "LLVM-" + SharedVersionedExt).str();
+      (SharedPrefix + "LLVM" + SharedVersionedExt).str();
 
   // If LLVM_LINK_DYLIB is ON, the single shared library will be returned
   // for "--libs", etc, if they exist. This behaviour can be overridden with
@@ -431,7 +437,12 @@ int main(int argc, char **argv) {
     if (DirSep == "\\") {
       std::replace(path.begin(), path.end(), '/', '\\');
     }
-    DyLibExists = sys::fs::exists(path);
+    // path does not include major.minor
+    if (HostTriple.isOSOpenBSD()) {
+      DyLibExists = true;
+    } else {
+      DyLibExists = sys::fs::exists(path);
+    }
     if (!DyLibExists) {
       // The shared library does not exist: don't error unless the user
       // explicitly passes --link-shared.
diff --git a/gnu/llvm/llvm/tools/llvm-exegesis/lib/Latency.cpp b/gnu/llvm/llvm/tools/llvm-exegesis/lib/Latency.cpp
deleted file mode 100644 (file)
index 9c1c087..0000000
+++ /dev/null
@@ -1,211 +0,0 @@
-//===-- Latency.cpp ---------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "Latency.h"
-
-#include "Assembler.h"
-#include "BenchmarkRunner.h"
-#include "MCInstrDescView.h"
-#include "PerfHelper.h"
-#include "Target.h"
-#include "llvm/ADT/STLExtras.h"
-#include "llvm/MC/MCInst.h"
-#include "llvm/MC/MCInstBuilder.h"
-#include "llvm/Support/FormatVariadic.h"
-
-namespace llvm {
-namespace exegesis {
-
-struct ExecutionClass {
-  ExecutionMode Mask;
-  const char *Description;
-} static const kExecutionClasses[] = {
-    {ExecutionMode::ALWAYS_SERIAL_IMPLICIT_REGS_ALIAS |
-         ExecutionMode::ALWAYS_SERIAL_TIED_REGS_ALIAS,
-     "Repeating a single implicitly serial instruction"},
-    {ExecutionMode::SERIAL_VIA_EXPLICIT_REGS,
-     "Repeating a single explicitly serial instruction"},
-    {ExecutionMode::SERIAL_VIA_MEMORY_INSTR |
-         ExecutionMode::SERIAL_VIA_NON_MEMORY_INSTR,
-     "Repeating two instructions"},
-};
-
-static constexpr size_t kMaxAliasingInstructions = 10;
-
-static std::vector<const Instruction *>
-computeAliasingInstructions(const LLVMState &State, const Instruction *Instr,
-                            size_t MaxAliasingInstructions,
-                            const BitVector &ForbiddenRegisters) {
-  // Randomly iterate the set of instructions.
-  std::vector<unsigned> Opcodes;
-  Opcodes.resize(State.getInstrInfo().getNumOpcodes());
-  std::iota(Opcodes.begin(), Opcodes.end(), 0U);
-  std::shuffle(Opcodes.begin(), Opcodes.end(), randomGenerator());
-
-  std::vector<const Instruction *> AliasingInstructions;
-  for (const unsigned OtherOpcode : Opcodes) {
-    if (OtherOpcode == Instr->Description.getOpcode())
-      continue;
-    const Instruction &OtherInstr = State.getIC().getInstr(OtherOpcode);
-    if (OtherInstr.hasMemoryOperands())
-      continue;
-    if (Instr->hasAliasingRegistersThrough(OtherInstr, ForbiddenRegisters))
-      AliasingInstructions.push_back(&OtherInstr);
-    if (AliasingInstructions.size() >= MaxAliasingInstructions)
-      break;
-  }
-  return AliasingInstructions;
-}
-
-static ExecutionMode getExecutionModes(const Instruction &Instr,
-                                       const BitVector &ForbiddenRegisters) {
-  ExecutionMode EM = ExecutionMode::UNKNOWN;
-  if (Instr.hasAliasingImplicitRegisters())
-    EM |= ExecutionMode::ALWAYS_SERIAL_IMPLICIT_REGS_ALIAS;
-  if (Instr.hasTiedRegisters())
-    EM |= ExecutionMode::ALWAYS_SERIAL_TIED_REGS_ALIAS;
-  if (Instr.hasMemoryOperands())
-    EM |= ExecutionMode::SERIAL_VIA_MEMORY_INSTR;
-  else {
-    if (Instr.hasAliasingRegisters(ForbiddenRegisters))
-      EM |= ExecutionMode::SERIAL_VIA_EXPLICIT_REGS;
-    if (Instr.hasOneUseOrOneDef())
-      EM |= ExecutionMode::SERIAL_VIA_NON_MEMORY_INSTR;
-  }
-  return EM;
-}
-
-static void appendCodeTemplates(const LLVMState &State,
-                                const Instruction *Instr,
-                                const BitVector &ForbiddenRegisters,
-                                ExecutionMode ExecutionModeBit,
-                                StringRef ExecutionClassDescription,
-                                std::vector<CodeTemplate> &CodeTemplates) {
-  assert(isEnumValue(ExecutionModeBit) && "Bit must be a power of two");
-  switch (ExecutionModeBit) {
-  case ExecutionMode::ALWAYS_SERIAL_IMPLICIT_REGS_ALIAS:
-    // Nothing to do, the instruction is always serial.
-    LLVM_FALLTHROUGH;
-  case ExecutionMode::ALWAYS_SERIAL_TIED_REGS_ALIAS: {
-    // Picking whatever value for the tied variable will make the instruction
-    // serial.
-    CodeTemplate CT;
-    CT.Execution = ExecutionModeBit;
-    CT.Info = ExecutionClassDescription;
-    CT.Instructions.push_back(Instr);
-    CodeTemplates.push_back(std::move(CT));
-    return;
-  }
-  case ExecutionMode::SERIAL_VIA_MEMORY_INSTR: {
-    // Select back-to-back memory instruction.
-    // TODO: Implement me.
-    return;
-  }
-  case ExecutionMode::SERIAL_VIA_EXPLICIT_REGS: {
-    // Making the execution of this instruction serial by selecting one def
-    // register to alias with one use register.
-    const AliasingConfigurations SelfAliasing(*Instr, *Instr);
-    assert(!SelfAliasing.empty() && !SelfAliasing.hasImplicitAliasing() &&
-           "Instr must alias itself explicitly");
-    InstructionTemplate IT(Instr);
-    // This is a self aliasing instruction so defs and uses are from the same
-    // instance, hence twice IT in the following call.
-    setRandomAliasing(SelfAliasing, IT, IT);
-    CodeTemplate CT;
-    CT.Execution = ExecutionModeBit;
-    CT.Info = ExecutionClassDescription;
-    CT.Instructions.push_back(std::move(IT));
-    CodeTemplates.push_back(std::move(CT));
-    return;
-  }
-  case ExecutionMode::SERIAL_VIA_NON_MEMORY_INSTR: {
-    // Select back-to-back non-memory instruction.
-    for (const auto *OtherInstr : computeAliasingInstructions(
-             State, Instr, kMaxAliasingInstructions, ForbiddenRegisters)) {
-      const AliasingConfigurations Forward(*Instr, *OtherInstr);
-      const AliasingConfigurations Back(*OtherInstr, *Instr);
-      InstructionTemplate ThisIT(Instr);
-      InstructionTemplate OtherIT(OtherInstr);
-      if (!Forward.hasImplicitAliasing())
-        setRandomAliasing(Forward, ThisIT, OtherIT);
-      if (!Back.hasImplicitAliasing())
-        setRandomAliasing(Back, OtherIT, ThisIT);
-      CodeTemplate CT;
-      CT.Execution = ExecutionModeBit;
-      CT.Info = ExecutionClassDescription;
-      CT.Instructions.push_back(std::move(ThisIT));
-      CT.Instructions.push_back(std::move(OtherIT));
-      CodeTemplates.push_back(std::move(CT));
-    }
-    return;
-  }
-  default:
-    llvm_unreachable("Unhandled enum value");
-  }
-}
-
-LatencySnippetGenerator::~LatencySnippetGenerator() = default;
-
-Expected<std::vector<CodeTemplate>>
-LatencySnippetGenerator::generateCodeTemplates(
-    const Instruction &Instr, const BitVector &ForbiddenRegisters) const {
-  std::vector<CodeTemplate> Results;
-  const ExecutionMode EM = getExecutionModes(Instr, ForbiddenRegisters);
-  for (const auto EC : kExecutionClasses) {
-    for (const auto ExecutionModeBit : getExecutionModeBits(EM & EC.Mask))
-      appendCodeTemplates(State, &Instr, ForbiddenRegisters, ExecutionModeBit,
-                          EC.Description, Results);
-    if (!Results.empty())
-      break;
-  }
-  if (Results.empty())
-    return make_error<Failure>(
-        "No strategy found to make the execution serial");
-  return std::move(Results);
-}
-
-LatencyBenchmarkRunner::LatencyBenchmarkRunner(const LLVMState &State,
-                                               InstructionBenchmark::ModeE Mode)
-    : BenchmarkRunner(State, Mode) {
-  assert((Mode == InstructionBenchmark::Latency ||
-          Mode == InstructionBenchmark::InverseThroughput) &&
-         "invalid mode");
-}
-
-LatencyBenchmarkRunner::~LatencyBenchmarkRunner() = default;
-
-Expected<std::vector<BenchmarkMeasure>> LatencyBenchmarkRunner::runMeasurements(
-    const FunctionExecutor &Executor) const {
-  // Cycle measurements include some overhead from the kernel. Repeat the
-  // measure several times and take the minimum value.
-  constexpr const int NumMeasurements = 30;
-  int64_t MinValue = std::numeric_limits<int64_t>::max();
-  const char *CounterName = State.getPfmCounters().CycleCounter;
-  for (size_t I = 0; I < NumMeasurements; ++I) {
-    auto ExpectedCounterValue = Executor.runAndMeasure(CounterName);
-    if (!ExpectedCounterValue)
-      return ExpectedCounterValue.takeError();
-    if (*ExpectedCounterValue < MinValue)
-      MinValue = *ExpectedCounterValue;
-  }
-  std::vector<BenchmarkMeasure> Result;
-  switch (Mode) {
-  case InstructionBenchmark::Latency:
-    Result = {BenchmarkMeasure::Create("latency", MinValue)};
-    break;
-  case InstructionBenchmark::InverseThroughput:
-    Result = {BenchmarkMeasure::Create("inverse_throughput", MinValue)};
-    break;
-  default:
-    break;
-  }
-  return std::move(Result);
-}
-
-} // namespace exegesis
-} // namespace llvm
diff --git a/gnu/llvm/llvm/tools/llvm-exegesis/lib/Latency.h b/gnu/llvm/llvm/tools/llvm-exegesis/lib/Latency.h
deleted file mode 100644 (file)
index 83d754d..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-//===-- Latency.h -----------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-///
-/// \file
-/// A BenchmarkRunner implementation to measure instruction latencies.
-///
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_TOOLS_LLVM_EXEGESIS_LATENCY_H
-#define LLVM_TOOLS_LLVM_EXEGESIS_LATENCY_H
-
-#include "BenchmarkRunner.h"
-#include "Error.h"
-#include "MCInstrDescView.h"
-#include "SnippetGenerator.h"
-
-namespace llvm {
-namespace exegesis {
-
-class LatencySnippetGenerator : public SnippetGenerator {
-public:
-  using SnippetGenerator::SnippetGenerator;
-  ~LatencySnippetGenerator() override;
-
-  Expected<std::vector<CodeTemplate>>
-  generateCodeTemplates(const Instruction &Instr,
-                        const BitVector &ForbiddenRegisters) const override;
-};
-
-class LatencyBenchmarkRunner : public BenchmarkRunner {
-public:
-  LatencyBenchmarkRunner(const LLVMState &State,
-                         InstructionBenchmark::ModeE Mode);
-  ~LatencyBenchmarkRunner() override;
-
-private:
-  Expected<std::vector<BenchmarkMeasure>>
-  runMeasurements(const FunctionExecutor &Executor) const override;
-};
-} // namespace exegesis
-} // namespace llvm
-
-#endif // LLVM_TOOLS_LLVM_EXEGESIS_LATENCY_H
diff --git a/gnu/llvm/llvm/tools/llvm-exegesis/lib/Uops.cpp b/gnu/llvm/llvm/tools/llvm-exegesis/lib/Uops.cpp
deleted file mode 100644 (file)
index 66319e3..0000000
+++ /dev/null
@@ -1,252 +0,0 @@
-//===-- Uops.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "Uops.h"
-
-#include "Assembler.h"
-#include "BenchmarkRunner.h"
-#include "MCInstrDescView.h"
-#include "Target.h"
-
-// FIXME: Load constants into registers (e.g. with fld1) to not break
-// instructions like x87.
-
-// Ideally we would like the only limitation on executing uops to be the issue
-// ports. Maximizing port pressure increases the likelihood that the load is
-// distributed evenly across possible ports.
-
-// To achieve that, one approach is to generate instructions that do not have
-// data dependencies between them.
-//
-// For some instructions, this is trivial:
-//    mov rax, qword ptr [rsi]
-//    mov rax, qword ptr [rsi]
-//    mov rax, qword ptr [rsi]
-//    mov rax, qword ptr [rsi]
-// For the above snippet, haswell just renames rax four times and executes the
-// four instructions two at a time on P23 and P0126.
-//
-// For some instructions, we just need to make sure that the source is
-// different from the destination. For example, IDIV8r reads from GPR and
-// writes to AX. We just need to ensure that the Var is assigned a
-// register which is different from AX:
-//    idiv bx
-//    idiv bx
-//    idiv bx
-//    idiv bx
-// The above snippet will be able to fully saturate the ports, while the same
-// with ax would issue one uop every `latency(IDIV8r)` cycles.
-//
-// Some instructions make this harder because they both read and write from
-// the same register:
-//    inc rax
-//    inc rax
-//    inc rax
-//    inc rax
-// This has a data dependency from each instruction to the next, limit the
-// number of instructions that can be issued in parallel.
-// It turns out that this is not a big issue on recent Intel CPUs because they
-// have heuristics to balance port pressure. In the snippet above, subsequent
-// instructions will end up evenly distributed on {P0,P1,P5,P6}, but some CPUs
-// might end up executing them all on P0 (just because they can), or try
-// avoiding P5 because it's usually under high pressure from vector
-// instructions.
-// This issue is even more important for high-latency instructions because
-// they increase the idle time of the CPU, e.g. :
-//    imul rax, rbx
-//    imul rax, rbx
-//    imul rax, rbx
-//    imul rax, rbx
-//
-// To avoid that, we do the renaming statically by generating as many
-// independent exclusive assignments as possible (until all possible registers
-// are exhausted) e.g.:
-//    imul rax, rbx
-//    imul rcx, rbx
-//    imul rdx, rbx
-//    imul r8,  rbx
-//
-// Some instruction even make the above static renaming impossible because
-// they implicitly read and write from the same operand, e.g. ADC16rr reads
-// and writes from EFLAGS.
-// In that case we just use a greedy register assignment and hope for the
-// best.
-
-namespace llvm {
-namespace exegesis {
-
-static SmallVector<const Variable *, 8>
-getVariablesWithTiedOperands(const Instruction &Instr) {
-  SmallVector<const Variable *, 8> Result;
-  for (const auto &Var : Instr.Variables)
-    if (Var.hasTiedOperands())
-      Result.push_back(&Var);
-  return Result;
-}
-
-UopsBenchmarkRunner::~UopsBenchmarkRunner() = default;
-
-UopsSnippetGenerator::~UopsSnippetGenerator() = default;
-
-void UopsSnippetGenerator::instantiateMemoryOperands(
-    const unsigned ScratchSpacePointerInReg,
-    std::vector<InstructionTemplate> &Instructions) const {
-  if (ScratchSpacePointerInReg == 0)
-    return; // no memory operands.
-  const auto &ET = State.getExegesisTarget();
-  const unsigned MemStep = ET.getMaxMemoryAccessSize();
-  const size_t OriginalInstructionsSize = Instructions.size();
-  size_t I = 0;
-  for (InstructionTemplate &IT : Instructions) {
-    ET.fillMemoryOperands(IT, ScratchSpacePointerInReg, I * MemStep);
-    ++I;
-  }
-
-  while (Instructions.size() < kMinNumDifferentAddresses) {
-    InstructionTemplate IT = Instructions[I % OriginalInstructionsSize];
-    ET.fillMemoryOperands(IT, ScratchSpacePointerInReg, I * MemStep);
-    ++I;
-    Instructions.push_back(std::move(IT));
-  }
-  assert(I * MemStep < BenchmarkRunner::ScratchSpace::kSize &&
-         "not enough scratch space");
-}
-
-static std::vector<InstructionTemplate> generateSnippetUsingStaticRenaming(
-    const LLVMState &State, const InstructionTemplate &IT,
-    const ArrayRef<const Variable *> TiedVariables,
-    const BitVector &ForbiddenRegisters) {
-  std::vector<InstructionTemplate> Instructions;
-  // Assign registers to variables in a round-robin manner. This is simple but
-  // ensures that the most register-constrained variable does not get starved.
-  std::vector<BitVector> PossibleRegsForVar;
-  for (const Variable *Var : TiedVariables) {
-    assert(Var);
-    const Operand &Op = IT.getInstr().getPrimaryOperand(*Var);
-    assert(Op.isReg());
-    BitVector PossibleRegs = Op.getRegisterAliasing().sourceBits();
-    remove(PossibleRegs, ForbiddenRegisters);
-    PossibleRegsForVar.push_back(std::move(PossibleRegs));
-  }
-  SmallVector<int, 2> Iterators(TiedVariables.size(), 0);
-  while (true) {
-    InstructionTemplate TmpIT = IT;
-    // Find a possible register for each variable in turn, marking the
-    // register as taken.
-    for (size_t VarId = 0; VarId < TiedVariables.size(); ++VarId) {
-      const int NextPossibleReg =
-          PossibleRegsForVar[VarId].find_next(Iterators[VarId]);
-      if (NextPossibleReg <= 0) {
-        return Instructions;
-      }
-      TmpIT.getValueFor(*TiedVariables[VarId]) =
-          MCOperand::createReg(NextPossibleReg);
-      // Bump iterator.
-      Iterators[VarId] = NextPossibleReg;
-      // Prevent other variables from using the register.
-      for (BitVector &OtherPossibleRegs : PossibleRegsForVar) {
-        OtherPossibleRegs.reset(NextPossibleReg);
-      }
-    }
-    Instructions.push_back(std::move(TmpIT));
-  }
-}
-
-Expected<std::vector<CodeTemplate>> UopsSnippetGenerator::generateCodeTemplates(
-    const Instruction &Instr, const BitVector &ForbiddenRegisters) const {
-  CodeTemplate CT;
-  CT.ScratchSpacePointerInReg =
-      Instr.hasMemoryOperands()
-          ? State.getExegesisTarget().getScratchMemoryRegister(
-                State.getTargetMachine().getTargetTriple())
-          : 0;
-  const AliasingConfigurations SelfAliasing(Instr, Instr);
-  InstructionTemplate IT(&Instr);
-  if (SelfAliasing.empty()) {
-    CT.Info = "instruction is parallel, repeating a random one.";
-    CT.Instructions.push_back(std::move(IT));
-    instantiateMemoryOperands(CT.ScratchSpacePointerInReg, CT.Instructions);
-    return getSingleton(std::move(CT));
-  }
-  if (SelfAliasing.hasImplicitAliasing()) {
-    CT.Info = "instruction is serial, repeating a random one.";
-    CT.Instructions.push_back(std::move(IT));
-    instantiateMemoryOperands(CT.ScratchSpacePointerInReg, CT.Instructions);
-    return getSingleton(std::move(CT));
-  }
-  const auto TiedVariables = getVariablesWithTiedOperands(Instr);
-  if (!TiedVariables.empty()) {
-    CT.Info = "instruction has tied variables, using static renaming.";
-    CT.Instructions = generateSnippetUsingStaticRenaming(
-        State, IT, TiedVariables, ForbiddenRegisters);
-    instantiateMemoryOperands(CT.ScratchSpacePointerInReg, CT.Instructions);
-    return getSingleton(std::move(CT));
-  }
-  // No tied variables, we pick random values for defs.
-  BitVector Defs(State.getRegInfo().getNumRegs());
-  for (const auto &Op : Instr.Operands) {
-    if (Op.isReg() && Op.isExplicit() && Op.isDef() && !Op.isMemory()) {
-      auto PossibleRegisters = Op.getRegisterAliasing().sourceBits();
-      // Do not use forbidden registers.
-      remove(PossibleRegisters, ForbiddenRegisters);
-      assert(PossibleRegisters.any() && "No register left to choose from");
-      const auto RandomReg = randomBit(PossibleRegisters);
-      Defs.set(RandomReg);
-      IT.getValueFor(Op) = MCOperand::createReg(RandomReg);
-    }
-  }
-  // And pick random use values that are not reserved and don't alias with defs.
-  const auto DefAliases = getAliasedBits(State.getRegInfo(), Defs);
-  for (const auto &Op : Instr.Operands) {
-    if (Op.isReg() && Op.isExplicit() && Op.isUse() && !Op.isMemory()) {
-      auto PossibleRegisters = Op.getRegisterAliasing().sourceBits();
-      remove(PossibleRegisters, ForbiddenRegisters);
-      remove(PossibleRegisters, DefAliases);
-      assert(PossibleRegisters.any() && "No register left to choose from");
-      const auto RandomReg = randomBit(PossibleRegisters);
-      IT.getValueFor(Op) = MCOperand::createReg(RandomReg);
-    }
-  }
-  CT.Info =
-      "instruction has no tied variables picking Uses different from defs";
-  CT.Instructions.push_back(std::move(IT));
-  instantiateMemoryOperands(CT.ScratchSpacePointerInReg, CT.Instructions);
-  return getSingleton(std::move(CT));
-}
-
-Expected<std::vector<BenchmarkMeasure>>
-UopsBenchmarkRunner::runMeasurements(const FunctionExecutor &Executor) const {
-  std::vector<BenchmarkMeasure> Result;
-  const PfmCountersInfo &PCI = State.getPfmCounters();
-  // Uops per port.
-  for (const auto *IssueCounter = PCI.IssueCounters,
-                  *IssueCounterEnd = PCI.IssueCounters + PCI.NumIssueCounters;
-       IssueCounter != IssueCounterEnd; ++IssueCounter) {
-    if (!IssueCounter->Counter)
-      continue;
-    auto ExpectedCounterValue = Executor.runAndMeasure(IssueCounter->Counter);
-    if (!ExpectedCounterValue)
-      return ExpectedCounterValue.takeError();
-    Result.push_back(BenchmarkMeasure::Create(IssueCounter->ProcResName,
-                                              *ExpectedCounterValue));
-  }
-  // NumMicroOps.
-  if (const char *const UopsCounter = PCI.UopsCounter) {
-    auto ExpectedCounterValue = Executor.runAndMeasure(UopsCounter);
-    if (!ExpectedCounterValue)
-      return ExpectedCounterValue.takeError();
-    Result.push_back(
-        BenchmarkMeasure::Create("NumMicroOps", *ExpectedCounterValue));
-  }
-  return std::move(Result);
-}
-
-constexpr const size_t UopsSnippetGenerator::kMinNumDifferentAddresses;
-
-} // namespace exegesis
-} // namespace llvm
diff --git a/gnu/llvm/llvm/tools/llvm-exegesis/lib/Uops.h b/gnu/llvm/llvm/tools/llvm-exegesis/lib/Uops.h
deleted file mode 100644 (file)
index 4810570..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-//===-- Uops.h --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-///
-/// \file
-/// A BenchmarkRunner implementation to measure uop decomposition.
-///
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_TOOLS_LLVM_EXEGESIS_UOPS_H
-#define LLVM_TOOLS_LLVM_EXEGESIS_UOPS_H
-
-#include "BenchmarkRunner.h"
-#include "SnippetGenerator.h"
-
-namespace llvm {
-namespace exegesis {
-
-class UopsSnippetGenerator : public SnippetGenerator {
-public:
-  using SnippetGenerator::SnippetGenerator;
-  ~UopsSnippetGenerator() override;
-
-  Expected<std::vector<CodeTemplate>>
-  generateCodeTemplates(const Instruction &Instr,
-                        const BitVector &ForbiddenRegisters) const override;
-
-  static constexpr const size_t kMinNumDifferentAddresses = 6;
-
-private:
-  // Instantiates memory operands within a snippet.
-  // To make computations as parallel as possible, we generate independant
-  // memory locations for instructions that load and store. If there are less
-  // than kMinNumDifferentAddresses in the original snippet, we duplicate
-  // instructions until there are this number of instructions.
-  // For example, assuming kMinNumDifferentAddresses=5 and
-  // getMaxMemoryAccessSize()=64, if the original snippet is:
-  //   mov eax, [memory]
-  // we might generate:
-  //   mov eax, [rdi]
-  //   mov eax, [rdi + 64]
-  //   mov eax, [rdi + 128]
-  //   mov eax, [rdi + 192]
-  //   mov eax, [rdi + 256]
-  // If the original snippet is:
-  //   mov eax, [memory]
-  //   add eax, [memory]
-  // we might generate:
-  //   mov eax, [rdi]
-  //   add eax, [rdi + 64]
-  //   mov eax, [rdi + 128]
-  //   add eax, [rdi + 192]
-  //   mov eax, [rdi + 256]
-  void instantiateMemoryOperands(
-      unsigned ScratchSpaceReg,
-      std::vector<InstructionTemplate> &SnippetTemplate) const;
-};
-
-class UopsBenchmarkRunner : public BenchmarkRunner {
-public:
-  UopsBenchmarkRunner(const LLVMState &State)
-      : BenchmarkRunner(State, InstructionBenchmark::Uops) {}
-  ~UopsBenchmarkRunner() override;
-
-  static constexpr const size_t kMinNumDifferentAddresses = 6;
-
-private:
-  Expected<std::vector<BenchmarkMeasure>>
-  runMeasurements(const FunctionExecutor &Executor) const override;
-};
-
-} // namespace exegesis
-} // namespace llvm
-
-#endif // LLVM_TOOLS_LLVM_EXEGESIS_UOPS_H
diff --git a/gnu/llvm/llvm/unittests/ADT/MakeUniqueTest.cpp b/gnu/llvm/llvm/unittests/ADT/MakeUniqueTest.cpp
deleted file mode 100644 (file)
index d643d09..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-//===- llvm/unittest/ADT/MakeUniqueTest.cpp - std::make_unique unit tests ------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/ADT/STLExtras.h"
-#include "gtest/gtest.h"
-#include <tuple>
-using namespace llvm;
-
-namespace {
-
-TEST(MakeUniqueTest, SingleObject) {
-  auto p0 = std::make_unique<int>();
-  EXPECT_TRUE((bool)p0);
-  EXPECT_EQ(0, *p0);
-
-  auto p1 = std::make_unique<int>(5);
-  EXPECT_TRUE((bool)p1);
-  EXPECT_EQ(5, *p1);
-
-  auto p2 = std::make_unique<std::tuple<int, int>>(0, 1);
-  EXPECT_TRUE((bool)p2);
-  EXPECT_EQ(std::make_tuple(0, 1), *p2);
-
-  auto p3 = std::make_unique<std::tuple<int, int, int>>(0, 1, 2);
-  EXPECT_TRUE((bool)p3);
-  EXPECT_EQ(std::make_tuple(0, 1, 2), *p3);
-
-  auto p4 = std::make_unique<std::tuple<int, int, int, int>>(0, 1, 2, 3);
-  EXPECT_TRUE((bool)p4);
-  EXPECT_EQ(std::make_tuple(0, 1, 2, 3), *p4);
-
-  auto p5 = std::make_unique<std::tuple<int, int, int, int, int>>(0, 1, 2, 3, 4);
-  EXPECT_TRUE((bool)p5);
-  EXPECT_EQ(std::make_tuple(0, 1, 2, 3, 4), *p5);
-
-  auto p6 =
-      std::make_unique<std::tuple<int, int, int, int, int, int>>(0, 1, 2, 3, 4, 5);
-  EXPECT_TRUE((bool)p6);
-  EXPECT_EQ(std::make_tuple(0, 1, 2, 3, 4, 5), *p6);
-
-  auto p7 = std::make_unique<std::tuple<int, int, int, int, int, int, int>>(
-      0, 1, 2, 3, 4, 5, 6);
-  EXPECT_TRUE((bool)p7);
-  EXPECT_EQ(std::make_tuple(0, 1, 2, 3, 4, 5, 6), *p7);
-
-  auto p8 = std::make_unique<std::tuple<int, int, int, int, int, int, int, int>>(
-      0, 1, 2, 3, 4, 5, 6, 7);
-  EXPECT_TRUE((bool)p8);
-  EXPECT_EQ(std::make_tuple(0, 1, 2, 3, 4, 5, 6, 7), *p8);
-
-  auto p9 =
-      std::make_unique<std::tuple<int, int, int, int, int, int, int, int, int>>(
-          0, 1, 2, 3, 4, 5, 6, 7, 8);
-  EXPECT_TRUE((bool)p9);
-  EXPECT_EQ(std::make_tuple(0, 1, 2, 3, 4, 5, 6, 7, 8), *p9);
-
-  auto p10 =
-      std::make_unique<std::tuple<int, int, int, int, int, int, int, int, int, int>>(
-          0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
-  EXPECT_TRUE((bool)p10);
-  EXPECT_EQ(std::make_tuple(0, 1, 2, 3, 4, 5, 6, 7, 8, 9), *p10);
-}
-
-TEST(MakeUniqueTest, Array) {
-  auto p1 = std::make_unique<int[]>(2);
-  EXPECT_TRUE((bool)p1);
-  EXPECT_EQ(0, p1[0]);
-  EXPECT_EQ(0, p1[1]);
-}
-}
diff --git a/gnu/llvm/llvm/unittests/Analysis/OrderedBasicBlockTest.cpp b/gnu/llvm/llvm/unittests/Analysis/OrderedBasicBlockTest.cpp
deleted file mode 100644 (file)
index 4cccb38..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-//===- OrderedBasicBlockTest.cpp - OrderedBasicBlock unit tests -----------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/Analysis/OrderedBasicBlock.h"
-#include "llvm/AsmParser/Parser.h"
-#include "llvm/IR/BasicBlock.h"
-#include "llvm/IR/Function.h"
-#include "llvm/IR/LLVMContext.h"
-#include "llvm/IR/Module.h"
-#include "llvm/Support/DataTypes.h"
-#include "llvm/Support/SourceMgr.h"
-#include "gtest/gtest.h"
-
-namespace llvm {
-namespace {
-
-class OrderedBasicBlockTest : public testing::Test {
-protected:
-  LLVMContext C;
-
-  std::unique_ptr<Module> makeLLVMModule() {
-    const char *ModuleString = R"(define i32 @f(i32 %x) {
-                                    %add = add i32 %x, 42
-                                    ret i32 %add
-                                  })";
-    SMDiagnostic Err;
-    auto foo = parseAssemblyString(ModuleString, Err, C);
-    return foo;
-  }
-};
-
-TEST_F(OrderedBasicBlockTest, Basic) {
-  auto M = makeLLVMModule();
-  Function *F = M->getFunction("f");
-  BasicBlock::iterator I = F->front().begin();
-  Instruction *Add = &*I++;
-  Instruction *Ret = &*I++;
-
-  OrderedBasicBlock OBB(&F->front());
-  // Intentionally duplicated to verify cached and uncached are the same.
-  EXPECT_FALSE(OBB.dominates(Add, Add));
-  EXPECT_FALSE(OBB.dominates(Add, Add));
-  EXPECT_TRUE(OBB.dominates(Add, Ret));
-  EXPECT_TRUE(OBB.dominates(Add, Ret));
-  EXPECT_FALSE(OBB.dominates(Ret, Add));
-  EXPECT_FALSE(OBB.dominates(Ret, Add));
-  EXPECT_FALSE(OBB.dominates(Ret, Ret));
-  EXPECT_FALSE(OBB.dominates(Ret, Ret));
-}
-
-} // end anonymous namespace
-} // end namespace llvm
diff --git a/gnu/llvm/llvm/unittests/Analysis/OrderedInstructionsTest.cpp b/gnu/llvm/llvm/unittests/Analysis/OrderedInstructionsTest.cpp
deleted file mode 100644 (file)
index 473fe7f..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-//===- OrderedInstructions.cpp - Unit tests for OrderedInstructions  ------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/Analysis/OrderedInstructions.h"
-#include "llvm/IR/BasicBlock.h"
-#include "llvm/IR/Dominators.h"
-#include "llvm/IR/IRBuilder.h"
-#include "llvm/IR/Instructions.h"
-#include "llvm/IR/LLVMContext.h"
-#include "llvm/IR/Module.h"
-#include "gtest/gtest.h"
-
-using namespace llvm;
-
-/// Check intra-basicblock and inter-basicblock dominance using
-/// OrderedInstruction.
-TEST(OrderedInstructionsTest, DominanceTest) {
-  LLVMContext Ctx;
-  Module M("test", Ctx);
-  IRBuilder<> B(Ctx);
-  FunctionType *FTy =
-      FunctionType::get(Type::getVoidTy(Ctx), {B.getInt8PtrTy()}, false);
-  Function *F = Function::Create(FTy, Function::ExternalLinkage, "f", M);
-
-  // Create the function as follow and check for dominance relation.
-  //
-  // test():
-  //  bbx:
-  //    loadx;
-  //    loady;
-  //  bby:
-  //    loadz;
-  //    return;
-  //
-  // More specifically, check for loadx -> (dominates) loady,
-  // loady -> loadx and loady -> loadz.
-  //
-  // Create BBX with 2 loads.
-  BasicBlock *BBX = BasicBlock::Create(Ctx, "bbx", F);
-  B.SetInsertPoint(BBX);
-  Argument *PointerArg = &*F->arg_begin();
-  LoadInst *LoadInstX = B.CreateLoad(B.getInt8Ty(), PointerArg);
-  LoadInst *LoadInstY = B.CreateLoad(B.getInt8Ty(), PointerArg);
-
-  // Create BBY with 1 load.
-  BasicBlock *BBY = BasicBlock::Create(Ctx, "bby", F);
-  B.SetInsertPoint(BBY);
-  LoadInst *LoadInstZ = B.CreateLoad(B.getInt8Ty(), PointerArg);
-  B.CreateRet(LoadInstZ);
-  std::unique_ptr<DominatorTree> DT(new DominatorTree(*F));
-  OrderedInstructions OI(&*DT);
-
-  // Intra-BB dominance test.
-  EXPECT_TRUE(OI.dominates(LoadInstX, LoadInstY));
-  EXPECT_FALSE(OI.dominates(LoadInstY, LoadInstX));
-
-  // Inter-BB dominance test.
-  EXPECT_TRUE(OI.dominates(LoadInstY, LoadInstZ));
-}
diff --git a/gnu/llvm/llvm/unittests/IR/WaymarkTest.cpp b/gnu/llvm/llvm/unittests/IR/WaymarkTest.cpp
deleted file mode 100644 (file)
index 2f64fe0..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-//===- llvm/unittest/IR/WaymarkTest.cpp - getUser() unit tests ------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// we perform white-box tests
-//
-#include "llvm/IR/Constants.h"
-#include "llvm/IR/Function.h"
-#include "llvm/IR/Instructions.h"
-#include "llvm/IR/LLVMContext.h"
-#include "gtest/gtest.h"
-#include <algorithm>
-
-namespace llvm {
-namespace {
-
-TEST(WaymarkTest, NativeArray) {
-  LLVMContext Context;
-  static uint8_t tail[22] = "s02s33s30y2y0s1x0syxS";
-  Value * values[22];
-  std::transform(tail, tail + 22, values, [&](char c) {
-    return ConstantInt::get(Type::getInt8Ty(Context), c);
-  });
-  FunctionType *FT = FunctionType::get(Type::getVoidTy(Context), true);
-  std::unique_ptr<Function> F(
-      Function::Create(FT, GlobalValue::ExternalLinkage));
-  const CallInst *A = CallInst::Create(F.get(), makeArrayRef(values));
-  ASSERT_NE(A, (const CallInst*)nullptr);
-  ASSERT_EQ(1U + 22, A->getNumOperands());
-  const Use *U = &A->getOperandUse(0);
-  const Use *Ue = &A->getOperandUse(22);
-  for (; U != Ue; ++U)
-  {
-    EXPECT_EQ(A, U->getUser());
-  }
-  delete A;
-}
-
-TEST(WaymarkTest, TwoBit) {
-  Use* many = (Use*)calloc(sizeof(Use), 8212 + 1);
-  ASSERT_TRUE(many);
-  Use::initTags(many, many + 8212);
-  for (Use *U = many, *Ue = many + 8212 - 1; U != Ue; ++U)
-  {
-    EXPECT_EQ(reinterpret_cast<User *>(Ue + 1), U->getUser());
-  }
-  free(many);
-}
-
-}  // end anonymous namespace
-}  // end namespace llvm
diff --git a/gnu/llvm/llvm/unittests/Support/StringPool.cpp b/gnu/llvm/llvm/unittests/Support/StringPool.cpp
deleted file mode 100644 (file)
index 0a540e9..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-//===- llvm/unittest/Support/StringPoiil.cpp - StringPool tests -----------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/Support/StringPool.h"
-#include "gtest/gtest.h"
-
-using namespace llvm;
-
-namespace {
-
-TEST(PooledStringPtrTest, OperatorEquals) {
-  StringPool pool;
-  const PooledStringPtr a = pool.intern("a");
-  const PooledStringPtr b = pool.intern("b");
-  EXPECT_FALSE(a == b);
-}
-
-TEST(PooledStringPtrTest, OperatorNotEquals) {
-  StringPool pool;
-  const PooledStringPtr a = pool.intern("a");
-  const PooledStringPtr b = pool.intern("b");
-  EXPECT_TRUE(a != b);
-}
-
-}
diff --git a/gnu/llvm/llvm/utils/GetRepositoryPath b/gnu/llvm/llvm/utils/GetRepositoryPath
deleted file mode 100755 (executable)
index 2d1122e..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-usage() {
-  echo "usage: $0 <source root>"
-  echo "  Prints the source control repository path of the given source"
-  echo "  directory, the exact format of the revision string depends on the"
-  echo "  source control system. If the source control system isn't known,"
-  echo "  the output is empty and the exit code is 1."
-  exit 1
-}
-
-if [ $# != 1 ] || [ ! -d $1 ]; then
-  usage;
-fi
-
-cd $1
-if [ -d .svn ]; then
-  svn info | grep '^URL:' | cut -d: -f2-
-elif [ -f .git/svn/.metadata ]; then
-  git svn info | grep 'URL:' | cut -d: -f2-
-elif [ -d .git ]; then
-  git remote -v | grep 'fetch' | awk '{ print $2 }' | head -n1
-else
-  exit 1;
-fi
-
-exit 0
diff --git a/gnu/llvm/llvm/utils/git-svn/git-llvm b/gnu/llvm/llvm/utils/git-svn/git-llvm
deleted file mode 100755 (executable)
index bc60e02..0000000
+++ /dev/null
@@ -1,331 +0,0 @@
-#!/usr/bin/env python
-#
-# ======- git-llvm - LLVM Git Help Integration ---------*- python -*--========#
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#
-# ==------------------------------------------------------------------------==#
-
-"""
-git-llvm integration
-====================
-
-This file provides integration for git.
-
-The git llvm push sub-command can be used to push changes to GitHub.  It is
-designed to be a thin wrapper around git, and its main purpose is to
-detect and prevent merge commits from being pushed to the main repository.
-
-Usage:
-
-git-llvm push <upstream-branch>
-
-This will push changes from the current HEAD to the branch <upstream-branch>.
-
-"""
-
-from __future__ import print_function
-import argparse
-import collections
-import os
-import re
-import shutil
-import subprocess
-import sys
-import time
-import getpass
-assert sys.version_info >= (2, 7)
-
-try:
-    dict.iteritems
-except AttributeError:
-    # Python 3
-    def iteritems(d):
-        return iter(d.items())
-else:
-    # Python 2
-    def iteritems(d):
-        return d.iteritems()
-
-try:
-    # Python 3
-    from shlex import quote
-except ImportError:
-    # Python 2
-    from pipes import quote
-
-# It's *almost* a straightforward mapping from the monorepo to svn...
-LLVM_MONOREPO_SVN_MAPPING = {
-    d: (d + '/trunk')
-    for d in [
-        'clang-tools-extra',
-        'compiler-rt',
-        'debuginfo-tests',
-        'dragonegg',
-        'klee',
-        'libc',
-        'libclc',
-        'libcxx',
-        'libcxxabi',
-        'libunwind',
-        'lld',
-        'lldb',
-        'llgo',
-        'llvm',
-        'openmp',
-        'parallel-libs',
-        'polly',
-        'pstl',
-    ]
-}
-LLVM_MONOREPO_SVN_MAPPING.update({'clang': 'cfe/trunk'})
-LLVM_MONOREPO_SVN_MAPPING.update({'': 'monorepo-root/trunk'})
-
-SPLIT_REPO_NAMES = {'llvm-' + d: d + '/trunk'
-                    for d in ['www', 'zorg', 'test-suite', 'lnt']}
-
-VERBOSE = False
-QUIET = False
-dev_null_fd = None
-
-GIT_ORG = 'llvm'
-GIT_REPO = 'llvm-project'
-GIT_URL = 'github.com/{}/{}.git'.format(GIT_ORG, GIT_REPO)
-
-
-def eprint(*args, **kwargs):
-    print(*args, file=sys.stderr, **kwargs)
-
-
-def log(*args, **kwargs):
-    if QUIET:
-        return
-    print(*args, **kwargs)
-
-
-def log_verbose(*args, **kwargs):
-    if not VERBOSE:
-        return
-    print(*args, **kwargs)
-
-
-def die(msg):
-    eprint(msg)
-    sys.exit(1)
-
-
-def ask_confirm(prompt):
-    # Python 2/3 compatibility
-    try:
-        read_input = raw_input
-    except NameError:
-        read_input = input
-
-    while True:
-        query = read_input('%s (y/N): ' % (prompt))
-        if query.lower() not in ['y','n', '']:
-           print('Expect y or n!')
-           continue
-        return query.lower() == 'y'
-
-
-def get_dev_null():
-    """Lazily create a /dev/null fd for use in shell()"""
-    global dev_null_fd
-    if dev_null_fd is None:
-        dev_null_fd = open(os.devnull, 'w')
-    return dev_null_fd
-
-
-def shell(cmd, strip=True, cwd=None, stdin=None, die_on_failure=True,
-          ignore_errors=False, text=True, print_raw_stderr=False):
-    # Escape args when logging for easy repro.
-    quoted_cmd = [quote(arg) for arg in cmd]
-    log_verbose('Running in %s: %s' % (cwd, ' '.join(quoted_cmd)))
-
-    err_pipe = subprocess.PIPE
-    if ignore_errors:
-        # Silence errors if requested.
-        err_pipe = get_dev_null()
-
-    start = time.time()
-    p = subprocess.Popen(cmd, cwd=cwd, stdout=subprocess.PIPE, stderr=err_pipe,
-                         stdin=subprocess.PIPE,
-                         universal_newlines=text)
-    stdout, stderr = p.communicate(input=stdin)
-    elapsed = time.time() - start
-
-    log_verbose('Command took %0.1fs' % elapsed)
-
-    if p.returncode == 0 or ignore_errors:
-        if stderr and not ignore_errors:
-            if not print_raw_stderr:
-                eprint('`%s` printed to stderr:' % ' '.join(quoted_cmd))
-            eprint(stderr.rstrip())
-        if strip:
-            if text:
-                stdout = stdout.rstrip('\r\n')
-            else:
-                stdout = stdout.rstrip(b'\r\n')
-        if VERBOSE:
-            for l in stdout.splitlines():
-                log_verbose("STDOUT: %s" % l)
-        return stdout
-    err_msg = '`%s` returned %s' % (' '.join(quoted_cmd), p.returncode)
-    eprint(err_msg)
-    if stderr:
-        eprint(stderr.rstrip())
-    if die_on_failure:
-        sys.exit(2)
-    raise RuntimeError(err_msg)
-
-
-def git(*cmd, **kwargs):
-    return shell(['git'] + list(cmd), **kwargs)
-
-
-def svn(cwd, *cmd, **kwargs):
-    return shell(['svn'] + list(cmd), cwd=cwd, **kwargs)
-
-
-def program_exists(cmd):
-    if sys.platform == 'win32' and not cmd.endswith('.exe'):
-        cmd += '.exe'
-    for path in os.environ["PATH"].split(os.pathsep):
-        if os.access(os.path.join(path, cmd), os.X_OK):
-            return True
-    return False
-
-
-def get_fetch_url():
-    return 'https://{}'.format(GIT_URL)
-
-
-def get_push_url(user='', ssh=False):
-
-    if ssh:
-        return 'ssh://git@{}'.format(GIT_URL)
-
-    return 'https://{}'.format(GIT_URL)
-
-
-def get_revs_to_push(branch):
-    # Fetch the latest upstream to determine which commits will be pushed.
-    git('fetch', get_fetch_url(), branch)
-
-    commits = git('rev-list', '--ancestry-path', 'FETCH_HEAD..HEAD').splitlines()
-    # Reverse the order so we commit the oldest commit first
-    commits.reverse()
-    return commits
-
-
-def git_push_one_rev(rev, dry_run, branch, ssh):
-    # Check if this a merge commit by counting the number of parent commits.
-    # More than 1 parent commmit means this is a merge.
-    num_parents = len(git('show', '--no-patch', '--format="%P"', rev).split())
-
-    if num_parents > 1:
-        raise Exception("Merge commit detected, cannot push ", rev)
-
-    if num_parents != 1:
-        raise Exception("Error detecting number of parents for ", rev)
-
-    if dry_run:
-        print("[DryRun] Would push", rev)
-        return
-
-    # Second push to actually push the commit
-    git('push', get_push_url(ssh=ssh), '{}:{}'.format(rev, branch), print_raw_stderr=True)
-
-
-def cmd_push(args):
-    '''Push changes to git:'''
-    dry_run = args.dry_run
-
-    revs = get_revs_to_push(args.branch)
-
-    if not revs:
-        die('Nothing to push')
-
-    log('%sPushing %d commit%s:\n%s' %
-        ('[DryRun] ' if dry_run else '', len(revs),
-         's' if len(revs) != 1 else '',
-         '\n'.join('  ' + git('show', '--oneline', '--quiet', c)
-                   for c in revs)))
-
-    # Ask confirmation if multiple commits are about to be pushed
-    if not args.force and len(revs) > 1:
-        if not ask_confirm("Are you sure you want to create %d commits?" % len(revs)):
-            die("Aborting")
-
-    for r in revs:
-        git_push_one_rev(r, dry_run, args.branch, args.ssh)
-
-
-if __name__ == '__main__':
-    if not program_exists('git'):
-        die('error: git-llvm needs git command, but git is not installed.')
-
-    argv = sys.argv[1:]
-    p = argparse.ArgumentParser(
-        prog='git llvm', formatter_class=argparse.RawDescriptionHelpFormatter,
-        description=__doc__)
-    subcommands = p.add_subparsers(title='subcommands',
-                                   description='valid subcommands',
-                                   help='additional help')
-    verbosity_group = p.add_mutually_exclusive_group()
-    verbosity_group.add_argument('-q', '--quiet', action='store_true',
-                                 help='print less information')
-    verbosity_group.add_argument('-v', '--verbose', action='store_true',
-                                 help='print more information')
-
-    parser_push = subcommands.add_parser(
-        'push', description=cmd_push.__doc__,
-        help='push changes back to the LLVM SVN repository')
-    parser_push.add_argument(
-        '-n',
-        '--dry-run',
-        dest='dry_run',
-        action='store_true',
-        help='Do everything other than commit to svn.  Leaves junk in the svn '
-        'repo, so probably will not work well if you try to commit more '
-        'than one rev.')
-    parser_push.add_argument(
-        '-s',
-        '--ssh',
-        dest='ssh',
-        action='store_true',
-        help='Use the SSH protocol for authentication, '
-        'instead of HTTPS with username and password.')
-    parser_push.add_argument(
-        '-f',
-        '--force',
-        action='store_true',
-        help='Do not ask for confirmation when pushing multiple commits.')
-    parser_push.add_argument(
-        'branch',
-        metavar='GIT_BRANCH',
-        type=str,
-        default='master',
-        nargs='?',
-        help="branch to push (default: everything not in the branch's "
-        'upstream)')
-    parser_push.set_defaults(func=cmd_push)
-
-    args = p.parse_args(argv)
-    VERBOSE = args.verbose
-    QUIET = args.quiet
-
-    # Python3 workaround, for when not arguments are provided.
-    # See https://bugs.python.org/issue16308
-    try:
-        func = args.func
-    except AttributeError:
-        # No arguments or subcommands were given.
-        parser.print_help()
-        parser.exit()
-
-    # Dispatch to the right subcommand
-    args.func(args)
diff --git a/gnu/llvm/llvm/utils/git-svn/git-svnrevert b/gnu/llvm/llvm/utils/git-svn/git-svnrevert
deleted file mode 100755 (executable)
index 4185ee7..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/bin/bash
-
-if [ $# -ne 1 ]; then
-    echo "Invalid arguments!"
-    echo "$0 <rNNNNNN | git-hash>"
-    exit 1
-fi
-
-if [ -n "$(git status -uno -s --porcelain)" ]; then
-    echo "You have unstashed changes. Please stash and then revert."
-    git status -uno
-    exit 1
-fi
-
-COMMIT=$1
-OTHER=$(git svn find-rev "$COMMIT")
-if [ $? -ne 0 ] || [ "$OTHER" = "" ]; then
-    echo "Error! Could not find an svn/git revision for commit $COMMIT!"
-    echo
-    echo "Possible problems are:"
-    echo "  * Your revision number ($COMMIT) is wrong"
-    echo "  * This tree is not up to date (before that commit)"
-    echo "  * This commit in in another three (llvm, clang, compiler-rt, etc)"
-    exit 1
-fi
-
-if [ -n "$(echo $COMMIT | grep '^r[0-9]\+')" ]; then
-  SVN=`echo $COMMIT | sed -e 's/^r//'`
-  GIT=$OTHER
-else
-  SVN=$OTHER
-  GIT=$COMMIT
-fi
-
-# Grab the one line message for our revert commit message.
-ONE_LINE_MSG=$(git log --oneline $GIT -1 | cut -f2- -d " ")
-
-# Revert the commit.
-git revert --no-commit $GIT 2>/dev/null
-if [ $? -ne 0 ]; then
-    echo "Error! Failed to revert commit r$SVN. Resetting to head."
-    git reset --hard HEAD
-    exit 1
-fi
-
-# Create a template in our .git directory.
-TEMPLATE="`git rev-parse --git-dir`/git-svn-revert-template"
-cat > $TEMPLATE <<EOF
-Revert "$ONE_LINE_MSG"
-
-This reverts commit r$SVN.
-EOF
-
-# Begin the commit but give our user an opportunity to edit it.
-git commit --file="$TEMPLATE" --edit
-if [ $? -ne 0 ]; then
-    echo "Error! Failed to commit reverting commit for commit r$SVN. Reverting to head."
-    git reset --hard HEAD
-    rm -rf $TEMPLATE
-    exit 1
-fi
-
-rm -rf $TEMPLATE
-
diff --git a/gnu/llvm/llvm/utils/git-svn/git-svnup b/gnu/llvm/llvm/utils/git-svn/git-svnup
deleted file mode 100755 (executable)
index 3321f6b..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/bash
-
-if [ -n "`git status -uno -s --porcelain`" ]; then
-    echo "You have unstashed changes. Can not update repository..."
-    git status -uno
-    exit 1
-fi
-
-git fetch
-OLD_BRANCH=$(git rev-parse --abbrev-ref HEAD)
-git checkout master 2> /dev/null
-git svn rebase -l
-git checkout $OLD_BRANCH 2> /dev/null
-
-exit 0
diff --git a/gnu/llvm/llvm/utils/gn/secondary/llvm/lib/Target/X86/Utils/BUILD.gn b/gnu/llvm/llvm/utils/gn/secondary/llvm/lib/Target/X86/Utils/BUILD.gn
deleted file mode 100644 (file)
index 6faf11c..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-static_library("Utils") {
-  output_name = "LLVMX86Utils"
-  deps = [
-    "//llvm/lib/Support",
-  ]
-  sources = [
-    "X86ShuffleDecode.cpp",
-  ]
-}
diff --git a/gnu/llvm/llvm/utils/lit/tests/Inputs/shtest-format/argv0.txt b/gnu/llvm/llvm/utils/lit/tests/Inputs/shtest-format/argv0.txt
deleted file mode 100644 (file)
index 2ff2890..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# Check that we route argv[0] as it was written, instead of the resolved
-# path. This is important for some tools, in particular '[' which at least on OS
-# X only recognizes that it is in '['-mode when its argv[0] is exactly
-# '['. Otherwise it will refuse to accept the trailing closing bracket.
-#
-# RUN: [ "A" = "A" ]
diff --git a/gnu/llvm/llvm/utils/release/merge-git.sh b/gnu/llvm/llvm/utils/release/merge-git.sh
deleted file mode 100755 (executable)
index 33162f6..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/bin/bash
-#===-- merge-git.sh - Merge commit to the stable branch --------------------===#
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#
-#===------------------------------------------------------------------------===#
-#
-# This script will merge an svn revision to a git repo using git-svn while
-# preserving the svn commit message.
-# 
-# NOTE: This script has only been tested with the per-project git repositories
-# and not with the monorepo.
-#
-# In order to use this script, you must:
-# 1) Checkout the stable branch you would like to merge the revision into.
-# 2) Correctly configure the branch as an svn-remote by adding the following to
-# your .git/config file for your git repo (replace xy with the major/minor
-# version of the release branch. e.g. release_50 or release_60):
-#
-#[svn-remote "release_xy"]
-#url = https://llvm.org/svn/llvm-project/llvm/branches/release_xy
-#fetch = :refs/remotes/origin/release_xy
-#
-# Once the script completes successfully, you can push your changes with
-# git-svn dcommit
-#
-#===------------------------------------------------------------------------===#
-
-
-usage() {
-    echo "usage: `basename $0` [OPTIONS]"
-    echo "  -rev NUM       The revision to merge into the project"
-}
-
-while [ $# -gt 0 ]; do
-    case $1 in
-        -rev | --rev | -r )
-            shift
-            rev=$1
-            ;;
-        -h | -help | --help )
-            usage
-            ;;
-        * )
-            echo "unknown option: $1"
-            echo ""
-            usage
-            exit 1
-            ;;
-    esac
-    shift
-done
-
-if [ -z "$rev" ]; then
-    echo "error: need to specify a revision"
-    echo
-    usage
-    exit 1
-fi
-
-# Rebuild revision map
-git svn find-rev r$rev origin/master &>/dev/null
-
-git_hash=`git svn find-rev r$rev origin/master`
-
-if [ -z "$git_hash" ]; then
-    echo "error: could not determine git commit for r$rev"
-    exit 1
-fi
-
-commit_msg=`svn log -r $rev https://llvm.org/svn/llvm-project/`
-ammend="--amend"
-
-git cherry-pick $git_hash
-if [ $? -ne 0 ]; then
-  echo ""
-  echo "** cherry-pick failed enter 'e' to exit or 'c' when you have finished resolving the conflicts:"
-  read option
-  case $option in
-    c)
-      ammend=""
-      ;;
-    *)
-      exit 1
-      ;;
-  esac
-fi
-         
-git commit $ammend -m "Merging r$rev:" -m "$commit_msg"
diff --git a/gnu/llvm/llvm/utils/release/merge.sh b/gnu/llvm/llvm/utils/release/merge.sh
deleted file mode 100755 (executable)
index ad289b6..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-#!/bin/sh
-#===-- merge.sh - Test the LLVM release candidates -------------------------===#
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#
-#===------------------------------------------------------------------------===#
-#
-# Merge a revision into a project.
-#
-#===------------------------------------------------------------------------===#
-
-set -e
-
-rev=""
-proj=""
-revert="no"
-srcdir=""
-
-usage() {
-    echo "usage: `basename $0` [OPTIONS]"
-    echo "  -proj PROJECT  The project to merge the result into"
-    echo "  -rev NUM       The revision to merge into the project"
-    echo "  -revert        Revert rather than merge the commit"
-    echo "  -srcdir        The root of the project checkout"
-}
-
-while [ $# -gt 0 ]; do
-    case $1 in
-        -rev | --rev | -r )
-            shift
-            rev=$1
-            ;;
-        -proj | --proj | -project | --project | -p )
-            shift
-            proj=$1
-            ;;
-        --srcdir | -srcdir | -s)
-            shift
-            srcdir=$1
-            ;;
-        -h | -help | --help )
-            usage
-            ;;
-        -revert | --revert )
-            revert="yes"
-            ;;
-        * )
-            echo "unknown option: $1"
-            echo ""
-            usage
-            exit 1
-            ;;
-    esac
-    shift
-done
-
-if [ -z "$srcdir" ]; then
-    srcdir="$proj.src"
-fi
-
-if [ "x$rev" = "x" -o "x$proj" = "x" ]; then
-    echo "error: need to specify project and revision"
-    echo
-    usage
-    exit 1
-fi
-
-if ! svn ls http://llvm.org/svn/llvm-project/$proj/trunk > /dev/null 2>&1 ; then
-    echo "error: invalid project: $proj"
-    exit 1
-fi
-
-tempfile=`mktemp /tmp/merge.XXXXXX` || exit 1
-
-if [ $revert = "yes" ]; then
-    echo "Reverting r$rev:" > $tempfile
-else
-    echo "Merging r$rev:" > $tempfile
-fi
-svn log -c $rev http://llvm.org/svn/llvm-project/$proj/trunk >> $tempfile 2>&1
-
-cd "$srcdir"
-echo "# Updating tree"
-svn up
-
-if [ $revert = "yes" ]; then
-    echo "# Reverting r$rev in $proj locally"
-    svn merge -c -$rev . || exit 1
-else
-    echo "# Merging r$rev into $proj locally"
-    svn merge -c $rev https://llvm.org/svn/llvm-project/$proj/trunk . || exit 1
-fi
-
-echo
-echo "# To commit, run the following in $srcdir/:"
-echo svn commit -F $tempfile
-
-exit 0
diff --git a/gnu/llvm/llvm/utils/release/tag.sh b/gnu/llvm/llvm/utils/release/tag.sh
deleted file mode 100755 (executable)
index 01922f4..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-#!/bin/bash
-#===-- tag.sh - Tag the LLVM release candidates ----------------------------===#
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#
-#===------------------------------------------------------------------------===#
-#
-# Create branches and release candidates for the LLVM release.
-#
-#===------------------------------------------------------------------------===#
-
-set -e
-
-release=""
-rc=""
-rebranch="no"
-# All the projects that make it into the monorepo, plus test-suite.
-projects="monorepo-root cfe clang-tools-extra compiler-rt debuginfo-tests libclc libcxx libcxxabi libunwind lld lldb llgo llvm openmp parallel-libs polly pstl test-suite"
-dryrun=""
-revision="HEAD"
-
-base_url="https://llvm.org/svn/llvm-project"
-
-usage() {
-    echo "usage: `basename $0` -release <num> [-rebranch] [-revision <num>] [-dry-run]"
-    echo "usage: `basename $0` -release <num> -rc <num> [-dry-run]"
-    echo " "
-    echo "  -release <num>   The version number of the release"
-    echo "  -rc <num>        The release candidate number"
-    echo "  -rebranch        Remove existing branch, if present, before branching"
-    echo "  -final           Tag final release candidate"
-    echo "  -revision <num>  Revision to branch off (default: HEAD)"
-    echo "  -dry-run         Make no changes to the repository, just print the commands"
-}
-
-tag_version() {
-    local remove_args=()
-    local create_args=()
-    local message_prefix
-    set -x
-    for proj in $projects; do
-        if svn ls $base_url/$proj/branches/release_$branch_release > /dev/null 2>&1 ; then
-            if [ $rebranch = "no" ]; then
-                continue
-            fi
-            remove_args+=(rm "$proj/branches/release_$branch_release")
-        fi
-        create_args+=(cp ${revision} "$proj/trunk" "$proj/branches/release_$branch_release")
-    done
-    if [[ ${#remove_args[@]} -gt 0 ]]; then
-        message_prefix="Removing and recreating"
-    else
-        message_prefix="Creating"
-    fi
-    if [[ ${#create_args[@]} -gt 0 ]]; then
-        ${dryrun} svnmucc --root-url "$base_url" \
-            -m "$message_prefix release_$branch_release branch off revision ${revision}" \
-            "${remove_args[@]}" "${create_args[@]}"
-    fi
-    set +x
-}
-
-tag_release_candidate() {
-    local create_args=()
-    set -x
-    for proj in $projects ; do
-        if ! svn ls $base_url/$proj/tags/RELEASE_$tag_release > /dev/null 2>&1 ; then
-            create_args+=(mkdir "$proj/tags/RELEASE_$tag_release")
-        fi
-        if ! svn ls $base_url/$proj/tags/RELEASE_$tag_release/$rc > /dev/null 2>&1 ; then
-            create_args+=(cp HEAD
-                          "$proj/branches/release_$branch_release"
-                          "$proj/tags/RELEASE_$tag_release/$rc")
-        fi
-    done
-    if [[ ${#create_args[@]} -gt 0 ]]; then
-        ${dryrun} svnmucc --root-url "$base_url" \
-            -m "Creating release candidate $rc from release_$tag_release branch" \
-            "${create_args[@]}"
-    fi
-    set +x
-}
-
-while [ $# -gt 0 ]; do
-    case $1 in
-        -release | --release )
-            shift
-            release=$1
-            ;;
-        -rc | --rc )
-            shift
-            rc="rc$1"
-            ;;
-        -rebranch | --rebranch )
-            rebranch="yes"
-            ;;
-        -final | --final )
-            rc="final"
-            ;;
-        -revision | --revision )
-            shift
-            revision="$1"
-            ;;
-        -dry-run | --dry-run )
-            dryrun="echo"
-            ;;
-        -h | --help | -help )
-            usage
-            exit 0
-            ;;
-        * )
-            echo "unknown option: $1"
-            usage
-            exit 1
-            ;;
-    esac
-    shift
-done
-
-if [ "$release" = "" ]; then
-    echo "error: need to specify a release version"
-    echo
-    usage
-    exit 1
-fi
-
-branch_release=`echo $release | sed -e 's,\([0-9]*\.[0-9]*\).*,\1,' | sed -e 's,\.,,g'`
-tag_release=`echo $release | sed -e 's,\.,,g'`
-
-if [ "$rc" = "" ]; then
-    tag_version
-else
-    if [ "$revision" != "HEAD" ]; then
-        echo "error: cannot use -revision with -rc"
-        echo
-        usage
-        exit 1
-    fi
-
-    tag_release_candidate
-fi
-
-exit 0
diff --git a/gnu/llvm/llvm/utils/vscode/tablegen/.vscode/launch.json b/gnu/llvm/llvm/utils/vscode/tablegen/.vscode/launch.json
deleted file mode 100644 (file)
index 8384213..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// A launch configuration that launches the extension inside a new window
-{
-    "version": "0.1.0",
-    "configurations": [
-        {
-            "name": "Launch Extension",
-            "type": "extensionHost",
-            "request": "launch",
-            "runtimeExecutable": "${execPath}",
-            "args": ["--extensionDevelopmentPath=${workspaceRoot}" ]
-        }
-    ]
-}
\ No newline at end of file
diff --git a/gnu/llvm/llvm/utils/vscode/tablegen/CHANGELOG.md b/gnu/llvm/llvm/utils/vscode/tablegen/CHANGELOG.md
deleted file mode 100644 (file)
index 4cedbb9..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# Change Log
-
-- Initial release
-
diff --git a/gnu/llvm/llvm/utils/vscode/tablegen/README.md b/gnu/llvm/llvm/utils/vscode/tablegen/README.md
deleted file mode 100644 (file)
index e726004..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-# tablegen README
-
-This VSCode colorizer extension is a translation of the textmate bunble to
-VSCode using the "yo code" npm package. Currently, keywords, comments, and
-strings are highlighted.
-
-To install this VSCode .td file colorizer, copy it to the following locations
-per your Operating System:
-
-  - Windows: %USERPROFILE%\.vscode\extensions
-  - Mac: ~/.vscode/extensions
-  - Linux: ~/.vscode/extensions
-
diff --git a/gnu/llvm/llvm/utils/vscode/tablegen/language-configuration.json b/gnu/llvm/llvm/utils/vscode/tablegen/language-configuration.json
deleted file mode 100644 (file)
index aa25710..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-{
-    "comments": {
-        // symbol used for single line comment. Remove this entry if your language does not support line comments
-        "lineComment": "//",
-        // symbols used for start and end a block comment. Remove this entry if your language does not support block comments
-        "blockComment": [ "/*", "*/" ]
-    },
-    // symbols used as brackets
-    "brackets": [
-        ["{", "}"],
-        ["[", "]"],
-        ["(", ")"]
-    ],
-    // symbols that are auto closed when typing
-    "autoClosingPairs": [
-        ["{", "}"],
-        ["[", "]"],
-        ["(", ")"],
-        ["\"", "\""],
-        ["'", "'"]
-    ],
-    // symbols that that can be used to surround a selection
-    "surroundingPairs": [
-        ["{", "}"],
-        ["[", "]"],
-        ["(", ")"],
-        ["\"", "\""],
-        ["'", "'"]
-    ]
-}
\ No newline at end of file
diff --git a/gnu/llvm/llvm/utils/vscode/tablegen/package.json b/gnu/llvm/llvm/utils/vscode/tablegen/package.json
deleted file mode 100644 (file)
index efd32ac..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-{
-    "name": "tablegen",
-    "displayName": "TableGen",
-    "description": "VSCode Language Colorizer for LLVM's TableGen language.",
-    "version": "0.0.1",
-    "publisher": "llvm",
-    "engines": {
-        "vscode": "^1.12.0"
-    },
-    "categories": [
-        "Languages"
-    ],
-    "contributes": {
-        "languages": [{
-            "id": "tablegen",
-            "aliases": ["TableGen", "tablegen"],
-            "extensions": [".td"],
-            "configuration": "./language-configuration.json"
-        }],
-        "grammars": [{
-            "language": "tablegen",
-            "scopeName": "source.tablegen",
-            "path": "./syntaxes/TableGen.tmLanguage"
-        }]
-    }
-}
\ No newline at end of file
diff --git a/gnu/llvm/llvm/utils/vscode/tablegen/syntaxes/TableGen.tmLanguage b/gnu/llvm/llvm/utils/vscode/tablegen/syntaxes/TableGen.tmLanguage
deleted file mode 100644 (file)
index 0b08ec2..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-       <key>fileTypes</key>
-       <array><string>td</string></array>
-       <key>foldingStartMarker</key>
-       <string>/\*\*|\{\s*$</string>
-       <key>foldingStopMarker</key>
-       <string>\*\*/|^\s*\}</string>
-       <key>name</key>
-       <string>TableGen</string>
-       <key>patterns</key>
-       <array>
-               <dict>
-                       <key>include</key>
-                       <string>#comments</string>
-               </dict>
-               <dict>
-                       <key>match</key>
-                       <string>\b(def|let|in|code|dag|string|list|bits|bit|field|include|defm|foreach|class|multiclass|int|defvar|defset|if|then|else)\b</string>
-                       <key>name</key>
-                       <string>keyword.control.tablegen</string>
-               </dict>
-               <dict>
-                       <key>begin</key>
-                       <string>"</string>
-                       <key>end</key>
-                       <string>"</string>
-                       <key>name</key>
-                       <string>string.quoted.double.untitled</string>
-                       <key>patterns</key>
-                       <array>
-                               <dict>
-                                       <key>match</key>
-                                       <string>\\.</string>
-                                       <key>name</key>
-                                       <string>constant.character.escape.tablegen</string>
-                               </dict>
-                       </array>
-               </dict>
-       </array>
-       <key>repository</key>
-       <dict>
-               <key>comments</key>
-               <dict>
-                       <key>patterns</key>
-                       <array>
-                               <dict>
-                                       <key>captures</key>
-                                       <dict>
-                                               <key>1</key>
-                                               <dict>
-                                                       <key>name</key>
-                                                       <string>meta.toc-list.banner.block.tablegen</string>
-                                               </dict>
-                                       </dict>
-                                       <key>match</key>
-                                       <string>^/\* =(\s*.*?)\s*= \*/$\n?</string>
-                                       <key>name</key>
-                                       <string>comment.block.tablegen</string>
-                               </dict>
-                               <dict>
-                                       <key>begin</key>
-                                       <string>/\*</string>
-                                       <key>captures</key>
-                                       <dict>
-                                               <key>0</key>
-                                               <dict>
-                                                       <key>name</key>
-                                                       <string>punctuation.definition.comment.tablegen</string>
-                                               </dict>
-                                       </dict>
-                                       <key>end</key>
-                                       <string>\*/</string>
-                                       <key>name</key>
-                                       <string>comment.block.tablegen</string>
-                               </dict>
-                               <dict>
-                                       <key>match</key>
-                                       <string>\*/.*\n</string>
-                                       <key>name</key>
-                                       <string>invalid.illegal.stray-comment-end.tablegen</string>
-                               </dict>
-                               <dict>
-                                       <key>captures</key>
-                                       <dict>
-                                               <key>1</key>
-                                               <dict>
-                                                       <key>name</key>
-                                                       <string>meta.toc-list.banner.line.tablegen</string>
-                                               </dict>
-                                       </dict>
-                                       <key>match</key>
-                                       <string>^// =(\s*.*?)\s*=\s*$\n?</string>
-                                       <key>name</key>
-                                       <string>comment.line.banner.tablegen</string>
-                               </dict>
-                               <dict>
-                                       <key>begin</key>
-                                       <string>//</string>
-                                       <key>beginCaptures</key>
-                                       <dict>
-                                               <key>0</key>
-                                               <dict>
-                                                       <key>name</key>
-                                                       <string>punctuation.definition.comment.tablegen</string>
-                                               </dict>
-                                       </dict>
-                                       <key>end</key>
-                                       <string>$\n?</string>
-                                       <key>name</key>
-                                       <string>comment.line.double-slash.tablegen</string>
-                                       <key>patterns</key>
-                                       <array>
-                                               <dict>
-                                                       <key>match</key>
-                                                       <string>(?&gt;\\\s*\n)</string>
-                                                       <key>name</key>
-                                                       <string>punctuation.separator.continuation.tablegen</string>
-                                               </dict>
-                                       </array>
-                               </dict>
-                       </array>
-               </dict>
-       </dict>
-       <key>scopeName</key>
-       <string>source.tablegen</string>
-       <key>uuid</key>
-       <string>3A090BFC-E74B-4993-8DAE-7CCF6D238A32</string>
-</dict>
-</plist>
diff --git a/gnu/llvm/llvm/utils/vscode/tablegen/vsc-extension-quickstart.md b/gnu/llvm/llvm/utils/vscode/tablegen/vsc-extension-quickstart.md
deleted file mode 100644 (file)
index abfbfdb..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-# Welcome to your VS Code Extension
-
-## What's in the folder
-* This folder contains all of the files necessary for your extension
-* `package.json` - this is the manifest file in which you declare your language support and define
-the location of the grammar file that has been copied into you extension.
-* `syntaxes/TableGen.tmLanguage` - this is the Text mate grammar file that is used for tokenization
-* `language-configuration.json` - this the language configuration, defining the tokens that are used for
-comments and brackets.
-
-## Get up and running straight away
-* Make sure the language configuration settings in `language-configuration.json` are accurate
-* press `F5` to open a new window with your extension loaded
-* create a new file with a file name suffix matching your language
-* verify that syntax highlight works and that the language configuration settings are working
-
-## Make changes
-* you can relaunch the extension from the debug toolbar after making changes to the files listed above
-* you can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes
-
-## Add more language features
-* To add features such as intellisense, hovers and validators check out the VS Code extenders documentation at
-https://code.visualstudio.com/docs
-
-## Install your extension
-* To start using your extension with Visual Studio Code copy it into the `<user home>/.vscode/extensions` folder and restart Code.
-* To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension.
\ No newline at end of file